From 52a68f6f1c8e8a853d45ece9085eacd8cab4285a Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 3 Nov 2018 10:51:51 +0100 Subject: [PATCH] Introduce ability pop-up define --- include/constants/battle_config.h | 1 + src/battle_interface.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 0be88b4421..2e44012c2d 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -13,5 +13,6 @@ #define B_GALE_WINGS GEN_6 // Gen7 requires full hp. #define B_SOUND_SUBSTITUTE GEN_6 // Starting from gen6 sound moves bypass Substitute. #define B_EXP_CATCH GEN_6 // Starting from gen6, pokemon get experience from catching. +#define B_ABILITY_POP_UP GEN_6 // Starting from gen5, the pokemon abilities are displayed in a pop-up, when they activate in battle. #endif // GUARD_CONSTANTS_BATTLE_CONFIG_H diff --git a/src/battle_interface.c b/src/battle_interface.c index 6691b6f33c..b2664487b1 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -26,6 +26,7 @@ #include "data2.h" #include "battle_debug.h" #include "malloc.h" +#include "constants/battle_config.h" struct TestingBar { @@ -3110,6 +3111,9 @@ void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle) const s16 (*coords)[2]; u8 spriteId1, spriteId2, battlerPosition, taskId; + if (B_ABILITY_POP_UP < GEN_5) + return; + if (!gBattleStruct->activeAbilityPopUps) { LoadSpriteSheet(&sSpriteSheet_AbilityPopUp);