Search in sources :

Example 16 with ChooseSelectionActor

use of pcgen.cdom.base.ChooseSelectionActor in project pcgen by PCGen.

the class AbilitySelectionToken method restoreChoice.

@Override
public void restoreChoice(PlayerCharacter pc, ChooseDriver owner, AbilitySelection choice) {
    pc.addAssoc(owner, getListKey(), choice);
    List<ChooseSelectionActor<?>> actors = owner.getActors();
    if (actors != null) {
        for (ChooseSelectionActor ca : actors) {
            ca.applyChoice(owner, choice, pc);
        }
    }
}
Also used : ChooseSelectionActor(pcgen.cdom.base.ChooseSelectionActor)

Example 17 with ChooseSelectionActor

use of pcgen.cdom.base.ChooseSelectionActor in project pcgen by PCGen.

the class AbilityToken method removeChoice.

@Override
public void removeChoice(PlayerCharacter pc, ChooseDriver owner, Ability choice) {
    pc.removeAssoc(owner, getListKey(), choice);
    List<ChooseSelectionActor<?>> actors = owner.getActors();
    if (actors != null) {
        for (ChooseSelectionActor ca : actors) {
            ca.removeChoice(owner, choice, pc);
        }
    }
}
Also used : ChooseSelectionActor(pcgen.cdom.base.ChooseSelectionActor)

Example 18 with ChooseSelectionActor

use of pcgen.cdom.base.ChooseSelectionActor in project pcgen by PCGen.

the class SpellLevelToken method restoreChoice.

@Override
public void restoreChoice(PlayerCharacter pc, ChooseDriver owner, SpellLevel choice) {
    pc.addAssoc(owner, getListKey(), choice);
    List<ChooseSelectionActor<?>> actors = owner.getActors();
    if (actors != null) {
        for (ChooseSelectionActor ca : actors) {
            ca.applyChoice(owner, choice, pc);
        }
    }
}
Also used : ChooseSelectionActor(pcgen.cdom.base.ChooseSelectionActor)

Example 19 with ChooseSelectionActor

use of pcgen.cdom.base.ChooseSelectionActor in project pcgen by PCGen.

the class StringToken method restoreChoice.

@Override
public void restoreChoice(PlayerCharacter pc, ChooseDriver owner, String choice) {
    pc.addAssoc(owner, getListKey(), choice);
    List<ChooseSelectionActor<?>> actors = owner.getActors();
    if (actors != null) {
        for (ChooseSelectionActor ca : actors) {
            applyChoice(owner, choice, pc, ca);
        }
    }
}
Also used : ChooseSelectionActor(pcgen.cdom.base.ChooseSelectionActor)

Example 20 with ChooseSelectionActor

use of pcgen.cdom.base.ChooseSelectionActor in project pcgen by PCGen.

the class StringToken method removeChoice.

@Override
public void removeChoice(PlayerCharacter pc, ChooseDriver owner, String choice) {
    pc.removeAssoc(owner, getListKey(), choice);
    List<ChooseSelectionActor<?>> actors = owner.getActors();
    if (actors != null) {
        for (ChooseSelectionActor ca : actors) {
            ca.removeChoice(owner, choice, pc);
        }
    }
}
Also used : ChooseSelectionActor(pcgen.cdom.base.ChooseSelectionActor)

Aggregations

ChooseSelectionActor (pcgen.cdom.base.ChooseSelectionActor)27 PersistenceLayerException (pcgen.persistence.PersistenceLayerException)7 Prerequisite (pcgen.core.prereq.Prerequisite)6 ArrayList (java.util.ArrayList)5 CDOMReference (pcgen.cdom.base.CDOMReference)5 TreeSet (java.util.TreeSet)3 AssociatedPrereqObject (pcgen.cdom.base.AssociatedPrereqObject)3 StringWriter (java.io.StringWriter)2 List (java.util.List)2 StringTokenizer (java.util.StringTokenizer)2 ListKey (pcgen.cdom.enumeration.ListKey)2 Nature (pcgen.cdom.enumeration.Nature)2 AbilitySelector (pcgen.cdom.helper.AbilitySelector)2 AbilityTargetSelector (pcgen.cdom.helper.AbilityTargetSelector)2 AbilityList (pcgen.cdom.list.AbilityList)2 CDOMSingleRef (pcgen.cdom.reference.CDOMSingleRef)2 Ability (pcgen.core.Ability)2 AbilityCategory (pcgen.core.AbilityCategory)2 Language (pcgen.core.Language)2 QualifiedObject (pcgen.core.QualifiedObject)2