engulfing at dangerous location (trunk only)

From a bug report, 2005:
engulfers affected by conflict might swallow and kill monsters in pools
(not mentioned:  or lava or traps) and move to that spot, then not drown
til next move.  Make drowning and trap checks when engulf attack succeeds
instead of waiting for next turn.

     [This was #2 of the 3 minor bugs; the others have already been fixed.
They were:  (1) placing and exploding a land mine on a lowered drawbridge
would leave a pit instead of destroying the bridge; and (3) cause of death
string "killed by Mr. Izchak, the shopkeeper" should omit "Mr.".]
This commit is contained in:
nethack.rankin
2007-05-28 01:35:25 +00:00
parent bb5ade4293
commit f8fcaf8cbd
2 changed files with 9 additions and 7 deletions

View File

@@ -236,6 +236,8 @@ kick evasion and jousting/staggering blows shouldn't move grid bugs diagonally
#untrap didn't check whether hero could reach the ground
digging/chopping a closed drawbridge message mentioned digging a "wall"
attacking via applied polearm now honors the "confirm" option
engulfer under influence of conflict or confusion could swallow monster at
water/lava/trap spot and not be affected by destination til next move
Platform- and/or Interface-Specific Fixes

View File

@@ -589,10 +589,9 @@ gulpmm(magr, mdef, mattk)
status = mdamagem(magr, mdef, mattk);
if ((status & MM_AGR_DIED) && (status & MM_DEF_DIED)) {
if ((status & (MM_AGR_DIED|MM_DEF_DIED)) == (MM_AGR_DIED|MM_DEF_DIED)) {
; /* both died -- do nothing */
}
else if (status & MM_DEF_DIED) { /* defender died */
} else if (status & MM_DEF_DIED) { /* defender died */
/*
* Note: remove_monster() was called in relmon(), wiping out
* magr from level.monsters[mdef->mx][mdef->my]. We need to
@@ -600,12 +599,13 @@ gulpmm(magr, mdef, mattk)
*/
place_monster(magr, dx, dy);
newsym(dx, dy);
}
else if (status & MM_AGR_DIED) { /* agressor died */
/* aggressor moves to <dx,dy> and might encounter trouble there */
if (minliquid(magr) || (t_at(dx, dy) && mintrap(magr) == 2))
status |= MM_AGR_DIED;
} else if (status & MM_AGR_DIED) { /* aggressor died */
place_monster(mdef, dx, dy);
newsym(dx, dy);
}
else { /* both alive, put them back */
} else { /* both alive, put them back */
if (cansee(dx, dy))
pline("%s is regurgitated!", Monnam(mdef));