mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Fixed a fainted Pokémon's damage state being reset immediately and stopping certain abilities/effects working properly if they reference it
This commit is contained in:
@@ -65,6 +65,7 @@ class PokeBattle_Battler
|
||||
def pbInitialize(pkmn,idxParty,batonPass=false)
|
||||
pbInitPokemon(pkmn,idxParty)
|
||||
pbInitEffects(batonPass)
|
||||
@damageState.reset
|
||||
end
|
||||
|
||||
def pbInitPokemon(pkmn,idxParty)
|
||||
@@ -138,7 +139,6 @@ class PokeBattle_Battler
|
||||
@effects[PBEffects::Substitute] = 0
|
||||
@effects[PBEffects::Telekinesis] = 0
|
||||
end
|
||||
@damageState.reset
|
||||
@fainted = (@hp==0)
|
||||
@initialHP = 0
|
||||
@lastAttacker = []
|
||||
@@ -302,7 +302,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
end
|
||||
|
||||
# Used only to erase the battler of a Shadow Pokémon that has been snagged.
|
||||
# Used to erase the battler of a Pokémon that has been caught.
|
||||
def pbReset
|
||||
@pokemon = nil
|
||||
@pokemonIndex = -1
|
||||
|
||||
Reference in New Issue
Block a user