mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-16 17:27:41 +00:00
[Balance] Ability-ignoring effects no longer ignore the source's own Abilities (#3556)
* Ability-ignoring effects no longer ignore the source's Abilities * Update src/field/arena.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * RIP `phases.ts` * `ignoreAbilitySource` --> `ignoringEffectSource` --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
parent
b9b2491f95
commit
f2fe430f8a
@ -33,6 +33,7 @@ export class Arena {
|
|||||||
public tags: ArenaTag[];
|
public tags: ArenaTag[];
|
||||||
public bgm: string;
|
public bgm: string;
|
||||||
public ignoreAbilities: boolean;
|
public ignoreAbilities: boolean;
|
||||||
|
public ignoringEffectSource: BattlerIndex | null;
|
||||||
|
|
||||||
private lastTimeOfDay: TimeOfDay;
|
private lastTimeOfDay: TimeOfDay;
|
||||||
|
|
||||||
@ -569,8 +570,9 @@ export class Arena {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setIgnoreAbilities(ignoreAbilities: boolean = true): void {
|
setIgnoreAbilities(ignoreAbilities: boolean, ignoringEffectSource: BattlerIndex | null = null): void {
|
||||||
this.ignoreAbilities = ignoreAbilities;
|
this.ignoreAbilities = ignoreAbilities;
|
||||||
|
this.ignoringEffectSource = ignoreAbilities ? ignoringEffectSource : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1364,7 +1364,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (this.isFusion() && ability.hasAttr(NoFusionAbilityAbAttr)) {
|
if (this.isFusion() && ability.hasAttr(NoFusionAbilityAbAttr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.scene?.arena.ignoreAbilities && ability.isIgnorable) {
|
const arena = this.scene?.arena;
|
||||||
|
if (arena.ignoreAbilities && arena.ignoringEffectSource !== this.getBattlerIndex() && ability.isIgnorable) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.summonData?.abilitySuppressed && !ability.hasAttr(UnsuppressableAbilityAbAttr)) {
|
if (this.summonData?.abilitySuppressed && !ability.hasAttr(UnsuppressableAbilityAbAttr)) {
|
||||||
|
@ -74,7 +74,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
|
|
||||||
if (!this.followUp) {
|
if (!this.followUp) {
|
||||||
if (this.move.getMove().checkFlag(MoveFlags.IGNORE_ABILITIES, this.pokemon, null)) {
|
if (this.move.getMove().checkFlag(MoveFlags.IGNORE_ABILITIES, this.pokemon, null)) {
|
||||||
this.scene.arena.setIgnoreAbilities();
|
this.scene.arena.setIgnoreAbilities(true, this.pokemon.getBattlerIndex());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.pokemon.turnData.hitsLeft = 0; // TODO: is `0` correct?
|
this.pokemon.turnData.hitsLeft = 0; // TODO: is `0` correct?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user