mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Fix: Made the "Battle flee" sound effect play before the "Fled from b… (#51)
* Fix: Made the "Battle flee" sound effect play before the "Fled from battle" messages
This commit is contained in:
@@ -8,7 +8,8 @@ class PokeBattle_Battler
|
|||||||
if tryFlee && @battle.wildBattle? && opposes? &&
|
if tryFlee && @battle.wildBattle? && opposes? &&
|
||||||
@battle.rules["alwaysflee"] && @battle.pbCanRun?(@index)
|
@battle.rules["alwaysflee"] && @battle.pbCanRun?(@index)
|
||||||
pbBeginTurn(choice)
|
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
|
@battle.decision = 3
|
||||||
pbEndTurn(choice)
|
pbEndTurn(choice)
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ class PokeBattle_Battle
|
|||||||
elsif @internalBattle
|
elsif @internalBattle
|
||||||
pbDisplayPaused(_INTL("No! There's no running from a Trainer battle!"))
|
pbDisplayPaused(_INTL("No! There's no running from a Trainer battle!"))
|
||||||
elsif pbDisplayConfirm(_INTL("Would you like to forfeit the match and quit now?"))
|
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
|
@decision = 3
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@@ -60,7 +61,8 @@ class PokeBattle_Battle
|
|||||||
end
|
end
|
||||||
# Fleeing from wild battles
|
# Fleeing from wild battles
|
||||||
if $DEBUG && Input.press?(Input::CTRL)
|
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
|
@decision = 3
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@@ -70,7 +72,8 @@ class PokeBattle_Battle
|
|||||||
end
|
end
|
||||||
if !duringBattle
|
if !duringBattle
|
||||||
if battler.pbHasType?(:GHOST) && NEWEST_BATTLE_MECHANICS
|
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
|
@decision = 3
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@@ -79,7 +82,8 @@ class PokeBattle_Battle
|
|||||||
if BattleHandlers.triggerRunFromBattleAbility(battler.ability,battler)
|
if BattleHandlers.triggerRunFromBattleAbility(battler.ability,battler)
|
||||||
pbShowAbilitySplash(battler,true)
|
pbShowAbilitySplash(battler,true)
|
||||||
pbHideAbilitySplash(battler)
|
pbHideAbilitySplash(battler)
|
||||||
pbDisplayPaused(_INTL("You got away safely!")) { pbSEPlay("Battle flee") }
|
pbSEPlay("Battle flee")
|
||||||
|
pbDisplayPaused(_INTL("You got away safely!"))
|
||||||
@decision = 3
|
@decision = 3
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@@ -87,8 +91,9 @@ class PokeBattle_Battle
|
|||||||
# Held items that guarantee escape
|
# Held items that guarantee escape
|
||||||
if battler.itemActive?
|
if battler.itemActive?
|
||||||
if BattleHandlers.triggerRunFromBattleItem(battler.item,battler)
|
if BattleHandlers.triggerRunFromBattleItem(battler.item,battler)
|
||||||
|
pbSEPlay("Battle flee")
|
||||||
pbDisplayPaused(_INTL("{1} fled using its {2}!",
|
pbDisplayPaused(_INTL("{1} fled using its {2}!",
|
||||||
battler.pbThis,battler.itemName)) { pbSEPlay("Battle flee") }
|
battler.pbThis,battler.itemName))
|
||||||
@decision = 3
|
@decision = 3
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@@ -135,7 +140,8 @@ class PokeBattle_Battle
|
|||||||
rate += @runCommand*30
|
rate += @runCommand*30
|
||||||
end
|
end
|
||||||
if rate>=256 || @battleAI.pbAIRandom(256)<rate
|
if rate>=256 || @battleAI.pbAIRandom(256)<rate
|
||||||
pbDisplayPaused(_INTL("You got away safely!")) { pbSEPlay("Battle flee") }
|
pbSEPlay("Battle flee")
|
||||||
|
pbDisplayPaused(_INTL("You got away safely!"))
|
||||||
@decision = 3
|
@decision = 3
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -462,7 +462,8 @@ class PokeBattle_SafariZone
|
|||||||
catchFactor *= 2 # Easier to catch
|
catchFactor *= 2 # Easier to catch
|
||||||
escapeFactor *= 2 if pbRandom(100)<90 # More likely to escape
|
escapeFactor *= 2 if pbRandom(100)<90 # More likely to escape
|
||||||
when 3 # Run
|
when 3 # Run
|
||||||
pbDisplayPaused(_INTL("You got away safely!")) { pbSEPlay("Battle flee") }
|
pbSEPlay("Battle flee")
|
||||||
|
pbDisplayPaused(_INTL("You got away safely!"))
|
||||||
@decision = 3
|
@decision = 3
|
||||||
end
|
end
|
||||||
catchFactor = [[catchFactor,3].max,20].min
|
catchFactor = [[catchFactor,3].max,20].min
|
||||||
@@ -473,7 +474,8 @@ class PokeBattle_SafariZone
|
|||||||
pbDisplay(_INTL("PA: You have no Safari Balls left! Game over!"))
|
pbDisplay(_INTL("PA: You have no Safari Balls left! Game over!"))
|
||||||
@decision = 2
|
@decision = 2
|
||||||
elsif pbRandom(100)<5*escapeFactor
|
elsif pbRandom(100)<5*escapeFactor
|
||||||
pbDisplay(_INTL("{1} fled!",wildpoke.name)) { pbSEPlay("Battle flee") }
|
pbSEPlay("Battle flee")
|
||||||
|
pbDisplay(_INTL("{1} fled!",wildpoke.name))
|
||||||
@decision = 3
|
@decision = 3
|
||||||
elsif cmd==1 # Bait
|
elsif cmd==1 # Bait
|
||||||
pbDisplay(_INTL("{1} is eating!",wildpoke.name))
|
pbDisplay(_INTL("{1} is eating!",wildpoke.name))
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ BattleHandlers::AbilityOnHPDroppedBelowHalf.add(:EMERGENCYEXIT,
|
|||||||
next false if !battle.pbCanRun?(battler.index)
|
next false if !battle.pbCanRun?(battler.index)
|
||||||
battle.pbShowAbilitySplash(battler,true)
|
battle.pbShowAbilitySplash(battler,true)
|
||||||
battle.pbHideAbilitySplash(battler)
|
battle.pbHideAbilitySplash(battler)
|
||||||
battle.pbDisplay(_INTL("{1} fled from battle!",battler.pbThis)) { pbSEPlay("Battle flee") }
|
pbSEPlay("Battle flee")
|
||||||
|
battle.pbDisplay(_INTL("{1} fled from battle!",battler.pbThis))
|
||||||
battle.decision = 3 # Escaped
|
battle.decision = 3 # Escaped
|
||||||
next true
|
next true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user