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

Method removeChoice

code/src/java/plugin/lsttokens/add/AbilityToken.java:401–416  ·  view source on GitHub ↗
(PlayerCharacter pc, CDOMObject owner, CNAbilitySelection choice)

Source from the content-addressed store, hash-verified

399 }
400
401 @Override
402 public void removeChoice(PlayerCharacter pc, CDOMObject owner, CNAbilitySelection choice)
403 {
404 CNAbility cna = choice.getCNAbility();
405 Ability ab = cna.getAbility();
406 AbilityCategory cat = (AbilityCategory) cna.getAbilityCategory();
407 if (cna.getNature().equals(Nature.NORMAL))
408 {
409 pc.adjustAbilities(cat, ab.getSafe(ObjectKey.SELECTION_COST).negate());
410 pc.removeAbility(choice, UserSelection.getInstance(), UserSelection.getInstance());
411 }
412 else
413 {
414 pc.removeSavedAbility(choice, UserSelection.getInstance(), UserSelection.getInstance());
415 }
416 }
417}

Callers

nothing calls this directly

Calls 11

getAbilityMethod · 0.95
getAbilityCategoryMethod · 0.95
getNatureMethod · 0.95
getInstanceMethod · 0.95
adjustAbilitiesMethod · 0.80
negateMethod · 0.80
getSafeMethod · 0.80
removeSavedAbilityMethod · 0.80
equalsMethod · 0.65
removeAbilityMethod · 0.65
getCNAbilityMethod · 0.45

Tested by

no test coverage detected