From 69faaef6a1e6b21db5813febd2271a59c084fda9 Mon Sep 17 00:00:00 2001 From: cawtds <38510667+cawtds@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:39:03 +0100 Subject: [PATCH] sync recorded opponent --- src/battle_controller_recorded_opponent.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index c3450e63b..5ae5ccfb4 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -74,7 +74,7 @@ static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(u32 [CONTROLLER_PRINTSTRING] = RecordedOpponentHandlePrintString, [CONTROLLER_PRINTSTRINGPLAYERONLY] = BtlController_Empty, [CONTROLLER_CHOOSEACTION] = RecordedOpponentHandleChooseAction, - [CONTROLLER_YESNOBOX] = BtlController_Empty, + [CONTROLLER_YESNOBOX] = BtlController_Empty, [CONTROLLER_CHOOSEMOVE] = RecordedOpponentHandleChooseMove, [CONTROLLER_OPENBAG] = RecordedOpponentHandleChooseItem, [CONTROLLER_CHOOSEPOKEMON] = RecordedOpponentHandleChoosePokemon, @@ -460,9 +460,16 @@ static void RecordedOpponentHandleChooseAction(u32 battler) static void RecordedOpponentHandleChooseMove(u32 battler) { - u8 moveId = RecordedBattle_GetBattlerAction(RECORDED_MOVE_SLOT, battler); - u8 target = RecordedBattle_GetBattlerAction(RECORDED_MOVE_TARGET, battler); - BtlController_EmitTwoReturnValues(battler, BUFFER_B, 10, moveId | (target << 8)); + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + // BtlController_EmitTwoReturnValues(battler, BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace(battler)); + } + else + { + u8 moveId = RecordedBattle_GetBattlerAction(RECORDED_MOVE_SLOT, battler); + u8 target = RecordedBattle_GetBattlerAction(RECORDED_MOVE_TARGET, battler); + BtlController_EmitTwoReturnValues(battler, BUFFER_B, 10, moveId | (target << 8)); + } RecordedOpponentBufferExecCompleted(battler); }