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

Function you_unwere

src/were.c:212–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void
213you_unwere(boolean purify)
214{
215 boolean controllable_poly = Polymorph_control && !(Stunned || Unaware);
216
217 if (purify) {
218 You_feel("purified.");
219 set_ulycn(NON_PM); /* cure lycanthropy */
220 }
221 if (!Unchanging && is_were(gy.youmonst.data)
222 && !monster_nearby()
223 && (!controllable_poly
224 || !paranoid_query(ParanoidWerechange, "Remain in beast form?")))
225 rehumanize();
226 else if (is_were(gy.youmonst.data) && !u.mtimedone)
227 u.mtimedone = rn1(200, 200); /* 40% of initial were change */
228}
229
230/* lycanthropy is being caught or cured, but no shape change is involved */
231void

Callers 6

peffect_waterFunction · 0.85
potionbreatheFunction · 0.85
mon_polyFunction · 0.85
nh_timeoutFunction · 0.85
fix_worst_troubleFunction · 0.85
fpostfxFunction · 0.85

Calls 5

You_feelFunction · 0.85
set_ulycnFunction · 0.85
monster_nearbyFunction · 0.85
paranoid_queryFunction · 0.85
rehumanizeFunction · 0.85

Tested by

no test coverage detected