diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index f1e3902b4..01c0df71a 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7124,7 +7124,9 @@ BattleScript_AngerShellRet: return BattleScript_WindPowerActivates:: +.if B_CHECK_IF_CHARGED_UP == TRUE jumpifstatus3 BS_ATTACKER, STATUS3_CHARGED_UP, BattleScript_WindPowerActivates_Ret +.endif call BattleScript_AbilityPopUp setcharge printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER diff --git a/include/config/battle.h b/include/config/battle.h index 644f9955c..3f359a6f2 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -109,6 +109,7 @@ #define B_PLUS_MINUS_INTERACTION GEN_LATEST // In Gen5+, Plus and Minus can be activated with themselves and the opposite ability. Before, only the opposing ability could activate it. #define B_WEATHER_FORMS GEN_LATEST // In Gen5+, Castform and Cherrim revert to their base form upon losing their respective ability. Cherrim needs Flower Gift to swap forms. #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. +#define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/src/battle_util.c b/src/battle_util.c index e12612fa8..e79947b09 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5784,6 +5784,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_WIND_POWER: + case ABILITY_ELECTROMORPHOSIS: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED