Decouple mon state adjustment from find_roll_to_hit

If you have a function named like that, and it goes and
changes the monster state, that's just wrong.

Move waking up the monster from the hit into separate function.
This commit is contained in:
Pasi Kallinen
2021-12-15 22:11:19 +02:00
parent 4d42823fd8
commit e251bb6a82
3 changed files with 30 additions and 11 deletions

View File

@@ -2707,6 +2707,7 @@ extern void dynamic_multi_reason(struct monst *, const char *, boolean);
extern void erode_armor(struct monst *, int);
extern boolean attack_checks(struct monst *, struct obj *);
extern void check_caitiff(struct monst *);
extern void mon_maybe_wakeup_on_hit(struct monst *);
extern int find_roll_to_hit(struct monst *, uchar, struct obj *, int *, int *);
extern boolean force_attack(struct monst *, boolean);
extern boolean do_attack(struct monst *);