Update 001_Pokemon.rb

Resolving outstanding issues after merge from master
This commit is contained in:
Maruno17
2020-12-04 21:01:55 +00:00
parent 0cbaba70d7
commit c9c6c2bb96

View File

@@ -829,8 +829,9 @@ class Pokemon
# @param species_id [Integer] id of the species to change this Pokémon to # @param species_id [Integer] id of the species to change this Pokémon to
def species=(species_id) def species=(species_id)
has_nickname = nicknamed? has_nickname = nicknamed?
@species = species_id @species, new_form = pbGetSpeciesFromFSpecies(species_id)
@name = PBSpecies.getName(@species) unless has_nickname @form = new_form if @species != value
@name = speciesName unless has_nickname
@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
calcStats calcStats
@@ -1046,7 +1047,7 @@ class Pokemon
raise ArgumentError.new(_INTL("The species given ({1}) is invalid.", ospecies)) raise ArgumentError.new(_INTL("The species given ({1}) is invalid.", ospecies))
end end
@species = realSpecies @species = realSpecies
@name = PBSpecies.getName(@species) @name = speciesName
@personalID = rand(2**16) | rand(2**16) << 16 @personalID = rand(2**16) | rand(2**16) << 16
@hp = 1 @hp = 1
@totalhp = 1 @totalhp = 1