mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Refactored battle-starting methods into WildBattle.start and TrainerBattle.start, etc.
This commit is contained in:
@@ -54,14 +54,14 @@ def pbOrganizedBattleEx(opponent, challengedata, endspeech, endspeechwin)
|
||||
olditems = $player.party.transform { |p| p.item_id }
|
||||
olditems2 = opponent.party.transform { |p| p.item_id }
|
||||
# Create the battle scene (the visual side of it)
|
||||
scene = pbNewBattleScene
|
||||
scene = BattleCreationHelperMethods.create_battle_scene
|
||||
# Create the battle class (the mechanics side of it)
|
||||
battle = challengedata.createBattle(scene, $player, opponent)
|
||||
battle.internalBattle = false
|
||||
battle.endSpeeches = [endspeech]
|
||||
battle.endSpeechesWin = [endspeechwin]
|
||||
# Set various other properties in the battle class
|
||||
pbPrepareBattle(battle)
|
||||
BattleCreationHelperMethods.prepare_battle(battle)
|
||||
# Perform the battle itself
|
||||
decision = 0
|
||||
pbBattleAnimation(pbGetTrainerBattleBGM(opponent)) {
|
||||
@@ -114,7 +114,7 @@ end
|
||||
|
||||
def pbPlayBattle(battledata)
|
||||
return if !battledata
|
||||
scene = pbNewBattleScene
|
||||
scene = BattleCreationHelperMethods.create_battle_scene
|
||||
scene.abortable = true
|
||||
lastbattle = Marshal.restore(battledata)
|
||||
case lastbattle[0]
|
||||
|
||||
Reference in New Issue
Block a user