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

Function could_advance

src/weapon.c:1172–1182  ·  view source on GitHub ↗

return true if this skill could be advanced if more slots were available */

Source from the content-addressed store, hash-verified

1170
1171/* return true if this skill could be advanced if more slots were available */
1172staticfn boolean
1173could_advance(int skill)
1174{
1175 if (P_RESTRICTED(skill)
1176 || P_SKILL(skill) >= P_MAX_SKILL(skill)
1177 || u.skills_advanced >= P_SKILL_LIMIT)
1178 return FALSE;
1179
1180 return (boolean) ((int) P_ADVANCE(skill)
1181 >= practice_needed_to_advance(P_SKILL(skill)));
1182}
1183
1184/* return true if this skill has reached its maximum and there's been enough
1185 practice to become eligible for the next step if that had been possible */

Callers 2

add_skills_to_menuFunction · 0.85
enhance_weapon_skillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected