From e78796077b19e1c11538eb337a8f164ba9401096 Mon Sep 17 00:00:00 2001 From: Dean <69436131+emdeann@users.noreply.github.com> Date: Fri, 31 Oct 2025 13:22:40 -0700 Subject: [PATCH] Disable Illusion --- src/data/abilities/ability.ts | 23 +++++------ test/abilities/illusion.test.ts | 69 +++++++++++++++++---------------- 2 files changed, 48 insertions(+), 44 deletions(-) diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index 301016d899b..fd1eb8ea5ef 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -7440,17 +7440,18 @@ export function initAbilities() { 1.3) .build(), new AbBuilder(AbilityId.ILLUSION, 5) - // The Pokemon generate an illusion if it's available - .attr(IllusionPreSummonAbAttr, false) - .attr(IllusionBreakAbAttr) - // The Pokemon loses its illusion when damaged by a move - .attr(PostDefendIllusionBreakAbAttr, true) - // Disable Illusion in fusions - .attr(NoFusionAbilityAbAttr) - // Illusion is available again after a battle - .conditionalAttr((pokemon) => pokemon.isAllowedInBattle(), IllusionPostBattleAbAttr, false) - .uncopiable() - .bypassFaint() + // // The Pokemon generate an illusion if it's available + // .attr(IllusionPreSummonAbAttr, false) + // .attr(IllusionBreakAbAttr) + // // The Pokemon loses its illusion when damaged by a move + // .attr(PostDefendIllusionBreakAbAttr, true) + // // Disable Illusion in fusions + // .attr(NoFusionAbilityAbAttr) + // // Illusion is available again after a battle + // .conditionalAttr((pokemon) => pokemon.isAllowedInBattle(), IllusionPostBattleAbAttr, false) + // .uncopiable() + // .bypassFaint() + .unimplemented() // TODO reimplement Illusion properly .build(), new AbBuilder(AbilityId.IMPOSTER, 5) .attr(PostSummonTransformAbAttr) diff --git a/test/abilities/illusion.test.ts b/test/abilities/illusion.test.ts index 2343a11cb74..1264b458234 100644 --- a/test/abilities/illusion.test.ts +++ b/test/abilities/illusion.test.ts @@ -33,7 +33,7 @@ describe("Abilities - Illusion", () => { .startingHeldItems([{ name: "WIDE_LENS", count: 3 }]); }); - it("creates illusion at the start", async () => { + it.todo("creates illusion at the start", async () => { await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.FEEBAS]); const zoroark = game.field.getPlayerPokemon(); const zorua = game.field.getEnemyPokemon(); @@ -42,7 +42,7 @@ describe("Abilities - Illusion", () => { expect(!!zorua.summonData.illusion).equals(true); }); - it("break after receiving damaging move", async () => { + it.todo("break after receiving damaging move", async () => { await game.classicMode.startBattle([SpeciesId.FEEBAS]); game.move.select(MoveId.TACKLE); @@ -54,7 +54,7 @@ describe("Abilities - Illusion", () => { expect(zorua.name).equals("Zorua"); }); - it("break after getting ability changed", async () => { + it.todo("break after getting ability changed", async () => { await game.classicMode.startBattle([SpeciesId.FEEBAS]); game.move.select(MoveId.WORRY_SEED); @@ -65,7 +65,7 @@ describe("Abilities - Illusion", () => { expect(!!zorua.summonData.illusion).equals(false); }); - it("breaks with neutralizing gas", async () => { + it.todo("breaks with neutralizing gas", async () => { game.override.enemyAbility(AbilityId.NEUTRALIZING_GAS); await game.classicMode.startBattle([SpeciesId.KOFFING]); @@ -74,7 +74,7 @@ describe("Abilities - Illusion", () => { expect(!!zorua.summonData.illusion).equals(false); }); - it("does not activate if neutralizing gas is active", async () => { + it.todo("does not activate if neutralizing gas is active", async () => { game.override .enemyAbility(AbilityId.NEUTRALIZING_GAS) .ability(AbilityId.ILLUSION) @@ -88,35 +88,38 @@ describe("Abilities - Illusion", () => { expect(game.field.getPlayerPokemon().summonData.illusion).toBeFalsy(); }); - it("causes enemy AI to consider the illusion's type instead of the actual type when considering move effectiveness", async () => { - game.override.enemyMoveset([MoveId.FLAMETHROWER, MoveId.PSYCHIC, MoveId.TACKLE]); - await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.FEEBAS]); + it.todo( + "causes enemy AI to consider the illusion's type instead of the actual type when considering move effectiveness", + async () => { + game.override.enemyMoveset([MoveId.FLAMETHROWER, MoveId.PSYCHIC, MoveId.TACKLE]); + await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.FEEBAS]); - const enemy = game.field.getEnemyPokemon(); - const zoroark = game.field.getPlayerPokemon(); + const enemy = game.field.getEnemyPokemon(); + const zoroark = game.field.getPlayerPokemon(); - const flameThrower = enemy.getMoveset()[0]!.getMove(); - const psychic = enemy.getMoveset()[1]!.getMove(); - const flameThrowerEffectiveness = zoroark.getAttackTypeEffectiveness( - flameThrower.type, - enemy, - undefined, - undefined, - flameThrower, - true, - ); - const psychicEffectiveness = zoroark.getAttackTypeEffectiveness( - psychic.type, - enemy, - undefined, - undefined, - psychic, - true, - ); - expect(psychicEffectiveness).above(flameThrowerEffectiveness); - }); + const flameThrower = enemy.getMoveset()[0]!.getMove(); + const psychic = enemy.getMoveset()[1]!.getMove(); + const flameThrowerEffectiveness = zoroark.getAttackTypeEffectiveness( + flameThrower.type, + enemy, + undefined, + undefined, + flameThrower, + true, + ); + const psychicEffectiveness = zoroark.getAttackTypeEffectiveness( + psychic.type, + enemy, + undefined, + undefined, + psychic, + true, + ); + expect(psychicEffectiveness).above(flameThrowerEffectiveness); + }, + ); - it("should not break from indirect damage from status, weather or recoil", async () => { + it.todo("should not break from indirect damage from status, weather or recoil", async () => { game.override.enemySpecies(SpeciesId.GIGALITH).enemyAbility(AbilityId.SAND_STREAM); await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.AZUMARILL]); @@ -129,7 +132,7 @@ describe("Abilities - Illusion", () => { expect(!!zoroark.summonData.illusion).equals(true); }); - it("copies the the name, nickname, gender, shininess, and pokeball from the illusion source", async () => { + it.todo("copies the the name, nickname, gender, shininess, and pokeball from the illusion source", async () => { game.override.enemyMoveset(MoveId.SPLASH); await game.classicMode.startBattle([SpeciesId.ABRA, SpeciesId.ZOROARK, SpeciesId.AXEW]); @@ -152,7 +155,7 @@ describe("Abilities - Illusion", () => { expect(zoroark.getPokeball(true)).equals(PokeballType.GREAT_BALL); }); - it("breaks when suppressed", async () => { + it.todo("breaks when suppressed", async () => { game.override.moveset(MoveId.GASTRO_ACID); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); const zorua = game.field.getEnemyPokemon();