Direct Known Subclasses:
AdvancedAI, RaidAI

public class TacticalAI extends AggressiveAI
Uses both offensive and status moves.
  • Constructor Details

    • TacticalAI

      public TacticalAI(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.
      Overrides:
      getNextMove in class AggressiveAI
      Parameters:
      pw - The Pokémon to make a move with.
      Returns:
      The move the AI will make next.
    • getWeightedAttackChoices

      protected List<MoveChoice> getWeightedAttackChoices(PixelmonWrapper pw)
      Gets all attack choices the Pokémon has, along with the choices' weights.
      Parameters:
      pw - The Pokémon deciding on a choice.
      Returns:
      A list of all attack choices the Pokémon has, along with their weights.
    • pickBestChoice

      protected MoveChoice pickBestChoice(List<MoveChoice> bestChoices)
      Picks a single move choice from a list of the best choices.
      Parameters:
      bestChoices - All best choices the Pokémon has.
      Returns:
      A single move choice from the list of best choices.
    • pickBestChoice

      protected MoveChoice pickBestChoice(List<MoveChoice> choices, List<MoveChoice> bestChoices)
      Picks a single move choice from a list of the best choices.
      Parameters:
      choices - All choices the Pokémon has.
      bestChoices - All best choices the Pokémon has.
      Returns:
      A single move choice from the list of best choices.
    • registerMove

      public void registerMove(PixelmonWrapper user)
      Description copied from class: BattleAIBase
      Registers an enemy move into the AI's memory.
      Overrides:
      registerMove in class BattleAIBase
    • simulateStatusMove

      public void simulateStatusMove(PixelmonWrapper pw, MoveChoice choice)
      Generates move results for status moves by simulating them.
      Parameters:
      pw - The Pokémon using the move.
      choice - The move choice to be tested.
    • getMemory

      protected OpponentMemory getMemory(PixelmonWrapper pw)
      Finds the memory of a certain Pokémon. Creates a new one if a new opponent Pokémon has been seen.
      Parameters:
      pw - The Pokémon to get the memory for.
      Returns:
      The memory of a certain Pokémon, or null if the Pokémon is not an opponent.
    • getBestChoices

      protected List<MoveChoice> getBestChoices(List<MoveChoice> choices)
      Chooses the best move choices from a list of choices.
      Parameters:
      choices - The choices to pick the best choices from.
      Returns:
      A list of the best move choices.
    • getBestChoices

      protected List<MoveChoice> getBestChoices(List<MoveChoice> choices, boolean excludeStatus)
      Chooses the best move choices from a list of choices.
      Parameters:
      choices - The choices to pick the best choices from.
      excludeStatus - Whether to exclude status moves from the choices.
      Returns:
      A list of the best move choices.