From 62912f8caf852eb453fe07a1fb504123d1a50e2e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 6 Nov 2022 16:01:07 -0300 Subject: [PATCH] Battle indicator now depends on species instead of held item - This is to avoid a situation where a user would plop a Primal Groudon and its indicator would become Alpha if it doesn't have a Red Orb. --- include/constants/form_change_types.h | 1 + src/battle_interface.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index 8701a9497c..b9d6c89424 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -81,5 +81,6 @@ // Form change that activates automatically when entering battle with the specified item. // If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol. +// The battle indicator icon is based on the species, with Primal Groudon's as Omega and otherwise being Alpha. // param1: item to hold. #define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 13 diff --git a/src/battle_interface.c b/src/battle_interface.c index c3d97f1379..f7882c15bb 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1560,12 +1560,12 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) } else if (IsBattlerPrimalReverted(battlerId)) { - if (gBattleMons[battlerId].item == ITEM_RED_ORB) + if (gBattleMons[battlerId].species == SPECIES_GROUDON_PRIMAL) { LoadSpritePalette(&sSpritePalette_OmegaIndicator); LoadSpriteSheet(&sSpriteSheet_OmegaIndicator); } - else // ITEM_BLUE_ORB + else // SPECIES_KYOGRE_PRIMAL { LoadSpritePalette(&sSpritePalette_AlphaIndicator); LoadSpriteSheet(&sSpriteSheet_AlphaIndicator); @@ -1589,9 +1589,9 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) } else if (IsBattlerPrimalReverted(battlerId)) { - if (gBattleMons[battlerId].item == ITEM_RED_ORB) + if (gBattleMons[battlerId].species == SPECIES_GROUDON_PRIMAL) spriteId = CreateSpriteAtEnd(&sSpriteTemplate_OmegaIndicator, x, y, 0); - else // ITEM_BLUE_ORB + else // SPECIES_KYOGRE_PRIMAL spriteId = CreateSpriteAtEnd(&sSpriteTemplate_AlphaIndicator, x, y, 0); }