pokerogue/src/test/moves/tera_blast.test.ts

117 lines
4.1 KiB
TypeScript
Raw Normal View History

import { BattlerIndex } from "#app/battle";
[Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Several Stat Moves (#2699) * Create Getters, Setters, and Types * Work on `pokemon.ts` * Adjust Types, Refactor `White Herb` Modifier * Migrate `TempBattleStat` Usage * Refactor `PokemonBaseStatModifier` Slightly * Remove `BattleStat`, Use "Stat Stages" & New Names * Address Phase `integers` * Finalize `BattleStat` Removal * Address Minor Manual NITs * Apply Own Review Suggestions * Fix Syntax Error * Add Docs * Overhaul X Items * Implement Guard and Power Split with Unit Tests * Add Several Unit Tests and Fixes * Implement Speed Swap with Unit Tests * Fix Keys in Summary Menu * Fix Starf Berry Raising EVA and ACC * Fix Contrary & Simple, Verify with Unit Tests * Implement Power & Guard Swap with Unit Tests * Add Move Effect Message to Speed Swap * Add Move Effect Message to Power & Guard Split * Add Localization Entries * Adjust Last X Item Unit Test * Overhaul X Items Unit Tests * Finish Missing Docs * Revamp Crit-Based Unit Tests & Dire Hit * Address Initial NITs * Apply NIT Batch Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> * Fix Moody Test * Address Multiple Messages for `ProtectStatAbAttr` * Change `ignoreOverride` to `bypassSummonData` * Adjust Italian Localization Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> * Fix Moody --------- Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
2024-09-02 22:12:34 -04:00
import { Stat } from "#enums/stat";
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
import { allMoves } from "#app/data/move";
import { Type } from "#app/data/type";
import { Abilities } from "#app/enums/abilities";
import { HitResult } from "#app/field/pokemon";
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
describe("Moves - Tera Blast", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
const moveToCheck = allMoves[Moves.TERA_BLAST];
beforeAll(() => {
phaserGame = new Phaser.Game({
type: Phaser.HEADLESS,
});
});
afterEach(() => {
game.phaseInterceptor.restoreOg();
});
beforeEach(() => {
game = new GameManager(phaserGame);
game.override
.battleType("single")
.disableCrits()
.starterSpecies(Species.FEEBAS)
2024-10-04 13:08:31 +08:00
.moveset([ Moves.TERA_BLAST ])
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
.ability(Abilities.BALL_FETCH)
.startingHeldItems([{ name: "TERA_SHARD", type: Type.FIRE }])
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
.enemySpecies(Species.MAGIKARP)
.enemyMoveset(Moves.SPLASH)
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
.enemyAbility(Abilities.BALL_FETCH)
.enemyLevel(20);
vi.spyOn(moveToCheck, "calculateBattlePower");
});
it("changes type to match user's tera type", async () => {
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
game.override
.enemySpecies(Species.FURRET)
.startingHeldItems([{ name: "TERA_SHARD", type: Type.FIGHTING }]);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
await game.startBattle();
const enemyPokemon = game.scene.getEnemyPokemon()!;
vi.spyOn(enemyPokemon, "apply");
game.move.select(Moves.TERA_BLAST);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
await game.phaseInterceptor.to("MoveEffectPhase");
expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.SUPER_EFFECTIVE);
}, 20000);
it("increases power if user is Stellar tera type", async () => {
game.override.startingHeldItems([{ name: "TERA_SHARD", type: Type.STELLAR }]);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
await game.startBattle();
game.move.select(Moves.TERA_BLAST);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
await game.phaseInterceptor.to("MoveEffectPhase");
[Ability][Move] Rewrite Type Resolution and Effectiveness Calculation Functions (#3704) * Make type/category read-only * Fix protean/libero tests * Refactor Pokemon type effectiveness calculation * Merge getMoveEffectiveness and getAttackMoveEffectiveness * Move priority-blocking ability check * Fix incorrect early stopping implementation in MultiHitAttr * Fix Aerilate, etc. affecting variable-type moves * Thunder Wave now respects Attack type immunities * Use final move types for pre-defend abilities * Steal some things from flx's PR hehe * Fix Thousand Arrows + "No effect" messages * Fix status type effectiveness check * Another status move effectiveness update + some docs * changing status logic again... * Fix unnecessary "No Effect" message for Volt Absorb, etc * Add type effectiveness unit test * Add Galvanize integration tests * Add multi-hit test to galvanize tests * Add power check to first Galvanize test * Add missing doc line Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> * Resolve torranx's nits * Apply suggestions from Kev's code review Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * More suggestions I missed Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Optimize effectiveness test and make others more stylish (#3) * Resolve Kev's remaining nits and some test issues --------- Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta Co-authored-by: frutescens
2024-08-25 19:11:01 -07:00
expect(moveToCheck.calculateBattlePower).toHaveReturnedWith(100);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
}, 20000);
[Ability][Move] Rewrite Type Resolution and Effectiveness Calculation Functions (#3704) * Make type/category read-only * Fix protean/libero tests * Refactor Pokemon type effectiveness calculation * Merge getMoveEffectiveness and getAttackMoveEffectiveness * Move priority-blocking ability check * Fix incorrect early stopping implementation in MultiHitAttr * Fix Aerilate, etc. affecting variable-type moves * Thunder Wave now respects Attack type immunities * Use final move types for pre-defend abilities * Steal some things from flx's PR hehe * Fix Thousand Arrows + "No effect" messages * Fix status type effectiveness check * Another status move effectiveness update + some docs * changing status logic again... * Fix unnecessary "No Effect" message for Volt Absorb, etc * Add type effectiveness unit test * Add Galvanize integration tests * Add multi-hit test to galvanize tests * Add power check to first Galvanize test * Add missing doc line Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> * Resolve torranx's nits * Apply suggestions from Kev's code review Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * More suggestions I missed Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Optimize effectiveness test and make others more stylish (#3) * Resolve Kev's remaining nits and some test issues --------- Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta Co-authored-by: frutescens
2024-08-25 19:11:01 -07:00
it("is super effective against terastallized targets if user is Stellar tera type", async () => {
game.override.startingHeldItems([{ name: "TERA_SHARD", type: Type.STELLAR }]);
await game.startBattle();
const enemyPokemon = game.scene.getEnemyPokemon()!;
vi.spyOn(enemyPokemon, "apply");
vi.spyOn(enemyPokemon, "isTerastallized").mockReturnValue(true);
game.move.select(Moves.TERA_BLAST);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
[Ability][Move] Rewrite Type Resolution and Effectiveness Calculation Functions (#3704) * Make type/category read-only * Fix protean/libero tests * Refactor Pokemon type effectiveness calculation * Merge getMoveEffectiveness and getAttackMoveEffectiveness * Move priority-blocking ability check * Fix incorrect early stopping implementation in MultiHitAttr * Fix Aerilate, etc. affecting variable-type moves * Thunder Wave now respects Attack type immunities * Use final move types for pre-defend abilities * Steal some things from flx's PR hehe * Fix Thousand Arrows + "No effect" messages * Fix status type effectiveness check * Another status move effectiveness update + some docs * changing status logic again... * Fix unnecessary "No Effect" message for Volt Absorb, etc * Add type effectiveness unit test * Add Galvanize integration tests * Add multi-hit test to galvanize tests * Add power check to first Galvanize test * Add missing doc line Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> * Resolve torranx's nits * Apply suggestions from Kev's code review Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * More suggestions I missed Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Optimize effectiveness test and make others more stylish (#3) * Resolve Kev's remaining nits and some test issues --------- Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta Co-authored-by: frutescens
2024-08-25 19:11:01 -07:00
await game.phaseInterceptor.to("MoveEffectPhase");
expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.SUPER_EFFECTIVE);
});
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
// Currently abilities are bugged and can't see when a move's category is changed
it.skip("uses the higher stat of the user's Atk and SpAtk for damage calculation", async () => {
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
game.override.enemyAbility(Abilities.TOXIC_DEBRIS);
await game.startBattle();
const playerPokemon = game.scene.getPlayerPokemon()!;
playerPokemon.stats[Stat.ATK] = 100;
playerPokemon.stats[Stat.SPATK] = 1;
game.move.select(Moves.TERA_BLAST);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
await game.phaseInterceptor.to("TurnEndPhase");
expect(game.scene.getEnemyPokemon()!.battleData.abilityRevealed).toBe(true);
}, 20000);
it("causes stat drops if user is Stellar tera type", async () => {
game.override.startingHeldItems([{ name: "TERA_SHARD", type: Type.STELLAR }]);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
await game.startBattle();
const playerPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.TERA_BLAST);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
await game.phaseInterceptor.to("MoveEndPhase");
[Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Several Stat Moves (#2699) * Create Getters, Setters, and Types * Work on `pokemon.ts` * Adjust Types, Refactor `White Herb` Modifier * Migrate `TempBattleStat` Usage * Refactor `PokemonBaseStatModifier` Slightly * Remove `BattleStat`, Use "Stat Stages" & New Names * Address Phase `integers` * Finalize `BattleStat` Removal * Address Minor Manual NITs * Apply Own Review Suggestions * Fix Syntax Error * Add Docs * Overhaul X Items * Implement Guard and Power Split with Unit Tests * Add Several Unit Tests and Fixes * Implement Speed Swap with Unit Tests * Fix Keys in Summary Menu * Fix Starf Berry Raising EVA and ACC * Fix Contrary & Simple, Verify with Unit Tests * Implement Power & Guard Swap with Unit Tests * Add Move Effect Message to Speed Swap * Add Move Effect Message to Power & Guard Split * Add Localization Entries * Adjust Last X Item Unit Test * Overhaul X Items Unit Tests * Finish Missing Docs * Revamp Crit-Based Unit Tests & Dire Hit * Address Initial NITs * Apply NIT Batch Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> * Fix Moody Test * Address Multiple Messages for `ProtectStatAbAttr` * Change `ignoreOverride` to `bypassSummonData` * Adjust Italian Localization Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> * Fix Moody --------- Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
2024-09-02 22:12:34 -04:00
expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(-1);
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1);
[Move] Some more implementation for Tera Blast (#3469) * terablast updated * terablast update * terablast * fix trailing spaces * fixed misspelling in a comment * split tera blast dmg calc and type calc into different classes * terablastpowerattr update removed dupe code and added user terastallized check to conditional * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * removed spaces and added missing semicolon * added tsdocs for tera blast * deleted extra spaces * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * tsdoc update Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Add files via upload * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/moves/tera_blast.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * remove trailing spaces * The style police are here * Fixed conflict resolution issues --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-08-21 18:33:33 -05:00
}, 20000);
});