diff --git a/Data/Actors.rxdata b/Data/Actors.rxdata index 41edc8e26..7967a5432 100644 Binary files a/Data/Actors.rxdata and b/Data/Actors.rxdata differ diff --git a/Data/Animations.rxdata b/Data/Animations.rxdata index 826e1e8a6..8e67182ba 100644 Binary files a/Data/Animations.rxdata and b/Data/Animations.rxdata differ diff --git a/Data/Armors.rxdata b/Data/Armors.rxdata index 901f2bb2b..2249bec14 100644 Binary files a/Data/Armors.rxdata and b/Data/Armors.rxdata differ diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata index efd84c7a2..8af865203 100644 Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ diff --git a/Data/Enemies.rxdata b/Data/Enemies.rxdata index be622f513..004ee903d 100644 Binary files a/Data/Enemies.rxdata and b/Data/Enemies.rxdata differ diff --git a/Data/Items.rxdata b/Data/Items.rxdata index fe767fa0b..3e62ba6d2 100644 Binary files a/Data/Items.rxdata and b/Data/Items.rxdata differ diff --git a/Data/Map085.rxdata b/Data/Map085.rxdata index 9a552b0ef..a24875b30 100644 Binary files a/Data/Map085.rxdata and b/Data/Map085.rxdata differ diff --git a/Data/Map146.rxdata b/Data/Map146.rxdata index 0e4aff0fb..71d7e8ad0 100644 Binary files a/Data/Map146.rxdata and b/Data/Map146.rxdata differ diff --git a/Data/Map498.rxdata b/Data/Map498.rxdata index b16a9b39f..a6ffc81dc 100644 Binary files a/Data/Map498.rxdata and b/Data/Map498.rxdata differ diff --git a/Data/Map509.rxdata b/Data/Map509.rxdata index f557890a9..60c483dc4 100644 Binary files a/Data/Map509.rxdata and b/Data/Map509.rxdata differ diff --git a/Data/Map559.rxdata b/Data/Map559.rxdata index 3e19fa80c..7eb53ebfe 100644 Binary files a/Data/Map559.rxdata and b/Data/Map559.rxdata differ diff --git a/Data/Map786.rxdata b/Data/Map786.rxdata index bd87464c3..a7d7667d2 100644 Binary files a/Data/Map786.rxdata and b/Data/Map786.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index 82031d79f..74fad41d0 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb b/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb index ca24cdc15..95aef43f5 100644 --- a/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb +++ b/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb @@ -206,6 +206,7 @@ module GameData end def replaceSingleSpeciesModeIfApplicable(species) + return species if getDexNumberForSpecies(species) >= Settings::ZAPMOLCUNO_NB if $game_switches[SWITCH_SINGLE_POKEMON_MODE] if $game_switches[SWITCH_SINGLE_POKEMON_MODE_HEAD] return replaceFusionsHeadWithSpecies(species) diff --git a/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb b/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb index 62cc72cc1..f38b2952f 100644 --- a/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb +++ b/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb @@ -782,6 +782,8 @@ end def pbEndSurf(_xOffset, _yOffset) return false if !$PokemonGlobal.surfing + return false if !$PokemonGlobal.diving + x = $game_player.x y = $game_player.y if $game_map.terrain_tag(x, y).can_surf && !$game_player.pbFacingTerrainTag.can_surf || !$game_map.terrain_tag(x, y).can_surf diff --git a/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb b/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb index 12f727b3f..b91b9d246 100644 --- a/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb +++ b/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb @@ -28,7 +28,7 @@ # #GYM_TYPES_ARRAY = [0,5,11,13,12,3,14,10,4,1,0,6,2,16,7,15,1,8,15,1,7,16,18,17,7,16] -GYM_TYPES_CLASSIC = [:NORMAL, :ROCK, :WATER, :ELECTRIC, :GRASS, :POISON, :PSYCHIC, :FIRE, :GROUND, :FIGHTING, :NORMAL, :BUG, :FLYING, :DRAGON, :GHOST, :ICE, :FIGHTING, :STEEL, :ICE, :FIGHTING, :GHOST, :DRAGON, :FAIRY, :DARK, :GHOST, :DRAGON] +GYM_TYPES_CLASSIC = [:NORMAL, :ROCK, :WATER, :ELECTRIC, :GRASS, :POISON, :PSYCHIC, :FIRE, :GROUND, :FIGHTING, :NORMAL, :BUG, :FLYING, :DRAGON, :GHOST, :ICE, :FIGHTING, :STEEL, :ICE, :FIGHTING, :GHOST, :DRAGON, :FAIRY, :DARK, :GHOST, :ROCK] GYM_TYPES_MODERN = [:NORMAL, :STEEL, :ICE, :FIGHTING, :BUG, :DARK, :FAIRY, :PSYCHIC, :NORMAL, :FIGHTING, :FAIRY, :GRASS, :BUG, :DRAGON, :FIRE, :GHOST, :GROUND, :ELECTRIC, :WATER, :ROCK, :POISON, :FLYING, :FAIRY, :DARK, :GHOST, :DRAGON] GYM_TYPES_ARRAY = ($game_switches && $game_switches[SWITCH_MODERN_MODE]) ? GYM_TYPES_MODERN : GYM_TYPES_CLASSIC diff --git a/Data/Scripts/050_AddOns/MultiSaves.rb b/Data/Scripts/050_AddOns/MultiSaves.rb index 64873090a..75db90b85 100644 --- a/Data/Scripts/050_AddOns/MultiSaves.rb +++ b/Data/Scripts/050_AddOns/MultiSaves.rb @@ -100,6 +100,7 @@ module SaveData # should never reach here since the original file should always exist return file end + # See self.get_next_slot def self.get_prev_slot(file_list, file) return self.get_next_slot(file_list.reverse, file) @@ -141,7 +142,7 @@ module SaveData # This is used in a hidden function (ctrl+down+cancel on title screen) or if the save file is corrupt # Pass nil to delete everything, or a file path to just delete that one # @raise [Error::ENOENT] - def self.delete_file(file_path=nil) + def self.delete_file(file_path = nil) if file_path File.delete(file_path) if File.file?(file_path) else @@ -203,53 +204,53 @@ class PokemonLoad_Scene if Input.trigger?(Input::USE) return @sprites["cmdwindow"].index elsif @sprites["cmdwindow"].index == continue_idx - @sprites["leftarrow"].visible=true - @sprites["rightarrow"].visible=true + @sprites["leftarrow"].visible = true + @sprites["rightarrow"].visible = true if Input.trigger?(Input::LEFT) return -3 elsif Input.trigger?(Input::RIGHT) return -2 end else - @sprites["leftarrow"].visible=false - @sprites["rightarrow"].visible=false + @sprites["leftarrow"].visible = false + @sprites["rightarrow"].visible = false end end end - def pbStartScene(commands, show_continue, trainer, frame_count, map_id) - @commands = commands - @sprites = {} - @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height) - @viewport.z = 99998 - addBackgroundOrColoredPlane(@sprites,"background","loadbg",Color.new(248,248,248),@viewport) + def pbStartScene(commands, show_continue, trainer, frame_count, map_id) + @commands = commands + @sprites = {} + @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height) + @viewport.z = 99998 + addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport) - @sprites["leftarrow"] = AnimatedSprite.new("Graphics/Pictures/leftarrow",8,40,28,2,@viewport) - @sprites["leftarrow"].x=10 - @sprites["leftarrow"].y=140 - @sprites["leftarrow"].play + @sprites["leftarrow"] = AnimatedSprite.new("Graphics/Pictures/leftarrow", 8, 40, 28, 2, @viewport) + @sprites["leftarrow"].x = 10 + @sprites["leftarrow"].y = 140 + @sprites["leftarrow"].play - #@sprites["leftarrow"].visible=true + #@sprites["leftarrow"].visible=true - @sprites["rightarrow"] = AnimatedSprite.new("Graphics/Pictures/rightarrow",8,40,28,2,@viewport) - @sprites["rightarrow"].x = 460 - @sprites["rightarrow"].y = 140 - @sprites["rightarrow"].play - #@sprites["rightarrow"].visible=true + @sprites["rightarrow"] = AnimatedSprite.new("Graphics/Pictures/rightarrow", 8, 40, 28, 2, @viewport) + @sprites["rightarrow"].x = 460 + @sprites["rightarrow"].y = 140 + @sprites["rightarrow"].play + #@sprites["rightarrow"].visible=true - y = 16*2 - for i in 0...commands.length - @sprites["panel#{i}"] = PokemonLoadPanel.new(i,commands[i], - (show_continue) ? (i==0) : false,trainer,frame_count,map_id,@viewport) - @sprites["panel#{i}"].x = 24*2 - @sprites["panel#{i}"].y = y - @sprites["panel#{i}"].pbRefresh - y += (show_continue && i==0) ? 112*2 : 24*2 - end - @sprites["cmdwindow"] = Window_CommandPokemon.new([]) - @sprites["cmdwindow"].viewport = @viewport - @sprites["cmdwindow"].visible = false + y = 16 * 2 + for i in 0...commands.length + @sprites["panel#{i}"] = PokemonLoadPanel.new(i, commands[i], + (show_continue) ? (i == 0) : false, trainer, frame_count, map_id, @viewport) + @sprites["panel#{i}"].x = 24 * 2 + @sprites["panel#{i}"].y = y + @sprites["panel#{i}"].pbRefresh + y += (show_continue && i == 0) ? 112 * 2 : 24 * 2 end + @sprites["cmdwindow"] = Window_CommandPokemon.new([]) + @sprites["cmdwindow"].viewport = @viewport + @sprites["cmdwindow"].visible = false + end end @@ -289,7 +290,7 @@ class PokemonLoadScreen end # nil deletes all, otherwise just the given file - def delete_save_data(file_path=nil) + def delete_save_data(file_path = nil) begin SaveData.delete_file(file_path) pbMessage(_INTL("The save data was deleted.")) @@ -298,120 +299,144 @@ class PokemonLoadScreen end end + def checkEnableSpritesDownload + if $PokemonSystem.download_sprites && $PokemonSystem.download_sprites != 0 + customSprites = getCustomSpeciesList + if !customSprites + promptEnableSpritesDownload + else + if customSprites.length < 1000 + promptEnableSpritesDownload + end + end + end + end + + def promptEnableSpritesDownload + message = "Some sprites appear to be missing from your game. \nWould you like the game to download sprites automatically while playing? (this requires an internet connection)" + if pbConfirmMessage(message) + $PokemonSystem.download_sprites = 0 + end + end + def pbStartLoadScreen - if($game_temp.unimportedSprites && $game_temp.unimportedSprites.size >0) + if ($game_temp.unimportedSprites && $game_temp.unimportedSprites.size > 0) handleReplaceExistingSprites() end if ($game_temp.nb_imported_sprites && $game_temp.nb_imported_sprites > 0) - pbMessage(_INTL("{1} new custom sprites were imported into the game",$game_temp.nb_imported_sprites.to_s)) + pbMessage(_INTL("{1} new custom sprites were imported into the game", $game_temp.nb_imported_sprites.to_s)) end - $game_temp.nb_imported_sprites=nil + checkEnableSpritesDownload + + $game_temp.nb_imported_sprites = nil copyKeybindings() save_file_list = SaveData::AUTO_SLOTS + SaveData::MANUAL_SLOTS first_time = true - loop do # Outer loop is used for switching save files - if @selected_file - @save_data = load_save_file(SaveData.get_full_path(@selected_file)) - else - @save_data = {} - end - commands = [] - cmd_continue = -1 - cmd_new_game = -1 - cmd_options = -1 - cmd_language = -1 - cmd_mystery_gift = -1 - cmd_debug = -1 - cmd_quit = -1 - show_continue = !@save_data.empty? - new_game_plus = show_continue && (@save_data[:player].new_game_plus_unlocked || $DEBUG) - - if show_continue - commands[cmd_continue = commands.length] = "#{@selected_file}" - if @save_data[:player].mystery_gift_unlocked - commands[cmd_mystery_gift = commands.length] = _INTL('Mystery Gift') # Honestly I have no idea how to make Mystery Gift work well with this. + loop do + # Outer loop is used for switching save files + if @selected_file + @save_data = load_save_file(SaveData.get_full_path(@selected_file)) + else + @save_data = {} end - end + commands = [] + cmd_continue = -1 + cmd_new_game = -1 + cmd_options = -1 + cmd_language = -1 + cmd_mystery_gift = -1 + cmd_debug = -1 + cmd_quit = -1 + show_continue = !@save_data.empty? + new_game_plus = show_continue && (@save_data[:player].new_game_plus_unlocked || $DEBUG) - commands[cmd_new_game = commands.length] = _INTL('New Game') - if new_game_plus - commands[cmd_new_game_plus = commands.length] = _INTL('New Game +') - end - commands[cmd_options = commands.length] = _INTL('Options') - commands[cmd_language = commands.length] = _INTL('Language') if Settings::LANGUAGES.length >= 2 - commands[cmd_debug = commands.length] = _INTL('Debug') if $DEBUG - commands[cmd_quit = commands.length] = _INTL('Quit Game') - cmd_left = -3 - cmd_right = -2 - - map_id = show_continue ? @save_data[:map_factory].map.map_id : 0 - @scene.pbStartScene(commands, show_continue, @save_data[:player], - @save_data[:frame_count] || 0, map_id) - @scene.pbSetParty(@save_data[:player]) if show_continue - if first_time - @scene.pbStartScene2 - first_time = false - else - @scene.pbUpdate - end - - loop do # Inner loop is used for going to other menus and back and stuff (vanilla) - command = @scene.pbChoose(commands, cmd_continue) - pbPlayDecisionSE if command != cmd_quit - - case command - when cmd_continue - @scene.pbEndScene - Game.load(@save_data) - $game_switches[SWITCH_V5_1]=true - return - when cmd_new_game - @scene.pbEndScene - Game.start_new - return - when cmd_new_game_plus - @scene.pbEndScene - Game.start_new(@save_data[:bag],@save_data[:storage_system],@save_data[:player]) - @save_data[:player].new_game_plus_unlocked=true - return - when cmd_mystery_gift - pbFadeOutIn { pbDownloadMysteryGift(@save_data[:player]) } - when cmd_options - pbFadeOutIn do - scene = PokemonOption_Scene.new - screen = PokemonOptionScreen.new(scene) - screen.pbStartScreen(true) - end - when cmd_language - @scene.pbEndScene - $PokemonSystem.language = pbChooseLanguage - pbLoadMessages('Data/' + Settings::LANGUAGES[$PokemonSystem.language][1]) if show_continue - @save_data[:pokemon_system] = $PokemonSystem - File.open(SaveData.get_full_path(@selected_file), 'wb') { |file| Marshal.dump(@save_data, file) } + commands[cmd_continue = commands.length] = "#{@selected_file}" + if @save_data[:player].mystery_gift_unlocked + commands[cmd_mystery_gift = commands.length] = _INTL('Mystery Gift') # Honestly I have no idea how to make Mystery Gift work well with this. + end + end + + commands[cmd_new_game = commands.length] = _INTL('New Game') + if new_game_plus + commands[cmd_new_game_plus = commands.length] = _INTL('New Game +') + end + commands[cmd_options = commands.length] = _INTL('Options') + commands[cmd_language = commands.length] = _INTL('Language') if Settings::LANGUAGES.length >= 2 + commands[cmd_debug = commands.length] = _INTL('Debug') if $DEBUG + commands[cmd_quit = commands.length] = _INTL('Quit Game') + cmd_left = -3 + cmd_right = -2 + + map_id = show_continue ? @save_data[:map_factory].map.map_id : 0 + @scene.pbStartScene(commands, show_continue, @save_data[:player], + @save_data[:frame_count] || 0, map_id) + @scene.pbSetParty(@save_data[:player]) if show_continue + if first_time + @scene.pbStartScene2 + first_time = false + else + @scene.pbUpdate + end + + loop do + # Inner loop is used for going to other menus and back and stuff (vanilla) + command = @scene.pbChoose(commands, cmd_continue) + pbPlayDecisionSE if command != cmd_quit + + case command + when cmd_continue + @scene.pbEndScene + Game.load(@save_data) + $game_switches[SWITCH_V5_1] = true + return + when cmd_new_game + @scene.pbEndScene + Game.start_new + return + when cmd_new_game_plus + @scene.pbEndScene + Game.start_new(@save_data[:bag], @save_data[:storage_system], @save_data[:player]) + @save_data[:player].new_game_plus_unlocked = true + return + when cmd_mystery_gift + pbFadeOutIn { pbDownloadMysteryGift(@save_data[:player]) } + when cmd_options + pbFadeOutIn do + scene = PokemonOption_Scene.new + screen = PokemonOptionScreen.new(scene) + screen.pbStartScreen(true) + end + when cmd_language + @scene.pbEndScene + $PokemonSystem.language = pbChooseLanguage + pbLoadMessages('Data/' + Settings::LANGUAGES[$PokemonSystem.language][1]) + if show_continue + @save_data[:pokemon_system] = $PokemonSystem + File.open(SaveData.get_full_path(@selected_file), 'wb') { |file| Marshal.dump(@save_data, file) } + end + $scene = pbCallTitle + return + when cmd_debug + pbFadeOutIn { pbDebugMenu(false) } + when cmd_quit + pbPlayCloseMenuSE + @scene.pbEndScene + $scene = nil + return + when cmd_left + @scene.pbCloseScene + @selected_file = SaveData.get_prev_slot(save_file_list, @selected_file) + break # to outer loop + when cmd_right + @scene.pbCloseScene + @selected_file = SaveData.get_next_slot(save_file_list, @selected_file) + break # to outer loop + else + pbPlayBuzzerSE + end end - $scene = pbCallTitle - return - when cmd_debug - pbFadeOutIn { pbDebugMenu(false) } - when cmd_quit - pbPlayCloseMenuSE - @scene.pbEndScene - $scene = nil - return - when cmd_left - @scene.pbCloseScene - @selected_file = SaveData.get_prev_slot(save_file_list, @selected_file) - break # to outer loop - when cmd_right - @scene.pbCloseScene - @selected_file = SaveData.get_next_slot(save_file_list, @selected_file) - break # to outer loop - else - pbPlayBuzzerSE - end - end end end end @@ -422,12 +447,12 @@ end class PokemonSave_Scene def pbUpdateSlotInfo(slottext) pbDisposeSprite(@sprites, "slotinfo") - @sprites["slotinfo"]=Window_AdvancedTextPokemon.new(slottext) - @sprites["slotinfo"].viewport=@viewport - @sprites["slotinfo"].x=0 - @sprites["slotinfo"].y=160 - @sprites["slotinfo"].width=228 if @sprites["slotinfo"].width<228 - @sprites["slotinfo"].visible=true + @sprites["slotinfo"] = Window_AdvancedTextPokemon.new(slottext) + @sprites["slotinfo"].viewport = @viewport + @sprites["slotinfo"].x = 0 + @sprites["slotinfo"].y = 160 + @sprites["slotinfo"].width = 228 if @sprites["slotinfo"].width < 228 + @sprites["slotinfo"].visible = true end end @@ -458,7 +483,7 @@ class PokemonSaveScreen _INTL("Save to another slot"), _INTL("Don't save") ] - opt = pbMessage(_INTL('Would you like to save the game?'),choices,3) + opt = pbMessage(_INTL('Would you like to save the game?'), choices, 3) if opt == 0 pbSEPlay('GUI save choice') ret = doSave($Trainer.save_slot) @@ -495,7 +520,7 @@ class PokemonSaveScreen # Handles the UI for the save slot select screen. Returns the index of the chosen slot, or -1. # Based on pbShowCommands - def slotSelectCommands(choices, choice_info, defaultCmd=0) + def slotSelectCommands(choices, choice_info, defaultCmd = 0) msgwindow = Window_AdvancedTextPokemon.new(_INTL("Which slot to save in?")) msgwindow.z = 99999 msgwindow.visible = true @@ -509,9 +534,9 @@ class PokemonSaveScreen cmdwindow.z = 99999 cmdwindow.visible = true cmdwindow.resizeToFit(cmdwindow.commands) - pbPositionNearMsgWindow(cmdwindow,msgwindow,:right) - cmdwindow.index=defaultCmd - command=0 + pbPositionNearMsgWindow(cmdwindow, msgwindow, :right) + cmdwindow.index = defaultCmd + command = 0 loop do @scene.pbUpdateSlotInfo(choice_info[cmdwindow.index]) Graphics.update @@ -568,8 +593,8 @@ class PokemonSaveScreen elapsed_str = _INTL("Time{1}m
", min) end - return "#{datetime_str}"+ # blue - "#{map_str}"+ # green + return "#{datetime_str}" + # blue + "#{map_str}" + # green "#{elapsed_str}" end end @@ -635,7 +660,7 @@ module Game # @param safe [Boolean] whether $PokemonGlobal.safesave should be set to true # @return [Boolean] whether the operation was successful # @raise [SaveData::InvalidValueError] if an invalid value is being saved - def self.save(slot=nil, auto=false, safe: false) + def self.save(slot = nil, auto = false, safe: false) slot = $Trainer.save_slot if slot.nil? return false if slot.nil? diff --git a/Data/Skills.rxdata b/Data/Skills.rxdata index a45219f5e..61cba7ea2 100644 Binary files a/Data/Skills.rxdata and b/Data/Skills.rxdata differ diff --git a/Data/States.rxdata b/Data/States.rxdata index 868d49e59..0f9b4ae5d 100644 Binary files a/Data/States.rxdata and b/Data/States.rxdata differ diff --git a/Data/System.rxdata b/Data/System.rxdata index d9f1c2ba2..eaadb83e4 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Data/Tilesets.rxdata b/Data/Tilesets.rxdata index acaa59516..ec292660a 100644 Binary files a/Data/Tilesets.rxdata and b/Data/Tilesets.rxdata differ diff --git a/Data/Weapons.rxdata b/Data/Weapons.rxdata index c7ea19a7a..d9bd35260 100644 Binary files a/Data/Weapons.rxdata and b/Data/Weapons.rxdata differ