fix issue #1435 - vampire leaders as wolves
Issue reported by by vultur-cadens: a vampire lord or lady might change to wolf form while flying over water or lava, ending flight and dropping into that water or lava. It would then drown or burn up, revert to vampire leader form and resume flying, then be teleported since it was past the check for being in flight. The fix is pretty staightforward. It is still possible to force wolf form with the monpolycontrol option, leaving the wolf standing on water (didn't test for lava) and then drowning on its next move, where it will revert to vampire form but no longer teleport away. There's no need for a wizard mode hack to behave more stringently. Fixes #1435
This commit is contained in:
@@ -1521,6 +1521,8 @@ worn alchemy smock reduces chances of dipped potions exploding
|
||||
dwarves can sense buried items under their feet
|
||||
monsters trapped in pits cannot kick
|
||||
create familiar spell can create harder creatures
|
||||
a vampire lord could choose to take on wolf form while flying over water or
|
||||
lava, then revert to vampire lord form and teleport unnecessarily
|
||||
|
||||
|
||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||
|
||||
36
src/mon.c
36
src/mon.c
@@ -1022,14 +1022,22 @@ minliquid_core(struct monst *mtmp)
|
||||
pline_mon(mtmp, "%s surrenders to the fire.",
|
||||
Monnam(mtmp));
|
||||
mondead(mtmp); /* no corpse */
|
||||
} else if (cansee(mtmp->mx, mtmp->my))
|
||||
pline_mon(mtmp, "%s burns slightly.",
|
||||
Monnam(mtmp));
|
||||
} else if (cansee(mtmp->mx, mtmp->my)) {
|
||||
pline_mon(mtmp, "%s burns slightly.", Monnam(mtmp));
|
||||
}
|
||||
}
|
||||
if (!DEADMONSTER(mtmp)) {
|
||||
(void) fire_damage_chain(mtmp->minvent, FALSE, FALSE,
|
||||
mtmp->mx, mtmp->my);
|
||||
(void) rloc(mtmp, RLOC_MSG);
|
||||
if (m_in_air(mtmp)) {
|
||||
; /* vampshifter in wolf form can revert to vampire lord
|
||||
* and become a flyer so not need to teleport */
|
||||
} else if (likes_lava(mtmp->data)) {
|
||||
; /* likes_lava case is hypothetical */
|
||||
} else {
|
||||
(void) fire_damage_chain(mtmp->minvent, FALSE, FALSE,
|
||||
mtmp->mx, mtmp->my);
|
||||
if (!rloc(mtmp, RLOC_MSG))
|
||||
deal_with_overcrowding(mtmp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -1065,9 +1073,14 @@ minliquid_core(struct monst *mtmp)
|
||||
else
|
||||
xkilled(mtmp, XKILL_NOMSG);
|
||||
if (!DEADMONSTER(mtmp)) {
|
||||
water_damage_chain(mtmp->minvent, FALSE);
|
||||
if (!rloc(mtmp, RLOC_NOMSG))
|
||||
deal_with_overcrowding(mtmp);
|
||||
if (m_in_air(mtmp)) {
|
||||
; /* vampshifter in wolf form can revert to vampire lord
|
||||
* and become a flyer so not need to teleport */
|
||||
} else {
|
||||
water_damage_chain(mtmp->minvent, FALSE);
|
||||
if (!rloc(mtmp, RLOC_NOMSG))
|
||||
deal_with_overcrowding(mtmp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -4888,7 +4901,10 @@ pickvampshape(struct monst *mon)
|
||||
FALLTHROUGH;
|
||||
/*FALLTHRU*/
|
||||
case PM_VAMPIRE_LEADER: /* vampire lord or Vlad can become wolf */
|
||||
if (!rn2(wolfchance) && !uppercase_only) {
|
||||
if (!rn2(wolfchance) && !uppercase_only
|
||||
/* don't pick a walking form if that would lead to immediate
|
||||
drowning or immolation and reversion to vampire form */
|
||||
&& !is_pool_or_lava(mon->mx, mon->my)) {
|
||||
mndx = PM_WOLF;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user