From 4d0e9cd33163d5b8a71b9665436076a616386957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20V=C3=ADtor=20Reis?= Date: Tue, 8 Sep 2020 15:01:08 -0300 Subject: [PATCH] Update 001_PokeBattle_Pokemon.rb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed name resetting on Pokémon with new species assigned that wasn't working as intended - Improved naming on a variable --- Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb b/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb index c32d1e77e..a6ff04b5c 100644 --- a/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb +++ b/Data/Scripts/016_Pokemon/001_PokeBattle_Pokemon.rb @@ -628,9 +628,9 @@ class PokeBattle_Pokemon # Other #============================================================================= def species=(value) - resetName = nicknamed? + hasNickname = nicknamed? @species = value - @name = PBSpecies.getName(@species) if !resetName + @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 @@ -647,7 +647,7 @@ class PokeBattle_Pokemon end def nicknamed? - return @name==self.speciesName + return @name!=self.speciesName end # Returns this Pokémon's language.