fix #Q417 - gelatinous cubes can engulf Rider corpses
From a bug report: gelatinous cubes could engulf Rider corpses, allowing g.cube and cargo to be teleported away without triggering corpse revival, or to be hit with theft attack by poly'd hero to get the corpse into inventory so it could then be put into a container in order to prevent revival (or to be destroyed via bag of holding explosion or cursed access).
This commit is contained in:
@@ -814,6 +814,12 @@ meatobj(mtmp) /* for gelatinous cubes */
|
||||
/* in case it polymorphed or died */
|
||||
if (ptr != &mons[PM_GELATINOUS_CUBE])
|
||||
return !ptr ? 2 : 1;
|
||||
} else if (otmp->otyp == CORPSE &&
|
||||
is_rider(&mons[otmp->corpsenm])) {
|
||||
/* Rider corpse will always pass the obj_resists() test above
|
||||
and not be eaten; we don't want it to be engulfed either */
|
||||
(void)revive_corpse(otmp);
|
||||
/* continue; -- regardless of whether it revived */
|
||||
} else if (otmp->oclass != ROCK_CLASS &&
|
||||
otmp != uball && otmp != uchain) {
|
||||
++ecount;
|
||||
|
||||
Reference in New Issue
Block a user