Skip to content

Commit

Permalink
Receiver/Power of Alchemy
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmnephrite committed Jan 1, 2024
1 parent ab75ad6 commit 97787b2
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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;
}
&& GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_ABILITY_SHIELD
&& !gAbilities[gBattleMons[battler].ability].cantBeCopied)
{
gBattleStruct->tracedAbility[gBattlerAbility] = gBattleMons[battler].ability; // re-using the variable for trace
gBattleScripting.battler = battler;
BattleScriptPush(cmd->nextInstr);
gBattlescriptCurrInstr = BattleScript_ReceiverActivates;
return;
}
break;
}
Expand Down

0 comments on commit 97787b2

Please sign in to comment.