Class PlayChooseOneCardAction
java.lang.Object
net.demilich.metastone.game.actions.GameAction
net.demilich.metastone.game.actions.PlayCardAction
net.demilich.metastone.game.actions.PlayChooseOneCardAction
- All Implemented Interfaces:
Serializable
,Cloneable
,HasChoiceCard
,Notification
Indicates the choice of a choose one card. The
Card.getCardId()
is stored in getChoiceCardId()
.- See Also:
-
Field Summary
FieldsFields inherited from class net.demilich.metastone.game.actions.PlayCardAction
logger
Fields inherited from class net.demilich.metastone.game.actions.GameAction
chooseOneOptionIndex
-
Constructor Summary
ConstructorsConstructorDescriptionPlayChooseOneCardAction
(SpellDesc spell, Card chooseOneCard, String chosenCard, TargetSelection targetSelection) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeExecutedOn
(GameContext context, Player player, Entity entity) clone()
getSpell()
void
innerExecute
(GameContext context, int playerId) Represents the consequences of playing a spell card, minion card, hero card, hero power card, etc.void
Methods inherited from class net.demilich.metastone.game.actions.PlayCardAction
execute, getDescription, getSource, getTargets
Methods inherited from class net.demilich.metastone.game.actions.GameAction
equals, getActionType, getChooseOneOptionIndex, getId, getSource, getSourceReference, getTargetReference, getTargetRequirement, hashCode, isClientInterested, isOverrideChild, isPowerHistory, setActionType, setChooseOneOptionIndex, setId, setOverrideChild, setSourceReference, setTarget, setTargetReference, setTargetRequirement, toString, withTargetReference
-
Field Details
-
spell
-
chosenCard
-
-
Constructor Details
-
PlayChooseOneCardAction
public PlayChooseOneCardAction(SpellDesc spell, Card chooseOneCard, String chosenCard, TargetSelection targetSelection)
-
-
Method Details
-
clone
- Overrides:
clone
in classPlayCardAction
-
canBeExecutedOn
- Overrides:
canBeExecutedOn
in classPlayCardAction
-
innerExecute
Description copied from class:PlayCardAction
Represents the consequences of playing a spell card, minion card, hero card, hero power card, etc.Unlike
PlayCardAction.execute(GameContext, int)
, this method will not deduct mana, will not be counterable, and will not increment combos. In other words, this method omits the effects of playing a card from the hand.However, by using the action, a
TargetSelection
will still occur.The
EntityReference.TARGET
will refer to whatever is theGameAction.getTargetReference()
.The
GameAction.getTargetRequirement()
indicates whether or not these effects require a target to be selected.- Specified by:
innerExecute
in classPlayCardAction
-
getSpell
-
setSpell
-
getChoiceCardId
- Specified by:
getChoiceCardId
in interfaceHasChoiceCard
-