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

Function assess_dmg

src/mhitu.c:2354–2365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2352}
2353
2354staticfn int
2355assess_dmg(struct monst *mtmp, int tmp)
2356{
2357 if ((mtmp->mhp -= tmp) <= 0) {
2358 pline_mon(mtmp, "%s dies!", Monnam(mtmp));
2359 xkilled(mtmp, XKILL_NOMSG);
2360 if (!DEADMONSTER(mtmp))
2361 return M_ATTK_HIT;
2362 return M_ATTK_AGR_DIED;
2363 }
2364 return M_ATTK_HIT;
2365}
2366
2367#if 0
2368/* returns True if monster has a range attack in its repertoire

Callers 1

passiveumFunction · 0.85

Calls 3

pline_monFunction · 0.85
MonnamFunction · 0.85
xkilledFunction · 0.85

Tested by

no test coverage detected