diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index dc6ce74ecd..00963383b1 100755 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -17102,11 +17102,14 @@ void BS_ArenaJudgmentWindow(void) gBattlescriptCurrInstr = cmd->nextInstr; } -static void SetArenMonLostValues(u32 battler) +static void SetArenMonLostValues(u32 battler, u32 side) { gBattleMons[battler].hp = 0; gHitMarker |= HITMARKER_FAINTED(battler); - gBattleStruct->arenaLostOpponentMons |= 1u << gBattlerPartyIndexes[battler]; + if (side == B_SIDE_PLAYER) + gBattleStruct->arenaLostPlayerMons |= 1u << gBattlerPartyIndexes[battler]; + else + gBattleStruct->arenaLostOpponentMons |= 1u << gBattlerPartyIndexes[battler]; gDisableStructs[battler].truantSwitchInHack = TRUE; } @@ -17115,22 +17118,22 @@ static void SetArenMonLostValues(u32 battler) void BS_ArenaOpponentMonLost(void) { NATIVE_ARGS(); - SetArenMonLostValues(opponentMon); + SetArenMonLostValues(opponentMon, B_SIDE_OPPONENT); gBattlescriptCurrInstr = cmd->nextInstr; } void BS_ArenaPlayerMonLost(void) { NATIVE_ARGS(); - SetArenMonLostValues(playerMon); + SetArenMonLostValues(playerMon, B_SIDE_PLAYER); gBattlescriptCurrInstr = cmd->nextInstr; } void BS_ArenaBothMonsLost(void) { NATIVE_ARGS(); - SetArenMonLostValues(playerMon); - SetArenMonLostValues(opponentMon); + SetArenMonLostValues(playerMon, B_SIDE_PLAYER); + SetArenMonLostValues(opponentMon, B_SIDE_OPPONENT); gBattlescriptCurrInstr = cmd->nextInstr; } #undef playerMon