Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability flags update (Receiver/Power of Alchemy) #3889

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading