Push B in wild battle moves to Run (#3362)

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
This commit is contained in:
voloved 2023-10-21 11:45:40 -04:00 committed by GitHub
parent 33a0fdbbc6
commit ebdf14c620
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View file

@ -191,6 +191,7 @@
#define B_HIDE_HEALTHBOX_IN_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations.
#define B_EXPANDED_MOVE_NAMES FALSE // If set to TRUE, move names are increased from 12 characters to 16 characters.
#define B_WAIT_TIME_MULTIPLIER 16 // This determines how long text pauses in battle last. Vanilla is 16. Lower values result in faster battles.
#define B_QUICK_MOVE_CURSOR_TO_RUN FALSE // If set to TRUE, pushing B in the battle options against a wild encounter will move the cursor to the run option
// Catching settings
#define B_SEMI_INVULNERABLE_CATCH GEN_LATEST // In Gen4+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)

View file

@ -389,6 +389,16 @@ static void HandleInputChooseAction(u32 battler)
BtlController_EmitTwoReturnValues(battler, BUFFER_B, B_ACTION_CANCEL_PARTNER, 0);
PlayerBufferExecCompleted(battler);
}
else if (B_QUICK_MOVE_CURSOR_TO_RUN)
{
if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER)) // If wild battle, pressing B moves cursor to "Run".
{
PlaySE(SE_SELECT);
ActionSelectionDestroyCursorAt(gActionSelectionCursor[battler]);
gActionSelectionCursor[battler] = 3;
ActionSelectionCreateCursorAt(gActionSelectionCursor[battler], 0);
}
}
}
else if (JOY_NEW(START_BUTTON))
{

View file

@ -184,6 +184,13 @@ static void HandleInputChooseAction(u32 battler)
ActionSelectionCreateCursorAt(gActionSelectionCursor[battler], 0);
}
}
else if (B_QUICK_MOVE_CURSOR_TO_RUN && JOY_NEW(B_BUTTON))
{
PlaySE(SE_SELECT);
ActionSelectionDestroyCursorAt(gActionSelectionCursor[battler]);
gActionSelectionCursor[battler] = 3;
ActionSelectionCreateCursorAt(gActionSelectionCursor[battler], 0);
}
}
static void Controller_WaitForHealthbox(u32 battler)