Skip to content

Commit

Permalink
fixed dupe gimmick use in doubles (#5235)
Browse files Browse the repository at this point in the history
Co-authored-by: psf <[email protected]>
  • Loading branch information
AgustinGDLV and pkmnsnfrn authored Aug 31, 2024
1 parent 073d599 commit cfa5696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/battle_controller_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ static void HandleInputChooseMove(u32 battler)
}
else if (JOY_NEW(START_BUTTON))
{
if (gBattleStruct->gimmick.usableGimmick[battler] != GIMMICK_NONE)
if (gBattleStruct->gimmick.usableGimmick[battler] != GIMMICK_NONE && !HasTrainerUsedGimmick(battler, gBattleStruct->gimmick.usableGimmick[battler]))
{
gBattleStruct->gimmick.playerSelect ^= 1;
ReloadMoveNames(battler);
Expand Down
3 changes: 2 additions & 1 deletion src/battle_gimmick.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ void CreateGimmickTriggerSprite(u32 battler)
// Exit if there shouldn't be a sprite produced.
if (GetBattlerSide(battler) == B_SIDE_OPPONENT
|| gBattleStruct->gimmick.usableGimmick[battler] == GIMMICK_NONE
|| gimmick->triggerSheet == NULL)
|| gimmick->triggerSheet == NULL
|| HasTrainerUsedGimmick(battler, gBattleStruct->gimmick.usableGimmick[battler]))
{
return;
}
Expand Down

0 comments on commit cfa5696

Please sign in to comment.