Compare commits

...

6 Commits

Author SHA1 Message Date
innerthunder b9b201388f
Merge 25e582ce25 into 18dc9d216c 2024-09-17 08:43:44 -07:00
innerthunder 25e582ce25 `ignoreAbilitySource` --> `ignoringEffectSource` 2024-09-11 18:23:56 -07:00
innerthunder 57d167d5c3 RIP `phases.ts` 2024-09-11 18:15:50 -07:00
innerthunder 5d051695ed Merge branch 'beta' into mold-breaker-self 2024-09-11 18:13:47 -07:00
innerthunder 6503aa9303
Update src/field/arena.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-08-14 23:10:02 -07:00
innerthunder 2884c8b912 Ability-ignoring effects no longer ignore the source's Abilities 2024-08-14 22:15:10 -07:00
3 changed files with 6 additions and 3 deletions

View File

@ -33,6 +33,7 @@ export class Arena {
public tags: ArenaTag[];
public bgm: string;
public ignoreAbilities: boolean;
public ignoringEffectSource: BattlerIndex | null;
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.ignoringEffectSource = ignoreAbilities ? ignoringEffectSource : null;
}
/**

View File

@ -1331,7 +1331,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
if (this.isFusion() && ability.hasAttr(NoFusionAbilityAbAttr)) {
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;
}
if (this.summonData?.abilitySuppressed && !ability.hasAttr(UnsuppressableAbilityAbAttr)) {

View File

@ -74,7 +74,7 @@ export class MovePhase extends BattlePhase {
if (!this.followUp) {
if (this.move.getMove().checkFlag(MoveFlags.IGNORE_ABILITIES, this.pokemon, null)) {
this.scene.arena.setIgnoreAbilities();
this.scene.arena.setIgnoreAbilities(true, this.pokemon.getBattlerIndex());
}
} else {
this.pokemon.turnData.hitsLeft = 0; // TODO: is `0` correct?