Contains all information related to a Trigger, which reacts to specific GameActions as they occur.
More...
|
|
| Trigger (GameController gameController, Func< T, bool > criteria, Func< T, IEnumerator > response, IEnumerable< TriggerType > types, TriggerTiming timing, CardSource cardSource, IEnumerable< ActionDescription > actionDescriptions=null, bool isConditional=false, bool requireActionSuccess=true, bool? isActionOptional=null, bool outOfPlayTrigger=false, bool? orderMatters=null, TriggerPriority? priority=null, bool ignoreBattleZone=false, bool respondEvenIfPlayedAfterAction=false, CardController copyingCardController=null) |
| |
| IEnumerator | ActionPerformed (GameAction action) |
| |
| void | AddAssociatedTrigger (ITrigger trigger) |
| |
|
virtual object | Clone () |
| |
|
int | CompareTo (ITrigger otherTrigger) |
| |
| virtual bool | DoesMatchTypeAndCriteria (GameAction action) |
| |
| void | SetCopyingCardController (CardController copyingCardController) |
| |
|
override string | ToString () |
| |
Public Member Functions inherited from ITrigger |
|
|
void | AttachAssociatedCardSources (bool attachTriggerToo) |
| |
|
virtual bool | CheckActionAgainstCriteria (T action) |
| |
|
void | UnattachAssociatedCardSources (bool removeTriggerToo) |
| |
|
| IEnumerable< ActionDescription > | ActionDescriptions [get] |
| |
| Type | ActionType [get] |
| |
| IEnumerable< ITrigger > | AssociatedTriggers [get] |
| | These associated triggers will all be removed with the removal of this trigger.
|
| |
| CardSource | CardSource [get, set] |
| |
| CardController | CopyingCardController [get] |
| |
|
Func< T, bool > | Criteria [get, set] |
| |
|
GameController | GameController [get] |
| |
| bool? | IgnoreBattleZone [get] |
| | Returns whether or not this trigger responds to both BattleZones.
|
| |
| int | Index [get] |
| |
| bool? | IsActionOptional [get] |
| | Returns whether or not the action that would result from this trigger is optional or not. Primiarily used by redirect triggers to reduce unnecessary "ambiguous" triggers. Null if undefined.
|
| |
| bool | IsConditionalOnSimilar [get, set] |
| | Sets whether or not the action taken is conditional on other similar actions being taken. For example, if the card reads "Whenever this hero would be dealt 5 or more damage, reduce that damage by 3.".
|
| |
| bool | IsOutOfPlayTrigger [get] |
| |
| bool | IsStatusEffect [get] |
| |
| bool? | OrderMatters [get] |
| | Can be set when the trigger is made to specify if the trigger order matters or not for this trigger. This is used to override the default trigger mananger behaviour. For example, usually a CancelAction trigger doesn't matter the order, since the action will just be cancelled. But between The Unbreakable and Silver Lining, the order does matter because it determines how much life will be regained and which card will be destroyed.
|
| |
| TriggerPriority? | Priority [get] |
| | Setting the priority will allow some triggers to go before other triggers is very special situations. Ex. Sustained Influence and Chokepoint when a Construct is destroyed. SI goes first to determine if it comes back into play, or goes to Chokepoint's play area, flipped. This will ONLY take effect if two compared triggers each have a priority defined, and one is higher than the other. So even Priority.High will still get "mixed in" with other triggers that do not have a defined Priority.
|
| |
| bool | RequireActionSuccess [get] |
| |
| bool | RespondEvenIfPlayedAfterAction [get] |
| |
|
Func< T, IEnumerator > | Response [get] |
| |
|
string | SourceString [get] |
| |
| StatusEffect | StatusEffect [get, set] |
| |
| TriggerTiming | Timing [get] |
| |
| IEnumerable< TriggerType > | Types [get, protected set] |
| |
|
bool | UseUnityCoroutines [get] |
| |
Properties inherited from ITrigger |
Contains all information related to a Trigger, which reacts to specific GameActions as they occur.
- Template Parameters
-
◆ ActionPerformed()
◆ AddAssociatedTrigger()
| void AddAssociatedTrigger |
( |
ITrigger< T > | trigger | ) |
|
|
inline |
◆ DoesMatchTypeAndCriteria()
| virtual bool DoesMatchTypeAndCriteria |
( |
GameAction | action | ) |
|
|
inlinevirtual |
◆ SetCopyingCardController()
◆ ActionDescriptions
| IEnumerable<ActionDescription> ActionDescriptions |
|
get |
◆ ActionType
◆ AssociatedTriggers
| IEnumerable<ITrigger> AssociatedTriggers |
|
get |
These associated triggers will all be removed with the removal of this trigger.
The associated triggers.
Implements ITrigger.
◆ CardSource
◆ CopyingCardController
◆ IgnoreBattleZone
Returns whether or not this trigger responds to both BattleZones.
Implements ITrigger.
◆ Index
◆ IsActionOptional
Returns whether or not the action that would result from this trigger is optional or not. Primiarily used by redirect triggers to reduce unnecessary "ambiguous" triggers. Null if undefined.
Implements ITrigger.
◆ IsConditionalOnSimilar
| bool IsConditionalOnSimilar |
|
getset |
Sets whether or not the action taken is conditional on other similar actions being taken. For example, if the card reads "Whenever this hero would be dealt 5 or more damage, reduce that damage by 3.".
Implements ITrigger.
◆ IsOutOfPlayTrigger
◆ IsStatusEffect
◆ OrderMatters
Can be set when the trigger is made to specify if the trigger order matters or not for this trigger. This is used to override the default trigger mananger behaviour. For example, usually a CancelAction trigger doesn't matter the order, since the action will just be cancelled. But between The Unbreakable and Silver Lining, the order does matter because it determines how much life will be regained and which card will be destroyed.
If set to a value, the trigger is specifically saying whether or not the order matters. If not set, the trigger mananger can decide.
Implements ITrigger.
◆ Priority
| TriggerPriority? Priority |
|
get |
Setting the priority will allow some triggers to go before other triggers is very special situations. Ex. Sustained Influence and Chokepoint when a Construct is destroyed. SI goes first to determine if it comes back into play, or goes to Chokepoint's play area, flipped. This will ONLY take effect if two compared triggers each have a priority defined, and one is higher than the other. So even Priority.High will still get "mixed in" with other triggers that do not have a defined Priority.
Implements ITrigger.
◆ RequireActionSuccess
| bool RequireActionSuccess |
|
get |
◆ RespondEvenIfPlayedAfterAction
| bool RespondEvenIfPlayedAfterAction |
|
get |
◆ StatusEffect
◆ Timing
◆ Types
| IEnumerable<TriggerType> Types |
|
getprotected set |