Class AggressiveAI
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.ai.BattleAIBase
com.pixelmonmod.pixelmon.battles.controller.ai.AggressiveAI
- Direct Known Subclasses:
TacticalAI
Always uses the strongest possible attacking move against the current opponent.
Doesn't switch or use status moves unless forced to.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets a Pokémon to revive when forced to revive.Gets the move the AI will make next.protected MoveChoice
Gets the next move the Pokémon will make, limited to attacking.Gets a Pokémon to switch to when forced to switch.protected void
resetSwitchSimulation
(PixelmonWrapper current, int controlledIndex, PixelmonWrapper simulated) Resets variables that are temporarily modified when simulating switches.protected boolean
validateSwitch
(PixelmonWrapper nextPokemon) Does any additional checks to see if the switch-in is usable.Methods inherited from class com.pixelmonmod.pixelmon.battles.controller.ai.BattleAIBase
getAttackChoices, getAttackChoicesOpponentOnly, getBestAttackChoices, getBestAttackChoices, getChoices, getMoveset, getPossibleReviveIDs, getPossibleSwitchIDs, getRandomAttackChoice, getSwitchChoices, getWeightedOffensiveChoices, registerMove, registerSwitch, weightFromOpponentOptions, weightFromOpponentOptions, weightFromUserOptions, weightFromUserOptions, weightOffensiveMove, weightOffensiveMove, weightOffensiveMoves, weightRandomMove, weightSingleTypeChange, weightStatusOpponentOptions, weightTypeChange, weightTypeChange
-
Constructor Details
-
AggressiveAI
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.- Specified by:
getNextMove
in classBattleAIBase
- Parameters:
pw
- The Pokémon to make a move with.- Returns:
- The move the AI will make next.
-
getNextMoveAttackOnly
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
Description copied from class:BattleAIBase
Gets a Pokémon to switch to when forced to switch.- Specified by:
getNextSwitch
in classBattleAIBase
- Parameters:
pw
- The Pokémon switching out.- Returns:
- The ID of the Pokémon to switch to.
-
getFaintedPokemonToRevive
Description copied from class:BattleAIBase
Gets a Pokémon to revive when forced to revive.- Specified by:
getFaintedPokemonToRevive
in classBattleAIBase
- Returns:
- The ID of the Pokémon to switch to.
-
validateSwitch
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.
-