mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +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)
|
def pbInitialize(pkmn,idxParty,batonPass=false)
|
||||||
pbInitPokemon(pkmn,idxParty)
|
pbInitPokemon(pkmn,idxParty)
|
||||||
pbInitEffects(batonPass)
|
pbInitEffects(batonPass)
|
||||||
|
@damageState.reset
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbInitPokemon(pkmn,idxParty)
|
def pbInitPokemon(pkmn,idxParty)
|
||||||
@@ -138,7 +139,6 @@ class PokeBattle_Battler
|
|||||||
@effects[PBEffects::Substitute] = 0
|
@effects[PBEffects::Substitute] = 0
|
||||||
@effects[PBEffects::Telekinesis] = 0
|
@effects[PBEffects::Telekinesis] = 0
|
||||||
end
|
end
|
||||||
@damageState.reset
|
|
||||||
@fainted = (@hp==0)
|
@fainted = (@hp==0)
|
||||||
@initialHP = 0
|
@initialHP = 0
|
||||||
@lastAttacker = []
|
@lastAttacker = []
|
||||||
@@ -302,7 +302,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
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
|
def pbReset
|
||||||
@pokemon = nil
|
@pokemon = nil
|
||||||
@pokemonIndex = -1
|
@pokemonIndex = -1
|
||||||
|
|||||||
Reference in New Issue
Block a user