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:
@@ -396,7 +396,7 @@ tactics(struct monst *mtmp)
|
||||
/* if you're not around, cast healing spells */
|
||||
if (distu(mx, my) > (BOLT_LIM * BOLT_LIM))
|
||||
if (mtmp->mhp <= mtmp->mhpmax - 8) {
|
||||
mtmp->mhp += rnd(8);
|
||||
healmon(mtmp, rnd(8), 0);
|
||||
return 1;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
|
||||
Reference in New Issue
Block a user