Running from trainer battles properly handles whiteouts (#9228)
This commit is contained in:
parent
9119a6cc53
commit
d01442299a
@ -1321,6 +1321,13 @@ static void CB2_EndTrainerBattle(void)
|
||||
DowngradeBadPoison();
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
else if (DidPlayerForfeitNormalTrainerBattle())
|
||||
{
|
||||
if (FlagGet(B_FLAG_NO_WHITEOUT) || CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE || InTrainerHillChallenge())
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
else
|
||||
SetMainCallback2(CB2_WhiteOut);
|
||||
}
|
||||
else if (IsPlayerDefeated(gBattleOutcome) == TRUE)
|
||||
{
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE || InTrainerHillChallenge() || (!NoAliveMonsForPlayer()) || FlagGet(B_FLAG_NO_WHITEOUT))
|
||||
@ -1328,10 +1335,6 @@ static void CB2_EndTrainerBattle(void)
|
||||
else
|
||||
SetMainCallback2(CB2_WhiteOut);
|
||||
}
|
||||
else if (DidPlayerForfeitNormalTrainerBattle())
|
||||
{
|
||||
SetMainCallback2(CB2_WhiteOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user