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:
@@ -5931,9 +5931,7 @@ passive(
|
||||
You("are suddenly very cold!");
|
||||
mdamageu(mon, tmp);
|
||||
/* monster gets stronger with your heat! */
|
||||
mon->mhp += (tmp + rn2(2)) / 2;
|
||||
if (mon->mhpmax < mon->mhp)
|
||||
mon->mhpmax = mon->mhp;
|
||||
healmon(mon, (tmp + rn2(2)) / 2, (tmp + 1) / 2);
|
||||
/* at a certain point, the monster will reproduce! */
|
||||
if (mon->mhpmax > (((int) mon->m_lev) + 1) * 8)
|
||||
(void) split_mon(mon, &gy.youmonst);
|
||||
|
||||
Reference in New Issue
Block a user