mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 06:45:24 +01:00
Disable Illusion
This commit is contained in:
parent
2d955165f9
commit
e78796077b
@ -7440,17 +7440,18 @@ export function initAbilities() {
|
|||||||
1.3)
|
1.3)
|
||||||
.build(),
|
.build(),
|
||||||
new AbBuilder(AbilityId.ILLUSION, 5)
|
new AbBuilder(AbilityId.ILLUSION, 5)
|
||||||
// The Pokemon generate an illusion if it's available
|
// // The Pokemon generate an illusion if it's available
|
||||||
.attr(IllusionPreSummonAbAttr, false)
|
// .attr(IllusionPreSummonAbAttr, false)
|
||||||
.attr(IllusionBreakAbAttr)
|
// .attr(IllusionBreakAbAttr)
|
||||||
// The Pokemon loses its illusion when damaged by a move
|
// // The Pokemon loses its illusion when damaged by a move
|
||||||
.attr(PostDefendIllusionBreakAbAttr, true)
|
// .attr(PostDefendIllusionBreakAbAttr, true)
|
||||||
// Disable Illusion in fusions
|
// // Disable Illusion in fusions
|
||||||
.attr(NoFusionAbilityAbAttr)
|
// .attr(NoFusionAbilityAbAttr)
|
||||||
// Illusion is available again after a battle
|
// // Illusion is available again after a battle
|
||||||
.conditionalAttr((pokemon) => pokemon.isAllowedInBattle(), IllusionPostBattleAbAttr, false)
|
// .conditionalAttr((pokemon) => pokemon.isAllowedInBattle(), IllusionPostBattleAbAttr, false)
|
||||||
.uncopiable()
|
// .uncopiable()
|
||||||
.bypassFaint()
|
// .bypassFaint()
|
||||||
|
.unimplemented() // TODO reimplement Illusion properly
|
||||||
.build(),
|
.build(),
|
||||||
new AbBuilder(AbilityId.IMPOSTER, 5)
|
new AbBuilder(AbilityId.IMPOSTER, 5)
|
||||||
.attr(PostSummonTransformAbAttr)
|
.attr(PostSummonTransformAbAttr)
|
||||||
|
|||||||
@ -33,7 +33,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
.startingHeldItems([{ name: "WIDE_LENS", count: 3 }]);
|
.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]);
|
await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.FEEBAS]);
|
||||||
const zoroark = game.field.getPlayerPokemon();
|
const zoroark = game.field.getPlayerPokemon();
|
||||||
const zorua = game.field.getEnemyPokemon();
|
const zorua = game.field.getEnemyPokemon();
|
||||||
@ -42,7 +42,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(!!zorua.summonData.illusion).equals(true);
|
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]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
game.move.select(MoveId.TACKLE);
|
game.move.select(MoveId.TACKLE);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(zorua.name).equals("Zorua");
|
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]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
game.move.select(MoveId.WORRY_SEED);
|
game.move.select(MoveId.WORRY_SEED);
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(!!zorua.summonData.illusion).equals(false);
|
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);
|
game.override.enemyAbility(AbilityId.NEUTRALIZING_GAS);
|
||||||
await game.classicMode.startBattle([SpeciesId.KOFFING]);
|
await game.classicMode.startBattle([SpeciesId.KOFFING]);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(!!zorua.summonData.illusion).equals(false);
|
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
|
game.override
|
||||||
.enemyAbility(AbilityId.NEUTRALIZING_GAS)
|
.enemyAbility(AbilityId.NEUTRALIZING_GAS)
|
||||||
.ability(AbilityId.ILLUSION)
|
.ability(AbilityId.ILLUSION)
|
||||||
@ -88,35 +88,38 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(game.field.getPlayerPokemon().summonData.illusion).toBeFalsy();
|
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 () => {
|
it.todo(
|
||||||
game.override.enemyMoveset([MoveId.FLAMETHROWER, MoveId.PSYCHIC, MoveId.TACKLE]);
|
"causes enemy AI to consider the illusion's type instead of the actual type when considering move effectiveness",
|
||||||
await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.FEEBAS]);
|
async () => {
|
||||||
|
game.override.enemyMoveset([MoveId.FLAMETHROWER, MoveId.PSYCHIC, MoveId.TACKLE]);
|
||||||
|
await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.FEEBAS]);
|
||||||
|
|
||||||
const enemy = game.field.getEnemyPokemon();
|
const enemy = game.field.getEnemyPokemon();
|
||||||
const zoroark = game.field.getPlayerPokemon();
|
const zoroark = game.field.getPlayerPokemon();
|
||||||
|
|
||||||
const flameThrower = enemy.getMoveset()[0]!.getMove();
|
const flameThrower = enemy.getMoveset()[0]!.getMove();
|
||||||
const psychic = enemy.getMoveset()[1]!.getMove();
|
const psychic = enemy.getMoveset()[1]!.getMove();
|
||||||
const flameThrowerEffectiveness = zoroark.getAttackTypeEffectiveness(
|
const flameThrowerEffectiveness = zoroark.getAttackTypeEffectiveness(
|
||||||
flameThrower.type,
|
flameThrower.type,
|
||||||
enemy,
|
enemy,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
flameThrower,
|
flameThrower,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
const psychicEffectiveness = zoroark.getAttackTypeEffectiveness(
|
const psychicEffectiveness = zoroark.getAttackTypeEffectiveness(
|
||||||
psychic.type,
|
psychic.type,
|
||||||
enemy,
|
enemy,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
psychic,
|
psychic,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
expect(psychicEffectiveness).above(flameThrowerEffectiveness);
|
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);
|
game.override.enemySpecies(SpeciesId.GIGALITH).enemyAbility(AbilityId.SAND_STREAM);
|
||||||
|
|
||||||
await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.AZUMARILL]);
|
await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.AZUMARILL]);
|
||||||
@ -129,7 +132,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(!!zoroark.summonData.illusion).equals(true);
|
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);
|
game.override.enemyMoveset(MoveId.SPLASH);
|
||||||
await game.classicMode.startBattle([SpeciesId.ABRA, SpeciesId.ZOROARK, SpeciesId.AXEW]);
|
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);
|
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);
|
game.override.moveset(MoveId.GASTRO_ACID);
|
||||||
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
|
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
|
||||||
const zorua = game.field.getEnemyPokemon();
|
const zorua = game.field.getEnemyPokemon();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user