mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Fixed BGM bug when ending surfing and immediately triggering a trainer battle with an intro BGM, fixed events making all other events check if they trigger after the event moves, fixed Neutralizing Gas triggering twice upon fainting
This commit is contained in:
@@ -8,12 +8,21 @@ class Battle::Battler
|
||||
end
|
||||
# Reset form
|
||||
@battle.peer.pbOnLeavingBattle(@battle, @pokemon, @battle.usedInBattle[idxOwnSide][@index / 2])
|
||||
# Check for end of Neutralizing Gas/Unnerve
|
||||
if hasActiveAbility?(:NEUTRALIZINGGAS)
|
||||
# Treat self as fainted
|
||||
@hp = 0
|
||||
@fainted = true
|
||||
pbAbilitiesOnNeutralizingGasEnding
|
||||
elsif hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH])
|
||||
# Treat self as fainted
|
||||
@hp = 0
|
||||
@fainted = true
|
||||
pbItemsOnUnnerveEnding
|
||||
end
|
||||
# Treat self as fainted
|
||||
@hp = 0
|
||||
@fainted = true
|
||||
# Check for end of Neutralizing Gas/Unnerve
|
||||
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
|
||||
pbItemsOnUnnerveEnding if hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], true)
|
||||
# Check for end of primordial weather
|
||||
@battle.pbEndPrimordialWeather
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user