Battle menu: Automatically select the Fight option after switching out a Pokémon

This commit is contained in:
chardub
2025-03-12 10:45:54 -04:00
parent 3470c75b02
commit aa396cf402
2 changed files with 9 additions and 1 deletions

View File

@@ -219,7 +219,10 @@ class PokeBattle_Battle
break break
end end
when 2 # Pokémon when 2 # Pokémon
break if pbPartyMenu(idxBattler) if pbPartyMenu(idxBattler)
@scene.setLastCommandIndex(idxBattler,0)
break
end
when 3 # Run when 3 # Run
# NOTE: "Run" is only an available option for the first battler the # NOTE: "Run" is only an available option for the first battler the
# player chooses an action for in a round. Attempting to run # player chooses an action for in a round. Attempting to run

View File

@@ -1,4 +1,9 @@
class PokeBattle_Scene class PokeBattle_Scene
def setLastCommandIndex(battlerIndex,commandIndex)
@lastCmd[battlerIndex] = commandIndex
end
#============================================================================= #=============================================================================
# The player chooses a main command for a Pokémon # The player chooses a main command for a Pokémon
# Return values: -1=Cancel, 0=Fight, 1=Bag, 2=Pokémon, 3=Run, 4=Call # Return values: -1=Cancel, 0=Fight, 1=Bag, 2=Pokémon, 3=Run, 4=Call