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
-6
View File
@@ -12,12 +12,6 @@ def pbGetExceptionMessage(e,_script="")
filename = emessage.sub("No such file or directory - ", "") filename = emessage.sub("No such file or directory - ", "")
emessage = "File #{filename} not found." emessage = "File #{filename} not found."
end end
if emessage && !safeExists?("Game.rgssad") && !safeExists?("Game.rgss2a")
emessage = emessage.gsub(/uninitialized constant PBSpecies\:\:(\S+)$/) {
"The Pokemon species '#{$1}' is not valid. Please\r\nadd the species to the PBS/pokemon.txt file.\r\nSee the wiki for more information." }
emessage = emessage.gsub(/undefined method `(\S+?)' for PBSpecies\:Module/) {
"The Pokemon species '#{$1}' is not valid. Please\r\nadd the species to the PBS/pokemon.txt file.\r\nSee the wiki for more information." }
end
emessage.gsub!(/Section(\d+)/) { $RGSS_SCRIPTS[$1.to_i][1] } emessage.gsub!(/Section(\d+)/) { $RGSS_SCRIPTS[$1.to_i][1] }
return emessage return emessage
end end
@@ -199,10 +199,7 @@ end
class SpeciesHandlerHash < HandlerHash class SpeciesHandlerHash < HandlerHash2
def initialize
super(:PBSpecies)
end
end end
@@ -40,6 +40,14 @@ def safeGlob(dir,wildcard)
return (block_given?) ? nil : ret return (block_given?) ? nil : ret
end end
def pbResolveAudioSE(file)
return nil if !file
if RTP.exists?("Audio/SE/"+file,["",".wav",".mp3",".ogg"])
return RTP.getPath("Audio/SE/"+file,["",".wav",".mp3",".ogg"])
end
return nil
end
# Finds the real path for an image file. This includes paths in encrypted # Finds the real path for an image file. This includes paths in encrypted
# archives. Returns nil if the path can't be found. # archives. Returns nil if the path can't be found.
def pbResolveBitmap(x) def pbResolveBitmap(x)
@@ -28,9 +28,7 @@ end
class AnimatedBitmap class AnimatedBitmap
def initialize(file,hue=0) def initialize(file,hue=0)
if file==nil if file==nil
raise "Filename is nil (missing graphic)\r\n\r\n"+ raise "Filename is nil (missing graphic)."
"If you see this error in the Continue/New Game screen, you may be loading another game's save file. "+
"Check your project's title (\"Game > Change Title...\" in RMXP).\r\n"
end end
if file.split(/[\\\/]/)[-1][/^\[\d+(?:,\d+)?]/] # Starts with 1 or more digits in square brackets if file.split(/[\\\/]/)[-1][/^\[\d+(?:,\d+)?]/] # Starts with 1 or more digits in square brackets
@bitmap = PngAnimatedBitmap.new(file,hue) @bitmap = PngAnimatedBitmap.new(file,hue)
+6 -4
View File
@@ -67,8 +67,9 @@ class IntroEventScene < EventScene
onUpdate.clear onUpdate.clear
onCTrigger.clear onCTrigger.clear
# Play random cry # Play random cry
cry = pbCryFile(1+rand(PBSpecies.maxValue)) species_keys = GameData::Species::DATA.keys
pbSEPlay(cry,80,100) if cry species_data = GameData::Species.get(species_keys[rand(species_keys.length)])
GameData::Species.play_cry_from_species(species_data.species, species_data.form)
@pic.moveXY(0,20,0,0) @pic.moveXY(0,20,0,0)
pictureWait pictureWait
# Fade out # Fade out
@@ -87,8 +88,9 @@ class IntroEventScene < EventScene
onUpdate.clear onUpdate.clear
onCTrigger.clear onCTrigger.clear
# Play random cry # Play random cry
cry = pbCryFile(1+rand(PBSpecies.maxValue)) species_keys = GameData::Species::DATA.keys
pbSEPlay(cry,80,100) if cry species_data = GameData::Species.get(species_keys[rand(species_keys.length)])
GameData::Species.play_cry_from_species(species_data.species, species_data.form)
@pic.moveXY(0,20,0,0) @pic.moveXY(0,20,0,0)
pictureWait pictureWait
# Fade out # Fade out
-115
View File
@@ -2,18 +2,11 @@
# Data caches. # Data caches.
#=============================================================================== #===============================================================================
class PokemonTemp class PokemonTemp
attr_accessor :metadata
attr_accessor :townMapData attr_accessor :townMapData
attr_accessor :encountersData attr_accessor :encountersData
attr_accessor :phoneData attr_accessor :phoneData
attr_accessor :regionalDexes attr_accessor :regionalDexes
attr_accessor :speciesData
attr_accessor :speciesEggMoves
attr_accessor :speciesMetrics
attr_accessor :speciesMovesets
attr_accessor :speciesTMData
attr_accessor :speciesShadowMovesets attr_accessor :speciesShadowMovesets
attr_accessor :pokemonFormToSpecies
attr_accessor :trainersData attr_accessor :trainersData
attr_accessor :moveToAnim attr_accessor :moveToAnim
attr_accessor :battleAnims attr_accessor :battleAnims
@@ -21,18 +14,11 @@ end
def pbClearData def pbClearData
if $PokemonTemp if $PokemonTemp
$PokemonTemp.metadata = nil
$PokemonTemp.townMapData = nil $PokemonTemp.townMapData = nil
$PokemonTemp.encountersData = nil $PokemonTemp.encountersData = nil
$PokemonTemp.phoneData = nil $PokemonTemp.phoneData = nil
$PokemonTemp.regionalDexes = nil $PokemonTemp.regionalDexes = nil
$PokemonTemp.speciesData = nil
$PokemonTemp.speciesEggMoves = nil
$PokemonTemp.speciesMetrics = nil
$PokemonTemp.speciesMovesets = nil
$PokemonTemp.speciesTMData = nil
$PokemonTemp.speciesShadowMovesets = nil $PokemonTemp.speciesShadowMovesets = nil
$PokemonTemp.pokemonFormToSpecies = nil
$PokemonTemp.trainersData = nil $PokemonTemp.trainersData = nil
$PokemonTemp.moveToAnim = nil $PokemonTemp.moveToAnim = nil
$PokemonTemp.battleAnims = nil $PokemonTemp.battleAnims = nil
@@ -95,96 +81,6 @@ def pbLoadRegionalDexes
return $PokemonTemp.regionalDexes return $PokemonTemp.regionalDexes
end end
#===============================================================================
# Methods to get Pokémon species data.
#===============================================================================
def pbLoadSpeciesData
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.speciesData
$PokemonTemp.speciesData = load_data("Data/species.dat") || []
end
return $PokemonTemp.speciesData
end
def pbGetSpeciesData(species, form = 0, species_data_type = -1)
species = getID(PBSpecies, species)
s = pbGetFSpeciesFromForm(species, form)
species_data = pbLoadSpeciesData
if species_data_type < 0
return species_data[s] || []
end
return species_data[s][species_data_type] if species_data[s] && species_data[s][species_data_type]
case species_data_type
when SpeciesData::TYPE2
return nil
when SpeciesData::BASE_STATS
return [1, 1, 1, 1, 1, 1]
when SpeciesData::EFFORT_POINTS
return [0, 0, 0, 0, 0, 0]
when SpeciesData::STEPS_TO_HATCH, SpeciesData::HEIGHT, SpeciesData::WEIGHT
return 1
end
return 0
end
#===============================================================================
# Methods to get egg moves data.
#===============================================================================
def pbLoadEggMovesData
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.speciesEggMoves
$PokemonTemp.speciesEggMoves = load_data("Data/species_eggmoves.dat") || []
end
return $PokemonTemp.speciesEggMoves
end
def pbGetSpeciesEggMoves(species, form = 0)
species = getID(PBSpecies, species)
s = pbGetFSpeciesFromForm(species, form)
egg_moves_data = pbLoadEggMovesData
return egg_moves_data[s] || []
end
#===============================================================================
# Method to get Pokémon species metrics (sprite positioning) data.
#===============================================================================
def pbLoadSpeciesMetrics
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.speciesMetrics
$PokemonTemp.speciesMetrics = load_data("Data/species_metrics.dat") || []
end
return $PokemonTemp.speciesMetrics
end
#===============================================================================
# Methods to get Pokémon moveset data.
#===============================================================================
def pbLoadMovesetsData
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.speciesMovesets
$PokemonTemp.speciesMovesets = load_data("Data/species_movesets.dat") || []
end
return $PokemonTemp.speciesMovesets
end
def pbGetSpeciesMoveset(species, form = 0)
species = getID(PBSpecies, species)
s = pbGetFSpeciesFromForm(species, form)
movesets_data = pbLoadMovesetsData
return movesets_data[s] || []
end
#===============================================================================
# Method to get TM/Move Tutor compatibility data.
#===============================================================================
def pbLoadSpeciesTMData
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.speciesTMData
$PokemonTemp.speciesTMData = load_data("Data/tm.dat") || {}
end
return $PokemonTemp.speciesTMData
end
#=============================================================================== #===============================================================================
# Method to get Shadow Pokémon moveset data. # Method to get Shadow Pokémon moveset data.
#=============================================================================== #===============================================================================
@@ -196,17 +92,6 @@ def pbLoadShadowMovesets
return $PokemonTemp.speciesShadowMovesets return $PokemonTemp.speciesShadowMovesets
end end
#===============================================================================
# Method to get array that converts species + form to and from fSpecies values.
#===============================================================================
def pbLoadFormToSpecies
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.pokemonFormToSpecies
$PokemonTemp.pokemonFormToSpecies = load_data("Data/form2species.dat")
end
return $PokemonTemp.pokemonFormToSpecies
end
#=============================================================================== #===============================================================================
# Methods to get data about individual trainers. # Methods to get data about individual trainers.
#=============================================================================== #===============================================================================
@@ -125,5 +125,7 @@ module GameData
MapMetadata.load MapMetadata.load
Move.load Move.load
TrainerType.load TrainerType.load
Type.load
Species.load
end end
end end
@@ -115,8 +115,8 @@ module GameData
def can_hold?; return !is_important?; end def can_hold?; return !is_important?; end
def unlosable?(species, ability) def unlosable?(species, ability)
return false if isConst?(species, PBSpecies, :ARCEUS) && ability != :MULTITYPE return false if species == :ARCEUS && ability != :MULTITYPE
return false if isConst?(species, PBSpecies, :SILVALLY) && ability != :RKSSYSTEM return false if species == :SILVALLY && ability != :RKSSYSTEM
combos = { combos = {
:ARCEUS => [:FISTPLATE, :FIGHTINIUMZ, :ARCEUS => [:FISTPLATE, :FIGHTINIUMZ,
:SKYPLATE, :FLYINIUMZ, :SKYPLATE, :FLYINIUMZ,
@@ -157,11 +157,7 @@ module GameData
:KYOGRE => [:BLUEORB], :KYOGRE => [:BLUEORB],
:GROUDON => [:REDORB] :GROUDON => [:REDORB]
} }
combos.each do |comboSpecies, items| return combos[species] && combos[species].include?(@id)
next if !isConst?(species, PBSpecies, comboSpecies)
return items.include?(@id)
end
return false
end end
end end
end end
@@ -0,0 +1,339 @@
module GameData
class Species
attr_reader :id
attr_reader :id_number
attr_reader :species
attr_reader :form
attr_reader :real_name
attr_reader :real_form_name
attr_reader :real_category
attr_reader :real_pokedex_entry
attr_reader :pokedex_form
attr_reader :type1
attr_reader :type2
attr_reader :base_stats
attr_reader :evs
attr_reader :base_exp
attr_reader :growth_rate
attr_reader :gender_rate
attr_reader :catch_rate
attr_reader :happiness
attr_reader :moves
attr_reader :tutor_moves
attr_reader :egg_moves
attr_reader :abilities
attr_reader :hidden_abilities
attr_reader :wild_item_common
attr_reader :wild_item_uncommon
attr_reader :wild_item_rare
attr_reader :egg_groups
attr_reader :hatch_steps
attr_reader :incense
attr_reader :evolutions
attr_reader :height
attr_reader :weight
attr_reader :color
attr_reader :shape
attr_reader :habitat
attr_reader :generation
attr_reader :mega_stone
attr_reader :mega_move
attr_reader :unmega_form
attr_reader :mega_message
attr_accessor :back_sprite_x
attr_accessor :back_sprite_y
attr_accessor :front_sprite_x
attr_accessor :front_sprite_y
attr_accessor :front_sprite_altitude
attr_accessor :shadow_x
attr_accessor :shadow_size
DATA = {}
DATA_FILENAME = "species.dat"
extend ClassMethods
include InstanceMethods
# @param species [Symbol, self, String, Integer]
# @param form [Integer]
# @return [self, nil]
def self.get_species_form(species, form)
return nil if !species || !form
validate species => [Symbol, self, String, Integer]
validate form => Integer
# if other.is_a?(Integer)
# p "Please switch to symbols, thanks."
# end
species = species.species if species.is_a?(self)
species = DATA[species].species if species.is_a?(Integer)
species = species.to_sym if species.is_a?(String)
trial = sprintf("%s_%d", species, form).to_sym
species_form = (DATA[trial].nil?) ? species : trial
return (DATA.has_key?(species_form)) ? DATA[species_form] : nil
end
# TODO: Needs tidying up.
def self.schema(compiling_forms = false)
ret = {
"FormName" => [0, "q"],
"Kind" => [0, "s"],
"Pokedex" => [0, "q"],
"Type1" => [0, "e", :Type],
"Type2" => [0, "e", :Type],
"BaseStats" => [0, "vvvvvv"],
"EffortPoints" => [0, "uuuuuu"],
"BaseEXP" => [0, "v"],
"Rareness" => [0, "u"],
"Happiness" => [0, "u"],
"Moves" => [0, "*ue", nil, :Move],
"TutorMoves" => [0, "*e", :Move],
"EggMoves" => [0, "*e", :Move],
"Abilities" => [0, "*e", :Ability],
"HiddenAbility" => [0, "*e", :Ability],
"WildItemCommon" => [0, "e", :Item],
"WildItemUncommon" => [0, "e", :Item],
"WildItemRare" => [0, "e", :Item],
"Compatibility" => [0, "*e", :PBEggGroups],
"StepsToHatch" => [0, "v"],
"Height" => [0, "f"],
"Weight" => [0, "f"],
"Color" => [0, "e", :PBColors],
"Shape" => [0, "u"],
"Habitat" => [0, "e", :PBHabitats],
"Generation" => [0, "i"],
"BattlerPlayerX" => [0, "i"],
"BattlerPlayerY" => [0, "i"],
"BattlerEnemyX" => [0, "i"],
"BattlerEnemyY" => [0, "i"],
"BattlerAltitude" => [0, "i"],
"BattlerShadowX" => [0, "i"],
"BattlerShadowSize" => [0, "u"]
}
if compiling_forms
ret["PokedexForm"] = [0, "u"]
ret["Evolutions"] = [0, "*ees", :Species, :PBEvolution, nil]
ret["MegaStone"] = [0, "e", :Item]
ret["MegaMove"] = [0, "e", :Move]
ret["UnmegaForm"] = [0, "u"]
ret["MegaMessage"] = [0, "u"]
else
ret["InternalName"] = [0, "n"]
ret["Name"] = [0, "s"]
ret["GrowthRate"] = [0, "e", :PBGrowthRates]
ret["GenderRate"] = [0, "e", :PBGenderRates]
ret["Incense"] = [0, "e", :Item]
ret["Evolutions"] = [0, "*ses", nil, :PBEvolution, nil]
end
return ret
end
def initialize(hash)
@id = hash[:id]
@id_number = hash[:id_number] || -1
@species = hash[:species] || @id
@form = hash[:form] || 0
@real_name = hash[:name] || "Unnamed"
@real_form_name = hash[:form_name]
@real_category = hash[:category] || "???"
@real_pokedex_entry = hash[:pokedex_entry] || "???"
@pokedex_form = hash[:pokedex_form] || @form
@type1 = hash[:type1] || :NORMAL
@type2 = hash[:type2] || @type1
@base_stats = hash[:base_stats] || [1, 1, 1, 1, 1, 1]
@evs = hash[:evs] || [0, 0, 0, 0, 0, 0]
@base_exp = hash[:base_exp] || 100
@growth_rate = hash[:growth_rate] || PBGrowthRates::Medium
@gender_rate = hash[:gender_rate] || PBGenderRates::Female50Percent
@catch_rate = hash[:catch_rate] || 255
@happiness = hash[:happiness] || 70
@moves = hash[:moves] || []
@tutor_moves = hash[:tutor_moves] || []
@egg_moves = hash[:egg_moves] || []
@abilities = hash[:abilities] || []
@hidden_abilities = hash[:hidden_abilities] || []
@wild_item_common = hash[:wild_item_common]
@wild_item_uncommon = hash[:wild_item_uncommon]
@wild_item_rare = hash[:wild_item_rare]
@egg_groups = hash[:egg_groups] || [PBEggGroups::Undiscovered]
@hatch_steps = hash[:hatch_steps] || 1
@incense = hash[:incense]
@evolutions = hash[:evolutions] || []
@height = hash[:height] || 1
@weight = hash[:weight] || 1
@color = hash[:color] || PBColors::Red
@shape = hash[:shape] || 1
@habitat = hash[:habitat] || PBHabitats::None
@generation = hash[:generation] || 0
@mega_stone = hash[:mega_stone]
@mega_move = hash[:mega_move]
@unmega_form = hash[:unmega_form] || 0
@mega_message = hash[:mega_message] || 0
@back_sprite_x = hash[:back_sprite_x] || 0
@back_sprite_y = hash[:back_sprite_y] || 0
@front_sprite_x = hash[:front_sprite_x] || 0
@front_sprite_y = hash[:front_sprite_y] || 0
@front_sprite_altitude = hash[:front_sprite_altitude] || 0
@shadow_x = hash[:shadow_x] || 0
@shadow_size = hash[:shadow_size] || 2
end
# @return [String] the translated name of this species
def name
return pbGetMessage(MessageTypes::Species, @id_number)
end
# @return [String] the translated name of this form of this species
def form_name
return pbGetMessage(MessageTypes::FormNames, @id_number)
end
# @return [String] the translated Pokédex category of this species
def category
return pbGetMessage(MessageTypes::Kinds, @id_number)
end
# @return [String] the translated Pokédex entry of this species
def pokedex_entry
return pbGetMessage(MessageTypes::Entries, @id_number)
end
end
def apply_metrics_to_sprite(sprite, index, shadow = false)
if shadow
if (index & 1) == 1 # Foe Pokémon
sprite.x += @shadow_x * 2
end
else
if (index & 1) == 0 # Player's Pokémon
sprite.x += @back_sprite_x * 2
sprite.y += @back_sprite_y * 2
else # Foe Pokémon
sprite.x += @front_sprite_x * 2
sprite.y += @front_sprite_y * 2
sprite.y -= @front_sprite_altitude * 2
end
end
end
def shows_shadow?
return true
# return @front_sprite_altitude > 0
end
end
#===============================================================================
# Deprecated methods
#===============================================================================
module SpeciesData
TYPE1 = 0
TYPE2 = 1
BASE_STATS = 2
GENDER_RATE = 3
GROWTH_RATE = 4
BASE_EXP = 5
EFFORT_POINTS = 6
RARENESS = 7
HAPPINESS = 8
ABILITIES = 9
HIDDEN_ABILITY = 10
COMPATIBILITY = 11
STEPS_TO_HATCH = 12
HEIGHT = 13
WEIGHT = 14
COLOR = 15
SHAPE = 16
HABITAT = 17
WILD_ITEM_COMMON = 18
WILD_ITEM_UNCOMMON = 19
WILD_ITEM_RARE = 20
INCENSE = 21
POKEDEX_FORM = 22 # For alternate forms
MEGA_STONE = 23 # For alternate forms
MEGA_MOVE = 24 # For alternate forms
UNMEGA_FORM = 25 # For alternate forms
MEGA_MESSAGE = 26 # For alternate forms
METRIC_PLAYER_X = 27
METRIC_PLAYER_Y = 28
METRIC_ENEMY_X = 29
METRIC_ENEMY_Y = 30
METRIC_ALTITUDE = 31
METRIC_SHADOW_X = 32
METRIC_SHADOW_SIZE = 33
end
#===============================================================================
# Methods to get Pokémon species data.
#===============================================================================
def pbGetSpeciesData(species, form = 0, species_data_type = -1)
Deprecation.warn_method('pbGetSpeciesData', 'v20', 'GameData::Species.get_species_form(species, form).something')
ret = GameData::Species.get_species_form(species, form)
return ret if species_data_type == -1
case species_data_type
when SpeciesData::TYPE1 then return ret.type1
when SpeciesData::TYPE2 then return ret.type2
when SpeciesData::BASE_STATS then return ret.base_stats
when SpeciesData::GENDER_RATE then return ret.gender_rate
when SpeciesData::GROWTH_RATE then return ret.growth_rate
when SpeciesData::BASE_EXP then return ret.base_exp
when SpeciesData::EFFORT_POINTS then return ret.evs
when SpeciesData::RARENESS then return ret.catch_rate
when SpeciesData::HAPPINESS then return ret.happiness
when SpeciesData::ABILITIES then return ret.abilities
when SpeciesData::HIDDEN_ABILITY then return ret.hidden_abilities
when SpeciesData::COMPATIBILITY then return ret.egg_groups
when SpeciesData::STEPS_TO_HATCH then return ret.hatch_steps
when SpeciesData::HEIGHT then return ret.height
when SpeciesData::WEIGHT then return ret.weight
when SpeciesData::COLOR then return ret.color
when SpeciesData::SHAPE then return ret.shape
when SpeciesData::HABITAT then return ret.habitat
when SpeciesData::WILD_ITEM_COMMON then return ret.wild_item_common
when SpeciesData::WILD_ITEM_UNCOMMON then return ret.wild_item_uncommon
when SpeciesData::WILD_ITEM_RARE then return ret.wild_item_rare
when SpeciesData::INCENSE then return ret.incense
when SpeciesData::POKEDEX_FORM then return ret.pokedex_form
when SpeciesData::MEGA_STONE then return ret.mega_stone
when SpeciesData::MEGA_MOVE then return ret.mega_move
when SpeciesData::UNMEGA_FORM then return ret.unmega_form
when SpeciesData::MEGA_MESSAGE then return ret.mega_message
when SpeciesData::METRIC_PLAYER_X then return ret.back_sprite_x
when SpeciesData::METRIC_PLAYER_Y then return ret.back_sprite_y
when SpeciesData::METRIC_ENEMY_X then return ret.front_sprite_x
when SpeciesData::METRIC_ENEMY_Y then return ret.front_sprite_y
when SpeciesData::METRIC_ALTITUDE then return ret.front_sprite_altitude
when SpeciesData::METRIC_SHADOW_X then return ret.shadow_x
when SpeciesData::METRIC_SHADOW_SIZE then return ret.shadow_size
end
return 0
end
#===============================================================================
# Methods to get Pokémon moves data.
#===============================================================================
def pbGetSpeciesEggMoves(species, form = 0)
Deprecation.warn_method('pbGetSpeciesEggMoves', 'v20', 'GameData::Species.get_species_form(species, form).egg_moves')
return GameData::Species.get_species_form(species, form).egg_moves
end
def pbGetSpeciesMoveset(species, form = 0)
Deprecation.warn_method('pbGetSpeciesMoveset', 'v20', 'GameData::Species.get_species_form(species, form).moves')
return GameData::Species.get_species_form(species, form).moves
end
def pbGetEvolutionData(species)
Deprecation.warn_method('pbGetEvolutionData', 'v20', 'GameData::Species.get(species).evolutions')
return GameData::Species.get(species).evolutions
end
#===============================================================================
# Method to get Pokémon species metrics (sprite positioning) data.
#===============================================================================
def pbApplyBattlerMetricsToSprite(sprite, index, species_data, shadow = false, metrics = nil)
Deprecation.warn_method('pbApplyBattlerMetricsToSprite', 'v20', 'GameData::Species.get(species).apply_metrics_to_sprite')
GameData::Species.get(species).apply_metrics_to_sprite(sprite, index, shadow)
end
def showShadow?(species)
Deprecation.warn_method('showShadow?', 'v20', 'GameData::Species.get(species).shows_shadow?')
return GameData::Species.get(species).shows_shadow?
end
@@ -0,0 +1,341 @@
module GameData
class Species
def self.check_graphic_file(path, species, form = 0, gender = 0, shiny = false, shadow = false, back = false)
species_data = self.get_species_form(species, form)
species_id = sprintf("%03d", (species_data) ? self.get(species_data.species).id_number : 0)
try_species = species
try_form = (form > 0) ? sprintf("_%d", form) : ""
try_gender = (gender == 1) ? "f" : ""
try_shiny = (shiny) ? "s" : ""
try_shadow = (shadow) ? "_shadow" : ""
try_back = (back) ? "b" : ""
factors = []
factors.push([4, try_shadow, ""]) if shadow
factors.push([2, try_gender, ""]) if gender == 1
factors.push([3, try_shiny, ""]) if shiny
factors.push([1, try_form, ""]) if form > 0
factors.push([0, try_species, "000"])
# Go through each combination of parameters in turn to find an existing sprite
for i in 0...2 ** factors.length
# Set try_ parameters for this combination
factors.each_with_index do |factor, index|
value = ((i / (2 ** index)) % 2 == 0) ? factor[1] : factor[2]
case factor[0]
when 0 then try_species = value
when 1 then try_form = value
when 2 then try_gender = value
when 3 then try_shiny = value
when 4 then try_shadow = value
end
end
# Look for a graphic matching this combination's parameters
for j in 0...2 # Try using the species' ID symbol and then its ID number
next if !try_species || (try_species == "000" && j == 1)
try_species_text = (j == 0) ? try_species : species_id
ret = pbResolveBitmap(sprintf("%s%s%s%s%s%s%s", path,
try_species_text, try_gender, try_shiny, try_back, try_form, try_shadow))
return ret if ret
end
end
return nil
end
def self.check_egg_graphic_file(path, species, form)
species_data = self.get_species_form(species, form)
return nil if species_data.nil?
species_id = self.get(species_data.species).id_number
if form > 0
ret = pbResolveBitmap(sprintf("%s%segg_%d", path, species_data.species, form))
return ret if ret
ret = pbResolveBitmap(sprintf("%s%03degg_%d", path, species_id, form))
return ret if ret
end
ret = pbResolveBitmap(sprintf("%s%segg", path, species_data.species))
return ret if ret
return pbResolveBitmap(sprintf("%s%03degg", path, species_id))
end
def self.front_sprite_filename(species, form = 0, gender = 0, shiny = false, shadow = false)
return self.check_graphic_file("Graphics/Battlers/", species, form, gender, shiny, shadow)
end
def self.back_sprite_filename(species, form = 0, gender = 0, shiny = false, shadow = false)
return self.check_graphic_file("Graphics/Battlers/", species, form, gender, shiny, shadow, true)
end
def self.egg_sprite_filename(species, form)
ret = self.check_egg_graphic_file("Graphics/Battlers/", species, form)
return (ret) ? ret : pbResolveBitmap("Graphics/Battlers/egg")
end
def self.sprite_filename(species, form = 0, gender = 0, shiny = false, shadow = false, back = false, egg = false)
return self.egg_sprite_filename(species, form) if egg
return self.back_sprite_filename(species, form, gender, shiny, shadow) if back
return self.front_sprite_filename(species, form, gender, shiny, shadow)
end
def self.front_sprite_bitmap(species, form = 0, gender = 0, shiny = false, shadow = false)
filename = self.front_sprite_filename(species, form, gender, shiny, shadow)
return (filename) ? AnimatedBitmap.new(filename) : nil
end
def self.back_sprite_bitmap(species, form = 0, gender = 0, shiny = false, shadow = false)
filename = self.back_sprite_filename(species, form, gender, shiny, shadow)
return (filename) ? AnimatedBitmap.new(filename) : nil
end
def self.egg_sprite_bitmap(species, form = 0)
filename = self.egg_sprite_filename(species, form)
return (filename) ? AnimatedBitmap.new(filename) : nil
end
def self.sprite_bitmap(species, form = 0, gender = 0, shiny = false, shadow = false, back = false, egg = false)
return self.egg_sprite_bitmap(species, form) if egg
return self.back_sprite_bitmap(species, form, gender, shiny, shadow) if back
return self.front_sprite_bitmap(species, form, gender, shiny, shadow)
end
def self.sprite_bitmap_from_pokemon(pkmn, back = false, species = nil)
species = pkmn.species if !species
species = GameData::Species.get(species).species # Just to be sure it's a symbol
return self.egg_sprite_bitmap(species, pkmn.form) if pkmn.egg?
if back
ret = self.back_sprite_bitmap(species, pkmn.form, pkmn.gender, pkmn.shiny?, pkmn.shadowPokemon?)
else
ret = self.front_sprite_bitmap(species, pkmn.form, pkmn.gender, pkmn.shiny?, pkmn.shadowPokemon?)
end
alter_bitmap_function = MultipleForms.getFunction(species, "alterBitmap")
if ret && alter_bitmap_function
new_ret = ret.copy
ret.dispose
new_ret.each { |bitmap| alter_bitmap_function.call(pkmn, bitmap) }
ret = new_ret
end
return ret
end
#===========================================================================
def self.egg_icon_filename(species, form)
ret = self.check_egg_graphic_file("Graphics/Icons/icon", species, form)
return (ret) ? ret : pbResolveBitmap("Graphics/Icons/iconEgg")
end
def self.icon_filename(species, form = 0, gender = 0, shiny = false, shadow = false, egg = false)
return self.egg_icon_filename(species, form) if egg
return self.check_graphic_file("Graphics/Icons/icon", species, form, gender, shiny, shadow)
end
def self.icon_filename_from_pokemon(pkmn)
return self.icon_filename(pkmn.species, pkmn.form, pkmn.gender, pkmn.shiny?, pkmn.shadowPokemon?, pkmn.egg?)
end
def self.egg_icon_bitmap(species, form)
filename = self.egg_icon_filename(species, form)
return (filename) ? AnimatedBitmap.new(filename).deanimate : nil
end
def self.icon_bitmap(species, form = 0, gender = 0, shiny = false, shadow = false)
filename = self.icon_filename(species, form, gender,shiny, shadow)
return (filename) ? AnimatedBitmap.new(filename).deanimate : nil
end
def self.icon_bitmap_from_pokemon(pkmn)
return self.icon_bitmap(pkmn.species, pkmn.form, pkmn.gender, pkmn.shiny?, pkmn.shadowPokemon?, pkmn.egg?)
end
#===========================================================================
def self.footprint_filename(species, form = 0)
species_data = self.get_species_form(species, form)
return nil if species_data.nil?
species_id = self.get(species_data.species).id_number
if form > 0
ret = pbResolveBitmap(sprintf("Graphics/Icons/Footprints/footprint%s_%d", species_data.species, form))
return ret if ret
ret = pbResolveBitmap(sprintf("Graphics/Icons/Footprints/footprint%03d_%d", species_id, form))
return ret if ret
end
ret = pbResolveBitmap(sprintf("Graphics/Icons/Footprints/footprint%s", species_data.species))
return ret if ret
return pbResolveBitmap(sprintf("Graphics/Icons/Footprints/footprint%03d", species_id))
end
#===========================================================================
def self.shadow_filename(species, form = 0)
species_data = self.get_species_form(species, form)
return nil if species_data.nil?
species_id = self.get(species_data.species).id_number
# Look for species-specific shadow graphic
if form > 0
ret = pbResolveBitmap(sprintf("Graphics/Battlers/%s_%d_battleshadow", species_data.species, form))
return ret if ret
ret = pbResolveBitmap(sprintf("Graphics/Battlers/%03d_%d_battleshadow", species_id, form))
return ret if ret
end
ret = pbResolveBitmap(sprintf("Graphics/Battlers/%s_battleshadow", species_data.species))
return ret if ret
ret = pbResolveBitmap(sprintf("Graphics/Battlers/%03d_battleshadow", species_id))
return ret if ret
# Use general shadow graphic
return pbResolveBitmap(sprintf("Graphics/Pictures/Battle/battler_shadow_%d", species_data.shadow_size))
end
def self.shadow_bitmap(species, form = 0)
filename = self.shadow_filename(species, form)
return (filename) ? AnimatedBitmap.new(filename) : nil
end
def self.shadow_bitmap_from_pokemon(pkmn)
filename = self.shadow_filename(pkmn.species, pkmn.form)
return (filename) ? AnimatedBitmap.new(filename) : nil
end
#===========================================================================
def self.check_cry_file(species, form)
species_data = self.get_species_form(species, form)
return nil if species_data.nil?
species_id = self.get(species_data.species).id_number
if form > 0
ret = sprintf("Cries/%sCry_%d", species_data.species, form)
return ret if pbResolveAudioSE(ret)
ret = sprintf("Cries/%03dCry_%d", species_id, form)
return ret if pbResolveAudioSE(ret)
end
ret = sprintf("Cries/%sCry", species_data.species)
return ret if pbResolveAudioSE(ret)
ret = sprintf("Cries/%03dCry", species_id)
return (pbResolveAudioSE(ret)) ? ret : nil
end
def self.cry_filename(species, form = 0)
return self.check_cry_file(species, form)
end
def self.cry_filename_from_pokemon(pkmn)
return self.check_cry_file(pkmn.species, pkmn.form)
end
def self.play_cry_from_species(species, form = 0, volume = 90, pitch = 100)
filename = self.cry_filename(species, form)
return if !filename
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
end
def self.play_cry_from_pokemon(pkmn, volume = 90, pitch = nil)
return if !pkmn || pkmn.egg?
if pkmn.respond_to?("chatter") && pkmn.chatter
pkmn.chatter.play
return
end
filename = self.cry_filename_from_pokemon(pkmn)
return if !filename
pitch ||= 75 + (pkmn.hp * 25 / pkmn.totalhp)
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
end
def self.play_cry(pkmn, volume = 90, pitch = nil)
if pkmn.is_a?(Pokemon)
self.play_cry_from_pokemon(pkmn, volume, pitch)
else
self.play_cry_from_species(pkmn, nil, volume, pitch)
end
end
def self.cry_length(species, form = 0, pitch = 100)
return 0 if !species || pitch <= 0
pitch = pitch.to_f / 100
ret = 0.0
if species.is_a?(Pokemon)
if !species.egg?
if species.respond_to?("chatter") && species.chatter
ret = species.chatter.time
pitch = 1.0
else
filename = pbResolveAudioSE(GameData::Species.cry_filename_from_pokemon(species))
ret = getPlayTime(filename) if filename
end
end
else
filename = pbResolveAudioSE(GameData::Species.cry_filename(species, form))
ret = getPlayTime(filename) if filename
end
ret /= pitch # Sound played at a lower pitch lasts longer
return (ret * Graphics.frame_rate).ceil + 4 # 4 provides a buffer between sounds
end
end
end
#===============================================================================
# Deprecated
#===============================================================================
def pbLoadSpeciesBitmap(species, gender = 0, form = 0, shiny = false, shadow = false, back = false , egg = false)
Deprecation.warn_method('pbLoadSpeciesBitmap', 'v20', 'GameData::Species.sprite_bitmap(species, form, gender, shiny, shadow, back, egg)')
return GameData::Species.sprite_bitmap(species, form, gender, shiny, shadow, back, egg)
end
def pbLoadPokemonBitmap(pkmn, back = false)
Deprecation.warn_method('pbLoadPokemonBitmap', 'v20', 'GameData::Species.sprite_bitmap_from_pokemon(pkmn)')
return GameData::Species.sprite_bitmap_from_pokemon(pkmn, back)
end
def pbLoadPokemonBitmapSpecies(pkmn, species, back = false)
Deprecation.warn_method('pbLoadPokemonBitmapSpecies', 'v20', 'GameData::Species.sprite_bitmap_from_pokemon(pkmn, back, species)')
return GameData::Species.sprite_bitmap_from_pokemon(pkmn, back, species)
end
def pbPokemonIconFile(pkmn)
Deprecation.warn_method('pbPokemonIconFile', 'v20', 'GameData::Species.icon_filename_from_pokemon(pkmn)')
return GameData::Species.icon_filename_from_pokemon(pkmn)
end
def pbLoadPokemonIcon(pkmn)
Deprecation.warn_method('pbLoadPokemonIcon', 'v20', 'GameData::Species.icon_bitmap_from_pokemon(pkmn)')
return GameData::Species.icon_bitmap_from_pokemon(pkmn)
end
def pbPokemonFootprintFile(species, form = 0)
Deprecation.warn_method('pbPokemonFootprintFile', 'v20', 'GameData::Species.footprint_filename(species, form)')
return GameData::Species.footprint_filename(species, form)
end
def pbCheckPokemonShadowBitmapFiles(species, form = 0)
Deprecation.warn_method('pbCheckPokemonShadowBitmapFiles', 'v20', 'GameData::Species.shadow_filename(species, form)')
return GameData::Species.shadow_filename(species, form)
end
def pbLoadPokemonShadowBitmap(pkmn)
Deprecation.warn_method('pbLoadPokemonShadowBitmap', 'v20', 'GameData::Species.shadow_bitmap_from_pokemon(pkmn)')
return GameData::Species.shadow_bitmap_from_pokemon(pkmn)
end
def pbCryFile(species, form = 0)
if species.is_a?(Pokemon)
Deprecation.warn_method('pbCryFile', 'v20', 'GameData::Species.cry_filename_from_pokemon(pkmn)')
return GameData::Species.cry_filename_from_pokemon(species)
end
Deprecation.warn_method('pbCryFile', 'v20', 'GameData::Species.cry_filename(species, form)')
return GameData::Species.cry_filename(species, form)
end
def pbPlayCry(pkmn, volume = 90, pitch = nil)
Deprecation.warn_method('pbPlayCry', 'v20', 'GameData::Species.play_cry(pkmn)')
GameData::Species.play_cry(pkmn, volume, pitch)
end
def pbPlayCrySpecies(species, form = 0, volume = 90, pitch = nil)
Deprecation.warn_method('pbPlayCrySpecies', 'v20', 'GameData::Species.play_cry_from_species(species, form)')
GameData::Species.play_cry_from_species(species, form, volume, pitch)
end
def pbPlayCryPokemon(pkmn, volume = 90, pitch = nil)
Deprecation.warn_method('pbPlayCryPokemon', 'v20', 'GameData::Species.play_cry_from_pokemon(pkmn)')
GameData::Species.play_cry_from_pokemon(pkmn, volume, pitch)
end
def pbCryFrameLength(species, form = 0, pitch = 100)
Deprecation.warn_method('pbCryFrameLength', 'v20', 'GameData::Species.cry_length(species, form)')
return GameData::Species.cry_length(species, form, pitch)
end
-133
View File
@@ -1,133 +0,0 @@
#===============================================================================
# Phone data
#===============================================================================
class PhoneDatabase
attr_accessor :generics
attr_accessor :greetings
attr_accessor :greetingsMorning
attr_accessor :greetingsEvening
attr_accessor :bodies1
attr_accessor :bodies2
attr_accessor :battleRequests
attr_accessor :trainers
def initialize
@generics = []
@greetings = []
@greetingsMorning = []
@greetingsEvening = []
@bodies1 = []
@bodies2 = []
@battleRequests = []
@trainers = []
end
end
module PhoneMsgType
Generic = 0
Greeting = 1
Body = 2
BattleRequest = 3
end
#===============================================================================
# Pokémon data
#===============================================================================
module SpeciesData
TYPE1 = 0
TYPE2 = 1
BASE_STATS = 2
GENDER_RATE = 3
GROWTH_RATE = 4
BASE_EXP = 5
EFFORT_POINTS = 6
RARENESS = 7
HAPPINESS = 8
ABILITIES = 9
HIDDEN_ABILITY = 10
COMPATIBILITY = 11
STEPS_TO_HATCH = 12
HEIGHT = 13
WEIGHT = 14
COLOR = 15
SHAPE = 16
HABITAT = 17
WILD_ITEM_COMMON = 18
WILD_ITEM_UNCOMMON = 19
WILD_ITEM_RARE = 20
INCENSE = 21
POKEDEX_FORM = 22 # For alternate forms
MEGA_STONE = 23 # For alternate forms
MEGA_MOVE = 24 # For alternate forms
UNMEGA_FORM = 25 # For alternate forms
MEGA_MESSAGE = 26 # For alternate forms
METRIC_PLAYER_X = 0
METRIC_PLAYER_Y = 1
METRIC_ENEMY_X = 2
METRIC_ENEMY_Y = 3
METRIC_ALTITUDE = 4
METRIC_SHADOW_X = 5
METRIC_SHADOW_SIZE = 6
def self.requiredValues(compilingForms = false)
ret = {
"Type1" => [TYPE1, "e", :Type],
"BaseStats" => [BASE_STATS, "vvvvvv"],
"BaseEXP" => [BASE_EXP, "v"],
"EffortPoints" => [EFFORT_POINTS, "uuuuuu"],
"Rareness" => [RARENESS, "u"],
"Happiness" => [HAPPINESS, "u"],
"Compatibility" => [COMPATIBILITY, "eE", :PBEggGroups, :PBEggGroups],
"StepsToHatch" => [STEPS_TO_HATCH, "v"],
"Height" => [HEIGHT, "f"],
"Weight" => [WEIGHT, "f"],
"Color" => [COLOR, "e", :PBColors],
"Shape" => [SHAPE, "u"],
"Moves" => [0, "*ue", nil, :Move],
"Kind" => [0, "s"],
"Pokedex" => [0, "q"]
}
if !compilingForms
ret["GenderRate"] = [GENDER_RATE, "e", :PBGenderRates]
ret["GrowthRate"] = [GROWTH_RATE, "e", :PBGrowthRates]
ret["Name"] = [0, "s"]
ret["InternalName"] = [0, "n"]
end
return ret
end
def self.optionalValues(compilingForms = false)
ret = {
"Type2" => [TYPE2, "e", :Type],
"Abilities" => [ABILITIES, "eE", :Ability, :Ability],
"HiddenAbility" => [HIDDEN_ABILITY, "eEEE", :Ability, :Ability,
:Ability, :Ability],
"Habitat" => [HABITAT, "e", :PBHabitats],
"WildItemCommon" => [WILD_ITEM_COMMON, "e", :Item],
"WildItemUncommon" => [WILD_ITEM_UNCOMMON, "e", :Item],
"WildItemRare" => [WILD_ITEM_RARE, "e", :Item],
"BattlerPlayerX" => [METRIC_PLAYER_X, "i"],
"BattlerPlayerY" => [METRIC_PLAYER_Y, "i"],
"BattlerEnemyX" => [METRIC_ENEMY_X, "i"],
"BattlerEnemyY" => [METRIC_ENEMY_Y, "i"],
"BattlerAltitude" => [METRIC_ALTITUDE, "i"],
"BattlerShadowX" => [METRIC_SHADOW_X, "i"],
"BattlerShadowSize" => [METRIC_SHADOW_SIZE, "u"],
"EggMoves" => [0, "*e", :Move],
"FormName" => [0, "q"],
"Evolutions" => [0, "*ses", nil, :PBEvolution, nil]
}
if compilingForms
ret["PokedexForm"] = [POKEDEX_FORM, "u"]
ret["MegaStone"] = [MEGA_STONE, "e", :Item]
ret["MegaMove"] = [MEGA_MOVE, "e", :Move]
ret["UnmegaForm"] = [UNMEGA_FORM, "u"]
ret["MegaMessage"] = [MEGA_MESSAGE, "u"]
else
ret["Incense"] = [INCENSE, "e", :Item]
ret["RegionalNumbers"] = [0, "*u"]
end
return ret
end
end
+31
View File
@@ -0,0 +1,31 @@
#===============================================================================
# Phone data
#===============================================================================
class PhoneDatabase
attr_accessor :generics
attr_accessor :greetings
attr_accessor :greetingsMorning
attr_accessor :greetingsEvening
attr_accessor :bodies1
attr_accessor :bodies2
attr_accessor :battleRequests
attr_accessor :trainers
def initialize
@generics = []
@greetings = []
@greetingsMorning = []
@greetingsEvening = []
@bodies1 = []
@bodies2 = []
@battleRequests = []
@trainers = []
end
end
module PhoneMsgType
Generic = 0
Greeting = 1
Body = 2
BattleRequest = 3
end
@@ -1,8 +1,8 @@
module PBGrowthRates module PBGrowthRates
Medium = MediumFast = 0 MediumFast = Medium = 0
Erratic = 1 Erratic = 1
Fluctuating = 2 Fluctuating = 2
Parabolic = MediumSlow = 3 MediumSlow = Parabolic = 3
Fast = 4 Fast = 4
Slow = 5 Slow = 5
@@ -33,8 +33,7 @@ end
class PokeBattle_Move_003 < PokeBattle_SleepMove class PokeBattle_Move_003 < PokeBattle_SleepMove
def pbMoveFailed?(user,targets) def pbMoveFailed?(user,targets)
if NEWEST_BATTLE_MECHANICS && @id == :DARKVOID if NEWEST_BATTLE_MECHANICS && @id == :DARKVOID
if !user.isSpecies?(:DARKRAI) && if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI
!isConst?(user.effects[PBEffects::TransformSpecies],PBSpecies,:DARKRAI)
@battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis)) @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis))
return true return true
end end
@@ -53,7 +53,7 @@ module PokeBattle_BattleCommon
end end
# Record a Shadow Pokémon's species as having been caught # Record a Shadow Pokémon's species as having been caught
if pkmn.shadowPokemon? if pkmn.shadowPokemon?
pbPlayer.shadowcaught = [] if !pbPlayer.shadowcaught pbPlayer.shadowcaught = {} if !pbPlayer.shadowcaught
pbPlayer.shadowcaught[pkmn.species] = true pbPlayer.shadowcaught[pkmn.species] = true
end end
# Store caught Pokémon # Store caught Pokémon
@@ -65,7 +65,7 @@ module PokeBattle_BattleCommon
#============================================================================= #=============================================================================
# Throw a Poké Ball # Throw a Poké Ball
#============================================================================= #=============================================================================
def pbThrowPokeBall(idxBattler,ball,rareness=nil,showPlayer=false) def pbThrowPokeBall(idxBattler,ball,catch_rate=nil,showPlayer=false)
# Determine which Pokémon you're throwing the Poké Ball at # Determine which Pokémon you're throwing the Poké Ball at
battler = nil battler = nil
if opposes?(idxBattler) if opposes?(idxBattler)
@@ -105,7 +105,7 @@ module PokeBattle_BattleCommon
# Calculate the number of shakes (4=capture) # Calculate the number of shakes (4=capture)
pkmn = battler.pokemon pkmn = battler.pokemon
@criticalCapture = false @criticalCapture = false
numShakes = pbCaptureCalc(pkmn,battler,rareness,ball) numShakes = pbCaptureCalc(pkmn,battler,catch_rate,ball)
PBDebug.log("[Threw Poké Ball] #{itemName}, #{numShakes} shakes (4=capture)") PBDebug.log("[Threw Poké Ball] #{itemName}, #{numShakes} shakes (4=capture)")
# Animation of Ball throw, absorb, shake and capture/burst out # Animation of Ball throw, absorb, shake and capture/burst out
@scene.pbThrow(ball,numShakes,@criticalCapture,battler.index,showPlayer) @scene.pbThrow(ball,numShakes,@criticalCapture,battler.index,showPlayer)
@@ -162,33 +162,23 @@ module PokeBattle_BattleCommon
#============================================================================= #=============================================================================
# Calculate how many shakes a thrown Poké Ball will make (4 = capture) # Calculate how many shakes a thrown Poké Ball will make (4 = capture)
#============================================================================= #=============================================================================
def pbCaptureCalc(pkmn,battler,rareness,ball) def pbCaptureCalc(pkmn,battler,catch_rate,ball)
return 4 if $DEBUG && Input.press?(Input::CTRL) return 4 if $DEBUG && Input.press?(Input::CTRL)
# Get a rareness if one wasn't provided # Get a catch rate if one wasn't provided
if !rareness catch_rate = pkmn.species_data.catch_rate if !catch_rate
rareness = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesData::RARENESS) # Modify catch_rate depending on the Poké Ball's effect
end ultraBeast = [:NIHILEGO, :BUZZWOLE, :PHEROMOSA, :XURKITREE, :CELESTEELA,
# Modify rareness depending on the Poké Ball's effect :KARTANA, :GUZZLORD, :POIPOLE, :NAGANADEL, :STAKATAKA,
ultraBeast = (battler.isSpecies?(:NIHILEGO) || :BLACEPHALON].include?(pkmn.species)
battler.isSpecies?(:BUZZWOLE) ||
battler.isSpecies?(:PHEROMOSA) ||
battler.isSpecies?(:XURKITREE) ||
battler.isSpecies?(:CELESTEELA) ||
battler.isSpecies?(:KARTANA) ||
battler.isSpecies?(:GUZZLORD) ||
battler.isSpecies?(:POIPOLE) ||
battler.isSpecies?(:NAGANADEL) ||
battler.isSpecies?(:STAKATAKA) ||
battler.isSpecies?(:BLACEPHALON))
if !ultraBeast || ball == :BEASTBALL if !ultraBeast || ball == :BEASTBALL
rareness = BallHandlers.modifyCatchRate(ball,rareness,self,battler,ultraBeast) catch_rate = BallHandlers.modifyCatchRate(ball,catch_rate,self,battler,ultraBeast)
else else
rareness /= 10 catch_rate /= 10
end end
# First half of the shakes calculation # First half of the shakes calculation
a = battler.totalhp a = battler.totalhp
b = battler.hp b = battler.hp
x = ((3*a-2*b)*rareness.to_f)/(3*a) x = ((3*a-2*b)*catch_rate.to_f)/(3*a)
# Calculation modifiers # Calculation modifiers
if battler.status==PBStatuses::SLEEP || battler.status==PBStatuses::FROZEN if battler.status==PBStatuses::SLEEP || battler.status==PBStatuses::FROZEN
x *= 2.5 x *= 2.5
@@ -148,7 +148,7 @@ class PokeBattle_Battle
pbCommonAnimation("MegaEvolution2",battler) pbCommonAnimation("MegaEvolution2",battler)
megaName = battler.pokemon.megaName megaName = battler.pokemon.megaName
if !megaName || megaName=="" if !megaName || megaName==""
megaName = _INTL("Mega {1}",PBSpecies.getName(battler.pokemon.species)) megaName = _INTL("Mega {1}", battler.pokemon.speciesName)
end end
pbDisplay(_INTL("{1} has Mega Evolved into {2}!",battler.pbThis,megaName)) pbDisplay(_INTL("{1} has Mega Evolved into {2}!",battler.pbThis,megaName))
side = battler.idxOwnSide side = battler.idxOwnSide
@@ -668,10 +668,10 @@ class BattlerFaintAnimation < PokeBattle_Animation
# Animation # Animation
# Play cry # Play cry
delay = 10 delay = 10
cry = pbCryFile(batSprite.pkmn) cry = GameData::Species.cry_filename_from_pokemon(batSprite.pkmn)
if cry if cry
battler.setSE(0,pbCryFile(batSprite.pkmn),nil,75) # 75 is pitch battler.setSE(0, cry, nil, 75) # 75 is pitch
delay = pbCryFrameLength(batSprite.pkmn)*20/Graphics.frame_rate delay = GameData::Species.cry_length(batSprite.pkmn) * 20 / Graphics.frame_rate
end end
# Sprite drops down # Sprite drops down
shadow.setVisible(delay,false) shadow.setVisible(delay,false)
@@ -540,13 +540,13 @@ class PokemonBattlerSprite < RPG::Sprite
@spriteX = p[0] @spriteX = p[0]
@spriteY = p[1] @spriteY = p[1]
# Apply metrics # Apply metrics
pbApplyBattlerMetricsToSprite(self,@index,@pkmn.fSpecies) @pkmn.species_data.apply_metrics_to_sprite(self, @index)
end end
def setPokemonBitmap(pkmn,back=false) def setPokemonBitmap(pkmn,back=false)
@pkmn = pkmn @pkmn = pkmn
@_iconBitmap.dispose if @_iconBitmap @_iconBitmap.dispose if @_iconBitmap
@_iconBitmap = pbLoadPokemonBitmap(@pkmn,back) @_iconBitmap = GameData::Species.sprite_bitmap_from_pokemon(@pkmn, back)
self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil
pbSetPosition pbSetPosition
end end
@@ -557,8 +557,7 @@ class PokemonBattlerSprite < RPG::Sprite
# @battleAnimations array. # @battleAnimations array.
def pbPlayIntroAnimation(pictureEx=nil) def pbPlayIntroAnimation(pictureEx=nil)
return if !@pkmn return if !@pkmn
cry = pbCryFile(@pkmn) GameData::Species.play_cry_from_pokemon(@pkmn)
pbSEPlay(cry) if cry
end end
QUARTER_ANIM_PERIOD = Graphics.frame_rate*3/20 QUARTER_ANIM_PERIOD = Graphics.frame_rate*3/20
@@ -637,13 +636,13 @@ class PokemonBattlerShadowSprite < RPG::Sprite
self.x = p[0] self.x = p[0]
self.y = p[1] self.y = p[1]
# Apply metrics # Apply metrics
pbApplyBattlerMetricsToSprite(self,@index,@pkmn.fSpecies,true) @pkmn.species_data.apply_metrics_to_sprite(self, @index, true)
end end
def setPokemonBitmap(pkmn) def setPokemonBitmap(pkmn)
@pkmn = pkmn @pkmn = pkmn
@_iconBitmap.dispose if @_iconBitmap @_iconBitmap.dispose if @_iconBitmap
@_iconBitmap = pbLoadPokemonShadowBitmap(@pkmn) @_iconBitmap = GameData::Species.shadow_bitmap_from_pokemon(@pkmn)
self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil
pbSetPosition pbSetPosition
end end
@@ -323,9 +323,7 @@ class PokeBattle_Scene
pkmnSprite.setPokemonBitmap(pkmn,back) pkmnSprite.setPokemonBitmap(pkmn,back)
shadowSprite.setPokemonBitmap(pkmn) shadowSprite.setPokemonBitmap(pkmn)
# Set visibility of battler's shadow # Set visibility of battler's shadow
if shadowSprite && !back shadowSprite.visible = pkmn.species_data.shows_shadow? if shadowSprite && !back
shadowSprite.visible = showShadow?(pkmn.fSpecies)
end
end end
def pbResetMoveIndex(idxBattler) def pbResetMoveIndex(idxBattler)
@@ -504,9 +504,8 @@ class PBAnimation < Array
when 0 # Play SE when 0 # Play SE
if i.name && i.name!="" if i.name && i.name!=""
pbSEPlay("Anim/"+i.name,i.volume,i.pitch) pbSEPlay("Anim/"+i.name,i.volume,i.pitch)
else elsif user && user.pokemon
poke = (user && user.pokemon) ? user.pokemon : 1 name = GameData::Species.cry_filename_from_pokemon(user.pokemon)
name = (pbCryFile(poke) rescue nil)
pbSEPlay(name,i.volume,i.pitch) if name pbSEPlay(name,i.volume,i.pitch) if name
end end
# if sprite # if sprite
@@ -410,28 +410,28 @@ class PokeBattle_SafariZone
#============================================================================= #=============================================================================
# Safari battle-specific methods # Safari battle-specific methods
#============================================================================= #=============================================================================
def pbEscapeRate(rareness) def pbEscapeRate(catch_rate)
return 125 if rareness<=45 # Escape factor 9 (45%) return 125 if catch_rate <= 45 # Escape factor 9 (45%)
return 100 if rareness<=60 # Escape factor 7 (35%) return 100 if catch_rate <= 60 # Escape factor 7 (35%)
return 75 if rareness<=120 # Escape factor 5 (25%) return 75 if catch_rate <= 120 # Escape factor 5 (25%)
return 50 if rareness<=250 # Escape factor 3 (15%) return 50 if catch_rate <= 250 # Escape factor 3 (15%)
return 25 # Escape factor 2 (10%) return 25 # Escape factor 2 (10%)
end end
def pbStartBattle def pbStartBattle
begin begin
wildpoke = @party2[0] pkmn = @party2[0]
self.pbPlayer.seen[wildpoke.species] = true self.pbPlayer.seen[pkmn.species] = true
pbSeenForm(wildpoke) pbSeenForm(pkmn)
@scene.pbStartBattle(self) @scene.pbStartBattle(self)
pbDisplayPaused(_INTL("Wild {1} appeared!",wildpoke.name)) pbDisplayPaused(_INTL("Wild {1} appeared!",pkmn.name))
@scene.pbSafariStart @scene.pbSafariStart
@scene.pbCommonAnimation(PBWeather.animationName(@weather)) @scene.pbCommonAnimation(PBWeather.animationName(@weather))
safariBall = GameData::Item.get(:SAFARIBALL).id safariBall = GameData::Item.get(:SAFARIBALL).id
rareness = pbGetSpeciesData(wildpoke.species,wildpoke.form,SpeciesData::RARENESS) catch_rate = pkmn.species_data.catch_rate
catchFactor = (rareness*100)/1275 catchFactor = (catch_rate*100)/1275
catchFactor = [[catchFactor,3].max,20].min catchFactor = [[catchFactor,3].max,20].min
escapeFactor = (pbEscapeRate(rareness)*100)/1275 escapeFactor = (pbEscapeRate(catch_rate)*100)/1275
escapeFactor = [[escapeFactor,2].max,20].min escapeFactor = [[escapeFactor,2].max,20].min
loop do loop do
cmd = @scene.pbSafariCommandMenu(0) cmd = @scene.pbSafariCommandMenu(0)
@@ -452,12 +452,12 @@ class PokeBattle_SafariZone
end end
end end
when 1 # Bait when 1 # Bait
pbDisplayBrief(_INTL("{1} threw some bait at the {2}!",self.pbPlayer.name,wildpoke.name)) pbDisplayBrief(_INTL("{1} threw some bait at the {2}!",self.pbPlayer.name,pkmn.name))
@scene.pbThrowBait @scene.pbThrowBait
catchFactor /= 2 if pbRandom(100)<90 # Harder to catch catchFactor /= 2 if pbRandom(100)<90 # Harder to catch
escapeFactor /= 2 # Less likely to escape escapeFactor /= 2 # Less likely to escape
when 2 # Rock when 2 # Rock
pbDisplayBrief(_INTL("{1} threw a rock at the {2}!",self.pbPlayer.name,wildpoke.name)) pbDisplayBrief(_INTL("{1} threw a rock at the {2}!",self.pbPlayer.name,pkmn.name))
@scene.pbThrowRock @scene.pbThrowRock
catchFactor *= 2 # Easier to catch catchFactor *= 2 # Easier to catch
escapeFactor *= 2 if pbRandom(100)<90 # More likely to escape escapeFactor *= 2 if pbRandom(100)<90 # More likely to escape
@@ -475,14 +475,14 @@ class PokeBattle_SafariZone
@decision = 2 @decision = 2
elsif pbRandom(100)<5*escapeFactor elsif pbRandom(100)<5*escapeFactor
pbSEPlay("Battle flee") pbSEPlay("Battle flee")
pbDisplay(_INTL("{1} fled!",wildpoke.name)) pbDisplay(_INTL("{1} fled!",pkmn.name))
@decision = 3 @decision = 3
elsif cmd==1 # Bait elsif cmd==1 # Bait
pbDisplay(_INTL("{1} is eating!",wildpoke.name)) pbDisplay(_INTL("{1} is eating!",pkmn.name))
elsif cmd==2 # Rock elsif cmd==2 # Rock
pbDisplay(_INTL("{1} is angry!",wildpoke.name)) pbDisplay(_INTL("{1} is angry!",pkmn.name))
else else
pbDisplay(_INTL("{1} is watching carefully!",wildpoke.name)) pbDisplay(_INTL("{1} is watching carefully!",pkmn.name))
end end
# Weather continues # Weather continues
@scene.pbCommonAnimation(PBWeather.animationName(@weather)) @scene.pbCommonAnimation(PBWeather.animationName(@weather))
@@ -51,6 +51,19 @@ class PokeBattle_RealBattlePeer
def pbBoxName(box) def pbBoxName(box)
return (box<0) ? "" : $PokemonStorage[box].name return (box<0) ? "" : $PokemonStorage[box].name
end end
def pbOnEnteringBattle(_battle,pkmn,wild=false)
f = MultipleForms.call("getFormOnEnteringBattle",pkmn,wild)
pkmn.form = f if f
end
# For switching out, including due to fainting, and for the end of battle
def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false)
return if !pkmn
f = MultipleForms.call("getFormOnLeavingBattle",pkmn,battle,usedInBattle,endBattle)
pkmn.form = f if f && pkmn.form!=f
pkmn.hp = pkmn.totalhp if pkmn.hp>pkmn.totalhp
end
end end
@@ -863,8 +863,10 @@ BattleHandlers::DamageCalcTargetItem.add(:EVIOLITE,
# means it also cares about the Pokémon's form. Some forms cannot # means it also cares about the Pokémon's form. Some forms cannot
# evolve even if the species generally can, and such forms are not # evolve even if the species generally can, and such forms are not
# affected by Eviolite. # affected by Eviolite.
evos = EvolutionHelper.evolutions(target.pokemon.fSpecies, true) evos = target.pokemon.species_data.evolutions
mults[DEF_MULT] *= 1.5 if evos && evos.length>0 if evos.any? { |e| e[1] != PBEvolution::None && !e[3] } # Not a "None", not a prevolution
mults[DEF_MULT] *= 1.5 if evos && evos.length > 0
end
} }
) )
@@ -143,10 +143,10 @@ BallHandlers::ModifyCatchRate.add(:QUICKBALL,proc { |ball,catchRate,battle,battl
}) })
BallHandlers::ModifyCatchRate.add(:FASTBALL,proc { |ball,catchRate,battle,battler,ultraBeast| BallHandlers::ModifyCatchRate.add(:FASTBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
baseStats = pbGetSpeciesData(battler.species,battler.form,SpeciesData::BASE_STATS) baseStats = battler.pokemon.baseStats
baseSpeed = baseStats[PBStats::SPEED] baseSpeed = baseStats[PBStats::SPEED]
catchRate *= 4 if baseSpeed>=100 catchRate *= 4 if baseSpeed >= 100
next [catchRate,255].min next [catchRate, 255].min
}) })
BallHandlers::ModifyCatchRate.add(:LEVELBALL,proc { |ball,catchRate,battle,battler,ultraBeast| BallHandlers::ModifyCatchRate.add(:LEVELBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
@@ -241,11 +241,11 @@ def pbWildBattleCore(*args)
if arg.is_a?(Pokemon) if arg.is_a?(Pokemon)
foeParty.push(arg) foeParty.push(arg)
elsif arg.is_a?(Array) elsif arg.is_a?(Array)
species = getID(PBSpecies,arg[0]) species = GameData::Species.get(arg[0]).id
pkmn = pbGenerateWildPokemon(species,arg[1]) pkmn = pbGenerateWildPokemon(species,arg[1])
foeParty.push(pkmn) foeParty.push(pkmn)
elsif sp elsif sp
species = getID(PBSpecies,sp) species = GameData::Species.get(sp).id
pkmn = pbGenerateWildPokemon(species,arg) pkmn = pbGenerateWildPokemon(species,arg)
foeParty.push(pkmn) foeParty.push(pkmn)
sp = nil sp = nil
@@ -307,7 +307,7 @@ end
#=============================================================================== #===============================================================================
# Used when walking in tall grass, hence the additional code. # Used when walking in tall grass, hence the additional code.
def pbWildBattle(species, level, outcomeVar=1, canRun=true, canLose=false) def pbWildBattle(species, level, outcomeVar=1, canRun=true, canLose=false)
species = getID(PBSpecies,species) species = GameData::Species.get(species).id
# Potentially call a different pbWildBattle-type method instead (for roaming # Potentially call a different pbWildBattle-type method instead (for roaming
# Pokémon, Safari battles, Bug Contest battles) # Pokémon, Safari battles, Bug Contest battles)
handled = [nil] handled = [nil]
@@ -605,7 +605,7 @@ def pbEvolutionCheck(currentLevels)
next if !pkmn || (pkmn.hp==0 && !NEWEST_BATTLE_MECHANICS) next if !pkmn || (pkmn.hp==0 && !NEWEST_BATTLE_MECHANICS)
next if currentLevels[i] && pkmn.level==currentLevels[i] next if currentLevels[i] && pkmn.level==currentLevels[i]
newSpecies = pbCheckEvolution(pkmn) newSpecies = pbCheckEvolution(pkmn)
next if newSpecies<=0 next if !newSpecies
evo = PokemonEvolutionScene.new evo = PokemonEvolutionScene.new
evo.pbStartScreen(pkmn,newSpecies) evo.pbStartScreen(pkmn,newSpecies)
evo.pbEvolution evo.pbEvolution
@@ -251,11 +251,11 @@ class PokemonEncounters
if favoredType if favoredType
newEncList = [] newEncList = []
newChances = [] newChances = []
speciesData = pbLoadSpeciesData
for i in 0...encList.length for i in 0...encList.length
t1 = speciesData[encList[i][0]][SpeciesData::TYPE1] speciesData = GameData::Species.get(encList[i][0])
t2 = speciesData[encList[i][0]][SpeciesData::TYPE2] t1 = speciesData.type1
next if t1!=favoredType && (!t2 || t2!=favoredType) t2 = speciesData.type2
next if t1 != favoredType && (!t2 || t2 != favoredType)
newEncList.push(encList[i]) newEncList.push(encList[i])
newChances.push(chances[i]) newChances.push(chances[i])
end end
@@ -26,7 +26,7 @@ end
# Gets the roaming areas for a particular Pokémon. # Gets the roaming areas for a particular Pokémon.
def pbRoamingAreas(idxRoamer) def pbRoamingAreas(idxRoamer)
# [species symbol, level, Game Switch, encounter type, battle BGM, area maps hash] # [species ID, level, Game Switch, encounter type, battle BGM, area maps hash]
roamData = ROAMING_SPECIES[idxRoamer] roamData = ROAMING_SPECIES[idxRoamer]
return roamData[5] if roamData && roamData[5] return roamData[5] if roamData && roamData[5]
return ROAMING_AREAS return ROAMING_AREAS
@@ -46,8 +46,7 @@ def pbRoamPokemon
if !$PokemonGlobal.roamPosition if !$PokemonGlobal.roamPosition
$PokemonGlobal.roamPosition = {} $PokemonGlobal.roamPosition = {}
for i in 0...ROAMING_SPECIES.length for i in 0...ROAMING_SPECIES.length
species = getID(PBSpecies,ROAMING_SPECIES[i][0]) next if !GameData::Species.exists?(i[0])
next if !species || species<=0
keys = pbRoamingAreas(i).keys keys = pbRoamingAreas(i).keys
$PokemonGlobal.roamPosition[i] = keys[rand(keys.length)] $PokemonGlobal.roamPosition[i] = keys[rand(keys.length)]
end end
@@ -61,12 +60,10 @@ end
# Makes a single roaming Pokémon roam to another map. Doesn't roam if it isn't # Makes a single roaming Pokémon roam to another map. Doesn't roam if it isn't
# currently possible to encounter it (i.e. its Game Switch is off). # currently possible to encounter it (i.e. its Game Switch is off).
def pbRoamPokemonOne(idxRoamer) def pbRoamPokemonOne(idxRoamer)
# [species symbol, level, Game Switch, encounter type, battle BGM, area maps hash] # [species ID, level, Game Switch, encounter type, battle BGM, area maps hash]
roamData = ROAMING_SPECIES[idxRoamer] roamData = ROAMING_SPECIES[idxRoamer]
return if roamData[2]>0 && !$game_switches[roamData[2]] # Game Switch is off return if roamData[2]>0 && !$game_switches[roamData[2]] # Game Switch is off
# Ensure species is a number rather than a string/symbol return if !GameData::Species.exists?(roamData[0])
species = getID(PBSpecies,roamData[0])
return if !species || species<=0
# Get hash of area patrolled by the roaming Pokémon # Get hash of area patrolled by the roaming Pokémon
mapIDs = pbRoamingAreas(idxRoamer).keys mapIDs = pbRoamingAreas(idxRoamer).keys
return if !mapIDs || mapIDs.length==0 # No roaming area defined somehow return if !mapIDs || mapIDs.length==0 # No roaming area defined somehow
@@ -163,13 +160,11 @@ EncounterModifier.register(proc { |encounter|
# encounter it # encounter it
roamerChoices = [] roamerChoices = []
for i in 0...ROAMING_SPECIES.length for i in 0...ROAMING_SPECIES.length
# [species symbol, level, Game Switch, encounter type, battle BGM, area maps hash] # [species ID, level, Game Switch, encounter type, battle BGM, area maps hash]
roamData = ROAMING_SPECIES[i] roamData = ROAMING_SPECIES[i]
next if roamData[2]>0 && !$game_switches[roamData[2]] # Game Switch is off next if roamData[2]>0 && !$game_switches[roamData[2]] # Game Switch is off
next if $PokemonGlobal.roamPokemon[i]==true # Roaming Pokémon has been caught next if $PokemonGlobal.roamPokemon[i]==true # Roaming Pokémon has been caught
# Ensure species is a number rather than a string/symbol next if !GameData::Species.exists?(roamData[0])
species = getID(PBSpecies,roamData[0])
next if !species || species<=0
# Get the roaming Pokémon's current map # Get the roaming Pokémon's current map
roamerMap = $PokemonGlobal.roamPosition[i] roamerMap = $PokemonGlobal.roamPosition[i]
if !roamerMap if !roamerMap
@@ -191,7 +186,7 @@ EncounterModifier.register(proc { |encounter|
# Check whether the roaming Pokémon's category of encounter is currently possible # Check whether the roaming Pokémon's category of encounter is currently possible
next if !pbRoamingMethodAllowed(roamData[3]) next if !pbRoamingMethodAllowed(roamData[3])
# Add this roaming Pokémon to the list of possible roaming Pokémon to encounter # Add this roaming Pokémon to the list of possible roaming Pokémon to encounter
roamerChoices.push([i,species,roamData[1],roamData[4]]) roamerChoices.push([i,roamData[0],roamData[1],roamData[4]])
end end
# No encounterable roaming Pokémon were found, just have the regular encounter # No encounterable roaming Pokémon were found, just have the regular encounter
next encounter if roamerChoices.length==0 next encounter if roamerChoices.length==0
@@ -119,7 +119,7 @@ def pbHiddenMoveAnimation(pokemon)
sprite.visible=true sprite.visible=true
if ptinterp.done? if ptinterp.done?
phase=3 phase=3
pbPlayCry(pokemon) GameData::Species.play_cry_from_pokemon(pokemon)
frames=0 frames=0
end end
when 3 # Wait when 3 # Wait
@@ -105,14 +105,10 @@ end
# Check compatibility of Pokémon in the Day Care. # Check compatibility of Pokémon in the Day Care.
#=============================================================================== #===============================================================================
def pbIsDitto?(pkmn) def pbIsDitto?(pkmn)
compat = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesData::COMPATIBILITY) return pkmn.species_data.egg_groups.include?(PBEggGroups::Ditto)
if compat.is_a?(Array)
return compat.include?(getConst(PBEggGroups,:Ditto))
end
return compat && isConst?(compat,PBEggGroups,:Ditto)
end end
def pbDayCareCompatibleGender(pkmn1,pkmn2) def pbDayCareCompatibleGender(pkmn1, pkmn2)
return true if pkmn1.female? && pkmn2.male? return true if pkmn1.female? && pkmn2.male?
return true if pkmn1.male? && pkmn2.female? return true if pkmn1.male? && pkmn2.female?
ditto1 = pbIsDitto?(pkmn1) ditto1 = pbIsDitto?(pkmn1)
@@ -123,44 +119,28 @@ def pbDayCareCompatibleGender(pkmn1,pkmn2)
end end
def pbDayCareGetCompat def pbDayCareGetCompat
return 0 if pbDayCareDeposited!=2 return 0 if pbDayCareDeposited != 2
pkmn1 = $PokemonGlobal.daycare[0][0] pkmn1 = $PokemonGlobal.daycare[0][0]
pkmn2 = $PokemonGlobal.daycare[1][0] pkmn2 = $PokemonGlobal.daycare[1][0]
return 0 if pkmn1.shadowPokemon? # Shadow Pokémon cannot breed
return 0 if pkmn2.shadowPokemon? return 0 if pkmn1.shadowPokemon? || pkmn2.shadowPokemon?
# Insert code here if certain forms of certain species cannot breed # Pokémon in the Undiscovered egg group cannot breed
compat1 = pbGetSpeciesData(pkmn1.species,pkmn1.form,SpeciesData::COMPATIBILITY) egg_groups1 = pkmn1.species_data.egg_groups
if compat1.is_a?(Array) egg_groups2 = pkmn2.species_data.egg_groups
compat10 = compat1[0] || 0 return 0 if egg_groups1.include?(PBEggGroups::Undiscovered) ||
compat11 = compat1[1] || compat10 egg_groups2.include?(PBEggGroups::Undiscovered)
else # Pokémon that don't share an egg group (and neither is in the Ditto group)
compat10 = compat11 = compat || 0 # cannot breed
end return 0 if !egg_groups1.include?(PBEggGroups::Ditto) &&
compat2 = pbGetSpeciesData(pkmn2.species,pkmn2.form,SpeciesData::COMPATIBILITY) !egg_groups2.include?(PBEggGroups::Ditto) &&
if compat2.is_a?(Array) (egg_groups1 & egg_groups2).length == 0
compat20 = compat2[0] || 0 # Pokémon with incompatible genders cannot breed
compat21 = compat2[1] || compat20 return 0 if !pbDayCareCompatibleGender(pkmn1, pkmn2)
else # Pokémon can breed; calculate a compatibility factor
compat20 = compat21 = compat || 0
end
return 0 if isConst?(compat10,PBEggGroups,:Undiscovered) ||
isConst?(compat11,PBEggGroups,:Undiscovered) ||
isConst?(compat20,PBEggGroups,:Undiscovered) ||
isConst?(compat21,PBEggGroups,:Undiscovered)
if compat10==compat20 || compat11==compat20 ||
compat10==compat21 || compat11==compat21 ||
isConst?(compat10,PBEggGroups,:Ditto) ||
isConst?(compat11,PBEggGroups,:Ditto) ||
isConst?(compat20,PBEggGroups,:Ditto) ||
isConst?(compat21,PBEggGroups,:Ditto)
if pbDayCareCompatibleGender(pkmn1,pkmn2)
ret = 1 ret = 1
ret += 1 if pkmn1.species == pkmn2.species ret += 1 if pkmn1.species == pkmn2.species
ret += 1 if pkmn1.owner.id != pkmn2.owner.id ret += 1 if pkmn1.owner.id != pkmn2.owner.id
return ret return ret
end
end
return 0
end end
def pbDayCareGetCompatibility(variable) def pbDayCareGetCompatibility(variable)
@@ -173,36 +153,37 @@ end
# Generate an Egg based on Pokémon in the Day Care. # Generate an Egg based on Pokémon in the Day Care.
#=============================================================================== #===============================================================================
def pbDayCareGenerateEgg def pbDayCareGenerateEgg
return if pbDayCareDeposited!=2 return if pbDayCareDeposited != 2
raise _INTL("Can't store the egg") if $Trainer.party.length>=6 raise _INTL("Can't store the egg.") if $Trainer.party.length >= 6
pokemon0 = $PokemonGlobal.daycare[0][0] pkmn0 = $PokemonGlobal.daycare[0][0]
pokemon1 = $PokemonGlobal.daycare[1][0] pkmn1 = $PokemonGlobal.daycare[1][0]
mother = nil mother = nil
father = nil father = nil
babyspecies = 0 babyspecies = nil
ditto0 = pbIsDitto?(pokemon0) ditto0 = pbIsDitto?(pkmn0)
ditto1 = pbIsDitto?(pokemon1) ditto1 = pbIsDitto?(pkmn1)
if pokemon0.female? || ditto0 if pkmn0.female? || ditto0
babyspecies = (ditto0) ? pokemon1.species : pokemon0.species mother = pkmn0
mother = pokemon0 father = pkmn1
father = pokemon1 babyspecies = (ditto0) ? father.species : mother.species
else else
babyspecies = (ditto1) ? pokemon0.species : pokemon1.species mother = pkmn1
mother = pokemon1 father = pkmn0
father = pokemon0 babyspecies = (ditto1) ? father.species : mother.species
end end
# Determine the egg's species # Determine the egg's species
babyspecies = EvolutionHelper.baby_species(babyspecies, true, mother.item_id, father.item_id) babyspecies = EvolutionHelper.baby_species(babyspecies, true, mother.item_id, father.item_id)
if isConst?(babyspecies,PBSpecies,:MANAPHY) && hasConst?(PBSpecies,:PHIONE) case babyspecies
babyspecies = getConst(PBSpecies,:PHIONE) when :MANAPHY
elsif (isConst?(babyspecies,PBSpecies,:NIDORANfE) && hasConst?(PBSpecies,:NIDORANmA)) || babyspecies = :PHIONE if GameData::Species.exists?(:PHIONE)
(isConst?(babyspecies,PBSpecies,:NIDORANmA) && hasConst?(PBSpecies,:NIDORANfE)) when :NIDORANfE, :NIDORANmA
babyspecies = [getConst(PBSpecies,:NIDORANmA), if GameData::Species.exists?(:NIDORANfE) && GameData::Species.exists?(:NIDORANmA)
getConst(PBSpecies,:NIDORANfE)][rand(2)] babyspecies = [:NIDORANfE, :NIDORANmA][rand(2)]
elsif (isConst?(babyspecies,PBSpecies,:VOLBEAT) && hasConst?(PBSpecies,:ILLUMISE)) || end
(isConst?(babyspecies,PBSpecies,:ILLUMISE) && hasConst?(PBSpecies,:VOLBEAT)) when :VOLBEAT, :ILLUMISE
babyspecies = [getConst(PBSpecies,:VOLBEAT), if GameData::Species.exists?(:VOLBEAT) && GameData::Species.exists?(:ILLUMISE)
getConst(PBSpecies,:ILLUMISE)][rand(2)] babyspecies = [:VOLBEAT, :ILLUMISE][rand(2)]
end
end end
# Generate egg # Generate egg
egg = Pokemon.new(babyspecies,EGG_LEVEL) egg = Pokemon.new(babyspecies,EGG_LEVEL)
@@ -211,26 +192,13 @@ def pbDayCareGenerateEgg
pid |= (rand(65536)<<16) pid |= (rand(65536)<<16)
egg.personalID = pid egg.personalID = pid
# Inheriting form # Inheriting form
if isConst?(babyspecies,PBSpecies,:BURMY) || if [:BURMY, :SHELLOS, :BASCULIN, :FLABEBE, :PUMPKABOO, :ORICORIO, :ROCKRUFF, :MINIOR].include?(babyspecies)
isConst?(babyspecies,PBSpecies,:SHELLOS) ||
isConst?(babyspecies,PBSpecies,:BASCULIN) ||
isConst?(babyspecies,PBSpecies,:FLABEBE) ||
isConst?(babyspecies,PBSpecies,:PUMPKABOO) ||
isConst?(babyspecies,PBSpecies,:ORICORIO) ||
isConst?(babyspecies,PBSpecies,:ROCKRUFF) ||
isConst?(babyspecies,PBSpecies,:MINIOR)
newForm = mother.form newForm = mother.form
newForm = 0 if mother.isSpecies?(:MOTHIM) newForm = 0 if mother.isSpecies?(:MOTHIM)
egg.form = newForm egg.form = newForm
end end
# Inheriting Alolan form # Inheriting Alolan form
if isConst?(babyspecies,PBSpecies,:RATTATA) || if [:RATTATA, :SANDSHREW, :VULPIX, :DIGLETT, :MEOWTH, :GEODUDE, :GRIMER].include?(babyspecies)
isConst?(babyspecies,PBSpecies,:SANDSHREW) ||
isConst?(babyspecies,PBSpecies,:VULPIX) ||
isConst?(babyspecies,PBSpecies,:DIGLETT) ||
isConst?(babyspecies,PBSpecies,:MEOWTH) ||
isConst?(babyspecies,PBSpecies,:GEODUDE) ||
isConst?(babyspecies,PBSpecies,:GRIMER)
if mother.form==1 if mother.form==1
egg.form = 1 if mother.hasItem?(:EVERSTONE) egg.form = 1 if mother.hasItem?(:EVERSTONE)
elsif EvolutionHelper.baby_species(father.species, true, mother.item_id, father.item_id) == babyspecies elsif EvolutionHelper.baby_species(father.species, true, mother.item_id, father.item_id) == babyspecies
@@ -240,17 +208,18 @@ def pbDayCareGenerateEgg
# Inheriting Moves # Inheriting Moves
moves = [] moves = []
othermoves = [] othermoves = []
movefather = father; movemother = mother movefather = father
movemother = mother
if pbIsDitto?(movefather) && !mother.female? if pbIsDitto?(movefather) && !mother.female?
movefather = mother; movemother = father movefather = mother
movemother = father
end end
# Initial Moves # Initial Moves
initialmoves = egg.getMoveList initialmoves = egg.getMoveList
for k in initialmoves for k in initialmoves
if k[0]<=EGG_LEVEL if k[0]<=EGG_LEVEL
moves.push(k[1]) moves.push(k[1])
else elsif mother.hasMove?(k[1]) && father.hasMove?(k[1])
next if !mother.hasMove?(k[1]) || !father.hasMove?(k[1])
othermoves.push(k[1]) othermoves.push(k[1])
end end
end end
@@ -269,7 +238,7 @@ def pbDayCareGenerateEgg
end end
end end
# Inheriting Egg Moves # Inheriting Egg Moves
babyEggMoves = pbGetSpeciesEggMoves(egg.species,egg.form) babyEggMoves = egg.species_data.egg_moves
if movefather.male? if movefather.male?
babyEggMoves.each { |m| moves.push(m) if movefather.hasMove?(m) } babyEggMoves.each { |m| moves.push(m) if movefather.hasMove?(m) }
end end
@@ -286,7 +255,7 @@ def pbDayCareGenerateEgg
mother.hasItem?(:LIGHTBALL) mother.hasItem?(:LIGHTBALL)
lightball = true lightball = true
end end
if lightball && isConst?(babyspecies,PBSpecies,:PICHU) && GameData::Move.exists?(:VOLTTACKLE) if lightball && babyspecies == :PICHU && GameData::Move.exists?(:VOLTTACKLE)
moves.push(:VOLTTACKLE) moves.push(:VOLTTACKLE)
end end
moves = moves.reverse moves = moves.reverse
@@ -378,18 +347,12 @@ def pbDayCareGenerateEgg
end end
# Set all stats # Set all stats
egg.happiness = 120 egg.happiness = 120
egg.iv[0] = ivs[0] egg.iv = ivs
egg.iv[1] = ivs[1]
egg.iv[2] = ivs[2]
egg.iv[3] = ivs[3]
egg.iv[4] = ivs[4]
egg.iv[5] = ivs[5]
egg.moves = finalmoves egg.moves = finalmoves
egg.calcStats egg.calcStats
egg.obtainText = _INTL("Day-Care Couple") egg.obtainText = _INTL("Day-Care Couple")
egg.name = _INTL("Egg") egg.name = _INTL("Egg")
eggSteps = pbGetSpeciesData(babyspecies,egg.form,SpeciesData::STEPS_TO_HATCH) egg.eggsteps = egg.species_data.hatch_steps
egg.eggsteps = eggSteps
egg.givePokerus if rand(65536)<POKERUS_CHANCE egg.givePokerus if rand(65536)<POKERUS_CHANCE
# Add egg to party # Add egg to party
$Trainer.party[$Trainer.party.length] = egg $Trainer.party[$Trainer.party.length] = egg
@@ -153,14 +153,9 @@ class PokeBattle_Trainer
def pokedexSeen(region = -1) # Number of Pokémon seen def pokedexSeen(region = -1) # Number of Pokémon seen
ret = 0 ret = 0
if region == -1 if region == -1
for i in 1..PBSpecies.maxValue GameData::Species.each { |s| ret += 1 if s.form == 0 && @seen[s.species] }
ret += 1 if @seen[i]
end
else else
regionlist = pbAllRegionalSpecies(region) pbAllRegionalSpecies(region).each { |s| ret += 1 if s && @seen[s] }
for i in regionlist
ret += 1 if i > 0 && @seen[i]
end
end end
return ret return ret
end end
@@ -168,22 +163,19 @@ class PokeBattle_Trainer
def pokedexOwned(region = -1) # Number of Pokémon owned def pokedexOwned(region = -1) # Number of Pokémon owned
ret = 0 ret = 0
if region == -1 if region == -1
for i in 0..PBSpecies.maxValue GameData::Species.each { |s| ret += 1 if s.form == 0 && @owned[s.species] }
ret += 1 if @owned[i]
end
else else
regionlist = pbAllRegionalSpecies(region) pbAllRegionalSpecies(region).each { |s| ret += 1 if s && @owned[s] }
for i in regionlist
ret += 1 if @owned[i]
end
end end
return ret return ret
end end
def numFormsSeen(species) def numFormsSeen(species)
species = getID(PBSpecies, species) species_data = GameData::Species.try_get(species)
return 0 if species <= 0 return 0 if !species_data
species = species_data.species
ret = 0 ret = 0
@formseen[species] = [[], []] if !@formseen[species]
array = @formseen[species] array = @formseen[species]
for i in 0...[array[0].length, array[1].length].max for i in 0...[array[0].length, array[1].length].max
ret += 1 if array[0][i] || array[1][i] ret += 1 if array[0][i] || array[1][i]
@@ -192,38 +184,32 @@ class PokeBattle_Trainer
end end
def seen?(species) def seen?(species)
species = getID(PBSpecies, species) species_data = GameData::Species.try_get(species)
return species > 0 ? @seen[species] : false return (species_data) ? @seen[species_data.species] : false
end end
alias hasSeen? seen? alias hasSeen? seen?
def owned?(species) def owned?(species)
species = getID(PBSpecies, species) species_data = GameData::Species.try_get(species)
return species > 0 ? @owned[species] : false return (species_data) ? @owned[species_data.species] : false
end end
alias hasOwned? owned? alias hasOwned? owned?
def setSeen(species) def setSeen(species)
species = getID(PBSpecies, species) species_data = GameData::Species.try_get(species)
@seen[species] = true if species > 0 @seen[species_data.species] = true if species_data
end end
def setOwned(species) def setOwned(species)
species = getID(PBSpecies, species) species_data = GameData::Species.try_get(species)
@owned[species] = true if species > 0 @owned[species_data.species] = true if species_data
end end
def clearPokedex def clearPokedex
@seen = [] @seen = {}
@owned = [] @owned = {}
@formseen = [] @formseen = {}
@formlastseen = [] @formlastseen = {}
for i in 1..PBSpecies.maxValue
@seen[i] = false
@owned[i] = false
@formlastseen[i] = []
@formseen[i] = [[], []]
end
end end
#============================================================================= #=============================================================================
@@ -239,10 +225,7 @@ class PokeBattle_Trainer
@pokegear = false @pokegear = false
@pokedex = false @pokedex = false
clearPokedex clearPokedex
@shadowcaught = [] @shadowcaught = {}
for i in 1..PBSpecies.maxValue
@shadowcaught[i] = false
end
@badges = [] @badges = []
for i in 0...8 for i in 0...8
@badges[i] = false @badges[i] = false
@@ -22,7 +22,7 @@ module TrainerData
SCHEMA = { SCHEMA = {
"Items" => [0, "eEEEEEEE", :Item, :Item, :Item, :Item, "Items" => [0, "eEEEEEEE", :Item, :Item, :Item, :Item,
:Item, :Item, :Item, :Item], :Item, :Item, :Item, :Item],
"Pokemon" => [SPECIES, "ev", :PBSpecies, nil], # Species, level "Pokemon" => [SPECIES, "ev", :Species, nil], # Species, level
"Item" => [ITEM, "e", :Item], "Item" => [ITEM, "e", :Item],
"Moves" => [MOVES, "eEEE", :Move, :Move, :Move, :Move], "Moves" => [MOVES, "eEEE", :Move, :Move, :Move, :Move],
"Ability" => [ABILITY, "u"], "Ability" => [ABILITY, "u"],
@@ -69,7 +69,7 @@ def pbLoadTrainer(tr_type, tr_name, tr_id = 0)
opponent.setForeignID($Trainer) opponent.setForeignID($Trainer)
# Load up each Pokémon in the trainer's party # Load up each Pokémon in the trainer's party
for poke in trainer[3] for poke in trainer[3]
species = pbGetSpeciesFromFSpecies(poke[TrainerData::SPECIES])[0] species = GameData::Species.get(poke[TrainerData::SPECIES]).species
level = poke[TrainerData::LEVEL] level = poke[TrainerData::LEVEL]
pokemon = Pokemon.new(species,level,opponent,false) pokemon = Pokemon.new(species,level,opponent,false)
if poke[TrainerData::FORM] if poke[TrainerData::FORM]
@@ -84,14 +84,15 @@ def pbLoadTrainer(tr_type, tr_name, tr_id = 0)
else else
pokemon.resetMoves pokemon.resetMoves
end end
pokemon.setAbility(poke[TrainerData::ABILITY] || 0) pokemon.setAbility(poke[TrainerData::ABILITY])
g = (poke[TrainerData::GENDER]) ? poke[TrainerData::GENDER] : (opponent.female?) ? 1 : 0 g = (poke[TrainerData::GENDER]) ? poke[TrainerData::GENDER] : (opponent.female?) ? 1 : 0
pokemon.setGender(g) pokemon.setGender(g)
(poke[TrainerData::SHINY]) ? pokemon.makeShiny : pokemon.makeNotShiny (poke[TrainerData::SHINY]) ? pokemon.makeShiny : pokemon.makeNotShiny
if poke[TrainerData::NATURE] if poke[TrainerData::NATURE]
n = poke[TrainerData::NATURE] n = poke[TrainerData::NATURE]
else else
n = (pokemon.species + GameData::TrainerType.get(opponent.trainertype).id_number) % (PBNatures.maxValue + 1) n = pokemon.species_data.id_number + GameData::TrainerType.get(opponent.trainertype).id_number
n = n % (PBNatures.maxValue + 1)
end end
pokemon.setNature(n) pokemon.setNature(n)
for i in 0...6 for i in 0...6
@@ -143,17 +144,17 @@ def pbNewTrainer(tr_type, tr_name, tr_id, savechanges = true)
end end
loop do loop do
species = pbChooseSpeciesList species = pbChooseSpeciesList
if species<=0 if species
break if i>0
pbMessage(_INTL("This trainer must have at least 1 Pokémon!"))
else
params = ChooseNumberParams.new params = ChooseNumberParams.new
params.setRange(1,PBExperience.maxLevel) params.setRange(1,PBExperience.maxLevel)
params.setDefaultValue(10) params.setDefaultValue(10)
level = pbMessageChooseNumber(_INTL("Set the level for {1} (max. #{PBExperience.maxLevel}).", level = pbMessageChooseNumber(_INTL("Set the level for {1} (max. #{PBExperience.maxLevel}).",
PBSpecies.getName(species)),params) GameData::Species.get(species).name),params)
pokemon.push([species,level]) pokemon.push([species,level])
break break
else
break if i>0
pbMessage(_INTL("This trainer must have at least 1 Pokémon!"))
end end
end end
end end
+2 -9
View File
@@ -178,7 +178,7 @@ def pbChangeLevel(pkmn,newlevel,scene)
end end
# Check for evolution # Check for evolution
newspecies = pbCheckEvolution(pkmn) newspecies = pbCheckEvolution(pkmn)
if newspecies>0 if newspecies
pbFadeOutInWithMusic { pbFadeOutInWithMusic {
evo = PokemonEvolutionScene.new evo = PokemonEvolutionScene.new
evo.pbStartScreen(pkmn,newspecies) evo.pbStartScreen(pkmn,newspecies)
@@ -458,13 +458,6 @@ def pbForgetMove(pkmn,moveToLearn)
return ret return ret
end end
def pbSpeciesCompatible?(species,move)
return false if species<=0
data = pbLoadSpeciesTMData
return false if !data[move]
return data[move].any? { |item| item==species }
end
#=============================================================================== #===============================================================================
# Use an item from the Bag and/or on a Pokémon # Use an item from the Bag and/or on a Pokémon
#=============================================================================== #===============================================================================
@@ -498,7 +491,7 @@ def pbUseItem(bag,item,bagscene=nil)
if itm.is_evolution_stone? if itm.is_evolution_stone?
annot = [] annot = []
for pkmn in $Trainer.party for pkmn in $Trainer.party
elig = pbCheckEvolution(pkmn,item)>0 elig = pbCheckEvolution(pkmn,item)
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE")) annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
end end
end end
@@ -349,22 +349,21 @@ ItemHandlers::UseOnPokemon.addIf(proc { |item| GameData::Item.get(item).is_evolu
next false next false
end end
newspecies = pbCheckEvolution(pkmn,item) newspecies = pbCheckEvolution(pkmn,item)
if newspecies<=0 if newspecies
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pbFadeOutInWithMusic { pbFadeOutInWithMusic {
evo = PokemonEvolutionScene.new evo = PokemonEvolutionScene.new
evo.pbStartScreen(pkmn,newspecies) evo.pbStartScreen(pkmn,newspecies)
evo.pbEvolution(false) evo.pbEvolution(false)
evo.pbEndScreen evo.pbEndScreen
if scene.is_a?(PokemonPartyScreen) if scene.is_a?(PokemonPartyScreen)
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p,item)>0 }) scene.pbRefreshAnnotations(proc { |p| !pbCheckEvolution(p,item).nil? })
scene.pbRefresh scene.pbRefresh
end end
} }
next true next true
end end
scene.pbDisplay(_INTL("It won't have any effect."))
next false
} }
) )
+2 -2
View File
@@ -260,7 +260,7 @@ def pbEncounterSpecies(phonenum)
species = pbRandomEncounterSpecies(enctypes[EncounterTypes::LandNight]) if species==0 species = pbRandomEncounterSpecies(enctypes[EncounterTypes::LandNight]) if species==0
species = pbRandomEncounterSpecies(enctypes[EncounterTypes::Water]) if species==0 species = pbRandomEncounterSpecies(enctypes[EncounterTypes::Water]) if species==0
return "" if species==0 return "" if species==0
return PBSpecies.getName(species) return GameData::Species.get(species).name
end end
def pbTrainerSpecies(phonenum) def pbTrainerSpecies(phonenum)
@@ -269,7 +269,7 @@ def pbTrainerSpecies(phonenum)
trainer = pbGetTrainerData(phonenum[1],phonenum[2],partyid) trainer = pbGetTrainerData(phonenum[1],phonenum[2],partyid)
return "" if !trainer || trainer[3].length==0 return "" if !trainer || trainer[3].length==0
rndpoke = trainer[3][rand(trainer[3].length)] rndpoke = trainer[3][rand(trainer[3].length)]
return PBSpecies.getName(rndpoke[0]) return GameData::Species.get(rndpoke[0]).name
end end
def pbTrainerMapName(phonenum) def pbTrainerMapName(phonenum)
@@ -128,7 +128,7 @@ def pbPokeRadarGetEncounter(rarity=0)
map = $game_map.map_id rescue 0 map = $game_map.map_id rescue 0
array = [] array = []
for enc in POKE_RADAR_ENCOUNTERS for enc in POKE_RADAR_ENCOUNTERS
array.push(enc) if enc.length>=4 && enc[0]==map && getID(PBSpecies,enc[2])>0 array.push(enc) if enc.length>=4 && enc[0]==map && GameData::Species.exists?(enc[2])
end end
# If there are any exclusives, first have a chance of encountering those # If there are any exclusives, first have a chance of encountering those
if array.length>0 if array.length>0
@@ -137,9 +137,8 @@ def pbPokeRadarGetEncounter(rarity=0)
for enc in array for enc in array
chance += enc[1] chance += enc[1]
if rnd<chance if rnd<chance
upper = (enc[4]!=nil) ? enc[4] : enc[3] level = (enc[4] && enc[4] > enc[3]) ? rand(enc[3], enc[4]) : enc[3]
level = enc[3]+rand(1+upper-enc[3]) return [enc[2], level]
return [getID(PBSpecies,enc[2]),level]
end end
end end
end end
+6 -3
View File
@@ -42,19 +42,22 @@ def pbDisplayMail(mail,_bearer=nil)
if GameData::Item.get(mail.item).is_icon_mail? if GameData::Item.get(mail.item).is_icon_mail?
if mail.poke1 if mail.poke1
sprites["bearer"] = IconSprite.new(64,288,viewport) sprites["bearer"] = IconSprite.new(64,288,viewport)
bitmapFileName = pbCheckPokemonIconFiles(mail.poke1,mail.poke1[5]) bitmapFileName = GameData::Species.icon_filename(mail.poke1[0],
mail.poke1[3], mail.poke1[1], mail.poke1[2], mail.poke1[4], mail.poke1[5])
sprites["bearer"].setBitmap(bitmapFileName) sprites["bearer"].setBitmap(bitmapFileName)
sprites["bearer"].src_rect.set(0,0,64,64) sprites["bearer"].src_rect.set(0,0,64,64)
end end
if mail.poke2 if mail.poke2
sprites["bearer2"] = IconSprite.new(144,288,viewport) sprites["bearer2"] = IconSprite.new(144,288,viewport)
bitmapFileName = pbCheckPokemonIconFiles(mail.poke2,mail.poke2[5]) bitmapFileName = GameData::Species.icon_filename(mail.poke2[0],
mail.poke2[3], mail.poke2[1], mail.poke2[2], mail.poke2[4], mail.poke2[5])
sprites["bearer2"].setBitmap(bitmapFileName) sprites["bearer2"].setBitmap(bitmapFileName)
sprites["bearer2"].src_rect.set(0,0,64,64) sprites["bearer2"].src_rect.set(0,0,64,64)
end end
if mail.poke3 if mail.poke3
sprites["bearer3"] = IconSprite.new(224,288,viewport) sprites["bearer3"] = IconSprite.new(224,288,viewport)
bitmapFileName = pbCheckPokemonIconFiles(mail.poke3,mail.poke3[5]) bitmapFileName = GameData::Species.icon_filename(mail.poke3[0],
mail.poke3[3], mail.poke3[1], mail.poke3[2], mail.poke3[4], mail.poke3[5])
sprites["bearer3"].setBitmap(bitmapFileName) sprites["bearer3"].setBitmap(bitmapFileName)
sprites["bearer3"].src_rect.set(0,0,64,64) sprites["bearer3"].src_rect.set(0,0,64,64)
end end
+284 -260
View File
@@ -7,6 +7,13 @@ class Pokemon
attr_accessor :name attr_accessor :name
# @return [Integer] this Pokémon's national Pokédex number # @return [Integer] this Pokémon's national Pokédex number
attr_reader :species attr_reader :species
# If defined, is the time (in Integer form) when this Pokémon's form was set.
# @return [Integer, nil] the time this Pokémon's form was set
attr_accessor :formTime
# If defined, this Pokémon's form will be this value even if a MultipleForms
# handler tries to say otherwise.
# @return [Integer, nil] this Pokémon's form
attr_accessor :forcedForm
# @return [Integer] the current experience points # @return [Integer] the current experience points
attr_reader :exp attr_reader :exp
# @return [Integer] the current HP # @return [Integer] the current HP
@@ -196,12 +203,12 @@ class Pokemon
# @return [Integer] this Pokémon's growth rate (from PBGrowthRates) # @return [Integer] this Pokémon's growth rate (from PBGrowthRates)
def growthrate def growthrate
return pbGetSpeciesData(@species, formSimple, SpeciesData::GROWTH_RATE) return species_data.growth_rate
end end
# @return [Integer] this Pokémon's base Experience value # @return [Integer] this Pokémon's base Experience value
def baseExp def baseExp
return pbGetSpeciesData(@species, formSimple, SpeciesData::BASE_EXP) return species_data.base_exp
end end
# @return [Float] a number between 0 and 1 indicating how much of the current level's # @return [Float] a number between 0 and 1 indicating how much of the current level's
@@ -221,8 +228,8 @@ class Pokemon
# @return [0, 1, 2] this Pokémon's gender (0 = male, 1 = female, 2 = genderless) # @return [0, 1, 2] this Pokémon's gender (0 = male, 1 = female, 2 = genderless)
def gender def gender
gender_rate = species_data.gender_rate
# Return sole gender option for all male/all female/genderless species # Return sole gender option for all male/all female/genderless species
gender_rate = pbGetSpeciesData(@species, formSimple, SpeciesData::GENDER_RATE)
case gender_rate case gender_rate
when PBGenderRates::AlwaysMale then return 0 when PBGenderRates::AlwaysMale then return 0
when PBGenderRates::AlwaysFemale then return 1 when PBGenderRates::AlwaysFemale then return 1
@@ -236,7 +243,7 @@ class Pokemon
# @return [Boolean] whether this Pokémon species is restricted to only ever being one # @return [Boolean] whether this Pokémon species is restricted to only ever being one
# gender (or genderless) # gender (or genderless)
def singleGendered? def singleGendered?
gender_rate = pbGetSpeciesData(@species, formSimple, SpeciesData::GENDER_RATE) gender_rate = species_data.gender_rate
return gender_rate == PBGenderRates::AlwaysMale || return gender_rate == PBGenderRates::AlwaysMale ||
gender_rate == PBGenderRates::AlwaysFemale || gender_rate == PBGenderRates::AlwaysFemale ||
gender_rate == PBGenderRates::Genderless gender_rate == PBGenderRates::Genderless
@@ -272,122 +279,6 @@ class Pokemon
# Makes this Pokémon female. # Makes this Pokémon female.
def makeFemale; setGender(1); end def makeFemale; setGender(1); end
#=============================================================================
# Ability
#=============================================================================
# @return [Integer] the index of this Pokémon's ability
def abilityIndex
return @abilityflag || (@personalID & 1)
end
# @return [GameData::Ability, nil] an Ability object corresponding to this Pokémon's ability
def ability
ret = ability_id
return GameData::Ability.try_get(ret)
end
# @return [Symbol, nil] the ability symbol of this Pokémon's ability
def ability_id
abilIndex = abilityIndex
# Hidden ability
if abilIndex >= 2
hiddenAbil = pbGetSpeciesData(@species, formSimple, SpeciesData::HIDDEN_ABILITY)
if hiddenAbil.is_a?(Array)
ret = hiddenAbil[abilIndex - 2]
return ret if GameData::Ability.exists?(ret)
elsif abilIndex == 2
return hiddenAbil if GameData::Ability.exists?(hiddenAbil)
end
abilIndex = (@personalID & 1)
end
# Natural ability
abilities = pbGetSpeciesData(@species, formSimple, SpeciesData::ABILITIES)
if abilities.is_a?(Array)
ret = abilities[abilIndex]
ret = abilities[(abilIndex + 1) % 2] if !GameData::Ability.exists?(ret)
return ret
end
return abilities
end
# Returns whether this Pokémon has a particular ability. If no value
# is given, returns whether this Pokémon has an ability set.
# @param check_ability [Symbol, GameData::Ability, Integer] ability ID to check
# @return [Boolean] whether this Pokémon has a particular ability or
# an ability at all
def hasAbility?(check_ability = nil)
current_ability = self.ability
return !current_ability.nil? if check_ability.nil?
return current_ability == check_ability
end
# Sets this Pokémon's ability index.
# @param value [Integer] new ability index
def setAbility(value)
@abilityflag = value
end
# @return [Boolean] whether this Pokémon has a hidden ability
def hasHiddenAbility?
abil = abilityIndex
return abil >= 2
end
# @return [Array<Array<Integer>>] the list of abilities this Pokémon can have,
# where every element is [ability ID, ability index]
def getAbilityList
ret = []
abilities = pbGetSpeciesData(@species, formSimple, SpeciesData::ABILITIES)
if abilities.is_a?(Array)
abilities.each_with_index { |a, i| ret.push([a, i]) if a }
else
ret.push([abilities, 0]) if abilities > 0
end
hiddenAbil = pbGetSpeciesData(@species, formSimple, SpeciesData::HIDDEN_ABILITY)
if hiddenAbil.is_a?(Array)
hiddenAbil.each_with_index { |a, i| ret.push([a, i + 2]) if a }
else
ret.push([hiddenAbil, 2]) if hiddenAbil > 0
end
return ret
end
#=============================================================================
# Nature
#=============================================================================
# @return [Integer] the ID of this Pokémon's nature
def nature
return @natureflag || (@personalID % 25)
end
# Returns the calculated nature, taking into account things that change its
# stat-altering effect (i.e. Gen 8 mints). Only used for calculating stats.
# @return [Integer] this Pokémon's calculated nature
def calcNature
return @natureOverride if @natureOverride
return self.nature
end
# Returns whether this Pokémon has a particular nature. If no value
# is given, returns whether this Pokémon has a nature set.
# @param nature [Integer] nature ID to check
# @return [Boolean] whether this Pokémon has a particular nature or
# a nature at all
def hasNature?(nature = -1)
current_nature = self.nature
return current_nature >= 0 if nature < 0
return current_nature == getID(PBNatures, nature)
end
# Sets this Pokémon's nature to a particular nature.
# @param value [Integer, String, Symbol] nature to change to
def setNature(value)
@natureflag = getID(PBNatures, value)
calcStats
end
#============================================================================= #=============================================================================
# Shininess # Shininess
#============================================================================= #=============================================================================
@@ -413,71 +304,26 @@ class Pokemon
@shinyflag = false @shinyflag = false
end end
#=============================================================================
# Pokérus
#=============================================================================
# @return [Integer] the Pokérus infection stage for this Pokémon
def pokerusStrain
return @pokerus / 16
end
# Returns the Pokérus infection stage for this Pokémon. The possible stages are
# 0 (not infected), 1 (infected) and 2 (cured)
# @return [0, 1, 2] current Pokérus infection stage
def pokerusStage
return 0 if !@pokerus || @pokerus == 0
return 2 if @pokerus > 0 && (@pokerus % 16) == 0
return 1
end
# Gives this Pokémon Pokérus (either the specified strain or a random one).
# @param strain [Integer] Pokérus strain to give
def givePokerus(strain = 0)
return if self.pokerusStage == 2 # Can't re-infect a cured Pokémon
strain = 1 + rand(15) if strain <= 0 || strain >= 16
time = 1 + (strain % 4)
@pokerus = time
@pokerus |= strain << 4
end
# Resets the infection time for this Pokémon's Pokérus (even if cured).
def resetPokerusTime
return if @pokerus == 0
strain = @pokerus % 16
time = 1 + (strain % 4)
@pokerus = time
@pokerus |= strain << 4
end
# Reduces the time remaining for this Pokémon's Pokérus (if infected).
def lowerPokerusCount
return if self.pokerusStage != 1
@pokerus -= 1
end
#============================================================================= #=============================================================================
# Types # Types
#============================================================================= #=============================================================================
# @return [Integer] this Pokémon's first type # @return [Integer] this Pokémon's first type
def type1 def type1
return pbGetSpeciesData(@species, formSimple, SpeciesData::TYPE1) return species_data.type1
end end
# @return [Integer] this Pokémon's second type, or the first type if none is defined # @return [Integer] this Pokémon's second type, or the first type if none is defined
def type2 def type2
ret = pbGetSpeciesData(@species, formSimple, SpeciesData::TYPE2) sp_data = species_data
ret = pbGetSpeciesData(@species, formSimple, SpeciesData::TYPE1) if !ret return sp_data.type2 || sp_data.type1
return ret
end end
# @return [Array<Integer>] an array of this Pokémon's types # @return [Array<Integer>] an array of this Pokémon's types
def types def types
ret1 = pbGetSpeciesData(@species, formSimple, SpeciesData::TYPE1) sp_data = species_data
ret2 = pbGetSpeciesData(@species, formSimple, SpeciesData::TYPE2) ret = [sp_data.type1]
ret = [ret1] ret.push(sp_data.type2) if sp_data.type2 && sp_data.type2 != sp_data.type1
ret.push(ret2) if ret2 && ret2 != ret1
return ret return ret
end end
@@ -488,6 +334,69 @@ class Pokemon
return self.types.include?(type) return self.types.include?(type)
end end
#=============================================================================
# Ability
#=============================================================================
# @return [Integer] the index of this Pokémon's ability
def abilityIndex
return @abilityflag || (@personalID & 1)
end
# @return [GameData::Ability, nil] an Ability object corresponding to this Pokémon's ability
def ability
ret = ability_id
return GameData::Ability.try_get(ret)
end
# @return [Symbol, nil] the ability symbol of this Pokémon's ability
def ability_id
sp_data = species_data
abil_index = abilityIndex
# Hidden ability
if abil_index >= 2
ret = sp_data.hidden_abilities[abil_index - 2]
return ret if ret
abil_index = (@personalID & 1)
end
# Natural ability
ret = sp_data.abilities[abil_index]
return ret || sp_data.abilities[0]
end
# Returns whether this Pokémon has a particular ability. If no value
# is given, returns whether this Pokémon has an ability set.
# @param check_ability [Symbol, GameData::Ability, Integer] ability ID to check
# @return [Boolean] whether this Pokémon has a particular ability or
# an ability at all
def hasAbility?(check_ability = nil)
current_ability = self.ability
return !current_ability.nil? if check_ability.nil?
return current_ability == check_ability
end
# Sets this Pokémon's ability index.
# @param value [Integer] new ability index
def setAbility(value)
@abilityflag = value
end
# @return [Boolean] whether this Pokémon has a hidden ability
def hasHiddenAbility?
abil = abilityIndex
return abil >= 2
end
# @return [Array<Array<Symbol,Integer>>] the abilities this Pokémon can have,
# where every element is [ability ID, ability index]
def getAbilityList
ret = []
sp_data = species_data
sp_data.abilities.each_with_index { |a, i| ret.push([a, i]) if a }
sp_data.hidden_abilities.each_with_index { |a, i| ret.push([a, i + 2]) if a }
return ret
end
#============================================================================= #=============================================================================
# Moves # Moves
#============================================================================= #=============================================================================
@@ -507,9 +416,9 @@ class Pokemon
alias knowsMove? hasMove? alias knowsMove? hasMove?
# Returns the list of moves this Pokémon can learn by levelling up. # Returns the list of moves this Pokémon can learn by levelling up.
# @return [Array<Array<Integer>>] this Pokémon's move list, where every element is [level, move ID] # @return [Array<Array<Integer,Symbol>>] this Pokémon's move list, where every element is [level, move ID]
def getMoveList def getMoveList
return pbGetSpeciesMoveset(@species, formSimple) return species_data.moves
end end
# Sets this Pokémon's movelist to the default movelist it originally had. # Sets this Pokémon's movelist to the default movelist it originally had.
@@ -597,7 +506,138 @@ class Pokemon
# @param move [Integer, Symbol, String] ID of the move to check # @param move [Integer, Symbol, String] ID of the move to check
# @return [Boolean] whether the Pokémon is compatible with the given move # @return [Boolean] whether the Pokémon is compatible with the given move
def compatibleWithMove?(move_id) def compatibleWithMove?(move_id)
return pbSpeciesCompatible?(self.fSpecies, move_id) move_data = GameData::Move.try_get(move_id)
return move_data && species_data.tutor_moves.include?(move_data.id)
end
#=============================================================================
# Items
#=============================================================================
# @return [GameData::Item, nil] an Item object corresponding to this Pokémon's item
def item
ret = @item_id
return GameData::Item.try_get(ret)
end
# Returns whether this Pokémon is holding an item. If an item id is passed,
# returns whether the Pokémon is holding that item.
# @param check_item [Symbol, GameData::Item, Integer] item ID to check
# @return [Boolean] whether the Pokémon is holding the specified item or
# an item at all
def hasItem?(check_item = nil)
current_item = self.item
return !current_item.nil? if check_item.nil?
return current_item == check_item
end
# Gives an item to this Pokémon. Passing 0 as the argument removes the held item.
# @param value [Symbol, GameData::Item, Integer] id of the item to give to this
# Pokémon (a non-valid value sets it to nil)
def setItem(value)
new_item = GameData::Item.try_get(value)
@item_id = (new_item) ? new_item.id : nil
end
# @return [Array<Integer>] the items this species can be found holding in the wild
def wildHoldItems
sp_data = species_data
return [sp_data.wild_item_common, sp_data.wild_item_uncommon, sp_data.wild_item_rare]
end
# @return [PokemonMail, nil] mail held by this Pokémon (nil if there is none)
def mail
return nil if !@mail
@mail = nil if !@mail.item || !hasItem?(@mail.item)
return @mail
end
# If mail is a PokemonMail object, gives that mail to this Pokémon. If nil is given,
# removes the held mail.
# @param mail [PokemonMail, nil] mail to be held by this Pokémon (nil if mail is to be removed)
def mail=(mail)
if !mail.nil? && !mail.is_a?(PokemonMail)
raise ArgumentError, _INTL('Invalid value {1} given', mail.inspect)
end
@mail = mail
end
#=============================================================================
# Nature
#=============================================================================
# @return [Integer] the ID of this Pokémon's nature
def nature
return @natureflag || (@personalID % 25)
end
# Returns the calculated nature, taking into account things that change its
# stat-altering effect (i.e. Gen 8 mints). Only used for calculating stats.
# @return [Integer] this Pokémon's calculated nature
def calcNature
return @natureOverride if @natureOverride
return self.nature
end
# Returns whether this Pokémon has a particular nature. If no value
# is given, returns whether this Pokémon has a nature set.
# @param nature [Integer] nature ID to check
# @return [Boolean] whether this Pokémon has a particular nature or
# a nature at all
def hasNature?(nature = -1)
current_nature = self.nature
return current_nature >= 0 if nature < 0
return current_nature == getID(PBNatures, nature)
end
# Sets this Pokémon's nature to a particular nature.
# @param value [Integer, String, Symbol] nature to change to
def setNature(value)
@natureflag = getID(PBNatures, value)
calcStats
end
#=============================================================================
# Pokérus
#=============================================================================
# @return [Integer] the Pokérus infection stage for this Pokémon
def pokerusStrain
return @pokerus / 16
end
# Returns the Pokérus infection stage for this Pokémon. The possible stages are
# 0 (not infected), 1 (infected) and 2 (cured)
# @return [0, 1, 2] current Pokérus infection stage
def pokerusStage
return 0 if !@pokerus || @pokerus == 0
return 2 if @pokerus > 0 && (@pokerus % 16) == 0
return 1
end
# Gives this Pokémon Pokérus (either the specified strain or a random one).
# @param strain [Integer] Pokérus strain to give
def givePokerus(strain = 0)
return if self.pokerusStage == 2 # Can't re-infect a cured Pokémon
strain = 1 + rand(15) if strain <= 0 || strain >= 16
time = 1 + (strain % 4)
@pokerus = time
@pokerus |= strain << 4
end
# Resets the infection time for this Pokémon's Pokérus (even if cured).
def resetPokerusTime
return if @pokerus == 0
strain = @pokerus % 16
time = 1 + (strain % 4)
@pokerus = time
@pokerus |= strain << 4
end
# Reduces the time remaining for this Pokémon's Pokérus (if infected).
def lowerPokerusCount
return if self.pokerusStage != 1
@pokerus -= 1
end end
#============================================================================= #=============================================================================
@@ -625,7 +665,7 @@ class Pokemon
end end
# @return [Integer] this Pokémon's tough contest attribute # @return [Integer] this Pokémon's tough contest attribute
def tough; def tough
return @tough || 0 return @tough || 0
end end
@@ -697,61 +737,6 @@ class Pokemon
@ribbons = [] @ribbons = []
end end
#=============================================================================
# Items
#=============================================================================
# @return [GameData::Item, nil] an Item object corresponding to this Pokémon's item
def item
ret = @item_id
return GameData::Item.try_get(ret)
end
# Returns whether this Pokémon is holding an item. If an item id is passed,
# returns whether the Pokémon is holding that item.
# @param check_item [Symbol, GameData::Item, Integer] item ID to check
# @return [Boolean] whether the Pokémon is holding the specified item or
# an item at all
def hasItem?(check_item = nil)
current_item = self.item
return !current_item.nil? if check_item.nil?
return current_item == check_item
end
# Gives an item to this Pokémon. Passing 0 as the argument removes the held item.
# @param value [Symbol, GameData::Item, Integer] id of the item to give to this
# Pokémon (a non-valid value sets it to nil)
def setItem(value)
new_item = GameData::Item.try_get(value)
@item_id = (new_item) ? new_item.id : nil
end
# @return [Array<Integer>] the items this species can be found holding in the wild
def wildHoldItems
ret = []
ret.push(pbGetSpeciesData(@species, formSimple, SpeciesData::WILD_ITEM_COMMON))
ret.push(pbGetSpeciesData(@species, formSimple, SpeciesData::WILD_ITEM_UNCOMMON))
ret.push(pbGetSpeciesData(@species, formSimple, SpeciesData::WILD_ITEM_RARE))
return ret
end
# @return [PokemonMail, nil] mail held by this Pokémon (nil if there is none)
def mail
return nil if !@mail
@mail = nil if !@mail.item || !hasItem?(@mail.item)
return @mail
end
# If mail is a PokemonMail object, gives that mail to this Pokémon. If nil is given,
# removes the held mail.
# @param mail [PokemonMail, nil] mail to be held by this Pokémon (nil if mail is to be removed)
def mail=(mail)
if !mail.nil? && !mail.is_a?(PokemonMail)
raise ArgumentError, _INTL('Invalid value {1} given', mail.inspect)
end
@mail = mail
end
#============================================================================= #=============================================================================
# Status # Status
#============================================================================= #=============================================================================
@@ -819,15 +804,17 @@ class Pokemon
end end
#============================================================================= #=============================================================================
# Other # Species and form
#============================================================================= #=============================================================================
# Changes the Pokémon's species and re-calculates its statistics. # Changes the Pokémon's species and re-calculates its statistics.
# @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)
new_species_data = GameData::Species.get(species_id)
return if @species == new_species_data.species
has_nickname = nicknamed? has_nickname = nicknamed?
@species, new_form = pbGetSpeciesFromFSpecies(species_id) @species = new_species_data.species
@form = new_form if @species != value @form = new_species_data.form if new_species_data.form != 0
@name = speciesName unless has_nickname @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
@@ -836,14 +823,51 @@ class Pokemon
# @param species [Integer, Symbol, String] id of the species to check for # @param species [Integer, Symbol, String] id of the species to check for
# @return [Boolean] whether this Pokémon is of the specified species # @return [Boolean] whether this Pokémon is of the specified species
def isSpecies?(species) def isSpecies?(check_species)
species = getID(PBSpecies, species) return @species == check_species || @species == GameData::Species.get(check_species).species
return species && @species == species
end end
def form
return @forcedForm if !@forcedForm.nil?
return @form if $game_temp.in_battle
v = MultipleForms.call("getForm", self)
self.form = v if v != nil && (!@form || v != @form)
return @form
end
def formSimple
return @forcedForm || @form
end
def form=(value)
oldForm = @form
@form = value
yield if block_given?
MultipleForms.call("onSetForm", self, value, oldForm)
calcStats
pbSeenForm(self)
end
def setForm(value)
self.form = value
end
def formSimple=(value)
@form = value
calcStats
end
def species_data
return GameData::Species.get_species_form(@species, formSimple)
end
#=============================================================================
# Other
#=============================================================================
# @return [String] the species name of this Pokémon # @return [String] the species name of this Pokémon
def speciesName def speciesName
return PBSpecies.getName(@species) return species_data.name
end end
# @return [Boolean] whether this Pokémon has been nicknamed # @return [Boolean] whether this Pokémon has been nicknamed
@@ -863,12 +887,17 @@ class Pokemon
# @return [Integer] the height of this Pokémon in decimetres (0.1 metres) # @return [Integer] the height of this Pokémon in decimetres (0.1 metres)
def height def height
return pbGetSpeciesData(@species, formSimple, SpeciesData::HEIGHT) return species_data.height
end end
# @return [Integer] the weight of this Pokémon in hectograms (0.1 kilograms) # @return [Integer] the weight of this Pokémon in hectograms (0.1 kilograms)
def weight def weight
return pbGetSpeciesData(@species, formSimple, SpeciesData::WEIGHT) return species_data.weight
end
# @return [Array<Integer>] the EV yield of this Pokémon (an array of six values)
def evYield
return species_data.evs.clone
end end
# Returns an array of booleans indicating whether a stat is made to have # Returns an array of booleans indicating whether a stat is made to have
@@ -889,12 +918,6 @@ class Pokemon
return ret return ret
end end
# @return [Array<Integer>] the EV yield of this Pokémon (an array of six values)
def evYield
ret = pbGetSpeciesData(@species, formSimple, SpeciesData::EFFORT_POINTS)
return ret.clone
end
# Sets the Pokémon's health. # Sets the Pokémon's health.
# @param value [Integer] new hp value # @param value [Integer] new hp value
def hp=(value) def hp=(value)
@@ -971,8 +994,7 @@ class Pokemon
# @return [Array<Integer>] this Pokémon's base stats, an array of six values # @return [Array<Integer>] this Pokémon's base stats, an array of six values
def baseStats def baseStats
ret = pbGetSpeciesData(@species, formSimple, SpeciesData::BASE_STATS) return species_data.base_stats.clone
return ret.clone
end end
# @return [Integer] the maximum HP of this Pokémon # @return [Integer] the maximum HP of this Pokémon
@@ -1031,21 +1053,16 @@ class Pokemon
end end
# Creates a new Pokémon object. # Creates a new Pokémon object.
# @param species [Integer, Symbol, String] Pokémon species # @param species [Symbol, String, Integer] Pokémon species
# @param level [Integer] Pokémon level # @param level [Integer] Pokémon level
# @param owner [Owner, PokeBattle_Trainer] Pokémon owner (the player by default) # @param owner [Owner, PokeBattle_Trainer] Pokémon owner (the player by default)
# @param withMoves [Boolean] whether the Pokémon should have moves # @param withMoves [Boolean] whether the Pokémon should have moves
def initialize(species, level, owner = $Trainer, withMoves = true) def initialize(species, level, owner = $Trainer, withMoves = true)
ospecies = species.to_s species_data = GameData::Species.get(species)
species = getID(PBSpecies, species) @species = species_data.species
cname = getConstantName(PBSpecies, species) rescue nil @form = species_data.form
realSpecies = pbGetSpeciesFromFSpecies(species)[0] if species && species > 0 @name = species_data.name
if !species || species <= 0 || realSpecies > PBSpecies.maxValue || !cname @personalID = rand(2 ** 16) | rand(2 ** 16) << 16
raise ArgumentError.new(_INTL("The species given ({1}) is invalid.", ospecies))
end
@species = realSpecies
@name = speciesName
@personalID = rand(2**16) | rand(2**16) << 16
@hp = 1 @hp = 1
@totalhp = 1 @totalhp = 1
@iv = [] @iv = []
@@ -1081,7 +1098,14 @@ class Pokemon
self.level = level self.level = level
calcStats calcStats
@hp = @totalhp @hp = @totalhp
@happiness = pbGetSpeciesData(@species, formSimple, SpeciesData::HAPPINESS) @happiness = species_data.happiness
self.resetMoves if withMoves resetMoves if withMoves
if @form == 0
f = MultipleForms.call("getFormOnCreation", self)
if f
self.form = f
resetMoves
end
end
end end
end end
+3 -75
View File
@@ -1,75 +1,3 @@
class Pokemon
attr_accessor :formTime # Time when Furfrou's/Hoopa's form was set
attr_accessor :forcedForm
def form
return @forcedForm if @forcedForm!=nil
return (@form || 0) if $game_temp.in_battle
v = MultipleForms.call("getForm",self)
self.form = v if v!=nil && (!@form || v!=@form)
return @form || 0
end
def form=(value)
setForm(value)
end
def setForm(value)
oldForm = @form
@form = value
yield if block_given?
MultipleForms.call("onSetForm",self,value,oldForm)
self.calcStats
pbSeenForm(self)
end
def formSimple
return @forcedForm if @forcedForm!=nil
return @form || 0
end
def formSimple=(value)
@form = value
self.calcStats
end
def fSpecies
return pbGetFSpeciesFromForm(@species,formSimple)
end
alias __mf_initialize initialize
def initialize(*args)
@form = (pbGetSpeciesFromFSpecies(args[0])[1] rescue 0)
__mf_initialize(*args)
if @form==0
f = MultipleForms.call("getFormOnCreation",self)
if f
self.form = f
self.resetMoves
end
end
end
end
class PokeBattle_RealBattlePeer
def pbOnEnteringBattle(_battle,pkmn,wild=false)
f = MultipleForms.call("getFormOnEnteringBattle",pkmn,wild)
pkmn.form = f if f
end
# For switching out, including due to fainting, and for the end of battle
def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false)
return if !pkmn
f = MultipleForms.call("getFormOnLeavingBattle",pkmn,battle,usedInBattle,endBattle)
pkmn.form = f if f && pkmn.form!=f
pkmn.hp = pkmn.totalhp if pkmn.hp>pkmn.totalhp
end
end
module MultipleForms module MultipleForms
@@formSpecies = SpeciesHandlerHash.new @@formSpecies = SpeciesHandlerHash.new
@@ -86,13 +14,13 @@ module MultipleForms
end end
def self.hasFunction?(pkmn,func) def self.hasFunction?(pkmn,func)
spec = (pkmn.is_a?(Numeric)) ? pkmn : pkmn.species spec = (pkmn.is_a?(Pokemon)) ? pkmn.species : pkmn
sp = @@formSpecies[spec] sp = @@formSpecies[spec]
return sp && sp[func] return sp && sp[func]
end end
def self.getFunction(pkmn,func) def self.getFunction(pkmn,func)
spec = (pkmn.is_a?(Numeric)) ? pkmn : pkmn.species spec = (pkmn.is_a?(Pokemon)) ? pkmn.species : pkmn
sp = @@formSpecies[spec] sp = @@formSpecies[spec]
return (sp && sp[func]) ? sp[func] : nil return (sp && sp[func]) ? sp[func] : nil
end end
@@ -364,7 +292,7 @@ MultipleForms.register(:ARCEUS,{
ret = f ret = f
break break
end end
break if ret>0 break if ret > 0
end end
next ret next ret
} }
@@ -3,62 +3,53 @@
# NOTE: These are treated as form changes in Essentials. # NOTE: These are treated as form changes in Essentials.
#=============================================================================== #===============================================================================
class Pokemon class Pokemon
def getMegaForm(checkItemOnly=false) def getMegaForm(checkItemOnly = false)
formData = pbLoadFormToSpecies
return 0 if !formData[@species] || formData[@species].length==0
ret = 0 ret = 0
speciesData = pbLoadSpeciesData GameData::Species.each do |data|
for i in 0...formData[@species].length next if data.species != @species
fSpec = formData[@species][i] if data.mega_stone && hasItem?(data.mega_stone)
next if !fSpec || fSpec<=0 ret = data.form
megaStone = speciesData[fSpec][SpeciesData::MEGA_STONE] break
if megaStone && self.hasItem?(megaStone) elsif !checkItemOnly && data.mega_move && hasMove?(data.mega_move)
ret = i; break ret = data.form
end break
if !checkItemOnly
megaMove = speciesData[fSpec][SpeciesData::MEGA_MOVE]
if self.hasMove?(megaMove)
ret = i; break
end
end end
end end
return ret # form number, or 0 if no accessible Mega form return ret # form number, or 0 if no accessible Mega form
end end
def getUnmegaForm def getUnmegaForm
return -1 if !mega? return (mega?) ? species_data.unmega_form : -1
unmegaForm = pbGetSpeciesData(@species,formSimple,SpeciesData::UNMEGA_FORM)
return unmegaForm # form number
end end
def hasMegaForm? def hasMegaForm?
megaForm = self.getMegaForm megaForm = self.getMegaForm
return megaForm>0 && megaForm!=self.formSimple return megaForm > 0 && megaForm != self.formSimple
end end
def mega? def mega?
megaForm = self.getMegaForm megaForm = self.getMegaForm
return megaForm>0 && megaForm==self.formSimple return megaForm > 0 && megaForm == self.formSimple
end end
alias isMega? mega? alias isMega? mega?
def makeMega def makeMega
megaForm = self.getMegaForm megaForm = self.getMegaForm
self.form = megaForm if megaForm>0 self.form = megaForm if megaForm > 0
end end
def makeUnmega def makeUnmega
unmegaForm = self.getUnmegaForm unmegaForm = self.getUnmegaForm
self.form = unmegaForm if unmegaForm>=0 self.form = unmegaForm if unmegaForm >= 0
end end
def megaName def megaName
formName = pbGetMessage(MessageTypes::FormNames,self.fSpecies) formName = species_data.form_name
return (formName && formName!="") ? formName : _INTL("Mega {1}",PBSpecies.getName(@species)) return (formName && !formName.empty?) ? formName : _INTL("Mega {1}", species_data.name)
end end
def megaMessage # 0=default message, 1=Rayquaza message def megaMessage # 0=default message, 1=Rayquaza message
return pbGetSpeciesData(@species,getMegaForm,SpeciesData::MEGA_MESSAGE) return species_data.mega_message
end end
end end
@@ -50,9 +50,8 @@ def pbPurify(pokemon,scene)
pbChangeLevel(pokemon,newlevel,scene) # for convenience pbChangeLevel(pokemon,newlevel,scene) # for convenience
pokemon.exp = newexp pokemon.exp = newexp
end end
speciesname = PBSpecies.getName(pokemon.species) if scene.pbConfirm(_INTL("Would you like to give a nickname to {1}?", pokemon.speciesName))
if scene.pbConfirm(_INTL("Would you like to give a nickname to {1}?",speciesname)) newname = pbEnterPokemonName(_INTL("{1}'s nickname?", pokemon.speciesName),
newname = pbEnterPokemonName(_INTL("{1}'s nickname?",speciesname),
0, Pokemon::MAX_NAME_SIZE, "", pokemon) 0, Pokemon::MAX_NAME_SIZE, "", pokemon)
pokemon.name = newname if newname!="" pokemon.name = newname if newname!=""
end end
@@ -281,8 +280,8 @@ class Pokemon
self.savedev = [0,0,0,0,0,0] self.savedev = [0,0,0,0,0,0]
self.shadowmoves = [] self.shadowmoves = []
# Retrieve Shadow moveset for this Pokémon # Retrieve Shadow moveset for this Pokémon
shadow_moveset = pbLoadShadowMovesets[self.fSpecies] shadow_moveset = pbLoadShadowMovesets[species_data.id]
shadow_moveset = pbLoadShadowMovesets[self.species] if !shadow_moveset || shadow_moveset.length == 0 shadow_moveset = pbLoadShadowMovesets[@species] if !shadow_moveset || shadow_moveset.length == 0
# Record this Pokémon's Shadow moves # Record this Pokémon's Shadow moves
if shadow_moveset && shadow_moveset.length > 0 if shadow_moveset && shadow_moveset.length > 0
for i in 0...[shadow_moveset.length, MAX_MOVES].min for i in 0...[shadow_moveset.length, MAX_MOVES].min
@@ -98,33 +98,6 @@ module PBEvolution
end end
end end
#===============================================================================
# Evolutions data cache
#===============================================================================
class PokemonTemp
attr_accessor :evolutionsData
end
def pbLoadEvolutionsData
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.evolutionsData
$PokemonTemp.evolutionsData = load_data("Data/species_evolutions.dat") || []
end
return $PokemonTemp.evolutionsData
end
def pbGetEvolutionData(species)
species = getID(PBSpecies,species)
evosData = pbLoadEvolutionsData
return evosData[species] || nil
end
alias __evolutionsData__pbClearData pbClearData
def pbClearData
$PokemonTemp.evolutionsData = nil if $PokemonTemp
__evolutionsData__pbClearData
end
#=============================================================================== #===============================================================================
# Evolution helper functions # Evolution helper functions
#=============================================================================== #===============================================================================
@@ -133,7 +106,7 @@ module EvolutionHelper
def evolutions(species, ignore_none = false) def evolutions(species, ignore_none = false)
ret = [] ret = []
evoData = pbGetEvolutionData(species) evoData = GameData::Species.get(species).evolutions
return ret if !evoData || evoData.length == 0 return ret if !evoData || evoData.length == 0
evoData.each do |evo| evoData.each do |evo|
next if evo[3] # Is the prevolution next if evo[3] # Is the prevolution
@@ -143,9 +116,10 @@ module EvolutionHelper
return ret return ret
end end
def family_evolutions(species) def family_evolutions(species, ignore_none = true)
evos = self.evolutions(species, true) evos = self.evolutions(species, ignore_none)
return nil if evos.length == 0 return nil if evos.length == 0
evos.sort! { |a, b| GameData::Species.get(a[2]).id_number <=> GameData::Species.get(b[2]).id_number }
ret = [] ret = []
for i in 0...evos.length for i in 0...evos.length
ret.push([species].concat(evos[i])) ret.push([species].concat(evos[i]))
@@ -155,8 +129,15 @@ module EvolutionHelper
return ret return ret
end end
def all_related_species(species)
species = self.baby_species(species)
evos = self.family_evolutions(species, false)
return [species] if !evos || evos.length == 0
return [species].concat(evos.map { |e| e[3] }).uniq
end
def previous_species(species) def previous_species(species)
evoData = pbGetEvolutionData(species) evoData = GameData::Species.get(species).evolutions
return species if !evoData || evoData.length == 0 return species if !evoData || evoData.length == 0
evoData.each do |evo| evoData.each do |evo|
return evo[0] if evo[3] # Is the prevolution return evo[0] if evo[3] # Is the prevolution
@@ -166,12 +147,12 @@ module EvolutionHelper
def baby_species(species, check_items = false, item1 = nil, item2 = nil) def baby_species(species, check_items = false, item1 = nil, item2 = nil)
ret = species ret = species
evoData = pbGetEvolutionData(species) evoData = GameData::Species.get(species).evolutions
return ret if !evoData || evoData.length == 0 return ret if !evoData || evoData.length == 0
evoData.each do |evo| evoData.each do |evo|
next if !evo[3] # Not the prevolution next if !evo[3] # Not the prevolution
if check_items if check_items
incense = pbGetSpeciesData(evo[0], 0, SpeciesData::INCENSE) incense = GameData::Species.get(evo[0]).incense
ret = evo[0] if !incense || item1 == incense || item2 == incense ret = evo[0] if !incense || item1 == incense || item2 == incense
else else
ret = evo[0] # Species of prevolution ret = evo[0] # Species of prevolution
@@ -183,7 +164,7 @@ module EvolutionHelper
end end
def minimum_level(species) def minimum_level(species)
evoData = pbGetEvolutionData(species) evoData = GameData::Species.get(species).evolutions
return 1 if !evoData || evoData.length == 0 return 1 if !evoData || evoData.length == 0
ret = -1 ret = -1
evoData.each do |evo| evoData.each do |evo|
@@ -203,11 +184,11 @@ module EvolutionHelper
return false if !evos || evos.length == 0 return false if !evos || evos.length == 0
for evo in evos for evo in evos
if method.is_a?(Array) if method.is_a?(Array)
next if !method.include?(evo[0]) next if !method.include?(evo[1])
elsif method >= 0 elsif method >= 0
next if evo[0] != method next if evo[1] != method
end end
next if param && evo[1] != param next if param && evo[2] != param
return true return true
end end
return false return false
@@ -270,39 +251,40 @@ end
#=============================================================================== #===============================================================================
def pbMiniCheckEvolution(pkmn, method, parameter, new_species) def pbMiniCheckEvolution(pkmn, method, parameter, new_species)
success = PBEvolution.call("levelUpCheck", method, pkmn, parameter) success = PBEvolution.call("levelUpCheck", method, pkmn, parameter)
return (success) ? new_species : -1 return (success) ? new_species : nil
end end
def pbMiniCheckEvolutionItem(pkmn, method, parameter, new_species, item) def pbMiniCheckEvolutionItem(pkmn, method, parameter, new_species, item)
success = PBEvolution.call("itemCheck", method, pkmn, parameter, item) success = PBEvolution.call("itemCheck", method, pkmn, parameter, item)
return (success) ? new_species : -1 return (success) ? new_species : nil
end end
# Checks whether a Pokemon can evolve now. If a block is given, calls the block # Checks whether a Pokemon can evolve now. If a block is given, calls the block
# with the following parameters: # with the following parameters:
# Pokemon to check; evolution method; parameter; ID of the new species # Pokemon to check; evolution method; parameter; ID of the new species
def pbCheckEvolutionEx(pokemon) def pbCheckEvolutionEx(pkmn)
return -1 if pokemon.species<=0 || pokemon.egg? || pokemon.shadowPokemon? return nil if !pkmn.species || pokemon.egg? || pokemon.shadowPokemon?
return -1 if pokemon.hasItem?(:EVERSTONE) return nil if pkmn.hasItem?(:EVERSTONE)
return -1 if pokemon.hasAbility?(:BATTLEBOND) return nil if pkmn.hasAbility?(:BATTLEBOND)
ret = -1 ret = nil
for form in EvolutionHelper.evolutions(pbGetFSpeciesFromForm(pokemon.species,pokemon.form), true) pkmn.species_data.evolutions.each do |evo|
ret = yield pokemon,form[0],form[1],form[2] next if evo[3] # Prevolution
break if ret>0 ret = yield pkmn, evo[1], evo[2], evo[0] # pkmn, method, parameter, new_species
break if ret
end end
return ret return ret
end end
# Checks whether a Pokemon can evolve now. If an item is used on the Pokémon, # Checks whether a Pokemon can evolve now. If an item is used on the Pokémon,
# checks whether the Pokemon can evolve with the given item. # checks whether the Pokemon can evolve with the given item.
def pbCheckEvolution(pokemon,item=nil) def pbCheckEvolution(pkmn, item = nil)
if item if item
return pbCheckEvolutionEx(pokemon) { |pokemon,evonib,level,poke| return pbCheckEvolutionEx(pkmn) { |pkmn, method, parameter, new_species|
next pbMiniCheckEvolutionItem(pokemon,evonib,level,poke,item) next pbMiniCheckEvolutionItem(pkmn, method, parameter, new_species, item)
} }
else else
return pbCheckEvolutionEx(pokemon) { |pokemon,evonib,level,poke| return pbCheckEvolutionEx(pkmn) { |pkmn, method, parameter, new_species|
next pbMiniCheckEvolution(pokemon,evonib,level,poke) next pbMiniCheckEvolution(pkmn, method, parameter, new_species)
} }
end end
end end
@@ -662,7 +644,7 @@ PBEvolution.register(:HasMoveType, {
PBEvolution.register(:HasInParty, { PBEvolution.register(:HasInParty, {
"minimumLevel" => 1, # Needs any level up "minimumLevel" => 1, # Needs any level up
"parameterType" => :PBSpecies, "parameterType" => :Species,
"levelUpCheck" => proc { |pkmn, parameter| "levelUpCheck" => proc { |pkmn, parameter|
next pbHasSpecies?(parameter) next pbHasSpecies?(parameter)
} }
@@ -779,7 +761,7 @@ PBEvolution.register(:TradeItem, {
}) })
PBEvolution.register(:TradeSpecies, { PBEvolution.register(:TradeSpecies, {
"parameterType" => :PBSpecies, "parameterType" => :Species,
"tradeCheck" => proc { |pkmn, parameter, other_pkmn| "tradeCheck" => proc { |pkmn, parameter, other_pkmn|
next pkmn.species == parameter && !other_pkmn.hasItem?(:EVERSTONE) next pkmn.species == parameter && !other_pkmn.hasItem?(:EVERSTONE)
} }
@@ -5,7 +5,7 @@ end
def pbChatter(pokemon) def pbChatter(pokemon)
iconwindow=PictureWindow.new(pbLoadPokemonBitmap(pokemon)) iconwindow=PictureWindow.new(GameData::Species.sprite_bitmap_from_pokemon(pokemon))
iconwindow.x=(Graphics.width/2)-(iconwindow.width/2) iconwindow.x=(Graphics.width/2)-(iconwindow.width/2)
iconwindow.y=((Graphics.height-96)/2)-(iconwindow.height/2) iconwindow.y=((Graphics.height-96)/2)-(iconwindow.height/2)
if pokemon.chatter if pokemon.chatter
@@ -40,7 +40,7 @@ HiddenMoveHandlers::UseMove.add(:CHATTER,proc { |move,pokemon|
class PokeBattle_Scene class PokeBattle_Scene
def pbChatter(user,_target) def pbChatter(user,_target)
pbPlayCry(user.pokemon,90,100) if user.pokemon GameData::Species.play_cry_from_pokemon(user.pokemon, nil, 100) if user.pokemon
Graphics.frame_rate.times do Graphics.frame_rate.times do
Graphics.update Graphics.update
Input.update Input.update
@@ -48,7 +48,7 @@ class PokemonSprite < SpriteWrapper
def setPokemonBitmap(pokemon,back=false) def setPokemonBitmap(pokemon,back=false)
@_iconbitmap.dispose if @_iconbitmap @_iconbitmap.dispose if @_iconbitmap
@_iconbitmap = (pokemon) ? pbLoadPokemonBitmap(pokemon,back) : nil @_iconbitmap = (pokemon) ? GameData::Species.sprite_bitmap_from_pokemon(pokemon, back) : nil
self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil
self.color = Color.new(0,0,0,0) self.color = Color.new(0,0,0,0)
changeOrigin changeOrigin
@@ -56,14 +56,14 @@ class PokemonSprite < SpriteWrapper
def setPokemonBitmapSpecies(pokemon,species,back=false) def setPokemonBitmapSpecies(pokemon,species,back=false)
@_iconbitmap.dispose if @_iconbitmap @_iconbitmap.dispose if @_iconbitmap
@_iconbitmap = (pokemon) ? pbLoadPokemonBitmapSpecies(pokemon,species,back) : nil @_iconbitmap = (pokemon) ? GameData::Species.sprite_bitmap_from_pokemon(pokemon, back, species) : nil
self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil
changeOrigin changeOrigin
end end
def setSpeciesBitmap(species,female=false,form=0,shiny=false,shadow=false,back=false,egg=false) def setSpeciesBitmap(species, gender = 0, form = 0, shiny = false, shadow = false, back = false, egg = false)
@_iconbitmap.dispose if @_iconbitmap @_iconbitmap.dispose if @_iconbitmap
@_iconbitmap = pbLoadSpeciesBitmap(species,female,form,shiny,shadow,back,egg) @_iconbitmap = GameData::Species.sprite_bitmap(species, form, gender, shiny, shadow, back, egg)
self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil
changeOrigin changeOrigin
end end
@@ -129,7 +129,7 @@ class PokemonIconSprite < SpriteWrapper
@counter = 0 @counter = 0
return return
end end
@animBitmap = AnimatedBitmap.new(pbPokemonIconFile(value)) @animBitmap = AnimatedBitmap.new(GameData::Species.icon_filename_from_pokemon(value))
self.bitmap = @animBitmap.bitmap self.bitmap = @animBitmap.bitmap
self.src_rect.width = @animBitmap.height self.src_rect.width = @animBitmap.height
self.src_rect.height = @animBitmap.height self.src_rect.height = @animBitmap.height
@@ -307,12 +307,13 @@ class PokemonSpeciesIconSprite < SpriteWrapper
def refresh def refresh
@animBitmap.dispose if @animBitmap @animBitmap.dispose if @animBitmap
@animBitmap = nil @animBitmap = nil
bitmapFileName = pbCheckPokemonIconFiles([@species,(@gender==1),@shiny,@form,false]) bitmapFileName = GameData::Species.icon_filename(@species, @form, @gender, @shiny)
return if !bitmapFileName
@animBitmap = AnimatedBitmap.new(bitmapFileName) @animBitmap = AnimatedBitmap.new(bitmapFileName)
self.bitmap = @animBitmap.bitmap self.bitmap = @animBitmap.bitmap
self.src_rect.width = @animBitmap.height self.src_rect.width = @animBitmap.height
self.src_rect.height = @animBitmap.height self.src_rect.height = @animBitmap.height
@numFrames = @animBitmap.width/@animBitmap.height @numFrames = @animBitmap.width / @animBitmap.height
@currentFrame = 0 if @currentFrame>=@numFrames @currentFrame = 0 if @currentFrame>=@numFrames
changeOrigin changeOrigin
end end
@@ -331,34 +332,3 @@ class PokemonSpeciesIconSprite < SpriteWrapper
self.src_rect.x = self.src_rect.width*@currentFrame self.src_rect.x = self.src_rect.width*@currentFrame
end end
end end
#===============================================================================
# Sprite position adjustments
#===============================================================================
def pbApplyBattlerMetricsToSprite(sprite,index,species,shadow=false,metrics=nil)
metrics = pbLoadSpeciesMetrics if !metrics
if shadow
if (index&1)==1 # Foe Pokémon
sprite.x += (metrics[SpeciesData::METRIC_SHADOW_X][species] || 0)*2
end
else
if (index&1)==0 # Player's Pokémon
sprite.x += (metrics[SpeciesData::METRIC_PLAYER_X][species] || 0)*2
sprite.y += (metrics[SpeciesData::METRIC_PLAYER_Y][species] || 0)*2
else # Foe Pokémon
sprite.x += (metrics[SpeciesData::METRIC_ENEMY_X][species] || 0)*2
sprite.y += (metrics[SpeciesData::METRIC_ENEMY_Y][species] || 0)*2
sprite.y -= (metrics[SpeciesData::METRIC_ALTITUDE][species] || 0)*2
end
end
end
# NOTE: The species parameter here is typically the fSpecies, which contains
# information about both the species and the form.
def showShadow?(species)
return true
# metrics = pbLoadSpeciesMetrics
# return (metrics[SpeciesData::METRIC_ALTITUDE][species] || 0)>0
end
+1 -1
View File
@@ -128,7 +128,7 @@ class PokemonPauseMenu
elsif pbInBugContest? elsif pbInBugContest?
if pbBugContestState.lastPokemon if pbBugContestState.lastPokemon
@scene.pbShowInfo(_INTL("Caught: {1}\nLevel: {2}\nBalls: {3}", @scene.pbShowInfo(_INTL("Caught: {1}\nLevel: {2}\nBalls: {3}",
PBSpecies.getName(pbBugContestState.lastPokemon.species), pbBugContestState.lastPokemon.speciesName,
pbBugContestState.lastPokemon.level, pbBugContestState.lastPokemon.level,
pbBugContestState.ballcount)) pbBugContestState.ballcount))
else else
@@ -103,7 +103,7 @@ class PokemonPokedexMenuScreen
commands[i] = dexnames[index] commands[i] = dexnames[index]
end end
end end
index = -1 if index>=$PokemonGlobal.pokedexUnlocked.length-1 index = -1 if index >= $PokemonGlobal.pokedexUnlocked.length - 1
commands2[i] = [$Trainer.pokedexSeen(index), commands2[i] = [$Trainer.pokedexSeen(index),
$Trainer.pokedexOwned(index), $Trainer.pokedexOwned(index),
pbGetRegionalDexLength(index)] pbGetRegionalDexLength(index)]
+30 -33
View File
@@ -300,45 +300,39 @@ class PokemonPokedex_Scene
return index return index
end end
def pbCanAddForModeList?(mode,nationalSpecies) def pbCanAddForModeList?(mode, species)
case mode case mode
when MODENUMERICAL
return true
when MODEATOZ when MODEATOZ
return $Trainer.seen[nationalSpecies] return $Trainer.seen[species]
when MODEHEAVIEST, MODELIGHTEST, MODETALLEST, MODESMALLEST when MODEHEAVIEST, MODELIGHTEST, MODETALLEST, MODESMALLEST
return $Trainer.owned[nationalSpecies] return $Trainer.owned[species]
end end
return true # For MODENUMERICAL
end end
def pbGetDexList def pbGetDexList
dexlist = []
speciesData = pbLoadSpeciesData
region = pbGetPokedexRegion region = pbGetPokedexRegion
regionalSpecies = pbAllRegionalSpecies(region) regionalSpecies = pbAllRegionalSpecies(region)
if regionalSpecies.length==1 if !regionalSpecies || regionalSpecies.length == 0
# If no Regional Dex defined for the given region, use National Pokédex # If no Regional Dex defined for the given region, use the National Pokédex
for i in 1..PBSpecies.maxValue regionalSpecies = []
regionalSpecies.push(i) GameData::Species.each { |s| regionalSpecies.push(s.id) if s.form == 0 }
end end
end
for i in 1...regionalSpecies.length
nationalSpecies = regionalSpecies[i]
if pbCanAddForModeList?($PokemonGlobal.pokedexMode,nationalSpecies)
form = $Trainer.formlastseen[nationalSpecies][1] || 0
fspecies = pbGetFSpeciesFromForm(nationalSpecies,form)
color = speciesData[fspecies][SpeciesData::COLOR] || 0
type1 = speciesData[fspecies][SpeciesData::TYPE1]
type2 = speciesData[fspecies][SpeciesData::TYPE2] || type1
shape = speciesData[fspecies][SpeciesData::SHAPE] || 0
height = speciesData[fspecies][SpeciesData::HEIGHT] || 1
weight = speciesData[fspecies][SpeciesData::WEIGHT] || 1
shift = DEXES_WITH_OFFSETS.include?(region) shift = DEXES_WITH_OFFSETS.include?(region)
dexlist.push([nationalSpecies,PBSpecies.getName(nationalSpecies), ret = []
height,weight,i,shift,type1,type2,color,shape]) regionalSpecies.each_with_index do |species, i|
next if !species
next if !pbCanAddForModeList?($PokemonGlobal.pokedexMode, species)
species_data = GameData::Species.get(species)
color = species_data.color
type1 = species_data.type1
type2 = species_data.type2 || type1
shape = species_data.shape
height = species_data.height
weight = species_data.weight
ret.push([species, species_data.name, height, weight, i + 1, shift, type1, type2, color, shape])
end end
end return ret
return dexlist
end end
def pbRefreshDexList(index=0) def pbRefreshDexList(index=0)
@@ -348,7 +342,8 @@ class PokemonPokedex_Scene
# Hide the Dex number 0 species if unseen # Hide the Dex number 0 species if unseen
dexlist[0] = nil if dexlist[0][5] && !$Trainer.seen[dexlist[0][0]] dexlist[0] = nil if dexlist[0][5] && !$Trainer.seen[dexlist[0][0]]
# Remove unseen species from the end of the list # Remove unseen species from the end of the list
i = dexlist.length-1; loop do break unless i>=0 i = dexlist.length-1
loop do break unless i>=0
break if !dexlist[i] || $Trainer.seen[dexlist[i][0]] break if !dexlist[i] || $Trainer.seen[dexlist[i][0]]
dexlist[i] = nil dexlist[i] = nil
i -= 1 i -= 1
@@ -385,7 +380,7 @@ class PokemonPokedex_Scene
base = Color.new(88,88,80) base = Color.new(88,88,80)
shadow = Color.new(168,184,184) shadow = Color.new(168,184,184)
iconspecies = @sprites["pokedex"].species iconspecies = @sprites["pokedex"].species
iconspecies = 0 if !$Trainer.seen[iconspecies] iconspecies = nil if !$Trainer.seen[iconspecies]
# Write various bits of text # Write various bits of text
dexname = _INTL("Pokédex") dexname = _INTL("Pokédex")
if $PokemonGlobal.pokedexUnlocked.length>1 if $PokemonGlobal.pokedexUnlocked.length>1
@@ -397,7 +392,7 @@ class PokemonPokedex_Scene
textpos = [ textpos = [
[dexname,Graphics.width/2,2,2,Color.new(248,248,248),Color.new(0,0,0)] [dexname,Graphics.width/2,2,2,Color.new(248,248,248),Color.new(0,0,0)]
] ]
textpos.push([PBSpecies.getName(iconspecies),112,52,2,base,shadow]) if iconspecies>0 textpos.push([GameData::Species.get(iconspecies).name,112,52,2,base,shadow]) if iconspecies
if @searchResults if @searchResults
textpos.push([_INTL("Search results"),112,308,2,base,shadow]) textpos.push([_INTL("Search results"),112,308,2,base,shadow])
textpos.push([@dexlist.length.to_s,112,340,2,base,shadow]) textpos.push([@dexlist.length.to_s,112,340,2,base,shadow])
@@ -678,9 +673,11 @@ class PokemonPokedex_Scene
end end
def setIconBitmap(species) def setIconBitmap(species)
gender = ($Trainer.formlastseen[species][0] rescue 0) $Trainer.formlastseen = {} if !$Trainer.formlastseen
form = ($Trainer.formlastseen[species][1] rescue 0) $Trainer.formlastseen[species] = [] if !$Trainer.formlastseen[species]
@sprites["icon"].setSpeciesBitmap(species,(gender==1),form) gender = $Trainer.formlastseen[species][0] || 0
form = $Trainer.formlastseen[species][1] || 0
@sprites["icon"].setSpeciesBitmap(species, gender, form)
end end
def pbSearchDexList(params) def pbSearchDexList(params)
+96 -107
View File
@@ -54,7 +54,7 @@ class PokemonPokedexInfo_Scene
@sprites["formback"] = PokemonSprite.new(@viewport) @sprites["formback"] = PokemonSprite.new(@viewport)
@sprites["formback"].setOffset(PictureOrigin::Bottom) @sprites["formback"].setOffset(PictureOrigin::Bottom)
@sprites["formback"].x = 382 # y is set below as it depends on metrics @sprites["formback"].x = 382 # y is set below as it depends on metrics
@sprites["formicon"] = PokemonSpeciesIconSprite.new(0,@viewport) @sprites["formicon"] = PokemonSpeciesIconSprite.new(nil, @viewport)
@sprites["formicon"].setOffset(PictureOrigin::Center) @sprites["formicon"].setOffset(PictureOrigin::Center)
@sprites["formicon"].x = 82 @sprites["formicon"].x = 82
@sprites["formicon"].y = 328 @sprites["formicon"].y = 328
@@ -79,20 +79,18 @@ class PokemonPokedexInfo_Scene
def pbStartSceneBrief(species) # For standalone access, shows first page only def pbStartSceneBrief(species) # For standalone access, shows first page only
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height) @viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z = 99999 @viewport.z = 99999
# @region = 0
dexnum = species dexnum = species
dexnumshift = false dexnumshift = false
if $PokemonGlobal.pokedexUnlocked[$PokemonGlobal.pokedexUnlocked.length-1] if $PokemonGlobal.pokedexUnlocked[$PokemonGlobal.pokedexUnlocked.length - 1]
dexnumshift = true if DEXES_WITH_OFFSETS.include?(-1) dexnumshift = true if DEXES_WITH_OFFSETS.include?(-1) # National Dex
else else
dexnum = 0 dexnum = 0
for i in 0...$PokemonGlobal.pokedexUnlocked.length-1 for i in 0...$PokemonGlobal.pokedexUnlocked.length - 1 # Regional Dexes
next if !$PokemonGlobal.pokedexUnlocked[i] next if !$PokemonGlobal.pokedexUnlocked[i]
num = pbGetRegionalNumber(i,species) num = pbGetRegionalNumber(i,species)
next if num<=0 next if num <= 0
dexnum = num dexnum = num
dexnumshift = true if DEXES_WITH_OFFSETS.include?(i) dexnumshift = true if DEXES_WITH_OFFSETS.include?(i)
# @region = pbDexNames[i][1] if pbDexNames[i].is_a?(Array)
break break
end end
end end
@@ -132,17 +130,19 @@ class PokemonPokedexInfo_Scene
def pbUpdateDummyPokemon def pbUpdateDummyPokemon
@species = @dexlist[@index][0] @species = @dexlist[@index][0]
@gender = ($Trainer.formlastseen[@species][0] rescue 0) $Trainer.formlastseen = {} if !$Trainer.formlastseen
@form = ($Trainer.formlastseen[@species][1] rescue 0) $Trainer.formlastseen[@species] = [] if !$Trainer.formlastseen[@species]
@sprites["infosprite"].setSpeciesBitmap(@species,(@gender==1),@form) @gender = $Trainer.formlastseen[@species][0] || 0
@form = $Trainer.formlastseen[@species][1] || 0
species_data = GameData::Species.get_species_form(@species, @form)
@sprites["infosprite"].setSpeciesBitmap(@species,@gender,@form)
if @sprites["formfront"] if @sprites["formfront"]
@sprites["formfront"].setSpeciesBitmap(@species,(@gender==1),@form) @sprites["formfront"].setSpeciesBitmap(@species,@gender,@form)
end end
if @sprites["formback"] if @sprites["formback"]
@sprites["formback"].setSpeciesBitmap(@species,(@gender==1),@form,false,false,true) @sprites["formback"].setSpeciesBitmap(@species,@gender,@form,false,false,true)
@sprites["formback"].y = 256 @sprites["formback"].y = 256
fSpecies = pbGetFSpeciesFromForm(@species,@form) @sprites["formback"].y += species_data.back_sprite_y * 2
@sprites["formback"].y += (pbLoadSpeciesMetrics[SpeciesData::METRIC_PLAYER_Y][fSpecies] || 0)*2
end end
if @sprites["formicon"] if @sprites["formicon"]
@sprites["formicon"].pbSetParams(@species,@gender,@form) @sprites["formicon"].pbSetParams(@species,@gender,@form)
@@ -150,53 +150,44 @@ class PokemonPokedexInfo_Scene
end end
def pbGetAvailableForms def pbGetAvailableForms
available = [] # [name, gender, form] ret = []
formdata = pbLoadFormToSpecies multiple_forms = false
possibleforms = [] # Find all genders/forms of @species that have been seen
multiforms = false GameData::Species.each do |sp|
if formdata[@species] next if sp.species != @species
for i in 0...formdata[@species].length next if sp.form != 0 && (!sp.real_form_name || sp.real_form_name.empty?)
fSpecies = pbGetFSpeciesFromForm(@species,i) next if sp.pokedex_form != sp.form
formname = pbGetMessage(MessageTypes::FormNames,fSpecies) multiple_forms = true if sp.form > 0
genderRate = pbGetSpeciesData(@species,i,SpeciesData::GENDER_RATE) $Trainer.formseen[@species] = [[], []] if !$Trainer.formseen[@species]
if i==0 || (formname && formname!="") case sp.gender_rate
multiforms = true if i>0 when PBGenderRates::AlwaysMale, PBGenderRates::AlwaysFemale, PBGenderRates::Genderless
case genderRate real_gender = (sp.gender_rate == PBGenderRates::AlwaysFemale) ? 1 : 0
when PBGenderRates::AlwaysMale, next if !$Trainer.formseen[@species][real_gender][sp.form] && !DEX_SHOWS_ALL_FORMS
PBGenderRates::AlwaysFemale, real_gender = 2 if sp.gender_rate == PBGenderRates::Genderless
PBGenderRates::Genderless ret.push([sp.form_name, real_gender, sp.form])
gendertopush = (genderRate==PBGenderRates::AlwaysFemale) ? 1 : 0
if $Trainer.formseen[@species][gendertopush][i] || DEX_SHOWS_ALL_FORMS
gendertopush = 2 if genderRate==PBGenderRates::Genderless
possibleforms.push([i,gendertopush,formname])
end
else # Both male and female else # Both male and female
for g in 0...2 for real_gender in 0...2
if $Trainer.formseen[@species][g][i] || DEX_SHOWS_ALL_FORMS next if !$Trainer.formseen[@species][real_gender][sp.form] && !DEX_SHOWS_ALL_FORMS
possibleforms.push([i,g,formname]) ret.push([sp.form_name, real_gender, sp.form])
break if (formname && formname!="") break if sp.form_name && !sp.form_name.empty? # Only show 1 entry for each non-0 form
end end
end end
end end
end # Sort all entries
end ret.sort! { |a, b| (a[2] == b[2]) ? a[1] <=> b[1] : a[2] <=> b[2] }
end # Create form names for entries if they don't already exist
for thisform in possibleforms ret.each do |entry|
if thisform[2] && thisform[2]!="" # Has a form name if !entry[0] || entry[0].empty? # Necessarily applies only to form 0
thisformname = thisform[2] case entry[1]
else # Necessarily applies only to form 0 when 0 then entry[0] = _INTL("Male")
case thisform[1] when 1 then entry[0] = _INTL("Female")
when 0 then thisformname = _INTL("Male")
when 1 then thisformname = _INTL("Female")
else else
thisformname = (multiforms) ? _INTL("One Form") : _INTL("Genderless") entry[0] = (multiple_forms) ? _INTL("One Form") : _INTL("Genderless")
end end
end end
# Push to available array entry[1] = 0 if entry[1] == 2 # Genderless entries are treated as male
gendertopush = (thisform[1]==2) ? 0 : thisform[1]
available.push([thisformname,gendertopush,thisform[0]])
end end
return available return ret
end end
def drawPage(page) def drawPage(page)
@@ -221,82 +212,78 @@ class PokemonPokedexInfo_Scene
def drawPageInfo def drawPageInfo
@sprites["background"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_info")) @sprites["background"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_info"))
overlay = @sprites["overlay"].bitmap overlay = @sprites["overlay"].bitmap
base = Color.new(88,88,80) base = Color.new(88, 88, 80)
shadow = Color.new(168,184,184) shadow = Color.new(168, 184, 184)
imagepos = [] imagepos = []
if @brief if @brief
imagepos.push([_INTL("Graphics/Pictures/Pokedex/overlay_info"),0,0]) imagepos.push([_INTL("Graphics/Pictures/Pokedex/overlay_info"), 0, 0])
end end
species_data = GameData::Species.get_species_form(@species, @form)
# Write various bits of text # Write various bits of text
indexText = "???" indexText = "???"
if @dexlist[@index][4]>0 if @dexlist[@index][4] > 0
indexNumber = @dexlist[@index][4] indexNumber = @dexlist[@index][4]
indexNumber -= 1 if @dexlist[@index][5] indexNumber -= 1 if @dexlist[@index][5]
indexText = sprintf("%03d",indexNumber) indexText = sprintf("%03d", indexNumber)
end end
textpos = [ textpos = [
[_INTL("{1}{2} {3}",indexText," ",PBSpecies.getName(@species)), [_INTL("{1}{2} {3}", indexText, " ", species_data.name),
246,42,0,Color.new(248,248,248),Color.new(0,0,0)], 246, 42, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)],
[_INTL("Height"),314,158,0,base,shadow], [_INTL("Height"), 314, 158, 0, base, shadow],
[_INTL("Weight"),314,190,0,base,shadow] [_INTL("Weight"), 314, 190, 0, base, shadow]
] ]
if $Trainer.owned[@species] if $Trainer.owned[@species]
speciesData = pbGetSpeciesData(@species,@form) # Write the category
fSpecies = pbGetFSpeciesFromForm(@species,@form) textpos.push([_INTL("{1} Pokémon", species_data.category), 246, 74, 0, base, shadow])
# Write the kind
kind = pbGetMessage(MessageTypes::Kinds,fSpecies)
kind = pbGetMessage(MessageTypes::Kinds,@species) if !kind || kind==""
textpos.push([_INTL("{1} Pokémon",kind),246,74,0,base,shadow])
# Write the height and weight # Write the height and weight
height = speciesData[SpeciesData::HEIGHT] || 1 height = species_data.height
weight = speciesData[SpeciesData::WEIGHT] || 1 weight = species_data.weight
if pbGetCountry==0xF4 # If the user is in the United States if pbGetCountry == 0xF4 # If the user is in the United States
inches = (height/0.254).round inches = (height / 0.254).round
pounds = (weight/0.45359).round pounds = (weight / 0.45359).round
textpos.push([_ISPRINTF("{1:d}'{2:02d}\"",inches/12,inches%12),460,158,1,base,shadow]) textpos.push([_ISPRINTF("{1:d}'{2:02d}\"", inches / 12, inches % 12), 460, 158, 1, base, shadow])
textpos.push([_ISPRINTF("{1:4.1f} lbs.",pounds/10.0),494,190,1,base,shadow]) textpos.push([_ISPRINTF("{1:4.1f} lbs.", pounds / 10.0), 494, 190, 1, base, shadow])
else else
textpos.push([_ISPRINTF("{1:.1f} m",height/10.0),470,158,1,base,shadow]) textpos.push([_ISPRINTF("{1:.1f} m", height / 10.0), 470, 158, 1, base, shadow])
textpos.push([_ISPRINTF("{1:.1f} kg",weight/10.0),482,190,1,base,shadow]) textpos.push([_ISPRINTF("{1:.1f} kg", weight / 10.0), 482, 190, 1, base, shadow])
end end
# Draw the Pokédex entry text # Draw the Pokédex entry text
entry = pbGetMessage(MessageTypes::Entries,fSpecies) drawTextEx(overlay, 40, 240, Graphics.width - (40 * 2), 4, # overlay, x, y, width, num lines
entry = pbGetMessage(MessageTypes::Entries,@species) if !entry || entry=="" species_data.pokedex_entry, base, shadow)
drawTextEx(overlay,40,240,Graphics.width-(40*2),4,entry,base,shadow)
# Draw the footprint # Draw the footprint
footprintfile = pbPokemonFootprintFile(@species,@form) footprintfile = GameData::Species.footprint_filename(@species, @form)
if footprintfile if footprintfile
footprint = BitmapCache.load_bitmap(footprintfile) footprint = BitmapCache.load_bitmap(footprintfile)
overlay.blt(226,138,footprint,footprint.rect) overlay.blt(226, 138, footprint, footprint.rect)
footprint.dispose footprint.dispose
end end
# Show the owned icon # Show the owned icon
imagepos.push(["Graphics/Pictures/Pokedex/icon_own",212,44]) imagepos.push(["Graphics/Pictures/Pokedex/icon_own", 212, 44])
# Draw the type icon(s) # Draw the type icon(s)
type1 = speciesData[SpeciesData::TYPE1] type1 = species_data.type1
type2 = speciesData[SpeciesData::TYPE2] || type1 type2 = species_data.type2
type1_number = GameData::Type.get(type1).id_number type1_number = GameData::Type.get(type1).id_number
type2_number = GameData::Type.get(type2).id_number type2_number = GameData::Type.get(type2).id_number
type1rect = Rect.new(0,type1_number*32,96,32) type1rect = Rect.new(0, type1_number * 32, 96, 32)
type2rect = Rect.new(0,type2_number*32,96,32) type2rect = Rect.new(0, type2_number * 32, 96, 32)
overlay.blt(296,120,@typebitmap.bitmap,type1rect) overlay.blt(296, 120, @typebitmap.bitmap, type1rect)
overlay.blt(396,120,@typebitmap.bitmap,type2rect) if type1!=type2 overlay.blt(396, 120, @typebitmap.bitmap, type2rect) if type1 != type2
else else
# Write the kind # Write the category
textpos.push([_INTL("????? Pokémon"),246,74,0,base,shadow]) textpos.push([_INTL("????? Pokémon"), 246, 74, 0, base, shadow])
# Write the height and weight # Write the height and weight
if pbGetCountry()==0xF4 # If the user is in the United States if pbGetCountry == 0xF4 # If the user is in the United States
textpos.push([_INTL("???'??\""),460,158,1,base,shadow]) textpos.push([_INTL("???'??\""), 460, 158, 1, base, shadow])
textpos.push([_INTL("????.? lbs."),494,190,1,base,shadow]) textpos.push([_INTL("????.? lbs."), 494, 190, 1, base, shadow])
else else
textpos.push([_INTL("????.? m"),470,158,1,base,shadow]) textpos.push([_INTL("????.? m"), 470, 158, 1, base, shadow])
textpos.push([_INTL("????.? kg"),482,190,1,base,shadow]) textpos.push([_INTL("????.? kg"), 482, 190, 1, base, shadow])
end end
end end
# Draw all text # Draw all text
pbDrawTextPositions(@sprites["overlay"].bitmap,textpos) pbDrawTextPositions(overlay, textpos)
# Draw all images # Draw all images
pbDrawImagePositions(overlay,imagepos) pbDrawImagePositions(overlay, imagepos)
end end
def drawPageArea def drawPageArea
@@ -374,7 +361,7 @@ class PokemonPokedexInfo_Scene
textpos.push([_INTL("Area unknown"),Graphics.width/2,Graphics.height/2,2,base,shadow]) textpos.push([_INTL("Area unknown"),Graphics.width/2,Graphics.height/2,2,base,shadow])
end end
textpos.push([pbGetMessage(MessageTypes::RegionNames,@region),414,44,2,base,shadow]) textpos.push([pbGetMessage(MessageTypes::RegionNames,@region),414,44,2,base,shadow])
textpos.push([_INTL("{1}'s area",PBSpecies.getName(@species)), textpos.push([_INTL("{1}'s area",GameData::Species.get(@species).name),
Graphics.width/2,352,2,base,shadow]) Graphics.width/2,352,2,base,shadow])
pbDrawTextPositions(overlay,textpos) pbDrawTextPositions(overlay,textpos)
end end
@@ -392,7 +379,7 @@ class PokemonPokedexInfo_Scene
end end
end end
textpos = [ textpos = [
[PBSpecies.getName(@species),Graphics.width/2,Graphics.height-88,2,base,shadow], [GameData::Species.get(@species).name,Graphics.width/2,Graphics.height-88,2,base,shadow],
[formname,Graphics.width/2,Graphics.height-56,2,base,shadow], [formname,Graphics.width/2,Graphics.height-56,2,base,shadow],
] ]
# Draw all text # Draw all text
@@ -432,6 +419,8 @@ class PokemonPokedexInfo_Scene
oldindex = -1 oldindex = -1
loop do loop do
if oldindex!=index if oldindex!=index
$Trainer.formlastseen = {} if !$Trainer.formlastseen
$Trainer.formlastseen[@species] = [] if !$Trainer.formlastseen
$Trainer.formlastseen[@species][0] = @available[index][1] $Trainer.formlastseen[@species][0] = @available[index][1]
$Trainer.formlastseen[@species][1] = @available[index][2] $Trainer.formlastseen[@species][1] = @available[index][2]
pbUpdateDummyPokemon pbUpdateDummyPokemon
@@ -462,7 +451,7 @@ class PokemonPokedexInfo_Scene
end end
def pbScene def pbScene
pbPlayCrySpecies(@species,@form) GameData::Species.play_cry_from_species(@species, @form)
loop do loop do
Graphics.update Graphics.update
Input.update Input.update
@@ -470,7 +459,7 @@ class PokemonPokedexInfo_Scene
dorefresh = false dorefresh = false
if Input.trigger?(Input::A) if Input.trigger?(Input::A)
pbSEStop pbSEStop
pbPlayCrySpecies(@species,@form) if @page==1 GameData::Species.play_cry_from_species(@species, @form) if @page == 1
elsif Input.trigger?(Input::B) elsif Input.trigger?(Input::B)
pbPlayCloseMenuSE pbPlayCloseMenuSE
break break
@@ -491,7 +480,7 @@ class PokemonPokedexInfo_Scene
pbUpdateDummyPokemon pbUpdateDummyPokemon
@available = pbGetAvailableForms @available = pbGetAvailableForms
pbSEStop pbSEStop
(@page==1) ? pbPlayCrySpecies(@species,@form) : pbPlayCursorSE (@page==1) ? GameData::Species.play_cry_from_species(@species, @form) : pbPlayCursorSE
dorefresh = true dorefresh = true
end end
elsif Input.trigger?(Input::DOWN) elsif Input.trigger?(Input::DOWN)
@@ -501,7 +490,7 @@ class PokemonPokedexInfo_Scene
pbUpdateDummyPokemon pbUpdateDummyPokemon
@available = pbGetAvailableForms @available = pbGetAvailableForms
pbSEStop pbSEStop
(@page==1) ? pbPlayCrySpecies(@species,@form) : pbPlayCursorSE (@page==1) ? GameData::Species.play_cry_from_species(@species, @form) : pbPlayCursorSE
dorefresh = true dorefresh = true
end end
elsif Input.trigger?(Input::LEFT) elsif Input.trigger?(Input::LEFT)
@@ -531,14 +520,14 @@ class PokemonPokedexInfo_Scene
end end
def pbSceneBrief def pbSceneBrief
pbPlayCrySpecies(@species,@form) GameData::Species.play_cry_from_species(@species, @form)
loop do loop do
Graphics.update Graphics.update
Input.update Input.update
pbUpdate pbUpdate
if Input.trigger?(Input::A) if Input.trigger?(Input::A)
pbSEStop pbSEStop
pbPlayCrySpecies(@species,@form) GameData::Species.play_cry_from_species(@species, @form)
elsif Input.trigger?(Input::B) elsif Input.trigger?(Input::B)
pbPlayCloseMenuSE pbPlayCloseMenuSE
break break
@@ -574,7 +563,7 @@ class PokemonPokedexInfoScreen
end end
dexnum = pbGetRegionalNumber(region,species) dexnum = pbGetRegionalNumber(region,species)
dexnumshift = DEXES_WITH_OFFSETS.include?(region) dexnumshift = DEXES_WITH_OFFSETS.include?(region)
dexlist = [[species,PBSpecies.getName(species),0,0,dexnum,dexnumshift]] dexlist = [[species,GameData::Species.get(species).name,0,0,dexnum,dexnumshift]]
@scene.pbStartScene(dexlist,0,region) @scene.pbStartScene(dexlist,0,region)
@scene.pbScene @scene.pbScene
@scene.pbEndScene @scene.pbEndScene
+1 -1
View File
@@ -1395,7 +1395,7 @@ def pbChooseTradablePokemon(variableNumber,nameVarNumber,ableProc=nil,allowIneli
end end
def pbChoosePokemonForTrade(variableNumber,nameVarNumber,wanted) def pbChoosePokemonForTrade(variableNumber,nameVarNumber,wanted)
wanted = getID(PBSpecies,wanted) wanted = GameData::Species.get(wanted).species
pbChooseTradablePokemon(variableNumber,nameVarNumber,proc { |pkmn| pbChooseTradablePokemon(variableNumber,nameVarNumber,proc { |pkmn|
next pkmn.species==wanted next pkmn.species==wanted
}) })
+4 -4
View File
@@ -374,7 +374,7 @@ class PokemonSummary_Scene
textpos = [ textpos = [
[_INTL("Dex No."),238,80,0,base,shadow], [_INTL("Dex No."),238,80,0,base,shadow],
[_INTL("Species"),238,112,0,base,shadow], [_INTL("Species"),238,112,0,base,shadow],
[PBSpecies.getName(@pokemon.species),435,112,2,Color.new(64,64,64),Color.new(176,176,176)], [@pokemon.speciesName,435,112,2,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Type"),238,144,0,base,shadow], [_INTL("Type"),238,144,0,base,shadow],
[_INTL("OT"),238,176,0,base,shadow], [_INTL("OT"),238,176,0,base,shadow],
[_INTL("ID No."),238,208,0,base,shadow], [_INTL("ID No."),238,208,0,base,shadow],
@@ -898,7 +898,7 @@ class PokemonSummary_Scene
@sprites["pokemon"].setPokemonBitmap(@pokemon) @sprites["pokemon"].setPokemonBitmap(@pokemon)
@sprites["itemicon"].item = @pokemon.item_id @sprites["itemicon"].item = @pokemon.item_id
pbSEStop pbSEStop
pbPlayCry(@pokemon) GameData::Species.play_cry_from_pokemon(@pokemon)
end end
def pbMoveSelection def pbMoveSelection
@@ -1235,7 +1235,7 @@ class PokemonSummary_Scene
end end
def pbScene def pbScene
pbPlayCry(@pokemon) GameData::Species.play_cry_from_pokemon(@pokemon)
loop do loop do
Graphics.update Graphics.update
Input.update Input.update
@@ -1243,7 +1243,7 @@ class PokemonSummary_Scene
dorefresh = false dorefresh = false
if Input.trigger?(Input::A) if Input.trigger?(Input::A)
pbSEStop pbSEStop
pbPlayCry(@pokemon) GameData::Species.play_cry_from_pokemon(@pokemon)
elsif Input.trigger?(Input::B) elsif Input.trigger?(Input::B)
pbPlayCloseMenuSE pbPlayCloseMenuSE
break break
@@ -29,7 +29,7 @@ class PokemonBoxIcon < IconSprite
def refresh def refresh
return if !@pokemon return if !@pokemon
self.setBitmap(pbPokemonIconFile(@pokemon)) self.setBitmap(GameData::Species.icon_filename_from_pokemon(@pokemon))
self.src_rect = Rect.new(0,0,self.bitmap.height,self.bitmap.height) self.src_rect = Rect.new(0,0,self.bitmap.height,self.bitmap.height)
end end
+9 -10
View File
@@ -24,15 +24,14 @@ class PokemonEggHatch_Scene
@sprites["pokemon"].setOffset(PictureOrigin::Bottom) @sprites["pokemon"].setOffset(PictureOrigin::Bottom)
@sprites["pokemon"].x = Graphics.width/2 @sprites["pokemon"].x = Graphics.width/2
@sprites["pokemon"].y = 264+56 # 56 to offset the egg sprite @sprites["pokemon"].y = 264+56 # 56 to offset the egg sprite
@sprites["pokemon"].setSpeciesBitmap(@pokemon.species,@pokemon.female?, @sprites["pokemon"].setSpeciesBitmap(@pokemon.species, @pokemon.gender,
(@pokemon.form rescue 0),@pokemon.shiny?, @pokemon.form, @pokemon.shiny?,
false,false,true) # Egg sprite false, false, true) # Egg sprite
# Load egg cracks bitmap # Load egg cracks bitmap
crackfilename=sprintf("Graphics/Battlers/%seggCracks", crackfilename = sprintf("Graphics/Battlers/%seggCracks", @pokemon.species)
getConstantName(PBSpecies,@pokemon.species)) rescue nil
if !pbResolveBitmap(crackfilename) if !pbResolveBitmap(crackfilename)
crackfilename=sprintf("Graphics/Battlers/%03deggCracks",@pokemon.species) crackfilename = sprintf("Graphics/Battlers/%03deggCracks", @pokemon.species_data.id_number)
crackfilename=sprintf("Graphics/Battlers/eggCracks") if !pbResolveBitmap(crackfilename) crackfilename = sprintf("Graphics/Battlers/eggCracks") if !pbResolveBitmap(crackfilename)
end end
crackfilename=pbResolveBitmap(crackfilename) crackfilename=pbResolveBitmap(crackfilename)
@hatchSheet=AnimatedBitmap.new(crackfilename) @hatchSheet=AnimatedBitmap.new(crackfilename)
@@ -90,7 +89,7 @@ class PokemonEggHatch_Scene
@sprites["pokemon"].setPokemonBitmap(@pokemon) # Pokémon sprite @sprites["pokemon"].setPokemonBitmap(@pokemon) # Pokémon sprite
@sprites["pokemon"].x = Graphics.width/2 @sprites["pokemon"].x = Graphics.width/2
@sprites["pokemon"].y = 264 @sprites["pokemon"].y = 264
pbApplyBattlerMetricsToSprite(@sprites["pokemon"],1,@pokemon.fSpecies) @pokemon.species_data.apply_metrics_to_sprite(@sprites["pokemon"], 1)
@sprites["hatch"].visible=false @sprites["hatch"].visible=false
for i in 1..fadeTime for i in 1..fadeTime
@sprites["pokemon"].tone=Tone.new(255-i*toneDiff,255-i*toneDiff,255-i*toneDiff) @sprites["pokemon"].tone=Tone.new(255-i*toneDiff,255-i*toneDiff,255-i*toneDiff)
@@ -100,8 +99,8 @@ class PokemonEggHatch_Scene
@sprites["pokemon"].tone=Tone.new(0,0,0) @sprites["pokemon"].tone=Tone.new(0,0,0)
@sprites["overlay"].opacity=0 @sprites["overlay"].opacity=0
# Finish scene # Finish scene
frames=pbCryFrameLength(@pokemon) frames = GameData::Species.cry_length(@pokemon)
pbPlayCry(@pokemon) GameData::Species.play_cry_from_pokemon(@pokemon)
updateScene(frames) updateScene(frames)
pbBGMStop() pbBGMStop()
pbMEPlay("Evolution success") pbMEPlay("Evolution success")
+7 -7
View File
@@ -532,7 +532,7 @@ class PokemonEvolutionScene
metaplayer1.play metaplayer1.play
metaplayer2.play metaplayer2.play
pbBGMStop pbBGMStop
pbPlayCry(@pokemon) GameData::Species.play_cry_from_pokemon(@pokemon)
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_INTL("\\se[]What? {1} is evolving!\\^",@pokemon.name)) { pbUpdate } _INTL("\\se[]What? {1} is evolving!\\^",@pokemon.name)) { pbUpdate }
pbMessageWaitForInput(@sprites["msgwindow"],50,true) { pbUpdate } pbMessageWaitForInput(@sprites["msgwindow"],50,true) { pbUpdate }
@@ -567,17 +567,17 @@ class PokemonEvolutionScene
def pbEvolutionSuccess def pbEvolutionSuccess
# Play cry of evolved species # Play cry of evolved species
frames = pbCryFrameLength(@newspecies,@pokemon.form) frames = GameData::Species.cry_length(@newspecies, @pokemon.form)
pbBGMStop pbBGMStop
pbPlayCrySpecies(@newspecies,@pokemon.form) GameData::Species.play_cry_from_species(@newspecies, @pokemon.form)
frames.times do frames.times do
Graphics.update Graphics.update
pbUpdate pbUpdate
end end
# Success jingle/message # Success jingle/message
pbMEPlay("Evolution success") pbMEPlay("Evolution success")
newspeciesname = PBSpecies.getName(@newspecies) newspeciesname = GameData::Species.get(@newspecies).name
oldspeciesname = PBSpecies.getName(@pokemon.species) is_nicknamed = @pokemon.nicknamed?
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_INTL("\\se[]Congratulations! Your {1} evolved into {2}!\\wt[80]", _INTL("\\se[]Congratulations! Your {1} evolved into {2}!\\wt[80]",
@pokemon.name,newspeciesname)) { pbUpdate } @pokemon.name,newspeciesname)) { pbUpdate }
@@ -586,7 +586,7 @@ class PokemonEvolutionScene
pbEvolutionMethodAfterEvolution pbEvolutionMethodAfterEvolution
# Modify Pokémon to make it evolved # Modify Pokémon to make it evolved
@pokemon.species = @newspecies @pokemon.species = @newspecies
@pokemon.name = newspeciesname if @pokemon.name==oldspeciesname @pokemon.name = newspeciesname if !is_nicknamed
@pokemon.form = 0 if @pokemon.isSpecies?(:MOTHIM) @pokemon.form = 0 if @pokemon.isSpecies?(:MOTHIM)
@pokemon.calcStats @pokemon.calcStats
# See and own evolved species # See and own evolved species
@@ -611,7 +611,7 @@ class PokemonEvolutionScene
def self.pbDuplicatePokemon(pkmn, new_species) def self.pbDuplicatePokemon(pkmn, new_species)
new_pkmn = pkmn.clone new_pkmn = pkmn.clone
new_pkmn.species = new_species new_pkmn.species = new_species
new_pkmn.name = PBSpecies.getName(new_species) new_pkmn.name = GameData::Species.get(new_species).name
new_pkmn.markings = 0 new_pkmn.markings = 0
new_pkmn.ballused = 0 new_pkmn.ballused = 0
new_pkmn.setItem(nil) new_pkmn.setItem(nil)
+14 -16
View File
@@ -41,14 +41,14 @@ class PokemonTrade_Scene
@sprites["rsprite1"].x = Graphics.width/2 @sprites["rsprite1"].x = Graphics.width/2
@sprites["rsprite1"].y = 264 @sprites["rsprite1"].y = 264
@sprites["rsprite1"].z = 10 @sprites["rsprite1"].z = 10
pbApplyBattlerMetricsToSprite(@sprites["rsprite1"],1,@pokemon.fSpecies) @pokemon.species_data.apply_metrics_to_sprite(@sprites["rsprite1"], 1)
@sprites["rsprite2"] = PokemonSprite.new(@viewport) @sprites["rsprite2"] = PokemonSprite.new(@viewport)
@sprites["rsprite2"].setPokemonBitmap(@pokemon2,false) @sprites["rsprite2"].setPokemonBitmap(@pokemon2,false)
@sprites["rsprite2"].setOffset(PictureOrigin::Bottom) @sprites["rsprite2"].setOffset(PictureOrigin::Bottom)
@sprites["rsprite2"].x = Graphics.width/2 @sprites["rsprite2"].x = Graphics.width/2
@sprites["rsprite2"].y = 264 @sprites["rsprite2"].y = 264
@sprites["rsprite2"].z = 10 @sprites["rsprite2"].z = 10
pbApplyBattlerMetricsToSprite(@sprites["rsprite2"],1,@pokemon2.fSpecies) @pokemon2.species_data.apply_metrics_to_sprite(@sprites["rsprite2"], 1)
@sprites["rsprite2"].visible = false @sprites["rsprite2"].visible = false
@sprites["msgwindow"] = pbCreateMessageWindow(@viewport) @sprites["msgwindow"] = pbCreateMessageWindow(@viewport)
pbFadeInAndShow(@sprites) pbFadeInAndShow(@sprites)
@@ -139,8 +139,8 @@ class PokemonTrade_Scene
# Return Pokémon's color to normal and play cry # Return Pokémon's color to normal and play cry
delay = picturePoke.totalDuration delay = picturePoke.totalDuration
picturePoke.moveColor(delay,5,Color.new(31*8,22*8,30*8,0)) picturePoke.moveColor(delay,5,Color.new(31*8,22*8,30*8,0))
cry = pbCryFile(@pokemon2) cry = GameData::Species.cry_filename_from_pokemon(@pokemon2)
picturePoke.setSE(delay,cry) if pbResolveAudioSE(cry) picturePoke.setSE(delay,cry) if cry
# Play animation # Play animation
pbRunPictures( pbRunPictures(
[picturePoke,pictureBall], [picturePoke,pictureBall],
@@ -155,7 +155,7 @@ class PokemonTrade_Scene
pbDisposeSpriteHash(@sprites) pbDisposeSpriteHash(@sprites)
@viewport.dispose @viewport.dispose
newspecies = pbTradeCheckEvolution(@pokemon2,@pokemon) newspecies = pbTradeCheckEvolution(@pokemon2,@pokemon)
if newspecies>0 if newspecies
evo = PokemonEvolutionScene.new evo = PokemonEvolutionScene.new
evo.pbStartScreen(@pokemon2,newspecies) evo.pbStartScreen(@pokemon2,newspecies)
evo.pbEvolution(false) evo.pbEvolution(false)
@@ -165,9 +165,9 @@ class PokemonTrade_Scene
def pbTrade def pbTrade
pbBGMStop pbBGMStop
pbPlayCry(@pokemon) GameData::Species.play_cry_from_pokemon(@pokemon)
speciesname1=PBSpecies.getName(@pokemon.species) speciesname1=GameData::Species.get(@pokemon.species).name
speciesname2=PBSpecies.getName(@pokemon2.species) speciesname2=GameData::Species.get(@pokemon2.species).name
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\\wtnp[0]", _ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\\wtnp[0]",
@pokemon.name,@pokemon.owner.public_id,@pokemon.owner.name)) { pbUpdate } @pokemon.name,@pokemon.owner.public_id,@pokemon.owner.name)) { pbUpdate }
@@ -193,17 +193,16 @@ def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0)
myPokemon = $Trainer.party[pokemonIndex] myPokemon = $Trainer.party[pokemonIndex]
opponent = PokeBattle_Trainer.new(trainerName,trainerGender) opponent = PokeBattle_Trainer.new(trainerName,trainerGender)
opponent.setForeignID($Trainer) opponent.setForeignID($Trainer)
yourPokemon = nil; resetmoves = true yourPokemon = nil
resetmoves = true
if newpoke.is_a?(Pokemon) if newpoke.is_a?(Pokemon)
newpoke.owner = Pokemon::Owner.new_from_trainer(opponent) newpoke.owner = Pokemon::Owner.new_from_trainer(opponent)
yourPokemon = newpoke yourPokemon = newpoke
resetmoves = false resetmoves = false
else else
if newpoke.is_a?(String) || newpoke.is_a?(Symbol) species_data = GameData::Species.try_get(newpoke)
raise _INTL("Species does not exist ({1}).",newpoke) if !hasConst?(PBSpecies,newpoke) raise _INTL("Species does not exist ({1}).", newpoke) if !species_data
newpoke = getID(PBSpecies,newpoke) yourPokemon = Pokemon.new(species_data.id, myPokemon.level, opponent)
end
yourPokemon = Pokemon.new(newpoke,myPokemon.level,opponent)
end end
yourPokemon.name = nickname yourPokemon.name = nickname
yourPokemon.obtainMode = 2 # traded yourPokemon.obtainMode = 2 # traded
@@ -225,9 +224,8 @@ end
# Evolution methods # Evolution methods
#=============================================================================== #===============================================================================
def pbTradeCheckEvolution(pkmn, other_pkmn) def pbTradeCheckEvolution(pkmn, other_pkmn)
ret = pbCheckEvolutionEx(pkmn) { |pkmn, method, parameter, new_species| return pbCheckEvolutionEx(pkmn) { |pkmn, method, parameter, new_species|
success = PBEvolution.call("tradeCheck", method, pkmn, parameter, other_pkmn) success = PBEvolution.call("tradeCheck", method, pkmn, parameter, other_pkmn)
next (success) ? new_species : -1 next (success) ? new_species : -1
} }
return ret
end end
@@ -1,10 +1,4 @@
def pbEachNaturalMove(pokemon) # Unused
movelist=pokemon.getMoveList
for i in movelist
yield i[1],i[0]
end
end
def pbHasRelearnableMove?(pokemon) def pbHasRelearnableMove?(pokemon)
return pbGetRelearnableMoves(pokemon).length>0 return pbGetRelearnableMoves(pokemon).length>0
end end
@@ -12,11 +6,10 @@ end
def pbGetRelearnableMoves(pokemon) def pbGetRelearnableMoves(pokemon)
return [] if !pokemon || pokemon.egg? || pokemon.shadowPokemon? return [] if !pokemon || pokemon.egg? || pokemon.shadowPokemon?
moves=[] moves=[]
pbEachNaturalMove(pokemon) { |move,level| pokemon.getMoveList.each do |m|
if level<=pokemon.level && !pokemon.hasMove?(move) next if m[0] > pokemon.level || pokemon.hasMove?(m[1])
moves.push(move) if !moves.include?(move) moves.push(m[1]) if !moves.include?(m[1])
end end
}
tmoves=[] tmoves=[]
if pokemon.firstmoves if pokemon.firstmoves
for i in pokemon.firstmoves for i in pokemon.firstmoves
@@ -211,14 +211,12 @@ class PurifyChamber # German: der Kryptorbis
end end
def debugAddShadow(set,species) def debugAddShadow(set,species)
species=getID(PBSpecies,species)
pkmn=Pokemon.new(species,1) pkmn=Pokemon.new(species,1)
pkmn.makeShadow pkmn.makeShadow
setShadow(set,pkmn) setShadow(set,pkmn)
end end
def debugAddNormal(set,species) def debugAddNormal(set,species)
species=getID(PBSpecies,species)
pkmn=Pokemon.new(species,1) pkmn=Pokemon.new(species,1)
insertAfter(set,setCount(set),pkmn) insertAfter(set,setCount(set),pkmn)
end end
@@ -236,7 +236,7 @@ def pbRefreshMGCommands(master, online)
for gift in master for gift in master
itemname = "BLANK" itemname = "BLANK"
if gift[1] == 0 if gift[1] == 0
itemname = PBSpecies.getName(gift[2].species) itemname = gift[2].speciesName
elsif gift[1] > 0 elsif gift[1] > 0
itemname = GameData::Item.get(gift[2]).name + sprintf(" x%d", gift[1]) itemname = GameData::Item.get(gift[2]).name + sprintf(" x%d", gift[1])
end end
@@ -294,7 +294,7 @@ class HallOfFame_Scene
overlay=@sprites["overlay"].bitmap overlay=@sprites["overlay"].bitmap
overlay.clear overlay.clear
pokename=pokemon.name pokename=pokemon.name
speciesname=PBSpecies.getName(pokemon.species) speciesname=pokemon.speciesName
if pokemon.male? if pokemon.male?
speciesname+="" speciesname+=""
elsif pokemon.female? elsif pokemon.female?
@@ -373,7 +373,7 @@ class HallOfFame_Scene
if @battlerIndex<=@hallEntry.size if @battlerIndex<=@hallEntry.size
# If it is a pokémon, write the pokémon text, wait the # If it is a pokémon, write the pokémon text, wait the
# ENTRYWAITTIME and goes to the next battler # ENTRYWAITTIME and goes to the next battler
pbPlayCry(@hallEntry[@battlerIndex-1]) GameData::Species.play_cry_from_pokemon(@hallEntry[@battlerIndex - 1])
writePokemonData(@hallEntry[@battlerIndex-1]) writePokemonData(@hallEntry[@battlerIndex-1])
(ENTRYWAITTIME*Graphics.frame_rate/20).times do (ENTRYWAITTIME*Graphics.frame_rate/20).times do
Graphics.update Graphics.update
@@ -428,7 +428,7 @@ class HallOfFame_Scene
createBattlers(false) createBattlers(false)
end end
# Change the pokemon # Change the pokemon
pbPlayCry(@hallEntry[@battlerIndex]) GameData::Species.play_cry_from_pokemon(@hallEntry[@battlerIndex])
setPokemonSpritesOpacity(@battlerIndex,OPACITY) setPokemonSpritesOpacity(@battlerIndex,OPACITY)
hallNumber=$PokemonGlobal.hallOfFameLastNumber + @hallIndex - hallNumber=$PokemonGlobal.hallOfFameLastNumber + @hallIndex -
$PokemonGlobal.hallOfFame.size + 1 $PokemonGlobal.hallOfFame.size + 1
@@ -10,52 +10,48 @@ class TriadCard
attr_reader :north, :east, :south, :west attr_reader :north, :east, :south, :west
attr_reader :type attr_reader :type
def initialize(species,form=0) def initialize(species, form = 0)
@species = species @species = species
@form = form @form = form
baseStats = pbGetSpeciesData(species,form,SpeciesData::BASE_STATS) species_data = GameData::Species.get_species_form(@species, @form)
baseStats = species_data.base_stats
hp = baseStats[PBStats::HP] hp = baseStats[PBStats::HP]
attack = baseStats[PBStats::ATTACK] attack = baseStats[PBStats::ATTACK]
defense = baseStats[PBStats::DEFENSE] defense = baseStats[PBStats::DEFENSE]
spAtk = baseStats[PBStats::SPATK] spAtk = baseStats[PBStats::SPATK]
spDef = baseStats[PBStats::SPDEF] spDef = baseStats[PBStats::SPDEF]
speed = baseStats[PBStats::SPEED] speed = baseStats[PBStats::SPEED]
@type = pbGetSpeciesData(species,form,SpeciesData::TYPE1) @type = species_data.type1
if @type == :NORMAL @type = species_data.type2 if @type == :NORMAL && species_data.type2
type2 = pbGetSpeciesData(species,form,SpeciesData::TYPE2) @west = baseStatToValue(attack + speed / 3)
@type = type2 if type2 @east = baseStatToValue(defense + hp / 3)
end @north = baseStatToValue(spAtk + speed / 3)
@west = baseStatToValue(attack+speed/3) @south = baseStatToValue(spDef + hp / 3)
@east = baseStatToValue(defense+hp/3)
@north = baseStatToValue(spAtk+speed/3)
@south = baseStatToValue(spDef+hp/3)
end end
def baseStatToValue(stat) def baseStatToValue(stat)
return 10 if stat>=189 return 10 if stat >= 189
return 9 if stat>=160 return 9 if stat >= 160
return 8 if stat>=134 return 8 if stat >= 134
return 7 if stat>=115 return 7 if stat >= 115
return 6 if stat>=100 return 6 if stat >= 100
return 5 if stat>=86 return 5 if stat >= 86
return 4 if stat>=73 return 4 if stat >= 73
return 3 if stat>=60 return 3 if stat >= 60
return 2 if stat>=45 return 2 if stat >= 45
return 1 return 1
end end
def attack(panel) def attack(panel)
return [@west,@east,@north,@south][panel] return [@west, @east, @north, @south][panel]
end end
def defense(panel) def defense(panel)
return [@east,@west,@south,@north][panel] return [@east, @west, @south, @north][panel]
end end
def bonus(opponent) def bonus(opponent)
aType = @type case PBTypes.getEffectiveness(@type, opponent.type)
oType = opponent.type
case PBTypes.getEffectiveness(aType,oType)
when PBTypeEffectiveness::INEFFECTIVE then return -2 when PBTypeEffectiveness::INEFFECTIVE then return -2
when PBTypeEffectiveness::NOT_EFFECTIVE_ONE then return -1 when PBTypeEffectiveness::NOT_EFFECTIVE_ONE then return -1
when PBTypeEffectiveness::SUPER_EFFECTIVE_ONE then return 1 when PBTypeEffectiveness::SUPER_EFFECTIVE_ONE then return 1
@@ -64,64 +60,63 @@ class TriadCard
end end
def price def price
maxValue = [@north,@east,@south,@west].max maxValue = [@north, @east, @south, @west].max
ret = @north*@north + @east*@east + @south*@south + @west*@west ret = @north * @north + @east * @east + @south * @south + @west * @west
ret += maxValue*maxValue*2 ret += maxValue * maxValue * 2
ret *= maxValue ret *= maxValue
ret *= (@north+@east+@south+@west) ret *= (@north + @east + @south + @west)
ret /= 10 # Ranges from 2 to 24,000 ret /= 10 # Ranges from 2 to 24,000
# Quantize prices to the next highest "unit" # Quantize prices to the next highest "unit"
if ret>10000; ret = (1+ret/1000)*1000 if ret > 10000; ret = (1 + ret / 1000) * 1000
elsif ret>5000; ret = (1+ret/500)*500 elsif ret > 5000; ret = (1 + ret / 500) * 500
elsif ret>1000; ret = (1+ret/100)*100 elsif ret > 1000; ret = (1 + ret / 100) * 100
elsif ret>500; ret = (1+ret/50)*50 elsif ret > 500; ret = (1 + ret / 50) * 50
else; ret = (1+ret/10)*10 else; ret = (1 + ret / 10) * 10
end end
return ret return ret
end end
def self.createBack(type = nil, noback = false) def self.createBack(type = nil, noback = false)
bitmap = BitmapWrapper.new(80,96) bitmap = BitmapWrapper.new(80, 96)
if !noback if !noback
cardbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_card_opponent")) cardbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_card_opponent"))
bitmap.blt(0,0,cardbitmap.bitmap,Rect.new(0,0,cardbitmap.width,cardbitmap.height)) bitmap.blt(0, 0, cardbitmap.bitmap, Rect.new(0, 0, cardbitmap.width, cardbitmap.height))
cardbitmap.dispose cardbitmap.dispose
end end
if type if type
typebitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/types")) typebitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/types"))
type_number = GameData::Type.get(type).id_number type_number = GameData::Type.get(type).id_number
typerect = Rect.new(0, type_number * 28, 64, 28) typerect = Rect.new(0, type_number * 28, 64, 28)
bitmap.blt(8,50,typebitmap.bitmap,typerect,192) bitmap.blt(8, 50, typebitmap.bitmap, typerect, 192)
typebitmap.dispose typebitmap.dispose
end end
return bitmap return bitmap
end end
def createBitmap(owner) def createBitmap(owner)
return TriadCard.createBack if owner==0 return TriadCard.createBack if owner == 0
bitmap = BitmapWrapper.new(80,96) bitmap = BitmapWrapper.new(80, 96)
if owner==2 # Opponent if owner == 2 # Opponent
cardbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_card_opponent")) cardbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_card_opponent"))
else # Player else # Player
cardbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_card_player")) cardbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_card_player"))
end end
typebitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/types")) typebitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/types"))
iconfile = pbCheckPokemonIconFiles([@species,0,false,@form,false]) iconbitmap = AnimatedBitmap.new(GameData::Species.icon_filename(@species, @form))
iconbitmap = AnimatedBitmap.new(iconfile)
numbersbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_numbers")) numbersbitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/triad_numbers"))
# Draw card background # Draw card background
bitmap.blt(0,0,cardbitmap.bitmap,Rect.new(0,0,cardbitmap.width,cardbitmap.height)) bitmap.blt(0, 0, cardbitmap.bitmap, Rect.new(0, 0, cardbitmap.width, cardbitmap.height))
# Draw type icon # Draw type icon
type_number = GameData::Type.get(@type).id_number type_number = GameData::Type.get(@type).id_number
typerect = Rect.new(0,type_number*28,64,28) typerect = Rect.new(0, type_number * 28, 64, 28)
bitmap.blt(8,50,typebitmap.bitmap,typerect,192) bitmap.blt(8, 50, typebitmap.bitmap, typerect, 192)
# Draw Pokémon icon # Draw Pokémon icon
bitmap.blt(8,24,iconbitmap.bitmap,Rect.new(0,0,64,64)) bitmap.blt(8, 24, iconbitmap.bitmap, Rect.new(0, 0, 64, 64))
# Draw numbers # Draw numbers
bitmap.blt(8,16,numbersbitmap.bitmap,Rect.new(@west*16,0,16,16)) bitmap.blt(8, 16, numbersbitmap.bitmap, Rect.new(@west * 16, 0, 16, 16))
bitmap.blt(22,6,numbersbitmap.bitmap,Rect.new(@north*16,0,16,16)) bitmap.blt(22, 6, numbersbitmap.bitmap, Rect.new(@north * 16, 0, 16, 16))
bitmap.blt(36,16,numbersbitmap.bitmap,Rect.new(@east*16,0,16,16)) bitmap.blt(36, 16, numbersbitmap.bitmap, Rect.new(@east * 16, 0, 16, 16))
bitmap.blt(22,26,numbersbitmap.bitmap,Rect.new(@south*16,0,16,16)) bitmap.blt(22, 26, numbersbitmap.bitmap, Rect.new(@south * 16, 0, 16, 16))
cardbitmap.dispose cardbitmap.dispose
typebitmap.dispose typebitmap.dispose
iconbitmap.dispose iconbitmap.dispose
@@ -218,7 +213,7 @@ class TriadScene
def pbDisplay(text) def pbDisplay(text)
@sprites["helpwindow"].text = text @sprites["helpwindow"].text = text
(Graphics.frame_rate*3/2).times do (Graphics.frame_rate*1.5).floor.times do
Graphics.update Graphics.update
Input.update Input.update
pbUpdate pbUpdate
@@ -254,7 +249,7 @@ class TriadScene
commands = [] commands = []
chosenCards = [] chosenCards = []
for item in cardStorage for item in cardStorage
commands.push(_INTL("{1} x{2}",PBSpecies.getName(item[0]),item[1])) commands.push(_INTL("{1} x{2}", GameData::Species.get(item[0]).name, item[1]))
end end
command = Window_CommandPokemonEx.newWithSize(commands,0,0,Graphics.width/2,Graphics.height-64,@viewport) command = Window_CommandPokemonEx.newWithSize(commands,0,0,Graphics.width/2,Graphics.height-64,@viewport)
@sprites["helpwindow"].text = _INTL("Choose {1} cards to use for this duel.",@battle.maxCards) @sprites["helpwindow"].text = _INTL("Choose {1} cards to use for this duel.",@battle.maxCards)
@@ -288,7 +283,7 @@ class TriadScene
@battle.pbAdd(cardStorage,item) @battle.pbAdd(cardStorage,item)
commands = [] commands = []
for item in cardStorage for item in cardStorage
commands.push(_INTL("{1} x{2}",PBSpecies.getName(item[0]),item[1])) commands.push(_INTL("{1} x{2}", GameData::Species.get(item[0]).name, item[1]))
end end
command.commands = commands command.commands = commands
index = -1 index = -1
@@ -310,7 +305,7 @@ class TriadScene
@battle.pbSubtract(cardStorage,item[0]) @battle.pbSubtract(cardStorage,item[0])
commands = [] commands = []
for item in cardStorage for item in cardStorage
commands.push(_INTL("{1} x{2}",PBSpecies.getName(item[0]),item[1])) commands.push(_INTL("{1} x{2}", GameData::Species.get(item[0]).name, item[1]))
end end
command.commands = commands command.commands = commands
command.index = commands.length-1 if command.index>=commands.length command.index = commands.length-1 if command.index>=commands.length
@@ -670,11 +665,6 @@ class TriadScreen
# -2 - Immune # -2 - Immune
# attack += attacker.bonus(defender) # attack += attacker.bonus(defender)
end end
# p [attacker.card.north,attacker.card.west,
# attacker.card.east,attacker.card.south],
# [defender.card.north,defender.card.west,
# defender.card.east,defender.card.south],
# [attack,defense,attacker.bonus(defender)] if attackerParam==nil
if attack>defense || (attack==defense && @sameWins) if attack>defense || (attack==defense && @sameWins)
flips.push([defenderX,defenderY]) flips.push([defenderX,defenderY])
if attackerParam==nil if attackerParam==nil
@@ -736,8 +726,9 @@ class TriadScreen
if @elements if @elements
loop do loop do
trial_type = type_keys[rand(type_keys.length)] trial_type = type_keys[rand(type_keys.length)]
break if !PBTypes.isPseudoType?(trial_type) next if PBTypes.isPseudoType?(trial_type)
square.type = GameData::Type.get(trial_type).id square.type = GameData::Type.get(trial_type).id
break
end end
end end
@board.push(square) @board.push(square)
@@ -765,40 +756,35 @@ class TriadScreen
if oppdeck && oppdeck.is_a?(Array) && oppdeck.length==self.maxCards # Preset if oppdeck && oppdeck.is_a?(Array) && oppdeck.length==self.maxCards # Preset
opponentCards = [] opponentCards = []
for i in oppdeck for i in oppdeck
card = getID(PBSpecies,i) species_data = GameData::Species.try_get(i)
if card<=0 if !species_data
@scene.pbDisplayPaused(_INTL("Opponent has an illegal card, \"{1}\".",i)) @scene.pbDisplayPaused(_INTL("Opponent has an illegal card, \"{1}\".",i))
@scene.pbEndScene @scene.pbEndScene
return 0 return 0
end end
opponentCards.push(card) opponentCards.push(species_data.id)
end end
else else
species_keys = GameData::Species::DATA.keys
candidates = [] candidates = []
while candidates.length<200 while candidates.length < 200
card = 0 card = species_keys[rand(species_keys.length)]
loop do card = GameData::Species.get(card).id # Make sure it's a symbol
card = rand(PBSpecies.maxValue)+1
cname = getConstantName(PBSpecies,card) rescue nil
break if cname
end
triad = TriadCard.new(card) triad = TriadCard.new(card)
total = triad.north+triad.south+triad.east+triad.west total = triad.north + triad.south + triad.east + triad.west
# Add random species and its total point count # Add random species and its total point count
candidates.push([card,total]) candidates.push([card, total])
if candidates.length<200 && $Trainer.owned[card] if candidates.length < 200 && $Trainer.owned[card]
# Add again if Trainer owns the species # Add again if player owns the species
candidates.push([card,total]) candidates.push([card, total])
end end
end end
# sort by total point count # sort by total point count
candidates.sort! { |a,b| a[1]<=>b[1] } candidates.sort! { |a,b| a[1] <=> b[1] }
minIndex = minLevel*20
maxIndex = maxLevel*20+20
opponentCards = [] opponentCards = []
self.maxCards.times do self.maxCards.times do
# generate random card based on level # Choose random card from candidates based on trainer's level
index = minIndex+rand(maxIndex-minIndex) index = minLevel + rand(20)
opponentCards.push(candidates[index][0]) opponentCards.push(candidates[index][0])
end end
end end
@@ -808,13 +794,8 @@ class TriadScreen
@scene.pbShowOpponentCards(opponentCards) @scene.pbShowOpponentCards(opponentCards)
@scene.pbDisplay(_INTL("Choosing the starting player...")) @scene.pbDisplay(_INTL("Choosing the starting player..."))
@scene.pbUpdateScore @scene.pbUpdateScore
playerTurn = false playerTurn = (rand(2) == 0)
if rand(2)==0 @scene.pbDisplay(_INTL("{1} will go first.", (playerTurn) ? @playerName : @opponentName))
@scene.pbDisplay(_INTL("{1} will go first.",@playerName))
playerTurn = true
else
@scene.pbDisplay(_INTL("{1} will go first.",@opponentName))
end
for i in 0...@width*@height for i in 0...@width*@height
position = nil position = nil
triadCard = nil triadCard = nil
@@ -896,7 +877,8 @@ class TriadScreen
end end
for i in 0...@width*@height for i in 0...@width*@height
if board[i].owner==1 if board[i].owner==1
$PokemonGlobal.triads.pbStoreItem(board[i].card.species) card = GameData::Species.get_species_form(board[i].card.species, board[i].card.form).id
$PokemonGlobal.triads.pbStoreItem(card)
end end
end end
@scene.pbDisplayPaused(_INTL("Kept all cards of your color.")) @scene.pbDisplayPaused(_INTL("Kept all cards of your color."))
@@ -905,17 +887,16 @@ class TriadScreen
@scene.pbDisplayPaused(_INTL("{1} won against {2}.",@playerName,@opponentName)) @scene.pbDisplayPaused(_INTL("{1} won against {2}.",@playerName,@opponentName))
result = 1 result = 1
if prize if prize
card = getID(PBSpecies,prize) species_data = GameData::Species.try_get(prize)
if card>0 && $PokemonGlobal.triads.pbStoreItem(card) if species_data && $PokemonGlobal.triads.pbStoreItem(species_data.id)
cardname = PBSpecies.getName(card) @scene.pbDisplayPaused(_INTL("Got opponent's {1} card.", species_data.name))
@scene.pbDisplayPaused(_INTL("Got opponent's {1} card.",cardname))
end end
else else
case @trade case @trade
when 0 # Gain 1 random card from opponent's deck when 0 # Gain 1 random card from opponent's deck
card = originalOpponentCards[rand(originalOpponentCards.length)] card = originalOpponentCards[rand(originalOpponentCards.length)]
if $PokemonGlobal.triads.pbStoreItem(card) if $PokemonGlobal.triads.pbStoreItem(card)
cardname = PBSpecies.getName(card) cardname = GameData::Species.get(card).name
@scene.pbDisplayPaused(_INTL("Got opponent's {1} card.",cardname)) @scene.pbDisplayPaused(_INTL("Got opponent's {1} card.",cardname))
end end
when 1 # Keep only cards of your color when 1 # Keep only cards of your color
@@ -927,7 +908,8 @@ class TriadScreen
end end
for i in 0...@width*@height for i in 0...@width*@height
if board[i].owner==1 if board[i].owner==1
$PokemonGlobal.triads.pbStoreItem(board[i].card.species) card = GameData::Species.get_species_form(board[i].card.species, board[i].card.form).id
$PokemonGlobal.triads.pbStoreItem(card)
end end
end end
@scene.pbDisplayPaused(_INTL("Kept all cards of your color.")) @scene.pbDisplayPaused(_INTL("Kept all cards of your color."))
@@ -945,7 +927,7 @@ class TriadScreen
when 0 # Lose 1 random card from your deck when 0 # Lose 1 random card from your deck
card = originalCards[rand(originalCards.length)] card = originalCards[rand(originalCards.length)]
$PokemonGlobal.triads.pbDeleteItem(card) $PokemonGlobal.triads.pbDeleteItem(card)
cardname = PBSpecies.getName(card) cardname = GameData::Species.get(card).name
@scene.pbDisplayPaused(_INTL("Opponent won your {1} card.",cardname)) @scene.pbDisplayPaused(_INTL("Opponent won your {1} card.",cardname))
when 1 # Keep only cards of your color when 1 # Keep only cards of your color
for card in originalCards for card in originalCards
@@ -956,7 +938,8 @@ class TriadScreen
end end
for i in 0...@width*@height for i in 0...@width*@height
if board[i].owner==1 if board[i].owner==1
$PokemonGlobal.triads.pbStoreItem(board[i].card.species) card = GameData::Species.get_species_form(board[i].card.species, board[i].card.form).id
$PokemonGlobal.triads.pbStoreItem(card)
end end
end end
@scene.pbDisplayPaused(_INTL("Kept all cards of your color.",cardname)) @scene.pbDisplayPaused(_INTL("Kept all cards of your color.",cardname))
@@ -1009,51 +992,45 @@ class TriadStorage
end end
def maxSize def maxSize
return PBSpecies.getCount return @items.length + 1
end end
def maxPerSlot def maxPerSlot
return 99 return 999
end end
def empty? def empty?
return @items.length==0 return @items.length == 0
end end
def length def length
@items.length return @items.length
end end
def [](i) def [](i)
@items[i] return @items[i]
end end
def getItem(index) def getItem(index)
if index<0 || index>=@items.length return nil if index < 0 || index >= @items.length
return 0
else
return @items[index][0] return @items[index][0]
end end
end
def getCount(index) def getCount(index)
if index<0 || index>=@items.length return 0 if index < 0 || index >= @items.length
return 0
else
return @items[index][1] return @items[index][1]
end end
end
def pbQuantity(item) def pbQuantity(item)
return ItemStorageHelper.pbQuantity(@items, item) return ItemStorageHelper.pbQuantity(@items, item)
end end
def pbCanStore?(item,qty=1) def pbCanStore?(item, qty = 1)
return ItemStorageHelper.pbCanStore?(@items,self.maxSize,self.maxPerSlot,item,qty) return ItemStorageHelper.pbCanStore?(@items, self.maxSize, self.maxPerSlot, item, qty)
end end
def pbStoreItem(item,qty=1) def pbStoreItem(item, qty = 1)
return ItemStorageHelper.pbStoreItem(@items,self.maxSize,self.maxPerSlot,item,qty) return ItemStorageHelper.pbStoreItem(@items, self.maxSize, self.maxPerSlot, item, qty)
end end
def pbDeleteItem(item, qty = 1) def pbDeleteItem(item, qty = 1)
@@ -1069,20 +1046,17 @@ end
def pbBuyTriads def pbBuyTriads
commands = [] commands = []
realcommands = [] realcommands = []
for i in 1..PBSpecies.maxValue GameData::Species.each do |s|
next if !$Trainer.owned[i] next if s.form != 0
speciesname = PBSpecies.getName(i) next if !$Trainer.owned[s.id]
next if !speciesname
price = TriadCard.new(i).price price = TriadCard.new(i).price
visprice = price.to_s_formatted commands.push([price, s.name, _INTL("{1} - ${2}", s.name, price.to_s_formatted), s.id])
commands.push([price,speciesname,_INTL("{1} - ${2}",speciesname,visprice),i])
end end
if commands.length==0 if commands.length == 0
pbMessage(_INTL("There are no cards that you can buy.")) pbMessage(_INTL("There are no cards that you can buy."))
return return
end end
commands.sort! { |a,b| a[1]<=>b[1] } # name commands.sort! { |a, b| a[1] <=> b[1] } # Sort alphabetically
# commands.sort! { |a,b| (a[0]==b[0]) ? a[1]<=>b[1] : a[0]<=>b[0] } # name : price
for command in commands for command in commands
realcommands.push(command[2]) realcommands.push(command[2])
end end
@@ -1164,8 +1138,8 @@ def pbSellTriads
commands = [] commands = []
for i in 0...$PokemonGlobal.triads.length for i in 0...$PokemonGlobal.triads.length
item = $PokemonGlobal.triads[i] item = $PokemonGlobal.triads[i]
speciesname = PBSpecies.getName(item[0]) speciesname = GameData::Species.get(item[0]).name
commands.push(_INTL("{1} x{2}",speciesname,item[1])) commands.push(_INTL("{1} x{2}", speciesname, item[1]))
end end
commands.push(_INTL("CANCEL")) commands.push(_INTL("CANCEL"))
if commands.length==1 if commands.length==1
@@ -1188,7 +1162,7 @@ def pbSellTriads
preview.z = 4 preview.z = 4
item = $PokemonGlobal.triads.getItem(cmdwindow.index) item = $PokemonGlobal.triads.getItem(cmdwindow.index)
preview.bitmap = TriadCard.new(item).createBitmap(1) preview.bitmap = TriadCard.new(item).createBitmap(1)
olditem = commands[cmdwindow.index][3] olditem = $PokemonGlobal.triads.getItem(cmdwindow.index)
done = false done = false
Graphics.frame_reset Graphics.frame_reset
while !done while !done
@@ -1199,9 +1173,9 @@ def pbSellTriads
cmdwindow.update cmdwindow.update
goldwindow.update goldwindow.update
item = $PokemonGlobal.triads.getItem(cmdwindow.index) item = $PokemonGlobal.triads.getItem(cmdwindow.index)
if item!=olditem if olditem != item
preview.bitmap.dispose if preview.bitmap preview.bitmap.dispose if preview.bitmap
if item>0 if item
preview.bitmap = TriadCard.new(item).createBitmap(1) preview.bitmap = TriadCard.new(item).createBitmap(1)
end end
olditem = item olditem = item
@@ -1216,7 +1190,7 @@ def pbSellTriads
break break
end end
item = $PokemonGlobal.triads.getItem(cmdwindow.index) item = $PokemonGlobal.triads.getItem(cmdwindow.index)
itemname = PBSpecies.getName(item) itemname = GameData::Species.get(item).name
quantity = $PokemonGlobal.triads.pbQuantity(item) quantity = $PokemonGlobal.triads.pbQuantity(item)
price = TriadCard.new(item).price price = TriadCard.new(item).price
if price==0 if price==0
@@ -1244,7 +1218,7 @@ def pbSellTriads
commands = [] commands = []
for i in 0...$PokemonGlobal.triads.length for i in 0...$PokemonGlobal.triads.length
item = $PokemonGlobal.triads[i] item = $PokemonGlobal.triads[i]
speciesname = PBSpecies.getName(item[0]) speciesname = GameData::Species.get(item[0]).name
commands.push(_INTL("{1} x{2}",speciesname,item[1])) commands.push(_INTL("{1} x{2}",speciesname,item[1]))
end end
commands.push(_INTL("CANCEL")) commands.push(_INTL("CANCEL"))
@@ -1268,7 +1242,7 @@ def pbTriadList
commands = [] commands = []
for i in 0...$PokemonGlobal.triads.length for i in 0...$PokemonGlobal.triads.length
item = $PokemonGlobal.triads[i] item = $PokemonGlobal.triads[i]
speciesname = PBSpecies.getName(item[0]) speciesname = GameData::Species.get(item[0]).name
commands.push(_INTL("{1} x{2}",speciesname,item[1])) commands.push(_INTL("{1} x{2}",speciesname,item[1]))
end end
commands.push(_INTL("CANCEL")) commands.push(_INTL("CANCEL"))
@@ -1315,10 +1289,10 @@ end
#=============================================================================== #===============================================================================
# Give the player a particular card # Give the player a particular card
#=============================================================================== #===============================================================================
def pbGiveTriadCard(species,quantity=1) def pbGiveTriadCard(species, quantity = 1)
species = getID(PBSpecies,species) sp = GameData::Species.try_get(species)
return false if !species || species<=0 return false if !sp
return false if !$PokemonGlobal.triads.pbCanStore?(species,quantity) return false if !$PokemonGlobal.triads.pbCanStore?(sp.id, quantity)
$PokemonGlobal.triads.pbStoreItem(species,quantity) $PokemonGlobal.triads.pbStoreItem(sp.id, quantity)
return true return true
end end
@@ -135,16 +135,12 @@ class BugContestState
else else
$game_variables[1]=ContestantNames[cont] $game_variables[1]=ContestantNames[cont]
end end
$game_variables[2]=PBSpecies.getName(@places[place][1]) $game_variables[2]=GameData::Species.get(@places[place][1]).name
$game_variables[3]=@places[place][2] $game_variables[3]=@places[place][2]
end end
def pbClearIfEnded def pbClearIfEnded
if !@inProgress clear if !@inProgress && (!@start || @start[0] != $game_map.map_id)
if !(@start && @start[0]==$game_map.map_id)
clear
end
end
end end
def pbStartJudging def pbStartJudging
@@ -263,18 +259,17 @@ end
# Returns a score for this Pokemon in the Bug Catching Contest. # Returns a score for this Pokemon in the Bug Catching Contest.
# Not exactly the HGSS calculation, but it should be decent enough. # Not exactly the HGSS calculation, but it should be decent enough.
def pbBugContestScore(pokemon) def pbBugContestScore(pkmn)
levelscore=pokemon.level*4 levelscore = pkmn.level * 4
ivscore=0 ivscore = 0
for i in pokemon.iv; ivscore+=i; end pkmn.iv.each { |iv| ivscore += iv.to_f / Pokemon::IV_STAT_LIMIT }
ivscore=(ivscore*100/186).floor ivscore = (ivscore * 100).floor
hpscore=(100*pokemon.hp/pokemon.totalhp).floor hpscore = (100.0 * pkmn.hp / pkmn.totalhp).floor
rareness = pbGetSpeciesData(pokemon.species,pokemon.form,SpeciesData::RARENESS) catch_rate = pkmn.species_data.catch_rate
rarescore=60 rarescore = 60
rarescore+=20 if rareness<=120 rarescore += 20 if catch_rate <= 120
rarescore+=20 if rareness<=60 rarescore += 20 if catch_rate <= 60
score=levelscore+ivscore+hpscore+rarescore return levelscore + ivscore + hpscore + rarescore
return score
end end
def pbBugContestState def pbBugContestState
@@ -32,10 +32,7 @@ class PBPokemon
def self.fromInspected(str) def self.fromInspected(str)
insp=str.gsub(/^\s+/,"").gsub(/\s+$/,"") insp=str.gsub(/^\s+/,"").gsub(/\s+$/,"")
pieces=insp.split(/\s*;\s*/) pieces=insp.split(/\s*;\s*/)
species=1 species = (GameData::Species.exists?(pieces[0])) ? GameData::Species.get(pieces[0]).id : nil
if (PBSpecies.const_defined?(pieces[0]) rescue false)
species=PBSpecies.const_get(pieces[0])
end
item = (GameData::Item.exists?(pieces[1])) ? GameData::Item.get(pieces[1]).id : nil item = (GameData::Item.exists?(pieces[1])) ? GameData::Item.get(pieces[1]).id : nil
nature=PBNatures.const_get(pieces[2]) nature=PBNatures.const_get(pieces[2])
ev=pieces[3].split(/\s*,\s*/) ev=pieces[3].split(/\s*,\s*/)
@@ -95,7 +92,7 @@ class PBPokemon
def self.fromstring(str) def self.fromstring(str)
s=str.split(/\s*,\s*/) s=str.split(/\s*,\s*/)
species=self.constFromStr(PBSpecies,s[1]) species=GameData::Species.get(s[1]).id
item=s[2].to_sym item=s[2].to_sym
nature=self.constFromStr(PBNatures,s[3]) nature=self.constFromStr(PBNatures,s[3])
move1=GameData::Move.get(s[4]).id move1=GameData::Move.get(s[4]).id
@@ -129,8 +126,8 @@ class PBPokemon
=end =end
def inspect def inspect
c1=getConstantName(PBSpecies,@species) c1=GameData::Species.get(@species).id.to_s
c2=(@item) ? GameData::Item.get(@item).id_to_s : "" c2=(@item) ? GameData::Item.get(@item).id.to_s : ""
c3=getConstantName(PBNatures,@nature) c3=getConstantName(PBNatures,@nature)
evlist="" evlist=""
for i in 0...@ev for i in 0...@ev
@@ -1,26 +1,22 @@
def pbBaseStatTotal(species) def pbBaseStatTotal(species)
baseStats = pbGetSpeciesData(species,0,SpeciesData::BASE_STATS) baseStats = GameData::Species.get(species).base_stats
ret = 0 ret = 0
baseStats.each { |s| ret += s } baseStats.each { |s| ret += s }
return ret return ret
end end
def pbBalancedLevelFromBST(species) def pbBalancedLevelFromBST(species)
return (113-(pbBaseStatTotal(species)*0.072)).round return (113 - (pbBaseStatTotal(species) * 0.072)).round
end end
def pbTooTall?(pkmn,maxHeightInMeters) def pbTooTall?(pkmn, maxHeightInMeters)
species = (pkmn.is_a?(Pokemon)) ? pkmn.species : pkmn height = (pkmn.is_a?(Pokemon)) ? pkmn.height : GameData::Species.get(pkmn).height
form = (pkmn.is_a?(Pokemon)) ? pkmn.form : 0 return height > (maxHeightInMeters * 10).round
height = pbGetSpeciesData(species,form,SpeciesData::HEIGHT)
return height>(maxHeightInMeters*10).round
end end
def pbTooHeavy?(pkmn,maxWeightInKg) def pbTooHeavy?(pkmn, maxWeightInKg)
species = (pkmn.is_a?(Pokemon)) ? pkmn.species : pkmn weight = (pkmn.is_a?(Pokemon)) ? pkmn.weight : GameData::Species.get(pkmn).weight
form = (pkmn.is_a?(Pokemon)) ? pkmn.form : 0 return weight > (maxWeightInKg * 10).round
weight = pbGetSpeciesData(species,form,SpeciesData::WEIGHT)
return weight>(maxWeightInKg*10).round
end end
@@ -287,10 +283,7 @@ class SpeciesRestriction
end end
def isSpecies?(species,specieslist) def isSpecies?(species,specieslist)
for s in specieslist return specieslist.include?(species)
return true if isConst?(species,PBSpecies,s)
end
return false
end end
def isValid?(pokemon) def isValid?(pokemon)
@@ -310,10 +303,7 @@ class BannedSpeciesRestriction
end end
def isSpecies?(species,specieslist) def isSpecies?(species,specieslist)
for s in specieslist return specieslist.include?(species)
return true if isConst?(species,PBSpecies,s)
end
return false
end end
def isValid?(pokemon) def isValid?(pokemon)
@@ -328,17 +318,17 @@ end
class BannedItemRestriction class BannedItemRestriction
def initialize(*specieslist) def initialize(*itemlist)
@specieslist=specieslist.clone @itemlist=itemlist.clone
end end
def isSpecies?(species,specieslist) def isSpecies?(item,itemlist)
return specieslist.any? { |s| species == s } return itemlist.include?(item)
end end
def isValid?(pokemon) def isValid?(pokemon)
count=0 count=0
if pokemon.item && isSpecies?(pokemon.item,@specieslist) if pokemon.item && isSpecies?(pokemon.item,@itemlist)
count+=1 count+=1
end end
return count==0 return count==0
@@ -354,10 +344,7 @@ class RestrictedSpeciesRestriction
end end
def isSpecies?(species,specieslist) def isSpecies?(species,specieslist)
for s in specieslist return specieslist.include?(species)
return true if isConst?(species,PBSpecies,s)
end
return false
end end
def isValid?(team) def isValid?(team)
@@ -390,29 +377,22 @@ end
class StandardRestriction class StandardRestriction
def isValid?(pokemon) def isValid?(pkmn)
return false if !pokemon || pokemon.egg? return false if !pkmn || pkmn.egg?
# Species with disadvantageous abilities are not banned # Species with disadvantageous abilities are not banned
abilities = pbGetSpeciesData(pokemon.species,pokemon.form,SpeciesData::ABILITIES) pkmn.species_data.abilities.each do |a|
abilities = [abilities] if !abilities.is_a?(Array) return true if [:TRUANT, :SLOWSTART].include?(a[0])
abilities.each do |a|
return true if [:TRUANT, :SLOWSTART].include?(a)
end end
# Certain named species are not banned # Certain named species are not banned
speciesWhitelist = [:DRAGONITE,:SALAMENCE,:TYRANITAR] speciesWhitelist = [:DRAGONITE, :SALAMENCE, :TYRANITAR]
for i in speciesWhitelist return true if speciesWhitelist.include?(pkmn.species)
return true if pokemon.isSpecies?(i)
end
# Certain named species are banned # Certain named species are banned
speciesBlacklist = [:WYNAUT,:WOBBUFFET] speciesBlacklist = [:WYNAUT, :WOBBUFFET]
for i in speciesBlacklist return false if speciesBlacklist.include?(pkmn.species)
return false if pokemon.isSpecies?(i)
end
# Species with total base stat 600 or more are banned # Species with total base stat 600 or more are banned
baseStats = pbGetSpeciesData(pokemon.species,pokemon.form,SpeciesData::BASE_STATS)
bst = 0 bst = 0
baseStats.each { |s| bst += s } pkmn.baseStats.each { |s| bst += s }
return false if bst>=600 return false if bst >= 600
# Is valid # Is valid
return true return true
end end
@@ -632,28 +612,23 @@ end
module NicknameChecker module NicknameChecker
@@names={} @@names = {}
@@namesMaxValue=0
def getName(species) def getName(species)
n=@@names[species] n = @@names[species]
return n if n return n if n
n=PBSpecies.getName(species) n = GameData::Species.get(species).name
@@names[species]=n.upcase @@names[species] = n.upcase
return n return n
end end
def check(name,species) def check(name, species)
name=name.upcase name = name.upcase
return true if name==getName(species) return true if name == getName(species)
if @@names.values.include?(name) return false if @@names.values.include?(name)
return false GameData::Species.each do |species_data|
end next if species_data.species == species || species_data.form != 0
for i in @@namesMaxValue..PBSpecies.maxValue return false if getName(species_data.id) == name
if i!=species
n=getName(i)
return false if n==name
end
end end
return true return true
end end
@@ -40,35 +40,31 @@ def addMove(moves,move,base)
end end
end end
$legalMoves = [] $legalMoves = {}
$legalMovesLevel = 0 $legalMovesLevel = 0
$baseStatTotal = [] $baseStatTotal = {}
$minimumLevel = [] $minimumLevel = {}
$babySpecies = [] $babySpecies = {}
$evolutions = [] $evolutions = {}
$tmMoves = nil $tmMoves = nil
def pbGetLegalMoves2(species,maxlevel) def pbGetLegalMoves2(species,maxlevel)
moves=[] species_data = GameData::Species.get(species)
return moves if !species || species<=0 moves = []
moveset = pbGetSpeciesMoveset(species) return moves if !species_data
moveset.each { |m| addMove(moves,m[1],2) if m[0]<=maxlevel } # Populate available moves array (moves)
tmData=pbLoadSpeciesTMData species_data.moves.each { |m| addMove(moves, m[1], 2) if m[0] <= maxlevel }
if !$tmMoves if !$tmMoves
$tmMoves=[] $tmMoves = []
GameData::Item.each do |i| GameData::Item.each { |i| $tmMoves.push(i.move) if i.is_machine? }
$tmMoves.push(i.move) if i.move && tmData[i.move]
end
end
for atk in $tmMoves
addMove(moves,atk,0) if tmData[atk].include?(species)
end end
species_data.tutor_moves.each { |m| addMove(moves, m, 0) if $tmMoves.include?(m) }
babyspecies = babySpecies(species) babyspecies = babySpecies(species)
babyEggMoves = pbGetSpeciesEggMoves(babyspecies) GameData::Species.get(babyspecies).egg_moves.each { |m| addMove(moves, m, 2) }
babyEggMoves.each { |m| addMove(moves,m,2) } #
movedatas=[] movedatas = []
for move in moves for move in moves
movedatas.push([move,GameData::Move.get(move)]) movedatas.push([move, GameData::Move.get(move)])
end end
# Delete less powerful moves # Delete less powerful moves
deleteAll=proc { |a,item| deleteAll=proc { |a,item|
@@ -101,32 +97,24 @@ def pbGetLegalMoves2(species,maxlevel)
return moves return moves
end end
def baseStatTotal(move) def baseStatTotal(species)
if !$baseStatTotal[move] $baseStatTotal[species] = pbBaseStatTotal(species) if !$baseStatTotal[species]
$baseStatTotal[move]=pbBaseStatTotal(move) return $baseStatTotal[species]
end
return $baseStatTotal[move]
end end
def babySpecies(move) def babySpecies(species)
if !$babySpecies[move] $babySpecies[species] = EvolutionHelper.baby_species(species) if !$babySpecies[species]
$babySpecies[move]=EvolutionHelper.baby_species(move) return $babySpecies[species]
end
return $babySpecies[move]
end end
def minimumLevel(move) def minimumLevel(move)
if !$minimumLevel[move] $minimumLevel[species] = EvolutionHelper.minimum_level(species) if !$minimumLevel[species]
$minimumLevel[move]=EvolutionHelper.minimum_level(move) return $minimumLevel[species]
end
return $minimumLevel[move]
end end
def evolutions(move) def evolutions(species)
if !$evolutions[move] $evolutions[species] = EvolutionHelper.evolutions(species, true) if !$evolutions[species]
$evolutions[move]=EvolutionHelper.evolutions(move, true) return $evolutions[species]
end
return $evolutions[move]
end end
=begin =begin
@@ -147,13 +135,14 @@ end
class BaseStatRestriction class BaseStatRestriction
def initialize(mn,mx) def initialize(mn, mx)
@mn=mn;@mx=mx @mn = mn
@mx = mx
end end
def isValid?(pkmn) def isValid?(pkmn)
bst=baseStatTotal(pkmn.species) bst = baseStatTotal(pkmn.species)
return bst>=@mn && bst<=@mx return bst >= @mn && bst <= @mx
end end
end end
@@ -162,9 +151,7 @@ end
class NonlegendaryRestriction class NonlegendaryRestriction
def isValid?(pkmn) def isValid?(pkmn)
return true if !pkmn.genderless? return true if !pkmn.genderless?
compatibility = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesData::COMPATIBILITY) return false if pkmn.species_data.egg_groups.include?(PBEggGroups::Undiscovered)
compatibility = [compatibility] if !compatibility.is_a?(Array)
compatibility.each { |c| return false if isConst?(c,PBEggGroups,:Undiscovered) }
return true return true
end end
end end
@@ -260,14 +247,13 @@ def pbRandomPokemonFromRule(rule,trainer)
iteration=-1 iteration=-1
loop do loop do
iteration+=1 iteration+=1
species=0 species=nil
level=rule.ruleset.suggestedLevel level=rule.ruleset.suggestedLevel
keys = GameData::Species::DATA.keys.sort
loop do loop do
species=0
loop do loop do
species=rand(PBSpecies.maxValue)+1 species = keys[rand(keys.length)]
cname=getConstantName(PBSpecies,species) rescue nil break if GameData::Species.get(species).form == 0
break if cname
end end
r=rand(20) r=rand(20)
bst=baseStatTotal(species) bst=baseStatTotal(species)
@@ -299,7 +285,7 @@ def pbRandomPokemonFromRule(rule,trainer)
break break
end end
item = nil item = nil
$legalMoves=[] if level!=$legalMovesLevel $legalMoves={} if level!=$legalMovesLevel
$legalMoves[species]=pbGetLegalMoves2(species,level) if !$legalMoves[species] $legalMoves[species]=pbGetLegalMoves2(species,level) if !$legalMoves[species]
itemlist=[ itemlist=[
:ORANBERRY,:SITRUSBERRY,:ADAMANTORB,:BABIRIBERRY, :ORANBERRY,:SITRUSBERRY,:ADAMANTORB,:BABIRIBERRY,
@@ -322,38 +308,33 @@ def pbRandomPokemonFromRule(rule,trainer)
next if !item next if !item
case item case item
when :LIGHTBALL when :LIGHTBALL
next if !isConst?(species,PBSpecies,:PIKACHU) next if species != :PIKACHU
when :SHEDSHELL when :SHEDSHELL
next if !isConst?(species,PBSpecies,:FORRETRESS) || next if species != :FORRETRESS && species != :SKARMORY
!isConst?(species,PBSpecies,:SKARMORY)
when :SOULDEW when :SOULDEW
next if !isConst?(species,PBSpecies,:LATIOS) || next if species != :LATIOS && species != :LATIAS
!isConst?(species,PBSpecies,:LATIAS)
when :FOCUSSASH when :FOCUSSASH
next if baseStatTotal(species)>450 && rand(10)<8 next if baseStatTotal(species)>450 && rand(10)<8
when :ADAMANTORB when :ADAMANTORB
next if !isConst?(species,PBSpecies,:DIALGA) next if species != :DIALGA
when :PASSHOBERRY when :PASSHOBERRY
next if !isConst?(species,PBSpecies,:STEELIX) next if species != :STEELIX
when :BABIRIBERRY when :BABIRIBERRY
next if !isConst?(species,PBSpecies,:TYRANITAR) next if species != :TYRANITAR
when :HABANBERRY when :HABANBERRY
next if !isConst?(species,PBSpecies,:GARCHOMP) next if species != :GARCHOMP
when :OCCABERRY when :OCCABERRY
next if !isConst?(species,PBSpecies,:METAGROSS) next if species != :METAGROSS
when :CHOPLEBERRY when :CHOPLEBERRY
next if !isConst?(species,PBSpecies,:UMBREON) next if species != :UMBREON
when :YACHEBERRY when :YACHEBERRY
next if !isConst?(species,PBSpecies,:TORTERRA) && next if species != :TORTERRA && species != :GLISCOR && species != :DRAGONAIR
!isConst?(species,PBSpecies,:GLISCOR) &&
!isConst?(species,PBSpecies,:DRAGONAIR)
when :SHUCABERRY when :SHUCABERRY
next if !isConst?(species,PBSpecies,:HEATRAN) next if species != :HEATRAN
when :DEEPSEATOOTH when :DEEPSEATOOTH
next if !isConst?(species,PBSpecies,:CLAMPERL) next if species != :CLAMPERL
when :THICKCLUB when :THICKCLUB
next if !isConst?(species,PBSpecies,:CUBONE) && next if species != :CUBONE && species != :MAROWAK
!isConst?(species,PBSpecies,:MAROWAK)
end end
if item == :LIECHIBERRY && (ev&0x02)==0 if item == :LIECHIBERRY && (ev&0x02)==0
next if rand(2)==0 next if rand(2)==0
@@ -459,8 +440,8 @@ def pbRandomPokemonFromRule(rule,trainer)
item = :LEFTOVERS item = :LEFTOVERS
end end
if item == :BLACKSLUDGE if item == :BLACKSLUDGE
type1 = pbGetSpeciesData(species,0,SpeciesData::TYPE1) type1 = GameData::Species.get(species).type1
type2 = pbGetSpeciesData(species,0,SpeciesData::TYPE2) || type1 type2 = GameData::Species.get(species).type2 || type1
item = :LEFTOVERS if type1 != :POISON && type2 != :POISON item = :LEFTOVERS if type1 != :POISON && type2 != :POISON
end end
if item == :HEATROCK && !moves.any? { |m| m == :SUNNYDAY } if item == :HEATROCK && !moves.any? { |m| m == :SUNNYDAY }
@@ -912,9 +893,10 @@ def pbRuledBattle(team1,team2,rule)
end end
def getTypes(species) def getTypes(species)
type1 = pbGetSpeciesData(species,0,SpeciesData::TYPE1) species_data = GameData::Species.get(species)
type2 = pbGetSpeciesData(species,0,SpeciesData::TYPE2) || type1 type1 = species_data.type1
return type1==type2 ? [type1] : [type1,type2] type2 = species_data.type2
return (type1 == type2) ? [type1] : [type1, type2]
end end
def pbTrainerInfo(pokemonlist,trfile,rules) def pbTrainerInfo(pokemonlist,trfile,rules)
@@ -72,19 +72,15 @@ class BattleSwapScene
UIHelper.pbConfirm(@sprites["msgwindow"],message) { pbUpdate } UIHelper.pbConfirm(@sprites["msgwindow"],message) { pbUpdate }
end end
def pbGetCommands(list,choices) def pbGetCommands(list, choices)
commands=[] commands = []
for i in 0...list.length for i in 0...list.length
pkmn=list[i] pkmn = list[i]
kind=pbGetMessage(MessageTypes::Kinds,pbGetFSpeciesFromForm(pkmn.species,pkn.form)) category = pkmn.species_data.category
selected=shadowctagFromColor(Color.new(232,0,0)) selected = shadowctagFromColor(Color.new(232, 0, 0))
if choices.any?{ |item| item==i } cmd = _INTL("{1} - {2} Pokémon", pkmn.speciesName, category)
commands.push(selected+_INTL("{1} - {2} POKéMON", cmd = selected + cmd if choices.include?(i)
PBSpecies.getName(pkmn.species),kind)) commands.push(cmd)
else
commands.push(_INTL("{1} - {2} POKéMON",
PBSpecies.getName(pkmn.species),kind))
end
end end
return commands return commands
end end
@@ -0,0 +1,154 @@
#===============================================================================
# Load various wild battle music
#===============================================================================
def pbGetWildBattleBGM(_wildParty) # wildParty is an array of Pokémon objects
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
ret = nil
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).wild_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.wild_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle wild") if !ret
return ret
end
def pbGetWildVictoryME
if $PokemonGlobal.nextBattleME
return $PokemonGlobal.nextBattleME.clone
end
ret = nil
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).wild_victory_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.wild_victory_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle victory") if !ret
ret.name = "../../Audio/ME/"+ret.name
return ret
end
def pbGetWildCaptureME
if $PokemonGlobal.nextBattleCaptureME
return $PokemonGlobal.nextBattleCaptureME.clone
end
ret = nil
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).wild_capture_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.wild_capture_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle capture success") if !ret
ret.name = "../../Audio/ME/"+ret.name
return ret
end
#===============================================================================
# Load/play various trainer battle music
#===============================================================================
def pbPlayTrainerIntroME(trainer_type)
trainer_type_data = GameData::TrainerType.get(trainer_type)
return if !trainer_type_data.intro_ME || trainer_type_data.intro_ME == ""
bgm = pbStringToAudioFile(trainer_type_data.intro_ME)
pbMEPlay(bgm)
end
def pbGetTrainerBattleBGM(trainer) # can be a PokeBattle_Trainer or an array of them
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
ret = nil
music = nil
trainerarray = (trainer.is_a?(Array)) ? trainer : [trainer]
trainerarray.each do |t|
trainer_type_data = GameData::TrainerType.get(t.trainertype)
music = trainer_type_data.battle_BGM if trainer_type_data.battle_BGM
end
ret = pbStringToAudioFile(music) if music && music!=""
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).trainer_battle_BGM
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
if !ret
# Check global metadata
music = GameData::Metadata.get.trainer_battle_BGM
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
ret = pbStringToAudioFile("Battle trainer") if !ret
return ret
end
def pbGetTrainerBattleBGMFromType(trainertype)
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
trainer_type_data = GameData::TrainerType.get(trainertype)
ret = trainer_type_data.battle_BGM if trainer_type_data.battle_BGM
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).trainer_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.trainer_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle trainer") if !ret
return ret
end
def pbGetTrainerVictoryME(trainer) # can be a PokeBattle_Trainer or an array of them
if $PokemonGlobal.nextBattleME
return $PokemonGlobal.nextBattleME.clone
end
music = nil
trainerarray = (trainer.is_a?(Array)) ? trainer : [trainer]
trainerarray.each do |t|
trainer_type_data = GameData::TrainerType.get(t.trainertype)
music = trainer_type_data.victory_ME if trainer_type_data.victory_ME
end
ret = nil
if music && music!=""
ret = pbStringToAudioFile(music)
end
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).trainer_victory_ME
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
if !ret
# Check global metadata
music = GameData::Metadata.get.trainer_victory_ME
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
ret = pbStringToAudioFile("Battle victory") if !ret
ret.name = "../../Audio/ME/"+ret.name
return ret
end
@@ -1,521 +0,0 @@
#===============================================================================
# Load Pokémon sprites
#===============================================================================
def pbLoadPokemonBitmap(pokemon,back=false)
return pbLoadPokemonBitmapSpecies(pokemon,pokemon.species,back)
end
# NOTE: Returns an AnimatedBitmap, not a Bitmap
def pbLoadPokemonBitmapSpecies(pokemon,species,back=false)
ret = nil
if pokemon.egg?
bitmapFileName = sprintf("Graphics/Battlers/%segg_%d",getConstantName(PBSpecies,species),pokemon.form) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/%03degg_%d",species,pokemon.form)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/%segg",getConstantName(PBSpecies,species)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/%03degg",species)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/egg")
end
end
end
end
bitmapFileName = pbResolveBitmap(bitmapFileName)
else
bitmapFileName = pbCheckPokemonBitmapFiles([species,back,(pokemon.female?),
pokemon.shiny?,(pokemon.form rescue 0),pokemon.shadowPokemon?])
# Alter bitmap if supported
alterBitmap = (MultipleForms.getFunction(species,"alterBitmap") rescue nil)
end
if bitmapFileName && alterBitmap
animatedBitmap = AnimatedBitmap.new(bitmapFileName)
copiedBitmap = animatedBitmap.copy
animatedBitmap.dispose
copiedBitmap.each { |bitmap| alterBitmap.call(pokemon,bitmap) }
ret = copiedBitmap
elsif bitmapFileName
ret = AnimatedBitmap.new(bitmapFileName)
end
return ret
end
# NOTE: Returns an AnimatedBitmap, not a Bitmap
def pbLoadSpeciesBitmap(species,female=false,form=0,shiny=false,shadow=false,back=false,egg=false)
ret = nil
if egg
bitmapFileName = sprintf("Graphics/Battlers/%segg_%d",getConstantName(PBSpecies,species),form) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/%03degg_%d",species,form)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/%segg",getConstantName(PBSpecies,species)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/%03degg",species)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/egg")
end
end
end
end
bitmapFileName = pbResolveBitmap(bitmapFileName)
else
bitmapFileName = pbCheckPokemonBitmapFiles([species,back,female,shiny,form,shadow])
end
if bitmapFileName
ret = AnimatedBitmap.new(bitmapFileName)
end
return ret
end
def pbCheckPokemonBitmapFiles(params)
factors = []
factors.push([5,params[5],false]) if params[5] && params[5]!=false # shadow
factors.push([2,params[2],false]) if params[2] && params[2]!=false # gender
factors.push([3,params[3],false]) if params[3] && params[3]!=false # shiny
factors.push([4,params[4],0]) if params[4] && params[4]!=0 # form
factors.push([0,params[0],0]) # species
trySpecies = 0
tryGender = false
tryShiny = false
tryBack = params[1]
tryForm = 0
tryShadow = false
for i in 0...2**factors.length
factors.each_with_index do |factor,index|
newVal = ((i/(2**index))%2==0) ? factor[1] : factor[2]
case factor[0]
when 0 then trySpecies = newVal
when 2 then tryGender = newVal
when 3 then tryShiny = newVal
when 4 then tryForm = newVal
when 5 then tryShadow = newVal
end
end
for j in 0...2 # Try using the species' internal name and then its ID number
next if trySpecies==0 && j==0
trySpeciesText = (j==0) ? getConstantName(PBSpecies,trySpecies) : sprintf("%03d",trySpecies)
bitmapFileName = sprintf("Graphics/Battlers/%s%s%s%s%s%s",
trySpeciesText,
(tryGender) ? "f" : "",
(tryShiny) ? "s" : "",
(tryBack) ? "b" : "",
(tryForm!=0) ? "_"+tryForm.to_s : "",
(tryShadow) ? "_shadow" : "") rescue nil
ret = pbResolveBitmap(bitmapFileName)
return ret if ret
end
end
return nil
end
def pbLoadPokemonShadowBitmap(pokemon)
bitmapFileName = pbCheckPokemonShadowBitmapFiles(pokemon.species,pokemon.form)
return AnimatedBitmap.new(pbResolveBitmap(bitmapFileName)) if bitmapFileName
return nil
end
def pbLoadPokemonShadowBitmapSpecies(pokemon,species)
bitmapFileName = pbCheckPokemonShadowBitmapFiles(species,pokemon.form)
return AnimatedBitmap.new(pbResolveBitmap(bitmapFileName)) if bitmapFileName
return nil
end
def pbCheckPokemonShadowBitmapFiles(species,form,fullmetrics=nil)
if form>0
bitmapFileName = sprintf("Graphics/Battlers/%s_%d_battleshadow",getConstantName(PBSpecies,species),form) rescue nil
ret = pbResolveBitmap(bitmapFileName)
return bitmapFileName if ret
bitmapFileName = sprintf("Graphics/Battlers/%03d_%d_battleshadow",species,form)
ret = pbResolveBitmap(bitmapFileName)
return bitmapFileName if ret
end
bitmapFileName = sprintf("Graphics/Battlers/%s_battleshadow",getConstantName(PBSpecies,species)) rescue nil
ret = pbResolveBitmap(bitmapFileName)
return bitmapFileName if ret
bitmapFileName = sprintf("Graphics/Battlers/%03d_battleshadow",species)
ret = pbResolveBitmap(bitmapFileName)
return bitmapFileName if ret
# Load metrics and use that graphic
fullmetrics = pbLoadSpeciesMetrics if !fullmetrics
size = (fullmetrics[SpeciesData::METRIC_SHADOW_SIZE][pbGetFSpeciesFromForm(species,form)] || 2)
bitmapFileName = sprintf("Graphics/Pictures/Battle/battler_shadow_%d",size)
return bitmapFileName if pbResolveBitmap(bitmapFileName)
return nil
end
#===============================================================================
# Load Pokémon icons
#===============================================================================
def pbLoadPokemonIcon(pokemon)
return AnimatedBitmap.new(pbPokemonIconFile(pokemon)).deanimate
end
def pbPokemonIconFile(pokemon)
return pbCheckPokemonIconFiles([pokemon.species,pokemon.female?,
pokemon.shiny?,(pokemon.form rescue 0),pokemon.shadowPokemon?],
pokemon.egg?)
end
def pbCheckPokemonIconFiles(params,egg=false)
species = params[0]
if egg
bitmapFileName = sprintf("Graphics/Icons/icon%segg_%d",getConstantName(PBSpecies,species),params[3]) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/icon%03degg_%d",species,params[3])
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/icon%segg",getConstantName(PBSpecies,species)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/icon%03degg",species)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/iconEgg")
end
end
end
end
return pbResolveBitmap(bitmapFileName)
end
factors = []
factors.push([4,params[4],false]) if params[4] && params[4]!=false # shadow
factors.push([1,params[1],false]) if params[1] && params[1]!=false # gender
factors.push([2,params[2],false]) if params[2] && params[2]!=false # shiny
factors.push([3,params[3],0]) if params[3] && params[3]!=0 # form
factors.push([0,params[0],0]) # species
trySpecies = 0
tryGender = false
tryShiny = false
tryForm = 0
tryShadow = false
for i in 0...2**factors.length
factors.each_with_index do |factor,index|
newVal = ((i/(2**index))%2==0) ? factor[1] : factor[2]
case factor[0]
when 0 then trySpecies = newVal
when 1 then tryGender = newVal
when 2 then tryShiny = newVal
when 3 then tryForm = newVal
when 4 then tryShadow = newVal
end
end
for j in 0...2 # Try using the species' internal name and then its ID number
next if trySpecies==0 && j==0
trySpeciesText = (j==0) ? getConstantName(PBSpecies,trySpecies) : sprintf("%03d",trySpecies)
bitmapFileName = sprintf("Graphics/Icons/icon%s%s%s%s%s",
trySpeciesText,
(tryGender) ? "f" : "",
(tryShiny) ? "s" : "",
(tryForm!=0) ? "_"+tryForm.to_s : "",
(tryShadow) ? "_shadow" : "") rescue nil
ret = pbResolveBitmap(bitmapFileName)
return ret if ret
end
end
return nil
end
#===============================================================================
# Load Pokémon footprint graphics
#===============================================================================
def pbPokemonFootprintFile(pokemon,form=0) # Used by the Pokédex
return nil if !pokemon
if pokemon.is_a?(Numeric)
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%s_%d",
getConstantName(PBSpecies,pokemon),form) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%03d_%d",
pokemon,form) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%s",
getConstantName(PBSpecies,pokemon)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%03d",pokemon)
end
end
end
else
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%s_%d",
getConstantName(PBSpecies,pokemon.species),(pokemon.form rescue 0)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%03d_%d",
pokemon.species,(pokemon.form rescue 0)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%s",
getConstantName(PBSpecies,pokemon.species)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/Footprints/footprint%03d",
pokemon.species)
end
end
end
end
return pbResolveBitmap(bitmapFileName)
end
#===============================================================================
# Analyse audio files
#===============================================================================
def pbResolveAudioSE(file)
return nil if !file
if RTP.exists?("Audio/SE/"+file,["",".wav",".mp3",".ogg"])
return RTP.getPath("Audio/SE/"+file,["",".wav",".mp3",".ogg"])
end
return nil
end
def pbCryFrameLength(pokemon,form=0,pitch=nil)
return 0 if !pokemon
pitch = 100 if !pitch
pitch = pitch.to_f/100
return 0 if pitch<=0
playtime = 0.0
if pokemon.is_a?(Numeric)
pkmnwav = pbResolveAudioSE(pbCryFile(pokemon,form))
playtime = getPlayTime(pkmnwav) if pkmnwav
elsif !pokemon.egg?
if pokemon.respond_to?("chatter") && pokemon.chatter
playtime = pokemon.chatter.time
pitch = 1.0
else
pkmnwav = pbResolveAudioSE(pbCryFile(pokemon))
playtime = getPlayTime(pkmnwav) if pkmnwav
end
end
playtime /= pitch # sound is lengthened the lower the pitch
# 4 is added to provide a buffer between sounds
return (playtime*Graphics.frame_rate).ceil+4
end
#===============================================================================
# Load/play Pokémon cry files
#===============================================================================
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?(Pokemon)
pbPlayCryPokemon(pokemon,volume,pitch)
end
end
def pbPlayCrySpecies(pokemon,form=0,volume=90,pitch=nil)
return if !pokemon
pokemon = getID(PBSpecies,pokemon)
return if !pokemon.is_a?(Numeric)
pkmnwav = pbCryFile(pokemon,form)
if pkmnwav
pitch ||= 100
pbSEPlay(RPG::AudioFile.new(pkmnwav,volume,pitch)) rescue nil
end
end
def pbPlayCryPokemon(pokemon,volume=90,pitch=nil)
return if !pokemon || pokemon.egg?
if pokemon.respond_to?("chatter") && pokemon.chatter
pokemon.chatter.play
return
end
pkmnwav = pbCryFile(pokemon)
if pkmnwav
pitch ||= (pokemon.hp*25/pokemon.totalhp)+75
pbSEPlay(RPG::AudioFile.new(pkmnwav,volume,pitch)) rescue nil
end
end
def pbCryFile(pokemon,form=0)
return nil if !pokemon
pokemon = getID(PBSpecies,pokemon)
if pokemon.is_a?(Numeric)
filename = sprintf("Cries/%sCry_%d",getConstantName(PBSpecies,pokemon),form) rescue nil
if !pbResolveAudioSE(filename)
filename = sprintf("Cries/%03dCry_%d",pokemon,form)
if !pbResolveAudioSE(filename)
filename = sprintf("Cries/%sCry",getConstantName(PBSpecies,pokemon)) rescue nil
if !pbResolveAudioSE(filename)
filename = sprintf("Cries/%03dCry",pokemon)
end
end
end
return filename if pbResolveAudioSE(filename)
elsif !pokemon.egg?
form = (pokemon.form rescue 0)
filename = sprintf("Cries/%sCry_%d",getConstantName(PBSpecies,pokemon.species),form) rescue nil
if !pbResolveAudioSE(filename)
filename = sprintf("Cries/%03dCry_%d",pokemon.species,form)
if !pbResolveAudioSE(filename)
filename = sprintf("Cries/%sCry",getConstantName(PBSpecies,pokemon.species)) rescue nil
if !pbResolveAudioSE(filename)
filename = sprintf("Cries/%03dCry",pokemon.species)
end
end
end
return filename if pbResolveAudioSE(filename)
end
return nil
end
#===============================================================================
# Load various wild battle music
#===============================================================================
def pbGetWildBattleBGM(_wildParty) # wildParty is an array of Pokémon objects
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
ret = nil
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).wild_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.wild_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle wild") if !ret
return ret
end
def pbGetWildVictoryME
if $PokemonGlobal.nextBattleME
return $PokemonGlobal.nextBattleME.clone
end
ret = nil
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).wild_victory_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.wild_victory_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle victory") if !ret
ret.name = "../../Audio/ME/"+ret.name
return ret
end
def pbGetWildCaptureME
if $PokemonGlobal.nextBattleCaptureME
return $PokemonGlobal.nextBattleCaptureME.clone
end
ret = nil
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).wild_capture_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.wild_capture_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle capture success") if !ret
ret.name = "../../Audio/ME/"+ret.name
return ret
end
#===============================================================================
# Load/play various trainer battle music
#===============================================================================
def pbPlayTrainerIntroME(trainer_type)
trainer_type_data = GameData::TrainerType.get(trainer_type)
return if !trainer_type_data.intro_ME || trainer_type_data.intro_ME == ""
bgm = pbStringToAudioFile(trainer_type_data.intro_ME)
pbMEPlay(bgm)
end
def pbGetTrainerBattleBGM(trainer) # can be a PokeBattle_Trainer or an array of them
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
ret = nil
music = nil
trainerarray = (trainer.is_a?(Array)) ? trainer : [trainer]
trainerarray.each do |t|
trainer_type_data = GameData::TrainerType.get(t.trainertype)
music = trainer_type_data.battle_BGM if trainer_type_data.battle_BGM
end
ret = pbStringToAudioFile(music) if music && music!=""
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).trainer_battle_BGM
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
if !ret
# Check global metadata
music = GameData::Metadata.get.trainer_battle_BGM
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
ret = pbStringToAudioFile("Battle trainer") if !ret
return ret
end
def pbGetTrainerBattleBGMFromType(trainertype)
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
trainer_type_data = GameData::TrainerType.get(trainertype)
ret = trainer_type_data.battle_BGM if trainer_type_data.battle_BGM
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).trainer_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.trainer_battle_BGM
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle trainer") if !ret
return ret
end
def pbGetTrainerVictoryME(trainer) # can be a PokeBattle_Trainer or an array of them
if $PokemonGlobal.nextBattleME
return $PokemonGlobal.nextBattleME.clone
end
music = nil
trainerarray = (trainer.is_a?(Array)) ? trainer : [trainer]
trainerarray.each do |t|
trainer_type_data = GameData::TrainerType.get(t.trainertype)
music = trainer_type_data.victory_ME if trainer_type_data.victory_ME
end
ret = nil
if music && music!=""
ret = pbStringToAudioFile(music)
end
if !ret
# Check map metadata
music = GameData::MapMetadata.get($game_map.map_id).trainer_victory_ME
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
if !ret
# Check global metadata
music = GameData::Metadata.get.trainer_victory_ME
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
ret = pbStringToAudioFile("Battle victory") if !ret
ret.name = "../../Audio/ME/"+ret.name
return ret
end
@@ -2,279 +2,240 @@
# Nicknaming and storing Pokémon # Nicknaming and storing Pokémon
#=============================================================================== #===============================================================================
def pbBoxesFull? def pbBoxesFull?
return ($Trainer.party.length==6 && $PokemonStorage.full?) return ($Trainer.party.length == 6 && $PokemonStorage.full?)
end end
def pbNickname(pokemon) def pbNickname(pkmn)
speciesname = PBSpecies.getName(pokemon.species) species_name = pkmn.speciesName
if pbConfirmMessage(_INTL("Would you like to give a nickname to {1}?",speciesname)) if pbConfirmMessage(_INTL("Would you like to give a nickname to {1}?", species_name))
helptext = _INTL("{1}'s nickname?",speciesname) new_name = pbEnterPokemonName(_INTL("{1}'s nickname?", species_name),
newname = pbEnterPokemonName(helptext, 0, Pokemon::MAX_NAME_SIZE, "", pokemon) 0, Pokemon::MAX_NAME_SIZE, "", pkmn)
pokemon.name = newname if newname!="" pkmn.name = new_name if new_name != ""
end end
end end
def pbStorePokemon(pokemon) def pbStorePokemon(pkmn)
if pbBoxesFull? if pbBoxesFull?
pbMessage(_INTL("There's no more room for Pokémon!\1")) pbMessage(_INTL("There's no more room for Pokémon!\1"))
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
return return
end end
pokemon.pbRecordFirstMoves pkmn.pbRecordFirstMoves
if $Trainer.party.length<6 if $Trainer.party.length < 6
$Trainer.party[$Trainer.party.length] = pokemon $Trainer.party[$Trainer.party.length] = pkmn
else else
oldcurbox = $PokemonStorage.currentBox oldcurbox = $PokemonStorage.currentBox
storedbox = $PokemonStorage.pbStoreCaught(pokemon) storedbox = $PokemonStorage.pbStoreCaught(pkmn)
curboxname = $PokemonStorage[oldcurbox].name curboxname = $PokemonStorage[oldcurbox].name
boxname = $PokemonStorage[storedbox].name boxname = $PokemonStorage[storedbox].name
creator = nil creator = nil
creator = pbGetStorageCreator if $PokemonGlobal.seenStorageCreator creator = pbGetStorageCreator if $PokemonGlobal.seenStorageCreator
if storedbox!=oldcurbox if storedbox != oldcurbox
if creator if creator
pbMessage(_INTL("Box \"{1}\" on {2}'s PC was full.\1",curboxname,creator)) pbMessage(_INTL("Box \"{1}\" on {2}'s PC was full.\1", curboxname, creator))
else else
pbMessage(_INTL("Box \"{1}\" on someone's PC was full.\1",curboxname)) pbMessage(_INTL("Box \"{1}\" on someone's PC was full.\1", curboxname))
end end
pbMessage(_INTL("{1} was transferred to box \"{2}.\"",pokemon.name,boxname)) pbMessage(_INTL("{1} was transferred to box \"{2}.\"", pkmn.name, boxname))
else else
if creator if creator
pbMessage(_INTL("{1} was transferred to {2}'s PC.\1",pokemon.name,creator)) pbMessage(_INTL("{1} was transferred to {2}'s PC.\1", pkmn.name, creator))
else else
pbMessage(_INTL("{1} was transferred to someone's PC.\1",pokemon.name)) pbMessage(_INTL("{1} was transferred to someone's PC.\1", pkmn.name))
end end
pbMessage(_INTL("It was stored in box \"{1}.\"",boxname)) pbMessage(_INTL("It was stored in box \"{1}.\"", boxname))
end end
end end
end end
def pbNicknameAndStore(pokemon) def pbNicknameAndStore(pkmn)
if pbBoxesFull? if pbBoxesFull?
pbMessage(_INTL("There's no more room for Pokémon!\1")) pbMessage(_INTL("There's no more room for Pokémon!\1"))
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
return return
end end
$Trainer.seen[pokemon.species] = true $Trainer.seen[pkmn.species] = true
$Trainer.owned[pokemon.species] = true $Trainer.owned[pkmn.species] = true
pbNickname(pokemon) pbNickname(pkmn)
pbStorePokemon(pokemon) pbStorePokemon(pkmn)
end end
#=============================================================================== #===============================================================================
# Giving Pokémon to the player (will send to storage if party is full) # Giving Pokémon to the player (will send to storage if party is full)
#=============================================================================== #===============================================================================
def pbAddPokemon(pokemon,level=nil,seeform=true) def pbAddPokemon(pkmn, level = 1, see_form = true)
return if !pokemon return false if !pkmn
if pbBoxesFull? if pbBoxesFull?
pbMessage(_INTL("There's no more room for Pokémon!\1")) pbMessage(_INTL("There's no more room for Pokémon!\1"))
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
return false return false
end end
pokemon = getID(PBSpecies,pokemon) pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
if pokemon.is_a?(Integer) && level.is_a?(Integer) species_name = pkmn.speciesName
pokemon = Pokemon.new(pokemon,level) pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, species_name))
end pbNicknameAndStore(pkmn)
speciesname = PBSpecies.getName(pokemon.species) pbSeenForm(pkmn) if see_form
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1",$Trainer.name,speciesname))
pbNicknameAndStore(pokemon)
pbSeenForm(pokemon) if seeform
return true return true
end end
def pbAddPokemonSilent(pokemon,level=nil,seeform=true) def pbAddPokemonSilent(pkmn, level = 1, see_form = true)
return false if !pokemon || pbBoxesFull? return false if !pokemon || pbBoxesFull?
pokemon = getID(PBSpecies,pokemon) pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
if pokemon.is_a?(Integer) && level.is_a?(Integer) $Trainer.seen[pkmn.species] = true
pokemon = Pokemon.new(pokemon,level) $Trainer.owned[pkmn.species] = true
end pbSeenForm(pkmn) if see_form
$Trainer.seen[pokemon.species] = true pkmn.pbRecordFirstMoves
$Trainer.owned[pokemon.species] = true if $Trainer.party.length < 6
pbSeenForm(pokemon) if seeform $Trainer.party[$Trainer.party.length] = pkmn
pokemon.pbRecordFirstMoves
if $Trainer.party.length<6
$Trainer.party[$Trainer.party.length] = pokemon
else else
$PokemonStorage.pbStoreCaught(pokemon) $PokemonStorage.pbStoreCaught(pkmn)
end end
return true return true
end end
#=============================================================================== #===============================================================================
# Giving Pokémon/eggs to the player (can only add to party) # Giving Pokémon/eggs to the player (can only add to party)
#=============================================================================== #===============================================================================
def pbAddToParty(pokemon,level=nil,seeform=true) def pbAddToParty(pkmn, level = 1, see_form = true)
return false if !pokemon || $Trainer.party.length>=6 return false if !pkmn || $Trainer.party.length >= 6
pokemon = getID(PBSpecies,pokemon) pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
if pokemon.is_a?(Integer) && level.is_a?(Integer) species_name = pkmn.speciesName
pokemon = Pokemon.new(pokemon,level) pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, species_name))
end pbNicknameAndStore(pkmn)
speciesname = PBSpecies.getName(pokemon.species) pbSeenForm(pkmn) if see_form
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1",$Trainer.name,speciesname))
pbNicknameAndStore(pokemon)
pbSeenForm(pokemon) if seeform
return true return true
end end
def pbAddToPartySilent(pokemon,level=nil,seeform=true) def pbAddToPartySilent(pkmn, level = nil, see_form = true)
return false if !pokemon || $Trainer.party.length>=6 return false if !pkmn || $Trainer.party.length >= 6
pokemon = getID(PBSpecies,pokemon) pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
if pokemon.is_a?(Integer) && level.is_a?(Integer) $Trainer.seen[pkmn.species] = true
pokemon = Pokemon.new(pokemon,level) $Trainer.owned[pkmn.species] = true
end pbSeenForm(pkmn) if see_form
$Trainer.seen[pokemon.species] = true pkmn.pbRecordFirstMoves
$Trainer.owned[pokemon.species] = true $Trainer.party[$Trainer.party.length] = pkmn
pbSeenForm(pokemon) if seeform
pokemon.pbRecordFirstMoves
$Trainer.party[$Trainer.party.length] = pokemon
return true return true
end end
def pbAddForeignPokemon(pokemon,level=nil,ownerName=nil,nickname=nil,ownerGender=0,seeform=true) def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner_gender = 0, see_form = true)
return false if !pokemon || $Trainer.party.length>=6 return false if !pkmn || $Trainer.party.length>=6
pokemon = getID(PBSpecies,pokemon) pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
if pokemon.is_a?(Integer) && level.is_a?(Integer)
pokemon = Pokemon.new(pokemon,level)
end
# Set original trainer to a foreign one # Set original trainer to a foreign one
pokemon.owner = Pokemon::Owner.new_foreign(ownerName || "", ownerGender) pkmn.owner = Pokemon::Owner.new_foreign(owner_name || "", owner_gender)
# Set nickname # Set nickname
pokemon.name = nickname[0, Pokemon::MAX_NAME_SIZE] if nickname && nickname!="" pkmn.name = nickname[0, Pokemon::MAX_NAME_SIZE] if nickname && nickname!=""
# Recalculate stats # Recalculate stats
pokemon.calcStats pkmn.calcStats
if ownerName if owner_name
pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon from {2}.\1",$Trainer.name,ownerName)) pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon from {2}.\1", $Trainer.name, owner_name))
else else
pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon.\1",$Trainer.name)) pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon.\1", $Trainer.name))
end end
pbStorePokemon(pokemon) pbStorePokemon(pkmn)
$Trainer.seen[pokemon.species] = true $Trainer.seen[pkmn.species] = true
$Trainer.owned[pokemon.species] = true $Trainer.owned[pkmn.species] = true
pbSeenForm(pokemon) if seeform pbSeenForm(pkmn) if see_form
return true return true
end end
def pbGenerateEgg(pokemon,text="") def pbGenerateEgg(pkmn, text = "")
return false if !pokemon || $Trainer.party.length>=6 return false if !pkmn || $Trainer.party.length >= 6
pokemon = getID(PBSpecies,pokemon) pkmn = Pokemon.new(pkmn, EGG_LEVEL) if !pkmn.is_a?(Pokemon)
if pokemon.is_a?(Integer)
pokemon = Pokemon.new(pokemon,EGG_LEVEL)
end
# Get egg steps
eggSteps = pbGetSpeciesData(pokemon.species,pokemon.form,SpeciesData::STEPS_TO_HATCH)
# Set egg's details # Set egg's details
pokemon.name = _INTL("Egg") pkmn.name = _INTL("Egg")
pokemon.eggsteps = eggSteps pkmn.eggsteps = pkmn.species_data.hatch_steps
pokemon.obtainText = text pkmn.obtainText = text
pokemon.calcStats pkmn.calcStats
# Add egg to party # Add egg to party
$Trainer.party[$Trainer.party.length] = pokemon $Trainer.party[$Trainer.party.length] = pkmn
return true return true
end end
alias pbAddEgg pbGenerateEgg alias pbAddEgg pbGenerateEgg
alias pbGenEgg pbGenerateEgg alias pbGenEgg pbGenerateEgg
#=============================================================================== #===============================================================================
# Removing Pokémon from the party (fails if trying to remove last able Pokémon) # Removing Pokémon from the party (fails if trying to remove last able Pokémon)
#=============================================================================== #===============================================================================
def pbRemovePokemonAt(index) def pbRemovePokemonAt(index)
return false if index<0 || index>=$Trainer.party.length return false if index < 0 || index >= $Trainer.party.length
haveAble = false have_able = false
for i in 0...$Trainer.party.length $Trainer.party.each_with_index do |pkmn, i|
next if i==index have_able = true if i != index && !pkmn.egg? && pkmn.hp > 0
haveAble = true if $Trainer.party[i].hp>0 && !$Trainer.party[i].egg? break if have_able
end end
return false if !haveAble return false if !have_able
$Trainer.party.delete_at(index) $Trainer.party.delete_at(index)
return true return true
end end
#=============================================================================== #===============================================================================
# Recording Pokémon forms as seen # Recording Pokémon forms as seen
#=============================================================================== #===============================================================================
def pbSeenForm(pkmn,gender=0,form=0) def pbSeenForm(species, gender = 0, form = 0)
$Trainer.formseen = [] if !$Trainer.formseen $Trainer.formseen = {} if !$Trainer.formseen
$Trainer.formlastseen = [] if !$Trainer.formlastseen $Trainer.formlastseen = {} if !$Trainer.formlastseen
if pkmn.is_a?(Pokemon) if species.is_a?(Pokemon)
gender = pkmn.gender species_data = species.species_data
form = (pkmn.form rescue 0) gender = species.gender
species = pkmn.species
else else
species = getID(PBSpecies,pkmn) species_data = GameData::Species.get_species_form(species, form)
end end
return if !species || species<=0 return if !species_data
fSpecies = pbGetFSpeciesFromForm(species,form) species = species_data.species
species, form = pbGetSpeciesFromFSpecies(fSpecies) gender = 0 if gender >= 2
gender = 0 if gender>1 form = species_data.form
dexForm = pbGetSpeciesData(species,form,SpeciesData::POKEDEX_FORM) if form != species_data.pokedex_form
form = dexForm if dexForm>0 species_data = GameData::Species.get_species_form(species, species_data.pokedex_form)
fSpecies = pbGetFSpeciesFromForm(species,form) form = species_data.form
formName = pbGetMessage(MessageTypes::FormNames,fSpecies) end
form = 0 if !formName || formName=="" form = 0 if species_data.form_name.nil? || species_data.form_name.empty?
$Trainer.formseen[species] = [[],[]] if !$Trainer.formseen[species] $Trainer.formseen[species] = [[], []] if !$Trainer.formseen[species]
$Trainer.formseen[species][gender][form] = true $Trainer.formseen[species][gender][form] = true
$Trainer.formlastseen[species] = [] if !$Trainer.formlastseen[species] $Trainer.formlastseen[species] = [] if !$Trainer.formlastseen[species]
$Trainer.formlastseen[species] = [gender,form] if $Trainer.formlastseen[species]==[] $Trainer.formlastseen[species] = [gender, form] if $Trainer.formlastseen[species] == []
end end
def pbUpdateLastSeenForm(pkmn) def pbUpdateLastSeenForm(pkmn)
$Trainer.formlastseen = [] if !$Trainer.formlastseen $Trainer.formlastseen = {} if !$Trainer.formlastseen
form = (pkmn.form rescue 0) species_data = pkmn.species_data
dexForm = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesData::POKEDEX_FORM) form = species_data.pokedex_form
form = dexForm if dexForm>0 form = 0 if species_data.form_name.nil? || species_data.form_name.empty?
formName = pbGetMessage(MessageTypes::FormNames,pkmn.fSpecies) $Trainer.formlastseen[pkmn.species] = [pkmn.gender, form]
form = 0 if !formName || formName==""
$Trainer.formlastseen[pkmn.species] = [] if !$Trainer.formlastseen[pkmn.species]
$Trainer.formlastseen[pkmn.species] = [pkmn.gender,form]
end end
#=============================================================================== #===============================================================================
# Analyse Pokémon in the party # Analyse Pokémon in the party
#=============================================================================== #===============================================================================
# Returns the first unfainted, non-egg Pokémon in the player's party. # Returns the first unfainted, non-egg Pokémon in the player's party.
def pbFirstAblePokemon(variableNumber) def pbFirstAblePokemon(variableNumber)
for i in 0...$Trainer.party.length $Trainer.party.each_with_index do |pkmn, i|
p = $Trainer.party[i] next if pkmn.egg? || pkmn.hp == 0
if p && !p.egg? && p.hp>0 pbSet(variableNumber, i)
pbSet(variableNumber,i) return pkmn
return $Trainer.party[i]
end end
end pbSet(variableNumber, -1)
pbSet(variableNumber,-1)
return nil return nil
end end
# Checks whether the player would still have an unfainted Pokémon if the # Checks whether the player would still have an unfainted Pokémon if the
# Pokémon given by _pokemonIndex_ were removed from the party. # Pokémon given by _index_ were removed from the party.
def pbCheckAble(pokemonIndex) def pbCheckAble(index)
for i in 0...$Trainer.party.length $Trainer.party.each_with_index do |pkmn, i|
next if i==pokemonIndex return true if i != index && !pkmn.egg? && pkmn.hp > 0
p = $Trainer.party[i]
return true if p && !p.egg? && p.hp>0
end end
return false return false
end end
# Returns true if there are no usable Pokémon in the player's party. # Returns true if there are no usable Pokémon in the player's party.
def pbAllFainted def pbAllFainted
return $Trainer.ablePokemonCount==0 return $Trainer.ablePokemonCount == 0
end end
# Returns true if there is a Pokémon of the given species in the player's party. # Returns true if there is a Pokémon of the given species in the player's party.
# You may also specify a particular form it should be. # You may also specify a particular form it should be.
def pbHasSpecies?(species,form=-1) def pbHasSpecies?(species, form = -1)
species = getID(PBSpecies,species) $Trainer.pokemonParty.each do |pkmn|
for pokemon in $Trainer.pokemonParty return true if pkmn.isSpecies?(species) && (form < 0 || pkmn.form == form)
return true if pokemon.species==species && (form<0 || form==pokemon.form)
end end
return false return false
end end
@@ -282,9 +243,8 @@ end
# Returns true if there is a fatefully met Pokémon of the given species in the # Returns true if there is a fatefully met Pokémon of the given species in the
# player's party. # player's party.
def pbHasFatefulSpecies?(species) def pbHasFatefulSpecies?(species)
species = getID(PBSpecies,species) $Trainer.pokemonParty.each do |pkmn|
for pokemon in $Trainer.pokemonParty return true if pkmn.isSpecies?(species) && pkmn.obtainMode == 4
return true if pokemon.species==species && pokemon.obtainMode==4
end end
return false return false
end end
@@ -292,23 +252,17 @@ end
# Returns true if there is a Pokémon with the given type in the player's party. # Returns true if there is a Pokémon with the given type in the player's party.
def pbHasType?(type) def pbHasType?(type)
type = GameData::Type.get(type).id type = GameData::Type.get(type).id
for pokemon in $Trainer.pokemonParty $Trainer.pokemonParty.each { |pkmn| return true if pkmn.hasType?(type) }
return true if pokemon.hasType?(type)
end
return false return false
end end
# Checks whether any Pokémon in the party knows the given move, and returns # Checks whether any Pokémon in the party knows the given move, and returns
# the first Pokémon it finds with that move, or nil if no Pokémon has that move. # the first Pokémon it finds with that move, or nil if no Pokémon has that move.
def pbCheckMove(move) def pbCheckMove(move)
$Trainer.pokemonParty.each do |pkmn| $Trainer.pokemonParty.each { |pkmn| return pkmn if pkmn.hasMove?(move) }
return pkmn if pkmn.hasMove?(move)
end
return nil return nil
end end
#=============================================================================== #===============================================================================
# Fully heal all Pokémon in the party # Fully heal all Pokémon in the party
#=============================================================================== #===============================================================================
@@ -316,39 +270,37 @@ def pbHealAll
$Trainer.party.each { |pkmn| pkmn.heal } $Trainer.party.each { |pkmn| pkmn.heal }
end end
#=============================================================================== #===============================================================================
# Return a level value based on Pokémon in a party # Return a level value based on Pokémon in a party
#=============================================================================== #===============================================================================
def pbBalancedLevel(party) def pbBalancedLevel(party)
return 1 if party.length==0 return 1 if party.length == 0
# Calculate the mean of all levels # Calculate the mean of all levels
sum = 0 sum = 0
party.each { |p| sum += p.level } party.each { |p| sum += p.level }
return 1 if sum==0 return 1 if sum == 0
mLevel = PBExperience.maxLevel mLevel = PBExperience.maxLevel
average = sum.to_f/party.length.to_f average = sum.to_f / party.length.to_f
# Calculate the standard deviation # Calculate the standard deviation
varianceTimesN = 0 varianceTimesN = 0
for i in 0...party.length party.each do |pkmn|
deviation = party[i].level-average deviation = pkmn.level - average
varianceTimesN += deviation*deviation varianceTimesN += deviation * deviation
end end
# NOTE: This is the "population" standard deviation calculation, since no # NOTE: This is the "population" standard deviation calculation, since no
# sample is being taken. # sample is being taken.
stdev = Math.sqrt(varianceTimesN/party.length) stdev = Math.sqrt(varianceTimesN / party.length)
mean = 0 mean = 0
weights = [] weights = []
# Skew weights according to standard deviation # Skew weights according to standard deviation
for i in 0...party.length party.each do |pkmn|
weight = party[i].level.to_f/sum.to_f weight = pkmn.level.to_f / sum.to_f
if weight<0.5 if weight < 0.5
weight -= (stdev/mLevel.to_f) weight -= (stdev / mLevel.to_f)
weight = 0.001 if weight<=0.001 weight = 0.001 if weight <= 0.001
else else
weight += (stdev/mLevel.to_f) weight += (stdev / mLevel.to_f)
weight = 0.999 if weight>=0.999 weight = 0.999 if weight >= 0.999
end end
weights.push(weight) weights.push(weight)
end end
@@ -356,75 +308,68 @@ def pbBalancedLevel(party)
weights.each { |w| weightSum += w } weights.each { |w| weightSum += w }
# Calculate the weighted mean, assigning each weight to each level's # Calculate the weighted mean, assigning each weight to each level's
# contribution to the sum # contribution to the sum
for i in 0...party.length party.each_with_index { |pkmn, i| mean += pkmn.level * weights[i] }
mean += party[i].level*weights[i]
end
mean /= weightSum mean /= weightSum
# Round to nearest number
mean = mean.round mean = mean.round
# Adjust level to minimum mean = 1 if mean < 1
mean = 1 if mean<1
# Add 2 to the mean to challenge the player # Add 2 to the mean to challenge the player
mean += 2 mean += 2
# Adjust level to maximum # Adjust level to maximum
mean = mLevel if mean>mLevel mean = mLevel if mean > mLevel
return mean return mean
end end
#=============================================================================== #===============================================================================
# Calculates a Pokémon's size (in millimeters) # Calculates a Pokémon's size (in millimeters)
#=============================================================================== #===============================================================================
def pbSize(pkmn) def pbSize(pkmn)
baseheight = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesData::HEIGHT) baseheight = pkmn.height
hpiv = pkmn.iv[0]&15 hpiv = pkmn.iv[0] & 15
ativ = pkmn.iv[1]&15 ativ = pkmn.iv[1] & 15
dfiv = pkmn.iv[2]&15 dfiv = pkmn.iv[2] & 15
spiv = pkmn.iv[3]&15 spiv = pkmn.iv[3] & 15
saiv = pkmn.iv[4]&15 saiv = pkmn.iv[4] & 15
sdiv = pkmn.iv[5]&15 sdiv = pkmn.iv[5] & 15
m = pkmn.personalID&0xFF m = pkmn.personalID & 0xFF
n = (pkmn.personalID>>8)&0xFF n = (pkmn.personalID >> 8) & 0xFF
s = (((ativ^dfiv)*hpiv)^m)*256+(((saiv^sdiv)*spiv)^n) s = (((ativ ^ dfiv) * hpiv) ^ m) * 256 + (((saiv ^ sdiv) * spiv) ^ n)
xyz = [] xyz = []
if s<10; xyz = [ 290, 1, 0] if s < 10; xyz = [ 290, 1, 0]
elsif s<110; xyz = [ 300, 1, 10] elsif s < 110; xyz = [ 300, 1, 10]
elsif s<310; xyz = [ 400, 2, 110] elsif s < 310; xyz = [ 400, 2, 110]
elsif s<710; xyz = [ 500, 4, 310] elsif s < 710; xyz = [ 500, 4, 310]
elsif s<2710; xyz = [ 600, 20, 710] elsif s < 2710; xyz = [ 600, 20, 710]
elsif s<7710; xyz = [ 700, 50, 2710] elsif s < 7710; xyz = [ 700, 50, 2710]
elsif s<17710; xyz = [ 800, 100, 7710] elsif s < 17710; xyz = [ 800, 100, 7710]
elsif s<32710; xyz = [ 900, 150, 17710] elsif s < 32710; xyz = [ 900, 150, 17710]
elsif s<47710; xyz = [1000, 150, 32710] elsif s < 47710; xyz = [1000, 150, 32710]
elsif s<57710; xyz = [1100, 100, 47710] elsif s < 57710; xyz = [1100, 100, 47710]
elsif s<62710; xyz = [1200, 50, 57710] elsif s < 62710; xyz = [1200, 50, 57710]
elsif s<64710; xyz = [1300, 20, 62710] elsif s < 64710; xyz = [1300, 20, 62710]
elsif s<65210; xyz = [1400, 5, 64710] elsif s < 65210; xyz = [1400, 5, 64710]
elsif s<65410; xyz = [1500, 2, 65210] elsif s < 65410; xyz = [1500, 2, 65210]
else; xyz = [1700, 1, 65510] else; xyz = [1700, 1, 65510]
end end
return (((s-xyz[2])/xyz[1]+xyz[0]).floor*baseheight/10).floor return (((s - xyz[2]) / xyz[1] + xyz[0]).floor * baseheight / 10).floor
end end
#=============================================================================== #===============================================================================
# Returns true if the given species can be legitimately obtained as an egg # Returns true if the given species can be legitimately obtained as an egg
#=============================================================================== #===============================================================================
def pbHasEgg?(species) def pbHasEgg?(species)
species = getID(PBSpecies,species) species_data = GameData::Species.try_get(species)
return false if !species return false if !species_data
species = species_data.species
# species may be unbreedable, so check its evolution's compatibilities # species may be unbreedable, so check its evolution's compatibilities
evoSpecies = EvolutionHelper.evolutions(species, true) evoSpecies = EvolutionHelper.evolutions(species, true)
compatSpecies = (evoSpecies && evoSpecies[0]) ? evoSpecies[0][2] : species compatSpecies = (evoSpecies && evoSpecies[0]) ? evoSpecies[0][2] : species
compat = pbGetSpeciesData(compatSpecies,0,SpeciesData::COMPATIBILITY) species_data = GameData::Species.try_get(compatSpecies)
compat = [compat] if !compat.is_a?(Array) compat = species_data.egg_groups
return false if compat.include?(getConst(PBEggGroups,:Undiscovered)) return false if compat.include?(PBEggGroups::Undiscovered)
return false if compat.include?(getConst(PBEggGroups,:Ditto)) return false if compat.include?(PBEggGroups::Ditto)
baby = EvolutionHelper.baby_species(species) baby = EvolutionHelper.baby_species(species)
return true if species==baby # Is a basic species return true if species == baby # Is a basic species
baby = EvolutionHelper.baby_species(species, true) baby = EvolutionHelper.baby_species(species, true)
return true if species==baby # Is an egg species without incense return true if species == baby # Is an egg species without incense
return false return false
end end
@@ -203,6 +203,7 @@ end
#=============================================================================== #===============================================================================
# Constants utilities # Constants utilities
#=============================================================================== #===============================================================================
# Unused
def isConst?(val,mod,constant) def isConst?(val,mod,constant)
begin begin
return false if !mod.const_defined?(constant.to_sym) return false if !mod.const_defined?(constant.to_sym)
@@ -212,6 +213,7 @@ def isConst?(val,mod,constant)
return (val==mod.const_get(constant.to_sym)) return (val==mod.const_get(constant.to_sym))
end end
# Unused
def hasConst?(mod,constant) def hasConst?(mod,constant)
return false if !mod || !constant || constant=="" return false if !mod || !constant || constant==""
return mod.const_defined?(constant.to_sym) rescue false return mod.const_defined?(constant.to_sym) rescue false
@@ -828,97 +830,49 @@ end
#===============================================================================
# fSpecies utilities
#===============================================================================
def pbGetFSpeciesFromForm(species,form=0)
return species if form==0
ret = species
species = pbGetSpeciesFromFSpecies(species)[0] if species>PBSpecies.maxValue
formData = pbLoadFormToSpecies
if formData[species] && formData[species][form] && formData[species][form]>0
ret = formData[species][form]
end
return ret
end
def pbGetSpeciesFromFSpecies(species)
return [species,0] if species<=PBSpecies.maxValue
formdata = pbLoadFormToSpecies
for i in 1...formdata.length
next if !formdata[i]
for j in 0...formdata[i].length
return [i,j] if formdata[i][j]==species
end
end
return [species,0]
end
#=============================================================================== #===============================================================================
# Regional and National Pokédexes utilities # Regional and National Pokédexes utilities
#=============================================================================== #===============================================================================
# Gets the ID number for the current region based on the player's current # Returns the ID number of the region containing the player's current location,
# position. Returns the value of "defaultRegion" (optional, default is -1) if # as determined by the current map's metadata.
# no region was defined in the game's metadata. The ID numbers returned by def pbGetCurrentRegion(default = -1)
# this function depend on the current map's position metadata. map_pos = ($game_map) ? GameData::MapMetadata.get($game_map.map_id).town_map_position : nil
def pbGetCurrentRegion(defaultRegion=-1) return (map_pos) ? map_pos[0] : default
mappos = ($game_map) ? GameData::MapMetadata.get($game_map.map_id).town_map_position : nil
return (mappos) ? mappos[0] : defaultRegion
end end
# Gets the Regional Pokédex number of the national species for the specified # Returns the Regional Pokédex number of the given species in the given Regional
# Regional Dex. The parameter "region" is zero-based. For example, if two # Dex. The parameter "region" is zero-based. For example, if two regions are
# regions are defined, they would each be specified as 0 and 1. # defined, they would each be specified as 0 and 1.
def pbGetRegionalNumber(region,nationalSpecies) def pbGetRegionalNumber(region, species)
if nationalSpecies<=0 || nationalSpecies>PBSpecies.maxValue dex_list = pbLoadRegionalDexes[region]
# Return 0 if national species is outside range return 0 if !dex_list || dex_list.length == 0
return 0 species_data = GameData::Species.try_get(species)
end return 0 if !species_data
dexList = pbLoadRegionalDexes[region] dex_list.each_with_index do |s, index|
return 0 if !dexList || dexList.length==0 return index + 1 if s == species_data.species
return dexList[nationalSpecies] || 0
end
# Gets the National Pokédex number of the specified species and region. The
# parameter "region" is zero-based. For example, if two regions are defined,
# they would each be specified as 0 and 1.
def pbGetNationalNumber(region,regionalSpecies)
dexList = pbLoadRegionalDexes[region]
return 0 if !dexList || dexList.length==0
for i in 0...dexList.length
return i if dexList[i]==regionalSpecies
end end
return 0 return 0
end end
# Gets an array of all national species within the given Regional Dex, sorted by # Returns an array of all species in the given Regional Dex in that Dex's order.
# Regional Dex number. The number of items in the array should be the def pbAllRegionalSpecies(region_dex)
# number of species in the Regional Dex plus 1, since index 0 is considered return nil if region_dex < 0
# to be empty. The parameter "region" is zero-based. For example, if two dex_list = pbLoadRegionalDexes[region_dex]
# regions are defined, they would each be specified as 0 and 1. return nil if !dex_list || dex_list.length == 0
def pbAllRegionalSpecies(region) return dex_list.clone
ret = [0]
return ret if region<0
dexList = pbLoadRegionalDexes[region]
return ret if !dexList || dexList.length==0
for i in 0...dexList.length
ret[dexList[i]] = i if dexList[i] && dexList[i] > 0
end
ret.map! { |e| e ? e : 0 } # Replace nils with 0s
return ret
end end
def pbGetRegionalDexLength(region) # Returns the number of species in the given Regional Dex. Returns 0 if that
return PBSpecies.maxValue if region<0 # Regional Dex doesn't exist. If region_dex is a negative number, returns the
# number of species in the National Dex (i.e. all species).
def pbGetRegionalDexLength(region_dex)
if region_dex < 0
ret = 0 ret = 0
dexList = pbLoadRegionalDexes[region] GameData::Species.each { |s| ret += 1 if s.form == 0 }
return ret if !dexList || dexList.length==0
for i in 0...dexList.length
ret = dexList[i] if dexList[i] && dexList[i]>ret
end
return ret return ret
end
dex_list = pbLoadRegionalDexes[region_dex]
return (dex_list) ? dex_list.length : 0
end end
# Decides which Dex lists are able to be viewed (i.e. they are unlocked and have # Decides which Dex lists are able to be viewed (i.e. they are unlocked and have
@@ -991,7 +945,7 @@ def pbMoveTutorAnnotations(move, movelist = nil)
# Checked data from movelist given in parameter # Checked data from movelist given in parameter
ret[i] = _INTL("ABLE") ret[i] = _INTL("ABLE")
elsif pkmn.compatibleWithMove?(move) elsif pkmn.compatibleWithMove?(move)
# Checked data from PBS/tm.txt # Checked data from Pokémon's tutor moves in pokemon.txt
ret[i] = _INTL("ABLE") ret[i] = _INTL("ABLE")
else else
ret[i] = _INTL("NOT ABLE") ret[i] = _INTL("NOT ABLE")
@@ -1049,12 +1003,12 @@ def pbConvertItemToItem(variable, array)
end end
end end
def pbConvertItemToPokemon(variable,array) def pbConvertItemToPokemon(variable, array)
item = GameData::Item.get(pbGet(variable)) item = GameData::Item.get(pbGet(variable))
pbSet(variable, 0) pbSet(variable, 0)
for i in 0...(array.length/2) for i in 0...(array.length / 2)
next if item != array[2 * i] next if item != array[2 * i]
pbSet(variable,getID(PBSpecies,array[2*i+1])) pbSet(variable, GameData::Species.get(array[2 * i + 1]).id)
return return
end end
end end
+35 -42
View File
@@ -294,12 +294,12 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil)
#============================================================================= #=============================================================================
when "testwildbattle" when "testwildbattle"
species = pbChooseSpeciesList species = pbChooseSpeciesList
if species!=0 if species
params = ChooseNumberParams.new params = ChooseNumberParams.new
params.setRange(1,PBExperience.maxLevel) params.setRange(1,PBExperience.maxLevel)
params.setInitialValue(5) params.setInitialValue(5)
params.setCancelValue(0) params.setCancelValue(0)
level = pbMessageChooseNumber(_INTL("Set the wild {1}'s level.",PBSpecies.getName(species)),params) level = pbMessageChooseNumber(_INTL("Set the wild {1}'s level.", GameData::Species.get(species).name), params)
if level>0 if level>0
$PokemonTemp.encounterType = -1 $PokemonTemp.encounterType = -1
pbWildBattle(species,level) pbWildBattle(species,level)
@@ -343,12 +343,12 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil)
size0 = newSize if newSize>0 size0 = newSize if newSize>0
elsif pkmnCmd==pkmnCmds.length-3 # Add Pokémon elsif pkmnCmd==pkmnCmds.length-3 # Add Pokémon
species = pbChooseSpeciesList species = pbChooseSpeciesList
if species!=0 if species
params = ChooseNumberParams.new params = ChooseNumberParams.new
params.setRange(1,PBExperience.maxLevel) params.setRange(1,PBExperience.maxLevel)
params.setInitialValue(5) params.setInitialValue(5)
params.setCancelValue(0) params.setCancelValue(0)
level = pbMessageChooseNumber(_INTL("Set the wild {1}'s level.",PBSpecies.getName(species)),params) level = pbMessageChooseNumber(_INTL("Set the wild {1}'s level.", GameData::Species.get(species).name), params)
if level>0 if level>0
pkmn.push(Pokemon.new(species,level)) pkmn.push(Pokemon.new(species,level))
end end
@@ -524,7 +524,7 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil)
#============================================================================= #=============================================================================
when "addpokemon" when "addpokemon"
species = pbChooseSpeciesList species = pbChooseSpeciesList
if species!=0 if species
params = ChooseNumberParams.new params = ChooseNumberParams.new
params.setRange(1,PBExperience.maxLevel) params.setRange(1,PBExperience.maxLevel)
params.setInitialValue(5) params.setInitialValue(5)
@@ -548,48 +548,41 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil)
end end
pbMessage(_INTL("All eggs in your party now require one step to hatch.")) pbMessage(_INTL("All eggs in your party now require one step to hatch."))
when "fillboxes" when "fillboxes"
$Trainer.formseen = [] if !$Trainer.formseen $Trainer.formseen = {} if !$Trainer.formseen
$Trainer.formlastseen = [] if !$Trainer.formlastseen $Trainer.formlastseen = {} if !$Trainer.formlastseen
added = 0; completed = true added = 0
speciesData = pbLoadSpeciesData box_qty = $PokemonStorage.maxPokemon(0)
formdata = pbLoadFormToSpecies completed = true
for i in 1..PBSpecies.maxValue GameData::Species.each do |species_data|
if added>=NUM_STORAGE_BOXES*30 sp = species_data.species
completed = false; break f = species_data.form
end # Record each form of each species as seen and owned
cname = getConstantName(PBSpecies,i) rescue nil $Trainer.formseen[sp] = [[], []] if !$Trainer.formseen[sp]
next if !cname if f == 0
pkmn = Pokemon.new(i,50) $Trainer.seen[sp] = true
$PokemonStorage[(i-1)/$PokemonStorage.maxPokemon(0), $Trainer.owned[sp] = true
(i-1)%$PokemonStorage.maxPokemon(0)] = pkmn if [PBGenderRates::AlwaysMale, PBGenderRates::AlwaysFemale,
# Record all forms of this Pokémon as seen and owned PBGenderRates::Genderless].include?(species_data.gender_rate)
$Trainer.seen[i] = true g = (species_data.gender_rate == PBGenderRates::AlwaysFemale) ? 1 : 0
$Trainer.owned[i] = true $Trainer.formseen[sp][g][f] = true
$Trainer.formseen[i] = [[],[]] $Trainer.formlastseen[sp] = [g, f] if f == 0
formdata[i] = [i] if !formdata[i]
for form in 0...formdata[i].length
next if !formdata[i][form] || formdata[i][form]==0
fSpecies = pbGetFSpeciesFromForm(i,form)
formname = pbGetMessage(MessageTypes::FormNames,fSpecies)
genderRate = speciesData[i][SpeciesData::GENDER_RATE] || 0
gender = (genderRate==PBGenderRates::AlwaysFemale) ? 1 : 0
if form==0
case genderRate
when PBGenderRates::AlwaysMale,
PBGenderRates::AlwaysFemale,
PBGenderRates::Genderless
$Trainer.formseen[i][gender][form] = true
$Trainer.formlastseen[i] = [gender,form]
else # Both male and female else # Both male and female
$Trainer.formseen[i][0][form] = true $Trainer.formseen[sp][0][f] = true
$Trainer.formseen[i][1][form] = true $Trainer.formseen[sp][1][f] = true
$Trainer.formlastseen[i] = [0,form] $Trainer.formlastseen[i] = [0, f] if f == 0
end end
elsif formname && formname!="" elsif species_data.real_form_name && !species_data.real_form_name.empty?
$Trainer.formseen[i][gender][form] = true g = (species_data.gender_rate == PBGenderRates::AlwaysFemale) ? 1 : 0
$Trainer.formseen[sp][g][f] = true
end end
# Add Pokémon (if form 0)
next if f != 0
if added >= NUM_STORAGE_BOXES * box_qty
completed = false
next
end end
added += 1 added += 1
$PokemonStorage[(added - 1) / box_qty, (added - 1) % box_qty] = Pokemon.new(sp, 50)
end end
pbMessage(_INTL("Storage boxes were filled with one Pokémon of each species.")) pbMessage(_INTL("Storage boxes were filled with one Pokémon of each species."))
if !completed if !completed
+27 -21
View File
@@ -237,7 +237,7 @@ def pbDebugDayCare
pkmn = $PokemonGlobal.daycare[i][0] pkmn = $PokemonGlobal.daycare[i][0]
initlevel = $PokemonGlobal.daycare[i][1] initlevel = $PokemonGlobal.daycare[i][1]
leveldiff = pkmn.level-initlevel 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 y += 32
if pkmn.male? if pkmn.male?
textpos.push([_INTL("Male ♂"),8+i*Graphics.width/2,y,0,Color.new(128,192,248),shadow]) textpos.push([_INTL("Male ♂"),8+i*Graphics.width/2,y,0,Color.new(128,192,248),shadow])
@@ -347,8 +347,7 @@ def pbDebugDayCare
pbDayCareGenerateEgg pbDayCareGenerateEgg
$PokemonGlobal.daycareEgg = 0 $PokemonGlobal.daycareEgg = 0
$PokemonGlobal.daycareEggSteps = 0 $PokemonGlobal.daycareEggSteps = 0
pbMessage(_INTL("Collected the {1} egg.", pbMessage(_INTL("Collected the {1} egg.", $Trainer.lastParty.speciesName))
PBSpecies.getName($Trainer.lastParty.species)))
refresh = true refresh = true
end end
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) self.shadowtext(_INTL("[Clear all current roamer locations]"),rect.x,rect.y,nameWidth,rect.height)
else else
pkmn = ROAMING_SPECIES[index] 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 = "" status = ""
statuscolor = 0 statuscolor = 0
if pkmn[2]<=0 || $game_switches[pkmn[2]] if pkmn[2]<=0 || $game_switches[pkmn[2]]
@@ -528,32 +527,39 @@ end
#=============================================================================== #===============================================================================
def pbCreatePokemon def pbCreatePokemon
party = [] party = []
species = [:PIKACHU,:PIDGEOTTO,:KADABRA,:GYARADOS,:DIGLETT,:CHANSEY] species = [:PIKACHU, :PIDGEOTTO, :KADABRA, :GYARADOS, :DIGLETT, :CHANSEY]
for id in species for id in species
party.push(getConst(PBSpecies,id)) if hasConst?(PBSpecies,id) party.push(id) if GameData::Species.exists?(id)
end end
# Species IDs of the Pokémon to be created # Species IDs of the Pokémon to be created
for i in 0...party.length for i in 0...party.length
species = party[i] species = party[i]
# Generate Pokémon with species and level 20 # Generate Pokémon with species and level 20
$Trainer.party[i] = Pokemon.new(species,20) $Trainer.party[i] = Pokemon.new(species, 20)
$Trainer.seen[species] = true # Set this species to seen and owned $Trainer.seen[species] = true
$Trainer.owned[species] = true $Trainer.owned[species] = true
pbSeenForm($Trainer.party[i]) 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 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 for i in 0...party.length
$Trainer.party[i].pbRecordFirstMoves $Trainer.party[i].pbRecordFirstMoves
end end
+20 -21
View File
@@ -533,7 +533,7 @@ module PokemonDebugMixin
case cmd case cmd
when 0 # Set species when 0 # Set species
species = pbChooseSpeciesList(pkmn.species) species = pbChooseSpeciesList(pkmn.species)
if species!=0 && species!=pkmn.species if species && species != pkmn.species
pkmn.species = species pkmn.species = species
pkmn.calcStats pkmn.calcStats
pbSeenForm(pkmn) if !settingUpBattle pbSeenForm(pkmn) if !settingUpBattle
@@ -541,25 +541,24 @@ module PokemonDebugMixin
end end
when 1 # Set form when 1 # Set form
cmd2 = 0 cmd2 = 0
formcmds = [[],[]] formcmds = [[], []]
formdata = pbLoadFormToSpecies GameData::Species.each do |sp|
formdata[pkmn.species] = [pkmn.species] if !formdata[pkmn.species] next if sp.species != pkmn.species
for form in 0...formdata[pkmn.species].length form_name = sp.form_name
fSpecies = pbGetFSpeciesFromForm(pkmn.species,form) form_name = _INTL("Unnamed form") if !form_name || form_name.empty?
formname = pbGetMessage(MessageTypes::FormNames,fSpecies) form_name = sprintf("%d: %s", sp.form, form_name)
formname = _INTL("Unnamed form") if !formname || formname=="" formcmds[0].push(sp.form)
formname = _INTL("{1}: {2}",form,formname) formcmds[1].push(form_name)
formcmds[0].push(form); formcmds[1].push(formname) cmd2 = sp.form if pkmn.form == sp.form
cmd2 = form if pkmn.form==form
end end
if formcmds[0].length<=1 if formcmds[0].length <= 1
pbDisplay(_INTL("Species {1} only has one form.",pkmn.speciesName)) pbDisplay(_INTL("Species {1} only has one form.", pkmn.speciesName))
else else
cmd2 = pbShowCommands(_INTL("Set the Pokémon's form."),formcmds[1],cmd2) cmd2 = pbShowCommands(_INTL("Set the Pokémon's form."), formcmds[1], cmd2)
next if cmd2<0 next if cmd2 < 0
f = formcmds[0][cmd2] f = formcmds[0][cmd2]
if f!=pkmn.form if f != pkmn.form
if MultipleForms.hasFunction?(pkmn,"getForm") if MultipleForms.hasFunction?(pkmn, "getForm")
next if !pbConfirm(_INTL("This species decides its own form. Override?")) next if !pbConfirm(_INTL("This species decides its own form. Override?"))
pkmn.forcedForm = f pkmn.forcedForm = f
end end
@@ -599,7 +598,7 @@ module PokemonDebugMixin
when "setnickname" when "setnickname"
cmd = 0 cmd = 0
loop do loop do
speciesname = PBSpecies.getName(pkmn.species) speciesname = pkmn.speciesName
msg = [_INTL("{1} has the nickname {2}.",speciesname,pkmn.name), msg = [_INTL("{1} has the nickname {2}.",speciesname,pkmn.name),
_INTL("{1} has no nickname.",speciesname)][pkmn.name==speciesname ? 1 : 0] _INTL("{1} has no nickname.",speciesname)][pkmn.name==speciesname ? 1 : 0]
cmd = pbShowCommands(msg,[ cmd = pbShowCommands(msg,[
@@ -722,18 +721,18 @@ module PokemonDebugMixin
case cmd case cmd
when 0 # Make egg when 0 # Make egg
if !pkmn.egg? && (pbHasEgg?(pkmn.species) || if !pkmn.egg? && (pbHasEgg?(pkmn.species) ||
pbConfirm(_INTL("{1} cannot legally be an egg. Make egg anyway?",PBSpecies.getName(pkmn.species)))) pbConfirm(_INTL("{1} cannot legally be an egg. Make egg anyway?", pkmn.speciesName)))
pkmn.level = EGG_LEVEL pkmn.level = EGG_LEVEL
pkmn.calcStats pkmn.calcStats
pkmn.name = _INTL("Egg") pkmn.name = _INTL("Egg")
pkmn.eggsteps = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesData::STEPS_TO_HATCH) pkmn.eggsteps = pkmn.species_data.hatch_steps
pkmn.hatchedMap = 0 pkmn.hatchedMap = 0
pkmn.obtainMode = 1 pkmn.obtainMode = 1
pbRefreshSingle(pkmnid) pbRefreshSingle(pkmnid)
end end
when 1 # Make Pokémon when 1 # Make Pokémon
if pkmn.egg? if pkmn.egg?
pkmn.name = PBSpecies.getName(pkmn.species) pkmn.name = pkmn.speciesName
pkmn.eggsteps = 0 pkmn.eggsteps = 0
pkmn.hatchedMap = 0 pkmn.hatchedMap = 0
pkmn.obtainMode = 0 pkmn.obtainMode = 0
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+20 -16
View File
@@ -263,16 +263,16 @@ end
module SpeciesProperty module SpeciesProperty
def self.set(_settingname,oldsetting) def self.set(_settingname,oldsetting)
ret = pbChooseSpeciesList((oldsetting) ? oldsetting : 1) ret = pbChooseSpeciesList(oldsetting || nil)
return (ret<=0) ? (oldsetting) ? oldsetting : 0 : ret return ret || oldsetting
end end
def self.defaultValue def self.defaultValue
return 0 return nil
end end
def self.format(value) def self.format(value)
return (value) ? PBSpecies.getName(value) : "-" return (value && GameData::Species.exists?(value)) ? GameData::Species.get(value).real_name : "-"
end end
end end
@@ -1258,15 +1258,17 @@ class EvolutionsProperty
param_type = PBEvolution.getFunction(realcmds[i][0], "parameterType") param_type = PBEvolution.getFunction(realcmds[i][0], "parameterType")
has_param = !PBEvolution.hasFunction?(realcmds[i][0], "parameterType") || param_type != nil has_param = !PBEvolution.hasFunction?(realcmds[i][0], "parameterType") || param_type != nil
if has_param if has_param
if param_type if param_type && !GameData.const_defined?(param_type.to_sym)
level = (Object.const_get(param_type).getName(level) rescue getConstantName(param_type, level) rescue level) level = getConstantName(param_type, level)
else
level = level.to_s
end end
level = "???" if !level level = "???" if !level || level.empty?
commands.push(_INTL("{1}: {2}, {3}", commands.push(_INTL("{1}: {2}, {3}",
PBSpecies.getName(realcmds[i][2]),@methods[realcmds[i][0]],level.to_s)) GameData::Species.get(realcmds[i][2]).name, @methods[realcmds[i][0]], level.to_s))
else else
commands.push(_INTL("{1}: {2}", commands.push(_INTL("{1}: {2}",
PBSpecies.getName(realcmds[i][2]),@methods[realcmds[i][0]])) GameData::Species.get(realcmds[i][2]).name, @methods[realcmds[i][0]]))
end end
end end
cmd[1] = i if oldsel>=0 && realcmds[i][3]==oldsel cmd[1] = i if oldsel>=0 && realcmds[i][3]==oldsel
@@ -1290,7 +1292,7 @@ class EvolutionsProperty
if entry[0]==-1 # Add new evolution path if entry[0]==-1 # Add new evolution path
pbMessage(_INTL("Choose an evolved form, method and parameter.")) pbMessage(_INTL("Choose an evolved form, method and parameter."))
newspecies = pbChooseSpeciesList newspecies = pbChooseSpeciesList
if newspecies>0 if newspecies
newmethod = pbMessage(_INTL("Choose an evolution method."),@methods,-1) newmethod = pbMessage(_INTL("Choose an evolution method."),@methods,-1)
if newmethod>0 if newmethod>0
newparam = -1 newparam = -1
@@ -1303,7 +1305,7 @@ class EvolutionsProperty
newparam = pbChooseItemList newparam = pbChooseItemList
when :Move when :Move
newparam = pbChooseMoveList newparam = pbChooseMoveList
when :PBSpecies when :Species
newparam = pbChooseSpeciesList newparam = pbChooseSpeciesList
when :Type when :Type
newparam = pbChooseTypeList newparam = pbChooseTypeList
@@ -1343,7 +1345,7 @@ class EvolutionsProperty
_INTL("Change parameter"),_INTL("Delete"),_INTL("Cancel")],5) _INTL("Change parameter"),_INTL("Delete"),_INTL("Cancel")],5)
if cmd2==0 # Change species if cmd2==0 # Change species
newspecies = pbChooseSpeciesList(entry[2]) newspecies = pbChooseSpeciesList(entry[2])
if newspecies>0 if newspecies
havemove = -1 havemove = -1
for i in 0...realcmds.length for i in 0...realcmds.length
havemove = realcmds[i][3] if realcmds[i][0]==entry[0] && havemove = realcmds[i][3] if realcmds[i][0]==entry[0] &&
@@ -1391,7 +1393,7 @@ class EvolutionsProperty
newparam = pbChooseItemList(entry[1]) newparam = pbChooseItemList(entry[1])
when :Move when :Move
newparam = pbChooseMoveList(entry[1]) newparam = pbChooseMoveList(entry[1])
when :PBSpecies when :Species
newparam = pbChooseSpeciesList(entry[1]) newparam = pbChooseSpeciesList(entry[1])
when :Type when :Type
newparam = pbChooseTypeList(entry[1]) newparam = pbChooseTypeList(entry[1])
@@ -1464,11 +1466,13 @@ class EvolutionsProperty
ret << "," if i>0 ret << "," if i>0
param = value[i][1] param = value[i][1]
param_type = PBEvolution.getFunction(value[i][0], "parameterType") param_type = PBEvolution.getFunction(value[i][0], "parameterType")
if param_type if param_type && !GameData.const_defined?(param_type.to_sym)
param = (Object.const_get(param_type).getName(param) rescue getConstantName(param_type, param) rescue param) param = getConstantName(param_type, param)
else
param = param.to_s
end end
param = "" if !param param = "" if !param
ret << sprintf("#{PBSpecies.getName(value[i][2])},#{@methods[value[i][0]]},#{param}") ret << sprintf("#{GameData::Species.get(value[i][2]).name},#{@methods[value[i][0]]},#{param}")
end end
return ret return ret
end end
+12 -15
View File
@@ -326,12 +326,11 @@ end
# #
#=============================================================================== #===============================================================================
class SpeciesLister class SpeciesLister
def initialize(selection,includeNew=false) def initialize(selection = 0, includeNew = false)
@selection = selection @selection = selection
@commands = [] @commands = []
@ids = [] @ids = []
@includeNew = includeNew @includeNew = includeNew
@trainers = nil
@index = 0 @index = 0
end end
@@ -346,28 +345,27 @@ class SpeciesLister
@commands.clear @commands.clear
@ids.clear @ids.clear
cmds = [] cmds = []
for i in 1..PBSpecies.maxValue GameData::Species.each do |species|
cname = getConstantName(PBSpecies,i) rescue next next if species.form != 0
name = PBSpecies.getName(i) cmds.push([species.id_number, species.id, species.real_name])
cmds.push([i,name]) if name && name!=""
end end
cmds.sort! { |a,b| a[1]<=>b[1] } cmds.sort! { |a, b| a[2].downcase <=> b[2].downcase }
if @includeNew if @includeNew
@commands.push(_INTL("[NEW SPECIES]")) @commands.push(_INTL("[NEW SPECIES]"))
@ids.push(-1) @ids.push(true)
end end
for i in cmds for i in cmds
@commands.push(sprintf("%03d: %s",i[0],i[1])) @commands.push(sprintf("%03d: %s", i[0], i[2]))
@ids.push(i[0]) @ids.push(i[1])
end end
@index = @selection @index = @selection
@index = @commands.length-1 if @index>=@commands.length @index = @commands.length - 1 if @index >= @commands.length
@index = 0 if @index<0 @index = 0 if @index < 0
return @commands return @commands
end end
def value(index) def value(index)
return nil if index<0 return nil if index < 0
return @ids[index] return @ids[index]
end end
@@ -385,7 +383,6 @@ class ItemLister
@commands = [] @commands = []
@ids = [] @ids = []
@includeNew = includeNew @includeNew = includeNew
@trainers = nil
@index = 0 @index = 0
end end
@@ -593,7 +590,7 @@ class TrainerBattleLister
if !@includeNew || index>0 if !@includeNew || index>0
@trainers[(@includeNew) ? index-1 : index][3].each_with_index do |p,i| @trainers[(@includeNew) ? index-1 : index][3].each_with_index do |p,i|
text += "\r\n" if i>0 text += "\r\n" if i>0
text += sprintf("%s Lv.%d",PBSpecies.getName(p[TrainerData::SPECIES]),p[TrainerData::LEVEL]) text += sprintf("%s Lv.%d",GameData::Species.get(p[TrainerData::SPECIES]).name, p[TrainerData::LEVEL])
end end
end end
@pkmnList.text = text @pkmnList.text = text
+15 -27
View File
@@ -1,17 +1,12 @@
def pbGetLegalMoves(species) def pbGetLegalMoves(species)
species_data = GameData::Species.get(species)
moves = [] moves = []
return moves if !species || species<=0 return moves if !species_data
moveset = pbGetSpeciesMoveset(species) species_data.moves.each { |m| moves.push(m[1]) }
moveset.each { |m| moves.push(m[1]) } species_data.tutor_moves.each { |m| moves.push(m[1]) }
tmdat = pbLoadSpeciesTMData
GameData::Item.each do |i|
next if !i.move
moves.push(i.move) if tmdat[i.move] && tmdat[i.move].include?(species)
end
babyspecies = EvolutionHelper.baby_species(species) babyspecies = EvolutionHelper.baby_species(species)
eggMoves = pbGetSpeciesEggMoves(babyspecies) GameData::Species.get(babyspecies).egg_moves.each { |m| moves.push(m) }
eggMoves.each { |m| moves.push(m) } moves |= [] # Remove duplicates
moves |= []
return moves return moves
end end
@@ -215,26 +210,19 @@ def pbGetHabitatConst(i)
return ret return ret
end end
def pbGetSpeciesConst(i)
return MakeshiftConsts.get(MessageTypes::Species,i,PBSpecies)
end
#=============================================================================== #===============================================================================
# List all members of a class # List all members of a class
#=============================================================================== #===============================================================================
# Displays a list of all Pokémon species, and returns the ID of the species # Displays a list of all Pokémon species, and returns the ID of the species
# selected (or 0 if the selection was canceled). "default", if specified, is the # selected (or nil if the selection was canceled). "default", if specified, is
# ID of the species to initially select. Pressing Input::A will toggle the list # the ID of the species to initially select. Pressing Input::A will toggle the
# sorting between numerical and alphabetical. # list sorting between numerical and alphabetical.
def pbChooseSpeciesList(default=0) def pbChooseSpeciesList(default = nil)
commands = [] commands = []
for i in 1..PBSpecies.maxValue GameData::Species.each { |s| commands.push([s.id_number, s.real_name, s.id]) if s.form == 0 }
cname = getConstantName(PBSpecies,i) rescue nil return pbChooseList(commands, default, nil, -1)
commands.push([i,PBSpecies.getName(i)]) if cname
end
return pbChooseList(commands,default,0,-1)
end end
# Displays a list of all moves, and returns the ID of the move selected (or nil # Displays a list of all moves, and returns the ID of the move selected (or nil
@@ -243,7 +231,7 @@ end
# numerical and alphabetical. # numerical and alphabetical.
def pbChooseMoveList(default = nil) def pbChooseMoveList(default = nil)
commands = [] commands = []
GameData::Move.each { |i| commands.push([i.id_number, i.name, i.id]) } GameData::Move.each { |i| commands.push([i.id_number, i.real_name, i.id]) }
return pbChooseList(commands, default, nil, -1) return pbChooseList(commands, default, nil, -1)
end end
@@ -407,10 +395,10 @@ def pbCommands3(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false)
elsif Input.repeat?(Input::DOWN) elsif Input.repeat?(Input::DOWN)
command = [2,cmdwindow.index] command = [2,cmdwindow.index]
break break
elsif Input.press?(Input::LEFT) elsif Input.trigger?(Input::LEFT)
command = [3,cmdwindow.index] command = [3,cmdwindow.index]
break break
elsif Input.press?(Input::RIGHT) elsif Input.trigger?(Input::RIGHT)
command = [4,cmdwindow.index] command = [4,cmdwindow.index]
break break
end end
@@ -4,50 +4,45 @@
def findBottom(bitmap) def findBottom(bitmap)
return 0 if !bitmap return 0 if !bitmap
for i in 1..bitmap.height for i in 1..bitmap.height
for j in 0..bitmap.width-1 for j in 0..bitmap.width - 1
return bitmap.height-i if bitmap.get_pixel(j,bitmap.height-i).alpha>0 return bitmap.height - i if bitmap.get_pixel(j, bitmap.height - i).alpha > 0
end end
end end
return 0 return 0
end end
def pbAutoPositionAll def pbAutoPositionAll
metrics = pbLoadSpeciesMetrics GameData::Species.each do |sp|
for i in 1..PBSpecies.maxValueF Graphics.update if sp.id_number % 50 == 0
s = pbGetSpeciesFromFSpecies(i) bitmap1 = GameData::Species.sprite_bitmap(sp.species, sp.form, nil, nil, nil, true)
Graphics.update if i%50==0 bitmap2 = GameData::Species.sprite_bitmap(sp.species, sp.form)
bitmap1 = pbLoadSpeciesBitmap(s[0],false,s[1],false,false,true)
bitmap2 = pbLoadSpeciesBitmap(s[0],false,s[1])
metrics[SpeciesData::METRIC_PLAYER_X][i] = 0 # Player's x
if bitmap1 && bitmap1.bitmap # Player's y if bitmap1 && bitmap1.bitmap # Player's y
metrics[SpeciesData::METRIC_PLAYER_Y][i] = (bitmap1.height-(findBottom(bitmap1.bitmap)+1))/2 sp.back_sprite_x = 0
sp.back_sprite_y = (bitmap1.height - (findBottom(bitmap1.bitmap) + 1)) / 2
end end
metrics[SpeciesData::METRIC_ENEMY_X][i] = 0 # Foe's x
if bitmap2 && bitmap2.bitmap # Foe's y if bitmap2 && bitmap2.bitmap # Foe's y
metrics[SpeciesData::METRIC_ENEMY_Y][i] = (bitmap2.height-(findBottom(bitmap2.bitmap)+1))/2 sp.front_sprite_x = 0
metrics[SpeciesData::METRIC_ENEMY_Y][i] += 4 # Just because sp.front_sprite_y = (bitmap2.height - (findBottom(bitmap2.bitmap) + 1)) / 2
sp.front_sprite_y += 4 # Just because
end end
metrics[SpeciesData::METRIC_ALTITUDE][i] = 0 # Foe's altitude, not used now sp.front_sprite_altitude = 0 # Shouldn't be used
metrics[SpeciesData::METRIC_SHADOW_X][i] = 0 # Shadow's x sp.shadow_x = 0
metrics[SpeciesData::METRIC_SHADOW_SIZE][i] = 2 # Shadow size sp.shadow_size = 2
bitmap1.dispose if bitmap1 bitmap1.dispose if bitmap1
bitmap2.dispose if bitmap2 bitmap2.dispose if bitmap2
end end
save_data(metrics,"Data/species_metrics.dat") GameData::Species.save
$PokemonTemp.speciesMetrics = nil
pbSavePokemonData pbSavePokemonData
pbSavePokemonFormsData pbSavePokemonFormsData
end end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class SpritePositioner class SpritePositioner
def pbOpen def pbOpen
@sprites = {} @sprites = {}
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height) @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999 @viewport.z = 99999
battlebg = "Graphics/Battlebacks/indoor1_bg" battlebg = "Graphics/Battlebacks/indoor1_bg"
playerbase = "Graphics/Battlebacks/indoor1_base0" playerbase = "Graphics/Battlebacks/indoor1_base0"
@@ -56,21 +51,21 @@ class SpritePositioner
@sprites["battle_bg"].setBitmap(battlebg) @sprites["battle_bg"].setBitmap(battlebg)
@sprites["battle_bg"].z = 0 @sprites["battle_bg"].z = 0
baseX, baseY = PokeBattle_SceneConstants.pbBattlerPosition(0) baseX, baseY = PokeBattle_SceneConstants.pbBattlerPosition(0)
@sprites["base_0"] = IconSprite.new(baseX,baseY,@viewport) @sprites["base_0"] = IconSprite.new(baseX, baseY, @viewport)
@sprites["base_0"].setBitmap(playerbase) @sprites["base_0"].setBitmap(playerbase)
@sprites["base_0"].x -= @sprites["base_0"].bitmap.width/2 if @sprites["base_0"].bitmap @sprites["base_0"].x -= @sprites["base_0"].bitmap.width / 2 if @sprites["base_0"].bitmap
@sprites["base_0"].y -= @sprites["base_0"].bitmap.height if @sprites["base_0"].bitmap @sprites["base_0"].y -= @sprites["base_0"].bitmap.height if @sprites["base_0"].bitmap
@sprites["base_0"].z = 1 @sprites["base_0"].z = 1
baseX, baseY = PokeBattle_SceneConstants.pbBattlerPosition(1) baseX, baseY = PokeBattle_SceneConstants.pbBattlerPosition(1)
@sprites["base_1"] = IconSprite.new(baseX,baseY,@viewport) @sprites["base_1"] = IconSprite.new(baseX, baseY, @viewport)
@sprites["base_1"].setBitmap(enemybase) @sprites["base_1"].setBitmap(enemybase)
@sprites["base_1"].x -= @sprites["base_1"].bitmap.width/2 if @sprites["base_1"].bitmap @sprites["base_1"].x -= @sprites["base_1"].bitmap.width / 2 if @sprites["base_1"].bitmap
@sprites["base_1"].y -= @sprites["base_1"].bitmap.height/2 if @sprites["base_1"].bitmap @sprites["base_1"].y -= @sprites["base_1"].bitmap.height / 2 if @sprites["base_1"].bitmap
@sprites["base_1"].z = 1 @sprites["base_1"].z = 1
@sprites["messageBox"] = IconSprite.new(0,Graphics.height-96,@viewport) @sprites["messageBox"] = IconSprite.new(0, Graphics.height - 96, @viewport)
@sprites["messageBox"].setBitmap("Graphics/Pictures/Battle/debug_message") @sprites["messageBox"].setBitmap("Graphics/Pictures/Battle/debug_message")
@sprites["messageBox"].z = 2 @sprites["messageBox"].z = 2
@sprites["shadow_1"] = IconSprite.new(0,0,@viewport) @sprites["shadow_1"] = IconSprite.new(0, 0, @viewport)
@sprites["shadow_1"].z = 3 @sprites["shadow_1"].z = 3
@sprites["pokemon_0"] = PokemonSprite.new(@viewport) @sprites["pokemon_0"] = PokemonSprite.new(@viewport)
@sprites["pokemon_0"].setOffset(PictureOrigin::Bottom) @sprites["pokemon_0"].setOffset(PictureOrigin::Bottom)
@@ -82,19 +77,18 @@ class SpritePositioner
@sprites["info"].viewport = @viewport @sprites["info"].viewport = @viewport
@sprites["info"].visible = false @sprites["info"].visible = false
@oldSpeciesIndex = 0 @oldSpeciesIndex = 0
@species = 0 @species = nil # This can be a species_form
@metrics = pbLoadSpeciesMetrics
@metricsChanged = false @metricsChanged = false
refresh refresh
@starting = true @starting = true
end end
def pbClose def pbClose
if @metricsChanged if @metricsChanged && pbConfirmMessage(_INTL("Some metrics have been edited. Save changes?"))
if pbConfirmMessage(_INTL("Some metrics have been edited. Save changes?"))
pbSaveMetrics pbSaveMetrics
@metricsChanged = false @metricsChanged = false
end else
GameData::Species.load # Clear all changes to metrics
end end
pbFadeOutAndHide(@sprites) { update } pbFadeOutAndHide(@sprites) { update }
pbDisposeSpriteHash(@sprites) pbDisposeSpriteHash(@sprites)
@@ -102,8 +96,7 @@ class SpritePositioner
end end
def pbSaveMetrics def pbSaveMetrics
save_data(@metrics,"Data/species_metrics.dat") GameData::Species.save
$PokemonTemp.speciesMetrics = nil
pbSavePokemonData pbSavePokemonData
pbSavePokemonFormsData pbSavePokemonFormsData
end end
@@ -113,44 +106,46 @@ class SpritePositioner
end end
def refresh def refresh
if @species<=0 if !@species
@sprites["pokemon_0"].visible = false @sprites["pokemon_0"].visible = false
@sprites["pokemon_1"].visible = false @sprites["pokemon_1"].visible = false
@sprites["shadow_1"].visible = false @sprites["shadow_1"].visible = false
return return
end end
species_data = GameData::Species.get(@species)
for i in 0...2 for i in 0...2
pos = PokeBattle_SceneConstants.pbBattlerPosition(i,1) pos = PokeBattle_SceneConstants.pbBattlerPosition(i, 1)
@sprites["pokemon_#{i}"].x = pos[0] @sprites["pokemon_#{i}"].x = pos[0]
@sprites["pokemon_#{i}"].y = pos[1] @sprites["pokemon_#{i}"].y = pos[1]
pbApplyBattlerMetricsToSprite(@sprites["pokemon_#{i}"],i,@species,false,@metrics) species_data.apply_metrics_to_sprite(@sprites["pokemon_#{i}"], i)
@sprites["pokemon_#{i}"].visible = true @sprites["pokemon_#{i}"].visible = true
if i==1 if i == 1
@sprites["shadow_1"].x = pos[0] @sprites["shadow_1"].x = pos[0]
@sprites["shadow_1"].y = pos[1] @sprites["shadow_1"].y = pos[1]
if @sprites["shadow_1"].bitmap if @sprites["shadow_1"].bitmap
@sprites["shadow_1"].x -= @sprites["shadow_1"].bitmap.width/2 @sprites["shadow_1"].x -= @sprites["shadow_1"].bitmap.width / 2
@sprites["shadow_1"].y -= @sprites["shadow_1"].bitmap.height/2 @sprites["shadow_1"].y -= @sprites["shadow_1"].bitmap.height / 2
end end
pbApplyBattlerMetricsToSprite(@sprites["shadow_1"],i,@species,true,@metrics) species_data.apply_metrics_to_sprite(@sprites["shadow_1"], i, true)
@sprites["shadow_1"].visible = true @sprites["shadow_1"].visible = true
end end
end end
end end
def pbAutoPosition def pbAutoPosition
oldmetric1 = (@metrics[SpeciesData::METRIC_PLAYER_Y][@species] || 0) species_data = GameData::Species.get(@species)
oldmetric3 = (@metrics[SpeciesData::METRIC_ENEMY_Y][@species] || 0) old_back_y = species_data.back_sprite_y
oldmetric4 = (@metrics[SpeciesData::METRIC_ALTITUDE][@species] || 0) old_front_y = species_data.front_sprite_y
old_front_altitude = species_data.front_sprite_altitude
bitmap1 = @sprites["pokemon_0"].bitmap bitmap1 = @sprites["pokemon_0"].bitmap
bitmap2 = @sprites["pokemon_1"].bitmap bitmap2 = @sprites["pokemon_1"].bitmap
newmetric1 = (bitmap1.height-(findBottom(bitmap1)+1))/2 new_back_y = (bitmap1.height - (findBottom(bitmap1) + 1)) / 2
newmetric3 = (bitmap2.height-(findBottom(bitmap2)+1))/2 new_front_y = (bitmap2.height - (findBottom(bitmap2) + 1)) / 2
newmetric3 += 4 # Just because new_front_y += 4 # Just because
if newmetric1!=oldmetric1 || newmetric3!=oldmetric3 || oldmetric4!=0 if new_back_y != old_back_y || new_front_y != old_front_y || old_front_altitude != 0
@metrics[SpeciesData::METRIC_PLAYER_Y][@species] = newmetric1 species_data.back_sprite_y = new_back_y
@metrics[SpeciesData::METRIC_ENEMY_Y][@species] = newmetric3 species_data.front_sprite_y = new_front_y
@metrics[SpeciesData::METRIC_ALTITUDE][@species] = 0 species_data.front_sprite_altitude = 0
@metricsChanged = true @metricsChanged = true
refresh refresh
end end
@@ -158,25 +153,32 @@ class SpritePositioner
def pbChangeSpecies(species) def pbChangeSpecies(species)
@species = species @species = species
spe,frm = pbGetSpeciesFromFSpecies(@species) species_data = GameData::Species.try_get(@species)
@sprites["pokemon_0"].setSpeciesBitmap(spe,false,frm,false,false,true) return if !species_data
@sprites["pokemon_1"].setSpeciesBitmap(spe,false,frm,false,false,false) spe = species_data.species
@sprites["shadow_1"].setBitmap(pbCheckPokemonShadowBitmapFiles(spe,frm,@metrics)) frm = species_data.form
@sprites["pokemon_0"].setSpeciesBitmap(spe, 0, frm, false, false, true)
@sprites["pokemon_1"].setSpeciesBitmap(spe, 0, frm)
# TODO
@sprites["shadow_1"].setBitmap(GameData::Species.shadow_filename(spe, frm))
end end
def pbShadowSize def pbShadowSize
pbChangeSpecies(@species) pbChangeSpecies(@species)
refresh refresh
oldval = (@metrics[SpeciesData::METRIC_SHADOW_SIZE][@species] || 2) species_data = GameData::Species.get(@species)
cmdvals = [0]; commands = [_INTL("None")] oldval = species_data.shadow_size
cmdvals = [0]
commands = [_INTL("None")]
defindex = 0 defindex = 0
i = 0 i = 0
loop do loop do
i += 1 i += 1
fn = sprintf("Graphics/Pictures/Battle/battler_shadow_%d",i) fn = sprintf("Graphics/Pictures/Battle/battler_shadow_%d", i)
break if !pbResolveBitmap(fn) break if !pbResolveBitmap(fn)
cmdvals.push(i); commands.push(i.to_s) cmdvals.push(i)
defindex = cmdvals.length-1 if oldval==i commands.push(i.to_s)
defindex = cmdvals.length - 1 if oldval == i
end end
cw = Window_CommandPokemon.new(commands) cw = Window_CommandPokemon.new(commands)
cw.index = defindex cw.index = defindex
@@ -188,19 +190,19 @@ class SpritePositioner
Input.update Input.update
cw.update cw.update
self.update self.update
if cw.index!=oldindex if cw.index != oldindex
oldindex = cw.index oldindex = cw.index
@metrics[SpeciesData::METRIC_SHADOW_SIZE][@species] = cmdvals[cw.index] species_data.shadow_size = cmdvals[cw.index]
pbChangeSpecies(@species) pbChangeSpecies(@species)
refresh refresh
end end
if Input.trigger?(Input::A) # Cycle to next option if Input.trigger?(Input::A) # Cycle to next option
pbPlayDecisionSE pbPlayDecisionSE
@metricsChanged = true if @metrics[SpeciesData::METRIC_SHADOW_SIZE][@species]!=oldval @metricsChanged = true if species_data.shadow_size != oldval
ret = true ret = true
break break
elsif Input.trigger?(Input::B) elsif Input.trigger?(Input::B)
@metrics[SpeciesData::METRIC_SHADOW_SIZE][@species] = oldval species_data.shadow_size = oldval
pbPlayCancelSE pbPlayCancelSE
break break
elsif Input.trigger?(Input::C) elsif Input.trigger?(Input::C)
@@ -213,25 +215,25 @@ class SpritePositioner
end end
def pbSetParameter(param) def pbSetParameter(param)
return if @species<=0 return if !@species
if param==2 return pbShadowSize if param == 2
return pbShadowSize if param == 4
elsif param==4
pbAutoPosition pbAutoPosition
return false return false
end end
species_data = GameData::Species.get(@species)
case param case param
when 0 when 0
sprite = @sprites["pokemon_0"] sprite = @sprites["pokemon_0"]
xpos = (@metrics[SpeciesData::METRIC_PLAYER_X][@species] || 0) xpos = species_data.back_sprite_x
ypos = (@metrics[SpeciesData::METRIC_PLAYER_Y][@species] || 0) ypos = species_data.back_sprite_y
when 1 when 1
sprite = @sprites["pokemon_1"] sprite = @sprites["pokemon_1"]
xpos = (@metrics[SpeciesData::METRIC_ENEMY_X][@species] || 0) xpos = species_data.front_sprite_x
ypos = (@metrics[SpeciesData::METRIC_ENEMY_Y][@species] || 0) ypos = species_data.front_sprite_y
when 3 when 3
sprite = @sprites["shadow_1"] sprite = @sprites["shadow_1"]
xpos = (@metrics[SpeciesData::METRIC_SHADOW_X][@species] || 0) xpos = species_data.shadow_x
ypos = 0 ypos = 0
end end
oldxpos = xpos oldxpos = xpos
@@ -239,7 +241,7 @@ class SpritePositioner
@sprites["info"].visible = true @sprites["info"].visible = true
ret = false ret = false
loop do loop do
sprite.visible = (Graphics.frame_count%16)<12 sprite.visible = (Graphics.frame_count % 16) < 12 # Flash the selected sprite
Graphics.update Graphics.update
Input.update Input.update
self.update self.update
@@ -248,59 +250,44 @@ class SpritePositioner
when 1 then @sprites["info"].setTextToFit("Enemy Position = #{xpos},#{ypos}") when 1 then @sprites["info"].setTextToFit("Enemy Position = #{xpos},#{ypos}")
when 3 then @sprites["info"].setTextToFit("Shadow Position = #{xpos}") when 3 then @sprites["info"].setTextToFit("Shadow Position = #{xpos}")
end end
if Input.repeat?(Input::UP) && param!=3 if (Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)) && param != 3
ypos -= 1 ypos += (Input.repeat?(Input::DOWN)) ? 1 : -1
case param case param
when 0 then @metrics[SpeciesData::METRIC_PLAYER_Y][@species] = ypos when 0 then species_data.back_sprite_y = ypos
when 1 then @metrics[SpeciesData::METRIC_ENEMY_Y][@species] = ypos when 1 then species_data.front_sprite_y = ypos
end
refresh
elsif Input.repeat?(Input::DOWN) && param!=3
ypos += 1
case param
when 0 then @metrics[SpeciesData::METRIC_PLAYER_Y][@species] = ypos
when 1 then @metrics[SpeciesData::METRIC_ENEMY_Y][@species] = ypos
end end
refresh refresh
end end
if Input.repeat?(Input::LEFT) if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT)
xpos -= 1 xpos += (Input.repeat?(Input::RIGHT)) ? 1 : -1
case param case param
when 0 then @metrics[SpeciesData::METRIC_PLAYER_X][@species] = xpos when 0 then species_data.back_sprite_x = xpos
when 1 then @metrics[SpeciesData::METRIC_ENEMY_X][@species] = xpos when 1 then species_data.front_sprite_x = xpos
when 3 then @metrics[SpeciesData::METRIC_SHADOW_X][@species] = xpos when 3 then species_data.shadow_x = xpos
end
refresh
elsif Input.repeat?(Input::RIGHT)
xpos += 1
case param
when 0 then @metrics[SpeciesData::METRIC_PLAYER_X][@species] = xpos
when 1 then @metrics[SpeciesData::METRIC_ENEMY_X][@species] = xpos
when 3 then @metrics[SpeciesData::METRIC_SHADOW_X][@species] = xpos
end end
refresh refresh
end end
if Input.repeat?(Input::A) && param!=3 # Cycle to next option if Input.repeat?(Input::A) && param != 3 # Cycle to next option
@metricsChanged = true if xpos!=oldxpos || ypos!=oldypos @metricsChanged = true if xpos != oldxpos || ypos != oldypos
ret = true ret = true
pbPlayDecisionSE pbPlayDecisionSE
break break
elsif Input.repeat?(Input::B) elsif Input.repeat?(Input::B)
case param case param
when 0 when 0
@metrics[SpeciesData::METRIC_PLAYER_X][@species] = oldxpos species_data.back_sprite_x = oldxpos
@metrics[SpeciesData::METRIC_PLAYER_Y][@species] = oldypos species_data.back_sprite_y = oldypos
when 1 when 1
@metrics[SpeciesData::METRIC_ENEMY_X][@species] = oldxpos species_data.front_sprite_x = oldxpos
@metrics[SpeciesData::METRIC_ENEMY_Y][@species] = oldypos species_data.front_sprite_y = oldypos
when 3 when 3
@metrics[SpeciesData::METRIC_SHADOW_X][@species] = oldxpos species_data.shadow_x = oldxpos
end end
pbPlayCancelSE pbPlayCancelSE
refresh refresh
break break
elsif Input.repeat?(Input::C) elsif Input.repeat?(Input::C)
@metricsChanged = true if xpos!=oldxpos || (param!=3 && ypos!=oldypos) @metricsChanged = true if xpos != oldxpos || (param != 3 && ypos != oldypos)
pbPlayDecisionSE pbPlayDecisionSE
break break
end end
@@ -320,8 +307,8 @@ class SpritePositioner
_INTL("Set Shadow Position"), _INTL("Set Shadow Position"),
_INTL("Auto-Position Sprites") _INTL("Auto-Position Sprites")
]) ])
cw.x = Graphics.width-cw.width cw.x = Graphics.width - cw.width
cw.y = Graphics.height-cw.height cw.y = Graphics.height - cw.height
cw.viewport = @viewport cw.viewport = @viewport
ret = -1 ret = -1
loop do loop do
@@ -347,55 +334,49 @@ class SpritePositioner
pbFadeInAndShow(@sprites) { update } pbFadeInAndShow(@sprites) { update }
@starting = false @starting = false
end end
cw = Window_CommandPokemonEx.newEmpty(0,0,260,32+24*6,@viewport) cw = Window_CommandPokemonEx.newEmpty(0, 0, 260, 32 + 24 * 6, @viewport)
cw.rowHeight = 24 cw.rowHeight = 24
pbSetSmallFont(cw.contents) pbSetSmallFont(cw.contents)
cw.x = Graphics.width-cw.width cw.x = Graphics.width - cw.width
cw.y = Graphics.height-cw.height cw.y = Graphics.height - cw.height
allspecies = [] allspecies = []
GameData::Species.each do |sp|
name = (sp.form == 0) ? sp.name : _INTL("{1} (form {2})", sp.real_name, sp.form)
allspecies.push([sp.id, sp.species, name]) if name && !name.empty?
end
allspecies.sort! { |a, b| a[2] <=> b[2] }
commands = [] commands = []
for i in 1..PBSpecies.maxValueF allspecies.each { |sp| commands.push(sp[2]) }
s = pbGetSpeciesFromFSpecies(i)
name = PBSpecies.getName(s[0])
name = _INTL("{1} (form {2})",name,s[1]) if s[1]>0
allspecies.push([i,s[0],name]) if name!=""
end
allspecies.sort! { |a,b| a[1]==b[1] ? a[0]<=>b[0] : a[2]<=>b[2] }
for s in allspecies
commands.push(_INTL("{1} - {2}",s[1],s[2]))
end
cw.commands = commands cw.commands = commands
cw.index = @oldSpeciesIndex cw.index = @oldSpeciesIndex
species = 0 ret = nil
oldindex = -1 oldindex = -1
loop do loop do
Graphics.update Graphics.update
Input.update Input.update
cw.update cw.update
if cw.index!=oldindex if cw.index != oldindex
oldindex = cw.index oldindex = cw.index
pbChangeSpecies(allspecies[cw.index][0]) pbChangeSpecies(allspecies[cw.index][0])
refresh refresh
end end
self.update self.update
if Input.trigger?(Input::B) if Input.trigger?(Input::B)
pbChangeSpecies(0) pbChangeSpecies(nil)
refresh refresh
break break
elsif Input.trigger?(Input::C) elsif Input.trigger?(Input::C)
pbChangeSpecies(allspecies[cw.index][0]) pbChangeSpecies(allspecies[cw.index][0])
species = allspecies[cw.index][0] ret = allspecies[cw.index][0]
break break
end end
end end
@oldSpeciesIndex = cw.index @oldSpeciesIndex = cw.index
cw.dispose cw.dispose
return species return ret
end end
end end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
@@ -408,14 +389,14 @@ class SpritePositionerScreen
@scene.pbOpen @scene.pbOpen
loop do loop do
species = @scene.pbChooseSpecies species = @scene.pbChooseSpecies
break if species<=0 break if !species
loop do loop do
command = @scene.pbMenu(species) command = @scene.pbMenu(species)
break if command<0 break if command < 0
loop do loop do
par = @scene.pbSetParameter(command) par = @scene.pbSetParameter(command)
break if !par break if !par
command = (command+1)%3 command = (command + 1) % 3
end end
end end
end end
@@ -1,3 +1,4 @@
# NOTE: Everything in here is unused.
#=============================================================================== #===============================================================================
# Serial record # Serial record
#=============================================================================== #===============================================================================
@@ -277,6 +278,7 @@ end
#=============================================================================== #===============================================================================
# Scripted constants # Scripted constants
#=============================================================================== #===============================================================================
# Unused
def pbFindScript(a,name) def pbFindScript(a,name)
a.each { |i| a.each { |i|
next if !i next if !i
@@ -285,7 +287,7 @@ def pbFindScript(a,name)
return nil return nil
end end
# TODO: Will be unused once PBSpecies is abolished. Method above only used by this one. # Unused
def pbAddScript(script,sectionname) def pbAddScript(script,sectionname)
begin begin
scripts = load_data("Data/Constants.rxdata") scripts = load_data("Data/Constants.rxdata")
+26 -20
View File
@@ -109,7 +109,7 @@ module Compiler
end end
end end
lineno += 1 lineno += 1
Graphics.update if lineno%500==0 Graphics.update if lineno%200==0
pbSetWindowText(_INTL("Processing {1} line {2}",FileLineData.file,lineno)) if lineno%50==0 pbSetWindowText(_INTL("Processing {1} line {2}",FileLineData.file,lineno)) if lineno%50==0
} }
yield lastsection,sectionname if havesection yield lastsection,sectionname if havesection
@@ -566,18 +566,22 @@ module Compiler
clonitem.sub!(/\s*$/, "") clonitem.sub!(/\s*$/, "")
itm = GameData::Item.try_get(clonitem) itm = GameData::Item.try_get(clonitem)
if !itm if !itm
raise _INTL("Undefined item constant name: {1}\r\nName must consist only of letters, numbers and\r\nunderscores, and can't begin with a number.\r\nMake sure the item is defined in\r\nPBS/items.txt.\r\n{2}", item, FileLineData.linereport) raise _INTL("Undefined item constant name: {1}\r\nMake sure the item is defined in PBS/items.txt.\r\n{2}", item, FileLineData.linereport)
end end
return itm.id return itm.id
end end
def parseSpecies(item) def parseSpecies(species)
clonitem = item.upcase clonspecies = species.upcase
clonitem.gsub!(/^[\s\n]*/,"") clonspecies.gsub!(/^\s*/, "")
clonitem.gsub!(/[\s\n]*$/,"") clonspecies.gsub!(/\s*$/, "")
clonitem = "NIDORANmA" if clonitem=="NIDORANMA" clonspecies = "NIDORANmA" if clonspecies == "NIDORANMA"
clonitem = "NIDORANfE" if clonitem=="NIDORANFE" clonspecies = "NIDORANfE" if clonspecies == "NIDORANFE"
return pbGetConst(PBSpecies,clonitem,_INTL("Undefined species constant name: [%s]\r\nName must consist only of letters, numbers, and\r\nunderscores and can't begin with a number.\r\nMake sure the name is defined in\r\nPBS/pokemon.txt.\r\n{1}",FileLineData.linereport)) spec = GameData::Species.try_get(clonspecies)
if !spec
raise _INTL("Undefined species constant name: {1}\r\nMake sure the species is defined in PBS/pokemon.txt.\r\n{2}", species, FileLineData.linereport)
end
return spec.id
end end
def parseMove(move, skip_unknown = false) def parseMove(move, skip_unknown = false)
@@ -587,7 +591,7 @@ module Compiler
mov = GameData::Move.try_get(clonmove) mov = GameData::Move.try_get(clonmove)
if !mov if !mov
return nil if skip_unknown return nil if skip_unknown
raise _INTL("Undefined move constant name: {1}\r\nName must consist only of letters, numbers and\r\nunderscores, and can't begin with a number.\r\nMake sure the move is defined in\r\nPBS/moves.txt.\r\n{2}", move, FileLineData.linereport) raise _INTL("Undefined move constant name: {1}\r\nMake sure the move is defined in PBS/moves.txt.\r\n{2}", move, FileLineData.linereport)
end end
return mov.id return mov.id
end end
@@ -595,9 +599,9 @@ module Compiler
# Unused # Unused
def parseNature(item) def parseNature(item)
clonitem = item.upcase clonitem = item.upcase
clonitem.sub!(/^\s*/,"") clonitem.sub!(/^\s*/, "")
clonitem.sub!(/\s*$/,"") clonitem.sub!(/\s*$/, "")
return pbGetConst(PBNatures,clonitem,_INTL("Undefined nature constant name: %s\r\nName must consist only of letters, numbers, and\r\nunderscores and can't begin with a number.\r\nMake sure the name is defined in\r\nthe script section PBNatures.\r\n{1}",FileLineData.linereport)) return pbGetConst(PBNatures, clonitem, _INTL("Undefined nature constant name: {1}\r\nMake sure the name is defined in the script section PBNatures.\r\n{1}", item, FileLineData.linereport))
end end
# Unused # Unused
@@ -607,7 +611,7 @@ module Compiler
clontype.sub!(/\s*$/, "") clontype.sub!(/\s*$/, "")
typ = GameData::TrainerType.try_get(clontype) typ = GameData::TrainerType.try_get(clontype)
if !typ if !typ
raise _INTL("Undefined Trainer type constant name: {1}\r\nName must consist only of letters, numbers and\r\nunderscores, and can't begin with a number.\r\nMake sure the trainer type is defined in\r\ntrainertypes.txt.\r\n{2}", type, FileLineData.linereport) raise _INTL("Undefined Trainer type constant name: {1}\r\nMake sure the trainer type is defined in PBS/trainertypes.txt.\r\n{2}", type, FileLineData.linereport)
end end
return typ.id return typ.id
end end
@@ -638,13 +642,13 @@ module Compiler
yield(_INTL("Compiling Pokémon data")) yield(_INTL("Compiling Pokémon data"))
compile_pokemon # Depends on Move, Item, Type, Ability compile_pokemon # Depends on Move, Item, Type, Ability
yield(_INTL("Compiling Pokémon forms data")) yield(_INTL("Compiling Pokémon forms data"))
compile_pokemon_forms # Depends on PBSpecies, Move, Item, Type, Ability compile_pokemon_forms # Depends on Species, Move, Item, Type, Ability
yield(_INTL("Compiling machine data")) yield(_INTL("Compiling machine data"))
compile_move_compatibilities # Depends on PBSpecies, Move compile_move_compatibilities # Depends on Species, Move
yield(_INTL("Compiling Trainer type data")) yield(_INTL("Compiling Trainer type data"))
compile_trainer_types # No dependencies compile_trainer_types # No dependencies
yield(_INTL("Compiling Trainer data")) yield(_INTL("Compiling Trainer data"))
compile_trainers # Depends on PBSpecies, Item, Move compile_trainers # Depends on Species, Item, Move
yield(_INTL("Compiling phone data")) yield(_INTL("Compiling phone data"))
compile_phone compile_phone
yield(_INTL("Compiling metadata")) yield(_INTL("Compiling metadata"))
@@ -652,9 +656,11 @@ module Compiler
yield(_INTL("Compiling battle Trainer data")) yield(_INTL("Compiling battle Trainer data"))
compile_trainer_lists # Depends on TrainerType compile_trainer_lists # Depends on TrainerType
yield(_INTL("Compiling encounter data")) yield(_INTL("Compiling encounter data"))
compile_encounters # Depends on PBSpecies compile_encounters # Depends on Species
yield(_INTL("Compiling shadow moveset data")) yield(_INTL("Compiling shadow moveset data"))
compile_shadow_movesets # Depends on PBSpecies, Move compile_shadow_movesets # Depends on Species, Move
yield(_INTL("Compiling Regional Dexes"))
compile_regional_dexes # Depends on Species
yield(_INTL("Compiling animations")) yield(_INTL("Compiling animations"))
compile_animations compile_animations
yield(_INTL("Converting events")) yield(_INTL("Converting events"))
@@ -704,8 +710,8 @@ module Compiler
"phone.txt", "phone.txt",
"pokemon.txt", "pokemon.txt",
"pokemonforms.txt", "pokemonforms.txt",
"regionaldexes.txt",
"shadowmoves.txt", "shadowmoves.txt",
"tm.txt",
"townmap.txt", "townmap.txt",
"trainerlists.txt", "trainerlists.txt",
"trainers.txt", "trainers.txt",
+367 -413
View File
@@ -262,8 +262,8 @@ module Compiler
# Read a whole section's lines at once, then run through this code. # Read a whole section's lines at once, then run through this code.
# contents is a hash containing all the XXX=YYY lines in that section, where # contents is a hash containing all the XXX=YYY lines in that section, where
# the keys are the XXX and the values are the YYY (as unprocessed strings). # the keys are the XXX and the values are the YYY (as unprocessed strings).
pbEachFileSection(f) { |contents, type_number|
schema = GameData::Type::SCHEMA schema = GameData::Type::SCHEMA
pbEachFileSection(f) { |contents, type_number|
# Go through schema hash of compilable data and compile this section # Go through schema hash of compilable data and compile this section
for key in schema.keys for key in schema.keys
FileLineData.setSection(type_number, key, contents[key]) # For error reporting FileLineData.setSection(type_number, key, contents[key]) # For error reporting
@@ -555,506 +555,460 @@ module Compiler
# Compile Pokémon # Compile Pokémon
#============================================================================= #=============================================================================
def compile_pokemon def compile_pokemon
# Get schemas. GameData::Species::DATA.clear
requiredValues = SpeciesData.requiredValues species_names = []
optionalValues = SpeciesData.optionalValues species_form_names = []
# Prepare arrays for compiled data. species_categories = []
speciesData = [] species_pokedex_entries = []
movesets = [] # Read from PBS file
eggMoves = [] File.open("PBS/pokemon.txt", "rb") { |f|
regionalDexes = []
spriteMetrics = []
evolutions = []
speciesNames = []
formNames = []
pokedexKinds = []
pokedexEntries = []
# Prepare variables used to record scripted constants.
constants = ""
maxValue = 0 # Highest species ID
# Read from PBS file.
File.open("PBS/pokemon.txt","rb") { |f|
FileLineData.file = "PBS/pokemon.txt" # For error reporting FileLineData.file = "PBS/pokemon.txt" # For error reporting
# Read a whole section's lines at once, then run through this code. # Read a whole section's lines at once, then run through this code.
# contents is a hash containing all the XXX=YYY lines in that section, where # contents is a hash containing all the XXX=YYY lines in that section, where
# the keys are the XXX and the values are the YYY (as unprocessed strings). # the keys are the XXX and the values are the YYY (as unprocessed strings).
pbEachFileSection(f) { |contents,speciesID| schema = GameData::Species.schema
# Raise an error if the species ID is 0. pbEachFileSection(f) { |contents, species_number|
if speciesID==0 FileLineData.setSection(species_number, "header", nil) # For error reporting
# Raise an error if a species number is invalid or used twice
if species_number == 0
raise _INTL("A Pokémon species can't be numbered 0 (PBS/pokemon.txt).") raise _INTL("A Pokémon species can't be numbered 0 (PBS/pokemon.txt).")
elsif GameData::Species::DATA[species_number]
raise _INTL("Species ID number '{1}' is used twice.\r\n{2}", species_number, FileLineData.linereport)
end end
# Raise an error if the species ID has already been defined. # Go through schema hash of compilable data and compile this section
if speciesData[speciesID] for key in schema.keys
raise _INTL("Species ID number '{1}' is used twice.\r\n{2}",speciesID,FileLineData.linereport) # Skip empty properties, or raise an error if a required property is
# empty
if contents[key].nil? || contents[key] == ""
if ["Name", "InternalName"].include?(key)
raise _INTL("The entry {1} is required in PBS/pokemon.txt section {2}.", key, species_number)
end end
# Create array to store compiled data in. contents[key] = nil
speciesData[speciesID] = []
# Copy Type1 into Type2 if Type2 is undefined. (All species must have two
# defined types; if both are the same, it is treated as single typed.)
if !contents["Type2"] || contents["Type2"]==""
if !contents["Type1"] || contents["Type1"]==""
raise _INTL("No Pokémon type is defined in section {1} (PBS/pokemon.txt)",speciesID.to_s)
end
contents["Type2"] = contents["Type1"].clone
end
# Go through hashes of compilable data and compile this section.
[requiredValues,optionalValues].each do |hash|
for key in hash.keys
FileLineData.setSection(speciesID,key,contents[key]) # For error reporting
maxValue = [maxValue,speciesID].max # Set highest species ID
next if hash[key][0]<0 # Property is not to be compiled; skip it
# Skip empty optional properties, or raise an error if a required
# property is empty.
if !contents[key] || contents[key]==""
raise _INTL("Required entry {1} is missing or empty in section {2} (PBS/pokemon.txt)",
key,speciesID.to_s) if hash==requiredValues
next next
end end
# Compile value for key. # Raise an error if a species internal name is used twice
schema = hash[key] FileLineData.setSection(species_number, key, contents[key]) # For error reporting
value = pbGetCsvRecord(contents[key],key,schema) if GameData::Species::DATA[contents["InternalName"].to_sym]
# Modify value as required. raise _INTL("Species ID '{1}' is used twice.\r\n{2}", contents["InternalName"], FileLineData.linereport)
end
# Compile value for key
value = pbGetCsvRecord(contents[key], key, schema[key])
value = nil if value.is_a?(Array) && value.length == 0
contents[key] = value
# Sanitise data
case key case key
when "Height", "Weight" when "Height", "Weight"
# Convert height/weight to 1 decimal place and multiply by 10. # Convert height/weight to 1 decimal place and multiply by 10
value = (value*10).round value = (value * 10).round
if value<=0 if value <= 0
raise _INTL("Value for '{1}' can't be less than or close to 0 (section {2}, PBS/pokemon.txt)",key,speciesID) raise _INTL("Value for '{1}' can't be less than or close to 0 (section {2}, PBS/pokemon.txt)", key, species_number)
end end
end contents[key] = value
# Add value to appropriate array for saving.
case key
when "Moves" when "Moves"
speciesMoves = [] move_array = []
for i in 0...value.length/2 for i in 0...value.length / 2
speciesMoves.push([value[i*2],value[i*2+1],i]) move_array.push([value[i * 2], value[i * 2 + 1], i])
end end
speciesMoves.sort! { |a,b| (a[0]==b[0]) ? a[2]<=>b[2] : a[0]<=>b[0] } move_array.sort! { |a, b| (a[0] == b[0]) ? a[2] <=> b[2] : a[0] <=>b [0] }
for i in speciesMoves; i.pop; end move_array.each { |arr| arr.pop }
movesets[speciesID] = speciesMoves contents[key] = move_array
when "EggMoves" when "TutorMoves", "EggMoves", "Abilities", "HiddenAbility", "Compatibility"
if value.is_a?(Array); eggMoves[speciesID] = value contents[key] = [contents[key]] if !contents[key].is_a?(Array)
else; eggMoves[speciesID] = [value] contents[key].compact!
end
when "RegionalNumbers"
if value.is_a?(Array)
value.each_with_index do |num,dexID|
regionalDexes[dexID] = [] if !regionalDexes[dexID]
regionalDexes[dexID][speciesID] = num
end
else
regionalDexes[0] = [] if !regionalDexes[0]
regionalDexes[0][speciesID] = value
end
when "BattlerPlayerX", "BattlerPlayerY",
"BattlerEnemyX", "BattlerEnemyY",
"BattlerAltitude", "BattlerShadowX", "BattlerShadowSize"
spriteMetrics[schema[0]] = [] if !spriteMetrics[schema[0]]
spriteMetrics[schema[0]][speciesID] = value
when "Evolutions" when "Evolutions"
speciesEvolutions = [] evo_array = []
for i in 0...value.length/3 for i in 0...value.length / 3
speciesEvolutions.push([value[i*3],value[i*3+1],value[i*3+2],false]) evo_array.push([value[i * 3], value[i * 3 + 1], value[i * 3 + 2], false])
end
evolutions[speciesID] = speciesEvolutions
when "Name"
speciesNames[speciesID] = value
when "FormName"
formNames[speciesID] = value
when "Kind"
pokedexKinds[speciesID] = value
when "Pokedex"
pokedexEntries[speciesID] = value
when "InternalName"
constants += "#{value}=#{speciesID}\r\n"
else # All other data
speciesData[speciesID][schema[0]] = value
end end
contents[key] = evo_array
end end
end end
# Construct species hash
species_symbol = contents["InternalName"].to_sym
species_hash = {
:id => species_symbol,
:id_number => species_number,
:name => contents["Name"],
:form_name => contents["FormName"],
:category => contents["Kind"],
:pokedex_entry => contents["Pokedex"],
:type1 => contents["Type1"],
:type2 => contents["Type2"],
:base_stats => contents["BaseStats"],
:evs => contents["EffortPoints"],
:base_exp => contents["BaseEXP"],
:growth_rate => contents["GrowthRate"],
:gender_rate => contents["GenderRate"],
:catch_rate => contents["Rareness"],
:happiness => contents["Happiness"],
:moves => contents["Moves"],
:tutor_moves => contents["TutorMoves"],
:egg_moves => contents["EggMoves"],
:abilities => contents["Abilities"],
:hidden_abilities => contents["HiddenAbility"],
:wild_item_common => contents["WildItemCommon"],
:wild_item_uncommon => contents["WildItemUncommon"],
:wild_item_rare => contents["WildItemRare"],
:egg_groups => contents["Compatibility"],
:hatch_steps => contents["StepsToHatch"],
:incense => contents["Incense"],
:evolutions => contents["Evolutions"],
:height => contents["Height"],
:weight => contents["Weight"],
:color => contents["Color"],
:shape => contents["Shape"],
:habitat => contents["Habitat"],
:generation => contents["Generation"],
:back_sprite_x => contents["BattlerPlayerX"],
:back_sprite_y => contents["BattlerPlayerY"],
:front_sprite_x => contents["BattlerEnemyX"],
:front_sprite_y => contents["BattlerEnemyY"],
:front_sprite_altitude => contents["BattlerAltitude"],
:shadow_x => contents["BattlerShadowX"],
:shadow_size => contents["BattlerShadowSize"]
}
# Add species' data to records
GameData::Species::DATA[species_number] = GameData::Species::DATA[species_symbol] = GameData::Species.new(species_hash)
species_names[species_number] = species_hash[:name]
species_form_names[species_number] = species_hash[:form_name]
species_categories[species_number] = species_hash[:category]
species_pokedex_entries[species_number] = species_hash[:pokedex_entry]
} }
} }
# All data is compiled now, just need to save it. #p GameData::Species::DATA.keys
raise _INTL("No Pokémon species are defined (PBS/pokemon.txt)") if speciesData.length==0 # Enumerate all evolution species and parameters (this couldn't be done earlier)
# Write all constants and some helpful code for PBSpecies. GameData::Species.each do |species|
count = speciesData.compact.length FileLineData.setSection(species.id_number, "Evolutions", nil) # For error reporting
code = "module PBSpecies\r\n#{constants}" Graphics.update if species.id_number % 200 == 0
code += "def PBSpecies.getName(id)\r\n" pbSetWindowText(_INTL("Processing {1} evolution line {2}", FileLineData.file, species.id_number)) if species.id_number % 50 == 0
code += "id=getID(PBSpecies,id)\r\n" species.evolutions.each do |evo|
code += "return pbGetMessage(MessageTypes::Species,id); end\r\n" evo[0] = csvEnumField!(evo[0], :Species, "Evolutions", species.id_number)
code += "def PBSpecies.getCount; return #{count}; end\r\n"
code += "def PBSpecies.maxValue; return #{maxValue}; end\r\n"
code += "end\r\n"
eval(code, TOPLEVEL_BINDING)
pbAddScript(code,"PBSpecies")
# Save main species data.
save_data(speciesData,"Data/species.dat")
# Save movesets data.
save_data(movesets,"Data/species_movesets.dat")
# Save egg moves data.
save_data(eggMoves,"Data/species_eggmoves.dat")
# Save regional dexes data.
save_data(regionalDexes,"Data/regional_dexes.dat")
# Save metrics data.
for i in 0...7
defaultValue = (i==SpeciesData::METRIC_SHADOW_SIZE) ? 2 : 0 # Shadow size 2, other metrics 0
for j in 0..maxValue
spriteMetrics[i] = [] if !spriteMetrics[i]
spriteMetrics[i][j] ||= defaultValue
end
end
save_data(spriteMetrics,"Data/species_metrics.dat")
# Evaluate evolution data (has to be done after all species are read).
for e in 0...evolutions.length
next if !evolutions[e]
evolutions[e].each_with_index do |evo,i|
FileLineData.setSection(i,"Evolutions","")
evo[0] = csvEnumField!(evo[0],PBSpecies,"Evolutions",i) # Species
param_type = PBEvolution.getFunction(evo[1], "parameterType") param_type = PBEvolution.getFunction(evo[1], "parameterType")
if param_type if param_type
evo[2] = csvEnumField!(evo[2], param_type, "Evolutions", i) evo[2] = csvEnumField!(evo[2], param_type, "Evolutions", species.id_number)
elsif evo[2] && !evo[2].empty?
evo[2] = csvInt!(evo[2])
else else
evo[2] = csvInt!(evo[2]) if evo[2] && evo[2] != "" evo[2] = nil
end end
end end
end end
# Add prevolution data to all species as the first "evolution method". # Add prevolution "evolution" entry for all evolved species
for sp in 1..maxValue GameData::Species.each do |species|
preSpecies = -1 found_prevolution = false
evoData = nil Graphics.update if species.id_number % 200 == 0
# Check for another species that evolves into sp. pbSetWindowText(_INTL("Processing {1} prevolution line {2}", FileLineData.file, species.id_number)) if species.id_number % 50 == 0
for f in 0...evolutions.length GameData::Species.each do |other_species|
next if !evolutions[f] || f==sp other_species.evolutions.each do |evo|
evolutions[f].each do |evo| next if evo[0] != species.species || evo[3]
next if evo[0]!=sp || evo[3] # Evolved species isn't sp or is a prevolution species.evolutions.push([other_species.species, evo[1], evo[2], true])
preSpecies = f # f evolves into sp found_prevolution = true
evoData = evo
break break
end end
break if evoData break if found_prevolution
end end
next if !evoData # evoData[1]=method, evoData[2]=level - both are unused
# Found a species that evolves into e, record it as a prevolution.
evolutions[sp] = [] if !evolutions[sp]
evolutions[sp] = [[preSpecies,evoData[1],evoData[2],true]].concat(evolutions[sp])
end end
# Save evolutions data. # Save all data
save_data(evolutions,"Data/species_evolutions.dat") GameData::Species.save
# Save all messages. MessageTypes.setMessages(MessageTypes::Species, species_names)
speciesNames.map! { |name| name || "????????" } MessageTypes.setMessages(MessageTypes::FormNames, species_form_names)
MessageTypes.setMessages(MessageTypes::Species,speciesNames) MessageTypes.setMessages(MessageTypes::Kinds, species_categories)
MessageTypes.setMessages(MessageTypes::FormNames,formNames) MessageTypes.setMessages(MessageTypes::Entries, species_pokedex_entries)
MessageTypes.setMessages(MessageTypes::Kinds,pokedexKinds) Graphics.update
MessageTypes.setMessages(MessageTypes::Entries,pokedexEntries)
end end
#============================================================================= #=============================================================================
# Compile Pokémon forms # Compile Pokémon forms
#============================================================================= #=============================================================================
def compile_pokemon_forms def compile_pokemon_forms
# Get schemas. species_names = []
requiredValues = SpeciesData.requiredValues(true) species_form_names = []
optionalValues = SpeciesData.optionalValues(true) species_categories = []
# Prepare arrays for compiled data. species_pokedex_entries = []
speciesData = pbLoadSpeciesData used_forms = {}
movesets = [] # Get maximum species ID number
eggMoves = [] form_number = 0
spriteMetrics = [] GameData::Species.each do |species|
evolutions = [] form_number = species.id_number if form_number < species.id_number
formNames = []
pokedexKinds = []
pokedexEntries = []
formToSpecies = [] # Saved
speciesToForm = [] # Only used in this method
for i in 1..PBSpecies.maxValue
formToSpecies[i] = [i]
speciesToForm[i] = i
end end
# Prepare variables used to record scripted constants. # Read from PBS file
constants = "" File.open("PBS/pokemonforms.txt", "rb") { |f|
maxValue = PBSpecies.maxValue # Highest species ID
# Read from PBS file.
File.open("PBS/pokemonforms.txt","rb") { |f|
FileLineData.file = "PBS/pokemonforms.txt" # For error reporting FileLineData.file = "PBS/pokemonforms.txt" # For error reporting
# Read a whole section's lines at once, then run through this code. # Read a whole section's lines at once, then run through this code.
# contents is a hash containing all the XXX=YYY lines in that section, where # contents is a hash containing all the XXX=YYY lines in that section, where
# the keys are the XXX and the values are the YYY (as unprocessed strings). # the keys are the XXX and the values are the YYY (as unprocessed strings).
pbEachFileSection2(f) { |contents,sectionName| schema = GameData::Species.schema(true)
# Split sectionName into a species number and form number. pbEachFileSection2(f) { |contents, section_name|
splitSectionName = sectionName.split(/[-,\s]/) FileLineData.setSection(section_name, "header", nil) # For error reporting
if splitSectionName.length!=2 # Split section_name into a species number and form number
raise _INTL("Section name {1} is invalid (PBS/pokemonforms.txt). Expected syntax like [XXX,Y] (XXX=internal name, Y=form number).",sectionName) split_section_name = section_name.split(/[-,\s]/)
if split_section_name.length != 2
raise _INTL("Section name {1} is invalid (PBS/pokemonforms.txt). Expected syntax like [XXX,Y] (XXX=internal name, Y=form number).", sectionName)
end end
baseSpeciesID = parseSpecies(splitSectionName[0]) species_symbol = csvEnumField!(split_section_name[0], :Species, nil, nil)
form = csvInt!(splitSectionName[1]) form = csvPosInt!(split_section_name[1])
# Ensure this is a valid form and not a duplicate. # Raise an error if a species is undefined, the form number is invalid or
if form==0 # a species/form combo is used twice
raise _INTL("Form {1} is invalid (PBS/pokemonforms.txt). Form 0 data should be defined in \"PBS/pokemon.txt\".",sectionName) if !GameData::Species.exists?(species_symbol)
raise _INTL("Species ID '{1}' is not defined in pokemon.txt.\r\n{2}", species_symbol, FileLineData.linereport)
elsif form == 0
raise _INTL("A form cannot be defined with a form number of 0.\r\n{1}", FileLineData.linereport)
elsif used_forms[species_symbol] && used_forms[species_symbol].include?(form)
raise _INTL("Form {1} for species ID {2} is defined twice.\r\n{3}", form, species_symbol, FileLineData.linereport)
end end
if formToSpecies[baseSpeciesID] && formToSpecies[baseSpeciesID][form] used_forms[species_symbol] = [] if !used_forms[species_symbol]
raise _INTL("Form {1} is defined at least twice (PBS/pokemonforms.txt). It should only be defined once.",sectionName) used_forms[species_symbol].push(form)
form_number += 1
base_data = GameData::Species.get(species_symbol)
# Go through schema hash of compilable data and compile this section
for key in schema.keys
# Skip empty properties (none are required)
if contents[key].nil? || contents[key] == ""
contents[key] = nil
next
end end
# Record new species number in formToSpecies. FileLineData.setSection(section_name, key, contents[key]) # For error reporting
speciesID = baseSpeciesID # Compile value for key
if form>0 value = pbGetCsvRecord(contents[key], key, schema[key])
maxValue += 1 value = nil if value.is_a?(Array) && value.length == 0
speciesID = maxValue contents[key] = value
formToSpecies[baseSpeciesID] = [] if !formToSpecies[baseSpeciesID] # Sanitise data
formToSpecies[baseSpeciesID][form] = speciesID
speciesToForm[speciesID] = baseSpeciesID
end
# Generate internal name for this form.
cName = getConstantName(PBSpecies,baseSpeciesID).to_s+"_"+form.to_s
constants += "#{cName}=#{speciesID}\r\n"
# Create array to store compiled data in.
speciesData[speciesID] = []
# Clone data from base form as a starting point.
speciesData[baseSpeciesID].each_with_index do |val,i|
speciesData[speciesID][i] = (val.is_a?(Array)) ? val.clone : val
end
# Copy Type1 into Type2 if if Type1 is defined but Type2 isn't. (Shouldn't
# inherit either of the base form's types if Type1 is defined for a form.)
if contents["Type1"] && contents["Type1"]!=""
if !contents["Type2"] || contents["Type2"]==""
contents["Type2"] = contents["Type1"].clone
end
end
# If any held item is defined for this form, clear default data for all
# three held items.
if (contents["WildItemCommon"] && contents["WildItemCommon"]!="") ||
(contents["WildItemUncommon"] && contents["WildItemUncommon"]!="") ||
(contents["WildItemRare"] && contents["WildItemRare"]!="")
speciesData[speciesID][SpeciesData::WILD_ITEM_COMMON] = nil
speciesData[speciesID][SpeciesData::WILD_ITEM_UNCOMMON] = nil
speciesData[speciesID][SpeciesData::WILD_ITEM_RARE] = nil
end
# Go through hashes of compilable data and compile this section.
[requiredValues,optionalValues].each do |hash|
for key in hash.keys
FileLineData.setSection(speciesID,key,contents[key]) # For error reporting
next if hash[key][0]<0 # Property is not to be compiled; skip it
# Skip empty properties (none are required).
next if !contents[key] || contents[key]==""
# Compile value for key.
schema = hash[key]
value = pbGetCsvRecord(contents[key],key,schema)
# Modify value as required.
case key case key
when "Height", "Weight" when "Height", "Weight"
# Convert height/weight to 1 decimal place and multiply by 10. # Convert height/weight to 1 decimal place and multiply by 10
value = (value*10).round value = (value * 10).round
if value<=0 if value <= 0
raise _INTL("Value for '{1}' can't be less than or close to 0 (section {2}, PBS/pokemonforms.txt)",key,speciesID) raise _INTL("Value for '{1}' can't be less than or close to 0 (section {2}, PBS/pokemonforms.txt)", key, section_name)
end end
end contents[key] = value
# Add value to appropriate array for saving.
case key
when "Moves" when "Moves"
speciesMoves = [] move_array = []
for i in 0...value.length/2 for i in 0...value.length / 2
speciesMoves.push([value[i*2],value[i*2+1],i]) move_array.push([value[i * 2], value[i * 2 + 1], i])
end end
speciesMoves.sort! { |a,b| (a[0]==b[0]) ? a[2]<=>b[2] : a[0]<=>b[0] } move_array.sort! { |a, b| (a[0] == b[0]) ? a[2] <=> b[2] : a[0] <=>b [0] }
for i in speciesMoves; i.pop; end move_array.each { |arr| arr.pop }
movesets[speciesID] = speciesMoves contents[key] = move_array
when "EggMoves" when "TutorMoves", "EggMoves", "Abilities", "HiddenAbility", "Compatibility"
if value.is_a?(Array); eggMoves[speciesID] = value contents[key] = [contents[key]] if !contents[key].is_a?(Array)
else; eggMoves[speciesID] = [value] contents[key].compact!
end
when "BattlerPlayerX", "BattlerPlayerY",
"BattlerEnemyX", "BattlerEnemyY",
"BattlerAltitude", "BattlerShadowX", "BattlerShadowSize"
spriteMetrics[schema[0]] = [] if !spriteMetrics[schema[0]]
spriteMetrics[schema[0]][speciesID] = value
when "Evolutions" when "Evolutions"
speciesEvolutions = [] evo_array = []
for i in 0...value.length/3 for i in 0...value.length / 3
speciesEvolutions.push([value[i*3],value[i*3+1],value[i*3+2],false]) param_type = PBEvolution.getFunction(value[i * 3 + 1], "parameterType")
end param = value[i * 3 + 2]
evolutions[speciesID] = speciesEvolutions
when "FormName"
formNames[speciesID] = value
when "Kind"
pokedexKinds[speciesID] = value
when "Pokedex"
pokedexEntries[speciesID] = value
else # All other data
speciesData[speciesID][schema[0]] = value
end
end
end
}
}
# All data is compiled now, just need to save it.
# Write all constants and some helpful code for PBSpecies.
code = "module PBSpecies\r\n#{constants}"
code += "def PBSpecies.maxValueF; return #{maxValue}; end\r\n"
code += "end\r\n"
eval(code, TOPLEVEL_BINDING)
pbAddScript(code,"PBSpecies")
# Save main species data.
save_data(speciesData,"Data/species.dat")
# Save conversions of form to species data.
save_data(formToSpecies,"Data/form2species.dat")
# Inherit base form moveset.
newMovesets = pbLoadMovesetsData
append_to_base_form_data(PBSpecies.maxValue+1,maxValue,newMovesets,movesets,speciesToForm,true)
save_data(newMovesets,"Data/species_movesets.dat")
$PokemonTemp.speciesMovesets = nil if $PokemonTemp
# Inherit base form egg moves.
newEggMoves = pbLoadEggMovesData
append_to_base_form_data(PBSpecies.maxValue+1,maxValue,newEggMoves,eggMoves,speciesToForm,false)
save_data(newEggMoves,"Data/species_eggmoves.dat")
$PokemonTemp.speciesEggMoves = nil if $PokemonTemp
# Inherit base form metrics data.
newSpriteMetrics = pbLoadSpeciesMetrics
for i in 0...7
defaultValue = (i==SpeciesData::METRIC_SHADOW_SIZE) ? 2 : 0 # Shadow size 2, other metrics 0
append_to_base_form_data(PBSpecies.maxValue+1,maxValue,newSpriteMetrics[i],
spriteMetrics[i] || [],speciesToForm,false,defaultValue)
end
save_data(newSpriteMetrics,"Data/species_metrics.dat")
# Evaluate evolution data (has to be done after all species are read).
for e in 0...evolutions.length
next if !evolutions[e]
evolutions[e].each_with_index do |evo,i|
FileLineData.setSection(i,"Evolutions","")
evo[0] = csvEnumField!(evo[0],PBSpecies,"Evolutions",i) # Species
param_type = PBEvolution.getFunction(evo[1], "parameterType")
if param_type if param_type
evo[2] = csvEnumField!(evo[2], param_type, "Evolutions", i) param = csvEnumField!(param, param_type, "Evolutions", section_name)
elsif param && !param.empty?
param = csvInt!(param)
else else
evo[2] = csvPosInt!(evo[2]) if evo[2] && evo[2] != "" param = nil
end
evo_array.push([value[i * 3], value[i * 3 + 1], param, false])
end
contents[key] = evo_array
end end
end end
# Construct species hash
form_symbol = sprintf("%s_%d", species_symbol.to_s, form).to_sym
moves = contents["Moves"]
if !moves
moves = []
base_data.moves.each { |m| moves.push(m.clone) }
end end
# Inherit base form evolution methods. evolutions = contents["Evolutions"]
newEvolutions = pbLoadEvolutionsData if !evolutions
append_to_base_form_data(PBSpecies.maxValue+1,maxValue,newEvolutions,evolutions,speciesToForm,true) evolutions = []
# Add prevolution data to all species as the first "evolution method". base_data.evolutions.each { |e| evolutions.push(e.clone) }
for i in (PBSpecies.maxValue+1)..maxValue end
baseSpecies = speciesToForm[i] species_hash = {
preSpecies = -1 :id => form_symbol,
evoData = nil :id_number => form_number,
# Check for another species that evolves into baseSpecies. :species => species_symbol,
for f in 0...newEvolutions.length :form => form,
next if !newEvolutions[f] || speciesToForm[f]==baseSpecies :name => base_data.real_name,
newEvolutions[f].each do |evo| :form_name => contents["FormName"],
next if evo[0]!=baseSpecies || evo[3] # Evolved species isn't baseSpecies or is a prevolution :category => contents["Kind"] || base_data.real_category,
preSpecies = speciesToForm[f] # f evolves into baseSpecies :pokedex_entry => contents["Pokedex"] || base_data.real_pokedex_entry,
evoData = evo :pokedex_form => contents["PokedexForm"],
:type1 => contents["Type1"] || base_data.type1,
:type2 => contents["Type2"] || base_data.type2,
:base_stats => contents["BaseStats"] || base_data.base_stats,
:evs => contents["EffortPoints"] || base_data.evs,
:base_exp => contents["BaseEXP"] || base_data.base_exp,
:catch_rate => contents["Rareness"] || base_data.catch_rate,
:happiness => contents["Happiness"] || base_data.happiness,
:moves => moves,
:tutor_moves => contents["TutorMoves"] || base_data.tutor_moves.clone,
:egg_moves => contents["EggMoves"] || base_data.egg_moves.clone,
:abilities => contents["Abilities"] || base_data.abilities.clone,
:hidden_abilities => contents["HiddenAbility"] || base_data.hidden_abilities.clone,
:wild_item_common => contents["WildItemCommon"] || base_data.wild_item_common,
:wild_item_uncommon => contents["WildItemUncommon"] || base_data.wild_item_uncommon,
:wild_item_rare => contents["WildItemRare"] || base_data.wild_item_rare,
:egg_groups => contents["Compatibility"] || base_data.egg_groups.clone,
:hatch_steps => contents["StepsToHatch"] || base_data.hatch_steps,
:evolutions => evolutions,
:height => contents["Height"] || base_data.height,
:weight => contents["Weight"] || base_data.weight,
:color => contents["Color"] || base_data.color,
:shape => contents["Shape"] || base_data.shape,
:habitat => contents["Habitat"] || base_data.habitat,
:generation => contents["Generation"] || base_data.generation,
:mega_stone => contents["MegaStone"],
:mega_move => contents["MegaMove"],
:unmega_form => contents["UnmegaForm"],
:mega_message => contents["MegaMessage"],
:back_sprite_x => contents["BattlerPlayerX"] || base_data.back_sprite_x,
:back_sprite_y => contents["BattlerPlayerY"] || base_data.back_sprite_y,
:front_sprite_x => contents["BattlerEnemyX"] || base_data.front_sprite_x,
:front_sprite_y => contents["BattlerEnemyY"] || base_data.front_sprite_y,
:front_sprite_altitude => contents["BattlerAltitude"] || base_data.front_sprite_altitude,
:shadow_x => contents["BattlerShadowX"] || base_data.shadow_x,
:shadow_size => contents["BattlerShadowSize"] || base_data.shadow_size
}
# If form is single-typed, ensure it remains so if base species is dual-typed
species_hash[:type2] = contents["Type1"] if contents["Type1"] && !contents["Type2"]
# If form has any wild items, ensure none are inherited from base species
if contents["WildItemCommon"] || contents["WildItemUncommon"] || contents["WildItemRare"]
species_hash[:wild_item_common] = contents["WildItemCommon"]
species_hash[:wild_item_uncommon] = contents["WildItemUncommon"]
species_hash[:wild_item_rare] = contents["WildItemRare"]
end
# Add form's data to records
GameData::Species::DATA[form_number] = GameData::Species::DATA[form_symbol] = GameData::Species.new(species_hash)
species_names[form_number] = species_hash[:name]
species_form_names[form_number] = species_hash[:form_name]
species_categories[form_number] = species_hash[:category]
species_pokedex_entries[form_number] = species_hash[:pokedex_entry]
}
}
# Add prevolution "evolution" entry for all evolved forms that define their
# own evolution methods (and thus won't have a prevolution listed already)
GameData::Species.each do |species|
next if species.form == 0 # Looking at alternate forms only
next if species.evolutions.any? { |evo| evo[3] } # Already has prevo listed
found_prevolution = false
Graphics.update if species.id_number % 200 == 0
pbSetWindowText(_INTL("Processing {1} prevolution line {2}", FileLineData.file, species.id_number)) if species.id_number % 50 == 0
GameData::Species.each do |other_species|
other_species.evolutions.each do |evo|
next if evo[0] != species.species || evo[3]
species.evolutions.push([other_species.species, evo[1], evo[2], true])
found_prevolution = true
break break
end end
break if evoData break if found_prevolution
end
next if !evoData # evoData[1]=method, evoData[2]=level - both are unused
# Found a species that evolves into e, record it as a prevolution.
if newEvolutions[i]
newEvolutions[i] = [[preSpecies,evoData[1],evoData[2],true]].concat(newEvolutions[i])
else
newEvolutions[i] = [[preSpecies,evoData[1],evoData[2],true]]
end
end
# Save evolutions data.
save_data(newEvolutions,"Data/species_evolutions.dat")
$PokemonTemp.evolutionsData = nil if $PokemonTemp
# Save all messages.
MessageTypes.addMessages(MessageTypes::FormNames,formNames)
MessageTypes.addMessages(MessageTypes::Kinds,pokedexKinds)
MessageTypes.addMessages(MessageTypes::Entries,pokedexEntries)
end
def append_to_base_form_data(idxStart,idxEnd,baseData,extraData,speciesToForm,clone=false,defaultValue=nil)
for i in idxStart..idxEnd
if extraData[i]
baseData[i] = extraData[i]
else
species = speciesToForm[i]
if baseData[species]
if clone
baseData[i] = []
baseData[species].each { |datum| baseData[i].push(datum.clone) }
elsif baseData[species].is_a?(Array)
baseData[i] = baseData[species].clone
else
baseData[i] = baseData[species]
end
else
baseData[i] = defaultValue
end
end end
end end
# Save all data
GameData::Species.save
MessageTypes.addMessages(MessageTypes::Species, species_names)
MessageTypes.addMessages(MessageTypes::FormNames, species_form_names)
MessageTypes.addMessages(MessageTypes::Kinds, species_categories)
MessageTypes.addMessages(MessageTypes::Entries, species_pokedex_entries)
Graphics.update
end end
#============================================================================= #=============================================================================
# Compile TM/TM/Move Tutor compatibilities # Compile TM/TM/Move Tutor compatibilities
#============================================================================= #=============================================================================
def compile_move_compatibilities def compile_move_compatibilities
lineno = 1 return if !safeExists?("PBS/tm.txt")
havesection = false species_hash = {}
move_id = nil move = nil
sections = {} pbCompilerEachCommentedLine("PBS/tm.txt") { |line, line_no|
if safeExists?("PBS/tm.txt") Graphics.update if line_no % 50 == 0
f = File.open("PBS/tm.txt","rb") if line[/^\s*\[\s*(\S+)\s*\]\s*$/]
FileLineData.file = "PBS/tm.txt" move = parseMove($~[1])
f.each_line { |line| pbSetWindowText(_INTL("Processing {1} section [{2}]", FileLineData.file, move))
if lineno==1 && line[0]==0xEF && line[1]==0xBB && line[2]==0xBF
line = line[3,line.length-3]
end
FileLineData.setLine(line,lineno)
if !line[/^\#/] && !line[/^\s*$/]
if line[/^\s*\[\s*(.*)\s*\]\s*$/]
move_id = parseMove($~[1])
if sections[move_id]
raise _INTL("TM section [{1}] is defined twice.\r\n{2}",move_id.to_s,FileLineData.linereport)
end
sections[move_id] = []
havesection = true
else else
if !move_id raise _INTL("Expected a section at the beginning of the file.\r\n{1}", FileLineData.linereport) if !move
raise _INTL("Expected a section at the beginning of the file. This error may also occur if the file was not saved in UTF-8.\r\n{1}", species_list = line.split(",")
FileLineData.linereport) for species in species_list
end next if !species || species.empty?
specieslist = line.sub(/\s+$/,"").split(",") s = parseSpecies(species)
for species in specieslist species_hash[s] = [] if !species_hash[s]
next if !species || species=="" species_hash[s].push(move)
sec = sections[move_id]
sec[sec.length] = parseSpecies(species)
end end
end end
end
lineno += 1
Graphics.update if lineno%50==0
pbSetWindowText(_INTL("Processing {1} line {2}",FileLineData.file,lineno)) if lineno%50==0
} }
f.close GameData::Species.each do |species_data|
next if !species_hash[species_data.id]
species_hash[species_data.id].sort! { |a, b| a.to_s <=> b.to_s }
species_hash[species_data.id].each { |move| species_data.tutor_moves.push(move) }
end
GameData::Species.save
pbSavePokemonData
pbSavePokemonFormsData
begin
File.delete("PBS/tm.txt")
rescue SystemCallError
end end
save_data(sections,"Data/tm.dat")
end end
#============================================================================= #=============================================================================
# Compile Shadow movesets # Compile Shadow movesets
#============================================================================= #=============================================================================
def compile_shadow_movesets def compile_shadow_movesets
sections = [] sections = {}
if File.exists?("PBS/shadowmoves.txt") if File.exists?("PBS/shadowmoves.txt")
pbCompilerEachCommentedLine("PBS/shadowmoves.txt") { |line,_lineno| pbCompilerEachCommentedLine("PBS/shadowmoves.txt") { |line, _line_no|
if line[ /^\s*(\w+)\s*=\s*(.*)$/ ] if line[/^\s*(\w+)\s*=\s*(.*)$/]
key = $1 key = $1
value = $2 value = $2
value = value.split(",") value = value.split(",")
species = parseSpecies(key) species = parseSpecies(key)
moves = [] moves = []
for i in 0...[Pokemon::MAX_MOVES,value.length].min for i in 0...[Pokemon::MAX_MOVES, value.length].min
move = parseMove(value[i], true) move = parseMove(value[i], true)
moves.push(move) if move moves.push(move) if move
end end
moves.compact! moves.compact!
sections[species] = moves if moves.length>0 sections[species] = moves if moves.length > 0
end end
} }
end end
save_data(sections,"Data/shadow_movesets.dat") save_data(sections, "Data/shadow_movesets.dat")
end
#=============================================================================
# Compile Regional Dexes
#=============================================================================
def compile_regional_dexes
dex_lists = []
section = nil
pbCompilerEachPreppedLine("PBS/regionaldexes.txt") { |line, line_no|
Graphics.update if line_no % 200 == 0
if line[/^\s*\[\s*(\d+)\s*\]\s*$/]
section = $~[1].to_i
if dex_lists[section]
raise _INTL("Dex list number {1} is defined at least twice.\r\n{2}", section, FileLineData.linereport)
end
dex_lists[section] = []
pbSetWindowText(_INTL("Processing {1} section [{2}]", FileLineData.file, section))
else
raise _INTL("Expected a section at the beginning of the file.\r\n{1}", FileLineData.linereport) if !section
species_list = line.split(",")
for species in species_list
next if !species || species.empty?
s = parseSpecies(species)
dex_lists[section].push(s)
end
end
}
# Check for duplicate species in a Regional Dex
dex_lists.each_with_index do |list, index|
unique_list = list.uniq
next if list == unique_list
list.each_with_index do |s, i|
next if unique_list[i] == s
raise _INTL("Dex list number {1} has species {2} listed twice.\r\n{3}", index, s, FileLineData.linereport)
end
end
# Save all data
save_data(dex_lists, "Data/regional_dexes.dat")
Graphics.update
end end
#============================================================================= #=============================================================================
@@ -1349,7 +1303,7 @@ module Compiler
pokemonindex += 1 pokemonindex += 1
trainers[trainerindex][3][pokemonindex] = [] trainers[trainerindex][3][pokemonindex] = []
record = pbGetCsvRecord(line,lineno, record = pbGetCsvRecord(line,lineno,
[0,"evEEEEEUEUBEUUSBU",PBSpecies,nil,:Item,:Move,:Move,:Move,:Move, [0,"evEEEEEUEUBEUUSBU",Species,nil,:Item,:Move,:Move,:Move,:Move,
nil,{"M"=>0,"m"=>0,"Male"=>0,"male"=>0, nil,{"M"=>0,"m"=>0,"Male"=>0,"male"=>0,
"0"=>0,"F"=>1,"f"=>1,"Female"=>1,"female"=>1, "0"=>0,"F"=>1,"f"=>1,"Female"=>1,"female"=>1,
"1"=>1},nil,nil,PBNatures,nil,nil,nil,nil,nil]) "1"=>1},nil,nil,PBNatures,nil,nil,nil,nil,nil])
+471
View File
@@ -0,0 +1,471 @@
# See the documentation on the wiki to learn how to edit this file.
#-------------------------------
002 # Lappet Town
25,10,10
Water
TENTACOOL,14,19
MANTYKE,15,16
REMORAID,14,16
REMORAID,14,16
REMORAID,14,16
OldRod
MAGIKARP,16,19
MAGIKARP,16,19
GoodRod
BARBOACH,17,18
SHELLDER,16,19
KRABBY,15,16
SuperRod
CHINCHOU,17,19
QWILFISH,16,19
CORSOLA,15,18
STARYU,15,17
STARYU,15,17
#-------------------------------
005 # Route 1
25,10,10
Land
RATTATA,11,14
PIDGEY,11,14
RATTATA,11,14
PIDGEY,11,14
RATTATA,11,14
PIDGEY,11,14
RATTATA,11,13
PIDGEY,11,13
RATTATA,11,13
PIDGEY,11,13
RATTATA,14
PIDGEY,14
LandNight
RATTATA,10,14
HOOTHOOT,10,13
RATTATA,10,14
HOOTHOOT,10,13
SPINARAK,8,12
SPINARAK,8,12
RATTATA,10,14
HOOTHOOT,10,14
RATTATA,10,14
HOOTHOOT,10,14
RATTATA,15
HOOTHOOT,14
#-------------------------------
021 # Route 2
25,10,10
Land
RATTATA,12,15
RATTATA,12,15
RATTATA,12,15
POOCHYENA,11,15
POOCHYENA,11,15
POOCHYENA,11,15
SHINX,10,12
SHINX,10,12
SHINX,10,11
SHINX,10,11
SHINX,10,11
SHINX,10,11
Water
MAGIKARP,7,10
GOLDEEN,11,14
STARYU,12,15
STARYU,12,15
STARYU,12,15
OldRod
MAGIKARP,7,10
MAGIKARP,9,15
GoodRod
GOLDEEN,12,14
FINNEON,12,15
MAGIKARP,12,17
SuperRod
GOLDEEN,12,14
FINNEON,12,15
STARYU,12,15
STARYU,14,17
STARYU,14,17
HeadbuttLow
PINECO,11,13
LEDYBA,6,8
PINECO,11,13
SPINARAK,9,12
LEDYBA,6,8
SPINARAK,9,12
SPINARAK,9,12
MUNCHLAX,11,14
HeadbuttHigh
PINECO,11,13
WURMPLE,6,8
PINECO,11,13
SPINARAK,9,12
WURMPLE,6,8
SPINARAK,9,12
SPINARAK,9,12
SPINARAK,9,12
#-------------------------------
028 # Natural Park
25,10,10
Land
CATERPIE,10
WEEDLE,10
PIDGEY,10,14
PIDGEY,12,14
SUNKERN,12
SUNKERN,12
METAPOD,10
KAKUNA,10
PIDGEY,10,14
PIDGEY,12,14
PIDGEY,10,14
PIDGEY,12,14
LandMorning
CATERPIE,10,12
WEEDLE,10,12
PIDGEY,10,14
PIDGEY,10,14
METAPOD,10
KAKUNA,10
METAPOD,10
KAKUNA,10
CATERPIE,10,12
WEEDLE,10,12
CATERPIE,10,12
WEEDLE,10,12
LandNight
HOOTHOOT,10,14
SPINARAK,10,15
HOOTHOOT,10,14
SPINARAK,10,15
PINECO,9,13
PINECO,9,13
NATU,12,14
NATU,12,14
DROWZEE,9,15
DROWZEE,9,15
DROWZEE,9,15
DROWZEE,9,15
BugContest
CATERPIE,7,18
WEEDLE,7,18
METAPOD,9,18
KAKUNA,9,18
PARAS,10,17
VENONAT,10,16
BUTTERFREE,12,15
BEEDRILL,12,15
SCYTHER,13,14
PINSIR,13,14
SCYTHER,13,14
PINSIR,13,14
#-------------------------------
031 # Route 3
25,10,10
Land
NIDORANfE,12,15
NIDORANmA,12,15
NIDORANfE,12,15
NIDORANmA,12,15
PIKACHU,14,17
PIKACHU,14,17
PONYTA,13,15
PONYTA,13,15
EEVEE,15
EEVEE,15
EEVEE,15
EEVEE,15
Water
SURSKIT,13,14
LOTAD,14
LOTAD,14
LOTAD,15
LOTAD,15
RockSmash
NOSEPASS,13,14
GEODUDE,12,15
GEODUDE,12,15
GEODUDE,12,15
GEODUDE,12,15
OldRod
MAGIKARP,6,11
MAGIKARP,10,17
GoodRod
POLIWAG,12,15
PSYDUCK,11,14
WOOPER,13,17
SuperRod
CHINCHOU,11,12
REMORAID,12,14
LUVDISC,10,16
LUVDISC,10,16
LUVDISC,10,16
HeadbuttLow
PINECO,14,17
COMBEE,15,17
PINECO,14,16
HERACROSS,16,18
COMBEE,15,16
HERACROSS,16,17
HERACROSS,16,17
MUNCHLAX,13,18
HeadbuttHigh
SEEDOT,14,17
SHROOMISH,14,17
SEEDOT,14,17
BURMY,12,15
SHROOMISH,14,17
BURMY,12,15
BURMY,12,15
BURMY,12,15
#-------------------------------
034 # Ice Cave
25,10,10
Cave
SWINUB,16,18
SWINUB,16,18
SNEASEL,14,16
SNEASEL,14,16
SNORUNT,12,15
SNORUNT,12,15
SNOVER,14
SNOVER,14
SMOOCHUM,11,14
SMOOCHUM,11,14
SMOOCHUM,11,14
SMOOCHUM,11,14
#-------------------------------
039 # Route 4
25,10,10
Land
SHELLOS_1,12,15
SHELLOS_1,12,15
SHELLOS_1,12,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
#-------------------------------
041 # Route 5
25,10,10
Land
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
SPEAROW,13,16
SPEAROW,13,16
SPEAROW,13,16
SPEAROW,13,16
SPEAROW,13,16
SLUGMA,13,14
SLUGMA,13,14
SLUGMA,13,14
SLUGMA,13,14
#-------------------------------
044 # Route 6
25,10,10
Land
SHELLOS_1,12,15
SHELLOS_1,12,15
SHELLOS_1,12,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
#-------------------------------
047 # Route 7
25,10,10
Land
SHELLOS,12,15
SHELLOS,12,15
SHELLOS,12,15
BIDOOF,14,17
BIDOOF,14,17
BIDOOF,14,17
MURKROW,12,14
MURKROW,12,14
WURMPLE,9,12
WURMPLE,9,12
WURMPLE,9,12
WURMPLE,9,12
RockSmash
NOSEPASS,13,14
NOSEPASS,13,14
GEODUDE,12,15
GEODUDE,12,15
GEODUDE,12,15
#-------------------------------
049 # Rock Cave
25,10,10
Cave
NOSEPASS,14,15
NOSEPASS,13,14
MAGNETON,14,17
MAGNETON,14,17
MAGNETON,14,16
MAGNETON,14,16
GEODUDE,13,15
GEODUDE,13,15
MAWILE,14,16
MAWILE,14,16
MAWILE,14,16
MAWILE,14,16
#-------------------------------
050 # Rock Cave
25,10,10
Cave
NOSEPASS,14,15
NOSEPASS,13,14
MAGNETON,14,17
MAGNETON,14,17
MAGNETON,14,16
MAGNETON,14,16
GEODUDE,13,15
GEODUDE,13,15
BURMY,14,16
BURMY,14,16
BURMY,14,16
BURMY,14,16
#-------------------------------
051 # Dungeon
25,10,10
Cave
PICHU,1
CLEFFA,1
IGGLYBUFF,1
IGGLYBUFF,1
CHINGLING,1
CHINGLING,1
RIOLU,1
RIOLU,1
TYROGUE,1
TYROGUE,1
TYROGUE,1
TYROGUE,1
#-------------------------------
066 # Safari Zone
25,10,10
Land
NIDORANfE,15,16
NIDORANmA,15,16
DODUO,13,15
DODUO,13,15
ABRA,12,15
ABRA,12,15
TANGELA,14,16
TANGELA,14,16
HOPPIP,13,17
HOPPIP,13,17
HOPPIP,13,17
HOPPIP,13,17
#-------------------------------
068 # Safari Zone
25,10,10
Land
RHYHORN,16,18
EXEGGCUTE,15,18
VENONAT,15,17
VENONAT,15,18
AIPOM,14,17
GIRAFARIG,16,17
TAUROS,15,16
HERACROSS,15,17
SCYTHER,16
PINSIR,16
KANGASKHAN,19
CHANSEY,17
Water
PSYDUCK,16,18
MARILL,15,18
SLOWPOKE,14,16
BUIZEL,15,17
BUIZEL,15,17
OldRod
MAGIKARP,17,21
MAGIKARP,17,20
GoodRod
MAGIKARP,16,20
FEEBAS,16,20
POLIWAG,17,18
SuperRod
GOLDEEN,16,18
REMORAID,17,19
CARVANHA,16,17
FINNEON,15,18
DRATINI,17
#-------------------------------
069 # Route 8
25,10,10
Land
ODDISH,15,17
MAREEP,16,18
LOTAD,15,17
LOTAD,15,18
DITTO,15,17
DITTO,16,18
BONSLY,14,17
BONSLY,14,16
BONSLY,14,16
BONSLY,14,16
BONSLY,15,16
BONSLY,15
Water
TENTACOOL,14,19
MANTYKE,15,16
REMORAID,14,16
REMORAID,14,16
REMORAID,14,16
OldRod
MAGIKARP,16,19
MAGIKARP,16,19
GoodRod
BARBOACH,17,18
SHELLDER,16,19
KRABBY,15,16
SuperRod
CHINCHOU,17,19
QWILFISH,16,19
CORSOLA,15,18
STARYU,15,17
STARYU,15,17
#-------------------------------
070 # Underwater
25,10,10
Land
CLAMPERL,18,20
SHELLDER,18,20
CLAMPERL,18,19
SHELLDER,18,19
CHINCHOU,17,21
CHINCHOU,17,21
CORSOLA,17,20
CORSOLA,17,20
RELICANTH,16,19
RELICANTH,16,19
RELICANTH,16,19
RELICANTH,16,19
#-------------------------------
075 # Tiall Region
25,10,10
Land
RATTATA,11,14
GEODUDE,11,14
SANDSHREW,11,14
VULPIX,11,14
DIGLETT,11,14
MEOWTH,11,14
PIKACHU,11,14
PIKACHU,11,14
CUBONE,11,14
CUBONE,11,14
CUBONE,11,14
CUBONE,11,14
+645 -603
View File
File diff suppressed because it is too large Load Diff
+13 -5
View File
@@ -113,6 +113,7 @@ FormName = Attack Forme
BaseStats = 50,180,20,150,180,20 BaseStats = 50,180,20,150,180,20
EffortPoints = 0,2,0,0,1,0 EffortPoints = 0,2,0,0,1,0
Moves = 1,LEER,1,WRAP,9,NIGHTSHADE,17,TELEPORT,25,TAUNT,33,PURSUIT,41,PSYCHIC,49,SUPERPOWER,57,PSYCHOSHIFT,65,ZENHEADBUTT,73,COSMICPOWER,81,ZAPCANNON,89,PSYCHOBOOST,97,HYPERBEAM Moves = 1,LEER,1,WRAP,9,NIGHTSHADE,17,TELEPORT,25,TAUNT,33,PURSUIT,41,PSYCHIC,49,SUPERPOWER,57,PSYCHOSHIFT,65,ZENHEADBUTT,73,COSMICPOWER,81,ZAPCANNON,89,PSYCHOBOOST,97,HYPERBEAM
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,CALMMIND,CHARGEBEAM,CUT,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FLASH,FLASHCANNON,FLING,FOCUSBLAST,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HEADBUTT,HIDDENPOWER,HYPERBEAM,ICEBEAM,LIGHTSCREEN,LOWKICK,LOWSWEEP,MUDSLAP,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKSMASH,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STRENGTH,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,SWIFT,TAUNT,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = 4 BattlerPlayerX = 4
BattlerEnemyX = 1 BattlerEnemyX = 1
BattlerEnemyY = 5 BattlerEnemyY = 5
@@ -123,6 +124,7 @@ FormName = Defense Forme
BaseStats = 50,70,160,90,70,160 BaseStats = 50,70,160,90,70,160
EffortPoints = 0,0,2,0,0,1 EffortPoints = 0,0,2,0,0,1
Moves = 1,LEER,1,WRAP,9,NIGHTSHADE,17,TELEPORT,25,KNOCKOFF,33,SPIKES,41,PSYCHIC,49,SNATCH,57,PSYCHOSHIFT,65,ZENHEADBUTT,73,IRONDEFENSE,73,AMNESIA,81,RECOVER,89,PSYCHOBOOST,97,COUNTER,97,MIRRORCOAT Moves = 1,LEER,1,WRAP,9,NIGHTSHADE,17,TELEPORT,25,KNOCKOFF,33,SPIKES,41,PSYCHIC,49,SNATCH,57,PSYCHOSHIFT,65,ZENHEADBUTT,73,IRONDEFENSE,73,AMNESIA,81,RECOVER,89,PSYCHOBOOST,97,COUNTER,97,MIRRORCOAT
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,CALMMIND,CHARGEBEAM,CUT,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FLASH,FLASHCANNON,FLING,FOCUSBLAST,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HEADBUTT,HIDDENPOWER,HYPERBEAM,ICEBEAM,IRONDEFENSE,KNOCKOFF,LIGHTSCREEN,LOWKICK,LOWSWEEP,MUDSLAP,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKSMASH,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STRENGTH,SUBSTITUTE,SUNNYDAY,SWAGGER,SWIFT,TAUNT,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = 3 BattlerPlayerX = 3
BattlerEnemyX = -2 BattlerEnemyX = -2
BattlerEnemyY = 6 BattlerEnemyY = 6
@@ -133,6 +135,7 @@ FormName = Speed Forme
BaseStats = 50,95,90,180,95,90 BaseStats = 50,95,90,180,95,90
EffortPoints = 0,0,0,3,0,0 EffortPoints = 0,0,0,3,0,0
Moves = 1,LEER,1,WRAP,9,NIGHTSHADE,17,DOUBLETEAM,25,KNOCKOFF,33,PURSUIT,41,PSYCHIC,49,SWIFT,57,PSYCHOSHIFT,65,ZENHEADBUTT,73,AGILITY,81,RECOVER,89,PSYCHOBOOST,97,EXTREMESPEED Moves = 1,LEER,1,WRAP,9,NIGHTSHADE,17,DOUBLETEAM,25,KNOCKOFF,33,PURSUIT,41,PSYCHIC,49,SWIFT,57,PSYCHOSHIFT,65,ZENHEADBUTT,73,AGILITY,81,RECOVER,89,PSYCHOBOOST,97,EXTREMESPEED
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,CALMMIND,CHARGEBEAM,CUT,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FIREPUNCH,FLASH,FLASHCANNON,FLING,FOCUSBLAST,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HEADBUTT,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICEPUNCH,KNOCKOFF,LIGHTSCREEN,LOWKICK,LOWSWEEP,MUDSLAP,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKSMASH,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STRENGTH,SUBSTITUTE,SUNNYDAY,SWAGGER,SWIFT,TAUNT,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERPUNCH,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = -4 BattlerPlayerX = -4
BattlerEnemyX = -4 BattlerEnemyX = -4
BattlerEnemyY = 4 BattlerEnemyY = 4
@@ -151,6 +154,7 @@ Type2 = GROUND
BaseStats = 60,79,105,36,59,85 BaseStats = 60,79,105,36,59,85
EffortPoints = 0,0,2,0,0,0 EffortPoints = 0,0,2,0,0,0
Moves = 1,TACKLE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,ROCKBLAST,29,HARDEN,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,FISSURE Moves = 1,TACKLE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,ROCKBLAST,29,HARDEN,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,FISSURE
TutorMoves = ATTRACT,BUGBITE,BULLDOZE,DIG,DOUBLETEAM,DREAMEATER,EARTHPOWER,EARTHQUAKE,ELECTROWEB,ENDEAVOR,FACADE,FLASH,FRUSTRATION,GIGAIMPACT,HIDDENPOWER,HYPERBEAM,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROCKTOMB,ROUND,SAFEGUARD,SANDSTORM,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNORE,STEALTHROCK,STRINGSHOT,STRUGGLEBUG,SUBSTITUTE,SUCKERPUNCH,SUNNYDAY,SWAGGER,THIEF,TOXIC,UPROAR,VENOSHOCK
Color = Brown Color = Brown
#------------------------------- #-------------------------------
[WORMADAM,2] [WORMADAM,2]
@@ -160,6 +164,7 @@ Type2 = STEEL
BaseStats = 60,69,95,36,69,95 BaseStats = 60,69,95,36,69,95
EffortPoints = 0,0,1,0,0,1 EffortPoints = 0,0,1,0,0,1
Moves = 1,TACKLE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,MIRRORSHOT,29,METALSOUND,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,IRONHEAD Moves = 1,TACKLE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,MIRRORSHOT,29,METALSOUND,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,IRONHEAD
TutorMoves = ATTRACT,BUGBITE,DOUBLETEAM,DREAMEATER,ELECTROWEB,ENDEAVOR,FACADE,FLASH,FLASHCANNON,FRUSTRATION,GIGAIMPACT,GUNKSHOT,GYROBALL,HIDDENPOWER,HYPERBEAM,IRONDEFENSE,IRONHEAD,MAGNETRISE,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROUND,SAFEGUARD,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNORE,STEALTHROCK,STRINGSHOT,STRUGGLEBUG,SUBSTITUTE,SUCKERPUNCH,SUNNYDAY,SWAGGER,THIEF,TOXIC,UPROAR,VENOSHOCK
Color = Red Color = Red
#------------------------------- #-------------------------------
[CHERRIM,1] [CHERRIM,1]
@@ -222,7 +227,8 @@ BattlerShadowSize = 2
FormName = Origin Forme FormName = Origin Forme
BaseStats = 150,120,100,90,120,100 BaseStats = 150,120,100,90,120,100
Abilities = LEVITATE Abilities = LEVITATE
HiddenAbility = TELEPATHY HiddenAbility = LEVITATE
TutorMoves = AERIALACE,AIRCUTTER,ANCIENTPOWER,AQUATAIL,BULLDOZE,CALMMIND,CHARGEBEAM,CUT,DARKPULSE,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,DRAGONPULSE,DRAGONTAIL,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENERGYBALL,FACADE,FLY,FRUSTRATION,FURYCUTTER,GIGAIMPACT,GRAVITY,HEADBUTT,HIDDENPOWER,HONECLAWS,HYPERBEAM,HYPERVOICE,ICYWIND,IRONHEAD,IRONTAIL,MAGICCOAT,MUDSLAP,OMINOUSWIND,OUTRAGE,PAYBACK,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROAR,ROCKSMASH,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SHADOWCLAW,SLEEPTALK,SNORE,SPITE,STONEEDGE,STRENGTH,SUBSTITUTE,SUNNYDAY,SWAGGER,SWIFT,TAILWIND,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TOXIC,TWISTER,WILLOWISP
Height = 6.9 Height = 6.9
Weight = 650.0 Weight = 650.0
Shape = 2 Shape = 2
@@ -237,6 +243,7 @@ BaseStats = 100,103,75,127,120,75
EffortPoints = 0,0,0,3,0,0 EffortPoints = 0,0,0,3,0,0
Abilities = SERENEGRACE Abilities = SERENEGRACE
Moves = 1,GROWTH,10,MAGICALLEAF,19,LEECHSEED,28,QUICKATTACK,37,SWEETSCENT,46,NATURALGIFT,55,WORRYSEED,64,AIRSLASH,73,ENERGYBALL,82,SWEETKISS,91,LEAFSTORM,100,SEEDFLARE Moves = 1,GROWTH,10,MAGICALLEAF,19,LEECHSEED,28,QUICKATTACK,37,SWEETSCENT,46,NATURALGIFT,55,WORRYSEED,64,AIRSLASH,73,ENERGYBALL,82,SWEETKISS,91,LEAFSTORM,100,SEEDFLARE
TutorMoves = AIRCUTTER,COVET,DOUBLETEAM,ENERGYBALL,FACADE,FLASH,FRUSTRATION,GIGADRAIN,GIGAIMPACT,GRASSKNOT,HEADBUTT,HIDDENPOWER,HYPERBEAM,LASTRESORT,MUDSLAP,OMINOUSWIND,PROTECT,PSYCHIC,PSYCHUP,REST,RETURN,ROUND,SAFEGUARD,SEEDBOMB,SLEEPTALK,SNORE,SOLARBEAM,SUBSTITUTE,SUNNYDAY,SWAGGER,SWIFT,SWORDSDANCE,SYNTHESIS,TAILWIND,TOXIC,WORRYSEED,ZENHEADBUTT
Height = 0.4 Height = 0.4
Weight = 5.2 Weight = 5.2
BattlerEnemyY = 16 BattlerEnemyY = 16
@@ -305,6 +312,7 @@ Type1 = ICE
[ARCEUS,16] [ARCEUS,16]
FormName = Dragon Type FormName = Dragon Type
Type1 = DRAGON Type1 = DRAGON
TutorMoves = AERIALACE,ANCIENTPOWER,AQUATAIL,BLIZZARD,BRICKBREAK,BULLDOZE,CALMMIND,CHARGEBEAM,CUT,DARKPULSE,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,DRAGONPULSE,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENERGYBALL,FACADE,FIREBLAST,FLAMETHROWER,FLASH,FLASHCANNON,FLY,FOCUSBLAST,FRUSTRATION,FURYCUTTER,GIGADRAIN,GIGAIMPACT,GRASSKNOT,GRAVITY,HAIL,HEADBUTT,HEATWAVE,HIDDENPOWER,HONECLAWS,HYPERBEAM,HYPERVOICE,ICEBEAM,ICYWIND,INCINERATE,IRONDEFENSE,IRONHEAD,IRONTAIL,LASTRESORT,LIGHTSCREEN,MAGICCOAT,MUDSLAP,OMINOUSWIND,OUTRAGE,OVERHEAT,PAYBACK,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,QUASH,RAINDANCE,RECYCLE,REFLECT,REST,RETALIATE,RETURN,ROAR,ROCKSLIDE,ROCKSMASH,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SANDSTORM,SHADOWBALL,SHADOWCLAW,SIGNALBEAM,SLEEPTALK,SLUDGEBOMB,SNARL,SNORE,SOLARBEAM,STEALTHROCK,STONEEDGE,STRENGTH,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWIFT,SWORDSDANCE,TAILWIND,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TOXIC,TRICK,TRICKROOM,TWISTER,WATERFALL,WILLOWISP,WORKUP,XSCISSOR,ZENHEADBUTT
#------------------------------- #-------------------------------
[ARCEUS,17] [ARCEUS,17]
FormName = Dark Type FormName = Dark Type
@@ -313,7 +321,6 @@ Type1 = DARK
[BASCULIN,1] [BASCULIN,1]
FormName = Blue-Striped FormName = Blue-Striped
Abilities = ROCKHEAD,ADAPTABILITY Abilities = ROCKHEAD,ADAPTABILITY
HiddenAbility = MOLDBREAKER
WildItemUncommon = DEEPSEASCALE WildItemUncommon = DEEPSEASCALE
#------------------------------- #-------------------------------
[DARMANITAN,1] [DARMANITAN,1]
@@ -350,7 +357,7 @@ FormName = Therian Forme
BaseStats = 79,100,80,121,110,90 BaseStats = 79,100,80,121,110,90
EffortPoints = 0,0,0,3,0,0 EffortPoints = 0,0,0,3,0,0
Abilities = REGENERATOR Abilities = REGENERATOR
HiddenAbility = DEFIANT HiddenAbility = REGENERATOR
Height = 1.4 Height = 1.4
Shape = 9 Shape = 9
BattlerPlayerX = -2 BattlerPlayerX = -2
@@ -362,7 +369,7 @@ FormName = Therian Forme
BaseStats = 79,105,70,101,145,80 BaseStats = 79,105,70,101,145,80
EffortPoints = 0,0,0,0,3,0 EffortPoints = 0,0,0,0,3,0
Abilities = VOLTABSORB Abilities = VOLTABSORB
HiddenAbility = DEFIANT HiddenAbility = VOLTABSORB
Height = 3.0 Height = 3.0
Shape = 6 Shape = 6
BattlerPlayerX = -3 BattlerPlayerX = -3
@@ -374,7 +381,7 @@ FormName = Therian Forme
BaseStats = 89,145,90,91,105,80 BaseStats = 89,145,90,91,105,80
EffortPoints = 0,3,0,0,0,0 EffortPoints = 0,3,0,0,0,0
Abilities = INTIMIDATE Abilities = INTIMIDATE
HiddenAbility = SHEERFORCE HiddenAbility = INTIMIDATE
Height = 1.3 Height = 1.3
Shape = 8 Shape = 8
BattlerPlayerX = -8 BattlerPlayerX = -8
@@ -425,6 +432,7 @@ BattlerEnemyY = 4
#------------------------------- #-------------------------------
[KELDEO,1] [KELDEO,1]
FormName = Resolute Form FormName = Resolute Form
TutorMoves = AERIALACE,AQUATAIL,BOUNCE,CALMMIND,COVET,CUT,DOUBLETEAM,ENDEAVOR,FACADE,FALSESWIPE,FOCUSBLAST,FRUSTRATION,GIGAIMPACT,HAIL,HELPINGHAND,HIDDENPOWER,HYPERBEAM,ICYWIND,LASTRESORT,POISONJAB,PROTECT,PSYCHUP,RAINDANCE,REFLECT,REST,RETALIATE,RETURN,ROAR,ROCKSMASH,ROUND,SAFEGUARD,SCALD,SLEEPTALK,SNORE,STONEEDGE,STRENGTH,SUBSTITUTE,SUPERPOWER,SURF,SWAGGER,SWORDSDANCE,TAUNT,TOXIC,WORKUP,XSCISSOR
BattlerPlayerX = 1 BattlerPlayerX = 1
BattlerEnemyX = 0 BattlerEnemyX = 0
BattlerEnemyY = 19 BattlerEnemyY = 19
-547
View File
File diff suppressed because one or more lines are too long
+471
View File
@@ -0,0 +1,471 @@
# See the documentation on the wiki to learn how to edit this file.
#-------------------------------
002 # Lappet Town
25,10,10
Water
TENTACOOL,14,19
MANTYKE,15,16
REMORAID,14,16
REMORAID,14,16
REMORAID,14,16
OldRod
MAGIKARP,16,19
MAGIKARP,16,19
GoodRod
BARBOACH,17,18
SHELLDER,16,19
KRABBY,15,16
SuperRod
CHINCHOU,17,19
QWILFISH,16,19
CORSOLA,15,18
STARYU,15,17
STARYU,15,17
#-------------------------------
005 # Route 1
25,10,10
Land
RATTATA,11,14
PIDGEY,11,14
RATTATA,11,14
PIDGEY,11,14
RATTATA,11,14
PIDGEY,11,14
RATTATA,11,13
PIDGEY,11,13
RATTATA,11,13
PIDGEY,11,13
RATTATA,14
PIDGEY,14
LandNight
RATTATA,10,14
HOOTHOOT,10,13
RATTATA,10,14
HOOTHOOT,10,13
SPINARAK,8,12
SPINARAK,8,12
RATTATA,10,14
HOOTHOOT,10,14
RATTATA,10,14
HOOTHOOT,10,14
RATTATA,15
HOOTHOOT,14
#-------------------------------
021 # Route 2
25,10,10
Land
RATTATA,12,15
RATTATA,12,15
RATTATA,12,15
POOCHYENA,11,15
POOCHYENA,11,15
POOCHYENA,11,15
SHINX,10,12
SHINX,10,12
SHINX,10,11
SHINX,10,11
SHINX,10,11
SHINX,10,11
Water
MAGIKARP,7,10
GOLDEEN,11,14
STARYU,12,15
STARYU,12,15
STARYU,12,15
OldRod
MAGIKARP,7,10
MAGIKARP,9,15
GoodRod
GOLDEEN,12,14
FINNEON,12,15
MAGIKARP,12,17
SuperRod
GOLDEEN,12,14
FINNEON,12,15
STARYU,12,15
STARYU,14,17
STARYU,14,17
HeadbuttLow
PINECO,11,13
LEDYBA,6,8
PINECO,11,13
SPINARAK,9,12
LEDYBA,6,8
SPINARAK,9,12
SPINARAK,9,12
MUNCHLAX,11,14
HeadbuttHigh
PINECO,11,13
WURMPLE,6,8
PINECO,11,13
SPINARAK,9,12
WURMPLE,6,8
SPINARAK,9,12
SPINARAK,9,12
SPINARAK,9,12
#-------------------------------
028 # Natural Park
25,10,10
Land
CATERPIE,10
WEEDLE,10
PIDGEY,10,14
PIDGEY,12,14
SUNKERN,12
SUNKERN,12
METAPOD,10
KAKUNA,10
PIDGEY,10,14
PIDGEY,12,14
PIDGEY,10,14
PIDGEY,12,14
LandMorning
CATERPIE,10,12
WEEDLE,10,12
PIDGEY,10,14
PIDGEY,10,14
METAPOD,10
KAKUNA,10
METAPOD,10
KAKUNA,10
CATERPIE,10,12
WEEDLE,10,12
CATERPIE,10,12
WEEDLE,10,12
LandNight
HOOTHOOT,10,14
SPINARAK,10,15
HOOTHOOT,10,14
SPINARAK,10,15
PINECO,9,13
PINECO,9,13
NATU,12,14
NATU,12,14
DROWZEE,9,15
DROWZEE,9,15
DROWZEE,9,15
DROWZEE,9,15
BugContest
CATERPIE,7,18
WEEDLE,7,18
METAPOD,9,18
KAKUNA,9,18
PARAS,10,17
VENONAT,10,16
BUTTERFREE,12,15
BEEDRILL,12,15
SCYTHER,13,14
PINSIR,13,14
SCYTHER,13,14
PINSIR,13,14
#-------------------------------
031 # Route 3
25,10,10
Land
NIDORANfE,12,15
NIDORANmA,12,15
NIDORANfE,12,15
NIDORANmA,12,15
PIKACHU,14,17
PIKACHU,14,17
PONYTA,13,15
PONYTA,13,15
EEVEE,15
EEVEE,15
EEVEE,15
EEVEE,15
Water
SURSKIT,13,14
LOTAD,14
LOTAD,14
LOTAD,15
LOTAD,15
RockSmash
NOSEPASS,13,14
GEODUDE,12,15
GEODUDE,12,15
GEODUDE,12,15
GEODUDE,12,15
OldRod
MAGIKARP,6,11
MAGIKARP,10,17
GoodRod
POLIWAG,12,15
PSYDUCK,11,14
WOOPER,13,17
SuperRod
CHINCHOU,11,12
REMORAID,12,14
LUVDISC,10,16
LUVDISC,10,16
LUVDISC,10,16
HeadbuttLow
PINECO,14,17
COMBEE,15,17
PINECO,14,16
HERACROSS,16,18
COMBEE,15,16
HERACROSS,16,17
HERACROSS,16,17
MUNCHLAX,13,18
HeadbuttHigh
SEEDOT,14,17
SHROOMISH,14,17
SEEDOT,14,17
BURMY,12,15
SHROOMISH,14,17
BURMY,12,15
BURMY,12,15
BURMY,12,15
#-------------------------------
034 # Ice Cave
25,10,10
Cave
SWINUB,16,18
SWINUB,16,18
SNEASEL,14,16
SNEASEL,14,16
SNORUNT,12,15
SNORUNT,12,15
SNOVER,14
SNOVER,14
SMOOCHUM,11,14
SMOOCHUM,11,14
SMOOCHUM,11,14
SMOOCHUM,11,14
#-------------------------------
039 # Route 4
25,10,10
Land
SHELLOS_1,12,15
SHELLOS_1,12,15
SHELLOS_1,12,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
#-------------------------------
041 # Route 5
25,10,10
Land
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
SPEAROW,13,16
SPEAROW,13,16
SPEAROW,13,16
SPEAROW,13,16
SPEAROW,13,16
SLUGMA,13,14
SLUGMA,13,14
SLUGMA,13,14
SLUGMA,13,14
#-------------------------------
044 # Route 6
25,10,10
Land
SHELLOS_1,12,15
SHELLOS_1,12,15
SHELLOS_1,12,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
GRIMER,13,15
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
MURKROW,12,14
#-------------------------------
047 # Route 7
25,10,10
Land
SHELLOS,12,15
SHELLOS,12,15
SHELLOS,12,15
BIDOOF,14,17
BIDOOF,14,17
BIDOOF,14,17
MURKROW,12,14
MURKROW,12,14
WURMPLE,9,12
WURMPLE,9,12
WURMPLE,9,12
WURMPLE,9,12
RockSmash
NOSEPASS,13,14
NOSEPASS,13,14
GEODUDE,12,15
GEODUDE,12,15
GEODUDE,12,15
#-------------------------------
049 # Rock Cave
25,10,10
Cave
NOSEPASS,14,15
NOSEPASS,13,14
MAGNETON,14,17
MAGNETON,14,17
MAGNETON,14,16
MAGNETON,14,16
GEODUDE,13,15
GEODUDE,13,15
MAWILE,14,16
MAWILE,14,16
MAWILE,14,16
MAWILE,14,16
#-------------------------------
050 # Rock Cave
25,10,10
Cave
NOSEPASS,14,15
NOSEPASS,13,14
MAGNETON,14,17
MAGNETON,14,17
MAGNETON,14,16
MAGNETON,14,16
GEODUDE,13,15
GEODUDE,13,15
BURMY,14,16
BURMY,14,16
BURMY,14,16
BURMY,14,16
#-------------------------------
051 # Dungeon
25,10,10
Cave
PICHU,1
CLEFFA,1
IGGLYBUFF,1
IGGLYBUFF,1
CHINGLING,1
CHINGLING,1
RIOLU,1
RIOLU,1
TYROGUE,1
TYROGUE,1
TYROGUE,1
TYROGUE,1
#-------------------------------
066 # Safari Zone
25,10,10
Land
NIDORANfE,15,16
NIDORANmA,15,16
DODUO,13,15
DODUO,13,15
ABRA,12,15
ABRA,12,15
TANGELA,14,16
TANGELA,14,16
HOPPIP,13,17
HOPPIP,13,17
HOPPIP,13,17
HOPPIP,13,17
#-------------------------------
068 # Safari Zone
25,10,10
Land
RHYHORN,16,18
EXEGGCUTE,15,18
VENONAT,15,17
VENONAT,15,18
AIPOM,14,17
GIRAFARIG,16,17
TAUROS,15,16
HERACROSS,15,17
SCYTHER,16
PINSIR,16
KANGASKHAN,19
CHANSEY,17
Water
PSYDUCK,16,18
MARILL,15,18
SLOWPOKE,14,16
BUIZEL,15,17
BUIZEL,15,17
OldRod
MAGIKARP,17,21
MAGIKARP,17,20
GoodRod
MAGIKARP,16,20
FEEBAS,16,20
POLIWAG,17,18
SuperRod
GOLDEEN,16,18
REMORAID,17,19
CARVANHA,16,17
FINNEON,15,18
DRATINI,17
#-------------------------------
069 # Route 8
25,10,10
Land
ODDISH,15,17
MAREEP,16,18
LOTAD,15,17
LOTAD,15,18
DITTO,15,17
DITTO,16,18
BONSLY,14,17
BONSLY,14,16
BONSLY,14,16
BONSLY,14,16
BONSLY,15,16
BONSLY,15
Water
TENTACOOL,14,19
MANTYKE,15,16
REMORAID,14,16
REMORAID,14,16
REMORAID,14,16
OldRod
MAGIKARP,16,19
MAGIKARP,16,19
GoodRod
BARBOACH,17,18
SHELLDER,16,19
KRABBY,15,16
SuperRod
CHINCHOU,17,19
QWILFISH,16,19
CORSOLA,15,18
STARYU,15,17
STARYU,15,17
#-------------------------------
070 # Underwater
25,10,10
Land
CLAMPERL,18,20
SHELLDER,18,20
CLAMPERL,18,19
SHELLDER,18,19
CHINCHOU,17,21
CHINCHOU,17,21
CORSOLA,17,20
CORSOLA,17,20
RELICANTH,16,19
RELICANTH,16,19
RELICANTH,16,19
RELICANTH,16,19
#-------------------------------
075 # Tiall Region
25,10,10
Land
RATTATA_1,11,14
GEODUDE_1,11,14
SANDSHREW_1,11,14
VULPIX_1,11,14
DIGLETT_1,11,14
MEOWTH_1,11,14
PIKACHU,11,14
PIKACHU,11,14
CUBONE,11,14
CUBONE,11,14
CUBONE,11,14
CUBONE,11,14
+803 -696
View File
File diff suppressed because it is too large Load Diff
+31
View File
@@ -66,6 +66,7 @@ Type1 = DARK
Type2 = NORMAL Type2 = NORMAL
Abilities = GLUTTONY,HUSTLE Abilities = GLUTTONY,HUSTLE
HiddenAbility = THICKFAT HiddenAbility = THICKFAT
TutorMoves = ATTRACT,BLIZZARD,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,EMBARGO,ENDEAVOR,FACADE,FRUSTRATION,GRASSKNOT,HIDDENPOWER,ICEBEAM,ICYWIND,IRONTAIL,LASTRESORT,PROTECT,QUASH,RAINDANCE,REST,RETURN,ROUND,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SNARL,SNATCH,SNORE,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,TAUNT,THIEF,TORMENT,TOXIC,UPROAR,UTURN,ZENHEADBUTT
EggMoves = COUNTER,FINALGAMBIT,FURYSWIPES,MEFIRST,REVENGE,REVERSAL,SNATCH,STOCKPILE,SWALLOW,SWITCHEROO,UPROAR EggMoves = COUNTER,FINALGAMBIT,FURYSWIPES,MEFIRST,REVENGE,REVERSAL,SNATCH,STOCKPILE,SWALLOW,SWITCHEROO,UPROAR
Weight = 3.8 Weight = 3.8
Color = Black Color = Black
@@ -80,6 +81,7 @@ Type2 = NORMAL
BaseStats = 75,71,70,77,40,80 BaseStats = 75,71,70,77,40,80
Abilities = GLUTTONY,HUSTLE Abilities = GLUTTONY,HUSTLE
HiddenAbility = THICKFAT HiddenAbility = THICKFAT
TutorMoves = ATTRACT,BLIZZARD,BULKUP,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,EMBARGO,ENDEAVOR,FACADE,FRUSTRATION,GIGAIMPACT,GRASSKNOT,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICYWIND,IRONTAIL,KNOCKOFF,LASTRESORT,PROTECT,QUASH,RAINDANCE,REST,RETURN,ROAR,ROUND,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNARL,SNATCH,SNORE,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,SWORDSDANCE,TAUNT,THIEF,THROATCHOP,TORMENT,TOXIC,UPROAR,UTURN,VENOSHOCK,ZENHEADBUTT
Weight = 25.5 Weight = 25.5
Color = Black Color = Black
Pokedex = It forms a group of Rattata, which it assumes command of. Each group has its own territory, and disputes over food happen often. Pokedex = It forms a group of Rattata, which it assumes command of. Each group has its own territory, and disputes over food happen often.
@@ -93,6 +95,7 @@ BaseStats = 60,85,50,110,95,85
Abilities = SURGESURFER Abilities = SURGESURFER
HiddenAbility = SURGESURFER HiddenAbility = SURGESURFER
Moves = 0,PSYCHIC,1,PSYCHIC,1,SPEEDSWAP,1,THUNDERSHOCK,1,TAILWHIP,1,QUICKATTACK,1,THUNDERBOLT Moves = 0,PSYCHIC,1,PSYCHIC,1,SPEEDSWAP,1,THUNDERSHOCK,1,TAILWHIP,1,QUICKATTACK,1,THUNDERBOLT
TutorMoves = ALLYSWITCH,ATTRACT,BRICKBREAK,CALMMIND,CHARGEBEAM,CONFIDE,COVET,DOUBLETEAM,ECHOEDVOICE,ELECTROWEB,FACADE,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,HELPINGHAND,HIDDENPOWER,HYPERBEAM,IRONTAIL,KNOCKOFF,LASERFOCUS,LIGHTSCREEN,MAGICCOAT,MAGICROOM,MAGNETRISE,PROTECT,PSYCHIC,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROUND,SAFEGUARD,SHOCKWAVE,SIGNALBEAM,SLEEPTALK,SNORE,SUBSTITUTE,SWAGGER,TELEKINESIS,THIEF,THUNDER,THUNDERBOLT,THUNDERPUNCH,THUNDERWAVE,TOXIC,VOLTSWITCH,WILDCHARGE
Height = 0.7 Height = 0.7
Weight = 21.0 Weight = 21.0
Color = Brown Color = Brown
@@ -106,6 +109,7 @@ BaseStats = 50,75,90,40,10,35
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SLUSHRUSH HiddenAbility = SLUSHRUSH
Moves = 1,SCRATCH,1,DEFENSECURL,3,BIDE,5,POWDERSNOW,7,ICEBALL,9,RAPIDSPIN,11,FURYCUTTER,14,METALCLAW,17,SWIFT,20,FURYSWIPES,23,IRONDEFENSE,26,SLASH,30,IRONHEAD,34,GYROBALL,38,SWORDSDANCE,42,HAIL,46,BLIZZARD Moves = 1,SCRATCH,1,DEFENSECURL,3,BIDE,5,POWDERSNOW,7,ICEBALL,9,RAPIDSPIN,11,FURYCUTTER,14,METALCLAW,17,SWIFT,20,FURYSWIPES,23,IRONDEFENSE,26,SLASH,30,IRONHEAD,34,GYROBALL,38,SWORDSDANCE,42,HAIL,46,BLIZZARD
TutorMoves = AERIALACE,AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,BRICKBREAK,BULLDOZE,CONFIDE,COVET,DOUBLETEAM,EARTHQUAKE,FACADE,FLING,FOCUSPUNCH,FROSTBREATH,FRUSTRATION,GYROBALL,HAIL,HIDDENPOWER,ICEPUNCH,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,KNOCKOFF,LEECHLIFE,POISONJAB,PROTECT,REST,RETURN,ROCKSLIDE,ROUND,SAFEGUARD,SHADOWCLAW,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,SWORDSDANCE,THIEF,THROATCHOP,TOXIC,WORKUP,XSCISSOR
EggMoves = AMNESIA,CHIPAWAY,COUNTER,CRUSHCLAW,CURSE,ENDURE,FLAIL,HONECLAWS,ICICLECRASH,ICICLESPEAR,METALCLAW,NIGHTSLASH EggMoves = AMNESIA,CHIPAWAY,COUNTER,CRUSHCLAW,CURSE,ENDURE,FLAIL,HONECLAWS,ICICLECRASH,ICICLESPEAR,METALCLAW,NIGHTSLASH
Height = 0.7 Height = 0.7
Weight = 40.0 Weight = 40.0
@@ -121,6 +125,7 @@ BaseStats = 75,100,120,65,25,65
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SLUSHRUSH HiddenAbility = SLUSHRUSH
Moves = 0,ICICLESPEAR,1,ICICLESPEAR,1,METALBURST,1,ICICLECRASH,1,SLASH,1,DEFENSECURL,1,ICEBALL,1,METALCLAW Moves = 0,ICICLESPEAR,1,ICICLESPEAR,1,METALBURST,1,ICICLECRASH,1,SLASH,1,DEFENSECURL,1,ICEBALL,1,METALCLAW
TutorMoves = AERIALACE,AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,BRICKBREAK,BULLDOZE,CONFIDE,COVET,DOUBLETEAM,DRILLRUN,EARTHQUAKE,FACADE,FLING,FOCUSBLAST,FOCUSPUNCH,FROSTBREATH,FRUSTRATION,GIGAIMPACT,GYROBALL,HAIL,HIDDENPOWER,HYPERBEAM,ICEPUNCH,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,KNOCKOFF,LEECHLIFE,POISONJAB,PROTECT,REST,RETURN,ROCKSLIDE,ROUND,SAFEGUARD,SHADOWCLAW,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,SWORDSDANCE,THIEF,THROATCHOP,TOXIC,WORKUP,XSCISSOR
Height = 1.2 Height = 1.2
Weight = 55.0 Weight = 55.0
Color = Blue Color = Blue
@@ -132,6 +137,7 @@ Type1 = ICE
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SNOWWARNING HiddenAbility = SNOWWARNING
Moves = 1,POWDERSNOW,4,TAILWHIP,7,ROAR,9,BABYDOLLEYES,10,ICESHARD,12,CONFUSERAY,15,ICYWIND,18,PAYBACK,20,MIST,23,FEINTATTACK,26,HEX,28,AURORABEAM,31,EXTRASENSORY,34,SAFEGUARD,36,ICEBEAM,39,IMPRISON,42,BLIZZARD,44,GRUDGE,47,CAPTIVATE,50,SHEERCOLD Moves = 1,POWDERSNOW,4,TAILWHIP,7,ROAR,9,BABYDOLLEYES,10,ICESHARD,12,CONFUSERAY,15,ICYWIND,18,PAYBACK,20,MIST,23,FEINTATTACK,26,HEX,28,AURORABEAM,31,EXTRASENSORY,34,SAFEGUARD,36,ICEBEAM,39,IMPRISON,42,BLIZZARD,44,GRUDGE,47,CAPTIVATE,50,SHEERCOLD
TutorMoves = AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,FACADE,FOULPLAY,FROSTBREATH,FRUSTRATION,HAIL,HEALBELL,HIDDENPOWER,ICEBEAM,ICYWIND,IRONTAIL,PAINSPLIT,PAYBACK,PROTECT,PSYCHUP,RAINDANCE,REST,RETURN,ROAR,ROLEPLAY,ROUND,SAFEGUARD,SLEEPTALK,SNORE,SPITE,SUBSTITUTE,SWAGGER,TOXIC,ZENHEADBUTT
EggMoves = AGILITY,CHARM,DISABLE,ENCORE,EXTRASENSORY,FLAIL,FREEZEDRY,HOWL,HYPNOSIS,MOONBLAST,POWERSWAP,SECRETPOWER,SPITE,TAILSLAP EggMoves = AGILITY,CHARM,DISABLE,ENCORE,EXTRASENSORY,FLAIL,FREEZEDRY,HOWL,HYPNOSIS,MOONBLAST,POWERSWAP,SECRETPOWER,SPITE,TAILSLAP
Color = White Color = White
Pokedex = In hot weather, this Pokémon makes ice shards with its six tails and sprays them around to cool itself off. Pokedex = In hot weather, this Pokémon makes ice shards with its six tails and sprays them around to cool itself off.
@@ -147,6 +153,7 @@ EffortPoints = 0,0,0,2,0,0
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SNOWWARNING HiddenAbility = SNOWWARNING
Moves = 0,DAZZLINGGLEAM,1,DAZZLINGGLEAM,1,IMPRISON,1,NASTYPLOT,1,ICEBEAM,1,ICESHARD,1,CONFUSERAY,1,SAFEGUARD Moves = 0,DAZZLINGGLEAM,1,DAZZLINGGLEAM,1,IMPRISON,1,NASTYPLOT,1,ICEBEAM,1,ICESHARD,1,CONFUSERAY,1,SAFEGUARD
TutorMoves = AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,CALMMIND,CONFIDE,COVET,DARKPULSE,DAZZLINGGLEAM,DOUBLETEAM,DREAMEATER,FACADE,FOULPLAY,FROSTBREATH,FRUSTRATION,GIGAIMPACT,HAIL,HEALBELL,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICYWIND,IRONTAIL,LASERFOCUS,PAINSPLIT,PAYBACK,PROTECT,PSYCHUP,PSYSHOCK,RAINDANCE,REST,RETURN,ROAR,ROLEPLAY,ROUND,SAFEGUARD,SLEEPTALK,SNORE,SPITE,SUBSTITUTE,SWAGGER,TOXIC,WONDERROOM,ZENHEADBUTT
Color = Blue Color = Blue
Pokedex = It lives on mountains perpetually covered in snow and is revered as a deity incarnate. It appears draped in a blizzard. Pokedex = It lives on mountains perpetually covered in snow and is revered as a deity incarnate. It appears draped in a blizzard.
WildItemUncommon = SNOWBALL WildItemUncommon = SNOWBALL
@@ -158,6 +165,7 @@ Type2 = STEEL
BaseStats = 10,55,30,90,35,45 BaseStats = 10,55,30,90,35,45
Abilities = SANDVEIL,TANGLINGHAIR Abilities = SANDVEIL,TANGLINGHAIR
Moves = 1,SANDATTACK,1,METALCLAW,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,28,EARTHPOWER,31,DIG,35,IRONHEAD,39,EARTHQUAKE,43,FISSURE Moves = 1,SANDATTACK,1,METALCLAW,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,28,EARTHPOWER,31,DIG,35,IRONHEAD,39,EARTHQUAKE,43,FISSURE
TutorMoves = AERIALACE,ATTRACT,BULLDOZE,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,FACADE,FLASHCANNON,FRUSTRATION,HIDDENPOWER,IRONDEFENSE,IRONHEAD,PROTECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHADOWCLAW,SLEEPTALK,SLUDGEBOMB,SNORE,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SWAGGER,THIEF,TOXIC,WORKUP
EggMoves = ANCIENTPOWER,BEATUP,ENDURE,FEINTATTACK,FINALGAMBIT,HEADBUTT,MEMENTO,METALSOUND,PURSUIT,REVERSAL,THRASH EggMoves = ANCIENTPOWER,BEATUP,ENDURE,FEINTATTACK,FINALGAMBIT,HEADBUTT,MEMENTO,METALSOUND,PURSUIT,REVERSAL,THRASH
Weight = 1.0 Weight = 1.0
Pokedex = Its head sports an altered form of whiskers made of metal. When in communication with its comrades, its whiskers wobble to and fro. Pokedex = Its head sports an altered form of whiskers made of metal. When in communication with its comrades, its whiskers wobble to and fro.
@@ -170,6 +178,7 @@ BaseStats = 35,100,60,110,50,70
EffortPoints = 0,2,0,0,0,0 EffortPoints = 0,2,0,0,0,0
Abilities = SANDVEIL,TANGLINGHAIR Abilities = SANDVEIL,TANGLINGHAIR
Moves = 0,SANDTOMB,1,SANDTOMB,1,ROTOTILLER,1,NIGHTSLASH,1,TRIATTACK,1,SANDATTACK,1,METALCLAW,1,GROWL,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,30,EARTHPOWER,35,DIG,41,IRONHEAD,47,EARTHQUAKE,53,FISSURE Moves = 0,SANDTOMB,1,SANDTOMB,1,ROTOTILLER,1,NIGHTSLASH,1,TRIATTACK,1,SANDATTACK,1,METALCLAW,1,GROWL,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,30,EARTHPOWER,35,DIG,41,IRONHEAD,47,EARTHQUAKE,53,FISSURE
TutorMoves = AERIALACE,ATTRACT,BULLDOZE,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,FACADE,FLASHCANNON,FRUSTRATION,GIGAIMPACT,HIDDENPOWER,HYPERBEAM,IRONDEFENSE,IRONHEAD,PROTECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHADOWCLAW,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,THIEF,TOXIC,WORKUP
Weight = 66.6 Weight = 66.6
Pokedex = Its shining gold hair provides it with protection. It's reputed that keeping any of its fallen hairs will bring bad luck. Pokedex = Its shining gold hair provides it with protection. It's reputed that keeping any of its fallen hairs will bring bad luck.
#------------------------------- #-------------------------------
@@ -179,6 +188,7 @@ Type1 = DARK
BaseStats = 40,35,35,90,50,40 BaseStats = 40,35,35,90,50,40
HiddenAbility = RATTLED HiddenAbility = RATTLED
Moves = 1,SCRATCH,1,GROWL,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,30,PAYDAY,33,SLASH,38,NASTYPLOT,41,ASSURANCE,46,CAPTIVATE,49,NIGHTSLASH,50,FEINT,55,DARKPULSE Moves = 1,SCRATCH,1,GROWL,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,30,PAYDAY,33,SLASH,38,NASTYPLOT,41,ASSURANCE,46,CAPTIVATE,49,NIGHTSLASH,50,FEINT,55,DARKPULSE
TutorMoves = AERIALACE,ATTRACT,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,DREAMEATER,ECHOEDVOICE,EMBARGO,FACADE,FOULPLAY,FRUSTRATION,GUNKSHOT,HIDDENPOWER,HYPERVOICE,ICYWIND,IRONTAIL,KNOCKOFF,LASTRESORT,PAYBACK,PROTECT,PSYCHUP,QUASH,RAINDANCE,REST,RETURN,ROUND,SEEDBOMB,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SNATCH,SNORE,SPITE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,TORMENT,TOXIC,UPROAR,UTURN,WATERPULSE,WORKUP
EggMoves = AMNESIA,ASSIST,CHARM,COVET,FLAIL,FLATTER,FOULPLAY,HYPNOSIS,PARTINGSHOT,PUNISHMENT,SNATCH,SPITE EggMoves = AMNESIA,ASSIST,CHARM,COVET,FLAIL,FLATTER,FOULPLAY,HYPNOSIS,PARTINGSHOT,PUNISHMENT,SNATCH,SPITE
Color = Blue Color = Blue
Pokedex = It's impulsive, selfish, and fickle. It's very popular with some Trainers who like giving it the attention it needs. Pokedex = It's impulsive, selfish, and fickle. It's very popular with some Trainers who like giving it the attention it needs.
@@ -191,6 +201,7 @@ BaseStats = 65,60,60,115,75,65
Abilities = FURCOAT,TECHNICIAN Abilities = FURCOAT,TECHNICIAN
HiddenAbility = RATTLED HiddenAbility = RATTLED
Moves = 0,SWIFT,1,SWIFT,1,QUASH,1,PLAYROUGH,1,SWITCHEROO,1,SCRATCH,1,GROWL,1,BITE,1,FAKEOUT,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,32,POWERGEM,37,SLASH,44,NASTYPLOT,49,ASSURANCE,56,CAPTIVATE,61,NIGHTSLASH,65,FEINT,69,DARKPULSE Moves = 0,SWIFT,1,SWIFT,1,QUASH,1,PLAYROUGH,1,SWITCHEROO,1,SCRATCH,1,GROWL,1,BITE,1,FAKEOUT,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,32,POWERGEM,37,SLASH,44,NASTYPLOT,49,ASSURANCE,56,CAPTIVATE,61,NIGHTSLASH,65,FEINT,69,DARKPULSE
TutorMoves = AERIALACE,ATTRACT,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,DREAMEATER,ECHOEDVOICE,EMBARGO,FACADE,FOULPLAY,FRUSTRATION,GIGAIMPACT,GUNKSHOT,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICYWIND,IRONTAIL,KNOCKOFF,LASTRESORT,PAYBACK,PROTECT,PSYCHUP,QUASH,RAINDANCE,REST,RETURN,ROAR,ROUND,SEEDBOMB,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SNARL,SNATCH,SNORE,SPITE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,TORMENT,TOXIC,UPROAR,UTURN,WATERPULSE,WORKUP
Height = 1.1 Height = 1.1
Weight = 33.0 Weight = 33.0
Color = Blue Color = Blue
@@ -212,6 +223,7 @@ Type2 = ELECTRIC
Abilities = MAGNETPULL,STURDY Abilities = MAGNETPULL,STURDY
HiddenAbility = GALVANIZE HiddenAbility = GALVANIZE
Moves = 1,TACKLE,1,DEFENSECURL,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,28,STEALTHROCK,30,ROCKBLAST,34,DISCHARGE,36,EXPLOSION,40,DOUBLEEDGE,42,STONEEDGE Moves = 1,TACKLE,1,DEFENSECURL,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,28,STEALTHROCK,30,ROCKBLAST,34,DISCHARGE,36,EXPLOSION,40,DOUBLEEDGE,42,STONEEDGE
TutorMoves = ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CHARGEBEAM,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ELECTROWEB,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSPUNCH,FRUSTRATION,GYROBALL,HIDDENPOWER,IRONDEFENSE,MAGNETRISE,NATUREPOWER,PROTECT,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SLEEPTALK,SMACKDOWN,SNORE,STEALTHROCK,STONEEDGE,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,VOLTSWITCH
EggMoves = AUTOTOMIZE,BLOCK,COUNTER,CURSE,ENDURE,FLAIL,MAGNETRISE,ROCKCLIMB,SCREECH,WIDEGUARD EggMoves = AUTOTOMIZE,BLOCK,COUNTER,CURSE,ENDURE,FLAIL,MAGNETRISE,ROCKCLIMB,SCREECH,WIDEGUARD
Weight = 20.3 Weight = 20.3
Color = Gray Color = Gray
@@ -225,6 +237,7 @@ Type2 = ELECTRIC
Abilities = MAGNETPULL,STURDY Abilities = MAGNETPULL,STURDY
HiddenAbility = GALVANIZE HiddenAbility = GALVANIZE
Moves = 1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE Moves = 1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE
TutorMoves = ALLYSWITCH,ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CHARGEBEAM,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ELECTROWEB,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSPUNCH,FRUSTRATION,GYROBALL,HIDDENPOWER,IRONDEFENSE,MAGNETRISE,NATUREPOWER,PROTECT,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHOCKWAVE,SLEEPTALK,SMACKDOWN,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,VOLTSWITCH
Weight = 110.0 Weight = 110.0
Color = Gray Color = Gray
Pokedex = They eat rocks and often get into a scrap over them. The shock of Graveler smashing together causes a flash of light and a booming noise. Pokedex = They eat rocks and often get into a scrap over them. The shock of Graveler smashing together causes a flash of light and a booming noise.
@@ -237,6 +250,7 @@ Type2 = ELECTRIC
Abilities = MAGNETPULL,STURDY Abilities = MAGNETPULL,STURDY
HiddenAbility = GALVANIZE HiddenAbility = GALVANIZE
Moves = 1,HEAVYSLAM,1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,STEAMROLLER,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE,60,HEAVYSLAM Moves = 1,HEAVYSLAM,1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,STEAMROLLER,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE,60,HEAVYSLAM
TutorMoves = ALLYSWITCH,ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CHARGEBEAM,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ELECTROWEB,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GYROBALL,HIDDENPOWER,HYPERBEAM,IRONDEFENSE,IRONHEAD,MAGNETRISE,NATUREPOWER,PROTECT,REST,RETURN,ROAR,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHOCKWAVE,SLEEPTALK,SMACKDOWN,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,VOLTSWITCH,WILDCHARGE
Height = 1.7 Height = 1.7
Weight = 316.0 Weight = 316.0
Color = Gray Color = Gray
@@ -261,6 +275,7 @@ Type2 = DARK
Abilities = POISONTOUCH,GLUTTONY Abilities = POISONTOUCH,GLUTTONY
HiddenAbility = POWEROFALCHEMY HiddenAbility = POWEROFALCHEMY
Moves = 1,POUND,1,POISONGAS,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,43,ACIDARMOR,46,BELCH,48,MEMENTO Moves = 1,POUND,1,POISONGAS,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,43,ACIDARMOR,46,BELCH,48,MEMENTO
TutorMoves = ATTRACT,BRUTALSWING,CONFIDE,DOUBLETEAM,EMBARGO,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FRUSTRATION,GASTROACID,GIGADRAIN,GUNKSHOT,HIDDENPOWER,ICEPUNCH,INFESTATION,KNOCKOFF,PAINSPLIT,PAYBACK,POISONJAB,PROTECT,QUASH,RAINDANCE,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SHADOWBALL,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNARL,SNORE,SPITE,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THUNDERPUNCH,TORMENT,TOXIC,VENOSHOCK
EggMoves = ASSURANCE,CLEARSMOG,CURSE,IMPRISON,MEANLOOK,POWERUPPUNCH,PURSUIT,SCARYFACE,SHADOWSNEAK,SPITE,SPITUP,STOCKPILE,SWALLOW EggMoves = ASSURANCE,CLEARSMOG,CURSE,IMPRISON,MEANLOOK,POWERUPPUNCH,PURSUIT,SCARYFACE,SHADOWSNEAK,SPITE,SPITUP,STOCKPILE,SWALLOW
Height = 0.7 Height = 0.7
Weight = 42.0 Weight = 42.0
@@ -274,6 +289,7 @@ Type2 = DARK
Abilities = POISONTOUCH,GLUTTONY Abilities = POISONTOUCH,GLUTTONY
HiddenAbility = POWEROFALCHEMY HiddenAbility = POWEROFALCHEMY
Moves = 0,VENOMDRENCH,1,VENOMDRENCH,1,POUND,1,POISONGAS,1,HARDEN,1,BITE,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,46,ACIDARMOR,52,BELCH,57,MEMENTO Moves = 0,VENOMDRENCH,1,VENOMDRENCH,1,POUND,1,POISONGAS,1,HARDEN,1,BITE,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,46,ACIDARMOR,52,BELCH,57,MEMENTO
TutorMoves = ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,CONFIDE,DARKPULSE,DOUBLETEAM,EMBARGO,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GASTROACID,GIGADRAIN,GIGAIMPACT,GUNKSHOT,HIDDENPOWER,HYPERBEAM,ICEPUNCH,INFESTATION,KNOCKOFF,PAINSPLIT,PAYBACK,POISONJAB,PROTECT,QUASH,RAINDANCE,RECYCLE,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SHADOWBALL,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNARL,SNORE,SPITE,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THUNDERPUNCH,TORMENT,TOXIC,VENOSHOCK
Height = 1.0 Height = 1.0
Weight = 52.0 Weight = 52.0
Color = Green Color = Green
@@ -295,6 +311,7 @@ Type2 = DRAGON
BaseStats = 95,105,85,45,125,75 BaseStats = 95,105,85,45,125,75
Abilities = FRISK Abilities = FRISK
Moves = 0,DRAGONHAMMER,1,DRAGONHAMMER,1,SEEDBOMB,1,BARRAGE,1,HYPNOSIS,1,CONFUSION,17,PSYSHOCK,27,EGGBOMB,37,WOODHAMMER,47,LEAFSTORM Moves = 0,DRAGONHAMMER,1,DRAGONHAMMER,1,SEEDBOMB,1,BARRAGE,1,HYPNOSIS,1,CONFUSION,17,PSYSHOCK,27,EGGBOMB,37,WOODHAMMER,47,LEAFSTORM
TutorMoves = ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CONFIDE,DOUBLETEAM,DRACOMETEOR,DRAGONPULSE,DRAGONTAIL,DREAMEATER,EARTHQUAKE,ENERGYBALL,EXPLOSION,FACADE,FLAMETHROWER,FRUSTRATION,GIGADRAIN,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,INFESTATION,IRONHEAD,IRONTAIL,KNOCKOFF,LIGHTSCREEN,LOWKICK,NATUREPOWER,OUTRAGE,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,REFLECT,REST,RETURN,ROUND,SEEDBOMB,SKILLSWAP,SLEEPTALK,SLUDGEBOMB,SNORE,SOLARBEAM,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,SWORDSDANCE,SYNTHESIS,TELEKINESIS,THIEF,TOXIC,TRICKROOM,WORRYSEED,ZENHEADBUTT
Height = 10.9 Height = 10.9
Weight = 415.6 Weight = 415.6
Pokedex = As it grew taller and taller, it outgrew its reliance on psychic powers, while within it awakened the power of the sleeping dragon. Pokedex = As it grew taller and taller, it outgrew its reliance on psychic powers, while within it awakened the power of the sleeping dragon.
@@ -309,6 +326,7 @@ Type2 = GHOST
Abilities = CURSEDBODY,LIGHTNINGROD Abilities = CURSEDBODY,LIGHTNINGROD
HiddenAbility = ROCKHEAD HiddenAbility = ROCKHEAD
Moves = 1,GROWL,1,TAILWHIP,1,BONECLUB,1,FLAMEWHEEL,3,TAILWHIP,7,BONECLUB,11,FLAMEWHEEL,13,LEER,17,HEX,21,BONEMERANG,23,WILLOWISP,27,SHADOWBONE,33,THRASH,37,FLING,43,STOMPINGTANTRUM,49,ENDEAVOR,53,FLAREBLITZ,59,RETALIATE,65,BONERUSH Moves = 1,GROWL,1,TAILWHIP,1,BONECLUB,1,FLAMEWHEEL,3,TAILWHIP,7,BONECLUB,11,FLAMEWHEEL,13,LEER,17,HEX,21,BONEMERANG,23,WILLOWISP,27,SHADOWBONE,33,THRASH,37,FLING,43,STOMPINGTANTRUM,49,ENDEAVOR,53,FLAREBLITZ,59,RETALIATE,65,BONERUSH
TutorMoves = AERIALACE,ALLYSWITCH,ATTRACT,BLIZZARD,BRICKBREAK,BRUTALSWING,BULLDOZE,CONFIDE,DARKPULSE,DOUBLETEAM,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENDEAVOR,FACADE,FALSESWIPE,FIREBLAST,FIREPUNCH,FLAMECHARGE,FLAMETHROWER,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,HEATWAVE,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,KNOCKOFF,LASERFOCUS,LOWKICK,OUTRAGE,PAINSPLIT,PROTECT,RAINDANCE,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHADOWBALL,SLEEPTALK,SMACKDOWN,SNORE,SPITE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,SWORDSDANCE,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,UPROAR,WILLOWISP
Weight = 34.0 Weight = 34.0
Color = Purple Color = Purple
Pokedex = Its custom is to mourn its lost companions. Mounds of dirt by the side of the road mark the graves of the Marowak Pokedex = Its custom is to mourn its lost companions. Mounds of dirt by the side of the road mark the graves of the Marowak
@@ -750,6 +768,7 @@ FormName = Attack Forme
BaseStats = 50,180,20,150,180,20 BaseStats = 50,180,20,150,180,20
EffortPoints = 0,2,0,0,1,0 EffortPoints = 0,2,0,0,1,0
Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,TAUNT,25,PURSUIT,31,PSYCHIC,37,SUPERPOWER,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,COSMICPOWER,61,ZAPCANNON,67,PSYCHOBOOST,73,HYPERBEAM Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,TAUNT,25,PURSUIT,31,PSYCHIC,37,SUPERPOWER,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,COSMICPOWER,61,ZAPCANNON,67,PSYCHOBOOST,73,HYPERBEAM
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,BRUTALSWING,CALMMIND,CHARGEBEAM,CONFIDE,DARKPULSE,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FLASHCANNON,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,ICEBEAM,LASERFOCUS,LIGHTSCREEN,LOWKICK,LOWSWEEP,MAGICCOAT,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SHOCKWAVE,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,TAUNT,TELEKINESIS,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WATERPULSE,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = 4 BattlerPlayerX = 4
BattlerEnemyX = 1 BattlerEnemyX = 1
BattlerEnemyY = 5 BattlerEnemyY = 5
@@ -760,6 +779,7 @@ FormName = Defense Forme
BaseStats = 50,70,160,90,70,160 BaseStats = 50,70,160,90,70,160
EffortPoints = 0,0,2,0,0,1 EffortPoints = 0,0,2,0,0,1
Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,KNOCKOFF,25,SPIKES,31,PSYCHIC,37,SNATCH,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,IRONDEFENSE,55,AMNESIA,61,RECOVER,67,PSYCHOBOOST,73,COUNTER,73,MIRRORCOAT Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,KNOCKOFF,25,SPIKES,31,PSYCHIC,37,SNATCH,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,IRONDEFENSE,55,AMNESIA,61,RECOVER,67,PSYCHOBOOST,73,COUNTER,73,MIRRORCOAT
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,BRUTALSWING,CALMMIND,CHARGEBEAM,CONFIDE,DARKPULSE,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FLASHCANNON,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,ICEBEAM,IRONDEFENSE,KNOCKOFF,LASERFOCUS,LIGHTSCREEN,LOWKICK,LOWSWEEP,MAGICCOAT,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SHOCKWAVE,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,TELEKINESIS,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WATERPULSE,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = 3 BattlerPlayerX = 3
BattlerEnemyX = -2 BattlerEnemyX = -2
BattlerEnemyY = 6 BattlerEnemyY = 6
@@ -770,6 +790,7 @@ FormName = Speed Forme
BaseStats = 50,95,90,180,95,90 BaseStats = 50,95,90,180,95,90
EffortPoints = 0,0,0,3,0,0 EffortPoints = 0,0,0,3,0,0
Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,DOUBLETEAM,19,KNOCKOFF,25,PURSUIT,31,PSYCHIC,37,SWIFT,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,AGILITY,61,RECOVER,67,PSYCHOBOOST,73,EXTREMESPEED Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,DOUBLETEAM,19,KNOCKOFF,25,PURSUIT,31,PSYCHIC,37,SWIFT,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,AGILITY,61,RECOVER,67,PSYCHOBOOST,73,EXTREMESPEED
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,BRUTALSWING,CALMMIND,CHARGEBEAM,CONFIDE,DARKPULSE,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FIREPUNCH,FLASHCANNON,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICEPUNCH,KNOCKOFF,LASERFOCUS,LIGHTSCREEN,LOWKICK,LOWSWEEP,MAGICCOAT,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SHOCKWAVE,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,TELEKINESIS,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERPUNCH,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WATERPULSE,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = -4 BattlerPlayerX = -4
BattlerEnemyX = -4 BattlerEnemyX = -4
BattlerEnemyY = 4 BattlerEnemyY = 4
@@ -790,6 +811,7 @@ Type2 = GROUND
BaseStats = 60,79,105,36,59,85 BaseStats = 60,79,105,36,59,85
EffortPoints = 0,0,2,0,0,0 EffortPoints = 0,0,2,0,0,0
Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,ROCKBLAST,29,HARDEN,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,FISSURE,50,BUGBUZZ Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,ROCKBLAST,29,HARDEN,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,FISSURE,50,BUGBUZZ
TutorMoves = ALLYSWITCH,ATTRACT,BUGBITE,BULLDOZE,CONFIDE,DOUBLETEAM,DREAMEATER,EARTHPOWER,EARTHQUAKE,ELECTROWEB,ENDEAVOR,FACADE,FRUSTRATION,GIGAIMPACT,HIDDENPOWER,HYPERBEAM,INFESTATION,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROCKTOMB,ROUND,SAFEGUARD,SANDSTORM,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SWAGGER,TELEKINESIS,THIEF,TOXIC,UPROAR,VENOSHOCK
Color = Brown Color = Brown
#------------------------------- #-------------------------------
[WORMADAM,2] [WORMADAM,2]
@@ -799,6 +821,7 @@ Type2 = STEEL
BaseStats = 60,69,95,36,69,95 BaseStats = 60,69,95,36,69,95
EffortPoints = 0,0,1,0,0,1 EffortPoints = 0,0,1,0,0,1
Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,METALBURST,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,MIRRORSHOT,29,METALSOUND,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,IRONHEAD,50,BUGBUZZ Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,METALBURST,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,MIRRORSHOT,29,METALSOUND,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,IRONHEAD,50,BUGBUZZ
TutorMoves = ALLYSWITCH,ATTRACT,BUGBITE,CONFIDE,DOUBLETEAM,DREAMEATER,ELECTROWEB,ENDEAVOR,FACADE,FLASHCANNON,FRUSTRATION,GIGAIMPACT,GUNKSHOT,GYROBALL,HIDDENPOWER,HYPERBEAM,INFESTATION,IRONDEFENSE,IRONHEAD,MAGNETRISE,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROUND,SAFEGUARD,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SWAGGER,TELEKINESIS,THIEF,TOXIC,UPROAR,VENOSHOCK
Color = Red Color = Red
#------------------------------- #-------------------------------
[CHERRIM,1] [CHERRIM,1]
@@ -918,6 +941,7 @@ FormName = Origin Forme
BaseStats = 150,120,100,90,120,100 BaseStats = 150,120,100,90,120,100
Abilities = LEVITATE Abilities = LEVITATE
HiddenAbility = LEVITATE HiddenAbility = LEVITATE
TutorMoves = AERIALACE,AQUATAIL,BRUTALSWING,BULLDOZE,CALMMIND,CHARGEBEAM,CONFIDE,CUT,DARKPULSE,DEFOG,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,DRAGONPULSE,DRAGONTAIL,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENERGYBALL,FACADE,FLY,FRUSTRATION,GIGAIMPACT,GRAVITY,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICYWIND,IRONHEAD,IRONTAIL,MAGICCOAT,OUTRAGE,PAYBACK,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROAR,ROCKSMASH,ROUND,SAFEGUARD,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SNORE,SPITE,STEELWING,STONEEDGE,STRENGTH,SUBSTITUTE,SUNNYDAY,SWAGGER,TAILWIND,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TOXIC,WILLOWISP
Height = 6.9 Height = 6.9
Weight = 650.0 Weight = 650.0
Shape = 2 Shape = 2
@@ -932,6 +956,7 @@ BaseStats = 100,103,75,127,120,75
EffortPoints = 0,0,0,3,0,0 EffortPoints = 0,0,0,3,0,0
Abilities = SERENEGRACE Abilities = SERENEGRACE
Moves = 1,GROWTH,10,MAGICALLEAF,19,LEECHSEED,28,QUICKATTACK,37,SWEETSCENT,46,NATURALGIFT,55,WORRYSEED,64,AIRSLASH,73,ENERGYBALL,82,SWEETKISS,91,LEAFSTORM,100,SEEDFLARE Moves = 1,GROWTH,10,MAGICALLEAF,19,LEECHSEED,28,QUICKATTACK,37,SWEETSCENT,46,NATURALGIFT,55,WORRYSEED,64,AIRSLASH,73,ENERGYBALL,82,SWEETKISS,91,LEAFSTORM,100,SEEDFLARE
TutorMoves = CONFIDE,COVET,DAZZLINGGLEAM,DOUBLETEAM,ENERGYBALL,FACADE,FRUSTRATION,GIGADRAIN,GIGAIMPACT,GRASSKNOT,HIDDENPOWER,HYPERBEAM,LASERFOCUS,LASTRESORT,NATUREPOWER,PROTECT,PSYCHIC,PSYCHUP,REST,RETURN,ROUND,SAFEGUARD,SEEDBOMB,SLEEPTALK,SNORE,SOLARBEAM,SUBSTITUTE,SUNNYDAY,SWAGGER,SWORDSDANCE,SYNTHESIS,TAILWIND,TOXIC,WORRYSEED,ZENHEADBUTT
Height = 0.4 Height = 0.4
Weight = 5.2 Weight = 5.2
BattlerEnemyY = 16 BattlerEnemyY = 16
@@ -1000,6 +1025,7 @@ Type1 = ICE
[ARCEUS,16] [ARCEUS,16]
FormName = Dragon Type FormName = Dragon Type
Type1 = DRAGON Type1 = DRAGON
TutorMoves = AERIALACE,AQUATAIL,BLIZZARD,BRICKBREAK,BULLDOZE,CALMMIND,CHARGEBEAM,CONFIDE,CUT,DARKPULSE,DEFOG,DIVE,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,DRAGONPULSE,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENERGYBALL,FACADE,FIREBLAST,FLAMETHROWER,FLASHCANNON,FLY,FOCUSBLAST,FRUSTRATION,GIGADRAIN,GIGAIMPACT,GRASSKNOT,GRAVITY,HAIL,HEATWAVE,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICEBEAM,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,LASERFOCUS,LASTRESORT,LIGHTSCREEN,LIQUIDATION,MAGICCOAT,OUTRAGE,OVERHEAT,PAYBACK,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,QUASH,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROAR,ROCKSLIDE,ROCKSMASH,ROCKTOMB,ROUND,SAFEGUARD,SANDSTORM,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SIGNALBEAM,SLEEPTALK,SLUDGEBOMB,SNARL,SNORE,SOLARBEAM,STEALTHROCK,STONEEDGE,STRENGTH,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWORDSDANCE,TAILWIND,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TOXIC,TRICK,TRICKROOM,WATERFALL,WATERPULSE,WILLOWISP,WORKUP,XSCISSOR,ZENHEADBUTT
#------------------------------- #-------------------------------
[ARCEUS,17] [ARCEUS,17]
FormName = Dark Type FormName = Dark Type
@@ -1078,6 +1104,7 @@ BaseStats = 79,105,70,101,145,80
EffortPoints = 0,0,0,0,3,0 EffortPoints = 0,0,0,0,3,0
Abilities = VOLTABSORB Abilities = VOLTABSORB
HiddenAbility = VOLTABSORB HiddenAbility = VOLTABSORB
TutorMoves = ATTRACT,BRICKBREAK,BRUTALSWING,BULKUP,CHARGEBEAM,CONFIDE,DARKPULSE,DEFOG,DOUBLETEAM,ELECTROWEB,EMBARGO,FACADE,FLASHCANNON,FLING,FLY,FOCUSBLAST,FOULPLAY,FRUSTRATION,GIGAIMPACT,GRASSKNOT,HIDDENPOWER,HYPERBEAM,IRONTAIL,KNOCKOFF,PAYBACK,PROTECT,PSYCHIC,RAINDANCE,REST,RETURN,ROCKSMASH,ROLEPLAY,ROUND,SHOCKWAVE,SKYDROP,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SMACKDOWN,SNORE,STRENGTH,SUBSTITUTE,SUPERPOWER,SWAGGER,TAUNT,THIEF,THUNDER,THUNDERBOLT,THUNDERPUNCH,THUNDERWAVE,TORMENT,TOXIC,UPROAR,UTURN,VOLTSWITCH,WILDCHARGE
Height = 3.0 Height = 3.0
Shape = 6 Shape = 6
BattlerPlayerX = -3 BattlerPlayerX = -3
@@ -1142,6 +1169,7 @@ BattlerEnemyY = 4
#------------------------------- #-------------------------------
[KELDEO,1] [KELDEO,1]
FormName = Resolute Form FormName = Resolute Form
TutorMoves = AERIALACE,AQUATAIL,BOUNCE,CALMMIND,CONFIDE,COVET,CUT,DOUBLETEAM,ENDEAVOR,FACADE,FALSESWIPE,FOCUSBLAST,FRUSTRATION,GIGAIMPACT,HAIL,HELPINGHAND,HIDDENPOWER,HYPERBEAM,ICYWIND,LASTRESORT,LIQUIDATION,LOWKICK,POISONJAB,PROTECT,PSYCHUP,RAINDANCE,REFLECT,REST,RETURN,ROAR,ROCKSMASH,ROUND,SAFEGUARD,SCALD,SLEEPTALK,SNORE,STONEEDGE,STRENGTH,SUBSTITUTE,SUPERPOWER,SURF,SWAGGER,SWORDSDANCE,TAUNT,TOXIC,WATERPULSE,WORKUP,XSCISSOR
Pokedex = The power that lay hidden in its body now covers its horn, turning it into a sword that can slice through anything. Pokedex = The power that lay hidden in its body now covers its horn, turning it into a sword that can slice through anything.
BattlerPlayerX = 1 BattlerPlayerX = 1
BattlerEnemyX = 0 BattlerEnemyX = 0
@@ -1447,6 +1475,7 @@ BaseStats = 85,115,75,82,55,75
Abilities = KEENEYE,VITALSPIRIT Abilities = KEENEYE,VITALSPIRIT
HiddenAbility = NOGUARD HiddenAbility = NOGUARD
Moves = 0,COUNTER,1,COUNTER,1,REVERSAL,1,TAUNT,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE Moves = 0,COUNTER,1,COUNTER,1,REVERSAL,1,TAUNT,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE
TutorMoves = ATTRACT,BRICKBREAK,BULKUP,CONFIDE,COVET,DOUBLETEAM,DUALCHOP,EARTHPOWER,ECHOEDVOICE,ENDEAVOR,FACADE,FIREPUNCH,FOCUSPUNCH,FOULPLAY,FRUSTRATION,HIDDENPOWER,HYPERVOICE,IRONDEFENSE,IRONHEAD,IRONTAIL,LASERFOCUS,LASTRESORT,OUTRAGE,PROTECT,REST,RETURN,ROAR,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SLEEPTALK,SNARL,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SWAGGER,SWORDSDANCE,TAUNT,THROATCHOP,THUNDERPUNCH,TOXIC,UPROAR,ZENHEADBUTT
Height = 1.1 Height = 1.1
Color = Red Color = Red
Shape = 6 Shape = 6
@@ -1458,6 +1487,7 @@ BaseStats = 75,117,65,110,55,65
Abilities = TOUGHCLAWS Abilities = TOUGHCLAWS
HiddenAbility = TOUGHCLAWS HiddenAbility = TOUGHCLAWS
Moves = 0,THRASH,1,THRASH,1,ACCELEROCK,1,COUNTER,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE Moves = 0,THRASH,1,THRASH,1,ACCELEROCK,1,COUNTER,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE
TutorMoves = ATTRACT,BRICKBREAK,BULKUP,CONFIDE,COVET,DOUBLETEAM,DRILLRUN,EARTHPOWER,ECHOEDVOICE,ENDEAVOR,FACADE,FRUSTRATION,HIDDENPOWER,HYPERVOICE,IRONDEFENSE,IRONHEAD,IRONTAIL,LASTRESORT,OUTRAGE,PROTECT,REST,RETURN,ROAR,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SLEEPTALK,SNARL,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SWAGGER,SWORDSDANCE,TAUNT,TOXIC,ZENHEADBUTT
Pokedex = Bathed in the setting sun of evening, Lycanroc has undergone a special kind of evolution. An intense fighting spirit underlies its calmness. Pokedex = Bathed in the setting sun of evening, Lycanroc has undergone a special kind of evolution. An intense fighting spirit underlies its calmness.
#------------------------------- #-------------------------------
[WISHIWASHI,1] [WISHIWASHI,1]
@@ -1531,6 +1561,7 @@ Type1 = ICE
[SILVALLY,16] [SILVALLY,16]
FormName = Type: Dragon FormName = Type: Dragon
Type1 = DRAGON Type1 = DRAGON
TutorMoves = AERIALACE,CONFIDE,DEFOG,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,EXPLOSION,FACADE,FLAMECHARGE,FLAMETHROWER,FLASHCANNON,FRUSTRATION,GIGAIMPACT,GRASSPLEDGE,HAIL,HEATWAVE,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICEBEAM,ICYWIND,IRONDEFENSE,IRONHEAD,LASERFOCUS,LASTRESORT,MAGICCOAT,OUTRAGE,PAYBACK,PROTECT,RAINDANCE,REST,RETURN,ROAR,ROCKSLIDE,ROUND,SANDSTORM,SHADOWBALL,SHADOWCLAW,SIGNALBEAM,SLEEPTALK,SNARL,SNORE,STEELWING,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWORDSDANCE,TAILWIND,THUNDERBOLT,THUNDERWAVE,TOXIC,UTURN,WORKUP,XSCISSOR,ZENHEADBUTT
#------------------------------- #-------------------------------
[SILVALLY,17] [SILVALLY,17]
FormName = Type: Dark FormName = Type: Dark
-553
View File
File diff suppressed because one or more lines are too long
+803 -696
View File
File diff suppressed because it is too large Load Diff
+31
View File
@@ -66,6 +66,7 @@ Type1 = DARK
Type2 = NORMAL Type2 = NORMAL
Abilities = GLUTTONY,HUSTLE Abilities = GLUTTONY,HUSTLE
HiddenAbility = THICKFAT HiddenAbility = THICKFAT
TutorMoves = ATTRACT,BLIZZARD,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,EMBARGO,ENDEAVOR,FACADE,FRUSTRATION,GRASSKNOT,HIDDENPOWER,ICEBEAM,ICYWIND,IRONTAIL,LASTRESORT,PROTECT,QUASH,RAINDANCE,REST,RETURN,ROUND,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SNARL,SNATCH,SNORE,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,TAUNT,THIEF,TORMENT,TOXIC,UPROAR,UTURN,ZENHEADBUTT
EggMoves = COUNTER,FINALGAMBIT,FURYSWIPES,MEFIRST,REVENGE,REVERSAL,SNATCH,STOCKPILE,SWALLOW,SWITCHEROO,UPROAR EggMoves = COUNTER,FINALGAMBIT,FURYSWIPES,MEFIRST,REVENGE,REVERSAL,SNATCH,STOCKPILE,SWALLOW,SWITCHEROO,UPROAR
Weight = 3.8 Weight = 3.8
Color = Black Color = Black
@@ -80,6 +81,7 @@ Type2 = NORMAL
BaseStats = 75,71,70,77,40,80 BaseStats = 75,71,70,77,40,80
Abilities = GLUTTONY,HUSTLE Abilities = GLUTTONY,HUSTLE
HiddenAbility = THICKFAT HiddenAbility = THICKFAT
TutorMoves = ATTRACT,BLIZZARD,BULKUP,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,EMBARGO,ENDEAVOR,FACADE,FRUSTRATION,GIGAIMPACT,GRASSKNOT,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICYWIND,IRONTAIL,KNOCKOFF,LASTRESORT,PROTECT,QUASH,RAINDANCE,REST,RETURN,ROAR,ROUND,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNARL,SNATCH,SNORE,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,SWORDSDANCE,TAUNT,THIEF,THROATCHOP,TORMENT,TOXIC,UPROAR,UTURN,VENOSHOCK,ZENHEADBUTT
Weight = 25.5 Weight = 25.5
Color = Black Color = Black
Pokedex = It forms a group of Rattata, which it assumes command of. Each group has its own territory, and disputes over food happen often. Pokedex = It forms a group of Rattata, which it assumes command of. Each group has its own territory, and disputes over food happen often.
@@ -93,6 +95,7 @@ BaseStats = 60,85,50,110,95,85
Abilities = SURGESURFER Abilities = SURGESURFER
HiddenAbility = SURGESURFER HiddenAbility = SURGESURFER
Moves = 0,PSYCHIC,1,PSYCHIC,1,SPEEDSWAP,1,THUNDERSHOCK,1,TAILWHIP,1,QUICKATTACK,1,THUNDERBOLT Moves = 0,PSYCHIC,1,PSYCHIC,1,SPEEDSWAP,1,THUNDERSHOCK,1,TAILWHIP,1,QUICKATTACK,1,THUNDERBOLT
TutorMoves = ALLYSWITCH,ATTRACT,BRICKBREAK,CALMMIND,CHARGEBEAM,CONFIDE,COVET,DOUBLETEAM,ECHOEDVOICE,ELECTROWEB,FACADE,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,HELPINGHAND,HIDDENPOWER,HYPERBEAM,IRONTAIL,KNOCKOFF,LASERFOCUS,LIGHTSCREEN,MAGICCOAT,MAGICROOM,MAGNETRISE,PROTECT,PSYCHIC,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROUND,SAFEGUARD,SHOCKWAVE,SIGNALBEAM,SLEEPTALK,SNORE,SUBSTITUTE,SWAGGER,TELEKINESIS,THIEF,THUNDER,THUNDERBOLT,THUNDERPUNCH,THUNDERWAVE,TOXIC,VOLTSWITCH,WILDCHARGE
Height = 0.7 Height = 0.7
Weight = 21.0 Weight = 21.0
Color = Brown Color = Brown
@@ -106,6 +109,7 @@ BaseStats = 50,75,90,40,10,35
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SLUSHRUSH HiddenAbility = SLUSHRUSH
Moves = 1,SCRATCH,1,DEFENSECURL,3,BIDE,5,POWDERSNOW,7,ICEBALL,9,RAPIDSPIN,11,FURYCUTTER,14,METALCLAW,17,SWIFT,20,FURYSWIPES,23,IRONDEFENSE,26,SLASH,30,IRONHEAD,34,GYROBALL,38,SWORDSDANCE,42,HAIL,46,BLIZZARD Moves = 1,SCRATCH,1,DEFENSECURL,3,BIDE,5,POWDERSNOW,7,ICEBALL,9,RAPIDSPIN,11,FURYCUTTER,14,METALCLAW,17,SWIFT,20,FURYSWIPES,23,IRONDEFENSE,26,SLASH,30,IRONHEAD,34,GYROBALL,38,SWORDSDANCE,42,HAIL,46,BLIZZARD
TutorMoves = AERIALACE,AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,BRICKBREAK,BULLDOZE,CONFIDE,COVET,DOUBLETEAM,EARTHQUAKE,FACADE,FLING,FOCUSPUNCH,FROSTBREATH,FRUSTRATION,GYROBALL,HAIL,HIDDENPOWER,ICEPUNCH,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,KNOCKOFF,LEECHLIFE,POISONJAB,PROTECT,REST,RETURN,ROCKSLIDE,ROUND,SAFEGUARD,SHADOWCLAW,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,SWORDSDANCE,THIEF,THROATCHOP,TOXIC,WORKUP,XSCISSOR
EggMoves = AMNESIA,CHIPAWAY,COUNTER,CRUSHCLAW,CURSE,ENDURE,FLAIL,HONECLAWS,ICICLECRASH,ICICLESPEAR,METALCLAW,NIGHTSLASH EggMoves = AMNESIA,CHIPAWAY,COUNTER,CRUSHCLAW,CURSE,ENDURE,FLAIL,HONECLAWS,ICICLECRASH,ICICLESPEAR,METALCLAW,NIGHTSLASH
Height = 0.7 Height = 0.7
Weight = 40.0 Weight = 40.0
@@ -121,6 +125,7 @@ BaseStats = 75,100,120,65,25,65
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SLUSHRUSH HiddenAbility = SLUSHRUSH
Moves = 0,ICICLESPEAR,1,ICICLESPEAR,1,METALBURST,1,ICICLECRASH,1,SLASH,1,DEFENSECURL,1,ICEBALL,1,METALCLAW Moves = 0,ICICLESPEAR,1,ICICLESPEAR,1,METALBURST,1,ICICLECRASH,1,SLASH,1,DEFENSECURL,1,ICEBALL,1,METALCLAW
TutorMoves = AERIALACE,AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,BRICKBREAK,BULLDOZE,CONFIDE,COVET,DOUBLETEAM,DRILLRUN,EARTHQUAKE,FACADE,FLING,FOCUSBLAST,FOCUSPUNCH,FROSTBREATH,FRUSTRATION,GIGAIMPACT,GYROBALL,HAIL,HIDDENPOWER,HYPERBEAM,ICEPUNCH,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,KNOCKOFF,LEECHLIFE,POISONJAB,PROTECT,REST,RETURN,ROCKSLIDE,ROUND,SAFEGUARD,SHADOWCLAW,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SUPERFANG,SWAGGER,SWORDSDANCE,THIEF,THROATCHOP,TOXIC,WORKUP,XSCISSOR
Height = 1.2 Height = 1.2
Weight = 55.0 Weight = 55.0
Color = Blue Color = Blue
@@ -132,6 +137,7 @@ Type1 = ICE
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SNOWWARNING HiddenAbility = SNOWWARNING
Moves = 1,POWDERSNOW,4,TAILWHIP,7,ROAR,9,BABYDOLLEYES,10,ICESHARD,12,CONFUSERAY,15,ICYWIND,18,PAYBACK,20,MIST,23,FEINTATTACK,26,HEX,28,AURORABEAM,31,EXTRASENSORY,34,SAFEGUARD,36,ICEBEAM,39,IMPRISON,42,BLIZZARD,44,GRUDGE,47,CAPTIVATE,50,SHEERCOLD Moves = 1,POWDERSNOW,4,TAILWHIP,7,ROAR,9,BABYDOLLEYES,10,ICESHARD,12,CONFUSERAY,15,ICYWIND,18,PAYBACK,20,MIST,23,FEINTATTACK,26,HEX,28,AURORABEAM,31,EXTRASENSORY,34,SAFEGUARD,36,ICEBEAM,39,IMPRISON,42,BLIZZARD,44,GRUDGE,47,CAPTIVATE,50,SHEERCOLD
TutorMoves = AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,FACADE,FOULPLAY,FROSTBREATH,FRUSTRATION,HAIL,HEALBELL,HIDDENPOWER,ICEBEAM,ICYWIND,IRONTAIL,PAINSPLIT,PAYBACK,PROTECT,PSYCHUP,RAINDANCE,REST,RETURN,ROAR,ROLEPLAY,ROUND,SAFEGUARD,SLEEPTALK,SNORE,SPITE,SUBSTITUTE,SWAGGER,TOXIC,ZENHEADBUTT
EggMoves = AGILITY,CHARM,DISABLE,ENCORE,EXTRASENSORY,FLAIL,FREEZEDRY,HOWL,HYPNOSIS,MOONBLAST,POWERSWAP,SECRETPOWER,SPITE,TAILSLAP EggMoves = AGILITY,CHARM,DISABLE,ENCORE,EXTRASENSORY,FLAIL,FREEZEDRY,HOWL,HYPNOSIS,MOONBLAST,POWERSWAP,SECRETPOWER,SPITE,TAILSLAP
Color = White Color = White
Pokedex = In hot weather, this Pokémon makes ice shards with its six tails and sprays them around to cool itself off. Pokedex = In hot weather, this Pokémon makes ice shards with its six tails and sprays them around to cool itself off.
@@ -147,6 +153,7 @@ EffortPoints = 0,0,0,2,0,0
Abilities = SNOWCLOAK Abilities = SNOWCLOAK
HiddenAbility = SNOWWARNING HiddenAbility = SNOWWARNING
Moves = 0,DAZZLINGGLEAM,1,DAZZLINGGLEAM,1,IMPRISON,1,NASTYPLOT,1,ICEBEAM,1,ICESHARD,1,CONFUSERAY,1,SAFEGUARD Moves = 0,DAZZLINGGLEAM,1,DAZZLINGGLEAM,1,IMPRISON,1,NASTYPLOT,1,ICEBEAM,1,ICESHARD,1,CONFUSERAY,1,SAFEGUARD
TutorMoves = AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,CALMMIND,CONFIDE,COVET,DARKPULSE,DAZZLINGGLEAM,DOUBLETEAM,DREAMEATER,FACADE,FOULPLAY,FROSTBREATH,FRUSTRATION,GIGAIMPACT,HAIL,HEALBELL,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICYWIND,IRONTAIL,LASERFOCUS,PAINSPLIT,PAYBACK,PROTECT,PSYCHUP,PSYSHOCK,RAINDANCE,REST,RETURN,ROAR,ROLEPLAY,ROUND,SAFEGUARD,SLEEPTALK,SNORE,SPITE,SUBSTITUTE,SWAGGER,TOXIC,WONDERROOM,ZENHEADBUTT
Color = Blue Color = Blue
Pokedex = It lives on mountains perpetually covered in snow and is revered as a deity incarnate. It appears draped in a blizzard. Pokedex = It lives on mountains perpetually covered in snow and is revered as a deity incarnate. It appears draped in a blizzard.
WildItemUncommon = SNOWBALL WildItemUncommon = SNOWBALL
@@ -158,6 +165,7 @@ Type2 = STEEL
BaseStats = 10,55,30,90,35,45 BaseStats = 10,55,30,90,35,45
Abilities = SANDVEIL,TANGLINGHAIR Abilities = SANDVEIL,TANGLINGHAIR
Moves = 1,SANDATTACK,1,METALCLAW,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,28,EARTHPOWER,31,DIG,35,IRONHEAD,39,EARTHQUAKE,43,FISSURE Moves = 1,SANDATTACK,1,METALCLAW,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,28,EARTHPOWER,31,DIG,35,IRONHEAD,39,EARTHQUAKE,43,FISSURE
TutorMoves = AERIALACE,ATTRACT,BULLDOZE,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,FACADE,FLASHCANNON,FRUSTRATION,HIDDENPOWER,IRONDEFENSE,IRONHEAD,PROTECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHADOWCLAW,SLEEPTALK,SLUDGEBOMB,SNORE,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SWAGGER,THIEF,TOXIC,WORKUP
EggMoves = ANCIENTPOWER,BEATUP,ENDURE,FEINTATTACK,FINALGAMBIT,HEADBUTT,MEMENTO,METALSOUND,PURSUIT,REVERSAL,THRASH EggMoves = ANCIENTPOWER,BEATUP,ENDURE,FEINTATTACK,FINALGAMBIT,HEADBUTT,MEMENTO,METALSOUND,PURSUIT,REVERSAL,THRASH
Weight = 1.0 Weight = 1.0
Pokedex = Its head sports an altered form of whiskers made of metal. When in communication with its comrades, its whiskers wobble to and fro. Pokedex = Its head sports an altered form of whiskers made of metal. When in communication with its comrades, its whiskers wobble to and fro.
@@ -170,6 +178,7 @@ BaseStats = 35,100,60,110,50,70
EffortPoints = 0,2,0,0,0,0 EffortPoints = 0,2,0,0,0,0
Abilities = SANDVEIL,TANGLINGHAIR Abilities = SANDVEIL,TANGLINGHAIR
Moves = 0,SANDTOMB,1,SANDTOMB,1,ROTOTILLER,1,NIGHTSLASH,1,TRIATTACK,1,SANDATTACK,1,METALCLAW,1,GROWL,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,30,EARTHPOWER,35,DIG,41,IRONHEAD,47,EARTHQUAKE,53,FISSURE Moves = 0,SANDTOMB,1,SANDTOMB,1,ROTOTILLER,1,NIGHTSLASH,1,TRIATTACK,1,SANDATTACK,1,METALCLAW,1,GROWL,4,GROWL,7,ASTONISH,10,MUDSLAP,14,MAGNITUDE,18,BULLDOZE,22,SUCKERPUNCH,25,MUDBOMB,30,EARTHPOWER,35,DIG,41,IRONHEAD,47,EARTHQUAKE,53,FISSURE
TutorMoves = AERIALACE,ATTRACT,BULLDOZE,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,FACADE,FLASHCANNON,FRUSTRATION,GIGAIMPACT,HIDDENPOWER,HYPERBEAM,IRONDEFENSE,IRONHEAD,PROTECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHADOWCLAW,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,THIEF,TOXIC,WORKUP
Weight = 66.6 Weight = 66.6
Pokedex = Its shining gold hair provides it with protection. It's reputed that keeping any of its fallen hairs will bring bad luck. Pokedex = Its shining gold hair provides it with protection. It's reputed that keeping any of its fallen hairs will bring bad luck.
#------------------------------- #-------------------------------
@@ -179,6 +188,7 @@ Type1 = DARK
BaseStats = 40,35,35,90,50,40 BaseStats = 40,35,35,90,50,40
HiddenAbility = RATTLED HiddenAbility = RATTLED
Moves = 1,SCRATCH,1,GROWL,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,30,PAYDAY,33,SLASH,38,NASTYPLOT,41,ASSURANCE,46,CAPTIVATE,49,NIGHTSLASH,50,FEINT,55,DARKPULSE Moves = 1,SCRATCH,1,GROWL,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,30,PAYDAY,33,SLASH,38,NASTYPLOT,41,ASSURANCE,46,CAPTIVATE,49,NIGHTSLASH,50,FEINT,55,DARKPULSE
TutorMoves = AERIALACE,ATTRACT,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,DREAMEATER,ECHOEDVOICE,EMBARGO,FACADE,FOULPLAY,FRUSTRATION,GUNKSHOT,HIDDENPOWER,HYPERVOICE,ICYWIND,IRONTAIL,KNOCKOFF,LASTRESORT,PAYBACK,PROTECT,PSYCHUP,QUASH,RAINDANCE,REST,RETURN,ROUND,SEEDBOMB,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SNATCH,SNORE,SPITE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,TORMENT,TOXIC,UPROAR,UTURN,WATERPULSE,WORKUP
EggMoves = AMNESIA,ASSIST,CHARM,COVET,FLAIL,FLATTER,FOULPLAY,HYPNOSIS,PARTINGSHOT,PUNISHMENT,SNATCH,SPITE EggMoves = AMNESIA,ASSIST,CHARM,COVET,FLAIL,FLATTER,FOULPLAY,HYPNOSIS,PARTINGSHOT,PUNISHMENT,SNATCH,SPITE
Color = Blue Color = Blue
Pokedex = It's impulsive, selfish, and fickle. It's very popular with some Trainers who like giving it the attention it needs. Pokedex = It's impulsive, selfish, and fickle. It's very popular with some Trainers who like giving it the attention it needs.
@@ -191,6 +201,7 @@ BaseStats = 65,60,60,115,75,65
Abilities = FURCOAT,TECHNICIAN Abilities = FURCOAT,TECHNICIAN
HiddenAbility = RATTLED HiddenAbility = RATTLED
Moves = 0,SWIFT,1,SWIFT,1,QUASH,1,PLAYROUGH,1,SWITCHEROO,1,SCRATCH,1,GROWL,1,BITE,1,FAKEOUT,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,32,POWERGEM,37,SLASH,44,NASTYPLOT,49,ASSURANCE,56,CAPTIVATE,61,NIGHTSLASH,65,FEINT,69,DARKPULSE Moves = 0,SWIFT,1,SWIFT,1,QUASH,1,PLAYROUGH,1,SWITCHEROO,1,SCRATCH,1,GROWL,1,BITE,1,FAKEOUT,6,BITE,9,FAKEOUT,14,FURYSWIPES,17,SCREECH,22,FEINTATTACK,25,TAUNT,32,POWERGEM,37,SLASH,44,NASTYPLOT,49,ASSURANCE,56,CAPTIVATE,61,NIGHTSLASH,65,FEINT,69,DARKPULSE
TutorMoves = AERIALACE,ATTRACT,CONFIDE,COVET,DARKPULSE,DOUBLETEAM,DREAMEATER,ECHOEDVOICE,EMBARGO,FACADE,FOULPLAY,FRUSTRATION,GIGAIMPACT,GUNKSHOT,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICYWIND,IRONTAIL,KNOCKOFF,LASTRESORT,PAYBACK,PROTECT,PSYCHUP,QUASH,RAINDANCE,REST,RETURN,ROAR,ROUND,SEEDBOMB,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SNARL,SNATCH,SNORE,SPITE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,TORMENT,TOXIC,UPROAR,UTURN,WATERPULSE,WORKUP
Height = 1.1 Height = 1.1
Weight = 33.0 Weight = 33.0
Color = Blue Color = Blue
@@ -212,6 +223,7 @@ Type2 = ELECTRIC
Abilities = MAGNETPULL,STURDY Abilities = MAGNETPULL,STURDY
HiddenAbility = GALVANIZE HiddenAbility = GALVANIZE
Moves = 1,TACKLE,1,DEFENSECURL,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,28,STEALTHROCK,30,ROCKBLAST,34,DISCHARGE,36,EXPLOSION,40,DOUBLEEDGE,42,STONEEDGE Moves = 1,TACKLE,1,DEFENSECURL,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,28,STEALTHROCK,30,ROCKBLAST,34,DISCHARGE,36,EXPLOSION,40,DOUBLEEDGE,42,STONEEDGE
TutorMoves = ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CHARGEBEAM,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ELECTROWEB,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSPUNCH,FRUSTRATION,GYROBALL,HIDDENPOWER,IRONDEFENSE,MAGNETRISE,NATUREPOWER,PROTECT,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SLEEPTALK,SMACKDOWN,SNORE,STEALTHROCK,STONEEDGE,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,VOLTSWITCH
EggMoves = AUTOTOMIZE,BLOCK,COUNTER,CURSE,ENDURE,FLAIL,MAGNETRISE,ROCKCLIMB,SCREECH,WIDEGUARD EggMoves = AUTOTOMIZE,BLOCK,COUNTER,CURSE,ENDURE,FLAIL,MAGNETRISE,ROCKCLIMB,SCREECH,WIDEGUARD
Weight = 20.3 Weight = 20.3
Color = Gray Color = Gray
@@ -225,6 +237,7 @@ Type2 = ELECTRIC
Abilities = MAGNETPULL,STURDY Abilities = MAGNETPULL,STURDY
HiddenAbility = GALVANIZE HiddenAbility = GALVANIZE
Moves = 1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE Moves = 1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,ROLLOUT,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE
TutorMoves = ALLYSWITCH,ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CHARGEBEAM,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ELECTROWEB,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSPUNCH,FRUSTRATION,GYROBALL,HIDDENPOWER,IRONDEFENSE,MAGNETRISE,NATUREPOWER,PROTECT,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHOCKWAVE,SLEEPTALK,SMACKDOWN,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,VOLTSWITCH
Weight = 110.0 Weight = 110.0
Color = Gray Color = Gray
Pokedex = They eat rocks and often get into a scrap over them. The shock of Graveler smashing together causes a flash of light and a booming noise. Pokedex = They eat rocks and often get into a scrap over them. The shock of Graveler smashing together causes a flash of light and a booming noise.
@@ -237,6 +250,7 @@ Type2 = ELECTRIC
Abilities = MAGNETPULL,STURDY Abilities = MAGNETPULL,STURDY
HiddenAbility = GALVANIZE HiddenAbility = GALVANIZE
Moves = 1,HEAVYSLAM,1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,STEAMROLLER,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE,60,HEAVYSLAM Moves = 1,HEAVYSLAM,1,TACKLE,1,DEFENSECURL,1,CHARGE,1,ROCKPOLISH,4,CHARGE,6,ROCKPOLISH,10,STEAMROLLER,12,SPARK,16,ROCKTHROW,18,SMACKDOWN,22,THUNDERPUNCH,24,SELFDESTRUCT,30,STEALTHROCK,34,ROCKBLAST,40,DISCHARGE,44,EXPLOSION,50,DOUBLEEDGE,54,STONEEDGE,60,HEAVYSLAM
TutorMoves = ALLYSWITCH,ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CHARGEBEAM,CONFIDE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ELECTROWEB,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GYROBALL,HIDDENPOWER,HYPERBEAM,IRONDEFENSE,IRONHEAD,MAGNETRISE,NATUREPOWER,PROTECT,REST,RETURN,ROAR,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHOCKWAVE,SLEEPTALK,SMACKDOWN,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,VOLTSWITCH,WILDCHARGE
Height = 1.7 Height = 1.7
Weight = 316.0 Weight = 316.0
Color = Gray Color = Gray
@@ -261,6 +275,7 @@ Type2 = DARK
Abilities = POISONTOUCH,GLUTTONY Abilities = POISONTOUCH,GLUTTONY
HiddenAbility = POWEROFALCHEMY HiddenAbility = POWEROFALCHEMY
Moves = 1,POUND,1,POISONGAS,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,43,ACIDARMOR,46,BELCH,48,MEMENTO Moves = 1,POUND,1,POISONGAS,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,43,ACIDARMOR,46,BELCH,48,MEMENTO
TutorMoves = ATTRACT,BRUTALSWING,CONFIDE,DOUBLETEAM,EMBARGO,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FRUSTRATION,GASTROACID,GIGADRAIN,GUNKSHOT,HIDDENPOWER,ICEPUNCH,INFESTATION,KNOCKOFF,PAINSPLIT,PAYBACK,POISONJAB,PROTECT,QUASH,RAINDANCE,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SHADOWBALL,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNARL,SNORE,SPITE,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THUNDERPUNCH,TORMENT,TOXIC,VENOSHOCK
EggMoves = ASSURANCE,CLEARSMOG,CURSE,IMPRISON,MEANLOOK,POWERUPPUNCH,PURSUIT,SCARYFACE,SHADOWSNEAK,SPITE,SPITUP,STOCKPILE,SWALLOW EggMoves = ASSURANCE,CLEARSMOG,CURSE,IMPRISON,MEANLOOK,POWERUPPUNCH,PURSUIT,SCARYFACE,SHADOWSNEAK,SPITE,SPITUP,STOCKPILE,SWALLOW
Height = 0.7 Height = 0.7
Weight = 42.0 Weight = 42.0
@@ -274,6 +289,7 @@ Type2 = DARK
Abilities = POISONTOUCH,GLUTTONY Abilities = POISONTOUCH,GLUTTONY
HiddenAbility = POWEROFALCHEMY HiddenAbility = POWEROFALCHEMY
Moves = 0,VENOMDRENCH,1,VENOMDRENCH,1,POUND,1,POISONGAS,1,HARDEN,1,BITE,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,46,ACIDARMOR,52,BELCH,57,MEMENTO Moves = 0,VENOMDRENCH,1,VENOMDRENCH,1,POUND,1,POISONGAS,1,HARDEN,1,BITE,4,HARDEN,7,BITE,12,DISABLE,15,ACIDSPRAY,18,POISONFANG,21,MINIMIZE,26,FLING,29,KNOCKOFF,32,CRUNCH,37,SCREECH,40,GUNKSHOT,46,ACIDARMOR,52,BELCH,57,MEMENTO
TutorMoves = ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,CONFIDE,DARKPULSE,DOUBLETEAM,EMBARGO,EXPLOSION,FACADE,FIREBLAST,FIREPUNCH,FLAMETHROWER,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GASTROACID,GIGADRAIN,GIGAIMPACT,GUNKSHOT,HIDDENPOWER,HYPERBEAM,ICEPUNCH,INFESTATION,KNOCKOFF,PAINSPLIT,PAYBACK,POISONJAB,PROTECT,QUASH,RAINDANCE,RECYCLE,REST,RETURN,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SHADOWBALL,SHOCKWAVE,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SNARL,SNORE,SPITE,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,THIEF,THUNDERPUNCH,TORMENT,TOXIC,VENOSHOCK
Height = 1.0 Height = 1.0
Weight = 52.0 Weight = 52.0
Color = Green Color = Green
@@ -295,6 +311,7 @@ Type2 = DRAGON
BaseStats = 95,105,85,45,125,75 BaseStats = 95,105,85,45,125,75
Abilities = FRISK Abilities = FRISK
Moves = 0,DRAGONHAMMER,1,DRAGONHAMMER,1,SEEDBOMB,1,BARRAGE,1,HYPNOSIS,1,CONFUSION,17,PSYSHOCK,27,EGGBOMB,37,WOODHAMMER,47,LEAFSTORM Moves = 0,DRAGONHAMMER,1,DRAGONHAMMER,1,SEEDBOMB,1,BARRAGE,1,HYPNOSIS,1,CONFUSION,17,PSYSHOCK,27,EGGBOMB,37,WOODHAMMER,47,LEAFSTORM
TutorMoves = ATTRACT,BLOCK,BRICKBREAK,BRUTALSWING,BULLDOZE,CONFIDE,DOUBLETEAM,DRACOMETEOR,DRAGONPULSE,DRAGONTAIL,DREAMEATER,EARTHQUAKE,ENERGYBALL,EXPLOSION,FACADE,FLAMETHROWER,FRUSTRATION,GIGADRAIN,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,INFESTATION,IRONHEAD,IRONTAIL,KNOCKOFF,LIGHTSCREEN,LOWKICK,NATUREPOWER,OUTRAGE,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,REFLECT,REST,RETURN,ROUND,SEEDBOMB,SKILLSWAP,SLEEPTALK,SLUDGEBOMB,SNORE,SOLARBEAM,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,SWORDSDANCE,SYNTHESIS,TELEKINESIS,THIEF,TOXIC,TRICKROOM,WORRYSEED,ZENHEADBUTT
Height = 10.9 Height = 10.9
Weight = 415.6 Weight = 415.6
Pokedex = As it grew taller and taller, it outgrew its reliance on psychic powers, while within it awakened the power of the sleeping dragon. Pokedex = As it grew taller and taller, it outgrew its reliance on psychic powers, while within it awakened the power of the sleeping dragon.
@@ -309,6 +326,7 @@ Type2 = GHOST
Abilities = CURSEDBODY,LIGHTNINGROD Abilities = CURSEDBODY,LIGHTNINGROD
HiddenAbility = ROCKHEAD HiddenAbility = ROCKHEAD
Moves = 1,GROWL,1,TAILWHIP,1,BONECLUB,1,FLAMEWHEEL,3,TAILWHIP,7,BONECLUB,11,FLAMEWHEEL,13,LEER,17,HEX,21,BONEMERANG,23,WILLOWISP,27,SHADOWBONE,33,THRASH,37,FLING,43,STOMPINGTANTRUM,49,ENDEAVOR,53,FLAREBLITZ,59,RETALIATE,65,BONERUSH Moves = 1,GROWL,1,TAILWHIP,1,BONECLUB,1,FLAMEWHEEL,3,TAILWHIP,7,BONECLUB,11,FLAMEWHEEL,13,LEER,17,HEX,21,BONEMERANG,23,WILLOWISP,27,SHADOWBONE,33,THRASH,37,FLING,43,STOMPINGTANTRUM,49,ENDEAVOR,53,FLAREBLITZ,59,RETALIATE,65,BONERUSH
TutorMoves = AERIALACE,ALLYSWITCH,ATTRACT,BLIZZARD,BRICKBREAK,BRUTALSWING,BULLDOZE,CONFIDE,DARKPULSE,DOUBLETEAM,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENDEAVOR,FACADE,FALSESWIPE,FIREBLAST,FIREPUNCH,FLAMECHARGE,FLAMETHROWER,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,HEATWAVE,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,KNOCKOFF,LASERFOCUS,LOWKICK,OUTRAGE,PAINSPLIT,PROTECT,RAINDANCE,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SANDSTORM,SHADOWBALL,SLEEPTALK,SMACKDOWN,SNORE,SPITE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SUNNYDAY,SWAGGER,SWORDSDANCE,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERPUNCH,TOXIC,UPROAR,WILLOWISP
Weight = 34.0 Weight = 34.0
Color = Purple Color = Purple
Pokedex = Its custom is to mourn its lost companions. Mounds of dirt by the side of the road mark the graves of the Marowak Pokedex = Its custom is to mourn its lost companions. Mounds of dirt by the side of the road mark the graves of the Marowak
@@ -750,6 +768,7 @@ FormName = Attack Forme
BaseStats = 50,180,20,150,180,20 BaseStats = 50,180,20,150,180,20
EffortPoints = 0,2,0,0,1,0 EffortPoints = 0,2,0,0,1,0
Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,TAUNT,25,PURSUIT,31,PSYCHIC,37,SUPERPOWER,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,COSMICPOWER,61,ZAPCANNON,67,PSYCHOBOOST,73,HYPERBEAM Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,TAUNT,25,PURSUIT,31,PSYCHIC,37,SUPERPOWER,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,COSMICPOWER,61,ZAPCANNON,67,PSYCHOBOOST,73,HYPERBEAM
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,BRUTALSWING,CALMMIND,CHARGEBEAM,CONFIDE,DARKPULSE,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FLASHCANNON,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,ICEBEAM,LASERFOCUS,LIGHTSCREEN,LOWKICK,LOWSWEEP,MAGICCOAT,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SHOCKWAVE,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SUPERPOWER,SWAGGER,TAUNT,TELEKINESIS,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WATERPULSE,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = 4 BattlerPlayerX = 4
BattlerEnemyX = 1 BattlerEnemyX = 1
BattlerEnemyY = 5 BattlerEnemyY = 5
@@ -760,6 +779,7 @@ FormName = Defense Forme
BaseStats = 50,70,160,90,70,160 BaseStats = 50,70,160,90,70,160
EffortPoints = 0,0,2,0,0,1 EffortPoints = 0,0,2,0,0,1
Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,KNOCKOFF,25,SPIKES,31,PSYCHIC,37,SNATCH,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,IRONDEFENSE,55,AMNESIA,61,RECOVER,67,PSYCHOBOOST,73,COUNTER,73,MIRRORCOAT Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,TELEPORT,19,KNOCKOFF,25,SPIKES,31,PSYCHIC,37,SNATCH,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,IRONDEFENSE,55,AMNESIA,61,RECOVER,67,PSYCHOBOOST,73,COUNTER,73,MIRRORCOAT
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,BRUTALSWING,CALMMIND,CHARGEBEAM,CONFIDE,DARKPULSE,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FLASHCANNON,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,ICEBEAM,IRONDEFENSE,KNOCKOFF,LASERFOCUS,LIGHTSCREEN,LOWKICK,LOWSWEEP,MAGICCOAT,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SHOCKWAVE,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,TELEKINESIS,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WATERPULSE,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = 3 BattlerPlayerX = 3
BattlerEnemyX = -2 BattlerEnemyX = -2
BattlerEnemyY = 6 BattlerEnemyY = 6
@@ -770,6 +790,7 @@ FormName = Speed Forme
BaseStats = 50,95,90,180,95,90 BaseStats = 50,95,90,180,95,90
EffortPoints = 0,0,0,3,0,0 EffortPoints = 0,0,0,3,0,0
Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,DOUBLETEAM,19,KNOCKOFF,25,PURSUIT,31,PSYCHIC,37,SWIFT,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,AGILITY,61,RECOVER,67,PSYCHOBOOST,73,EXTREMESPEED Moves = 1,LEER,1,WRAP,7,NIGHTSHADE,13,DOUBLETEAM,19,KNOCKOFF,25,PURSUIT,31,PSYCHIC,37,SWIFT,43,PSYCHOSHIFT,49,ZENHEADBUTT,55,AGILITY,61,RECOVER,67,PSYCHOBOOST,73,EXTREMESPEED
TutorMoves = AERIALACE,ALLYSWITCH,BIND,BRICKBREAK,BRUTALSWING,CALMMIND,CHARGEBEAM,CONFIDE,DARKPULSE,DOUBLETEAM,DRAINPUNCH,DREAMEATER,ENERGYBALL,FACADE,FIREPUNCH,FLASHCANNON,FLING,FOCUSBLAST,FOCUSPUNCH,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GRAVITY,HIDDENPOWER,HYPERBEAM,ICEBEAM,ICEPUNCH,KNOCKOFF,LASERFOCUS,LIGHTSCREEN,LOWKICK,LOWSWEEP,MAGICCOAT,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROLEPLAY,ROUND,SAFEGUARD,SHADOWBALL,SHOCKWAVE,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNATCH,SNORE,SOLARBEAM,STEALTHROCK,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SWAGGER,TAUNT,TELEKINESIS,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERPUNCH,THUNDERWAVE,TORMENT,TOXIC,TRICK,TRICKROOM,WATERPULSE,WONDERROOM,ZENHEADBUTT
BattlerPlayerX = -4 BattlerPlayerX = -4
BattlerEnemyX = -4 BattlerEnemyX = -4
BattlerEnemyY = 4 BattlerEnemyY = 4
@@ -790,6 +811,7 @@ Type2 = GROUND
BaseStats = 60,79,105,36,59,85 BaseStats = 60,79,105,36,59,85
EffortPoints = 0,0,2,0,0,0 EffortPoints = 0,0,2,0,0,0
Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,ROCKBLAST,29,HARDEN,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,FISSURE,50,BUGBUZZ Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,ROCKBLAST,29,HARDEN,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,FISSURE,50,BUGBUZZ
TutorMoves = ALLYSWITCH,ATTRACT,BUGBITE,BULLDOZE,CONFIDE,DOUBLETEAM,DREAMEATER,EARTHPOWER,EARTHQUAKE,ELECTROWEB,ENDEAVOR,FACADE,FRUSTRATION,GIGAIMPACT,HIDDENPOWER,HYPERBEAM,INFESTATION,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROCKTOMB,ROUND,SAFEGUARD,SANDSTORM,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SWAGGER,TELEKINESIS,THIEF,TOXIC,UPROAR,VENOSHOCK
Color = Brown Color = Brown
#------------------------------- #-------------------------------
[WORMADAM,2] [WORMADAM,2]
@@ -799,6 +821,7 @@ Type2 = STEEL
BaseStats = 60,69,95,36,69,95 BaseStats = 60,69,95,36,69,95
EffortPoints = 0,0,1,0,0,1 EffortPoints = 0,0,1,0,0,1
Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,METALBURST,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,MIRRORSHOT,29,METALSOUND,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,IRONHEAD,50,BUGBUZZ Moves = 0,QUIVERDANCE,1,QUIVERDANCE,1,METALBURST,1,SUCKERPUNCH,1,TACKLE,1,PROTECT,1,BUGBITE,10,PROTECT,15,BUGBITE,20,HIDDENPOWER,23,CONFUSION,26,MIRRORSHOT,29,METALSOUND,32,PSYBEAM,35,CAPTIVATE,38,FLAIL,41,ATTRACT,44,PSYCHIC,47,IRONHEAD,50,BUGBUZZ
TutorMoves = ALLYSWITCH,ATTRACT,BUGBITE,CONFIDE,DOUBLETEAM,DREAMEATER,ELECTROWEB,ENDEAVOR,FACADE,FLASHCANNON,FRUSTRATION,GIGAIMPACT,GUNKSHOT,GYROBALL,HIDDENPOWER,HYPERBEAM,INFESTATION,IRONDEFENSE,IRONHEAD,MAGNETRISE,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROUND,SAFEGUARD,SHADOWBALL,SIGNALBEAM,SKILLSWAP,SLEEPTALK,SNORE,STEALTHROCK,SUBSTITUTE,SUNNYDAY,SWAGGER,TELEKINESIS,THIEF,TOXIC,UPROAR,VENOSHOCK
Color = Red Color = Red
#------------------------------- #-------------------------------
[CHERRIM,1] [CHERRIM,1]
@@ -918,6 +941,7 @@ FormName = Origin Forme
BaseStats = 150,120,100,90,120,100 BaseStats = 150,120,100,90,120,100
Abilities = LEVITATE Abilities = LEVITATE
HiddenAbility = LEVITATE HiddenAbility = LEVITATE
TutorMoves = AERIALACE,AQUATAIL,BRUTALSWING,BULLDOZE,CALMMIND,CHARGEBEAM,CONFIDE,CUT,DARKPULSE,DEFOG,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,DRAGONPULSE,DRAGONTAIL,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENERGYBALL,FACADE,FLY,FRUSTRATION,GIGAIMPACT,GRAVITY,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICYWIND,IRONHEAD,IRONTAIL,MAGICCOAT,OUTRAGE,PAYBACK,PROTECT,PSYCHIC,PSYCHUP,RAINDANCE,REST,RETURN,ROAR,ROCKSMASH,ROUND,SAFEGUARD,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SLEEPTALK,SNORE,SPITE,STEELWING,STONEEDGE,STRENGTH,SUBSTITUTE,SUNNYDAY,SWAGGER,TAILWIND,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TOXIC,WILLOWISP
Height = 6.9 Height = 6.9
Weight = 650.0 Weight = 650.0
Shape = 2 Shape = 2
@@ -932,6 +956,7 @@ BaseStats = 100,103,75,127,120,75
EffortPoints = 0,0,0,3,0,0 EffortPoints = 0,0,0,3,0,0
Abilities = SERENEGRACE Abilities = SERENEGRACE
Moves = 1,GROWTH,10,MAGICALLEAF,19,LEECHSEED,28,QUICKATTACK,37,SWEETSCENT,46,NATURALGIFT,55,WORRYSEED,64,AIRSLASH,73,ENERGYBALL,82,SWEETKISS,91,LEAFSTORM,100,SEEDFLARE Moves = 1,GROWTH,10,MAGICALLEAF,19,LEECHSEED,28,QUICKATTACK,37,SWEETSCENT,46,NATURALGIFT,55,WORRYSEED,64,AIRSLASH,73,ENERGYBALL,82,SWEETKISS,91,LEAFSTORM,100,SEEDFLARE
TutorMoves = CONFIDE,COVET,DAZZLINGGLEAM,DOUBLETEAM,ENERGYBALL,FACADE,FRUSTRATION,GIGADRAIN,GIGAIMPACT,GRASSKNOT,HIDDENPOWER,HYPERBEAM,LASERFOCUS,LASTRESORT,NATUREPOWER,PROTECT,PSYCHIC,PSYCHUP,REST,RETURN,ROUND,SAFEGUARD,SEEDBOMB,SLEEPTALK,SNORE,SOLARBEAM,SUBSTITUTE,SUNNYDAY,SWAGGER,SWORDSDANCE,SYNTHESIS,TAILWIND,TOXIC,WORRYSEED,ZENHEADBUTT
Height = 0.4 Height = 0.4
Weight = 5.2 Weight = 5.2
BattlerEnemyY = 16 BattlerEnemyY = 16
@@ -1000,6 +1025,7 @@ Type1 = ICE
[ARCEUS,16] [ARCEUS,16]
FormName = Dragon Type FormName = Dragon Type
Type1 = DRAGON Type1 = DRAGON
TutorMoves = AERIALACE,AQUATAIL,BLIZZARD,BRICKBREAK,BULLDOZE,CALMMIND,CHARGEBEAM,CONFIDE,CUT,DARKPULSE,DEFOG,DIVE,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,DRAGONPULSE,DREAMEATER,EARTHPOWER,EARTHQUAKE,ECHOEDVOICE,ENERGYBALL,FACADE,FIREBLAST,FLAMETHROWER,FLASHCANNON,FLY,FOCUSBLAST,FRUSTRATION,GIGADRAIN,GIGAIMPACT,GRASSKNOT,GRAVITY,HAIL,HEATWAVE,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICEBEAM,ICYWIND,IRONDEFENSE,IRONHEAD,IRONTAIL,LASERFOCUS,LASTRESORT,LIGHTSCREEN,LIQUIDATION,MAGICCOAT,OUTRAGE,OVERHEAT,PAYBACK,POISONJAB,PROTECT,PSYCHIC,PSYCHUP,PSYSHOCK,QUASH,RAINDANCE,RECYCLE,REFLECT,REST,RETURN,ROAR,ROCKSLIDE,ROCKSMASH,ROCKTOMB,ROUND,SAFEGUARD,SANDSTORM,SHADOWBALL,SHADOWCLAW,SHOCKWAVE,SIGNALBEAM,SLEEPTALK,SLUDGEBOMB,SNARL,SNORE,SOLARBEAM,STEALTHROCK,STONEEDGE,STRENGTH,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWORDSDANCE,TAILWIND,TELEKINESIS,THUNDER,THUNDERBOLT,THUNDERWAVE,TOXIC,TRICK,TRICKROOM,WATERFALL,WATERPULSE,WILLOWISP,WORKUP,XSCISSOR,ZENHEADBUTT
#------------------------------- #-------------------------------
[ARCEUS,17] [ARCEUS,17]
FormName = Dark Type FormName = Dark Type
@@ -1078,6 +1104,7 @@ BaseStats = 79,105,70,101,145,80
EffortPoints = 0,0,0,0,3,0 EffortPoints = 0,0,0,0,3,0
Abilities = VOLTABSORB Abilities = VOLTABSORB
HiddenAbility = VOLTABSORB HiddenAbility = VOLTABSORB
TutorMoves = ATTRACT,BRICKBREAK,BRUTALSWING,BULKUP,CHARGEBEAM,CONFIDE,DARKPULSE,DEFOG,DOUBLETEAM,ELECTROWEB,EMBARGO,FACADE,FLASHCANNON,FLING,FLY,FOCUSBLAST,FOULPLAY,FRUSTRATION,GIGAIMPACT,GRASSKNOT,HIDDENPOWER,HYPERBEAM,IRONTAIL,KNOCKOFF,PAYBACK,PROTECT,PSYCHIC,RAINDANCE,REST,RETURN,ROCKSMASH,ROLEPLAY,ROUND,SHOCKWAVE,SKYDROP,SLEEPTALK,SLUDGEBOMB,SLUDGEWAVE,SMACKDOWN,SNORE,STRENGTH,SUBSTITUTE,SUPERPOWER,SWAGGER,TAUNT,THIEF,THUNDER,THUNDERBOLT,THUNDERPUNCH,THUNDERWAVE,TORMENT,TOXIC,UPROAR,UTURN,VOLTSWITCH,WILDCHARGE
Height = 3.0 Height = 3.0
Shape = 6 Shape = 6
BattlerPlayerX = -3 BattlerPlayerX = -3
@@ -1142,6 +1169,7 @@ BattlerEnemyY = 4
#------------------------------- #-------------------------------
[KELDEO,1] [KELDEO,1]
FormName = Resolute Form FormName = Resolute Form
TutorMoves = AERIALACE,AQUATAIL,BOUNCE,CALMMIND,CONFIDE,COVET,CUT,DOUBLETEAM,ENDEAVOR,FACADE,FALSESWIPE,FOCUSBLAST,FRUSTRATION,GIGAIMPACT,HAIL,HELPINGHAND,HIDDENPOWER,HYPERBEAM,ICYWIND,LASTRESORT,LIQUIDATION,LOWKICK,POISONJAB,PROTECT,PSYCHUP,RAINDANCE,REFLECT,REST,RETURN,ROAR,ROCKSMASH,ROUND,SAFEGUARD,SCALD,SLEEPTALK,SNORE,STONEEDGE,STRENGTH,SUBSTITUTE,SUPERPOWER,SURF,SWAGGER,SWORDSDANCE,TAUNT,TOXIC,WATERPULSE,WORKUP,XSCISSOR
Pokedex = The power that lay hidden in its body now covers its horn, turning it into a sword that can slice through anything. Pokedex = The power that lay hidden in its body now covers its horn, turning it into a sword that can slice through anything.
BattlerPlayerX = 1 BattlerPlayerX = 1
BattlerEnemyX = 0 BattlerEnemyX = 0
@@ -1447,6 +1475,7 @@ BaseStats = 85,115,75,82,55,75
Abilities = KEENEYE,VITALSPIRIT Abilities = KEENEYE,VITALSPIRIT
HiddenAbility = NOGUARD HiddenAbility = NOGUARD
Moves = 0,COUNTER,1,COUNTER,1,REVERSAL,1,TAUNT,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE Moves = 0,COUNTER,1,COUNTER,1,REVERSAL,1,TAUNT,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE
TutorMoves = ATTRACT,BRICKBREAK,BULKUP,CONFIDE,COVET,DOUBLETEAM,DUALCHOP,EARTHPOWER,ECHOEDVOICE,ENDEAVOR,FACADE,FIREPUNCH,FOCUSPUNCH,FOULPLAY,FRUSTRATION,HIDDENPOWER,HYPERVOICE,IRONDEFENSE,IRONHEAD,IRONTAIL,LASERFOCUS,LASTRESORT,OUTRAGE,PROTECT,REST,RETURN,ROAR,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SLEEPTALK,SNARL,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SWAGGER,SWORDSDANCE,TAUNT,THROATCHOP,THUNDERPUNCH,TOXIC,UPROAR,ZENHEADBUTT
Height = 1.1 Height = 1.1
Color = Red Color = Red
Shape = 6 Shape = 6
@@ -1458,6 +1487,7 @@ BaseStats = 75,117,65,110,55,65
Abilities = TOUGHCLAWS Abilities = TOUGHCLAWS
HiddenAbility = TOUGHCLAWS HiddenAbility = TOUGHCLAWS
Moves = 0,THRASH,1,THRASH,1,ACCELEROCK,1,COUNTER,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE Moves = 0,THRASH,1,THRASH,1,ACCELEROCK,1,COUNTER,1,TACKLE,1,LEER,1,SANDATTACK,1,BITE,4,SANDATTACK,7,BITE,12,HOWL,15,ROCKTHROW,18,ODORSLEUTH,23,ROCKTOMB,26,ROAR,29,STEALTHROCK,34,ROCKSLIDE,37,SCARYFACE,40,CRUNCH,45,ROCKCLIMB,48,STONEEDGE
TutorMoves = ATTRACT,BRICKBREAK,BULKUP,CONFIDE,COVET,DOUBLETEAM,DRILLRUN,EARTHPOWER,ECHOEDVOICE,ENDEAVOR,FACADE,FRUSTRATION,HIDDENPOWER,HYPERVOICE,IRONDEFENSE,IRONHEAD,IRONTAIL,LASTRESORT,OUTRAGE,PROTECT,REST,RETURN,ROAR,ROCKPOLISH,ROCKSLIDE,ROCKTOMB,ROUND,SLEEPTALK,SNARL,SNORE,STEALTHROCK,STOMPINGTANTRUM,STONEEDGE,SUBSTITUTE,SWAGGER,SWORDSDANCE,TAUNT,TOXIC,ZENHEADBUTT
Pokedex = Bathed in the setting sun of evening, Lycanroc has undergone a special kind of evolution. An intense fighting spirit underlies its calmness. Pokedex = Bathed in the setting sun of evening, Lycanroc has undergone a special kind of evolution. An intense fighting spirit underlies its calmness.
#------------------------------- #-------------------------------
[WISHIWASHI,1] [WISHIWASHI,1]
@@ -1531,6 +1561,7 @@ Type1 = ICE
[SILVALLY,16] [SILVALLY,16]
FormName = Type: Dragon FormName = Type: Dragon
Type1 = DRAGON Type1 = DRAGON
TutorMoves = AERIALACE,CONFIDE,DEFOG,DOUBLETEAM,DRACOMETEOR,DRAGONCLAW,EXPLOSION,FACADE,FLAMECHARGE,FLAMETHROWER,FLASHCANNON,FRUSTRATION,GIGAIMPACT,GRASSPLEDGE,HAIL,HEATWAVE,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICEBEAM,ICYWIND,IRONDEFENSE,IRONHEAD,LASERFOCUS,LASTRESORT,MAGICCOAT,OUTRAGE,PAYBACK,PROTECT,RAINDANCE,REST,RETURN,ROAR,ROCKSLIDE,ROUND,SANDSTORM,SHADOWBALL,SHADOWCLAW,SIGNALBEAM,SLEEPTALK,SNARL,SNORE,STEELWING,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWORDSDANCE,TAILWIND,THUNDERBOLT,THUNDERWAVE,TOXIC,UTURN,WORKUP,XSCISSOR,ZENHEADBUTT
#------------------------------- #-------------------------------
[SILVALLY,17] [SILVALLY,17]
FormName = Type: Dark FormName = Type: Dark
+212
View File
@@ -0,0 +1,212 @@
# See the documentation on the wiki to learn how to edit this file.
#-------------------------------
[0]
BULBASAUR,IVYSAUR,VENUSAUR
CHARMANDER,CHARMELEON,CHARIZARD
SQUIRTLE,WARTORTLE,BLASTOISE
CATERPIE,METAPOD,BUTTERFREE
WEEDLE,KAKUNA,BEEDRILL
PIDGEY,PIDGEOTTO,PIDGEOT
RATTATA,RATICATE
SPEAROW,FEAROW
EKANS,ARBOK
PIKACHU,RAICHU
SANDSHREW,SANDSLASH
NIDORANfE,NIDORINA,NIDOQUEEN
NIDORANmA,NIDORINO,NIDOKING
CLEFAIRY,CLEFABLE
VULPIX,NINETALES
JIGGLYPUFF,WIGGLYTUFF
ZUBAT,GOLBAT
ODDISH,GLOOM,VILEPLUME
PARAS,PARASECT
VENONAT,VENOMOTH
DIGLETT,DUGTRIO
MEOWTH,PERSIAN
PSYDUCK,GOLDUCK
MANKEY,PRIMEAPE
GROWLITHE,ARCANINE
POLIWAG,POLIWHIRL,POLIWRATH
ABRA,KADABRA,ALAKAZAM
MACHOP,MACHOKE,MACHAMP
BELLSPROUT,WEEPINBELL,VICTREEBEL
TENTACOOL,TENTACRUEL
GEODUDE,GRAVELER,GOLEM
PONYTA,RAPIDASH
SLOWPOKE,SLOWBRO
MAGNEMITE,MAGNETON
FARFETCHD
DODUO,DODRIO
SEEL,DEWGONG
GRIMER,MUK
SHELLDER,CLOYSTER
GASTLY,HAUNTER,GENGAR
ONIX
DROWZEE,HYPNO
KRABBY,KINGLER
VOLTORB,ELECTRODE
EXEGGCUTE,EXEGGUTOR
CUBONE,MAROWAK
HITMONLEE,HITMONCHAN
LICKITUNG
KOFFING,WEEZING
RHYHORN,RHYDON
CHANSEY
TANGELA
KANGASKHAN
HORSEA,SEADRA
GOLDEEN,SEAKING
STARYU,STARMIE
MRMIME
SCYTHER
JYNX
ELECTABUZZ
MAGMAR
PINSIR
TAUROS
MAGIKARP,GYARADOS
LAPRAS
DITTO
EEVEE,VAPOREON,JOLTEON,FLAREON
PORYGON
OMANYTE,OMASTAR
KABUTO,KABUTOPS
AERODACTYL
SNORLAX
ARTICUNO
ZAPDOS
MOLTRES
DRATINI,DRAGONAIR,DRAGONITE
MEWTWO
MEW
#-------------------------------
[1]
CHIKORITA,BAYLEEF,MEGANIUM
CYNDAQUIL,QUILAVA,TYPHLOSION
TOTODILE,CROCONAW,FERALIGATR
PIDGEY,PIDGEOTTO,PIDGEOT
SPEAROW,FEAROW
HOOTHOOT,NOCTOWL
RATTATA,RATICATE
SENTRET,FURRET
PICHU,PIKACHU,RAICHU
CATERPIE,METAPOD,BUTTERFREE
WEEDLE,KAKUNA,BEEDRILL
LEDYBA,LEDIAN
SPINARAK,ARIADOS
GEODUDE,GRAVELER,GOLEM
ZUBAT,GOLBAT,CROBAT
CLEFFA,CLEFAIRY,CLEFABLE
IGGLYBUFF,JIGGLYPUFF,WIGGLYTUFF
TOGEPI,TOGETIC
SANDSHREW,SANDSLASH
EKANS,ARBOK
DUNSPARCE
MAREEP,FLAAFFY,AMPHAROS
WOOPER,QUAGSIRE
GASTLY,HAUNTER,GENGAR
UNOWN
ONIX,STEELIX
BELLSPROUT,WEEPINBELL,VICTREEBEL
HOPPIP,SKIPLOOM,JUMPLUFF
PARAS,PARASECT
POLIWAG,POLIWHIRL,POLIWRATH,POLITOED
MAGIKARP,GYARADOS
GOLDEEN,SEAKING
SLOWPOKE,SLOWBRO,SLOWKING
ODDISH,GLOOM,VILEPLUME,BELLOSSOM
DROWZEE,HYPNO
ABRA,KADABRA,ALAKAZAM
DITTO
PINECO,FORRETRESS
NIDORANfE,NIDORINA,NIDOQUEEN
NIDORANmA,NIDORINO,NIDOKING
YANMA,YANMEGA
SUNKERN,SUNFLORA
EXEGGCUTE,EXEGGUTOR
SUDOWOODO
WOBBUFFET
VENONAT,VENOMOTH
SCYTHER,SCIZOR
PINSIR
HERACROSS
KOFFING,WEEZING
GRIMER,MUK
MAGNEMITE,MAGNETON
VOLTORB,ELECTRODE
AIPOM,AMBIPOM
SNUBBULL,GRANBULL
VULPIX,NINETALES
GROWLITHE,ARCANINE
STANTLER
MARILL,AZUMARILL
DIGLETT,DUGTRIO
MANKEY,PRIMEAPE
MEOWTH,PERSIAN
PSYDUCK,GOLDUCK
MACHOP,MACHOKE,MACHAMP
TYROGUE,HITMONLEE,HITMONCHAN,HITMONTOP
GIRAFARIG
TAUROS
MILTANK
MAGBY,MAGMAR
SMOOCHUM,JYNX
ELEKID,ELECTABUZZ
MRMIME
SMEARGLE
FARFETCHD
NATU,XATU
QWILFISH
TENTACOOL,TENTACRUEL
KRABBY,KINGLER
SHUCKLE
STARYU,STARMIE
SHELLDER,CLOYSTER
CORSOLA
REMORAID,OCTILLERY
CHINCHOU,LANTURN
SEEL,DEWGONG
LICKITUNG,LICKILICKY
TANGELA,TANGROWTH
EEVEE,VAPOREON,JOLTEON,FLAREON,ESPEON,UMBREON
HORSEA,SEADRA,KINGDRA
GLIGAR
DELIBIRD
SWINUB,PILOSWINE,MAMOSWINE
TEDDIURSA,URSARING
PHANPY,DONPHAN
MANTINE
SKARMORY
DODUO,DODRIO
PONYTA,RAPIDASH
CUBONE,MAROWAK
KANGASKHAN
RHYHORN,RHYDON
MURKROW
HOUNDOUR,HOUNDOOM
SLUGMA,MAGCARGO
SNEASEL
MISDREAVUS
PORYGON,PORYGON2
CHANSEY,BLISSEY
LAPRAS
OMANYTE,OMASTAR
KABUTO,KABUTOPS
AERODACTYL
SNORLAX
BULBASAUR,IVYSAUR,VENUSAUR
CHARMANDER,CHARMELEON,CHARIZARD
SQUIRTLE,WARTORTLE,BLASTOISE
ARTICUNO
ZAPDOS
MOLTRES
RAIKOU
ENTEI
SUICUNE
DRATINI,DRAGONAIR,DRAGONITE
LARVITAR,PUPITAR,TYRANITAR
LUGIA
HOOH
MEWTWO
MEW
CELEBI
-553
View File
File diff suppressed because one or more lines are too long