Add gBattleOutcome == B_OUTCOME_DREW to bugfix

Mirroring the change that Nintendo made when rereleasing FRLG on Switch, which addresses the Roamer BUG, they also added a check for B_OUTCOME_DREW.
This commit is contained in:
AZero13 2026-03-03 10:33:47 -05:00
parent 25ffb2c12c
commit 371708f6d0

View File

@ -5234,10 +5234,13 @@ static void ReturnFromBattleToOverworld(void)
UpdateRoamerHPStatus(&gEnemyParty[0]);
#ifndef BUGFIX
// Bug: When Roar is used by a roamer, gBattleOutcome is B_OUTCOME_PLAYER_TELEPORTED (5),
// which deactivates the roamer.
if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT)
#else
if ((gBattleOutcome == B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT) // Bug: When Roar is used by roamer, gBattleOutcome is B_OUTCOME_PLAYER_TELEPORTED (5).
#endif // & with B_OUTCOME_WON (1) will return TRUE and deactivates the roamer.
if ((gBattleOutcome == B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT ||
gBattleOutcome == B_OUTCOME_DREW)
#endif
SetRoamerInactive();
}