[P2] Illuminate ignores evasion (#4781)
This commit is contained in:
parent
5e2dfa975a
commit
87b7122b60
|
@ -1956,6 +1956,10 @@ export class CopyFaintedAllyAbilityAbAttr extends PostKnockOutAbAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ability attribute for ignoring the opponent's stat changes
|
||||||
|
* @param stats the stats that should be ignored
|
||||||
|
*/
|
||||||
export class IgnoreOpponentStatStagesAbAttr extends AbAttr {
|
export class IgnoreOpponentStatStagesAbAttr extends AbAttr {
|
||||||
private stats: readonly BattleStat[];
|
private stats: readonly BattleStat[];
|
||||||
|
|
||||||
|
@ -1965,6 +1969,15 @@ export class IgnoreOpponentStatStagesAbAttr extends AbAttr {
|
||||||
this.stats = stats ?? BATTLE_STATS;
|
this.stats = stats ?? BATTLE_STATS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Modifies a BooleanHolder and returns the result to see if a stat is ignored or not
|
||||||
|
* @param _pokemon n/a
|
||||||
|
* @param _passive n/a
|
||||||
|
* @param simulated n/a
|
||||||
|
* @param _cancelled n/a
|
||||||
|
* @param args A BooleanHolder that represents whether or not to ignore a stat's stat changes
|
||||||
|
* @returns true if the stat is ignored, false otherwise
|
||||||
|
*/
|
||||||
apply(_pokemon: Pokemon, _passive: boolean, simulated: boolean, _cancelled: Utils.BooleanHolder, args: any[]) {
|
apply(_pokemon: Pokemon, _passive: boolean, simulated: boolean, _cancelled: Utils.BooleanHolder, args: any[]) {
|
||||||
if (this.stats.includes(args[0])) {
|
if (this.stats.includes(args[0])) {
|
||||||
(args[1] as Utils.BooleanHolder).value = true;
|
(args[1] as Utils.BooleanHolder).value = true;
|
||||||
|
@ -5361,6 +5374,7 @@ export function initAbilities() {
|
||||||
new Ability(Abilities.ILLUMINATE, 3)
|
new Ability(Abilities.ILLUMINATE, 3)
|
||||||
.attr(ProtectStatAbAttr, Stat.ACC)
|
.attr(ProtectStatAbAttr, Stat.ACC)
|
||||||
.attr(DoubleBattleChanceAbAttr)
|
.attr(DoubleBattleChanceAbAttr)
|
||||||
|
.attr(IgnoreOpponentStatStagesAbAttr, [ Stat.EVA ])
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.TRACE, 3)
|
new Ability(Abilities.TRACE, 3)
|
||||||
.attr(PostSummonCopyAbilityAbAttr)
|
.attr(PostSummonCopyAbilityAbAttr)
|
||||||
|
@ -5580,7 +5594,7 @@ export function initAbilities() {
|
||||||
new Ability(Abilities.FOREWARN, 4)
|
new Ability(Abilities.FOREWARN, 4)
|
||||||
.attr(ForewarnAbAttr),
|
.attr(ForewarnAbAttr),
|
||||||
new Ability(Abilities.UNAWARE, 4)
|
new Ability(Abilities.UNAWARE, 4)
|
||||||
.attr(IgnoreOpponentStatStagesAbAttr)
|
.attr(IgnoreOpponentStatStagesAbAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.ACC, Stat.EVA ])
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.TINTED_LENS, 4)
|
new Ability(Abilities.TINTED_LENS, 4)
|
||||||
.attr(DamageBoostAbAttr, 2, (user, target, move) => (target?.getMoveEffectiveness(user!, move) ?? 1) <= 0.5),
|
.attr(DamageBoostAbAttr, 2, (user, target, move) => (target?.getMoveEffectiveness(user!, move) ?? 1) <= 0.5),
|
||||||
|
|
Loading…
Reference in New Issue