Minor refactoring to kill various Rubocop warnings

This commit is contained in:
Maruno17
2021-12-17 20:29:47 +00:00
parent b5ee1b211d
commit 5dc64f1709
46 changed files with 145 additions and 151 deletions

View File

@@ -379,7 +379,7 @@ class BattleFactoryData
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
trainerdata[0])
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps, @rentals)
@opponent.party = opponentPkmn.shuffle[0, 3]
@opponent.party = opponentPkmn.sample(3)
end
def pbChooseRentals
@@ -402,7 +402,7 @@ class BattleFactoryData
trainerdata[0])
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps,
[].concat(@rentals).concat(@oldopponent))
@opponent.party = opponentPkmn.shuffle[0, 3]
@opponent.party = opponentPkmn.sample(3)
end
def pbChooseSwaps

View File

@@ -9,7 +9,7 @@ class BattleSwapScene
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
_INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport)
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
[], 0, 64, Graphics.width, Graphics.height - 128 , @viewport)
[], 0, 64, Graphics.width, Graphics.height - 128, @viewport)
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize("",
0, Graphics.height - 64, Graphics.width, 64, @viewport)
@sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize("",

View File

@@ -60,7 +60,6 @@ def pbGetLegalMoves2(species, maxlevel)
species_data.tutor_moves.each { |m| addMove(moves, m, 0) if $tmMoves.include?(m) }
babyspecies = babySpecies(species)
GameData::Species.get(babyspecies).egg_moves.each { |m| addMove(moves, m, 2) }
#
movedatas = []
for move in moves
movedatas.push([move, GameData::Move.get(move)])