Class LogicalOrBattleClauseSingle

All Implemented Interfaces:
IEncodeable, Comparable<BattleClause>

public class LogicalOrBattleClauseSingle extends LogicalOrBattleClause
Rejects if a single Pokémon violates multiple clauses at the same time.
  • Constructor Details

    • LogicalOrBattleClauseSingle

      public LogicalOrBattleClauseSingle(String id, BattleClause... clauses)
      Creates a clause to prevent multiple clauses from being violated at the same time.
      Parameters:
      id - The unique ID of the battle clause.
      clauses - The clauses that cannot be violated combined.
  • Method Details

    • validateTeam

      public boolean validateTeam(List<Pokemon> team)
      Description copied from class: BattleClause
      Checks if the rule allows a list of Pokémon to be chosen for battle.
      Overrides:
      validateTeam in class LogicalOrBattleClause
      Parameters:
      team - The Pokémon to check.
      Returns:
      Whether the rule allows the given team to be chosen for battle.