mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22:19 +02:00
implement canApplyPresummon method
This commit is contained in:
parent
b1adfeca38
commit
febf350077
@ -24,7 +24,7 @@ describe("Abilities - Lightningrod", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
game.override
|
game.override
|
||||||
.moveset([ Moves.SPLASH, Moves.SHOCK_WAVE ])
|
.moveset([Moves.SPLASH, Moves.SHOCK_WAVE])
|
||||||
.ability(Abilities.BALL_FETCH)
|
.ability(Abilities.BALL_FETCH)
|
||||||
.battleType("double")
|
.battleType("double")
|
||||||
.disableCrits()
|
.disableCrits()
|
||||||
@ -34,7 +34,7 @@ describe("Abilities - Lightningrod", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should redirect electric type moves", async () => {
|
it("should redirect electric type moves", async () => {
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
@ -49,8 +49,8 @@ describe("Abilities - Lightningrod", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should not redirect non-electric type moves", async () => {
|
it("should not redirect non-electric type moves", async () => {
|
||||||
game.override.moveset([ Moves.SPLASH, Moves.AERIAL_ACE ]);
|
game.override.moveset([Moves.SPLASH, Moves.AERIAL_ACE]);
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
@ -65,7 +65,7 @@ describe("Abilities - Lightningrod", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should boost the user's spatk without damaging", async () => {
|
it("should boost the user's spatk without damaging", async () => {
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ describe("Abilities - Lightningrod", () => {
|
|||||||
|
|
||||||
it("should not redirect moves changed from electric type via ability", async () => {
|
it("should not redirect moves changed from electric type via ability", async () => {
|
||||||
game.override.ability(Abilities.NORMALIZE);
|
game.override.ability(Abilities.NORMALIZE);
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
@ -96,9 +96,8 @@ describe("Abilities - Lightningrod", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should redirect moves changed to electric type via ability", async () => {
|
it("should redirect moves changed to electric type via ability", async () => {
|
||||||
game.override.ability(Abilities.GALVANIZE)
|
game.override.ability(Abilities.GALVANIZE).moveset(Moves.TACKLE);
|
||||||
.moveset(Moves.TACKLE);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
|
@ -158,11 +158,8 @@ describe("Abilities - Neutralizing Gas", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should not activate abilities of pokemon no longer on the field", async () => {
|
it("should not activate abilities of pokemon no longer on the field", async () => {
|
||||||
game.override
|
game.override.battleType("single").ability(Abilities.NEUTRALIZING_GAS).enemyAbility(Abilities.DELTA_STREAM);
|
||||||
.battleType("single")
|
await game.classicMode.startBattle([Species.MAGIKARP]);
|
||||||
.ability(Abilities.NEUTRALIZING_GAS)
|
|
||||||
.enemyAbility(Abilities.DELTA_STREAM);
|
|
||||||
await game.classicMode.startBattle([ Species.MAGIKARP ]);
|
|
||||||
|
|
||||||
const enemy = game.scene.getEnemyPokemon()!;
|
const enemy = game.scene.getEnemyPokemon()!;
|
||||||
const weatherChangeAttr = enemy.getAbilityAttrs(PostSummonWeatherChangeAbAttr, false)[0];
|
const weatherChangeAttr = enemy.getAbilityAttrs(PostSummonWeatherChangeAbAttr, false)[0];
|
||||||
|
@ -24,7 +24,7 @@ describe("Abilities - Storm Drain", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
game.override
|
game.override
|
||||||
.moveset([ Moves.SPLASH, Moves.WATER_GUN ])
|
.moveset([Moves.SPLASH, Moves.WATER_GUN])
|
||||||
.ability(Abilities.BALL_FETCH)
|
.ability(Abilities.BALL_FETCH)
|
||||||
.battleType("double")
|
.battleType("double")
|
||||||
.disableCrits()
|
.disableCrits()
|
||||||
@ -34,7 +34,7 @@ describe("Abilities - Storm Drain", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should redirect water type moves", async () => {
|
it("should redirect water type moves", async () => {
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
@ -49,8 +49,8 @@ describe("Abilities - Storm Drain", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should not redirect non-water type moves", async () => {
|
it("should not redirect non-water type moves", async () => {
|
||||||
game.override.moveset([ Moves.SPLASH, Moves.AERIAL_ACE ]);
|
game.override.moveset([Moves.SPLASH, Moves.AERIAL_ACE]);
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
@ -65,7 +65,7 @@ describe("Abilities - Storm Drain", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should boost the user's spatk without damaging", async () => {
|
it("should boost the user's spatk without damaging", async () => {
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ describe("Abilities - Storm Drain", () => {
|
|||||||
|
|
||||||
it("should not redirect moves changed from water type via ability", async () => {
|
it("should not redirect moves changed from water type via ability", async () => {
|
||||||
game.override.ability(Abilities.NORMALIZE);
|
game.override.ability(Abilities.NORMALIZE);
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
@ -96,9 +96,8 @@ describe("Abilities - Storm Drain", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should redirect moves changed to water type via ability", async () => {
|
it("should redirect moves changed to water type via ability", async () => {
|
||||||
game.override.ability(Abilities.LIQUID_VOICE)
|
game.override.ability(Abilities.LIQUID_VOICE).moveset(Moves.PSYCHIC_NOISE);
|
||||||
.moveset(Moves.PSYCHIC_NOISE);
|
await game.classicMode.startBattle([Species.FEEBAS, Species.MAGIKARP]);
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
|
|
||||||
|
|
||||||
const enemy1 = game.scene.getEnemyField()[0];
|
const enemy1 = game.scene.getEnemyField()[0];
|
||||||
const enemy2 = game.scene.getEnemyField()[1];
|
const enemy2 = game.scene.getEnemyField()[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user