MCPcopy Create free account
hub / github.com/NetHack/NetHack / mon_regen

Function mon_regen

src/monmove.c:306–320  ·  view source on GitHub ↗

regenerate lost hit points */

Source from the content-addressed store, hash-verified

304
305/* regenerate lost hit points */
306void
307mon_regen(struct monst *mon, boolean digest_meal)
308{
309 if (svm.moves % 20 == 0 || regenerates(mon->data))
310 healmon(mon, 1, 0);
311 if (mon->mspec_used)
312 mon->mspec_used--;
313 if (digest_meal) {
314 if (mon->meating) {
315 mon->meating--;
316 if (mon->meating <= 0)
317 finish_meating(mon);
318 }
319 }
320}
321
322/*
323 * Possibly awaken the given monster. Return a 1 if the monster has been

Callers 1

m_calcdistressFunction · 0.85

Calls 2

healmonFunction · 0.85
finish_meatingFunction · 0.85

Tested by

no test coverage detected