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

Function carrying_too_much

src/hack.c:2615–2634  ·  view source on GitHub ↗

carrying too much to be able to move? */

Source from the content-addressed store, hash-verified

2613
2614/* carrying too much to be able to move? */
2615staticfn boolean
2616carrying_too_much(void)
2617{
2618 int wtcap;
2619
2620 if (((wtcap = near_capacity()) >= OVERLOADED
2621 || (wtcap > SLT_ENCUMBER
2622 && (Upolyd ? (u.mh < 5 && u.mh != u.mhmax)
2623 : (u.uhp < 10 && u.uhp != u.uhpmax))))
2624 && !Is_airlevel(&u.uz)) {
2625 if (wtcap < OVERLOADED) {
2626 You("don't have enough stamina to move.");
2627 exercise(A_CON, FALSE);
2628 } else
2629 You("collapse under your load.");
2630 nomul(0);
2631 return TRUE;
2632 }
2633 return FALSE;
2634}
2635
2636/* try to pull free from sticking monster, or you release a monster
2637 you're sticking to. returns TRUE if you lose your movement. */

Callers 1

domove_coreFunction · 0.85

Calls 4

near_capacityFunction · 0.85
YouFunction · 0.85
exerciseFunction · 0.85
nomulFunction · 0.85

Tested by

no test coverage detected