More AI bug fixes, more work on testing AI

This commit is contained in:
Maruno17
2023-06-18 23:36:06 +01:00
parent b5e37248b9
commit 539bc0fb50
5 changed files with 308 additions and 44 deletions

View File

@@ -22,6 +22,17 @@ class Battle::AI
# against it.
def pbGetMoveScores
choices = []
# TODO: Delete this after testing AI.
if $tested_abilities && @user.ability_id
$tested_abilities[@user.ability_id] ||= 0
$tested_abilities[@user.ability_id] += 1
end
if $tested_items && @user.item_id
$tested_items[@user.item_id] ||= 0
$tested_items[@user.item_id] += 1
end
@user.battler.eachMoveWithIndex do |orig_move, idxMove|
# TODO: Delete this after testing AI.