From: Pasi Kallinen Date: Tue, 22 Feb 2022 11:07:59 +0000 (+0200) Subject: Huge monsters easily climb out of pits X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf58d09fa626f6c7faa77f5a6f5c4aa998f0f1fc;p=nethack Huge monsters easily climb out of pits Also, give a message when a monster trapped in a pit, a web, or a bear trap frees itself. --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 4f540f85d..2bcfb1152 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -809,6 +809,8 @@ elves and rangers get alignment penalty for cutting down trees casting a forgotten spell uses some random amount of power heroes starting with a spell have at least one level one spell, and have just enough power to cast it +huge monsters get easily out of pits +give a message when a trapped monster frees itself from some trap Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/trap.c b/src/trap.c index ba8b09480..98429ead6 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3080,7 +3080,7 @@ mintrap(register struct monst *mtmp) seetrap(trap); } - if (!rn2(40)) { + if (!rn2(40) || (is_pit(trap->ttyp) && mtmp->data->msize >= MZ_HUGE)) { if (sobj_at(BOULDER, mtmp->mx, mtmp->my) && is_pit(trap->ttyp)) { if (!rn2(2)) { @@ -3090,6 +3090,14 @@ mintrap(register struct monst *mtmp) fill_pit(mtmp->mx, mtmp->my); } } else { + if (canseemon(mtmp)) { + if (is_pit(trap->ttyp)) + pline("%s climbs %sout of the pit.", Monnam(mtmp), + mtmp->data->msize >= MZ_HUGE ? "easily " : ""); + else if (trap->ttyp == BEAR_TRAP || trap->ttyp == WEB) + pline("%s pulls free of the %s.", Monnam(mtmp), + trapname(trap->ttyp, FALSE)); + } mtmp->mtrapped = 0; } } else if (metallivorous(mptr)) { @@ -3497,7 +3505,7 @@ climb_pit(void) reset_utrap(FALSE); fill_pit(u.ux, u.uy); g.vision_full_recalc = 1; /* vision limits change */ - } else if (!(--u.utrap)) { + } else if (!(--u.utrap) || g.youmonst.data->msize >= MZ_HUGE) { reset_utrap(FALSE); You("%s to the edge of the %s.", (Sokoban && Levitation)