Use a common funcion for all monster healing
Previously, the code for monster healing was repeated every time it was needed; this commit sends it all through a common function, which will make it easier to make changes to how monster healing works in the future. This is just a code reorganisation and won't have any gameplay effect unless I made a mistake.
This commit is contained in:
@@ -123,7 +123,7 @@ new_were(struct monst *mon)
|
||||
mon->mcanmove = 1;
|
||||
}
|
||||
/* regenerate by 1/4 of the lost hit points */
|
||||
mon->mhp += (mon->mhpmax - mon->mhp) / 4;
|
||||
healmon(mon, (mon->mhpmax - mon->mhp) / 4, 0);
|
||||
newsym(mon->mx, mon->my);
|
||||
mon_break_armor(mon, FALSE);
|
||||
possibly_unwield(mon, FALSE);
|
||||
|
||||
Reference in New Issue
Block a user