java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.ai.BattleAIBase
com.pixelmonmod.pixelmon.battles.controller.ai.AggressiveAI
Direct Known Subclasses:
TacticalAI

public class AggressiveAI extends BattleAIBase
Always uses the strongest possible attacking move against the current opponent. Doesn't switch or use status moves unless forced to.
  • Constructor Details

    • AggressiveAI

      public AggressiveAI(BattleParticipant participant)
      Initializes the AI.
      Parameters:
      participant - The participant controlled by the AI.
  • Method Details

    • getNextMove

      public MoveChoice getNextMove(PixelmonWrapper pw)
      Description copied from class: BattleAIBase
      Gets the move the AI will make next.
      Specified by:
      getNextMove in class BattleAIBase
      Parameters:
      pw - The Pokémon to make a move with.
      Returns:
      The move the AI will make next.
    • getNextMoveAttackOnly

      protected MoveChoice getNextMoveAttackOnly(PixelmonWrapper pw)
      Gets the next move the Pokémon will make, limited to attacking.
      Parameters:
      pw - The Pokémon choosing a move.
      Returns:
      The next move the Pokémon will make, limited to attacking.
    • getNextSwitch

      public UUID getNextSwitch(PixelmonWrapper pw)
      Description copied from class: BattleAIBase
      Gets a Pokémon to switch to when forced to switch.
      Specified by:
      getNextSwitch in class BattleAIBase
      Parameters:
      pw - The Pokémon switching out.
      Returns:
      The ID of the Pokémon to switch to.
    • getFaintedPokemonToRevive

      public UUID getFaintedPokemonToRevive()
      Description copied from class: BattleAIBase
      Gets a Pokémon to revive when forced to revive.
      Specified by:
      getFaintedPokemonToRevive in class BattleAIBase
      Returns:
      The ID of the Pokémon to switch to.
    • validateSwitch

      protected boolean validateSwitch(PixelmonWrapper nextPokemon)
      Does any additional checks to see if the switch-in is usable.
      Parameters:
      nextPokemon - The Pokémon switching in.
      Returns:
      Whether the switch-in is usable.
    • resetSwitchSimulation

      protected void resetSwitchSimulation(PixelmonWrapper current, int controlledIndex, PixelmonWrapper simulated)
      Resets variables that are temporarily modified when simulating switches.
      Parameters:
      current - The Pokémon switching out.
      controlledIndex - The index of the current Pokémon in the controlled Pokémon array.
      simulated - The Pokémon simulating switching in.