Many more Rubocop-inspired code improvements

This commit is contained in:
Maruno17
2021-12-18 19:06:22 +00:00
parent d17fc40a47
commit 13a238cc6a
107 changed files with 651 additions and 652 deletions

View File

@@ -11,8 +11,8 @@ class Battle
when 2
idxOther = (idxBattler + 2) % 4
when 3
return false if idxBattler == 2 || idxBattler == 3 # In middle spot already
idxOther = ((idxBattler % 2) == 0) ? 2 : 3
return false if [2, 3].include?(idxBattler) # In middle spot already
idxOther = (idxBattler.even?) ? 2 : 3
end
return false if pbGetOwnerIndexFromBattlerIndex(idxBattler) != pbGetOwnerIndexFromBattlerIndex(idxOther)
return true