Fixed Pokémon forms resetting to 0 upon evolving

This commit is contained in:
Maruno17
2020-09-09 10:52:10 +01:00
parent d5926810d2
commit 3e1c482c21
2 changed files with 5 additions and 4 deletions

View File

@@ -300,7 +300,7 @@ class PokeBattle_Pokemon
# Sets this Pokémon's nature to a particular nature. # Sets this Pokémon's nature to a particular nature.
def setNature(value) def setNature(value)
@natureflag = getID(PBNatures,value) @natureflag = getID(PBNatures,value)
self.calcStats calcStats
end end
#============================================================================= #=============================================================================
@@ -633,7 +633,7 @@ class PokeBattle_Pokemon
@name = PBSpecies.getName(@species) unless hasNickname @name = PBSpecies.getName(@species) unless hasNickname
@level = nil # In case growth rate is different for the new species @level = nil # In case growth rate is different for the new species
@forcedForm = nil @forcedForm = nil
self.form = 0 # Also recalculates stats calcStats
end end
def isSpecies?(s) def isSpecies?(s)

View File

@@ -146,7 +146,7 @@ module PokemonDebugMixin
when 1 # Make not infectious when 1 # Make not infectious
if pokerus>0 if pokerus>0
strain = pokerus/16 strain = pokerus/16
p = strain<<4 p = strain << 4
pkmn.pokerus = p pkmn.pokerus = p
pbRefreshSingle(pkmnid) pbRefreshSingle(pkmnid)
end end
@@ -526,6 +526,7 @@ module PokemonDebugMixin
species = pbChooseSpeciesList(pkmn.species) species = pbChooseSpeciesList(pkmn.species)
if species!=0 && species!=pkmn.species if species!=0 && species!=pkmn.species
pkmn.species = species pkmn.species = species
pkmn.calcStats
pbSeenForm(pkmn) if !settingUpBattle pbSeenForm(pkmn) if !settingUpBattle
pbRefreshSingle(pkmnid) pbRefreshSingle(pkmnid)
end end
@@ -697,7 +698,7 @@ module PokemonDebugMixin
val = pbMessageChooseNumber( val = pbMessageChooseNumber(
_INTL("Set the new ID (max. 65535)."),params) { pbUpdate } _INTL("Set the new ID (max. 65535)."),params) { pbUpdate }
pkmn.trainerID = val pkmn.trainerID = val
pkmn.trainerID |= val<<16 pkmn.trainerID |= val << 16
end end
end end
#=========================================================================== #===========================================================================