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

Function set_wounded_legs

src/do.c:2425–2446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2423}
2424
2425void
2426set_wounded_legs(long side, int timex)
2427{
2428 /* KMH -- STEED
2429 * If you are riding, your steed gets the wounded legs instead.
2430 * You still call this function, but don't lose hp.
2431 * Caller is also responsible for adjusting messages.
2432 */
2433 disp.botl = TRUE;
2434 if (!Wounded_legs)
2435 ATEMP(A_DEX)--;
2436
2437 if (!Wounded_legs || (HWounded_legs & TIMEOUT) < (long) timex)
2438 set_itimeout(&HWounded_legs, (long) timex);
2439 /* the leg being wounded and its timeout might differ from one
2440 attack to the next, but we don't track the legs separately;
2441 5.0: both legs will ultimately heal together; this used to use
2442 direct assignment instead of bitwise-OR so getting wounded in
2443 one leg mysteriously healed the other */
2444 EWounded_legs |= side;
2445 encumber_msg();
2446}
2447
2448void
2449heal_legs(

Callers 9

mhitm_ad_legsFunction · 0.85
dismount_steedFunction · 0.85
drop_ballFunction · 0.85
digFunction · 0.85
trapeffect_bear_trapFunction · 0.85
trapeffect_landmineFunction · 0.85
kick_dumbFunction · 0.85
kick_ouchFunction · 0.85
jumpFunction · 0.85

Calls 2

set_itimeoutFunction · 0.85
encumber_msgFunction · 0.85

Tested by

no test coverage detected