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

Function restricted_spell_discipline

src/u_init.c:1093–1105  ·  view source on GitHub ↗

skills aren't initialized, so we use the role-specific skill lists */

Source from the content-addressed store, hash-verified

1091
1092/* skills aren't initialized, so we use the role-specific skill lists */
1093staticfn boolean
1094restricted_spell_discipline(int otyp)
1095{
1096 const struct def_skill *skills = skills_for_role();
1097 int this_skill = spell_skilltype(otyp);
1098
1099 while (skills && skills->skill != P_NONE) {
1100 if (skills->skill == this_skill)
1101 return FALSE;
1102 ++skills;
1103 }
1104 return TRUE;
1105}
1106
1107/* randomizes the quantity given a trobj description */
1108staticfn long

Callers 1

ini_inv_mkobj_filterFunction · 0.85

Calls 2

skills_for_roleFunction · 0.85
spell_skilltypeFunction · 0.85

Tested by

no test coverage detected