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

Method getSkillChoices

code/src/java/pcgen/core/kit/KitSkill.java:282–304  ·  view source on GitHub ↗
(PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

280 }
281
282 private List<Skill> getSkillChoices(PlayerCharacter aPC)
283 {
284 final List<Skill> skillsOfType = new ArrayList<>();
285
286 for (CDOMReference<Skill> ref : skillList)
287 {
288 skillsOfType.addAll(ref.getContainedObjects());
289 }
290
291 if (skillsOfType.isEmpty())
292 {
293 return null;
294 }
295 else if (skillsOfType.size() == 1)
296 {
297 return skillsOfType;
298 }
299
300 List<Skill> skillChoices = new ArrayList<>();
301 skillChoices = Globals.getChoiceFromList("Select skill", skillsOfType, skillChoices, getSafeCount(), aPC);
302
303 return skillChoices;
304 }
305
306 private KitSkillAdd addRanks(PlayerCharacter pc, PCClass pcClass, Skill aSkill, double ranksLeftToAdd,
307 boolean isFree, List<String> warnings)

Callers 1

testApplyMethod · 0.95

Calls 6

getChoiceFromListMethod · 0.95
getSafeCountMethod · 0.95
addAllMethod · 0.65
getContainedObjectsMethod · 0.65
isEmptyMethod · 0.65
sizeMethod · 0.65

Tested by

no test coverage detected