MCPcopy Index your code
hub / github.com/NetHack/NetHack / minstapetrify

Function minstapetrify

src/trap.c:3857–3880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3855}
3856
3857void
3858minstapetrify(struct monst *mon, boolean byplayer)
3859{
3860 if (resists_ston(mon))
3861 return;
3862 if (poly_when_stoned(mon->data)) {
3863 mon_to_stone(mon);
3864 return;
3865 }
3866 if (!vamp_stone(mon))
3867 return;
3868
3869 /* give a "<mon> is slowing down" message and also remove
3870 intrinsic speed (comparable to similar effect on the hero) */
3871 mon_adjust_speed(mon, -3, (struct obj *) 0);
3872
3873 if (cansee(mon->mx, mon->my))
3874 pline_mon(mon, "%s turns to stone.", Monnam(mon));
3875 if (byplayer) {
3876 gs.stoned = TRUE;
3877 xkilled(mon, XKILL_NOMSG);
3878 } else
3879 monstone(mon);
3880}
3881
3882void
3883selftouch(const char *arg)

Callers 10

stealFunction · 0.85
hmon_hitmon_misc_objFunction · 0.85
mhitm_ad_stonFunction · 0.85
engulfer_digests_foodFunction · 0.85
hurtle_stepFunction · 0.85
mhurtle_stepFunction · 0.85
thitmonstFunction · 0.85
mselftouchFunction · 0.85
ohitmonFunction · 0.85
gulpmuFunction · 0.85

Calls 8

poly_when_stonedFunction · 0.85
mon_to_stoneFunction · 0.85
vamp_stoneFunction · 0.85
mon_adjust_speedFunction · 0.85
pline_monFunction · 0.85
MonnamFunction · 0.85
xkilledFunction · 0.85
monstoneFunction · 0.85

Tested by

no test coverage detected