From 6e12b35287dbc2187d2170b1d6e1cd9f8c4b5186 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 26 Dec 2025 20:36:42 -0300 Subject: [PATCH] Fix Status1 icon not being registered for recorded partner in tests (#8520) --- INSTALL.md | 4 ++-- src/battle_controller_recorded_partner.c | 13 ++++++++++++- test/battle/test_runner_features.c | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 47f00cf78f..ebdb12e58c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -140,7 +140,7 @@ git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion 2. Pull your desired branch There are three different options to pull from. ```console -git pull RHH master # if you've chosen to use the upcoming branch, replace the word master with upcoming. +git pull RHH master # if you've chosen to use the upcoming branch, replace the word master with upcoming. # If you've chosen the latest patch, replace the word master with expansion # If you've chosen Latest Patch, replace the word master with expansion/1.11.0 where 1.11.0 is replaced with whatever the latest released version is. ``` @@ -173,7 +173,7 @@ For example, if your version is 1.7.0, you should update to 1.7.4. git pull RHH expansion/X.Y.Z # Replace X, Y and Z with the target version, such as `1.9.3`, `master`, or `upcoming`. ``` -You may have merge conflicts that you need to resolve. +You may have merge conflicts that you need to resolve. If you targeted a specific version that is not the latest version listed on the [tags](https://github.com/rh-hideout/pokeemerald-expansion/tags) page, you should repeat steps 3 and 4 until you are. diff --git a/src/battle_controller_recorded_partner.c b/src/battle_controller_recorded_partner.c index d135329635..4a59002020 100644 --- a/src/battle_controller_recorded_partner.c +++ b/src/battle_controller_recorded_partner.c @@ -43,6 +43,7 @@ static void RecordedPartnerHandleIntroTrainerBallThrow(u32 battler); static void RecordedPartnerHandleDrawPartyStatusSummary(u32 battler); static void RecordedPartnerHandleEndLinkBattle(u32 battler); static void RecordedPartnerBufferRunCommand(u32 battler); +static void RecordedPartnerHandleStatusIconUpdate(u32 battler); static void (*const sRecordedPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(u32 battler) = { @@ -72,7 +73,7 @@ static void (*const sRecordedPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(u32 b [CONTROLLER_23] = BtlController_Empty, [CONTROLLER_HEALTHBARUPDATE] = BtlController_HandleHealthBarUpdate, [CONTROLLER_EXPUPDATE] = PlayerHandleExpUpdate, // Partner's player gets experience the same way as the player. - [CONTROLLER_STATUSICONUPDATE] = BtlController_HandleStatusIconUpdate, + [CONTROLLER_STATUSICONUPDATE] = RecordedPartnerHandleStatusIconUpdate, [CONTROLLER_STATUSANIMATION] = BtlController_HandleStatusAnimation, [CONTROLLER_STATUSXOR] = BtlController_Empty, [CONTROLLER_DATATRANSFER] = BtlController_Empty, @@ -267,3 +268,13 @@ static void RecordedPartnerHandleEndLinkBattle(u32 battler) BtlController_Complete(battler); gBattlerControllerFuncs[battler] = SetBattleEndCallbacks; } + +static void RecordedPartnerHandleStatusIconUpdate(u32 battler) +{ + if (!IsBattleSEPlaying(battler)) + { + DoStatusIconUpdate(battler); + if (gTestRunnerEnabled) + TestRunner_Battle_RecordStatus1(battler, GetMonData(GetBattlerMon(battler), MON_DATA_STATUS)); + } +} diff --git a/test/battle/test_runner_features.c b/test/battle/test_runner_features.c index 2c6d73abcc..25a75f9ce5 100644 --- a/test/battle/test_runner_features.c +++ b/test/battle/test_runner_features.c @@ -80,3 +80,17 @@ SINGLE_BATTLE_TEST("Changing forms doesn't overwrite set stats (HP)") EXPECT_EQ(player->maxHP, 10); } } + +MULTI_BATTLE_TEST("Multi Battle Tests register partner's status1") +{ + GIVEN { + MULTI_PLAYER(SPECIES_WOBBUFFET); + MULTI_PARTNER(SPECIES_WOBBUFFET); + MULTI_OPPONENT_A(SPECIES_WOBBUFFET); + MULTI_OPPONENT_B(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(playerLeft, MOVE_WILL_O_WISP, target: playerRight); } + } SCENE { + STATUS_ICON(playerRight, STATUS1_BURN); + } +}