Added more debug logging to AI, fixed some bugs in AI

This commit is contained in:
Maruno17
2023-01-16 19:29:28 +00:00
parent 98f16c2afa
commit 2627d68782
21 changed files with 280 additions and 115 deletions

View File

@@ -133,12 +133,11 @@ class Battle::AI
end
if list.length > 0
if batonPass >= 0 && @battle.pbRegisterMove(battler.index, batonPass, false)
PBDebug.log("[AI] #{battler.pbThis} (#{battler.index}) will use Baton Pass to avoid Perish Song")
PBDebug.log_ai("#{@user.name} will use Baton Pass to avoid Perish Song")
return true
end
if @battle.pbRegisterSwitch(battler.index, list[0])
PBDebug.log("[AI] #{battler.pbThis} (#{battler.index}) will switch with " +
@battle.pbParty(battler.index)[list[0]].name)
PBDebug.log_ai("#{@user.name} will switch with #{@battle.pbParty(battler.index)[list[0]].name}")
return true
end
end