Corpse-eating monsters will home in on corpses

Also allow non-tame ghouls to eat corpses.
This commit is contained in:
Pasi Kallinen
2023-04-20 18:49:29 +03:00
parent 8293251224
commit a725447d65
4 changed files with 23 additions and 5 deletions

View File

@@ -1699,6 +1699,7 @@ extern int mstrength(struct permonst *);
/* ### monmove.c ### */
extern boolean mon_would_take_item(struct monst *, struct obj *);
extern boolean mon_would_consume_item(struct monst *, struct obj *);
extern boolean itsstuck(struct monst *);
extern boolean mb_trapped(struct monst *, boolean);
extern void mon_track_add(struct monst *, coordxy, coordxy);

View File

@@ -254,6 +254,12 @@
(vegan(ptr) \
|| ((ptr)->mlet == S_PUDDING && (ptr) != &mons[PM_BLACK_PUDDING]))
#define corpse_eater(ptr) \
(ptr == &mons[PM_PURPLE_WORM] \
|| ptr == &mons[PM_BABY_PURPLE_WORM] \
|| ptr == &mons[PM_GHOUL] \
|| ptr == &mons[PM_PIRANHA])
/* monkeys are tamable via bananas but not pacifiable via food,
otherwise their theft attack could be nullified too easily;
dogs and cats can be tamed by anything they like to eat and are