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

Function m_cure_self

src/mcastu.c:307–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307staticfn int
308m_cure_self(struct monst *mtmp, int dmg)
309{
310 if (mtmp->mhp < mtmp->mhpmax) {
311 if (canseemon(mtmp))
312 pline_mon(mtmp, "%s looks better.", Monnam(mtmp));
313 /* note: player healing does 6d4; this used to do 1d8 */
314 healmon(mtmp, d(3, 6), 0);
315 dmg = 0;
316 }
317 return dmg;
318}
319
320/* unlike the finger of death spell which behaves like a wand of death,
321 this monster spell only attacks the hero */

Callers 1

mcast_spellFunction · 0.85

Calls 5

canseemonFunction · 0.85
pline_monFunction · 0.85
MonnamFunction · 0.85
healmonFunction · 0.85
dFunction · 0.85

Tested by

no test coverage detected