mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 14:52:19 +02:00
Change suppress/replace/copy flags
This commit is contained in:
parent
bb76cf7cc4
commit
bdaf3e9948
@ -57,6 +57,9 @@ export class Ability implements Localizable {
|
|||||||
public generation: number;
|
public generation: number;
|
||||||
public isBypassFaint: boolean;
|
public isBypassFaint: boolean;
|
||||||
public isIgnorable: boolean;
|
public isIgnorable: boolean;
|
||||||
|
public isSuppressable: boolean;
|
||||||
|
public isCopiable: boolean;
|
||||||
|
public isReplaceable: boolean;
|
||||||
public attrs: AbAttr[];
|
public attrs: AbAttr[];
|
||||||
public conditions: AbAttrCondition[];
|
public conditions: AbAttrCondition[];
|
||||||
|
|
||||||
@ -68,6 +71,10 @@ export class Ability implements Localizable {
|
|||||||
this.attrs = [];
|
this.attrs = [];
|
||||||
this.conditions = [];
|
this.conditions = [];
|
||||||
|
|
||||||
|
this.isSuppressable = true;
|
||||||
|
this.isCopiable = true;
|
||||||
|
this.isReplaceable = true;
|
||||||
|
|
||||||
this.localize();
|
this.localize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,6 +128,21 @@ export class Ability implements Localizable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsuppressable(): Ability {
|
||||||
|
this.isSuppressable = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
uncopiable(): Ability {
|
||||||
|
this.isCopiable = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
unreplaceable(): Ability {
|
||||||
|
this.isReplaceable = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
condition(condition: AbAttrCondition): Ability {
|
condition(condition: AbAttrCondition): Ability {
|
||||||
this.conditions.push(condition);
|
this.conditions.push(condition);
|
||||||
|
|
||||||
@ -1138,7 +1160,7 @@ export class PostDefendAbilitySwapAbAttr extends PostDefendAbAttr {
|
|||||||
|
|
||||||
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
||||||
return move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)
|
return move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)
|
||||||
&& !attacker.getAbility().hasAttr(UnswappableAbilityAbAttr) && !move.hitsSubstitute(attacker, pokemon);
|
&& attacker.getAbility().isReplaceable && attacker.getAbility().isCopiable && !move.hitsSubstitute(attacker, pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, args: any[]): void {
|
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, args: any[]): void {
|
||||||
@ -1163,7 +1185,7 @@ export class PostDefendAbilityGiveAbAttr extends PostDefendAbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
||||||
return move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !attacker.getAbility().hasAttr(UnsuppressableAbilityAbAttr)
|
return move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && attacker.getAbility().isSuppressable
|
||||||
&& !attacker.getAbility().hasAttr(PostDefendAbilityGiveAbAttr) && !move.hitsSubstitute(attacker, pokemon);
|
&& !attacker.getAbility().hasAttr(PostDefendAbilityGiveAbAttr) && !move.hitsSubstitute(attacker, pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2103,7 +2125,7 @@ export class CopyFaintedAllyAbilityAbAttr extends PostKnockOutAbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override canApplyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean {
|
override canApplyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean {
|
||||||
return pokemon.isPlayer() === knockedOut.isPlayer() && !knockedOut.getAbility().hasAttr(UncopiableAbilityAbAttr);
|
return pokemon.isPlayer() === knockedOut.isPlayer() && knockedOut.getAbility().isCopiable;
|
||||||
}
|
}
|
||||||
|
|
||||||
override applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): void {
|
override applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): void {
|
||||||
@ -2550,7 +2572,7 @@ export class PostSummonCopyAbilityAbAttr extends PostSummonAbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
target!.getAbility().hasAttr(UncopiableAbilityAbAttr) &&
|
!target!.getAbility().isCopiable &&
|
||||||
// Wonder Guard is normally uncopiable so has the attribute, but Trace specifically can copy it
|
// Wonder Guard is normally uncopiable so has the attribute, but Trace specifically can copy it
|
||||||
!(pokemon.hasAbility(Abilities.TRACE) && target!.getAbility().id === Abilities.WONDER_GUARD)
|
!(pokemon.hasAbility(Abilities.TRACE) && target!.getAbility().id === Abilities.WONDER_GUARD)
|
||||||
) {
|
) {
|
||||||
@ -4812,24 +4834,6 @@ export class InfiltratorAbAttr extends AbAttr {
|
|||||||
*/
|
*/
|
||||||
export class ReflectStatusMoveAbAttr extends AbAttr { }
|
export class ReflectStatusMoveAbAttr extends AbAttr { }
|
||||||
|
|
||||||
export class UncopiableAbilityAbAttr extends AbAttr {
|
|
||||||
constructor() {
|
|
||||||
super(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class UnsuppressableAbilityAbAttr extends AbAttr {
|
|
||||||
constructor() {
|
|
||||||
super(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class UnswappableAbilityAbAttr extends AbAttr {
|
|
||||||
constructor() {
|
|
||||||
super(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class NoTransformAbilityAbAttr extends AbAttr {
|
export class NoTransformAbilityAbAttr extends AbAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(false);
|
super(false);
|
||||||
@ -6143,8 +6147,7 @@ export function initAbilities() {
|
|||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.WONDER_GUARD, 3)
|
new Ability(Abilities.WONDER_GUARD, 3)
|
||||||
.attr(NonSuperEffectiveImmunityAbAttr)
|
.attr(NonSuperEffectiveImmunityAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.LEVITATE, 3)
|
new Ability(Abilities.LEVITATE, 3)
|
||||||
.attr(AttackTypeImmunityAbAttr, PokemonType.GROUND, (pokemon: Pokemon) => !pokemon.getTag(GroundedTag) && !globalScene.arena.getTag(ArenaTagType.GRAVITY))
|
.attr(AttackTypeImmunityAbAttr, PokemonType.GROUND, (pokemon: Pokemon) => !pokemon.getTag(GroundedTag) && !globalScene.arena.getTag(ArenaTagType.GRAVITY))
|
||||||
@ -6178,7 +6181,7 @@ export function initAbilities() {
|
|||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.TRACE, 3)
|
new Ability(Abilities.TRACE, 3)
|
||||||
.attr(PostSummonCopyAbilityAbAttr)
|
.attr(PostSummonCopyAbilityAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr),
|
.uncopiable(),
|
||||||
new Ability(Abilities.HUGE_POWER, 3)
|
new Ability(Abilities.HUGE_POWER, 3)
|
||||||
.attr(StatMultiplierAbAttr, Stat.ATK, 2),
|
.attr(StatMultiplierAbAttr, Stat.ATK, 2),
|
||||||
new Ability(Abilities.POISON_POINT, 3)
|
new Ability(Abilities.POISON_POINT, 3)
|
||||||
@ -6231,7 +6234,7 @@ export function initAbilities() {
|
|||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.PICKUP, 3)
|
new Ability(Abilities.PICKUP, 3)
|
||||||
.attr(PostBattleLootAbAttr)
|
.attr(PostBattleLootAbAttr)
|
||||||
.attr(UnsuppressableAbilityAbAttr),
|
.unsuppressable(),
|
||||||
new Ability(Abilities.TRUANT, 3)
|
new Ability(Abilities.TRUANT, 3)
|
||||||
.attr(PostSummonAddBattlerTagAbAttr, BattlerTagType.TRUANT, 1, false),
|
.attr(PostSummonAddBattlerTagAbAttr, BattlerTagType.TRUANT, 1, false),
|
||||||
new Ability(Abilities.HUSTLE, 3)
|
new Ability(Abilities.HUSTLE, 3)
|
||||||
@ -6244,7 +6247,7 @@ export function initAbilities() {
|
|||||||
new Ability(Abilities.MINUS, 3)
|
new Ability(Abilities.MINUS, 3)
|
||||||
.conditionalAttr(p => globalScene.currentBattle.double && [ Abilities.PLUS, Abilities.MINUS ].some(a => p.getAlly().hasAbility(a)), StatMultiplierAbAttr, Stat.SPATK, 1.5),
|
.conditionalAttr(p => globalScene.currentBattle.double && [ Abilities.PLUS, Abilities.MINUS ].some(a => p.getAlly().hasAbility(a)), StatMultiplierAbAttr, Stat.SPATK, 1.5),
|
||||||
new Ability(Abilities.FORECAST, 3)
|
new Ability(Abilities.FORECAST, 3)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FORECAST)
|
.attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FORECAST)
|
||||||
.attr(PostWeatherChangeFormChangeAbAttr, Abilities.FORECAST, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG ]),
|
.attr(PostWeatherChangeFormChangeAbAttr, Abilities.FORECAST, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG ]),
|
||||||
@ -6424,20 +6427,20 @@ export function initAbilities() {
|
|||||||
.attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.SNOW),
|
.attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.SNOW),
|
||||||
new Ability(Abilities.HONEY_GATHER, 4)
|
new Ability(Abilities.HONEY_GATHER, 4)
|
||||||
.attr(MoneyAbAttr)
|
.attr(MoneyAbAttr)
|
||||||
.attr(UnsuppressableAbilityAbAttr),
|
.unsuppressable(),
|
||||||
new Ability(Abilities.FRISK, 4)
|
new Ability(Abilities.FRISK, 4)
|
||||||
.attr(FriskAbAttr),
|
.attr(FriskAbAttr),
|
||||||
new Ability(Abilities.RECKLESS, 4)
|
new Ability(Abilities.RECKLESS, 4)
|
||||||
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.RECKLESS_MOVE), 1.2),
|
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.RECKLESS_MOVE), 1.2),
|
||||||
new Ability(Abilities.MULTITYPE, 4)
|
new Ability(Abilities.MULTITYPE, 4)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
.unsuppressable()
|
||||||
.attr(NoFusionAbilityAbAttr),
|
.unreplaceable(),
|
||||||
new Ability(Abilities.FLOWER_GIFT, 4)
|
new Ability(Abilities.FLOWER_GIFT, 4)
|
||||||
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.ATK, 1.5)
|
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.ATK, 1.5)
|
||||||
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.SPDEF, 1.5)
|
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.SPDEF, 1.5)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FLOWER_GIFT)
|
.attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FLOWER_GIFT)
|
||||||
.attr(PostWeatherChangeFormChangeAbAttr, Abilities.FLOWER_GIFT, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG, WeatherType.HAIL, WeatherType.HEAVY_RAIN, WeatherType.SNOW, WeatherType.RAIN ])
|
.attr(PostWeatherChangeFormChangeAbAttr, Abilities.FLOWER_GIFT, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG, WeatherType.HAIL, WeatherType.HEAVY_RAIN, WeatherType.SNOW, WeatherType.RAIN ])
|
||||||
@ -6523,12 +6526,11 @@ export function initAbilities() {
|
|||||||
return Utils.isNullOrUndefined(movePhase);
|
return Utils.isNullOrUndefined(movePhase);
|
||||||
}, 1.3),
|
}, 1.3),
|
||||||
new Ability(Abilities.ILLUSION, 5)
|
new Ability(Abilities.ILLUSION, 5)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new Ability(Abilities.IMPOSTER, 5)
|
new Ability(Abilities.IMPOSTER, 5)
|
||||||
.attr(PostSummonTransformAbAttr)
|
.attr(PostSummonTransformAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr),
|
.uncopiable(),
|
||||||
new Ability(Abilities.INFILTRATOR, 5)
|
new Ability(Abilities.INFILTRATOR, 5)
|
||||||
.attr(InfiltratorAbAttr)
|
.attr(InfiltratorAbAttr)
|
||||||
.partial(), // does not bypass Mist
|
.partial(), // does not bypass Mist
|
||||||
@ -6570,10 +6572,10 @@ export function initAbilities() {
|
|||||||
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
||||||
.attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 1 : 0)
|
.attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 1 : 0)
|
||||||
.attr(PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 1 : 0)
|
.attr(PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 1 : 0)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable()
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.VICTORY_STAR, 5)
|
new Ability(Abilities.VICTORY_STAR, 5)
|
||||||
.attr(StatMultiplierAbAttr, Stat.ACC, 1.1)
|
.attr(StatMultiplierAbAttr, Stat.ACC, 1.1)
|
||||||
@ -6615,10 +6617,10 @@ export function initAbilities() {
|
|||||||
.ignorable()
|
.ignorable()
|
||||||
.partial(), // Mold Breaker ally should not be affected by Sweet Veil
|
.partial(), // Mold Breaker ally should not be affected by Sweet Veil
|
||||||
new Ability(Abilities.STANCE_CHANGE, 6)
|
new Ability(Abilities.STANCE_CHANGE, 6)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(NoFusionAbilityAbAttr),
|
.unsuppressable(),
|
||||||
new Ability(Abilities.GALE_WINGS, 6)
|
new Ability(Abilities.GALE_WINGS, 6)
|
||||||
.attr(ChangeMovePriorityAbAttr, (pokemon, move) => pokemon.isFullHp() && pokemon.getMoveType(move) === PokemonType.FLYING, 1),
|
.attr(ChangeMovePriorityAbAttr, (pokemon, move) => pokemon.isFullHp() && pokemon.getMoveType(move) === PokemonType.FLYING, 1),
|
||||||
new Ability(Abilities.MEGA_LAUNCHER, 6)
|
new Ability(Abilities.MEGA_LAUNCHER, 6)
|
||||||
@ -6683,11 +6685,11 @@ export function initAbilities() {
|
|||||||
.attr(PostTurnFormChangeAbAttr, 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)
|
.conditionalAttr(p => p.formIndex !== 7, StatusEffectImmunityAbAttr)
|
||||||
.conditionalAttr(p => p.formIndex !== 7, BattlerTagImmunityAbAttr, BattlerTagType.DROWSY)
|
.conditionalAttr(p => p.formIndex !== 7, BattlerTagImmunityAbAttr, BattlerTagType.DROWSY)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable()
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.STAKEOUT, 7)
|
new Ability(Abilities.STAKEOUT, 7)
|
||||||
.attr(MovePowerBoostAbAttr, (user, target, move) => !!target?.turnData.switchedInThisTurn, 2),
|
.attr(MovePowerBoostAbAttr, (user, target, move) => !!target?.turnData.switchedInThisTurn, 2),
|
||||||
@ -6718,15 +6720,12 @@ export function initAbilities() {
|
|||||||
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
||||||
.attr(PostSummonFormChangeAbAttr, p => p.level < 20 || p.getHpRatio() <= 0.25 ? 0 : 1)
|
.attr(PostSummonFormChangeAbAttr, p => p.level < 20 || p.getHpRatio() <= 0.25 ? 0 : 1)
|
||||||
.attr(PostTurnFormChangeAbAttr, p => p.level < 20 || p.getHpRatio() <= 0.25 ? 0 : 1)
|
.attr(PostTurnFormChangeAbAttr, p => p.level < 20 || p.getHpRatio() <= 0.25 ? 0 : 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable()
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.DISGUISE, 7)
|
new Ability(Abilities.DISGUISE, 7)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
// Add BattlerTagType.DISGUISE if the pokemon is in its disguised form
|
// Add BattlerTagType.DISGUISE if the pokemon is in its disguised form
|
||||||
@ -6736,15 +6735,18 @@ export function initAbilities() {
|
|||||||
(pokemon, abilityName) => i18next.t("abilityTriggers:disguiseAvoidedDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName: abilityName }),
|
(pokemon, abilityName) => i18next.t("abilityTriggers:disguiseAvoidedDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName: abilityName }),
|
||||||
(pokemon) => Utils.toDmgValue(pokemon.getMaxHp() / 8))
|
(pokemon) => Utils.toDmgValue(pokemon.getMaxHp() / 8))
|
||||||
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable()
|
||||||
.bypassFaint()
|
.bypassFaint()
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.BATTLE_BOND, 7)
|
new Ability(Abilities.BATTLE_BOND, 7)
|
||||||
.attr(PostVictoryFormChangeAbAttr, () => 2)
|
.attr(PostVictoryFormChangeAbAttr, () => 2)
|
||||||
.attr(PostBattleInitFormChangeAbAttr, () => 1)
|
.attr(PostBattleInitFormChangeAbAttr, () => 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable()
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.POWER_CONSTRUCT, 7)
|
new Ability(Abilities.POWER_CONSTRUCT, 7)
|
||||||
.conditionalAttr(pokemon => pokemon.formIndex === 2 || pokemon.formIndex === 4, PostBattleInitFormChangeAbAttr, () => 2)
|
.conditionalAttr(pokemon => pokemon.formIndex === 2 || pokemon.formIndex === 4, PostBattleInitFormChangeAbAttr, () => 2)
|
||||||
@ -6753,20 +6755,20 @@ export function initAbilities() {
|
|||||||
.conditionalAttr(pokemon => pokemon.formIndex === 2 || pokemon.formIndex === 4, PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "complete" ? 4 : 2)
|
.conditionalAttr(pokemon => pokemon.formIndex === 2 || pokemon.formIndex === 4, PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "complete" ? 4 : 2)
|
||||||
.conditionalAttr(pokemon => pokemon.formIndex === 3 || pokemon.formIndex === 5, PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "10-complete" ? 5 : 3)
|
.conditionalAttr(pokemon => pokemon.formIndex === 3 || pokemon.formIndex === 5, PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "10-complete" ? 5 : 3)
|
||||||
.conditionalAttr(pokemon => pokemon.formIndex === 3 || pokemon.formIndex === 5, PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "10-complete" ? 5 : 3)
|
.conditionalAttr(pokemon => pokemon.formIndex === 3 || pokemon.formIndex === 5, PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "10-complete" ? 5 : 3)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable()
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.CORROSION, 7)
|
new Ability(Abilities.CORROSION, 7)
|
||||||
.attr(IgnoreTypeStatusEffectImmunityAbAttr, [ StatusEffect.POISON, StatusEffect.TOXIC ], [ PokemonType.STEEL, PokemonType.POISON ])
|
.attr(IgnoreTypeStatusEffectImmunityAbAttr, [ StatusEffect.POISON, StatusEffect.TOXIC ], [ PokemonType.STEEL, PokemonType.POISON ])
|
||||||
.edgeCase(), // Should poison itself with toxic orb.
|
.edgeCase(), // Should poison itself with toxic orb.
|
||||||
new Ability(Abilities.COMATOSE, 7)
|
new Ability(Abilities.COMATOSE, 7)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(StatusEffectImmunityAbAttr, ...getNonVolatileStatusEffects())
|
.attr(StatusEffectImmunityAbAttr, ...getNonVolatileStatusEffects())
|
||||||
.attr(BattlerTagImmunityAbAttr, BattlerTagType.DROWSY),
|
.attr(BattlerTagImmunityAbAttr, BattlerTagType.DROWSY)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable(),
|
||||||
new Ability(Abilities.QUEENLY_MAJESTY, 7)
|
new Ability(Abilities.QUEENLY_MAJESTY, 7)
|
||||||
.attr(FieldPriorityMoveImmunityAbAttr)
|
.attr(FieldPriorityMoveImmunityAbAttr)
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
@ -6790,10 +6792,10 @@ export function initAbilities() {
|
|||||||
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), Stat.SPD, -1, false),
|
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), Stat.SPD, -1, false),
|
||||||
new Ability(Abilities.RECEIVER, 7)
|
new Ability(Abilities.RECEIVER, 7)
|
||||||
.attr(CopyFaintedAllyAbilityAbAttr)
|
.attr(CopyFaintedAllyAbilityAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr),
|
.uncopiable(),
|
||||||
new Ability(Abilities.POWER_OF_ALCHEMY, 7)
|
new Ability(Abilities.POWER_OF_ALCHEMY, 7)
|
||||||
.attr(CopyFaintedAllyAbilityAbAttr)
|
.attr(CopyFaintedAllyAbilityAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr),
|
.uncopiable(),
|
||||||
new Ability(Abilities.BEAST_BOOST, 7)
|
new Ability(Abilities.BEAST_BOOST, 7)
|
||||||
.attr(PostVictoryStatStageChangeAbAttr, p => {
|
.attr(PostVictoryStatStageChangeAbAttr, p => {
|
||||||
let highestStat: EffectiveStat;
|
let highestStat: EffectiveStat;
|
||||||
@ -6808,10 +6810,10 @@ export function initAbilities() {
|
|||||||
return highestStat!;
|
return highestStat!;
|
||||||
}, 1),
|
}, 1),
|
||||||
new Ability(Abilities.RKS_SYSTEM, 7)
|
new Ability(Abilities.RKS_SYSTEM, 7)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(NoFusionAbilityAbAttr),
|
.unsuppressable(),
|
||||||
new Ability(Abilities.ELECTRIC_SURGE, 7)
|
new Ability(Abilities.ELECTRIC_SURGE, 7)
|
||||||
.attr(PostSummonTerrainChangeAbAttr, TerrainType.ELECTRIC)
|
.attr(PostSummonTerrainChangeAbAttr, TerrainType.ELECTRIC)
|
||||||
.attr(PostBiomeChangeTerrainChangeAbAttr, TerrainType.ELECTRIC),
|
.attr(PostBiomeChangeTerrainChangeAbAttr, TerrainType.ELECTRIC),
|
||||||
@ -6857,11 +6859,11 @@ export function initAbilities() {
|
|||||||
* @see {@linkcode GulpMissileTagAttr} and {@linkcode GulpMissileTag} for Gulp Missile implementation
|
* @see {@linkcode GulpMissileTagAttr} and {@linkcode GulpMissileTag} for Gulp Missile implementation
|
||||||
*/
|
*/
|
||||||
new Ability(Abilities.GULP_MISSILE, 8)
|
new Ability(Abilities.GULP_MISSILE, 8)
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.unsuppressable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.STALWART, 8)
|
new Ability(Abilities.STALWART, 8)
|
||||||
.attr(BlockRedirectAbAttr),
|
.attr(BlockRedirectAbAttr),
|
||||||
@ -6884,9 +6886,6 @@ export function initAbilities() {
|
|||||||
new Ability(Abilities.RIPEN, 8)
|
new Ability(Abilities.RIPEN, 8)
|
||||||
.attr(DoubleBerryEffectAbAttr),
|
.attr(DoubleBerryEffectAbAttr),
|
||||||
new Ability(Abilities.ICE_FACE, 8)
|
new Ability(Abilities.ICE_FACE, 8)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
// Add BattlerTagType.ICE_FACE if the pokemon is in ice face form
|
// Add BattlerTagType.ICE_FACE if the pokemon is in ice face form
|
||||||
@ -6899,6 +6898,9 @@ export function initAbilities() {
|
|||||||
(target, user, move) => move.category === MoveCategory.PHYSICAL && !!target.getTag(BattlerTagType.ICE_FACE), 0, BattlerTagType.ICE_FACE,
|
(target, user, move) => move.category === MoveCategory.PHYSICAL && !!target.getTag(BattlerTagType.ICE_FACE), 0, BattlerTagType.ICE_FACE,
|
||||||
(pokemon, abilityName) => i18next.t("abilityTriggers:iceFaceAvoidedDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName: abilityName }))
|
(pokemon, abilityName) => i18next.t("abilityTriggers:iceFaceAvoidedDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName: abilityName }))
|
||||||
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable()
|
||||||
|
.unsuppressable()
|
||||||
.bypassFaint()
|
.bypassFaint()
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.POWER_SPOT, 8)
|
new Ability(Abilities.POWER_SPOT, 8)
|
||||||
@ -6921,8 +6923,7 @@ export function initAbilities() {
|
|||||||
new Ability(Abilities.NEUTRALIZING_GAS, 8)
|
new Ability(Abilities.NEUTRALIZING_GAS, 8)
|
||||||
.attr(PostSummonAddArenaTagAbAttr, true, ArenaTagType.NEUTRALIZING_GAS, 0)
|
.attr(PostSummonAddArenaTagAbAttr, true, ArenaTagType.NEUTRALIZING_GAS, 0)
|
||||||
.attr(PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr)
|
.attr(PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
new Ability(Abilities.PASTEL_VEIL, 8)
|
new Ability(Abilities.PASTEL_VEIL, 8)
|
||||||
@ -6932,11 +6933,11 @@ export function initAbilities() {
|
|||||||
new Ability(Abilities.HUNGER_SWITCH, 8)
|
new Ability(Abilities.HUNGER_SWITCH, 8)
|
||||||
.attr(PostTurnFormChangeAbAttr, p => p.getFormKey() ? 0 : 1)
|
.attr(PostTurnFormChangeAbAttr, p => p.getFormKey() ? 0 : 1)
|
||||||
.attr(PostTurnFormChangeAbAttr, p => p.getFormKey() ? 1 : 0)
|
.attr(PostTurnFormChangeAbAttr, p => p.getFormKey() ? 1 : 0)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.condition((pokemon) => !pokemon.isTerastallized),
|
.condition((pokemon) => !pokemon.isTerastallized)
|
||||||
|
.uncopiable()
|
||||||
|
.unreplaceable(),
|
||||||
new Ability(Abilities.QUICK_DRAW, 8)
|
new Ability(Abilities.QUICK_DRAW, 8)
|
||||||
.attr(BypassSpeedChanceAbAttr, 30),
|
.attr(BypassSpeedChanceAbAttr, 30),
|
||||||
new Ability(Abilities.UNSEEN_FIST, 8)
|
new Ability(Abilities.UNSEEN_FIST, 8)
|
||||||
@ -6955,16 +6956,16 @@ export function initAbilities() {
|
|||||||
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAsOneGlastrier", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
|
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAsOneGlastrier", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
|
||||||
.attr(PreventBerryUseAbAttr)
|
.attr(PreventBerryUseAbAttr)
|
||||||
.attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1)
|
.attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(UnsuppressableAbilityAbAttr),
|
.unsuppressable(),
|
||||||
new Ability(Abilities.AS_ONE_SPECTRIER, 8)
|
new Ability(Abilities.AS_ONE_SPECTRIER, 8)
|
||||||
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAsOneSpectrier", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
|
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAsOneSpectrier", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
|
||||||
.attr(PreventBerryUseAbAttr)
|
.attr(PreventBerryUseAbAttr)
|
||||||
.attr(PostVictoryStatStageChangeAbAttr, Stat.SPATK, 1)
|
.attr(PostVictoryStatStageChangeAbAttr, Stat.SPATK, 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(UnsuppressableAbilityAbAttr),
|
.unsuppressable(),
|
||||||
new Ability(Abilities.LINGERING_AROMA, 9)
|
new Ability(Abilities.LINGERING_AROMA, 9)
|
||||||
.attr(PostDefendAbilityGiveAbAttr, Abilities.LINGERING_AROMA)
|
.attr(PostDefendAbilityGiveAbAttr, Abilities.LINGERING_AROMA)
|
||||||
.bypassFaint(),
|
.bypassFaint(),
|
||||||
@ -6999,9 +7000,9 @@ export function initAbilities() {
|
|||||||
new Ability(Abilities.WIND_POWER, 9)
|
new Ability(Abilities.WIND_POWER, 9)
|
||||||
.attr(PostDefendApplyBattlerTagAbAttr, (target, user, move) => move.hasFlag(MoveFlags.WIND_MOVE), BattlerTagType.CHARGED),
|
.attr(PostDefendApplyBattlerTagAbAttr, (target, user, move) => move.hasFlag(MoveFlags.WIND_MOVE), BattlerTagType.CHARGED),
|
||||||
new Ability(Abilities.ZERO_TO_HERO, 9)
|
new Ability(Abilities.ZERO_TO_HERO, 9)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
.unsuppressable()
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
.attr(PostBattleInitFormChangeAbAttr, () => 0)
|
||||||
@ -7010,22 +7011,20 @@ export function initAbilities() {
|
|||||||
new Ability(Abilities.COMMANDER, 9)
|
new Ability(Abilities.COMMANDER, 9)
|
||||||
.attr(CommanderAbAttr)
|
.attr(CommanderAbAttr)
|
||||||
.attr(DoubleBattleChanceAbAttr)
|
.attr(DoubleBattleChanceAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.edgeCase(), // Encore, Frenzy, and other non-`TURN_END` tags don't lapse correctly on the commanding Pokemon.
|
.edgeCase(), // Encore, Frenzy, and other non-`TURN_END` tags don't lapse correctly on the commanding Pokemon.
|
||||||
new Ability(Abilities.ELECTROMORPHOSIS, 9)
|
new Ability(Abilities.ELECTROMORPHOSIS, 9)
|
||||||
.attr(PostDefendApplyBattlerTagAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, BattlerTagType.CHARGED),
|
.attr(PostDefendApplyBattlerTagAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, BattlerTagType.CHARGED),
|
||||||
new Ability(Abilities.PROTOSYNTHESIS, 9)
|
new Ability(Abilities.PROTOSYNTHESIS, 9)
|
||||||
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN), PostSummonAddBattlerTagAbAttr, BattlerTagType.PROTOSYNTHESIS, 0, true)
|
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN), PostSummonAddBattlerTagAbAttr, BattlerTagType.PROTOSYNTHESIS, 0, true)
|
||||||
.attr(PostWeatherChangeAddBattlerTagAttr, BattlerTagType.PROTOSYNTHESIS, 0, WeatherType.SUNNY, WeatherType.HARSH_SUN)
|
.attr(PostWeatherChangeAddBattlerTagAttr, BattlerTagType.PROTOSYNTHESIS, 0, WeatherType.SUNNY, WeatherType.HARSH_SUN)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(NoTransformAbilityAbAttr),
|
.attr(NoTransformAbilityAbAttr),
|
||||||
new Ability(Abilities.QUARK_DRIVE, 9)
|
new Ability(Abilities.QUARK_DRIVE, 9)
|
||||||
.conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), PostSummonAddBattlerTagAbAttr, BattlerTagType.QUARK_DRIVE, 0, true)
|
.conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), PostSummonAddBattlerTagAbAttr, BattlerTagType.QUARK_DRIVE, 0, true)
|
||||||
.attr(PostTerrainChangeAddBattlerTagAttr, BattlerTagType.QUARK_DRIVE, 0, TerrainType.ELECTRIC)
|
.attr(PostTerrainChangeAddBattlerTagAttr, BattlerTagType.QUARK_DRIVE, 0, TerrainType.ELECTRIC)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
|
||||||
.attr(NoTransformAbilityAbAttr),
|
.attr(NoTransformAbilityAbAttr),
|
||||||
new Ability(Abilities.GOOD_AS_GOLD, 9)
|
new Ability(Abilities.GOOD_AS_GOLD, 9)
|
||||||
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS && ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget))
|
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS && ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget))
|
||||||
@ -7089,45 +7088,45 @@ export function initAbilities() {
|
|||||||
.attr(PostAttackApplyStatusEffectAbAttr, false, 30, StatusEffect.TOXIC),
|
.attr(PostAttackApplyStatusEffectAbAttr, false, 30, StatusEffect.TOXIC),
|
||||||
new Ability(Abilities.EMBODY_ASPECT_TEAL, 9)
|
new Ability(Abilities.EMBODY_ASPECT_TEAL, 9)
|
||||||
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.SPD ], 1)
|
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.SPD ], 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable() // TODO is this true?
|
||||||
.attr(NoTransformAbilityAbAttr),
|
.attr(NoTransformAbilityAbAttr),
|
||||||
new Ability(Abilities.EMBODY_ASPECT_WELLSPRING, 9)
|
new Ability(Abilities.EMBODY_ASPECT_WELLSPRING, 9)
|
||||||
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.SPDEF ], 1)
|
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.SPDEF ], 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(NoTransformAbilityAbAttr),
|
.attr(NoTransformAbilityAbAttr),
|
||||||
new Ability(Abilities.EMBODY_ASPECT_HEARTHFLAME, 9)
|
new Ability(Abilities.EMBODY_ASPECT_HEARTHFLAME, 9)
|
||||||
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.ATK ], 1)
|
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.ATK ], 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(NoTransformAbilityAbAttr),
|
.attr(NoTransformAbilityAbAttr),
|
||||||
new Ability(Abilities.EMBODY_ASPECT_CORNERSTONE, 9)
|
new Ability(Abilities.EMBODY_ASPECT_CORNERSTONE, 9)
|
||||||
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.DEF ], 1)
|
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.DEF ], 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(NoTransformAbilityAbAttr),
|
.attr(NoTransformAbilityAbAttr),
|
||||||
new Ability(Abilities.TERA_SHIFT, 9)
|
new Ability(Abilities.TERA_SHIFT, 9)
|
||||||
.attr(PostSummonFormChangeAbAttr, p => p.getFormKey() ? 0 : 1)
|
.attr(PostSummonFormChangeAbAttr, p => p.getFormKey() ? 0 : 1)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
.unsuppressable()
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
.attr(NoFusionAbilityAbAttr),
|
.attr(NoFusionAbilityAbAttr),
|
||||||
new Ability(Abilities.TERA_SHELL, 9)
|
new Ability(Abilities.TERA_SHELL, 9)
|
||||||
.attr(FullHpResistTypeAbAttr)
|
.attr(FullHpResistTypeAbAttr)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.TERAFORM_ZERO, 9)
|
new Ability(Abilities.TERAFORM_ZERO, 9)
|
||||||
.attr(ClearWeatherAbAttr, [ WeatherType.SUNNY, WeatherType.RAIN, WeatherType.SANDSTORM, WeatherType.HAIL, WeatherType.SNOW, WeatherType.FOG, WeatherType.HEAVY_RAIN, WeatherType.HARSH_SUN, WeatherType.STRONG_WINDS ])
|
.attr(ClearWeatherAbAttr, [ WeatherType.SUNNY, WeatherType.RAIN, WeatherType.SANDSTORM, WeatherType.HAIL, WeatherType.SNOW, WeatherType.FOG, WeatherType.HEAVY_RAIN, WeatherType.HARSH_SUN, WeatherType.STRONG_WINDS ])
|
||||||
.attr(ClearTerrainAbAttr, [ TerrainType.MISTY, TerrainType.ELECTRIC, TerrainType.GRASSY, TerrainType.PSYCHIC ])
|
.attr(ClearTerrainAbAttr, [ TerrainType.MISTY, TerrainType.ELECTRIC, TerrainType.GRASSY, TerrainType.PSYCHIC ])
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable()
|
||||||
.condition(getOncePerBattleCondition(Abilities.TERAFORM_ZERO)),
|
.condition(getOncePerBattleCondition(Abilities.TERAFORM_ZERO)),
|
||||||
new Ability(Abilities.POISON_PUPPETEER, 9)
|
new Ability(Abilities.POISON_PUPPETEER, 9)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.uncopiable()
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.unreplaceable() // TODO is this true?
|
||||||
.attr(ConfusionOnStatusEffectAbAttr, StatusEffect.POISON, StatusEffect.TOXIC)
|
.attr(ConfusionOnStatusEffectAbAttr, StatusEffect.POISON, StatusEffect.TOXIC)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -64,9 +64,6 @@ import {
|
|||||||
PostDamageForceSwitchAbAttr,
|
PostDamageForceSwitchAbAttr,
|
||||||
PostItemLostAbAttr,
|
PostItemLostAbAttr,
|
||||||
ReverseDrainAbAttr,
|
ReverseDrainAbAttr,
|
||||||
UncopiableAbilityAbAttr,
|
|
||||||
UnsuppressableAbilityAbAttr,
|
|
||||||
UnswappableAbilityAbAttr,
|
|
||||||
UserFieldMoveTypePowerBoostAbAttr,
|
UserFieldMoveTypePowerBoostAbAttr,
|
||||||
VariableMovePowerAbAttr,
|
VariableMovePowerAbAttr,
|
||||||
WonderSkinAbAttr,
|
WonderSkinAbAttr,
|
||||||
@ -6746,7 +6743,7 @@ export class RandomMoveAttr extends CallMoveAttr {
|
|||||||
* This function exists solely to allow tests to override the randomly selected move by mocking this function.
|
* This function exists solely to allow tests to override the randomly selected move by mocking this function.
|
||||||
*/
|
*/
|
||||||
public getMoveOverride(): Moves | null {
|
public getMoveOverride(): Moves | null {
|
||||||
return null;
|
return Moves.HOLD_HANDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -7383,7 +7380,7 @@ export class AbilityChangeAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCondition(): MoveConditionFunc {
|
getCondition(): MoveConditionFunc {
|
||||||
return (user, target, move) => !(this.selfTarget ? user : target).getAbility().hasAttr(UnswappableAbilityAbAttr) && (this.selfTarget ? user : target).getAbility().id !== this.ability;
|
return (user, target, move) => (this.selfTarget ? user : target).getAbility().isReplaceable && (this.selfTarget ? user : target).getAbility().id !== this.ability;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7415,9 +7412,9 @@ export class AbilityCopyAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
getCondition(): MoveConditionFunc {
|
getCondition(): MoveConditionFunc {
|
||||||
return (user, target, move) => {
|
return (user, target, move) => {
|
||||||
let ret = !target.getAbility().hasAttr(UncopiableAbilityAbAttr) && !user.getAbility().hasAttr(UnswappableAbilityAbAttr);
|
let ret = target.getAbility().isCopiable && user.getAbility().isReplaceable;
|
||||||
if (this.copyToPartner && globalScene.currentBattle?.double) {
|
if (this.copyToPartner && globalScene.currentBattle?.double) {
|
||||||
ret = ret && (!user.getAlly().hp || !user.getAlly().getAbility().hasAttr(UnswappableAbilityAbAttr));
|
ret = ret && (!user.getAlly().hp || user.getAlly().getAbility().isReplaceable);
|
||||||
} else {
|
} else {
|
||||||
ret = ret && user.getAbility().id !== target.getAbility().id;
|
ret = ret && user.getAbility().id !== target.getAbility().id;
|
||||||
}
|
}
|
||||||
@ -7446,7 +7443,7 @@ export class AbilityGiveAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCondition(): MoveConditionFunc {
|
getCondition(): MoveConditionFunc {
|
||||||
return (user, target, move) => !user.getAbility().hasAttr(UncopiableAbilityAbAttr) && !target.getAbility().hasAttr(UnswappableAbilityAbAttr) && user.getAbility().id !== target.getAbility().id;
|
return (user, target, move) => user.getAbility().isCopiable && target.getAbility().isReplaceable && user.getAbility().id !== target.getAbility().id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7469,7 +7466,7 @@ export class SwitchAbilitiesAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCondition(): MoveConditionFunc {
|
getCondition(): MoveConditionFunc {
|
||||||
return (user, target, move) => !user.getAbility().hasAttr(UnswappableAbilityAbAttr) && !target.getAbility().hasAttr(UnswappableAbilityAbAttr);
|
return (user, target, move) => [user, target].every(pkmn => pkmn.getAbility().isReplaceable && pkmn.getAbility().isCopiable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7499,7 +7496,7 @@ export class SuppressAbilitiesAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
/** Causes the effect to fail when the target's ability is unsupressable or already suppressed. */
|
/** Causes the effect to fail when the target's ability is unsupressable or already suppressed. */
|
||||||
getCondition(): MoveConditionFunc {
|
getCondition(): MoveConditionFunc {
|
||||||
return (user, target, move) => !target.getAbility().hasAttr(UnsuppressableAbilityAbAttr) && !target.summonData.abilitySuppressed;
|
return (user, target, move) => target.getAbility().isSuppressable && !target.summonData.abilitySuppressed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,6 @@ import {
|
|||||||
applyPreAttackAbAttrs,
|
applyPreAttackAbAttrs,
|
||||||
applyPreDefendAbAttrs,
|
applyPreDefendAbAttrs,
|
||||||
applyPreSetStatusAbAttrs,
|
applyPreSetStatusAbAttrs,
|
||||||
UnsuppressableAbilityAbAttr,
|
|
||||||
NoFusionAbilityAbAttr,
|
NoFusionAbilityAbAttr,
|
||||||
MultCritAbAttr,
|
MultCritAbAttr,
|
||||||
IgnoreTypeImmunityAbAttr,
|
IgnoreTypeImmunityAbAttr,
|
||||||
@ -2166,7 +2165,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.summonData?.abilitySuppressed &&
|
this.summonData?.abilitySuppressed &&
|
||||||
!ability.hasAttr(UnsuppressableAbilityAbAttr)
|
ability.isSuppressable
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2189,7 +2188,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
// (Balance decided that the other ability of a neutralizing gas pokemon should not be neutralized)
|
// (Balance decided that the other ability of a neutralizing gas pokemon should not be neutralized)
|
||||||
// If the ability itself is neutralizing gas, don't suppress it (handled through arena tag)
|
// If the ability itself is neutralizing gas, don't suppress it (handled through arena tag)
|
||||||
const unsuppressable =
|
const unsuppressable =
|
||||||
ability.hasAttr(UnsuppressableAbilityAbAttr) ||
|
!ability.isSuppressable ||
|
||||||
thisAbilitySuppressing ||
|
thisAbilitySuppressing ||
|
||||||
(hasSuppressingAbility && !suppressAbilitiesTag.shouldApplyToSelf());
|
(hasSuppressingAbility && !suppressAbilitiesTag.shouldApplyToSelf());
|
||||||
if (!unsuppressable) {
|
if (!unsuppressable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user