java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.clauses.BattleClause
com.pixelmonmod.pixelmon.battles.api.rules.clauses.type.MoveClause
All Implemented Interfaces:
IEncodeable, Comparable<BattleClause>

public class MoveClause extends BattleClause
Custom BattleClause to check if the pokemon has/hasn't got a given move
  • Constructor Details

    • MoveClause

      @SafeVarargs public MoveClause(String id, boolean ban, RegistryValue<ImmutableAttack>... moves)
      Creates a clause to check if the pokemon has a given move. If the ban parameter is true it will only return true when the pokemon does NOT have the move
      Parameters:
      id - The unique ID of the battle clause.
      moves - The unlocalized names of moves to ban.
  • Method Details

    • validateSingle

      public boolean validateSingle(Pokemon pokemon)
      Description copied from class: BattleClause
      Checks if the rule allows a Pokémon to be chosen for battle.
      Overrides:
      validateSingle in class BattleClause
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      Whether the rule allows the given Pokémon to be chosen for battle.