From cc1a2431452403d36f6997d96092c14cfc7b233a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 28 Dec 2021 12:18:44 -0300 Subject: [PATCH] Update src/battle_script_commands.c Co-authored-by: Eduardo Quezada D'Ottone --- src/battle_script_commands.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d41084ca7..07e68e5bc 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4190,12 +4190,21 @@ static void Cmd_unknown_24(void) if (gBattleControllerExecFlags) return; - #ifdef B_MULTI_BATTLE_WHITEOUT >= GEN_4 - if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER) && NoAliveMonsForPlayerAndPartner()) - gBattleOutcome |= B_OUTCOME_LOST; - #endif - if (!(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)) && NoAliveMonsForPlayer()) +#ifdef B_MULTI_BATTLE_WHITEOUT >= GEN_4 + if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)) + { + if (NoAliveMonsForPlayerAndPartner()) + gBattleOutcome |= B_OUTCOME_LOST; + } + else + { + if (NoAliveMonsForPlayer()) + gBattleOutcome |= B_OUTCOME_LOST; + } +#else + if (NoAliveMonsForPlayer()) gBattleOutcome |= B_OUTCOME_LOST; +#endif if (NoAliveMonsForOpponent()) gBattleOutcome |= B_OUTCOME_WON;