java.lang.Object
net.demilich.metastone.game.entities.minions.Race

public class Race extends Object
The race / tribe of a card.

Cards can belong to a specific tribe by specifying a string in the CardDesc.race field.

This previously used to be an enumeration but now is a string. Races must be all-capitals.

  • Field Details

  • Constructor Details

    • Race

      public Race()
  • Method Details

    • hasRace

      public static boolean hasRace(GameContext gameContext, Entity entity, String rhs)
      Returns true if the given race string is considered as having the race rhs, accounting for whether or not the specification is "ALL", "NONE".

      If lhs contains an ampersand-separated list of races, the lhs counts as having both races, and can match as long as rhs is any one of the races in lhs.

      Parameters:
      gameContext - A context that will be scanned for auras that potentially change the result of this evaluation.
      entity -
      rhs -
      Returns:
      true if lhs has the race specified in rhs, including ALL.