From 43e73ac576fa67769f8d86dbd7674b6aee15c466 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 1 Oct 2021 05:25:25 -0300 Subject: [PATCH] Fixed Safari Zone --- src/battle_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 5c3f2ecd8..25db65f78 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3465,10 +3465,13 @@ static void TryDoEventsBeforeFirstTurn(void) return; // Set invalid mons as absent(for example when starting a double battle with only one pokemon). - for (i = 0; i < gBattlersCount; i++) + if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI)) { - if (gBattleMons[i].hp == 0 || gBattleMons[i].species == SPECIES_NONE) - gAbsentBattlerFlags |= gBitTable[i]; + for (i = 0; i < gBattlersCount; i++) + { + if (gBattleMons[i].hp == 0 || gBattleMons[i].species == SPECIES_NONE) + gAbsentBattlerFlags |= gBitTable[i]; + } } if (gBattleStruct->switchInAbilitiesCounter == 0)