From 3f99fd39e3245a83c68f799c0df49f1d04d77c65 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 19 Sep 2020 01:00:52 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20a=20fainted=20Pok=C3=A9mon's=20damage?= =?UTF-8?q?=20state=20being=20reset=20immediately=20and=20stopping=20certa?= =?UTF-8?q?in=20abilities/effects=20working=20properly=20if=20they=20refer?= =?UTF-8?q?ence=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb b/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb index 663fde76e..c99913020 100644 --- a/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb +++ b/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb @@ -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