Class EventTrigger
java.lang.Object
net.demilich.metastone.game.logic.CustomCloneable
net.demilich.metastone.game.spells.trigger.EventTrigger
- All Implemented Interfaces:
Serializable
,Cloneable
,HasDesc<EventTriggerDesc>
- Direct Known Subclasses:
AbstractCardTrigger
,AbstractSummonTrigger
,ArmorChangedTrigger
,AttributeAppliedTrigger
,BoardChangedTrigger
,CardReceivedTrigger
,DamageCausedTrigger
,DamageReceivedTrigger
,DidEndSequenceTrigger
,DiscardTrigger
,DiscoverTrigger
,DrainTrigger
,EnrageChangedTrigger
,ExcessHealingTrigger
,FatigueTrigger
,GameStartTrigger
,GameStateChangedTrigger
,HealingTrigger
,HeroPowerUsedTrigger
,InspireTrigger
,LoseDeflectTrigger
,LoseDivineShieldTrigger
,LoseStealthTrigger
,MaxHpIncreasedTrigger
,MaxManaChangedTrigger
,MinionDeathTrigger
,ModifyCurrentManaTrigger
,NullTrigger
,OverloadTrigger
,PhysicalAttackTrigger
,PreDamageTrigger
,PreGameStartTrigger
,QuestPlayedTrigger
,QuestSuccessTrigger
,ReturnToHandTrigger
,SecretPlayedTrigger
,SecretRevealedTrigger
,SilenceTrigger
,TargetAcquisitionTrigger
,TurnTrigger
,WeaponDestroyedTrigger
,WeaponEquippedTrigger
,WillEndSequenceTrigger
public abstract class EventTrigger
extends CustomCloneable
implements Serializable, HasDesc<EventTriggerDesc>
This is the base class of all effects that react to events in the game.
These subclasses correspond to the "class"
field on the "eventTrigger"
property of the EnchantmentDesc
. For example, TurnEndTrigger
corresponds to
the "TurnEndTrigger"
string found in this EnchantmentDesc
written on a card:
"trigger": { "eventTrigger": { "class": "TurnEndTrigger" }, "spell": ... }
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getDesc()
protected boolean
hostConditionMet
(GameEvent event, Entity host) protected abstract boolean
innerQueues
(GameEvent event, Enchantment enchantment, Entity host) When an event this trigger isinterestedIn()
occurs, this test indicates whether or not the trigger should enter the queue of effects that should be evaluated.abstract com.hiddenswitch.spellsource.rpc.Spellsource.GameEventTypeMessage.GameEventType
final boolean
queues
(GameEvent event, Enchantment enchantment, Entity host, int playerId) void
toString()
-
Constructor Details
-
EventTrigger
-
-
Method Details
-
clone
- Overrides:
clone
in classCustomCloneable
-
innerQueues
When an event this trigger isinterestedIn()
occurs, this test indicates whether or not the trigger should enter the queue of effects that should be evaluated. This is distinct from whether or not- Parameters:
event
-enchantment
-host
-- Returns:
-
queues
-
hostConditionMet
-
interestedIn
public abstract com.hiddenswitch.spellsource.rpc.Spellsource.GameEventTypeMessage.GameEventType interestedIn() -
toString
-
fires
-
getDesc
- Specified by:
getDesc
in interfaceHasDesc<EventTriggerDesc>
-
setDesc
- Specified by:
setDesc
in interfaceHasDesc<EventTriggerDesc>
-