Update ability.ts

This commit is contained in:
JSLveil 2024-09-05 22:08:20 -07:00 committed by GitHub
parent 51ab51cc64
commit 93f74cbee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -444,7 +444,12 @@ class TypeImmunityAddBattlerTagAbAttr extends TypeImmunityAbAttr {
if (ret) {
cancelled.value = true; // Suppresses "No Effect" message
if (!simulated) {
pokemon.addTag(this.tagType, this.turnCount, undefined, pokemon.id);
if (!pokemon.getTag(this.tagType)) {
pokemon.addTag(this.tagType, this.turnCount, undefined, pokemon.id);
pokemon.scene.queueMessage(i18next.t("abilityTriggers:flashFire", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: Type[attacker.getMoveType(move)].charAt(0).toUpperCase() + Type[attacker.getMoveType(move)].slice(1).toLowerCase() }));
} else {
pokemon.scene.queueMessage(i18next.t(i18next.t("abilityTriggers:moveImmunity", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })));
}
}
}