Rename PokeBattle_Pokemon to Pokemon

Deprecate PokeBattle_Pokemon and pbNewPkmn
This commit is contained in:
jonisavo
2020-09-20 20:55:51 +03:00
parent 4517a16537
commit c73906170a
25 changed files with 102 additions and 97 deletions

View File

@@ -459,7 +459,7 @@ def pbPlayCry(pokemon,volume=90,pitch=nil)
return if !pokemon
if pokemon.is_a?(Numeric) || pokemon.is_a?(String) || pokemon.is_a?(Symbol)
pbPlayCrySpecies(pokemon,0,volume,pitch)
elsif pokemon.is_a?(PokeBattle_Pokemon)
elsif pokemon.is_a?(Pokemon)
pbPlayCryPokemon(pokemon,volume,pitch)
end
end

View File

@@ -9,7 +9,7 @@ def pbNickname(pokemon)
speciesname = PBSpecies.getName(pokemon.species)
if pbConfirmMessage(_INTL("Would you like to give a nickname to {1}?",speciesname))
helptext = _INTL("{1}'s nickname?",speciesname)
newname = pbEnterPokemonName(helptext,0,PokeBattle_Pokemon::MAX_POKEMON_NAME_SIZE,"",pokemon)
newname = pbEnterPokemonName(helptext, 0, Pokemon::MAX_POKEMON_NAME_SIZE, "", pokemon)
pokemon.name = newname if newname!=""
end
end
@@ -146,7 +146,7 @@ def pbAddForeignPokemon(pokemon,level=nil,ownerName=nil,nickname=nil,ownerGender
pokemon.otgender = ownerGender
end
# Set nickname
pokemon.name = nickname[0,PokeBattle_Pokemon::MAX_POKEMON_NAME_SIZE] if nickname && nickname!=""
pokemon.name = nickname[0, Pokemon::MAX_POKEMON_NAME_SIZE] if nickname && nickname!=""
# Recalculate stats
pokemon.calcStats
if ownerName
@@ -206,7 +206,7 @@ end
def pbSeenForm(pkmn,gender=0,form=0)
$Trainer.formseen = [] if !$Trainer.formseen
$Trainer.formlastseen = [] if !$Trainer.formlastseen
if pkmn.is_a?(PokeBattle_Pokemon)
if pkmn.is_a?(Pokemon)
gender = pkmn.gender
form = (pkmn.form rescue 0)
species = pkmn.species