From a28eadb9afc5adb3079d0dc57f88811ddbecd9a3 Mon Sep 17 00:00:00 2001 From: Derxwna Kapsyla Date: Wed, 28 Oct 2020 14:41:18 -0400 Subject: [PATCH] =?UTF-8?q?Fix:=20Made=20the=20"Battle=20flee"=20sound=20e?= =?UTF-8?q?ffect=20play=20before=20the=20"Fled=20from=20b=E2=80=A6=20(#51)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: Made the "Battle flee" sound effect play before the "Fled from battle" messages --- .../001_Battler/007_Battler_UseMove.rb | 3 ++- .../003_Battle/008_Battle_Action_Running.rb | 18 ++++++++++++------ .../002_PokeBattle_SafariZone.rb | 6 ++++-- .../012_Battle/007_BattleHandlers_Abilities.rb | 3 ++- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb b/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb index 1ccabad81..46f4fa424 100644 --- a/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb +++ b/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb @@ -8,7 +8,8 @@ class PokeBattle_Battler if tryFlee && @battle.wildBattle? && opposes? && @battle.rules["alwaysflee"] && @battle.pbCanRun?(@index) pbBeginTurn(choice) - @battle.pbDisplay(_INTL("{1} fled from battle!",pbThis)) { pbSEPlay("Battle flee") } + pbSEPlay("Battle flee") + @battle.pbDisplay(_INTL("{1} fled from battle!",pbThis)) @battle.decision = 3 pbEndTurn(choice) return true diff --git a/Data/Scripts/012_Battle/003_Battle/008_Battle_Action_Running.rb b/Data/Scripts/012_Battle/003_Battle/008_Battle_Action_Running.rb index 0b9267a90..709b820f7 100644 --- a/Data/Scripts/012_Battle/003_Battle/008_Battle_Action_Running.rb +++ b/Data/Scripts/012_Battle/003_Battle/008_Battle_Action_Running.rb @@ -52,7 +52,8 @@ class PokeBattle_Battle elsif @internalBattle pbDisplayPaused(_INTL("No! There's no running from a Trainer battle!")) elsif pbDisplayConfirm(_INTL("Would you like to forfeit the match and quit now?")) - pbDisplay(_INTL("{1} forfeited the match!",self.pbPlayer.name)) { pbSEPlay("Battle flee") } + pbSEPlay("Battle flee") + pbDisplay(_INTL("{1} forfeited the match!",self.pbPlayer.name)) @decision = 3 return 1 end @@ -60,7 +61,8 @@ class PokeBattle_Battle end # Fleeing from wild battles if $DEBUG && Input.press?(Input::CTRL) - pbDisplayPaused(_INTL("You got away safely!")) { pbSEPlay("Battle flee") } + pbSEPlay("Battle flee") + pbDisplayPaused(_INTL("You got away safely!")) @decision = 3 return 1 end @@ -70,7 +72,8 @@ class PokeBattle_Battle end if !duringBattle if battler.pbHasType?(:GHOST) && NEWEST_BATTLE_MECHANICS - pbDisplayPaused(_INTL("You got away safely!")) { pbSEPlay("Battle flee") } + pbSEPlay("Battle flee") + pbDisplayPaused(_INTL("You got away safely!")) @decision = 3 return 1 end @@ -79,7 +82,8 @@ class PokeBattle_Battle if BattleHandlers.triggerRunFromBattleAbility(battler.ability,battler) pbShowAbilitySplash(battler,true) pbHideAbilitySplash(battler) - pbDisplayPaused(_INTL("You got away safely!")) { pbSEPlay("Battle flee") } + pbSEPlay("Battle flee") + pbDisplayPaused(_INTL("You got away safely!")) @decision = 3 return 1 end @@ -87,8 +91,9 @@ class PokeBattle_Battle # Held items that guarantee escape if battler.itemActive? if BattleHandlers.triggerRunFromBattleItem(battler.item,battler) + pbSEPlay("Battle flee") pbDisplayPaused(_INTL("{1} fled using its {2}!", - battler.pbThis,battler.itemName)) { pbSEPlay("Battle flee") } + battler.pbThis,battler.itemName)) @decision = 3 return 1 end @@ -135,7 +140,8 @@ class PokeBattle_Battle rate += @runCommand*30 end if rate>=256 || @battleAI.pbAIRandom(256)