diff --git a/src/battle_message.c b/src/battle_message.c index e0ebf9f1f..cc8c99521 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -18,6 +18,7 @@ #include "recorded_battle.h" #include "string_util.h" #include "strings.h" +#include "test_runner.h" #include "text.h" #include "trainer_hill.h" #include "window.h" @@ -3080,7 +3081,8 @@ static const u8 *BattleStringGetPlayerName(u8 *text, u8 battlerId) toCpy = gSaveBlock2Ptr->playerName; break; case B_POSITION_PLAYER_RIGHT: - if ((gBattleTypeFlags & BATTLE_TYPE_RECORDED) && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER))) + if (((gBattleTypeFlags & BATTLE_TYPE_RECORDED) && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER))) + || gTestRunnerEnabled) { toCpy = gLinkPlayers[0].name; } diff --git a/test/battle/form_change/mega_evolution.c b/test/battle/form_change/mega_evolution.c index 32cfb2c59..3b47c7c86 100644 --- a/test/battle/form_change/mega_evolution.c +++ b/test/battle/form_change/mega_evolution.c @@ -27,7 +27,7 @@ DOUBLE_BATTLE_TEST("Mega Evolution's order is determined by Speed - opponent fas } WHEN { TURN { MOVE(opponentLeft, MOVE_CELEBRATE, megaEvolve: TRUE); MOVE(playerLeft, MOVE_CELEBRATE, megaEvolve: TRUE); } } SCENE { - MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); + MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 2's Mega Ring!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft); MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!"); @@ -49,7 +49,7 @@ DOUBLE_BATTLE_TEST("Mega Evolution's order is determined by Speed - player faste MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, playerLeft); MESSAGE("Venusaur has Mega Evolved into Mega Venusaur!"); - MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); + MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 2's Mega Ring!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft); MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); } @@ -145,7 +145,7 @@ SINGLE_BATTLE_TEST("Regular Mega Evolution and Fervent Wish Mega Evolution can h ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, player); MESSAGE("Rayquaza has Mega Evolved into Mega Rayquaza!"); - MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); + MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 2's Mega Ring!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent); MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); } THEN { diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index e65066a84..80d1f5594 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -9,6 +9,7 @@ #include "random.h" #include "test/battle.h" #include "window.h" +#include "constants/trainers.h" #if defined(__INTELLISENSE__) #undef TestRunner_Battle_RecordAbilityPopUp @@ -232,11 +233,15 @@ static void BattleTest_Run(void *data) memset(&DATA, 0, sizeof(DATA)); DATA.recordedBattle.rngSeed = RNG_SEED_DEFAULT; + DATA.recordedBattle.opponentA = TRAINER_LINK_OPPONENT; DATA.recordedBattle.textSpeed = OPTIONS_TEXT_SPEED_FAST; DATA.recordedBattle.battleFlags = BATTLE_TYPE_RECORDED_IS_MASTER | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_TRAINER | BATTLE_TYPE_IS_MASTER; if (test->type == BATTLE_TEST_DOUBLES) + { DATA.recordedBattle.battleFlags |= BATTLE_TYPE_DOUBLE; + DATA.recordedBattle.opponentB = TRAINER_LINK_OPPONENT; + } for (i = 0; i < STATE->battlersCount; i++) { DATA.recordedBattle.playersName[i][0] = CHAR_1 + i;