Pokémon sent into battle now default to the Fight option, fixed bugs in Instruct, fixed some AI bugs, fixed parameter mixup for def pbMoveCanTarget?, renamed function to function_code everywhere, fixed black party Pokémon icons in storage, added some more AI testing code

This commit is contained in:
Maruno17
2023-06-18 20:12:36 +01:00
parent 9c2a9130a5
commit b5e37248b9
42 changed files with 305 additions and 174 deletions

View File

@@ -243,7 +243,7 @@ class Battle::AI::AIBattler
battler.pbTypes(true).each do |defend_type|
mult = effectiveness_of_type_against_single_battler_type(type, defend_type, user)
if move
case move.function
case move.function_code
when "HitsTargetInSkyGroundsTarget"
mult = Effectiveness::NORMAL_EFFECTIVE_MULTIPLIER if type == :GROUND && defend_type == :FLYING
when "FreezeTargetSuperEffectiveAgainstWater"
@@ -308,7 +308,7 @@ class Battle::AI::AIBattler
end
def has_move_with_function?(*functions)
check_for_move { |m| return true if functions.include?(m.function) }
check_for_move { |m| return true if functions.include?(m.function_code) }
return false
end