mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 06:15:20 +01:00
Disable Illusion
This commit is contained in:
parent
2d955165f9
commit
e78796077b
@ -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)
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user