Allow second mon to throw a ball if first dead

This commit is contained in:
DizzyEggg 2020-02-16 13:24:50 +01:00
parent a1c425fffb
commit 5054727167
2 changed files with 4 additions and 2 deletions

View File

@ -3666,7 +3666,8 @@ u8 IsRunningFromBattleImpossible(void)
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
return 1;
}
if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT && WILD_DOUBLE_BATTLE) // The second pokemon cannot run from a double wild battle.
if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT && WILD_DOUBLE_BATTLE
&& IsBattlerAlive(GetBattlerAtPosition(B_POSITION_PLAYER_LEFT))) // The second pokemon cannot run from a double wild battle, unless it's the only alive mon.
{
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
return 1;

View File

@ -951,7 +951,8 @@ void ItemUseInBattle_PokeBall(u8 taskId)
else
DisplayItemMessageInBattlePyramid(taskId, textCantThrowPokeBall, Task_CloseBattlePyramidBagMessage);
}
else if (gBattlerInMenuId == GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)) // Attempting to throw a ball with the second pokemon.
else if (gBattlerInMenuId == GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)
&& IsBattlerAlive(GetBattlerAtPosition(B_POSITION_PLAYER_LEFT))) // Attempting to throw a ball with the second pokemon while both are alive.
{
static const u8 textCantThrowPokeBall[] = _("Cannot throw a ball!\p");