Class DiscardEvent
java.lang.Object
net.demilich.metastone.game.events.GameEvent
net.demilich.metastone.game.events.BasicGameEvent
net.demilich.metastone.game.events.CardEvent
net.demilich.metastone.game.events.DiscardEvent
- All Implemented Interfaces:
Serializable
,Cloneable
,HasCard
,Notification
- Direct Known Subclasses:
RoastEvent
A card was discarded.
At the moment this event is fired, the card is still in the Spellsource.ZonesMessage.Zones.HAND
.
The discard can be cancelled by removing the Attribute.DISCARDED
attribute
from the EntityReference.EVENT_TARGET
.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDescription
(GameContext context, int playerId) A user-renderable description of what occurred in this notification.boolean
When true, indicates to processors of this notification that it belongs in the power history.Methods inherited from class net.demilich.metastone.game.events.CardEvent
getSourceCard
Methods inherited from class net.demilich.metastone.game.events.BasicGameEvent
getEventType, isClientInterested
Methods inherited from class net.demilich.metastone.game.events.GameEvent
clone, getGameContext, getSource, getSourcePlayerId, getTarget, getTargetPlayerId, getTargets, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.demilich.metastone.game.events.Notification
getSource
-
Constructor Details
-
DiscardEvent
-
-
Method Details
-
isPowerHistory
public boolean isPowerHistory()Description copied from interface:Notification
When true, indicates to processors of this notification that it belongs in the power history.- Specified by:
isPowerHistory
in interfaceNotification
- Overrides:
isPowerHistory
in classGameEvent
- Returns:
true
if this notification should be stored in the power history of the game where it occurred.
-
getDescription
Description copied from interface:Notification
A user-renderable description of what occurred in this notification.- Specified by:
getDescription
in interfaceNotification
- Overrides:
getDescription
in classGameEvent
- Parameters:
context
- the game contextplayerId
- the player ID- Returns:
- a description string
-