Class PhysicalAttackAction
java.lang.Object
net.demilich.metastone.game.actions.GameAction
net.demilich.metastone.game.actions.PhysicalAttackAction
- All Implemented Interfaces:
Serializable
,Cloneable
,Notification
Indicates an attack between
getAttackerReference()
and GameAction.getTargetReference()
.- See Also:
-
Field Summary
Fields inherited from class net.demilich.metastone.game.actions.GameAction
chooseOneOptionIndex
-
Constructor Summary
ConstructorDescriptionPhysicalAttackAction
(EntityReference attackerReference) Creates a physical attack with the specifiedattackerReference
as the attacker. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeExecutedOn
(GameContext context, Player player, Entity entity) clone()
void
execute
(GameContext context, int playerId) The implementation of this method actually represents the game effects of this action.getDescription
(GameContext context, int playerId) A user-renderable description of what occurred in this notification.Methods inherited from class net.demilich.metastone.game.actions.GameAction
equals, getActionType, getChooseOneOptionIndex, getId, getSource, getSource, getSourceReference, getTargetReference, getTargetRequirement, getTargets, hashCode, isClientInterested, isOverrideChild, isPowerHistory, setActionType, setChooseOneOptionIndex, setId, setOverrideChild, setSourceReference, setTarget, setTargetReference, setTargetRequirement, toString, withTargetReference
-
Constructor Details
-
PhysicalAttackAction
Creates a physical attack with the specifiedattackerReference
as the attacker. This should be anActor
.- Parameters:
attackerReference
-
-
-
Method Details
-
clone
- Overrides:
clone
in classGameAction
-
canBeExecutedOn
- Overrides:
canBeExecutedOn
in classGameAction
-
execute
Description copied from class:GameAction
The implementation of this method actually represents the game effects of this action.For example, the
PlayMinionCardAction
eventually callsGameLogic.summon(int, Minion, Entity, int, boolean)
.- Specified by:
execute
in classGameAction
- Parameters:
context
- The game contextplayerId
- The invoking player- See Also:
-
getAttackerReference
-
getDescription
Description copied from interface:Notification
A user-renderable description of what occurred in this notification.- Specified by:
getDescription
in interfaceNotification
- Overrides:
getDescription
in classGameAction
- Parameters:
context
- the game contextplayerId
- the player ID- Returns:
- a description string
-