Enum Class TargetPlayer

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

public enum TargetPlayer extends Enum<TargetPlayer>
Indicates a player reference.
  • Enum Constant Details

    • SELF

      public static final TargetPlayer SELF
      The player that owns the source of the spell or action.
    • OPPONENT

      public static final TargetPlayer OPPONENT
      The opponent of the player that owns the source of the spell or action.
    • BOTH

      public static final TargetPlayer BOTH
      When this is specified, the spell or action is typically repeated twice, once for each player and starting with the source owner.
    • OWNER

      public static final TargetPlayer OWNER
      The player that owns the target of the spell or action.
    • ACTIVE

      public static final TargetPlayer ACTIVE
      The player whose turn it currently is.
    • INACTIVE

      public static final TargetPlayer INACTIVE
      The player whose turn it is not.
    • PLAYER_1

      public static final TargetPlayer PLAYER_1
      The first player.
    • PLAYER_2

      public static final TargetPlayer PLAYER_2
      The second player.
    • EITHER

      public static final TargetPlayer EITHER
      Indicates either player. Used for filters and conditions.
  • Method Details

    • values

      public static TargetPlayer[] 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 TargetPlayer 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
    • getTargetPlayerForOwner

      public static TargetPlayer getTargetPlayerForOwner(int owner)
      Returns a target player specific to the specified owner.
      Parameters:
      owner -
      Returns: