diff --git a/include/test/battle.h b/include/test/battle.h index 819d05cbff..d1861e0c7f 100644 --- a/include/test/battle.h +++ b/include/test/battle.h @@ -682,6 +682,7 @@ struct BattleTestData struct RecordedBattleSave recordedBattle; u8 battleRecordTypes[MAX_BATTLERS_COUNT][BATTLER_RECORD_SIZE]; + u8 battleRecordTurnNumbers[MAX_BATTLERS_COUNT][BATTLER_RECORD_SIZE]; u8 battleRecordSourceLineOffsets[MAX_BATTLERS_COUNT][BATTLER_RECORD_SIZE]; u16 recordIndexes[MAX_BATTLERS_COUNT]; struct BattlerTurn battleRecordTurns[MAX_TURNS][MAX_BATTLERS_COUNT]; diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index ae86f87ab4..3e0250ffd0 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1863,6 +1863,7 @@ static void PushBattlerAction(u32 sourceLine, s32 battlerId, u32 actionType, u32 if (recordIndex >= BATTLER_RECORD_SIZE) Test_ExitWithResult(TEST_RESULT_INVALID, SourceLine(0), ":LToo many actions"); DATA.battleRecordTypes[battlerId][recordIndex] = actionType; + DATA.battleRecordTurnNumbers[battlerId][recordIndex] = DATA.turns; DATA.battleRecordSourceLineOffsets[battlerId][recordIndex] = SourceLineOffset(sourceLine); DATA.recordedBattle.battleRecord[battlerId][recordIndex] = byte; } @@ -1911,6 +1912,17 @@ void TestRunner_Battle_CheckBattleRecordActionType(u32 battlerId, u32 recordInde if (actualMacro) { + if (gBattleResults.battleTurnCounter != DATA.battleRecordTurnNumbers[battlerId][recordIndex]) + { + switch (DATA.battleRecordTypes[battlerId][recordIndex]) + { + case RECORDED_PARTY_INDEX: + Test_ExitWithResult(TEST_RESULT_INVALID, line, ":L%s:%d: %s not required (is the send out random?)", filename, line, actualMacro); + default: + Test_ExitWithResult(TEST_RESULT_INVALID, line, ":L%s:%d: %s not required", filename, line, actualMacro); + } + } + switch (actionType) { case RECORDED_ACTION_TYPE: