From 7aaefe72fb4938ea12b5f7797fefe7356f571daa Mon Sep 17 00:00:00 2001 From: Nephrite Date: Mon, 1 Jan 2024 18:58:29 +0000 Subject: [PATCH] Receiver/Power of Alchemy (#3889) --- src/battle_script_commands.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6cc177769f..ab9a544c34 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -9210,28 +9210,14 @@ static void Cmd_various(void) i = GetBattlerAbility(gBattlerAbility); if (IsBattlerAlive(gBattlerAbility) && (i == ABILITY_RECEIVER || i == ABILITY_POWER_OF_ALCHEMY) - && GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_ABILITY_SHIELD) + && GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_ABILITY_SHIELD + && !gAbilities[gBattleMons[battler].ability].cantBeCopied) { - switch (gBattleMons[battler].ability) - { // Can't copy these abilities. - case ABILITY_POWER_OF_ALCHEMY: case ABILITY_RECEIVER: - case ABILITY_FORECAST: case ABILITY_MULTITYPE: - case ABILITY_FLOWER_GIFT: case ABILITY_ILLUSION: - case ABILITY_WONDER_GUARD: case ABILITY_ZEN_MODE: - case ABILITY_STANCE_CHANGE: case ABILITY_IMPOSTER: - case ABILITY_POWER_CONSTRUCT: case ABILITY_BATTLE_BOND: - case ABILITY_SCHOOLING: case ABILITY_COMATOSE: - case ABILITY_SHIELDS_DOWN: case ABILITY_DISGUISE: - case ABILITY_RKS_SYSTEM: case ABILITY_TRACE: - case ABILITY_ZERO_TO_HERO: - break; - default: - gBattleStruct->tracedAbility[gBattlerAbility] = gBattleMons[battler].ability; // re-using the variable for trace - gBattleScripting.battler = battler; - BattleScriptPush(cmd->nextInstr); - gBattlescriptCurrInstr = BattleScript_ReceiverActivates; - return; - } + gBattleStruct->tracedAbility[gBattlerAbility] = gBattleMons[battler].ability; // re-using the variable for trace + gBattleScripting.battler = battler; + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = BattleScript_ReceiverActivates; + return; } break; }