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

Function u_init_carry_attr_boost

src/u_init.c:928–940  ·  view source on GitHub ↗

boost STR and CON until hero can carry inventory */

Source from the content-addressed store, hash-verified

926
927/* boost STR and CON until hero can carry inventory */
928staticfn void
929u_init_carry_attr_boost(void)
930{
931 /* make sure you can carry all you have - especially for Tourists */
932 while (inv_weight() > 0) {
933 if (adjattrib(A_STR, 1, TRUE))
934 continue;
935 if (adjattrib(A_CON, 1, TRUE))
936 continue;
937 /* only get here when didn't boost strength or constitution */
938 break;
939 }
940}
941
942/* initialise u, except inventory, attributes, skills and discoveries */
943void

Callers 1

u_init_inventory_attrsFunction · 0.85

Calls 2

inv_weightFunction · 0.85
adjattribFunction · 0.85

Tested by

no test coverage detected