MCPcopy Create free account
hub / github.com/PCGen/pcgen / allow

Method allow

code/src/java/plugin/qualifier/skill/RanksToken.java:167–181  ·  view source on GitHub ↗
(PlayerCharacter pc, Skill sk)

Source from the content-addressed store, hash-verified

165 }
166
167 @Override
168 public boolean allow(PlayerCharacter pc, Skill sk)
169 {
170 float pcRanks = pc.getDisplay().getRank(sk);
171 if (maxRank)
172 {
173 /*
174 * According to SkillRankControl any class can be used here
175 * (confusing!)
176 */
177 double maxRanks = pc.getMaxRank(sk, pc.getClassList().get(0)).doubleValue();
178 return maxRanks <= pcRanks;
179 }
180 return ranks <= pcRanks;
181 }
182}

Callers

nothing calls this directly

Calls 6

doubleValueMethod · 0.80
getMethod · 0.65
getRankMethod · 0.45
getDisplayMethod · 0.45
getMaxRankMethod · 0.45
getClassListMethod · 0.45

Tested by

no test coverage detected