mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 06:45:24 +01:00
Review changes
This commit is contained in:
parent
e78796077b
commit
525ba57461
@ -7449,7 +7449,7 @@ export function initAbilities() {
|
|||||||
// .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
|
.unimplemented() // TODO reimplement Illusion properly
|
||||||
.build(),
|
.build(),
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { GameManager } from "#test/test-utils/game-manager";
|
|||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
describe("Abilities - Illusion", () => {
|
describe.todo("Abilities - Illusion", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
.startingHeldItems([{ name: "WIDE_LENS", count: 3 }]);
|
.startingHeldItems([{ name: "WIDE_LENS", count: 3 }]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.todo("creates illusion at the start", async () => {
|
it("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.todo("break after receiving damaging move", async () => {
|
it("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.todo("break after getting ability changed", async () => {
|
it("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.todo("breaks with neutralizing gas", async () => {
|
it("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.todo("does not activate if neutralizing gas is active", async () => {
|
it("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,38 +88,35 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(game.field.getPlayerPokemon().summonData.illusion).toBeFalsy();
|
expect(game.field.getPlayerPokemon().summonData.illusion).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it.todo(
|
it("causes enemy AI to consider the illusion's type instead of the actual type when considering move effectiveness", async () => {
|
||||||
"causes enemy AI to consider the illusion's type instead of the actual type when considering move effectiveness",
|
game.override.enemyMoveset([MoveId.FLAMETHROWER, MoveId.PSYCHIC, MoveId.TACKLE]);
|
||||||
async () => {
|
await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.FEEBAS]);
|
||||||
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.todo("should not break from indirect damage from status, weather or recoil", async () => {
|
it("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]);
|
||||||
@ -132,7 +129,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(!!zoroark.summonData.illusion).equals(true);
|
expect(!!zoroark.summonData.illusion).equals(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.todo("copies the the name, nickname, gender, shininess, and pokeball from the illusion source", async () => {
|
it("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]);
|
||||||
|
|
||||||
@ -155,7 +152,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
expect(zoroark.getPokeball(true)).equals(PokeballType.GREAT_BALL);
|
expect(zoroark.getPokeball(true)).equals(PokeballType.GREAT_BALL);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.todo("breaks when suppressed", async () => {
|
it("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