Some more AI function code rewrites

This commit is contained in:
Maruno17
2022-12-04 19:09:46 +00:00
parent c53a52564b
commit 539a47671d
8 changed files with 218 additions and 91 deletions

View File

@@ -13,6 +13,7 @@
# PredictMoveFailure
# ScoreMoves
# PreferMultiTargetMoves
# ReserveLastPokemon (don't switch it in if possible)
#===============================================================================
class Battle::AI::AITrainer
attr_reader :side, :trainer_index
@@ -36,6 +37,10 @@ class Battle::AI::AITrainer
@skill_flags.push("ScoreMoves")
@skill_flags.push("PreferMultiTargetMoves")
end
if @skill >= 100
# TODO: Also have flag "DontReserveLastPokemon" which negates this.
@skill_flags.push("ReserveLastPokemon")
end
end
def has_skill_flag?(flag)