Class TacticalAI
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.ai.BattleAIBase
com.pixelmonmod.pixelmon.battles.controller.ai.AggressiveAI
com.pixelmonmod.pixelmon.battles.controller.ai.TacticalAI
- Direct Known Subclasses:
AdvancedAI,RaidAI
Uses both offensive and status moves.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<MoveChoice>getBestChoices(List<MoveChoice> choices) Chooses the best move choices from a list of choices.protected List<MoveChoice>getBestChoices(List<MoveChoice> choices, boolean excludeStatus) Chooses the best move choices from a list of choices.protected OpponentMemoryFinds the memory of a certain Pokémon.Gets the move the AI will make next.protected List<MoveChoice>Gets all attack choices the Pokémon has, along with the choices' weights.protected MoveChoicepickBestChoice(List<MoveChoice> bestChoices) Picks a single move choice from a list of the best choices.protected MoveChoicepickBestChoice(List<MoveChoice> choices, List<MoveChoice> bestChoices) Picks a single move choice from a list of the best choices.voidregisterMove(PixelmonWrapper user) Registers an enemy move into the AI's memory.voidsimulateStatusMove(PixelmonWrapper pw, MoveChoice choice) Generates move results for status moves by simulating them.Methods inherited from class com.pixelmonmod.pixelmon.battles.controller.ai.AggressiveAI
getFaintedPokemonToRevive, getNextMoveAttackOnly, getNextSwitch, resetSwitchSimulation, validateSwitchMethods inherited from class com.pixelmonmod.pixelmon.battles.controller.ai.BattleAIBase
getAttackChoices, getAttackChoicesOpponentOnly, getBestAttackChoices, getBestAttackChoices, getChoices, getMoveset, getPossibleReviveIDs, getPossibleSwitchIDs, getRandomAttackChoice, getSwitchChoices, getWeightedOffensiveChoices, registerSwitch, weightFromOpponentOptions, weightFromOpponentOptions, weightFromUserOptions, weightFromUserOptions, weightOffensiveMove, weightOffensiveMove, weightOffensiveMoves, weightRandomMove, weightSingleTypeChange, weightStatusOpponentOptions, weightTypeChange, weightTypeChange
-
Constructor Details
-
TacticalAI
Initializes the AI.- Parameters:
participant- The participant controlled by the AI.
-
-
Method Details
-
getNextMove
Description copied from class:BattleAIBaseGets the move the AI will make next.- Overrides:
getNextMovein classAggressiveAI- Parameters:
pw- The Pokémon to make a move with.- Returns:
- The move the AI will make next.
-
getWeightedAttackChoices
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
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
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
Description copied from class:BattleAIBaseRegisters an enemy move into the AI's memory.- Overrides:
registerMovein classBattleAIBase
-
simulateStatusMove
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
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
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
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.
-