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

Function peffect_speed

src/potion.c:1051–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1049}
1050
1051staticfn void
1052peffect_speed(struct obj *otmp)
1053{
1054 boolean is_speed = (otmp->otyp == POT_SPEED);
1055
1056 /* skip when mounted; heal_legs() would heal steed's legs */
1057 if (is_speed && Wounded_legs && !otmp->cursed && !u.usteed) {
1058 heal_legs(0);
1059 gp.potion_unkn++;
1060 return;
1061 }
1062
1063 speed_up(rn1(10, 100 + 60 * bcsign(otmp)));
1064
1065 /* non-cursed potion grants intrinsic speed */
1066 if (is_speed && !otmp->cursed && !(HFast & INTRINSIC)) {
1067 Your("quickness feels very natural.");
1068 HFast |= FROMOUTSIDE;
1069 }
1070}
1071
1072staticfn void
1073peffect_blindness(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 4

heal_legsFunction · 0.85
speed_upFunction · 0.85
bcsignFunction · 0.85
YourFunction · 0.85

Tested by

no test coverage detected