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

Function peffect_polymorph

src/potion.c:1317–1330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1315}
1316
1317staticfn void
1318peffect_polymorph(struct obj *otmp)
1319{
1320 You_feel("a little %s.", Hallucination ? "normal" : "strange");
1321 if (!Unchanging) {
1322 if (!otmp->blessed || (u.umonnum != u.umonster))
1323 polyself(POLY_NOFLAGS);
1324 else {
1325 polyself(POLY_CONTROLLED|POLY_LOW_CTRL);
1326 if (u.mtimedone && u.umonnum != u.umonster)
1327 u.mtimedone = min(u.mtimedone, rn2(15) + 10);
1328 }
1329 }
1330}
1331
1332int
1333peffects(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 3

You_feelFunction · 0.85
polyselfFunction · 0.85
rn2Function · 0.85

Tested by

no test coverage detected