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

Function instapetrify

src/trap.c:3843–3855  ·  view source on GitHub ↗

Combine cockatrice checks into single functions to avoid repeating code. */

Source from the content-addressed store, hash-verified

3841
3842/* Combine cockatrice checks into single functions to avoid repeating code. */
3843void
3844instapetrify(const char *str)
3845{
3846 if (Stone_resistance)
3847 return;
3848 if (poly_when_stoned(gy.youmonst.data) && polymon(PM_STONE_GOLEM))
3849 return;
3850 urgent_pline("You turn to stone...");
3851 svk.killer.format = KILLED_BY;
3852 if (str != svk.killer.name)
3853 Strcpy(svk.killer.name, str ? str : "");
3854 done(STONING);
3855}
3856
3857void
3858minstapetrify(struct monst *mon, boolean byplayer)

Callers 15

cant_wield_corpseFunction · 0.85
wielding_corpseFunction · 0.85
theft_petrifiesFunction · 0.85
gulpumFunction · 0.85
use_saddleFunction · 0.85
mount_steedFunction · 0.85
slip_or_tripFunction · 0.85
throw_objFunction · 0.85
hurtle_stepFunction · 0.85
mhurtle_stepFunction · 0.85
feel_cockatriceFunction · 0.85
mon_break_armorFunction · 0.85

Calls 4

poly_when_stonedFunction · 0.85
polymonFunction · 0.85
urgent_plineFunction · 0.85
doneFunction · 0.85

Tested by

no test coverage detected