From f5bf1f6ab1f50a19f86a8f278bc3fd89e81ca4e9 Mon Sep 17 00:00:00 2001 From: Keyacom <70766223+Keyacom@users.noreply.github.com> Date: Sat, 11 Mar 2023 23:28:04 +0100 Subject: [PATCH 1/5] Remove powder check from Magic Powder (#202) This is already handled by the `Powder` flag on Magic Powder, so this is unneeded. --- .../Scripts/011_Battle/003_Move/007_MoveEffects_BattlerOther.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/Scripts/011_Battle/003_Move/007_MoveEffects_BattlerOther.rb b/Data/Scripts/011_Battle/003_Move/007_MoveEffects_BattlerOther.rb index a5aee6565..b767ac46a 100644 --- a/Data/Scripts/011_Battle/003_Move/007_MoveEffects_BattlerOther.rb +++ b/Data/Scripts/011_Battle/003_Move/007_MoveEffects_BattlerOther.rb @@ -844,7 +844,7 @@ class Battle::Move::SetTargetTypesToPsychic < Battle::Move def pbFailsAgainstTarget?(user, target, show_message) if !target.canChangeType? || !GameData::Type.exists?(:PSYCHIC) || - !target.pbHasOtherType?(:PSYCHIC) || !target.affectedByPowder? + !target.pbHasOtherType?(:PSYCHIC) @battle.pbDisplay(_INTL("But it failed!")) if show_message return true end From 02129f55078ab053b8da71a4cda922eddaebfaff Mon Sep 17 00:00:00 2001 From: FL Date: Sat, 11 Mar 2023 19:52:07 -0300 Subject: [PATCH 2/5] =?UTF-8?q?Fixed=20party=20navigation=20on=20pok=C3=A9?= =?UTF-8?q?mon=20selection=20(#198)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed party navigation on pokémon selection On a selections like Battle Tower's, if player places the cursor into cancel and press up, the cursor doesn't move/loop. This was fixed. Co-authored-by: Maruno17 --- Data/Scripts/016_UI/005_UI_Party.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Data/Scripts/016_UI/005_UI_Party.rb b/Data/Scripts/016_UI/005_UI_Party.rb index 2ec9da17a..2fe9710d9 100644 --- a/Data/Scripts/016_UI/005_UI_Party.rb +++ b/Data/Scripts/016_UI/005_UI_Party.rb @@ -796,7 +796,7 @@ class PokemonParty_Scene when Input::LEFT loop do currentsel -= 1 - break unless currentsel > 0 && currentsel < @party.length && !@party[currentsel] + break unless currentsel > 0 && currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel] end if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE currentsel = @party.length - 1 @@ -805,13 +805,10 @@ class PokemonParty_Scene when Input::RIGHT loop do currentsel += 1 - break unless currentsel < @party.length && !@party[currentsel] + break unless currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel] end - if currentsel == @party.length - currentsel = Settings::MAX_PARTY_SIZE - elsif currentsel == numsprites - currentsel = 0 - currentsel = numsprites - 1 if currentsel >= @party.length + if currentsel == numsprites + currentsel = (@party.length == 0) ? Settings::MAX_PARTY_SIZE : 0 end when Input::UP if currentsel >= Settings::MAX_PARTY_SIZE @@ -819,7 +816,7 @@ class PokemonParty_Scene while currentsel > 0 && currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel] currentsel -= 1 end - currentsel = numsprites - 1 if currentsel >= @party.length + currentsel = numsprites - 1 if currentsel < Settings::MAX_PARTY_SIZE && currentsel >= @party.length else loop do currentsel -= 2 @@ -840,8 +837,7 @@ class PokemonParty_Scene if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE currentsel = Settings::MAX_PARTY_SIZE elsif currentsel >= numsprites - currentsel = 0 - currentsel = numsprites - 1 if currentsel >= @party.length + currentsel = (@party.length == 0) ? Settings::MAX_PARTY_SIZE : 0 end end return currentsel From 7f5aea63bb8e6c0c212b4f5b61e8351ee624f20e Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 11 Mar 2023 23:14:19 +0000 Subject: [PATCH 3/5] shadow_pokemon.txt now supports sections for individual forms of a species --- .../002_PBS data/011_ShadowPokemon.rb | 30 ++++++++++++++++++- .../014_Pokemon/003_Pokemon_ShadowPokemon.rb | 4 +-- .../021_Compiler/002_Compiler_CompilePBS.rb | 10 +++++++ 3 files changed, 40 insertions(+), 4 deletions(-) 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 dca905398..dcd7fa0b1 100644 --- a/Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb +++ b/Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb @@ -1,6 +1,8 @@ module GameData class ShadowPokemon attr_reader :id + attr_reader :species + attr_reader :form attr_reader :moves attr_reader :gauge_size attr_reader :flags @@ -12,7 +14,7 @@ module GameData OPTIONAL = true SCHEMA = { - "SectionName" => [:id, "e", :Species], + "SectionName" => [:id, "eV", :Species], "GaugeSize" => [:gauge_size, "v"], "Moves" => [:moves, "*e", :Move], "Flags" => [:flags, "*s"] @@ -27,8 +29,24 @@ module GameData __orig__load if safeExists?("Data/#{self::DATA_FILENAME}") end + # @param species [Symbol, self, String] + # @param form [Integer] + # @return [self, nil] + def self.get_species_form(species, form) + return nil if !species || !form + validate species => [Symbol, self, String] + validate form => Integer + species = species.species if species.is_a?(self) + 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 + def initialize(hash) @id = hash[:id] + @species = hash[:species] || @id + @form = hash[:form] || 0 @gauge_size = hash[:gauge_size] || HEART_GAUGE_SIZE @moves = hash[:moves] || [] @flags = hash[:flags] || [] @@ -38,5 +56,15 @@ module GameData def has_flag?(flag) return @flags.any? { |f| f.downcase == flag.downcase } end + + alias __orig__get_property_for_PBS get_property_for_PBS unless method_defined?(:__orig__get_property_for_PBS) + def get_property_for_PBS(key) + ret = __orig__get_property_for_PBS(key) + case key + when "SectionName" + ret = [@species, (@form > 0) ? @form : nil] + end + return ret + end end end diff --git a/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb b/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb index 64be5582f..d5d64f321 100644 --- a/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb +++ b/Data/Scripts/014_Pokemon/003_Pokemon_ShadowPokemon.rb @@ -30,9 +30,7 @@ class Pokemon end def shadow_data - ret = GameData::ShadowPokemon.try_get(species_data.id) - ret = GameData::ShadowPokemon.try_get(@species) if !ret - return ret + return GameData::ShadowPokemon.get_species_form(@species, form_simple) end def max_gauge_size diff --git a/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb b/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb index 20c6f07a8..6f694024b 100644 --- a/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb +++ b/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb @@ -551,6 +551,16 @@ module Compiler end def validate_compiled_shadow_pokemon(hash) + # Split species and form into their own values, generate compound ID from them + if hash[:id].is_a?(Array) + hash[:species] = hash[:id][0] + hash[:form] = hash[:id][1] || 0 + if hash[:form] == 0 + hash[:id] = hash[:species] + else + hash[:id] = sprintf("%s_%d", hash[:species].to_s, hash[:form]).to_sym + end + end end def validate_all_compiled_shadow_pokemon From 941e238606415cbb44359cc8fcb63f854980343e Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sun, 12 Mar 2023 12:07:01 +0000 Subject: [PATCH 4/5] Rearranged the Debug menu --- .../003_Debug menus/002_Debug_MenuCommands.rb | 871 +++++++++--------- 1 file changed, 440 insertions(+), 431 deletions(-) diff --git a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb index b1ac11b81..59fb549f6 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb @@ -38,13 +38,12 @@ MenuHandlers.add(:debug_menu, :warp, { } }) -MenuHandlers.add(:debug_menu, :refresh_map, { - "name" => _INTL("Refresh Map"), +MenuHandlers.add(:debug_menu, :use_pc, { + "name" => _INTL("Use PC"), "parent" => :field_menu, - "description" => _INTL("Make all events on this map, and common events, refresh themselves."), + "description" => _INTL("Use a PC to access Pokémon storage and player's PC."), "effect" => proc { - $game_map.need_refresh = true - pbMessage(_INTL("The map will refresh.")) + pbPokeCenterPC } }) @@ -66,12 +65,40 @@ MenuHandlers.add(:debug_menu, :variables, { } }) -MenuHandlers.add(:debug_menu, :use_pc, { - "name" => _INTL("Use PC"), +MenuHandlers.add(:debug_menu, :refresh_map, { + "name" => _INTL("Refresh Map"), "parent" => :field_menu, - "description" => _INTL("Use a PC to access Pokémon storage and player's PC."), + "description" => _INTL("Make all events on this map, and common events, refresh themselves."), "effect" => proc { - pbPokeCenterPC + $game_map.need_refresh = true + pbMessage(_INTL("The map will refresh.")) + } +}) + +MenuHandlers.add(:debug_menu, :day_care, { + "name" => _INTL("Day Care"), + "parent" => :field_menu, + "description" => _INTL("View Pokémon in the Day Care and edit them."), + "effect" => proc { + pbDebugDayCare + } +}) + +MenuHandlers.add(:debug_menu, :relic_stone, { + "name" => _INTL("Use Relic Stone"), + "parent" => :field_menu, + "description" => _INTL("Shadow Pokémon. Choose a Pokémon to show to the Relic Stone for purification."), + "effect" => proc { + pbRelicStone + } +}) + +MenuHandlers.add(:debug_menu, :purify_chamber, { + "name" => _INTL("Use Purify Chamber"), + "parent" => :field_menu, + "description" => _INTL("Shadow Pokémon. Open the Purify Chamber for purification."), + "effect" => proc { + pbPurifyChamber } }) @@ -113,15 +140,6 @@ MenuHandlers.add(:debug_menu, :storage_wallpapers, { } }) -MenuHandlers.add(:debug_menu, :day_care, { - "name" => _INTL("Day Care"), - "parent" => :field_menu, - "description" => _INTL("View Pokémon in the Day Care and edit them."), - "effect" => proc { - pbDebugDayCare - } -}) - MenuHandlers.add(:debug_menu, :skip_credits, { "name" => _INTL("Skip Credits"), "parent" => :field_menu, @@ -133,24 +151,6 @@ MenuHandlers.add(:debug_menu, :skip_credits, { } }) -MenuHandlers.add(:debug_menu, :relic_stone, { - "name" => _INTL("Use Relic Stone"), - "parent" => :field_menu, - "description" => _INTL("Shadow Pokémon. Choose a Pokémon to show to the Relic Stone for purification."), - "effect" => proc { - pbRelicStone - } -}) - -MenuHandlers.add(:debug_menu, :purify_chamber, { - "name" => _INTL("Use Purify Chamber"), - "parent" => :field_menu, - "description" => _INTL("Shadow Pokémon. Open the Purify Chamber for purification."), - "effect" => proc { - pbPurifyChamber - } -}) - #=============================================================================== # Battle options #=============================================================================== @@ -357,34 +357,26 @@ MenuHandlers.add(:debug_menu, :test_trainer_battle_advanced, { } }) -MenuHandlers.add(:debug_menu, :toggle_logging, { - "name" => _INTL("Toggle Battle Logging"), +MenuHandlers.add(:debug_menu, :encounter_version, { + "name" => _INTL("Set Encounters Version"), "parent" => :battle_menu, - "description" => _INTL("Record debug logs for battles in Data/debuglog.txt."), + "description" => _INTL("Choose which version of wild encounters should be used."), "effect" => proc { - $INTERNAL = !$INTERNAL - pbMessage(_INTL("Debug logs for battles will be made in the Data folder.")) if $INTERNAL - pbMessage(_INTL("Debug logs for battles will not be made.")) if !$INTERNAL + params = ChooseNumberParams.new + params.setRange(0, 99) + params.setInitialValue($PokemonGlobal.encounter_version) + params.setCancelValue(-1) + value = pbMessageChooseNumber(_INTL("Set encounters version to which value?"), params) + $PokemonGlobal.encounter_version = value if value >= 0 } }) -MenuHandlers.add(:debug_menu, :reset_trainers, { - "name" => _INTL("Reset Map's Trainers"), +MenuHandlers.add(:debug_menu, :roamers, { + "name" => _INTL("Roaming Pokémon"), "parent" => :battle_menu, - "description" => _INTL("Turn off Self Switches A and B for all events with \"Trainer\" in their name."), + "description" => _INTL("Toggle and edit all roaming Pokémon."), "effect" => proc { - if $game_map - $game_map.events.each_value do |event| - if event.name[/trainer/i] - $game_self_switches[[$game_map.map_id, event.id, "A"]] = false - $game_self_switches[[$game_map.map_id, event.id, "B"]] = false - end - end - $game_map.need_refresh = true - pbMessage(_INTL("All Trainers on this map were reset.")) - else - pbMessage(_INTL("This command can't be used here.")) - end + pbDebugRoamers } }) @@ -417,26 +409,218 @@ MenuHandlers.add(:debug_menu, :ready_rematches, { } }) -MenuHandlers.add(:debug_menu, :roamers, { - "name" => _INTL("Roaming Pokémon"), +MenuHandlers.add(:debug_menu, :reset_trainers, { + "name" => _INTL("Reset Map's Trainers"), "parent" => :battle_menu, - "description" => _INTL("Toggle and edit all roaming Pokémon."), + "description" => _INTL("Turn off Self Switches A and B for all events with \"Trainer\" in their name."), "effect" => proc { - pbDebugRoamers + if $game_map + $game_map.events.each_value do |event| + if event.name[/trainer/i] + $game_self_switches[[$game_map.map_id, event.id, "A"]] = false + $game_self_switches[[$game_map.map_id, event.id, "B"]] = false + end + end + $game_map.need_refresh = true + pbMessage(_INTL("All Trainers on this map were reset.")) + else + pbMessage(_INTL("This command can't be used here.")) + end } }) -MenuHandlers.add(:debug_menu, :encounter_version, { - "name" => _INTL("Set Encounters Version"), +MenuHandlers.add(:debug_menu, :toggle_exp_all, { + "name" => _INTL("Toggle Exp. All's Effect"), "parent" => :battle_menu, - "description" => _INTL("Choose which version of wild encounters should be used."), + "description" => _INTL("Toggle Exp. All's effect of giving Exp. to non-participants."), "effect" => proc { - params = ChooseNumberParams.new - params.setRange(0, 99) - params.setInitialValue($PokemonGlobal.encounter_version) - params.setCancelValue(-1) - value = pbMessageChooseNumber(_INTL("Set encounters version to which value?"), params) - $PokemonGlobal.encounter_version = value if value >= 0 + $player.has_exp_all = !$player.has_exp_all + pbMessage(_INTL("Enabled Exp. All's effect.")) if $player.has_exp_all + pbMessage(_INTL("Disabled Exp. All's effect.")) if !$player.has_exp_all + } +}) + +MenuHandlers.add(:debug_menu, :toggle_logging, { + "name" => _INTL("Toggle Battle Logging"), + "parent" => :battle_menu, + "description" => _INTL("Record debug logs for battles in Data/debuglog.txt."), + "effect" => proc { + $INTERNAL = !$INTERNAL + pbMessage(_INTL("Debug logs for battles will be made in the Data folder.")) if $INTERNAL + pbMessage(_INTL("Debug logs for battles will not be made.")) if !$INTERNAL + } +}) + +#=============================================================================== +# Pokémon options +#=============================================================================== +MenuHandlers.add(:debug_menu, :pokemon_menu, { + "name" => _INTL("Pokémon Options..."), + "parent" => :main, + "description" => _INTL("Heal the party, give Pokémon, fill/empty PC storage, etc."), + "always_show" => false +}) + +MenuHandlers.add(:debug_menu, :heal_party, { + "name" => _INTL("Heal Party"), + "parent" => :pokemon_menu, + "description" => _INTL("Fully heal the HP/status/PP of all Pokémon in the party."), + "effect" => proc { + $player.party.each { |pkmn| pkmn.heal } + pbMessage(_INTL("Your Pokémon were fully healed.")) + } +}) + +MenuHandlers.add(:debug_menu, :add_pokemon, { + "name" => _INTL("Add Pokémon"), + "parent" => :pokemon_menu, + "description" => _INTL("Give yourself a Pokémon of a chosen species/level. Goes to PC if party is full."), + "effect" => proc { + species = pbChooseSpeciesList + if species + params = ChooseNumberParams.new + params.setRange(1, GameData::GrowthRate.max_level) + params.setInitialValue(5) + params.setCancelValue(0) + level = pbMessageChooseNumber(_INTL("Set the Pokémon's level."), params) + if level > 0 + goes_to_party = !$player.party_full? + if pbAddPokemonSilent(species, level) + if goes_to_party + pbMessage(_INTL("Added {1} to party.", GameData::Species.get(species).name)) + else + pbMessage(_INTL("Added {1} to Pokémon storage.", GameData::Species.get(species).name)) + end + else + pbMessage(_INTL("Couldn't add Pokémon because party and storage are full.")) + end + end + end + } +}) + +MenuHandlers.add(:debug_menu, :fill_boxes, { + "name" => _INTL("Fill Storage Boxes"), + "parent" => :pokemon_menu, + "description" => _INTL("Puts one Pokémon of each species (at Level 50) in storage."), + "effect" => proc { + added = 0 + box_qty = $PokemonStorage.maxPokemon(0) + completed = true + GameData::Species.each do |species_data| + sp = species_data.species + f = species_data.form + # Record each form of each species as seen and owned + if f == 0 + if species_data.single_gendered? + g = (species_data.gender_ratio == :AlwaysFemale) ? 1 : 0 + $player.pokedex.register(sp, g, f, 0, false) + $player.pokedex.register(sp, g, f, 1, false) + else # Both male and female + $player.pokedex.register(sp, 0, f, 0, false) + $player.pokedex.register(sp, 0, f, 1, false) + $player.pokedex.register(sp, 1, f, 0, false) + $player.pokedex.register(sp, 1, f, 1, false) + end + $player.pokedex.set_owned(sp, false) + elsif species_data.real_form_name && !species_data.real_form_name.empty? + g = (species_data.gender_ratio == :AlwaysFemale) ? 1 : 0 + $player.pokedex.register(sp, g, f, 0, false) + $player.pokedex.register(sp, g, f, 1, false) + end + # Add Pokémon (if form 0, i.e. one of each species) + next if f != 0 + if added >= Settings::NUM_STORAGE_BOXES * box_qty + completed = false + next + end + added += 1 + $PokemonStorage[(added - 1) / box_qty, (added - 1) % box_qty] = Pokemon.new(sp, 50) + end + $player.pokedex.refresh_accessible_dexes + pbMessage(_INTL("Storage boxes were filled with one Pokémon of each species.")) + if !completed + pbMessage(_INTL("Note: The number of storage spaces ({1} boxes of {2}) is less than the number of species.", + Settings::NUM_STORAGE_BOXES, box_qty)) + end + } +}) + +MenuHandlers.add(:debug_menu, :clear_boxes, { + "name" => _INTL("Clear Storage Boxes"), + "parent" => :pokemon_menu, + "description" => _INTL("Remove all Pokémon in storage."), + "effect" => proc { + $PokemonStorage.maxBoxes.times do |i| + $PokemonStorage.maxPokemon(i).times do |j| + $PokemonStorage[i, j] = nil + end + end + pbMessage(_INTL("The storage boxes were cleared.")) + } +}) + +MenuHandlers.add(:debug_menu, :give_demo_party, { + "name" => _INTL("Give Demo Party"), + "parent" => :pokemon_menu, + "description" => _INTL("Give yourself 6 preset Pokémon. They overwrite the current party."), + "effect" => proc { + party = [] + species = [:PIKACHU, :PIDGEOTTO, :KADABRA, :GYARADOS, :DIGLETT, :CHANSEY] + species.each { |id| party.push(id) if GameData::Species.exists?(id) } + $player.party.clear + # Generate Pokémon of each species at level 20 + party.each do |spec| + pkmn = Pokemon.new(spec, 20) + $player.party.push(pkmn) + $player.pokedex.register(pkmn) + $player.pokedex.set_owned(spec) + case spec + when :PIDGEOTTO + pkmn.learn_move(:FLY) + when :KADABRA + pkmn.learn_move(:FLASH) + pkmn.learn_move(:TELEPORT) + when :GYARADOS + pkmn.learn_move(:SURF) + pkmn.learn_move(:DIVE) + pkmn.learn_move(:WATERFALL) + when :DIGLETT + pkmn.learn_move(:DIG) + pkmn.learn_move(:CUT) + pkmn.learn_move(:HEADBUTT) + pkmn.learn_move(:ROCKSMASH) + when :CHANSEY + pkmn.learn_move(:SOFTBOILED) + pkmn.learn_move(:STRENGTH) + pkmn.learn_move(:SWEETSCENT) + end + pkmn.record_first_moves + end + pbMessage(_INTL("Filled party with demo Pokémon.")) + } +}) + +MenuHandlers.add(:debug_menu, :quick_hatch_party_eggs, { + "name" => _INTL("Quick Hatch"), + "parent" => :pokemon_menu, + "description" => _INTL("Make all eggs in the party require just one more step to hatch."), + "effect" => proc { + $player.party.each { |pkmn| pkmn.steps_to_hatch = 1 if pkmn.egg? } + pbMessage(_INTL("All eggs in your party now require one step to hatch.")) + } +}) + +MenuHandlers.add(:debug_menu, :open_storage, { + "name" => _INTL("Access Pokémon Storage"), + "parent" => :pokemon_menu, + "description" => _INTL("Opens the Pokémon storage boxes in Organize Boxes mode."), + "effect" => proc { + pbFadeOutIn do + scene = PokemonStorageScene.new + screen = PokemonStorageScreen.new(scene, $PokemonStorage) + screen.pbStartScreen(0) + end } }) @@ -511,179 +695,6 @@ MenuHandlers.add(:debug_menu, :empty_bag, { } }) -#=============================================================================== -# Pokémon options -#=============================================================================== -MenuHandlers.add(:debug_menu, :pokemon_menu, { - "name" => _INTL("Pokémon Options..."), - "parent" => :main, - "description" => _INTL("Give Pokémon, heal party, fill/empty PC storage, etc."), - "always_show" => false -}) - -MenuHandlers.add(:debug_menu, :add_pokemon, { - "name" => _INTL("Add Pokémon"), - "parent" => :pokemon_menu, - "description" => _INTL("Give yourself a Pokémon of a chosen species/level. Goes to PC if party is full."), - "effect" => proc { - species = pbChooseSpeciesList - if species - params = ChooseNumberParams.new - params.setRange(1, GameData::GrowthRate.max_level) - params.setInitialValue(5) - params.setCancelValue(0) - level = pbMessageChooseNumber(_INTL("Set the Pokémon's level."), params) - if level > 0 - goes_to_party = !$player.party_full? - if pbAddPokemonSilent(species, level) - if goes_to_party - pbMessage(_INTL("Added {1} to party.", GameData::Species.get(species).name)) - else - pbMessage(_INTL("Added {1} to Pokémon storage.", GameData::Species.get(species).name)) - end - else - pbMessage(_INTL("Couldn't add Pokémon because party and storage are full.")) - end - end - end - } -}) - -MenuHandlers.add(:debug_menu, :give_demo_party, { - "name" => _INTL("Give Demo Party"), - "parent" => :pokemon_menu, - "description" => _INTL("Give yourself 6 preset Pokémon. They overwrite the current party."), - "effect" => proc { - party = [] - species = [:PIKACHU, :PIDGEOTTO, :KADABRA, :GYARADOS, :DIGLETT, :CHANSEY] - species.each { |id| party.push(id) if GameData::Species.exists?(id) } - $player.party.clear - # Generate Pokémon of each species at level 20 - party.each do |spec| - pkmn = Pokemon.new(spec, 20) - $player.party.push(pkmn) - $player.pokedex.register(pkmn) - $player.pokedex.set_owned(spec) - case spec - when :PIDGEOTTO - pkmn.learn_move(:FLY) - when :KADABRA - pkmn.learn_move(:FLASH) - pkmn.learn_move(:TELEPORT) - when :GYARADOS - pkmn.learn_move(:SURF) - pkmn.learn_move(:DIVE) - pkmn.learn_move(:WATERFALL) - when :DIGLETT - pkmn.learn_move(:DIG) - pkmn.learn_move(:CUT) - pkmn.learn_move(:HEADBUTT) - pkmn.learn_move(:ROCKSMASH) - when :CHANSEY - pkmn.learn_move(:SOFTBOILED) - pkmn.learn_move(:STRENGTH) - pkmn.learn_move(:SWEETSCENT) - end - pkmn.record_first_moves - end - pbMessage(_INTL("Filled party with demo Pokémon.")) - } -}) - -MenuHandlers.add(:debug_menu, :heal_party, { - "name" => _INTL("Heal Party"), - "parent" => :pokemon_menu, - "description" => _INTL("Fully heal the HP/status/PP of all Pokémon in the party."), - "effect" => proc { - $player.party.each { |pkmn| pkmn.heal } - pbMessage(_INTL("Your Pokémon were fully healed.")) - } -}) - -MenuHandlers.add(:debug_menu, :quick_hatch_party_eggs, { - "name" => _INTL("Quick Hatch"), - "parent" => :pokemon_menu, - "description" => _INTL("Make all eggs in the party require just one more step to hatch."), - "effect" => proc { - $player.party.each { |pkmn| pkmn.steps_to_hatch = 1 if pkmn.egg? } - pbMessage(_INTL("All eggs in your party now require one step to hatch.")) - } -}) - -MenuHandlers.add(:debug_menu, :fill_boxes, { - "name" => _INTL("Fill Storage Boxes"), - "parent" => :pokemon_menu, - "description" => _INTL("Puts one Pokémon of each species (at Level 50) in storage."), - "effect" => proc { - added = 0 - box_qty = $PokemonStorage.maxPokemon(0) - completed = true - GameData::Species.each do |species_data| - sp = species_data.species - f = species_data.form - # Record each form of each species as seen and owned - if f == 0 - if species_data.single_gendered? - g = (species_data.gender_ratio == :AlwaysFemale) ? 1 : 0 - $player.pokedex.register(sp, g, f, 0, false) - $player.pokedex.register(sp, g, f, 1, false) - else # Both male and female - $player.pokedex.register(sp, 0, f, 0, false) - $player.pokedex.register(sp, 0, f, 1, false) - $player.pokedex.register(sp, 1, f, 0, false) - $player.pokedex.register(sp, 1, f, 1, false) - end - $player.pokedex.set_owned(sp, false) - elsif species_data.real_form_name && !species_data.real_form_name.empty? - g = (species_data.gender_ratio == :AlwaysFemale) ? 1 : 0 - $player.pokedex.register(sp, g, f, 0, false) - $player.pokedex.register(sp, g, f, 1, false) - end - # Add Pokémon (if form 0, i.e. one of each species) - next if f != 0 - if added >= Settings::NUM_STORAGE_BOXES * box_qty - completed = false - next - end - added += 1 - $PokemonStorage[(added - 1) / box_qty, (added - 1) % box_qty] = Pokemon.new(sp, 50) - end - $player.pokedex.refresh_accessible_dexes - pbMessage(_INTL("Storage boxes were filled with one Pokémon of each species.")) - if !completed - pbMessage(_INTL("Note: The number of storage spaces ({1} boxes of {2}) is less than the number of species.", - Settings::NUM_STORAGE_BOXES, box_qty)) - end - } -}) - -MenuHandlers.add(:debug_menu, :clear_boxes, { - "name" => _INTL("Clear Storage Boxes"), - "parent" => :pokemon_menu, - "description" => _INTL("Remove all Pokémon in storage."), - "effect" => proc { - $PokemonStorage.maxBoxes.times do |i| - $PokemonStorage.maxPokemon(i).times do |j| - $PokemonStorage[i, j] = nil - end - end - pbMessage(_INTL("The storage boxes were cleared.")) - } -}) - -MenuHandlers.add(:debug_menu, :open_storage, { - "name" => _INTL("Access Pokémon Storage"), - "parent" => :pokemon_menu, - "description" => _INTL("Opens the Pokémon storage boxes in Organize Boxes mode."), - "effect" => proc { - pbFadeOutIn do - scene = PokemonStorageScene.new - screen = PokemonStorageScreen.new(scene, $PokemonStorage) - screen.pbStartScreen(0) - end - } -}) - #=============================================================================== # Player options #=============================================================================== @@ -694,33 +705,6 @@ MenuHandlers.add(:debug_menu, :player_menu, { "always_show" => false }) -MenuHandlers.add(:debug_menu, :set_badges, { - "name" => _INTL("Set Badges"), - "parent" => :player_menu, - "description" => _INTL("Toggle possession of each Gym Badge."), - "effect" => proc { - badgecmd = 0 - loop do - badgecmds = [] - badgecmds.push(_INTL("Give all")) - badgecmds.push(_INTL("Remove all")) - 24.times do |i| - badgecmds.push(_INTL("{1} Badge {2}", $player.badges[i] ? "[Y]" : "[ ]", i + 1)) - end - badgecmd = pbShowCommands(nil, badgecmds, -1, badgecmd) - break if badgecmd < 0 - case badgecmd - when 0 # Give all - 24.times { |i| $player.badges[i] = true } - when 1 # Remove all - 24.times { |i| $player.badges[i] = false } - else - $player.badges[badgecmd - 2] = !$player.badges[badgecmd - 2] - end - end - } -}) - MenuHandlers.add(:debug_menu, :set_money, { "name" => _INTL("Set Money"), "parent" => :player_menu, @@ -760,6 +744,33 @@ MenuHandlers.add(:debug_menu, :set_bp, { } }) +MenuHandlers.add(:debug_menu, :set_badges, { + "name" => _INTL("Set Badges"), + "parent" => :player_menu, + "description" => _INTL("Toggle possession of each Gym Badge."), + "effect" => proc { + badgecmd = 0 + loop do + badgecmds = [] + badgecmds.push(_INTL("Give all")) + badgecmds.push(_INTL("Remove all")) + 24.times do |i| + badgecmds.push(_INTL("{1} Badge {2}", $player.badges[i] ? "[Y]" : "[ ]", i + 1)) + end + badgecmd = pbShowCommands(nil, badgecmds, -1, badgecmd) + break if badgecmd < 0 + case badgecmd + when 0 # Give all + 24.times { |i| $player.badges[i] = true } + when 1 # Remove all + 24.times { |i| $player.badges[i] = false } + else + $player.badges[badgecmd - 2] = !$player.badges[badgecmd - 2] + end + end + } +}) + MenuHandlers.add(:debug_menu, :toggle_running_shoes, { "name" => _INTL("Toggle Running Shoes"), "parent" => :player_menu, @@ -771,17 +782,6 @@ MenuHandlers.add(:debug_menu, :toggle_running_shoes, { } }) -MenuHandlers.add(:debug_menu, :toggle_pokegear, { - "name" => _INTL("Toggle Pokégear"), - "parent" => :player_menu, - "description" => _INTL("Toggle possession of the Pokégear."), - "effect" => proc { - $player.has_pokegear = !$player.has_pokegear - pbMessage(_INTL("Gave Pokégear.")) if $player.has_pokegear - pbMessage(_INTL("Lost Pokégear.")) if !$player.has_pokegear - } -}) - MenuHandlers.add(:debug_menu, :toggle_pokedex, { "name" => _INTL("Toggle Pokédex and Dexes"), "parent" => :player_menu, @@ -811,6 +811,17 @@ MenuHandlers.add(:debug_menu, :toggle_pokedex, { } }) +MenuHandlers.add(:debug_menu, :toggle_pokegear, { + "name" => _INTL("Toggle Pokégear"), + "parent" => :player_menu, + "description" => _INTL("Toggle possession of the Pokégear."), + "effect" => proc { + $player.has_pokegear = !$player.has_pokegear + pbMessage(_INTL("Gave Pokégear.")) if $player.has_pokegear + pbMessage(_INTL("Lost Pokégear.")) if !$player.has_pokegear + } +}) + MenuHandlers.add(:debug_menu, :toggle_box_link, { "name" => _INTL("Toggle Pokémon Box Link's Effect"), "parent" => :player_menu, @@ -822,17 +833,6 @@ MenuHandlers.add(:debug_menu, :toggle_box_link, { } }) -MenuHandlers.add(:debug_menu, :toggle_exp_all, { - "name" => _INTL("Toggle Exp. All's Effect"), - "parent" => :player_menu, - "description" => _INTL("Toggle Exp. All's effect of giving Exp. to non-participants."), - "effect" => proc { - $player.has_exp_all = !$player.has_exp_all - pbMessage(_INTL("Enabled Exp. All's effect.")) if $player.has_exp_all - pbMessage(_INTL("Disabled Exp. All's effect.")) if !$player.has_exp_all - } -}) - MenuHandlers.add(:debug_menu, :set_player_character, { "name" => _INTL("Set Player Character"), "parent" => :player_menu, @@ -903,80 +903,71 @@ MenuHandlers.add(:debug_menu, :random_id, { }) #=============================================================================== -# Information editors +# PBS file editors #=============================================================================== -MenuHandlers.add(:debug_menu, :editors_menu, { - "name" => _INTL("Information Editors..."), +MenuHandlers.add(:debug_menu, :pbs_editors_menu, { + "name" => _INTL("PBS File Editors..."), "parent" => :main, - "description" => _INTL("Edit information in the PBS files, terrain tags, battle animations, etc.") -}) - -MenuHandlers.add(:debug_menu, :set_metadata, { - "name" => _INTL("Edit Metadata"), - "parent" => :editors_menu, - "description" => _INTL("Edit global metadata and player character metadata."), - "effect" => proc { - pbMetadataScreen - } -}) - -MenuHandlers.add(:debug_menu, :set_map_metadata, { - "name" => _INTL("Edit Map Metadata"), - "parent" => :editors_menu, - "description" => _INTL("Edit map metadata."), - "effect" => proc { - pbMapMetadataScreen(pbDefaultMap) - } + "description" => _INTL("Edit information in the PBS files.") }) MenuHandlers.add(:debug_menu, :set_map_connections, { - "name" => _INTL("Edit Map Connections"), - "parent" => :editors_menu, + "name" => _INTL("Edit map_connections.txt"), + "parent" => :pbs_editors_menu, "description" => _INTL("Connect maps using a visual interface. Can also edit map encounters/metadata."), "effect" => proc { pbFadeOutIn { pbConnectionsEditor } } }) -MenuHandlers.add(:debug_menu, :set_terrain_tags, { - "name" => _INTL("Edit Terrain Tags"), - "parent" => :editors_menu, - "description" => _INTL("Edit the terrain tags of tiles in tilesets. Required for tags 8+."), - "effect" => proc { - pbFadeOutIn { pbTilesetScreen } - } -}) - MenuHandlers.add(:debug_menu, :set_encounters, { - "name" => _INTL("Edit Wild Encounters"), - "parent" => :editors_menu, + "name" => _INTL("Edit encounters.txt"), + "parent" => :pbs_editors_menu, "description" => _INTL("Edit the wild Pokémon that can be found on maps, and how they are encountered."), "effect" => proc { pbFadeOutIn { pbEncountersEditor } } }) -MenuHandlers.add(:debug_menu, :set_trainer_types, { - "name" => _INTL("Edit Trainer Types"), - "parent" => :editors_menu, - "description" => _INTL("Edit the properties of trainer types."), - "effect" => proc { - pbFadeOutIn { pbTrainerTypeEditor } - } -}) - MenuHandlers.add(:debug_menu, :set_trainers, { - "name" => _INTL("Edit Individual Trainers"), - "parent" => :editors_menu, + "name" => _INTL("Edit trainers.txt"), + "parent" => :pbs_editors_menu, "description" => _INTL("Edit individual trainers, their Pokémon and items."), "effect" => proc { pbFadeOutIn { pbTrainerBattleEditor } } }) +MenuHandlers.add(:debug_menu, :set_trainer_types, { + "name" => _INTL("Edit trainer_types.txt"), + "parent" => :pbs_editors_menu, + "description" => _INTL("Edit the properties of trainer types."), + "effect" => proc { + pbFadeOutIn { pbTrainerTypeEditor } + } +}) + +MenuHandlers.add(:debug_menu, :set_map_metadata, { + "name" => _INTL("Edit map_metadata.txt"), + "parent" => :pbs_editors_menu, + "description" => _INTL("Edit map metadata."), + "effect" => proc { + pbMapMetadataScreen(pbDefaultMap) + } +}) + +MenuHandlers.add(:debug_menu, :set_metadata, { + "name" => _INTL("Edit metadata.txt"), + "parent" => :pbs_editors_menu, + "description" => _INTL("Edit global metadata and player character metadata."), + "effect" => proc { + pbMetadataScreen + } +}) + MenuHandlers.add(:debug_menu, :set_items, { - "name" => _INTL("Edit Items"), - "parent" => :editors_menu, + "name" => _INTL("Edit items.txt"), + "parent" => :pbs_editors_menu, "description" => _INTL("Edit item data."), "effect" => proc { pbFadeOutIn { pbItemEditor } @@ -984,26 +975,17 @@ MenuHandlers.add(:debug_menu, :set_items, { }) MenuHandlers.add(:debug_menu, :set_species, { - "name" => _INTL("Edit Pokémon Species"), - "parent" => :editors_menu, + "name" => _INTL("Edit pokemon.txt"), + "parent" => :pbs_editors_menu, "description" => _INTL("Edit Pokémon species data."), "effect" => proc { pbFadeOutIn { pbPokemonEditor } } }) -MenuHandlers.add(:debug_menu, :set_pokedex_lists, { - "name" => _INTL("Edit Regional Dexes"), - "parent" => :editors_menu, - "description" => _INTL("Create, rearrange and delete Regional Pokédex lists."), - "effect" => proc { - pbFadeOutIn { pbRegionalDexEditorMain } - } -}) - MenuHandlers.add(:debug_menu, :position_sprites, { - "name" => _INTL("Edit Pokémon Sprite Positions"), - "parent" => :editors_menu, + "name" => _INTL("Edit pokemon_metrics.txt"), + "parent" => :pbs_editors_menu, "description" => _INTL("Reposition Pokémon sprites in battle."), "effect" => proc { pbFadeOutIn do @@ -1015,8 +997,8 @@ MenuHandlers.add(:debug_menu, :position_sprites, { }) MenuHandlers.add(:debug_menu, :auto_position_sprites, { - "name" => _INTL("Auto-Position All Pokémon Sprites"), - "parent" => :editors_menu, + "name" => _INTL("Auto-Set pokemon_metrics.txts"), + "parent" => :pbs_editors_menu, "description" => _INTL("Automatically reposition all Pokémon sprites in battle. Don't use lightly."), "effect" => proc { if pbConfirmMessage(_INTL("Are you sure you want to reposition all sprites?")) @@ -1029,6 +1011,24 @@ MenuHandlers.add(:debug_menu, :auto_position_sprites, { } }) +MenuHandlers.add(:debug_menu, :set_pokedex_lists, { + "name" => _INTL("Edit regional_dexes.txt"), + "parent" => :pbs_editors_menu, + "description" => _INTL("Create, rearrange and delete Regional Pokédex lists."), + "effect" => proc { + pbFadeOutIn { pbRegionalDexEditorMain } + } +}) + +#=============================================================================== +# Other editors +#=============================================================================== +MenuHandlers.add(:debug_menu, :editors_menu, { + "name" => _INTL("Other Editors..."), + "parent" => :main, + "description" => _INTL("Edit battle animations, terrain tags, map data, etc.") +}) + MenuHandlers.add(:debug_menu, :animation_editor, { "name" => _INTL("Battle Animation Editor"), "parent" => :editors_menu, @@ -1065,78 +1065,31 @@ MenuHandlers.add(:debug_menu, :export_animations, { } }) +MenuHandlers.add(:debug_menu, :set_terrain_tags, { + "name" => _INTL("Edit Terrain Tags"), + "parent" => :editors_menu, + "description" => _INTL("Edit the terrain tags of tiles in tilesets. Required for tags 8+."), + "effect" => proc { + pbFadeOutIn { pbTilesetScreen } + } +}) + +MenuHandlers.add(:debug_menu, :fix_invalid_tiles, { + "name" => _INTL("Fix Invalid Tiles"), + "parent" => :editors_menu, + "description" => _INTL("Scans all maps and erases non-existent tiles."), + "effect" => proc { + pbDebugFixInvalidTiles + } +}) + #=============================================================================== # Other options #=============================================================================== MenuHandlers.add(:debug_menu, :other_menu, { - "name" => _INTL("Other Options..."), + "name" => _INTL("File Management Options..."), "parent" => :main, - "description" => _INTL("Mystery Gifts, translations, compile data, etc.") -}) - -MenuHandlers.add(:debug_menu, :mystery_gift, { - "name" => _INTL("Manage Mystery Gifts"), - "parent" => :other_menu, - "description" => _INTL("Edit and enable/disable Mystery Gifts."), - "effect" => proc { - pbManageMysteryGifts - } -}) - -MenuHandlers.add(:debug_menu, :extract_text, { - "name" => _INTL("Extract Text For Translation"), - "parent" => :other_menu, - "description" => _INTL("Extract all text in the game to text files for translating."), - "effect" => proc { - if Settings::LANGUAGES.length == 0 - pbMessage(_INTL("No languages are defined in the LANGUAGES array in Settings.")) - pbMessage(_INTL("You need to add at least one language to LANGUAGES first, to choose which one to extract text for.")) - next - end - # Choose a language from Settings to name the extraction folder after - cmds = [] - Settings::LANGUAGES.each { |val| cmds.push(val[0]) } - cmds.push(_INTL("Cancel")) - language_index = pbMessage(_INTL("Choose a language to extract text for."), cmds, cmds.length) - next if language_index == cmds.length - 1 - language_name = Settings::LANGUAGES[language_index][1] - # Choose whether to extract core text or game text - text_type = pbMessage(_INTL("Choose a language to extract text for."), - [_INTL("Game-specific text"), _INTL("Core text"), _INTL("Cancel")], 3) - next if text_type == 2 - # If game text, choose whether to extract map texts to map-specific files or - # to one big file - map_files = 0 - if text_type == 0 - map_files = pbMessage(_INTL("How many text files should map event texts be extracted to?"), - [_INTL("One big file"), _INTL("One file per map"), _INTL("Cancel")], 3) - next if map_files == 2 - end - # Extract the chosen set of text for the chosen language - Translator.extract_text(language_name, text_type == 1, map_files == 1) - } -}) - -MenuHandlers.add(:debug_menu, :compile_text, { - "name" => _INTL("Compile Translated Text"), - "parent" => :other_menu, - "description" => _INTL("Import text files and convert them into a language file."), - "effect" => proc { - # Find all folders with a particular naming convention - cmds = Dir.glob("Text_*_*") - if cmds.length == 0 - pbMessage(_INTL("No language folders found to compile.")) - pbMessage(_INTL("Language folders must be named \"Text_SOMETHING_core\" or \"Text_SOMETHING_game\" and be in the root folder.")) - next - end - cmds.push(_INTL("Cancel")) - # Ask which folder to compile into a .dat file - folder_index = pbMessage(_INTL("Choose a language folder to compile."), cmds, cmds.length) - next if folder_index == cmds.length - 1 - # Compile the text files in the chosen folder - dat_filename = cmds[folder_index].gsub!(/^Text_/, "") - Translator.compile_text(cmds[folder_index], dat_filename) - } + "description" => _INTL("Compile, generate PBS files, translations, Mystery Gifts, etc.") }) MenuHandlers.add(:debug_menu, :compile_data, { @@ -1215,15 +1168,6 @@ MenuHandlers.add(:debug_menu, :create_pbs_files, { } }) -MenuHandlers.add(:debug_menu, :fix_invalid_tiles, { - "name" => _INTL("Fix Invalid Tiles"), - "parent" => :other_menu, - "description" => _INTL("Scans all maps and erases non-existent tiles."), - "effect" => proc { - pbDebugFixInvalidTiles - } -}) - MenuHandlers.add(:debug_menu, :rename_files, { "name" => _INTL("Rename Outdated Files"), "parent" => :other_menu, @@ -1236,6 +1180,71 @@ MenuHandlers.add(:debug_menu, :rename_files, { } }) +MenuHandlers.add(:debug_menu, :extract_text, { + "name" => _INTL("Extract Text For Translation"), + "parent" => :other_menu, + "description" => _INTL("Extract all text in the game to text files for translating."), + "effect" => proc { + if Settings::LANGUAGES.length == 0 + pbMessage(_INTL("No languages are defined in the LANGUAGES array in Settings.")) + pbMessage(_INTL("You need to add at least one language to LANGUAGES first, to choose which one to extract text for.")) + next + end + # Choose a language from Settings to name the extraction folder after + cmds = [] + Settings::LANGUAGES.each { |val| cmds.push(val[0]) } + cmds.push(_INTL("Cancel")) + language_index = pbMessage(_INTL("Choose a language to extract text for."), cmds, cmds.length) + next if language_index == cmds.length - 1 + language_name = Settings::LANGUAGES[language_index][1] + # Choose whether to extract core text or game text + text_type = pbMessage(_INTL("Choose a language to extract text for."), + [_INTL("Game-specific text"), _INTL("Core text"), _INTL("Cancel")], 3) + next if text_type == 2 + # If game text, choose whether to extract map texts to map-specific files or + # to one big file + map_files = 0 + if text_type == 0 + map_files = pbMessage(_INTL("How many text files should map event texts be extracted to?"), + [_INTL("One big file"), _INTL("One file per map"), _INTL("Cancel")], 3) + next if map_files == 2 + end + # Extract the chosen set of text for the chosen language + Translator.extract_text(language_name, text_type == 1, map_files == 1) + } +}) + +MenuHandlers.add(:debug_menu, :compile_text, { + "name" => _INTL("Compile Translated Text"), + "parent" => :other_menu, + "description" => _INTL("Import text files and convert them into a language file."), + "effect" => proc { + # Find all folders with a particular naming convention + cmds = Dir.glob("Text_*_*") + if cmds.length == 0 + pbMessage(_INTL("No language folders found to compile.")) + pbMessage(_INTL("Language folders must be named \"Text_SOMETHING_core\" or \"Text_SOMETHING_game\" and be in the root folder.")) + next + end + cmds.push(_INTL("Cancel")) + # Ask which folder to compile into a .dat file + folder_index = pbMessage(_INTL("Choose a language folder to compile."), cmds, cmds.length) + next if folder_index == cmds.length - 1 + # Compile the text files in the chosen folder + dat_filename = cmds[folder_index].gsub!(/^Text_/, "") + Translator.compile_text(cmds[folder_index], dat_filename) + } +}) + +MenuHandlers.add(:debug_menu, :mystery_gift, { + "name" => _INTL("Manage Mystery Gifts"), + "parent" => :other_menu, + "description" => _INTL("Edit and enable/disable Mystery Gifts."), + "effect" => proc { + pbManageMysteryGifts + } +}) + MenuHandlers.add(:debug_menu, :reload_system_cache, { "name" => _INTL("Reload System Cache"), "parent" => :other_menu, From 1ead0a76f585068c9e01c2ad611a61c6e9c6f136 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Tue, 21 Mar 2023 18:28:06 +0000 Subject: [PATCH 5/5] =?UTF-8?q?Fixed=20Beak=20Blast's=20burn=20affecting?= =?UTF-8?q?=20the=20wrong=20Pok=C3=A9mon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../010_Battler_UseMoveTriggerEffects.rb | 4 ++-- .../003_Debug menus/002_Debug_MenuCommands.rb | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Data/Scripts/011_Battle/002_Battler/010_Battler_UseMoveTriggerEffects.rb b/Data/Scripts/011_Battle/002_Battler/010_Battler_UseMoveTriggerEffects.rb index 259a6196e..a477720cc 100644 --- a/Data/Scripts/011_Battle/002_Battler/010_Battler_UseMoveTriggerEffects.rb +++ b/Data/Scripts/011_Battle/002_Battler/010_Battler_UseMoveTriggerEffects.rb @@ -54,8 +54,8 @@ class Battle::Battler if target.effects[PBEffects::BeakBlast] PBDebug.log("[Lingering effect] #{target.pbThis}'s Beak Blast") if move.pbContactMove?(user) && user.affectedByContactEffect? && - target.pbCanBurn?(user, false, self) - target.pbBurn(user) + user.pbCanBurn?(target, false, self) + user.pbBurn(target) end end # Shell Trap (make the trapper move next if the trap was triggered) diff --git a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb index 59fb549f6..562065a08 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb @@ -1086,15 +1086,15 @@ MenuHandlers.add(:debug_menu, :fix_invalid_tiles, { #=============================================================================== # Other options #=============================================================================== -MenuHandlers.add(:debug_menu, :other_menu, { - "name" => _INTL("File Management Options..."), +MenuHandlers.add(:debug_menu, :files_menu, { + "name" => _INTL("Files Options..."), "parent" => :main, "description" => _INTL("Compile, generate PBS files, translations, Mystery Gifts, etc.") }) MenuHandlers.add(:debug_menu, :compile_data, { "name" => _INTL("Compile Data"), - "parent" => :other_menu, + "parent" => :files_menu, "description" => _INTL("Fully compile all data."), "effect" => proc { msgwindow = pbCreateMessageWindow @@ -1106,7 +1106,7 @@ MenuHandlers.add(:debug_menu, :compile_data, { MenuHandlers.add(:debug_menu, :create_pbs_files, { "name" => _INTL("Create PBS File(s)"), - "parent" => :other_menu, + "parent" => :files_menu, "description" => _INTL("Choose one or all PBS files and create it."), "effect" => proc { cmd = 0 @@ -1170,7 +1170,7 @@ MenuHandlers.add(:debug_menu, :create_pbs_files, { MenuHandlers.add(:debug_menu, :rename_files, { "name" => _INTL("Rename Outdated Files"), - "parent" => :other_menu, + "parent" => :files_menu, "description" => _INTL("Check for files with outdated names and rename/move them. Can alter map data."), "effect" => proc { if pbConfirmMessage(_INTL("Are you sure you want to automatically rename outdated files?")) @@ -1182,7 +1182,7 @@ MenuHandlers.add(:debug_menu, :rename_files, { MenuHandlers.add(:debug_menu, :extract_text, { "name" => _INTL("Extract Text For Translation"), - "parent" => :other_menu, + "parent" => :files_menu, "description" => _INTL("Extract all text in the game to text files for translating."), "effect" => proc { if Settings::LANGUAGES.length == 0 @@ -1216,7 +1216,7 @@ MenuHandlers.add(:debug_menu, :extract_text, { MenuHandlers.add(:debug_menu, :compile_text, { "name" => _INTL("Compile Translated Text"), - "parent" => :other_menu, + "parent" => :files_menu, "description" => _INTL("Import text files and convert them into a language file."), "effect" => proc { # Find all folders with a particular naming convention @@ -1238,7 +1238,7 @@ MenuHandlers.add(:debug_menu, :compile_text, { MenuHandlers.add(:debug_menu, :mystery_gift, { "name" => _INTL("Manage Mystery Gifts"), - "parent" => :other_menu, + "parent" => :files_menu, "description" => _INTL("Edit and enable/disable Mystery Gifts."), "effect" => proc { pbManageMysteryGifts @@ -1247,7 +1247,7 @@ MenuHandlers.add(:debug_menu, :mystery_gift, { MenuHandlers.add(:debug_menu, :reload_system_cache, { "name" => _INTL("Reload System Cache"), - "parent" => :other_menu, + "parent" => :files_menu, "description" => _INTL("Refreshes the system's file cache. Use if you change a file while playing."), "effect" => proc { System.reload_cache