diff --git a/Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb b/Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb index 98891e119..5ef06ab74 100644 --- a/Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb +++ b/Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb @@ -13,7 +13,7 @@ module GameData SCHEMA = { "SectionName" => [:id, "e", :Species], "GaugeSize" => [:gauge_size, "v"], - "Moves" => [:moves, "*m"], # Not enumerated when compiled + "Moves" => [:moves, "*e", :Move], "Flags" => [:flags, "*s"] } HEART_GAUGE_SIZE = 4000 # Default gauge size @@ -21,6 +21,11 @@ module GameData extend ClassMethodsSymbols include InstanceMethods + alias __orig__load load unless private_method_defined?(:__orig__load) + def self.load + __orig__load if safeExists?("Data/#{self::DATA_FILENAME}") + end + def initialize(hash) @id = hash[:id] @gauge_size = hash[:gauge_size] || HEART_GAUGE_SIZE diff --git a/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb b/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb index fa3c7c4f8..64be5582f 100644 --- a/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb +++ b/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb @@ -127,7 +127,7 @@ class Pokemon # Record this Pokémon's Shadow moves if data data.moves.each do |m| - @shadow_moves.push(m.to_sym) if GameData::Move.exists?(m.to_sym) + @shadow_moves.push(m) if GameData::Move.exists?(m) break if @shadow_moves.length >= MAX_MOVES end end diff --git a/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb b/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb index c4f59bc83..d876ed861 100644 --- a/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb +++ b/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb @@ -542,6 +542,7 @@ module Compiler # Compile Shadow Pokémon data #============================================================================= def compile_shadow_pokemon(*paths) + return if !safeExists?("PBS/shadow_pokemon.txt") compile_PBS_file_generic(GameData::ShadowPokemon, *paths) do |final_validate, hash| (final_validate) ? validate_all_compiled_shadow_pokemon : validate_compiled_shadow_pokemon(hash) end diff --git a/Data/Scripts/021_Compiler/003_Compiler_WritePBS.rb b/Data/Scripts/021_Compiler/003_Compiler_WritePBS.rb index d4ebd5a65..2ab8d7065 100644 --- a/Data/Scripts/021_Compiler/003_Compiler_WritePBS.rb +++ b/Data/Scripts/021_Compiler/003_Compiler_WritePBS.rb @@ -354,6 +354,7 @@ module Compiler # Save Shadow Pokémon data to PBS file #============================================================================= def write_shadow_pokemon + return if GameData::ShadowPokemon::DATA.empty? write_PBS_file_generic(GameData::ShadowPokemon) end diff --git a/PBS/Shadow Pokémon/items_shadow_pkmn.txt b/PBS/Shadow Pokémon/items_shadow_pkmn.txt new file mode 100644 index 000000000..4d6ddc364 --- /dev/null +++ b/PBS/Shadow Pokémon/items_shadow_pkmn.txt @@ -0,0 +1,42 @@ +# See the documentation on the wiki to learn how to edit this file. +#------------------------------- +[JOYSCENT] +Name = Joy Scent +NamePlural = Joy Scents +PortionName = bottle of Joy Scent +PortionNamePlural = bottles of Joy Scent +Pocket = 1 +Price = 600 +FieldUse = OnPokemon +BattleUse = OnPokemon +Description = A cologne that inspires feelings of joy. It will slightly please a Shadow Pokémon. +#------------------------------- +[EXCITESCENT] +Name = Excite Scent +NamePlural = Excite Scents +PortionName = bottle of Excite Scent +PortionNamePlural = bottles of Excite Scent +Pocket = 1 +Price = 800 +FieldUse = OnPokemon +BattleUse = OnPokemon +Description = A cologne that inspires feelings of excitement. It will please a Shadow Pokémon. +#------------------------------- +[VIVIDSCENT] +Name = Vivid Scent +NamePlural = Vivid Scents +PortionName = bottle of Vivid Scent +PortionNamePlural = bottles of Vivid Scent +Pocket = 1 +Price = 1200 +FieldUse = OnPokemon +BattleUse = OnPokemon +Description = A cologne that inspires vivid feelings. It will greatly please a Shadow Pokémon. +#------------------------------- +[TIMEFLUTE] +Name = Time Flute +NamePlural = Time Flutes +Pocket = 1 +Price = 0 +FieldUse = OnPokemon +Description = A marvellous flute that can summon Celebi to instantly purify a Shadow Pokémon. diff --git a/PBS/Shadow Pokémon/moves_shadow_pkmn.txt b/PBS/Shadow Pokémon/moves_shadow_pkmn.txt new file mode 100644 index 000000000..a4f15d034 --- /dev/null +++ b/PBS/Shadow Pokémon/moves_shadow_pkmn.txt @@ -0,0 +1,213 @@ +# See the documentation on the wiki to learn how to edit this file. +#------------------------------- +[SHADOWEND] +Name = Shadow End +Type = SHADOW +Category = Special +Power = 120 +Accuracy = 60 +TotalPP = 0 +Target = NearOther +FunctionCode = UserLosesHalfHP +Flags = Contact,CanProtect +Description = A shadowy aura ram attack that also rebounds on the user. +#------------------------------- +[SHADOWSTORM] +Name = Shadow Storm +Type = SHADOW +Category = Special +Power = 95 +Accuracy = 100 +TotalPP = 0 +Target = AllFoes +FunctionCode = DoublePowerIfTargetUnderwater +Flags = CanProtect +Description = A shadowy aura is used to whip up a vicious tornado. +#------------------------------- +[SHADOWBLAST] +Name = Shadow Blast +Type = SHADOW +Category = Special +Power = 80 +Accuracy = 100 +TotalPP = 0 +Target = NearOther +FunctionCode = None +Flags = CanProtect,HighCriticalHitRate +Description = A wicked blade of air is formed using a shadowy aura. +#------------------------------- +[SHADOWBOLT] +Name = Shadow Bolt +Type = SHADOW +Category = Special +Power = 75 +Accuracy = 100 +TotalPP = 0 +Target = NearOther +FunctionCode = ParalyzeTarget +Flags = CanProtect +EffectChance = 10 +Description = A shadowy thunder attack that may paralyze. +#------------------------------- +[SHADOWBREAK] +Name = Shadow Break +Type = SHADOW +Category = Physical +Power = 75 +Accuracy = 100 +TotalPP = 0 +Target = NearOther +FunctionCode = None +Flags = Contact,CanProtect +Description = A shattering ram attack with a shadowy aura. +#------------------------------- +[SHADOWCHILL] +Name = Shadow Chill +Type = SHADOW +Category = Special +Power = 75 +Accuracy = 100 +TotalPP = 0 +Target = NearOther +FunctionCode = FreezeTarget +Flags = CanProtect +EffectChance = 10 +Description = A shadowy ice attack that may freeze. +#------------------------------- +[SHADOWFIRE] +Name = Shadow Fire +Type = SHADOW +Category = Special +Power = 75 +Accuracy = 100 +TotalPP = 0 +Target = NearOther +FunctionCode = BurnTarget +Flags = CanProtect +EffectChance = 10 +Description = A shadowy fireball attack that may inflict a burn. +#------------------------------- +[SHADOWRAVE] +Name = Shadow Rave +Type = SHADOW +Category = Special +Power = 70 +Accuracy = 100 +TotalPP = 0 +Target = AllFoes +FunctionCode = None +Flags = CanProtect +Description = A shadowy aura in the ground is used to launch spikes. +#------------------------------- +[SHADOWRUSH] +Name = Shadow Rush +Type = SHADOW +Category = Physical +Power = 55 +Accuracy = 100 +TotalPP = 0 +Target = NearOther +FunctionCode = None +Flags = Contact,CanProtect +Description = A reckless move that also hurts the user. +#------------------------------- +[SHADOWWAVE] +Name = Shadow Wave +Type = SHADOW +Category = Special +Power = 50 +Accuracy = 100 +TotalPP = 0 +Target = AllFoes +FunctionCode = None +Flags = CanProtect +Description = Shadowy aura waves are loosed to inflict damage. +#------------------------------- +[SHADOWBLITZ] +Name = Shadow Blitz +Type = SHADOW +Category = Physical +Power = 40 +Accuracy = 100 +TotalPP = 0 +Target = NearOther +FunctionCode = None +Flags = Contact,CanProtect +Description = A Pokémon throws this tackle while casting a shadowy aura. +#------------------------------- +[SHADOWDOWN] +Name = Shadow Down +Type = SHADOW +Category = Status +Accuracy = 100 +TotalPP = 0 +Target = AllFoes +FunctionCode = LowerTargetDefense2 +Flags = CanProtect +Description = A shadowy aura sharply cuts the foe's Defense. +#------------------------------- +[SHADOWHALF] +Name = Shadow Half +Type = SHADOW +Category = Status +Accuracy = 100 +TotalPP = 0 +Target = AllBattlers +FunctionCode = AllBattlersLoseHalfHPUserSkipsNextTurn +Flags = CanProtect +Description = A shadowy aura's energy cuts everyone's HP by half. +#------------------------------- +[SHADOWHOLD] +Name = Shadow Hold +Type = SHADOW +Category = Status +Accuracy = 100 +TotalPP = 0 +Target = AllFoes +FunctionCode = TrapTargetInBattle +Flags = CanProtect +Description = The opponent Pokémon cannot escape. +#------------------------------- +[SHADOWMIST] +Name = Shadow Mist +Type = SHADOW +Category = Status +Accuracy = 100 +TotalPP = 0 +Target = AllFoes +FunctionCode = LowerTargetEvasion2 +Flags = CanProtect +Description = A shadowy aura sharply cuts the foe's evasiveness. +#------------------------------- +[SHADOWPANIC] +Name = Shadow Panic +Type = SHADOW +Category = Status +Accuracy = 90 +TotalPP = 0 +Target = AllFoes +FunctionCode = ConfuseTarget +Flags = CanProtect,Sound +Description = A shadowy aura emanates to confuse the foe. +#------------------------------- +[SHADOWSHED] +Name = Shadow Shed +Type = SHADOW +Category = Status +Accuracy = 100 +TotalPP = 0 +Target = BothSides +FunctionCode = RemoveAllScreens +Flags = CanProtect +Description = A shadowy aura eliminates Reflect and similar moves. +#------------------------------- +[SHADOWSKY] +Name = Shadow Sky +Type = SHADOW +Category = Status +Accuracy = 100 +TotalPP = 0 +Target = BothSides +FunctionCode = StartShadowSkyWeather +Flags = CanProtect +Description = Darkness hurts all but Shadow Pokémon for 5 turns. diff --git a/PBS/shadow_pokemon.txt b/PBS/Shadow Pokémon/shadow_pokemon.txt similarity index 100% rename from PBS/shadow_pokemon.txt rename to PBS/Shadow Pokémon/shadow_pokemon.txt diff --git a/PBS/Shadow Pokémon/types_shadow_pkmn.txt b/PBS/Shadow Pokémon/types_shadow_pkmn.txt new file mode 100644 index 000000000..3486dce89 --- /dev/null +++ b/PBS/Shadow Pokémon/types_shadow_pkmn.txt @@ -0,0 +1,7 @@ +# See the documentation on the wiki to learn how to edit this file. +#------------------------------- +[SHADOW] +Name = Shadow +IconPosition = 19 +IsSpecialType = true +Resistances = SHADOW