mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
More Rubocopping
This commit is contained in:
@@ -11,7 +11,7 @@ end
|
||||
|
||||
def pbNewTrainer(tr_type, tr_name, tr_version, save_changes = true)
|
||||
party = []
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
Settings::MAX_PARTY_SIZE.times do |i|
|
||||
if i == 0
|
||||
pbMessage(_INTL("Please enter the first Pokémon.", i))
|
||||
elsif !pbConfirmMessage(_INTL("Add another Pokémon?"))
|
||||
@@ -99,7 +99,7 @@ def pbGetFreeTrainerParty(tr_type, tr_name)
|
||||
tr_type_data = GameData::TrainerType.try_get(tr_type)
|
||||
raise _INTL("Trainer type {1} does not exist.", tr_type) if !tr_type_data
|
||||
tr_type = tr_type_data.id
|
||||
for i in 0...256
|
||||
256.times do |i|
|
||||
return i if !GameData::Trainer.try_get(tr_type, tr_name, i)
|
||||
end
|
||||
return -1
|
||||
|
||||
@@ -119,7 +119,7 @@ class Player < Trainer
|
||||
ret = 0
|
||||
@seen_forms[species_id] ||= [[[], []], [[], []]]
|
||||
array = @seen_forms[species_id]
|
||||
for i in 0...[array[0].length, array[1].length].max
|
||||
[array[0].length, array[1].length].max.times do |i|
|
||||
ret += 1 if array[0][0][i] || array[0][1][i] || # male or genderless shiny/non-shiny
|
||||
array[1][0][i] || array[1][1][i] # female shiny/non-shiny
|
||||
end
|
||||
@@ -325,7 +325,7 @@ class Player < Trainer
|
||||
@accessible_dexes.push(-1)
|
||||
end
|
||||
else # Regional Dexes + National Dex
|
||||
for i in 0...dexes_count
|
||||
dexes_count.times do |i|
|
||||
dex_list_to_check = (i == dexes_count - 1) ? -1 : i
|
||||
if self.unlocked?(i) && self.seen_any?(dex_list_to_check)
|
||||
@accessible_dexes.push(dex_list_to_check)
|
||||
|
||||
Reference in New Issue
Block a user