More tweaks from the Rubocop overlord

This commit is contained in:
Maruno17
2021-12-19 17:28:59 +00:00
parent 33781493f4
commit 65b1a8d6c3
161 changed files with 2839 additions and 2967 deletions

View File

@@ -141,12 +141,12 @@ class Battle
@priorityTrickRoom = false
@choices = []
@megaEvolution = [
[-1] * (@player ? @player.length : 1),
[-1] * (@opponent ? @opponent.length : 1)
[-1] * (@player ? @player.length : 1),
[-1] * (@opponent ? @opponent.length : 1)
]
@initialItems = [
Array.new(@party1.length) { |i| (@party1[i]) ? @party1[i].item_id : nil },
Array.new(@party2.length) { |i| (@party2[i]) ? @party2[i].item_id : nil }
Array.new(@party1.length) { |i| (@party1[i]) ? @party1[i].item_id : nil },
Array.new(@party2.length) { |i| (@party2[i]) ? @party2[i].item_id : nil }
]
@recycleItems = [Array.new(@party1.length, nil), Array.new(@party2.length, nil)]
@belch = [Array.new(@party1.length, false), Array.new(@party2.length, false)]
@@ -202,7 +202,7 @@ class Battle
end
def maxBattlerIndex
return (pbSideSize(0) > pbSideSize(1)) ? (pbSideSize(0) - 1) * 2 : pbSideSize(1) * 2 - 1
return (pbSideSize(0) > pbSideSize(1)) ? (pbSideSize(0) - 1) * 2 : (pbSideSize(1) * 2) - 1
end
#=============================================================================
@@ -282,7 +282,7 @@ class Battle
def pbNumPositions(side, idxTrainer)
ret = 0
for i in 0...pbSideSize(side)
t = pbGetOwnerIndexFromBattlerIndex(i * 2 + side)
t = pbGetOwnerIndexFromBattlerIndex((i * 2) + side)
next if t != idxTrainer
ret += 1
end