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
ConstructorsConstructorDescriptionPhysicalAttackAction(EntityReference attackerReference) Creates a physical attack with the specifiedattackerReferenceas the attacker. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeExecutedOn(GameContext context, Player player, Entity entity) clone()voidexecute(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 specifiedattackerReferenceas the attacker. This should be anActor.- Parameters:
attackerReference-
-
-
Method Details
-
clone
- Overrides:
clonein classGameAction
-
canBeExecutedOn
- Overrides:
canBeExecutedOnin classGameAction
-
execute
Description copied from class:GameActionThe implementation of this method actually represents the game effects of this action.For example, the
PlayMinionCardActioneventually callsGameLogic.summon(int, Minion, Entity, int, boolean).- Specified by:
executein classGameAction- Parameters:
context- The game contextplayerId- The invoking player- See Also:
-
getAttackerReference
-
getDescription
Description copied from interface:NotificationA user-renderable description of what occurred in this notification.- Specified by:
getDescriptionin interfaceNotification- Overrides:
getDescriptionin classGameAction- Parameters:
context- the game contextplayerId- the player ID- Returns:
- a description string
-