Package net.demilich.metastone.game.actions
package net.demilich.metastone.game.actions
Game actions are things players can do.
Game actions are typically emitted by the GameContext.getValidActions()
method.
This will determine all the available actions for the active player. Then, actions are sent to Behaviour
objects in the context, which decides which action to perform using
Behaviour.requestAction(net.demilich.metastone.game.GameContext, net.demilich.metastone.game.Player, java.util.List)
.
Cards emit an action using Card.play()
. Minions do not emit actions;
instead, the ActionLogic
computes the physical attack actions using its
internal methods.
-
ClassDescriptionA DiscoverAction is a card and spell tuple that corresponds to a particular card selected by the player and the spell that will take that card as an argument.This action ends the player's current turn.An action a player can take in the game.Indicates this action specifies one of possibly many cards as the choice that the player made to play.Indicates an action that is a hero power card.Battlecry actions occur when
Actor
entities are played from cards and have battlecries.Allows an opener to be encapsulated as a spell card.Indicates this action could later create prompt the user for a battlecry targeting option.Indicates an attack betweenPhysicalAttackAction.getAttackerReference()
andGameAction.getTargetReference()
.A play card action stores a card and an optional target.Indicates the choice of a choose one card.Indicates playing a hero card from the hand.Since choose one hero cards are implemented as different battlecry choices, a card reference to a choose one card is not stored here.An action representing the playing of a minion card.An action indicating a spell is being cast.An action that corresponds to playing a weapon card from the hand.