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

Function theft_petrifies

src/uhitm.c:2147–2165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2145}
2146
2147staticfn boolean
2148theft_petrifies(struct obj *otmp)
2149{
2150 if (uarmg || otmp->otyp != CORPSE
2151 || !touch_petrifies(&mons[otmp->corpsenm]) || Stone_resistance)
2152 return FALSE;
2153
2154#if 0 /* no poly_when_stoned() critter has theft capability */
2155 if (poly_when_stoned(gy.youmonst.data) && polymon(PM_STONE_GOLEM)) {
2156 display_nhwindow(WIN_MESSAGE, FALSE); /* --More-- */
2157 return TRUE;
2158 }
2159#endif
2160
2161 /* stealing this corpse is fatal... */
2162 instapetrify(corpse_xname(otmp, "stolen", CXN_ARTICLE));
2163 /* apparently wasn't fatal after all... */
2164 return TRUE;
2165}
2166
2167/*
2168 * Player uses theft attack against monster.

Callers 1

steal_itFunction · 0.85

Calls 4

poly_when_stonedFunction · 0.85
polymonFunction · 0.85
instapetrifyFunction · 0.85
corpse_xnameFunction · 0.85

Tested by

no test coverage detected