All Implemented Interfaces:
IEncodeable, Comparable<BattleClause>

public class HierarchicalTier extends Tier
A type of Tier that works similarly to a LinkedList in that it has a parent tier and will validate the pokemon against that first. If it fails to validate the parent then it won't check it against the current spec
  • Constructor Details

    • HierarchicalTier

      public HierarchicalTier(String id, boolean ban, PokemonSpecification... specs)
      Initializes a new tier
      Parameters:
      id - The id of the tier/battle clause
      ban - If the tier is a ban list
      specs - The specs checked for this ban list
    • HierarchicalTier

      public HierarchicalTier(String id, boolean ban, Tier tierAbove, PokemonSpecification... specs)
      Initializes a new tier
      Parameters:
      id - The id of the tier/battle clause
      ban - If the tier is a ban list
      tierAbove - The parent tier of this tier
      specs - The specs checked for this ban list
  • Method Details

    • validateSingle

      public boolean validateSingle(Pokemon pokemon)
      Description copied from class: Tier
      The logic executed here is - When ban is true: if a single spec matches return false (i.e. isn't valid as it matches a banned spec) However, if no spec match then return true When ban is false: if all specs match return true (i.e. all the specs match the given pokemon) If a single spec doesn't match return false (doesn't meet requirements)
      Overrides:
      validateSingle in class Tier
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      True if a valid single pokemon