Shortened code

pull/383/head
SamuelHudson 2024-05-01 14:42:53 -05:00
parent 2244bfd5b0
commit e917e3b016
1 changed files with 3 additions and 18 deletions

View File

@ -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)