From 9ef29b7d905606bb01808c2307b440cc6cb046d9 Mon Sep 17 00:00:00 2001 From: geeil-han Date: Mon, 10 Feb 2025 04:58:28 +0100 Subject: [PATCH] added automated test case --- src/test/abilities/supreme_overlord.test.ts | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/test/abilities/supreme_overlord.test.ts b/src/test/abilities/supreme_overlord.test.ts index 21f89ae6984..ecd595cb6bb 100644 --- a/src/test/abilities/supreme_overlord.test.ts +++ b/src/test/abilities/supreme_overlord.test.ts @@ -60,6 +60,41 @@ describe("Abilities - Supreme Overlord", () => { expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.2); }); + it("should increase Power by 30% if an ally fainted twice and another one once", async () => { + await game.classicMode.startBattle([ Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE ]); + + /** + * Bulbasur faints once + */ + game.move.select(Moves.EXPLOSION); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); + game.doSelectPartyPokemon(1); + await game.toNextTurn(); + + /** + * Charmander faints once + */ + game.doRevivePokemon(1); + game.move.select(Moves.EXPLOSION); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); + game.doSelectPartyPokemon(1); + await game.toNextTurn(); + + /** + * Bulbasur faints twice + */ + game.move.select(Moves.EXPLOSION); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); + game.doSelectPartyPokemon(2); + await game.toNextTurn(); + + game.move.select(Moves.TACKLE); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); + await game.phaseInterceptor.to(MoveEffectPhase); + + expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.3); + }); + it("should maintain its power during next battle if it is within the same arena encounter", async () => { game.override .enemySpecies(Species.MAGIKARP)