From 3e1c482c2152ae11148f571ae42adea43b045229 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Wed, 9 Sep 2020 10:52:10 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20Pok=C3=A9mon=20forms=20resetting=20to?= =?UTF-8?q?=200=20upon=20evolving?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb | 4 ++-- Data/Scripts/021_Debug/003_Debug_Pokemon.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb b/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb index a6ff04b5c..491517874 100644 --- a/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb +++ b/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb @@ -300,7 +300,7 @@ class PokeBattle_Pokemon # Sets this Pokémon's nature to a particular nature. def setNature(value) @natureflag = getID(PBNatures,value) - self.calcStats + calcStats end #============================================================================= @@ -633,7 +633,7 @@ class PokeBattle_Pokemon @name = PBSpecies.getName(@species) unless hasNickname @level = nil # In case growth rate is different for the new species @forcedForm = nil - self.form = 0 # Also recalculates stats + calcStats end def isSpecies?(s) diff --git a/Data/Scripts/021_Debug/003_Debug_Pokemon.rb b/Data/Scripts/021_Debug/003_Debug_Pokemon.rb index ebcd4f799..4bb29341b 100644 --- a/Data/Scripts/021_Debug/003_Debug_Pokemon.rb +++ b/Data/Scripts/021_Debug/003_Debug_Pokemon.rb @@ -146,7 +146,7 @@ module PokemonDebugMixin when 1 # Make not infectious if pokerus>0 strain = pokerus/16 - p = strain<<4 + p = strain << 4 pkmn.pokerus = p pbRefreshSingle(pkmnid) end @@ -526,6 +526,7 @@ module PokemonDebugMixin species = pbChooseSpeciesList(pkmn.species) if species!=0 && species!=pkmn.species pkmn.species = species + pkmn.calcStats pbSeenForm(pkmn) if !settingUpBattle pbRefreshSingle(pkmnid) end @@ -697,7 +698,7 @@ module PokemonDebugMixin val = pbMessageChooseNumber( _INTL("Set the new ID (max. 65535)."),params) { pbUpdate } pkmn.trainerID = val - pkmn.trainerID |= val<<16 + pkmn.trainerID |= val << 16 end end #===========================================================================