monsters eating green slime corpses (trunk only)
From a bug report, pets able to eat
acidic and poisonous corpses (black naga was the case cited) would eat
green slime corpses without turning into green slime, unlike the hero.
This prevents such monsters from eating green slime unless they're
starving, implements transformation into green slime for the case where
it does get eaten, and prevents non-pet gelatinous cubes from devouring
such corpses. meatobj() is reorganized to hopefully become clearer, and
it removes the assumption that the object eater is a g.cube in case we
ever adopt slash'em's "tasmanian devil" monster.
Monsters with digestion attacks who swallow green slime monsters
are turned into green slime, but ones who swallow hero poly'd into green
slime are not. This doesn't address that.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)dog.c 3.5 2007/03/02 */
|
||||
/* SCCS Id: @(#)dog.c 3.5 2008/10/20 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -727,6 +727,10 @@ register struct obj *obj;
|
||||
(acidic(fptr) && !resists_acid(mon)) ||
|
||||
(poisonous(fptr) && !resists_poison(mon)))
|
||||
return POISON;
|
||||
/* turning into slime is preferrable to starvation */
|
||||
else if (fptr == &mons[PM_GREEN_SLIME] &&
|
||||
!slimeproof(mon->data))
|
||||
return (starving ? ACCFOOD : POISON);
|
||||
else if (vegan(fptr))
|
||||
return (herbi ? CADAVER : MANFOOD);
|
||||
/* most humanoids will avoid cannibalism unless starving;
|
||||
|
||||
Reference in New Issue
Block a user