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
-
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 OpponentMemory
Finds 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 MoveChoice
pickBestChoice
(List<MoveChoice> bestChoices) Picks a single move choice from a list of the best choices.protected MoveChoice
pickBestChoice
(List<MoveChoice> choices, List<MoveChoice> bestChoices) Picks a single move choice from a list of the best choices.void
registerMove
(PixelmonWrapper user) Registers an enemy move into the AI's memory.void
simulateStatusMove
(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, validateSwitch
Methods 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:BattleAIBase
Gets the move the AI will make next.- Overrides:
getNextMove
in 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:BattleAIBase
Registers an enemy move into the AI's memory.- Overrides:
registerMove
in 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.
-