mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Fixed forceEnemyMove references after merge
This commit is contained in:
parent
28d20313c6
commit
0bc9f631a2
@ -43,8 +43,8 @@ describe("Moves - Crafty Shield", () => {
|
|||||||
const [charizard, blastoise] = game.scene.getPlayerField();
|
const [charizard, blastoise] = game.scene.getPlayerField();
|
||||||
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(Moves.GROWL);
|
await game.move.forceEnemyMove(Moves.GROWL);
|
||||||
await game.forceEnemyMove(Moves.GROWL);
|
await game.move.forceEnemyMove(Moves.GROWL);
|
||||||
|
|
||||||
await game.phaseInterceptor.to("TurnEndPhase");
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
@ -55,13 +55,13 @@ describe("Moves - Crafty Shield", () => {
|
|||||||
it("should not protect the user and allies from attack moves", async () => {
|
it("should not protect the user and allies from attack moves", async () => {
|
||||||
game.override.enemyMoveset(Moves.TACKLE);
|
game.override.enemyMoveset(Moves.TACKLE);
|
||||||
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
||||||
|
|
||||||
const [charizard, blastoise] = game.scene.getPlayerField();
|
const [charizard, blastoise] = game.scene.getPlayerField();
|
||||||
|
|
||||||
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
|
await game.move.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
|
||||||
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
|
await game.move.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
|
||||||
await game.phaseInterceptor.to("TurnEndPhase");
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
expect(charizard.isFullHp()).toBe(false);
|
expect(charizard.isFullHp()).toBe(false);
|
||||||
@ -76,8 +76,8 @@ describe("Moves - Crafty Shield", () => {
|
|||||||
|
|
||||||
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(Moves.PERISH_SONG);
|
await game.move.forceEnemyMove(Moves.PERISH_SONG);
|
||||||
await game.forceEnemyMove(Moves.TOXIC_SPIKES);
|
await game.move.forceEnemyMove(Moves.TOXIC_SPIKES);
|
||||||
await game.phaseInterceptor.to("TurnEndPhase");
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
expect(game.scene.arena.getTagOnSide(ArenaTagType.TOXIC_SPIKES, ArenaTagSide.PLAYER)).toBeDefined();
|
expect(game.scene.arena.getTagOnSide(ArenaTagType.TOXIC_SPIKES, ArenaTagSide.PLAYER)).toBeDefined();
|
||||||
@ -87,15 +87,15 @@ describe("Moves - Crafty Shield", () => {
|
|||||||
|
|
||||||
it("should protect the user and allies from moves that ignore other protection", async () => {
|
it("should protect the user and allies from moves that ignore other protection", async () => {
|
||||||
game.override.moveset(Moves.CURSE);
|
game.override.moveset(Moves.CURSE);
|
||||||
|
|
||||||
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
||||||
|
|
||||||
const [charizard, blastoise] = game.scene.getPlayerField();
|
const [charizard, blastoise] = game.scene.getPlayerField();
|
||||||
|
|
||||||
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
game.move.select(Moves.CRAFTY_SHIELD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(Moves.CURSE, BattlerIndex.PLAYER);
|
await game.move.forceEnemyMove(Moves.CURSE, BattlerIndex.PLAYER);
|
||||||
await game.forceEnemyMove(Moves.CURSE, BattlerIndex.PLAYER_2);
|
await game.move.forceEnemyMove(Moves.CURSE, BattlerIndex.PLAYER_2);
|
||||||
|
|
||||||
await game.phaseInterceptor.to("TurnEndPhase");
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
|
@ -203,12 +203,12 @@ describe("Moves - Protect", () => {
|
|||||||
|
|
||||||
// Turn 1: setup future sight
|
// Turn 1: setup future sight
|
||||||
game.move.select(Moves.PROTECT);
|
game.move.select(Moves.PROTECT);
|
||||||
await game.forceEnemyMove(Moves.FUTURE_SIGHT);
|
await game.move.forceEnemyMove(Moves.FUTURE_SIGHT);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
// Turn 2: mighty cleave
|
// Turn 2: mighty cleave
|
||||||
game.move.select(Moves.PROTECT);
|
game.move.select(Moves.PROTECT);
|
||||||
await game.forceEnemyMove(Moves.MIGHTY_CLEAVE);
|
await game.move.forceEnemyMove(Moves.MIGHTY_CLEAVE);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(aggron.hp).toBeLessThan(aggron.getMaxHp());
|
expect(aggron.hp).toBeLessThan(aggron.getMaxHp());
|
||||||
@ -217,7 +217,7 @@ describe("Moves - Protect", () => {
|
|||||||
|
|
||||||
// turn 3: Future Sight hits
|
// turn 3: Future Sight hits
|
||||||
game.move.select(Moves.PROTECT);
|
game.move.select(Moves.PROTECT);
|
||||||
await game.forceEnemyMove(Moves.SPORE);
|
await game.move.forceEnemyMove(Moves.SPORE);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(aggron.hp).toBeLessThan(aggron.getMaxHp());
|
expect(aggron.hp).toBeLessThan(aggron.getMaxHp());
|
||||||
|
@ -41,8 +41,8 @@ describe("Moves - Quick Guard", () => {
|
|||||||
|
|
||||||
game.move.select(Moves.QUICK_GUARD, BattlerIndex.PLAYER);
|
game.move.select(Moves.QUICK_GUARD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(Moves.QUICK_ATTACK, BattlerIndex.PLAYER);
|
await game.move.forceEnemyMove(Moves.QUICK_ATTACK, BattlerIndex.PLAYER);
|
||||||
await game.forceEnemyMove(Moves.QUICK_ATTACK, BattlerIndex.PLAYER_2);
|
await game.move.forceEnemyMove(Moves.QUICK_ATTACK, BattlerIndex.PLAYER_2);
|
||||||
await game.phaseInterceptor.to("BerryPhase", false);
|
await game.phaseInterceptor.to("BerryPhase", false);
|
||||||
|
|
||||||
expect(charizard.hp).toBe(charizard.getMaxHp());
|
expect(charizard.hp).toBe(charizard.getMaxHp());
|
||||||
@ -60,8 +60,8 @@ describe("Moves - Quick Guard", () => {
|
|||||||
|
|
||||||
game.move.select(Moves.QUICK_GUARD, BattlerIndex.PLAYER);
|
game.move.select(Moves.QUICK_GUARD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(move, BattlerIndex.PLAYER);
|
await game.move.forceEnemyMove(move, BattlerIndex.PLAYER);
|
||||||
await game.forceEnemyMove(move, BattlerIndex.PLAYER_2);
|
await game.move.forceEnemyMove(move, BattlerIndex.PLAYER_2);
|
||||||
await game.phaseInterceptor.to("BerryPhase", false);
|
await game.phaseInterceptor.to("BerryPhase", false);
|
||||||
|
|
||||||
expect(charizard.hp).toBe(charizard.getMaxHp());
|
expect(charizard.hp).toBe(charizard.getMaxHp());
|
||||||
|
@ -41,8 +41,8 @@ describe("Moves - Wide Guard", () => {
|
|||||||
|
|
||||||
game.move.select(Moves.WIDE_GUARD, BattlerIndex.PLAYER);
|
game.move.select(Moves.WIDE_GUARD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(Moves.SWIFT);
|
await game.move.forceEnemyMove(Moves.SWIFT);
|
||||||
await game.forceEnemyMove(Moves.GROWL);
|
await game.move.forceEnemyMove(Moves.GROWL);
|
||||||
await game.phaseInterceptor.to("TurnEndPhase");
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
expect(charizard.hp).toBe(charizard.getMaxHp());
|
expect(charizard.hp).toBe(charizard.getMaxHp());
|
||||||
@ -57,8 +57,8 @@ describe("Moves - Wide Guard", () => {
|
|||||||
const [charizard, blastoise] = game.scene.getPlayerField();
|
const [charizard, blastoise] = game.scene.getPlayerField();
|
||||||
game.move.select(Moves.WIDE_GUARD, BattlerIndex.PLAYER);
|
game.move.select(Moves.WIDE_GUARD, BattlerIndex.PLAYER);
|
||||||
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
|
||||||
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
|
await game.move.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
|
||||||
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
|
await game.move.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
|
||||||
await game.phaseInterceptor.to("TurnEndPhase");
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
expect(charizard.hp).toBeLessThan(charizard.getMaxHp());
|
expect(charizard.hp).toBeLessThan(charizard.getMaxHp());
|
||||||
|
Loading…
Reference in New Issue
Block a user