From dcb463cd541b762bd74eee66035a5d6235789baf Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 3 Nov 2025 11:06:57 +0100 Subject: [PATCH] remove move orb effects file --- include/move_orb_effects.h | 16 ---------------- include/overlay_29_02313814.h | 11 +++++++++++ main.lsf | 1 - src/overlay_29_02313814.c | 21 +++++++++++++++++++++ 4 files changed, 32 insertions(+), 17 deletions(-) delete mode 100644 include/move_orb_effects.h diff --git a/include/move_orb_effects.h b/include/move_orb_effects.h deleted file mode 100644 index 39fb09e2..00000000 --- a/include/move_orb_effects.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef PMDSKY_MOVE_ORB_EFFECTS_H -#define PMDSKY_MOVE_ORB_EFFECTS_H - -#include "dungeon_mode.h" - -enum flash_fire_status { - FLASH_FIRE_STATUS_NONE = 0, - FLASH_FIRE_STATUS_MAXED = 1, - FLASH_FIRE_STATUS_NOT_MAXED = 2 -}; - -// Checks whether Flash Fire should activate, assuming the defender is being hit by a Fire-type move. -// This checks that the defender is valid and Flash Fire is active, and that Normalize isn't active on the attacker. -enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender); - -#endif //PMDSKY_MOVE_ORB_EFFECTS_H diff --git a/include/overlay_29_02313814.h b/include/overlay_29_02313814.h index bb6fc44f..9b793560 100644 --- a/include/overlay_29_02313814.h +++ b/include/overlay_29_02313814.h @@ -1,6 +1,14 @@ #ifndef PMDSKY_OVERLAY_29_02313814_H #define PMDSKY_OVERLAY_29_02313814_H +#include "dungeon_mode.h" + +enum flash_fire_status { + FLASH_FIRE_STATUS_NONE = 0, + FLASH_FIRE_STATUS_MAXED = 1, + FLASH_FIRE_STATUS_NOT_MAXED = 2 +}; + #define STAT_INDEX_PHYSICAL 0 // Atk, Def #define STAT_INDEX_SPECIAL 1 // Sp Atk, Sp Def #define STAT_INDEX_ACCURACY STAT_INDEX_PHYSICAL @@ -15,5 +23,8 @@ void LowerOffensiveStat(struct entity *user, struct entity *target, struct StatI void LowerDefensiveStat(struct entity *user, struct entity *target, struct StatIndex stat, s32 increment, bool8 checkProtected, bool8 logMsgProtected); void BoostOffensiveStat(struct entity *user, struct entity *target, struct StatIndex stat, s32 nStagesRaw); void BoostDefensiveStat(struct entity *user, struct entity *target, struct StatIndex stat, s32 nStagesRaw); +// Checks whether Flash Fire should activate, assuming the defender is being hit by a Fire-type move. +// This checks that the defender is valid and Flash Fire is active, and that Normalize isn't active on the attacker. +enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender); #endif //PMDSKY_OVERLAY_29_02313814_H diff --git a/main.lsf b/main.lsf index b431e90f..360f7351 100644 --- a/main.lsf +++ b/main.lsf @@ -542,7 +542,6 @@ Overlay OVY_29 Object src/overlay_29_02311BF8.o Object asm/overlay_29_02311C28.o Object src/overlay_29_02313814.o - Object src/move_orb_effects.o Object asm/overlay_29_02313CE4.o Object src/overlay_29_023147EC.o Object asm/overlay_29_02314810.o diff --git a/src/overlay_29_02313814.c b/src/overlay_29_02313814.c index ff046a9f..9ac9a6c6 100644 --- a/src/overlay_29_02313814.c +++ b/src/overlay_29_02313814.c @@ -253,3 +253,24 @@ void BoostDefensiveStat(struct entity *user, struct entity *target, struct StatI } UpdateStatusIconFlags(target); } + +enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender) +{ + if (!EntityIsValid__023118B4(defender)) + return FLASH_FIRE_STATUS_NONE; + + if (AbilityIsActiveVeneer(attacker, ABILITY_NORMALIZE)) + return FLASH_FIRE_STATUS_NONE; + +#ifdef JAPAN + if (!DefenderAbilityIsActive__02311B94(attacker, defender, ABILITY_FLASH_FIRE)) +#else + if (!DefenderAbilityIsActive__02311B94(attacker, defender, ABILITY_FLASH_FIRE, TRUE)) +#endif + return FLASH_FIRE_STATUS_NONE; + + if (GetEntInfo(defender)->stat_modifiers.flash_fire_boost >= 2) + return FLASH_FIRE_STATUS_MAXED; + + return FLASH_FIRE_STATUS_NOT_MAXED; +}