U1270 - monster evading kick produces a teleport message in Sokoban

This time, it was just the message that was incorrect.  Added a
!level.flags.noteleport check before displaying "teleports".
This commit is contained in:
cohrs
2005-01-27 17:21:33 +00:00
parent 4527baa259
commit ce1bf539ac
2 changed files with 23 additions and 21 deletions

View File

@@ -81,6 +81,7 @@ adding more candles than required to total 7 to a candelabrum which
already had between 1 and 6 gave an ungrammatical message
give correct message when a spellcasting monster summons other monsters
correct experience calculation for monsters that cause nonphysical damage
monsters evading a kick on noteleport levels would cause a "teleports" message
Platform- and/or Interface-Specific Fixes

View File

@@ -201,30 +201,31 @@ doit:
mon->data->mlet != S_EEL && haseyes(mon->data) && mon->mcanmove &&
!mon->mstun && !mon->mconf && !mon->msleeping &&
mon->data->mmove >= 12) {
if(!nohands(mon->data) && !rn2(martial() ? 5 : 3)) {
pline("%s blocks your %skick.", Monnam(mon),
clumsy ? "clumsy " : "");
if(!nohands(mon->data) && !rn2(martial() ? 5 : 3)) {
pline("%s blocks your %skick.", Monnam(mon),
clumsy ? "clumsy " : "");
(void) passive(mon, FALSE, 1, AT_KICK, FALSE);
return;
} else {
mnexto(mon);
if(mon->mx != x || mon->my != y) {
if(glyph_is_invisible(levl[x][y].glyph)) {
unmap_object(x, y);
newsym(x, y);
}
pline("%s %s, %s evading your %skick.", Monnam(mon),
(!level.flags.noteleport && can_teleport(mon->data)) ?
"teleports" :
is_floater(mon->data) ? "floats" :
is_flyer(mon->data) ? "swoops" :
(nolimbs(mon->data) || slithy(mon->data)) ?
"slides" : "jumps",
clumsy ? "easily" : "nimbly",
clumsy ? "clumsy " : "");
(void) passive(mon, FALSE, 1, AT_KICK, FALSE);
return;
} else {
mnexto(mon);
if(mon->mx != x || mon->my != y) {
if(glyph_is_invisible(levl[x][y].glyph)) {
unmap_object(x, y);
newsym(x, y);
}
pline("%s %s, %s evading your %skick.", Monnam(mon),
(can_teleport(mon->data) ? "teleports" :
is_floater(mon->data) ? "floats" :
is_flyer(mon->data) ? "swoops" :
(nolimbs(mon->data) || slithy(mon->data)) ?
"slides" : "jumps"),
clumsy ? "easily" : "nimbly",
clumsy ? "clumsy " : "");
(void) passive(mon, FALSE, 1, AT_KICK, FALSE);
return;
}
}
}
}
kickdmg(mon, clumsy);
}