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

Function unrestrict_weapon_skill

src/weapon.c:1413–1421  ·  view source on GitHub ↗

* Change from restricted to unrestricted, allowing P_BASIC as max. This * function may be called with with P_NONE. Used in pray.c as well as below. */

Source from the content-addressed store, hash-verified

1411 * function may be called with with P_NONE. Used in pray.c as well as below.
1412 */
1413void
1414unrestrict_weapon_skill(int skill)
1415{
1416 if (skill < P_NUM_SKILLS && P_RESTRICTED(skill)) {
1417 P_SKILL(skill) = P_UNSKILLED;
1418 P_MAX_SKILL(skill) = P_BASIC;
1419 P_ADVANCE(skill) = 0;
1420 }
1421}
1422
1423void
1424use_skill(int skill, int degree)

Callers 3

skill_initFunction · 0.85
gcrownuFunction · 0.85
bestow_artifactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected