diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 0952a3d27..075f721d5 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -113,6 +113,7 @@ add a small chance of surviving food poisoning deliberate level teleporter activation ignores magic resistance auto-id scroll of remove curse when a known buc-state was changed demon lords hate Demonbane +pets avoid eating shapeshifter corpses unless starving or nearly feral Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/dog.c b/src/dog.c index cce4b1348..45293544f 100644 --- a/src/dog.c +++ b/src/dog.c @@ -807,6 +807,17 @@ register struct obj *obj; /* turning into slime is preferable to starvation */ else if (fptr == &mons[PM_GREEN_SLIME] && !slimeproof(mon->data)) return starving ? ACCFOOD : POISON; + /* polymorphing is preferable to starvation, and the pet might also + * want to take their chances on it if they've been mistreated */ + else if (is_shapeshifter(fptr)) { + if (mon->mtame == 1) { + /* A herbivore still won't eat a nonvegan corpse, but in any + * other circumstance a pet with tameness 1 will happily eat + * a shapeshifter. */ + return (herbi && !vegan(fptr)) ? MANFOOD : CADAVER; + } + return starving ? ACCFOOD : MANFOOD; + } else if (vegan(fptr)) return herbi ? CADAVER : MANFOOD; /* most humanoids will avoid cannibalism unless starving;