Obsoleted battle methods that yield battlers in favour of ones that return all of them at once

This commit is contained in:
Maruno17
2021-10-27 22:45:34 +01:00
parent 6066797517
commit f3abcb7caf
38 changed files with 213 additions and 321 deletions

View File

@@ -76,10 +76,7 @@ class PokeBattle_Battler
self.statusCount = 0
# Lose happiness
if @pokemon && @battle.internalBattle
badLoss = false
@battle.eachOtherSideBattler(@index) do |b|
badLoss = true if b.level>=self.level+30
end
badLoss = @battle.allOtherSideBattlers(@index).any? { |b| b.level >= self.level + 30 }
@pokemon.changeHappiness((badLoss) ? "faintbad" : "faint")
end
# Reset form