diff --git a/Data/Scripts/002_BattleSettings.rb b/Data/Scripts/002_BattleSettings.rb index a4650a46f..6e675f726 100644 --- a/Data/Scripts/002_BattleSettings.rb +++ b/Data/Scripts/002_BattleSettings.rb @@ -18,6 +18,13 @@ module Settings MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6) # Whether weather caused by an ability lasts 5 rounds (true) or forever (false). FIXED_DURATION_WEATHER_FROM_ABILITY = (MECHANICS_GENERATION >= 6) + # Whether any Pokémon (originally owned by the player or foreign) can disobey + # the player's commands if the Pokémon is too high a level compared to the + # number of Gym Badges the player has. + ANY_HIGH_LEVEL_POKEMON_CAN_DISOBEY = false + # Whether foreign Pokémon can disobey the player's commands if the Pokémon is + # too high a level compared to the number of Gym Badges the player has. + FOREIGN_HIGH_LEVEL_POKEMON_CAN_DISOBEY = true #============================================================================= diff --git a/Data/Scripts/003_Game processing/002_Scene_Map.rb b/Data/Scripts/003_Game processing/002_Scene_Map.rb index 8b5996f2a..dd8199317 100644 --- a/Data/Scripts/003_Game processing/002_Scene_Map.rb +++ b/Data/Scripts/003_Game processing/002_Scene_Map.rb @@ -181,7 +181,7 @@ class Scene_Map if !pbMapInterpreterRunning? if Input.trigger?(Input::USE) $PokemonTemp.hiddenMoveEventCalling = true - elsif Input.trigger?(Input::BACK) + elsif Input.trigger?(Input::ACTION) unless $game_system.menu_disabled || $game_player.moving? $game_temp.menu_calling = true $game_temp.menu_beep = true diff --git a/Data/Scripts/004_Game classes/010_Game_Player_Visuals.rb b/Data/Scripts/004_Game classes/010_Game_Player_Visuals.rb index 8deb09001..010f14c87 100644 --- a/Data/Scripts/004_Game classes/010_Game_Player_Visuals.rb +++ b/Data/Scripts/004_Game classes/010_Game_Player_Visuals.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::ACTION) + input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::BACK) return input && $Trainer.has_running_shoes && !jumping? && !$PokemonGlobal.diving && !$PokemonGlobal.surfing && !$PokemonGlobal.bicycle && !$game_player.pbTerrainTag.must_walk diff --git a/Data/Scripts/007_Objects and windows/011_Messages.rb b/Data/Scripts/007_Objects and windows/011_Messages.rb index 635160d3d..20effc8e2 100644 --- a/Data/Scripts/007_Objects and windows/011_Messages.rb +++ b/Data/Scripts/007_Objects and windows/011_Messages.rb @@ -104,9 +104,9 @@ end #=============================================================================== def pbEventCommentInput(*args) parameters = [] - list = *args[0].list # Event or event page - elements = *args[1] # Number of elements - trigger = *args[2] # Trigger + list = args[0].list # List of commands for event or event page + elements = args[1] # Number of elements + trigger = args[2] # Trigger return nil if list == nil return nil unless list.is_a?(Array) for item in list diff --git a/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb b/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb index 02046fd1a..e167ed180 100644 --- a/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb +++ b/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb @@ -111,11 +111,14 @@ class PokeBattle_Battler return true if !@battle.pbOwnedByPlayer?(@index) disobedient = false # Pokémon may be disobedient; calculate if it is - badgeLevel = 10 * (@battle.pbPlayer.badge_count + 1) - badgeLevel = GameData::GrowthRate.max_level if @battle.pbPlayer.badge_count >= 8 - if @pokemon.foreign?(@battle.pbPlayer) && @level>badgeLevel - a = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor - disobedient |= (a>=badgeLevel) + if Settings::ANY_HIGH_LEVEL_POKEMON_CAN_DISOBEY || + (Settings::FOREIGN_HIGH_LEVEL_POKEMON_CAN_DISOBEY && @pokemon.foreign?(@battle.pbPlayer)) + badgeLevel = 10 * (@battle.pbPlayer.badge_count + 1) + badgeLevel = GameData::GrowthRate.max_level if @battle.pbPlayer.badge_count >= 8 + if @level > badgeLevel + a = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor + disobedient |= (a>=badgeLevel) + end end disobedient |= !pbHyperModeObedience(choice[2]) return true if !disobedient diff --git a/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb b/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb index f5c6b7843..f73dc8bdd 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb @@ -162,6 +162,7 @@ class PokemonDataBox < SpriteWrapper end def exp_fraction + return 0.0 if @rangeExp == 0 return (@animatingExp) ? @currentExp.to_f/@rangeExp : @battler.pokemon.exp_fraction end @@ -180,6 +181,7 @@ class PokemonDataBox < SpriteWrapper end def animateExp(oldExp,newExp,rangeExp) + return if rangeExp == 0 @currentExp = oldExp @endExp = newExp @rangeExp = rangeExp diff --git a/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb b/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb index 086b78ada..058293f17 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb @@ -268,7 +268,7 @@ class PokeBattle_Scene # Animates a data box's Exp bar #============================================================================= def pbEXPBar(battler,startExp,endExp,tempExp1,tempExp2) - return if !battler + return if !battler || endExp == startExp startExpLevel = tempExp1-startExp endExpLevel = tempExp2-startExp expRange = endExp-startExp diff --git a/Data/Scripts/016_UI/001_Non-interactive UI/002_UI_Controls.rb b/Data/Scripts/016_UI/001_Non-interactive UI/002_UI_Controls.rb index bca766999..dd8173607 100644 --- a/Data/Scripts/016_UI/001_Non-interactive UI/002_UI_Controls.rb +++ b/Data/Scripts/016_UI/001_Non-interactive UI/002_UI_Controls.rb @@ -24,15 +24,15 @@ class ButtonEventScene < EventScene addImageForScreen(2, 16, 158, "Graphics/Pictures/Controls help/help_arrows") addLabelForScreen(2, 134, 100, 352, _INTL("Use the Arrow keys to move the main character.\r\n\r\nYou can also use the Arrow keys to select entries and navigate menus.")) - addImageForScreen(3, 16, 106, "Graphics/Pictures/Controls help/help_usekey") + addImageForScreen(3, 16, 90, "Graphics/Pictures/Controls help/help_usekey") addImageForScreen(3, 16, 236, "Graphics/Pictures/Controls help/help_backkey") - addLabelForScreen(3, 134, 84, 352, _INTL("Used to confirm a choice, interact with people and things, and move through text. (Default: C)")) - addLabelForScreen(3, 134, 212, 352, _INTL("Used to exit, cancel a choice, and cancel a mode. Also used to open the Pause Menu. (Default: X)")) + addLabelForScreen(3, 134, 68, 352, _INTL("Used to confirm a choice, interact with people and things, and move through text. (Default: C)")) + addLabelForScreen(3, 134, 196, 352, _INTL("Used to exit, cancel a choice, and cancel a mode. While moving around, hold to move at a different speed. (Default: X)")) addImageForScreen(4, 16, 90, "Graphics/Pictures/Controls help/help_actionkey") - addImageForScreen(4, 16, 252, "Graphics/Pictures/Controls help/help_specialkey") - addLabelForScreen(4, 134, 52, 352, _INTL("Has various functions depending on context. While moving around, hold to move at a different speed. (Default: Z)")) - addLabelForScreen(4, 134, 212, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)")) + addImageForScreen(4, 16, 236, "Graphics/Pictures/Controls help/help_specialkey") + addLabelForScreen(4, 134, 68, 352, _INTL("Used to open the Pause Menu. Also has various functions depending on context. (Default: Z)")) + addLabelForScreen(4, 134, 196, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)")) set_up_screen(@current_screen) Graphics.transition(20) diff --git a/Data/Scripts/016_UI/001_UI_PauseMenu.rb b/Data/Scripts/016_UI/001_UI_PauseMenu.rb index 6d43a0a6a..f1614fc31 100644 --- a/Data/Scripts/016_UI/001_UI_PauseMenu.rb +++ b/Data/Scripts/016_UI/001_UI_PauseMenu.rb @@ -59,7 +59,7 @@ class PokemonPauseMenu_Scene Graphics.update Input.update pbUpdateSceneMap - if Input.trigger?(Input::BACK) + if Input.trigger?(Input::BACK) || Input.trigger?(Input::ACTION) ret = -1 break elsif Input.trigger?(Input::USE)