From c462663b6dbc1c9ed5f87d9456cfac812428d1b6 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Mon, 28 Dec 2020 22:53:01 +0000 Subject: [PATCH 1/2] Game map now refreshes when a Game Switch/Variable is changed in Debug screen --- Data/Scripts/021_Debug/002_Debug_Actions.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Data/Scripts/021_Debug/002_Debug_Actions.rb b/Data/Scripts/021_Debug/002_Debug_Actions.rb index 4e8a732cd..fc8519214 100644 --- a/Data/Scripts/021_Debug/002_Debug_Actions.rb +++ b/Data/Scripts/021_Debug/002_Debug_Actions.rb @@ -119,6 +119,7 @@ def pbDebugSetVariable(id,diff) pbPlayCursorSE $game_variables[id] = [$game_variables[id]+diff,99999999].min $game_variables[id] = [$game_variables[id],-99999999].max + $game_map.need_refresh = true end end @@ -132,10 +133,12 @@ def pbDebugVariableScreen(id) value = pbMessageChooseNumber(_INTL("Set variable {1}.",id),params) $game_variables[id] = [value,99999999].min $game_variables[id] = [$game_variables[id],-99999999].max + $game_map.need_refresh = true elsif $game_variables[id].is_a?(String) value = pbMessageFreeText(_INTL("Set variable {1}.",id), $game_variables[id],false,250,Graphics.width) $game_variables[id] = value + $game_map.need_refresh = true end end @@ -161,6 +164,7 @@ def pbDebugVariables(mode) pbPlayDecisionSE $game_switches[current_id] = !$game_switches[current_id] right_window.refresh + $game_map.need_refresh = true end elsif mode==1 # Variables if Input.repeat?(Input::LEFT) @@ -180,6 +184,7 @@ def pbDebugVariables(mode) $game_variables[current_id] = "" end right_window.refresh + $game_map.need_refresh = true elsif Input.trigger?(Input::C) pbPlayDecisionSE pbDebugVariableScreen(current_id) From cbbf6bad93483807954cd7717e2ce23b30c1d2e6 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Thu, 31 Dec 2020 14:24:34 +0000 Subject: [PATCH 2/2] Player is no longer asked if they want to switch after they already replaced a fainted battler that round --- .../012_Battle/003_Battle/006_Battle_Action_Switching.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb b/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb index b435a5e43..182417b9d 100644 --- a/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb +++ b/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb @@ -164,8 +164,8 @@ class PokeBattle_Battle # Pokémon when an opponent replaces a fainted Pokémon in single # battles. In double battles, etc. there is no such offer. if @internalBattle && @switchStyle && trainerBattle? && pbSideSize(0)==1 && - opposes?(idxBattler) && !@battlers[0].fainted? && pbCanChooseNonActive?(0) && - @battlers[0].effects[PBEffects::Outrage]==0 + opposes?(idxBattler) && !@battlers[0].fainted? && !switched.include?(0) && + pbCanChooseNonActive?(0) && @battlers[0].effects[PBEffects::Outrage]==0 idxPartyForName = idxPartyNew enemyParty = pbParty(idxBattler) if isConst?(enemyParty[idxPartyNew].ability,PBAbilities,:ILLUSION)