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:
@@ -178,6 +178,7 @@ kick_monster(struct monst *mon, xchar x, xchar y)
|
||||
attknum = 0,
|
||||
tmp = find_roll_to_hit(mon, AT_KICK, (struct obj *) 0, &attknum,
|
||||
&armorpenalty);
|
||||
mon_maybe_wakeup_on_hit(mon);
|
||||
|
||||
for (i = 0; i < NATTK; i++) {
|
||||
/* first of two kicks might have provoked counterattack
|
||||
|
||||
Reference in New Issue
Block a user