Enum Class Environment

java.lang.Object
java.lang.Enum<Environment>
net.demilich.metastone.game.environment.Environment
All Implemented Interfaces:
Serializable, Comparable<Environment>, Constable

public enum Environment extends Enum<Environment>
A collection of environment variables.

This enum contains the keys to the GameState.environment field, and they help implement various card texts that modify other card texts.

  • Enum Constant Details

    • STARTING_PLAYER

      public static final Environment STARTING_PLAYER
      This variable stores the player that was chosen as the starting player
    • SUMMON_REFERENCE_STACK

      public static final Environment SUMMON_REFERENCE_STACK
      This variable stores the minions that are pending a summon.

      This implements Faceless Manipulator.

    • KILLED_MINION

      public static final Environment KILLED_MINION
      This variable stores the last minion that was killed.
    • DESTROYED_THIS_SEQUENCE_COUNT

      public static final Environment DESTROYED_THIS_SEQUENCE_COUNT
      This variable stores the number of minions that have been destroyed so far during this sequence.
    • TARGET_OVERRIDE

      public static final Environment TARGET_OVERRIDE
      This variable, when defined, specifies that the target of a spell or physical attack should be overriden.
    • LAST_CARD_PLAYED

      public static final Environment LAST_CARD_PLAYED
      This variable stores a reference to the last card played for each player
    • LAST_CARD_PLAYED_BEFORE_CURRENT_SEQUENCE

      public static final Environment LAST_CARD_PLAYED_BEFORE_CURRENT_SEQUENCE
      This variable stores a reference to the last card played for each player before the card this attribute is written on. Helps implement Study.
    • LAST_SPELL_PLAYED_THIS_TURN

      public static final Environment LAST_SPELL_PLAYED_THIS_TURN
      This variable stores a reference to the last spell played by each player this turn.

      Implements Recurring Torrent.

    • ATTACKER_REFERENCE_STACK

      public static final Environment ATTACKER_REFERENCE_STACK
      This variable stores a stack of attackers.
    • EVENT_TARGET_REFERENCE_STACK

      public static final Environment EVENT_TARGET_REFERENCE_STACK
      This variable stores a stack of event targets, as events are executed one after another until all events are processed.

      This implements card texts that read, "take double damage," and implements EntityReference.EVENT_TARGET.

    • TARGET

      public static final Environment TARGET
      This variable stores the current target of an event or action. This variable is consulted for EntityReference.TARGET.
    • SPELL_TARGET

      public static final Environment SPELL_TARGET
      This variable stores the current target of a spell.
    • TRANSFORM_REFERENCE

      public static final Environment TRANSFORM_REFERENCE
      This variable stores a reference to the new minion as a result of a transform.

      This implements Faceless Manipulator.

    • DAMAGE_STACK

      public static final Environment DAMAGE_STACK
      This variable stores overrides to the next amount of damage dealt by a DamageSpell.

      This implements cards like Magic Armor.

    • OUTPUTS

      public static final Environment OUTPUTS
      This variable stores a stack of entities that were output by spells. The variable can be referenced with EntityReference.OUTPUT.

      This implements Ivory Knight.

    • LAST_MANA_COST

      public static final Environment LAST_MANA_COST
      This variable stores the mana cost of the last card played.

      This implements Atiesh, the weapon granted by Medivh, the Guardian

    • LAST_SUMMON_THIS_TURN

      public static final Environment LAST_SUMMON_THIS_TURN
      This variable stores how many minions have been summoned this turn.
    • SPELL_VALUE_STACK

      public static final Environment SPELL_VALUE_STACK
      This implements Living Mana and Earthen Scales.
    • EVENT_VALUE_STACK

      public static final Environment EVENT_VALUE_STACK
      This implements Spellstones
    • ENTITY_LIST

      public static final Environment ENTITY_LIST
      This implements Frostmourne and other entity tracking effects. For example, it keeps track of which particular entities a particular Frostmourne has destroyed.
      See Also:
    • LYNESSA_SUNSORROW_ENTITY_LIST

      @Deprecated public static final Environment LYNESSA_SUNSORROW_ENTITY_LIST
      Deprecated.
      This entity list implements Lynessa Sunsorrow, keeping track of each spell cast a player cast on his own minions.
    • SHUFFLED_CARDS_LIST

      public static final Environment SHUFFLED_CARDS_LIST
      This entity list implements Bonefetcher, keeping track of the cards that were shuffled in each player's deck.
    • EVENT_SOURCE_REFERENCE_STACK

      public static final Environment EVENT_SOURCE_REFERENCE_STACK
      Stores a stack of event sources.
    • TRIGGER_HOST_STACK

      public static final Environment TRIGGER_HOST_STACK
      Stores the stack of trigger hosts as triggers are processed
    • TARGET_OVERRIDE_STACK

      public static final Environment TARGET_OVERRIDE_STACK
    • DEATHRATTLES_TRIGGERED

      public static final Environment DEATHRATTLES_TRIGGERED
      Stores the deathrattles triggered throughout the game.
    • RANDOMLY_PLAYED_QUEUE

      public static final Environment RANDOMLY_PLAYED_QUEUE
      Stores the cards that are currently selected to be randomly played, preventing them from being randomly played more than once per sequence.
  • Method Details

    • values

      public static Environment[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Environment valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null