From 903b56756d8ed1b860917e61e05528796e56cb01 Mon Sep 17 00:00:00 2001 From: sbird Date: Sat, 8 Apr 2023 02:21:19 +0200 Subject: [PATCH] fix an oversight that caused battles to continuesly be double battles --- src/battle_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/battle_main.c b/src/battle_main.c index efbf1b8195..9d4c9dc9cb 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -2111,7 +2111,13 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir return 0; retVal = CreateNPCTrainerPartyFromTrainer(party, &gTrainers[trainerNum], firstTrainer, gBattleTypeFlags); - gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle; + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_TRAINER_HILL))) + { + gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle; + } + return retVal; } void VBlankCB_Battle(void)