Disable L button config (throw ball shortcut or move description) when there is overlap with L=A option (#8332)

This commit is contained in:
FosterProgramming 2026-01-03 08:39:59 +01:00 committed by GitHub
parent add14d90ff
commit 86ab719469
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View File

@ -242,7 +242,8 @@ static void HandleInputChooseAction(u32 battler)
else
gPlayerDpadHoldFrames = 0;
if (B_LAST_USED_BALL == TRUE && B_LAST_USED_BALL_CYCLE == TRUE)
if (B_LAST_USED_BALL == TRUE && B_LAST_USED_BALL_CYCLE == TRUE
&& !(B_LAST_USED_BALL_BUTTON == L_BUTTON && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A))
{
if (!gLastUsedBallMenuPresent)
{
@ -880,7 +881,8 @@ void HandleInputChooseMove(u32 battler)
MoveSelectionDisplayMoveType(battler);
}
}
else if (JOY_NEW(B_MOVE_DESCRIPTION_BUTTON))
else if (JOY_NEW(B_MOVE_DESCRIPTION_BUTTON) &&
!(B_MOVE_DESCRIPTION_BUTTON == L_BUTTON && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A))
{
gBattleStruct->descriptionSubmenu = TRUE;
TryMoveSelectionDisplayMoveDescription(battler);

View File

@ -2987,6 +2987,9 @@ void TryToAddMoveInfoWindow(void)
if (!B_SHOW_MOVE_DESCRIPTION)
return;
if (B_MOVE_DESCRIPTION_BUTTON == L_BUTTON && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
return;
LoadSpritePalette(&sSpritePalette_AbilityPopUp);
if (GetSpriteTileStartByTag(MOVE_INFO_WINDOW_TAG) == 0xFFFF)
LoadSpriteSheet(&sSpriteSheet_MoveInfoWindow);
@ -3096,6 +3099,9 @@ static void TryHideOrRestoreLastUsedBall(u8 caseId)
void TryHideLastUsedBall(void)
{
if (B_LAST_USED_BALL_BUTTON == L_BUTTON && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
return;
if (B_LAST_USED_BALL == TRUE)
TryHideOrRestoreLastUsedBall(0);
}
@ -3105,6 +3111,9 @@ void TryRestoreLastUsedBall(void)
if (B_LAST_USED_BALL == FALSE)
return;
if (B_LAST_USED_BALL_BUTTON == L_BUTTON && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
return;
if (gBattleStruct->ballSpriteIds[0] != MAX_SPRITES)
TryHideOrRestoreLastUsedBall(1);
else