mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 23:42:18 +02:00
add retaliate test
This commit is contained in:
parent
ae05d154b4
commit
2ab51dbb96
@ -31,32 +31,23 @@ describe("Moves - Retaliate", () => {
|
|||||||
|
|
||||||
game.override.moveset([Moves.RETALIATE, Moves.SPLASH]);
|
game.override.moveset([Moves.RETALIATE, Moves.SPLASH]);
|
||||||
game.override.startingHeldItems([{name: "WIDE_LENS", count: 3}]);
|
game.override.startingHeldItems([{name: "WIDE_LENS", count: 3}]);
|
||||||
game.override.startingLevel(70);
|
game.override.startingLevel(80);
|
||||||
game.override.disableCrits();
|
game.override.disableCrits();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("increases power if ally died previous turn", async () => {
|
it("increases power if ally died previous turn", async () => {
|
||||||
await game.startBattle([Species.ABRA, Species.COBALION]);
|
await game.startBattle([Species.ABRA, Species.COBALION]);
|
||||||
|
expect(retaliate.calculateBattlePower(game.scene.getPlayerPokemon()!, game.scene.getEnemyPokemon()!)).equals(70);
|
||||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||||
game.doSelectPartyPokemon(1);
|
game.doSelectPartyPokemon(1);
|
||||||
|
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
game.doAttack(getMovePosition(game.scene, 0, Moves.RETALIATE));
|
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||||
//await game.phaseInterceptor.to(DamagePhase);
|
|
||||||
console.log("ALLO1");
|
console.log("ALLO1");
|
||||||
let snorlax = game.scene.getEnemyPokemon()!;
|
const snorlax = game.scene.getEnemyPokemon()!;
|
||||||
let cobalion = game.scene.getPlayerPokemon()!;
|
const cobalion = game.scene.getPlayerPokemon()!;
|
||||||
expect(cobalion.name).equals("Cobalion");
|
expect(cobalion.name).equals("Cobalion");
|
||||||
expect(retaliate.calculateBattlePower(cobalion, snorlax)).equals(140);
|
expect(retaliate.calculateBattlePower(cobalion, snorlax)).equals(140);
|
||||||
expect(retaliate.calculateBattlePower(snorlax, cobalion)).equals(70);
|
expect(retaliate.calculateBattlePower(snorlax, cobalion)).equals(70);
|
||||||
console.log(game.scene.getEnemyPokemon()!.hp);
|
|
||||||
console.log(game.scene.getPlayerPokemon()!.hp);
|
|
||||||
//await game.toNextTurn();
|
|
||||||
console.log("ALLO2");
|
|
||||||
game.doAttack(getMovePosition(game.scene, 0, Moves.RETALIATE));
|
|
||||||
snorlax = game.scene.getEnemyPokemon()!;
|
|
||||||
cobalion = game.scene.getPlayerPokemon()!;
|
|
||||||
expect(retaliate.calculateBattlePower(cobalion, snorlax)).equals(70);
|
|
||||||
expect(retaliate.calculateBattlePower(snorlax, cobalion)).equals(70);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user