From 541c069857d5207b5c2d5856c83f5774d24b261e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 27 Apr 2020 13:48:11 -0400 Subject: Sync trainer_battle.inc --- src/script_pokemon_util_80C4BF0.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/script_pokemon_util_80C4BF0.c') diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c index ce6c01439..c405d9cb4 100644 --- a/src/script_pokemon_util_80C4BF0.c +++ b/src/script_pokemon_util_80C4BF0.c @@ -437,20 +437,18 @@ u8 ScriptGiveEgg(u16 species) return GiveMonToPlayer(&mon); } -void CheckForAlivePartyMons(void) +void HasEnoughMonsForDoubleBattle(void) { - u8 var = sub_803DAA0(); - - switch(var) + switch (GetMonsStateToDoubles()) { - case 1: - gSpecialVar_Result = var; + case PLAYER_HAS_TWO_USABLE_MONS: + gSpecialVar_Result = PLAYER_HAS_TWO_USABLE_MONS; break; - case 0: - gSpecialVar_Result = var; + case PLAYER_HAS_ONE_MON: + gSpecialVar_Result = PLAYER_HAS_ONE_MON; break; - case 2: - gSpecialVar_Result = var; + case PLAYER_HAS_ONE_USABLE_MON: + gSpecialVar_Result = PLAYER_HAS_ONE_USABLE_MON; break; } } -- cgit v1.2.3