diff --git a/Data/Scripts/013_Overworld/007_PField_Encounters.rb b/Data/Scripts/013_Overworld/007_PField_Encounters.rb index 1533f62c4..cca9346b6 100644 --- a/Data/Scripts/013_Overworld/007_PField_Encounters.rb +++ b/Data/Scripts/013_Overworld/007_PField_Encounters.rb @@ -404,7 +404,7 @@ end #=============================================================================== # Returns a Pokémon generated by a wild encounter, given its species and level. def pbGenerateWildPokemon(species,level,isRoamer=false) - genwildpoke = pbNewPkmn(species,level) + genwildpoke = Pokemon.new(species,level) # Give the wild Pokémon a held item items = genwildpoke.wildHoldItems firstPkmn = $Trainer.firstPokemon diff --git a/Data/Scripts/013_Overworld/013_PField_DayCare.rb b/Data/Scripts/013_Overworld/013_PField_DayCare.rb index cbf0ef25d..25bd5b0e1 100644 --- a/Data/Scripts/013_Overworld/013_PField_DayCare.rb +++ b/Data/Scripts/013_Overworld/013_PField_DayCare.rb @@ -205,7 +205,7 @@ def pbDayCareGenerateEgg getConst(PBSpecies,:ILLUMISE)][rand(2)] end # Generate egg - egg = pbNewPkmn(babyspecies,EGG_LEVEL) + egg = Pokemon.new(babyspecies,EGG_LEVEL) # Randomise personal ID pid = rand(65536) pid |= (rand(65536)<<16) diff --git a/Data/Scripts/014_Trainers/002_PTrainer_NPCTrainers.rb b/Data/Scripts/014_Trainers/002_PTrainer_NPCTrainers.rb index 93a7a4196..e56b7642a 100644 --- a/Data/Scripts/014_Trainers/002_PTrainer_NPCTrainers.rb +++ b/Data/Scripts/014_Trainers/002_PTrainer_NPCTrainers.rb @@ -76,7 +76,7 @@ def pbLoadTrainer(trainerid,trainername,partyid=0) for poke in trainer[3] species = pbGetSpeciesFromFSpecies(poke[TPSPECIES])[0] level = poke[TPLEVEL] - pokemon = pbNewPkmn(species,level,opponent,false) + pokemon = Pokemon.new(species,level,opponent,false) if poke[TPFORM] pokemon.forcedForm = poke[TPFORM] if MultipleForms.hasFunction?(pokemon.species,"getForm") pokemon.formSimple = poke[TPFORM] diff --git a/Data/Scripts/016_Pokemon/001_Pokemon.rb b/Data/Scripts/016_Pokemon/001_Pokemon.rb index 337e341a2..7dd0b1b12 100644 --- a/Data/Scripts/016_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/016_Pokemon/001_Pokemon.rb @@ -115,7 +115,7 @@ class Pokemon # Max EVs that a single stat can have EV_STAT_LIMIT = 252 # Maximum length a Pokémon's nickname can be - MAX_NAME_SIZE = 10 + MAX_NAME_SIZE = 10 #============================================================================= # Ownership, obtained information diff --git a/Data/Scripts/017_UI/022_PScreen_Trading.rb b/Data/Scripts/017_UI/022_PScreen_Trading.rb index 059d269ea..0c9a1aec4 100644 --- a/Data/Scripts/017_UI/022_PScreen_Trading.rb +++ b/Data/Scripts/017_UI/022_PScreen_Trading.rb @@ -206,7 +206,7 @@ def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0) raise _INTL("Species does not exist ({1}).",newpoke) if !hasConst?(PBSpecies,newpoke) newpoke = getID(PBSpecies,newpoke) end - yourPokemon = pbNewPkmn(newpoke,myPokemon.level,opponent) + yourPokemon = Pokemon.new(newpoke,myPokemon.level,opponent) end yourPokemon.name = nickname yourPokemon.obtainMode = 2 # traded diff --git a/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb b/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb index a06830d2f..34778bd6c 100644 --- a/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb +++ b/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb @@ -212,14 +212,14 @@ class PurifyChamber # German: der Kryptorbis def debugAddShadow(set,species) species=getID(PBSpecies,species) - pkmn=pbNewPkmn(species,1) + pkmn=Pokemon.new(species,1) pkmn.makeShadow setShadow(set,pkmn) end def debugAddNormal(set,species) species=getID(PBSpecies,species) - pkmn=pbNewPkmn(species,1) + pkmn=Pokemon.new(species,1) insertAfter(set,setCount(set),pkmn) end diff --git a/Data/Scripts/019_Other battles/002_PBattle_BugContest.rb b/Data/Scripts/019_Other battles/002_PBattle_BugContest.rb index a91efd05e..daf7b3601 100644 --- a/Data/Scripts/019_Other battles/002_PBattle_BugContest.rb +++ b/Data/Scripts/019_Other battles/002_PBattle_BugContest.rb @@ -114,7 +114,7 @@ class BugContestState if !enc raise _INTL("No encounters for map {1}, so can't judge contest",@contestMap) end - pokemon=pbNewPkmn(enc[0],enc[1]) + pokemon=Pokemon.new(enc[0],enc[1]) pokemon.hp=1+rand(pokemon.totalhp-1) score=pbBugContestScore(pokemon) judgearray.push([cont,pokemon.species,score]) diff --git a/Data/Scripts/019_Other battles/003_PBattle_OrgBattle.rb b/Data/Scripts/019_Other battles/003_PBattle_OrgBattle.rb index e767e51e5..d532e1c0c 100644 --- a/Data/Scripts/019_Other battles/003_PBattle_OrgBattle.rb +++ b/Data/Scripts/019_Other battles/003_PBattle_OrgBattle.rb @@ -159,7 +159,7 @@ class PBPokemon end def createPokemon(level,iv,trainer) - pokemon=pbNewPkmn(@species,level,trainer,false) + pokemon=Pokemon.new(@species,level,trainer,false) pokemon.setItem(@item) pokemon.personalID=rand(65536) pokemon.personalID|=rand(65536)<<8 diff --git a/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb b/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb index cfd170a71..d78110ce5 100644 --- a/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb +++ b/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb @@ -74,7 +74,7 @@ def pbAddPokemon(pokemon,level=nil,seeform=true) end pokemon = getID(PBSpecies,pokemon) if pokemon.is_a?(Integer) && level.is_a?(Integer) - pokemon = pbNewPkmn(pokemon,level) + pokemon = Pokemon.new(pokemon,level) end speciesname = PBSpecies.getName(pokemon.species) pbMessage(_INTL("\\me[Pkmn get]{1} obtained {2}!\1",$Trainer.name,speciesname)) @@ -87,7 +87,7 @@ def pbAddPokemonSilent(pokemon,level=nil,seeform=true) return false if !pokemon || pbBoxesFull? pokemon = getID(PBSpecies,pokemon) if pokemon.is_a?(Integer) && level.is_a?(Integer) - pokemon = pbNewPkmn(pokemon,level) + pokemon = Pokemon.new(pokemon,level) end $Trainer.seen[pokemon.species] = true $Trainer.owned[pokemon.species] = true @@ -110,7 +110,7 @@ def pbAddToParty(pokemon,level=nil,seeform=true) return false if !pokemon || $Trainer.party.length>=6 pokemon = getID(PBSpecies,pokemon) if pokemon.is_a?(Integer) && level.is_a?(Integer) - pokemon = pbNewPkmn(pokemon,level) + pokemon = Pokemon.new(pokemon,level) end speciesname = PBSpecies.getName(pokemon.species) pbMessage(_INTL("\\me[Pkmn get]{1} obtained {2}!\1",$Trainer.name,speciesname)) @@ -123,7 +123,7 @@ def pbAddToPartySilent(pokemon,level=nil,seeform=true) return false if !pokemon || $Trainer.party.length>=6 pokemon = getID(PBSpecies,pokemon) if pokemon.is_a?(Integer) && level.is_a?(Integer) - pokemon = pbNewPkmn(pokemon,level) + pokemon = Pokemon.new(pokemon,level) end $Trainer.seen[pokemon.species] = true $Trainer.owned[pokemon.species] = true @@ -137,7 +137,7 @@ def pbAddForeignPokemon(pokemon,level=nil,ownerName=nil,nickname=nil,ownerGender return false if !pokemon || $Trainer.party.length>=6 pokemon = getID(PBSpecies,pokemon) if pokemon.is_a?(Integer) && level.is_a?(Integer) - pokemon = pbNewPkmn(pokemon,level) + pokemon = Pokemon.new(pokemon,level) end # Set original trainer to a foreign one (if ID isn't already foreign) if pokemon.trainerID==$Trainer.id @@ -165,7 +165,7 @@ def pbGenerateEgg(pokemon,text="") return false if !pokemon || $Trainer.party.length>=6 pokemon = getID(PBSpecies,pokemon) if pokemon.is_a?(Integer) - pokemon = pbNewPkmn(pokemon,EGG_LEVEL) + pokemon = Pokemon.new(pokemon,EGG_LEVEL) end # Get egg steps eggSteps = pbGetSpeciesData(pokemon.species,pokemon.form,SpeciesStepsToHatch) diff --git a/Data/Scripts/021_Debug/001_Debug_Menu.rb b/Data/Scripts/021_Debug/001_Debug_Menu.rb index ba7f3b3a4..d75f1d37d 100644 --- a/Data/Scripts/021_Debug/001_Debug_Menu.rb +++ b/Data/Scripts/021_Debug/001_Debug_Menu.rb @@ -348,7 +348,7 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil) params.setCancelValue(0) level = pbMessageChooseNumber(_INTL("Set the wild {1}'s level.",PBSpecies.getName(species)),params) if level>0 - pkmn.push(pbNewPkmn(species,level)) + pkmn.push(Pokemon.new(species,level)) end end else # Edit a Pokémon @@ -563,7 +563,7 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil) end cname = getConstantName(PBSpecies,i) rescue nil next if !cname - pkmn = pbNewPkmn(i,50) + pkmn = Pokemon.new(i,50) $PokemonStorage[(i-1)/$PokemonStorage.maxPokemon(0), (i-1)%$PokemonStorage.maxPokemon(0)] = pkmn # Record all forms of this Pokémon as seen and owned diff --git a/Data/Scripts/021_Debug/002_Debug_Actions.rb b/Data/Scripts/021_Debug/002_Debug_Actions.rb index d42b9bb53..158b30245 100644 --- a/Data/Scripts/021_Debug/002_Debug_Actions.rb +++ b/Data/Scripts/021_Debug/002_Debug_Actions.rb @@ -527,7 +527,7 @@ def pbCreatePokemon for i in 0...party.length species = party[i] # Generate Pokémon with species and level 20 - $Trainer.party[i] = pbNewPkmn(species,20) + $Trainer.party[i] = Pokemon.new(species,20) $Trainer.seen[species] = true # Set this species to seen and owned $Trainer.owned[species] = true pbSeenForm($Trainer.party[i])