mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 10:42:25 +02:00
Update test
This commit is contained in:
parent
f8ad522bab
commit
22dbd9c81a
@ -24,7 +24,7 @@ describe("Abilities - Protosynthesis", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
game.override
|
game.override
|
||||||
.moveset([ Moves.SPLASH ])
|
.moveset([ Moves.SPLASH, Moves.TACKLE ])
|
||||||
.ability(Abilities.PROTOSYNTHESIS)
|
.ability(Abilities.PROTOSYNTHESIS)
|
||||||
.battleType("single")
|
.battleType("single")
|
||||||
.disableCrits()
|
.disableCrits()
|
||||||
@ -36,25 +36,23 @@ describe("Abilities - Protosynthesis", () => {
|
|||||||
it("should not consider temporary items when determining which stat to boost", async() => {
|
it("should not consider temporary items when determining which stat to boost", async() => {
|
||||||
// Mew has uniform base stats
|
// Mew has uniform base stats
|
||||||
game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.DEF }])
|
game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.DEF }])
|
||||||
.ability(Abilities.PROTOSYNTHESIS)
|
|
||||||
.enemyMoveset(Moves.SUNNY_DAY)
|
.enemyMoveset(Moves.SUNNY_DAY)
|
||||||
.startingLevel(100)
|
.startingLevel(100)
|
||||||
.enemyLevel(100)
|
.enemyLevel(100);
|
||||||
.moveset([ Moves.TACKLE, Moves.SPLASH ]);
|
|
||||||
await game.classicMode.startBattle([ Species.MEW ]);
|
await game.classicMode.startBattle([ Species.MEW ]);
|
||||||
const mew = game.scene.getPlayerPokemon()!;
|
const mew = game.scene.getPlayerPokemon()!;
|
||||||
// Nature of starting mon is randomized. We need to fix it to a neutral nature for the automated test.
|
// Nature of starting mon is randomized. We need to fix it to a neutral nature for the automated test.
|
||||||
mew.setNature(Nature.HARDY);
|
mew.setNature(Nature.HARDY);
|
||||||
const enemy = game.scene.getEnemyPokemon()!;
|
const enemy = game.scene.getEnemyPokemon()!;
|
||||||
const def_before_boost = mew?.getEffectiveStat(Stat.DEF, undefined, undefined, false, undefined, false, false, true);
|
const def_before_boost = mew.getEffectiveStat(Stat.DEF, undefined, undefined, false, undefined, false, false, true);
|
||||||
const atk_before_boost = mew?.getEffectiveStat(Stat.ATK, undefined, undefined, false, undefined, false, false, true);
|
const atk_before_boost = mew.getEffectiveStat(Stat.ATK, undefined, undefined, false, undefined, false, false, true);
|
||||||
const initialHp = enemy.hp;
|
const initialHp = enemy.hp;
|
||||||
game.move.select(Moves.TACKLE);
|
game.move.select(Moves.TACKLE);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
const unboosted_dmg = initialHp - enemy.hp;
|
const unboosted_dmg = initialHp - enemy.hp;
|
||||||
enemy.hp = initialHp;
|
enemy.hp = initialHp;
|
||||||
const def_after_boost = mew?.getEffectiveStat(Stat.DEF, undefined, undefined, false, undefined, false, false, true);
|
const def_after_boost = mew.getEffectiveStat(Stat.DEF, undefined, undefined, false, undefined, false, false, true);
|
||||||
const atk_after_boost = mew?.getEffectiveStat(Stat.ATK, undefined, undefined, false, undefined, false, false, true);
|
const atk_after_boost = mew.getEffectiveStat(Stat.ATK, undefined, undefined, false, undefined, false, false, true);
|
||||||
game.move.select(Moves.TACKLE);
|
game.move.select(Moves.TACKLE);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
const boosted_dmg = initialHp - enemy.hp;
|
const boosted_dmg = initialHp - enemy.hp;
|
||||||
|
Loading…
Reference in New Issue
Block a user