Created and implemented GameData::Species

This commit is contained in:
Maruno17
2020-12-24 21:25:16 +00:00
parent 1ffeddc41c
commit ad21fc92cb
91 changed files with 6733 additions and 7963 deletions

View File

@@ -237,7 +237,7 @@ def pbDebugDayCare
pkmn = $PokemonGlobal.daycare[i][0]
initlevel = $PokemonGlobal.daycare[i][1]
leveldiff = pkmn.level-initlevel
textpos.push([pkmn.name+" ("+PBSpecies.getName(pkmn.species)+")",8+i*Graphics.width/2,y,0,base,shadow])
textpos.push(["#{pkmn.name} (#{pkmn.speciesName})",8+i*Graphics.width/2,y,0,base,shadow])
y += 32
if pkmn.male?
textpos.push([_INTL("Male ♂"),8+i*Graphics.width/2,y,0,Color.new(128,192,248),shadow])
@@ -347,8 +347,7 @@ def pbDebugDayCare
pbDayCareGenerateEgg
$PokemonGlobal.daycareEgg = 0
$PokemonGlobal.daycareEggSteps = 0
pbMessage(_INTL("Collected the {1} egg.",
PBSpecies.getName($Trainer.lastParty.species)))
pbMessage(_INTL("Collected the {1} egg.", $Trainer.lastParty.speciesName))
refresh = true
end
end
@@ -401,7 +400,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
self.shadowtext(_INTL("[Clear all current roamer locations]"),rect.x,rect.y,nameWidth,rect.height)
else
pkmn = ROAMING_SPECIES[index]
name = PBSpecies.getName(getID(PBSpecies,pkmn[0]))+" (Lv. #{pkmn[1]})"
name = GameData::Species.get(pkmn[0]).name + " (Lv. #{pkmn[1]})"
status = ""
statuscolor = 0
if pkmn[2]<=0 || $game_switches[pkmn[2]]
@@ -528,32 +527,39 @@ end
#===============================================================================
def pbCreatePokemon
party = []
species = [:PIKACHU,:PIDGEOTTO,:KADABRA,:GYARADOS,:DIGLETT,:CHANSEY]
species = [:PIKACHU, :PIDGEOTTO, :KADABRA, :GYARADOS, :DIGLETT, :CHANSEY]
for id in species
party.push(getConst(PBSpecies,id)) if hasConst?(PBSpecies,id)
party.push(id) if GameData::Species.exists?(id)
end
# Species IDs of the Pokémon to be created
for i in 0...party.length
species = party[i]
# Generate Pokémon with species and level 20
$Trainer.party[i] = Pokemon.new(species,20)
$Trainer.seen[species] = true # Set this species to seen and owned
$Trainer.party[i] = Pokemon.new(species, 20)
$Trainer.seen[species] = true
$Trainer.owned[species] = true
pbSeenForm($Trainer.party[i])
case species
when :PIDGEOTTO
$Trainer.party[i].pbLearnMove(:FLY)
when :KADABRA
$Trainer.party[i].pbLearnMove(:FLASH)
$Trainer.party[i].pbLearnMove(:TELEPORT)
when :GYARADOS
$Trainer.party[i].pbLearnMove(:SURF)
$Trainer.party[i].pbLearnMove(:DIVE)
$Trainer.party[i].pbLearnMove(:WATERFALL)
when :DIGLETT
$Trainer.party[i].pbLearnMove(:DIG)
$Trainer.party[i].pbLearnMove(:CUT)
$Trainer.party[i].pbLearnMove(:HEADBUTT)
$Trainer.party[i].pbLearnMove(:ROCKSMASH)
when :CHANSEY
$Trainer.party[i].pbLearnMove(:SOFTBOILED)
$Trainer.party[i].pbLearnMove(:STRENGTH)
$Trainer.party[i].pbLearnMove(:SWEETSCENT)
end
end
$Trainer.party[1].pbLearnMove(:FLY)
$Trainer.party[2].pbLearnMove(:FLASH)
$Trainer.party[2].pbLearnMove(:TELEPORT)
$Trainer.party[3].pbLearnMove(:SURF)
$Trainer.party[3].pbLearnMove(:DIVE)
$Trainer.party[3].pbLearnMove(:WATERFALL)
$Trainer.party[4].pbLearnMove(:DIG)
$Trainer.party[4].pbLearnMove(:CUT)
$Trainer.party[4].pbLearnMove(:HEADBUTT)
$Trainer.party[4].pbLearnMove(:ROCKSMASH)
$Trainer.party[5].pbLearnMove(:SOFTBOILED)
$Trainer.party[5].pbLearnMove(:STRENGTH)
$Trainer.party[5].pbLearnMove(:SWEETSCENT)
for i in 0...party.length
$Trainer.party[i].pbRecordFirstMoves
end