Class DiscardEvent

All Implemented Interfaces:
Serializable, Cloneable, HasCard, Notification
Direct Known Subclasses:
RoastEvent

public class DiscardEvent extends CardEvent
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 Details

    • DiscardEvent

      public DiscardEvent(GameContext context, int playerId, Card card)
  • 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 interface Notification
      Overrides:
      isPowerHistory in class GameEvent
      Returns:
      true if this notification should be stored in the power history of the game where it occurred.
    • getDescription

      public String getDescription(GameContext context, int playerId)
      Description copied from interface: Notification
      A user-renderable description of what occurred in this notification.
      Specified by:
      getDescription in interface Notification
      Overrides:
      getDescription in class GameEvent
      Parameters:
      context - the game context
      playerId - the player ID
      Returns:
      a description string