mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 15:44:57 +00:00
More aligning of code
This commit is contained in:
@@ -20,8 +20,8 @@ class BattleChallenge
|
||||
@numRounds = numrounds
|
||||
@rules = rules
|
||||
register(id, id[/double/], 3,
|
||||
id[/^factory/] ? BattleFactoryID : BattleTowerID,
|
||||
id[/open$/] ? 1 : 0)
|
||||
id[/^factory/] ? BattleFactoryID : BattleTowerID,
|
||||
id[/open$/] ? 1 : 0)
|
||||
pbWriteCup(id, rules)
|
||||
end
|
||||
|
||||
@@ -99,8 +99,8 @@ class BattleChallenge
|
||||
bttrainers = pbGetBTTrainers(@id)
|
||||
trainerdata = bttrainers[self.nextTrainer]
|
||||
ret = pbOrganizedBattleEx(opponent, self.rules,
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechLose, trainerdata[4]),
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechWin, trainerdata[3]))
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechLose, trainerdata[4]),
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechWin, trainerdata[3]))
|
||||
return ret
|
||||
end
|
||||
|
||||
@@ -372,8 +372,9 @@ class BattleFactoryData
|
||||
bttrainers = pbGetBTTrainers(pbBattleChallenge.currentChallenge)
|
||||
trainerdata = bttrainers[@trainerid]
|
||||
@opponent = NPCTrainer.new(
|
||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||
trainerdata[0])
|
||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||
trainerdata[0]
|
||||
)
|
||||
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps, @rentals)
|
||||
@opponent.party = opponentPkmn.sample(3)
|
||||
end
|
||||
@@ -394,10 +395,11 @@ class BattleFactoryData
|
||||
bttrainers = pbGetBTTrainers(pbBattleChallenge.currentChallenge)
|
||||
trainerdata = bttrainers[trainerid]
|
||||
@opponent = NPCTrainer.new(
|
||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||
trainerdata[0])
|
||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||
trainerdata[0]
|
||||
)
|
||||
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps,
|
||||
[].concat(@rentals).concat(@oldopponent))
|
||||
[].concat(@rentals).concat(@oldopponent))
|
||||
@opponent.party = opponentPkmn.sample(3)
|
||||
end
|
||||
|
||||
@@ -417,7 +419,7 @@ class BattleFactoryData
|
||||
bttrainers = pbGetBTTrainers(pbBattleChallenge.currentChallenge)
|
||||
trainerdata = bttrainers[@trainerid]
|
||||
return pbOrganizedBattleEx(@opponent, challenge.rules,
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechLose, trainerdata[4]),
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechWin, trainerdata[3]))
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechLose, trainerdata[4]),
|
||||
pbGetMessageFromHash(MessageTypes::EndSpeechWin, trainerdata[3]))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -148,7 +148,7 @@ class PBPokemon
|
||||
ev_array.push(s.id) if pkmn.ev[s.id] > 60
|
||||
end
|
||||
return self.new(pkmn.species, pkmn.item_id, pkmn.nature,
|
||||
mov1, mov2, mov3, mov4, ev_array)
|
||||
mov1, mov2, mov3, mov4, ev_array)
|
||||
end
|
||||
|
||||
def initialize(species, item, nature, move1, move2, move3, move4, ev)
|
||||
|
||||
@@ -43,8 +43,9 @@ def pbGenerateBattleTrainer(idxTrainer, rules)
|
||||
# Create the trainer
|
||||
trainerdata = bttrainers[idxTrainer]
|
||||
opponent = NPCTrainer.new(
|
||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||
trainerdata[0])
|
||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||
trainerdata[0]
|
||||
)
|
||||
# Determine how many IVs the trainer's Pokémon will have
|
||||
indvalues = 31
|
||||
indvalues = 21 if idxTrainer < 220
|
||||
|
||||
@@ -7,13 +7,17 @@ class BattleSwapScene
|
||||
@sprites = {}
|
||||
addBackgroundPlane(@sprites, "bg", "rentbg", @viewport)
|
||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||
_INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport)
|
||||
_INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport
|
||||
)
|
||||
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
|
||||
[], 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("",
|
||||
0, Graphics.height - 64, Graphics.height, 64, @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(
|
||||
"", 0, Graphics.height - 64, Graphics.height, 64, @viewport
|
||||
)
|
||||
@sprites["msgwindow"].visible = false
|
||||
pbUpdateChoices([])
|
||||
pbDeactivateWindows(@sprites)
|
||||
@@ -29,13 +33,17 @@ class BattleSwapScene
|
||||
@sprites = {}
|
||||
addBackgroundPlane(@sprites, "bg", "swapbg", @viewport)
|
||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||
_INTL("POKéMON SWAP"), 0, 0, Graphics.width, 64, @viewport)
|
||||
_INTL("POKéMON SWAP"), 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)
|
||||
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport
|
||||
)
|
||||
@sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize(
|
||||
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport)
|
||||
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport
|
||||
)
|
||||
@sprites["msgwindow"].visible = false
|
||||
pbInitSwapScreen
|
||||
pbDeactivateWindows(@sprites)
|
||||
|
||||
Reference in New Issue
Block a user