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.
This commit is contained in:
Pasi Kallinen
2022-02-22 13:07:59 +02:00
parent 33556788c3
commit cf58d09fa6
2 changed files with 12 additions and 2 deletions

View File

@@ -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

View File

@@ -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)