opening magic vs holding monster
Zapping wand of opening or spell of knock at engulfer while swallowed would make the engulfer expel the hero; this change makes zapping other holders release their hold. Zapping self now achieves the same effect, as does breaking a non-empty wand of opening. When poly'd hero is holding a monster rather than being held, that monster will be released. Engulfers can't re-engulf for 1 or 2 turns after releasing the hero in order to prevent hero from being immediately re-engulfed. Impose the same limitation on other holders.
This commit is contained in:
15
src/mon.c
15
src/mon.c
@@ -2725,6 +2725,8 @@ void
|
||||
unstuck(struct monst* mtmp)
|
||||
{
|
||||
if (u.ustuck == mtmp) {
|
||||
struct permonst *ptr = mtmp->data;
|
||||
|
||||
/* do this first so that docrt()'s botl update is accurate;
|
||||
safe to do as long as u.uswallow is also cleared before docrt() */
|
||||
set_ustuck((struct monst *) 0);
|
||||
@@ -2738,11 +2740,16 @@ unstuck(struct monst* mtmp)
|
||||
placebc();
|
||||
g.vision_full_recalc = 1;
|
||||
docrt();
|
||||
/* prevent swallower (mtmp might have just poly'd into something
|
||||
without an engulf attack) from immediately re-engulfing */
|
||||
if (attacktype(mtmp->data, AT_ENGL) && !mtmp->mspec_used)
|
||||
mtmp->mspec_used = rnd(2);
|
||||
}
|
||||
|
||||
/* prevent holder/engulfer from immediately re-holding/re-engulfing
|
||||
[note: this call to unstuck() might be because u.ustuck has just
|
||||
changed shape and doesn't have a holding attack any more, hence
|
||||
don't set mspec_used uncondtionally] */
|
||||
if (!mtmp->mspec_used && (dmgtype(ptr, AD_STCK)
|
||||
|| attacktype(ptr, AT_ENGL)
|
||||
|| attacktype(ptr, AT_HUGS)))
|
||||
mtmp->mspec_used = rnd(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user