Allow evolution after exp from mon catching

This commit is contained in:
DizzyEggg 2019-07-08 13:26:21 +02:00
parent d1fa9c24cc
commit d3d9051c4a

View File

@ -4887,14 +4887,14 @@ static void FreeResetData_ReturnToOvOrDoEvolutions(void)
if (!gPaletteFade.active) if (!gPaletteFade.active)
{ {
ResetSpriteData(); ResetSpriteData();
if (gLeveledUpInBattle == 0 || gBattleOutcome != B_OUTCOME_WON) if (gLeveledUpInBattle && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT))
{ {
gBattleMainFunc = ReturnFromBattleToOverworld; gBattleMainFunc = TryEvolvePokemon;
return;
} }
else else
{ {
gBattleMainFunc = TryEvolvePokemon; gBattleMainFunc = ReturnFromBattleToOverworld;
return;
} }
} }
@ -5724,5 +5724,3 @@ static void HandleAction_ActionFinished(void)
gBattleScripting.multihitMoveEffect = 0; gBattleScripting.multihitMoveEffect = 0;
gBattleResources->battleScriptsStack->size = 0; gBattleResources->battleScriptsStack->size = 0;
} }