fix github issue #1186 - eating Medusa's corpse
and having temporary stoning resistance timeout before finishing. Issue reported by Umbire: hero was able to finish eating Medusa's corpse safely after getting the message about no longer being protected against stoning that is given when temporary resistance times out. The eating code was extending temporary resistance--when eating something protected by such--to avoid just that. I thought this was probably a message sequencing situation but it turns out that the code was using touch_petrifies() to test the meal. It should use flesh_petrifies() instead; Medusa doesn't pass touch_petrifies(). I didn't figure that out until after rewriting how the duration is extended. The old way probably would have worked as desired with the revised petrify test but I'm checking in the new version anyway. Fixes #1186
This commit is contained in:
@@ -863,8 +863,10 @@ extern int eaten_stat(int, struct obj *) NONNULLARG2;
|
||||
extern void food_disappears(struct obj *) NONNULLARG1;
|
||||
extern void food_substitution(struct obj *, struct obj *) NONNULLPTRS;
|
||||
extern long temp_resist(int);
|
||||
extern boolean eating_dangerous_corpse(int);
|
||||
extern void eating_conducts(struct permonst *) NONNULLARG1;
|
||||
extern int eat_brains(struct monst *, struct monst *, boolean, int *) NONNULLARG12;
|
||||
extern int eat_brains(struct monst *, struct monst *, boolean,
|
||||
int *) NONNULLARG12;
|
||||
extern void fix_petrification(void);
|
||||
extern int intrinsic_possible(int, struct permonst *) NONNULLARG2;
|
||||
extern boolean should_givit(int, struct permonst *) NONNULLARG2;
|
||||
|
||||
Reference in New Issue
Block a user