fix abilities that might get the illusion type as well

This commit is contained in:
Lylian 2025-05-04 23:31:32 +02:00
parent 426b56a847
commit c10f01c7ac

View File

@ -6574,7 +6574,7 @@ export function initAbilities() {
.ignorable(),
new Ability(Abilities.MAGNET_PULL, 3)
.attr(ArenaTrapAbAttr, (user, target) => {
if (target.getTypes(true).includes(PokemonType.STEEL) || (target.getTypes(true).includes(PokemonType.STELLAR) && target.getTypes().includes(PokemonType.STEEL))) {
if (target.getTypes(true, false, undefined, false).includes(PokemonType.STEEL) || (target.getTypes(true).includes(PokemonType.STELLAR) && target.getTypes().includes(PokemonType.STEEL))) {
return true;
}
return false;
@ -6976,16 +6976,16 @@ export function initAbilities() {
.ignorable(),
new Ability(Abilities.FLOWER_VEIL, 6)
.attr(ConditionalUserFieldStatusEffectImmunityAbAttr, (target: Pokemon, source: Pokemon | null) => {
return source ? target.getTypes().includes(PokemonType.GRASS) && target.id !== source.id : false;
return source ? target.getTypes(false, false, undefined, false).includes(PokemonType.GRASS) && target.id !== source.id : false;
})
.attr(ConditionalUserFieldBattlerTagImmunityAbAttr,
(target: Pokemon) => {
return target.getTypes().includes(PokemonType.GRASS);
return target.getTypes(false, false, undefined, false).includes(PokemonType.GRASS);
},
[ BattlerTagType.DROWSY ],
)
.attr(ConditionalUserFieldProtectStatAbAttr, (target: Pokemon) => {
return target.getTypes().includes(PokemonType.GRASS);
return target.getTypes(false, false, undefined, false).includes(PokemonType.GRASS);
})
.ignorable(),
new Ability(Abilities.CHEEK_POUCH, 6)