Accessibility: give a message when teleporting a monster
Teleporting a monster only updated the map. Give a message so blind players can get the same information. Making a monster invisible gives the same message, if you cannot detect invisible. Several other places where monsters teleported themselves now also give the same message.
This commit is contained in:
12
src/wizard.c
12
src/wizard.c
@@ -361,9 +361,9 @@ tactics(struct monst *mtmp)
|
||||
if (In_W_tower(mx, my, &u.uz)
|
||||
|| (mtmp->iswiz && !sx && !mon_has_amulet(mtmp))) {
|
||||
if (!rn2(3 + mtmp->mhp / 10))
|
||||
(void) rloc(mtmp, TRUE);
|
||||
(void) rloc(mtmp, RLOC_MSG);
|
||||
} else if (sx && (mx != sx || my != sy)) {
|
||||
if (!mnearto(mtmp, sx, sy, TRUE)) {
|
||||
if (!mnearto(mtmp, sx, sy, TRUE, RLOC_MSG)) {
|
||||
/* couldn't move to the target spot for some reason,
|
||||
so stay where we are (don't actually need rloc_to()
|
||||
because mtmp is still on the map at <mx,my>... */
|
||||
@@ -382,7 +382,7 @@ tactics(struct monst *mtmp)
|
||||
|
||||
case STRAT_NONE: /* harass */
|
||||
if (!rn2(!mtmp->mflee ? 5 : 33))
|
||||
mnexto(mtmp);
|
||||
mnexto(mtmp, RLOC_MSG);
|
||||
return 0;
|
||||
|
||||
default: /* kill, maim, pillage! */
|
||||
@@ -397,7 +397,7 @@ tactics(struct monst *mtmp)
|
||||
}
|
||||
if ((u.ux == tx && u.uy == ty) || where == STRAT_PLAYER) {
|
||||
/* player is standing on it (or has it) */
|
||||
mnexto(mtmp);
|
||||
mnexto(mtmp, RLOC_MSG);
|
||||
return 0;
|
||||
}
|
||||
if (where == STRAT_GROUND) {
|
||||
@@ -419,12 +419,12 @@ tactics(struct monst *mtmp)
|
||||
} else {
|
||||
/* a monster is standing on it - cause some trouble */
|
||||
if (!rn2(5))
|
||||
mnexto(mtmp);
|
||||
mnexto(mtmp, RLOC_MSG);
|
||||
return 0;
|
||||
}
|
||||
} else { /* a monster has it - 'port beside it. */
|
||||
mx = mtmp->mx, my = mtmp->my;
|
||||
if (!mnearto(mtmp, tx, ty, FALSE))
|
||||
if (!mnearto(mtmp, tx, ty, FALSE, RLOC_MSG))
|
||||
rloc_to(mtmp, mx, my); /* no room? stay put */
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user