Fixes Dazzling abilities activating on all multi hit move hits (#6943)

This commit is contained in:
Alex 2025-05-22 10:37:00 +02:00 committed by GitHub
parent be4b8ca3d0
commit 8ad1f329c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View File

@ -4313,6 +4313,7 @@ bool32 CanAbilityBlockMove(u32 battlerAtk, u32 battlerDef, u32 move, u32 ability
if (option == ABILITY_RUN_SCRIPT)
{
gMultiHitCounter = 0; // Prevent multi-hit moves from hitting more than once after move has been absorbed.
gBattleScripting.battler = gBattlerAbility = battlerAbility;
gBattlescriptCurrInstr = battleScriptBlocksMove;
}

View File

@ -72,3 +72,27 @@ DOUBLE_BATTLE_TEST("Dazzling, Queenly Majesty and Armor Tail don't protect the u
}
}
SINGLE_BATTLE_TEST("Dazzling, Queenly Majesty and Armor Tail protect from all multi hit hits with one activation")
{
u32 species, ability;
PARAMETRIZE { species = SPECIES_BRUXISH; ability = ABILITY_DAZZLING; }
PARAMETRIZE { species = SPECIES_FARIGIRAF; ability = ABILITY_ARMOR_TAIL; }
PARAMETRIZE { species = SPECIES_TSAREENA; ability = ABILITY_QUEENLY_MAJESTY; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(species) { Ability(ability); }
} WHEN {
TURN { MOVE(player, MOVE_WATER_SHURIKEN); }
} SCENE {
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_WATER_SHURIKEN, opponent);
ABILITY_POPUP(opponent, ability);
NONE_OF {
ABILITY_POPUP(opponent, ability);
ABILITY_POPUP(opponent, ability);
ABILITY_POPUP(opponent, ability);
ABILITY_POPUP(opponent, ability);
}
}
}