diff --git a/Data/Scripts/011_Data/001_Game data/001_Game data.rb b/Data/Scripts/011_Data/001_Game data.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/001_Game data.rb rename to Data/Scripts/011_Data/001_Game data.rb diff --git a/Data/Scripts/011_Data/001_Game data/002_Ability.rb b/Data/Scripts/011_Data/001_PBS data/002_Ability.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/002_Ability.rb rename to Data/Scripts/011_Data/001_PBS data/002_Ability.rb diff --git a/Data/Scripts/011_Data/001_Game data/003_Item.rb b/Data/Scripts/011_Data/001_PBS data/003_Item.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/003_Item.rb rename to Data/Scripts/011_Data/001_PBS data/003_Item.rb diff --git a/Data/Scripts/011_Data/001_Game data/004_Berry plant.rb b/Data/Scripts/011_Data/001_PBS data/004_Berry plant.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/004_Berry plant.rb rename to Data/Scripts/011_Data/001_PBS data/004_Berry plant.rb diff --git a/Data/Scripts/011_Data/001_Game data/005_Metadata.rb b/Data/Scripts/011_Data/001_PBS data/005_Metadata.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/005_Metadata.rb rename to Data/Scripts/011_Data/001_PBS data/005_Metadata.rb diff --git a/Data/Scripts/011_Data/001_Game data/006_Map metadata.rb b/Data/Scripts/011_Data/001_PBS data/006_Map metadata.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/006_Map metadata.rb rename to Data/Scripts/011_Data/001_PBS data/006_Map metadata.rb diff --git a/Data/Scripts/011_Data/001_Game data/007_Move.rb b/Data/Scripts/011_Data/001_PBS data/007_Move.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/007_Move.rb rename to Data/Scripts/011_Data/001_PBS data/007_Move.rb diff --git a/Data/Scripts/011_Data/001_Game data/008_Trainer type.rb b/Data/Scripts/011_Data/001_PBS data/008_Trainer type.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/008_Trainer type.rb rename to Data/Scripts/011_Data/001_PBS data/008_Trainer type.rb diff --git a/Data/Scripts/011_Data/001_Game data/009_Type.rb b/Data/Scripts/011_Data/001_PBS data/009_Type.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/009_Type.rb rename to Data/Scripts/011_Data/001_PBS data/009_Type.rb diff --git a/Data/Scripts/011_Data/001_Game data/010_Species.rb b/Data/Scripts/011_Data/001_PBS data/010_Species.rb similarity index 99% rename from Data/Scripts/011_Data/001_Game data/010_Species.rb rename to Data/Scripts/011_Data/001_PBS data/010_Species.rb index c519d51d1..07672350f 100644 --- a/Data/Scripts/011_Data/001_Game data/010_Species.rb +++ b/Data/Scripts/011_Data/001_PBS data/010_Species.rb @@ -92,7 +92,7 @@ module GameData "WildItemCommon" => [0, "e", :Item], "WildItemUncommon" => [0, "e", :Item], "WildItemRare" => [0, "e", :Item], - "Compatibility" => [0, "*e", :PBEggGroups], + "Compatibility" => [0, "*e", :EggGroup], "StepsToHatch" => [0, "v"], "Height" => [0, "f"], "Weight" => [0, "f"], @@ -153,7 +153,7 @@ module GameData @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] + @egg_groups = hash[:egg_groups] || [:Undiscovered] @hatch_steps = hash[:hatch_steps] || 1 @incense = hash[:incense] @evolutions = hash[:evolutions] || [] diff --git a/Data/Scripts/011_Data/001_Game data/011_Species files.rb b/Data/Scripts/011_Data/001_PBS data/011_Species files.rb similarity index 89% rename from Data/Scripts/011_Data/001_Game data/011_Species files.rb rename to Data/Scripts/011_Data/001_PBS data/011_Species files.rb index ffddb21bb..ee2406c8e 100644 --- a/Data/Scripts/011_Data/001_Game data/011_Species files.rb +++ b/Data/Scripts/011_Data/001_PBS data/011_Species files.rb @@ -2,8 +2,8 @@ module GameData class Species def self.check_graphic_file(path, species, form = 0, gender = 0, shiny = false, shadow = false, subfolder = "") try_subfolder = sprintf("%s/", subfolder) - species_data = self.get_species_form(species, form) - species_id = sprintf("%03d", (species_data) ? self.get(species_data.species).id_number : 0) +# 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) ? "_female" : "" @@ -28,13 +28,14 @@ module GameData 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 +# 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 + try_species_text = try_species ret = pbResolveBitmap(sprintf("%s%s%s%s%s%s", path, try_subfolder, try_species_text, try_form, try_gender, try_shadow)) return ret if ret - end +# end end return nil end @@ -42,16 +43,17 @@ module GameData def self.check_egg_graphic_file(path, species, form, suffix = "") species_data = self.get_species_form(species, form) return nil if species_data.nil? - species_id = self.get(species_data.species).id_number +# species_id = self.get(species_data.species).id_number if form > 0 ret = pbResolveBitmap(sprintf("%s%s_%d%s", path, species_data.species, form, suffix)) return ret if ret - ret = pbResolveBitmap(sprintf("%s%03d_%d%s", path, species_id, form, suffix)) - return ret if ret +# ret = pbResolveBitmap(sprintf("%s%03d_%d%s", path, species_id, form, suffix)) +# return ret if ret end ret = pbResolveBitmap(sprintf("%s%s%s", path, species_data.species, suffix)) - return ret if ret - return pbResolveBitmap(sprintf("%s%03d%s", path, species_id, suffix)) + return ret +# return ret if ret +# return pbResolveBitmap(sprintf("%s%03d%s", path, species_id, suffix)) end def self.front_sprite_filename(species, form = 0, gender = 0, shiny = false, shadow = false) @@ -148,16 +150,17 @@ module GameData 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 +# species_id = self.get(species_data.species).id_number if form > 0 ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Footprints/%s_%d", species_data.species, form)) return ret if ret - ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Footprints/%03d_%d", species_id, form)) - return ret if ret +# ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Footprints/%03d_%d", species_id, form)) +# return ret if ret end ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Footprints/%s", species_data.species)) - return ret if ret - return pbResolveBitmap(sprintf("Graphics/Pokemon/Footprints/%03d", species_id)) + return ret +# return ret if ret +# return pbResolveBitmap(sprintf("Graphics/Pokemon/Footprints/%03d", species_id)) end #=========================================================================== @@ -165,18 +168,18 @@ module GameData 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 +# species_id = self.get(species_data.species).id_number # Look for species-specific shadow graphic if form > 0 ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%s_%d", species_data.species, form)) return ret if ret - ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%03d_%d", species_id, form)) - return ret if ret +# ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%03d_%d", species_id, form)) +# return ret if ret end ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%s", species_data.species)) return ret if ret - ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%03d", species_id)) - return ret if ret +# ret = pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%03d", species_id)) +# return ret if ret # Use general shadow graphic return pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%d", species_data.shadow_size)) end @@ -196,16 +199,16 @@ module GameData 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 +# species_id = self.get(species_data.species).id_number if form > 0 ret = sprintf("Cries/%s_%d", species_data.species, form) return ret if pbResolveAudioSE(ret) - ret = sprintf("Cries/%03d_%d", species_id, form) - return ret if pbResolveAudioSE(ret) +# ret = sprintf("Cries/%03d_%d", species_id, form) +# return ret if pbResolveAudioSE(ret) end ret = sprintf("Cries/%s", species_data.species) - return ret if pbResolveAudioSE(ret) - ret = sprintf("Cries/%03d", species_id) +# return ret if pbResolveAudioSE(ret) +# ret = sprintf("Cries/%03d", species_id) return (pbResolveAudioSE(ret)) ? ret : nil end diff --git a/Data/Scripts/011_Data/001_Game data/012_Trainer.rb b/Data/Scripts/011_Data/001_PBS data/012_Trainer.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/012_Trainer.rb rename to Data/Scripts/011_Data/001_PBS data/012_Trainer.rb diff --git a/Data/Scripts/011_Data/001_Game data/013_Encounter.rb b/Data/Scripts/011_Data/001_PBS data/013_Encounter.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/013_Encounter.rb rename to Data/Scripts/011_Data/001_PBS data/013_Encounter.rb diff --git a/Data/Scripts/011_Data/001_Game data/014_Ribbon.rb b/Data/Scripts/011_Data/001_PBS data/014_Ribbon.rb similarity index 100% rename from Data/Scripts/011_Data/001_Game data/014_Ribbon.rb rename to Data/Scripts/011_Data/001_PBS data/014_Ribbon.rb diff --git a/Data/Scripts/011_Data/Hardcoded game data/001_PBExperience.rb b/Data/Scripts/011_Data/002_Hardcoded data/001_PBExperience.rb similarity index 100% rename from Data/Scripts/011_Data/Hardcoded game data/001_PBExperience.rb rename to Data/Scripts/011_Data/002_Hardcoded data/001_PBExperience.rb diff --git a/Data/Scripts/011_Data/Hardcoded game data/002_PBStats.rb b/Data/Scripts/011_Data/002_Hardcoded data/002_PBStats.rb similarity index 100% rename from Data/Scripts/011_Data/Hardcoded game data/002_PBStats.rb rename to Data/Scripts/011_Data/002_Hardcoded data/002_PBStats.rb diff --git a/Data/Scripts/011_Data/Hardcoded game data/003_Nature.rb b/Data/Scripts/011_Data/002_Hardcoded data/003_Nature.rb similarity index 100% rename from Data/Scripts/011_Data/Hardcoded game data/003_Nature.rb rename to Data/Scripts/011_Data/002_Hardcoded data/003_Nature.rb diff --git a/Data/Scripts/011_Data/Hardcoded game data/004_PBGenderRates.rb b/Data/Scripts/011_Data/002_Hardcoded data/004_PBGenderRates.rb similarity index 100% rename from Data/Scripts/011_Data/Hardcoded game data/004_PBGenderRates.rb rename to Data/Scripts/011_Data/002_Hardcoded data/004_PBGenderRates.rb diff --git a/Data/Scripts/011_Data/002_Hardcoded data/005_EggGroup.rb b/Data/Scripts/011_Data/002_Hardcoded data/005_EggGroup.rb new file mode 100644 index 000000000..04bb50375 --- /dev/null +++ b/Data/Scripts/011_Data/002_Hardcoded data/005_EggGroup.rb @@ -0,0 +1,109 @@ +module GameData + class EggGroup + attr_reader :id + attr_reader :real_name + + DATA = {} + + extend ClassMethods + include InstanceMethods + + def register(hash) + self::DATA[hash[:id]] = self.new(hash) + end + + # Yields all data in alphabetical order. + def each + keys = self::DATA.keys.sort { |a, b| self::DATA[a].real_name <=> self::DATA[b].real_name } + keys.each { |key| yield self::DATA[key] } + end + + def self.load; end + def self.save; end + + def initialize(hash) + @id = hash[:id] + @real_name = hash[:name] || "Unnamed" + end + + # @return [String] the translated name of this egg group + def name + return _INTL(@real_name) + end + end +end + +GameData::EggGroup.register({ + :id => :Undiscovered, + :name => _INTL("Undiscovered") +}) + +GameData::EggGroup.register({ + :id => :Monster, + :name => _INTL("Monster") +}) + +GameData::EggGroup.register({ + :id => :Water1, + :name => _INTL("Water 1") +}) + +GameData::EggGroup.register({ + :id => :Bug, + :name => _INTL("Bug") +}) + +GameData::EggGroup.register({ + :id => :Flying, + :name => _INTL("Flying") +}) + +GameData::EggGroup.register({ + :id => :Field, + :name => _INTL("Field") +}) + +GameData::EggGroup.register({ + :id => :Fairy, + :name => _INTL("Fairy") +}) + +GameData::EggGroup.register({ + :id => :Grass, + :name => _INTL("Grass") +}) + +GameData::EggGroup.register({ + :id => :Humanlike, + :name => _INTL("Humanlike") +}) + +GameData::EggGroup.register({ + :id => :Water3, + :name => _INTL("Water 3") +}) + +GameData::EggGroup.register({ + :id => :Mineral, + :name => _INTL("Mineral") +}) + +GameData::EggGroup.register({ + :id => :Amorphous, + :name => _INTL("Amorphous") +}) + +GameData::EggGroup.register({ + :id => :Water2, + :name => _INTL("Water 2") +}) + +GameData::EggGroup.register({ + :id => :Ditto, + :name => _INTL("Ditto") +}) + +GameData::EggGroup.register({ + :id => :Dragon, + :name => _INTL("Dragon") +}) diff --git a/Data/Scripts/011_Data/Hardcoded game data/006_PBColors.rb b/Data/Scripts/011_Data/002_Hardcoded data/006_PBColors.rb similarity index 100% rename from Data/Scripts/011_Data/Hardcoded game data/006_PBColors.rb rename to Data/Scripts/011_Data/002_Hardcoded data/006_PBColors.rb diff --git a/Data/Scripts/011_Data/Hardcoded game data/007_PBHabitats.rb b/Data/Scripts/011_Data/002_Hardcoded data/007_PBHabitats.rb similarity index 100% rename from Data/Scripts/011_Data/Hardcoded game data/007_PBHabitats.rb rename to Data/Scripts/011_Data/002_Hardcoded data/007_PBHabitats.rb diff --git a/Data/Scripts/011_Data/Hardcoded game data/008_PBStatuses.rb b/Data/Scripts/011_Data/002_Hardcoded data/008_PBStatuses.rb similarity index 100% rename from Data/Scripts/011_Data/Hardcoded game data/008_PBStatuses.rb rename to Data/Scripts/011_Data/002_Hardcoded data/008_PBStatuses.rb diff --git a/Data/Scripts/011_Data/Hardcoded game data/005_PBEggGroups.rb b/Data/Scripts/011_Data/Hardcoded game data/005_PBEggGroups.rb deleted file mode 100644 index db720250a..000000000 --- a/Data/Scripts/011_Data/Hardcoded game data/005_PBEggGroups.rb +++ /dev/null @@ -1,19 +0,0 @@ -module PBEggGroups - Undiscovered = 0 # NoEggs, None, NA - Monster = 1 - Water1 = 2 - Bug = 3 - Flying = 4 - Field = 5 # Ground - Fairy = 6 - Grass = 7 # Plant - Humanlike = 8 # Humanoid, Humanshape, Human - Water3 = 9 - Mineral = 10 - Amorphous = 11 # Indeterminate - Water2 = 12 - Ditto = 13 - Dragon = 14 - - def self.maxValue; 14; end -end diff --git a/Data/Scripts/013_Overworld/013_PField_DayCare.rb b/Data/Scripts/013_Overworld/013_PField_DayCare.rb index 3a2faab37..faafc4dcc 100644 --- a/Data/Scripts/013_Overworld/013_PField_DayCare.rb +++ b/Data/Scripts/013_Overworld/013_PField_DayCare.rb @@ -105,7 +105,7 @@ end # Check compatibility of Pokémon in the Day Care. #=============================================================================== def pbIsDitto?(pkmn) - return pkmn.species_data.egg_groups.include?(PBEggGroups::Ditto) + return pkmn.species_data.egg_groups.include?(:Ditto) end def pbDayCareCompatibleGender(pkmn1, pkmn2) @@ -127,12 +127,12 @@ def pbDayCareGetCompat # Pokémon in the Undiscovered egg group cannot breed egg_groups1 = pkmn1.species_data.egg_groups egg_groups2 = pkmn2.species_data.egg_groups - return 0 if egg_groups1.include?(PBEggGroups::Undiscovered) || - egg_groups2.include?(PBEggGroups::Undiscovered) + return 0 if egg_groups1.include?(:Undiscovered) || + egg_groups2.include?(:Undiscovered) # Pokémon that don't share an egg group (and neither is in the Ditto group) # cannot breed - return 0 if !egg_groups1.include?(PBEggGroups::Ditto) && - !egg_groups2.include?(PBEggGroups::Ditto) && + return 0 if !egg_groups1.include?(:Ditto) && + !egg_groups2.include?(:Ditto) && (egg_groups1 & egg_groups2).length == 0 # Pokémon with incompatible genders cannot breed return 0 if !pbDayCareCompatibleGender(pkmn1, pkmn2) diff --git a/Data/Scripts/019_Other battles/005_PBattle_OrgBattleGenerator.rb b/Data/Scripts/019_Other battles/005_PBattle_OrgBattleGenerator.rb index 12da5b091..aee7699c7 100644 --- a/Data/Scripts/019_Other battles/005_PBattle_OrgBattleGenerator.rb +++ b/Data/Scripts/019_Other battles/005_PBattle_OrgBattleGenerator.rb @@ -151,7 +151,7 @@ end class NonlegendaryRestriction def isValid?(pkmn) return true if !pkmn.genderless? - return false if pkmn.species_data.egg_groups.include?(PBEggGroups::Undiscovered) + return false if pkmn.species_data.egg_groups.include?(:Undiscovered) return true end end diff --git a/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb b/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb index fbae63bce..0beb783c6 100644 --- a/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb +++ b/Data/Scripts/020_System and utilities/004_PSystem_PokemonUtilities.rb @@ -296,8 +296,8 @@ def pbHasEgg?(species) compatSpecies = (evoSpecies && evoSpecies[0]) ? evoSpecies[0][2] : species species_data = GameData::Species.try_get(compatSpecies) compat = species_data.egg_groups - return false if compat.include?(PBEggGroups::Undiscovered) - return false if compat.include?(PBEggGroups::Ditto) + return false if compat.include?(:Undiscovered) + return false if compat.include?(:Ditto) baby = EvolutionHelper.baby_species(species) return true if species == baby # Is a basic species baby = EvolutionHelper.baby_species(species, true) diff --git a/Data/Scripts/021_Debug/004_Editor_Screens.rb b/Data/Scripts/021_Debug/004_Editor_Screens.rb index 25c7738cb..71c9cb0b4 100644 --- a/Data/Scripts/021_Debug/004_Editor_Screens.rb +++ b/Data/Scripts/021_Debug/004_Editor_Screens.rb @@ -974,8 +974,8 @@ def pbPokemonEditor [_INTL("WildItemCommon"), ItemProperty, _INTL("Item commonly held by wild Pokémon of this species.")], [_INTL("WildItemUncommon"), ItemProperty, _INTL("Item uncommonly held by wild Pokémon of this species.")], [_INTL("WildItemRare"), ItemProperty, _INTL("Item rarely held by wild Pokémon of this species.")], - [_INTL("Compat1"), EnumProperty2.new(PBEggGroups), _INTL("Compatibility group (egg group) for breeding purposes.")], - [_INTL("Compat2"), EnumProperty2.new(PBEggGroups), _INTL("Compatibility group (egg group) for breeding purposes.")], + [_INTL("Compat1"), EggGroupProperty, _INTL("Compatibility group (egg group) for breeding purposes.")], + [_INTL("Compat2"), EggGroupProperty, _INTL("Compatibility group (egg group) for breeding purposes.")], [_INTL("StepsToHatch"), LimitProperty.new(99999), _INTL("Number of steps until an egg of this species hatches.")], [_INTL("Incense"), ItemProperty, _INTL("Item needed to be held by a parent to produce an egg of this species.")], [_INTL("Evolutions"), EvolutionsProperty.new, _INTL("Evolution paths of this species.")], @@ -1067,7 +1067,7 @@ def pbPokemonEditor data[5] = data[6] if !data[5] # Type1 data[6] = data[5] if !data[6] # Type2 egg_groups = [data[26], data[27]].uniq.compact # Egg groups - egg_groups.push(PBEggGroups::Undiscovered) if egg_groups.length == 0 + egg_groups.push(:Undiscovered) if egg_groups.length == 0 abilities = [data[17], data[18]].uniq.compact # Abilities hidden_abilities = [data[19], data[20], data[21], data[22]].uniq.compact # Hidden abilities # Construct species hash diff --git a/Data/Scripts/021_Debug/007_Editor_DataTypes.rb b/Data/Scripts/021_Debug/007_Editor_DataTypes.rb index e7f0b6562..a7cfb6781 100644 --- a/Data/Scripts/021_Debug/007_Editor_DataTypes.rb +++ b/Data/Scripts/021_Debug/007_Editor_DataTypes.rb @@ -436,6 +436,23 @@ end +module EggGroupProperty + def self.set(_settingname, oldsetting) + ret = pbChooseEggGroupList((oldsetting) ? oldsetting : nil) + return ret || oldsetting + end + + def self.defaultValue + return nil + end + + def self.format(value) + return (value && GameData::EggGroup.exists?(value)) ? GameData::EggGroup.get(value).real_name : "-" + end +end + + + class IVsProperty def initialize(limit) @limit = limit diff --git a/Data/Scripts/021_Debug/009_Editor_Utilities.rb b/Data/Scripts/021_Debug/009_Editor_Utilities.rb index 2da0bc8eb..97237fe49 100644 --- a/Data/Scripts/021_Debug/009_Editor_Utilities.rb +++ b/Data/Scripts/021_Debug/009_Editor_Utilities.rb @@ -212,6 +212,16 @@ def pbChooseNatureList(default = nil) return pbChooseList(commands, default, nil, -1) end +def pbChooseEggGroupList(default = nil) + commands = [] + i = 0 + GameData::EggGroup.each do |g| + commands.push([i, g.name, g.id]) + i += 1 + end + return pbChooseList(commands, default, nil, -1) +end + def pbChooseBallList(defaultMoveID = -1) cmdwin = pbListWindow([], 200) commands = [] diff --git a/Data/Scripts/022_Compiler/003_Compiler_WritePBS.rb b/Data/Scripts/022_Compiler/003_Compiler_WritePBS.rb index 08bc37b23..342977e7a 100644 --- a/Data/Scripts/022_Compiler/003_Compiler_WritePBS.rb +++ b/Data/Scripts/022_Compiler/003_Compiler_WritePBS.rb @@ -295,12 +295,7 @@ module Compiler f.write(sprintf("EggMoves = %s\r\n", species.egg_moves.join(","))) end if species.egg_groups.length > 0 - f.write("Compatibility = ") - species.egg_groups.each_with_index do |group, i| - f.write(",") if i > 0 - f.write(getConstantName(PBEggGroups, group)) - end - f.write("\r\n") + f.write(sprintf("Compatibility = %s\r\n", species.egg_groups.join(","))) end f.write(sprintf("StepsToHatch = %d\r\n", species.hatch_steps)) f.write(sprintf("Height = %.1f\r\n", species.height / 10.0)) @@ -395,12 +390,7 @@ module Compiler f.write(sprintf("EggMoves = %s\r\n", species.egg_moves.join(","))) end if species.egg_groups.length > 0 && species.egg_groups != base_species.egg_groups - f.write("Compatibility = ") - species.egg_groups.each_with_index do |group, i| - f.write(",") if i > 0 - f.write(getConstantName(PBEggGroups, group)) - end - f.write("\r\n") + f.write(sprintf("Compatibility = %s\r\n", species.egg_groups.join(","))) end f.write(sprintf("StepsToHatch = %d\r\n", species.hatch_steps)) if species.hatch_steps != base_species.hatch_steps f.write(sprintf("Height = %.1f\r\n", species.height / 10.0)) if species.height != base_species.height