Class PlayMinionCardAction
- All Implemented Interfaces:
Serializable
,Cloneable
,OpenerOverridable
,Notification
The GameAction.getTargetReference()
refers to the minion to whose left the minion should be summoned
(like inserting an element into an array). If null
, the index passed to the summon function will be
-1
, which indicates to summon the minion in the rightmost slot.
Like other PlayCardAction
actions, this action is typically rolled out by ActionLogic.rollout(GameAction, GameContext, Player, Collection)
.
Typically, the battlecry is resolved in this action. The PlayMinionCardAction(net.demilich.metastone.game.targeting.EntityReference)
will retrieve the battlecry that appears once the minion is summoned. Choose one minion cards override the battlecry
using PlayMinionCardAction(EntityReference, OpenerDesc)
.
- See Also:
-
Field Summary
Fields inherited from class net.demilich.metastone.game.actions.PlayCardAction
logger
Fields inherited from class net.demilich.metastone.game.actions.GameAction
chooseOneOptionIndex
-
Constructor Summary
ConstructorDescriptionPlayMinionCardAction
(EntityReference EntityReference) PlayMinionCardAction
(EntityReference minionCard, OpenerDesc opener) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Gets a battlecry description for this object.boolean
void
innerExecute
(GameContext context, int playerId) Represents the consequences of playing a spell card, minion card, hero card, hero power card, etc.void
setOpener
(OpenerDesc action) Sets the battlecry.void
setResolveOpener
(boolean resolveOpener) Methods inherited from class net.demilich.metastone.game.actions.PlayCardAction
canBeExecutedOn, 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
-
Constructor Details
-
PlayMinionCardAction
-
PlayMinionCardAction
-
-
Method Details
-
clone
- Overrides:
clone
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
-
getOpener
Description copied from interface:OpenerOverridable
Gets a battlecry description for this object.- Specified by:
getOpener
in interfaceOpenerOverridable
- Returns:
-
setOpener
Description copied from interface:OpenerOverridable
Sets the battlecry. May not be supported.- Specified by:
setOpener
in interfaceOpenerOverridable
-
setResolveOpener
public void setResolveOpener(boolean resolveOpener) - Specified by:
setResolveOpener
in interfaceOpenerOverridable
-
getResolveOpener
public boolean getResolveOpener()- Specified by:
getResolveOpener
in interfaceOpenerOverridable
-