Generalised AI code for scoring stat changes

This commit is contained in:
Maruno17
2022-12-18 20:51:16 +00:00
parent 7ace4c5289
commit f33184d413
14 changed files with 382 additions and 729 deletions

View File

@@ -65,7 +65,8 @@ class Battle::AI
scoreSum = 0
scoreCount = 0
battler.allOpposing.each do |b|
scoreSum += pbGetMoveScore(battler.moves[idxEncoredMove], [b])
set_up_move_check(battler.moves[idxEncoredMove])
scoreSum += pbGetMoveScore([b])
scoreCount += 1
end
if scoreCount > 0 && scoreSum / scoreCount <= 20