mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Update 001_PokeBattle_Pokemon.rb
- Fixed name resetting on Pokémon with new species assigned that wasn't working as intended - Improved naming on a variable
This commit is contained in:
@@ -628,9 +628,9 @@ class PokeBattle_Pokemon
|
|||||||
# Other
|
# Other
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def species=(value)
|
def species=(value)
|
||||||
resetName = nicknamed?
|
hasNickname = nicknamed?
|
||||||
@species = value
|
@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
|
@level = nil # In case growth rate is different for the new species
|
||||||
@forcedForm = nil
|
@forcedForm = nil
|
||||||
self.form = 0 # Also recalculates stats
|
self.form = 0 # Also recalculates stats
|
||||||
@@ -647,7 +647,7 @@ class PokeBattle_Pokemon
|
|||||||
end
|
end
|
||||||
|
|
||||||
def nicknamed?
|
def nicknamed?
|
||||||
return @name==self.speciesName
|
return @name!=self.speciesName
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns this Pokémon's language.
|
# Returns this Pokémon's language.
|
||||||
|
|||||||
Reference in New Issue
Block a user