Interface Notification

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractDamageEvent, AbstractQuestEvent, AfterCardPlayedEvent, AfterPhysicalAttackEvent, AfterSpellCastedEvent, AfterSummonEvent, ArmorChangedEvent, AttributeAppliedEvent, BasicGameEvent, BeforePhysicalAttackEvent, BeforeSummonEvent, BoardChangedEvent, CardAddedToDeckEvent, CardEvent, CardPlayedEvent, CardRevealedEvent, DamageEvent, DestroyWillQueue, DidEndSequenceEvent, DiscardEvent, DiscoverAction, DiscoverEvent, DrainEvent, DrawCardEvent, EndTurnAction, EnrageChangedEvent, ExcessHealingEvent, FatigueEvent, GameAction, GameEvent, GameStartEvent, HealEvent, HeroPowerAction, HeroPowerUsedEvent, InvokedEvent, JoustEvent, KillEvent, MaxHpIncreasedEvent, MaxManaChangedEvent, MissileFired, ModifyCurrentManaEvent, OpenerAction, OpenerAsPlaySpellCardAction, OverloadEvent, PhysicalAttackAction, PhysicalAttackEvent, PlayCardAction, PlayChooseOneCardAction, PlayHeroCardAction, PlayHeroCardChooseOneAction, PlayMinionCardAction, PlaySpellCardAction, PlayWeaponCardAction, PreDamageEvent, PreGameStartEvent, QuestPlayedEvent, QuestSuccessfulEvent, ReturnToHandEvent, RoastEvent, SecretPlayedEvent, SecretRevealedEvent, ShuffledEvent, SilenceEvent, SpellCastedEvent, SummonEvent, TargetAcquisitionEvent, TouchingNotification, TriggerFired, TurnEndEvent, TurnStartEvent, ValueEvent, WeaponDestroyedEvent, WeaponEquippedEvent, WillEndSequenceEvent

public interface Notification extends Serializable
Represents a general notification from inside the GameLogic that the GameContext or players might be interested in.

Unlike a GameEvent, a notification does not say anything about having side effects or triggering other rules.

  • Method Summary

    Modifier and Type
    Method
    Description
    getDescription(GameContext context, int playerId)
    A user-renderable description of what occurred in this notification.
    For visualization purposes, what is the source of this notification?
    default @Nullable Entity
     
    getTargets(GameContext context, int player)
    For visualization purposes, what are the targets of this notification?
    default boolean
    Should this notification be sent to the client?
    boolean
    When true, indicates to processors of this notification that it belongs in the power history.
  • Method Details

    • getSource

      Entity getSource()
      For visualization purposes, what is the source of this notification?
      Returns:
      A reference to the entity that is the visualizable source of this notification.
    • getSource

      @Nullable default @Nullable Entity getSource(GameContext context)
    • getTargets

      List<Entity> getTargets(GameContext context, int player)
      For visualization purposes, what are the targets of this notification?
      Parameters:
      context - game context
      player - the player
      Returns:
      A reference to the entity that is the visualizable target of this notification.
    • isPowerHistory

      boolean isPowerHistory()
      When true, indicates to processors of this notification that it belongs in the power history.
      Returns:
      true if this notification should be stored in the power history of the game where it occurred.
    • getDescription

      String getDescription(GameContext context, int playerId)
      A user-renderable description of what occurred in this notification.
      Parameters:
      context - the game context
      playerId - the player ID
      Returns:
      a description string
    • isClientInterested

      default boolean isClientInterested()
      Should this notification be sent to the client?
      Returns:
      false by default.