diff --git a/Data/Scripts/001_Technical/002_Ruby Utilities.rb b/Data/Scripts/001_Technical/002_Ruby Utilities.rb index 39b4cd343..c7f9bdca4 100644 --- a/Data/Scripts/001_Technical/002_Ruby Utilities.rb +++ b/Data/Scripts/001_Technical/002_Ruby Utilities.rb @@ -1,3 +1,10 @@ +#=============================================================================== +# class Object +#=============================================================================== +class Object + alias full_inspect inspect +end + #=============================================================================== # class Class #=============================================================================== diff --git a/Data/Scripts/001_Technical/007_Errors.rb b/Data/Scripts/001_Technical/007_Errors.rb index bd103ada5..606bcb43e 100644 --- a/Data/Scripts/001_Technical/007_Errors.rb +++ b/Data/Scripts/001_Technical/007_Errors.rb @@ -47,7 +47,6 @@ def pbPrintException(e) errorlogline.sub!(pbGetUserName, "USERNAME") errorlogline = "\r\n" + errorlogline if errorlogline.length > 20 errorlogline.gsub!("/", "\\") if System.platform[/Windows/] - print("#{message}\r\nThis exception was logged in #{errorlogline}.\r\nHold Ctrl after closing this message to copy it to the clipboard.") # Give a ~500ms coyote time to start holding Control t = System.delta diff --git a/Data/Scripts/001_Technical/011_Input.rb b/Data/Scripts/001_Technical/011_Input.rb index 68dd78128..21e467f32 100644 --- a/Data/Scripts/001_Technical/011_Input.rb +++ b/Data/Scripts/001_Technical/011_Input.rb @@ -1,7 +1,12 @@ module Input - USE = C - BACK = B - SPECIAL = A + USE = C + BACK = B + ACTION = A + AUX1 = X + AUX2 = Y + SPECIAL = Z + JUMPUP = L + JUMPDOWN = R unless defined?(update_KGC_ScreenCapture) class << Input diff --git a/Data/Scripts/002_Save data/005_BuiltinConversions.rb b/Data/Scripts/002_Save data/005_BuiltinConversions.rb index 322d51405..74437dc9a 100644 --- a/Data/Scripts/002_Save data/005_BuiltinConversions.rb +++ b/Data/Scripts/002_Save data/005_BuiltinConversions.rb @@ -18,18 +18,18 @@ SaveData.register_conversion(:v19_convert_PokemonSystem) do display_title 'Updating PokemonSystem class' to_all do |save_data| new_system = PokemonSystem.new - new_system.textspeed = save_data[:pokemon_system].textspeed || new_system.textspeed + new_system.textspeed = save_data[:pokemon_system].textspeed || new_system.textspeed new_system.battlescene = save_data[:pokemon_system].battlescene || new_system.battlescene new_system.battlestyle = save_data[:pokemon_system].battlestyle || new_system.battlestyle - new_system.frame = save_data[:pokemon_system].frame || new_system.frame - new_system.textskin = save_data[:pokemon_system].textskin || new_system.textskin - new_system.font = save_data[:pokemon_system].font || new_system.font - new_system.screensize = save_data[:pokemon_system].screensize || new_system.screensize - new_system.language = save_data[:pokemon_system].language || new_system.language - new_system.runstyle = save_data[:pokemon_system].runstyle || new_system.runstyle - new_system.bgmvolume = save_data[:pokemon_system].bgmvolume || new_system.bgmvolume - new_system.sevolume = save_data[:pokemon_system].sevolume || new_system.sevolume - new_system.textinput = save_data[:pokemon_system].textinput || new_system.textinput + new_system.frame = save_data[:pokemon_system].frame || new_system.frame + new_system.textskin = save_data[:pokemon_system].textskin || new_system.textskin + new_system.font = save_data[:pokemon_system].font || new_system.font + new_system.screensize = save_data[:pokemon_system].screensize || new_system.screensize + new_system.language = save_data[:pokemon_system].language || new_system.language + new_system.runstyle = save_data[:pokemon_system].runstyle || new_system.runstyle + new_system.bgmvolume = save_data[:pokemon_system].bgmvolume || new_system.bgmvolume + new_system.sevolume = save_data[:pokemon_system].sevolume || new_system.sevolume + new_system.textinput = save_data[:pokemon_system].textinput || new_system.textinput save_data[:pokemon_system] = new_system end end @@ -66,6 +66,9 @@ SaveData.register_conversion(:v19_convert_global_metadata) do global.mailbox[i] = PokemonMail.convert(mail) if mail end end + global.phoneNumbers.each do |contact| + contact[1] = GameData::TrainerType.get(contact[1]) if contact && contact.length == 8 + end if global.partner global.partner[0] = GameData::TrainerType.get(global.partner[0]).id global.partner[3].each_with_index do |pkmn, i| @@ -78,15 +81,21 @@ SaveData.register_conversion(:v19_convert_global_metadata) do end end if global.roamPokemon - global.roamPokemon.each_with_index do |p, i| - global.roamPokemon[i] = PokeBattle_Pokemon.convert(p) if p + global.roamPokemon.each_with_index do |pkmn, i| + global.roamPokemon[i] = PokeBattle_Pokemon.convert(pkmn) if pkmn && pkmn != true + end + end + global.purifyChamber.sets.each do |set| + set.shadow = PokeBattle_Pokemon.convert(set.shadow) if set.shadow + set.list.each_with_index do |pkmn, i| + set.list[i] = PokeBattle_Pokemon.convert(pkmn) if pkmn end end if global.hallOfFame global.hallOfFame.each do |team| next if !team - team.each_with_index do |p, i| - team[i] = PokeBattle_Pokemon.convert(p) if p + team.each_with_index do |pkmn, i| + team[i] = PokeBattle_Pokemon.convert(pkmn) if pkmn end end end @@ -115,7 +124,7 @@ SaveData.register_conversion(:v19_convert_bag) do end pocket.compact! end - self.registeredIndex + self.registeredIndex # Just to ensure this data exists self.registeredItems.each_with_index do |item, i| next if !item if item == 0 @@ -130,8 +139,8 @@ SaveData.register_conversion(:v19_convert_bag) do end end self.registeredItems.compact! - end # bag.instance_eval - end # to_value + end # bag.instance_eval + end # to_value end SaveData.register_conversion(:v19_convert_storage) do @@ -141,20 +150,31 @@ SaveData.register_conversion(:v19_convert_storage) do storage.instance_eval do for box in 0...self.maxBoxes for i in 0...self.maxPokemon(box) - next unless self[box, i] - self[box, i] = PokeBattle_Pokemon.convert(self[box, i]) + self[box, i] = PokeBattle_Pokemon.convert(self[box, i]) if self[box, i] end end - end # storage.instance_eval - end # to_value + self.unlockedWallpapers # Just to ensure this data exists + end # storage.instance_eval + end # to_value end -# TODO: See if there are more conversions needed for this. There may not be. SaveData.register_conversion(:v19_convert_game_player) do essentials_version 19 display_title 'Converting game player character' to_value :game_player do |game_player| game_player.width = 1 game_player.height = 1 + game_player.sprite_size = [Game_Map::TILE_WIDTH, Game_Map::TILE_HEIGHT] + game_player.pattern_surf ||= 0 + game_player.lock_pattern ||= false + game_player.move_speed = game_player.move_speed + end +end + +SaveData.register_conversion(:v19_convert_game_screen) do + essentials_version 19 + display_title 'Converting game screen' + to_value :game_screen do |game_screen| + game_screen.weather(game_screen.weather_type, game_screen.weather_max) end end diff --git a/Data/Scripts/003_Game processing/004_Scene_Map.rb b/Data/Scripts/003_Game processing/004_Scene_Map.rb index 17ed8778b..2d0609e12 100644 --- a/Data/Scripts/003_Game processing/004_Scene_Map.rb +++ b/Data/Scripts/003_Game processing/004_Scene_Map.rb @@ -183,7 +183,7 @@ class Scene_Map $game_temp.menu_calling = true $game_temp.menu_beep = true end - elsif Input.trigger?(Input::Z) + elsif Input.trigger?(Input::SPECIAL) unless $game_player.moving? $PokemonTemp.keyItemCalling = true end diff --git a/Data/Scripts/004_Game classes/002_Game_System.rb b/Data/Scripts/004_Game classes/002_Game_System.rb index 6b8181098..ba39f0081 100644 --- a/Data/Scripts/004_Game classes/002_Game_System.rb +++ b/Data/Scripts/004_Game classes/002_Game_System.rb @@ -276,7 +276,7 @@ class Game_System def update @timer -= 1 if @timer_working and @timer>0 - if Input.trigger?(Input::Z) && pbCurrentEventCommentInput(1,"Cut Scene") + if Input.trigger?(Input::SPECIAL) && pbCurrentEventCommentInput(1,"Cut Scene") event = @map_interpreter.get_character(0) @map_interpreter.pbSetSelfSwitch(event.id,"A",true) @map_interpreter.command_end diff --git a/Data/Scripts/004_Game classes/004_Game_Map.rb b/Data/Scripts/004_Game classes/004_Game_Map.rb index cac21060c..fadd485a4 100644 --- a/Data/Scripts/004_Game classes/004_Game_Map.rb +++ b/Data/Scripts/004_Game classes/004_Game_Map.rb @@ -62,7 +62,6 @@ class Game_Map for i in @map.events.keys @events[i] = Game_Event.new(@map_id, @map.events[i],self) end - # TODO: These should be moved to Spriteset_Global as we only need one copy of them. @common_events = {} for i in 1...$data_common_events.size @common_events[i] = Game_CommonEvent.new(i) diff --git a/Data/Scripts/004_Game classes/006_Game_MapFactory.rb b/Data/Scripts/004_Game classes/006_Game_MapFactory.rb index b1d543e0c..43d022fa7 100644 --- a/Data/Scripts/004_Game classes/006_Game_MapFactory.rb +++ b/Data/Scripts/004_Game classes/006_Game_MapFactory.rb @@ -32,7 +32,7 @@ class PokemonMapFactory raise "No maps in save file... (mapIndex=#{@mapIndex})" if @maps.length==0 for i in 0...@maps.length if @maps[i] - echo("Using next map, may be incorrect (mapIndex=#{@mapIndex}, length=#{@maps.length})") + echoln("Using next map, may be incorrect (mapIndex=#{@mapIndex}, length=#{@maps.length})") return @maps[i] end raise "No maps in save file... (all maps empty; mapIndex=#{@mapIndex})" diff --git a/Data/Scripts/004_Game classes/007_Game_Character.rb b/Data/Scripts/004_Game classes/007_Game_Character.rb index 790dcd5fd..29c916747 100644 --- a/Data/Scripts/004_Game classes/007_Game_Character.rb +++ b/Data/Scripts/004_Game classes/007_Game_Character.rb @@ -16,7 +16,7 @@ class Game_Character attr_reader :blend_type attr_reader :direction attr_accessor :pattern - attr_reader :pattern_surf + attr_accessor :pattern_surf attr_accessor :lock_pattern attr_reader :move_route_forcing attr_accessor :through diff --git a/Data/Scripts/004_Game classes/010_Game_PlayerVisuals.rb b/Data/Scripts/004_Game classes/010_Game_PlayerVisuals.rb index be495360b..c6141c4ec 100644 --- a/Data/Scripts/004_Game classes/010_Game_PlayerVisuals.rb +++ b/Data/Scripts/004_Game classes/010_Game_PlayerVisuals.rb @@ -23,7 +23,7 @@ class Game_Player < Game_Character return false if $game_temp.in_menu || $game_temp.in_battle || @move_route_forcing || $game_temp.message_window_showing || pbMapInterpreterRunning? - input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::SPECIAL) + input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::ACTION) return input && $PokemonGlobal.runningShoes && !jumping? && !$PokemonGlobal.diving && !$PokemonGlobal.surfing && !$PokemonGlobal.bicycle && !$game_player.pbTerrainTag.must_walk diff --git a/Data/Scripts/007_Objects and windows/005_SpriteWindow_text.rb b/Data/Scripts/007_Objects and windows/005_SpriteWindow_text.rb index 3d896c71d..0f42f56ab 100644 --- a/Data/Scripts/007_Objects and windows/005_SpriteWindow_text.rb +++ b/Data/Scripts/007_Objects and windows/005_SpriteWindow_text.rb @@ -882,7 +882,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base update_cursor_rect end end - elsif Input.repeat?(Input::L) + elsif Input.repeat?(Input::JUMPUP) if @index > 0 oldindex = @index @index = [self.index-self.page_item_max, 0].max @@ -892,7 +892,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base update_cursor_rect end end - elsif Input.repeat?(Input::R) + elsif Input.repeat?(Input::JUMPDOWN) if @index < @item_max-1 oldindex = @index @index = [self.index+self.page_item_max, @item_max-1].min diff --git a/Data/Scripts/007_Objects and windows/012_TextEntry.rb b/Data/Scripts/007_Objects and windows/012_TextEntry.rb index 49a771f37..f91ba2a3b 100644 --- a/Data/Scripts/007_Objects and windows/012_TextEntry.rb +++ b/Data/Scripts/007_Objects and windows/012_TextEntry.rb @@ -226,13 +226,13 @@ class Window_TextEntry < SpriteWindow_Base self.refresh if (@frame%10)==0 return if !self.active # Moving cursor - if Input.repeat?(Input::LEFT) && Input.press?(Input::SPECIAL) + if Input.repeat?(Input::LEFT) && Input.press?(Input::ACTION) if @helper.cursor > 0 @helper.cursor -= 1 @frame = 0 self.refresh end - elsif Input.repeat?(Input::RIGHT) && Input.press?(Input::SPECIAL) + elsif Input.repeat?(Input::RIGHT) && Input.press?(Input::ACTION) if @helper.cursor < self.text.scan(/./m).length @helper.cursor += 1 @frame = 0 @@ -1311,9 +1311,9 @@ class PokemonEntryScene2 Input.update pbUpdate next if pbMoveCursor - if Input.trigger?(Input::Z) + if Input.trigger?(Input::SPECIAL) pbChangeTab - elsif Input.trigger?(Input::SPECIAL) + elsif Input.trigger?(Input::ACTION) @cursorpos = OK @sprites["cursor"].setCursorPos(@cursorpos) elsif Input.trigger?(Input::BACK) diff --git a/Data/Scripts/010_Scenes/001_Transitions.rb b/Data/Scripts/010_Scenes/001_Transitions.rb index 66dad2178..a9f88dfd6 100644 --- a/Data/Scripts/010_Scenes/001_Transitions.rb +++ b/Data/Scripts/010_Scenes/001_Transitions.rb @@ -38,7 +38,7 @@ module Graphics if Graphics.frame_count % 40 == 0 count = 0 ObjectSpace.each_object(Object) { |o| count += 1 } - echo("Objects: #{count}\r\n") + echoln("Objects: #{count}") end =end @@transition.update if @@transition && !@@transition.disposed? diff --git a/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb b/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb index 6de8b753a..07b3fa337 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb @@ -272,7 +272,7 @@ class FightMenuDisplay < BattleMenuBase # Create Mega Evolution button @megaButton = SpriteWrapper.new(viewport) @megaButton.bitmap = @megaEvoBitmap.bitmap - @megaButton.x = self.x+146 + @megaButton.x = self.x+120 @megaButton.y = self.y-@megaEvoBitmap.height/2 @megaButton.src_rect.height = @megaEvoBitmap.height/2 addSprite("megaButton",@megaButton) @@ -415,6 +415,7 @@ class FightMenuDisplay < BattleMenuBase def refreshMegaEvolutionButton return if !USE_GRAPHICS @megaButton.src_rect.y = (@mode - 1) * @megaEvoBitmap.height / 2 + @megaButton.x = self.x + ((@shiftMode > 0) ? 204 : 120) @megaButton.z = self.z - 1 @visibility["megaButton"] = (@mode > 0) end diff --git a/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb b/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb index d55abf1f0..8dc913198 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb @@ -119,13 +119,13 @@ class PokeBattle_Scene pbPlayCancelSE break if yield -1 needRefresh = true - elsif Input.trigger?(Input::SPECIAL) # Toggle Mega Evolution + elsif Input.trigger?(Input::ACTION) # Toggle Mega Evolution if megaEvoPossible pbPlayDecisionSE break if yield -2 needRefresh = true end - elsif Input.trigger?(Input::Z) # Shift + elsif Input.trigger?(Input::SPECIAL) # Shift if cw.shiftMode>0 pbPlayDecisionSE break if yield -3 diff --git a/Data/Scripts/013_Overworld/002_Battles/001_Overworld_BattleStarting.rb b/Data/Scripts/013_Overworld/002_Battles/001_Overworld_BattleStarting.rb index 3dad1e889..34773eb5f 100644 --- a/Data/Scripts/013_Overworld/002_Battles/001_Overworld_BattleStarting.rb +++ b/Data/Scripts/013_Overworld/002_Battles/001_Overworld_BattleStarting.rb @@ -169,7 +169,8 @@ def pbGetEnvironment ret = :None map_metadata = GameData::MapMetadata.try_get($game_map.map_id) ret = map_metadata.battle_environment if map_metadata && map_metadata.battle_environment - if GameData::EncounterType.get($PokemonTemp.encounterType).type == :fishing + if $PokemonTemp.encounterType && + GameData::EncounterType.get($PokemonTemp.encounterType).type == :fishing terrainTag = $game_player.pbFacingTerrainTag else terrainTag = $game_player.terrain_tag diff --git a/Data/Scripts/017_UI/001_Animations/002_UI_Controls.rb b/Data/Scripts/017_UI/001_Animations/002_UI_Controls.rb index 9e4f223a6..167328d50 100644 --- a/Data/Scripts/017_UI/001_Animations/002_UI_Controls.rb +++ b/Data/Scripts/017_UI/001_Animations/002_UI_Controls.rb @@ -24,8 +24,8 @@ class ButtonEventScene < EventScene addLabelForScreen(2, 134, 84, 352, _INTL("Used to confirm a choice, interact with people and things, and move through text. (Default: C)")) addLabelForScreen(2, 134, 212, 352, _INTL("Used to exit, cancel a choice, and cancel a mode. Also used to open the Pause Menu. (Default: X)")) - addImageForScreen(3, 16, 90, "Graphics/Pictures/help_specialkey") - addImageForScreen(3, 16, 252, "Graphics/Pictures/help_zkey") + addImageForScreen(3, 16, 90, "Graphics/Pictures/help_actionkey") + addImageForScreen(3, 16, 252, "Graphics/Pictures/help_specialkey") addLabelForScreen(3, 134, 52, 352, _INTL("Has various functions depending on context. While moving around, hold to move at a different speed. (Default: Z)")) addLabelForScreen(3, 134, 212, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)")) diff --git a/Data/Scripts/017_UI/003_UI_PokedexMain.rb b/Data/Scripts/017_UI/003_UI_PokedexMain.rb index c2c603f81..e5aad68c9 100644 --- a/Data/Scripts/017_UI/003_UI_PokedexMain.rb +++ b/Data/Scripts/017_UI/003_UI_PokedexMain.rb @@ -953,7 +953,7 @@ class PokemonPokedex_Scene pbPlayCursorSE if index!=oldindex end end - if Input.trigger?(Input::SPECIAL) + if Input.trigger?(Input::ACTION) index = -2 pbPlayCursorSE if index!=oldindex elsif Input.trigger?(Input::BACK) @@ -1068,7 +1068,7 @@ class PokemonPokedex_Scene elsif index==7 || index==8; index += 1 end pbPlayCursorSE if index!=oldindex - elsif Input.trigger?(Input::SPECIAL) + elsif Input.trigger?(Input::ACTION) index = 8 pbPlayCursorSE if index!=oldindex elsif Input.trigger?(Input::BACK) @@ -1161,7 +1161,7 @@ class PokemonPokedex_Scene $PokemonGlobal.pokedexIndex[pbGetSavePositionIndex] = @sprites["pokedex"].index if !@searchResults pbRefresh end - if Input.trigger?(Input::SPECIAL) + if Input.trigger?(Input::ACTION) pbPlayDecisionSE @sprites["pokedex"].active = false pbDexSearch diff --git a/Data/Scripts/017_UI/004_UI_PokedexEntry.rb b/Data/Scripts/017_UI/004_UI_PokedexEntry.rb index 228b0824c..436911905 100644 --- a/Data/Scripts/017_UI/004_UI_PokedexEntry.rb +++ b/Data/Scripts/017_UI/004_UI_PokedexEntry.rb @@ -453,7 +453,7 @@ class PokemonPokedexInfo_Scene Input.update pbUpdate dorefresh = false - if Input.trigger?(Input::SPECIAL) + if Input.trigger?(Input::ACTION) pbSEStop GameData::Species.play_cry_from_species(@species, @form) if @page == 1 elsif Input.trigger?(Input::BACK) @@ -521,7 +521,7 @@ class PokemonPokedexInfo_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::SPECIAL) + if Input.trigger?(Input::ACTION) pbSEStop GameData::Species.play_cry_from_species(@species, @form) elsif Input.trigger?(Input::BACK) diff --git a/Data/Scripts/017_UI/005_UI_Party.rb b/Data/Scripts/017_UI/005_UI_Party.rb index 8d7a60f95..df64b205b 100644 --- a/Data/Scripts/017_UI/005_UI_Party.rb +++ b/Data/Scripts/017_UI/005_UI_Party.rb @@ -706,10 +706,10 @@ class PokemonParty_Scene end end cancelsprite = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0) - if Input.trigger?(Input::SPECIAL) && canswitch==1 && @activecmd!=cancelsprite + if Input.trigger?(Input::ACTION) && canswitch==1 && @activecmd!=cancelsprite pbPlayDecisionSE return [1,@activecmd] - elsif Input.trigger?(Input::SPECIAL) && canswitch==2 + elsif Input.trigger?(Input::ACTION) && canswitch==2 return -1 elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE if !switching diff --git a/Data/Scripts/017_UI/006_UI_Summary.rb b/Data/Scripts/017_UI/006_UI_Summary.rb index 982c41c43..0fc491b69 100644 --- a/Data/Scripts/017_UI/006_UI_Summary.rb +++ b/Data/Scripts/017_UI/006_UI_Summary.rb @@ -1256,7 +1256,7 @@ class PokemonSummary_Scene Input.update pbUpdate dorefresh = false - if Input.trigger?(Input::SPECIAL) + if Input.trigger?(Input::ACTION) pbSEStop GameData::Species.play_cry_from_pokemon(@pokemon) elsif Input.trigger?(Input::BACK) diff --git a/Data/Scripts/017_UI/007_UI_Bag.rb b/Data/Scripts/017_UI/007_UI_Bag.rb index f4ef2d9c9..1a06701b3 100644 --- a/Data/Scripts/017_UI/007_UI_Bag.rb +++ b/Data/Scripts/017_UI/007_UI_Bag.rb @@ -355,7 +355,7 @@ class PokemonBag_Scene pbRefresh end if itemwindow.sorting - if Input.trigger?(Input::SPECIAL) || + if Input.trigger?(Input::ACTION) || Input.trigger?(Input::USE) itemwindow.sorting = false pbPlayDecisionSE @@ -405,7 +405,7 @@ class PokemonBag_Scene pbPlayCursorSE pbRefresh end -# elsif Input.trigger?(Input::Z) # Register/unregister selected item +# elsif Input.trigger?(Input::SPECIAL) # Register/unregister selected item # if !@choosing && itemwindow.index1 && itemwindow.index=NUMSETS return @sets[chamber].flow end @@ -183,7 +185,7 @@ class PurifyChamber return @sets[chamber].shadow end - def setShadow(chamber,value)# allow only "shadow" Pokemon + def setShadow(chamber,value) # allow only "shadow" Pokemon return if chamber<0 || chamber>=NUMSETS @sets[chamber].shadow=value end @@ -1179,11 +1181,11 @@ class PurifyChamberScene pbPlayCursorSE() @sprites["setview"].moveCursor(btn) end - if Input.repeat?(Input::L) + if Input.repeat?(Input::JUMPUP) nextset=(@sprites["setview"].set==0) ? PurifyChamber::NUMSETS-1 : @sprites["setview"].set-1 pbPlayCursorSE() return [1,nextset] - elsif Input.repeat?(Input::R) + elsif Input.repeat?(Input::JUMPDOWN) nextset=(@sprites["setview"].set==PurifyChamber::NUMSETS-1) ? 0 : @sprites["setview"].set+1 pbPlayCursorSE() return [1,nextset] diff --git a/Data/Scripts/018_Minigames/002_Minigame_TripleTriad.rb b/Data/Scripts/018_Minigames/002_Minigame_TripleTriad.rb index 4920a7429..39a22da07 100644 --- a/Data/Scripts/018_Minigames/002_Minigame_TripleTriad.rb +++ b/Data/Scripts/018_Minigames/002_Minigame_TripleTriad.rb @@ -428,7 +428,7 @@ class TriadScene elsif Input.trigger?(Input::USE) pbPlayDecisionSE break - elsif Input.trigger?(Input::SPECIAL) && @battle.openHand + elsif Input.trigger?(Input::ACTION) && @battle.openHand pbPlayDecisionSE pbViewOpponentCards(numCards) @sprites["helpwindow"].text = _INTL("Choose a card, or check opponent with Z.") diff --git a/Data/Scripts/018_Minigames/004_Minigame_VoltorbFlip.rb b/Data/Scripts/018_Minigames/004_Minigame_VoltorbFlip.rb index 0131a8a06..f16bd5f1a 100644 --- a/Data/Scripts/018_Minigames/004_Minigame_VoltorbFlip.rb +++ b/Data/Scripts/018_Minigames/004_Minigame_VoltorbFlip.rb @@ -394,7 +394,7 @@ class VoltorbFlip pbDisposeSpriteHash(@sprites) pbNewGame end - elsif Input.trigger?(Input::CTRL) + elsif Input.trigger?(Input::ACTION) pbPlayDecisionSE @sprites["cursor"].bitmap.clear if @cursor[0][3]==0 # If in normal mode diff --git a/Data/Scripts/018_Minigames/006_Minigame_Mining.rb b/Data/Scripts/018_Minigames/006_Minigame_Mining.rb index 7dbd75d45..b4d2ec5e0 100644 --- a/Data/Scripts/018_Minigames/006_Minigame_Mining.rb +++ b/Data/Scripts/018_Minigames/006_Minigame_Mining.rb @@ -561,7 +561,7 @@ class MiningGameScene pbSEPlay("Mining cursor") @sprites["cursor"].position+=1 end - elsif Input.trigger?(Input::SPECIAL) # Change tool mode + elsif Input.trigger?(Input::ACTION) # Change tool mode pbSEPlay("Mining tool change") newmode=(@sprites["cursor"].mode+1)%2 @sprites["cursor"].mode=newmode diff --git a/Data/Scripts/018_Minigames/007_Minigame_TilePuzzles.rb b/Data/Scripts/018_Minigames/007_Minigame_TilePuzzles.rb index da665d98b..c05cfb74d 100644 --- a/Data/Scripts/018_Minigames/007_Minigame_TilePuzzles.rb +++ b/Data/Scripts/018_Minigames/007_Minigame_TilePuzzles.rb @@ -537,8 +537,8 @@ class TilePuzzleScene end elsif (@game==1 || @game==2) && Input.trigger?(Input::USE) pbGrabTile(@sprites["cursor"].position) - elsif (@game==2 && Input.trigger?(Input::SPECIAL)) || - (@game==5 && Input.trigger?(Input::SPECIAL)) || + elsif (@game==2 && Input.trigger?(Input::ACTION)) || + (@game==5 && Input.trigger?(Input::ACTION)) || (@game==7 && Input.trigger?(Input::USE)) pbRotateTile(@sprites["cursor"].position) elsif Input.trigger?(Input::BACK) diff --git a/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb b/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb index 5440c9859..d1b1f0014 100644 --- a/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb +++ b/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb @@ -309,7 +309,7 @@ DebugMenuCommands.register("testtrainerbattleadvanced", { pbMessage(_INTL("No trainers were chosen, cannot start battle.")) next elsif size1 < trainers.length - pbMessage(_INTL("Opposing side size is invalid. It should be at least {1}", trainers.length)) + pbMessage(_INTL("Opposing side size is invalid. It should be at least {1}.", trainers.length)) next elsif size1 > trainers.length && trainers[0][1].party_count == 1 pbMessage( diff --git a/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb b/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb index bc6f6adbb..a7e6bfa32 100644 --- a/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb +++ b/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb @@ -173,7 +173,7 @@ def pbDebugVariables(mode) elsif Input.repeat?(Input::RIGHT) pbDebugSetVariable(current_id,1) right_window.refresh - elsif Input.trigger?(Input::SPECIAL) + elsif Input.trigger?(Input::ACTION) if $game_variables[current_id]==0 $game_variables[current_id] = "" elsif $game_variables[current_id]=="" @@ -449,7 +449,7 @@ def pbDebugRoamers Graphics.update Input.update pbUpdateSpriteHash(sprites) - if Input.trigger?(Input::SPECIAL) && cmdwindow.index=0 sprite=getMapSprite(@dragmapid) diff --git a/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb b/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb index 00aafee25..1d193a3c5 100644 --- a/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb +++ b/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb @@ -195,7 +195,7 @@ class SpritePositioner pbChangeSpecies(@species) refresh end - if Input.trigger?(Input::SPECIAL) # Cycle to next option + if Input.trigger?(Input::ACTION) # Cycle to next option pbPlayDecisionSE @metricsChanged = true if species_data.shadow_size != oldval ret = true @@ -266,7 +266,7 @@ class SpritePositioner end refresh end - if Input.repeat?(Input::SPECIAL) && param != 3 # Cycle to next option + if Input.repeat?(Input::ACTION) && param != 3 # Cycle to next option @metricsChanged = true if xpos != oldxpos || ypos != oldypos ret = true pbPlayDecisionSE diff --git a/mkxp.json b/mkxp.json index 6e450e6bc..eb9ae535f 100644 --- a/mkxp.json +++ b/mkxp.json @@ -179,7 +179,12 @@ // constants in the scripts. "bindingNames": {"c": "Use", "b": "Back", - "a": "Special"}, + "a": "Action", + "x": "(unused)", + "y": "(unused)", + "z": "Special", + "l": "JumpUp", + "r": "JumpDown"}, // Allow symlinks for game assets to be followed