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

Function mlifesaver

src/mon.c:2826–2836  ·  view source on GitHub ↗

find the worn amulet of life saving which will save a monster */

Source from the content-addressed store, hash-verified

2824
2825/* find the worn amulet of life saving which will save a monster */
2826struct obj *
2827mlifesaver(struct monst *mon)
2828{
2829 if (!nonliving(mon->data) || is_vampshifter(mon)) {
2830 struct obj *otmp = which_armor(mon, W_AMUL);
2831
2832 if (otmp && otmp->otyp == AMULET_OF_LIFE_SAVING)
2833 return otmp;
2834 }
2835 return (struct obj *) 0;
2836}
2837
2838staticfn void
2839lifesaved_monster(struct monst *mtmp)

Callers 8

mhitm_ad_rustFunction · 0.85
mhitm_ad_dcayFunction · 0.85
mhitm_ad_fireFunction · 0.85
mhitm_ad_dgstFunction · 0.85
gulpumFunction · 0.85
lifesaved_monsterFunction · 0.85
trapeffect_rust_trapFunction · 0.85
disintegrate_monFunction · 0.85

Calls 1

which_armorFunction · 0.85

Tested by

no test coverage detected