From e917e3b016cd1e511ec6be9c86a43d62711ea320 Mon Sep 17 00:00:00 2001 From: SamuelHudson Date: Wed, 1 May 2024 14:42:53 -0500 Subject: [PATCH] Shortened code --- src/data/ability.ts | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 3e6e705e7..d0c80538e 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2961,12 +2961,7 @@ export function initAbilities() { .ignorable() .unimplemented(), new Ability(Abilities.FLOWER_VEIL, 6) - .conditionalAttr(p => (p.isOfType(Type.GRASS)), StatusEffectImmunityAbAttr, StatusEffect.BURN) - .conditionalAttr(p => (p.isOfType(Type.GRASS)), StatusEffectImmunityAbAttr, StatusEffect.FREEZE) - .conditionalAttr(p => (p.isOfType(Type.GRASS)), StatusEffectImmunityAbAttr, StatusEffect.PARALYSIS) - .conditionalAttr(p => (p.isOfType(Type.GRASS)), StatusEffectImmunityAbAttr, StatusEffect.POISON) - .conditionalAttr(p => (p.isOfType(Type.GRASS)), StatusEffectImmunityAbAttr, StatusEffect.SLEEP) - .conditionalAttr(p => (p.isOfType(Type.GRASS)), StatusEffectImmunityAbAttr, StatusEffect.TOXIC) + .conditionalAttr(p => (p.isOfType(Type.GRASS)), StatusEffectImmunityAbAttr, StatusEffect.BURN, StatusEffect.FREEZE, StatusEffect.PARALYSIS, StatusEffect.POISON, StatusEffect.SLEEP, StatusEffect.TOXIC) .ignorable() .partial(), new Ability(Abilities.CHEEK_POUCH, 6) @@ -3048,12 +3043,7 @@ export function initAbilities() { .attr(PostBattleInitFormChangeAbAttr, p => p.formIndex % 7 + (p.getHpRatio() <= 0.5 ? 7 : 0)) .attr(PostSummonFormChangeAbAttr, p => p.formIndex % 7 + (p.getHpRatio() <= 0.5 ? 7 : 0)) .attr(PostTurnFormChangeAbAttr, p => p.formIndex % 7 + (p.getHpRatio() <= 0.5 ? 7 : 0)) - .conditionalAttr(p => (p.formIndex < 7), StatusEffectImmunityAbAttr, StatusEffect.BURN) - .conditionalAttr(p => (p.formIndex < 7), StatusEffectImmunityAbAttr, StatusEffect.FREEZE) - .conditionalAttr(p => (p.formIndex < 7), StatusEffectImmunityAbAttr, StatusEffect.PARALYSIS) - .conditionalAttr(p => (p.formIndex < 7), StatusEffectImmunityAbAttr, StatusEffect.POISON) - .conditionalAttr(p => (p.formIndex < 7), StatusEffectImmunityAbAttr, StatusEffect.SLEEP) - .conditionalAttr(p => (p.formIndex < 7), StatusEffectImmunityAbAttr, StatusEffect.TOXIC) + .conditionalAttr(p => (p.formIndex < 7), StatusEffectImmunityAbAttr, StatusEffect.BURN, StatusEffect.FREEZE, StatusEffect.PARALYSIS, StatusEffect.POISON, StatusEffect.SLEEP, StatusEffect.TOXIC) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(UnsuppressableAbilityAbAttr) @@ -3123,12 +3113,7 @@ export function initAbilities() { new Ability(Abilities.CORROSION, 7) .unimplemented(), new Ability(Abilities.COMATOSE, 7) - .attr(StatusEffectImmunityAbAttr, StatusEffect.BURN) - .attr(StatusEffectImmunityAbAttr, StatusEffect.FREEZE) - .attr(StatusEffectImmunityAbAttr, StatusEffect.PARALYSIS) - .attr(StatusEffectImmunityAbAttr, StatusEffect.POISON) - .attr(StatusEffectImmunityAbAttr, StatusEffect.SLEEP) - .attr(StatusEffectImmunityAbAttr, StatusEffect.TOXIC) + .attr(StatusEffectImmunityAbAttr, StatusEffect.BURN, StatusEffect.FREEZE, StatusEffect.PARALYSIS, StatusEffect.POISON, StatusEffect.SLEEP, StatusEffect.TOXIC) .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.getMove().id == Moves.YAWN) .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon == attacker && move.getMove().id == Moves.REST) .attr(UncopiableAbilityAbAttr)