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

Function mhitm_ad_samu

src/uhitm.c:4569–4589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4567}
4568
4569void
4570mhitm_ad_samu(
4571 struct monst *magr, struct attack *mattk,
4572 struct monst *mdef, struct mhitm_data *mhm)
4573{
4574 if (magr == &gy.youmonst) {
4575 /* uhitm */
4576 mhm->damage = 0;
4577 } else if (mdef == &gy.youmonst) {
4578 /* mhitu */
4579 hitmsg(magr, mattk);
4580 /* when the Wizard or quest nemesis hits, there's a 1/20 chance
4581 to steal a quest artifact (any, not just the one for the hero's
4582 own role) or the Amulet or one of the invocation tools */
4583 if (!rn2(20))
4584 stealamulet(magr);
4585 } else {
4586 /* mhitm */
4587 mhm->damage = 0;
4588 }
4589}
4590
4591/* disease */
4592void

Callers 1

mhitm_adtypingFunction · 0.85

Calls 3

hitmsgFunction · 0.85
rn2Function · 0.85
stealamuletFunction · 0.85

Tested by

no test coverage detected