pokerogue/test/abilities/disguise.test.ts

240 lines
7.3 KiB
TypeScript
Raw Normal View History

import { BattlerIndex } from "#app/battle";
import { toDmgValue } from "#app/utils";
import { Abilities } from "#enums/abilities";
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
[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";
import { StatusEffect } from "#enums/status-effect";
import GameManager from "#test/testUtils/gameManager";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
describe("Abilities - Disguise", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
const bustedForm = 1;
const disguisedForm = 0;
beforeAll(() => {
phaserGame = new Phaser.Game({
type: Phaser.HEADLESS,
});
});
afterEach(() => {
game.phaseInterceptor.restoreOg();
});
beforeEach(() => {
game = new GameManager(phaserGame);
game.override
.battleType("single")
.enemySpecies(Species.MIMIKYU)
.enemyMoveset(Moves.SPLASH)
.starterSpecies(Species.REGIELEKI)
2024-10-04 13:08:31 +08:00
.moveset([ Moves.SHADOW_SNEAK, Moves.VACUUM_WAVE, Moves.TOXIC_THREAD, Moves.SPLASH ]);
});
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
it("takes no damage from attacking move and transforms to Busted form, takes 1/8 max HP damage from the disguise breaking", async () => {
[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
await game.classicMode.startBattle();
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
const mimikyu = game.scene.getEnemyPokemon()!;
const maxHp = mimikyu.getMaxHp();
const disguiseDamage = toDmgValue(maxHp / 8);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.formIndex).toBe(disguisedForm);
game.move.select(Moves.SHADOW_SNEAK);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
await game.phaseInterceptor.to("MoveEndPhase");
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.hp).equals(maxHp - disguiseDamage);
expect(mimikyu.formIndex).toBe(bustedForm);
});
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
it("doesn't break disguise when attacked with ineffective move", async () => {
[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
await game.classicMode.startBattle();
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
const mimikyu = game.scene.getEnemyPokemon()!;
expect(mimikyu.formIndex).toBe(disguisedForm);
game.move.select(Moves.VACUUM_WAVE);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
await game.phaseInterceptor.to("MoveEndPhase");
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.formIndex).toBe(disguisedForm);
});
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
it("takes no damage from the first hit of a multihit move and transforms to Busted form, then takes damage from the second hit", async () => {
[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
game.override.moveset([ Moves.SURGING_STRIKES ]);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
game.override.enemyLevel(5);
[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
await game.classicMode.startBattle();
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
const mimikyu = game.scene.getEnemyPokemon()!;
const maxHp = mimikyu.getMaxHp();
const disguiseDamage = toDmgValue(maxHp / 8);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.formIndex).toBe(disguisedForm);
game.move.select(Moves.SURGING_STRIKES);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
// First hit
await game.phaseInterceptor.to("MoveEffectPhase");
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.hp).equals(maxHp - disguiseDamage);
expect(mimikyu.formIndex).toBe(disguisedForm);
// Second hit
await game.phaseInterceptor.to("MoveEffectPhase");
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.hp).lessThan(maxHp - disguiseDamage);
expect(mimikyu.formIndex).toBe(bustedForm);
});
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
it("takes effects from status moves and damage from status effects", async () => {
[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
await game.classicMode.startBattle();
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
const mimikyu = game.scene.getEnemyPokemon()!;
expect(mimikyu.hp).toBe(mimikyu.getMaxHp());
game.move.select(Moves.TOXIC_THREAD);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
await game.phaseInterceptor.to("TurnEndPhase");
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.formIndex).toBe(disguisedForm);
expect(mimikyu.status?.effect).toBe(StatusEffect.POISON);
[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(mimikyu.getStatStage(Stat.SPD)).toBe(-1);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.hp).toBeLessThan(mimikyu.getMaxHp());
});
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
it("persists form change when switched out", async () => {
2024-10-04 13:08:31 +08:00
game.override.enemyMoveset([ Moves.SHADOW_SNEAK ]);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
game.override.starterSpecies(0);
[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
await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
const mimikyu = game.scene.getPlayerPokemon()!;
const maxHp = mimikyu.getMaxHp();
const disguiseDamage = toDmgValue(maxHp / 8);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
game.move.select(Moves.SPLASH);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
await game.phaseInterceptor.to("TurnEndPhase");
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.formIndex).toBe(bustedForm);
expect(mimikyu.hp).equals(maxHp - disguiseDamage);
await game.toNextTurn();
game.doSwitchPokemon(1);
await game.phaseInterceptor.to("TurnEndPhase");
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.formIndex).toBe(bustedForm);
});
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
it("persists form change when wave changes with no arena reset", async () => {
game.override.starterSpecies(0);
game.override.starterForms({
[Species.MIMIKYU]: bustedForm
});
[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
await game.classicMode.startBattle([ Species.FURRET, Species.MIMIKYU ]);
const mimikyu = game.scene.getPlayerParty()[1]!;
expect(mimikyu.formIndex).toBe(bustedForm);
game.move.select(Moves.SPLASH);
await game.doKillOpponents();
await game.toNextWave();
expect(mimikyu.formIndex).toBe(bustedForm);
});
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
it("reverts to Disguised form on arena reset", async () => {
game.override.startingWave(4);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
game.override.starterSpecies(Species.MIMIKYU);
game.override.starterForms({
[Species.MIMIKYU]: bustedForm
});
[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
await game.classicMode.startBattle();
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
const mimikyu = game.scene.getPlayerPokemon()!;
expect(mimikyu.formIndex).toBe(bustedForm);
game.move.select(Moves.SPLASH);
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
await game.doKillOpponents();
await game.toNextWave();
[Fix] Refactor Disguise to work like Ice Face (#2684) * Fix typos in `src/data/egg.ts` comments * Refactor Disguise using Ice Face as a base i18n { Co-authored-by: Arxxer <javiptn7@gmail.com> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> } Update tests * Update jsdoc * Make recoil damage a parameter * Fix Ice Face i18n parameter name * Add i18n placeholder strings for translation * Update disguise test with override helper functions * Move a form change from `battle-scene.ts` to `ability.ts` * Remove a bit of obsolete code from the Disguise test * Add some translations Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> * Add translation placeholder strings for Japanese and Catalan * Update for strict-null * Remove unused parameter from the `BattlerTag` class * Remove species checks, fusion doesn't seem to be an issue (any more?) * Move Ice Face weather-based code to a subclass * Condense conditionals Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: returntoice <dieandbecome@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 03:52:39 -07:00
expect(mimikyu.formIndex).toBe(disguisedForm);
});
it("reverts to Disguised form on biome change when fainted", async () => {
game.override.startingWave(10);
game.override.starterSpecies(0);
game.override.starterForms({
[Species.MIMIKYU]: bustedForm
});
[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
await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]);
const mimikyu1 = game.scene.getPlayerPokemon()!;
expect(mimikyu1.formIndex).toBe(bustedForm);
game.move.select(Moves.SPLASH);
await game.killPokemon(mimikyu1);
game.doSelectPartyPokemon(1);
await game.toNextTurn();
game.move.select(Moves.SPLASH);
await game.doKillOpponents();
await game.phaseInterceptor.to("PartyHealPhase");
expect(mimikyu1.formIndex).toBe(disguisedForm);
});
it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => {
2024-10-04 13:08:31 +08:00
game.override.enemyMoveset([ Moves.ENDURE ]);
[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
await game.classicMode.startBattle();
const mimikyu = game.scene.getEnemyPokemon()!;
mimikyu.hp = 1;
game.move.select(Moves.SHADOW_SNEAK);
await game.toNextWave();
expect(game.scene.getCurrentPhase()?.constructor.name).toBe("CommandPhase");
expect(game.scene.currentBattle.waveIndex).toBe(2);
});
it("activates when Aerilate circumvents immunity to the move's base type", async () => {
game.override.ability(Abilities.AERILATE);
2024-10-04 13:08:31 +08:00
game.override.moveset([ Moves.TACKLE ]);
await game.classicMode.startBattle();
const mimikyu = game.scene.getEnemyPokemon()!;
const maxHp = mimikyu.getMaxHp();
const disguiseDamage = toDmgValue(maxHp / 8);
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.to("MoveEndPhase");
expect(mimikyu.formIndex).toBe(bustedForm);
expect(mimikyu.hp).toBe(maxHp - disguiseDamage);
});
it("doesn't trigger if user is behind a substitute", async () => {
game.override
.enemyMoveset(Moves.SUBSTITUTE)
.moveset(Moves.POWER_TRIP);
await game.classicMode.startBattle();
game.move.select(Moves.POWER_TRIP);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.toNextTurn();
expect(game.scene.getEnemyPokemon()!.formIndex).toBe(disguisedForm);
});
});