From bfe3e762ffd7b13d44b390c8c653819d3b3ebca3 Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:39:26 -0500 Subject: [PATCH] Fixed Battle AI debug screen shiny sprites (#3922) * Switched gBattleMons.isShiny to GetMonData * Simplified getting party of Pokemon --------- Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --- src/battle_debug.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/battle_debug.c b/src/battle_debug.c index 8e4046b56589..ddbed79ddaba 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -769,6 +769,7 @@ static void Task_ShowAiPoints(u8 taskId) u32 i, count; struct WindowTemplate winTemplate; struct BattleDebugMenu *data = GetStructPtr(taskId); + struct Pokemon *mon; switch (data->aiViewState) { @@ -800,8 +801,11 @@ static void Task_ShowAiPoints(u8 taskId) data->spriteIds.aiIconSpriteIds[i] = 0xFF; } } + + mon = &GetBattlerParty(data->aiBattlerId)[gBattlerPartyIndexes[data->aiBattlerId]]; + data->aiMonSpriteId = CreateMonPicSprite(gBattleMons[data->aiBattlerId].species, - gBattleMons[data->aiBattlerId].isShiny, + GetMonData(mon, MON_DATA_IS_SHINY), gBattleMons[data->aiBattlerId].personality, TRUE, 39, 130, 15, TAG_NONE); @@ -926,6 +930,7 @@ static void Task_ShowAiKnowledge(u8 taskId) u32 i, count; struct WindowTemplate winTemplate; struct BattleDebugMenu *data = GetStructPtr(taskId); + struct Pokemon *mon; switch (data->aiViewState) { @@ -957,8 +962,11 @@ static void Task_ShowAiKnowledge(u8 taskId) data->spriteIds.aiIconSpriteIds[i] = 0xFF; } } + + mon = &GetBattlerParty(data->aiBattlerId)[gBattlerPartyIndexes[data->aiBattlerId]]; + data->aiMonSpriteId = CreateMonPicSprite(gBattleMons[data->aiBattlerId].species, - gBattleMons[data->aiBattlerId].isShiny, + GetMonData(mon, MON_DATA_IS_SHINY), gBattleMons[data->aiBattlerId].personality, TRUE, 39, 130, 15, TAG_NONE);