Merge pull request #6733 from emdeann/disable-illusion

[Hotfix] Disable illusion
This commit is contained in:
Wlowscha 2025-11-01 00:58:06 +01:00 committed by GitHub
commit dd7461e0c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 15 deletions

View File

@ -7461,17 +7461,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)
// // 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()
// .bypassFaint()
.unimplemented() // TODO reimplement Illusion properly
.build(),
new AbBuilder(AbilityId.IMPOSTER, 5)
.attr(PostSummonTransformAbAttr)

View File

@ -506,7 +506,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
[SpeciesId.SNOVER]: { 0: AbilityId.SLUSH_RUSH },
[SpeciesId.ABOMASNOW]: { 0: AbilityId.SLUSH_RUSH, 1: AbilityId.SEED_SOWER },
[SpeciesId.ROTOM]: { 0: AbilityId.HADRON_ENGINE, 1: AbilityId.HADRON_ENGINE, 2: AbilityId.HADRON_ENGINE, 3: AbilityId.HADRON_ENGINE, 4: AbilityId.HADRON_ENGINE, 5: AbilityId.HADRON_ENGINE },
[SpeciesId.UXIE]: { 0: AbilityId.ILLUSION },
[SpeciesId.UXIE]: { 0: AbilityId.MAGIC_BOUNCE },
[SpeciesId.MESPRIT]: { 0: AbilityId.MOODY },
[SpeciesId.AZELF]: { 0: AbilityId.NEUROFORCE },
[SpeciesId.DIALGA]: { 0: AbilityId.BERSERK, 1: AbilityId.BERSERK },

View File

@ -143,7 +143,6 @@ import type { AbAttrMap, AbAttrString, TypeMultiplierAbAttrParams } from "#types
import type { Constructor } from "#types/common";
import type { getAttackDamageParams, getBaseDamageParams } from "#types/damage-params";
import type { DamageCalculationResult, DamageResult } from "#types/damage-result";
import type { IllusionData } from "#types/illusion-data";
import type { LevelMoves } from "#types/pokemon-level-moves";
import type { StarterDataEntry, StarterMoveset } from "#types/save-data";
import type { TurnMove } from "#types/turn-move";
@ -5119,14 +5118,12 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
* in preparation for switching pokemon, as well as removing any relevant on-switch tags.
*/
public resetSummonData(): void {
const illusion: IllusionData | null = this.summonData.illusion;
if (this.summonData.speciesForm) {
this.summonData.speciesForm = null;
this.updateFusionPalette();
}
this.summonData = new PokemonSummonData();
this.tempSummonData = new PokemonTempSummonData();
this.summonData.illusion = illusion;
this.updateInfo();
}

View File

@ -7,7 +7,7 @@ import { GameManager } from "#test/test-utils/game-manager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
describe("Abilities - Illusion", () => {
describe.todo("Abilities - Illusion", () => {
let phaserGame: Phaser.Game;
let game: GameManager;