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

Function peffect_sleeping

src/potion.c:900–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898}
899
900staticfn void
901peffect_sleeping(struct obj *otmp)
902{
903 if (Sleep_resistance || Free_action) {
904 monstseesu(M_SEEN_SLEEP);
905 You("yawn.");
906 } else {
907 You("suddenly fall asleep!");
908 monstunseesu(M_SEEN_SLEEP);
909 fall_asleep(-rn1(10, 25 - 12 * bcsign(otmp)), TRUE);
910 }
911}
912
913staticfn int
914peffect_monster_detection(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 5

monstseesuFunction · 0.85
YouFunction · 0.85
monstunseesuFunction · 0.85
fall_asleepFunction · 0.85
bcsignFunction · 0.85

Tested by

no test coverage detected