Search in sources :

Example 6 with ChooseSelectionActor

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

the class ChooseFeatSelectionToken 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 7 with ChooseSelectionActor

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

the class ChooseFeatToken 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 8 with ChooseSelectionActor

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

the class NoChoiceToken method removeChoice.

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

Example 9 with ChooseSelectionActor

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

the class AbilitySelectionToken method removeChoice.

@Override
public void removeChoice(PlayerCharacter pc, ChooseDriver owner, AbilitySelection 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 10 with ChooseSelectionActor

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

the class AbilityToken method restoreChoice.

@Override
public void restoreChoice(PlayerCharacter pc, ChooseDriver owner, Ability 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)

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