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

Fixes Psychic Noise, Aroma Veil interaction in doubles #4021

Merged
merged 2 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -3793,9 +3793,11 @@ void SetMoveEffect(bool32 primary, bool32 certain)
SetMoveEffect(primary, certain);
break;
case MOVE_EFFECT_PSYCHIC_NOISE:
if (GetBattlerAbility(gEffectBattler) == ABILITY_AROMA_VEIL || GetBattlerAbility(BATTLE_PARTNER(gEffectBattler)) == ABILITY_AROMA_VEIL)
battlerAbility = IsAbilityOnSide(gEffectBattler, ABILITY_AROMA_VEIL);

if (battlerAbility)
{
gBattlerAbility = gEffectBattler;
gBattlerAbility = battlerAbility - 1;
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_AromaVeilProtectsRet;
}
Expand Down
17 changes: 17 additions & 0 deletions test/battle/move_effect/psychic_noise.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,20 @@ SINGLE_BATTLE_TEST("Psychic Noise heal block effect is blocked by Aroma Veil")
ANIMATION(ANIM_TYPE_MOVE, MOVE_RECOVER, opponent);
}
}

DOUBLE_BATTLE_TEST("Psychic Noise heal block effect is blocked by partners Aroma Veil in doubles")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_MILCERY) { Ability(ABILITY_AROMA_VEIL); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_PSYCHIC_NOISE, target: opponentLeft); MOVE(opponentLeft, MOVE_RECOVER); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_PSYCHIC_NOISE, playerLeft);
ABILITY_POPUP(opponentRight, ABILITY_AROMA_VEIL);
MESSAGE("Foe Wobbuffet is protected by an aromatic veil!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_RECOVER, opponentLeft);
}
}
Loading