[Ability] Fix Shield Dust and Sparkling Aria interaction (#3170)

* Shield Dust and Sparkling Aria interaction.

Shield Dust prevents a Pokémon's burn being cured by Sparkling Aria if it is the only target of the attack.

* Update src/data/move.ts

* Fix lint issue

---------

Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
This commit is contained in:
NxKarim 2024-07-29 17:27:03 -06:00 committed by GitHub
parent d3e5a68f10
commit e6e58131c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -2156,6 +2156,12 @@ export class HealStatusEffectAttr extends MoveEffectAttr {
return false; return false;
} }
// Special edge case for shield dust blocking Sparkling Aria curing burn
const moveTargets = getMoveTargets(user, move.id);
if (target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && move.id === Moves.SPARKLING_ARIA && moveTargets.targets.length === 1) {
return false;
}
const pokemon = this.selfTarget ? user : target; const pokemon = this.selfTarget ? user : target;
if (pokemon.status && this.effects.includes(pokemon.status.effect)) { if (pokemon.status && this.effects.includes(pokemon.status.effect)) {
pokemon.scene.queueMessage(getStatusEffectHealText(pokemon.status.effect, getPokemonNameWithAffix(pokemon))); pokemon.scene.queueMessage(getStatusEffectHealText(pokemon.status.effect, getPokemonNameWithAffix(pokemon)));