More Rubocopping

This commit is contained in:
Maruno17
2021-12-20 17:18:21 +00:00
parent db4acd3369
commit 33fcbf623b
154 changed files with 1388 additions and 1420 deletions

View File

@@ -216,7 +216,7 @@ class BattleChallengeData
while @trainers.length < @numRounds
newtrainer = pbBattleChallengeTrainer(@wins + @trainers.length, btTrainers)
found = false
for tr in @trainers
@trainers.each do |tr|
found = true if tr == newtrainer
end
@trainers.push(newtrainer) if !found

View File

@@ -130,7 +130,7 @@ class PBPokemon
end
moves = pieces[4].split(/\s*,\s*/)
moveid = []
for i in 0...Pokemon::MAX_MOVES
Pokemon::MAX_MOVES.times do |i|
move_data = GameData::Move.try_get(moves[i])
moveid.push(move_data.id) if move_data
end

View File

@@ -60,7 +60,7 @@ def pbGenerateBattleTrainer(idxTrainer, rules)
# The number of possible Pokémon is <= the required number; make them
# all Pokémon and use them
if pokemonnumbers.length <= rules.ruleset.suggestedNumber
for n in pokemonnumbers
pokemonnumbers.each do |n|
rndpoke = btpokemon[n]
pkmn = rndpoke.createPokemon(level, indvalues, opponent)
opponent.party.push(pkmn)

View File

@@ -76,7 +76,7 @@ class BattleSwapScene
def pbGetCommands(list, choices)
commands = []
for i in 0...list.length
list.length.times do |i|
pkmn = list[i]
category = pkmn.species_data.category
cmd = _INTL("{1} - {2} Pokémon", pkmn.speciesName, category)