More Rubocop changes

This commit is contained in:
Maruno17
2022-02-13 00:57:54 +00:00
parent cca5989746
commit f68e699cc9
108 changed files with 708 additions and 808 deletions

View File

@@ -20,33 +20,25 @@ def pbLottery(winnum, nameVar = 2, positionVar = 3, matchedVar = 4)
thismatched = 0
id = i.owner.public_id
5.times do |j|
if (id / (10**j)) % 10 == (winnum / (10**j)) % 10
thismatched += 1
else
break
end
end
if thismatched > winmatched
winpoke = i.name
winpos = 1 # Party
winmatched = thismatched
break if (id / (10**j)) % 10 != (winnum / (10**j)) % 10
thismatched += 1
end
next if thismatched <= winmatched
winpoke = i.name
winpos = 1 # Party
winmatched = thismatched
end
pbEachPokemon { |poke, _box|
thismatched = 0
id = poke.owner.public_id
5.times do |j|
if (id / (10**j)) % 10 == (winnum / (10**j)) % 10
thismatched += 1
else
break
end
end
if thismatched > winmatched
winpoke = poke.name
winpos = 2 # Storage
winmatched = thismatched
break if (id / (10**j)) % 10 != (winnum / (10**j)) % 10
thismatched += 1
end
next if thismatched <= winmatched
winpoke = poke.name
winpos = 2 # Storage
winmatched = thismatched
}
$game_variables[nameVar] = winpoke
$game_variables[positionVar] = winpos