From 4d349e9210f15c67b3f5b645ee085ed2429e53e9 Mon Sep 17 00:00:00 2001 From: GGbond Date: Sun, 8 Feb 2026 16:15:57 +0800 Subject: [PATCH] Fix Aroma Veil target-side check for ally-targeted limiting moves (#9157) --- src/battle_script_commands.c | 2 +- test/battle/ability/aroma_veil.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 7a29f9c5b9..9d4f679208 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4442,7 +4442,7 @@ static void Cmd_jumpifability(void) } break; case BS_TARGET_SIDE: - battler = IsAbilityOnOpposingSide(gBattlerAttacker, ability); + battler = IsAbilityOnSide(gBattlerTarget, ability); if (battler) { battler--; diff --git a/test/battle/ability/aroma_veil.c b/test/battle/ability/aroma_veil.c index 9a911f5d21..d9efde13c1 100644 --- a/test/battle/ability/aroma_veil.c +++ b/test/battle/ability/aroma_veil.c @@ -22,6 +22,24 @@ DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Taunt") } } +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from ally Taunt") +{ + GIVEN { + ASSUME(GetMoveEffect(MOVE_TAUNT) == EFFECT_TAUNT); + ASSUME(GetMoveCategory(MOVE_HARDEN) == DAMAGE_CATEGORY_STATUS); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); Speed(1); } + PLAYER(SPECIES_WOBBUFFET) { Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(3); } + OPPONENT(SPECIES_WYNAUT) { Speed(4); } + } WHEN { + TURN { MOVE(playerRight, MOVE_TAUNT, target: playerLeft); MOVE(playerLeft, MOVE_HARDEN); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_TAUNT, playerRight); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, playerLeft); + } +} + DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Torment") { struct BattlePokemon *moveTarget = NULL;