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

Function peaked_skill

src/weapon.c:1186–1195  ·  view source on GitHub ↗

return true if this skill has reached its maximum and there's been enough practice to become eligible for the next step if that had been possible */

Source from the content-addressed store, hash-verified

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 */
1186staticfn boolean
1187peaked_skill(int skill)
1188{
1189 if (P_RESTRICTED(skill))
1190 return FALSE;
1191
1192 return (boolean) (P_SKILL(skill) >= P_MAX_SKILL(skill)
1193 && ((int) P_ADVANCE(skill)
1194 >= practice_needed_to_advance(P_SKILL(skill))));
1195}
1196
1197staticfn void
1198skill_advance(int skill)

Callers 2

add_skills_to_menuFunction · 0.85
enhance_weapon_skillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected