From d7cc8a6e5cc4afdaa9fe0327d221fa6f4ef70c95 Mon Sep 17 00:00:00 2001 From: frutescens Date: Sun, 1 Sep 2024 15:33:10 -0700 Subject: [PATCH 01/91] Fixed pt-BR and zh-CN --- ...-update-pt_BR.png => september-update-pt-BR.png} | Bin ...-update-zh_CN.png => september-update-zh-CN.png} | Bin src/loading-scene.ts | 2 +- src/timed-event-manager.ts | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename public/images/events/{september-update-pt_BR.png => september-update-pt-BR.png} (100%) rename public/images/events/{september-update-zh_CN.png => september-update-zh-CN.png} (100%) diff --git a/public/images/events/september-update-pt_BR.png b/public/images/events/september-update-pt-BR.png similarity index 100% rename from public/images/events/september-update-pt_BR.png rename to public/images/events/september-update-pt-BR.png diff --git a/public/images/events/september-update-zh_CN.png b/public/images/events/september-update-zh-CN.png similarity index 100% rename from public/images/events/september-update-zh_CN.png rename to public/images/events/september-update-zh-CN.png diff --git a/src/loading-scene.ts b/src/loading-scene.ts index e4a73414cd1..f5b44f03458 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -244,7 +244,7 @@ export class LoadingScene extends SceneBase { } else { this.loadAtlas("types", ""); } - const availableLangs = ["en", "de", "it", "fr", "ja", "ko", "es", "pt_BR", "zh_CN"]; + const availableLangs = ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"]; if (lang && availableLangs.includes(lang)) { this.loadImage("september-update-"+lang, "events"); } else { diff --git a/src/timed-event-manager.ts b/src/timed-event-manager.ts index abdb2db232a..874bf6a8b46 100644 --- a/src/timed-event-manager.ts +++ b/src/timed-event-manager.ts @@ -33,7 +33,7 @@ const timedEvents: TimedEvent[] = [ xPosition: 19, yPosition: 115, scale: 0.30, - availableLangs: ["en", "de", "it", "fr", "ja", "ko", "es", "pt_BR", "zh_CN"] + availableLangs: ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"] } ]; From ac1c29facaedc572f7cdcf2c69aeb3a379c0c153 Mon Sep 17 00:00:00 2001 From: Frederico Santos Date: Mon, 2 Sep 2024 00:03:51 +0100 Subject: [PATCH 02/91] fix: Fix missing comma in biomeLinks array --- src/data/biomes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/biomes.ts b/src/data/biomes.ts index 721231f9cb0..0e37cc94ff5 100644 --- a/src/data/biomes.ts +++ b/src/data/biomes.ts @@ -1,6 +1,6 @@ import { Type } from "./type"; import * as Utils from "../utils"; -import {pokemonEvolutions, SpeciesFormEvolution} from "./pokemon-evolutions"; +import { pokemonEvolutions, SpeciesFormEvolution } from "./pokemon-evolutions"; import i18next from "i18next"; import { Biome } from "#enums/biome"; import { Species } from "#enums/species"; @@ -46,7 +46,7 @@ export const biomeLinks: BiomeLinks = { [Biome.SEABED]: [ Biome.CAVE, [ Biome.VOLCANO, 3 ] ], [Biome.MOUNTAIN]: [ Biome.VOLCANO, [ Biome.WASTELAND, 2 ], [ Biome.SPACE, 3 ] ], [Biome.BADLANDS]: [ Biome.DESERT, Biome.MOUNTAIN ], - [Biome.CAVE]: [ Biome.BADLANDS, Biome.LAKE [ Biome.LABORATORY, 2 ] ], + [Biome.CAVE]: [ Biome.BADLANDS, Biome.LAKE, [ Biome.LABORATORY, 2 ] ], [Biome.DESERT]: [ Biome.RUINS, [ Biome.CONSTRUCTION_SITE, 2 ] ], [Biome.ICE_CAVE]: Biome.SNOWY_FOREST, [Biome.MEADOW]: [ Biome.PLAINS, Biome.FAIRY_CAVE ], From 51ab51cc645b60b494ed1333c42a260e563145ca Mon Sep 17 00:00:00 2001 From: Blitzy <118096277+Blitz425@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:08:43 -0500 Subject: [PATCH 03/91] [Balance Hotfix] GMax Butterfree tinted lens -> compound eyes (#3967) --- src/data/pokemon-species.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 17f2de794ae..3335f8112f8 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -944,7 +944,7 @@ export function initSpecies() { new PokemonSpecies(Species.METAPOD, 1, false, false, false, "Cocoon Pokémon", Type.BUG, null, 0.7, 9.9, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 50, 20, 55, 25, 25, 30, 120, 50, 72, GrowthRate.MEDIUM_FAST, 50, false), new PokemonSpecies(Species.BUTTERFREE, 1, false, false, false, "Butterfly Pokémon", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, GrowthRate.MEDIUM_FAST, 50, true, true, new PokemonForm("Normal", "", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, true, null, true), - new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 32, Abilities.TINTED_LENS, Abilities.TINTED_LENS, Abilities.TINTED_LENS, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true), + new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 32, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true), ), new PokemonSpecies(Species.WEEDLE, 1, false, false, false, "Hairy Bug Pokémon", Type.BUG, Type.POISON, 0.3, 3.2, Abilities.SHIELD_DUST, Abilities.NONE, Abilities.RUN_AWAY, 195, 40, 35, 30, 20, 20, 50, 255, 70, 39, GrowthRate.MEDIUM_FAST, 50, false), new PokemonSpecies(Species.KAKUNA, 1, false, false, false, "Cocoon Pokémon", Type.BUG, Type.POISON, 0.6, 10, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 45, 25, 50, 25, 25, 35, 120, 70, 72, GrowthRate.MEDIUM_FAST, 50, false), From 947400f2b91a748d5b660b4c8b4e78b1e678fa3a Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Mon, 2 Sep 2024 19:11:35 -0700 Subject: [PATCH 04/91] [Test] Add tests for Freeze-Dry (#3990) --- src/test/moves/freeze_dry.test.ts | 107 ++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 src/test/moves/freeze_dry.test.ts diff --git a/src/test/moves/freeze_dry.test.ts b/src/test/moves/freeze_dry.test.ts new file mode 100644 index 00000000000..445a432a812 --- /dev/null +++ b/src/test/moves/freeze_dry.test.ts @@ -0,0 +1,107 @@ +import { BattlerIndex } from "#app/battle"; +import { Abilities } from "#app/enums/abilities"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Moves - Freeze-Dry", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemySpecies(Species.MAGIKARP) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY) + .starterSpecies(Species.FEEBAS) + .ability(Abilities.BALL_FETCH) + .moveset([Moves.FREEZE_DRY]); + }); + + it("should deal 2x damage to pure water types", async () => { + await game.classicMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.FREEZE_DRY); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(2); + }, TIMEOUT); + + it("should deal 4x damage to water/flying types", async () => { + game.override.enemySpecies(Species.WINGULL); + await game.classicMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.FREEZE_DRY); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(4); + }, TIMEOUT); + + it("should deal 1x damage to water/fire types", async () => { + game.override.enemySpecies(Species.VOLCANION); + await game.classicMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.FREEZE_DRY); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(1); + }, TIMEOUT); + + // enable if this is ever fixed (lol) + it.todo("should deal 2x damage to water types under Normalize", async () => { + game.override.ability(Abilities.NORMALIZE); + await game.classicMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.FREEZE_DRY); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(2); + }, TIMEOUT); + + // enable once Electrify is implemented (and the interaction is fixed, as above) + it.todo("should deal 2x damage to water types under Electrify", async () => { + game.override.enemyMoveset(Array(4).fill(Moves.ELECTRIFY)); + await game.classicMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.FREEZE_DRY); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.phaseInterceptor.to("BerryPhase"); + + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(2); + }, TIMEOUT); +}); From 89e80f3deb5f8652e7dcb9bdb05475b72191260a Mon Sep 17 00:00:00 2001 From: "Amani H." <109637146+xsn34kzx@users.noreply.github.com> Date: Mon, 2 Sep 2024 22:12:34 -0400 Subject: [PATCH 05/91] [Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Several Stat Moves (#2699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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> --- docs/enemy-ai.md | 8 +- src/data/ability.ts | 576 +++++++------- src/data/arena-tag.ts | 16 +- src/data/battle-stat.ts | 71 -- src/data/battler-tags.ts | 76 +- src/data/berry.ts | 27 +- src/data/move.ts | 748 ++++++++++-------- src/data/nature.ts | 7 +- src/data/pokemon-evolutions.ts | 2 +- src/data/pokemon-species.ts | 2 +- src/data/pokemon-stat.ts | 29 - src/data/temp-battle-stat.ts | 38 - src/enums/stat.ts | 67 ++ src/field/pokemon.ts | 387 +++++---- src/interfaces/locales.ts | 3 +- src/locales/de/achv.json | 4 +- src/locales/de/modifier-type.json | 32 +- src/locales/de/modifier.json | 2 +- src/locales/de/move-trigger.json | 6 +- src/locales/de/pokemon-info.json | 1 - src/locales/en/achv.json | 6 +- src/locales/en/modifier-type.json | 27 +- src/locales/en/modifier.json | 2 +- src/locales/en/move-trigger.json | 4 + src/locales/en/pokemon-info.json | 7 +- src/locales/es/achv.json | 4 +- src/locales/es/modifier-type.json | 30 +- src/locales/es/move-trigger.json | 6 +- src/locales/fr/achv.json | 2 +- src/locales/fr/modifier-type.json | 27 +- src/locales/fr/modifier.json | 2 +- src/locales/fr/move-trigger.json | 4 + src/locales/it/achv.json | 4 +- src/locales/it/modifier-type.json | 34 +- src/locales/it/modifier.json | 2 +- src/locales/it/move-trigger.json | 4 + src/locales/ja/achv.json | 2 +- src/locales/ja/modifier-type.json | 32 +- src/locales/ja/modifier.json | 2 +- src/locales/ja/move-trigger.json | 6 +- src/locales/ko/achv.json | 2 +- src/locales/ko/modifier-type.json | 32 +- src/locales/ko/move-trigger.json | 6 +- src/locales/pt_BR/achv.json | 4 +- src/locales/pt_BR/modifier-type.json | 30 +- src/locales/pt_BR/modifier.json | 2 +- src/locales/pt_BR/move-trigger.json | 2 +- src/locales/zh_CN/achv.json | 2 +- src/locales/zh_CN/modifier-type.json | 32 +- src/locales/zh_CN/modifier.json | 2 +- src/locales/zh_CN/move-trigger.json | 4 + src/locales/zh_CN/pokemon-info.json | 4 +- src/locales/zh_TW/achv.json | 4 +- src/locales/zh_TW/modifier-type.json | 32 +- src/locales/zh_TW/modifier.json | 2 +- src/locales/zh_TW/move-trigger.json | 4 + src/modifier/modifier-type.ts | 135 ++-- src/modifier/modifier.ts | 241 ++++-- src/phases/faint-phase.ts | 24 +- src/phases/field-phase.ts | 2 +- src/phases/stat-change-phase.ts | 248 ------ src/phases/stat-stage-change-phase.ts | 244 ++++++ src/phases/turn-start-phase.ts | 4 +- src/system/achv.ts | 17 +- src/system/pokemon-data.ts | 3 +- src/test/abilities/beast_boost.test.ts | 97 +++ src/test/abilities/contrary.test.ts | 42 + src/test/abilities/costar.test.ts | 22 +- src/test/abilities/disguise.test.ts | 26 +- src/test/abilities/flower_gift.test.ts | 18 +- src/test/abilities/gulp_missile.test.ts | 10 +- src/test/abilities/hustle.test.ts | 10 +- src/test/abilities/hyper_cutter.test.ts | 6 +- src/test/abilities/imposter.test.ts | 101 +++ src/test/abilities/intimidate.test.ts | 346 +++----- src/test/abilities/intrepid_sword.test.ts | 17 +- src/test/abilities/moody.test.ts | 44 +- src/test/abilities/moxie.test.ts | 51 +- src/test/abilities/mycelium_might.test.ts | 13 +- src/test/abilities/parental_bond.test.ts | 10 +- src/test/abilities/sand_veil.test.ts | 12 +- src/test/abilities/sap_sipper.test.ts | 62 +- src/test/abilities/serene_grace.test.ts | 2 +- src/test/abilities/sheer_force.test.ts | 2 +- src/test/abilities/shield_dust.test.ts | 2 +- src/test/abilities/simple.test.ts | 42 + src/test/abilities/volt_absorb.test.ts | 8 +- src/test/abilities/wind_rider.test.ts | 76 +- src/test/abilities/zen_mode.test.ts | 4 +- src/test/achievements/achievement.test.ts | 2 +- src/test/battle-stat.spec.ts | 145 ---- src/test/battle/battle.test.ts | 4 +- src/test/battlerTags/octolock.test.ts | 18 +- src/test/battlerTags/stockpiling.test.ts | 80 +- src/test/boss-pokemon.test.ts | 45 +- src/test/items/dire_hit.test.ts | 97 +++ src/test/items/eviolite.test.ts | 14 +- src/test/items/leek.test.ts | 141 ++-- src/test/items/light_ball.test.ts | 14 +- src/test/items/metal_powder.test.ts | 14 +- src/test/items/quick_powder.test.ts | 14 +- src/test/items/scope_lens.test.ts | 53 +- .../items/temp_stat_stage_booster.test.ts | 174 ++++ src/test/items/thick_club.test.ts | 14 +- src/test/localization/battle-stat.test.ts | 217 ----- src/test/moves/alluring_voice.test.ts | 2 +- src/test/moves/baton_pass.test.ts | 17 +- src/test/moves/belly_drum.test.ts | 36 +- src/test/moves/burning_jealousy.test.ts | 8 +- src/test/moves/clangorous_soul.test.ts | 93 ++- src/test/moves/crafty_shield.test.ts | 20 +- src/test/moves/double_team.test.ts | 8 +- src/test/moves/dragon_rage.test.ts | 29 +- src/test/moves/fillet_away.test.ts | 54 +- src/test/moves/fissure.test.ts | 12 +- src/test/moves/flower_shield.test.ts | 42 +- src/test/moves/follow_me.test.ts | 4 +- src/test/moves/freezy_frost.test.ts | 103 +-- src/test/moves/fusion_flare_bolt.test.ts | 2 +- src/test/moves/growth.test.ts | 37 +- src/test/moves/guard_split.test.ts | 82 ++ src/test/moves/guard_swap.test.ts | 63 ++ src/test/moves/haze.test.ts | 43 +- src/test/moves/lash_out.test.ts | 2 +- src/test/moves/make_it_rain.test.ts | 30 +- src/test/moves/mat_block.test.ts | 16 +- src/test/moves/octolock.test.ts | 204 +++-- src/test/moves/parting_shot.test.ts | 50 +- src/test/moves/power_split.test.ts | 82 ++ src/test/moves/power_swap.test.ts | 62 ++ src/test/moves/protect.test.ts | 16 +- src/test/moves/quick_guard.test.ts | 14 +- src/test/moves/speed_swap.test.ts | 54 ++ src/test/moves/spit_up.test.ts | 67 +- src/test/moves/spotlight.test.ts | 4 +- src/test/moves/stockpile.test.ts | 36 +- src/test/moves/swallow.test.ts | 28 +- src/test/moves/tackle.test.ts | 2 +- src/test/moves/tail_whip.test.ts | 23 +- src/test/moves/tailwind.test.ts | 18 +- src/test/moves/tera_blast.test.ts | 7 +- src/test/moves/tidy_up.test.ts | 19 +- src/test/moves/transform.test.ts | 101 +++ src/test/moves/wide_guard.test.ts | 14 +- src/test/utils/helpers/overridesHelper.ts | 11 + src/test/utils/phaseInterceptor.ts | 8 +- src/ui/battle-info.ts | 48 +- src/ui/battle-message-ui-handler.ts | 35 +- src/ui/stats-container.ts | 15 +- src/ui/summary-ui-handler.ts | 12 +- 150 files changed, 3868 insertions(+), 3225 deletions(-) delete mode 100644 src/data/battle-stat.ts delete mode 100644 src/data/pokemon-stat.ts delete mode 100644 src/data/temp-battle-stat.ts delete mode 100644 src/phases/stat-change-phase.ts create mode 100644 src/phases/stat-stage-change-phase.ts create mode 100644 src/test/abilities/beast_boost.test.ts create mode 100644 src/test/abilities/contrary.test.ts create mode 100644 src/test/abilities/imposter.test.ts create mode 100644 src/test/abilities/simple.test.ts delete mode 100644 src/test/battle-stat.spec.ts create mode 100644 src/test/items/dire_hit.test.ts create mode 100644 src/test/items/temp_stat_stage_booster.test.ts delete mode 100644 src/test/localization/battle-stat.test.ts create mode 100644 src/test/moves/guard_split.test.ts create mode 100644 src/test/moves/guard_swap.test.ts create mode 100644 src/test/moves/power_split.test.ts create mode 100644 src/test/moves/power_swap.test.ts create mode 100644 src/test/moves/speed_swap.test.ts create mode 100644 src/test/moves/transform.test.ts diff --git a/docs/enemy-ai.md b/docs/enemy-ai.md index f53a8511893..46482f56a90 100644 --- a/docs/enemy-ai.md +++ b/docs/enemy-ai.md @@ -191,15 +191,15 @@ Now that the enemy Pokémon with the best matchup score is on the field (assumin We then need to apply a 2x multiplier for the move's type effectiveness and a 1.5x multiplier since STAB applies. After applying these multipliers, the final score for this move is **75**. -- **Swords Dance**: As a non-attacking move, this move's benefit score is derived entirely from the sum of its attributes' benefit scores. Swords Dance's `StatChangeAttr` has a user benefit score of 0 and a target benefit score that, in this case, simplifies to +- **Swords Dance**: As a non-attacking move, this move's benefit score is derived entirely from the sum of its attributes' benefit scores. Swords Dance's `StatStageChangeAttr` has a user benefit score of 0 and a target benefit score that, in this case, simplifies to $\text{TBS}=4\times \text{levels} + (-2\times \text{sign(levels)})$ where `levels` is the number of stat stages added by the attribute (in this case, +2). The final score for this move is **6** (Note: because this move is self-targeted, we don't flip the sign of TBS when computing the target score). -- **Crush Claw**: This move is a 75-power Normal-type physical attack with a 50 percent chance to lower the target's Defense by one stage. The additional effect is implemented by the same `StatChangeAttr` as Swords Dance, so we can use the same formulas from before to compute the total TBS and base target score. +- **Crush Claw**: This move is a 75-power Normal-type physical attack with a 50 percent chance to lower the target's Defense by one stage. The additional effect is implemented by the same `StatStageChangeAttr` as Swords Dance, so we can use the same formulas from before to compute the total TBS and base target score. - $\text{TBS}=\text{getTargetBenefitScore(StatChangeAttr)}-\text{attackScore}$ + $\text{TBS}=\text{getTargetBenefitScore(StatStageChangeAttr)}-\text{attackScore}$ $\text{TBS}=(-4 + 2)-(-2\times 2 + \lfloor \frac{75}{5} \rfloor)=-2-11=-13$ @@ -221,4 +221,4 @@ When implementing a new move attribute, it's important to override `MoveAttr`'s - A move's **user benefit score (UBS)** incentivizes (or discourages) the move's usage in general. A positive UBS gives the move more incentive to be used, while a negative UBS gives the move less incentive. - A move's **target benefit score (TBS)** incentivizes (or discourages) the move's usage on a specific target. A positive TBS indicates the move is better used on the user or its allies, while a negative TBS indicates the move is better used on enemies. - **The total benefit score (UBS + TBS) of a move should never be 0.** The move selection algorithm assumes the move's benefit score is unimplemented if the total score is 0 and penalizes the move's usage as a result. With status moves especially, it's important to have some form of implementation among the move's attributes to avoid this scenario. -- **Score functions that use formulas should include comments.** If your attribute requires complex logic or formulas to calculate benefit scores, please add comments to explain how the logic works and its intended effect on the enemy's decision making. \ No newline at end of file +- **Score functions that use formulas should include comments.** If your attribute requires complex logic or formulas to calculate benefit scores, please add comments to explain how the logic works and its intended effect on the enemy's decision making. diff --git a/src/data/ability.ts b/src/data/ability.ts index 40312eaa8be..04dd15f9239 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2,7 +2,6 @@ import Pokemon, { HitResult, PlayerPokemon, PokemonMove } from "../field/pokemon import { Type } from "./type"; import { Constructor } from "#app/utils"; import * as Utils from "../utils"; -import { BattleStat, getBattleStatName } from "./battle-stat"; import { getPokemonNameWithAffix } from "../messages"; import { Weather, WeatherType } from "./weather"; import { BattlerTag, GroundedTag, GulpMissileTag, SemiInvulnerableTag } from "./battler-tags"; @@ -10,12 +9,11 @@ import { StatusEffect, getNonVolatileStatusEffects, getStatusEffectDescriptor, g import { Gender } from "./gender"; import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, FlinchAttr, OneHitKOAttr, HitHealAttr, allMoves, StatusMove, SelfStatusMove, VariablePowerAttr, applyMoveAttrs, IncrementMovePriorityAttr, VariableMoveTypeAttr, RandomMovesetMoveAttr, RandomMoveAttr, NaturePowerAttr, CopyMoveAttr, MoveAttr, MultiHitAttr, ChargeAttr, SacrificialAttr, SacrificialAttrOnHit, NeutralDamageAgainstFlyingTypeMultiplierAttr, FixedDamageAttr } from "./move"; import { ArenaTagSide, ArenaTrapTag } from "./arena-tag"; -import { Stat, getStatName } from "./pokemon-stat"; import { BerryModifier, PokemonHeldItemModifier } from "../modifier/modifier"; import { TerrainType } from "./terrain"; import { SpeciesFormChangeManualTrigger, SpeciesFormChangeRevertWeatherFormTrigger, SpeciesFormChangeWeatherTrigger } from "./pokemon-forms"; import i18next from "i18next"; -import { Localizable } from "#app/interfaces/locales.js"; +import { Localizable } from "#app/interfaces/locales"; import { Command } from "../ui/command-ui-handler"; import { BerryModifierType } from "#app/modifier/modifier-type"; import { getPokeballName } from "./pokeball"; @@ -25,10 +23,11 @@ import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { Stat, type BattleStat, type EffectiveStat, BATTLE_STATS, EFFECTIVE_STATS, getStatKey } from "#app/enums/stat"; import { MovePhase } from "#app/phases/move-phase"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; import { ShowAbilityPhase } from "#app/phases/show-ability-phase"; -import { StatChangePhase } from "#app/phases/stat-change-phase"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import BattleScene from "#app/battle-scene"; export class Ability implements Localizable { @@ -126,7 +125,7 @@ type AbAttrCondition = (pokemon: Pokemon) => boolean; type PokemonAttackCondition = (user: Pokemon | null, target: Pokemon | null, move: Move) => boolean; type PokemonDefendCondition = (target: Pokemon, user: Pokemon, move: Move) => boolean; -type PokemonStatChangeCondition = (target: Pokemon, statsChanged: BattleStat[], levels: integer) => boolean; +type PokemonStatStageChangeCondition = (target: Pokemon, statsChanged: BattleStat[], stages: number) => boolean; export abstract class AbAttr { public showAbility: boolean; @@ -203,38 +202,36 @@ export class PostBattleInitFormChangeAbAttr extends PostBattleInitAbAttr { } } -export class PostBattleInitStatChangeAbAttr extends PostBattleInitAbAttr { +export class PostBattleInitStatStageChangeAbAttr extends PostBattleInitAbAttr { private stats: BattleStat[]; - private levels: integer; + private stages: number; private selfTarget: boolean; - constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean) { + constructor(stats: BattleStat[], stages: number, selfTarget?: boolean) { super(); - this.stats = typeof(stats) === "number" - ? [ stats as BattleStat ] - : stats as BattleStat[]; - this.levels = levels; + this.stats = stats; + this.stages = stages; this.selfTarget = !!selfTarget; } applyPostBattleInit(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { - const statChangePhases: StatChangePhase[] = []; + const statStageChangePhases: StatStageChangePhase[] = []; if (!simulated) { if (this.selfTarget) { - statChangePhases.push(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.levels)); + statStageChangePhases.push(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages)); } else { for (const opponent of pokemon.getOpponents()) { - statChangePhases.push(new StatChangePhase(pokemon.scene, opponent.getBattlerIndex(), false, this.stats, this.levels)); + statStageChangePhases.push(new StatStageChangePhase(pokemon.scene, opponent.getBattlerIndex(), false, this.stats, this.stages)); } } - for (const statChangePhase of statChangePhases) { - if (!this.selfTarget && !statChangePhase.getPokemon()?.summonData) { - pokemon.scene.pushPhase(statChangePhase); + for (const statStageChangePhase of statStageChangePhases) { + if (!this.selfTarget && !statStageChangePhase.getPokemon()?.summonData) { + pokemon.scene.pushPhase(statStageChangePhase); } else { // TODO: This causes the ability bar to be shown at the wrong time - pokemon.scene.unshiftPhase(statChangePhase); + pokemon.scene.unshiftPhase(statStageChangePhase); } } } @@ -402,15 +399,15 @@ export class TypeImmunityHealAbAttr extends TypeImmunityAbAttr { } } -class TypeImmunityStatChangeAbAttr extends TypeImmunityAbAttr { +class TypeImmunityStatStageChangeAbAttr extends TypeImmunityAbAttr { private stat: BattleStat; - private levels: integer; + private stages: number; - constructor(immuneType: Type, stat: BattleStat, levels: integer, condition?: AbAttrCondition) { + constructor(immuneType: Type, stat: BattleStat, stages: number, condition?: AbAttrCondition) { super(immuneType, condition); this.stat = stat; - this.levels = levels; + this.stages = stages; } applyPreDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, cancelled: Utils.BooleanHolder, args: any[]): boolean { @@ -419,7 +416,7 @@ class TypeImmunityStatChangeAbAttr extends TypeImmunityAbAttr { if (ret) { cancelled.value = true; // Suppresses "No Effect" message if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.stages)); } } @@ -559,7 +556,7 @@ export class PostDefendGulpMissileAbAttr extends PostDefendAbAttr { } if (battlerTag.tagType === BattlerTagType.GULP_MISSILE_ARROKUDA) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, attacker.getBattlerIndex(), false, [ BattleStat.DEF ], -1)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, attacker.getBattlerIndex(), false, [ Stat.DEF ], -1)); } else { attacker.trySetStatus(StatusEffect.PARALYSIS, true, pokemon); } @@ -588,8 +585,8 @@ export class FieldPriorityMoveImmunityAbAttr extends PreDefendAbAttr { } } -export class PostStatChangeAbAttr extends AbAttr { - applyPostStatChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], levelChanged: integer, selfTarget: boolean, args: any[]): boolean | Promise { +export class PostStatStageChangeAbAttr extends AbAttr { + applyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: integer, selfTarget: boolean, args: any[]): boolean | Promise { return false; } } @@ -635,20 +632,20 @@ export class WonderSkinAbAttr extends PreDefendAbAttr { } } -export class MoveImmunityStatChangeAbAttr extends MoveImmunityAbAttr { +export class MoveImmunityStatStageChangeAbAttr extends MoveImmunityAbAttr { private stat: BattleStat; - private levels: integer; + private stages: number; - constructor(immuneCondition: PreDefendAbAttrCondition, stat: BattleStat, levels: integer) { + constructor(immuneCondition: PreDefendAbAttrCondition, stat: BattleStat, stages: number) { super(immuneCondition); this.stat = stat; - this.levels = levels; + this.stages = stages; } applyPreDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, cancelled: Utils.BooleanHolder, args: any[]): boolean { const ret = super.applyPreDefend(pokemon, passive, simulated, attacker, move, cancelled, args); if (ret && !simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.stages)); } return ret; @@ -683,19 +680,19 @@ export class ReverseDrainAbAttr extends PostDefendAbAttr { } } -export class PostDefendStatChangeAbAttr extends PostDefendAbAttr { +export class PostDefendStatStageChangeAbAttr extends PostDefendAbAttr { private condition: PokemonDefendCondition; private stat: BattleStat; - private levels: integer; + private stages: number; private selfTarget: boolean; private allOthers: boolean; - constructor(condition: PokemonDefendCondition, stat: BattleStat, levels: integer, selfTarget: boolean = true, allOthers: boolean = false) { + constructor(condition: PokemonDefendCondition, stat: BattleStat, stages: number, selfTarget: boolean = true, allOthers: boolean = false) { super(true); this.condition = condition; this.stat = stat; - this.levels = levels; + this.stages = stages; this.selfTarget = selfTarget; this.allOthers = allOthers; } @@ -709,11 +706,11 @@ export class PostDefendStatChangeAbAttr extends PostDefendAbAttr { if (this.allOthers) { const otherPokemon = pokemon.getAlly() ? pokemon.getOpponents().concat([ pokemon.getAlly() ]) : pokemon.getOpponents(); for (const other of otherPokemon) { - other.scene.unshiftPhase(new StatChangePhase(other.scene, (other).getBattlerIndex(), false, [ this.stat ], this.levels)); + other.scene.unshiftPhase(new StatStageChangePhase(other.scene, (other).getBattlerIndex(), false, [ this.stat ], this.stages)); } return true; } - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, (this.selfTarget ? pokemon : attacker).getBattlerIndex(), this.selfTarget, [ this.stat ], this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, (this.selfTarget ? pokemon : attacker).getBattlerIndex(), this.selfTarget, [ this.stat ], this.stages)); return true; } @@ -721,20 +718,20 @@ export class PostDefendStatChangeAbAttr extends PostDefendAbAttr { } } -export class PostDefendHpGatedStatChangeAbAttr extends PostDefendAbAttr { +export class PostDefendHpGatedStatStageChangeAbAttr extends PostDefendAbAttr { private condition: PokemonDefendCondition; private hpGate: number; private stats: BattleStat[]; - private levels: integer; + private stages: number; private selfTarget: boolean; - constructor(condition: PokemonDefendCondition, hpGate: number, stats: BattleStat[], levels: integer, selfTarget: boolean = true) { + constructor(condition: PokemonDefendCondition, hpGate: number, stats: BattleStat[], stages: number, selfTarget: boolean = true) { super(true); this.condition = condition; this.hpGate = hpGate; this.stats = stats; - this.levels = levels; + this.stages = stages; this.selfTarget = selfTarget; } @@ -744,8 +741,8 @@ export class PostDefendHpGatedStatChangeAbAttr extends PostDefendAbAttr { const damageReceived = lastAttackReceived?.damage || 0; if (this.condition(pokemon, attacker, move) && (pokemon.hp <= hpGateFlat && (pokemon.hp + damageReceived) > hpGateFlat)) { - if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, (this.selfTarget ? pokemon : attacker).getBattlerIndex(), true, this.stats, this.levels)); + if (!simulated ) { + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, (this.selfTarget ? pokemon : attacker).getBattlerIndex(), true, this.stats, this.stages)); } return true; } @@ -913,20 +910,20 @@ export class PostDefendContactApplyTagChanceAbAttr extends PostDefendAbAttr { } } -export class PostDefendCritStatChangeAbAttr extends PostDefendAbAttr { +export class PostDefendCritStatStageChangeAbAttr extends PostDefendAbAttr { private stat: BattleStat; - private levels: integer; + private stages: number; - constructor(stat: BattleStat, levels: integer) { + constructor(stat: BattleStat, stages: number) { super(); this.stat = stat; - this.levels = levels; + this.stages = stages; } applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.stages)); } return true; @@ -1113,23 +1110,23 @@ export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr { } } -export class PostStatChangeStatChangeAbAttr extends PostStatChangeAbAttr { - private condition: PokemonStatChangeCondition; +export class PostStatStageChangeStatStageChangeAbAttr extends PostStatStageChangeAbAttr { + private condition: PokemonStatStageChangeCondition; private statsToChange: BattleStat[]; - private levels: integer; + private stages: number; - constructor(condition: PokemonStatChangeCondition, statsToChange: BattleStat[], levels: integer) { + constructor(condition: PokemonStatStageChangeCondition, statsToChange: BattleStat[], stages: number) { super(true); this.condition = condition; this.statsToChange = statsToChange; - this.levels = levels; + this.stages = stages; } - applyPostStatChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], levelsChanged: integer, selfTarget: boolean, args: any[]): boolean { - if (this.condition(pokemon, statsChanged, levelsChanged) && !selfTarget) { + applyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statStagesChanged: BattleStat[], stagesChanged: number, selfTarget: boolean, args: any[]): boolean { + if (this.condition(pokemon, statStagesChanged, stagesChanged) && !selfTarget) { if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, (pokemon).getBattlerIndex(), true, this.statsToChange, this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, (pokemon).getBattlerIndex(), true, this.statsToChange, this.stages)); } return true; } @@ -1210,13 +1207,13 @@ export class FieldPreventExplosiveMovesAbAttr extends AbAttr { } /** - * Multiplies a BattleStat if the checked Pokemon lacks this ability. + * Multiplies a Stat if the checked Pokemon lacks this ability. * If this ability cannot stack, a BooleanHolder can be used to prevent this from stacking. - * @see {@link applyFieldBattleStatMultiplierAbAttrs} - * @see {@link applyFieldBattleStat} + * @see {@link applyFieldStatMultiplierAbAttrs} + * @see {@link applyFieldStat} * @see {@link Utils.BooleanHolder} */ -export class FieldMultiplyBattleStatAbAttr extends AbAttr { +export class FieldMultiplyStatAbAttr extends AbAttr { private stat: Stat; private multiplier: number; private canStack: boolean; @@ -1230,7 +1227,7 @@ export class FieldMultiplyBattleStatAbAttr extends AbAttr { } /** - * applyFieldBattleStat: Tries to multiply a Pokemon's BattleStat + * applyFieldStat: Tries to multiply a Pokemon's Stat * @param pokemon {@linkcode Pokemon} the Pokemon using this ability * @param passive {@linkcode boolean} unused * @param stat {@linkcode Stat} the type of the checked stat @@ -1240,12 +1237,12 @@ export class FieldMultiplyBattleStatAbAttr extends AbAttr { * @param args {any[]} unused * @returns true if this changed the checked stat, false otherwise. */ - applyFieldBattleStat(pokemon: Pokemon, passive: boolean, simulated: boolean, stat: Stat, statValue: Utils.NumberHolder, checkedPokemon: Pokemon, hasApplied: Utils.BooleanHolder, args: any[]): boolean { + applyFieldStat(pokemon: Pokemon, passive: boolean, simulated: boolean, stat: Stat, statValue: Utils.NumberHolder, checkedPokemon: Pokemon, hasApplied: Utils.BooleanHolder, args: any[]): boolean { if (!this.canStack && hasApplied.value) { return false; } - if (this.stat === stat && checkedPokemon.getAbilityAttrs(FieldMultiplyBattleStatAbAttr).every(attr => (attr as FieldMultiplyBattleStatAbAttr).stat !== stat)) { + if (this.stat === stat && checkedPokemon.getAbilityAttrs(FieldMultiplyStatAbAttr).every(attr => (attr as FieldMultiplyStatAbAttr).stat !== stat)) { statValue.value *= this.multiplier; hasApplied.value = true; return true; @@ -1579,22 +1576,22 @@ export class AllyMoveCategoryPowerBoostAbAttr extends FieldMovePowerBoostAbAttr } } -export class BattleStatMultiplierAbAttr extends AbAttr { - private battleStat: BattleStat; +export class StatMultiplierAbAttr extends AbAttr { + private stat: BattleStat; private multiplier: number; private condition: PokemonAttackCondition | null; - constructor(battleStat: BattleStat, multiplier: number, condition?: PokemonAttackCondition) { + constructor(stat: BattleStat, multiplier: number, condition?: PokemonAttackCondition) { super(false); - this.battleStat = battleStat; + this.stat = stat; this.multiplier = multiplier; this.condition = condition ?? null; } - applyBattleStat(pokemon: Pokemon, passive: boolean, simulated: boolean, battleStat: BattleStat, statValue: Utils.NumberHolder, args: any[]): boolean | Promise { + applyStatStage(pokemon: Pokemon, _passive: boolean, simulated: boolean, stat: BattleStat, statValue: Utils.NumberHolder, args: any[]): boolean | Promise { const move = (args[0] as Move); - if (battleStat === this.battleStat && (!this.condition || this.condition(pokemon, null, move))) { + if (stat === this.stat && (!this.condition || this.condition(pokemon, null, move))) { statValue.value *= this.multiplier; return true; } @@ -1765,15 +1762,15 @@ export class PostVictoryAbAttr extends AbAttr { } } -class PostVictoryStatChangeAbAttr extends PostVictoryAbAttr { +class PostVictoryStatStageChangeAbAttr extends PostVictoryAbAttr { private stat: BattleStat | ((p: Pokemon) => BattleStat); - private levels: integer; + private stages: number; - constructor(stat: BattleStat | ((p: Pokemon) => BattleStat), levels: integer) { + constructor(stat: BattleStat | ((p: Pokemon) => BattleStat), stages: number) { super(); this.stat = stat; - this.levels = levels; + this.stages = stages; } applyPostVictory(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { @@ -1781,7 +1778,7 @@ class PostVictoryStatChangeAbAttr extends PostVictoryAbAttr { ? this.stat(pokemon) : this.stat; if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], this.stages)); } return true; } @@ -1815,15 +1812,15 @@ export class PostKnockOutAbAttr extends AbAttr { } } -export class PostKnockOutStatChangeAbAttr extends PostKnockOutAbAttr { +export class PostKnockOutStatStageChangeAbAttr extends PostKnockOutAbAttr { private stat: BattleStat | ((p: Pokemon) => BattleStat); - private levels: integer; + private stages: number; - constructor(stat: BattleStat | ((p: Pokemon) => BattleStat), levels: integer) { + constructor(stat: BattleStat | ((p: Pokemon) => BattleStat), stages: number) { super(); this.stat = stat; - this.levels = levels; + this.stages = stages; } applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean | Promise { @@ -1831,7 +1828,7 @@ export class PostKnockOutStatChangeAbAttr extends PostKnockOutAbAttr { ? this.stat(pokemon) : this.stat; if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], this.stages)); } return true; } @@ -1855,37 +1852,21 @@ export class CopyFaintedAllyAbilityAbAttr extends PostKnockOutAbAttr { } } -export class IgnoreOpponentStatChangesAbAttr extends AbAttr { - constructor() { +export class IgnoreOpponentStatStagesAbAttr extends AbAttr { + private stats: readonly BattleStat[]; + + constructor(stats?: BattleStat[]) { super(false); + + this.stats = stats ?? BATTLE_STATS; } - apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]) { - (args[0] as Utils.IntegerHolder).value = 0; - - return true; - } -} -/** - * Ignores opponent's evasion stat changes when determining if a move hits or not - * @extends AbAttr - * @see {@linkcode apply} - */ -export class IgnoreOpponentEvasionAbAttr extends AbAttr { - constructor() { - super(false); - } - /** - * Checks if enemy Pokemon is trapped by an Arena Trap-esque ability - * @param pokemon N/A - * @param passive N/A - * @param cancelled N/A - * @param args [0] {@linkcode Utils.IntegerHolder} of BattleStat.EVA - * @returns if evasion level was successfully considered as 0 - */ - apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]) { - (args[0] as Utils.IntegerHolder).value = 0; - return true; + apply(_pokemon: Pokemon, _passive: boolean, simulated: boolean, _cancelled: Utils.BooleanHolder, args: any[]) { + if (this.stats.includes(args[0])) { + (args[1] as Utils.BooleanHolder).value = true; + return true; + } + return false; } } @@ -1907,21 +1888,21 @@ export class IntimidateImmunityAbAttr extends AbAttr { } } -export class PostIntimidateStatChangeAbAttr extends AbAttr { +export class PostIntimidateStatStageChangeAbAttr extends AbAttr { private stats: BattleStat[]; - private levels: integer; + private stages: number; private overwrites: boolean; - constructor(stats: BattleStat[], levels: integer, overwrites?: boolean) { + constructor(stats: BattleStat[], stages: number, overwrites?: boolean) { super(true); this.stats = stats; - this.levels = levels; + this.stages = stages; this.overwrites = !!overwrites; } - apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { + apply(pokemon: Pokemon, passive: boolean, simulated:boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { if (!simulated) { - pokemon.scene.pushPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, this.stats, this.levels)); + pokemon.scene.pushPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, this.stats, this.stages)); } cancelled.value = this.overwrites; return true; @@ -2026,19 +2007,17 @@ export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr { } } -export class PostSummonStatChangeAbAttr extends PostSummonAbAttr { +export class PostSummonStatStageChangeAbAttr extends PostSummonAbAttr { private stats: BattleStat[]; - private levels: integer; + private stages: number; private selfTarget: boolean; private intimidate: boolean; - constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, intimidate?: boolean) { + constructor(stats: BattleStat[], stages: number, selfTarget?: boolean, intimidate?: boolean) { super(false); - this.stats = typeof(stats) === "number" - ? [ stats as BattleStat ] - : stats as BattleStat[]; - this.levels = levels; + this.stats = stats; + this.stages = stages; this.selfTarget = !!selfTarget; this.intimidate = !!intimidate; } @@ -2050,20 +2029,19 @@ export class PostSummonStatChangeAbAttr extends PostSummonAbAttr { queueShowAbility(pokemon, passive); // TODO: Better solution than manually showing the ability here if (this.selfTarget) { - // we unshift the StatChangePhase to put it right after the showAbility and not at the end of the + // we unshift the StatStageChangePhase to put it right after the showAbility and not at the end of the // phase list (which could be after CommandPhase for example) - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages)); return true; } for (const opponent of pokemon.getOpponents()) { const cancelled = new Utils.BooleanHolder(false); if (this.intimidate) { applyAbAttrs(IntimidateImmunityAbAttr, opponent, cancelled, simulated); - applyAbAttrs(PostIntimidateStatChangeAbAttr, opponent, cancelled, simulated); + applyAbAttrs(PostIntimidateStatStageChangeAbAttr, opponent, cancelled, simulated); } if (!cancelled.value) { - const statChangePhase = new StatChangePhase(pokemon.scene, opponent.getBattlerIndex(), false, this.stats, this.levels); - pokemon.scene.unshiftPhase(statChangePhase); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, opponent.getBattlerIndex(), false, this.stats, this.stages)); } } return true; @@ -2104,7 +2082,7 @@ export class PostSummonAllyHealAbAttr extends PostSummonAbAttr { * @param args N/A * @returns if the move was successful */ -export class PostSummonClearAllyStatsAbAttr extends PostSummonAbAttr { +export class PostSummonClearAllyStatStagesAbAttr extends PostSummonAbAttr { constructor() { super(); } @@ -2113,8 +2091,8 @@ export class PostSummonClearAllyStatsAbAttr extends PostSummonAbAttr { const target = pokemon.getAlly(); if (target?.isActive(true)) { if (!simulated) { - for (let s = 0; s < target.summonData.battleStats.length; s++) { - target.summonData.battleStats[s] = 0; + for (const s of BATTLE_STATS) { + target.setStatStage(s, 0); } target.scene.queueMessage(i18next.t("abilityTriggers:postSummonClearAllyStats", { pokemonNameWithAffix: getPokemonNameWithAffix(target) })); @@ -2143,7 +2121,7 @@ export class DownloadAbAttr extends PostSummonAbAttr { // TODO: Implement the Substitute feature(s) once move is implemented. /** * Checks to see if it is the opening turn (starting a new game), if so, Download won't work. This is because Download takes into account - * vitamins and items, so it needs to use the BattleStat and the stat alone. + * vitamins and items, so it needs to use the Stat and the stat alone. * @param {Pokemon} pokemon Pokemon that is using the move, as well as seeing the opposing pokemon. * @param {boolean} passive N/A * @param {any[]} args N/A @@ -2156,21 +2134,21 @@ export class DownloadAbAttr extends PostSummonAbAttr { for (const opponent of pokemon.getOpponents()) { this.enemyCountTally++; - this.enemyDef += opponent.getBattleStat(Stat.DEF); - this.enemySpDef += opponent.getBattleStat(Stat.SPDEF); + this.enemyDef += opponent.getEffectiveStat(Stat.DEF); + this.enemySpDef += opponent.getEffectiveStat(Stat.SPDEF); } this.enemyDef = Math.round(this.enemyDef / this.enemyCountTally); this.enemySpDef = Math.round(this.enemySpDef / this.enemyCountTally); if (this.enemyDef < this.enemySpDef) { - this.stats = [BattleStat.ATK]; + this.stats = [ Stat.ATK ]; } else { - this.stats = [BattleStat.SPATK]; + this.stats = [ Stat.SPATK ]; } if (this.enemyDef > 0 && this.enemySpDef > 0) { // only activate if there's actually an enemy to download from if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, this.stats, 1)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, this.stats, 1)); } return true; } @@ -2339,12 +2317,14 @@ export class PostSummonCopyAllyStatsAbAttr extends PostSummonAbAttr { } const ally = pokemon.getAlly(); - if (!ally || ally.summonData.battleStats.every((change) => change === 0)) { + if (!ally || ally.getStatStages().every(s => s === 0)) { return false; } if (!simulated) { - pokemon.summonData.battleStats = ally.summonData.battleStats; + for (const s of BATTLE_STATS) { + pokemon.setStatStage(s, ally.getStatStage(s)); + } pokemon.updateInfo(); } @@ -2383,14 +2363,27 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr { pokemon.summonData.ability = target.getAbility().id; pokemon.summonData.gender = target.getGender(); pokemon.summonData.fusionGender = target.getFusionGender(); - pokemon.summonData.stats = [ pokemon.stats[Stat.HP] ].concat(target.stats.slice(1)); - pokemon.summonData.battleStats = target.summonData.battleStats.slice(0); + + // Copy all stats (except HP) + for (const s of EFFECTIVE_STATS) { + pokemon.setStat(s, target.getStat(s, false), false); + } + + // Copy all stat stages + for (const s of BATTLE_STATS) { + pokemon.setStatStage(s, target.getStatStage(s)); + } + pokemon.summonData.moveset = target.getMoveset().map(m => new PokemonMove(m!.moveId, m!.ppUsed, m!.ppUp)); // TODO: are those bangs correct? pokemon.summonData.types = target.getTypes(); + pokemon.scene.playSound("battle_anims/PRSFX- Transform"); - pokemon.loadAssets(false).then(() => pokemon.playAnim()); + pokemon.loadAssets(false).then(() => { + pokemon.playAnim(); + pokemon.updateInfo(); + }); pokemon.scene.queueMessage(i18next.t("abilityTriggers:postSummonTransform", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), targetName: target.name, })); @@ -2594,13 +2587,13 @@ export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr { } -export class PreStatChangeAbAttr extends AbAttr { - applyPreStatChange(pokemon: Pokemon | null, passive: boolean, simulated: boolean, stat: BattleStat, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { +export class PreStatStageChangeAbAttr extends AbAttr { + applyPreStatStageChange(pokemon: Pokemon | null, passive: boolean, simulated: boolean, stat: BattleStat, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { return false; } } -export class ProtectStatAbAttr extends PreStatChangeAbAttr { +export class ProtectStatAbAttr extends PreStatStageChangeAbAttr { private protectedStat?: BattleStat; constructor(protectedStat?: BattleStat) { @@ -2609,7 +2602,7 @@ export class ProtectStatAbAttr extends PreStatChangeAbAttr { this.protectedStat = protectedStat; } - applyPreStatChange(pokemon: Pokemon, passive: boolean, simulated: boolean, stat: BattleStat, cancelled: Utils.BooleanHolder, args: any[]): boolean { + applyPreStatStageChange(_pokemon: Pokemon, _passive: boolean, simulated: boolean, stat: BattleStat, cancelled: Utils.BooleanHolder, _args: any[]): boolean { if (Utils.isNullOrUndefined(this.protectedStat) || stat === this.protectedStat) { cancelled.value = true; return true; @@ -2618,11 +2611,11 @@ export class ProtectStatAbAttr extends PreStatChangeAbAttr { return false; } - getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string { + getTriggerMessage(pokemon: Pokemon, abilityName: string, ..._args: any[]): string { return i18next.t("abilityTriggers:protectStat", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName, - statName: this.protectedStat ? getBattleStatName(this.protectedStat) : i18next.t("battle:stats") + statName: this.protectedStat ? i18next.t(getStatKey(this.protectedStat)) : i18next.t("battle:stats") }); } } @@ -3465,51 +3458,53 @@ export class MoodyAbAttr extends PostTurnAbAttr { super(true); } /** - * Randomly increases one BattleStat by 2 stages and decreases a different BattleStat by 1 stage + * Randomly increases one stat stage by 2 and decreases a different stat stage by 1 * @param {Pokemon} pokemon Pokemon that has this ability * @param passive N/A * @param simulated true if applying in a simulated call. * @param args N/A * @returns true * - * Any BattleStats at +6 or -6 are excluded from being increased or decreased, respectively - * If the pokemon already has all BattleStats raised to stage 6, it will only decrease one BattleStat by 1 stage - * If the pokemon already has all BattleStats lowered to stage -6, it will only increase one BattleStat by 2 stages + * Any stat stages at +6 or -6 are excluded from being increased or decreased, respectively + * If the pokemon already has all stat stages raised to 6, it will only decrease one stat stage by 1 + * If the pokemon already has all stat stages lowered to -6, it will only increase one stat stage by 2 */ applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { - const selectableStats = [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD]; - const increaseStatArray = selectableStats.filter(s => pokemon.summonData.battleStats[s] < 6); - let decreaseStatArray = selectableStats.filter(s => pokemon.summonData.battleStats[s] > -6); + const canRaise = EFFECTIVE_STATS.filter(s => pokemon.getStatStage(s) < 6); + let canLower = EFFECTIVE_STATS.filter(s => pokemon.getStatStage(s) > -6); - if (!simulated && increaseStatArray.length > 0) { - const increaseStat = increaseStatArray[Utils.randInt(increaseStatArray.length)]; - decreaseStatArray = decreaseStatArray.filter(s => s !== increaseStat); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [increaseStat], 2)); - } - if (!simulated && decreaseStatArray.length > 0) { - const decreaseStat = decreaseStatArray[Utils.randInt(decreaseStatArray.length)]; - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [decreaseStat], -1)); + if (!simulated) { + if (canRaise.length > 0) { + const raisedStat = Utils.randSeedItem(canRaise); + canLower = canRaise.filter(s => s !== raisedStat); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ raisedStat ], 2)); + } + if (canLower.length > 0) { + const loweredStat = Utils.randSeedItem(canLower); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ loweredStat ], -1)); + } } + return true; } } -export class PostTurnStatChangeAbAttr extends PostTurnAbAttr { +export class PostTurnStatStageChangeAbAttr extends PostTurnAbAttr { private stats: BattleStat[]; - private levels: integer; + private stages: number; - constructor(stats: BattleStat | BattleStat[], levels: integer) { + constructor(stats: BattleStat[], stages: number) { super(true); this.stats = Array.isArray(stats) ? stats : [ stats ]; - this.levels = levels; + this.stages = stages; } applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages)); } return true; } @@ -3721,7 +3716,7 @@ export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr { } } -export class StatChangeMultiplierAbAttr extends AbAttr { +export class StatStageChangeMultiplierAbAttr extends AbAttr { private multiplier: integer; constructor(multiplier: integer) { @@ -3737,10 +3732,10 @@ export class StatChangeMultiplierAbAttr extends AbAttr { } } -export class StatChangeCopyAbAttr extends AbAttr { +export class StatStageChangeCopyAbAttr extends AbAttr { apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, (args[0] as BattleStat[]), (args[1] as integer), true, false, false)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, (args[0] as BattleStat[]), (args[1] as number), true, false, false)); } return true; } @@ -4140,22 +4135,22 @@ export class FlinchEffectAbAttr extends AbAttr { } } -export class FlinchStatChangeAbAttr extends FlinchEffectAbAttr { +export class FlinchStatStageChangeAbAttr extends FlinchEffectAbAttr { private stats: BattleStat[]; - private levels: integer; + private stages: number; - constructor(stats: BattleStat | BattleStat[], levels: integer) { + constructor(stats: BattleStat[], stages: number) { super(); this.stats = Array.isArray(stats) ? stats : [ stats ]; - this.levels = levels; + this.stages = stages; } apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { if (!simulated) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages)); } return true; } @@ -4355,9 +4350,9 @@ export class MoneyAbAttr extends PostBattleAbAttr { * Applies a stat change after a Pokémon is summoned, * conditioned on the presence of a specific arena tag. * - * @extends {PostSummonStatChangeAbAttr} + * @extends {PostSummonStatStageChangeAbAttr} */ -export class PostSummonStatChangeOnArenaAbAttr extends PostSummonStatChangeAbAttr { +export class PostSummonStatStageChangeOnArenaAbAttr extends PostSummonStatStageChangeAbAttr { /** * The type of arena tag that conditions the stat change. * @private @@ -4366,13 +4361,13 @@ export class PostSummonStatChangeOnArenaAbAttr extends PostSummonStatChangeAbAtt private tagType: ArenaTagType; /** - * Creates an instance of PostSummonStatChangeOnArenaAbAttr. + * Creates an instance of PostSummonStatStageChangeOnArenaAbAttr. * Initializes the stat change to increase Attack by 1 stage if the specified arena tag is present. * * @param {ArenaTagType} tagType - The type of arena tag to check for. */ constructor(tagType: ArenaTagType) { - super([BattleStat.ATK], 1, true, false); + super([ Stat.ATK ], 1, true, false); this.tagType = tagType; } @@ -4619,14 +4614,14 @@ export function applyPostMoveUsedAbAttrs(attrType: Constructor(attrType, pokemon, (attr, passive) => attr.applyPostMoveUsed(pokemon, move, source, targets, simulated, args), args, false, simulated); } -export function applyBattleStatMultiplierAbAttrs(attrType: Constructor, - pokemon: Pokemon, battleStat: BattleStat, statValue: Utils.NumberHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyBattleStat(pokemon, passive, simulated, battleStat, statValue, args), args, false, simulated); +export function applyStatMultiplierAbAttrs(attrType: Constructor, + pokemon: Pokemon, stat: BattleStat, statValue: Utils.NumberHolder, simulated: boolean = false, ...args: any[]): Promise { + return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyStatStage(pokemon, passive, simulated, stat, statValue, args), args); } /** - * Applies a field Battle Stat multiplier attribute - * @param attrType {@linkcode FieldMultiplyBattleStatAbAttr} should always be FieldMultiplyBattleStatAbAttr for the time being + * Applies a field Stat multiplier attribute + * @param attrType {@linkcode FieldMultiplyStatAbAttr} should always be FieldMultiplyBattleStatAbAttr for the time being * @param pokemon {@linkcode Pokemon} the Pokemon applying this ability * @param stat {@linkcode Stat} the type of the checked stat * @param statValue {@linkcode Utils.NumberHolder} the value of the checked stat @@ -4634,9 +4629,9 @@ export function applyBattleStatMultiplierAbAttrs(attrType: Constructor, +export function applyFieldStatMultiplierAbAttrs(attrType: Constructor, pokemon: Pokemon, stat: Stat, statValue: Utils.NumberHolder, checkedPokemon: Pokemon, hasApplied: Utils.BooleanHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyFieldBattleStat(pokemon, passive, simulated, stat, statValue, checkedPokemon, hasApplied, args), args, false, simulated); + return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyFieldStat(pokemon, passive, simulated, stat, statValue, checkedPokemon, hasApplied, args), args); } export function applyPreAttackAbAttrs(attrType: Constructor, @@ -4669,14 +4664,14 @@ export function applyPreSwitchOutAbAttrs(attrType: Constructor(attrType, pokemon, (attr, passive) => attr.applyPreSwitchOut(pokemon, passive, simulated, args), args, true, simulated); } -export function applyPreStatChangeAbAttrs(attrType: Constructor, +export function applyPreStatStageChangeAbAttrs(attrType: Constructor, pokemon: Pokemon | null, stat: BattleStat, cancelled: Utils.BooleanHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreStatChange(pokemon, passive, simulated, stat, cancelled, args), args, false, simulated); + return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreStatStageChange(pokemon, passive, simulated, stat, cancelled, args), args, false, simulated); } -export function applyPostStatChangeAbAttrs(attrType: Constructor, - pokemon: Pokemon, stats: BattleStat[], levels: integer, selfTarget: boolean, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostStatChange(pokemon, simulated, stats, levels, selfTarget, args), args, false, simulated); +export function applyPostStatStageChangeAbAttrs(attrType: Constructor, + pokemon: Pokemon, stats: BattleStat[], stages: integer, selfTarget: boolean, simulated: boolean = false, ...args: any[]): Promise { + return applyAbAttrsInternal(attrType, pokemon, (attr, _passive) => attr.applyPostStatStageChange(pokemon, simulated, stats, stages, selfTarget, args), args, false, simulated); } export function applyPreSetStatusAbAttrs(attrType: Constructor, @@ -4766,7 +4761,7 @@ export function initAbilities() { .attr(PostSummonWeatherChangeAbAttr, WeatherType.RAIN) .attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.RAIN), new Ability(Abilities.SPEED_BOOST, 3) - .attr(PostTurnStatChangeAbAttr, BattleStat.SPD, 1), + .attr(PostTurnStatStageChangeAbAttr, [ Stat.SPD ], 1), new Ability(Abilities.BATTLE_ARMOR, 3) .attr(BlockCritAbAttr) .ignorable(), @@ -4781,7 +4776,7 @@ export function initAbilities() { .attr(StatusEffectImmunityAbAttr, StatusEffect.PARALYSIS) .ignorable(), new Ability(Abilities.SAND_VEIL, 3) - .attr(BattleStatMultiplierAbAttr, BattleStat.EVA, 1.2) + .attr(StatMultiplierAbAttr, Stat.EVA, 1.2) .attr(BlockWeatherDamageAttr, WeatherType.SANDSTORM) .condition(getWeatherCondition(WeatherType.SANDSTORM)) .ignorable(), @@ -4807,7 +4802,7 @@ export function initAbilities() { .attr(PostFaintUnsuppressedWeatherFormChangeAbAttr) .bypassFaint(), new Ability(Abilities.COMPOUND_EYES, 3) - .attr(BattleStatMultiplierAbAttr, BattleStat.ACC, 1.3), + .attr(StatMultiplierAbAttr, Stat.ACC, 1.3), new Ability(Abilities.INSOMNIA, 3) .attr(StatusEffectImmunityAbAttr, StatusEffect.SLEEP) .attr(BattlerTagImmunityAbAttr, BattlerTagType.DROWSY) @@ -4832,7 +4827,7 @@ export function initAbilities() { .attr(ForceSwitchOutImmunityAbAttr) .ignorable(), new Ability(Abilities.INTIMIDATE, 3) - .attr(PostSummonStatChangeAbAttr, BattleStat.ATK, -1, false, true), + .attr(PostSummonStatStageChangeAbAttr, [ Stat.ATK ], -1, false, true), new Ability(Abilities.SHADOW_TAG, 3) .attr(ArenaTrapAbAttr, (user, target) => { if (target.hasAbility(Abilities.SHADOW_TAG)) { @@ -4863,26 +4858,26 @@ export function initAbilities() { .attr(PreSwitchOutResetStatusAbAttr), new Ability(Abilities.LIGHTNING_ROD, 3) .attr(RedirectTypeMoveAbAttr, Type.ELECTRIC) - .attr(TypeImmunityStatChangeAbAttr, Type.ELECTRIC, BattleStat.SPATK, 1) + .attr(TypeImmunityStatStageChangeAbAttr, Type.ELECTRIC, Stat.SPATK, 1) .ignorable(), new Ability(Abilities.SERENE_GRACE, 3) .attr(MoveEffectChanceMultiplierAbAttr, 2) .partial(), new Ability(Abilities.SWIFT_SWIM, 3) - .attr(BattleStatMultiplierAbAttr, BattleStat.SPD, 2) + .attr(StatMultiplierAbAttr, Stat.SPD, 2) .condition(getWeatherCondition(WeatherType.RAIN, WeatherType.HEAVY_RAIN)), new Ability(Abilities.CHLOROPHYLL, 3) - .attr(BattleStatMultiplierAbAttr, BattleStat.SPD, 2) + .attr(StatMultiplierAbAttr, Stat.SPD, 2) .condition(getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN)), new Ability(Abilities.ILLUMINATE, 3) - .attr(ProtectStatAbAttr, BattleStat.ACC) + .attr(ProtectStatAbAttr, Stat.ACC) .attr(DoubleBattleChanceAbAttr) .ignorable(), new Ability(Abilities.TRACE, 3) .attr(PostSummonCopyAbilityAbAttr) .attr(UncopiableAbilityAbAttr), new Ability(Abilities.HUGE_POWER, 3) - .attr(BattleStatMultiplierAbAttr, BattleStat.ATK, 2), + .attr(StatMultiplierAbAttr, Stat.ATK, 2), new Ability(Abilities.POISON_POINT, 3) .attr(PostDefendContactApplyStatusEffectAbAttr, 30, StatusEffect.POISON) .bypassFaint(), @@ -4927,25 +4922,25 @@ export function initAbilities() { new Ability(Abilities.RUN_AWAY, 3) .attr(RunSuccessAbAttr), new Ability(Abilities.KEEN_EYE, 3) - .attr(ProtectStatAbAttr, BattleStat.ACC) + .attr(ProtectStatAbAttr, Stat.ACC) .ignorable(), new Ability(Abilities.HYPER_CUTTER, 3) - .attr(ProtectStatAbAttr, BattleStat.ATK) + .attr(ProtectStatAbAttr, Stat.ATK) .ignorable(), new Ability(Abilities.PICKUP, 3) .attr(PostBattleLootAbAttr), new Ability(Abilities.TRUANT, 3) .attr(PostSummonAddBattlerTagAbAttr, BattlerTagType.TRUANT, 1, false), new Ability(Abilities.HUSTLE, 3) - .attr(BattleStatMultiplierAbAttr, BattleStat.ATK, 1.5) - .attr(BattleStatMultiplierAbAttr, BattleStat.ACC, 0.8, (user, target, move) => move.category === MoveCategory.PHYSICAL), + .attr(StatMultiplierAbAttr, Stat.ATK, 1.5) + .attr(StatMultiplierAbAttr, Stat.ACC, 0.8, (_user, _target, move) => move.category === MoveCategory.PHYSICAL), new Ability(Abilities.CUTE_CHARM, 3) .attr(PostDefendContactApplyTagChanceAbAttr, 30, BattlerTagType.INFATUATED), new Ability(Abilities.PLUS, 3) - .conditionalAttr(p => p.scene.currentBattle.double && [Abilities.PLUS, Abilities.MINUS].some(a => p.getAlly().hasAbility(a)), BattleStatMultiplierAbAttr, BattleStat.SPATK, 1.5) + .conditionalAttr(p => p.scene.currentBattle.double && [Abilities.PLUS, Abilities.MINUS].some(a => p.getAlly().hasAbility(a)), StatMultiplierAbAttr, Stat.SPATK, 1.5) .ignorable(), new Ability(Abilities.MINUS, 3) - .conditionalAttr(p => p.scene.currentBattle.double && [Abilities.PLUS, Abilities.MINUS].some(a => p.getAlly().hasAbility(a)), BattleStatMultiplierAbAttr, BattleStat.SPATK, 1.5) + .conditionalAttr(p => p.scene.currentBattle.double && [Abilities.PLUS, Abilities.MINUS].some(a => p.getAlly().hasAbility(a)), StatMultiplierAbAttr, Stat.SPATK, 1.5) .ignorable(), new Ability(Abilities.FORECAST, 3) .attr(UncopiableAbilityAbAttr) @@ -4960,9 +4955,9 @@ export function initAbilities() { .conditionalAttr(pokemon => !Utils.randSeedInt(3), PostTurnResetStatusAbAttr), new Ability(Abilities.GUTS, 3) .attr(BypassBurnDamageReductionAbAttr) - .conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), BattleStatMultiplierAbAttr, BattleStat.ATK, 1.5), + .conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), StatMultiplierAbAttr, Stat.ATK, 1.5), new Ability(Abilities.MARVEL_SCALE, 3) - .conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), BattleStatMultiplierAbAttr, BattleStat.DEF, 1.5) + .conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), StatMultiplierAbAttr, Stat.DEF, 1.5) .ignorable(), new Ability(Abilities.LIQUID_OOZE, 3) .attr(ReverseDrainAbAttr), @@ -4995,7 +4990,7 @@ export function initAbilities() { .attr(ProtectStatAbAttr) .ignorable(), new Ability(Abilities.PURE_POWER, 3) - .attr(BattleStatMultiplierAbAttr, BattleStat.ATK, 2), + .attr(StatMultiplierAbAttr, Stat.ATK, 2), new Ability(Abilities.SHELL_ARMOR, 3) .attr(BlockCritAbAttr) .ignorable(), @@ -5006,25 +5001,25 @@ export function initAbilities() { .attr(PostFaintUnsuppressedWeatherFormChangeAbAttr) .bypassFaint(), new Ability(Abilities.TANGLED_FEET, 4) - .conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), BattleStatMultiplierAbAttr, BattleStat.EVA, 2) + .conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), StatMultiplierAbAttr, Stat.EVA, 2) .ignorable(), new Ability(Abilities.MOTOR_DRIVE, 4) - .attr(TypeImmunityStatChangeAbAttr, Type.ELECTRIC, BattleStat.SPD, 1) + .attr(TypeImmunityStatStageChangeAbAttr, Type.ELECTRIC, Stat.SPD, 1) .ignorable(), new Ability(Abilities.RIVALRY, 4) .attr(MovePowerBoostAbAttr, (user, target, move) => user?.gender !== Gender.GENDERLESS && target?.gender !== Gender.GENDERLESS && user?.gender === target?.gender, 1.25, true) .attr(MovePowerBoostAbAttr, (user, target, move) => user?.gender !== Gender.GENDERLESS && target?.gender !== Gender.GENDERLESS && user?.gender !== target?.gender, 0.75), new Ability(Abilities.STEADFAST, 4) - .attr(FlinchStatChangeAbAttr, BattleStat.SPD, 1), + .attr(FlinchStatStageChangeAbAttr, [ Stat.SPD ], 1), new Ability(Abilities.SNOW_CLOAK, 4) - .attr(BattleStatMultiplierAbAttr, BattleStat.EVA, 1.2) + .attr(StatMultiplierAbAttr, Stat.EVA, 1.2) .attr(BlockWeatherDamageAttr, WeatherType.HAIL) .condition(getWeatherCondition(WeatherType.HAIL, WeatherType.SNOW)) .ignorable(), new Ability(Abilities.GLUTTONY, 4) .attr(ReduceBerryUseThresholdAbAttr), new Ability(Abilities.ANGER_POINT, 4) - .attr(PostDefendCritStatChangeAbAttr, BattleStat.ATK, 6), + .attr(PostDefendCritStatStageChangeAbAttr, Stat.ATK, 6), new Ability(Abilities.UNBURDEN, 4) .unimplemented(), new Ability(Abilities.HEATPROOF, 4) @@ -5032,7 +5027,7 @@ export function initAbilities() { .attr(ReduceBurnDamageAbAttr, 0.5) .ignorable(), new Ability(Abilities.SIMPLE, 4) - .attr(StatChangeMultiplierAbAttr, 2) + .attr(StatStageChangeMultiplierAbAttr, 2) .ignorable(), new Ability(Abilities.DRY_SKIN, 4) .attr(PostWeatherLapseDamageAbAttr, 2, WeatherType.SUNNY, WeatherType.HARSH_SUN) @@ -5057,11 +5052,11 @@ export function initAbilities() { .condition(getWeatherCondition(WeatherType.RAIN, WeatherType.HEAVY_RAIN)), new Ability(Abilities.SOLAR_POWER, 4) .attr(PostWeatherLapseDamageAbAttr, 2, WeatherType.SUNNY, WeatherType.HARSH_SUN) - .attr(BattleStatMultiplierAbAttr, BattleStat.SPATK, 1.5) + .attr(StatMultiplierAbAttr, Stat.SPATK, 1.5) .condition(getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN)), new Ability(Abilities.QUICK_FEET, 4) - .conditionalAttr(pokemon => pokemon.status ? pokemon.status.effect === StatusEffect.PARALYSIS : false, BattleStatMultiplierAbAttr, BattleStat.SPD, 2) - .conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), BattleStatMultiplierAbAttr, BattleStat.SPD, 1.5), + .conditionalAttr(pokemon => pokemon.status ? pokemon.status.effect === StatusEffect.PARALYSIS : false, StatMultiplierAbAttr, Stat.SPD, 2) + .conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), StatMultiplierAbAttr, Stat.SPD, 1.5), new Ability(Abilities.NORMALIZE, 4) .attr(MoveTypeChangeAbAttr, Type.NORMAL, 1.2, (user, target, move) => { return ![Moves.HIDDEN_POWER, Moves.WEATHER_BALL, Moves.NATURAL_GIFT, Moves.JUDGMENT, Moves.TECHNO_BLAST].includes(move.id); @@ -5101,7 +5096,7 @@ export function initAbilities() { new Ability(Abilities.FOREWARN, 4) .attr(ForewarnAbAttr), new Ability(Abilities.UNAWARE, 4) - .attr(IgnoreOpponentStatChangesAbAttr) + .attr(IgnoreOpponentStatStagesAbAttr) .ignorable(), new Ability(Abilities.TINTED_LENS, 4) //@ts-ignore @@ -5116,7 +5111,7 @@ export function initAbilities() { .attr(IntimidateImmunityAbAttr), new Ability(Abilities.STORM_DRAIN, 4) .attr(RedirectTypeMoveAbAttr, Type.WATER) - .attr(TypeImmunityStatChangeAbAttr, Type.WATER, BattleStat.SPATK, 1) + .attr(TypeImmunityStatStageChangeAbAttr, Type.WATER, Stat.SPATK, 1) .ignorable(), new Ability(Abilities.ICE_BODY, 4) .attr(BlockWeatherDamageAttr, WeatherType.HAIL) @@ -5140,8 +5135,8 @@ export function initAbilities() { .attr(UnsuppressableAbilityAbAttr) .attr(NoFusionAbilityAbAttr), new Ability(Abilities.FLOWER_GIFT, 4) - .conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), BattleStatMultiplierAbAttr, BattleStat.ATK, 1.5) - .conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), BattleStatMultiplierAbAttr, BattleStat.SPDEF, 1.5) + .conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.ATK, 1.5) + .conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.SPDEF, 1.5) .attr(UncopiableAbilityAbAttr) .attr(NoFusionAbilityAbAttr) .attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FLOWER_GIFT) @@ -5158,15 +5153,15 @@ export function initAbilities() { .attr(MoveEffectChanceMultiplierAbAttr, 0) .partial(), new Ability(Abilities.CONTRARY, 5) - .attr(StatChangeMultiplierAbAttr, -1) + .attr(StatStageChangeMultiplierAbAttr, -1) .ignorable(), new Ability(Abilities.UNNERVE, 5) .attr(PreventBerryUseAbAttr), new Ability(Abilities.DEFIANT, 5) - .attr(PostStatChangeStatChangeAbAttr, (target, statsChanged, levels) => levels < 0, [BattleStat.ATK], 2), + .attr(PostStatStageChangeStatStageChangeAbAttr, (target, statsChanged, stages) => stages < 0, [Stat.ATK], 2), new Ability(Abilities.DEFEATIST, 5) - .attr(BattleStatMultiplierAbAttr, BattleStat.ATK, 0.5) - .attr(BattleStatMultiplierAbAttr, BattleStat.SPATK, 0.5) + .attr(StatMultiplierAbAttr, Stat.ATK, 0.5) + .attr(StatMultiplierAbAttr, Stat.SPATK, 0.5) .condition((pokemon) => pokemon.getHpRatio() <= 0.5), new Ability(Abilities.CURSED_BODY, 5) .attr(PostDefendMoveDisableAbAttr, 30) @@ -5177,8 +5172,8 @@ export function initAbilities() { .ignorable() .unimplemented(), new Ability(Abilities.WEAK_ARMOR, 5) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.category === MoveCategory.PHYSICAL, BattleStat.DEF, -1) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.category === MoveCategory.PHYSICAL, BattleStat.SPD, 2), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.category === MoveCategory.PHYSICAL, Stat.DEF, -1) + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.category === MoveCategory.PHYSICAL, Stat.SPD, 2), new Ability(Abilities.HEAVY_METAL, 5) .attr(WeightMultiplierAbAttr, 2) .ignorable(), @@ -5214,10 +5209,10 @@ export function initAbilities() { new Ability(Abilities.REGENERATOR, 5) .attr(PreSwitchOutHealAbAttr), new Ability(Abilities.BIG_PECKS, 5) - .attr(ProtectStatAbAttr, BattleStat.DEF) + .attr(ProtectStatAbAttr, Stat.DEF) .ignorable(), new Ability(Abilities.SAND_RUSH, 5) - .attr(BattleStatMultiplierAbAttr, BattleStat.SPD, 2) + .attr(StatMultiplierAbAttr, Stat.SPD, 2) .attr(BlockWeatherDamageAttr, WeatherType.SANDSTORM) .condition(getWeatherCondition(WeatherType.SANDSTORM)), new Ability(Abilities.WONDER_SKIN, 5) @@ -5239,18 +5234,18 @@ export function initAbilities() { .attr(PostDefendAbilityGiveAbAttr, Abilities.MUMMY) .bypassFaint(), new Ability(Abilities.MOXIE, 5) - .attr(PostVictoryStatChangeAbAttr, BattleStat.ATK, 1), + .attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1), new Ability(Abilities.JUSTIFIED, 5) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.type === Type.DARK && move.category !== MoveCategory.STATUS, BattleStat.ATK, 1), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.type === Type.DARK && move.category !== MoveCategory.STATUS, Stat.ATK, 1), new Ability(Abilities.RATTLED, 5) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS && (move.type === Type.DARK || move.type === Type.BUG || - move.type === Type.GHOST), BattleStat.SPD, 1) - .attr(PostIntimidateStatChangeAbAttr, [BattleStat.SPD], 1), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS && (move.type === Type.DARK || move.type === Type.BUG || + move.type === Type.GHOST), Stat.SPD, 1) + .attr(PostIntimidateStatStageChangeAbAttr, [Stat.SPD], 1), new Ability(Abilities.MAGIC_BOUNCE, 5) .ignorable() .unimplemented(), new Ability(Abilities.SAP_SIPPER, 5) - .attr(TypeImmunityStatChangeAbAttr, Type.GRASS, BattleStat.ATK, 1) + .attr(TypeImmunityStatStageChangeAbAttr, Type.GRASS, Stat.ATK, 1) .ignorable(), new Ability(Abilities.PRANKSTER, 5) .attr(ChangeMovePriorityAbAttr, (pokemon, move: Move) => move.category === MoveCategory.STATUS, 1), @@ -5273,7 +5268,7 @@ export function initAbilities() { .attr(NoFusionAbilityAbAttr) .bypassFaint(), new Ability(Abilities.VICTORY_STAR, 5) - .attr(BattleStatMultiplierAbAttr, BattleStat.ACC, 1.1) + .attr(StatMultiplierAbAttr, Stat.ACC, 1.1) .partial(), new Ability(Abilities.TURBOBLAZE, 5) .attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonTurboblaze", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })) @@ -5302,7 +5297,7 @@ export function initAbilities() { .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.hasFlag(MoveFlags.BALLBOMB_MOVE)) .ignorable(), new Ability(Abilities.COMPETITIVE, 6) - .attr(PostStatChangeStatChangeAbAttr, (target, statsChanged, levels) => levels < 0, [BattleStat.SPATK], 2), + .attr(PostStatStageChangeStatStageChangeAbAttr, (target, statsChanged, stages) => stages < 0, [Stat.SPATK], 2), new Ability(Abilities.STRONG_JAW, 6) .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.BITING_MOVE), 1.5), new Ability(Abilities.REFRIGERATE, 6) @@ -5322,7 +5317,7 @@ export function initAbilities() { new Ability(Abilities.MEGA_LAUNCHER, 6) .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.PULSE_MOVE), 1.5), new Ability(Abilities.GRASS_PELT, 6) - .conditionalAttr(getTerrainCondition(TerrainType.GRASSY), BattleStatMultiplierAbAttr, BattleStat.DEF, 1.5) + .conditionalAttr(getTerrainCondition(TerrainType.GRASSY), StatMultiplierAbAttr, Stat.DEF, 1.5) .ignorable(), new Ability(Abilities.SYMBIOSIS, 6) .unimplemented(), @@ -5331,7 +5326,7 @@ export function initAbilities() { new Ability(Abilities.PIXILATE, 6) .attr(MoveTypeChangeAbAttr, Type.FAIRY, 1.2, (user, target, move) => move.type === Type.NORMAL && !move.hasAttr(VariableMoveTypeAttr)), new Ability(Abilities.GOOEY, 6) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), BattleStat.SPD, -1, false), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), Stat.SPD, -1, false), new Ability(Abilities.AERILATE, 6) .attr(MoveTypeChangeAbAttr, Type.FLYING, 1.2, (user, target, move) => move.type === Type.NORMAL && !move.hasAttr(VariableMoveTypeAttr)), new Ability(Abilities.PARENTAL_BOND, 6) @@ -5365,7 +5360,7 @@ export function initAbilities() { .attr(PostFaintClearWeatherAbAttr) .bypassFaint(), new Ability(Abilities.STAMINA, 7) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, BattleStat.DEF, 1), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, Stat.DEF, 1), new Ability(Abilities.WIMP_OUT, 7) .condition(getSheerForceHitDisableAbCondition()) .unimplemented(), @@ -5373,7 +5368,7 @@ export function initAbilities() { .condition(getSheerForceHitDisableAbCondition()) .unimplemented(), new Ability(Abilities.WATER_COMPACTION, 7) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.type === Type.WATER && move.category !== MoveCategory.STATUS, BattleStat.DEF, 2), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.type === Type.WATER && move.category !== MoveCategory.STATUS, Stat.DEF, 2), new Ability(Abilities.MERCILESS, 7) .attr(ConditionalCritAbAttr, (user, target, move) => target?.status?.effect === StatusEffect.TOXIC || target?.status?.effect === StatusEffect.POISON), new Ability(Abilities.SHIELDS_DOWN, 7) @@ -5397,10 +5392,10 @@ export function initAbilities() { new Ability(Abilities.STEELWORKER, 7) .attr(MoveTypePowerBoostAbAttr, Type.STEEL), new Ability(Abilities.BERSERK, 7) - .attr(PostDefendHpGatedStatChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [BattleStat.SPATK], 1) + .attr(PostDefendHpGatedStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [Stat.SPATK], 1) .condition(getSheerForceHitDisableAbCondition()), new Ability(Abilities.SLUSH_RUSH, 7) - .attr(BattleStatMultiplierAbAttr, BattleStat.SPD, 2) + .attr(StatMultiplierAbAttr, Stat.SPD, 2) .condition(getWeatherCondition(WeatherType.HAIL, WeatherType.SNOW)), new Ability(Abilities.LONG_REACH, 7) .attr(IgnoreContactAbAttr), @@ -5411,7 +5406,7 @@ export function initAbilities() { new Ability(Abilities.GALVANIZE, 7) .attr(MoveTypeChangeAbAttr, Type.ELECTRIC, 1.2, (user, target, move) => move.type === Type.NORMAL && !move.hasAttr(VariableMoveTypeAttr)), new Ability(Abilities.SURGE_SURFER, 7) - .conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), BattleStatMultiplierAbAttr, BattleStat.SPD, 2), + .conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), StatMultiplierAbAttr, Stat.SPD, 2), new Ability(Abilities.SCHOOLING, 7) .attr(PostBattleInitFormChangeAbAttr, () => 0) .attr(PostSummonFormChangeAbAttr, p => p.level < 20 || p.getHpRatio() <= 0.25 ? 0 : 1) @@ -5480,9 +5475,9 @@ export function initAbilities() { .attr(FieldPriorityMoveImmunityAbAttr) .ignorable(), new Ability(Abilities.SOUL_HEART, 7) - .attr(PostKnockOutStatChangeAbAttr, BattleStat.SPATK, 1), + .attr(PostKnockOutStatStageChangeAbAttr, Stat.SPATK, 1), new Ability(Abilities.TANGLING_HAIR, 7) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), BattleStat.SPD, -1, false), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), Stat.SPD, -1, false), new Ability(Abilities.RECEIVER, 7) .attr(CopyFaintedAllyAbilityAbAttr) .attr(UncopiableAbilityAbAttr), @@ -5490,18 +5485,17 @@ export function initAbilities() { .attr(CopyFaintedAllyAbilityAbAttr) .attr(UncopiableAbilityAbAttr), new Ability(Abilities.BEAST_BOOST, 7) - .attr(PostVictoryStatChangeAbAttr, p => { - const battleStats = Utils.getEnumValues(BattleStat).slice(0, -3).map(s => s as BattleStat); - let highestBattleStat = 0; - let highestBattleStatIndex = 0; - battleStats.map((bs: BattleStat, i: integer) => { - const stat = p.getStat(bs + 1); - if (stat > highestBattleStat) { - highestBattleStatIndex = i; - highestBattleStat = stat; + .attr(PostVictoryStatStageChangeAbAttr, p => { + let highestStat: EffectiveStat; + let highestValue = 0; + for (const s of EFFECTIVE_STATS) { + const value = p.getStat(s, false); + if (value > highestValue) { + highestStat = s; + highestValue = value; } - }); - return highestBattleStatIndex; + } + return highestStat!; }, 1), new Ability(Abilities.RKS_SYSTEM, 7) .attr(UncopiableAbilityAbAttr) @@ -5530,10 +5524,10 @@ export function initAbilities() { //@ts-ignore .attr(MovePowerBoostAbAttr, (user, target, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 1.25), // TODO: fix TS issues new Ability(Abilities.INTREPID_SWORD, 8) - .attr(PostSummonStatChangeAbAttr, BattleStat.ATK, 1, true) + .attr(PostSummonStatStageChangeAbAttr, [ Stat.ATK ], 1, true) .condition(getOncePerBattleCondition(Abilities.INTREPID_SWORD)), new Ability(Abilities.DAUNTLESS_SHIELD, 8) - .attr(PostSummonStatChangeAbAttr, BattleStat.DEF, 1, true) + .attr(PostSummonStatStageChangeAbAttr, [ Stat.DEF ], 1, true) .condition(getOncePerBattleCondition(Abilities.DAUNTLESS_SHIELD)), new Ability(Abilities.LIBERO, 8) .attr(PokemonTypeChangeAbAttr), @@ -5542,7 +5536,7 @@ export function initAbilities() { .attr(FetchBallAbAttr) .condition(getOncePerBattleCondition(Abilities.BALL_FETCH)), new Ability(Abilities.COTTON_DOWN, 8) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, BattleStat.SPD, -1, false, true) + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, Stat.SPD, -1, false, true) .bypassFaint(), new Ability(Abilities.PROPELLER_TAIL, 8) .attr(BlockRedirectAbAttr), @@ -5559,7 +5553,7 @@ export function initAbilities() { new Ability(Abilities.STALWART, 8) .attr(BlockRedirectAbAttr), new Ability(Abilities.STEAM_ENGINE, 8) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => (move.type === Type.FIRE || move.type === Type.WATER) && move.category !== MoveCategory.STATUS, BattleStat.SPD, 6), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => (move.type === Type.FIRE || move.type === Type.WATER) && move.category !== MoveCategory.STATUS, Stat.SPD, 6), new Ability(Abilities.PUNK_ROCK, 8) .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.SOUND_BASED), 1.3) .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.hasFlag(MoveFlags.SOUND_BASED), 0.5) @@ -5630,26 +5624,26 @@ export function initAbilities() { new Ability(Abilities.UNSEEN_FIST, 8) .attr(IgnoreProtectOnContactAbAttr), new Ability(Abilities.CURIOUS_MEDICINE, 8) - .attr(PostSummonClearAllyStatsAbAttr), + .attr(PostSummonClearAllyStatStagesAbAttr), new Ability(Abilities.TRANSISTOR, 8) .attr(MoveTypePowerBoostAbAttr, Type.ELECTRIC), new Ability(Abilities.DRAGONS_MAW, 8) .attr(MoveTypePowerBoostAbAttr, Type.DRAGON), new Ability(Abilities.CHILLING_NEIGH, 8) - .attr(PostVictoryStatChangeAbAttr, BattleStat.ATK, 1), + .attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1), new Ability(Abilities.GRIM_NEIGH, 8) - .attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1), + .attr(PostVictoryStatStageChangeAbAttr, Stat.SPATK, 1), new Ability(Abilities.AS_ONE_GLASTRIER, 8) .attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAsOneGlastrier", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })) .attr(PreventBerryUseAbAttr) - .attr(PostVictoryStatChangeAbAttr, BattleStat.ATK, 1) + .attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(UnsuppressableAbilityAbAttr), new Ability(Abilities.AS_ONE_SPECTRIER, 8) .attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAsOneSpectrier", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })) .attr(PreventBerryUseAbAttr) - .attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1) + .attr(PostVictoryStatStageChangeAbAttr, Stat.SPATK, 1) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(UnsuppressableAbilityAbAttr), @@ -5659,26 +5653,26 @@ export function initAbilities() { new Ability(Abilities.SEED_SOWER, 9) .attr(PostDefendTerrainChangeAbAttr, TerrainType.GRASSY), new Ability(Abilities.THERMAL_EXCHANGE, 9) - .attr(PostDefendStatChangeAbAttr, (target, user, move) => move.type === Type.FIRE && move.category !== MoveCategory.STATUS, BattleStat.ATK, 1) + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.type === Type.FIRE && move.category !== MoveCategory.STATUS, Stat.ATK, 1) .attr(StatusEffectImmunityAbAttr, StatusEffect.BURN) .ignorable(), new Ability(Abilities.ANGER_SHELL, 9) - .attr(PostDefendHpGatedStatChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [ BattleStat.ATK, BattleStat.SPATK, BattleStat.SPD ], 1) - .attr(PostDefendHpGatedStatChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [ BattleStat.DEF, BattleStat.SPDEF ], -1) + .attr(PostDefendHpGatedStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [ Stat.ATK, Stat.SPATK, Stat.SPD ], 1) + .attr(PostDefendHpGatedStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [ Stat.DEF, Stat.SPDEF ], -1) .condition(getSheerForceHitDisableAbCondition()), new Ability(Abilities.PURIFYING_SALT, 9) .attr(StatusEffectImmunityAbAttr) .attr(ReceivedTypeDamageMultiplierAbAttr, Type.GHOST, 0.5) .ignorable(), new Ability(Abilities.WELL_BAKED_BODY, 9) - .attr(TypeImmunityStatChangeAbAttr, Type.FIRE, BattleStat.DEF, 2) + .attr(TypeImmunityStatStageChangeAbAttr, Type.FIRE, Stat.DEF, 2) .ignorable(), new Ability(Abilities.WIND_RIDER, 9) - .attr(MoveImmunityStatChangeAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.hasFlag(MoveFlags.WIND_MOVE) && move.category !== MoveCategory.STATUS, BattleStat.ATK, 1) - .attr(PostSummonStatChangeOnArenaAbAttr, ArenaTagType.TAILWIND) + .attr(MoveImmunityStatStageChangeAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.hasFlag(MoveFlags.WIND_MOVE) && move.category !== MoveCategory.STATUS, Stat.ATK, 1) + .attr(PostSummonStatStageChangeOnArenaAbAttr, ArenaTagType.TAILWIND) .ignorable(), new Ability(Abilities.GUARD_DOG, 9) - .attr(PostIntimidateStatChangeAbAttr, [BattleStat.ATK], 1, true) + .attr(PostIntimidateStatStageChangeAbAttr, [Stat.ATK], 1, true) .attr(ForceSwitchOutImmunityAbAttr) .ignorable(), new Ability(Abilities.ROCKY_PAYLOAD, 9) @@ -5719,31 +5713,31 @@ export function initAbilities() { .ignorable() .partial(), new Ability(Abilities.VESSEL_OF_RUIN, 9) - .attr(FieldMultiplyBattleStatAbAttr, Stat.SPATK, 0.75) - .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonVesselOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: getStatName(Stat.SPATK) })) + .attr(FieldMultiplyStatAbAttr, Stat.SPATK, 0.75) + .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonVesselOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.SPATK)) })) .ignorable(), new Ability(Abilities.SWORD_OF_RUIN, 9) - .attr(FieldMultiplyBattleStatAbAttr, Stat.DEF, 0.75) - .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonSwordOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: getStatName(Stat.DEF) })) + .attr(FieldMultiplyStatAbAttr, Stat.DEF, 0.75) + .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonSwordOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.DEF)) })) .ignorable(), new Ability(Abilities.TABLETS_OF_RUIN, 9) - .attr(FieldMultiplyBattleStatAbAttr, Stat.ATK, 0.75) - .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonTabletsOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: getStatName(Stat.ATK) })) + .attr(FieldMultiplyStatAbAttr, Stat.ATK, 0.75) + .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonTabletsOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.ATK)) })) .ignorable(), new Ability(Abilities.BEADS_OF_RUIN, 9) - .attr(FieldMultiplyBattleStatAbAttr, Stat.SPDEF, 0.75) - .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonBeadsOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: getStatName(Stat.SPDEF) })) + .attr(FieldMultiplyStatAbAttr, Stat.SPDEF, 0.75) + .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonBeadsOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.SPDEF)) })) .ignorable(), new Ability(Abilities.ORICHALCUM_PULSE, 9) .attr(PostSummonWeatherChangeAbAttr, WeatherType.SUNNY) .attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.SUNNY) - .conditionalAttr(getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN), BattleStatMultiplierAbAttr, BattleStat.ATK, 4 / 3), + .conditionalAttr(getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.ATK, 4 / 3), new Ability(Abilities.HADRON_ENGINE, 9) .attr(PostSummonTerrainChangeAbAttr, TerrainType.ELECTRIC) .attr(PostBiomeChangeTerrainChangeAbAttr, TerrainType.ELECTRIC) - .conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), BattleStatMultiplierAbAttr, BattleStat.SPATK, 4 / 3), + .conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), StatMultiplierAbAttr, Stat.SPATK, 4 / 3), new Ability(Abilities.OPPORTUNIST, 9) - .attr(StatChangeCopyAbAttr), + .attr(StatStageChangeCopyAbAttr), new Ability(Abilities.CUD_CHEW, 9) .unimplemented(), new Ability(Abilities.SHARPNESS, 9) @@ -5769,11 +5763,11 @@ export function initAbilities() { .attr(MoveAbilityBypassAbAttr, (pokemon, move: Move) => move.category === MoveCategory.STATUS), new Ability(Abilities.MINDS_EYE, 9) .attr(IgnoreTypeImmunityAbAttr, Type.GHOST, [Type.NORMAL, Type.FIGHTING]) - .attr(ProtectStatAbAttr, BattleStat.ACC) - .attr(IgnoreOpponentEvasionAbAttr) + .attr(ProtectStatAbAttr, Stat.ACC) + .attr(IgnoreOpponentStatStagesAbAttr, [ Stat.EVA ]) .ignorable(), new Ability(Abilities.SUPERSWEET_SYRUP, 9) - .attr(PostSummonStatChangeAbAttr, BattleStat.EVA, -1) + .attr(PostSummonStatStageChangeAbAttr, [ Stat.EVA ], -1) .condition(getOncePerBattleCondition(Abilities.SUPERSWEET_SYRUP)), new Ability(Abilities.HOSPITALITY, 9) .attr(PostSummonAllyHealAbAttr, 4, true) @@ -5781,25 +5775,25 @@ export function initAbilities() { new Ability(Abilities.TOXIC_CHAIN, 9) .attr(PostAttackApplyStatusEffectAbAttr, false, 30, StatusEffect.TOXIC), new Ability(Abilities.EMBODY_ASPECT_TEAL, 9) - .attr(PostBattleInitStatChangeAbAttr, BattleStat.SPD, 1, true) + .attr(PostBattleInitStatStageChangeAbAttr, [ Stat.SPD ], 1, true) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(NoTransformAbilityAbAttr) .partial(), new Ability(Abilities.EMBODY_ASPECT_WELLSPRING, 9) - .attr(PostBattleInitStatChangeAbAttr, BattleStat.SPDEF, 1, true) + .attr(PostBattleInitStatStageChangeAbAttr, [ Stat.SPDEF ], 1, true) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(NoTransformAbilityAbAttr) .partial(), new Ability(Abilities.EMBODY_ASPECT_HEARTHFLAME, 9) - .attr(PostBattleInitStatChangeAbAttr, BattleStat.ATK, 1, true) + .attr(PostBattleInitStatStageChangeAbAttr, [ Stat.ATK ], 1, true) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(NoTransformAbilityAbAttr) .partial(), new Ability(Abilities.EMBODY_ASPECT_CORNERSTONE, 9) - .attr(PostBattleInitStatChangeAbAttr, BattleStat.DEF, 1, true) + .attr(PostBattleInitStatStageChangeAbAttr, [ Stat.DEF ], 1, true) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(NoTransformAbilityAbAttr) diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index 09cc7a5b97c..fdc32b75c19 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -7,17 +7,17 @@ import Pokemon, { HitResult, PokemonMove } from "../field/pokemon"; import { StatusEffect } from "./status-effect"; import { BattlerIndex } from "../battle"; import { BlockNonDirectDamageAbAttr, ChangeMovePriorityAbAttr, ProtectStatAbAttr, applyAbAttrs } from "./ability"; -import { BattleStat } from "./battle-stat"; +import { Stat } from "#enums/stat"; import { CommonAnim, CommonBattleAnim } from "./battle-anims"; import i18next from "i18next"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase.js"; -import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase.js"; -import { ShowAbilityPhase } from "#app/phases/show-ability-phase.js"; -import { StatChangePhase } from "#app/phases/stat-change-phase.js"; +import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; +import { ShowAbilityPhase } from "#app/phases/show-ability-phase"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; export enum ArenaTagSide { BOTH, @@ -786,8 +786,8 @@ class StickyWebTag extends ArenaTrapTag { applyAbAttrs(ProtectStatAbAttr, pokemon, cancelled); if (!cancelled.value) { pokemon.scene.queueMessage(i18next.t("arenaTag:stickyWebActivateTrap", { pokemonName: pokemon.getNameToRender() })); - const statLevels = new Utils.NumberHolder(-1); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, [BattleStat.SPD], statLevels.value)); + const stages = new Utils.NumberHolder(-1); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, [ Stat.SPD ], stages.value)); } } @@ -875,7 +875,7 @@ class TailwindTag extends ArenaTag { // Raise attack by one stage if party member has WIND_RIDER ability if (pokemon.hasAbility(Abilities.WIND_RIDER)) { pokemon.scene.unshiftPhase(new ShowAbilityPhase(pokemon.scene, pokemon.getBattlerIndex())); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.ATK], 1, true)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ Stat.ATK ], 1, true)); } } } diff --git a/src/data/battle-stat.ts b/src/data/battle-stat.ts deleted file mode 100644 index a0cb7ca88e1..00000000000 --- a/src/data/battle-stat.ts +++ /dev/null @@ -1,71 +0,0 @@ -import i18next, { ParseKeys } from "i18next"; - -export enum BattleStat { - ATK, - DEF, - SPATK, - SPDEF, - SPD, - ACC, - EVA, - RAND, - HP -} - -export function getBattleStatName(stat: BattleStat) { - switch (stat) { - case BattleStat.ATK: - return i18next.t("pokemonInfo:Stat.ATK"); - case BattleStat.DEF: - return i18next.t("pokemonInfo:Stat.DEF"); - case BattleStat.SPATK: - return i18next.t("pokemonInfo:Stat.SPATK"); - case BattleStat.SPDEF: - return i18next.t("pokemonInfo:Stat.SPDEF"); - case BattleStat.SPD: - return i18next.t("pokemonInfo:Stat.SPD"); - case BattleStat.ACC: - return i18next.t("pokemonInfo:Stat.ACC"); - case BattleStat.EVA: - return i18next.t("pokemonInfo:Stat.EVA"); - case BattleStat.HP: - return i18next.t("pokemonInfo:Stat.HPStat"); - default: - return "???"; - } -} - -export function getBattleStatLevelChangeDescription(pokemonNameWithAffix: string, stats: string, levels: integer, up: boolean, count: number = 1) { - const stringKey = (() => { - if (up) { - switch (levels) { - case 1: - return "battle:statRose"; - case 2: - return "battle:statSharplyRose"; - case 3: - case 4: - case 5: - case 6: - return "battle:statRoseDrastically"; - default: - return "battle:statWontGoAnyHigher"; - } - } else { - switch (levels) { - case 1: - return "battle:statFell"; - case 2: - return "battle:statHarshlyFell"; - case 3: - case 4: - case 5: - case 6: - return "battle:statSeverelyFell"; - default: - return "battle:statWontGoAnyLower"; - } - } - })(); - return i18next.t(stringKey as ParseKeys, { pokemonNameWithAffix, stats, count }); -} diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 92df6fc294f..6e53ef00f45 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1,7 +1,6 @@ import { ChargeAnim, CommonAnim, CommonBattleAnim, MoveChargeAnim } from "./battle-anims"; import { getPokemonNameWithAffix } from "../messages"; import Pokemon, { MoveResult, HitResult } from "../field/pokemon"; -import { Stat, getStatName } from "./pokemon-stat"; import { StatusEffect } from "./status-effect"; import * as Utils from "../utils"; import { ChargeAttr, MoveFlags, allMoves } from "./move"; @@ -9,20 +8,20 @@ import { Type } from "./type"; import { BlockNonDirectDamageAbAttr, FlinchEffectAbAttr, ReverseDrainAbAttr, applyAbAttrs } from "./ability"; import { TerrainType } from "./terrain"; import { WeatherType } from "./weather"; -import { BattleStat } from "./battle-stat"; import { allAbilities } from "./ability"; import { SpeciesFormChangeManualTrigger } from "./pokemon-forms"; import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import i18next from "#app/plugins/i18n.js"; -import { CommonAnimPhase } from "#app/phases/common-anim-phase.js"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase.js"; -import { MovePhase } from "#app/phases/move-phase.js"; -import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase.js"; -import { ShowAbilityPhase } from "#app/phases/show-ability-phase.js"; -import { StatChangePhase, StatChangeCallback } from "#app/phases/stat-change-phase.js"; +import i18next from "#app/plugins/i18n"; +import { Stat, type BattleStat, type EffectiveStat, EFFECTIVE_STATS, getStatKey } from "#app/enums/stat"; +import { CommonAnimPhase } from "#app/phases/common-anim-phase"; +import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { MovePhase } from "#app/phases/move-phase"; +import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; +import { ShowAbilityPhase } from "#app/phases/show-ability-phase"; +import { StatStageChangePhase, StatStageChangeCallback } from "#app/phases/stat-stage-change-phase"; export enum BattlerTagLapseType { FAINT, @@ -362,8 +361,8 @@ export class ConfusedTag extends BattlerTag { // 1/3 chance of hitting self with a 40 base power move if (pokemon.randSeedInt(3) === 0) { - const atk = pokemon.getBattleStat(Stat.ATK); - const def = pokemon.getBattleStat(Stat.DEF); + const atk = pokemon.getEffectiveStat(Stat.ATK); + const def = pokemon.getEffectiveStat(Stat.DEF); const damage = Utils.toDmgValue(((((2 * pokemon.level / 5 + 2) * 40 * atk / def) / 50) + 2) * (pokemon.randSeedInt(15, 85) / 100)); pokemon.scene.queueMessage(i18next.t("battlerTags:confusedLapseHurtItself")); pokemon.damageAndUpdate(damage); @@ -767,7 +766,7 @@ export class OctolockTag extends TrappedTag { const shouldLapse = lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); if (shouldLapse) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, [BattleStat.DEF, BattleStat.SPDEF], -1)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, [ Stat.DEF, Stat.SPDEF ], -1)); return true; } @@ -1093,7 +1092,7 @@ export class ContactDamageProtectedTag extends ProtectedTag { } } -export class ContactStatChangeProtectedTag extends ProtectedTag { +export class ContactStatStageChangeProtectedTag extends ProtectedTag { private stat: BattleStat; private levels: number; @@ -1110,7 +1109,7 @@ export class ContactStatChangeProtectedTag extends ProtectedTag { */ loadTag(source: BattlerTag | any): void { super.loadTag(source); - this.stat = source.stat as BattleStat; + this.stat = source.stat; this.levels = source.levels; } @@ -1121,7 +1120,7 @@ export class ContactStatChangeProtectedTag extends ProtectedTag { const effectPhase = pokemon.scene.getCurrentPhase(); if (effectPhase instanceof MoveEffectPhase && effectPhase.move.getMove().hasFlag(MoveFlags.MAKES_CONTACT)) { const attacker = effectPhase.getPokemon(); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, attacker.getBattlerIndex(), true, [ this.stat ], this.levels)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, attacker.getBattlerIndex(), true, [ this.stat ], this.levels)); } } @@ -1348,11 +1347,10 @@ export class HighestStatBoostTag extends AbilityBattlerTag { onAdd(pokemon: Pokemon): void { super.onAdd(pokemon); - const stats = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ]; - let highestStat: Stat; - stats.map(s => pokemon.getBattleStat(s)).reduce((highestValue: number, value: number, i: number) => { + let highestStat: EffectiveStat; + EFFECTIVE_STATS.map(s => pokemon.getEffectiveStat(s)).reduce((highestValue: number, value: number, i: number) => { if (value > highestValue) { - highestStat = stats[i]; + highestStat = EFFECTIVE_STATS[i]; return value; } return highestValue; @@ -1370,7 +1368,7 @@ export class HighestStatBoostTag extends AbilityBattlerTag { break; } - pokemon.scene.queueMessage(i18next.t("battlerTags:highestStatBoostOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), statName: getStatName(highestStat) }), null, false, null, true); + pokemon.scene.queueMessage(i18next.t("battlerTags:highestStatBoostOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), statName: i18next.t(getStatKey(highestStat)) }), null, false, null, true); } onRemove(pokemon: Pokemon): void { @@ -1714,25 +1712,25 @@ export class IceFaceBlockDamageTag extends FormBlockDamageTag { */ export class StockpilingTag extends BattlerTag { public stockpiledCount: number = 0; - public statChangeCounts: { [BattleStat.DEF]: number; [BattleStat.SPDEF]: number } = { - [BattleStat.DEF]: 0, - [BattleStat.SPDEF]: 0 + public statChangeCounts: { [Stat.DEF]: number; [Stat.SPDEF]: number } = { + [Stat.DEF]: 0, + [Stat.SPDEF]: 0 }; constructor(sourceMove: Moves = Moves.NONE) { super(BattlerTagType.STOCKPILING, BattlerTagLapseType.CUSTOM, 1, sourceMove); } - private onStatsChanged: StatChangeCallback = (_, statsChanged, statChanges) => { - const defChange = statChanges[statsChanged.indexOf(BattleStat.DEF)] ?? 0; - const spDefChange = statChanges[statsChanged.indexOf(BattleStat.SPDEF)] ?? 0; + private onStatStagesChanged: StatStageChangeCallback = (_, statsChanged, statChanges) => { + const defChange = statChanges[statsChanged.indexOf(Stat.DEF)] ?? 0; + const spDefChange = statChanges[statsChanged.indexOf(Stat.SPDEF)] ?? 0; if (defChange) { - this.statChangeCounts[BattleStat.DEF]++; + this.statChangeCounts[Stat.DEF]++; } if (spDefChange) { - this.statChangeCounts[BattleStat.SPDEF]++; + this.statChangeCounts[Stat.SPDEF]++; } }; @@ -1740,8 +1738,8 @@ export class StockpilingTag extends BattlerTag { super.loadTag(source); this.stockpiledCount = source.stockpiledCount || 0; this.statChangeCounts = { - [ BattleStat.DEF ]: source.statChangeCounts?.[ BattleStat.DEF ] ?? 0, - [ BattleStat.SPDEF ]: source.statChangeCounts?.[ BattleStat.SPDEF ] ?? 0, + [ Stat.DEF ]: source.statChangeCounts?.[ Stat.DEF ] ?? 0, + [ Stat.SPDEF ]: source.statChangeCounts?.[ Stat.SPDEF ] ?? 0, }; } @@ -1761,9 +1759,9 @@ export class StockpilingTag extends BattlerTag { })); // Attempt to increase DEF and SPDEF by one stage, keeping track of successful changes. - pokemon.scene.unshiftPhase(new StatChangePhase( + pokemon.scene.unshiftPhase(new StatStageChangePhase( pokemon.scene, pokemon.getBattlerIndex(), true, - [BattleStat.SPDEF, BattleStat.DEF], 1, true, false, true, this.onStatsChanged + [Stat.SPDEF, Stat.DEF], 1, true, false, true, this.onStatStagesChanged )); } } @@ -1777,15 +1775,15 @@ export class StockpilingTag extends BattlerTag { * one stage for each stack which had successfully changed that particular stat during onAdd. */ onRemove(pokemon: Pokemon): void { - const defChange = this.statChangeCounts[BattleStat.DEF]; - const spDefChange = this.statChangeCounts[BattleStat.SPDEF]; + const defChange = this.statChangeCounts[Stat.DEF]; + const spDefChange = this.statChangeCounts[Stat.SPDEF]; if (defChange) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.DEF], -defChange, true, false, true)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ Stat.DEF ], -defChange, true, false, true)); } if (spDefChange) { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.SPDEF], -spDefChange, true, false, true)); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ Stat.SPDEF ], -spDefChange, true, false, true)); } } } @@ -1927,11 +1925,11 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source case BattlerTagType.SPIKY_SHIELD: return new ContactDamageProtectedTag(sourceMove, 8); case BattlerTagType.KINGS_SHIELD: - return new ContactStatChangeProtectedTag(sourceMove, tagType, BattleStat.ATK, -1); + return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.ATK, -1); case BattlerTagType.OBSTRUCT: - return new ContactStatChangeProtectedTag(sourceMove, tagType, BattleStat.DEF, -2); + return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.DEF, -2); case BattlerTagType.SILK_TRAP: - return new ContactStatChangeProtectedTag(sourceMove, tagType, BattleStat.SPD, -1); + return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.SPD, -1); case BattlerTagType.BANEFUL_BUNKER: return new ContactPoisonProtectedTag(sourceMove); case BattlerTagType.BURNING_BULWARK: diff --git a/src/data/berry.ts b/src/data/berry.ts index d0c9c311e16..01325ee39dd 100644 --- a/src/data/berry.ts +++ b/src/data/berry.ts @@ -1,14 +1,14 @@ import { getPokemonNameWithAffix } from "../messages"; import Pokemon, { HitResult } from "../field/pokemon"; -import { BattleStat } from "./battle-stat"; import { getStatusEffectHealText } from "./status-effect"; import * as Utils from "../utils"; import { DoubleBerryEffectAbAttr, ReduceBerryUseThresholdAbAttr, applyAbAttrs } from "./ability"; import i18next from "i18next"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; -import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase.js"; -import { StatChangePhase } from "#app/phases/stat-change-phase.js"; +import { Stat, type BattleStat } from "#app/enums/stat"; +import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; export function getBerryName(berryType: BerryType): string { return i18next.t(`berry:${BerryType[berryType]}.name`); @@ -35,9 +35,10 @@ export function getBerryPredicate(berryType: BerryType): BerryPredicate { case BerryType.SALAC: return (pokemon: Pokemon) => { const threshold = new Utils.NumberHolder(0.25); - const battleStat = (berryType - BerryType.LIECHI) as BattleStat; + // Offset BerryType such that LIECHI -> Stat.ATK = 1, GANLON -> Stat.DEF = 2, so on and so forth + const stat: BattleStat = berryType - BerryType.ENIGMA; applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold); - return pokemon.getHpRatio() < threshold.value && pokemon.summonData.battleStats[battleStat] < 6; + return pokemon.getHpRatio() < threshold.value && pokemon.getStatStage(stat) < 6; }; case BerryType.LANSAT: return (pokemon: Pokemon) => { @@ -95,10 +96,11 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { if (pokemon.battleData) { pokemon.battleData.berriesEaten.push(berryType); } - const battleStat = (berryType - BerryType.LIECHI) as BattleStat; - const statLevels = new Utils.NumberHolder(1); - applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, statLevels); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ battleStat ], statLevels.value)); + // Offset BerryType such that LIECHI -> Stat.ATK = 1, GANLON -> Stat.DEF = 2, so on and so forth + const stat: BattleStat = berryType - BerryType.ENIGMA; + const statStages = new Utils.NumberHolder(1); + applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, statStages); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], statStages.value)); }; case BerryType.LANSAT: return (pokemon: Pokemon) => { @@ -112,9 +114,10 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { if (pokemon.battleData) { pokemon.battleData.berriesEaten.push(berryType); } - const statLevels = new Utils.NumberHolder(2); - applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, statLevels); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ BattleStat.RAND ], statLevels.value)); + const randStat = Utils.randSeedInt(Stat.SPD, Stat.ATK); + const stages = new Utils.NumberHolder(2); + applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, stages); + pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ randStat ], stages.value)); }; case BerryType.LEPPA: return (pokemon: Pokemon) => { diff --git a/src/data/move.ts b/src/data/move.ts index 1dc715f264a..bcdb16cdfbc 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1,5 +1,4 @@ import { ChargeAnim, MoveChargeAnim, initMoveAnim, loadMoveAnimAssets } from "./battle-anims"; -import { BattleStat, getBattleStatName } from "./battle-stat"; import { EncoreTag, GulpMissileTag, HelpingHandTag, SemiInvulnerableTag, ShellTrapTag, StockpilingTag, TrappedTag, TypeBoostTag } from "./battler-tags"; import { getPokemonNameWithAffix } from "../messages"; import Pokemon, { AttackMoveResult, EnemyPokemon, HitResult, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../field/pokemon"; @@ -13,7 +12,6 @@ import { UnswappableAbilityAbAttr, UncopiableAbilityAbAttr, UnsuppressableAbilit import { allAbilities } from "./ability"; import { PokemonHeldItemModifier, BerryModifier, PreserveBerryModifier, PokemonMoveAccuracyBoosterModifier, AttackTypeBoosterModifier, PokemonMultiHitModifier } from "../modifier/modifier"; import { BattlerIndex, BattleType } from "../battle"; -import { Stat } from "./pokemon-stat"; import { TerrainType } from "./terrain"; import { ModifierPoolType } from "#app/modifier/modifier-type"; import { Command } from "../ui/command-ui-handler"; @@ -27,13 +25,14 @@ import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { MoveUsedEvent } from "#app/events/battle-scene"; +import { Stat, type BattleStat, type EffectiveStat, BATTLE_STATS, EFFECTIVE_STATS, getStatKey } from "#app/enums/stat"; import { PartyStatusCurePhase } from "#app/phases/party-status-cure-phase"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MovePhase } from "#app/phases/move-phase"; import { NewBattlePhase } from "#app/phases/new-battle-phase"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; -import { StatChangePhase } from "#app/phases/stat-change-phase"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { SwitchPhase } from "#app/phases/switch-phase"; import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; import { SpeciesFormChangeRevertWeatherFormTrigger } from "./pokemon-forms"; @@ -819,10 +818,10 @@ export class AttackMove extends Move { attackScore = Math.pow(effectiveness - 1, 2) * effectiveness < 1 ? -2 : 2; if (attackScore) { if (this.category === MoveCategory.PHYSICAL) { - const atk = new Utils.IntegerHolder(user.getBattleStat(Stat.ATK, target)); + const atk = new Utils.IntegerHolder(user.getEffectiveStat(Stat.ATK, target)); applyMoveAttrs(VariableAtkAttr, user, target, move, atk); - if (atk.value > user.getBattleStat(Stat.SPATK, target)) { - const statRatio = user.getBattleStat(Stat.SPATK, target) / atk.value; + if (atk.value > user.getEffectiveStat(Stat.SPATK, target)) { + const statRatio = user.getEffectiveStat(Stat.SPATK, target) / atk.value; if (statRatio <= 0.75) { attackScore *= 2; } else if (statRatio <= 0.875) { @@ -830,10 +829,10 @@ export class AttackMove extends Move { } } } else { - const spAtk = new Utils.IntegerHolder(user.getBattleStat(Stat.SPATK, target)); + const spAtk = new Utils.IntegerHolder(user.getEffectiveStat(Stat.SPATK, target)); applyMoveAttrs(VariableAtkAttr, user, target, move, spAtk); - if (spAtk.value > user.getBattleStat(Stat.ATK, target)) { - const statRatio = user.getBattleStat(Stat.ATK, target) / spAtk.value; + if (spAtk.value > user.getEffectiveStat(Stat.ATK, target)) { + const statRatio = user.getEffectiveStat(Stat.ATK, target) / spAtk.value; if (statRatio <= 0.75) { attackScore *= 2; } else if (statRatio <= 0.875) { @@ -1100,9 +1099,9 @@ export class PreMoveMessageAttr extends MoveAttr { */ export class RespectAttackTypeImmunityAttr extends MoveAttr { } -export class IgnoreOpponentStatChangesAttr extends MoveAttr { +export class IgnoreOpponentStatStagesAttr extends MoveAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - (args[0] as Utils.IntegerHolder).value = 0; + (args[0] as Utils.BooleanHolder).value = true; return true; } @@ -1730,10 +1729,9 @@ export class HealOnAllyAttr extends HealAttr { */ export class HitHealAttr extends MoveEffectAttr { private healRatio: number; - private message: string; - private healStat: Stat | null; + private healStat: EffectiveStat | null; - constructor(healRatio?: number | null, healStat?: Stat) { + constructor(healRatio?: number | null, healStat?: EffectiveStat) { super(true, MoveEffectTrigger.HIT); this.healRatio = healRatio ?? 0.5; @@ -1755,7 +1753,7 @@ export class HitHealAttr extends MoveEffectAttr { const reverseDrain = target.hasAbilityWithAttr(ReverseDrainAbAttr, false); if (this.healStat !== null) { // Strength Sap formula - healAmount = target.getBattleStat(this.healStat); + healAmount = target.getEffectiveStat(this.healStat); message = i18next.t("battle:drainMessage", {pokemonName: getPokemonNameWithAffix(target)}); } else { // Default healing formula used by draining moves like Absorb, Draining Kiss, Bitter Blade, etc. @@ -1785,7 +1783,7 @@ export class HitHealAttr extends MoveEffectAttr { */ getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { if (this.healStat) { - const healAmount = target.getBattleStat(this.healStat); + const healAmount = target.getEffectiveStat(this.healStat); return Math.floor(Math.max(0, (Math.min(1, (healAmount+user.hp)/user.getMaxHp() - 0.33))) / user.getHpRatio()); } return Math.floor(Math.max((1 - user.getHpRatio()) - 0.33, 0) * (move.power / 4)); @@ -2516,14 +2514,14 @@ export class ElectroShotChargeAttr extends ChargeAttr { const weatherType = user.scene.arena.weather?.weatherType; if (!user.scene.arena.weather?.isEffectSuppressed(user.scene) && (weatherType === WeatherType.RAIN || weatherType === WeatherType.HEAVY_RAIN)) { // Apply the SPATK increase every call when used in the rain - const statChangeAttr = new StatChangeAttr(BattleStat.SPATK, 1, true); + const statChangeAttr = new StatStageChangeAttr([ Stat.SPATK ], 1, true); statChangeAttr.apply(user, target, move, args); // After the SPATK is raised, execute the move resolution e.g. deal damage resolve(false); } else { if (!this.statIncreaseApplied) { // Apply the SPATK increase only if it hasn't been applied before e.g. on the first turn charge up animation - const statChangeAttr = new StatChangeAttr(BattleStat.SPATK, 1, true); + const statChangeAttr = new StatStageChangeAttr([ Stat.SPATK ], 1, true); statChangeAttr.apply(user, target, move, args); // Set the flag to true so that on the following turn it doesn't raise SPATK a second time this.statIncreaseApplied = true; @@ -2571,18 +2569,16 @@ export class DelayedAttackAttr extends OverrideMoveEffectAttr { } } -export class StatChangeAttr extends MoveEffectAttr { +export class StatStageChangeAttr extends MoveEffectAttr { public stats: BattleStat[]; - public levels: integer; + public stages: integer; private condition: MoveConditionFunc | null; private showMessage: boolean; - constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, condition?: MoveConditionFunc | null, showMessage: boolean = true, firstHitOnly: boolean = false, moveEffectTrigger: MoveEffectTrigger = MoveEffectTrigger.HIT, firstTargetOnly: boolean = false) { + constructor(stats: BattleStat[], stages: integer, selfTarget?: boolean, condition?: MoveConditionFunc | null, showMessage: boolean = true, firstHitOnly: boolean = false, moveEffectTrigger: MoveEffectTrigger = MoveEffectTrigger.HIT, firstTargetOnly: boolean = false) { super(selfTarget, moveEffectTrigger, firstHitOnly, false, firstTargetOnly); - this.stats = typeof(stats) === "number" - ? [ stats as BattleStat ] - : stats as BattleStat[]; - this.levels = levels; + this.stats = stats; + this.stages = stages; this.condition = condition!; // TODO: is this bang correct? this.showMessage = showMessage; } @@ -2594,8 +2590,8 @@ export class StatChangeAttr extends MoveEffectAttr { const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true); if (moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance) { - const levels = this.getLevels(user); - user.scene.unshiftPhase(new StatChangePhase(user.scene, (this.selfTarget ? user : target).getBattlerIndex(), this.selfTarget, this.stats, levels, this.showMessage)); + const stages = this.getLevels(user); + user.scene.unshiftPhase(new StatStageChangePhase(user.scene, (this.selfTarget ? user : target).getBattlerIndex(), this.selfTarget, this.stats, stages, this.showMessage)); return true; } @@ -2603,7 +2599,7 @@ export class StatChangeAttr extends MoveEffectAttr { } getLevels(_user: Pokemon): integer { - return this.levels; + return this.stages; } getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { @@ -2611,29 +2607,30 @@ export class StatChangeAttr extends MoveEffectAttr { const moveLevels = this.getLevels(user); for (const stat of this.stats) { let levels = moveLevels; + const statStage = target.getStatStage(stat); if (levels > 0) { - levels = Math.min(target.summonData.battleStats[stat] + levels, 6) - target.summonData.battleStats[stat]; + levels = Math.min(statStage + levels, 6) - statStage; } else { - levels = Math.max(target.summonData.battleStats[stat] + levels, -6) - target.summonData.battleStats[stat]; + levels = Math.max(statStage + levels, -6) - statStage; } let noEffect = false; switch (stat) { - case BattleStat.ATK: + case Stat.ATK: if (this.selfTarget) { noEffect = !user.getMoveset().find(m => m instanceof AttackMove && m.category === MoveCategory.PHYSICAL); } break; - case BattleStat.DEF: + case Stat.DEF: if (!this.selfTarget) { noEffect = !user.getMoveset().find(m => m instanceof AttackMove && m.category === MoveCategory.PHYSICAL); } break; - case BattleStat.SPATK: + case Stat.SPATK: if (this.selfTarget) { noEffect = !user.getMoveset().find(m => m instanceof AttackMove && m.category === MoveCategory.SPECIAL); } break; - case BattleStat.SPDEF: + case Stat.SPDEF: if (!this.selfTarget) { noEffect = !user.getMoveset().find(m => m instanceof AttackMove && m.category === MoveCategory.SPECIAL); } @@ -2648,18 +2645,16 @@ export class StatChangeAttr extends MoveEffectAttr { } } -export class PostVictoryStatChangeAttr extends MoveAttr { +export class PostVictoryStatStageChangeAttr extends MoveAttr { private stats: BattleStat[]; - private levels: integer; + private stages: number; private condition: MoveConditionFunc | null; private showMessage: boolean; - constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, condition?: MoveConditionFunc, showMessage: boolean = true, firstHitOnly: boolean = false) { + constructor(stats: BattleStat[], stages: number, selfTarget?: boolean, condition?: MoveConditionFunc, showMessage: boolean = true, firstHitOnly: boolean = false) { super(); - this.stats = typeof(stats) === "number" - ? [ stats as BattleStat ] - : stats as BattleStat[]; - this.levels = levels; + this.stats = stats; + this.stages = stages; this.condition = condition!; // TODO: is this bang correct? this.showMessage = showMessage; } @@ -2667,49 +2662,48 @@ export class PostVictoryStatChangeAttr extends MoveAttr { if (this.condition && !this.condition(user, target, move)) { return; } - const statChangeAttr = new StatChangeAttr(this.stats, this.levels, this.showMessage); + const statChangeAttr = new StatStageChangeAttr(this.stats, this.stages, this.showMessage); statChangeAttr.apply(user, target, move); } } -export class AcupressureStatChangeAttr extends MoveEffectAttr { +export class AcupressureStatStageChangeAttr extends MoveEffectAttr { constructor() { super(); } apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise { - let randStats = [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD, BattleStat.ACC, BattleStat.EVA ]; - randStats = randStats.filter(s => target.summonData.battleStats[s] < 6); + const randStats = BATTLE_STATS.filter(s => target.getStatStage(s) < 6); if (randStats.length > 0) { const boostStat = [randStats[Utils.randInt(randStats.length)]]; - user.scene.unshiftPhase(new StatChangePhase(user.scene, target.getBattlerIndex(), this.selfTarget, boostStat, 2)); + user.scene.unshiftPhase(new StatStageChangePhase(user.scene, target.getBattlerIndex(), this.selfTarget, boostStat, 2)); return true; } return false; } } -export class GrowthStatChangeAttr extends StatChangeAttr { +export class GrowthStatStageChangeAttr extends StatStageChangeAttr { constructor() { - super([ BattleStat.ATK, BattleStat.SPATK ], 1, true); + super([ Stat.ATK, Stat.SPATK ], 1, true); } getLevels(user: Pokemon): number { if (!user.scene.arena.weather?.isEffectSuppressed(user.scene)) { const weatherType = user.scene.arena.weather?.weatherType; if (weatherType === WeatherType.SUNNY || weatherType === WeatherType.HARSH_SUN) { - return this.levels + 1; + return this.stages + 1; } } - return this.levels; + return this.stages; } } -export class CutHpStatBoostAttr extends StatChangeAttr { +export class CutHpStatStageBoostAttr extends StatStageChangeAttr { private cutRatio: integer; private messageCallback: ((user: Pokemon) => void) | undefined; - constructor(stat: BattleStat | BattleStat[], levels: integer, cutRatio: integer, messageCallback?: ((user: Pokemon) => void) | undefined) { + constructor(stat: BattleStat[], levels: integer, cutRatio: integer, messageCallback?: ((user: Pokemon) => void) | undefined) { super(stat, levels, true, null, true); this.cutRatio = cutRatio; @@ -2730,7 +2724,7 @@ export class CutHpStatBoostAttr extends StatChangeAttr { } getCondition(): MoveConditionFunc { - return (user, target, move) => user.getHpRatio() > 1 / this.cutRatio && this.stats.some(s => user.summonData.battleStats[s] < 6); + return (user, _target, _move) => user.getHpRatio() > 1 / this.cutRatio && this.stats.some(s => user.getStatStage(s) < 6); } } @@ -2740,9 +2734,11 @@ export class CopyStatsAttr extends MoveEffectAttr { return false; } - for (let s = 0; s < target.summonData.battleStats.length; s++) { - user.summonData.battleStats[s] = target.summonData.battleStats[s]; + // Copy all stat stages + for (const s of BATTLE_STATS) { + user.setStatStage(s, target.getStatStage(s)); } + if (target.getTag(BattlerTagType.CRIT_BOOST)) { user.addTag(BattlerTagType.CRIT_BOOST, 0, move.id); } else { @@ -2762,9 +2758,10 @@ export class InvertStatsAttr extends MoveEffectAttr { return false; } - for (let s = 0; s < target.summonData.battleStats.length; s++) { - target.summonData.battleStats[s] *= -1; + for (const s of BATTLE_STATS) { + target.setStatStage(s, -target.getStatStage(s)); } + target.updateInfo(); user.updateInfo(); @@ -2798,39 +2795,61 @@ export class ResetStatsAttr extends MoveEffectAttr { } resetStats(pokemon: Pokemon) { - for (let s = 0; s < pokemon.summonData.battleStats.length; s++) { - pokemon.summonData.battleStats[s] = 0; + for (const s of BATTLE_STATS) { + pokemon.setStatStage(s, 0); } pokemon.updateInfo(); } } /** - * Attribute used for moves which swap the user and the target's stat changes. + * Attribute used for status moves, specifically Heart, Guard, and Power Swap, + * that swaps the user's and target's corresponding stat stages. + * @extends MoveEffectAttr + * @see {@linkcode apply} */ -export class SwapStatsAttr extends MoveEffectAttr { +export class SwapStatStagesAttr extends MoveEffectAttr { + /** The stat stages to be swapped between the user and the target */ + private stats: readonly BattleStat[]; + + constructor(stats: readonly BattleStat[]) { + super(); + + this.stats = stats; + } + /** - * Swaps the user and the target's stat changes. - * @param user Pokemon that used the move - * @param target The target of the move - * @param move Move with this attribute + * For all {@linkcode stats}, swaps the user's and target's corresponding stat + * stage. + * @param user the {@linkcode Pokemon} that used the move + * @param target the {@linkcode Pokemon} that the move was used on + * @param move N/A * @param args N/A - * @returns true if the function succeeds + * @returns true if attribute application succeeds */ apply(user: Pokemon, target: Pokemon, move: Move, args: any []): boolean { - if (!super.apply(user, target, move, args)) { - return false; - } //Exits if the move can't apply - let priorBoost : integer; //For storing a stat boost - for (let s = 0; s < target.summonData.battleStats.length; s++) { - priorBoost = user.summonData.battleStats[s]; //Store user stat boost - user.summonData.battleStats[s] = target.summonData.battleStats[s]; //Applies target boost to self - target.summonData.battleStats[s] = priorBoost; //Applies stored boost to target + if (super.apply(user, target, move, args)) { + for (const s of BATTLE_STATS) { + const temp = user.getStatStage(s); + user.setStatStage(s, target.getStatStage(s)); + target.setStatStage(s, temp); + } + + target.updateInfo(); + user.updateInfo(); + + if (this.stats.length === 7) { + user.scene.queueMessage(i18next.t("moveTriggers:switchedStatChanges", { pokemonName: getPokemonNameWithAffix(user) })); + } else if (this.stats.length === 2) { + user.scene.queueMessage(i18next.t("moveTriggers:switchedTwoStatChanges", { + pokemonName: getPokemonNameWithAffix(user), + firstStat: i18next.t(getStatKey(this.stats[0])), + secondStat: i18next.t(getStatKey(this.stats[1])) + })); + } + return true; } - target.updateInfo(); - user.updateInfo(); - target.scene.queueMessage(i18next.t("moveTriggers:switchedStatChanges", {pokemonName: getPokemonNameWithAffix(user)})); - return true; + return false; } } @@ -3075,7 +3094,7 @@ export class WeightPowerAttr extends VariablePowerAttr { **/ export class ElectroBallPowerAttr extends VariablePowerAttr { /** - * Move that deals more damage the faster {@linkcode BattleStat.SPD} + * Move that deals more damage the faster {@linkcode Stat.SPD} * the user is compared to the target. * @param user Pokemon that used the move * @param target The target of the move @@ -3086,7 +3105,7 @@ export class ElectroBallPowerAttr extends VariablePowerAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const power = args[0] as Utils.NumberHolder; - const statRatio = target.getBattleStat(Stat.SPD) / user.getBattleStat(Stat.SPD); + const statRatio = target.getEffectiveStat(Stat.SPD) / user.getEffectiveStat(Stat.SPD); const statThresholds = [ 0.25, 1 / 3, 0.5, 1, -1 ]; const statThresholdPowers = [ 150, 120, 80, 60, 40 ]; @@ -3110,7 +3129,7 @@ export class ElectroBallPowerAttr extends VariablePowerAttr { **/ export class GyroBallPowerAttr extends VariablePowerAttr { /** - * Move that deals more damage the slower {@linkcode BattleStat.SPD} + * Move that deals more damage the slower {@linkcode Stat.SPD} * the user is compared to the target. * @param user Pokemon that used the move * @param target The target of the move @@ -3120,14 +3139,14 @@ export class GyroBallPowerAttr extends VariablePowerAttr { */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const power = args[0] as Utils.NumberHolder; - const userSpeed = user.getBattleStat(Stat.SPD); + const userSpeed = user.getEffectiveStat(Stat.SPD); if (userSpeed < 1) { // Gen 6+ always have 1 base power power.value = 1; return true; } - power.value = Math.floor(Math.min(150, 25 * target.getBattleStat(Stat.SPD) / userSpeed + 1)); + power.value = Math.floor(Math.min(150, 25 * target.getEffectiveStat(Stat.SPD) / userSpeed + 1)); return true; } } @@ -3347,18 +3366,18 @@ export class HitCountPowerAttr extends VariablePowerAttr { } /** - * Turning a once was (StatChangeCountPowerAttr) statement and making it available to call for any attribute. - * @param {Pokemon} pokemon The pokemon that is being used to calculate the count of positive stats - * @returns {number} Returns the amount of positive stats + * Tallies the number of positive stages for a given {@linkcode Pokemon}. + * @param pokemon The {@linkcode Pokemon} that is being used to calculate the count of positive stats + * @returns the amount of positive stats */ -const countPositiveStats = (pokemon: Pokemon): number => { - return pokemon.summonData.battleStats.reduce((total, stat) => (stat && stat > 0) ? total + stat : total, 0); +const countPositiveStatStages = (pokemon: Pokemon): number => { + return pokemon.getStatStages().reduce((total, stat) => (stat && stat > 0) ? total + stat : total, 0); }; /** - * Attribute that increases power based on the amount of positive stat increases. + * Attribute that increases power based on the amount of positive stat stage increases. */ -export class StatChangeCountPowerAttr extends VariablePowerAttr { +export class PositiveStatStagePowerAttr extends VariablePowerAttr { /** * @param {Pokemon} user The pokemon that is being used to calculate the amount of positive stats @@ -3368,9 +3387,9 @@ export class StatChangeCountPowerAttr extends VariablePowerAttr { * @returns {boolean} Returns true if attribute is applied */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - const positiveStats: number = countPositiveStats(user); + const positiveStatStages: number = countPositiveStatStages(user); - (args[0] as Utils.NumberHolder).value += positiveStats * 20; + (args[0] as Utils.NumberHolder).value += positiveStatStages * 20; return true; } } @@ -3392,10 +3411,10 @@ export class PunishmentPowerAttr extends VariablePowerAttr { * @returns Returns true if attribute is applied */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - const positiveStats: number = countPositiveStats(target); + const positiveStatStages: number = countPositiveStatStages(target); (args[0] as Utils.NumberHolder).value = Math.min( this.PUNISHMENT_MAX_BASE_POWER, - this.PUNISHMENT_MIN_BASE_POWER + positiveStats * 20 + this.PUNISHMENT_MIN_BASE_POWER + positiveStatStages * 20 ); return true; } @@ -3615,7 +3634,7 @@ export class TargetAtkUserAtkAttr extends VariableAtkAttr { super(); } apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - (args[0] as Utils.IntegerHolder).value = target.getBattleStat(Stat.ATK, target); + (args[0] as Utils.IntegerHolder).value = target.getEffectiveStat(Stat.ATK, target); return true; } } @@ -3626,7 +3645,7 @@ export class DefAtkAttr extends VariableAtkAttr { } apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - (args[0] as Utils.IntegerHolder).value = user.getBattleStat(Stat.DEF, target); + (args[0] as Utils.IntegerHolder).value = user.getEffectiveStat(Stat.DEF, target); return true; } } @@ -3648,7 +3667,7 @@ export class DefDefAttr extends VariableDefAttr { } apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - (args[0] as Utils.IntegerHolder).value = target.getBattleStat(Stat.DEF, user); + (args[0] as Utils.IntegerHolder).value = target.getEffectiveStat(Stat.DEF, user); return true; } } @@ -3770,7 +3789,7 @@ export class PhotonGeyserCategoryAttr extends VariableMoveCategoryAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const category = (args[0] as Utils.NumberHolder); - if (user.getBattleStat(Stat.ATK, target, move) > user.getBattleStat(Stat.SPATK, target, move)) { + if (user.getEffectiveStat(Stat.ATK, target, move) > user.getEffectiveStat(Stat.SPATK, target, move)) { category.value = MoveCategory.PHYSICAL; return true; } @@ -3783,7 +3802,7 @@ export class TeraBlastCategoryAttr extends VariableMoveCategoryAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const category = (args[0] as Utils.NumberHolder); - if (user.isTerastallized() && user.getBattleStat(Stat.ATK, target, move) > user.getBattleStat(Stat.SPATK, target, move)) { + if (user.isTerastallized() && user.getEffectiveStat(Stat.ATK, target, move) > user.getEffectiveStat(Stat.SPATK, target, move)) { category.value = MoveCategory.PHYSICAL; return true; } @@ -3847,8 +3866,8 @@ export class StatusCategoryOnAllyAttr extends VariableMoveCategoryAttr { export class ShellSideArmCategoryAttr extends VariableMoveCategoryAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const category = (args[0] as Utils.IntegerHolder); - const atkRatio = user.getBattleStat(Stat.ATK, target, move) / target.getBattleStat(Stat.DEF, user, move); - const specialRatio = user.getBattleStat(Stat.SPATK, target, move) / target.getBattleStat(Stat.SPDEF, user, move); + const atkRatio = user.getEffectiveStat(Stat.ATK, target, move) / target.getEffectiveStat(Stat.DEF, user, move); + const specialRatio = user.getEffectiveStat(Stat.SPATK, target, move) / target.getEffectiveStat(Stat.SPDEF, user, move); // Shell Side Arm is much more complicated than it looks, this is a partial implementation to try to achieve something similar to the games if (atkRatio > specialRatio) { @@ -4605,8 +4624,8 @@ export class CurseAttr extends MoveEffectAttr { target.addTag(BattlerTagType.CURSED, 0, move.id, user.id); return true; } else { - user.scene.unshiftPhase(new StatChangePhase(user.scene, user.getBattlerIndex(), true, [BattleStat.ATK, BattleStat.DEF], 1)); - user.scene.unshiftPhase(new StatChangePhase(user.scene, user.getBattlerIndex(), true, [BattleStat.SPD], -1)); + user.scene.unshiftPhase(new StatStageChangePhase(user.scene, user.getBattlerIndex(), true, [ Stat.ATK, Stat.DEF], 1)); + user.scene.unshiftPhase(new StatStageChangePhase(user.scene, user.getBattlerIndex(), true, [ Stat.SPD ], -1)); return true; } } @@ -5163,8 +5182,8 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { } let ret = this.user ? Math.floor((1 - user.getHpRatio()) * 20) : super.getUserBenefitScore(user, target, move); if (this.user && this.batonPass) { - const battleStatTotal = user.summonData.battleStats.reduce((bs: integer, total: integer) => total += bs, 0); - ret = ret / 2 + (Phaser.Tweens.Builders.GetEaseFunction("Sine.easeOut")(Math.min(Math.abs(battleStatTotal), 10) / 10) * (battleStatTotal >= 0 ? 10 : -10)); + const statStageTotal = user.getStatStages().reduce((s: integer, total: integer) => total += s, 0); + ret = ret / 2 + (Phaser.Tweens.Builders.GetEaseFunction("Sine.easeOut")(Math.min(Math.abs(statStageTotal), 10) / 10) * (statStageTotal >= 0 ? 10 : -10)); } return ret; } @@ -5989,8 +6008,17 @@ export class TransformAttr extends MoveEffectAttr { user.summonData.ability = target.getAbility().id; user.summonData.gender = target.getGender(); user.summonData.fusionGender = target.getFusionGender(); - user.summonData.stats = [ user.stats[Stat.HP] ].concat(target.stats.slice(1)); - user.summonData.battleStats = target.summonData.battleStats.slice(0); + + // Copy all stats (except HP) + for (const s of EFFECTIVE_STATS) { + user.setStat(s, target.getStat(s, false), false); + } + + // Copy all stat stages + for (const s of BATTLE_STATS) { + user.setStatStage(s, target.getStatStage(s)); + } + user.summonData.moveset = target.getMoveset().map(m => new PokemonMove(m?.moveId!, m?.ppUsed, m?.ppUp)); // TODO: is this bang correct? user.summonData.types = target.getTypes(); @@ -5998,12 +6026,102 @@ export class TransformAttr extends MoveEffectAttr { user.loadAssets(false).then(() => { user.playAnim(); + user.updateInfo(); resolve(true); }); }); } } +/** + * Attribute used for status moves, namely Speed Swap, + * that swaps the user's and target's corresponding stats. + * @extends MoveEffectAttr + * @see {@linkcode apply} + */ +export class SwapStatAttr extends MoveEffectAttr { + /** The stat to be swapped between the user and the target */ + private stat: EffectiveStat; + + constructor(stat: EffectiveStat) { + super(); + + this.stat = stat; + } + + /** + * Takes the average of the user's and target's corresponding current + * {@linkcode stat} values and sets that stat to the average for both + * temporarily. + * @param user the {@linkcode Pokemon} that used the move + * @param target the {@linkcode Pokemon} that the move was used on + * @param move N/A + * @param args N/A + * @returns true if attribute application succeeds + */ + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (super.apply(user, target, move, args)) { + const temp = user.getStat(this.stat, false); + user.setStat(this.stat, target.getStat(this.stat, false), false); + target.setStat(this.stat, temp, false); + + user.scene.queueMessage(i18next.t("moveTriggers:switchedStat", { + pokemonName: getPokemonNameWithAffix(user), + stat: i18next.t(getStatKey(this.stat)), + })); + + return true; + } + return false; + } +} + +/** + * Attribute used for status moves, namely Power Split and Guard Split, + * that take the average of a user's and target's corresponding + * stats and assign that average back to each corresponding stat. + * @extends MoveEffectAttr + * @see {@linkcode apply} + */ +export class AverageStatsAttr extends MoveEffectAttr { + /** The stats to be averaged individually between the user and the target */ + private stats: readonly EffectiveStat[]; + private msgKey: string; + + constructor(stats: readonly EffectiveStat[], msgKey: string) { + super(); + + this.stats = stats; + this.msgKey = msgKey; + } + + /** + * Takes the average of the user's and target's corresponding {@linkcode stat} + * values and sets those stats to the corresponding average for both + * temporarily. + * @param user the {@linkcode Pokemon} that used the move + * @param target the {@linkcode Pokemon} that the move was used on + * @param move N/A + * @param args N/A + * @returns true if attribute application succeeds + */ + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (super.apply(user, target, move, args)) { + for (const s of this.stats) { + const avg = Math.floor((user.getStat(s, false) + target.getStat(s, false)) / 2); + + user.setStat(s, avg, false); + target.setStat(s, avg, false); + } + + user.scene.queueMessage(i18next.t(this.msgKey, { pokemonName: getPokemonNameWithAffix(user) })); + + return true; + } + return false; + } +} + export class DiscourageFrequentUseAttr extends MoveAttr { getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { const lastMoves = user.getLastXMoves(4); @@ -6072,7 +6190,7 @@ export class AddBattlerTagIfBoostedAttr extends AddBattlerTagAttr { * @returns true */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - if (target.turnData.battleStatsIncreased) { + if (target.turnData.statStagesIncreased) { super.apply(user, target, move, args); } return true; @@ -6099,7 +6217,7 @@ export class StatusIfBoostedAttr extends MoveEffectAttr { * @returns true */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - if (target.turnData.battleStatsIncreased) { + if (target.turnData.statStagesIncreased) { target.trySetStatus(this.effect, true, user); } return true; @@ -6457,7 +6575,7 @@ export function initMoves() { .ignoresVirtual() .target(MoveTarget.ALL_NEAR_ENEMIES), new SelfStatusMove(Moves.SWORDS_DANCE, Type.NORMAL, -1, 20, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ATK, 2, true) + .attr(StatStageChangeAttr, [ Stat.ATK ], 2, true) .danceMove(), new AttackMove(Moves.CUT, Type.NORMAL, MoveCategory.PHYSICAL, 50, 95, 30, -1, 0, 1) .slicingMove(), @@ -6493,7 +6611,7 @@ export function initMoves() { new AttackMove(Moves.ROLLING_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 85, 15, 30, 0, 1) .attr(FlinchAttr), new StatusMove(Moves.SAND_ATTACK, Type.GROUND, 100, 15, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new AttackMove(Moves.HEADBUTT, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 15, 30, 0, 1) .attr(FlinchAttr), new AttackMove(Moves.HORN_ATTACK, Type.NORMAL, MoveCategory.PHYSICAL, 65, 100, 25, -1, 0, 1), @@ -6521,7 +6639,7 @@ export function initMoves() { .attr(RecoilAttr, false, 0.33) .recklessMove(), new StatusMove(Moves.TAIL_WHIP, Type.NORMAL, 100, 30, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, -1) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.POISON_STING, Type.POISON, MoveCategory.PHYSICAL, 15, 100, 35, 30, 0, 1) .attr(StatusEffectAttr, StatusEffect.POISON) @@ -6534,13 +6652,13 @@ export function initMoves() { .attr(MultiHitAttr) .makesContact(false), new StatusMove(Moves.LEER, Type.NORMAL, 100, 30, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, -1) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.BITE, Type.DARK, MoveCategory.PHYSICAL, 60, 100, 25, 30, 0, 1) .attr(FlinchAttr) .bitingMove(), new StatusMove(Moves.GROWL, Type.NORMAL, 100, 40, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ATK, -1) + .attr(StatStageChangeAttr, [ Stat.ATK ], -1) .soundBased() .target(MoveTarget.ALL_NEAR_ENEMIES), new StatusMove(Moves.ROAR, Type.NORMAL, -1, 20, -1, -6, 1) @@ -6559,7 +6677,7 @@ export function initMoves() { .attr(DisableMoveAttr) .condition(failOnMaxCondition), new AttackMove(Moves.ACID, Type.POISON, MoveCategory.SPECIAL, 40, 100, 30, 10, 0, 1) - .attr(StatChangeAttr, BattleStat.SPDEF, -1) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.EMBER, Type.FIRE, MoveCategory.SPECIAL, 40, 100, 25, 10, 0, 1) .attr(StatusEffectAttr, StatusEffect.BURN), @@ -6584,9 +6702,9 @@ export function initMoves() { new AttackMove(Moves.PSYBEAM, Type.PSYCHIC, MoveCategory.SPECIAL, 65, 100, 20, 10, 0, 1) .attr(ConfuseAttr), new AttackMove(Moves.BUBBLE_BEAM, Type.WATER, MoveCategory.SPECIAL, 65, 100, 20, 10, 0, 1) - .attr(StatChangeAttr, BattleStat.SPD, -1), + .attr(StatStageChangeAttr, [ Stat.SPD ], -1), new AttackMove(Moves.AURORA_BEAM, Type.ICE, MoveCategory.SPECIAL, 65, 100, 20, 10, 0, 1) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new AttackMove(Moves.HYPER_BEAM, Type.NORMAL, MoveCategory.SPECIAL, 150, 90, 5, -1, 0, 1) .attr(RechargeAttr), new AttackMove(Moves.PECK, Type.FLYING, MoveCategory.PHYSICAL, 35, 100, 35, -1, 0, 1), @@ -6613,7 +6731,7 @@ export function initMoves() { .attr(AddBattlerTagAttr, BattlerTagType.SEEDED) .condition((user, target, move) => !target.getTag(BattlerTagType.SEEDED) && !target.isOfType(Type.GRASS)), new SelfStatusMove(Moves.GROWTH, Type.NORMAL, -1, 20, -1, 0, 1) - .attr(GrowthStatChangeAttr), + .attr(GrowthStatStageChangeAttr), new AttackMove(Moves.RAZOR_LEAF, Type.GRASS, MoveCategory.PHYSICAL, 55, 95, 25, -1, 0, 1) .attr(HighCritAttr) .makesContact(false) @@ -6640,7 +6758,7 @@ export function initMoves() { .danceMove() .target(MoveTarget.RANDOM_NEAR_ENEMY), new StatusMove(Moves.STRING_SHOT, Type.BUG, 95, 40, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.SPD, -2) + .attr(StatStageChangeAttr, [ Stat.SPD ], -2) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.DRAGON_RAGE, Type.DRAGON, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 1) .attr(FixedDamageAttr, 40), @@ -6677,13 +6795,13 @@ export function initMoves() { new AttackMove(Moves.CONFUSION, Type.PSYCHIC, MoveCategory.SPECIAL, 50, 100, 25, 10, 0, 1) .attr(ConfuseAttr), new AttackMove(Moves.PSYCHIC, Type.PSYCHIC, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 1) - .attr(StatChangeAttr, BattleStat.SPDEF, -1), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1), new StatusMove(Moves.HYPNOSIS, Type.PSYCHIC, 60, 20, -1, 0, 1) .attr(StatusEffectAttr, StatusEffect.SLEEP), new SelfStatusMove(Moves.MEDITATE, Type.PSYCHIC, -1, 40, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ATK, 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK ], 1, true), new SelfStatusMove(Moves.AGILITY, Type.PSYCHIC, -1, 30, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.SPD, 2, true), + .attr(StatStageChangeAttr, [ Stat.SPD ], 2, true), new AttackMove(Moves.QUICK_ATTACK, Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 30, -1, 1, 1), new AttackMove(Moves.RAGE, Type.NORMAL, MoveCategory.PHYSICAL, 20, 100, 20, -1, 0, 1) .partial(), @@ -6696,28 +6814,28 @@ export function initMoves() { .attr(MovesetCopyMoveAttr) .ignoresVirtual(), new StatusMove(Moves.SCREECH, Type.NORMAL, 85, 40, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, -2) + .attr(StatStageChangeAttr, [ Stat.DEF ], -2) .soundBased(), new SelfStatusMove(Moves.DOUBLE_TEAM, Type.NORMAL, -1, 15, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.EVA, 1, true), + .attr(StatStageChangeAttr, [ Stat.EVA ], 1, true), new SelfStatusMove(Moves.RECOVER, Type.NORMAL, -1, 5, -1, 0, 1) .attr(HealAttr, 0.5) .triageMove(), new SelfStatusMove(Moves.HARDEN, Type.NORMAL, -1, 30, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, 1, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true), new SelfStatusMove(Moves.MINIMIZE, Type.NORMAL, -1, 10, -1, 0, 1) .attr(AddBattlerTagAttr, BattlerTagType.MINIMIZED, true, false) - .attr(StatChangeAttr, BattleStat.EVA, 2, true), + .attr(StatStageChangeAttr, [ Stat.EVA ], 2, true), new StatusMove(Moves.SMOKESCREEN, Type.NORMAL, 100, 20, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new StatusMove(Moves.CONFUSE_RAY, Type.GHOST, 100, 10, -1, 0, 1) .attr(ConfuseAttr), new SelfStatusMove(Moves.WITHDRAW, Type.WATER, -1, 40, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, 1, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true), new SelfStatusMove(Moves.DEFENSE_CURL, Type.NORMAL, -1, 40, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, 1, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true), new SelfStatusMove(Moves.BARRIER, Type.PSYCHIC, -1, 20, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, 2, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true), new StatusMove(Moves.LIGHT_SCREEN, Type.PSYCHIC, -1, 30, -1, 0, 1) .attr(AddArenaTagAttr, ArenaTagType.LIGHT_SCREEN, 5, true) .target(MoveTarget.USER_SIDE), @@ -6765,17 +6883,17 @@ export function initMoves() { .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.SKULL_BASH, Type.NORMAL, MoveCategory.PHYSICAL, 130, 100, 10, -1, 0, 1) .attr(ChargeAttr, ChargeAnim.SKULL_BASH_CHARGING, i18next.t("moveTriggers:loweredItsHead", {pokemonName: "{USER}"}), null, true) - .attr(StatChangeAttr, BattleStat.DEF, 1, true) + .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true) .ignoresVirtual(), new AttackMove(Moves.SPIKE_CANNON, Type.NORMAL, MoveCategory.PHYSICAL, 20, 100, 15, -1, 0, 1) .attr(MultiHitAttr) .makesContact(false), new AttackMove(Moves.CONSTRICT, Type.NORMAL, MoveCategory.PHYSICAL, 10, 100, 35, 10, 0, 1) - .attr(StatChangeAttr, BattleStat.SPD, -1), + .attr(StatStageChangeAttr, [ Stat.SPD ], -1), new SelfStatusMove(Moves.AMNESIA, Type.PSYCHIC, -1, 20, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.SPDEF, 2, true), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], 2, true), new StatusMove(Moves.KINESIS, Type.PSYCHIC, 80, 15, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new SelfStatusMove(Moves.SOFT_BOILED, Type.NORMAL, -1, 5, -1, 0, 1) .attr(HealAttr, 0.5) .triageMove(), @@ -6812,7 +6930,7 @@ export function initMoves() { .attr(TransformAttr) .ignoresProtect(), new AttackMove(Moves.BUBBLE, Type.WATER, MoveCategory.SPECIAL, 40, 100, 30, 10, 0, 1) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.DIZZY_PUNCH, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, 20, 0, 1) .attr(ConfuseAttr) @@ -6821,13 +6939,13 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.SLEEP) .powderMove(), new StatusMove(Moves.FLASH, Type.NORMAL, 100, 20, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new AttackMove(Moves.PSYWAVE, Type.PSYCHIC, MoveCategory.SPECIAL, -1, 100, 15, -1, 0, 1) .attr(RandomLevelDamageAttr), new SelfStatusMove(Moves.SPLASH, Type.NORMAL, -1, 40, -1, 0, 1) .condition(failOnGravityCondition), new SelfStatusMove(Moves.ACID_ARMOR, Type.POISON, -1, 20, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.DEF, 2, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true), new AttackMove(Moves.CRABHAMMER, Type.WATER, MoveCategory.PHYSICAL, 100, 90, 10, -1, 0, 1) .attr(HighCritAttr), new AttackMove(Moves.EXPLOSION, Type.NORMAL, MoveCategory.PHYSICAL, 250, 100, 5, -1, 0, 1) @@ -6853,7 +6971,7 @@ export function initMoves() { .attr(FlinchAttr) .bitingMove(), new SelfStatusMove(Moves.SHARPEN, Type.NORMAL, -1, 30, -1, 0, 1) - .attr(StatChangeAttr, BattleStat.ATK, 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK ], 1, true), new SelfStatusMove(Moves.CONVERSION, Type.NORMAL, -1, 30, -1, 0, 1) .attr(FirstMoveTypeAttr), new AttackMove(Moves.TRI_ATTACK, Type.NORMAL, MoveCategory.SPECIAL, 80, 100, 10, 20, 0, 1) @@ -6908,7 +7026,7 @@ export function initMoves() { .windMove() .attr(HighCritAttr), new StatusMove(Moves.COTTON_SPORE, Type.GRASS, 100, 40, -1, 0, 2) - .attr(StatChangeAttr, BattleStat.SPD, -2) + .attr(StatStageChangeAttr, [ Stat.SPD ], -2) .powderMove() .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.REVERSAL, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 15, -1, 0, 2) @@ -6923,21 +7041,21 @@ export function initMoves() { new AttackMove(Moves.MACH_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 40, 100, 30, -1, 1, 2) .punchingMove(), new StatusMove(Moves.SCARY_FACE, Type.NORMAL, 100, 10, -1, 0, 2) - .attr(StatChangeAttr, BattleStat.SPD, -2), + .attr(StatStageChangeAttr, [ Stat.SPD ], -2), new AttackMove(Moves.FEINT_ATTACK, Type.DARK, MoveCategory.PHYSICAL, 60, -1, 20, -1, 0, 2), new StatusMove(Moves.SWEET_KISS, Type.FAIRY, 75, 10, -1, 0, 2) .attr(ConfuseAttr), new SelfStatusMove(Moves.BELLY_DRUM, Type.NORMAL, -1, 10, -1, 0, 2) - .attr(CutHpStatBoostAttr, [BattleStat.ATK], 12, 2, (user) => { - user.scene.queueMessage(i18next.t("moveTriggers:cutOwnHpAndMaximizedStat", {pokemonName: getPokemonNameWithAffix(user), statName: getBattleStatName(BattleStat.ATK)})); + .attr(CutHpStatStageBoostAttr, [ Stat.ATK ], 12, 2, (user) => { + user.scene.queueMessage(i18next.t("moveTriggers:cutOwnHpAndMaximizedStat", { pokemonName: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.ATK)) })); }), new AttackMove(Moves.SLUDGE_BOMB, Type.POISON, MoveCategory.SPECIAL, 90, 100, 10, 30, 0, 2) .attr(StatusEffectAttr, StatusEffect.POISON) .ballBombMove(), new AttackMove(Moves.MUD_SLAP, Type.GROUND, MoveCategory.SPECIAL, 20, 100, 10, 100, 0, 2) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new AttackMove(Moves.OCTAZOOKA, Type.WATER, MoveCategory.SPECIAL, 65, 85, 10, 50, 0, 2) - .attr(StatChangeAttr, BattleStat.ACC, -1) + .attr(StatStageChangeAttr, [ Stat.ACC ], -1) .ballBombMove(), new StatusMove(Moves.SPIKES, Type.GROUND, -1, 20, -1, 0, 2) .attr(AddArenaTrapTagAttr, ArenaTagType.SPIKES) @@ -6966,7 +7084,7 @@ export function initMoves() { .condition(failOnBossCondition) .target(MoveTarget.ALL), new AttackMove(Moves.ICY_WIND, Type.ICE, MoveCategory.SPECIAL, 55, 95, 15, 100, 0, 2) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .windMove() .target(MoveTarget.ALL_NEAR_ENEMIES), new SelfStatusMove(Moves.DETECT, Type.FIGHTING, -1, 5, -1, 4, 2) @@ -6990,13 +7108,13 @@ export function initMoves() { new SelfStatusMove(Moves.ENDURE, Type.NORMAL, -1, 10, -1, 4, 2) .attr(ProtectAttr, BattlerTagType.ENDURING), new StatusMove(Moves.CHARM, Type.FAIRY, 100, 20, -1, 0, 2) - .attr(StatChangeAttr, BattleStat.ATK, -2), + .attr(StatStageChangeAttr, [ Stat.ATK ], -2), new AttackMove(Moves.ROLLOUT, Type.ROCK, MoveCategory.PHYSICAL, 30, 90, 20, -1, 0, 2) .attr(ConsecutiveUseDoublePowerAttr, 5, true, true, Moves.DEFENSE_CURL), new AttackMove(Moves.FALSE_SWIPE, Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 40, -1, 0, 2) .attr(SurviveDamageAttr), new StatusMove(Moves.SWAGGER, Type.NORMAL, 85, 15, -1, 0, 2) - .attr(StatChangeAttr, BattleStat.ATK, 2) + .attr(StatStageChangeAttr, [ Stat.ATK ], 2) .attr(ConfuseAttr), new SelfStatusMove(Moves.MILK_DRINK, Type.NORMAL, -1, 5, -1, 0, 2) .attr(HealAttr, 0.5) @@ -7007,7 +7125,7 @@ export function initMoves() { .attr(ConsecutiveUseDoublePowerAttr, 3, true) .slicingMove(), new AttackMove(Moves.STEEL_WING, Type.STEEL, MoveCategory.PHYSICAL, 70, 90, 25, 10, 0, 2) - .attr(StatChangeAttr, BattleStat.DEF, 1, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true), new StatusMove(Moves.MEAN_LOOK, Type.NORMAL, -1, 5, -1, 0, 2) .attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1), new StatusMove(Moves.ATTRACT, Type.NORMAL, 100, 15, -1, 0, 2) @@ -7061,7 +7179,7 @@ export function initMoves() { new AttackMove(Moves.PURSUIT, Type.DARK, MoveCategory.PHYSICAL, 40, 100, 20, -1, 0, 2) .partial(), new AttackMove(Moves.RAPID_SPIN, Type.NORMAL, MoveCategory.PHYSICAL, 50, 100, 40, 100, 0, 2) - .attr(StatChangeAttr, BattleStat.SPD, 1, true) + .attr(StatStageChangeAttr, [ Stat.SPD ], 1, true) .attr(RemoveBattlerTagAttr, [ BattlerTagType.BIND, BattlerTagType.WRAP, @@ -7077,12 +7195,12 @@ export function initMoves() { ], true) .attr(RemoveArenaTrapAttr), new StatusMove(Moves.SWEET_SCENT, Type.NORMAL, 100, 20, -1, 0, 2) - .attr(StatChangeAttr, BattleStat.EVA, -2) + .attr(StatStageChangeAttr, [ Stat.EVA ], -2) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.IRON_TAIL, Type.STEEL, MoveCategory.PHYSICAL, 100, 75, 15, 30, 0, 2) - .attr(StatChangeAttr, BattleStat.DEF, -1), + .attr(StatStageChangeAttr, [ Stat.DEF ], -1), new AttackMove(Moves.METAL_CLAW, Type.STEEL, MoveCategory.PHYSICAL, 50, 95, 35, 10, 0, 2) - .attr(StatChangeAttr, BattleStat.ATK, 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK ], 1, true), new AttackMove(Moves.VITAL_THROW, Type.FIGHTING, MoveCategory.PHYSICAL, 70, -1, 10, -1, -1, 2), new SelfStatusMove(Moves.MORNING_SUN, Type.NORMAL, -1, 5, -1, 0, 2) .attr(PlantHealAttr) @@ -7109,7 +7227,7 @@ export function initMoves() { .attr(WeatherChangeAttr, WeatherType.SUNNY) .target(MoveTarget.BOTH_SIDES), new AttackMove(Moves.CRUNCH, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 15, 20, 0, 2) - .attr(StatChangeAttr, BattleStat.DEF, -1) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1) .bitingMove(), new AttackMove(Moves.MIRROR_COAT, Type.PSYCHIC, MoveCategory.SPECIAL, -1, 100, 20, -1, -5, 2) .attr(CounterDamageAttr, (move: Move) => move.category === MoveCategory.SPECIAL, 2) @@ -7118,15 +7236,15 @@ export function initMoves() { .attr(CopyStatsAttr), new AttackMove(Moves.EXTREME_SPEED, Type.NORMAL, MoveCategory.PHYSICAL, 80, 100, 5, -1, 2, 2), new AttackMove(Moves.ANCIENT_POWER, Type.ROCK, MoveCategory.SPECIAL, 60, 100, 5, 10, 0, 2) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ], 1, true), new AttackMove(Moves.SHADOW_BALL, Type.GHOST, MoveCategory.SPECIAL, 80, 100, 15, 20, 0, 2) - .attr(StatChangeAttr, BattleStat.SPDEF, -1) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1) .ballBombMove(), new AttackMove(Moves.FUTURE_SIGHT, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 2) .partial() .attr(DelayedAttackAttr, ArenaTagType.FUTURE_SIGHT, ChargeAnim.FUTURE_SIGHT_CHARGING, i18next.t("moveTriggers:foresawAnAttack", {pokemonName: "{USER}"})), new AttackMove(Moves.ROCK_SMASH, Type.FIGHTING, MoveCategory.PHYSICAL, 40, 100, 15, 50, 0, 2) - .attr(StatChangeAttr, BattleStat.DEF, -1), + .attr(StatStageChangeAttr, [ Stat.DEF ], -1), new AttackMove(Moves.WHIRLPOOL, Type.WATER, MoveCategory.SPECIAL, 35, 85, 15, -1, 0, 2) .attr(TrapAttr, BattlerTagType.WHIRLPOOL) .attr(HitsTagAttr, BattlerTagType.UNDERWATER, true), @@ -7165,13 +7283,13 @@ export function initMoves() { new StatusMove(Moves.TORMENT, Type.DARK, 100, 15, -1, 0, 3) .unimplemented(), new StatusMove(Moves.FLATTER, Type.DARK, 100, 15, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.SPATK, 1) + .attr(StatStageChangeAttr, [ Stat.SPATK ], 1) .attr(ConfuseAttr), new StatusMove(Moves.WILL_O_WISP, Type.FIRE, 85, 15, -1, 0, 3) .attr(StatusEffectAttr, StatusEffect.BURN), new StatusMove(Moves.MEMENTO, Type.DARK, 100, 10, -1, 0, 3) .attr(SacrificialAttrOnHit) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -2), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -2), new AttackMove(Moves.FACADE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 3) .attr(MovePowerMultiplierAttr, (user, target, move) => user.status && (user.status.effect === StatusEffect.BURN || user.status.effect === StatusEffect.POISON || user.status.effect === StatusEffect.TOXIC || user.status.effect === StatusEffect.PARALYSIS) ? 2 : 1) @@ -7190,7 +7308,7 @@ export function initMoves() { .attr(NaturePowerAttr) .ignoresVirtual(), new SelfStatusMove(Moves.CHARGE, Type.ELECTRIC, -1, 20, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.SPDEF, 1, true) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], 1, true) .attr(AddBattlerTagAttr, BattlerTagType.CHARGED, true, false), new StatusMove(Moves.TAUNT, Type.DARK, 100, 20, -1, 0, 3) .unimplemented(), @@ -7210,7 +7328,7 @@ export function initMoves() { new SelfStatusMove(Moves.INGRAIN, Type.GRASS, -1, 20, -1, 0, 3) .attr(AddBattlerTagAttr, BattlerTagType.INGRAIN, true, true), new AttackMove(Moves.SUPERPOWER, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 3) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], -1, true), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF ], -1, true), new SelfStatusMove(Moves.MAGIC_COAT, Type.PSYCHIC, -1, 15, -1, 4, 3) .unimplemented(), new SelfStatusMove(Moves.RECYCLE, Type.NORMAL, -1, 10, -1, 0, 3) @@ -7254,14 +7372,14 @@ export function initMoves() { new SelfStatusMove(Moves.CAMOUFLAGE, Type.NORMAL, -1, 20, -1, 0, 3) .attr(CopyBiomeTypeAttr), new SelfStatusMove(Moves.TAIL_GLOW, Type.BUG, -1, 20, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.SPATK, 3, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], 3, true), new AttackMove(Moves.LUSTER_PURGE, Type.PSYCHIC, MoveCategory.SPECIAL, 95, 100, 5, 50, 0, 3) - .attr(StatChangeAttr, BattleStat.SPDEF, -1), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1), new AttackMove(Moves.MIST_BALL, Type.PSYCHIC, MoveCategory.SPECIAL, 95, 100, 5, 50, 0, 3) - .attr(StatChangeAttr, BattleStat.SPATK, -1) + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1) .ballBombMove(), new StatusMove(Moves.FEATHER_DANCE, Type.FLYING, 100, 15, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.ATK, -2) + .attr(StatStageChangeAttr, [ Stat.ATK ], -2) .danceMove(), new StatusMove(Moves.TEETER_DANCE, Type.NORMAL, 100, 20, -1, 0, 3) .attr(ConfuseAttr) @@ -7288,13 +7406,13 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.TOXIC) .bitingMove(), new AttackMove(Moves.CRUSH_CLAW, Type.NORMAL, MoveCategory.PHYSICAL, 75, 95, 10, 50, 0, 3) - .attr(StatChangeAttr, BattleStat.DEF, -1), + .attr(StatStageChangeAttr, [ Stat.DEF ], -1), new AttackMove(Moves.BLAST_BURN, Type.FIRE, MoveCategory.SPECIAL, 150, 90, 5, -1, 0, 3) .attr(RechargeAttr), new AttackMove(Moves.HYDRO_CANNON, Type.WATER, MoveCategory.SPECIAL, 150, 90, 5, -1, 0, 3) .attr(RechargeAttr), new AttackMove(Moves.METEOR_MASH, Type.STEEL, MoveCategory.PHYSICAL, 90, 90, 10, 20, 0, 3) - .attr(StatChangeAttr, BattleStat.ATK, 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK ], 1, true) .punchingMove(), new AttackMove(Moves.ASTONISH, Type.GHOST, MoveCategory.PHYSICAL, 30, 100, 15, 30, 0, 3) .attr(FlinchAttr), @@ -7306,33 +7424,33 @@ export function initMoves() { .attr(PartyStatusCureAttr, i18next.t("moveTriggers:soothingAromaWaftedThroughArea"), Abilities.SAP_SIPPER) .target(MoveTarget.PARTY), new StatusMove(Moves.FAKE_TEARS, Type.DARK, 100, 20, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.SPDEF, -2), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -2), new AttackMove(Moves.AIR_CUTTER, Type.FLYING, MoveCategory.SPECIAL, 60, 95, 25, -1, 0, 3) .attr(HighCritAttr) .slicingMove() .windMove() .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.OVERHEAT, Type.FIRE, MoveCategory.SPECIAL, 130, 90, 5, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.SPATK, -2, true) + .attr(StatStageChangeAttr, [ Stat.SPATK ], -2, true) .attr(HealStatusEffectAttr, true, StatusEffect.FREEZE), new StatusMove(Moves.ODOR_SLEUTH, Type.NORMAL, -1, 40, -1, 0, 3) .attr(ExposedMoveAttr, BattlerTagType.IGNORE_GHOST), new AttackMove(Moves.ROCK_TOMB, Type.ROCK, MoveCategory.PHYSICAL, 60, 95, 15, 100, 0, 3) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .makesContact(false), new AttackMove(Moves.SILVER_WIND, Type.BUG, MoveCategory.SPECIAL, 60, 100, 5, 10, 0, 3) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ], 1, true) .windMove(), new StatusMove(Moves.METAL_SOUND, Type.STEEL, 85, 40, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.SPDEF, -2) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -2) .soundBased(), new StatusMove(Moves.GRASS_WHISTLE, Type.GRASS, 55, 15, -1, 0, 3) .attr(StatusEffectAttr, StatusEffect.SLEEP) .soundBased(), new StatusMove(Moves.TICKLE, Type.NORMAL, 100, 20, -1, 0, 3) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], -1), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF ], -1), new SelfStatusMove(Moves.COSMIC_POWER, Type.PSYCHIC, -1, 20, -1, 0, 3) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true), + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], 1, true), new AttackMove(Moves.WATER_SPOUT, Type.WATER, MoveCategory.SPECIAL, 150, 100, 5, -1, 0, 3) .attr(HpPowerAttr) .target(MoveTarget.ALL_NEAR_ENEMIES), @@ -7353,7 +7471,7 @@ export function initMoves() { .attr(OneHitKOAttr) .attr(SheerColdAccuracyAttr), new AttackMove(Moves.MUDDY_WATER, Type.WATER, MoveCategory.SPECIAL, 90, 85, 10, 30, 0, 3) - .attr(StatChangeAttr, BattleStat.ACC, -1) + .attr(StatStageChangeAttr, [ Stat.ACC ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.BULLET_SEED, Type.GRASS, MoveCategory.PHYSICAL, 25, 100, 30, -1, 0, 3) .attr(MultiHitAttr) @@ -7365,25 +7483,25 @@ export function initMoves() { .attr(MultiHitAttr) .makesContact(false), new SelfStatusMove(Moves.IRON_DEFENSE, Type.STEEL, -1, 15, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.DEF, 2, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true), new StatusMove(Moves.BLOCK, Type.NORMAL, -1, 5, -1, 0, 3) .attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1), new StatusMove(Moves.HOWL, Type.NORMAL, -1, 40, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.ATK, 1) + .attr(StatStageChangeAttr, [ Stat.ATK ], 1) .soundBased() .target(MoveTarget.USER_AND_ALLIES), new AttackMove(Moves.DRAGON_CLAW, Type.DRAGON, MoveCategory.PHYSICAL, 80, 100, 15, -1, 0, 3), new AttackMove(Moves.FRENZY_PLANT, Type.GRASS, MoveCategory.SPECIAL, 150, 90, 5, -1, 0, 3) .attr(RechargeAttr), new SelfStatusMove(Moves.BULK_UP, Type.FIGHTING, -1, 20, -1, 0, 3) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF ], 1, true), new AttackMove(Moves.BOUNCE, Type.FLYING, MoveCategory.PHYSICAL, 85, 85, 5, 30, 0, 3) .attr(ChargeAttr, ChargeAnim.BOUNCE_CHARGING, i18next.t("moveTriggers:sprangUp", {pokemonName: "{USER}"}), BattlerTagType.FLYING) .attr(StatusEffectAttr, StatusEffect.PARALYSIS) .condition(failOnGravityCondition) .ignoresVirtual(), new AttackMove(Moves.MUD_SHOT, Type.GROUND, MoveCategory.SPECIAL, 55, 95, 15, 100, 0, 3) - .attr(StatChangeAttr, BattleStat.SPD, -1), + .attr(StatStageChangeAttr, [ Stat.SPD ], -1), new AttackMove(Moves.POISON_TAIL, Type.POISON, MoveCategory.PHYSICAL, 50, 100, 25, 10, 0, 3) .attr(HighCritAttr) .attr(StatusEffectAttr, StatusEffect.POISON), @@ -7398,12 +7516,12 @@ export function initMoves() { .attr(AddArenaTagAttr, ArenaTagType.WATER_SPORT, 5) .target(MoveTarget.BOTH_SIDES), new SelfStatusMove(Moves.CALM_MIND, Type.PSYCHIC, -1, 20, -1, 0, 3) - .attr(StatChangeAttr, [ BattleStat.SPATK, BattleStat.SPDEF ], 1, true), + .attr(StatStageChangeAttr, [ Stat.SPATK, Stat.SPDEF ], 1, true), new AttackMove(Moves.LEAF_BLADE, Type.GRASS, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 3) .attr(HighCritAttr) .slicingMove(), new SelfStatusMove(Moves.DRAGON_DANCE, Type.DRAGON, -1, 20, -1, 0, 3) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPD ], 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPD ], 1, true) .danceMove(), new AttackMove(Moves.ROCK_BLAST, Type.ROCK, MoveCategory.PHYSICAL, 25, 90, 10, -1, 0, 3) .attr(MultiHitAttr) @@ -7417,7 +7535,7 @@ export function initMoves() { .partial() .attr(DelayedAttackAttr, ArenaTagType.DOOM_DESIRE, ChargeAnim.DOOM_DESIRE_CHARGING, i18next.t("moveTriggers:choseDoomDesireAsDestiny", {pokemonName: "{USER}"})), new AttackMove(Moves.PSYCHO_BOOST, Type.PSYCHIC, MoveCategory.SPECIAL, 140, 90, 5, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.SPATK, -2, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -2, true), new SelfStatusMove(Moves.ROOST, Type.FLYING, -1, 5, -1, 0, 4) .attr(HealAttr, 0.5) .attr(AddBattlerTagAttr, BattlerTagType.ROOSTED, true, false) @@ -7431,7 +7549,7 @@ export function initMoves() { .attr(MovePowerMultiplierAttr, (user, target, move) => targetSleptOrComatoseCondition(user, target, move) ? 2 : 1) .attr(HealStatusEffectAttr, false, StatusEffect.SLEEP), new AttackMove(Moves.HAMMER_ARM, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 90, 10, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.SPD, -1, true) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1, true) .punchingMove(), new AttackMove(Moves.GYRO_BALL, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 5, -1, 0, 4) .attr(GyroBallPowerAttr) @@ -7456,7 +7574,7 @@ export function initMoves() { .attr(AddArenaTagAttr, ArenaTagType.TAILWIND, 4, true) .target(MoveTarget.USER_SIDE), new StatusMove(Moves.ACUPRESSURE, Type.NORMAL, -1, 30, -1, 0, 4) - .attr(AcupressureStatChangeAttr) + .attr(AcupressureStatStageChangeAttr) .target(MoveTarget.USER_OR_NEAR_ALLY), new AttackMove(Moves.METAL_BURST, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 4) .attr(CounterDamageAttr, (move: Move) => (move.category === MoveCategory.PHYSICAL || move.category === MoveCategory.SPECIAL), 1.5) @@ -7466,7 +7584,7 @@ export function initMoves() { new AttackMove(Moves.U_TURN, Type.BUG, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 4) .attr(ForceSwitchOutAttr, true, false), new AttackMove(Moves.CLOSE_COMBAT, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 4) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true), + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true), new AttackMove(Moves.PAYBACK, Type.DARK, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 4) .attr(MovePowerMultiplierAttr, (user, target, move) => target.getLastXMoves(1).find(m => m.turn === target.scene.currentBattle.turn) || user.scene.currentBattle.turnCommands[target.getBattlerIndex()]?.command === Command.BALL ? 2 : 1), new AttackMove(Moves.ASSURANCE, Type.DARK, MoveCategory.PHYSICAL, 60, 100, 10, -1, 0, 4) @@ -7510,9 +7628,9 @@ export function initMoves() { .attr(CopyMoveAttr) .ignoresVirtual(), new StatusMove(Moves.POWER_SWAP, Type.PSYCHIC, -1, 10, 100, 0, 4) - .unimplemented(), + .attr(SwapStatStagesAttr, [ Stat.ATK, Stat.SPATK ]), new StatusMove(Moves.GUARD_SWAP, Type.PSYCHIC, -1, 10, 100, 0, 4) - .unimplemented(), + .attr(SwapStatStagesAttr, [ Stat.DEF, Stat.SPDEF ]), new AttackMove(Moves.PUNISHMENT, Type.DARK, MoveCategory.PHYSICAL, -1, 100, 5, -1, 0, 4) .makesContact(true) .attr(PunishmentPowerAttr), @@ -7526,7 +7644,7 @@ export function initMoves() { .attr(AddArenaTrapTagAttr, ArenaTagType.TOXIC_SPIKES) .target(MoveTarget.ENEMY_SIDE), new StatusMove(Moves.HEART_SWAP, Type.PSYCHIC, -1, 10, -1, 0, 4) - .attr(SwapStatsAttr), + .attr(SwapStatStagesAttr, BATTLE_STATS), new SelfStatusMove(Moves.AQUA_RING, Type.WATER, -1, 20, -1, 0, 4) .attr(AddBattlerTagAttr, BattlerTagType.AQUA_RING, true, true), new SelfStatusMove(Moves.MAGNET_RISE, Type.ELECTRIC, -1, 10, -1, 0, 4) @@ -7543,7 +7661,7 @@ export function initMoves() { .pulseMove() .ballBombMove(), new SelfStatusMove(Moves.ROCK_POLISH, Type.ROCK, -1, 20, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.SPD, 2, true), + .attr(StatStageChangeAttr, [ Stat.SPD ], 2, true), new AttackMove(Moves.POISON_JAB, Type.POISON, MoveCategory.PHYSICAL, 80, 100, 20, 30, 0, 4) .attr(StatusEffectAttr, StatusEffect.POISON), new AttackMove(Moves.DARK_PULSE, Type.DARK, MoveCategory.SPECIAL, 80, 100, 15, 20, 0, 4) @@ -7562,7 +7680,7 @@ export function initMoves() { new AttackMove(Moves.X_SCISSOR, Type.BUG, MoveCategory.PHYSICAL, 80, 100, 15, -1, 0, 4) .slicingMove(), new AttackMove(Moves.BUG_BUZZ, Type.BUG, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 4) - .attr(StatChangeAttr, BattleStat.SPDEF, -1) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1) .soundBased(), new AttackMove(Moves.DRAGON_PULSE, Type.DRAGON, MoveCategory.SPECIAL, 85, 100, 10, -1, 0, 4) .pulseMove(), @@ -7577,22 +7695,22 @@ export function initMoves() { .triageMove(), new AttackMove(Moves.VACUUM_WAVE, Type.FIGHTING, MoveCategory.SPECIAL, 40, 100, 30, -1, 1, 4), new AttackMove(Moves.FOCUS_BLAST, Type.FIGHTING, MoveCategory.SPECIAL, 120, 70, 5, 10, 0, 4) - .attr(StatChangeAttr, BattleStat.SPDEF, -1) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1) .ballBombMove(), new AttackMove(Moves.ENERGY_BALL, Type.GRASS, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 4) - .attr(StatChangeAttr, BattleStat.SPDEF, -1) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1) .ballBombMove(), new AttackMove(Moves.BRAVE_BIRD, Type.FLYING, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 4) .attr(RecoilAttr, false, 0.33) .recklessMove(), new AttackMove(Moves.EARTH_POWER, Type.GROUND, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 4) - .attr(StatChangeAttr, BattleStat.SPDEF, -1), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1), new StatusMove(Moves.SWITCHEROO, Type.DARK, 100, 10, -1, 0, 4) .unimplemented(), new AttackMove(Moves.GIGA_IMPACT, Type.NORMAL, MoveCategory.PHYSICAL, 150, 90, 5, -1, 0, 4) .attr(RechargeAttr), new SelfStatusMove(Moves.NASTY_PLOT, Type.DARK, -1, 20, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.SPATK, 2, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], 2, true), new AttackMove(Moves.BULLET_PUNCH, Type.STEEL, MoveCategory.PHYSICAL, 40, 100, 30, -1, 1, 4) .punchingMove(), new AttackMove(Moves.AVALANCHE, Type.ICE, MoveCategory.PHYSICAL, 60, 100, 10, -1, -4, 4) @@ -7615,7 +7733,7 @@ export function initMoves() { .bitingMove(), new AttackMove(Moves.SHADOW_SNEAK, Type.GHOST, MoveCategory.PHYSICAL, 40, 100, 30, -1, 1, 4), new AttackMove(Moves.MUD_BOMB, Type.GROUND, MoveCategory.SPECIAL, 65, 85, 10, 30, 0, 4) - .attr(StatChangeAttr, BattleStat.ACC, -1) + .attr(StatStageChangeAttr, [ Stat.ACC ], -1) .ballBombMove(), new AttackMove(Moves.PSYCHO_CUT, Type.PSYCHIC, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 4) .attr(HighCritAttr) @@ -7624,13 +7742,13 @@ export function initMoves() { new AttackMove(Moves.ZEN_HEADBUTT, Type.PSYCHIC, MoveCategory.PHYSICAL, 80, 90, 15, 20, 0, 4) .attr(FlinchAttr), new AttackMove(Moves.MIRROR_SHOT, Type.STEEL, MoveCategory.SPECIAL, 65, 85, 10, 30, 0, 4) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new AttackMove(Moves.FLASH_CANNON, Type.STEEL, MoveCategory.SPECIAL, 80, 100, 10, 10, 0, 4) - .attr(StatChangeAttr, BattleStat.SPDEF, -1), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1), new AttackMove(Moves.ROCK_CLIMB, Type.NORMAL, MoveCategory.PHYSICAL, 90, 85, 20, 20, 0, 4) .attr(ConfuseAttr), new StatusMove(Moves.DEFOG, Type.FLYING, -1, 15, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.EVA, -1) + .attr(StatStageChangeAttr, [ Stat.EVA ], -1) .attr(ClearWeatherAttr, WeatherType.FOG) .attr(ClearTerrainAttr) .attr(RemoveScreensAttr, false) @@ -7640,7 +7758,7 @@ export function initMoves() { .ignoresProtect() .target(MoveTarget.BOTH_SIDES), new AttackMove(Moves.DRACO_METEOR, Type.DRAGON, MoveCategory.SPECIAL, 130, 90, 5, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.SPATK, -2, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -2, true), new AttackMove(Moves.DISCHARGE, Type.ELECTRIC, MoveCategory.SPECIAL, 80, 100, 15, 30, 0, 4) .attr(StatusEffectAttr, StatusEffect.PARALYSIS) .target(MoveTarget.ALL_NEAR_OTHERS), @@ -7648,7 +7766,7 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.BURN) .target(MoveTarget.ALL_NEAR_OTHERS), new AttackMove(Moves.LEAF_STORM, Type.GRASS, MoveCategory.SPECIAL, 130, 90, 5, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.SPATK, -2, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -2, true), new AttackMove(Moves.POWER_WHIP, Type.GRASS, MoveCategory.PHYSICAL, 120, 85, 10, -1, 0, 4), new AttackMove(Moves.ROCK_WRECKER, Type.ROCK, MoveCategory.PHYSICAL, 150, 90, 5, -1, 0, 4) .attr(RechargeAttr) @@ -7670,7 +7788,7 @@ export function initMoves() { .attr(HighCritAttr) .makesContact(false), new StatusMove(Moves.CAPTIVATE, Type.NORMAL, 100, 20, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.SPATK, -2) + .attr(StatStageChangeAttr, [ Stat.SPATK ], -2) .condition((user, target, move) => target.isOppositeGender(user)) .target(MoveTarget.ALL_NEAR_ENEMIES), new StatusMove(Moves.STEALTH_ROCK, Type.ROCK, -1, 20, -1, 0, 4) @@ -7688,7 +7806,7 @@ export function initMoves() { new AttackMove(Moves.BUG_BITE, Type.BUG, MoveCategory.PHYSICAL, 60, 100, 20, -1, 0, 4) .attr(StealEatBerryAttr), new AttackMove(Moves.CHARGE_BEAM, Type.ELECTRIC, MoveCategory.SPECIAL, 50, 90, 10, 70, 0, 4) - .attr(StatChangeAttr, BattleStat.SPATK, 1, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], 1, true), new AttackMove(Moves.WOOD_HAMMER, Type.GRASS, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 4) .attr(RecoilAttr, false, 0.33) .recklessMove(), @@ -7697,7 +7815,7 @@ export function initMoves() { .attr(HighCritAttr) .makesContact(false), new SelfStatusMove(Moves.DEFEND_ORDER, Type.BUG, -1, 10, -1, 0, 4) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true), + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], 1, true), new SelfStatusMove(Moves.HEAL_ORDER, Type.BUG, -1, 10, -1, 0, 4) .attr(HealAttr, 0.5) .triageMove(), @@ -7723,23 +7841,23 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.SLEEP) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.SEED_FLARE, Type.GRASS, MoveCategory.SPECIAL, 120, 85, 5, 40, 0, 4) - .attr(StatChangeAttr, BattleStat.SPDEF, -2), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -2), new AttackMove(Moves.OMINOUS_WIND, Type.GHOST, MoveCategory.SPECIAL, 60, 100, 5, 10, 0, 4) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ], 1, true) .windMove(), new AttackMove(Moves.SHADOW_FORCE, Type.GHOST, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 4) .attr(ChargeAttr, ChargeAnim.SHADOW_FORCE_CHARGING, i18next.t("moveTriggers:vanishedInstantly", {pokemonName: "{USER}"}), BattlerTagType.HIDDEN) .ignoresProtect() .ignoresVirtual(), new SelfStatusMove(Moves.HONE_CLAWS, Type.DARK, -1, 15, -1, 0, 5) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.ACC ], 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.ACC ], 1, true), new StatusMove(Moves.WIDE_GUARD, Type.ROCK, -1, 10, -1, 3, 5) .target(MoveTarget.USER_SIDE) .attr(AddArenaTagAttr, ArenaTagType.WIDE_GUARD, 1, true, true), new StatusMove(Moves.GUARD_SPLIT, Type.PSYCHIC, -1, 10, -1, 0, 5) - .unimplemented(), + .attr(AverageStatsAttr, [ Stat.DEF, Stat.SPDEF ], "moveTriggers:sharedGuard"), new StatusMove(Moves.POWER_SPLIT, Type.PSYCHIC, -1, 10, -1, 0, 5) - .unimplemented(), + .attr(AverageStatsAttr, [ Stat.ATK, Stat.SPATK ], "moveTriggers:sharedPower"), new StatusMove(Moves.WONDER_ROOM, Type.PSYCHIC, -1, 10, -1, 0, 5) .ignoresProtect() .target(MoveTarget.BOTH_SIDES) @@ -7749,7 +7867,7 @@ export function initMoves() { new AttackMove(Moves.VENOSHOCK, Type.POISON, MoveCategory.SPECIAL, 65, 100, 10, -1, 0, 5) .attr(MovePowerMultiplierAttr, (user, target, move) => target.status && (target.status.effect === StatusEffect.POISON || target.status.effect === StatusEffect.TOXIC) ? 2 : 1), new SelfStatusMove(Moves.AUTOTOMIZE, Type.STEEL, -1, 15, -1, 0, 5) - .attr(StatChangeAttr, BattleStat.SPD, 2, true) + .attr(StatStageChangeAttr, [ Stat.SPD ], 2, true) .partial(), new SelfStatusMove(Moves.RAGE_POWDER, Type.BUG, -1, 20, -1, 2, 5) .powderMove() @@ -7775,7 +7893,7 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.POISON) .target(MoveTarget.ALL_NEAR_OTHERS), new SelfStatusMove(Moves.QUIVER_DANCE, Type.BUG, -1, 20, -1, 0, 5) - .attr(StatChangeAttr, [ BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true) + .attr(StatStageChangeAttr, [ Stat.SPATK, Stat.SPDEF, Stat.SPD ], 1, true) .danceMove(), new AttackMove(Moves.HEAVY_SLAM, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5) .attr(MinimizeAccuracyAttr) @@ -7792,13 +7910,13 @@ export function initMoves() { new StatusMove(Moves.SOAK, Type.WATER, 100, 20, -1, 0, 5) .attr(ChangeTypeAttr, Type.WATER), new AttackMove(Moves.FLAME_CHARGE, Type.FIRE, MoveCategory.PHYSICAL, 50, 100, 20, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPD, 1, true), + .attr(StatStageChangeAttr, [ Stat.SPD ], 1, true), new SelfStatusMove(Moves.COIL, Type.POISON, -1, 20, -1, 0, 5) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.ACC ], 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.ACC ], 1, true), new AttackMove(Moves.LOW_SWEEP, Type.FIGHTING, MoveCategory.PHYSICAL, 65, 100, 20, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPD, -1), + .attr(StatStageChangeAttr, [ Stat.SPD ], -1), new AttackMove(Moves.ACID_SPRAY, Type.POISON, MoveCategory.SPECIAL, 40, 100, 20, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPDEF, -2) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -2) .ballBombMove(), new AttackMove(Moves.FOUL_PLAY, Type.DARK, MoveCategory.PHYSICAL, 95, 100, 15, -1, 0, 5) .attr(TargetAtkUserAtkAttr), @@ -7816,11 +7934,11 @@ export function initMoves() { .attr(ConsecutiveUseMultiBasePowerAttr, 5, false) .soundBased(), new AttackMove(Moves.CHIP_AWAY, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 5) - .attr(IgnoreOpponentStatChangesAttr), + .attr(IgnoreOpponentStatStagesAttr), new AttackMove(Moves.CLEAR_SMOG, Type.POISON, MoveCategory.SPECIAL, 50, -1, 15, -1, 0, 5) .attr(ResetStatsAttr, false), new AttackMove(Moves.STORED_POWER, Type.PSYCHIC, MoveCategory.SPECIAL, 20, 100, 10, -1, 0, 5) - .attr(StatChangeCountPowerAttr), + .attr(PositiveStatStagePowerAttr), new StatusMove(Moves.QUICK_GUARD, Type.FIGHTING, -1, 15, -1, 3, 5) .target(MoveTarget.USER_SIDE) .attr(AddArenaTagAttr, ArenaTagType.QUICK_GUARD, 1, true, true), @@ -7832,8 +7950,8 @@ export function initMoves() { .attr(HealStatusEffectAttr, true, StatusEffect.FREEZE) .attr(StatusEffectAttr, StatusEffect.BURN), new SelfStatusMove(Moves.SHELL_SMASH, Type.NORMAL, -1, 15, -1, 0, 5) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK, BattleStat.SPD ], 2, true) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK, Stat.SPD ], 2, true) + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true), new StatusMove(Moves.HEAL_PULSE, Type.PSYCHIC, -1, 10, -1, 0, 5) .attr(HealAttr, 0.5, false, false) .pulseMove() @@ -7847,8 +7965,8 @@ export function initMoves() { .condition(failOnGravityCondition) .ignoresVirtual(), new SelfStatusMove(Moves.SHIFT_GEAR, Type.STEEL, -1, 10, -1, 0, 5) - .attr(StatChangeAttr, BattleStat.ATK, 1, true) - .attr(StatChangeAttr, BattleStat.SPD, 2, true), + .attr(StatStageChangeAttr, [ Stat.ATK ], 1, true) + .attr(StatStageChangeAttr, [ Stat.SPD ], 2, true), new AttackMove(Moves.CIRCLE_THROW, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 90, 10, -1, -6, 5) .attr(ForceSwitchOutAttr), new AttackMove(Moves.INCINERATE, Type.FIRE, MoveCategory.SPECIAL, 60, 100, 15, -1, 0, 5) @@ -7879,10 +7997,10 @@ export function initMoves() { new AttackMove(Moves.VOLT_SWITCH, Type.ELECTRIC, MoveCategory.SPECIAL, 70, 100, 20, -1, 0, 5) .attr(ForceSwitchOutAttr, true, false), new AttackMove(Moves.STRUGGLE_BUG, Type.BUG, MoveCategory.SPECIAL, 50, 100, 20, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPATK, -1) + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.BULLDOZE, Type.GROUND, MoveCategory.PHYSICAL, 60, 100, 20, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .makesContact(false) .target(MoveTarget.ALL_NEAR_OTHERS), new AttackMove(Moves.FROST_BREATH, Type.ICE, MoveCategory.SPECIAL, 60, 90, 10, 100, 0, 5) @@ -7891,9 +8009,9 @@ export function initMoves() { .attr(ForceSwitchOutAttr) .hidesTarget(), new SelfStatusMove(Moves.WORK_UP, Type.NORMAL, -1, 30, -1, 0, 5) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], 1, true), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 1, true), new AttackMove(Moves.ELECTROWEB, Type.ELECTRIC, MoveCategory.SPECIAL, 55, 95, 15, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.WILD_CHARGE, Type.ELECTRIC, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 5) .attr(RecoilAttr) @@ -7908,10 +8026,10 @@ export function initMoves() { .attr(HitHealAttr) .triageMove(), new AttackMove(Moves.SACRED_SWORD, Type.FIGHTING, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 5) - .attr(IgnoreOpponentStatChangesAttr) + .attr(IgnoreOpponentStatStagesAttr) .slicingMove(), new AttackMove(Moves.RAZOR_SHELL, Type.WATER, MoveCategory.PHYSICAL, 75, 95, 10, 50, 0, 5) - .attr(StatChangeAttr, BattleStat.DEF, -1) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1) .slicingMove(), new AttackMove(Moves.HEAT_CRASH, Type.FIRE, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5) .attr(MinimizeAccuracyAttr) @@ -7919,13 +8037,13 @@ export function initMoves() { .attr(HitsTagAttr, BattlerTagType.MINIMIZED, true) .condition(failOnMaxCondition), new AttackMove(Moves.LEAF_TORNADO, Type.GRASS, MoveCategory.SPECIAL, 65, 90, 10, 50, 0, 5) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new AttackMove(Moves.STEAMROLLER, Type.BUG, MoveCategory.PHYSICAL, 65, 100, 20, 30, 0, 5) .attr(FlinchAttr), new SelfStatusMove(Moves.COTTON_GUARD, Type.GRASS, -1, 10, -1, 0, 5) - .attr(StatChangeAttr, BattleStat.DEF, 3, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 3, true), new AttackMove(Moves.NIGHT_DAZE, Type.DARK, MoveCategory.SPECIAL, 85, 95, 10, 40, 0, 5) - .attr(StatChangeAttr, BattleStat.ACC, -1), + .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new AttackMove(Moves.PSYSTRIKE, Type.PSYCHIC, MoveCategory.SPECIAL, 100, 100, 10, -1, 0, 5) .attr(DefDefAttr), new AttackMove(Moves.TAIL_SLAP, Type.NORMAL, MoveCategory.PHYSICAL, 25, 85, 10, -1, 0, 5) @@ -7954,14 +8072,14 @@ export function initMoves() { .attr(DefDefAttr) .slicingMove(), new AttackMove(Moves.GLACIATE, Type.ICE, MoveCategory.SPECIAL, 65, 95, 10, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.BOLT_STRIKE, Type.ELECTRIC, MoveCategory.PHYSICAL, 130, 85, 5, 20, 0, 5) .attr(StatusEffectAttr, StatusEffect.PARALYSIS), new AttackMove(Moves.BLUE_FLARE, Type.FIRE, MoveCategory.SPECIAL, 130, 85, 5, 20, 0, 5) .attr(StatusEffectAttr, StatusEffect.BURN), new AttackMove(Moves.FIERY_DANCE, Type.FIRE, MoveCategory.SPECIAL, 80, 100, 10, 50, 0, 5) - .attr(StatChangeAttr, BattleStat.SPATK, 1, true) + .attr(StatStageChangeAttr, [ Stat.SPATK ], 1, true) .danceMove(), new AttackMove(Moves.FREEZE_SHOCK, Type.ICE, MoveCategory.PHYSICAL, 140, 90, 5, 30, 0, 5) .attr(ChargeAttr, ChargeAnim.FREEZE_SHOCK_CHARGING, i18next.t("moveTriggers:becameCloakedInFreezingLight", {pokemonName: "{USER}"})) @@ -7972,14 +8090,14 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.BURN) .ignoresVirtual(), new AttackMove(Moves.SNARL, Type.DARK, MoveCategory.SPECIAL, 55, 95, 15, 100, 0, 5) - .attr(StatChangeAttr, BattleStat.SPATK, -1) + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1) .soundBased() .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.ICICLE_CRASH, Type.ICE, MoveCategory.PHYSICAL, 85, 90, 10, 30, 0, 5) .attr(FlinchAttr) .makesContact(false), new AttackMove(Moves.V_CREATE, Type.FIRE, MoveCategory.PHYSICAL, 180, 95, 5, -1, 0, 5) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF, BattleStat.SPD ], -1, true), + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF, Stat.SPD ], -1, true), new AttackMove(Moves.FUSION_FLARE, Type.FIRE, MoveCategory.SPECIAL, 100, 100, 5, -1, 0, 5) .attr(HealStatusEffectAttr, true, StatusEffect.FREEZE) .attr(LastMoveDoublePowerAttr, Moves.FUSION_BOLT), @@ -8003,12 +8121,12 @@ export function initMoves() { // If any fielded pokémon is grass-type and grounded. return [...user.scene.getEnemyParty(), ...user.scene.getParty()].some((poke) => poke.isOfType(Type.GRASS) && poke.isGrounded()); }) - .attr(StatChangeAttr, [BattleStat.ATK, BattleStat.SPATK], 1, false, (user, target, move) => target.isOfType(Type.GRASS) && target.isGrounded()), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 1, false, (user, target, move) => target.isOfType(Type.GRASS) && target.isGrounded()), new StatusMove(Moves.STICKY_WEB, Type.BUG, -1, 20, -1, 0, 6) .attr(AddArenaTrapTagAttr, ArenaTagType.STICKY_WEB) .target(MoveTarget.ENEMY_SIDE), new AttackMove(Moves.FELL_STINGER, Type.BUG, MoveCategory.PHYSICAL, 50, 100, 25, -1, 0, 6) - .attr(PostVictoryStatChangeAttr, BattleStat.ATK, 3, true ), + .attr(PostVictoryStatStageChangeAttr, [ Stat.ATK ], 3, true ), new AttackMove(Moves.PHANTOM_FORCE, Type.GHOST, MoveCategory.PHYSICAL, 90, 100, 10, -1, 0, 6) .attr(ChargeAttr, ChargeAnim.PHANTOM_FORCE_CHARGING, i18next.t("moveTriggers:vanishedInstantly", {pokemonName: "{USER}"}), BattlerTagType.HIDDEN) .ignoresProtect() @@ -8017,7 +8135,7 @@ export function initMoves() { .attr(AddTypeAttr, Type.GHOST) .partial(), new StatusMove(Moves.NOBLE_ROAR, Type.NORMAL, 100, 30, -1, 0, 6) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1) .soundBased(), new StatusMove(Moves.ION_DELUGE, Type.ELECTRIC, -1, 25, -1, 1, 6) .target(MoveTarget.BOTH_SIDES) @@ -8041,7 +8159,7 @@ export function initMoves() { .soundBased() .target(MoveTarget.ALL_NEAR_ENEMIES), new StatusMove(Moves.PARTING_SHOT, Type.DARK, 100, 20, -1, 0, 6) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY) .attr(ForceSwitchOutAttr, true, false) .soundBased(), new StatusMove(Moves.TOPSY_TURVY, Type.DARK, -1, 20, -1, 0, 6) @@ -8055,7 +8173,7 @@ export function initMoves() { .attr(AddArenaTagAttr, ArenaTagType.CRAFTY_SHIELD, 1, true, true), new StatusMove(Moves.FLOWER_SHIELD, Type.FAIRY, -1, 10, -1, 0, 6) .target(MoveTarget.ALL) - .attr(StatChangeAttr, BattleStat.DEF, 1, false, (user, target, move) => target.getTypes().includes(Type.GRASS) && !target.getTag(SemiInvulnerableTag)), + .attr(StatStageChangeAttr, [ Stat.DEF ], 1, false, (user, target, move) => target.getTypes().includes(Type.GRASS) && !target.getTag(SemiInvulnerableTag)), new StatusMove(Moves.GRASSY_TERRAIN, Type.GRASS, -1, 10, -1, 0, 6) .attr(TerrainChangeAttr, TerrainType.GRASSY) .target(MoveTarget.BOTH_SIDES), @@ -8065,11 +8183,11 @@ export function initMoves() { new StatusMove(Moves.ELECTRIFY, Type.ELECTRIC, -1, 20, -1, 0, 6) .unimplemented(), new AttackMove(Moves.PLAY_ROUGH, Type.FAIRY, MoveCategory.PHYSICAL, 90, 90, 10, 10, 0, 6) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new AttackMove(Moves.FAIRY_WIND, Type.FAIRY, MoveCategory.SPECIAL, 40, 100, 30, -1, 0, 6) .windMove(), new AttackMove(Moves.MOONBLAST, Type.FAIRY, MoveCategory.SPECIAL, 95, 100, 15, 30, 0, 6) - .attr(StatChangeAttr, BattleStat.SPATK, -1), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1), new AttackMove(Moves.BOOMBURST, Type.NORMAL, MoveCategory.SPECIAL, 140, 100, 10, -1, 0, 6) .soundBased() .target(MoveTarget.ALL_NEAR_OTHERS), @@ -8079,12 +8197,12 @@ export function initMoves() { new SelfStatusMove(Moves.KINGS_SHIELD, Type.STEEL, -1, 10, -1, 4, 6) .attr(ProtectAttr, BattlerTagType.KINGS_SHIELD), new StatusMove(Moves.PLAY_NICE, Type.NORMAL, -1, 20, -1, 0, 6) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new StatusMove(Moves.CONFIDE, Type.NORMAL, -1, 20, -1, 0, 6) - .attr(StatChangeAttr, BattleStat.SPATK, -1) + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1) .soundBased(), new AttackMove(Moves.DIAMOND_STORM, Type.ROCK, MoveCategory.PHYSICAL, 100, 95, 5, 50, 0, 6) - .attr(StatChangeAttr, BattleStat.DEF, 2, true) + .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true) .makesContact(false) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.STEAM_ERUPTION, Type.WATER, MoveCategory.SPECIAL, 110, 95, 5, 30, 0, 6) @@ -8098,26 +8216,26 @@ export function initMoves() { .attr(WaterShurikenPowerAttr) .attr(WaterShurikenMultiHitTypeAttr), new AttackMove(Moves.MYSTICAL_FIRE, Type.FIRE, MoveCategory.SPECIAL, 75, 100, 10, 100, 0, 6) - .attr(StatChangeAttr, BattleStat.SPATK, -1), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1), new SelfStatusMove(Moves.SPIKY_SHIELD, Type.GRASS, -1, 10, -1, 4, 6) .attr(ProtectAttr, BattlerTagType.SPIKY_SHIELD), new StatusMove(Moves.AROMATIC_MIST, Type.FAIRY, -1, 20, -1, 0, 6) - .attr(StatChangeAttr, BattleStat.SPDEF, 1) + .attr(StatStageChangeAttr, [ Stat.SPDEF ], 1) .target(MoveTarget.NEAR_ALLY), new StatusMove(Moves.EERIE_IMPULSE, Type.ELECTRIC, 100, 15, -1, 0, 6) - .attr(StatChangeAttr, BattleStat.SPATK, -2), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -2), new StatusMove(Moves.VENOM_DRENCH, Type.POISON, 100, 20, -1, 0, 6) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK, BattleStat.SPD ], -1, false, (user, target, move) => target.status?.effect === StatusEffect.POISON || target.status?.effect === StatusEffect.TOXIC) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK, Stat.SPD ], -1, false, (user, target, move) => target.status?.effect === StatusEffect.POISON || target.status?.effect === StatusEffect.TOXIC) .target(MoveTarget.ALL_NEAR_ENEMIES), new StatusMove(Moves.POWDER, Type.BUG, 100, 20, -1, 1, 6) .powderMove() .unimplemented(), new SelfStatusMove(Moves.GEOMANCY, Type.FAIRY, -1, 10, -1, 0, 6) .attr(ChargeAttr, ChargeAnim.GEOMANCY_CHARGING, i18next.t("moveTriggers:isChargingPower", {pokemonName: "{USER}"})) - .attr(StatChangeAttr, [ BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 2, true) + .attr(StatStageChangeAttr, [ Stat.SPATK, Stat.SPDEF, Stat.SPD ], 2, true) .ignoresVirtual(), new StatusMove(Moves.MAGNETIC_FLUX, Type.ELECTRIC, -1, 20, -1, 0, 6) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, false, (user, target, move) => !![ Abilities.PLUS, Abilities.MINUS].find(a => target.hasAbility(a, false))) + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], 1, false, (user, target, move) => !![ Abilities.PLUS, Abilities.MINUS].find(a => target.hasAbility(a, false))) .target(MoveTarget.USER_AND_ALLIES) .condition((user, target, move) => !![ user, user.getAlly() ].filter(p => p?.isActive()).find(p => !![ Abilities.PLUS, Abilities.MINUS].find(a => p.hasAbility(a, false)))), new StatusMove(Moves.HAPPY_HOUR, Type.NORMAL, -1, 30, -1, 0, 6) // No animation @@ -8132,7 +8250,7 @@ export function initMoves() { new StatusMove(Moves.HOLD_HANDS, Type.NORMAL, -1, 40, -1, 0, 6) .target(MoveTarget.NEAR_ALLY), new StatusMove(Moves.BABY_DOLL_EYES, Type.FAIRY, 100, 30, -1, 1, 6) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new AttackMove(Moves.NUZZLE, Type.ELECTRIC, MoveCategory.PHYSICAL, 20, 100, 20, 100, 0, 6) .attr(StatusEffectAttr, StatusEffect.PARALYSIS), new AttackMove(Moves.HOLD_BACK, Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 40, -1, 0, 6) @@ -8141,7 +8259,7 @@ export function initMoves() { .makesContact() .attr(TrapAttr, BattlerTagType.INFESTATION), new AttackMove(Moves.POWER_UP_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 40, 100, 20, 100, 0, 6) - .attr(StatChangeAttr, BattleStat.ATK, 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK ], 1, true) .punchingMove(), new AttackMove(Moves.OBLIVION_WING, Type.FLYING, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 6) .attr(HitHealAttr, 0.75) @@ -8172,9 +8290,9 @@ export function initMoves() { .makesContact(false) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.DRAGON_ASCENT, Type.FLYING, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 6) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true), + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true), new AttackMove(Moves.HYPERSPACE_FURY, Type.DARK, MoveCategory.PHYSICAL, 100, -1, 5, -1, 0, 6) - .attr(StatChangeAttr, BattleStat.DEF, -1, true) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1, true) .makesContact(false) .ignoresProtect(), /* Unused */ @@ -8301,13 +8419,13 @@ export function initMoves() { .attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, false, 1, 1, true) .makesContact(false), new AttackMove(Moves.DARKEST_LARIAT, Type.DARK, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 7) - .attr(IgnoreOpponentStatChangesAttr), + .attr(IgnoreOpponentStatStagesAttr), new AttackMove(Moves.SPARKLING_ARIA, Type.WATER, MoveCategory.SPECIAL, 90, 100, 10, 100, 0, 7) .attr(HealStatusEffectAttr, false, StatusEffect.BURN) .soundBased() .target(MoveTarget.ALL_NEAR_OTHERS), new AttackMove(Moves.ICE_HAMMER, Type.ICE, MoveCategory.PHYSICAL, 100, 90, 10, -1, 0, 7) - .attr(StatChangeAttr, BattleStat.SPD, -1, true) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1, true) .punchingMove(), new StatusMove(Moves.FLORAL_HEALING, Type.FAIRY, -1, 10, -1, 0, 7) .attr(BoostHealAttr, 0.5, 2/3, true, false, (user, target, move) => user.scene.arena.terrain?.terrainType === TerrainType.GRASSY) @@ -8315,8 +8433,8 @@ export function initMoves() { new AttackMove(Moves.HIGH_HORSEPOWER, Type.GROUND, MoveCategory.PHYSICAL, 95, 95, 10, -1, 0, 7), new StatusMove(Moves.STRENGTH_SAP, Type.GRASS, 100, 10, -1, 0, 7) .attr(HitHealAttr, null, Stat.ATK) - .attr(StatChangeAttr, BattleStat.ATK, -1) - .condition((user, target, move) => target.summonData.battleStats[BattleStat.ATK] > -6) + .attr(StatStageChangeAttr, [ Stat.ATK ], -1) + .condition((user, target, move) => target.getStatStage(Stat.ATK) > -6) .triageMove(), new AttackMove(Moves.SOLAR_BLADE, Type.GRASS, MoveCategory.PHYSICAL, 125, 100, 10, -1, 0, 7) .attr(SunlightChargeAttr, ChargeAnim.SOLAR_BLADE_CHARGING, i18next.t("moveTriggers:isGlowing", {pokemonName: "{USER}"})) @@ -8328,11 +8446,11 @@ export function initMoves() { .attr(AddBattlerTagAttr, BattlerTagType.CENTER_OF_ATTENTION, false), new StatusMove(Moves.TOXIC_THREAD, Type.POISON, 100, 20, -1, 0, 7) .attr(StatusEffectAttr, StatusEffect.POISON) - .attr(StatChangeAttr, BattleStat.SPD, -1), + .attr(StatStageChangeAttr, [ Stat.SPD ], -1), new SelfStatusMove(Moves.LASER_FOCUS, Type.NORMAL, -1, 30, -1, 0, 7) .attr(AddBattlerTagAttr, BattlerTagType.ALWAYS_CRIT, true, false), new StatusMove(Moves.GEAR_UP, Type.STEEL, -1, 20, -1, 0, 7) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], 1, false, (user, target, move) => !![ Abilities.PLUS, Abilities.MINUS].find(a => target.hasAbility(a, false))) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 1, false, (user, target, move) => !![ Abilities.PLUS, Abilities.MINUS].find(a => target.hasAbility(a, false))) .target(MoveTarget.USER_AND_ALLIES) .condition((user, target, move) => !![ user, user.getAlly() ].filter(p => p?.isActive()).find(p => !![ Abilities.PLUS, Abilities.MINUS].find(a => p.hasAbility(a, false)))), new AttackMove(Moves.THROAT_CHOP, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 15, 100, 0, 7) @@ -8347,11 +8465,11 @@ export function initMoves() { .attr(TerrainChangeAttr, TerrainType.PSYCHIC) .target(MoveTarget.BOTH_SIDES), new AttackMove(Moves.LUNGE, Type.BUG, MoveCategory.PHYSICAL, 80, 100, 15, 100, 0, 7) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new AttackMove(Moves.FIRE_LASH, Type.FIRE, MoveCategory.PHYSICAL, 80, 100, 15, 100, 0, 7) - .attr(StatChangeAttr, BattleStat.DEF, -1), + .attr(StatStageChangeAttr, [ Stat.DEF ], -1), new AttackMove(Moves.POWER_TRIP, Type.DARK, MoveCategory.PHYSICAL, 20, 100, 10, -1, 0, 7) - .attr(StatChangeCountPowerAttr), + .attr(PositiveStatStagePowerAttr), new AttackMove(Moves.BURN_UP, Type.FIRE, MoveCategory.SPECIAL, 130, 100, 5, -1, 0, 7) .condition((user) => { const userTypes = user.getTypes(true); @@ -8362,7 +8480,7 @@ export function initMoves() { user.scene.queueMessage(i18next.t("moveTriggers:burnedItselfOut", {pokemonName: getPokemonNameWithAffix(user)})); }), new StatusMove(Moves.SPEED_SWAP, Type.PSYCHIC, -1, 10, -1, 0, 7) - .unimplemented(), + .attr(SwapStatAttr, Stat.SPD), new AttackMove(Moves.SMART_STRIKE, Type.STEEL, MoveCategory.PHYSICAL, 70, -1, 10, -1, 0, 7), new StatusMove(Moves.PURIFY, Type.POISON, -1, 20, -1, 0, 7) .condition( @@ -8377,7 +8495,7 @@ export function initMoves() { .target(MoveTarget.ALL_NEAR_ENEMIES) .attr(SuppressAbilitiesIfActedAttr), new AttackMove(Moves.TROP_KICK, Type.GRASS, MoveCategory.PHYSICAL, 70, 100, 15, 100, 0, 7) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new StatusMove(Moves.INSTRUCT, Type.PSYCHIC, -1, 15, -1, 0, 7) .unimplemented(), new AttackMove(Moves.BEAK_BLAST, Type.FLYING, MoveCategory.PHYSICAL, 100, 100, 15, -1, -3, 7) @@ -8385,7 +8503,7 @@ export function initMoves() { .ballBombMove() .makesContact(false), new AttackMove(Moves.CLANGING_SCALES, Type.DRAGON, MoveCategory.SPECIAL, 110, 100, 5, -1, 0, 7) - .attr(StatChangeAttr, BattleStat.DEF, -1, true, null, true, false, MoveEffectTrigger.HIT, true) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1, true, null, true, false, MoveEffectTrigger.HIT, true) .soundBased() .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.DRAGON_HAMMER, Type.DRAGON, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 7), @@ -8419,7 +8537,7 @@ export function initMoves() { .partial() .ignoresVirtual(), new SelfStatusMove(Moves.EXTREME_EVOBOOST, Type.NORMAL, -1, 1, -1, 0, 7) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 2, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ], 2, true) .ignoresVirtual(), new AttackMove(Moves.GENESIS_SUPERNOVA, Type.PSYCHIC, MoveCategory.SPECIAL, 185, -1, 1, 100, 0, 7) .attr(TerrainChangeAttr, TerrainType.PSYCHIC) @@ -8431,18 +8549,18 @@ export function initMoves() { // Fails if the user was not hit by a physical attack during the turn .condition((user, target, move) => user.getTag(ShellTrapTag)?.activated === true), new AttackMove(Moves.FLEUR_CANNON, Type.FAIRY, MoveCategory.SPECIAL, 130, 90, 5, -1, 0, 7) - .attr(StatChangeAttr, BattleStat.SPATK, -2, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -2, true), new AttackMove(Moves.PSYCHIC_FANGS, Type.PSYCHIC, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 7) .bitingMove() .attr(RemoveScreensAttr), new AttackMove(Moves.STOMPING_TANTRUM, Type.GROUND, MoveCategory.PHYSICAL, 75, 100, 10, -1, 0, 7) .attr(MovePowerMultiplierAttr, (user, target, move) => user.getLastXMoves(2)[1]?.result === MoveResult.MISS || user.getLastXMoves(2)[1]?.result === MoveResult.FAIL ? 2 : 1), new AttackMove(Moves.SHADOW_BONE, Type.GHOST, MoveCategory.PHYSICAL, 85, 100, 10, 20, 0, 7) - .attr(StatChangeAttr, BattleStat.DEF, -1) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1) .makesContact(false), new AttackMove(Moves.ACCELEROCK, Type.ROCK, MoveCategory.PHYSICAL, 40, 100, 20, -1, 1, 7), new AttackMove(Moves.LIQUIDATION, Type.WATER, MoveCategory.PHYSICAL, 85, 100, 10, 20, 0, 7) - .attr(StatChangeAttr, BattleStat.DEF, -1), + .attr(StatStageChangeAttr, [ Stat.DEF ], -1), new AttackMove(Moves.PRISMATIC_LASER, Type.PSYCHIC, MoveCategory.SPECIAL, 160, 100, 10, -1, 0, 7) .attr(RechargeAttr), new AttackMove(Moves.SPECTRAL_THIEF, Type.GHOST, MoveCategory.PHYSICAL, 90, 100, 10, -1, 0, 7) @@ -8454,7 +8572,7 @@ export function initMoves() { .ignoresAbilities() .partial(), new StatusMove(Moves.TEARFUL_LOOK, Type.NORMAL, -1, 20, -1, 0, 7) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1), new AttackMove(Moves.ZING_ZAP, Type.ELECTRIC, MoveCategory.PHYSICAL, 80, 100, 10, 30, 0, 7) .attr(FlinchAttr), new AttackMove(Moves.NATURES_MADNESS, Type.FAIRY, MoveCategory.SPECIAL, -1, 90, 10, -1, 0, 7) @@ -8496,7 +8614,7 @@ export function initMoves() { .makesContact(false) .ignoresVirtual(), new AttackMove(Moves.CLANGOROUS_SOULBLAZE, Type.DRAGON, MoveCategory.SPECIAL, 185, -1, 1, 100, 0, 7) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ], 1, true) .soundBased() .target(MoveTarget.ALL_NEAR_ENEMIES) .partial() @@ -8563,18 +8681,18 @@ export function initMoves() { .bitingMove(), new SelfStatusMove(Moves.STUFF_CHEEKS, Type.NORMAL, -1, 10, -1, 0, 8) // TODO: Stuff Cheeks should not be selectable when the user does not have a berry, see wiki .attr(EatBerryAttr) - .attr(StatChangeAttr, BattleStat.DEF, 2, true) + .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true) .condition((user) => { const userBerries = user.scene.findModifiers(m => m instanceof BerryModifier, user.isPlayer()); return userBerries.length > 0; }) .partial(), new SelfStatusMove(Moves.NO_RETREAT, Type.FIGHTING, -1, 5, -1, 0, 8) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ], 1, true) .attr(AddBattlerTagAttr, BattlerTagType.NO_RETREAT, true, false) .condition((user, target, move) => user.getTag(TrappedTag)?.sourceMove !== Moves.NO_RETREAT), // fails if the user is currently trapped by No Retreat new StatusMove(Moves.TAR_SHOT, Type.ROCK, 100, 15, -1, 0, 8) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .partial(), new StatusMove(Moves.MAGIC_POWDER, Type.PSYCHIC, 100, 20, -1, 0, 8) .attr(ChangeTypeAttr, Type.PSYCHIC) @@ -8669,16 +8787,16 @@ export function initMoves() { .ignoresVirtual(), /* End Unused */ new SelfStatusMove(Moves.CLANGOROUS_SOUL, Type.DRAGON, 100, 5, -1, 0, 8) - .attr(CutHpStatBoostAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, 3) + .attr(CutHpStatStageBoostAttr, [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ], 1, 3) .soundBased() .danceMove(), new AttackMove(Moves.BODY_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 8) .attr(DefAtkAttr), new StatusMove(Moves.DECORATE, Type.FAIRY, -1, 15, -1, 0, 8) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], 2) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 2) .ignoresProtect(), new AttackMove(Moves.DRUM_BEATING, Type.GRASS, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .makesContact(false), new AttackMove(Moves.SNAP_TRAP, Type.GRASS, MoveCategory.PHYSICAL, 35, 100, 15, -1, 0, 8) .attr(TrapAttr, BattlerTagType.SNAP_TRAP), @@ -8691,25 +8809,25 @@ export function initMoves() { .slicingMove(), new AttackMove(Moves.BEHEMOTH_BASH, Type.STEEL, MoveCategory.PHYSICAL, 100, 100, 5, -1, 0, 8), new AttackMove(Moves.AURA_WHEEL, Type.ELECTRIC, MoveCategory.PHYSICAL, 110, 100, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.SPD, 1, true) + .attr(StatStageChangeAttr, [ Stat.SPD ], 1, true) .makesContact(false) .attr(AuraWheelTypeAttr) .condition((user, target, move) => [user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.MORPEKO)), // Missing custom fail message new AttackMove(Moves.BREAKING_SWIPE, Type.DRAGON, MoveCategory.PHYSICAL, 60, 100, 15, 100, 0, 8) .target(MoveTarget.ALL_NEAR_ENEMIES) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new AttackMove(Moves.BRANCH_POKE, Type.GRASS, MoveCategory.PHYSICAL, 40, 100, 40, -1, 0, 8), new AttackMove(Moves.OVERDRIVE, Type.ELECTRIC, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 8) .soundBased() .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.APPLE_ACID, Type.GRASS, MoveCategory.SPECIAL, 80, 100, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.SPDEF, -1), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1), new AttackMove(Moves.GRAV_APPLE, Type.GRASS, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.DEF, -1) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1) .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTag(ArenaTagType.GRAVITY) ? 1.5 : 1) .makesContact(false), new AttackMove(Moves.SPIRIT_BREAK, Type.FAIRY, MoveCategory.PHYSICAL, 75, 100, 15, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.SPATK, -1), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1), new AttackMove(Moves.STRANGE_STEAM, Type.FAIRY, MoveCategory.SPECIAL, 90, 95, 10, 20, 0, 8) .attr(ConfuseAttr), new StatusMove(Moves.LIFE_DEW, Type.WATER, -1, 10, -1, 0, 8) @@ -8733,14 +8851,14 @@ export function initMoves() { .attr(ClearTerrainAttr) .condition((user, target, move) => !!user.scene.arena.terrain), new AttackMove(Moves.SCALE_SHOT, Type.DRAGON, MoveCategory.PHYSICAL, 25, 90, 20, -1, 0, 8) - //.attr(StatChangeAttr, BattleStat.SPD, 1, true) // TODO: Have boosts only apply at end of move, not after every hit - //.attr(StatChangeAttr, BattleStat.DEF, -1, true) + //.attr(StatStageChangeAttr, Stat.SPD, 1, true) // TODO: Have boosts only apply at end of move, not after every hit + //.attr(StatStageChangeAttr, Stat.DEF, -1, true) .attr(MultiHitAttr) .makesContact(false) .partial(), new AttackMove(Moves.METEOR_BEAM, Type.ROCK, MoveCategory.SPECIAL, 120, 90, 10, 100, 0, 8) .attr(ChargeAttr, ChargeAnim.METEOR_BEAM_CHARGING, i18next.t("moveTriggers:isOverflowingWithSpacePower", {pokemonName: "{USER}"}), null, true) - .attr(StatChangeAttr, BattleStat.SPATK, 1, true) + .attr(StatStageChangeAttr, [ Stat.SPATK ], 1, true) .ignoresVirtual(), new AttackMove(Moves.SHELL_SIDE_ARM, Type.POISON, MoveCategory.SPECIAL, 90, 100, 10, 20, 0, 8) .attr(ShellSideArmCategoryAttr) @@ -8761,12 +8879,12 @@ export function initMoves() { .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() !== TerrainType.NONE && user.isGrounded() ? 2 : 1) .pulseMove(), new AttackMove(Moves.SKITTER_SMACK, Type.BUG, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.SPATK, -1), + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1), new AttackMove(Moves.BURNING_JEALOUSY, Type.FIRE, MoveCategory.SPECIAL, 70, 100, 5, 100, 0, 8) .attr(StatusIfBoostedAttr, StatusEffect.BURN) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.LASH_OUT, Type.DARK, MoveCategory.PHYSICAL, 75, 100, 5, -1, 0, 8) - .attr(MovePowerMultiplierAttr, (user, target, move) => user.turnData.battleStatsDecreased ? 2 : 1), + .attr(MovePowerMultiplierAttr, (user, _target, _move) => user.turnData.statStagesDecreased ? 2 : 1), new AttackMove(Moves.POLTERGEIST, Type.GHOST, MoveCategory.PHYSICAL, 110, 90, 5, -1, 0, 8) .attr(AttackedByItemAttr) .makesContact(false), @@ -8774,7 +8892,7 @@ export function initMoves() { .target(MoveTarget.ALL_NEAR_OTHERS) .unimplemented(), new StatusMove(Moves.COACHING, Type.FIGHTING, -1, 10, -1, 0, 8) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], 1) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF ], 1) .target(MoveTarget.NEAR_ALLY), new AttackMove(Moves.FLIP_TURN, Type.WATER, MoveCategory.PHYSICAL, 60, 100, 20, -1, 0, 8) .attr(ForceSwitchOutAttr, true, false), @@ -8810,7 +8928,7 @@ export function initMoves() { .attr(FlinchAttr) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.THUNDEROUS_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 90, 100, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.DEF, -1), + .attr(StatStageChangeAttr, [ Stat.DEF ], -1), new AttackMove(Moves.GLACIAL_LANCE, Type.ICE, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 8) .target(MoveTarget.ALL_NEAR_ENEMIES) .makesContact(false), @@ -8822,18 +8940,18 @@ export function initMoves() { new AttackMove(Moves.DIRE_CLAW, Type.POISON, MoveCategory.PHYSICAL, 80, 100, 15, 50, 0, 8) .attr(MultiStatusEffectAttr, [StatusEffect.POISON, StatusEffect.PARALYSIS, StatusEffect.SLEEP]), new AttackMove(Moves.PSYSHIELD_BASH, Type.PSYCHIC, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.DEF, 1, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true), new SelfStatusMove(Moves.POWER_SHIFT, Type.NORMAL, -1, 10, -1, 0, 8) .unimplemented(), new AttackMove(Moves.STONE_AXE, Type.ROCK, MoveCategory.PHYSICAL, 65, 90, 15, 100, 0, 8) .attr(AddArenaTrapTagHitAttr, ArenaTagType.STEALTH_ROCK) .slicingMove(), new AttackMove(Moves.SPRINGTIDE_STORM, Type.FAIRY, MoveCategory.SPECIAL, 100, 80, 5, 30, 0, 8) - .attr(StatChangeAttr, BattleStat.ATK, -1) + .attr(StatStageChangeAttr, [ Stat.ATK ], -1) .windMove() .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.MYSTICAL_POWER, Type.PSYCHIC, MoveCategory.SPECIAL, 70, 90, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.SPATK, 1, true), + .attr(StatStageChangeAttr, [ Stat.SPATK ], 1, true), new AttackMove(Moves.RAGING_FURY, Type.FIRE, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 8) .makesContact(false) .attr(FrenzyAttr) @@ -8849,10 +8967,10 @@ export function initMoves() { .makesContact(false) .attr(FlinchAttr), new SelfStatusMove(Moves.VICTORY_DANCE, Type.FIGHTING, -1, 10, -1, 0, 8) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPD ], 1, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.DEF, Stat.SPD ], 1, true) .danceMove(), new AttackMove(Moves.HEADLONG_RUSH, Type.GROUND, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 8) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true) + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true) .punchingMove(), new AttackMove(Moves.BARB_BARRAGE, Type.POISON, MoveCategory.PHYSICAL, 60, 100, 10, 50, 0, 8) .makesContact(false) @@ -8860,15 +8978,15 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.POISON), new AttackMove(Moves.ESPER_WING, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 10, 100, 0, 8) .attr(HighCritAttr) - .attr(StatChangeAttr, BattleStat.SPD, 1, true), + .attr(StatStageChangeAttr, [ Stat.SPD ], 1, true), new AttackMove(Moves.BITTER_MALICE, Type.GHOST, MoveCategory.SPECIAL, 75, 100, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new SelfStatusMove(Moves.SHELTER, Type.STEEL, -1, 10, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.DEF, 2, true), + .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true), new AttackMove(Moves.TRIPLE_ARROWS, Type.FIGHTING, MoveCategory.PHYSICAL, 90, 100, 10, 30, 0, 8) .makesContact(false) .attr(HighCritAttr) - .attr(StatChangeAttr, BattleStat.DEF, -1) + .attr(StatStageChangeAttr, [ Stat.DEF ], -1) .attr(FlinchAttr) .partial(), new AttackMove(Moves.INFERNAL_PARADE, Type.GHOST, MoveCategory.SPECIAL, 60, 100, 15, 30, 0, 8) @@ -8879,7 +8997,7 @@ export function initMoves() { .slicingMove(), new AttackMove(Moves.BLEAKWIND_STORM, Type.FLYING, MoveCategory.SPECIAL, 100, 80, 10, 30, 0, 8) .attr(StormAccuracyAttr) - .attr(StatChangeAttr, BattleStat.SPD, -1) + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) .windMove() .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.WILDBOLT_STORM, Type.ELECTRIC, MoveCategory.SPECIAL, 100, 80, 10, 20, 0, 8) @@ -8898,7 +9016,7 @@ export function initMoves() { .target(MoveTarget.USER_AND_ALLIES) .triageMove(), new SelfStatusMove(Moves.TAKE_HEART, Type.PSYCHIC, -1, 10, -1, 0, 8) - .attr(StatChangeAttr, [ BattleStat.SPATK, BattleStat.SPDEF ], 1, true) + .attr(StatStageChangeAttr, [ Stat.SPATK, Stat.SPDEF ], 1, true) .attr(HealStatusEffectAttr, true, StatusEffect.PARALYSIS, StatusEffect.POISON, StatusEffect.TOXIC, StatusEffect.BURN, StatusEffect.SLEEP), /* Unused new AttackMove(Moves.G_MAX_WILDFIRE, Type.FIRE, MoveCategory.PHYSICAL, 10, -1, 10, -1, 0, 8) @@ -9005,7 +9123,7 @@ export function initMoves() { .attr(TeraBlastCategoryAttr) .attr(TeraBlastTypeAttr) .attr(TeraBlastPowerAttr) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1, true, (user, target, move) => user.isTerastallized() && user.isOfType(Type.STELLAR)) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1, true, (user, target, move) => user.isTerastallized() && user.isOfType(Type.STELLAR)) .partial(), new SelfStatusMove(Moves.SILK_TRAP, Type.BUG, -1, 10, -1, 4, 9) .attr(ProtectAttr, BattlerTagType.SILK_TRAP), @@ -9018,17 +9136,17 @@ export function initMoves() { .attr(MovePowerMultiplierAttr, (user, target, move) => 1 + Math.min(user.isPlayer() ? user.scene.currentBattle.playerFaints : user.scene.currentBattle.enemyFaints, 100)) .makesContact(false), new AttackMove(Moves.LUMINA_CRASH, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 10, 100, 0, 9) - .attr(StatChangeAttr, BattleStat.SPDEF, -2), + .attr(StatStageChangeAttr, [ Stat.SPDEF ], -2), new AttackMove(Moves.ORDER_UP, Type.DRAGON, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 9) .makesContact(false) .partial(), new AttackMove(Moves.JET_PUNCH, Type.WATER, MoveCategory.PHYSICAL, 60, 100, 15, -1, 1, 9) .punchingMove(), new StatusMove(Moves.SPICY_EXTRACT, Type.GRASS, -1, 15, -1, 0, 9) - .attr(StatChangeAttr, BattleStat.ATK, 2) - .attr(StatChangeAttr, BattleStat.DEF, -2), + .attr(StatStageChangeAttr, [ Stat.ATK ], 2) + .attr(StatStageChangeAttr, [ Stat.DEF ], -2), new AttackMove(Moves.SPIN_OUT, Type.STEEL, MoveCategory.PHYSICAL, 100, 100, 5, -1, 0, 9) - .attr(StatChangeAttr, BattleStat.SPD, -2, true), + .attr(StatStageChangeAttr, [ Stat.SPD ], -2, true), new AttackMove(Moves.POPULATION_BOMB, Type.NORMAL, MoveCategory.PHYSICAL, 20, 90, 10, -1, 0, 9) .attr(MultiHitAttr, MultiHitType._10) .slicingMove() @@ -9070,24 +9188,24 @@ export function initMoves() { new StatusMove(Moves.DOODLE, Type.NORMAL, 100, 10, -1, 0, 9) .attr(AbilityCopyAttr, true), new SelfStatusMove(Moves.FILLET_AWAY, Type.NORMAL, -1, 10, -1, 0, 9) - .attr(CutHpStatBoostAttr, [ BattleStat.ATK, BattleStat.SPATK, BattleStat.SPD ], 2, 2), + .attr(CutHpStatStageBoostAttr, [ Stat.ATK, Stat.SPATK, Stat.SPD ], 2, 2), new AttackMove(Moves.KOWTOW_CLEAVE, Type.DARK, MoveCategory.PHYSICAL, 85, -1, 10, -1, 0, 9) .slicingMove(), new AttackMove(Moves.FLOWER_TRICK, Type.GRASS, MoveCategory.PHYSICAL, 70, -1, 10, 100, 0, 9) .attr(CritOnlyAttr) .makesContact(false), new AttackMove(Moves.TORCH_SONG, Type.FIRE, MoveCategory.SPECIAL, 80, 100, 10, 100, 0, 9) - .attr(StatChangeAttr, BattleStat.SPATK, 1, true) + .attr(StatStageChangeAttr, [ Stat.SPATK ], 1, true) .soundBased(), new AttackMove(Moves.AQUA_STEP, Type.WATER, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 9) - .attr(StatChangeAttr, BattleStat.SPD, 1, true) + .attr(StatStageChangeAttr, [ Stat.SPD ], 1, true) .danceMove(), new AttackMove(Moves.RAGING_BULL, Type.NORMAL, MoveCategory.PHYSICAL, 90, 100, 10, -1, 0, 9) .attr(RagingBullTypeAttr) .attr(RemoveScreensAttr), new AttackMove(Moves.MAKE_IT_RAIN, Type.STEEL, MoveCategory.SPECIAL, 120, 100, 5, -1, 0, 9) .attr(MoneyAttr) - .attr(StatChangeAttr, BattleStat.SPATK, -1, true, null, true, false, MoveEffectTrigger.HIT, true) + .attr(StatStageChangeAttr, [ Stat.SPATK ], -1, true, null, true, false, MoveEffectTrigger.HIT, true) .target(MoveTarget.ALL_NEAR_ENEMIES), new AttackMove(Moves.PSYBLADE, Type.PSYCHIC, MoveCategory.PHYSICAL, 80, 100, 15, -1, 0, 9) .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.ELECTRIC && user.isGrounded() ? 1.5 : 1) @@ -9109,17 +9227,17 @@ export function initMoves() { .attr(ForceSwitchOutAttr, true, false) .target(MoveTarget.BOTH_SIDES), new SelfStatusMove(Moves.TIDY_UP, Type.NORMAL, -1, 10, -1, 0, 9) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPD ], 1, true, null, true, true) + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPD ], 1, true, null, true, true) .attr(RemoveArenaTrapAttr, true), new StatusMove(Moves.SNOWSCAPE, Type.ICE, -1, 10, -1, 0, 9) .attr(WeatherChangeAttr, WeatherType.SNOW) .target(MoveTarget.BOTH_SIDES), new AttackMove(Moves.POUNCE, Type.BUG, MoveCategory.PHYSICAL, 50, 100, 20, 100, 0, 9) - .attr(StatChangeAttr, BattleStat.SPD, -1), + .attr(StatStageChangeAttr, [ Stat.SPD ], -1), new AttackMove(Moves.TRAILBLAZE, Type.GRASS, MoveCategory.PHYSICAL, 50, 100, 20, 100, 0, 9) - .attr(StatChangeAttr, BattleStat.SPD, 1, true), + .attr(StatStageChangeAttr, [ Stat.SPD ], 1, true), new AttackMove(Moves.CHILLING_WATER, Type.WATER, MoveCategory.SPECIAL, 50, 100, 20, 100, 0, 9) - .attr(StatChangeAttr, BattleStat.ATK, -1), + .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new AttackMove(Moves.HYPER_DRILL, Type.NORMAL, MoveCategory.PHYSICAL, 100, 100, 5, -1, 0, 9) .ignoresProtect(), new AttackMove(Moves.TWIN_BEAM, Type.PSYCHIC, MoveCategory.SPECIAL, 40, 100, 10, -1, 0, 9) @@ -9128,7 +9246,7 @@ export function initMoves() { .attr(HitCountPowerAttr) .punchingMove(), new AttackMove(Moves.ARMOR_CANNON, Type.FIRE, MoveCategory.SPECIAL, 120, 100, 5, -1, 0, 9) - .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true), + .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true), new AttackMove(Moves.BITTER_BLADE, Type.FIRE, MoveCategory.PHYSICAL, 90, 100, 10, -1, 0, 9) .attr(HitHealAttr) .slicingMove() @@ -9183,7 +9301,7 @@ export function initMoves() { .target(MoveTarget.ALL_NEAR_ENEMIES) .triageMove(), new AttackMove(Moves.SYRUP_BOMB, Type.GRASS, MoveCategory.SPECIAL, 60, 85, 10, -1, 0, 9) - .attr(StatChangeAttr, BattleStat.SPD, -1) //Temporary + .attr(StatStageChangeAttr, [ Stat.SPD ], -1) //Temporary .ballBombMove() .partial(), new AttackMove(Moves.IVY_CUDGEL, Type.GRASS, MoveCategory.PHYSICAL, 100, 100, 10, -1, 0, 9) @@ -9235,7 +9353,7 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.TOXIC) ); allMoves.map(m => { - if (m.getAttrs(StatChangeAttr).some(a => a.selfTarget && a.levels < 0)) { + if (m.getAttrs(StatStageChangeAttr).some(a => a.selfTarget && a.stages < 0)) { selfStatLowerMoves.push(m.id); } }); diff --git a/src/data/nature.ts b/src/data/nature.ts index 72e5bb7863c..c614be465c3 100644 --- a/src/data/nature.ts +++ b/src/data/nature.ts @@ -1,9 +1,9 @@ -import { Stat, getStatName } from "./pokemon-stat"; import * as Utils from "../utils"; import { TextStyle, getBBCodeFrag } from "../ui/text"; import { Nature } from "#enums/nature"; import { UiTheme } from "#enums/ui-theme"; import i18next from "i18next"; +import { Stat, EFFECTIVE_STATS, getShortenedStatKey } from "#app/enums/stat"; export { Nature }; @@ -14,10 +14,9 @@ export function getNatureName(nature: Nature, includeStatEffects: boolean = fals ret = i18next.t("nature:" + ret as any); } if (includeStatEffects) { - const stats = Utils.getEnumValues(Stat).slice(1); let increasedStat: Stat | null = null; let decreasedStat: Stat | null = null; - for (const stat of stats) { + for (const stat of EFFECTIVE_STATS) { const multiplier = getNatureStatMultiplier(nature, stat); if (multiplier > 1) { increasedStat = stat; @@ -28,7 +27,7 @@ export function getNatureName(nature: Nature, includeStatEffects: boolean = fals const textStyle = forStarterSelect ? TextStyle.SUMMARY_ALT : TextStyle.WINDOW; const getTextFrag = !ignoreBBCode ? (text: string, style: TextStyle) => getBBCodeFrag(text, style, uiTheme) : (text: string, style: TextStyle) => text; if (increasedStat && decreasedStat) { - ret = `${getTextFrag(`${ret}${!forStarterSelect ? "\n" : " "}(`, textStyle)}${getTextFrag(`+${getStatName(increasedStat, true)}`, TextStyle.SUMMARY_PINK)}${getTextFrag("/", textStyle)}${getTextFrag(`-${getStatName(decreasedStat, true)}`, TextStyle.SUMMARY_BLUE)}${getTextFrag(")", textStyle)}`; + ret = `${getTextFrag(`${ret}${!forStarterSelect ? "\n" : " "}(`, textStyle)}${getTextFrag(`+${i18next.t(getShortenedStatKey(increasedStat))}`, TextStyle.SUMMARY_PINK)}${getTextFrag("/", textStyle)}${getTextFrag(`-${i18next.t(getShortenedStatKey(decreasedStat))}`, TextStyle.SUMMARY_BLUE)}${getTextFrag(")", textStyle)}`; } else { ret = getTextFrag(`${ret}${!forStarterSelect ? "\n" : " "}(-)`, textStyle); } diff --git a/src/data/pokemon-evolutions.ts b/src/data/pokemon-evolutions.ts index 315e75e53e1..6479d620182 100644 --- a/src/data/pokemon-evolutions.ts +++ b/src/data/pokemon-evolutions.ts @@ -1,7 +1,7 @@ import { Gender } from "./gender"; import { PokeballType } from "./pokeball"; import Pokemon from "../field/pokemon"; -import { Stat } from "./pokemon-stat"; +import { Stat } from "#enums/stat"; import { Type } from "./type"; import * as Utils from "../utils"; import { SpeciesFormKey } from "./pokemon-species"; diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 17f2de794ae..8930c7053a3 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -14,7 +14,7 @@ import { GrowthRate } from "./exp"; import { EvolutionLevel, SpeciesWildEvolutionDelay, pokemonEvolutions, pokemonPrevolutions } from "./pokemon-evolutions"; import { Type } from "./type"; import { LevelMoves, pokemonFormLevelMoves, pokemonFormLevelMoves as pokemonSpeciesFormLevelMoves, pokemonSpeciesLevelMoves } from "./pokemon-level-moves"; -import { Stat } from "./pokemon-stat"; +import { Stat } from "#enums/stat"; import { Variant, VariantSet, variantColorCache, variantData } from "./variant"; export enum Region { diff --git a/src/data/pokemon-stat.ts b/src/data/pokemon-stat.ts deleted file mode 100644 index 16570785a62..00000000000 --- a/src/data/pokemon-stat.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Stat } from "#enums/stat"; -import i18next from "i18next"; - -export { Stat }; - -export function getStatName(stat: Stat, shorten: boolean = false) { - let ret: string = ""; - switch (stat) { - case Stat.HP: - ret = !shorten ? i18next.t("pokemonInfo:Stat.HP") : i18next.t("pokemonInfo:Stat.HPshortened"); - break; - case Stat.ATK: - ret = !shorten ? i18next.t("pokemonInfo:Stat.ATK") : i18next.t("pokemonInfo:Stat.ATKshortened"); - break; - case Stat.DEF: - ret = !shorten ? i18next.t("pokemonInfo:Stat.DEF") : i18next.t("pokemonInfo:Stat.DEFshortened"); - break; - case Stat.SPATK: - ret = !shorten ? i18next.t("pokemonInfo:Stat.SPATK") : i18next.t("pokemonInfo:Stat.SPATKshortened"); - break; - case Stat.SPDEF: - ret = !shorten ? i18next.t("pokemonInfo:Stat.SPDEF") : i18next.t("pokemonInfo:Stat.SPDEFshortened"); - break; - case Stat.SPD: - ret = !shorten ? i18next.t("pokemonInfo:Stat.SPD") : i18next.t("pokemonInfo:Stat.SPDshortened"); - break; - } - return ret; -} diff --git a/src/data/temp-battle-stat.ts b/src/data/temp-battle-stat.ts deleted file mode 100644 index 2d461a1d647..00000000000 --- a/src/data/temp-battle-stat.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BattleStat, getBattleStatName } from "./battle-stat"; -import i18next from "i18next"; - -export enum TempBattleStat { - ATK, - DEF, - SPATK, - SPDEF, - SPD, - ACC, - CRIT -} - -export function getTempBattleStatName(tempBattleStat: TempBattleStat) { - if (tempBattleStat === TempBattleStat.CRIT) { - return i18next.t("modifierType:TempBattleStatBoosterStatName.CRIT"); - } - return getBattleStatName(tempBattleStat as integer as BattleStat); -} - -export function getTempBattleStatBoosterItemName(tempBattleStat: TempBattleStat) { - switch (tempBattleStat) { - case TempBattleStat.ATK: - return "X Attack"; - case TempBattleStat.DEF: - return "X Defense"; - case TempBattleStat.SPATK: - return "X Sp. Atk"; - case TempBattleStat.SPDEF: - return "X Sp. Def"; - case TempBattleStat.SPD: - return "X Speed"; - case TempBattleStat.ACC: - return "X Accuracy"; - case TempBattleStat.CRIT: - return "Dire Hit"; - } -} diff --git a/src/enums/stat.ts b/src/enums/stat.ts index a40319664d6..a12d53e8559 100644 --- a/src/enums/stat.ts +++ b/src/enums/stat.ts @@ -1,8 +1,75 @@ +/** Enum that comprises all possible stat-related attributes, in-battle and permanent, of a Pokemon. */ export enum Stat { + /** Hit Points */ HP = 0, + /** Attack */ ATK, + /** Defense */ DEF, + /** Special Attack */ SPATK, + /** Special Defense */ SPDEF, + /** Speed */ SPD, + /** Accuracy */ + ACC, + /** Evasiveness */ + EVA +} + +/** A constant array comprised of the {@linkcode Stat} values that make up {@linkcode PermanentStat}. */ +export const PERMANENT_STATS = [ Stat.HP, Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ] as const; +/** Type used to describe the core, permanent stats of a Pokemon. */ +export type PermanentStat = typeof PERMANENT_STATS[number]; + +/** A constant array comprised of the {@linkcode Stat} values that make up {@linkcode EFfectiveStat}. */ +export const EFFECTIVE_STATS = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ] as const; +/** Type used to describe the intersection of core stats and stats that have stages in battle. */ +export type EffectiveStat = typeof EFFECTIVE_STATS[number]; + +/** A constant array comprised of {@linkcode Stat} the values that make up {@linkcode BattleStat}. */ +export const BATTLE_STATS = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD, Stat.ACC, Stat.EVA ] as const; +/** Type used to describe the stats that have stages which can be incremented and decremented in battle. */ +export type BattleStat = typeof BATTLE_STATS[number]; + +/** A constant array comprised of {@linkcode Stat} the values that make up {@linkcode TempBattleStat}. */ +export const TEMP_BATTLE_STATS = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD, Stat.ACC ] as const; +/** Type used to describe the stats that have X item (`TEMP_STAT_STAGE_BOOSTER`) equivalents. */ +export type TempBattleStat = typeof TEMP_BATTLE_STATS[number]; + +/** + * Provides the translation key corresponding to the amount of stat stages and whether those stat stages + * are positive or negative. + * @param stages the amount of stages + * @param isIncrease dictates a negative (`false`) or a positive (`true`) stat stage change + * @returns the translation key fitting the conditions described by {@linkcode stages} and {@linkcode isIncrease} + */ +export function getStatStageChangeDescriptionKey(stages: number, isIncrease: boolean) { + if (stages === 1) { + return isIncrease ? "battle:statRose" : "battle:statFell"; + } else if (stages === 2) { + return isIncrease ? "battle:statSharplyRose" : "battle:statHarshlyFell"; + } else if (stages <= 6) { + return isIncrease ? "battle:statRoseDrastically" : "battle:statSeverelyFell"; + } + return isIncrease ? "battle:statWontGoAnyHigher" : "battle:statWontGoAnyLower"; +} + +/** + * Provides the translation key corresponding to a given stat which can be translated into its full name. + * @param stat the {@linkcode Stat} to be translated + * @returns the translation key corresponding to the given {@linkcode Stat} + */ +export function getStatKey(stat: Stat) { + return `pokemonInfo:Stat.${Stat[stat]}`; +} + +/** + * Provides the translation key corresponding to a given stat which can be translated into its shortened name. + * @param stat the {@linkcode Stat} to be translated + * @returns the translation key corresponding to the given {@linkcode Stat} + */ +export function getShortenedStatKey(stat: PermanentStat) { + return `pokemonInfo:Stat.${Stat[stat]}shortened`; } diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index e303b599973..405a26d4a16 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3,26 +3,24 @@ import BattleScene, { AnySound } from "../battle-scene"; import { Variant, VariantSet, variantColorCache } from "#app/data/variant"; import { variantData } from "#app/data/variant"; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from "../ui/battle-info"; -import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, VariableMoveTypeAttr, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr, SacrificialAttrOnHit, OneHitKOAccuracyAttr, RespectAttackTypeImmunityAttr } from "../data/move"; +import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, VariableMoveTypeAttr, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatStagesAttr, SacrificialAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatStageChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr, SacrificialAttrOnHit, OneHitKOAccuracyAttr, RespectAttackTypeImmunityAttr } from "../data/move"; import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from "../data/pokemon-species"; import { Constructor } from "#app/utils"; import * as Utils from "../utils"; import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from "../data/type"; import { getLevelTotalExp } from "../data/exp"; -import { Stat } from "../data/pokemon-stat"; -import { DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, EnemyEndureChanceModifier, EnemyFusionChanceModifier, HiddenAbilityRateBoosterModifier, PokemonBaseStatModifier, PokemonFriendshipBoosterModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempBattleStatBoosterModifier, StatBoosterModifier, CritBoosterModifier, TerastallizeModifier } from "../modifier/modifier"; +import { Stat, type PermanentStat, type BattleStat, type EffectiveStat, PERMANENT_STATS, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; +import { DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, EnemyEndureChanceModifier, EnemyFusionChanceModifier, HiddenAbilityRateBoosterModifier, BaseStatModifier, PokemonFriendshipBoosterModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempStatStageBoosterModifier, TempCritBoosterModifier, StatBoosterModifier, CritBoosterModifier, TerastallizeModifier } from "../modifier/modifier"; import { PokeballType } from "../data/pokeball"; import { Gender } from "../data/gender"; import { initMoveAnim, loadMoveAnimAssets } from "../data/battle-anims"; import { Status, StatusEffect, getRandomStatus } from "../data/status-effect"; import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition, FusionSpeciesFormEvolution } from "../data/pokemon-evolutions"; import { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "../data/tms"; -import { BattleStat } from "../data/battle-stat"; import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, ExposedTag, DragonCheerTag, CritBoostTag, TrappedTag } from "../data/battler-tags"; import { WeatherType } from "../data/weather"; -import { TempBattleStat } from "../data/temp-battle-stat"; import { ArenaTagSide, NoCritTag, WeakenMoveScreenTag } from "../data/arena-tag"; -import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr, ConditionalCritAbAttr, applyFieldBattleStatMultiplierAbAttrs, FieldMultiplyBattleStatAbAttr, AddSecondStrikeAbAttr, IgnoreOpponentEvasionAbAttr, UserFieldStatusEffectImmunityAbAttr, UserFieldBattlerTagImmunityAbAttr, BattlerTagImmunityAbAttr, MoveTypeChangeAbAttr, FullHpResistTypeAbAttr, applyCheckTrappedAbAttrs, CheckTrappedAbAttr } from "../data/ability"; +import { Ability, AbAttr, StatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentStatStagesAbAttr, MoveImmunityAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyStatMultiplierAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr, ConditionalCritAbAttr, applyFieldStatMultiplierAbAttrs, FieldMultiplyStatAbAttr, AddSecondStrikeAbAttr, UserFieldStatusEffectImmunityAbAttr, UserFieldBattlerTagImmunityAbAttr, BattlerTagImmunityAbAttr, MoveTypeChangeAbAttr, FullHpResistTypeAbAttr, applyCheckTrappedAbAttrs, CheckTrappedAbAttr } from "../data/ability"; import PokemonData from "../system/pokemon-data"; import { BattlerIndex } from "../battle"; import { Mode } from "../ui/ui"; @@ -40,7 +38,7 @@ import Overrides from "#app/overrides"; import i18next from "i18next"; import { speciesEggMoves } from "../data/egg-moves"; import { ModifierTier } from "../modifier/modifier-tier"; -import { applyChallenges, ChallengeType } from "#app/data/challenge.js"; +import { applyChallenges, ChallengeType } from "#app/data/challenge"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattleSpec } from "#enums/battle-spec"; @@ -49,17 +47,17 @@ import { BerryType } from "#enums/berry-type"; import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { DamagePhase } from "#app/phases/damage-phase"; +import { FaintPhase } from "#app/phases/faint-phase"; +import { LearnMovePhase } from "#app/phases/learn-move-phase"; +import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { MoveEndPhase } from "#app/phases/move-end-phase"; +import { ObtainStatusEffectPhase } from "#app/phases/obtain-status-effect-phase"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; +import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; +import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase"; import { Challenges } from "#enums/challenges"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { DamagePhase } from "#app/phases/damage-phase.js"; -import { FaintPhase } from "#app/phases/faint-phase.js"; -import { LearnMovePhase } from "#app/phases/learn-move-phase.js"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase.js"; -import { MoveEndPhase } from "#app/phases/move-end-phase.js"; -import { ObtainStatusEffectPhase } from "#app/phases/obtain-status-effect-phase.js"; -import { StatChangePhase } from "#app/phases/stat-change-phase.js"; -import { SwitchSummonPhase } from "#app/phases/switch-summon-phase.js"; -import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase.js"; export enum FieldPosition { CENTER, @@ -676,49 +674,139 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { }); } - getStat(stat: Stat): integer { + /** + * Retrieves the entire set of stats of the {@linkcode Pokemon}. + * @param bypassSummonData prefer actual stats (`true` by default) or in-battle overriden stats (`false`) + * @returns the numeric values of the {@linkcode Pokemon}'s stats + */ + getStats(bypassSummonData: boolean = true): number[] { + if (!bypassSummonData && this.summonData?.stats) { + return this.summonData.stats; + } + return this.stats; + } + + /** + * Retrieves the corresponding {@linkcode PermanentStat} of the {@linkcode Pokemon}. + * @param stat the desired {@linkcode PermanentStat} + * @param bypassSummonData prefer actual stats (`true` by default) or in-battle overridden stats (`false`) + * @returns the numeric value of the desired {@linkcode Stat} + */ + getStat(stat: PermanentStat, bypassSummonData: boolean = true): number { + if (!bypassSummonData && this.summonData && (this.summonData.stats[stat] !== 0)) { + return this.summonData.stats[stat]; + } return this.stats[stat]; } - getBattleStat(stat: Stat, opponent?: Pokemon, move?: Move, isCritical: boolean = false): integer { - if (stat === Stat.HP) { - return this.getStat(Stat.HP); - } - const battleStat = (stat - 1) as BattleStat; - const statLevel = new Utils.IntegerHolder(this.summonData.battleStats[battleStat]); - if (opponent) { - if (isCritical) { - switch (stat) { - case Stat.ATK: - case Stat.SPATK: - statLevel.value = Math.max(statLevel.value, 0); - break; - case Stat.DEF: - case Stat.SPDEF: - statLevel.value = Math.min(statLevel.value, 0); - break; - } - } - applyAbAttrs(IgnoreOpponentStatChangesAbAttr, opponent, null, false, statLevel); - if (move) { - applyMoveAttrs(IgnoreOpponentStatChangesAttr, this, opponent, move, statLevel); + /** + * Writes the value to the corrseponding {@linkcode PermanentStat} of the {@linkcode Pokemon}. + * + * Note that this does nothing if {@linkcode value} is less than 0. + * @param stat the desired {@linkcode PermanentStat} to be overwritten + * @param value the desired numeric value + * @param bypassSummonData write to actual stats (`true` by default) or in-battle overridden stats (`false`) + */ + setStat(stat: PermanentStat, value: number, bypassSummonData: boolean = true): void { + if (value >= 0) { + if (!bypassSummonData && this.summonData) { + this.summonData.stats[stat] = value; + } else { + this.stats[stat] = value; } } - if (this.isPlayer()) { - this.scene.applyModifiers(TempBattleStatBoosterModifier, this.isPlayer(), battleStat as integer as TempBattleStat, statLevel); + } + + /** + * Retrieves the entire set of in-battle stat stages of the {@linkcode Pokemon}. + * @returns the numeric values of the {@linkcode Pokemon}'s in-battle stat stages if available, a fresh stat stage array otherwise + */ + getStatStages(): number[] { + return this.summonData ? this.summonData.statStages : [ 0, 0, 0, 0, 0, 0, 0 ]; + } + + /** + * Retrieves the in-battle stage of the specified {@linkcode BattleStat}. + * @param stat the {@linkcode BattleStat} whose stage is desired + * @returns the stage of the desired {@linkcode BattleStat} if available, 0 otherwise + */ + getStatStage(stat: BattleStat): number { + return this.summonData ? this.summonData.statStages[stat - 1] : 0; + } + + /** + * Writes the value to the in-battle stage of the corresponding {@linkcode BattleStat} of the {@linkcode Pokemon}. + * + * Note that, if the value is not within a range of [-6, 6], it will be forced to the closest range bound. + * @param stat the {@linkcode BattleStat} whose stage is to be overwritten + * @param value the desired numeric value + */ + setStatStage(stat: BattleStat, value: number): void { + if (this.summonData) { + if (value >= -6) { + this.summonData.statStages[stat - 1] = Math.min(value, 6); + } else { + this.summonData.statStages[stat - 1] = Math.max(value, -6); + } } - const statValue = new Utils.NumberHolder(this.getStat(stat)); + } + + /** + * Retrieves the critical-hit stage considering the move used and the Pokemon + * who used it. + * @param source the {@linkcode Pokemon} who using the move + * @param move the {@linkcode Move} being used + * @returns the final critical-hit stage value + */ + getCritStage(source: Pokemon, move: Move): number { + const critStage = new Utils.IntegerHolder(0); + applyMoveAttrs(HighCritAttr, source, this, move, critStage); + this.scene.applyModifiers(CritBoosterModifier, source.isPlayer(), source, critStage); + this.scene.applyModifiers(TempCritBoosterModifier, source.isPlayer(), critStage); + const bonusCrit = new Utils.BooleanHolder(false); + //@ts-ignore + if (applyAbAttrs(BonusCritAbAttr, source, null, false, bonusCrit)) { // TODO: resolve ts-ignore. This is a promise. Checking a promise is bogus. + if (bonusCrit.value) { + critStage.value += 1; + } + } + const critBoostTag = source.getTag(CritBoostTag); + if (critBoostTag) { + if (critBoostTag instanceof DragonCheerTag) { + critStage.value += critBoostTag.typesOnAdd.includes(Type.DRAGON) ? 2 : 1; + } else { + critStage.value += 2; + } + } + + console.log(`crit stage: +${critStage.value}`); + return critStage.value; + } + + /** + * Calculates and retrieves the final value of a stat considering any held + * items, move effects, opponent abilities, and whether there was a critical + * hit. + * @param stat the desired {@linkcode EffectiveStat} + * @param opponent the target {@linkcode Pokemon} + * @param move the {@linkcode Move} being used + * @param isCritical determines whether a critical hit has occurred or not (`false` by default) + * @returns the final in-battle value of a stat + */ + getEffectiveStat(stat: EffectiveStat, opponent?: Pokemon, move?: Move, isCritical: boolean = false): integer { + const statValue = new Utils.NumberHolder(this.getStat(stat, false)); this.scene.applyModifiers(StatBoosterModifier, this.isPlayer(), this, stat, statValue); const fieldApplied = new Utils.BooleanHolder(false); for (const pokemon of this.scene.getField(true)) { - applyFieldBattleStatMultiplierAbAttrs(FieldMultiplyBattleStatAbAttr, pokemon, stat, statValue, this, fieldApplied); + applyFieldStatMultiplierAbAttrs(FieldMultiplyStatAbAttr, pokemon, stat, statValue, this, fieldApplied); if (fieldApplied.value) { break; } } - applyBattleStatMultiplierAbAttrs(BattleStatMultiplierAbAttr, this, battleStat, statValue); - let ret = statValue.value * (Math.max(2, 2 + statLevel.value) / Math.max(2, 2 - statLevel.value)); + applyStatMultiplierAbAttrs(StatMultiplierAbAttr, this, stat, statValue); + let ret = statValue.value * this.getStatStageMultiplier(stat, opponent, move, isCritical); + switch (stat) { case Stat.ATK: if (this.getTag(BattlerTagType.SLOW_START)) { @@ -765,24 +853,25 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (!this.stats) { this.stats = [ 0, 0, 0, 0, 0, 0 ]; } - const baseStats = this.getSpeciesForm().baseStats.slice(0); - if (this.fusionSpecies) { - const fusionBaseStats = this.getFusionSpeciesForm().baseStats; - for (let s = 0; s < this.stats.length; s++) { + + // Get and manipulate base stats + const baseStats = this.getSpeciesForm(true).baseStats.slice(); + if (this.isFusion()) { + const fusionBaseStats = this.getFusionSpeciesForm(true).baseStats; + for (const s of PERMANENT_STATS) { baseStats[s] = Math.ceil((baseStats[s] + fusionBaseStats[s]) / 2); } } else if (this.scene.gameMode.isSplicedOnly) { - for (let s = 0; s < this.stats.length; s++) { + for (const s of PERMANENT_STATS) { baseStats[s] = Math.ceil(baseStats[s] / 2); } } - this.scene.applyModifiers(PokemonBaseStatModifier, this.isPlayer(), this, baseStats); - const stats = Utils.getEnumValues(Stat); - for (const s of stats) { - const isHp = s === Stat.HP; - const baseStat = baseStats[s]; - let value = Math.floor(((2 * baseStat + this.ivs[s]) * this.level) * 0.01); - if (isHp) { + this.scene.applyModifiers(BaseStatModifier, this.isPlayer(), this, baseStats); + + // Using base stats, calculate and store stats one by one + for (const s of PERMANENT_STATS) { + let value = Math.floor(((2 * baseStats[s] + this.ivs[s]) * this.level) * 0.01); + if (s === Stat.HP) { value = value + this.level + 10; if (this.hasAbility(Abilities.WONDER_GUARD, false, true)) { value = 1; @@ -803,7 +892,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { value = Math.max(Math[natureStatMultiplier.value > 1 ? "ceil" : "floor"](value * natureStatMultiplier.value), 1); } } - this.stats[s] = value; + + this.setStat(s, value); } } @@ -1378,7 +1468,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const types = this.getTypes(true); const enemyTypes = opponent.getTypes(true, true); /** Is this Pokemon faster than the opponent? */ - const outspeed = (this.isActive(true) ? this.getBattleStat(Stat.SPD, opponent) : this.getStat(Stat.SPD)) >= opponent.getBattleStat(Stat.SPD, this); + const outspeed = (this.isActive(true) ? this.getEffectiveStat(Stat.SPD, opponent) : this.getStat(Stat.SPD, false)) >= opponent.getEffectiveStat(Stat.SPD, this); /** * Based on how effective this Pokemon's types are offensively against the opponent's types. * This score is increased by 25 percent if this Pokemon is faster than the opponent. @@ -1757,7 +1847,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { movePool = movePool.map(m => [m[0], m[1] * (!!allMoves[m[0]].hasAttr(SacrificialAttr) ? 0.5 : 1)]); movePool = movePool.map(m => [m[0], m[1] * (!!allMoves[m[0]].hasAttr(SacrificialAttrOnHit) ? 0.5 : 1)]); // Trainers get a weight bump to stat buffing moves - movePool = movePool.map(m => [m[0], m[1] * (allMoves[m[0]].getAttrs(StatChangeAttr).some(a => a.levels > 1 && a.selfTarget) ? 1.25 : 1)]); + movePool = movePool.map(m => [m[0], m[1] * (allMoves[m[0]].getAttrs(StatStageChangeAttr).some(a => a.stages > 1 && a.selfTarget) ? 1.25 : 1)]); // Trainers get a weight decrease to multiturn moves movePool = movePool.map(m => [m[0], m[1] * (!!allMoves[m[0]].hasAttr(ChargeAttr) || !!allMoves[m[0]].hasAttr(RechargeAttr) ? 0.7 : 1)]); } @@ -1769,8 +1859,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { movePool = movePool.map(m => [m[0], m[1] * (allMoves[m[0]].category === MoveCategory.STATUS ? 1 : Math.max(Math.min(allMoves[m[0]].power/maxPower, 1), 0.5))]); // Weight damaging moves against the lower stat - const worseCategory: MoveCategory = this.stats[Stat.ATK] > this.stats[Stat.SPATK] ? MoveCategory.SPECIAL : MoveCategory.PHYSICAL; - const statRatio = worseCategory === MoveCategory.PHYSICAL ? this.stats[Stat.ATK]/this.stats[Stat.SPATK] : this.stats[Stat.SPATK]/this.stats[Stat.ATK]; + const atk = this.getStat(Stat.ATK); + const spAtk = this.getStat(Stat.SPATK); + const worseCategory: MoveCategory = atk > spAtk ? MoveCategory.SPECIAL : MoveCategory.PHYSICAL; + const statRatio = worseCategory === MoveCategory.PHYSICAL ? atk / spAtk : spAtk / atk; movePool = movePool.map(m => [m[0], m[1] * (allMoves[m[0]].category === worseCategory ? statRatio : 1)]); let weightMultiplier = 0.9; // The higher this is the more the game weights towards higher level moves. At 0 all moves are equal weight. @@ -1956,6 +2048,48 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return this instanceof PlayerPokemon ? this.scene.getPlayerField() : this.scene.getEnemyField(); } + /** + * Calculates the stat stage multiplier of the user against an opponent. + * + * Note that this does not apply to evasion or accuracy + * @see {@linkcode getAccuracyMultiplier} + * @param stat the desired {@linkcode EffectiveStat} + * @param opponent the target {@linkcode Pokemon} + * @param move the {@linkcode Move} being used + * @param isCritical determines whether a critical hit has occurred or not (`false` by default) + * @return the stat stage multiplier to be used for effective stat calculation + */ + getStatStageMultiplier(stat: EffectiveStat, opponent?: Pokemon, move?: Move, isCritical: boolean = false): number { + const statStage = new Utils.IntegerHolder(this.getStatStage(stat)); + const ignoreStatStage = new Utils.BooleanHolder(false); + + if (opponent) { + if (isCritical) { + switch (stat) { + case Stat.ATK: + case Stat.SPATK: + statStage.value = Math.max(statStage.value, 0); + break; + case Stat.DEF: + case Stat.SPDEF: + statStage.value = Math.min(statStage.value, 0); + break; + } + } + applyAbAttrs(IgnoreOpponentStatStagesAbAttr, opponent, null, false, stat, ignoreStatStage); + if (move) { + applyMoveAttrs(IgnoreOpponentStatStagesAttr, this, opponent, move, ignoreStatStage); + } + } + + if (!ignoreStatStage.value) { + const statStageMultiplier = new Utils.NumberHolder(Math.max(2, 2 + statStage.value) / Math.max(2, 2 - statStage.value)); + this.scene.applyModifiers(TempStatStageBoosterModifier, this.isPlayer(), stat, statStageMultiplier); + return Math.min(statStageMultiplier.value, 4); + } + return 1; + } + /** * Calculates the accuracy multiplier of the user against a target. * @@ -1972,34 +2106,38 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return 1; } - const userAccuracyLevel = new Utils.IntegerHolder(this.summonData.battleStats[BattleStat.ACC]); - const targetEvasionLevel = new Utils.IntegerHolder(target.summonData.battleStats[BattleStat.EVA]); + const userAccStage = new Utils.IntegerHolder(this.getStatStage(Stat.ACC)); + const targetEvaStage = new Utils.IntegerHolder(target.getStatStage(Stat.EVA)); - applyAbAttrs(IgnoreOpponentStatChangesAbAttr, target, null, false, userAccuracyLevel); - applyAbAttrs(IgnoreOpponentStatChangesAbAttr, this, null, false, targetEvasionLevel); - applyAbAttrs(IgnoreOpponentEvasionAbAttr, this, null, false, targetEvasionLevel); - applyMoveAttrs(IgnoreOpponentStatChangesAttr, this, target, sourceMove, targetEvasionLevel); - this.scene.applyModifiers(TempBattleStatBoosterModifier, this.isPlayer(), TempBattleStat.ACC, userAccuracyLevel); + const ignoreAccStatStage = new Utils.BooleanHolder(false); + const ignoreEvaStatStage = new Utils.BooleanHolder(false); + + applyAbAttrs(IgnoreOpponentStatStagesAbAttr, target, null, false, Stat.ACC, ignoreAccStatStage); + applyAbAttrs(IgnoreOpponentStatStagesAbAttr, this, null, false, Stat.EVA, ignoreEvaStatStage); + applyMoveAttrs(IgnoreOpponentStatStagesAttr, this, target, sourceMove, ignoreEvaStatStage); + + this.scene.applyModifiers(TempStatStageBoosterModifier, this.isPlayer(), Stat.ACC, userAccStage); + + userAccStage.value = ignoreAccStatStage.value ? 0 : Math.min(userAccStage.value, 6); + targetEvaStage.value = ignoreEvaStatStage.value ? 0 : targetEvaStage.value; if (target.findTag(t => t instanceof ExposedTag)) { - targetEvasionLevel.value = Math.min(0, targetEvasionLevel.value); + targetEvaStage.value = Math.min(0, targetEvaStage.value); } const accuracyMultiplier = new Utils.NumberHolder(1); - if (userAccuracyLevel.value !== targetEvasionLevel.value) { - accuracyMultiplier.value = userAccuracyLevel.value > targetEvasionLevel.value - ? (3 + Math.min(userAccuracyLevel.value - targetEvasionLevel.value, 6)) / 3 - : 3 / (3 + Math.min(targetEvasionLevel.value - userAccuracyLevel.value, 6)); + if (userAccStage.value !== targetEvaStage.value) { + accuracyMultiplier.value = userAccStage.value > targetEvaStage.value + ? (3 + Math.min(userAccStage.value - targetEvaStage.value, 6)) / 3 + : 3 / (3 + Math.min(targetEvaStage.value - userAccStage.value, 6)); } - applyBattleStatMultiplierAbAttrs(BattleStatMultiplierAbAttr, this, BattleStat.ACC, accuracyMultiplier, false, sourceMove); + applyStatMultiplierAbAttrs(StatMultiplierAbAttr, this, Stat.ACC, accuracyMultiplier, false, sourceMove); const evasionMultiplier = new Utils.NumberHolder(1); - applyBattleStatMultiplierAbAttrs(BattleStatMultiplierAbAttr, target, BattleStat.EVA, evasionMultiplier); + applyStatMultiplierAbAttrs(StatMultiplierAbAttr, target, Stat.EVA, evasionMultiplier); - accuracyMultiplier.value /= evasionMultiplier.value; - - return accuracyMultiplier.value; + return accuracyMultiplier.value / evasionMultiplier.value; } /** @@ -2086,29 +2224,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (critOnly.value || critAlways) { isCritical = true; } else { - const critLevel = new Utils.IntegerHolder(0); - applyMoveAttrs(HighCritAttr, source, this, move, critLevel); - this.scene.applyModifiers(CritBoosterModifier, source.isPlayer(), source, critLevel); - this.scene.applyModifiers(TempBattleStatBoosterModifier, source.isPlayer(), TempBattleStat.CRIT, critLevel); - const bonusCrit = new Utils.BooleanHolder(false); - //@ts-ignore - if (applyAbAttrs(BonusCritAbAttr, source, null, false, bonusCrit)) { // TODO: resolve ts-ignore. This is a promise. Checking a promise is bogus. - if (bonusCrit.value) { - critLevel.value += 1; - } - } - - const critBoostTag = source.getTag(CritBoostTag); - if (critBoostTag) { - if (critBoostTag instanceof DragonCheerTag) { - critLevel.value += critBoostTag.typesOnAdd.includes(Type.DRAGON) ? 2 : 1; - } else { - critLevel.value += 2; - } - } - - console.log(`crit stage: +${critLevel.value}`); - const critChance = [24, 8, 2, 1][Math.max(0, Math.min(critLevel.value, 3))]; + const critChance = [24, 8, 2, 1][Math.max(0, Math.min(this.getCritStage(source, move), 3))]; isCritical = critChance === 1 || !this.scene.randBattleSeedInt(critChance); if (Overrides.NEVER_CRIT_OVERRIDE) { isCritical = false; @@ -2122,8 +2238,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { isCritical = false; } } - const sourceAtk = new Utils.IntegerHolder(source.getBattleStat(isPhysical ? Stat.ATK : Stat.SPATK, this, undefined, isCritical)); - const targetDef = new Utils.IntegerHolder(this.getBattleStat(isPhysical ? Stat.DEF : Stat.SPDEF, source, move, isCritical)); + const sourceAtk = new Utils.IntegerHolder(source.getEffectiveStat(isPhysical ? Stat.ATK : Stat.SPATK, this, undefined, isCritical)); + const targetDef = new Utils.IntegerHolder(this.getEffectiveStat(isPhysical ? Stat.DEF : Stat.SPDEF, source, move, isCritical)); const criticalMultiplier = new Utils.NumberHolder(isCritical ? 1.5 : 1); applyAbAttrs(MultCritAbAttr, source, null, false, criticalMultiplier); const screenMultiplier = new Utils.NumberHolder(1); @@ -2534,10 +2650,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @param source {@linkcode Pokemon} the pokemon whose stats/Tags are to be passed on from, ie: the Pokemon using Baton Pass */ transferSummon(source: Pokemon): void { - const battleStats = Utils.getEnumValues(BattleStat); - for (const stat of battleStats) { - this.summonData.battleStats[stat] = source.summonData.battleStats[stat]; + // Copy all stat stages + for (const s of BATTLE_STATS) { + const sourceStage = source.getStatStage(s); + if ((this instanceof PlayerPokemon) && (sourceStage === 6)) { + this.scene.validateAchv(achvs.TRANSFER_MAX_STAT_STAGE); + } + this.setStatStage(s, sourceStage); } + for (const tag of source.summonData.tags) { // bypass those can not be passed via Baton Pass @@ -2549,9 +2670,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.summonData.tags.push(tag); } - if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6)) { - this.scene.validateAchv(achvs.TRANSFER_MAX_BATTLE_STAT); - } + this.updateInfo(); } @@ -3729,16 +3848,17 @@ export class PlayerPokemon extends Pokemon { this.scene.gameData.gameStats.pokemonFused++; // Store the average HP% that each Pokemon has - const newHpPercent = ((pokemon.hp / pokemon.stats[Stat.HP]) + (this.hp / this.stats[Stat.HP])) / 2; + const maxHp = this.getMaxHp(); + const newHpPercent = ((pokemon.hp / pokemon.getMaxHp()) + (this.hp / maxHp)) / 2; this.generateName(); this.calculateStats(); // Set this Pokemon's HP to the average % of both fusion components - this.hp = Math.round(this.stats[Stat.HP] * newHpPercent); + this.hp = Math.round(maxHp * newHpPercent); if (!this.isFainted()) { // If this Pokemon hasn't fainted, make sure the HP wasn't set over the new maximum - this.hp = Math.min(this.hp, this.stats[Stat.HP]); + this.hp = Math.min(this.hp, maxHp); this.status = getRandomStatus(this.status, pokemon.status); // Get a random valid status between the two } else if (!pokemon.isFainted()) { // If this Pokemon fainted but the other hasn't, make sure the HP wasn't set to zero @@ -4231,39 +4351,40 @@ export class EnemyPokemon extends Pokemon { handleBossSegmentCleared(segmentIndex: integer): void { while (segmentIndex - 1 < this.bossSegmentIndex) { - let boostedStat = BattleStat.RAND; + // Filter out already maxed out stat stages and weigh the rest based on existing stats + const leftoverStats = EFFECTIVE_STATS.filter((s: EffectiveStat) => this.getStatStage(s) < 6); + const statWeights = leftoverStats.map((s: EffectiveStat) => this.getStat(s, false)); - const battleStats = Utils.getEnumValues(BattleStat).slice(0, -3); - const statWeights = new Array().fill(battleStats.length).filter((bs: BattleStat) => this.summonData.battleStats[bs] < 6).map((bs: BattleStat) => this.getStat(bs + 1)); - const statThresholds: integer[] = []; + let boostedStat: EffectiveStat; + const statThresholds: number[] = []; let totalWeight = 0; - for (const bs of battleStats) { - totalWeight += statWeights[bs]; + + for (const i in statWeights) { + totalWeight += statWeights[i]; statThresholds.push(totalWeight); } + // Pick a random stat from the leftover stats to increase its stages const randInt = Utils.randSeedInt(totalWeight); - - for (const bs of battleStats) { - if (randInt < statThresholds[bs]) { - boostedStat = bs; + for (const i in statThresholds) { + if (randInt < statThresholds[i]) { + boostedStat = leftoverStats[i]; break; } } - let statLevels = 1; + let stages = 1; // increase the boost if the boss has at least 3 segments and we passed last shield if (this.bossSegments >= 3 && this.bossSegmentIndex === 1) { - statLevels++; + stages++; } // increase the boost if the boss has at least 5 segments and we passed the second to last shield if (this.bossSegments >= 5 && this.bossSegmentIndex === 2) { - statLevels++; + stages++; } - this.scene.unshiftPhase(new StatChangePhase(this.scene, this.getBattlerIndex(), true, [ boostedStat ], statLevels, true, true)); - + this.scene.unshiftPhase(new StatStageChangePhase(this.scene, this.getBattlerIndex(), true, [ boostedStat! ], stages, true, true)); this.bossSegmentIndex--; } } @@ -4339,7 +4460,7 @@ export interface AttackMoveResult { } export class PokemonSummonData { - public battleStats: number[] = [ 0, 0, 0, 0, 0, 0, 0 ]; + public statStages: number[] = [ 0, 0, 0, 0, 0, 0, 0 ]; public moveQueue: QueuedMove[] = []; public disabledMove: Moves = Moves.NONE; public disabledTurns: number = 0; @@ -4352,7 +4473,7 @@ export class PokemonSummonData { public ability: Abilities = Abilities.NONE; public gender: Gender; public fusionGender: Gender; - public stats: number[]; + public stats: number[] = [ 0, 0, 0, 0, 0, 0 ]; public moveset: (PokemonMove | null)[]; // If not initialized this value will not be populated from save data. public types: Type[] = []; @@ -4383,8 +4504,8 @@ export class PokemonTurnData { public damageTaken: number = 0; public attacksReceived: AttackMoveResult[] = []; public order: number; - public battleStatsIncreased: boolean = false; - public battleStatsDecreased: boolean = false; + public statStagesIncreased: boolean = false; + public statStagesDecreased: boolean = false; } export enum AiType { diff --git a/src/interfaces/locales.ts b/src/interfaces/locales.ts index 5f7c52100c1..4405095e0fe 100644 --- a/src/interfaces/locales.ts +++ b/src/interfaces/locales.ts @@ -37,8 +37,7 @@ export interface ModifierTypeTranslationEntries { ModifierType: { [key: string]: ModifierTypeTranslationEntry }, SpeciesBoosterItem: { [key: string]: ModifierTypeTranslationEntry }, AttackTypeBoosterItem: SimpleTranslationEntries, - TempBattleStatBoosterItem: SimpleTranslationEntries, - TempBattleStatBoosterStatName: SimpleTranslationEntries, + TempStatStageBoosterItem: SimpleTranslationEntries, BaseStatBoosterItem: SimpleTranslationEntries, EvolutionItem: SimpleTranslationEntries, FormChangeItem: SimpleTranslationEntries, diff --git a/src/locales/de/achv.json b/src/locales/de/achv.json index d2e56089720..21a1d89f9d6 100644 --- a/src/locales/de/achv.json +++ b/src/locales/de/achv.json @@ -89,7 +89,7 @@ "name": "Bänder-Meister", "name_female": "Bänder-Meisterin" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "Teamwork", "description": "Nutze Staffette, während der Anwender mindestens eines Statuswertes maximiert hat." }, @@ -274,4 +274,4 @@ "name": "Spieglein, Spieglein an der Wand", "description": "Schließe die 'Umkehrkampf' Herausforderung ab" } -} \ No newline at end of file +} diff --git a/src/locales/de/modifier-type.json b/src/locales/de/modifier-type.json index 9298a78614a..8e2372cb447 100644 --- a/src/locales/de/modifier-type.json +++ b/src/locales/de/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "Verdoppelt die Wahrscheinlichkeit, dass die nächsten {{battleCount}} Begegnungen mit wilden Pokémon ein Doppelkampf sind." }, - "TempBattleStatBoosterModifierType": { - "description": "Erhöht die {{tempBattleStatName}} aller Teammitglieder für 5 Kämpfe um eine Stufe." + "TempStatStageBoosterModifierType": { + "description": "Erhöht die {{stat}} aller Teammitglieder für 5 Kämpfe um eine Stufe." }, "AttackTypeBoosterModifierType": { "description": "Erhöht die Stärke aller {{moveType}}-Attacken eines Pokémon um 20%." @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "Erhöht das Level aller Teammitglieder um {{levels}}." }, - "PokemonBaseStatBoosterModifierType": { - "description": "Erhöht den {{statName}} Basiswert des Trägers um 10%. Das Stapellimit erhöht sich, je höher dein IS-Wert ist." + "BaseStatBoosterModifierType": { + "description": "Erhöht den {{stat}} Basiswert des Trägers um 10%. Das Stapellimit erhöht sich, je höher dein IS-Wert ist." }, "AllPokemonFullHpRestoreModifierType": { "description": "Stellt 100% der KP aller Pokémon her." @@ -248,6 +248,12 @@ "name": "Scope-Linse", "description": "Ein Item zum Tragen. Es erhöht die Volltrefferquote." }, + "DIRE_HIT": { + "name": "X-Volltreffer", + "extra": { + "raises": "Volltrefferquote" + } + }, "LEEK": { "name": "Lauchstange", "description": "Ein Item, das von Porenta getragen werden kann. Diese lange Lauchstange erhöht die Volltrefferquote stark." @@ -411,25 +417,13 @@ "description": "Ein Item, das Ditto zum Tragen gegeben werden kann. Fein und doch hart, erhöht dieses sonderbare Pulver die Initiative." } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "X-Angriff", "x_defense": "X-Verteidigung", "x_sp_atk": "X-Sp.-Ang.", "x_sp_def": "X-Sp.-Vert.", "x_speed": "X-Tempo", - "x_accuracy": "X-Treffer", - "dire_hit": "X-Volltreffer" - }, - "TempBattleStatBoosterStatName": { - "ATK": "Angriff", - "DEF": "Verteidigung", - "SPATK": "Sp. Ang", - "SPDEF": "Sp. Vert", - "SPD": "Initiative", - "ACC": "Genauigkeit", - "CRIT": "Volltrefferquote", - "EVA": "Fluchtwert", - "DEFAULT": "???" + "x_accuracy": "X-Treffer" }, "AttackTypeBoosterItem": { "silk_scarf": "Seidenschal", @@ -606,4 +600,4 @@ "FAIRY_MEMORY": "Feen-Disc", "NORMAL_MEMORY": "Normal-Disc" } -} \ No newline at end of file +} diff --git a/src/locales/de/modifier.json b/src/locales/de/modifier.json index 22053b1da63..37227973410 100644 --- a/src/locales/de/modifier.json +++ b/src/locales/de/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "{{typeName}} von {{pokemonNameWithAffix}} füllt einige KP auf!", "hitHealApply": "{{typeName}} von {{pokemonNameWithAffix}} füllt einige KP auf!", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} wurde durch {{typeName}} wiederbelebt!", - "pokemonResetNegativeStatStageApply": "Die negative Statuswertveränderung von {{pokemonNameWithAffix}} wurde durch {{typeName}} aufgehoben!", + "resetNegativeStatStageApply": "Die negative Statuswertveränderung von {{pokemonNameWithAffix}} wurde durch {{typeName}} aufgehoben!", "moneyInterestApply": "Du erhählst {{moneyAmount}} ₽ durch das Item {{typeName}}!", "turnHeldItemTransferApply": "{{itemName}} von {{pokemonNameWithAffix}} wurde durch {{typeName}} von {{pokemonName}} absorbiert!", "contactHeldItemTransferApply": "{{itemName}} von {{pokemonNameWithAffix}} wurde durch {{typeName}} von {{pokemonName}} geklaut!", diff --git a/src/locales/de/move-trigger.json b/src/locales/de/move-trigger.json index 163e8014d8b..61283c9e62e 100644 --- a/src/locales/de/move-trigger.json +++ b/src/locales/de/move-trigger.json @@ -3,6 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}} nutzt seine KP um seine Attacke zu verstärken!", "absorbedElectricity": "{{pokemonName}} absorbiert elektrische Energie!", "switchedStatChanges": "{{pokemonName}} tauschte die Statuswerteveränderungen mit dem Ziel!", + "switchedTwoStatChanges": "{{pokemonName}} tauscht Veränderungen an {{firstStat}} und {{secondStat}} mit dem Ziel!", + "switchedStat": "{{pokemonName}} tauscht seinen {{stat}}-Wert mit dem des Zieles!", + "sharedGuard": "{{pokemonName}} addiert seine Schutzkräfte mit jenen des Zieles und teilt sie gerecht auf!", + "sharedPower": "{{pokemonName}} addiert seine Kräfte mit jenen des Zieles und teilt sie gerecht auf!", "goingAllOutForAttack": "{{pokemonName}} legt sich ins Zeug!", "regainedHealth": "{{pokemonName}} erholt sich!", "keptGoingAndCrashed": "{{pokemonName}} springt daneben und verletzt sich!", @@ -63,4 +67,4 @@ "swapArenaTags": "{{pokemonName}} hat die Effekte, die auf den beiden Seiten des Kampffeldes wirken, miteinander getauscht!", "exposedMove": "{{pokemonName}} erkennt {{targetPokemonName}}!", "safeguard": "{{targetName}} wird durch Bodyguard geschützt!" -} \ No newline at end of file +} diff --git a/src/locales/de/pokemon-info.json b/src/locales/de/pokemon-info.json index a559001f663..2d625d52ba7 100644 --- a/src/locales/de/pokemon-info.json +++ b/src/locales/de/pokemon-info.json @@ -1,7 +1,6 @@ { "Stat": { "HP": "KP", - "HPStat": "KP", "HPshortened": "KP", "ATK": "Angriff", "ATKshortened": "Ang", diff --git a/src/locales/en/achv.json b/src/locales/en/achv.json index fae786e034a..32d519fbf78 100644 --- a/src/locales/en/achv.json +++ b/src/locales/en/achv.json @@ -97,9 +97,9 @@ "name": "Master League Champion", "name_female": "Master League Champion" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "Teamwork", - "description": "Baton pass to another party member with at least one stat maxed out" + "description": "Baton pass to another party member with at least one stat stage maxed out" }, "MAX_FRIENDSHIP": { "name": "Friendmaxxing", @@ -284,4 +284,4 @@ "name": "Mirror rorriM", "description": "Complete the Inverse Battle challenge.\n.egnellahc elttaB esrevnI eht etelpmoC" } -} \ No newline at end of file +} diff --git a/src/locales/en/modifier-type.json b/src/locales/en/modifier-type.json index 15b9fb8f46d..f73a3dcccae 100644 --- a/src/locales/en/modifier-type.json +++ b/src/locales/en/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "Doubles the chance of an encounter being a double battle for {{battleCount}} battles." }, - "TempBattleStatBoosterModifierType": { - "description": "Increases the {{tempBattleStatName}} of all party members by 1 stage for 5 battles." + "TempStatStageBoosterModifierType": { + "description": "Increases the {{stat}} of all party members by 1 stage for 5 battles." }, "AttackTypeBoosterModifierType": { "description": "Increases the power of a Pokémon's {{moveType}}-type moves by 20%." @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "Increases all party members' level by {{levels}}." }, - "PokemonBaseStatBoosterModifierType": { - "description": "Increases the holder's base {{statName}} by 10%. The higher your IVs, the higher the stack limit." + "BaseStatBoosterModifierType": { + "description": "Increases the holder's base {{stat}} by 10%. The higher your IVs, the higher the stack limit." }, "AllPokemonFullHpRestoreModifierType": { "description": "Restores 100% HP for all Pokémon." @@ -183,6 +183,7 @@ "SOOTHE_BELL": { "name": "Soothe Bell" }, "SCOPE_LENS": { "name": "Scope Lens", "description": "It's a lens for scoping out weak points. It boosts the holder's critical-hit ratio."}, + "DIRE_HIT": { "name": "Dire Hit", "extra": { "raises": "Critical Hit Ratio" } }, "LEEK": { "name": "Leek", "description": "This very long and stiff stalk of leek boosts the critical-hit ratio of Farfetch'd's moves."}, "EVIOLITE": { "name": "Eviolite", "description": "This mysterious evolutionary lump boosts the Defense and Sp. Def stats when held by a Pokémon that can still evolve." }, @@ -250,28 +251,14 @@ "METAL_POWDER": { "name": "Metal Powder", "description": "Extremely fine yet hard, this odd powder boosts Ditto's Defense stat." }, "QUICK_POWDER": { "name": "Quick Powder", "description": "Extremely fine yet hard, this odd powder boosts Ditto's Speed stat." } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "X Attack", "x_defense": "X Defense", "x_sp_atk": "X Sp. Atk", "x_sp_def": "X Sp. Def", "x_speed": "X Speed", - "x_accuracy": "X Accuracy", - "dire_hit": "Dire Hit" + "x_accuracy": "X Accuracy" }, - - "TempBattleStatBoosterStatName": { - "ATK": "Attack", - "DEF": "Defense", - "SPATK": "Sp. Atk", - "SPDEF": "Sp. Def", - "SPD": "Speed", - "ACC": "Accuracy", - "CRIT": "Critical Hit Ratio", - "EVA": "Evasiveness", - "DEFAULT": "???" - }, - "AttackTypeBoosterItem": { "silk_scarf": "Silk Scarf", "black_belt": "Black Belt", diff --git a/src/locales/en/modifier.json b/src/locales/en/modifier.json index 473be0e8bfa..47944c8adb7 100644 --- a/src/locales/en/modifier.json +++ b/src/locales/en/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", "hitHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} was revived\nby its {{typeName}}!", - "pokemonResetNegativeStatStageApply": "{{pokemonNameWithAffix}}'s lowered stats were restored\nby its {{typeName}}!", + "resetNegativeStatStageApply": "{{pokemonNameWithAffix}}'s lowered stats were restored\nby its {{typeName}}!", "moneyInterestApply": "You received interest of ₽{{moneyAmount}}\nfrom the {{typeName}}!", "turnHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was absorbed\nby {{pokemonName}}'s {{typeName}}!", "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was snatched\nby {{pokemonName}}'s {{typeName}}!", diff --git a/src/locales/en/move-trigger.json b/src/locales/en/move-trigger.json index baddbaa34bf..110d3dc68c7 100644 --- a/src/locales/en/move-trigger.json +++ b/src/locales/en/move-trigger.json @@ -3,6 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}} cut its own HP to power up its move!", "absorbedElectricity": "{{pokemonName}} absorbed electricity!", "switchedStatChanges": "{{pokemonName}} switched stat changes with the target!", + "switchedTwoStatChanges": "{{pokemonName}} switched all changes to its {{firstStat}}\nand {{secondStat}} with its target!", + "switchedStat": "{{pokemonName}} switched {{stat}} with its target!", + "sharedGuard": "{{pokemonName}} shared its guard with the target!", + "sharedPower": "{{pokemonName}} shared its power with the target!", "goingAllOutForAttack": "{{pokemonName}} is going all out for this attack!", "regainedHealth": "{{pokemonName}} regained\nhealth!", "keptGoingAndCrashed": "{{pokemonName}} kept going\nand crashed!", diff --git a/src/locales/en/pokemon-info.json b/src/locales/en/pokemon-info.json index 87d2f7ad17b..b79daaed621 100644 --- a/src/locales/en/pokemon-info.json +++ b/src/locales/en/pokemon-info.json @@ -1,7 +1,7 @@ { "Stat": { "HP": "Max. HP", - "HPshortened": "MaxHP", + "HPshortened": "HP", "ATK": "Attack", "ATKshortened": "Atk", "DEF": "Defense", @@ -13,8 +13,7 @@ "SPD": "Speed", "SPDshortened": "Spd", "ACC": "Accuracy", - "EVA": "Evasiveness", - "HPStat": "HP" + "EVA": "Evasiveness" }, "Type": { "UNKNOWN": "Unknown", @@ -38,4 +37,4 @@ "FAIRY": "Fairy", "STELLAR": "Stellar" } -} \ No newline at end of file +} diff --git a/src/locales/es/achv.json b/src/locales/es/achv.json index c94b8858233..14501dbdb6b 100644 --- a/src/locales/es/achv.json +++ b/src/locales/es/achv.json @@ -91,7 +91,7 @@ "name": "Campeón Liga Master", "name_female": "Campeona Liga Master" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "Trabajo en Equipo", "description": "Haz relevo a otro miembro del equipo con al menos una estadística al máximo." }, @@ -175,4 +175,4 @@ "name": "Espejo ojepsE", "description": "Completa el reto de Combate Inverso.\n.osrevnI etabmoC ed oter le atelpmoC" } -} \ No newline at end of file +} diff --git a/src/locales/es/modifier-type.json b/src/locales/es/modifier-type.json index 9c36b8da767..e18cb19244d 100644 --- a/src/locales/es/modifier-type.json +++ b/src/locales/es/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "Duplica la posibilidad de que un encuentro sea una combate doble durante {{battleCount}} combates." }, - "TempBattleStatBoosterModifierType": { - "description": "Aumenta la est. {{tempBattleStatName}} de todos los miembros del equipo en 1 nivel durante 5 combates." + "TempStatStageBoosterModifierType": { + "description": "Aumenta la est. {{stat}} de todos los miembros del equipo en 1 nivel durante 5 combates." }, "AttackTypeBoosterModifierType": { "description": "Aumenta la potencia de los movimientos de tipo {{moveType}} de un Pokémon en un 20%." @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "Aumenta el nivel de todos los miembros del equipo en {{levels}}." }, - "PokemonBaseStatBoosterModifierType": { - "description": "Aumenta la est. {{statName}} base del portador en un 10%.\nCuanto mayores sean tus IVs, mayor será el límite de acumulación." + "BaseStatBoosterModifierType": { + "description": "Aumenta la est. {{stat}} base del portador en un 10%.\nCuanto mayores sean tus IVs, mayor será el límite de acumulación." }, "AllPokemonFullHpRestoreModifierType": { "description": "Restaura el 100% de los PS de todos los Pokémon." @@ -248,6 +248,12 @@ "name": "Periscopio", "description": "Aumenta la probabilidad de asestar un golpe crítico." }, + "DIRE_HIT": { + "name": "Crítico X", + "extra": { + "raises": "Critical Hit Ratio" + } + }, "LEEK": { "name": "Puerro", "description": "Puerro muy largo y duro que aumenta la probabilidad de asestar un golpe crítico. Debe llevarlo Farfetch'd." @@ -411,25 +417,13 @@ "description": "Polvo muy fino, pero a la vez poderoso, que aumenta la Velocidad. Debe llevarlo Ditto." } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "Ataque X", "x_defense": "Defensa X", "x_sp_atk": "Ataq. Esp. X", "x_sp_def": "Def. Esp. X", "x_speed": "Velocidad X", - "x_accuracy": "Precisión X", - "dire_hit": "Crítico X" - }, - "TempBattleStatBoosterStatName": { - "ATK": "Ataque", - "DEF": "Defensa", - "SPATK": "Ataq. Esp.", - "SPDEF": "Def. Esp.", - "SPD": "Velocidad", - "ACC": "Precisión", - "CRIT": "Tasa de crítico", - "EVA": "Evasión", - "DEFAULT": "???" + "x_accuracy": "Precisión X" }, "AttackTypeBoosterItem": { "silk_scarf": "Pañuelo seda", diff --git a/src/locales/es/move-trigger.json b/src/locales/es/move-trigger.json index 52a6f86d930..f92b7950a07 100644 --- a/src/locales/es/move-trigger.json +++ b/src/locales/es/move-trigger.json @@ -1,4 +1,8 @@ { + "switchedTwoStatChanges": "{{pokemonName}} ha intercambiado los cambios en {{firstStat}} y {{secondStat}} con los del objetivo!", + "switchedStat": "{{pokemonName}} cambia su {{stat}} por la de su objetivo!", + "sharedGuard": "{{pokemonName}} suma su capacidad defensiva a la del objetivo y la reparte equitativamente!", + "sharedPower": "{{pokemonName}} suma su capacidad ofensiva a la del objetivo y la reparte equitativamente!", "isChargingPower": "¡{{pokemonName}} está acumulando energía!", "burnedItselfOut": "¡El fuego interior de {{pokemonName}} se ha extinguido!", "startedHeatingUpBeak": "¡{{pokemonName}} empieza\na calentar su pico!", @@ -9,4 +13,4 @@ "statEliminated": "¡Los cambios en estadísticas fueron eliminados!", "revivalBlessing": "¡{{pokemonName}} ha revivido!", "safeguard": "¡{{targetName}} está protegido por Velo Sagrado!" -} \ No newline at end of file +} diff --git a/src/locales/fr/achv.json b/src/locales/fr/achv.json index 60655ae22cf..3e95f9326ca 100644 --- a/src/locales/fr/achv.json +++ b/src/locales/fr/achv.json @@ -92,7 +92,7 @@ "name": "Master Maitre de la Ligue", "name_female": "Master Maitresse de la Ligue" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "Travail d’équipe", "description": "Utiliser Relais avec au moins une statistique montée à fond." }, diff --git a/src/locales/fr/modifier-type.json b/src/locales/fr/modifier-type.json index 935deeb5f62..509a8b11112 100644 --- a/src/locales/fr/modifier-type.json +++ b/src/locales/fr/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "Double les chances de tomber sur un combat double pendant {{battleCount}} combats." }, - "TempBattleStatBoosterModifierType": { - "description": "Augmente d’un cran {{tempBattleStatName}} pour toute l’équipe pendant 5 combats." + "TempStatStageBoosterModifierType": { + "description": "Augmente d’un cran {{stat}} pour toute l’équipe pendant 5 combats." }, "AttackTypeBoosterModifierType": { "description": "Augmente de 20% la puissance des capacités de type {{moveType}} d’un Pokémon." @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "Fait monter toute l’équipe de {{levels}} niveau·x." }, - "PokemonBaseStatBoosterModifierType": { - "description": "Augmente de 10% {{statName}} de base de son porteur. Plus les IV sont hauts, plus il peut en porter." + "BaseStatBoosterModifierType": { + "description": "Augmente de 10% {{stat}} de base de son porteur. Plus les IV sont hauts, plus il peut en porter." }, "AllPokemonFullHpRestoreModifierType": { "description": "Restaure tous les PV de toute l’équipe." @@ -183,6 +183,7 @@ "SOOTHE_BELL": { "name": "Grelot Zen" }, "SCOPE_LENS": { "name": "Lentilscope", "description": "Une lentille qui augmente d’un cran le taux de critiques du porteur." }, + "DIRE_HIT": { "name": "Muscle +", "extra": { "raises": "Taux de critique" } }, "LEEK": { "name": "Poireau", "description": "À faire tenir à Canarticho ou Palarticho. Un poireau très long et solide qui augmente de 2 crans le taux de critiques." }, "EVIOLITE": { "name": "Évoluroc", "description": "Augmente de 50% la Défense et Déf. Spé. si le porteur peut évoluer, 25% aux fusions dont une moitié le peut encore." }, @@ -250,28 +251,14 @@ "METAL_POWDER": { "name": "Poudre Métal", "description": "À faire tenir à Métamorph. Cette poudre étrange, très fine mais résistante, double sa Défense." }, "QUICK_POWDER": { "name": "Poudre Vite", "description": "À faire tenir à Métamorph. Cette poudre étrange, très fine mais résistante, double sa Vitesse." } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "Attaque +", "x_defense": "Défense +", "x_sp_atk": "Atq. Spé. +", "x_sp_def": "Déf. Spé. +", "x_speed": "Vitesse +", - "x_accuracy": "Précision +", - "dire_hit": "Muscle +" + "x_accuracy": "Précision +" }, - - "TempBattleStatBoosterStatName": { - "ATK": "l’Attaque", - "DEF": "la Défense", - "SPATK": "l’Atq. Spé.", - "SPDEF": "la Déf. Spé.", - "SPD": "la Vitesse", - "ACC": "la précision", - "CRIT": "le taux de critique", - "EVA": "l’esquive", - "DEFAULT": "???" - }, - "AttackTypeBoosterItem": { "silk_scarf": "Mouchoir Soie", "black_belt": "Ceinture Noire", diff --git a/src/locales/fr/modifier.json b/src/locales/fr/modifier.json index 8a15c9e5ddf..0ec228a22c2 100644 --- a/src/locales/fr/modifier.json +++ b/src/locales/fr/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par les {{typeName}} !", "hitHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par le {{typeName}} !", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} a repris connaissance\navec sa {{typeName}} et est prêt à se battre de nouveau !", - "pokemonResetNegativeStatStageApply": "Les stats baissées de {{pokemonNameWithAffix}}\nsont restaurées par l’{{typeName}} !", + "resetNegativeStatStageApply": "Les stats baissées de {{pokemonNameWithAffix}}\nsont restaurées par l’{{typeName}} !", "moneyInterestApply": "La {{typeName}} vous rapporte\n{{moneyAmount}} ₽ d’intérêts !", "turnHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est absorbé·e\npar le {{typeName}} de {{pokemonName}} !", "contactHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est volé·e\npar l’{{typeName}} de {{pokemonName}} !", diff --git a/src/locales/fr/move-trigger.json b/src/locales/fr/move-trigger.json index 5c814745a8e..b9bc929c619 100644 --- a/src/locales/fr/move-trigger.json +++ b/src/locales/fr/move-trigger.json @@ -3,6 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}} sacrifie des PV\net augmente la puissance ses capacités !", "absorbedElectricity": "{{pokemonName}} absorbe de l’électricité !", "switchedStatChanges": "{{pokemonName}} permute\nles changements de stats avec ceux de sa cible !", + "switchedTwoStatChanges": "{{pokemonName}} permute les changements de {{firstStat} et de {{secondStat}} avec ceux de sa cible !", + "switchedStat": "{{pokemonName}} et sa cible échangent leur {{stat}} !", + "sharedGuard": "{{pokemonName}} additionne sa garde à celle de sa cible et redistribue le tout équitablement !", + "sharedPower": "{{pokemonName}} additionne sa force à celle de sa cible et redistribue le tout équitablement !", "goingAllOutForAttack": "{{pokemonName}} a pris\ncette capacité au sérieux !", "regainedHealth": "{{pokemonName}}\nrécupère des PV !", "keptGoingAndCrashed": "{{pokemonName}}\ns’écrase au sol !", diff --git a/src/locales/it/achv.json b/src/locales/it/achv.json index 98e41005c46..d1607f6c548 100644 --- a/src/locales/it/achv.json +++ b/src/locales/it/achv.json @@ -80,7 +80,7 @@ "100_RIBBONS": { "name": "Campione Lega Assoluta" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "Lavoro di Squadra", "description": "Trasferisci almeno sei bonus statistiche tramite staffetta" }, @@ -261,4 +261,4 @@ "name": "Buona la prima!", "description": "Completa la modalità sfida 'Un nuovo inizio'." } -} \ No newline at end of file +} diff --git a/src/locales/it/modifier-type.json b/src/locales/it/modifier-type.json index b466e5bb9a3..99c06bb2038 100644 --- a/src/locales/it/modifier-type.json +++ b/src/locales/it/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "Raddoppia la possibilità di imbattersi in doppie battaglie per {{battleCount}} battaglie." }, - "TempBattleStatBoosterModifierType": { - "description": "Aumenta {{tempBattleStatName}} di un livello a tutti i Pokémon nel gruppo per 5 battaglie." + "TempStatStageBoosterModifierType": { + "description": "Aumenta la statistica {{stat}} di un livello\na tutti i Pokémon nel gruppo per 5 battaglie." }, "AttackTypeBoosterModifierType": { "description": "Aumenta la potenza delle mosse di tipo {{moveType}} del 20% per un Pokémon." @@ -59,10 +59,10 @@ "description": "Aumenta il livello di un Pokémon di {{levels}}." }, "AllPokemonLevelIncrementModifierType": { - "description": "Aumenta i livell di tutti i Pokémon della squadra di {{levels}}." + "description": "Aumenta il livello di tutti i Pokémon della squadra di {{levels}}." }, - "PokemonBaseStatBoosterModifierType": { - "description": "Aumenta {{statName}} di base del possessore del 10%." + "BaseStatBoosterModifierType": { + "description": "Aumenta l'/la {{stat}} di base del possessore del 10%." }, "AllPokemonFullHpRestoreModifierType": { "description": "Restituisce il 100% dei PS a tutti i Pokémon." @@ -248,6 +248,12 @@ "name": "Mirino", "description": "Lente che aumenta la probabilità di sferrare brutti colpi." }, + "DIRE_HIT": { + "name": "Supercolpo", + "extra": { + "raises": "Tasso di brutti colpi" + } + }, "LEEK": { "name": "Porro", "description": "Strumento da dare a Farfetch'd. Lungo gambo di porro che aumenta la probabilità di sferrare brutti colpi." @@ -411,25 +417,13 @@ "description": "Strumento da dare a Ditto. Questa strana polvere, fine e al contempo dura, aumenta la Velocità." } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "Attacco X", "x_defense": "Difesa X", "x_sp_atk": "Att. Speciale X", "x_sp_def": "Dif. Speciale X", "x_speed": "Velocità X", - "x_accuracy": "Precisione X", - "dire_hit": "Supercolpo" - }, - "TempBattleStatBoosterStatName": { - "ATK": "Attacco", - "DEF": "Difesa", - "SPATK": "Att. Speciale", - "SPDEF": "Dif. Speciale", - "SPD": "Velocità", - "ACC": "Precisione", - "CRIT": "Tasso di brutti colpi", - "EVA": "Elusione", - "DEFAULT": "???" + "x_accuracy": "Precisione X" }, "AttackTypeBoosterItem": { "silk_scarf": "Sciarpa seta", @@ -606,4 +600,4 @@ "FAIRY_MEMORY": "ROM Folletto", "NORMAL_MEMORY": "ROM Normale" } -} \ No newline at end of file +} diff --git a/src/locales/it/modifier.json b/src/locales/it/modifier.json index 397a1f21f9a..c42bf04bc8a 100644 --- a/src/locales/it/modifier.json +++ b/src/locales/it/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "{{pokemonNameWithAffix}} recupera alcuni PS con\nil/la suo/a {{typeName}}!", "hitHealApply": "{{pokemonNameWithAffix}} recupera alcuni PS con\nil/la suo/a {{typeName}}!", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} torna in forze\ngrazie al/alla suo/a {{typeName}}!", - "pokemonResetNegativeStatStageApply": "La riduzione alle statistiche di {{pokemonNameWithAffix}}\nviene annullata grazie al/alla suo/a {{typeName}}!", + "resetNegativeStatStageApply": "La riduzione alle statistiche di {{pokemonNameWithAffix}}\nviene annullata grazie al/alla suo/a {{typeName}}!", "moneyInterestApply": "Ricevi un interesse pari a {{moneyAmount}}₽\ngrazie al/allo/a {{typeName}}!", "turnHeldItemTransferApply": "Il/l'/lo/la {{itemName}} di {{pokemonNameWithAffix}} è stato assorbito\ndal {{typeName}} di {{pokemonName}}!", "contactHeldItemTransferApply": "Il/l'/lo/la {{itemName}} di {{pokemonNameWithAffix}} è stato rubato\nda {{pokemonName}} con {{typeName}}!", diff --git a/src/locales/it/move-trigger.json b/src/locales/it/move-trigger.json index 58b7b1a4c5b..785972b90f9 100644 --- a/src/locales/it/move-trigger.json +++ b/src/locales/it/move-trigger.json @@ -3,6 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}} riduce i suoi PS per potenziare la sua mossa!", "absorbedElectricity": "{{pokemonName}} assorbe elettricità!", "switchedStatChanges": "{{pokemonName}} scambia con il bersaglio le modifiche alle statistiche!", + "switchedTwoStatChanges": "{{pokemonName}} scambia con il bersaglio le modifiche a {{firstStat}} e {{secondStat}}!", + "switchedStat": "{{pokemonName}} scambia la sua {{stat}} con quella del bersaglio!", + "sharedGuard": "{{pokemonName}} somma le sue capacità difensive con quelle del bersaglio e le ripartisce equamente!", + "sharedPower": "{{pokemonName}} somma le sue capacità offensive con quelle del bersaglio e le ripartisce equamente!", "goingAllOutForAttack": "{{pokemonName}} fa sul serio!", "regainedHealth": "{{pokemonName}} s'è\nripreso!", "keptGoingAndCrashed": "{{pokemonName}} si sbilancia e\nsi schianta!", diff --git a/src/locales/ja/achv.json b/src/locales/ja/achv.json index 809375e5c7e..182da0aed2e 100644 --- a/src/locales/ja/achv.json +++ b/src/locales/ja/achv.json @@ -81,7 +81,7 @@ "100_RIBBONS": { "name": "マスターリーグチャンピオン" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "同力", "description": "少なくとも 一つの 能力を 最大まで あげて\n他の 手持ちポケモンに バトンタッチする" }, diff --git a/src/locales/ja/modifier-type.json b/src/locales/ja/modifier-type.json index 6effb1d9d82..f1fcc4d3005 100644 --- a/src/locales/ja/modifier-type.json +++ b/src/locales/ja/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "バトル{{battleCount}}かいのあいだ ダブルバトルになるかくりつを2ばいにする" }, - "TempBattleStatBoosterModifierType": { - "description": "すべてのパーティメンバーの {{tempBattleStatName}}を5かいのバトルのあいだ 1だんかいあげる" + "TempStatStageBoosterModifierType": { + "description": "すべてのパーティメンバーの {{stat}}を5かいのバトルのあいだ 1だんかいあげる" }, "AttackTypeBoosterModifierType": { "description": "ポケモンの {{moveType}}タイプのわざのいりょくを20パーセントあげる" @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "すべてのパーティメンバーのレベルを1あげる" }, - "PokemonBaseStatBoosterModifierType": { - "description": "ポケモンの{{statName}}のきほんステータスを10パーセントあげる。こたいちがたかいほどスタックのげんかいもたかくなる。" + "BaseStatBoosterModifierType": { + "description": "ポケモンの{{stat}}のきほんステータスを10パーセントあげる。こたいちがたかいほどスタックのげんかいもたかくなる。" }, "AllPokemonFullHpRestoreModifierType": { "description": "すべてのポケモンのHPを100パーセントかいふくする" @@ -248,6 +248,12 @@ "name": "ピントレンズ", "description": "弱点が 見える レンズ。持たせた ポケモンの技が 急所に 当たりやすくなる。" }, + "DIRE_HIT": { + "name": "クリティカット", + "extra": { + "raises": "きゅうしょりつ" + } + }, "LEEK": { "name": "ながねぎ", "description": "とても長くて 硬いクキ。カモネギに 持たせると 技が 急所に 当たりやすくなる。" @@ -411,25 +417,13 @@ "description": "メタモンに 持たせると 素早さが あがる 不思議 粉。とても こまかくて 硬い。" } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "プラスパワー", "x_defense": "ディフェンダー", "x_sp_atk": "スペシャルアップ", "x_sp_def": "スペシャルガード", "x_speed": "スピーダー", - "x_accuracy": "ヨクアタール", - "dire_hit": "クリティカット" - }, - "TempBattleStatBoosterStatName": { - "ATK": "こうげき", - "DEF": "ぼうぎょ", - "SPATK": "とくこう", - "SPDEF": "とくぼう", - "SPD": "すばやさ", - "ACC": "めいちゅう", - "CRIT": "きゅうしょりつ", - "EVA": "かいひ", - "DEFAULT": "???" + "x_accuracy": "ヨクアタール" }, "AttackTypeBoosterItem": { "silk_scarf": "シルクのスカーフ", @@ -569,4 +563,4 @@ "DOUSE_DRIVE": "アクアカセット", "ULTRANECROZIUM_Z": "ウルトラネクロZ" } -} \ No newline at end of file +} diff --git a/src/locales/ja/modifier.json b/src/locales/ja/modifier.json index 30d5270d94f..a42a849e232 100644 --- a/src/locales/ja/modifier.json +++ b/src/locales/ja/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 少し 回復!", "hitHealApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 少し 回復!", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 復活した!", - "pokemonResetNegativeStatStageApply": "{{pokemonNameWithAffix}}は {{typeName}}で\n下がった能力が 元に戻った!", + "resetNegativeStatStageApply": "{{pokemonNameWithAffix}}は {{typeName}}で\n下がった能力が 元に戻った!", "moneyInterestApply": "{{typeName}}から {{moneyAmount}}円 取得した!", "turnHeldItemTransferApply": "{{pokemonName}}の {{typeName}}が\n{{pokemonNameWithAffix}}の {{itemName}}を 吸い取った!", "contactHeldItemTransferApply": "{{pokemonName}}の {{typeName}}が\n{{pokemonNameWithAffix}}の {{itemName}}を うばい取った!", diff --git a/src/locales/ja/move-trigger.json b/src/locales/ja/move-trigger.json index 0c404feeed6..11a327c01d7 100644 --- a/src/locales/ja/move-trigger.json +++ b/src/locales/ja/move-trigger.json @@ -2,7 +2,9 @@ "hitWithRecoil": "{{pokemonName}}は\nはんどうによる ダメージを うけた!", "cutHpPowerUpMove": "{{pokemonName}}は\nたいりょくを けずって パワーぜんかい!", "absorbedElectricity": "{{pokemonName}}は\n でんきを きゅうしゅうした!", - "switchedStatChanges": "{{pokemonName}}は あいてと じぶんのn\nのうりょくへんかを いれかえた!", + "switchedStatChanges": "{{pokemonName}}は あいてと じぶんの\nのうりょくへんかを いれかえた!", + "sharedGuard": "{{pokemonName}}は\nおたがいのガードを シェアした!", + "sharedPower": "{{pokemonName}}は\nおたがいのパワーを シェアした!", "goingAllOutForAttack": "{{pokemonName}}は\nほんきを だした!", "regainedHealth": "{{pokemonName}}は\nたいりょくを かいふくした!", "keptGoingAndCrashed": "いきおいあまって {{pokemonName}}は\nじめんに ぶつかった!", @@ -59,4 +61,4 @@ "suppressAbilities": "{{pokemonName}}の とくせいが きかなくなった!", "revivalBlessing": "{{pokemonName}}は\n復活して 戦えるようになった!", "swapArenaTags": "{{pokemonName}}は\nおたがいの ばのこうかを いれかえた!" -} \ No newline at end of file +} diff --git a/src/locales/ko/achv.json b/src/locales/ko/achv.json index b9fd327ef3b..9364c1c55b6 100644 --- a/src/locales/ko/achv.json +++ b/src/locales/ko/achv.json @@ -80,7 +80,7 @@ "100_RIBBONS": { "name": "마스터 리그 챔피언" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "팀워크", "description": "한 개 이상의 능력치가 최대 랭크일 때 배턴터치 사용" }, diff --git a/src/locales/ko/modifier-type.json b/src/locales/ko/modifier-type.json index a5b3405b33f..d94837bb0d2 100644 --- a/src/locales/ko/modifier-type.json +++ b/src/locales/ko/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "{{battleCount}}번의 배틀 동안 더블 배틀이 등장할 확률이 두 배가 된다." }, - "TempBattleStatBoosterModifierType": { - "description": "자신의 모든 포켓몬이 5번의 배틀 동안 {{tempBattleStatName}}[[가]] 한 단계 증가한다." + "TempStatStageBoosterModifierType": { + "description": "자신의 모든 포켓몬이 5번의 배틀 동안 {{stat}}[[가]] 한 단계 증가한다." }, "AttackTypeBoosterModifierType": { "description": "지니게 하면 {{moveType}}타입 기술의 위력이 20% 상승한다." @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "자신의 모든 포켓몬의 레벨이 {{levels}}만큼 상승한다." }, - "PokemonBaseStatBoosterModifierType": { - "description": "지니게 하면 {{statName}} 종족값을 10% 올려준다. 개체값이 높을수록 더 많이 누적시킬 수 있다." + "BaseStatBoosterModifierType": { + "description": "지니게 하면 {{stat}} 종족값을 10% 올려준다. 개체값이 높을수록 더 많이 누적시킬 수 있다." }, "AllPokemonFullHpRestoreModifierType": { "description": "자신의 포켓몬의 HP를 모두 회복한다." @@ -248,6 +248,12 @@ "name": "초점렌즈", "description": "약점이 보이는 렌즈. 지니게 한 포켓몬의 기술이 급소에 맞기 쉬워진다." }, + "DIRE_HIT": { + "name": "크리티컬커터", + "extra": { + "raises": "급소율" + } + }, "LEEK": { "name": "대파", "description": "매우 길고 단단한 줄기. 파오리에게 지니게 하면 기술이 급소에 맞기 쉬워진다." @@ -411,25 +417,13 @@ "description": "메타몽에게 지니게 하면 스피드가 올라가는 이상한 가루. 매우 잘고 단단하다." } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "플러스파워", "x_defense": "디펜드업", "x_sp_atk": "스페셜업", "x_sp_def": "스페셜가드", "x_speed": "스피드업", - "x_accuracy": "잘-맞히기", - "dire_hit": "크리티컬커터" - }, - "TempBattleStatBoosterStatName": { - "ATK": "공격", - "DEF": "방어", - "SPATK": "특수공격", - "SPDEF": "특수방어", - "SPD": "스피드", - "ACC": "명중률", - "CRIT": "급소율", - "EVA": "회피율", - "DEFAULT": "???" + "x_accuracy": "잘-맞히기" }, "AttackTypeBoosterItem": { "silk_scarf": "실크스카프", @@ -606,4 +600,4 @@ "FAIRY_MEMORY": "페어리메모리", "NORMAL_MEMORY": "일반메모리" } -} \ No newline at end of file +} diff --git a/src/locales/ko/move-trigger.json b/src/locales/ko/move-trigger.json index f0e0fbd6a56..2a38bb13b0a 100644 --- a/src/locales/ko/move-trigger.json +++ b/src/locales/ko/move-trigger.json @@ -3,6 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}}[[는]]\n체력을 깎아서 자신의 기술을 강화했다!", "absorbedElectricity": "{{pokemonName}}는(은)\n전기를 흡수했다!", "switchedStatChanges": "{{pokemonName}}[[는]] 상대와 자신의\n능력 변화를 바꿨다!", + "switchedTwoStatChanges": "{{pokemonName}} 상대와 자신의 {{firstStat}}과 {{secondStat}}의 능력 변화를 바꿨다!", + "switchedStat": "{{pokemonName}} 서로의 {{stat}}를 교체했다!", + "sharedGuard": "{{pokemonName}} 서로의 가드를 셰어했다!", + "sharedPower": "{{pokemonName}} 서로의 파워를 셰어했다!", "goingAllOutForAttack": "{{pokemonName}}[[는]]\n전력을 다하기 시작했다!", "regainedHealth": "{{pokemonName}}[[는]]\n기력을 회복했다!", "keptGoingAndCrashed": "{{pokemonName}}[[는]]\n의욕이 넘쳐서 땅에 부딪쳤다!", @@ -63,4 +67,4 @@ "swapArenaTags": "{{pokemonName}}[[는]]\n서로의 필드 효과를 교체했다!", "exposedMove": "{{pokemonName}}[[는]]\n{{targetPokemonName}}의 정체를 꿰뚫어 보았다!", "safeguard": "{{targetName}}[[는]] 신비의 베일이 지켜 주고 있다!" -} \ No newline at end of file +} diff --git a/src/locales/pt_BR/achv.json b/src/locales/pt_BR/achv.json index acdec1ae306..93e982b60ea 100644 --- a/src/locales/pt_BR/achv.json +++ b/src/locales/pt_BR/achv.json @@ -84,7 +84,7 @@ "100_RIBBONS": { "name": "Fita de Diamante" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "Trabalho em Equipe", "description": "Use Baton Pass com pelo menos um atributo aumentado ao máximo" }, @@ -269,4 +269,4 @@ "name": "A torre da derrotA", "description": "Complete o desafio da Batalha Inversa.\n.asrevnI ahlataB ad oifased o etelpmoC" } -} \ No newline at end of file +} diff --git a/src/locales/pt_BR/modifier-type.json b/src/locales/pt_BR/modifier-type.json index b02281a53b8..823d6b35e16 100644 --- a/src/locales/pt_BR/modifier-type.json +++ b/src/locales/pt_BR/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "Dobra as chances de encontrar uma batalha em dupla por {{battleCount}} batalhas." }, - "TempBattleStatBoosterModifierType": { - "description": "Aumenta o atributo de {{tempBattleStatName}} para todos os membros da equipe por 5 batalhas." + "TempStatStageBoosterModifierType": { + "description": "Aumenta o atributo de {{stat}} para todos os membros da equipe por 5 batalhas." }, "AttackTypeBoosterModifierType": { "description": "Aumenta o poder dos ataques do tipo {{moveType}} de um Pokémon em 20%." @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "Aumenta em {{levels}} o nível de todos os membros da equipe." }, - "PokemonBaseStatBoosterModifierType": { - "description": "Aumenta o atributo base de {{statName}} em 10%. Quanto maior os IVs, maior o limite de aumento." + "BaseStatBoosterModifierType": { + "description": "Aumenta o atributo base de {{stat}} em 10%. Quanto maior os IVs, maior o limite de aumento." }, "AllPokemonFullHpRestoreModifierType": { "description": "Restaura totalmente os PS de todos os Pokémon." @@ -248,6 +248,12 @@ "name": "Lentes de Mira", "description": "Estas lentes facilitam o foco em pontos fracos. Aumenta a chance de acerto crítico de quem a segurar." }, + "DIRE_HIT": { + "name": "Direto", + "extra": { + "raises": "Chance de Acerto Crítico" + } + }, "LEEK": { "name": "Alho-poró", "description": "Esse talo de alho-poró muito longo e rígido aumenta a taxa de acerto crítico dos movimentos do Farfetch'd." @@ -411,25 +417,13 @@ "description": "Extremamente fino, porém duro, este pó estranho aumenta o atributo de Velocidade de Ditto." } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "Ataque X", "x_defense": "Defesa X", "x_sp_atk": "Ataque Esp. X", "x_sp_def": "Defesa Esp. X", "x_speed": "Velocidade X", - "x_accuracy": "Precisão X", - "dire_hit": "Direto" - }, - "TempBattleStatBoosterStatName": { - "ATK": "Ataque", - "DEF": "Defesa", - "SPATK": "Ataque Esp.", - "SPDEF": "Defesa Esp.", - "SPD": "Velocidade", - "ACC": "Precisão", - "CRIT": "Chance de Acerto Crítico", - "EVA": "Evasão", - "DEFAULT": "???" + "x_accuracy": "Precisão X" }, "AttackTypeBoosterItem": { "silk_scarf": "Lenço de Seda", diff --git a/src/locales/pt_BR/modifier.json b/src/locales/pt_BR/modifier.json index 602a0be3a5b..38622de579e 100644 --- a/src/locales/pt_BR/modifier.json +++ b/src/locales/pt_BR/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "{{pokemonNameWithAffix}} restaurou um pouco de PS usando\nsuas {{typeName}}!", "hitHealApply": "{{pokemonNameWithAffix}} restaurou um pouco de PS usando\nsua {{typeName}}!", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} foi reanimado\npor sua {{typeName}}!", - "pokemonResetNegativeStatStageApply": "Os atributos diminuídos de {{pokemonNameWithAffix}} foram\nrestaurados por seu(sua) {{typeName}}!", + "resetNegativeStatStageApply": "Os atributos diminuídos de {{pokemonNameWithAffix}} foram\nrestaurados por seu(sua) {{typeName}}!", "moneyInterestApply": "Você recebeu um juros de ₽{{moneyAmount}}\nde sua {{typeName}}!", "turnHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} foi absorvido(a)\npelo {{typeName}} de {{pokemonName}}!", "contactHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} foi pego(a)\npela {{typeName}} de {{pokemonName}}!", diff --git a/src/locales/pt_BR/move-trigger.json b/src/locales/pt_BR/move-trigger.json index ea320412a24..9aa13dedad5 100644 --- a/src/locales/pt_BR/move-trigger.json +++ b/src/locales/pt_BR/move-trigger.json @@ -63,4 +63,4 @@ "swapArenaTags": "{{pokemonName}} trocou os efeitos de batalha que afetam cada lado do campo!", "exposedMove": "{{pokemonName}} identificou\n{{targetPokemonName}}!", "safeguard": "{{targetName}} está protegido por Safeguard!" -} \ No newline at end of file +} diff --git a/src/locales/zh_CN/achv.json b/src/locales/zh_CN/achv.json index 8de0c48a2c3..90dfda0e3c1 100644 --- a/src/locales/zh_CN/achv.json +++ b/src/locales/zh_CN/achv.json @@ -86,7 +86,7 @@ "name": "大师球联盟冠军" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "团队协作", "description": "在一项属性强化至最大时用接力棒传递给其他宝可梦" }, diff --git a/src/locales/zh_CN/modifier-type.json b/src/locales/zh_CN/modifier-type.json index 4a982b77cea..5d6184640b1 100644 --- a/src/locales/zh_CN/modifier-type.json +++ b/src/locales/zh_CN/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "接下来的{{battleCount}}场战斗是双打的概率翻倍。" }, - "TempBattleStatBoosterModifierType": { - "description": "为所有成员宝可梦提升一级{{tempBattleStatName}},持续5场战斗。" + "TempStatStageBoosterModifierType": { + "description": "为所有成员宝可梦提升一级{{stat}},持续5场战斗。" }, "AttackTypeBoosterModifierType": { "description": "一只宝可梦的{{moveType}}系招式威力提升20%。" @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "使一只寶可夢的等級提升{{levels}}級。" }, - "PokemonBaseStatBoosterModifierType": { - "description": "增加10%持有者的{{statName}},\n个体值越高堆叠上限越高。" + "BaseStatBoosterModifierType": { + "description": "增加10%持有者的{{stat}},\n个体值越高堆叠上限越高。" }, "AllPokemonFullHpRestoreModifierType": { "description": "所有宝可梦完全回复HP。" @@ -248,6 +248,12 @@ "name": "焦点镜", "description": "能看见弱点的镜片。携带它的宝可梦的招式\n会变得容易击中要害。" }, + "DIRE_HIT": { + "name": "要害攻击", + "extra": { + "raises": "会心" + } + }, "LEEK": { "name": "大葱", "description": "非常长且坚硬的茎。让大葱鸭携带后,\n招式会变得容易击中要害。" @@ -411,25 +417,13 @@ "description": "让百变怪携带后,速度就会提高的神奇粉末。\n非常细腻坚硬。" } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "力量强化", "x_defense": "防御强化", "x_sp_atk": "特攻强化", "x_sp_def": "特防强化", "x_speed": "速度强化", - "x_accuracy": "命中强化", - "dire_hit": "要害攻击" - }, - "TempBattleStatBoosterStatName": { - "ATK": "攻击", - "DEF": "防御", - "SPATK": "特攻", - "SPDEF": "特防", - "SPD": "速度", - "ACC": "命中", - "CRIT": "会心", - "EVA": "闪避", - "DEFAULT": "???" + "x_accuracy": "命中强化" }, "AttackTypeBoosterItem": { "silk_scarf": "丝绸围巾", @@ -606,4 +600,4 @@ "FAIRY_MEMORY": "妖精存储碟", "NORMAL_MEMORY": "一般存储碟" } -} \ No newline at end of file +} diff --git a/src/locales/zh_CN/modifier.json b/src/locales/zh_CN/modifier.json index 707fab20ecc..a50cdd35bc1 100644 --- a/src/locales/zh_CN/modifier.json +++ b/src/locales/zh_CN/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回复了体力!", "hitHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回复了体力!", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}}用{{typeName}}\n恢复了活力!", - "pokemonResetNegativeStatStageApply": "{{pokemonNameWithAffix}}降低的能力被{{typeName}}\n复原了!", + "resetNegativeStatStageApply": "{{pokemonNameWithAffix}}降低的能力被{{typeName}}\n复原了!", "moneyInterestApply": "用{{typeName}}\n获得了 ₽{{moneyAmount}} 利息!", "turnHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}吸收了!", "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}夺取了!", diff --git a/src/locales/zh_CN/move-trigger.json b/src/locales/zh_CN/move-trigger.json index 44705d54e76..1eb4c397f45 100644 --- a/src/locales/zh_CN/move-trigger.json +++ b/src/locales/zh_CN/move-trigger.json @@ -3,6 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}}\n削减了体力并提升了招式威力!", "absorbedElectricity": "{{pokemonName}}\n吸收了电力!", "switchedStatChanges": "{{pokemonName}}和对手互换了\n自己的能力变化!", + "switchedTwoStatChanges": "{{pokemonName}} 和对手互换了自己的{{firstStat}}和{{secondStat}}的能力变化!", + "switchedStat": "{{pokemonName}} 互换了各自的{{stat}}!", + "sharedGuard": "{{pokemonName}} 平分了各自的防守!", + "sharedPower": "{{pokemonName}} 平分了各自的力量!", "goingAllOutForAttack": "{{pokemonName}}拿出全力了!", "regainedHealth": "{{pokemonName}}的\n体力回复了!", "keptGoingAndCrashed": "{{pokemonName}}因势头过猛\n而撞到了地面!", diff --git a/src/locales/zh_CN/pokemon-info.json b/src/locales/zh_CN/pokemon-info.json index 5194189c806..a21a8156e4c 100644 --- a/src/locales/zh_CN/pokemon-info.json +++ b/src/locales/zh_CN/pokemon-info.json @@ -1,7 +1,7 @@ { "Stat": { "HP": "最大HP", - "HPshortened": "最大HP", + "HPshortened": "HP", "ATK": "攻击", "ATKshortened": "攻击", "DEF": "防御", @@ -37,4 +37,4 @@ "FAIRY": "妖精", "STELLAR": "星晶" } -} \ No newline at end of file +} diff --git a/src/locales/zh_TW/achv.json b/src/locales/zh_TW/achv.json index 6587394cf41..9edce2e368d 100644 --- a/src/locales/zh_TW/achv.json +++ b/src/locales/zh_TW/achv.json @@ -80,7 +80,7 @@ "100_RIBBONS": { "name": "大師球聯盟冠軍" }, - "TRANSFER_MAX_BATTLE_STAT": { + "TRANSFER_MAX_STAT_STAGE": { "name": "團隊協作", "description": "在一項屬性強化至最大時用接力棒傳遞給其他寶可夢" }, @@ -257,4 +257,4 @@ "name": "鏡子子鏡", "description": "完成逆轉之戰挑戰\n戰挑戰之轉逆成完" } -} \ No newline at end of file +} diff --git a/src/locales/zh_TW/modifier-type.json b/src/locales/zh_TW/modifier-type.json index 847ede7001e..68881a206cb 100644 --- a/src/locales/zh_TW/modifier-type.json +++ b/src/locales/zh_TW/modifier-type.json @@ -49,8 +49,8 @@ "DoubleBattleChanceBoosterModifierType": { "description": "接下來的{{battleCount}}場戰鬥是雙打的概率翻倍。" }, - "TempBattleStatBoosterModifierType": { - "description": "爲所有成員寶可夢提升一級{{tempBattleStatName}},持續5場戰鬥。" + "TempStatStageBoosterModifierType": { + "description": "爲所有成員寶可夢提升一級{{stat}},持續5場戰鬥。" }, "AttackTypeBoosterModifierType": { "description": "一隻寶可夢的{{moveType}}系招式威力提升20%。" @@ -61,8 +61,8 @@ "AllPokemonLevelIncrementModifierType": { "description": "Increases all party members' level by {{levels}}." }, - "PokemonBaseStatBoosterModifierType": { - "description": "增加持有者的{{statName}}10%,個體值越高堆疊\n上限越高。" + "BaseStatBoosterModifierType": { + "description": "增加持有者的{{stat}}10%,個體值越高堆疊\n上限越高。" }, "AllPokemonFullHpRestoreModifierType": { "description": "所有寶可夢完全恢復HP。" @@ -244,6 +244,12 @@ "name": "焦點鏡", "description": "能看見弱點的鏡片。攜帶它的寶可夢的招式 會變得容易擊中要害。" }, + "DIRE_HIT": { + "name": "要害攻擊", + "extra": { + "raises": "會心" + } + }, "LEEK": { "name": "大蔥", "description": "非常長且堅硬的莖。讓大蔥鴨攜帶後,招式會 變得容易擊中要害。" @@ -407,25 +413,13 @@ "description": "讓百變怪攜帶後,速度就會提高的神奇粉末。非常細緻堅硬。" } }, - "TempBattleStatBoosterItem": { + "TempStatStageBoosterItem": { "x_attack": "力量強化", "x_defense": "防禦強化", "x_sp_atk": "特攻強化", "x_sp_def": "特防強化", "x_speed": "速度強化", - "x_accuracy": "命中強化", - "dire_hit": "要害攻擊" - }, - "TempBattleStatBoosterStatName": { - "ATK": "攻擊", - "DEF": "防禦", - "SPATK": "特攻", - "SPDEF": "特防", - "SPD": "速度", - "ACC": "命中", - "CRIT": "會心", - "EVA": "閃避", - "DEFAULT": "???" + "x_accuracy": "命中強化" }, "AttackTypeBoosterItem": { "silk_scarf": "絲綢圍巾", @@ -602,4 +596,4 @@ "FAIRY_MEMORY": "妖精記憶碟", "NORMAL_MEMORY": "一般記憶碟" } -} \ No newline at end of file +} diff --git a/src/locales/zh_TW/modifier.json b/src/locales/zh_TW/modifier.json index eb4b5107cff..1c0d4760e6f 100644 --- a/src/locales/zh_TW/modifier.json +++ b/src/locales/zh_TW/modifier.json @@ -8,4 +8,4 @@ "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}奪取了!", "enemyTurnHealApply": "{{pokemonNameWithAffix}}\n回復了一些體力!", "bypassSpeedChanceApply": "{{pokemonName}}用了{{itemName}}後,行動變快了!" -} \ No newline at end of file +} diff --git a/src/locales/zh_TW/move-trigger.json b/src/locales/zh_TW/move-trigger.json index 60dcc1eab7a..d6d0ce659ea 100644 --- a/src/locales/zh_TW/move-trigger.json +++ b/src/locales/zh_TW/move-trigger.json @@ -3,6 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}}\n削減體力並提升了招式威力!", "absorbedElectricity": "{{pokemonName}}\n吸收了电力!", "switchedStatChanges": "{{pokemonName}}和對手互換了\n自身的能力變化!", + "switchedTwoStatChanges": "{{pokemonName}} 和對手互換了自身的{{firstStat}}和{{secondStat}}的能力變化!", + "switchedStat": "{{pokemonName}} 互換了各自的{{stat}}!", + "sharedGuard": "{{pokemonName}} 平分了各自的防守!", + "sharedPower": "{{pokemonName}} 平分了各自的力量!", "goingAllOutForAttack": "{{pokemonName}}拿出全力了!", "regainedHealth": "{{pokemonName}}的\n體力回復了!", "keptGoingAndCrashed": "{{pokemonName}}因勢頭過猛\n而撞到了地面!", diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index d7937692a8d..fe586074c79 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -3,12 +3,10 @@ import { AttackMove, allMoves, selfStatLowerMoves } from "../data/move"; import { MAX_PER_TYPE_POKEBALLS, PokeballType, getPokeballCatchMultiplier, getPokeballName } from "../data/pokeball"; import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from "../field/pokemon"; import { EvolutionItem, pokemonEvolutions } from "../data/pokemon-evolutions"; -import { Stat, getStatName } from "../data/pokemon-stat"; import { tmPoolTiers, tmSpecies } from "../data/tms"; import { Type } from "../data/type"; import PartyUiHandler, { PokemonMoveSelectFilter, PokemonSelectFilter } from "../ui/party-ui-handler"; import * as Utils from "../utils"; -import { TempBattleStat, getTempBattleStatBoosterItemName, getTempBattleStatName } from "../data/temp-battle-stat"; import { getBerryEffectDescription, getBerryName } from "../data/berry"; import { Unlockables } from "../system/unlockables"; import { StatusEffect, getStatusEffectDescriptor } from "../data/status-effect"; @@ -28,6 +26,7 @@ import { BerryType } from "#enums/berry-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { getPokemonNameWithAffix } from "#app/messages.js"; +import { PermanentStat, TEMP_BATTLE_STATS, TempBattleStat, Stat, getStatKey } from "#app/enums/stat"; const outputModifierData = false; const useMaxWeightForOutput = false; @@ -447,26 +446,28 @@ export class DoubleBattleChanceBoosterModifierType extends ModifierType { } } -export class TempBattleStatBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType { - public tempBattleStat: TempBattleStat; +export class TempStatStageBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType { + private stat: TempBattleStat; + private key: string; - constructor(tempBattleStat: TempBattleStat) { - super("", getTempBattleStatBoosterItemName(tempBattleStat).replace(/\./g, "").replace(/[ ]/g, "_").toLowerCase(), - (_type, _args) => new Modifiers.TempBattleStatBoosterModifier(this, this.tempBattleStat)); + constructor(stat: TempBattleStat) { + const key = TempStatStageBoosterModifierTypeGenerator.items[stat]; + super("", key, (_type, _args) => new Modifiers.TempStatStageBoosterModifier(this, this.stat)); - this.tempBattleStat = tempBattleStat; + this.stat = stat; + this.key = key; } get name(): string { - return i18next.t(`modifierType:TempBattleStatBoosterItem.${getTempBattleStatBoosterItemName(this.tempBattleStat).replace(/\./g, "").replace(/[ ]/g, "_").toLowerCase()}`); + return i18next.t(`modifierType:TempStatStageBoosterItem.${this.key}`); } - getDescription(scene: BattleScene): string { - return i18next.t("modifierType:ModifierType.TempBattleStatBoosterModifierType.description", { tempBattleStatName: getTempBattleStatName(this.tempBattleStat) }); + getDescription(_scene: BattleScene): string { + return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t(getStatKey(this.stat)) }); } getPregenArgs(): any[] { - return [ this.tempBattleStat ]; + return [ this.stat ]; } } @@ -611,40 +612,24 @@ export class AllPokemonLevelIncrementModifierType extends ModifierType { } } -function getBaseStatBoosterItemName(stat: Stat) { - switch (stat) { - case Stat.HP: - return "HP Up"; - case Stat.ATK: - return "Protein"; - case Stat.DEF: - return "Iron"; - case Stat.SPATK: - return "Calcium"; - case Stat.SPDEF: - return "Zinc"; - case Stat.SPD: - return "Carbos"; - } -} +export class BaseStatBoosterModifierType extends PokemonHeldItemModifierType implements GeneratedPersistentModifierType { + private stat: PermanentStat; + private key: string; -export class PokemonBaseStatBoosterModifierType extends PokemonHeldItemModifierType implements GeneratedPersistentModifierType { - private localeName: string; - private stat: Stat; + constructor(stat: PermanentStat) { + const key = BaseStatBoosterModifierTypeGenerator.items[stat]; + super("", key, (_type, args) => new Modifiers.BaseStatModifier(this, (args[0] as Pokemon).id, this.stat)); - constructor(localeName: string, stat: Stat) { - super("", localeName.replace(/[ \-]/g, "_").toLowerCase(), (_type, args) => new Modifiers.PokemonBaseStatModifier(this, (args[0] as Pokemon).id, this.stat)); - - this.localeName = localeName; this.stat = stat; + this.key = key; } get name(): string { - return i18next.t(`modifierType:BaseStatBoosterItem.${this.localeName.replace(/[ \-]/g, "_").toLowerCase()}`); + return i18next.t(`modifierType:BaseStatBoosterItem.${this.key}`); } - getDescription(scene: BattleScene): string { - return i18next.t("modifierType:ModifierType.PokemonBaseStatBoosterModifierType.description", { statName: getStatName(this.stat) }); + getDescription(_scene: BattleScene): string { + return i18next.t("modifierType:ModifierType.BaseStatBoosterModifierType.description", { stat: i18next.t(getStatKey(this.stat)) }); } getPregenArgs(): any[] { @@ -922,6 +907,48 @@ class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator { } } +class BaseStatBoosterModifierTypeGenerator extends ModifierTypeGenerator { + public static readonly items: Record = { + [Stat.HP]: "hp_up", + [Stat.ATK]: "protein", + [Stat.DEF]: "iron", + [Stat.SPATK]: "calcium", + [Stat.SPDEF]: "zinc", + [Stat.SPD]: "carbos" + }; + + constructor() { + super((_party: Pokemon[], pregenArgs?: any[]) => { + if (pregenArgs) { + return new BaseStatBoosterModifierType(pregenArgs[0]); + } + const randStat: PermanentStat = Utils.randSeedInt(Stat.SPD + 1); + return new BaseStatBoosterModifierType(randStat); + }); + } +} + +class TempStatStageBoosterModifierTypeGenerator extends ModifierTypeGenerator { + public static readonly items: Record = { + [Stat.ATK]: "x_attack", + [Stat.DEF]: "x_defense", + [Stat.SPATK]: "x_sp_atk", + [Stat.SPDEF]: "x_sp_def", + [Stat.SPD]: "x_speed", + [Stat.ACC]: "x_accuracy" + }; + + constructor() { + super((_party: Pokemon[], pregenArgs?: any[]) => { + if (pregenArgs && (pregenArgs.length === 1) && TEMP_BATTLE_STATS.includes(pregenArgs[0])) { + return new TempStatStageBoosterModifierType(pregenArgs[0]); + } + const randStat: TempBattleStat = Utils.randSeedInt(Stat.ACC, Stat.ATK); + return new TempStatStageBoosterModifierType(randStat); + }); + } +} + /** * Modifier type generator for {@linkcode SpeciesStatBoosterModifierType}, which * encapsulates the logic for weighting the most useful held item from @@ -930,7 +957,7 @@ class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator { */ class SpeciesStatBoosterModifierTypeGenerator extends ModifierTypeGenerator { /** Object comprised of the currently available species-based stat boosting held items */ - public static items = { + public static readonly items = { LIGHT_BALL: { stats: [Stat.ATK, Stat.SPATK], multiplier: 2, species: [Species.PIKACHU] }, THICK_CLUB: { stats: [Stat.ATK], multiplier: 2, species: [Species.CUBONE, Species.MAROWAK, Species.ALOLA_MAROWAK] }, METAL_POWDER: { stats: [Stat.DEF], multiplier: 2, species: [Species.DITTO] }, @@ -1233,7 +1260,7 @@ export type GeneratorModifierOverride = { type?: SpeciesStatBoosterItem; } | { - name: keyof Pick; + name: keyof Pick; type?: TempBattleStat; } | { @@ -1306,7 +1333,7 @@ export const modifierTypes = { SACRED_ASH: () => new AllPokemonFullReviveModifierType("modifierType:ModifierType.SACRED_ASH", "sacred_ash"), REVIVER_SEED: () => new PokemonHeldItemModifierType("modifierType:ModifierType.REVIVER_SEED", "reviver_seed", (type, args) => new Modifiers.PokemonInstantReviveModifier(type, (args[0] as Pokemon).id)), - WHITE_HERB: () => new PokemonHeldItemModifierType("modifierType:ModifierType.WHITE_HERB", "white_herb", (type, args) => new Modifiers.PokemonResetNegativeStatStageModifier(type, (args[0] as Pokemon).id)), + WHITE_HERB: () => new PokemonHeldItemModifierType("modifierType:ModifierType.WHITE_HERB", "white_herb", (type, args) => new Modifiers.ResetNegativeStatStageModifier(type, (args[0] as Pokemon).id)), ETHER: () => new PokemonPpRestoreModifierType("modifierType:ModifierType.ETHER", "ether", 10), MAX_ETHER: () => new PokemonPpRestoreModifierType("modifierType:ModifierType.MAX_ETHER", "max_ether", -1), @@ -1327,23 +1354,15 @@ export const modifierTypes = { SPECIES_STAT_BOOSTER: () => new SpeciesStatBoosterModifierTypeGenerator(), - TEMP_STAT_BOOSTER: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => { - if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in TempBattleStat)) { - return new TempBattleStatBoosterModifierType(pregenArgs[0] as TempBattleStat); - } - const randTempBattleStat = Utils.randSeedInt(6) as TempBattleStat; - return new TempBattleStatBoosterModifierType(randTempBattleStat); - }), - DIRE_HIT: () => new TempBattleStatBoosterModifierType(TempBattleStat.CRIT), + TEMP_STAT_STAGE_BOOSTER: () => new TempStatStageBoosterModifierTypeGenerator(), - BASE_STAT_BOOSTER: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => { - if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in Stat)) { - const stat = pregenArgs[0] as Stat; - return new PokemonBaseStatBoosterModifierType(getBaseStatBoosterItemName(stat), stat); + DIRE_HIT: () => new class extends ModifierType { + getDescription(_scene: BattleScene): string { + return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t("modifierType:ModifierType.DIRE_HIT.extra.raises") }); } - const randStat = Utils.randSeedInt(6) as Stat; - return new PokemonBaseStatBoosterModifierType(getBaseStatBoosterItemName(randStat), randStat); - }), + }("modifierType:ModifierType.DIRE_HIT", "dire_hit", (type, _args) => new Modifiers.TempCritBoosterModifier(type)), + + BASE_STAT_BOOSTER: () => new BaseStatBoosterModifierTypeGenerator(), ATTACK_TYPE_BOOSTER: () => new AttackTypeBoosterModifierTypeGenerator(), @@ -1513,7 +1532,7 @@ const modifierPool: ModifierPool = { return thresholdPartyMemberCount; }, 3), new WeightedModifierType(modifierTypes.LURE, skipInLastClassicWaveOrDefault(2)), - new WeightedModifierType(modifierTypes.TEMP_STAT_BOOSTER, 4), + new WeightedModifierType(modifierTypes.TEMP_STAT_STAGE_BOOSTER, 4), new WeightedModifierType(modifierTypes.BERRY, 2), new WeightedModifierType(modifierTypes.TM_COMMON, 2), ].map(m => { @@ -1626,7 +1645,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.WHITE_HERB, (party: Pokemon[]) => { const checkedAbilities = [Abilities.WEAK_ARMOR, Abilities.CONTRARY, Abilities.MOODY, Abilities.ANGER_SHELL, Abilities.COMPETITIVE, Abilities.DEFIANT]; const weightMultiplier = party.filter( - p => !p.getHeldItems().some(i => i instanceof Modifiers.PokemonResetNegativeStatStageModifier && i.stackCount >= i.getMaxHeldItemCount(p)) && + p => !p.getHeldItems().some(i => i instanceof Modifiers.ResetNegativeStatStageModifier && i.stackCount >= i.getMaxHeldItemCount(p)) && (checkedAbilities.some(a => p.hasAbility(a, false, true)) || p.getMoveset(true).some(m => m && selfStatLowerMoves.includes(m.moveId)))).length; // If a party member has one of the above moves or abilities and doesn't have max herbs, the herb will appear more frequently return 0 * (weightMultiplier ? 2 : 1) + (weightMultiplier ? weightMultiplier * 0 : 0); diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index c1defc4abfd..84d8a1385af 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -3,14 +3,12 @@ import BattleScene from "../battle-scene"; import { getLevelTotalExp } from "../data/exp"; import { MAX_PER_TYPE_POKEBALLS, PokeballType } from "../data/pokeball"; import Pokemon, { PlayerPokemon } from "../field/pokemon"; -import { Stat } from "../data/pokemon-stat"; import { addTextObject, TextStyle } from "../ui/text"; import { Type } from "../data/type"; import { EvolutionPhase } from "../phases/evolution-phase"; import { FusionSpeciesFormEvolution, pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions"; import { getPokemonNameWithAffix } from "../messages"; import * as Utils from "../utils"; -import { TempBattleStat } from "../data/temp-battle-stat"; import { getBerryEffectFunc, getBerryPredicate } from "../data/berry"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; @@ -23,6 +21,7 @@ import Overrides from "#app/overrides"; import { ModifierType, modifierTypes } from "./modifier-type"; import { Command } from "#app/ui/command-ui-handler"; import { Species } from "#enums/species"; +import { Stat, type PermanentStat, type TempBattleStat, BATTLE_STATS, TEMP_BATTLE_STATS } from "#app/enums/stat"; import i18next from "i18next"; import { allMoves } from "#app/data/move"; @@ -362,41 +361,160 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier } } -export class TempBattleStatBoosterModifier extends LapsingPersistentModifier { - private tempBattleStat: TempBattleStat; +/** + * Modifier used for party-wide items, specifically the X items, that + * temporarily increases the stat stage multiplier of the corresponding + * {@linkcode TempBattleStat}. + * @extends LapsingPersistentModifier + * @see {@linkcode apply} + */ +export class TempStatStageBoosterModifier extends LapsingPersistentModifier { + private stat: TempBattleStat; + private multiplierBoost: number; - constructor(type: ModifierTypes.TempBattleStatBoosterModifierType, tempBattleStat: TempBattleStat, battlesLeft?: integer, stackCount?: integer) { - super(type, battlesLeft || 5, stackCount); + constructor(type: ModifierType, stat: TempBattleStat, battlesLeft?: number, stackCount?: number) { + super(type, battlesLeft ?? 5, stackCount); - this.tempBattleStat = tempBattleStat; + this.stat = stat; + // Note that, because we want X Accuracy to maintain its original behavior, + // it will increment as it did previously, directly to the stat stage. + this.multiplierBoost = stat !== Stat.ACC ? 0.3 : 1; } match(modifier: Modifier): boolean { - if (modifier instanceof TempBattleStatBoosterModifier) { - return (modifier as TempBattleStatBoosterModifier).tempBattleStat === this.tempBattleStat - && (modifier as TempBattleStatBoosterModifier).battlesLeft === this.battlesLeft; + if (modifier instanceof TempStatStageBoosterModifier) { + const modifierInstance = modifier as TempStatStageBoosterModifier; + return (modifierInstance.stat === this.stat); } return false; } - clone(): TempBattleStatBoosterModifier { - return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.tempBattleStat, this.battlesLeft, this.stackCount); + clone() { + return new TempStatStageBoosterModifier(this.type, this.stat, this.battlesLeft, this.stackCount); } getArgs(): any[] { - return [ this.tempBattleStat, this.battlesLeft ]; + return [ this.stat, this.battlesLeft ]; } - apply(args: any[]): boolean { - const tempBattleStat = args[0] as TempBattleStat; + /** + * Checks if {@linkcode args} contains the necessary elements and if the + * incoming stat is matches {@linkcode stat}. + * @param args [0] {@linkcode TempBattleStat} being checked at the time + * [1] {@linkcode Utils.NumberHolder} N/A + * @returns true if the modifier can be applied, false otherwise + */ + shouldApply(args: any[]): boolean { + return args && (args.length === 2) && TEMP_BATTLE_STATS.includes(args[0]) && (args[0] === this.stat) && (args[1] instanceof Utils.NumberHolder); + } - if (tempBattleStat === this.tempBattleStat) { - const statLevel = args[1] as Utils.IntegerHolder; - statLevel.value = Math.min(statLevel.value + 1, 6); - return true; + /** + * Increases the incoming stat stage matching {@linkcode stat} by {@linkcode multiplierBoost}. + * @param args [0] {@linkcode TempBattleStat} N/A + * [1] {@linkcode Utils.NumberHolder} that holds the resulting value of the stat stage multiplier + */ + apply(args: any[]): boolean { + (args[1] as Utils.NumberHolder).value += this.multiplierBoost; + return true; + } + + /** + * Goes through existing modifiers for any that match the selected modifier, + * which will then either add it to the existing modifiers if none were found + * or, if one was found, it will refresh {@linkcode battlesLeft}. + * @param modifiers {@linkcode PersistentModifier} array of the player's modifiers + * @param _virtual N/A + * @param _scene N/A + * @returns true if the modifier was successfully added or applied, false otherwise + */ + add(modifiers: PersistentModifier[], _virtual: boolean, _scene: BattleScene): boolean { + for (const modifier of modifiers) { + if (this.match(modifier)) { + const modifierInstance = modifier as TempStatStageBoosterModifier; + if (modifierInstance.getBattlesLeft() < 5) { + modifierInstance.battlesLeft = 5; + return true; + } + // should never get here + return false; + } } - return false; + modifiers.push(this); + return true; + } + + getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number { + return 1; + } +} + +/** + * Modifier used for party-wide items, namely Dire Hit, that + * temporarily increments the critical-hit stage + * @extends LapsingPersistentModifier + * @see {@linkcode apply} + */ +export class TempCritBoosterModifier extends LapsingPersistentModifier { + constructor(type: ModifierType, battlesLeft?: integer, stackCount?: number) { + super(type, battlesLeft || 5, stackCount); + } + + clone() { + return new TempCritBoosterModifier(this.type, this.stackCount); + } + + match(modifier: Modifier): boolean { + return (modifier instanceof TempCritBoosterModifier); + } + + /** + * Checks if {@linkcode args} contains the necessary elements. + * @param args [1] {@linkcode Utils.NumberHolder} N/A + * @returns true if the critical-hit stage boost applies successfully + */ + shouldApply(args: any[]): boolean { + return args && (args.length === 1) && (args[0] instanceof Utils.NumberHolder); + } + + /** + * Increases the current critical-hit stage value by 1. + * @param args [0] {@linkcode Utils.IntegerHolder} that holds the resulting critical-hit level + * @returns true if the critical-hit stage boost applies successfully + */ + apply(args: any[]): boolean { + (args[0] as Utils.NumberHolder).value++; + return true; + } + + /** + * Goes through existing modifiers for any that match the selected modifier, + * which will then either add it to the existing modifiers if none were found + * or, if one was found, it will refresh {@linkcode battlesLeft}. + * @param modifiers {@linkcode PersistentModifier} array of the player's modifiers + * @param _virtual N/A + * @param _scene N/A + * @returns true if the modifier was successfully added or applied, false otherwise + */ + add(modifiers: PersistentModifier[], _virtual: boolean, _scene: BattleScene): boolean { + for (const modifier of modifiers) { + if (this.match(modifier)) { + const modifierInstance = modifier as TempCritBoosterModifier; + if (modifierInstance.getBattlesLeft() < 5) { + modifierInstance.battlesLeft = 5; + return true; + } + // should never get here + return false; + } + } + + modifiers.push(this); + return true; + } + + getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number { + return 1; } } @@ -663,24 +781,30 @@ export class TerastallizeModifier extends LapsingPokemonHeldItemModifier { } } -export class PokemonBaseStatModifier extends PokemonHeldItemModifier { - protected stat: Stat; +/** + * Modifier used for held items, specifically vitamins like Carbos, Hp Up, etc., that + * increase the value of a given {@linkcode PermanentStat}. + * @extends LapsingPersistentModifier + * @see {@linkcode apply} + */ +export class BaseStatModifier extends PokemonHeldItemModifier { + protected stat: PermanentStat; readonly isTransferrable: boolean = false; - constructor(type: ModifierTypes.PokemonBaseStatBoosterModifierType, pokemonId: integer, stat: Stat, stackCount?: integer) { + constructor(type: ModifierType, pokemonId: integer, stat: PermanentStat, stackCount?: integer) { super(type, pokemonId, stackCount); this.stat = stat; } matchType(modifier: Modifier): boolean { - if (modifier instanceof PokemonBaseStatModifier) { - return (modifier as PokemonBaseStatModifier).stat === this.stat; + if (modifier instanceof BaseStatModifier) { + return (modifier as BaseStatModifier).stat === this.stat; } return false; } clone(): PersistentModifier { - return new PokemonBaseStatModifier(this.type as ModifierTypes.PokemonBaseStatBoosterModifierType, this.pokemonId, this.stat, this.stackCount); + return new BaseStatModifier(this.type, this.pokemonId, this.stat, this.stackCount); } getArgs(): any[] { @@ -688,12 +812,12 @@ export class PokemonBaseStatModifier extends PokemonHeldItemModifier { } shouldApply(args: any[]): boolean { - return super.shouldApply(args) && args.length === 2 && args[1] instanceof Array; + return super.shouldApply(args) && args.length === 2 && Array.isArray(args[1]); } apply(args: any[]): boolean { - args[1][this.stat] = Math.min(Math.floor(args[1][this.stat] * (1 + this.getStackCount() * 0.1)), 999999); - + const baseStats = args[1] as number[]; + baseStats[this.stat] = Math.floor(baseStats[this.stat] * (1 + this.getStackCount() * 0.1)); return true; } @@ -1398,42 +1522,48 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier { } /** - * Modifier used for White Herb, which resets negative {@linkcode Stat} changes + * Modifier used for held items, namely White Herb, that restore adverse stat + * stages in battle. * @extends PokemonHeldItemModifier * @see {@linkcode apply} */ -export class PokemonResetNegativeStatStageModifier extends PokemonHeldItemModifier { +export class ResetNegativeStatStageModifier extends PokemonHeldItemModifier { constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) { super(type, pokemonId, stackCount); } matchType(modifier: Modifier) { - return modifier instanceof PokemonResetNegativeStatStageModifier; + return modifier instanceof ResetNegativeStatStageModifier; } clone() { - return new PokemonResetNegativeStatStageModifier(this.type, this.pokemonId, this.stackCount); + return new ResetNegativeStatStageModifier(this.type, this.pokemonId, this.stackCount); } /** - * Restores any negative stat stages of the mon to 0 - * @param args args[0] is the {@linkcode Pokemon} whose stat stages are being checked - * @returns true if any stat changes were applied (item was used), false otherwise + * Goes through the holder's stat stages and, if any are negative, resets that + * stat stage back to 0. + * @param args [0] {@linkcode Pokemon} that holds the held item + * @returns true if any stat stages were reset, false otherwise */ apply(args: any[]): boolean { const pokemon = args[0] as Pokemon; - const loweredStats = pokemon.summonData.battleStats.filter(s => s < 0); - if (loweredStats.length) { - for (let s = 0; s < pokemon.summonData.battleStats.length; s++) { - pokemon.summonData.battleStats[s] = Math.max(0, pokemon.summonData.battleStats[s]); + let statRestored = false; + + for (const s of BATTLE_STATS) { + if (pokemon.getStatStage(s) < 0) { + pokemon.setStatStage(s, 0); + statRestored = true; } - pokemon.scene.queueMessage(i18next.t("modifier:pokemonResetNegativeStatStageApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name })); - return true; } - return false; + + if (statRestored) { + pokemon.scene.queueMessage(i18next.t("modifier:resetNegativeStatStageApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name })); + } + return statRestored; } - getMaxHeldItemCount(pokemon: Pokemon): integer { + getMaxHeldItemCount(_pokemon: Pokemon): integer { return 2; } } @@ -2745,7 +2875,7 @@ export class EnemyFusionChanceModifier extends EnemyPersistentModifier { * - The player * - The enemy * @param scene current {@linkcode BattleScene} - * @param isPlayer {@linkcode boolean} for whether the the player (`true`) or enemy (`false`) is being overridden + * @param isPlayer {@linkcode boolean} for whether the player (`true`) or enemy (`false`) is being overridden */ export function overrideModifiers(scene: BattleScene, isPlayer: boolean = true): void { const modifiersOverride: ModifierTypes.ModifierOverride[] = isPlayer ? Overrides.STARTING_MODIFIER_OVERRIDE : Overrides.OPP_MODIFIER_OVERRIDE; @@ -2760,13 +2890,22 @@ export function overrideModifiers(scene: BattleScene, isPlayer: boolean = true): modifiersOverride.forEach(item => { const modifierFunc = modifierTypes[item.name]; - const modifier = modifierFunc().withIdFromFunc(modifierFunc).newModifier() as PersistentModifier; - modifier.stackCount = item.count || 1; + let modifierType: ModifierType | null = modifierFunc(); - if (isPlayer) { - scene.addModifier(modifier, true, false, false, true); - } else { - scene.addEnemyModifier(modifier, true, true); + if (modifierType instanceof ModifierTypes.ModifierTypeGenerator) { + const pregenArgs = ("type" in item) && (item.type !== null) ? [item.type] : undefined; + modifierType = modifierType.generateType([], pregenArgs); + } + + const modifier = modifierType && modifierType.withIdFromFunc(modifierFunc).newModifier() as PersistentModifier; + if (modifier) { + modifier.stackCount = item.count || 1; + + if (isPlayer) { + scene.addModifier(modifier, true, false, false, true); + } else { + scene.addEnemyModifier(modifier, true, true); + } } }); } diff --git a/src/phases/faint-phase.ts b/src/phases/faint-phase.ts index 66946d268cb..d5dd9f61340 100644 --- a/src/phases/faint-phase.ts +++ b/src/phases/faint-phase.ts @@ -1,14 +1,14 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex, BattleType } from "#app/battle.js"; -import { applyPostFaintAbAttrs, PostFaintAbAttr, applyPostKnockOutAbAttrs, PostKnockOutAbAttr, applyPostVictoryAbAttrs, PostVictoryAbAttr } from "#app/data/ability.js"; -import { BattlerTagLapseType } from "#app/data/battler-tags.js"; -import { battleSpecDialogue } from "#app/data/dialogue.js"; -import { allMoves, PostVictoryStatChangeAttr } from "#app/data/move.js"; -import { BattleSpec } from "#app/enums/battle-spec.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; -import { PokemonMove, EnemyPokemon, PlayerPokemon, HitResult } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { PokemonInstantReviveModifier } from "#app/modifier/modifier.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex, BattleType } from "#app/battle"; +import { applyPostFaintAbAttrs, PostFaintAbAttr, applyPostKnockOutAbAttrs, PostKnockOutAbAttr, applyPostVictoryAbAttrs, PostVictoryAbAttr } from "#app/data/ability"; +import { BattlerTagLapseType } from "#app/data/battler-tags"; +import { battleSpecDialogue } from "#app/data/dialogue"; +import { allMoves, PostVictoryStatStageChangeAttr } from "#app/data/move"; +import { BattleSpec } from "#app/enums/battle-spec"; +import { StatusEffect } from "#app/enums/status-effect"; +import { PokemonMove, EnemyPokemon, PlayerPokemon, HitResult } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { PokemonInstantReviveModifier } from "#app/modifier/modifier"; import i18next from "i18next"; import { DamagePhase } from "./damage-phase"; import { PokemonPhase } from "./pokemon-phase"; @@ -72,7 +72,7 @@ export class FaintPhase extends PokemonPhase { if (defeatSource?.isOnField()) { applyPostVictoryAbAttrs(PostVictoryAbAttr, defeatSource); const pvmove = allMoves[pokemon.turnData.attacksReceived[0].move]; - const pvattrs = pvmove.getAttrs(PostVictoryStatChangeAttr); + const pvattrs = pvmove.getAttrs(PostVictoryStatStageChangeAttr); if (pvattrs.length) { for (const pvattr of pvattrs) { pvattr.applyPostVictory(defeatSource, defeatSource, pvmove); diff --git a/src/phases/field-phase.ts b/src/phases/field-phase.ts index 02d1f1395d3..b65e903a32b 100644 --- a/src/phases/field-phase.ts +++ b/src/phases/field-phase.ts @@ -1,5 +1,5 @@ +import Pokemon from "#app/field/pokemon.js"; import { BattlePhase } from "./battle-phase"; -import Pokemon from "#app/field/pokemon"; type PokemonFunc = (pokemon: Pokemon) => void; diff --git a/src/phases/stat-change-phase.ts b/src/phases/stat-change-phase.ts deleted file mode 100644 index 3116c49e8ef..00000000000 --- a/src/phases/stat-change-phase.ts +++ /dev/null @@ -1,248 +0,0 @@ -import { BattlerIndex } from "#app/battle"; -import BattleScene from "#app/battle-scene"; -import { applyAbAttrs, applyPostStatChangeAbAttrs, applyPreStatChangeAbAttrs, PostStatChangeAbAttr, ProtectStatAbAttr, StatChangeCopyAbAttr, StatChangeMultiplierAbAttr } from "#app/data/ability"; -import { ArenaTagSide, MistTag } from "#app/data/arena-tag"; -import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "#app/data/battle-stat"; -import Pokemon from "#app/field/pokemon"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { PokemonResetNegativeStatStageModifier } from "#app/modifier/modifier"; -import { handleTutorial, Tutorial } from "#app/tutorial"; -import * as Utils from "#app/utils"; -import i18next from "i18next"; -import { PokemonPhase } from "./pokemon-phase"; - -export type StatChangeCallback = (target: Pokemon | null, changed: BattleStat[], relativeChanges: number[]) => void; - -export class StatChangePhase extends PokemonPhase { - private stats: BattleStat[]; - private selfTarget: boolean; - private levels: integer; - private showMessage: boolean; - private ignoreAbilities: boolean; - private canBeCopied: boolean; - private onChange: StatChangeCallback | null; - - - constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], levels: integer, showMessage: boolean = true, ignoreAbilities: boolean = false, canBeCopied: boolean = true, onChange: StatChangeCallback | null = null) { - super(scene, battlerIndex); - - this.selfTarget = selfTarget; - this.stats = stats; - this.levels = levels; - this.showMessage = showMessage; - this.ignoreAbilities = ignoreAbilities; - this.canBeCopied = canBeCopied; - this.onChange = onChange; - } - - start() { - const pokemon = this.getPokemon(); - - let random = false; - - if (this.stats.length === 1 && this.stats[0] === BattleStat.RAND) { - this.stats[0] = this.getRandomStat(); - random = true; - } - - this.aggregateStatChanges(random); - - if (!pokemon.isActive(true)) { - return this.end(); - } - - const filteredStats = this.stats.map(s => s !== BattleStat.RAND ? s : this.getRandomStat()).filter(stat => { - const cancelled = new Utils.BooleanHolder(false); - - if (!this.selfTarget && this.levels < 0) { - this.scene.arena.applyTagsForSide(MistTag, pokemon.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY, cancelled); - } - - if (!cancelled.value && !this.selfTarget && this.levels < 0) { - applyPreStatChangeAbAttrs(ProtectStatAbAttr, this.getPokemon(), stat, cancelled); - } - - return !cancelled.value; - }); - - const levels = new Utils.IntegerHolder(this.levels); - - if (!this.ignoreAbilities) { - applyAbAttrs(StatChangeMultiplierAbAttr, pokemon, null, false, levels); - } - - const battleStats = this.getPokemon().summonData.battleStats; - const relLevels = filteredStats.map(stat => (levels.value >= 1 ? Math.min(battleStats[stat] + levels.value, 6) : Math.max(battleStats[stat] + levels.value, -6)) - battleStats[stat]); - - this.onChange && this.onChange(this.getPokemon(), filteredStats, relLevels); - - const end = () => { - if (this.showMessage) { - const messages = this.getStatChangeMessages(filteredStats, levels.value, relLevels); - for (const message of messages) { - this.scene.queueMessage(message); - } - } - - for (const stat of filteredStats) { - if (levels.value > 0 && pokemon.summonData.battleStats[stat] < 6) { - if (!pokemon.turnData) { - // Temporary fix for missing turn data struct on turn 1 - pokemon.resetTurnData(); - } - pokemon.turnData.battleStatsIncreased = true; - } else if (levels.value < 0 && pokemon.summonData.battleStats[stat] > -6) { - if (!pokemon.turnData) { - // Temporary fix for missing turn data struct on turn 1 - pokemon.resetTurnData(); - } - pokemon.turnData.battleStatsDecreased = true; - } - - pokemon.summonData.battleStats[stat] = Math.max(Math.min(pokemon.summonData.battleStats[stat] + levels.value, 6), -6); - } - - if (levels.value > 0 && this.canBeCopied) { - for (const opponent of pokemon.getOpponents()) { - applyAbAttrs(StatChangeCopyAbAttr, opponent, null, false, this.stats, levels.value); - } - } - - applyPostStatChangeAbAttrs(PostStatChangeAbAttr, pokemon, filteredStats, this.levels, this.selfTarget); - - // Look for any other stat change phases; if this is the last one, do White Herb check - const existingPhase = this.scene.findPhase(p => p instanceof StatChangePhase && p.battlerIndex === this.battlerIndex); - if (!(existingPhase instanceof StatChangePhase)) { - // Apply White Herb if needed - const whiteHerb = this.scene.applyModifier(PokemonResetNegativeStatStageModifier, this.player, pokemon) as PokemonResetNegativeStatStageModifier; - // If the White Herb was applied, consume it - if (whiteHerb) { - --whiteHerb.stackCount; - if (whiteHerb.stackCount <= 0) { - this.scene.removeModifier(whiteHerb); - } - this.scene.updateModifiers(this.player); - } - } - - pokemon.updateInfo(); - - handleTutorial(this.scene, Tutorial.Stat_Change).then(() => super.end()); - }; - - if (relLevels.filter(l => l).length && this.scene.moveAnimations) { - pokemon.enableMask(); - const pokemonMaskSprite = pokemon.maskSprite; - - const tileX = (this.player ? 106 : 236) * pokemon.getSpriteScale() * this.scene.field.scale; - const tileY = ((this.player ? 148 : 84) + (levels.value >= 1 ? 160 : 0)) * pokemon.getSpriteScale() * this.scene.field.scale; - const tileWidth = 156 * this.scene.field.scale * pokemon.getSpriteScale(); - const tileHeight = 316 * this.scene.field.scale * pokemon.getSpriteScale(); - - // On increase, show the red sprite located at ATK - // On decrease, show the blue sprite located at SPD - const spriteColor = levels.value >= 1 ? BattleStat[BattleStat.ATK].toLowerCase() : BattleStat[BattleStat.SPD].toLowerCase(); - const statSprite = this.scene.add.tileSprite(tileX, tileY, tileWidth, tileHeight, "battle_stats", spriteColor); - statSprite.setPipeline(this.scene.fieldSpritePipeline); - statSprite.setAlpha(0); - statSprite.setScale(6); - statSprite.setOrigin(0.5, 1); - - this.scene.playSound(`se/stat_${levels.value >= 1 ? "up" : "down"}`); - - statSprite.setMask(new Phaser.Display.Masks.BitmapMask(this.scene, pokemonMaskSprite ?? undefined)); - - this.scene.tweens.add({ - targets: statSprite, - duration: 250, - alpha: 0.8375, - onComplete: () => { - this.scene.tweens.add({ - targets: statSprite, - delay: 1000, - duration: 250, - alpha: 0 - }); - } - }); - - this.scene.tweens.add({ - targets: statSprite, - duration: 1500, - y: `${levels.value >= 1 ? "-" : "+"}=${160 * 6}` - }); - - this.scene.time.delayedCall(1750, () => { - pokemon.disableMask(); - end(); - }); - } else { - end(); - } - } - - getRandomStat(): BattleStat { - const allStats = Utils.getEnumValues(BattleStat); - return this.getPokemon() ? allStats[this.getPokemon()!.randSeedInt(BattleStat.SPD + 1)] : BattleStat.ATK; // TODO: return default ATK on random? idk... - } - - aggregateStatChanges(random: boolean = false): void { - const isAccEva = [BattleStat.ACC, BattleStat.EVA].some(s => this.stats.includes(s)); - let existingPhase: StatChangePhase; - if (this.stats.length === 1) { - while ((existingPhase = (this.scene.findPhase(p => p instanceof StatChangePhase && p.battlerIndex === this.battlerIndex && p.stats.length === 1 - && (p.stats[0] === this.stats[0] || (random && p.stats[0] === BattleStat.RAND)) - && p.selfTarget === this.selfTarget && p.showMessage === this.showMessage && p.ignoreAbilities === this.ignoreAbilities) as StatChangePhase))) { - if (existingPhase.stats[0] === BattleStat.RAND) { - existingPhase.stats[0] = this.getRandomStat(); - if (existingPhase.stats[0] !== this.stats[0]) { - continue; - } - } - this.levels += existingPhase.levels; - - if (!this.scene.tryRemovePhase(p => p === existingPhase)) { - break; - } - } - } - while ((existingPhase = (this.scene.findPhase(p => p instanceof StatChangePhase && p.battlerIndex === this.battlerIndex && p.selfTarget === this.selfTarget - && ([BattleStat.ACC, BattleStat.EVA].some(s => p.stats.includes(s)) === isAccEva) - && p.levels === this.levels && p.showMessage === this.showMessage && p.ignoreAbilities === this.ignoreAbilities) as StatChangePhase))) { - this.stats.push(...existingPhase.stats); - if (!this.scene.tryRemovePhase(p => p === existingPhase)) { - break; - } - } - } - - getStatChangeMessages(stats: BattleStat[], levels: integer, relLevels: integer[]): string[] { - const messages: string[] = []; - - const relLevelStatIndexes = {}; - for (let rl = 0; rl < relLevels.length; rl++) { - const relLevel = relLevels[rl]; - if (!relLevelStatIndexes[relLevel]) { - relLevelStatIndexes[relLevel] = []; - } - relLevelStatIndexes[relLevel].push(rl); - } - - Object.keys(relLevelStatIndexes).forEach(rl => { - const relLevelStats = stats.filter((_, i) => relLevelStatIndexes[rl].includes(i)); - let statsFragment = ""; - - if (relLevelStats.length > 1) { - statsFragment = relLevelStats.length >= 5 - ? i18next.t("battle:stats") - : `${relLevelStats.slice(0, -1).map(s => getBattleStatName(s)).join(", ")}${relLevelStats.length > 2 ? "," : ""} ${i18next.t("battle:statsAnd")} ${getBattleStatName(relLevelStats[relLevelStats.length - 1])}`; - messages.push(getBattleStatLevelChangeDescription(getPokemonNameWithAffix(this.getPokemon()), statsFragment, Math.abs(parseInt(rl)), levels >= 1, relLevelStats.length)); - } else { - statsFragment = getBattleStatName(relLevelStats[0]); - messages.push(getBattleStatLevelChangeDescription(getPokemonNameWithAffix(this.getPokemon()), statsFragment, Math.abs(parseInt(rl)), levels >= 1, relLevelStats.length)); - } - }); - - return messages; - } -} diff --git a/src/phases/stat-stage-change-phase.ts b/src/phases/stat-stage-change-phase.ts new file mode 100644 index 00000000000..55faaa29903 --- /dev/null +++ b/src/phases/stat-stage-change-phase.ts @@ -0,0 +1,244 @@ +import { BattlerIndex } from "#app/battle"; +import BattleScene from "#app/battle-scene"; +import { applyAbAttrs, applyPostStatStageChangeAbAttrs, applyPreStatStageChangeAbAttrs, PostStatStageChangeAbAttr, ProtectStatAbAttr, StatStageChangeCopyAbAttr, StatStageChangeMultiplierAbAttr } from "#app/data/ability"; +import { ArenaTagSide, MistTag } from "#app/data/arena-tag"; +import Pokemon from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { ResetNegativeStatStageModifier } from "#app/modifier/modifier"; +import { handleTutorial, Tutorial } from "#app/tutorial"; +import * as Utils from "#app/utils"; +import i18next from "i18next"; +import { PokemonPhase } from "./pokemon-phase"; +import { Stat, type BattleStat, getStatKey, getStatStageChangeDescriptionKey } from "#enums/stat"; + +export type StatStageChangeCallback = (target: Pokemon | null, changed: BattleStat[], relativeChanges: number[]) => void; + +export class StatStageChangePhase extends PokemonPhase { + private stats: BattleStat[]; + private selfTarget: boolean; + private stages: integer; + private showMessage: boolean; + private ignoreAbilities: boolean; + private canBeCopied: boolean; + private onChange: StatStageChangeCallback | null; + + + constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], stages: integer, showMessage: boolean = true, ignoreAbilities: boolean = false, canBeCopied: boolean = true, onChange: StatStageChangeCallback | null = null) { + super(scene, battlerIndex); + + this.selfTarget = selfTarget; + this.stats = stats; + this.stages = stages; + this.showMessage = showMessage; + this.ignoreAbilities = ignoreAbilities; + this.canBeCopied = canBeCopied; + this.onChange = onChange; + } + + start() { + const pokemon = this.getPokemon(); + + if (!pokemon.isActive(true)) { + return this.end(); + } + + let simulate = false; + + const filteredStats = this.stats.filter(stat => { + const cancelled = new Utils.BooleanHolder(false); + + if (!this.selfTarget && this.stages < 0) { + // TODO: Include simulate boolean when tag applications can be simulated + this.scene.arena.applyTagsForSide(MistTag, pokemon.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY, cancelled); + } + + if (!cancelled.value && !this.selfTarget && this.stages < 0) { + applyPreStatStageChangeAbAttrs(ProtectStatAbAttr, pokemon, stat, cancelled, simulate); + } + + // If one stat stage decrease is cancelled, simulate the rest of the applications + if (cancelled.value) { + simulate = true; + } + + return !cancelled.value; + }); + + const stages = new Utils.IntegerHolder(this.stages); + + if (!this.ignoreAbilities) { + applyAbAttrs(StatStageChangeMultiplierAbAttr, pokemon, null, false, stages); + } + + const relLevels = filteredStats.map(s => (stages.value >= 1 ? Math.min(pokemon.getStatStage(s) + stages.value, 6) : Math.max(pokemon.getStatStage(s) + stages.value, -6)) - pokemon.getStatStage(s)); + + this.onChange && this.onChange(this.getPokemon(), filteredStats, relLevels); + + const end = () => { + if (this.showMessage) { + const messages = this.getStatStageChangeMessages(filteredStats, stages.value, relLevels); + for (const message of messages) { + this.scene.queueMessage(message); + } + } + + for (const s of filteredStats) { + if (stages.value > 0 && pokemon.getStatStage(s) < 6) { + if (!pokemon.turnData) { + // Temporary fix for missing turn data struct on turn 1 + pokemon.resetTurnData(); + } + pokemon.turnData.statStagesIncreased = true; + } else if (stages.value < 0 && pokemon.getStatStage(s) > -6) { + if (!pokemon.turnData) { + // Temporary fix for missing turn data struct on turn 1 + pokemon.resetTurnData(); + } + pokemon.turnData.statStagesDecreased = true; + } + + pokemon.setStatStage(s, pokemon.getStatStage(s) + stages.value); + } + + if (stages.value > 0 && this.canBeCopied) { + for (const opponent of pokemon.getOpponents()) { + applyAbAttrs(StatStageChangeCopyAbAttr, opponent, null, false, this.stats, stages.value); + } + } + + applyPostStatStageChangeAbAttrs(PostStatStageChangeAbAttr, pokemon, filteredStats, this.stages, this.selfTarget); + + // Look for any other stat change phases; if this is the last one, do White Herb check + const existingPhase = this.scene.findPhase(p => p instanceof StatStageChangePhase && p.battlerIndex === this.battlerIndex); + if (!(existingPhase instanceof StatStageChangePhase)) { + // Apply White Herb if needed + const whiteHerb = this.scene.applyModifier(ResetNegativeStatStageModifier, this.player, pokemon) as ResetNegativeStatStageModifier; + // If the White Herb was applied, consume it + if (whiteHerb) { + whiteHerb.stackCount--; + if (whiteHerb.stackCount <= 0) { + this.scene.removeModifier(whiteHerb); + } + this.scene.updateModifiers(this.player); + } + } + + pokemon.updateInfo(); + + handleTutorial(this.scene, Tutorial.Stat_Change).then(() => super.end()); + }; + + if (relLevels.filter(l => l).length && this.scene.moveAnimations) { + pokemon.enableMask(); + const pokemonMaskSprite = pokemon.maskSprite; + + const tileX = (this.player ? 106 : 236) * pokemon.getSpriteScale() * this.scene.field.scale; + const tileY = ((this.player ? 148 : 84) + (stages.value >= 1 ? 160 : 0)) * pokemon.getSpriteScale() * this.scene.field.scale; + const tileWidth = 156 * this.scene.field.scale * pokemon.getSpriteScale(); + const tileHeight = 316 * this.scene.field.scale * pokemon.getSpriteScale(); + + // On increase, show the red sprite located at ATK + // On decrease, show the blue sprite located at SPD + const spriteColor = stages.value >= 1 ? Stat[Stat.ATK].toLowerCase() : Stat[Stat.SPD].toLowerCase(); + const statSprite = this.scene.add.tileSprite(tileX, tileY, tileWidth, tileHeight, "battle_stats", spriteColor); + statSprite.setPipeline(this.scene.fieldSpritePipeline); + statSprite.setAlpha(0); + statSprite.setScale(6); + statSprite.setOrigin(0.5, 1); + + this.scene.playSound(`se/stat_${stages.value >= 1 ? "up" : "down"}`); + + statSprite.setMask(new Phaser.Display.Masks.BitmapMask(this.scene, pokemonMaskSprite ?? undefined)); + + this.scene.tweens.add({ + targets: statSprite, + duration: 250, + alpha: 0.8375, + onComplete: () => { + this.scene.tweens.add({ + targets: statSprite, + delay: 1000, + duration: 250, + alpha: 0 + }); + } + }); + + this.scene.tweens.add({ + targets: statSprite, + duration: 1500, + y: `${stages.value >= 1 ? "-" : "+"}=${160 * 6}` + }); + + this.scene.time.delayedCall(1750, () => { + pokemon.disableMask(); + end(); + }); + } else { + end(); + } + } + + aggregateStatStageChanges(): void { + const accEva: BattleStat[] = [ Stat.ACC, Stat.EVA ]; + const isAccEva = accEva.some(s => this.stats.includes(s)); + let existingPhase: StatStageChangePhase; + if (this.stats.length === 1) { + while ((existingPhase = (this.scene.findPhase(p => p instanceof StatStageChangePhase && p.battlerIndex === this.battlerIndex && p.stats.length === 1 + && (p.stats[0] === this.stats[0]) + && p.selfTarget === this.selfTarget && p.showMessage === this.showMessage && p.ignoreAbilities === this.ignoreAbilities) as StatStageChangePhase))) { + this.stages += existingPhase.stages; + + if (!this.scene.tryRemovePhase(p => p === existingPhase)) { + break; + } + } + } + while ((existingPhase = (this.scene.findPhase(p => p instanceof StatStageChangePhase && p.battlerIndex === this.battlerIndex && p.selfTarget === this.selfTarget + && (accEva.some(s => p.stats.includes(s)) === isAccEva) + && p.stages === this.stages && p.showMessage === this.showMessage && p.ignoreAbilities === this.ignoreAbilities) as StatStageChangePhase))) { + this.stats.push(...existingPhase.stats); + if (!this.scene.tryRemovePhase(p => p === existingPhase)) { + break; + } + } + } + + getStatStageChangeMessages(stats: BattleStat[], stages: integer, relStages: integer[]): string[] { + const messages: string[] = []; + + const relStageStatIndexes = {}; + for (let rl = 0; rl < relStages.length; rl++) { + const relStage = relStages[rl]; + if (!relStageStatIndexes[relStage]) { + relStageStatIndexes[relStage] = []; + } + relStageStatIndexes[relStage].push(rl); + } + + Object.keys(relStageStatIndexes).forEach(rl => { + const relStageStats = stats.filter((_, i) => relStageStatIndexes[rl].includes(i)); + let statsFragment = ""; + + if (relStageStats.length > 1) { + statsFragment = relStageStats.length >= 5 + ? i18next.t("battle:stats") + : `${relStageStats.slice(0, -1).map(s => i18next.t(getStatKey(s))).join(", ")}${relStageStats.length > 2 ? "," : ""} ${i18next.t("battle:statsAnd")} ${i18next.t(getStatKey(relStageStats[relStageStats.length - 1]))}`; + messages.push(i18next.t(getStatStageChangeDescriptionKey(Math.abs(parseInt(rl)), stages >= 1), { + pokemonNameWithAffix: getPokemonNameWithAffix(this.getPokemon()), + stats: statsFragment, + count: relStageStats.length + })); + } else { + statsFragment = i18next.t(getStatKey(relStageStats[0])); + messages.push(i18next.t(getStatStageChangeDescriptionKey(Math.abs(parseInt(rl)), stages >= 1), { + pokemonNameWithAffix: getPokemonNameWithAffix(this.getPokemon()), + stats: statsFragment, + count: relStageStats.length + })); + } + }); + + return messages; + } +} diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index b2545e9ee30..5c1af4228c6 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -43,8 +43,8 @@ export class TurnStartPhase extends FieldPhase { }, this.scene.currentBattle.turn, this.scene.waveSeed); orderedTargets.sort((a: Pokemon, b: Pokemon) => { - const aSpeed = a?.getBattleStat(Stat.SPD) || 0; - const bSpeed = b?.getBattleStat(Stat.SPD) || 0; + const aSpeed = a?.getEffectiveStat(Stat.SPD) || 0; + const bSpeed = b?.getEffectiveStat(Stat.SPD) || 0; return bSpeed - aSpeed; }); diff --git a/src/system/achv.ts b/src/system/achv.ts index de2862c2813..89e5493eb2e 100644 --- a/src/system/achv.ts +++ b/src/system/achv.ts @@ -5,9 +5,10 @@ import { pokemonEvolutions } from "#app/data/pokemon-evolutions"; import i18next from "i18next"; import * as Utils from "../utils"; import { PlayerGender } from "#enums/player-gender"; -import { Challenge, FreshStartChallenge, InverseBattleChallenge, SingleGenerationChallenge, SingleTypeChallenge } from "#app/data/challenge"; -import { Challenges } from "#app/enums/challenges"; +import { Challenge, FreshStartChallenge, SingleGenerationChallenge, SingleTypeChallenge, InverseBattleChallenge } from "#app/data/challenge"; import { ConditionFn } from "#app/@types/common"; +import { Stat, getShortenedStatKey } from "#app/enums/stat"; +import { Challenges } from "#app/enums/challenges"; export enum AchvTier { COMMON, @@ -172,13 +173,13 @@ export function getAchievementDescription(localizationKey: string): string { case "10000_DMG": return i18next.t("achv:DamageAchv.description", {context: genderStr, "damageAmount": achvs._10000_DMG.damageAmount.toLocaleString("en-US")}); case "250_HEAL": - return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._250_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t("pokemonInfo:Stat.HPshortened")}); + return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._250_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t(getShortenedStatKey(Stat.HP))}); case "1000_HEAL": - return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._1000_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t("pokemonInfo:Stat.HPshortened")}); + return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._1000_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t(getShortenedStatKey(Stat.HP))}); case "2500_HEAL": - return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._2500_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t("pokemonInfo:Stat.HPshortened")}); + return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._2500_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t(getShortenedStatKey(Stat.HP))}); case "10000_HEAL": - return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._10000_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t("pokemonInfo:Stat.HPshortened")}); + return i18next.t("achv:HealAchv.description", {context: genderStr, "healAmount": achvs._10000_HEAL.healAmount.toLocaleString("en-US"), "HP": i18next.t(getShortenedStatKey(Stat.HP))}); case "LV_100": return i18next.t("achv:LevelAchv.description", {context: genderStr, "level": achvs.LV_100.level}); case "LV_250": @@ -195,7 +196,7 @@ export function getAchievementDescription(localizationKey: string): string { return i18next.t("achv:RibbonAchv.description", {context: genderStr, "ribbonAmount": achvs._75_RIBBONS.ribbonAmount.toLocaleString("en-US")}); case "100_RIBBONS": return i18next.t("achv:RibbonAchv.description", {context: genderStr, "ribbonAmount": achvs._100_RIBBONS.ribbonAmount.toLocaleString("en-US")}); - case "TRANSFER_MAX_BATTLE_STAT": + case "TRANSFER_MAX_STAT_STAGE": return i18next.t("achv:TRANSFER_MAX_BATTLE_STAT.description", { context: genderStr }); case "MAX_FRIENDSHIP": return i18next.t("achv:MAX_FRIENDSHIP.description", { context: genderStr }); @@ -305,7 +306,7 @@ export const achvs = { _50_RIBBONS: new RibbonAchv("50_RIBBONS", "", 50, "ultra_ribbon", 50).setSecret(true), _75_RIBBONS: new RibbonAchv("75_RIBBONS", "", 75, "rogue_ribbon", 75).setSecret(true), _100_RIBBONS: new RibbonAchv("100_RIBBONS", "", 100, "master_ribbon", 100).setSecret(true), - TRANSFER_MAX_BATTLE_STAT: new Achv("TRANSFER_MAX_BATTLE_STAT", "", "TRANSFER_MAX_BATTLE_STAT.description", "baton", 20), + TRANSFER_MAX_STAT_STAGE: new Achv("TRANSFER_MAX_STAT_STAGE", "", "TRANSFER_MAX_STAT_STAGE.description", "baton", 20), MAX_FRIENDSHIP: new Achv("MAX_FRIENDSHIP", "", "MAX_FRIENDSHIP.description", "soothe_bell", 25), MEGA_EVOLVE: new Achv("MEGA_EVOLVE", "", "MEGA_EVOLVE.description", "mega_bracelet", 50), GIGANTAMAX: new Achv("GIGANTAMAX", "", "GIGANTAMAX.description", "dynamax_band", 50), diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 928077608ed..9a743ceb1d2 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -124,7 +124,8 @@ export default class PokemonData { this.summonData = new PokemonSummonData(); if (!forHistory && source.summonData) { - this.summonData.battleStats = source.summonData.battleStats; + this.summonData.stats = source.summonData.stats; + this.summonData.statStages = source.summonData.statStages; this.summonData.moveQueue = source.summonData.moveQueue; this.summonData.disabledMove = source.summonData.disabledMove; this.summonData.disabledTurns = source.summonData.disabledTurns; diff --git a/src/test/abilities/beast_boost.test.ts b/src/test/abilities/beast_boost.test.ts new file mode 100644 index 00000000000..cfe015c822e --- /dev/null +++ b/src/test/abilities/beast_boost.test.ts @@ -0,0 +1,97 @@ +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; +import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; +import { VictoryPhase } from "#app/phases/victory-phase"; +import { TurnStartPhase } from "#app/phases/turn-start-phase"; +import { BattlerIndex } from "#app/battle"; + +describe("Abilities - Beast Boost", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemySpecies(Species.BULBASAUR) + .enemyAbility(Abilities.BEAST_BOOST) + .ability(Abilities.BEAST_BOOST) + .startingLevel(2000) + .moveset([ Moves.FLAMETHROWER ]) + .enemyMoveset(SPLASH_ONLY); + }); + + // Note that both MOXIE and BEAST_BOOST test for their current implementation and not their mainline behavior. + it("should prefer highest stat to boost its corresponding stat stage by 1 when winning a battle", async() => { + // SLOWBRO's highest stat is DEF, so it should be picked here + await game.startBattle([ + Species.SLOWBRO + ]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + + expect(playerPokemon.getStatStage(Stat.DEF)).toBe(0); + + game.move.select(Moves.FLAMETHROWER); + await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase); + + expect(playerPokemon.getStatStage(Stat.DEF)).toBe(1); + }, 20000); + + it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => { + // If the opponent can GUARD_SPLIT, SLOWBRO's second highest stat should be SPATK + game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT)); + + await game.startBattle([ + Species.SLOWBRO + ]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(0); + + game.move.select(Moves.FLAMETHROWER); + + await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]); + + await game.phaseInterceptor.runFrom(TurnStartPhase).to(VictoryPhase); + + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); + }, 20000); + + it("should have order preference in case of stat ties", async() => { + // Order preference follows the order of EFFECTIVE_STAT + await game.startBattle([ + Species.SLOWBRO + ]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + + // Set up tie between SPATK, SPDEF, and SPD, where SPATK should win + vi.spyOn(playerPokemon, "stats", "get").mockReturnValue([ 10000, 1, 1, 100, 100, 100 ]); + + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(0); + + game.move.select(Moves.FLAMETHROWER); + + await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase); + + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); + }, 20000); +}); diff --git a/src/test/abilities/contrary.test.ts b/src/test/abilities/contrary.test.ts new file mode 100644 index 00000000000..19ecc7e0240 --- /dev/null +++ b/src/test/abilities/contrary.test.ts @@ -0,0 +1,42 @@ +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; +import { Abilities } from "#enums/abilities"; +import { Species } from "#enums/species"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +describe("Abilities - Contrary", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemySpecies(Species.BULBASAUR) + .enemyAbility(Abilities.CONTRARY) + .ability(Abilities.INTIMIDATE) + .enemyMoveset(SPLASH_ONLY); + }); + + it("should invert stat changes when applied", async() => { + await game.startBattle([ + Species.SLOWBRO + ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1); + }, 20000); +}); diff --git a/src/test/abilities/costar.test.ts b/src/test/abilities/costar.test.ts index 9a4baeef1fb..96ec775f2a0 100644 --- a/src/test/abilities/costar.test.ts +++ b/src/test/abilities/costar.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; @@ -35,7 +35,7 @@ describe("Abilities - COSTAR", () => { test( - "ability copies positive stat changes", + "ability copies positive stat stages", async () => { game.override.enemyAbility(Abilities.BALL_FETCH); @@ -48,8 +48,8 @@ describe("Abilities - COSTAR", () => { game.move.select(Moves.SPLASH, 1); await game.toNextTurn(); - expect(leftPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(+2); - expect(rightPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(0); + expect(leftPokemon.getStatStage(Stat.SPATK)).toBe(2); + expect(rightPokemon.getStatStage(Stat.SPATK)).toBe(0); game.move.select(Moves.SPLASH); await game.phaseInterceptor.to(CommandPhase); @@ -57,14 +57,14 @@ describe("Abilities - COSTAR", () => { await game.phaseInterceptor.to(MessagePhase); [leftPokemon, rightPokemon] = game.scene.getPlayerField(); - expect(leftPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(+2); - expect(rightPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(+2); + expect(leftPokemon.getStatStage(Stat.SPATK)).toBe(2); + expect(rightPokemon.getStatStage(Stat.SPATK)).toBe(2); }, TIMEOUT, ); test( - "ability copies negative stat changes", + "ability copies negative stat stages", async () => { game.override.enemyAbility(Abilities.INTIMIDATE); @@ -72,8 +72,8 @@ describe("Abilities - COSTAR", () => { let [leftPokemon, rightPokemon] = game.scene.getPlayerField(); - expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2); - expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2); + expect(leftPokemon.getStatStage(Stat.ATK)).toBe(-2); + expect(leftPokemon.getStatStage(Stat.ATK)).toBe(-2); game.move.select(Moves.SPLASH); await game.phaseInterceptor.to(CommandPhase); @@ -81,8 +81,8 @@ describe("Abilities - COSTAR", () => { await game.phaseInterceptor.to(MessagePhase); [leftPokemon, rightPokemon] = game.scene.getPlayerField(); - expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2); - expect(rightPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2); + expect(leftPokemon.getStatStage(Stat.ATK)).toBe(-2); + expect(rightPokemon.getStatStage(Stat.ATK)).toBe(-2); }, TIMEOUT, ); diff --git a/src/test/abilities/disguise.test.ts b/src/test/abilities/disguise.test.ts index bbb0a20dc1a..f7c45e91724 100644 --- a/src/test/abilities/disguise.test.ts +++ b/src/test/abilities/disguise.test.ts @@ -1,8 +1,8 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { StatusEffect } from "#app/data/status-effect"; import { toDmgValue } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { StatusEffect } from "#app/data/status-effect"; +import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { SPLASH_ONLY } from "../utils/testUtils"; @@ -36,7 +36,7 @@ describe("Abilities - Disguise", () => { }, TIMEOUT); it("takes no damage from attacking move and transforms to Busted form, takes 1/8 max HP damage from the disguise breaking", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const mimikyu = game.scene.getEnemyPokemon()!; const maxHp = mimikyu.getMaxHp(); @@ -53,7 +53,7 @@ describe("Abilities - Disguise", () => { }, TIMEOUT); it("doesn't break disguise when attacked with ineffective move", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const mimikyu = game.scene.getEnemyPokemon()!; @@ -67,9 +67,9 @@ describe("Abilities - Disguise", () => { }, TIMEOUT); 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 () => { - game.override.moveset([Moves.SURGING_STRIKES]); + game.override.moveset([ Moves.SURGING_STRIKES ]); game.override.enemyLevel(5); - await game.startBattle(); + await game.classicMode.startBattle(); const mimikyu = game.scene.getEnemyPokemon()!; const maxHp = mimikyu.getMaxHp(); @@ -91,7 +91,7 @@ describe("Abilities - Disguise", () => { }, TIMEOUT); it("takes effects from status moves and damage from status effects", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const mimikyu = game.scene.getEnemyPokemon()!; expect(mimikyu.hp).toBe(mimikyu.getMaxHp()); @@ -102,7 +102,7 @@ describe("Abilities - Disguise", () => { expect(mimikyu.formIndex).toBe(disguisedForm); expect(mimikyu.status?.effect).toBe(StatusEffect.POISON); - expect(mimikyu.summonData.battleStats[BattleStat.SPD]).toBe(-1); + expect(mimikyu.getStatStage(Stat.SPD)).toBe(-1); expect(mimikyu.hp).toBeLessThan(mimikyu.getMaxHp()); }, TIMEOUT); @@ -110,7 +110,7 @@ describe("Abilities - Disguise", () => { game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); game.override.starterSpecies(0); - await game.startBattle([Species.MIMIKYU, Species.FURRET]); + await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]); const mimikyu = game.scene.getPlayerPokemon()!; const maxHp = mimikyu.getMaxHp(); @@ -136,7 +136,7 @@ describe("Abilities - Disguise", () => { game.override.starterForms({ [Species.MIMIKYU]: bustedForm }); - await game.startBattle([Species.FURRET, Species.MIMIKYU]); + await game.classicMode.startBattle([ Species.FURRET, Species.MIMIKYU ]); const mimikyu = game.scene.getParty()[1]!; expect(mimikyu.formIndex).toBe(bustedForm); @@ -155,7 +155,7 @@ describe("Abilities - Disguise", () => { [Species.MIMIKYU]: bustedForm }); - await game.startBattle(); + await game.classicMode.startBattle(); const mimikyu = game.scene.getPlayerPokemon()!; @@ -175,7 +175,7 @@ describe("Abilities - Disguise", () => { [Species.MIMIKYU]: bustedForm }); - await game.startBattle([Species.MIMIKYU, Species.FURRET]); + await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]); const mimikyu1 = game.scene.getPlayerPokemon()!; @@ -194,7 +194,7 @@ describe("Abilities - Disguise", () => { it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => { game.override.enemyMoveset(Array(4).fill(Moves.ENDURE)); - await game.startBattle(); + await game.classicMode.startBattle(); const mimikyu = game.scene.getEnemyPokemon()!; mimikyu.hp = 1; diff --git a/src/test/abilities/flower_gift.test.ts b/src/test/abilities/flower_gift.test.ts index f8c1141386d..de07bd29478 100644 --- a/src/test/abilities/flower_gift.test.ts +++ b/src/test/abilities/flower_gift.test.ts @@ -49,16 +49,16 @@ describe("Abilities - Flower Gift", () => { }); // TODO: Uncomment expect statements when the ability is implemented - currently does not increase stats of allies - it("increases the Attack and Special Defense stats of the Pokémon with this Ability and its allies by 1.5× during Harsh Sunlight", async () => { + it("increases the ATK and SPDEF stat stages of the Pokémon with this Ability and its allies by 1.5× during Harsh Sunlight", async () => { game.override.battleType("double"); await game.classicMode.startBattle([Species.CHERRIM, Species.MAGIKARP]); const [ cherrim ] = game.scene.getPlayerField(); - const cherrimAtkStat = cherrim.getBattleStat(Stat.ATK); - const cherrimSpDefStat = cherrim.getBattleStat(Stat.SPDEF); + const cherrimAtkStat = cherrim.getEffectiveStat(Stat.ATK); + const cherrimSpDefStat = cherrim.getEffectiveStat(Stat.SPDEF); - // const magikarpAtkStat = magikarp.getBattleStat(Stat.ATK);; - // const magikarpSpDefStat = magikarp.getBattleStat(Stat.SPDEF); + // const magikarpAtkStat = magikarp.getEffectiveStat(Stat.ATK);; + // const magikarpSpDefStat = magikarp.getEffectiveStat(Stat.SPDEF); game.move.select(Moves.SUNNY_DAY, 0); game.move.select(Moves.SPLASH, 1); @@ -67,10 +67,10 @@ describe("Abilities - Flower Gift", () => { await game.phaseInterceptor.to("TurnEndPhase"); expect(cherrim.formIndex).toBe(SUNSHINE_FORM); - expect(cherrim.getBattleStat(Stat.ATK)).toBe(Math.floor(cherrimAtkStat * 1.5)); - expect(cherrim.getBattleStat(Stat.SPDEF)).toBe(Math.floor(cherrimSpDefStat * 1.5)); - // expect(magikarp.getBattleStat(Stat.ATK)).toBe(Math.floor(magikarpAtkStat * 1.5)); - // expect(magikarp.getBattleStat(Stat.SPDEF)).toBe(Math.floor(magikarpSpDefStat * 1.5)); + expect(cherrim.getEffectiveStat(Stat.ATK)).toBe(Math.floor(cherrimAtkStat * 1.5)); + expect(cherrim.getEffectiveStat(Stat.SPDEF)).toBe(Math.floor(cherrimSpDefStat * 1.5)); + // expect(magikarp.getEffectiveStat(Stat.ATK)).toBe(Math.floor(magikarpAtkStat * 1.5)); + // expect(magikarp.getEffectiveStat(Stat.SPDEF)).toBe(Math.floor(magikarpSpDefStat * 1.5)); }); it("changes the Pokemon's form during Harsh Sunlight", async () => { diff --git a/src/test/abilities/gulp_missile.test.ts b/src/test/abilities/gulp_missile.test.ts index a451d290906..286c3af1c56 100644 --- a/src/test/abilities/gulp_missile.test.ts +++ b/src/test/abilities/gulp_missile.test.ts @@ -1,4 +1,3 @@ -import { BattleStat } from "#app/data/battle-stat"; import { BattlerTagType } from "#app/enums/battler-tag-type"; import { StatusEffect } from "#app/enums/status-effect"; import Pokemon from "#app/field/pokemon"; @@ -13,6 +12,7 @@ import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { SPLASH_ONLY } from "../utils/testUtils"; +import { Stat } from "#enums/stat"; describe("Abilities - Gulp Missile", () => { let phaserGame: Phaser.Game; @@ -107,7 +107,7 @@ describe("Abilities - Gulp Missile", () => { expect(cramorant.formIndex).toBe(GULPING_FORM); }); - it("deals ¼ of the attacker's maximum HP when hit by a damaging attack", async () => { + it("deals 1/4 of the attacker's maximum HP when hit by a damaging attack", async () => { game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); await game.startBattle([Species.CRAMORANT]); @@ -139,7 +139,7 @@ describe("Abilities - Gulp Missile", () => { expect(cramorant.formIndex).toBe(GULPING_FORM); }); - it("lowers the attacker's Defense by 1 stage when hit in Gulping form", async () => { + it("lowers attacker's DEF stat stage by 1 when hit in Gulping form", async () => { game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); await game.startBattle([Species.CRAMORANT]); @@ -158,7 +158,7 @@ describe("Abilities - Gulp Missile", () => { await game.phaseInterceptor.to(TurnEndPhase); expect(enemy.damageAndUpdate).toHaveReturnedWith(getEffectDamage(enemy)); - expect(enemy.summonData.battleStats[BattleStat.DEF]).toBe(-1); + expect(enemy.getStatStage(Stat.DEF)).toBe(-1); expect(cramorant.getTag(BattlerTagType.GULP_MISSILE_ARROKUDA)).toBeUndefined(); expect(cramorant.formIndex).toBe(NORMAL_FORM); }); @@ -219,7 +219,7 @@ describe("Abilities - Gulp Missile", () => { await game.phaseInterceptor.to(TurnEndPhase); expect(enemy.hp).toBe(enemyHpPreEffect); - expect(enemy.summonData.battleStats[BattleStat.DEF]).toBe(-1); + expect(enemy.getStatStage(Stat.DEF)).toBe(-1); expect(cramorant.getTag(BattlerTagType.GULP_MISSILE_ARROKUDA)).toBeUndefined(); expect(cramorant.formIndex).toBe(NORMAL_FORM); }); diff --git a/src/test/abilities/hustle.test.ts b/src/test/abilities/hustle.test.ts index 276edb691c9..ff96b98c7ac 100644 --- a/src/test/abilities/hustle.test.ts +++ b/src/test/abilities/hustle.test.ts @@ -26,7 +26,7 @@ describe("Abilities - Hustle", () => { game = new GameManager(phaserGame); game.override .ability(Abilities.HUSTLE) - .moveset([Moves.TACKLE, Moves.GIGA_DRAIN, Moves.FISSURE]) + .moveset([ Moves.TACKLE, Moves.GIGA_DRAIN, Moves.FISSURE ]) .disableCrits() .battleType("single") .enemyMoveset(SPLASH_ONLY) @@ -39,13 +39,13 @@ describe("Abilities - Hustle", () => { const pikachu = game.scene.getPlayerPokemon()!; const atk = pikachu.stats[Stat.ATK]; - vi.spyOn(pikachu, "getBattleStat"); + vi.spyOn(pikachu, "getEffectiveStat"); game.move.select(Moves.TACKLE); await game.move.forceHit(); await game.phaseInterceptor.to("DamagePhase"); - expect(pikachu.getBattleStat).toHaveReturnedWith(Math.floor(atk * 1.5)); + expect(pikachu.getEffectiveStat).toHaveReturnedWith(Math.floor(atk * 1.5)); }); it("lowers the accuracy of the user's physical moves by 20%", async () => { @@ -65,13 +65,13 @@ describe("Abilities - Hustle", () => { const pikachu = game.scene.getPlayerPokemon()!; const spatk = pikachu.stats[Stat.SPATK]; - vi.spyOn(pikachu, "getBattleStat"); + vi.spyOn(pikachu, "getEffectiveStat"); vi.spyOn(pikachu, "getAccuracyMultiplier"); game.move.select(Moves.GIGA_DRAIN); await game.phaseInterceptor.to("DamagePhase"); - expect(pikachu.getBattleStat).toHaveReturnedWith(spatk); + expect(pikachu.getEffectiveStat).toHaveReturnedWith(spatk); expect(pikachu.getAccuracyMultiplier).toHaveReturnedWith(1); }); diff --git a/src/test/abilities/hyper_cutter.test.ts b/src/test/abilities/hyper_cutter.test.ts index 28fcc2f6085..64e04ac2fd3 100644 --- a/src/test/abilities/hyper_cutter.test.ts +++ b/src/test/abilities/hyper_cutter.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -51,7 +51,7 @@ describe("Abilities - Hyper Cutter", () => { game.move.select(Moves.STRING_SHOT); await game.toNextTurn(); - expect(enemy.summonData.battleStats[BattleStat.ATK]).toEqual(0); - [BattleStat.ACC, BattleStat.DEF, BattleStat.EVA, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD].forEach((stat: number) => expect(enemy.summonData.battleStats[stat]).toBeLessThan(0)); + expect(enemy.getStatStage(Stat.ATK)).toEqual(0); + [Stat.ACC, Stat.DEF, Stat.EVA, Stat.SPATK, Stat.SPDEF, Stat.SPD].forEach((stat: number) => expect(enemy.getStatStage(stat)).toBeLessThan(0)); }); }); diff --git a/src/test/abilities/imposter.test.ts b/src/test/abilities/imposter.test.ts new file mode 100644 index 00000000000..2857f80632a --- /dev/null +++ b/src/test/abilities/imposter.test.ts @@ -0,0 +1,101 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#app/test/utils/gameManager"; +import { Species } from "#enums/species"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +// TODO: Add more tests once Imposter is fully implemented +describe("Abilities - Imposter", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemySpecies(Species.MEW) + .enemyLevel(200) + .enemyAbility(Abilities.BEAST_BOOST) + .enemyPassiveAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY) + .ability(Abilities.IMPOSTER) + .moveset(SPLASH_ONLY); + }); + + it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => { + await game.startBattle([ + Species.DITTO + ]); + + game.move.select(Moves.SPLASH); + await game.phaseInterceptor.to(TurnEndPhase); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + expect(player.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); + expect(player.getAbility()).toBe(enemy.getAbility()); + expect(player.getGender()).toBe(enemy.getGender()); + + expect(player.getStat(Stat.HP, false)).not.toBe(enemy.getStat(Stat.HP)); + for (const s of EFFECTIVE_STATS) { + expect(player.getStat(s, false)).toBe(enemy.getStat(s, false)); + } + + for (const s of BATTLE_STATS) { + expect(player.getStatStage(s)).toBe(enemy.getStatStage(s)); + } + + const playerMoveset = player.getMoveset(); + const enemyMoveset = player.getMoveset(); + + for (let i = 0; i < playerMoveset.length && i < enemyMoveset.length; i++) { + // TODO: Checks for 5 PP should be done here when that gets addressed + expect(playerMoveset[i]?.moveId).toBe(enemyMoveset[i]?.moveId); + } + + const playerTypes = player.getTypes(); + const enemyTypes = enemy.getTypes(); + + for (let i = 0; i < playerTypes.length && i < enemyTypes.length; i++) { + expect(playerTypes[i]).toBe(enemyTypes[i]); + } + }, 20000); + + it("should copy in-battle overridden stats", async () => { + game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT)); + + await game.startBattle([ + Species.DITTO + ]); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + const avgAtk = Math.floor((player.getStat(Stat.ATK, false) + enemy.getStat(Stat.ATK, false)) / 2); + const avgSpAtk = Math.floor((player.getStat(Stat.SPATK, false) + enemy.getStat(Stat.SPATK, false)) / 2); + + game.move.select(Moves.TACKLE); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStat(Stat.ATK, false)).toBe(avgAtk); + expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk); + + expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + }); +}); diff --git a/src/test/abilities/intimidate.test.ts b/src/test/abilities/intimidate.test.ts index bc5b5ab1a7d..f90ba6c0e1e 100644 --- a/src/test/abilities/intimidate.test.ts +++ b/src/test/abilities/intimidate.test.ts @@ -1,17 +1,13 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { Status, StatusEffect } from "#app/data/status-effect"; -import { GameModes, getGameMode } from "#app/game-mode"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { SelectStarterPhase } from "#app/phases/select-starter-phase"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#test/utils/gameManager"; import { Mode } from "#app/ui/ui"; +import { Stat } from "#enums/stat"; +import { getMovePosition } from "#test/utils/gameManagerUtils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; -import { generateStarter } from "#test/utils/gameManagerUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Abilities - Intimidate", () => { let phaserGame: Phaser.Game; @@ -29,257 +25,113 @@ describe("Abilities - Intimidate", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override - .battleType("single") - .enemySpecies(Species.MAGIKARP) + game.override.battleType("single") + .enemySpecies(Species.RATTATA) .enemyAbility(Abilities.INTIMIDATE) + .enemyPassiveAbility(Abilities.HYDRATION) .ability(Abilities.INTIMIDATE) - .moveset([Moves.SPLASH, Moves.AERIAL_ACE]) + .startingWave(3) .enemyMoveset(SPLASH_ONLY); }); - it("single - wild with switch", async () => { - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); - - let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - game.doSwitchPokemon(1); - await game.phaseInterceptor.to("CommandPhase"); - - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(0); - - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-2); - }, 20000); - - it("single - boss should only trigger once then switch", async () => { - game.override.startingWave(10); - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); - - let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - game.doSwitchPokemon(1); - await game.phaseInterceptor.to("CommandPhase"); - - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(0); - - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-2); - }, 20000); - - it("single - trainer should only trigger once with switch", async () => { - game.override.startingWave(5); - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); - - let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - game.doSwitchPokemon(1); - await game.phaseInterceptor.to("CommandPhase"); - - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(0); - - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-2); - }, 200000); - - it("double - trainer should only trigger once per pokemon", async () => { - game.override - .battleType("double") - .startingWave(5); - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); - - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-2); - - const battleStatsOpponent2 = game.scene.currentBattle.enemyParty[1].summonData.battleStats; - expect(battleStatsOpponent2[BattleStat.ATK]).toBe(-2); - - const battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-2); - - const battleStatsPokemon2 = game.scene.getParty()[1].summonData.battleStats; - expect(battleStatsPokemon2[BattleStat.ATK]).toBe(-2); - }, 20000); - - it("double - wild: should only trigger once per pokemon", async () => { - game.override.battleType("double"); - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); - - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-2); - - const battleStatsOpponent2 = game.scene.currentBattle.enemyParty[1].summonData.battleStats; - expect(battleStatsOpponent2[BattleStat.ATK]).toBe(-2); - - const battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-2); - - const battleStatsPokemon2 = game.scene.getParty()[1].summonData.battleStats; - expect(battleStatsPokemon2[BattleStat.ATK]).toBe(-2); - }, 20000); - - it("double - boss: should only trigger once per pokemon", async () => { - game.override - .battleType("double") - .startingWave(10); - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); - - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-2); - - const battleStatsOpponent2 = game.scene.currentBattle.enemyParty[1].summonData.battleStats; - expect(battleStatsOpponent2[BattleStat.ATK]).toBe(-2); - - const battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-2); - - const battleStatsPokemon2 = game.scene.getParty()[1].summonData.battleStats; - expect(battleStatsPokemon2[BattleStat.ATK]).toBe(-2); - }, 20000); - - it("single - wild next wave opp triger once, us: none", async () => { - await game.startBattle([Species.MIGHTYENA]); - - let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - game.move.select(Moves.AERIAL_ACE); - await game.phaseInterceptor.to("DamagePhase"); - await game.doKillOpponents(); - await game.toNextWave(); - - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-2); - - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - }, 20000); - - it("single - wild next turn - no retrigger on next turn", async () => { - await game.startBattle([Species.MIGHTYENA]); - - let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - game.move.select(Moves.SPLASH); - await game.toNextTurn(); - - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - }, 20000); - - it("single - trainer should only trigger once and each time he switch", async () => { - game.override - .enemyMoveset(Array(4).fill(Moves.VOLT_SWITCH)) - .startingWave(5); - await game.startBattle([Species.MIGHTYENA]); - - let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - game.move.select(Moves.SPLASH); - await game.toNextTurn(); - - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-2); - - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - - game.move.select(Moves.SPLASH); - await game.toNextTurn(); - - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-3); - - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - }, 200000); - - it("single - trainer should only trigger once whatever turn we are", async () => { - game.override.startingWave(5); - await game.startBattle([Species.MIGHTYENA]); - - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - const battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - - game.move.select(Moves.SPLASH); - await game.toNextTurn(); - - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-1); - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - }, 20000); - - it("double - wild vs only 1 on player side", async () => { - game.override.battleType("double"); - await game.classicMode.runToSummon([Species.MIGHTYENA]); + it("should lower ATK stat stage by 1 of enemy Pokemon on entry and player switch", async () => { + await game.classicMode.runToSummon([Species.MIGHTYENA, Species.POOCHYENA]); + game.onNextPrompt( + "CheckSwitchPhase", + Mode.CONFIRM, + () => { + game.setMode(Mode.MESSAGE); + game.endPhase(); + }, + () => game.isCurrentPhase("CommandPhase") || game.isCurrentPhase("TurnInitPhase") + ); await game.phaseInterceptor.to("CommandPhase", false); - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); + let playerPokemon = game.scene.getPlayerPokemon()!; + const enemyPokemon = game.scene.getEnemyPokemon()!; - const battleStatsOpponent2 = game.scene.currentBattle.enemyParty[1].summonData.battleStats; - expect(battleStatsOpponent2[BattleStat.ATK]).toBe(-1); + expect(playerPokemon.species.speciesId).toBe(Species.MIGHTYENA); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); - const battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-2); + game.doSwitchPokemon(1); + await game.phaseInterceptor.run("CommandPhase"); + await game.phaseInterceptor.to("CommandPhase"); + + playerPokemon = game.scene.getPlayerPokemon()!; + expect(playerPokemon.species.speciesId).toBe(Species.POOCHYENA); + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-2); }, 20000); - it("double - wild vs only 1 alive on player side", async () => { - game.override.battleType("double"); - await game.runToTitle(); - - game.onNextPrompt("TitlePhase", Mode.TITLE, () => { - game.scene.gameMode = getGameMode(GameModes.CLASSIC); - const starters = generateStarter(game.scene, [Species.MIGHTYENA, Species.POOCHYENA]); - const selectStarterPhase = new SelectStarterPhase(game.scene); - game.scene.pushPhase(new EncounterPhase(game.scene, false)); - selectStarterPhase.initBattle(starters); - game.scene.getParty()[1].hp = 0; - game.scene.getParty()[1].status = new Status(StatusEffect.FAINT); - }); - - await game.phaseInterceptor.run(EncounterPhase); - + it("should lower ATK stat stage by 1 for every enemy Pokemon in a double battle on entry", async () => { + game.override.battleType("double") + .startingWave(3); + await game.classicMode.runToSummon([Species.MIGHTYENA, Species.POOCHYENA]); + game.onNextPrompt( + "CheckSwitchPhase", + Mode.CONFIRM, + () => { + game.setMode(Mode.MESSAGE); + game.endPhase(); + }, + () => game.isCurrentPhase("CommandPhase") || game.isCurrentPhase("TurnInitPhase") + ); await game.phaseInterceptor.to("CommandPhase", false); - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); + const playerField = game.scene.getPlayerField()!; + const enemyField = game.scene.getEnemyField()!; - const battleStatsOpponent2 = game.scene.currentBattle.enemyParty[1].summonData.battleStats; - expect(battleStatsOpponent2[BattleStat.ATK]).toBe(-1); - - const battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(-2); + expect(enemyField[0].getStatStage(Stat.ATK)).toBe(-2); + expect(enemyField[1].getStatStage(Stat.ATK)).toBe(-2); + expect(playerField[0].getStatStage(Stat.ATK)).toBe(-2); + expect(playerField[1].getStatStage(Stat.ATK)).toBe(-2); }, 20000); + + it("should not activate again if there is no switch or new entry", async () => { + game.override.startingWave(2); + game.override.moveset([Moves.SPLASH]); + await game.classicMode.startBattle([ Species.MIGHTYENA, Species.POOCHYENA ]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + const enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); + + game.move.select(Moves.SPLASH); + await game.toNextTurn(); + + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); + }, 20000); + + it("should lower ATK stat stage by 1 for every switch", async () => { + game.override.moveset([Moves.SPLASH]) + .enemyMoveset(new Array(4).fill(Moves.VOLT_SWITCH)) + .startingWave(5); + await game.classicMode.startBattle([ Species.MIGHTYENA, Species.POOCHYENA ]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + let enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); + + game.move.select(getMovePosition(game.scene, 0, Moves.SPLASH)); + await game.toNextTurn(); + + enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-2); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + + game.move.select(Moves.SPLASH); + await game.toNextTurn(); + + enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-3); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + }, 200000); }); diff --git a/src/test/abilities/intrepid_sword.test.ts b/src/test/abilities/intrepid_sword.test.ts index 18d6c04adbc..7bf0654276c 100644 --- a/src/test/abilities/intrepid_sword.test.ts +++ b/src/test/abilities/intrepid_sword.test.ts @@ -1,8 +1,8 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -29,14 +29,17 @@ describe("Abilities - Intrepid Sword", () => { game.override.ability(Abilities.INTREPID_SWORD); }); - it("INTREPID SWORD on player", async() => { + it("should raise ATK stat stage by 1 on entry", async() => { await game.classicMode.runToSummon([ Species.ZACIAN, ]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + const enemyPokemon = game.scene.getEnemyPokemon()!; + await game.phaseInterceptor.to(CommandPhase, false); - const battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(1); - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(1); + + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1); }, 20000); }); diff --git a/src/test/abilities/moody.test.ts b/src/test/abilities/moody.test.ts index 9e936e8100a..5c46ea68ec5 100644 --- a/src/test/abilities/moody.test.ts +++ b/src/test/abilities/moody.test.ts @@ -1,18 +1,16 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - Moody", () => { let phaserGame: Phaser.Game; let game: GameManager; - const battleStatsArray = [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD]; - beforeAll(() => { phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, @@ -30,63 +28,61 @@ describe("Abilities - Moody", () => { .battleType("single") .enemySpecies(Species.RATTATA) .enemyAbility(Abilities.BALL_FETCH) - .enemyPassiveAbility(Abilities.HYDRATION) .ability(Abilities.MOODY) .enemyMoveset(SPLASH_ONLY) .moveset(SPLASH_ONLY); }); - it( - "should increase one BattleStat by 2 stages and decrease a different BattleStat by 1 stage", + it("should increase one stat stage by 2 and decrease a different stat stage by 1", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const playerPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); await game.toNextTurn(); // Find the increased and decreased stats, make sure they are different. - const statChanges = playerPokemon.summonData.battleStats; - const changedStats = battleStatsArray.filter(bs => statChanges[bs] === 2 || statChanges[bs] === -1); + const changedStats = EFFECTIVE_STATS.filter(s => playerPokemon.getStatStage(s) === 2 || playerPokemon.getStatStage(s) === -1); expect(changedStats).toBeTruthy(); expect(changedStats.length).toBe(2); expect(changedStats[0] !== changedStats[1]).toBeTruthy(); }); - it( - "should only increase one BattleStat by 2 stages if all BattleStats are at -6", + it("should only increase one stat stage by 2 if all stat stages are at -6", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const playerPokemon = game.scene.getPlayerPokemon()!; - // Set all BattleStats to -6 - battleStatsArray.forEach(bs => playerPokemon.summonData.battleStats[bs] = -6); + + // Set all stat stages to -6 + vi.spyOn(playerPokemon.summonData, "statStages", "get").mockReturnValue(new Array(BATTLE_STATS.length).fill(-6)); game.move.select(Moves.SPLASH); await game.toNextTurn(); - // Should increase one BattleStat by 2 (from -6, meaning it will be -4) - const increasedStat = battleStatsArray.filter(bs => playerPokemon.summonData.battleStats[bs] === -4); + // Should increase one stat stage by 2 (from -6, meaning it will be -4) + const increasedStat = EFFECTIVE_STATS.filter(s => playerPokemon.getStatStage(s) === -4); expect(increasedStat).toBeTruthy(); expect(increasedStat.length).toBe(1); }); - it( - "should only decrease one BattleStat by 1 stage if all BattleStats are at 6", + it("should only decrease one stat stage by 1 stage if all stat stages are at 6", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const playerPokemon = game.scene.getPlayerPokemon()!; - // Set all BattleStats to 6 - battleStatsArray.forEach(bs => playerPokemon.summonData.battleStats[bs] = 6); + + // Set all stat stages to 6 + vi.spyOn(playerPokemon.summonData, "statStages", "get").mockReturnValue(new Array(BATTLE_STATS.length).fill(6)); game.move.select(Moves.SPLASH); await game.toNextTurn(); - // Should decrease one BattleStat by 1 (from 6, meaning it will be 5) - const decreasedStat = battleStatsArray.filter(bs => playerPokemon.summonData.battleStats[bs] === 5); + // Should decrease one stat stage by 1 (from 6, meaning it will be 5) + const decreasedStat = EFFECTIVE_STATS.filter(s => playerPokemon.getStatStage(s) === 5); + expect(decreasedStat).toBeTruthy(); expect(decreasedStat.length).toBe(1); }); diff --git a/src/test/abilities/moxie.test.ts b/src/test/abilities/moxie.test.ts index 6a1838c9a98..e713d78f39e 100644 --- a/src/test/abilities/moxie.test.ts +++ b/src/test/abilities/moxie.test.ts @@ -1,14 +1,15 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { Stat } from "#app/data/pokemon-stat"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { VictoryPhase } from "#app/phases/victory-phase"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; - +import { SPLASH_ONLY } from "../utils/testUtils"; +import { BattlerIndex } from "#app/battle"; +import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; +import { VictoryPhase } from "#app/phases/victory-phase"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; describe("Abilities - Moxie", () => { let phaserGame: Phaser.Game; @@ -32,23 +33,47 @@ describe("Abilities - Moxie", () => { game.override.enemyAbility(Abilities.MOXIE); game.override.ability(Abilities.MOXIE); game.override.startingLevel(2000); - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.moveset([ moveToUse ]); + game.override.enemyMoveset(SPLASH_ONLY); }); - it("MOXIE", async () => { + it("should raise ATK stat stage by 1 when winning a battle", async() => { const moveToUse = Moves.AERIAL_ACE; await game.startBattle([ Species.MIGHTYENA, Species.MIGHTYENA, ]); - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[Stat.ATK]).toBe(0); + const playerPokemon = game.scene.getPlayerPokemon()!; + + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(0); game.move.select(moveToUse); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase); - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.ATK]).toBe(1); + + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1); + }, 20000); + + // TODO: Activate this test when MOXIE is corrected to work on faint and not on battle victory + it.todo("should raise ATK stat stage by 1 when defeating an ally Pokemon", async() => { + game.override.battleType("double"); + const moveToUse = Moves.AERIAL_ACE; + await game.startBattle([ + Species.MIGHTYENA, + Species.MIGHTYENA, + ]); + + const [ firstPokemon, secondPokemon ] = game.scene.getPlayerField(); + + expect(firstPokemon.getStatStage(Stat.ATK)).toBe(0); + + secondPokemon.hp = 1; + + game.move.select(moveToUse); + game.selectTarget(BattlerIndex.PLAYER_2); + + await game.phaseInterceptor.to(TurnEndPhase); + + expect(firstPokemon.getStatStage(Stat.ATK)).toBe(1); }, 20000); }); diff --git a/src/test/abilities/mycelium_might.test.ts b/src/test/abilities/mycelium_might.test.ts index d5bea185f59..d8947935880 100644 --- a/src/test/abilities/mycelium_might.test.ts +++ b/src/test/abilities/mycelium_might.test.ts @@ -1,10 +1,10 @@ -import { BattleStat } from "#app/data/battle-stat"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { TurnStartPhase } from "#app/phases/turn-start-phase"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; +import { Stat } from "#enums/stat"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -58,8 +58,9 @@ describe("Abilities - Mycelium Might", () => { expect(speedOrder).toEqual([playerIndex, enemyIndex]); expect(commandOrder).toEqual([enemyIndex, playerIndex]); await game.phaseInterceptor.to(TurnEndPhase); - // Despite the opponent's ability (Clear Body), its attack stat is still reduced. - expect(enemyPokemon?.summonData.battleStats[BattleStat.ATK]).toBe(-1); + + // Despite the opponent's ability (Clear Body), its ATK stat stage is still reduced. + expect(enemyPokemon?.getStatStage(Stat.ATK)).toBe(-1); }, 20000); it("will still go first if a status move that is in a higher priority bracket than the opponent's move is used", async () => { @@ -81,8 +82,8 @@ describe("Abilities - Mycelium Might", () => { expect(speedOrder).toEqual([playerIndex, enemyIndex]); expect(commandOrder).toEqual([playerIndex, enemyIndex]); await game.phaseInterceptor.to(TurnEndPhase); - // Despite the opponent's ability (Clear Body), its attack stat is still reduced. - expect(enemyPokemon?.summonData.battleStats[BattleStat.ATK]).toBe(-1); + // Despite the opponent's ability (Clear Body), its ATK stat stage is still reduced. + expect(enemyPokemon?.getStatStage(Stat.ATK)).toBe(-1); }, 20000); it("will not affect non-status moves", async () => { diff --git a/src/test/abilities/parental_bond.test.ts b/src/test/abilities/parental_bond.test.ts index 1404f597ccf..e3c6c8ec5bb 100644 --- a/src/test/abilities/parental_bond.test.ts +++ b/src/test/abilities/parental_bond.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { StatusEffect } from "#app/data/status-effect"; import { Type } from "#app/data/type"; import { BattlerTagType } from "#app/enums/battler-tag-type"; @@ -96,7 +96,7 @@ describe("Abilities - Parental Bond", () => { await game.phaseInterceptor.to(BerryPhase, false); expect(leadPokemon.turnData.hitCount).toBe(2); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(2); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(2); }, TIMEOUT ); @@ -116,7 +116,7 @@ describe("Abilities - Parental Bond", () => { game.move.select(Moves.BABY_DOLL_EYES); await game.phaseInterceptor.to(BerryPhase, false); - expect(enemyPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-1); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); }, TIMEOUT ); @@ -568,7 +568,7 @@ describe("Abilities - Parental Bond", () => { await game.phaseInterceptor.to(BerryPhase, false); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-1); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(-1); }, TIMEOUT ); @@ -590,7 +590,7 @@ describe("Abilities - Parental Bond", () => { await game.phaseInterceptor.to(BerryPhase, false); - expect(enemyPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(1); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(1); }, TIMEOUT ); diff --git a/src/test/abilities/sand_veil.test.ts b/src/test/abilities/sand_veil.test.ts index 2336e2b50de..da9fdcc01ab 100644 --- a/src/test/abilities/sand_veil.test.ts +++ b/src/test/abilities/sand_veil.test.ts @@ -1,5 +1,5 @@ -import { BattleStatMultiplierAbAttr, allAbilities } from "#app/data/ability"; -import { BattleStat } from "#app/data/battle-stat"; +import { StatMultiplierAbAttr, allAbilities } from "#app/data/ability"; +import { Stat } from "#enums/stat"; import { WeatherType } from "#app/data/weather"; import { CommandPhase } from "#app/phases/command-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; @@ -49,10 +49,10 @@ describe("Abilities - Sand Veil", () => { vi.spyOn(leadPokemon[0], "getAbility").mockReturnValue(allAbilities[Abilities.SAND_VEIL]); - const sandVeilAttr = allAbilities[Abilities.SAND_VEIL].getAttrs(BattleStatMultiplierAbAttr)[0]; - vi.spyOn(sandVeilAttr, "applyBattleStat").mockImplementation( - (pokemon, passive, simulated, battleStat, statValue, args) => { - if (battleStat === BattleStat.EVA && game.scene.arena.weather?.weatherType === WeatherType.SANDSTORM) { + const sandVeilAttr = allAbilities[Abilities.SAND_VEIL].getAttrs(StatMultiplierAbAttr)[0]; + vi.spyOn(sandVeilAttr, "applyStatStage").mockImplementation( + (_pokemon, _passive, _simulated, stat, statValue, _args) => { + if (stat === Stat.EVA && game.scene.arena.weather?.weatherType === WeatherType.SANDSTORM) { statValue.value *= -1; // will make all attacks miss return true; } diff --git a/src/test/abilities/sap_sipper.test.ts b/src/test/abilities/sap_sipper.test.ts index f9c20e85eab..2d70ede3530 100644 --- a/src/test/abilities/sap_sipper.test.ts +++ b/src/test/abilities/sap_sipper.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { TerrainType } from "#app/data/terrain"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; @@ -9,6 +9,7 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; // See also: TypeImmunityAbAttr describe("Abilities - Sap Sipper", () => { @@ -31,52 +32,55 @@ describe("Abilities - Sap Sipper", () => { game.override.disableCrits(); }); - it("raise attack 1 level and block effects when activated against a grass attack", async () => { + it("raises ATK stat stage by 1 and block effects when activated against a grass attack", async() => { const moveToUse = Moves.LEAFAGE; const enemyAbility = Abilities.SAP_SIPPER; - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); + game.override.moveset([ moveToUse ]); + game.override.enemyMoveset(SPLASH_ONLY); game.override.enemySpecies(Species.DUSKULL); game.override.enemyAbility(enemyAbility); await game.startBattle(); - const startingOppHp = game.scene.currentBattle.enemyParty[0].hp; + const enemyPokemon = game.scene.getEnemyPokemon()!; + const initialEnemyHp = enemyPokemon.hp; game.move.select(moveToUse); await game.phaseInterceptor.to(TurnEndPhase); - expect(startingOppHp - game.scene.getEnemyParty()[0].hp).toBe(0); - expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1); + expect(initialEnemyHp - enemyPokemon.hp).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1); }); - it("raise attack 1 level and block effects when activated against a grass status move", async () => { + it("raises ATK stat stage by 1 and block effects when activated against a grass status move", async() => { const moveToUse = Moves.SPORE; const enemyAbility = Abilities.SAP_SIPPER; - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); + game.override.moveset([ moveToUse ]); + game.override.enemyMoveset(SPLASH_ONLY); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(enemyAbility); await game.startBattle(); + const enemyPokemon = game.scene.getEnemyPokemon()!; + game.move.select(moveToUse); await game.phaseInterceptor.to(TurnEndPhase); - expect(game.scene.getEnemyParty()[0].status).toBeUndefined(); - expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1); + expect(enemyPokemon.status).toBeUndefined(); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1); }); it("do not activate against status moves that target the field", async () => { const moveToUse = Moves.GRASSY_TERRAIN; const enemyAbility = Abilities.SAP_SIPPER; - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); + game.override.moveset([ moveToUse ]); + game.override.enemyMoveset(SPLASH_ONLY); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(enemyAbility); @@ -88,51 +92,54 @@ describe("Abilities - Sap Sipper", () => { expect(game.scene.arena.terrain).toBeDefined(); expect(game.scene.arena.terrain!.terrainType).toBe(TerrainType.GRASSY); - expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(game.scene.getEnemyPokemon()!.getStatStage(Stat.ATK)).toBe(0); }); it("activate once against multi-hit grass attacks", async () => { const moveToUse = Moves.BULLET_SEED; const enemyAbility = Abilities.SAP_SIPPER; - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); + game.override.moveset([ moveToUse ]); + game.override.enemyMoveset(SPLASH_ONLY); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(enemyAbility); await game.startBattle(); - const startingOppHp = game.scene.currentBattle.enemyParty[0].hp; + const enemyPokemon = game.scene.getEnemyPokemon()!; + const initialEnemyHp = enemyPokemon.hp; game.move.select(moveToUse); await game.phaseInterceptor.to(TurnEndPhase); - expect(startingOppHp - game.scene.getEnemyParty()[0].hp).toBe(0); - expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1); + expect(initialEnemyHp - enemyPokemon.hp).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1); }); it("do not activate against status moves that target the user", async () => { const moveToUse = Moves.SPIKY_SHIELD; const ability = Abilities.SAP_SIPPER; - game.override.moveset([moveToUse]); + game.override.moveset([ moveToUse ]); game.override.ability(ability); - game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); + game.override.enemyMoveset(SPLASH_ONLY); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(Abilities.NONE); await game.startBattle(); + const playerPokemon = game.scene.getPlayerPokemon()!; + game.move.select(moveToUse); await game.phaseInterceptor.to(MoveEndPhase); - expect(game.scene.getParty()[0].getTag(BattlerTagType.SPIKY_SHIELD)).toBeDefined(); + expect(playerPokemon.getTag(BattlerTagType.SPIKY_SHIELD)).toBeDefined(); await game.phaseInterceptor.to(TurnEndPhase); - expect(game.scene.getParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(0); expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase"); }); @@ -149,13 +156,14 @@ describe("Abilities - Sap Sipper", () => { await game.startBattle(); - const startingOppHp = game.scene.currentBattle.enemyParty[0].hp; + const enemyPokemon = game.scene.getEnemyPokemon()!; + const initialEnemyHp = enemyPokemon.hp; game.move.select(moveToUse); await game.phaseInterceptor.to(TurnEndPhase); - expect(startingOppHp - game.scene.getEnemyParty()[0].hp).toBe(0); - expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1); + expect(initialEnemyHp - enemyPokemon.hp).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1); }); }); diff --git a/src/test/abilities/serene_grace.test.ts b/src/test/abilities/serene_grace.test.ts index 7316b2ea920..e06288b9de9 100644 --- a/src/test/abilities/serene_grace.test.ts +++ b/src/test/abilities/serene_grace.test.ts @@ -1,6 +1,6 @@ import { BattlerIndex } from "#app/battle"; import { applyAbAttrs, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability"; -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import * as Utils from "#app/utils"; import { Abilities } from "#enums/abilities"; diff --git a/src/test/abilities/sheer_force.test.ts b/src/test/abilities/sheer_force.test.ts index f73b749dac2..69b47e1eaae 100644 --- a/src/test/abilities/sheer_force.test.ts +++ b/src/test/abilities/sheer_force.test.ts @@ -1,6 +1,6 @@ import { BattlerIndex } from "#app/battle"; import { applyAbAttrs, applyPostDefendAbAttrs, applyPreAttackAbAttrs, MoveEffectChanceMultiplierAbAttr, MovePowerBoostAbAttr, PostDefendTypeChangeAbAttr } from "#app/data/ability"; -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import * as Utils from "#app/utils"; import { Abilities } from "#enums/abilities"; diff --git a/src/test/abilities/shield_dust.test.ts b/src/test/abilities/shield_dust.test.ts index 14770c49427..8a0b769827d 100644 --- a/src/test/abilities/shield_dust.test.ts +++ b/src/test/abilities/shield_dust.test.ts @@ -1,6 +1,6 @@ import { BattlerIndex } from "#app/battle"; import { applyAbAttrs, applyPreDefendAbAttrs, IgnoreMoveEffectsAbAttr, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability"; -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import * as Utils from "#app/utils"; import { Abilities } from "#enums/abilities"; diff --git a/src/test/abilities/simple.test.ts b/src/test/abilities/simple.test.ts new file mode 100644 index 00000000000..4310c5d45d1 --- /dev/null +++ b/src/test/abilities/simple.test.ts @@ -0,0 +1,42 @@ +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; +import { Abilities } from "#enums/abilities"; +import { Species } from "#enums/species"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +describe("Abilities - Simple", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemySpecies(Species.BULBASAUR) + .enemyAbility(Abilities.SIMPLE) + .ability(Abilities.INTIMIDATE) + .enemyMoveset(SPLASH_ONLY); + }); + + it("should double stat changes when applied", async() => { + await game.startBattle([ + Species.SLOWBRO + ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-2); + }, 20000); +}); diff --git a/src/test/abilities/volt_absorb.test.ts b/src/test/abilities/volt_absorb.test.ts index d9c3fe34c24..7f3e160c7d0 100644 --- a/src/test/abilities/volt_absorb.test.ts +++ b/src/test/abilities/volt_absorb.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; @@ -41,12 +41,14 @@ describe("Abilities - Volt Absorb", () => { await game.startBattle(); + const playerPokemon = game.scene.getPlayerPokemon()!; + game.move.select(moveToUse); await game.phaseInterceptor.to(TurnEndPhase); - expect(game.scene.getParty()[0].summonData.battleStats[BattleStat.SPDEF]).toBe(1); - expect(game.scene.getParty()[0].getTag(BattlerTagType.CHARGED)).toBeDefined(); + expect(playerPokemon.getStatStage(Stat.SPDEF)).toBe(1); + expect(playerPokemon.getTag(BattlerTagType.CHARGED)).toBeDefined(); expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase"); }); }); diff --git a/src/test/abilities/wind_rider.test.ts b/src/test/abilities/wind_rider.test.ts index e11b3b39723..7a1fee6794a 100644 --- a/src/test/abilities/wind_rider.test.ts +++ b/src/test/abilities/wind_rider.test.ts @@ -1,8 +1,8 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -31,56 +31,38 @@ describe("Abilities - Wind Rider", () => { .enemyMoveset(SPLASH_ONLY); }); - it("takes no damage from wind moves and its Attack is increased by one stage when hit by one", async () => { - await game.classicMode.startBattle([Species.MAGIKARP]); + it("takes no damage from wind moves and its ATK stat stage is raised by 1 when hit by one", async () => { + await game.classicMode.startBattle([ Species.MAGIKARP ]); const shiftry = game.scene.getEnemyPokemon()!; - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(shiftry.getStatStage(Stat.ATK)).toBe(0); game.move.select(Moves.PETAL_BLIZZARD); await game.phaseInterceptor.to("TurnEndPhase"); expect(shiftry.isFullHp()).toBe(true); - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(1); + expect(shiftry.getStatStage(Stat.ATK)).toBe(1); }); - it("Attack is increased by one stage when Tailwind is present on its side", async () => { - game.override.ability(Abilities.WIND_RIDER); - game.override.enemySpecies(Species.MAGIKARP); + it("ATK stat stage is raised by 1 when Tailwind is present on its side", async () => { + game.override + .enemySpecies(Species.MAGIKARP) + .ability(Abilities.WIND_RIDER); await game.classicMode.startBattle([Species.SHIFTRY]); const shiftry = game.scene.getPlayerPokemon()!; - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(shiftry.getStatStage(Stat.ATK)).toBe(0); game.move.select(Moves.TAILWIND); await game.phaseInterceptor.to("TurnEndPhase"); - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(1); + expect(shiftry.getStatStage(Stat.ATK)).toBe(1); }); - it("does not increase Attack when Tailwind is present on opposing side", async () => { - game.override.ability(Abilities.WIND_RIDER); - game.override.enemySpecies(Species.MAGIKARP); - - await game.classicMode.startBattle([Species.SHIFTRY]); - const magikarp = game.scene.getEnemyPokemon()!; - const shiftry = game.scene.getPlayerPokemon()!; - - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(magikarp.summonData.battleStats[BattleStat.ATK]).toBe(0); - - game.move.select(Moves.TAILWIND); - - await game.phaseInterceptor.to("TurnEndPhase"); - - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(1); - expect(magikarp.summonData.battleStats[BattleStat.ATK]).toBe(0); - }); - - it("does not increase Attack when Tailwind is present on opposing side", async () => { + it("does not raise ATK stat stage when Tailwind is present on opposing side", async () => { game.override .enemySpecies(Species.MAGIKARP) .ability(Abilities.WIND_RIDER); @@ -89,15 +71,35 @@ describe("Abilities - Wind Rider", () => { const magikarp = game.scene.getEnemyPokemon()!; const shiftry = game.scene.getPlayerPokemon()!; - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(magikarp.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(shiftry.getStatStage(Stat.ATK)).toBe(0); + expect(magikarp.getStatStage(Stat.ATK)).toBe(0); game.move.select(Moves.TAILWIND); await game.phaseInterceptor.to("TurnEndPhase"); - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(1); - expect(magikarp.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(shiftry.getStatStage(Stat.ATK)).toBe(1); + expect(magikarp.getStatStage(Stat.ATK)).toBe(0); + }); + + it("does not raise ATK stat stage when Tailwind is present on opposing side", async () => { + game.override + .enemySpecies(Species.MAGIKARP) + .ability(Abilities.WIND_RIDER); + + await game.classicMode.startBattle([Species.SHIFTRY]); + const magikarp = game.scene.getEnemyPokemon()!; + const shiftry = game.scene.getPlayerPokemon()!; + + expect(shiftry.getStatStage(Stat.ATK)).toBe(0); + expect(magikarp.getStatStage(Stat.ATK)).toBe(0); + + game.move.select(Moves.TAILWIND); + + await game.phaseInterceptor.to("TurnEndPhase"); + + expect(shiftry.getStatStage(Stat.ATK)).toBe(1); + expect(magikarp.getStatStage(Stat.ATK)).toBe(0); }); it("does not interact with Sandstorm", async () => { @@ -106,14 +108,14 @@ describe("Abilities - Wind Rider", () => { await game.classicMode.startBattle([Species.SHIFTRY]); const shiftry = game.scene.getPlayerPokemon()!; - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(shiftry.getStatStage(Stat.ATK)).toBe(0); expect(shiftry.isFullHp()).toBe(true); game.move.select(Moves.SANDSTORM); await game.phaseInterceptor.to("TurnEndPhase"); - expect(shiftry.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(shiftry.getStatStage(Stat.ATK)).toBe(0); expect(shiftry.hp).lessThan(shiftry.getMaxHp()); }); }); diff --git a/src/test/abilities/zen_mode.test.ts b/src/test/abilities/zen_mode.test.ts index 677d998e876..fd378647184 100644 --- a/src/test/abilities/zen_mode.test.ts +++ b/src/test/abilities/zen_mode.test.ts @@ -1,6 +1,5 @@ +import { Stat } from "#enums/stat"; import { BattlerIndex } from "#app/battle"; -import { Stat } from "#app/data/pokemon-stat"; -import { Status, StatusEffect } from "#app/data/status-effect"; import { DamagePhase } from "#app/phases/damage-phase"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { MessagePhase } from "#app/phases/message-phase"; @@ -18,6 +17,7 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; +import { Status, StatusEffect } from "#app/data/status-effect"; const TIMEOUT = 20 * 1000; diff --git a/src/test/achievements/achievement.test.ts b/src/test/achievements/achievement.test.ts index 36c20ae2248..24d00a3e77b 100644 --- a/src/test/achievements/achievement.test.ts +++ b/src/test/achievements/achievement.test.ts @@ -224,7 +224,7 @@ describe("achvs", () => { expect(achvs._50_RIBBONS).toBeInstanceOf(RibbonAchv); expect(achvs._75_RIBBONS).toBeInstanceOf(RibbonAchv); expect(achvs._100_RIBBONS).toBeInstanceOf(RibbonAchv); - expect(achvs.TRANSFER_MAX_BATTLE_STAT).toBeInstanceOf(Achv); + expect(achvs.TRANSFER_MAX_STAT_STAGE).toBeInstanceOf(Achv); expect(achvs.MAX_FRIENDSHIP).toBeInstanceOf(Achv); expect(achvs.MEGA_EVOLVE).toBeInstanceOf(Achv); expect(achvs.GIGANTAMAX).toBeInstanceOf(Achv); diff --git a/src/test/battle-stat.spec.ts b/src/test/battle-stat.spec.ts deleted file mode 100644 index 16fce962838..00000000000 --- a/src/test/battle-stat.spec.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "#app/data/battle-stat"; -import { describe, expect, it } from "vitest"; -import { arrayOfRange, mockI18next } from "./utils/testUtils"; - -const TEST_BATTLE_STAT = -99 as unknown as BattleStat; -const TEST_POKEMON = "Testmon"; -const TEST_STAT = "Teststat"; - -describe("battle-stat", () => { - describe("getBattleStatName", () => { - it("should return the correct name for each BattleStat", () => { - mockI18next(); - - expect(getBattleStatName(BattleStat.ATK)).toBe("pokemonInfo:Stat.ATK"); - expect(getBattleStatName(BattleStat.DEF)).toBe("pokemonInfo:Stat.DEF"); - expect(getBattleStatName(BattleStat.SPATK)).toBe( - "pokemonInfo:Stat.SPATK" - ); - expect(getBattleStatName(BattleStat.SPDEF)).toBe( - "pokemonInfo:Stat.SPDEF" - ); - expect(getBattleStatName(BattleStat.SPD)).toBe("pokemonInfo:Stat.SPD"); - expect(getBattleStatName(BattleStat.ACC)).toBe("pokemonInfo:Stat.ACC"); - expect(getBattleStatName(BattleStat.EVA)).toBe("pokemonInfo:Stat.EVA"); - }); - - it("should fall back to ??? for an unknown BattleStat", () => { - expect(getBattleStatName(TEST_BATTLE_STAT)).toBe("???"); - }); - }); - - describe("getBattleStatLevelChangeDescription", () => { - it("should return battle:statRose for +1", () => { - mockI18next(); - - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - 1, - true - ); - - expect(message).toBe("battle:statRose"); - }); - - it("should return battle:statSharplyRose for +2", () => { - mockI18next(); - - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - 2, - true - ); - - expect(message).toBe("battle:statSharplyRose"); - }); - - it("should return battle:statRoseDrastically for +3 to +6", () => { - mockI18next(); - - arrayOfRange(3, 6).forEach((n) => { - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - n, - true - ); - - expect(message).toBe("battle:statRoseDrastically"); - }); - }); - - it("should return battle:statWontGoAnyHigher for 7 or higher", () => { - mockI18next(); - - arrayOfRange(7, 10).forEach((n) => { - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - n, - true - ); - - expect(message).toBe("battle:statWontGoAnyHigher"); - }); - }); - - it("should return battle:statFell for -1", () => { - mockI18next(); - - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - 1, - false - ); - - expect(message).toBe("battle:statFell"); - }); - - it("should return battle:statHarshlyFell for -2", () => { - mockI18next(); - - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - 2, - false - ); - - expect(message).toBe("battle:statHarshlyFell"); - }); - - it("should return battle:statSeverelyFell for -3 to -6", () => { - mockI18next(); - - arrayOfRange(3, 6).forEach((n) => { - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - n, - false - ); - - expect(message).toBe("battle:statSeverelyFell"); - }); - }); - - it("should return battle:statWontGoAnyLower for -7 or lower", () => { - mockI18next(); - - arrayOfRange(7, 10).forEach((n) => { - const message = getBattleStatLevelChangeDescription( - TEST_POKEMON, - TEST_STAT, - n, - false - ); - - expect(message).toBe("battle:statWontGoAnyLower"); - }); - }); - }); -}); diff --git a/src/test/battle/battle.test.ts b/src/test/battle/battle.test.ts index be89fdeb2af..25dfbc765bd 100644 --- a/src/test/battle/battle.test.ts +++ b/src/test/battle/battle.test.ts @@ -1,5 +1,5 @@ import { allSpecies } from "#app/data/pokemon-species"; -import { TempBattleStat } from "#app/data/temp-battle-stat"; +import { Stat } from "#enums/stat"; import { GameModes, getGameMode } from "#app/game-mode"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { CommandPhase } from "#app/phases/command-phase"; @@ -320,7 +320,7 @@ describe("Test Battle Phase", () => { .startingLevel(100) .moveset([moveToUse]) .enemyMoveset(SPLASH_ONLY) - .startingHeldItems([{ name: "TEMP_STAT_BOOSTER", type: TempBattleStat.ACC }]); + .startingHeldItems([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]); await game.startBattle(); game.scene.getPlayerPokemon()!.hp = 1; diff --git a/src/test/battlerTags/octolock.test.ts b/src/test/battlerTags/octolock.test.ts index fa491589f09..7b1f9264370 100644 --- a/src/test/battlerTags/octolock.test.ts +++ b/src/test/battlerTags/octolock.test.ts @@ -1,16 +1,16 @@ import BattleScene from "#app/battle-scene"; -import { BattleStat } from "#app/data/battle-stat"; -import { BattlerTag, BattlerTagLapseType, OctolockTag, TrappedTag } from "#app/data/battler-tags"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import Pokemon from "#app/field/pokemon"; -import { StatChangePhase } from "#app/phases/stat-change-phase"; import { describe, expect, it, vi } from "vitest"; +import Pokemon from "#app/field/pokemon"; +import { BattlerTag, BattlerTagLapseType, OctolockTag, TrappedTag } from "#app/data/battler-tags"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; +import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { Stat } from "#enums/stat"; vi.mock("#app/battle-scene.js"); describe("BattlerTag - OctolockTag", () => { describe("lapse behavior", () => { - it("unshifts a StatChangePhase with expected stat changes", { timeout: 10000 }, async () => { + it("unshifts a StatStageChangePhase with expected stat stage changes", { timeout: 10000 }, async () => { const mockPokemon = { scene: new BattleScene(), getBattlerIndex: () => 0, @@ -19,9 +19,9 @@ describe("BattlerTag - OctolockTag", () => { const subject = new OctolockTag(1); vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementation(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(-1); - expect((phase as StatChangePhase)["stats"]).toEqual([BattleStat.DEF, BattleStat.SPDEF]); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(-1); + expect((phase as StatStageChangePhase)["stats"]).toEqual([ Stat.DEF, Stat.SPDEF ]); }); subject.lapse(mockPokemon, BattlerTagLapseType.TURN_END); diff --git a/src/test/battlerTags/stockpiling.test.ts b/src/test/battlerTags/stockpiling.test.ts index fef1e938c09..e568016dfef 100644 --- a/src/test/battlerTags/stockpiling.test.ts +++ b/src/test/battlerTags/stockpiling.test.ts @@ -1,10 +1,10 @@ import BattleScene from "#app/battle-scene"; -import { BattleStat } from "#app/data/battle-stat"; -import { StockpilingTag } from "#app/data/battler-tags"; -import Pokemon, { PokemonSummonData } from "#app/field/pokemon"; -import * as messages from "#app/messages"; -import { StatChangePhase } from "#app/phases/stat-change-phase"; import { beforeEach, describe, expect, it, vi } from "vitest"; +import Pokemon, { PokemonSummonData } from "#app/field/pokemon"; +import { StockpilingTag } from "#app/data/battler-tags"; +import { Stat } from "#enums/stat"; +import * as messages from "#app/messages"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; beforeEach(() => { vi.spyOn(messages, "getPokemonNameWithAffix").mockImplementation(() => ""); @@ -12,7 +12,7 @@ beforeEach(() => { describe("BattlerTag - StockpilingTag", () => { describe("onAdd", () => { - it("unshifts a StatChangePhase with expected stat changes on add", { timeout: 10000 }, async () => { + it("unshifts a StatStageChangePhase with expected stat stage changes on add", { timeout: 10000 }, async () => { const mockPokemon = { scene: vi.mocked(new BattleScene()) as BattleScene, getBattlerIndex: () => 0, @@ -23,11 +23,11 @@ describe("BattlerTag - StockpilingTag", () => { const subject = new StockpilingTag(1); vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementation(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(1); - expect((phase as StatChangePhase)["stats"]).toEqual(expect.arrayContaining([BattleStat.DEF, BattleStat.SPDEF])); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(1); + expect((phase as StatStageChangePhase)["stats"]).toEqual(expect.arrayContaining([ Stat.DEF, Stat.SPDEF ])); - (phase as StatChangePhase)["onChange"]!(mockPokemon, [BattleStat.DEF, BattleStat.SPDEF], [1, 1]); + (phase as StatStageChangePhase)["onChange"]!(mockPokemon, [Stat.DEF, Stat.SPDEF], [1, 1]); }); subject.onAdd(mockPokemon); @@ -35,7 +35,7 @@ describe("BattlerTag - StockpilingTag", () => { expect(mockPokemon.scene.unshiftPhase).toBeCalledTimes(1); }); - it("unshifts a StatChangePhase with expected stat changes on add (one stat maxed)", { timeout: 10000 }, async () => { + it("unshifts a StatStageChangePhase with expected stat changes on add (one stat maxed)", { timeout: 10000 }, async () => { const mockPokemon = { scene: new BattleScene(), summonData: new PokemonSummonData(), @@ -44,17 +44,17 @@ describe("BattlerTag - StockpilingTag", () => { vi.spyOn(mockPokemon.scene, "queueMessage").mockImplementation(() => {}); - mockPokemon.summonData.battleStats[BattleStat.DEF] = 6; - mockPokemon.summonData.battleStats[BattleStat.SPDEF] = 5; + mockPokemon.summonData.statStages[Stat.DEF - 1] = 6; + mockPokemon.summonData.statStages[Stat.SPD - 1] = 5; const subject = new StockpilingTag(1); vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementation(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(1); - expect((phase as StatChangePhase)["stats"]).toEqual(expect.arrayContaining([BattleStat.DEF, BattleStat.SPDEF])); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(1); + expect((phase as StatStageChangePhase)["stats"]).toEqual(expect.arrayContaining([Stat.DEF, Stat.SPDEF])); - (phase as StatChangePhase)["onChange"]!(mockPokemon, [BattleStat.DEF, BattleStat.SPDEF], [1, 1]); + (phase as StatStageChangePhase)["onChange"]!(mockPokemon, [ Stat.DEF, Stat.SPDEF ], [1, 1]); }); subject.onAdd(mockPokemon); @@ -64,7 +64,7 @@ describe("BattlerTag - StockpilingTag", () => { }); describe("onOverlap", () => { - it("unshifts a StatChangePhase with expected stat changes on overlap", { timeout: 10000 }, async () => { + it("unshifts a StatStageChangePhase with expected stat changes on overlap", { timeout: 10000 }, async () => { const mockPokemon = { scene: new BattleScene(), getBattlerIndex: () => 0, @@ -75,11 +75,11 @@ describe("BattlerTag - StockpilingTag", () => { const subject = new StockpilingTag(1); vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementation(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(1); - expect((phase as StatChangePhase)["stats"]).toEqual(expect.arrayContaining([BattleStat.DEF, BattleStat.SPDEF])); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(1); + expect((phase as StatStageChangePhase)["stats"]).toEqual(expect.arrayContaining([ Stat.DEF, Stat.SPDEF ])); - (phase as StatChangePhase)["onChange"]!(mockPokemon, [BattleStat.DEF, BattleStat.SPDEF], [1, 1]); + (phase as StatStageChangePhase)["onChange"]!(mockPokemon, [ Stat.DEF, Stat.SPDEF ], [1, 1]); }); subject.onOverlap(mockPokemon); @@ -98,39 +98,39 @@ describe("BattlerTag - StockpilingTag", () => { vi.spyOn(mockPokemon.scene, "queueMessage").mockImplementation(() => {}); - mockPokemon.summonData.battleStats[BattleStat.DEF] = 5; - mockPokemon.summonData.battleStats[BattleStat.SPDEF] = 4; + mockPokemon.summonData.statStages[Stat.DEF - 1] = 5; + mockPokemon.summonData.statStages[Stat.SPD - 1] = 4; const subject = new StockpilingTag(1); vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementationOnce(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(1); - expect((phase as StatChangePhase)["stats"]).toEqual(expect.arrayContaining([BattleStat.DEF, BattleStat.SPDEF])); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(1); + expect((phase as StatStageChangePhase)["stats"]).toEqual(expect.arrayContaining([ Stat.DEF, Stat.SPDEF ])); // def doesn't change - (phase as StatChangePhase)["onChange"]!(mockPokemon, [BattleStat.SPDEF], [1]); + (phase as StatStageChangePhase)["onChange"]!(mockPokemon, [ Stat.SPDEF ], [1]); }); subject.onAdd(mockPokemon); expect(subject.stockpiledCount).toBe(1); vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementationOnce(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(1); - expect((phase as StatChangePhase)["stats"]).toEqual(expect.arrayContaining([BattleStat.DEF, BattleStat.SPDEF])); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(1); + expect((phase as StatStageChangePhase)["stats"]).toEqual(expect.arrayContaining([ Stat.DEF, Stat.SPDEF ])); // def doesn't change - (phase as StatChangePhase)["onChange"]!(mockPokemon, [BattleStat.SPDEF], [1]); + (phase as StatStageChangePhase)["onChange"]!(mockPokemon, [ Stat.SPDEF ], [1]); }); subject.onOverlap(mockPokemon); expect(subject.stockpiledCount).toBe(2); vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementationOnce(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(1); - expect((phase as StatChangePhase)["stats"]).toEqual(expect.arrayContaining([BattleStat.DEF, BattleStat.SPDEF])); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(1); + expect((phase as StatStageChangePhase)["stats"]).toEqual(expect.arrayContaining([ Stat.DEF, Stat.SPDEF ])); // neither stat changes, stack count should still increase }); @@ -138,20 +138,20 @@ describe("BattlerTag - StockpilingTag", () => { subject.onOverlap(mockPokemon); expect(subject.stockpiledCount).toBe(3); - vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementationOnce(phase => { + vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementationOnce(_phase => { throw new Error("Should not be called a fourth time"); }); // fourth stack should not be applied subject.onOverlap(mockPokemon); expect(subject.stockpiledCount).toBe(3); - expect(subject.statChangeCounts).toMatchObject({ [BattleStat.DEF]: 0, [BattleStat.SPDEF]: 2 }); + expect(subject.statChangeCounts).toMatchObject({ [ Stat.DEF ]: 0, [Stat.SPDEF]: 2 }); // removing tag should reverse stat changes vi.spyOn(mockPokemon.scene, "unshiftPhase").mockImplementationOnce(phase => { - expect(phase).toBeInstanceOf(StatChangePhase); - expect((phase as StatChangePhase)["levels"]).toEqual(-2); - expect((phase as StatChangePhase)["stats"]).toEqual(expect.arrayContaining([BattleStat.SPDEF])); + expect(phase).toBeInstanceOf(StatStageChangePhase); + expect((phase as StatStageChangePhase)["stages"]).toEqual(-2); + expect((phase as StatStageChangePhase)["stats"]).toEqual(expect.arrayContaining([Stat.SPDEF])); }); subject.onRemove(mockPokemon); diff --git a/src/test/boss-pokemon.test.ts b/src/test/boss-pokemon.test.ts index 3e6701c7e4f..f8437932580 100644 --- a/src/test/boss-pokemon.test.ts +++ b/src/test/boss-pokemon.test.ts @@ -5,7 +5,7 @@ import { getPokemonSpecies } from "#app/data/pokemon-species"; import { SPLASH_ONLY } from "./utils/testUtils"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; -import { BattleStat } from "#app/data/battle-stat"; +import { EFFECTIVE_STATS } from "#app/enums/stat"; import { EnemyPokemon } from "#app/field/pokemon"; import { toDmgValue } from "#app/utils"; @@ -80,7 +80,7 @@ describe("Boss Pokemon / Shields", () => { expect(boss2.bossSegments).toBe(2); }, TIMEOUT); - it("shields should stop overflow damage and give stat boosts when broken", async () => { + it("shields should stop overflow damage and give stat stage boosts when broken", async () => { game.override.startingWave(150); // Floor 150 > 2 shields / 3 health segments await game.classicMode.startBattle([ Species.MEWTWO ]); @@ -89,7 +89,7 @@ describe("Boss Pokemon / Shields", () => { const segmentHp = enemyPokemon.getMaxHp() / enemyPokemon.bossSegments; expect(enemyPokemon.isBoss()).toBe(true); expect(enemyPokemon.bossSegments).toBe(3); - expect(getTotalStatBoosts(enemyPokemon)).toBe(0); + expect(getTotalStatStageBoosts(enemyPokemon)).toBe(0); game.move.select(Moves.SUPER_FANG); // Enough to break the first shield await game.toNextTurn(); @@ -98,7 +98,7 @@ describe("Boss Pokemon / Shields", () => { expect(enemyPokemon.bossSegmentIndex).toBe(1); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp() - toDmgValue(segmentHp)); // Breaking the shield gives a +1 boost to ATK, DEF, SP ATK, SP DEF or SPD - expect(getTotalStatBoosts(enemyPokemon)).toBe(1); + expect(getTotalStatStageBoosts(enemyPokemon)).toBe(1); game.move.select(Moves.FALSE_SWIPE); // Enough to break last shield but not kill await game.toNextTurn(); @@ -106,7 +106,7 @@ describe("Boss Pokemon / Shields", () => { expect(enemyPokemon.bossSegmentIndex).toBe(0); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp() - toDmgValue(2 * segmentHp)); // Breaking the last shield gives a +2 boost to ATK, DEF, SP ATK, SP DEF or SPD - expect(getTotalStatBoosts(enemyPokemon)).toBe(3); + expect(getTotalStatStageBoosts(enemyPokemon)).toBe(3); }, TIMEOUT); @@ -146,7 +146,7 @@ describe("Boss Pokemon / Shields", () => { }, TIMEOUT); - it("the number of stats boosts is consistent when several shields are broken at once", async () => { + it("the number of stat stage boosts is consistent when several shields are broken at once", async () => { const shieldsToBreak = 4; game.override @@ -161,22 +161,22 @@ describe("Boss Pokemon / Shields", () => { expect(boss1.isBoss()).toBe(true); expect(boss1.bossSegments).toBe(shieldsToBreak + 1); expect(boss1.bossSegmentIndex).toBe(shieldsToBreak); - expect(getTotalStatBoosts(boss1)).toBe(0); + expect(getTotalStatStageBoosts(boss1)).toBe(0); - let totalStats = 0; + let totalStatStages = 0; // Break the shields one by one for (let i = 1; i <= shieldsToBreak; i++) { boss1.damageAndUpdate(singleShieldDamage); expect(boss1.bossSegmentIndex).toBe(shieldsToBreak - i); expect(boss1.hp).toBe(boss1.getMaxHp() - toDmgValue(boss1SegmentHp * i)); - // Do nothing and go to next turn so that the StatChangePhase gets applied + // Do nothing and go to next turn so that the StatStageChangePhase gets applied game.move.select(Moves.SPLASH); await game.toNextTurn(); // All broken shields give +1 stat boost, except the last two that gives +2 - totalStats += i >= shieldsToBreak -1? 2 : 1; - expect(getTotalStatBoosts(boss1)).toBe(totalStats); + totalStatStages += i >= shieldsToBreak -1? 2 : 1; + expect(getTotalStatStageBoosts(boss1)).toBe(totalStatStages); } const boss2: EnemyPokemon = game.scene.getEnemyParty()[1]!; @@ -186,35 +186,30 @@ describe("Boss Pokemon / Shields", () => { expect(boss2.isBoss()).toBe(true); expect(boss2.bossSegments).toBe(shieldsToBreak + 1); expect(boss2.bossSegmentIndex).toBe(shieldsToBreak); - expect(getTotalStatBoosts(boss2)).toBe(0); + expect(getTotalStatStageBoosts(boss2)).toBe(0); // Enough damage to break all shields at once boss2.damageAndUpdate(Math.ceil(requiredDamage)); expect(boss2.bossSegmentIndex).toBe(0); expect(boss2.hp).toBe(boss2.getMaxHp() - toDmgValue(boss2SegmentHp * shieldsToBreak)); - // Do nothing and go to next turn so that the StatChangePhase gets applied + // Do nothing and go to next turn so that the StatStageChangePhase gets applied game.move.select(Moves.SPLASH); await game.toNextTurn(); - expect(getTotalStatBoosts(boss2)).toBe(totalStats); + expect(getTotalStatStageBoosts(boss2)).toBe(totalStatStages); }, TIMEOUT); /** - * Gets the sum of the ATK, DEF, SP ATK, SP DEF and SPD boosts for the given Pokemon + * Gets the sum of the effective stat stage boosts for the given Pokemon * @param enemyPokemon the pokemon to get stats from * @returns the total stats boosts */ - function getTotalStatBoosts(enemyPokemon: EnemyPokemon): number { - const enemyBattleStats = enemyPokemon.summonData.battleStats; - return enemyBattleStats?.reduce(statsSum, 0); - } - - function statsSum(total: number, value: number, index: number) { - if (index <= BattleStat.SPD) { - return total + value; + function getTotalStatStageBoosts(enemyPokemon: EnemyPokemon): number { + let boosts = 0; + for (const s of EFFECTIVE_STATS) { + boosts += enemyPokemon.getStatStage(s); } - return total; + return boosts; } - }); diff --git a/src/test/items/dire_hit.test.ts b/src/test/items/dire_hit.test.ts new file mode 100644 index 00000000000..c43091d1f03 --- /dev/null +++ b/src/test/items/dire_hit.test.ts @@ -0,0 +1,97 @@ +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phase from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; +import { BattleEndPhase } from "#app/phases/battle-end-phase"; +import { TempCritBoosterModifier } from "#app/modifier/modifier"; +import { Mode } from "#app/ui/ui"; +import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; +import { Button } from "#app/enums/buttons"; +import { CommandPhase } from "#app/phases/command-phase"; +import { NewBattlePhase } from "#app/phases/new-battle-phase"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; + +describe("Items - Dire Hit", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phase.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + + game.override + .enemySpecies(Species.MAGIKARP) + .enemyMoveset(SPLASH_ONLY) + .moveset([ Moves.POUND ]) + .startingHeldItems([{ name: "DIRE_HIT" }]) + .battleType("single") + .disableCrits(); + + }, 20000); + + it("should raise CRIT stage by 1", async () => { + await game.startBattle([ + Species.GASTLY + ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemyPokemon, "getCritStage"); + + game.move.select(Moves.POUND); + + await game.phaseInterceptor.to(TurnEndPhase); + + expect(enemyPokemon.getCritStage).toHaveReturnedWith(1); + }, 20000); + + it("should renew how many battles are left of existing DIRE_HIT when picking up new DIRE_HIT", async() => { + game.override.itemRewards([{ name: "DIRE_HIT" }]); + + await game.startBattle([ + Species.PIKACHU + ]); + + game.move.select(Moves.SPLASH); + + await game.doKillOpponents(); + + await game.phaseInterceptor.to(BattleEndPhase); + + const modifier = game.scene.findModifier(m => m instanceof TempCritBoosterModifier) as TempCritBoosterModifier; + expect(modifier.getBattlesLeft()).toBe(4); + + // Forced DIRE_HIT to spawn in the first slot with override + game.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { + const handler = game.scene.ui.getHandler() as ModifierSelectUiHandler; + // Traverse to first modifier slot + handler.processInput(Button.LEFT); + handler.processInput(Button.UP); + handler.processInput(Button.ACTION); + }, () => game.isCurrentPhase(CommandPhase) || game.isCurrentPhase(NewBattlePhase), true); + + await game.phaseInterceptor.to(TurnInitPhase); + + // Making sure only one booster is in the modifier list even after picking up another + let count = 0; + for (const m of game.scene.modifiers) { + if (m instanceof TempCritBoosterModifier) { + count++; + expect((m as TempCritBoosterModifier).getBattlesLeft()).toBe(5); + } + } + expect(count).toBe(1); + }, 20000); +}); diff --git a/src/test/items/eviolite.test.ts b/src/test/items/eviolite.test.ts index e491784acec..83b00583893 100644 --- a/src/test/items/eviolite.test.ts +++ b/src/test/items/eviolite.test.ts @@ -1,4 +1,4 @@ -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { EvolutionStatBoosterModifier } from "#app/modifier/modifier"; import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; @@ -37,29 +37,29 @@ describe("Items - Eviolite", () => { const partyMember = game.scene.getParty()[0]; - // Checking consoe log to make sure Eviolite is applied when getBattleStat (with the appropriate stat) is called - partyMember.getBattleStat(Stat.DEF); + // Checking console log to make sure Eviolite is applied when getEffectiveStat (with the appropriate stat) is called + partyMember.getEffectiveStat(Stat.DEF); expect(consoleSpy).toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:ModifierType.EVIOLITE.name"), ""); // Printing dummy console messages along the way so subsequent checks don't pass because of the first console.log(""); - partyMember.getBattleStat(Stat.SPDEF); + partyMember.getEffectiveStat(Stat.SPDEF); expect(consoleSpy).toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:ModifierType.EVIOLITE.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.ATK); + partyMember.getEffectiveStat(Stat.ATK); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:ModifierType.EVIOLITE.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPATK); + partyMember.getEffectiveStat(Stat.SPATK); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:ModifierType.EVIOLITE.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPD); + partyMember.getEffectiveStat(Stat.SPD); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:ModifierType.EVIOLITE.name"), ""); }); diff --git a/src/test/items/leek.test.ts b/src/test/items/leek.test.ts index 7505b6374a0..af20516ef83 100644 --- a/src/test/items/leek.test.ts +++ b/src/test/items/leek.test.ts @@ -1,7 +1,4 @@ -import { BattlerIndex } from "#app/battle"; -import { CritBoosterModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/modifier/modifier-type"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; import * as Utils from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -26,91 +23,64 @@ describe("Items - Leek", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); - game.override.disableCrits(); - - game.override.battleType("single"); + game.override + .enemySpecies(Species.MAGIKARP) + .enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]) + .startingHeldItems([{ name: "LEEK" }]) + .moveset([ Moves.TACKLE ]) + .disableCrits() + .battleType("single"); }); - it("LEEK activates in battle correctly", async () => { - game.override.startingHeldItems([{ name: "LEEK" }]); - game.override.moveset([Moves.POUND]); - const consoleSpy = vi.spyOn(console, "log"); + it("should raise CRIT stage by 2 when held by FARFETCHD", async () => { await game.startBattle([ Species.FARFETCHD ]); - game.move.select(Moves.POUND); + const enemyMember = game.scene.getEnemyPokemon()!; - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + vi.spyOn(enemyMember, "getCritStage"); - await game.phaseInterceptor.to(MoveEffectPhase); + game.move.select(Moves.TACKLE); - expect(consoleSpy).toHaveBeenCalledWith("Applied", "Leek", ""); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(enemyMember.getCritStage).toHaveReturnedWith(2); }, 20000); - it("LEEK held by FARFETCHD", async () => { - await game.startBattle([ - Species.FARFETCHD - ]); - - const partyMember = game.scene.getPlayerPokemon()!; - - // Making sure modifier is not applied without holding item - const critLevel = new Utils.IntegerHolder(0); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); - - expect(critLevel.value).toBe(0); - - // Giving Leek to party member and testing if it applies - partyMember.scene.addModifier(modifierTypes.LEEK().newModifier(partyMember), true); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); - - expect(critLevel.value).toBe(2); - }, 20000); - - it("LEEK held by GALAR_FARFETCHD", async () => { + it("should raise CRIT stage by 2 when held by GALAR_FARFETCHD", async () => { await game.startBattle([ Species.GALAR_FARFETCHD ]); - const partyMember = game.scene.getPlayerPokemon()!; + const enemyMember = game.scene.getEnemyPokemon()!; - // Making sure modifier is not applied without holding item - const critLevel = new Utils.IntegerHolder(0); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + vi.spyOn(enemyMember, "getCritStage"); - expect(critLevel.value).toBe(0); + game.move.select(Moves.TACKLE); - // Giving Leek to party member and testing if it applies - partyMember.scene.addModifier(modifierTypes.LEEK().newModifier(partyMember), true); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + await game.phaseInterceptor.to(TurnEndPhase); - expect(critLevel.value).toBe(2); + expect(enemyMember.getCritStage).toHaveReturnedWith(2); }, 20000); - it("LEEK held by SIRFETCHD", async () => { + it("should raise CRIT stage by 2 when held by SIRFETCHD", async () => { await game.startBattle([ Species.SIRFETCHD ]); - const partyMember = game.scene.getPlayerPokemon()!; + const enemyMember = game.scene.getEnemyPokemon()!; - // Making sure modifier is not applied without holding item - const critLevel = new Utils.IntegerHolder(0); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + vi.spyOn(enemyMember, "getCritStage"); - expect(critLevel.value).toBe(0); + game.move.select(Moves.TACKLE); - // Giving Leek to party member and testing if it applies - partyMember.scene.addModifier(modifierTypes.LEEK().newModifier(partyMember), true); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + await game.phaseInterceptor.to(TurnEndPhase); - expect(critLevel.value).toBe(2); + expect(enemyMember.getCritStage).toHaveReturnedWith(2); }, 20000); - it("LEEK held by fused FARFETCHD line (base)", async () => { + it("should raise CRIT stage by 2 when held by FARFETCHD line fused with Pokemon", async () => { // Randomly choose from the Farfetch'd line const species = [Species.FARFETCHD, Species.GALAR_FARFETCHD, Species.SIRFETCHD]; @@ -119,9 +89,7 @@ describe("Items - Leek", () => { Species.PIKACHU, ]); - const party = game.scene.getParty(); - const partyMember = party[0]; - const ally = party[1]; + const [ partyMember, ally ] = game.scene.getParty(); // Fuse party members (taken from PlayerPokemon.fuse(...) function) partyMember.fusionSpecies = ally.species; @@ -132,20 +100,18 @@ describe("Items - Leek", () => { partyMember.fusionGender = ally.gender; partyMember.fusionLuck = ally.luck; - // Making sure modifier is not applied without holding item - const critLevel = new Utils.IntegerHolder(0); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + const enemyMember = game.scene.getEnemyPokemon()!; - expect(critLevel.value).toBe(0); + vi.spyOn(enemyMember, "getCritStage"); - // Giving Leek to party member and testing if it applies - partyMember.scene.addModifier(modifierTypes.LEEK().newModifier(partyMember), true); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + game.move.select(Moves.TACKLE); - expect(critLevel.value).toBe(2); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(enemyMember.getCritStage).toHaveReturnedWith(2); }, 20000); - it("LEEK held by fused FARFETCHD line (part)", async () => { + it("should raise CRIT stage by 2 when held by Pokemon fused with FARFETCHD line", async () => { // Randomly choose from the Farfetch'd line const species = [Species.FARFETCHD, Species.GALAR_FARFETCHD, Species.SIRFETCHD]; @@ -154,9 +120,7 @@ describe("Items - Leek", () => { species[Utils.randInt(species.length)] ]); - const party = game.scene.getParty(); - const partyMember = party[0]; - const ally = party[1]; + const [ partyMember, ally ] = game.scene.getParty(); // Fuse party members (taken from PlayerPokemon.fuse(...) function) partyMember.fusionSpecies = ally.species; @@ -167,36 +131,31 @@ describe("Items - Leek", () => { partyMember.fusionGender = ally.gender; partyMember.fusionLuck = ally.luck; - // Making sure modifier is not applied without holding item - const critLevel = new Utils.IntegerHolder(0); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); - expect(critLevel.value).toBe(0); + const enemyMember = game.scene.getEnemyPokemon()!; - // Giving Leek to party member and testing if it applies - partyMember.scene.addModifier(modifierTypes.LEEK().newModifier(partyMember), true); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + vi.spyOn(enemyMember, "getCritStage"); - expect(critLevel.value).toBe(2); + game.move.select(Moves.TACKLE); + + await game.phaseInterceptor.to(TurnEndPhase); + + expect(enemyMember.getCritStage).toHaveReturnedWith(2); }, 20000); - it("LEEK not held by FARFETCHD line", async () => { + it("should not raise CRIT stage when held by a Pokemon outside of FARFETCHD line", async () => { await game.startBattle([ Species.PIKACHU ]); - const partyMember = game.scene.getPlayerPokemon()!; + const enemyMember = game.scene.getEnemyPokemon()!; - // Making sure modifier is not applied without holding item - const critLevel = new Utils.IntegerHolder(0); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + vi.spyOn(enemyMember, "getCritStage"); - expect(critLevel.value).toBe(0); + game.move.select(Moves.TACKLE); - // Giving Leek to party member and testing if it applies - partyMember.scene.addModifier(modifierTypes.LEEK().newModifier(partyMember), true); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); + await game.phaseInterceptor.to(TurnEndPhase); - expect(critLevel.value).toBe(0); + expect(enemyMember.getCritStage).toHaveReturnedWith(0); }, 20000); }); diff --git a/src/test/items/light_ball.test.ts b/src/test/items/light_ball.test.ts index cf4f5c9e22f..673348e7b7a 100644 --- a/src/test/items/light_ball.test.ts +++ b/src/test/items/light_ball.test.ts @@ -1,4 +1,4 @@ -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; @@ -37,29 +37,29 @@ describe("Items - Light Ball", () => { const partyMember = game.scene.getParty()[0]; - // Checking consoe log to make sure Light Ball is applied when getBattleStat (with the appropriate stat) is called - partyMember.getBattleStat(Stat.DEF); + // Checking console log to make sure Light Ball is applied when getEffectiveStat (with the appropriate stat) is called + partyMember.getEffectiveStat(Stat.DEF); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.LIGHT_BALL.name"), ""); // Printing dummy console messages along the way so subsequent checks don't pass because of the first console.log(""); - partyMember.getBattleStat(Stat.SPDEF); + partyMember.getEffectiveStat(Stat.SPDEF); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.LIGHT_BALL.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.ATK); + partyMember.getEffectiveStat(Stat.ATK); expect(consoleSpy).toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.LIGHT_BALL.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPATK); + partyMember.getEffectiveStat(Stat.SPATK); expect(consoleSpy).toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.LIGHT_BALL.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPD); + partyMember.getEffectiveStat(Stat.SPD); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.LIGHT_BALL.name"), ""); }); diff --git a/src/test/items/metal_powder.test.ts b/src/test/items/metal_powder.test.ts index a3a4936532f..0206fd1f471 100644 --- a/src/test/items/metal_powder.test.ts +++ b/src/test/items/metal_powder.test.ts @@ -1,4 +1,4 @@ -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; @@ -37,29 +37,29 @@ describe("Items - Metal Powder", () => { const partyMember = game.scene.getParty()[0]; - // Checking consoe log to make sure Metal Powder is applied when getBattleStat (with the appropriate stat) is called - partyMember.getBattleStat(Stat.DEF); + // Checking console log to make sure Metal Powder is applied when getEffectiveStat (with the appropriate stat) is called + partyMember.getEffectiveStat(Stat.DEF); expect(consoleSpy).toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.METAL_POWDER.name"), ""); // Printing dummy console messages along the way so subsequent checks don't pass because of the first console.log(""); - partyMember.getBattleStat(Stat.SPDEF); + partyMember.getEffectiveStat(Stat.SPDEF); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.METAL_POWDER.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.ATK); + partyMember.getEffectiveStat(Stat.ATK); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.METAL_POWDER.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPATK); + partyMember.getEffectiveStat(Stat.SPATK); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.METAL_POWDER.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPD); + partyMember.getEffectiveStat(Stat.SPD); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.METAL_POWDER.name"), ""); }); diff --git a/src/test/items/quick_powder.test.ts b/src/test/items/quick_powder.test.ts index 53521ba78f1..344b772feb4 100644 --- a/src/test/items/quick_powder.test.ts +++ b/src/test/items/quick_powder.test.ts @@ -1,4 +1,4 @@ -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; @@ -37,29 +37,29 @@ describe("Items - Quick Powder", () => { const partyMember = game.scene.getParty()[0]; - // Checking consoe log to make sure Quick Powder is applied when getBattleStat (with the appropriate stat) is called - partyMember.getBattleStat(Stat.DEF); + // Checking console log to make sure Quick Powder is applied when getEffectiveStat (with the appropriate stat) is called + partyMember.getEffectiveStat(Stat.DEF); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.QUICK_POWDER.name"), ""); // Printing dummy console messages along the way so subsequent checks don't pass because of the first console.log(""); - partyMember.getBattleStat(Stat.SPDEF); + partyMember.getEffectiveStat(Stat.SPDEF); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.QUICK_POWDER.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.ATK); + partyMember.getEffectiveStat(Stat.ATK); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.QUICK_POWDER.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPATK); + partyMember.getEffectiveStat(Stat.SPATK); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.QUICK_POWDER.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPD); + partyMember.getEffectiveStat(Stat.SPD); expect(consoleSpy).toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.QUICK_POWDER.name"), ""); }); diff --git a/src/test/items/scope_lens.test.ts b/src/test/items/scope_lens.test.ts index 85673218762..c8629093ab5 100644 --- a/src/test/items/scope_lens.test.ts +++ b/src/test/items/scope_lens.test.ts @@ -1,13 +1,10 @@ -import { BattlerIndex } from "#app/battle"; -import { CritBoosterModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/modifier/modifier-type"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import * as Utils from "#app/utils"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; describe("Items - Scope Lens", () => { let phaserGame: Phaser.Game; @@ -26,47 +23,29 @@ describe("Items - Scope Lens", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); - game.override.disableCrits(); + game.override + .enemySpecies(Species.MAGIKARP) + .enemyMoveset(SPLASH_ONLY) + .moveset([ Moves.POUND ]) + .startingHeldItems([{ name: "SCOPE_LENS" }]) + .battleType("single") + .disableCrits(); - game.override.battleType("single"); }, 20000); - it("SCOPE_LENS activates in battle correctly", async () => { - game.override.startingHeldItems([{ name: "SCOPE_LENS" }]); - game.override.moveset([Moves.POUND]); - const consoleSpy = vi.spyOn(console, "log"); + it("should raise CRIT stage by 1", async () => { await game.startBattle([ Species.GASTLY ]); + const enemyPokemon = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemyPokemon, "getCritStage"); + game.move.select(Moves.POUND); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to(TurnEndPhase); - await game.phaseInterceptor.to(MoveEffectPhase); - - expect(consoleSpy).toHaveBeenCalledWith("Applied", "Scope Lens", ""); - }, 20000); - - it("SCOPE_LENS held by random pokemon", async () => { - await game.startBattle([ - Species.GASTLY - ]); - - const partyMember = game.scene.getPlayerPokemon()!; - - // Making sure modifier is not applied without holding item - const critLevel = new Utils.IntegerHolder(0); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); - - expect(critLevel.value).toBe(0); - - // Giving Scope Lens to party member and testing if it applies - partyMember.scene.addModifier(modifierTypes.SCOPE_LENS().newModifier(partyMember), true); - partyMember.scene.applyModifiers(CritBoosterModifier, true, partyMember, critLevel); - - expect(critLevel.value).toBe(1); + expect(enemyPokemon.getCritStage).toHaveReturnedWith(1); }, 20000); }); diff --git a/src/test/items/temp_stat_stage_booster.test.ts b/src/test/items/temp_stat_stage_booster.test.ts new file mode 100644 index 00000000000..e5b95c6c3b6 --- /dev/null +++ b/src/test/items/temp_stat_stage_booster.test.ts @@ -0,0 +1,174 @@ +import { BATTLE_STATS, Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; +import { Species } from "#enums/species"; +import Phase from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { Moves } from "#app/enums/moves"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { SPLASH_ONLY } from "../utils/testUtils"; +import { Abilities } from "#app/enums/abilities"; +import { TempStatStageBoosterModifier } from "#app/modifier/modifier"; +import { Mode } from "#app/ui/ui"; +import { Button } from "#app/enums/buttons"; +import { CommandPhase } from "#app/phases/command-phase"; +import { NewBattlePhase } from "#app/phases/new-battle-phase"; +import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { BattleEndPhase } from "#app/phases/battle-end-phase"; +import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; + + +describe("Items - Temporary Stat Stage Boosters", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phase.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + + game.override + .battleType("single") + .enemySpecies(Species.SHUCKLE) + .enemyMoveset(SPLASH_ONLY) + .enemyAbility(Abilities.BALL_FETCH) + .moveset([ Moves.TACKLE, Moves.SPLASH, Moves.HONE_CLAWS, Moves.BELLY_DRUM ]) + .startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]); + }); + + it("should provide a x1.3 stat stage multiplier", async() => { + await game.startBattle([ + Species.PIKACHU + ]); + + const partyMember = game.scene.getPlayerPokemon()!; + + vi.spyOn(partyMember, "getStatStageMultiplier"); + + game.move.select(Moves.TACKLE); + + await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase); + + expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(1.3); + }, 20000); + + it("should increase existing ACC stat stage by 1 for X_ACCURACY only", async() => { + game.override + .startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]) + .ability(Abilities.SIMPLE); + + await game.startBattle([ + Species.PIKACHU + ]); + + const partyMember = game.scene.getPlayerPokemon()!; + + vi.spyOn(partyMember, "getAccuracyMultiplier"); + + // Raise ACC by +2 stat stages + game.move.select(Moves.HONE_CLAWS); + + await game.phaseInterceptor.to(TurnEndPhase); + + game.move.select(Moves.TACKLE); + + await game.phaseInterceptor.to(TurnEndPhase); + + // ACC at +3 stat stages yields a x2 multiplier + expect(partyMember.getAccuracyMultiplier).toHaveReturnedWith(2); + }, 20000); + + + it("should increase existing stat stage multiplier by 3/10 for the rest of the boosters", async() => { + await game.startBattle([ + Species.PIKACHU + ]); + + const partyMember = game.scene.getPlayerPokemon()!; + + vi.spyOn(partyMember, "getStatStageMultiplier"); + + // Raise ATK by +1 stat stage + game.move.select(Moves.HONE_CLAWS); + + await game.phaseInterceptor.to(TurnEndPhase); + + game.move.select(Moves.TACKLE); + + await game.phaseInterceptor.to(TurnEndPhase); + + // ATK at +1 stat stage yields a x1.5 multiplier, add 0.3 from X_ATTACK + expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(1.8); + }, 20000); + + it("should not increase past maximum stat stage multiplier", async() => { + game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }, { name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]); + + await game.startBattle([ + Species.PIKACHU + ]); + + const partyMember = game.scene.getPlayerPokemon()!; + + vi.spyOn(partyMember, "getStatStageMultiplier"); + vi.spyOn(partyMember, "getAccuracyMultiplier"); + + // Set all stat stages to 6 + vi.spyOn(partyMember.summonData, "statStages", "get").mockReturnValue(new Array(BATTLE_STATS.length).fill(6)); + + game.move.select(Moves.TACKLE); + + await game.phaseInterceptor.to(TurnEndPhase); + + expect(partyMember.getAccuracyMultiplier).toHaveReturnedWith(3); + expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(4); + }, 20000); + + it("should renew how many battles are left of existing booster when picking up new booster of same type", async() => { + game.override + .startingLevel(200) + .itemRewards([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]); + + await game.startBattle([ + Species.PIKACHU + ]); + + game.move.select(Moves.SPLASH); + + await game.doKillOpponents(); + + await game.phaseInterceptor.to(BattleEndPhase); + + const modifier = game.scene.findModifier(m => m instanceof TempStatStageBoosterModifier) as TempStatStageBoosterModifier; + expect(modifier.getBattlesLeft()).toBe(4); + + // Forced X_ATTACK to spawn in the first slot with override + game.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { + const handler = game.scene.ui.getHandler() as ModifierSelectUiHandler; + // Traverse to first modifier slot + handler.processInput(Button.LEFT); + handler.processInput(Button.UP); + handler.processInput(Button.ACTION); + }, () => game.isCurrentPhase(CommandPhase) || game.isCurrentPhase(NewBattlePhase), true); + + await game.phaseInterceptor.to(TurnInitPhase); + + // Making sure only one booster is in the modifier list even after picking up another + let count = 0; + for (const m of game.scene.modifiers) { + if (m instanceof TempStatStageBoosterModifier) { + count++; + expect((m as TempStatStageBoosterModifier).getBattlesLeft()).toBe(5); + } + } + expect(count).toBe(1); + }, 20000); +}); diff --git a/src/test/items/thick_club.test.ts b/src/test/items/thick_club.test.ts index 347921446e6..bcb6b371264 100644 --- a/src/test/items/thick_club.test.ts +++ b/src/test/items/thick_club.test.ts @@ -1,4 +1,4 @@ -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; @@ -37,29 +37,29 @@ describe("Items - Thick Club", () => { const partyMember = game.scene.getParty()[0]; - // Checking consoe log to make sure Thick Club is applied when getBattleStat (with the appropriate stat) is called - partyMember.getBattleStat(Stat.DEF); + // Checking console log to make sure Thick Club is applied when getEffectiveStat (with the appropriate stat) is called + partyMember.getEffectiveStat(Stat.DEF); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.THICK_CLUB.name"), ""); // Printing dummy console messages along the way so subsequent checks don't pass because of the first console.log(""); - partyMember.getBattleStat(Stat.SPDEF); + partyMember.getEffectiveStat(Stat.SPDEF); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.THICK_CLUB.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.ATK); + partyMember.getEffectiveStat(Stat.ATK); expect(consoleSpy).toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.THICK_CLUB.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPATK); + partyMember.getEffectiveStat(Stat.SPATK); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.THICK_CLUB.name"), ""); console.log(""); - partyMember.getBattleStat(Stat.SPD); + partyMember.getEffectiveStat(Stat.SPD); expect(consoleSpy).not.toHaveBeenLastCalledWith("Applied", i18next.t("modifierType:SpeciesBoosterItem.THICK_CLUB.name"), ""); }); diff --git a/src/test/localization/battle-stat.test.ts b/src/test/localization/battle-stat.test.ts deleted file mode 100644 index b5ba698c4b6..00000000000 --- a/src/test/localization/battle-stat.test.ts +++ /dev/null @@ -1,217 +0,0 @@ -import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "#app/data/battle-stat"; -import deBattleStat from "#app/locales/de/battle.json"; -import dePokemonInfo from "#app/locales/de/pokemon-info.json"; -import enBattleStat from "#app/locales/en/battle.json"; -import enPokemonInfo from "#app/locales/en/pokemon-info.json"; -import esBattleStat from "#app/locales/es/battle.json"; -import esPokemonInfo from "#app/locales/es/pokemon-info.json"; -import frBattleStat from "#app/locales/fr/battle.json"; -import frPokemonInfo from "#app/locales/fr/pokemon-info.json"; -import itBattleStat from "#app/locales/it/battle.json"; -import itPokemonInfo from "#app/locales/it/pokemon-info.json"; -import koBattleStat from "#app/locales/ko/battle.json"; -import koPokemonInfo from "#app/locales/ko/pokemon-info.json"; -import ptBrBattleStat from "#app/locales/pt_BR/battle.json"; -import ptBrPokemonInfo from "#app/locales/pt_BR/pokemon-info.json"; -import zhCnBattleStat from "#app/locales/zh_CN/battle.json"; -import zhCnPokemonInfo from "#app/locales/zh_CN/pokemon-info.json"; -import zhTwBattleStat from "#app/locales/zh_TW/battle.json"; -import zhTwPokemonInfo from "#app/locales/zh_TW/pokemon-info.json"; -import i18next, { initI18n } from "#app/plugins/i18n"; -import { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor"; -import { beforeAll, describe, expect, it } from "vitest"; - -interface BattleStatTestUnit { - stat: BattleStat, - key: string -} - -interface BattleStatLevelTestUnit { - levels: integer, - up: boolean, - key: string - changedStats: integer -} - -function testBattleStatName(stat: BattleStat, expectMessage: string) { - if (!expectMessage) { - return; - } // not translated yet! - const message = getBattleStatName(stat); - console.log(`message ${message}, expected ${expectMessage}`); - expect(message).toBe(expectMessage); -} - -function testBattleStatLevelChangeDescription(levels: integer, up: boolean, expectMessage: string, changedStats: integer) { - if (!expectMessage) { - return; - } // not translated yet! - const message = getBattleStatLevelChangeDescription("{{pokemonNameWithAffix}}", "{{stats}}", levels, up, changedStats); - console.log(`message ${message}, expected ${expectMessage}`); - expect(message).toBe(expectMessage); -} - -describe("Test for BattleStat Localization", () => { - const battleStatUnits: BattleStatTestUnit[] = []; - const battleStatLevelUnits: BattleStatLevelTestUnit[] = []; - - beforeAll(() => { - initI18n(); - - battleStatUnits.push({stat: BattleStat.ATK, key: "Stat.ATK"}); - battleStatUnits.push({stat: BattleStat.DEF, key: "Stat.DEF"}); - battleStatUnits.push({stat: BattleStat.SPATK, key: "Stat.SPATK"}); - battleStatUnits.push({stat: BattleStat.SPDEF, key: "Stat.SPDEF"}); - battleStatUnits.push({stat: BattleStat.SPD, key: "Stat.SPD"}); - battleStatUnits.push({stat: BattleStat.ACC, key: "Stat.ACC"}); - battleStatUnits.push({stat: BattleStat.EVA, key: "Stat.EVA"}); - - battleStatLevelUnits.push({levels: 1, up: true, key: "statRose_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 2, up: true, key: "statSharplyRose_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 3, up: true, key: "statRoseDrastically_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 4, up: true, key: "statRoseDrastically_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 5, up: true, key: "statRoseDrastically_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 6, up: true, key: "statRoseDrastically_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 7, up: true, key: "statWontGoAnyHigher_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 1, up: false, key: "statFell_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 2, up: false, key: "statHarshlyFell_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 3, up: false, key: "statSeverelyFell_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 4, up: false, key: "statSeverelyFell_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 5, up: false, key: "statSeverelyFell_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 6, up: false, key: "statSeverelyFell_one", changedStats: 1}); - battleStatLevelUnits.push({levels: 7, up: false, key: "statWontGoAnyLower_one", changedStats: 1}); - }); - - it("Test getBattleStatName() in English", async () => { - i18next.changeLanguage("en"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, enPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in English", async () => { - i18next.changeLanguage("en"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, enBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in Español", async () => { - i18next.changeLanguage("es"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, esPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Español", async () => { - i18next.changeLanguage("es"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, esBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in Italiano", async () => { - i18next.changeLanguage("it"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, itPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Italiano", async () => { - i18next.changeLanguage("it"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, itBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in Français", async () => { - i18next.changeLanguage("fr"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, frPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Français", async () => { - i18next.changeLanguage("fr"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, frBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in Deutsch", async () => { - i18next.changeLanguage("de"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, dePokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Deutsch", async () => { - i18next.changeLanguage("de"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, deBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in Português (BR)", async () => { - i18next.changeLanguage("pt-BR"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, ptBrPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Português (BR)", async () => { - i18next.changeLanguage("pt-BR"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, ptBrBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in 简体中文", async () => { - i18next.changeLanguage("zh-CN"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, zhCnPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in 简体中文", async () => { - i18next.changeLanguage("zh-CN"); - battleStatLevelUnits.forEach(unit => { - // In i18next, the pluralization rules are language-specific, and Chinese only supports the _other suffix. - unit.key = unit.key.replace("one", "other"); - testBattleStatLevelChangeDescription(unit.levels, unit.up, zhCnBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in 繁體中文", async () => { - i18next.changeLanguage("zh-TW"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, zhTwPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in 繁體中文", async () => { - i18next.changeLanguage("zh-TW"); - battleStatLevelUnits.forEach(unit => { - // In i18next, the pluralization rules are language-specific, and Chinese only supports the _other suffix. - unit.key = unit.key.replace("one", "other"); - testBattleStatLevelChangeDescription(unit.levels, unit.up, zhTwBattleStat[unit.key], unit.changedStats); - }); - }); - - it("Test getBattleStatName() in 한국어", async () => { - await i18next.changeLanguage("ko"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, koPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in 한국어", async () => { - i18next.changeLanguage("ko", () => { - battleStatLevelUnits.forEach(unit => { - const processor = new KoreanPostpositionProcessor(); - const message = processor.process(koBattleStat[unit.key]); - testBattleStatLevelChangeDescription(unit.levels, unit.up, message, unit.changedStats); - }); - }); - }); -}); diff --git a/src/test/moves/alluring_voice.test.ts b/src/test/moves/alluring_voice.test.ts index e6ece39524a..9807d1bce85 100644 --- a/src/test/moves/alluring_voice.test.ts +++ b/src/test/moves/alluring_voice.test.ts @@ -40,7 +40,7 @@ describe("Moves - Alluring Voice", () => { }); - it("should confuse the opponent if their stats were raised", async () => { + it("should confuse the opponent if their stat stages were raised", async () => { await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; diff --git a/src/test/moves/baton_pass.test.ts b/src/test/moves/baton_pass.test.ts index 602da9e37f8..0643b73e481 100644 --- a/src/test/moves/baton_pass.test.ts +++ b/src/test/moves/baton_pass.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { PostSummonPhase } from "#app/phases/post-summon-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import GameManager from "#app/test/utils/gameManager"; @@ -35,7 +35,7 @@ describe("Moves - Baton Pass", () => { .disableCrits(); }); - it("passes stat stage buffs when player uses it", async () => { + it("transfers all stat stages when player uses it", async() => { // arrange await game.startBattle([ Species.RAICHU, @@ -45,7 +45,10 @@ describe("Moves - Baton Pass", () => { // round 1 - buff game.move.select(Moves.NASTY_PLOT); await game.toNextTurn(); - expect(game.scene.getPlayerPokemon()!.summonData.battleStats[BattleStat.SPATK]).toEqual(2); + + let playerPokemon = game.scene.getPlayerPokemon()!; + + expect(playerPokemon.getStatStage(Stat.SPATK)).toEqual(2); // round 2 - baton pass game.move.select(Moves.BATON_PASS); @@ -53,9 +56,9 @@ describe("Moves - Baton Pass", () => { await game.phaseInterceptor.to(TurnEndPhase); // assert - const playerPkm = game.scene.getPlayerPokemon()!; - expect(playerPkm.species.speciesId).toEqual(Species.SHUCKLE); - expect(playerPkm.summonData.battleStats[BattleStat.SPATK]).toEqual(2); + playerPokemon = game.scene.getPlayerPokemon()!; + expect(playerPokemon.species.speciesId).toEqual(Species.SHUCKLE); + expect(playerPokemon.getStatStage(Stat.SPATK)).toEqual(2); }, 20000); it("passes stat stage buffs when AI uses it", async () => { @@ -80,7 +83,7 @@ describe("Moves - Baton Pass", () => { // assert // check buffs are still there - expect(game.scene.getEnemyPokemon()!.summonData.battleStats[BattleStat.SPATK]).toEqual(2); + expect(game.scene.getEnemyPokemon()!.getStatStage(Stat.SPATK)).toEqual(2); // confirm that a switch actually happened. can't use species because I // can't find a way to override trainer parties with more than 1 pokemon species expect(game.scene.getEnemyPokemon()!.hp).not.toEqual(100); diff --git a/src/test/moves/belly_drum.test.ts b/src/test/moves/belly_drum.test.ts index e4956c6e83a..7024deb3f18 100644 --- a/src/test/moves/belly_drum.test.ts +++ b/src/test/moves/belly_drum.test.ts @@ -1,8 +1,8 @@ -import { BattleStat } from "#app/data/battle-stat"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { toDmgValue } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; @@ -43,8 +43,8 @@ describe("Moves - BELLY DRUM", () => { // Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Belly_Drum_(move) - test("Belly Drum raises the user's Attack to its max, at the cost of 1/2 of its maximum HP", - async () => { + test("raises the user's ATK stat stage to its max, at the cost of 1/2 of its maximum HP", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -54,48 +54,48 @@ describe("Moves - BELLY DRUM", () => { await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp() - hpLost); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(6); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(6); }, TIMEOUT ); - test("Belly Drum will still take effect if an uninvolved stat is at max", - async () => { + test("will still take effect if an uninvolved stat stage is at max", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); - // Here - BattleStat.ATK -> -3 and BattleStat.SPATK -> 6 - leadPokemon.summonData.battleStats[BattleStat.ATK] = -3; - leadPokemon.summonData.battleStats[BattleStat.SPATK] = 6; + // Here - Stat.ATK -> -3 and Stat.SPATK -> 6 + leadPokemon.setStatStage(Stat.ATK, -3); + leadPokemon.setStatStage(Stat.SPATK, 6); game.move.select(Moves.BELLY_DRUM); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp() - hpLost); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(6); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(6); }, TIMEOUT ); - test("Belly Drum fails if the pokemon's attack stat is at its maximum", - async () => { + test("fails if the pokemon's ATK stat stage is at its maximum", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; + leadPokemon.setStatStage(Stat.ATK, 6); game.move.select(Moves.BELLY_DRUM); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(6); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(6); }, TIMEOUT ); - test("Belly Drum fails if the user's health is less than 1/2", - async () => { + test("fails if the user's health is less than 1/2", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -106,7 +106,7 @@ describe("Moves - BELLY DRUM", () => { await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(hpLost - PREDAMAGE); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(0); }, TIMEOUT ); }); diff --git a/src/test/moves/burning_jealousy.test.ts b/src/test/moves/burning_jealousy.test.ts index 2281fe74acb..2cb6a0bc52a 100644 --- a/src/test/moves/burning_jealousy.test.ts +++ b/src/test/moves/burning_jealousy.test.ts @@ -41,7 +41,7 @@ describe("Moves - Burning Jealousy", () => { }); - it("should burn the opponent if their stats were raised", async () => { + it("should burn the opponent if their stat stages were raised", async () => { await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; @@ -53,7 +53,7 @@ describe("Moves - Burning Jealousy", () => { expect(enemy.status?.effect).toBe(StatusEffect.BURN); }, TIMEOUT); - it("should still burn the opponent if their stats were both raised and lowered in the same turn", async () => { + it("should still burn the opponent if their stat stages were both raised and lowered in the same turn", async () => { game.override .starterSpecies(0) .battleType("double"); @@ -69,7 +69,7 @@ describe("Moves - Burning Jealousy", () => { expect(enemy.status?.effect).toBe(StatusEffect.BURN); }, TIMEOUT); - it("should ignore stats raised by imposter", async () => { + it("should ignore stat stages raised by IMPOSTER", async () => { game.override .enemySpecies(Species.DITTO) .enemyAbility(Abilities.IMPOSTER) @@ -88,7 +88,7 @@ describe("Moves - Burning Jealousy", () => { await game.classicMode.startBattle(); }, TIMEOUT); - it("should be boosted by Sheer Force even if opponent didn't raise stats", async () => { + it("should be boosted by Sheer Force even if opponent didn't raise stat stages", async () => { game.override .ability(Abilities.SHEER_FORCE) .enemyMoveset(SPLASH_ONLY); diff --git a/src/test/moves/clangorous_soul.test.ts b/src/test/moves/clangorous_soul.test.ts index 9ea6da91595..9bd3bc2379e 100644 --- a/src/test/moves/clangorous_soul.test.ts +++ b/src/test/moves/clangorous_soul.test.ts @@ -1,12 +1,11 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#test/utils/gameManager"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { toDmgValue } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import { Stat } from "#enums/stat"; import { SPLASH_ONLY } from "#test/utils/testUtils"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; const TIMEOUT = 20 * 1000; /** HP Cost of Move */ @@ -14,7 +13,7 @@ const RATIO = 3; /** Amount of extra HP lost */ const PREDAMAGE = 15; -describe("Moves - CLANGOROUS_SOUL", () => { +describe("Moves - Clangorous Soul", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -40,91 +39,91 @@ describe("Moves - CLANGOROUS_SOUL", () => { //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move) - test("Clangorous Soul raises the user's Attack, Defense, Special Attack, Special Defense and Speed by one stage each, at the cost of 1/3 of its maximum HP", - async () => { + it("raises the user's ATK, DEF, SPATK, SPDEF, and SPD stat stages by 1 each at the cost of 1/3 of its maximum HP", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); + const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); game.move.select(Moves.CLANGOROUS_SOUL); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp() - hpLost); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(1); - expect(leadPokemon.summonData.battleStats[BattleStat.DEF]).toBe(1); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(1); - expect(leadPokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(1); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(1); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(1); + expect(leadPokemon.getStatStage(Stat.DEF)).toBe(1); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(1); + expect(leadPokemon.getStatStage(Stat.SPDEF)).toBe(1); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(1); }, TIMEOUT ); - test("Clangorous Soul will still take effect if one or more of the involved stats are not at max", - async () => { + it("will still take effect if one or more of the involved stat stages are not at max", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); + const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); - //Here - BattleStat.SPD -> 0 and BattleStat.SPDEF -> 4 - leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; - leadPokemon.summonData.battleStats[BattleStat.DEF] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPATK] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPDEF] = 4; + //Here - Stat.SPD -> 0 and Stat.SPDEF -> 4 + leadPokemon.setStatStage(Stat.ATK, 6); + leadPokemon.setStatStage(Stat.DEF, 6); + leadPokemon.setStatStage(Stat.SPATK, 6); + leadPokemon.setStatStage(Stat.SPDEF, 4); game.move.select(Moves.CLANGOROUS_SOUL); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp() - hpLost); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.DEF]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(5); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(1); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.DEF)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPDEF)).toBe(5); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(1); }, TIMEOUT ); - test("Clangorous Soul fails if all stats involved are at max", - async () => { + it("fails if all stat stages involved are at max", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; - leadPokemon.summonData.battleStats[BattleStat.DEF] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPATK] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPDEF] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPD] = 6; + leadPokemon.setStatStage(Stat.ATK, 6); + leadPokemon.setStatStage(Stat.DEF, 6); + leadPokemon.setStatStage(Stat.SPATK, 6); + leadPokemon.setStatStage(Stat.SPDEF, 6); + leadPokemon.setStatStage(Stat.SPD, 6); game.move.select(Moves.CLANGOROUS_SOUL); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.DEF]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(6); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.DEF)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPDEF)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(6); }, TIMEOUT ); - test("Clangorous Soul fails if the user's health is less than 1/3", - async () => { + it("fails if the user's health is less than 1/3", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); + const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); leadPokemon.hp = hpLost - PREDAMAGE; game.move.select(Moves.CLANGOROUS_SOUL); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(hpLost - PREDAMAGE); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(leadPokemon.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(0); - expect(leadPokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(0); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(0); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(leadPokemon.getStatStage(Stat.DEF)).toBe(0); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(0); + expect(leadPokemon.getStatStage(Stat.SPDEF)).toBe(0); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(0); }, TIMEOUT ); }); diff --git a/src/test/moves/crafty_shield.test.ts b/src/test/moves/crafty_shield.test.ts index a341a50b0b9..e73a1fd256d 100644 --- a/src/test/moves/crafty_shield.test.ts +++ b/src/test/moves/crafty_shield.test.ts @@ -1,13 +1,13 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { Abilities } from "#enums/abilities"; -import { Moves } from "#enums/moves"; -import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import GameManager from "../utils/gameManager"; +import { Species } from "#enums/species"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { BerryPhase } from "#app/phases/berry-phase"; +import { CommandPhase } from "#app/phases/command-phase"; const TIMEOUT = 20 * 1000; @@ -55,7 +55,7 @@ describe("Moves - Crafty Shield", () => { await game.phaseInterceptor.to(BerryPhase, false); - leadPokemon.forEach(p => expect(p.summonData.battleStats[BattleStat.ATK]).toBe(0)); + leadPokemon.forEach(p => expect(p.getStatStage(Stat.ATK)).toBe(0)); }, TIMEOUT ); @@ -117,8 +117,8 @@ describe("Moves - Crafty Shield", () => { await game.phaseInterceptor.to(BerryPhase, false); - expect(leadPokemon[0].summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(leadPokemon[1].summonData.battleStats[BattleStat.ATK]).toBe(2); + expect(leadPokemon[0].getStatStage(Stat.ATK)).toBe(0); + expect(leadPokemon[1].getStatStage(Stat.ATK)).toBe(2); } ); }); diff --git a/src/test/moves/double_team.test.ts b/src/test/moves/double_team.test.ts index c45c8bd8516..fa224c8df9e 100644 --- a/src/test/moves/double_team.test.ts +++ b/src/test/moves/double_team.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { Abilities } from "#app/enums/abilities"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; @@ -32,20 +32,20 @@ describe("Moves - Double Team", () => { game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); }); - it("increases the user's evasion by one stage.", async () => { + it("raises the user's EVA stat stage by 1", async () => { await game.startBattle([Species.MAGIKARP]); const ally = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; vi.spyOn(enemy, "getAccuracyMultiplier"); - expect(ally.summonData.battleStats[BattleStat.EVA]).toBe(0); + expect(ally.getStatStage(Stat.EVA)).toBe(0); game.move.select(Moves.DOUBLE_TEAM); await game.phaseInterceptor.to(TurnEndPhase); await game.toNextTurn(); - expect(ally.summonData.battleStats[BattleStat.EVA]).toBe(1); + expect(ally.getStatStage(Stat.EVA)).toBe(1); expect(enemy.getAccuracyMultiplier).toHaveReturnedWith(.75); }); }); diff --git a/src/test/moves/dragon_rage.test.ts b/src/test/moves/dragon_rage.test.ts index 223635575ab..5da6e082ce5 100644 --- a/src/test/moves/dragon_rage.test.ts +++ b/src/test/moves/dragon_rage.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { Type } from "#app/data/type"; import { Species } from "#app/enums/species"; import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; @@ -63,9 +63,8 @@ describe("Moves - Dragon Rage", () => { game.move.select(Moves.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); - const damageDealt = enemyPokemon.getMaxHp() - enemyPokemon.hp; - expect(damageDealt).toBe(dragonRageDamage); + expect(enemyPokemon.getInverseHp()).toBe(dragonRageDamage); }); it("ignores resistances", async () => { @@ -74,20 +73,18 @@ describe("Moves - Dragon Rage", () => { game.move.select(Moves.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); - const damageDealt = enemyPokemon.getMaxHp() - enemyPokemon.hp; - expect(damageDealt).toBe(dragonRageDamage); + expect(enemyPokemon.getInverseHp()).toBe(dragonRageDamage); }); - it("ignores stat changes", async () => { + it("ignores SPATK stat stages", async () => { game.override.disableCrits(); - partyPokemon.summonData.battleStats[BattleStat.SPATK] = 2; + partyPokemon.setStatStage(Stat.SPATK, 2); game.move.select(Moves.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); - const damageDealt = enemyPokemon.getMaxHp() - enemyPokemon.hp; - expect(damageDealt).toBe(dragonRageDamage); + expect(enemyPokemon.getInverseHp()).toBe(dragonRageDamage); }); it("ignores stab", async () => { @@ -96,9 +93,8 @@ describe("Moves - Dragon Rage", () => { game.move.select(Moves.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); - const damageDealt = enemyPokemon.getMaxHp() - enemyPokemon.hp; - expect(damageDealt).toBe(dragonRageDamage); + expect(enemyPokemon.getInverseHp()).toBe(dragonRageDamage); }); it("ignores criticals", async () => { @@ -106,20 +102,18 @@ describe("Moves - Dragon Rage", () => { game.move.select(Moves.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); - const damageDealt = enemyPokemon.getMaxHp() - enemyPokemon.hp; - expect(damageDealt).toBe(dragonRageDamage); + expect(enemyPokemon.getInverseHp()).toBe(dragonRageDamage); }); - it("ignores damage modification from abilities such as ice scales", async () => { + it("ignores damage modification from abilities, for example ICE_SCALES", async () => { game.override.disableCrits(); game.override.enemyAbility(Abilities.ICE_SCALES); game.move.select(Moves.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); - const damageDealt = enemyPokemon.getMaxHp() - enemyPokemon.hp; - expect(damageDealt).toBe(dragonRageDamage); + expect(enemyPokemon.getInverseHp()).toBe(dragonRageDamage); }); it("ignores multi hit", async () => { @@ -128,8 +122,7 @@ describe("Moves - Dragon Rage", () => { game.move.select(Moves.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); - const damageDealt = enemyPokemon.getMaxHp() - enemyPokemon.hp; - expect(damageDealt).toBe(dragonRageDamage); + expect(enemyPokemon.getInverseHp()).toBe(dragonRageDamage); }); }); diff --git a/src/test/moves/fillet_away.test.ts b/src/test/moves/fillet_away.test.ts index b2ff9e25dba..a639a86c5c1 100644 --- a/src/test/moves/fillet_away.test.ts +++ b/src/test/moves/fillet_away.test.ts @@ -1,8 +1,8 @@ -import { BattleStat } from "#app/data/battle-stat"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { toDmgValue } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; @@ -40,8 +40,8 @@ describe("Moves - FILLET AWAY", () => { //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move) - test("Fillet Away raises the user's Attack, Special Attack, and Speed by two stages each, at the cost of 1/2 of its maximum HP", - async () => { + test("raises the user's ATK, SPATK, and SPD stat stages by 2 each, at the cost of 1/2 of its maximum HP", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -51,55 +51,55 @@ describe("Moves - FILLET AWAY", () => { await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp() - hpLost); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(2); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(2); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(2); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(2); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(2); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(2); }, TIMEOUT ); - test("Fillet Away will still take effect if one or more of the involved stats are not at max", - async () => { + test("still takes effect if one or more of the involved stat stages are not at max", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); - //Here - BattleStat.SPD -> 0 and BattleStat.SPATK -> 3 - leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPATK] = 3; + //Here - Stat.SPD -> 0 and Stat.SPATK -> 3 + leadPokemon.setStatStage(Stat.ATK, 6); + leadPokemon.setStatStage(Stat.SPATK, 3); game.move.select(Moves.FILLET_AWAY); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp() - hpLost); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(5); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(2); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(5); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(2); }, TIMEOUT ); - test("Fillet Away fails if all stats involved are at max", - async () => { + test("fails if all stat stages involved are at max", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPATK] = 6; - leadPokemon.summonData.battleStats[BattleStat.SPD] = 6; + leadPokemon.setStatStage(Stat.ATK, 6); + leadPokemon.setStatStage(Stat.SPATK, 6); + leadPokemon.setStatStage(Stat.SPD, 6); game.move.select(Moves.FILLET_AWAY); await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(6); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(6); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(6); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(6); }, TIMEOUT ); - test("Fillet Away fails if the user's health is less than 1/2", - async () => { + test("fails if the user's health is less than 1/2", + async() => { await game.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -110,9 +110,9 @@ describe("Moves - FILLET AWAY", () => { await game.phaseInterceptor.to(TurnEndPhase); expect(leadPokemon.hp).toBe(hpLost - PREDAMAGE); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(leadPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(0); - expect(leadPokemon.summonData.battleStats[BattleStat.SPD]).toBe(0); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(leadPokemon.getStatStage(Stat.SPATK)).toBe(0); + expect(leadPokemon.getStatStage(Stat.SPD)).toBe(0); }, TIMEOUT ); }); diff --git a/src/test/moves/fissure.test.ts b/src/test/moves/fissure.test.ts index 51122b269b8..34612d1fb18 100644 --- a/src/test/moves/fissure.test.ts +++ b/src/test/moves/fissure.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { Species } from "#app/enums/species"; import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { DamagePhase } from "#app/phases/damage-phase"; @@ -52,7 +52,7 @@ describe("Moves - Fissure", () => { game.scene.clearEnemyHeldItemModifiers(); }); - it("ignores damage modification from abilities such as fur coat", async () => { + it("ignores damage modification from abilities, for example FUR_COAT", async () => { game.override.ability(Abilities.NO_GUARD); game.override.enemyAbility(Abilities.FUR_COAT); @@ -62,10 +62,10 @@ describe("Moves - Fissure", () => { expect(enemyPokemon.isFainted()).toBe(true); }); - it("ignores accuracy stat", async () => { + it("ignores user's ACC stat stage", async () => { vi.spyOn(partyPokemon, "getAccuracyMultiplier"); - enemyPokemon.summonData.battleStats[BattleStat.ACC] = -6; + partyPokemon.setStatStage(Stat.ACC, -6); game.move.select(Moves.FISSURE); @@ -75,10 +75,10 @@ describe("Moves - Fissure", () => { expect(partyPokemon.getAccuracyMultiplier).toHaveReturnedWith(1); }); - it("ignores evasion stat", async () => { + it("ignores target's EVA stat stage", async () => { vi.spyOn(partyPokemon, "getAccuracyMultiplier"); - enemyPokemon.summonData.battleStats[BattleStat.EVA] = 6; + enemyPokemon.setStatStage(Stat.EVA, 6); game.move.select(Moves.FISSURE); diff --git a/src/test/moves/flower_shield.test.ts b/src/test/moves/flower_shield.test.ts index b3e50219aec..ffe8ae995d3 100644 --- a/src/test/moves/flower_shield.test.ts +++ b/src/test/moves/flower_shield.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { SemiInvulnerableTag } from "#app/data/battler-tags"; import { Type } from "#app/data/type"; import { Biome } from "#app/enums/biome"; @@ -34,24 +34,24 @@ describe("Moves - Flower Shield", () => { game.override.enemyMoveset(SPLASH_ONLY); }); - it("increases defense of all Grass-type Pokemon on the field by one stage - single battle", async () => { + it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - single battle", async () => { game.override.enemySpecies(Species.CHERRIM); await game.startBattle([Species.MAGIKARP]); const cherrim = game.scene.getEnemyPokemon()!; const magikarp = game.scene.getPlayerPokemon()!; - expect(magikarp.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(cherrim.summonData.battleStats[BattleStat.DEF]).toBe(0); + expect(magikarp.getStatStage(Stat.DEF)).toBe(0); + expect(cherrim.getStatStage(Stat.DEF)).toBe(0); game.move.select(Moves.FLOWER_SHIELD); await game.phaseInterceptor.to(TurnEndPhase); - expect(magikarp.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(cherrim.summonData.battleStats[BattleStat.DEF]).toBe(1); + expect(magikarp.getStatStage(Stat.DEF)).toBe(0); + expect(cherrim.getStatStage(Stat.DEF)).toBe(1); }); - it("increases defense of all Grass-type Pokemon on the field by one stage - double battle", async () => { + it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - double battle", async () => { game.override.enemySpecies(Species.MAGIKARP).startingBiome(Biome.GRASS).battleType("double"); await game.startBattle([Species.CHERRIM, Species.MAGIKARP]); @@ -60,21 +60,21 @@ describe("Moves - Flower Shield", () => { const grassPokemons = field.filter(p => p.getTypes().includes(Type.GRASS)); const nonGrassPokemons = field.filter(pokemon => !grassPokemons.includes(pokemon)); - grassPokemons.forEach(p => expect(p.summonData.battleStats[BattleStat.DEF]).toBe(0)); - nonGrassPokemons.forEach(p => expect(p.summonData.battleStats[BattleStat.DEF]).toBe(0)); + grassPokemons.forEach(p => expect(p.getStatStage(Stat.DEF)).toBe(0)); + nonGrassPokemons.forEach(p => expect(p.getStatStage(Stat.DEF)).toBe(0)); game.move.select(Moves.FLOWER_SHIELD); game.move.select(Moves.SPLASH, 1); await game.phaseInterceptor.to(TurnEndPhase); - grassPokemons.forEach(p => expect(p.summonData.battleStats[BattleStat.DEF]).toBe(1)); - nonGrassPokemons.forEach(p => expect(p.summonData.battleStats[BattleStat.DEF]).toBe(0)); + grassPokemons.forEach(p => expect(p.getStatStage(Stat.DEF)).toBe(1)); + nonGrassPokemons.forEach(p => expect(p.getStatStage(Stat.DEF)).toBe(0)); }); /** * See semi-vulnerable state tags. {@linkcode SemiInvulnerableTag} */ - it("does not increase defense of a pokemon in semi-vulnerable state", async () => { + it("does not raise DEF stat stage for a Pokemon in semi-vulnerable state", async () => { game.override.enemySpecies(Species.PARAS); game.override.enemyMoveset([Moves.DIG, Moves.DIG, Moves.DIG, Moves.DIG]); game.override.enemyLevel(50); @@ -83,32 +83,32 @@ describe("Moves - Flower Shield", () => { const paras = game.scene.getEnemyPokemon()!; const cherrim = game.scene.getPlayerPokemon()!; - expect(paras.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(cherrim.summonData.battleStats[BattleStat.DEF]).toBe(0); + expect(paras.getStatStage(Stat.DEF)).toBe(0); + expect(cherrim.getStatStage(Stat.DEF)).toBe(0); expect(paras.getTag(SemiInvulnerableTag)).toBeUndefined; game.move.select(Moves.FLOWER_SHIELD); await game.phaseInterceptor.to(TurnEndPhase); expect(paras.getTag(SemiInvulnerableTag)).toBeDefined(); - expect(paras.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(cherrim.summonData.battleStats[BattleStat.DEF]).toBe(1); + expect(paras.getStatStage(Stat.DEF)).toBe(0); + expect(cherrim.getStatStage(Stat.DEF)).toBe(1); }); - it("does nothing if there are no Grass-type pokemon on the field", async () => { + it("does nothing if there are no Grass-type Pokemon on the field", async () => { game.override.enemySpecies(Species.MAGIKARP); await game.startBattle([Species.MAGIKARP]); const enemy = game.scene.getEnemyPokemon()!; const ally = game.scene.getPlayerPokemon()!; - expect(enemy.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(ally.summonData.battleStats[BattleStat.DEF]).toBe(0); + expect(enemy.getStatStage(Stat.DEF)).toBe(0); + expect(ally.getStatStage(Stat.DEF)).toBe(0); game.move.select(Moves.FLOWER_SHIELD); await game.phaseInterceptor.to(TurnEndPhase); - expect(enemy.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(ally.summonData.battleStats[BattleStat.DEF]).toBe(0); + expect(enemy.getStatStage(Stat.DEF)).toBe(0); + expect(ally.getStatStage(Stat.DEF)).toBe(0); }); }); diff --git a/src/test/moves/follow_me.test.ts b/src/test/moves/follow_me.test.ts index d7ef199df3e..64fc9c16256 100644 --- a/src/test/moves/follow_me.test.ts +++ b/src/test/moves/follow_me.test.ts @@ -1,5 +1,5 @@ +import { Stat } from "#enums/stat"; import { BattlerIndex } from "#app/battle"; -import { Stat } from "#app/data/pokemon-stat"; import { Abilities } from "#app/enums/abilities"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; @@ -66,7 +66,7 @@ describe("Moves - Follow Me", () => { game.move.select(Moves.FOLLOW_ME, 1); await game.phaseInterceptor.to(TurnEndPhase, false); - playerPokemon.sort((a, b) => a.getBattleStat(Stat.SPD) - b.getBattleStat(Stat.SPD)); + playerPokemon.sort((a, b) => a.getEffectiveStat(Stat.SPD) - b.getEffectiveStat(Stat.SPD)); expect(playerPokemon[1].hp).toBeLessThan(playerStartingHp[1]); expect(playerPokemon[0].hp).toBe(playerStartingHp[0]); diff --git a/src/test/moves/freezy_frost.test.ts b/src/test/moves/freezy_frost.test.ts index 00d7104d373..ae42d5b6dc6 100644 --- a/src/test/moves/freezy_frost.test.ts +++ b/src/test/moves/freezy_frost.test.ts @@ -1,82 +1,61 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { allMoves } from "#app/data/move"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import { allMoves } from "#app/data/move"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Freezy Frost", () => { - describe("integration tests", () => { - let phaserGame: Phaser.Game; - let game: GameManager; + let phaserGame: Phaser.Game; + let game: GameManager; - beforeAll(() => { - phaserGame = new Phaser.Game({ type: Phaser.HEADLESS }); - }); + beforeAll(() => { + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS }); + }); - afterEach(() => { - game.phaseInterceptor.restoreOg(); - }); + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); - beforeEach(() => { - game = new GameManager(phaserGame); + beforeEach(() => { + game = new GameManager(phaserGame); - game.override.battleType("single"); + game.override.battleType("single"); - game.override.enemySpecies(Species.RATTATA); - game.override.enemyLevel(100); - game.override.enemyMoveset(SPLASH_ONLY); - game.override.enemyAbility(Abilities.NONE); + game.override.enemySpecies(Species.RATTATA); + game.override.enemyLevel(100); + game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyAbility(Abilities.NONE); - game.override.startingLevel(100); - game.override.moveset([Moves.FREEZY_FROST, Moves.SWORDS_DANCE, Moves.CHARM, Moves.SPLASH]); - vi.spyOn(allMoves[Moves.FREEZY_FROST], "accuracy", "get").mockReturnValue(100); - game.override.ability(Abilities.NONE); - }); + game.override.startingLevel(100); + game.override.moveset([Moves.FREEZY_FROST, Moves.SWORDS_DANCE, Moves.CHARM, Moves.SPLASH]); + vi.spyOn(allMoves[Moves.FREEZY_FROST], "accuracy", "get").mockReturnValue(100); + game.override.ability(Abilities.NONE); + }); - it("Uses Swords Dance to raise own ATK by 2, Charm to lower enemy ATK by 2, player uses Freezy Frost to clear all stat changes", { timeout: 10000 }, async () => { - await game.startBattle([Species.RATTATA]); - const user = game.scene.getPlayerPokemon()!; - const enemy = game.scene.getEnemyPokemon()!; - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(enemy.summonData.battleStats[BattleStat.ATK]).toBe(0); + it("should clear all stat stage changes", { timeout: 10000 }, async () => { + await game.startBattle([Species.RATTATA]); + const user = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; - game.move.select(Moves.SWORDS_DANCE); - await game.phaseInterceptor.to(TurnInitPhase); + expect(user.getStatStage(Stat.ATK)).toBe(0); + expect(enemy.getStatStage(Stat.ATK)).toBe(0); - game.move.select(Moves.CHARM); - await game.phaseInterceptor.to(TurnInitPhase); - const userAtkBefore = user.summonData.battleStats[BattleStat.ATK]; - const enemyAtkBefore = enemy.summonData.battleStats[BattleStat.ATK]; - expect(userAtkBefore).toBe(2); - expect(enemyAtkBefore).toBe(-2); + game.move.select(Moves.SWORDS_DANCE); + await game.phaseInterceptor.to(TurnInitPhase); - game.move.select(Moves.FREEZY_FROST); - await game.phaseInterceptor.to(TurnInitPhase); - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(enemy.summonData.battleStats[BattleStat.ATK]).toBe(0); - }); + game.move.select(Moves.CHARM); + await game.phaseInterceptor.to(TurnInitPhase); + expect(user.getStatStage(Stat.ATK)).toBe(2); + expect(enemy.getStatStage(Stat.ATK)).toBe(-2); - it("Uses Swords Dance to raise own ATK by 2, Charm to lower enemy ATK by 2, enemy uses Freezy Frost to clear all stat changes", { timeout: 10000 }, async () => { - game.override.enemyMoveset([Moves.FREEZY_FROST, Moves.FREEZY_FROST, Moves.FREEZY_FROST, Moves.FREEZY_FROST]); - await game.startBattle([Species.SHUCKLE]); // Shuckle for slower Swords Dance on first turn so Freezy Frost doesn't affect it. - const user = game.scene.getPlayerPokemon()!; - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); - - game.move.select(Moves.SWORDS_DANCE); - await game.phaseInterceptor.to(TurnInitPhase); - - const userAtkBefore = user.summonData.battleStats[BattleStat.ATK]; - expect(userAtkBefore).toBe(2); - - game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(MoveEndPhase); - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); - }); + game.move.select(Moves.FREEZY_FROST); + await game.phaseInterceptor.to(TurnInitPhase); + expect(user.getStatStage(Stat.ATK)).toBe(0); + expect(enemy.getStatStage(Stat.ATK)).toBe(0); }); }); diff --git a/src/test/moves/fusion_flare_bolt.test.ts b/src/test/moves/fusion_flare_bolt.test.ts index ebef5148778..a8372fcaaab 100644 --- a/src/test/moves/fusion_flare_bolt.test.ts +++ b/src/test/moves/fusion_flare_bolt.test.ts @@ -1,6 +1,6 @@ +import { Stat } from "#enums/stat"; import { BattlerIndex } from "#app/battle"; import { allMoves } from "#app/data/move"; -import { Stat } from "#app/data/pokemon-stat"; import { DamagePhase } from "#app/phases/damage-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase"; diff --git a/src/test/moves/growth.test.ts b/src/test/moves/growth.test.ts index dfbf5406351..defe5e26f41 100644 --- a/src/test/moves/growth.test.ts +++ b/src/test/moves/growth.test.ts @@ -1,14 +1,13 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { Stat } from "#app/data/pokemon-stat"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; - +import { SPLASH_ONLY } from "../utils/testUtils"; +import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Growth", () => { let phaserGame: Phaser.Game; @@ -26,31 +25,25 @@ describe("Moves - Growth", () => { beforeEach(() => { game = new GameManager(phaserGame); - const moveToUse = Moves.GROWTH; game.override.battleType("single"); - game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(Abilities.MOXIE); game.override.ability(Abilities.INSOMNIA); - game.override.startingLevel(2000); - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.moveset([ Moves.GROWTH ]); + game.override.enemyMoveset(SPLASH_ONLY); }); - it("GROWTH", async () => { - const moveToUse = Moves.GROWTH; + it("should raise SPATK stat stage by 1", async() => { await game.startBattle([ - Species.MIGHTYENA, - Species.MIGHTYENA, + Species.MIGHTYENA ]); - let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[Stat.SPATK]).toBe(0); - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(0); + const playerPokemon = game.scene.getPlayerPokemon()!; - game.move.select(moveToUse); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(0); + + game.move.select(Moves.GROWTH); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase); - battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats; - expect(battleStatsPokemon[BattleStat.SPATK]).toBe(1); + + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); }, 20000); }); diff --git a/src/test/moves/guard_split.test.ts b/src/test/moves/guard_split.test.ts new file mode 100644 index 00000000000..f95d09f726c --- /dev/null +++ b/src/test/moves/guard_split.test.ts @@ -0,0 +1,82 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#app/test/utils/gameManager"; +import { Species } from "#enums/species"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +describe("Moves - Guard Split", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.NONE) + .enemySpecies(Species.MEW) + .enemyLevel(200) + .moveset([ Moves.GUARD_SPLIT ]) + .ability(Abilities.NONE); + }); + + it("should average the user's DEF and SPDEF stats with those of the target", async () => { + game.override.enemyMoveset(SPLASH_ONLY); + await game.startBattle([ + Species.INDEEDEE + ]); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + const avgDef = Math.floor((player.getStat(Stat.DEF, false) + enemy.getStat(Stat.DEF, false)) / 2); + const avgSpDef = Math.floor((player.getStat(Stat.SPDEF, false) + enemy.getStat(Stat.SPDEF, false)) / 2); + + game.move.select(Moves.GUARD_SPLIT); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStat(Stat.DEF, false)).toBe(avgDef); + expect(enemy.getStat(Stat.DEF, false)).toBe(avgDef); + + expect(player.getStat(Stat.SPDEF, false)).toBe(avgSpDef); + expect(enemy.getStat(Stat.SPDEF, false)).toBe(avgSpDef); + }, 20000); + + it("should be idempotent", async () => { + game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT)); + await game.startBattle([ + Species.INDEEDEE + ]); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + const avgDef = Math.floor((player.getStat(Stat.DEF, false) + enemy.getStat(Stat.DEF, false)) / 2); + const avgSpDef = Math.floor((player.getStat(Stat.SPDEF, false) + enemy.getStat(Stat.SPDEF, false)) / 2); + + game.move.select(Moves.GUARD_SPLIT); + await game.phaseInterceptor.to(TurnEndPhase); + + game.move.select(Moves.GUARD_SPLIT); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStat(Stat.DEF, false)).toBe(avgDef); + expect(enemy.getStat(Stat.DEF, false)).toBe(avgDef); + + expect(player.getStat(Stat.SPDEF, false)).toBe(avgSpDef); + expect(enemy.getStat(Stat.SPDEF, false)).toBe(avgSpDef); + }, 20000); +}); diff --git a/src/test/moves/guard_swap.test.ts b/src/test/moves/guard_swap.test.ts new file mode 100644 index 00000000000..407d475de09 --- /dev/null +++ b/src/test/moves/guard_swap.test.ts @@ -0,0 +1,63 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#app/test/utils/gameManager"; +import { Species } from "#enums/species"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { MoveEndPhase } from "#app/phases/move-end-phase"; + +describe("Moves - Guard Swap", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH)) + .enemySpecies(Species.MEW) + .enemyLevel(200) + .moveset([ Moves.GUARD_SWAP ]) + .ability(Abilities.NONE); + }); + + it("should swap the user's DEF AND SPDEF stat stages with the target's", async () => { + await game.startBattle([ + Species.INDEEDEE + ]); + + // Should start with no stat stages + const player = game.scene.getPlayerPokemon()!; + // After Shell Smash, should have +2 in ATK and SPATK, -1 in DEF and SPDEF + const enemy = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.GUARD_SWAP); + + await game.phaseInterceptor.to(MoveEndPhase); + + expect(player.getStatStage(Stat.DEF)).toBe(0); + expect(player.getStatStage(Stat.SPDEF)).toBe(0); + expect(enemy.getStatStage(Stat.DEF)).toBe(-1); + expect(enemy.getStatStage(Stat.SPDEF)).toBe(-1); + + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStatStage(Stat.DEF)).toBe(-1); + expect(player.getStatStage(Stat.SPDEF)).toBe(-1); + expect(enemy.getStatStage(Stat.DEF)).toBe(0); + expect(enemy.getStatStage(Stat.SPDEF)).toBe(0); + }, 20000); +}); diff --git a/src/test/moves/haze.test.ts b/src/test/moves/haze.test.ts index 8a32a40cb32..42081ce74e8 100644 --- a/src/test/moves/haze.test.ts +++ b/src/test/moves/haze.test.ts @@ -1,13 +1,12 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Haze", () => { describe("integration tests", () => { @@ -37,44 +36,28 @@ describe("Moves - Haze", () => { game.override.ability(Abilities.NONE); }); - it("Uses Swords Dance to raise own ATK by 2, Charm to lower enemy ATK by 2, player uses Haze to clear all stat changes", { timeout: 10000 }, async () => { + it("should reset all stat changes of all Pokemon on field", { timeout: 10000 }, async () => { await game.startBattle([Species.RATTATA]); const user = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(enemy.summonData.battleStats[BattleStat.ATK]).toBe(0); + + expect(user.getStatStage(Stat.ATK)).toBe(0); + expect(enemy.getStatStage(Stat.ATK)).toBe(0); game.move.select(Moves.SWORDS_DANCE); await game.phaseInterceptor.to(TurnInitPhase); game.move.select(Moves.CHARM); await game.phaseInterceptor.to(TurnInitPhase); - const userAtkBefore = user.summonData.battleStats[BattleStat.ATK]; - const enemyAtkBefore = enemy.summonData.battleStats[BattleStat.ATK]; - expect(userAtkBefore).toBe(2); - expect(enemyAtkBefore).toBe(-2); + + expect(user.getStatStage(Stat.ATK)).toBe(2); + expect(enemy.getStatStage(Stat.ATK)).toBe(-2); game.move.select(Moves.HAZE); await game.phaseInterceptor.to(TurnInitPhase); - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); - expect(enemy.summonData.battleStats[BattleStat.ATK]).toBe(0); - }); - it("Uses Swords Dance to raise own ATK by 2, Charm to lower enemy ATK by 2, enemy uses Haze to clear all stat changes", { timeout: 10000 }, async () => { - game.override.enemyMoveset([Moves.HAZE, Moves.HAZE, Moves.HAZE, Moves.HAZE]); - await game.startBattle([Species.SHUCKLE]); // Shuckle for slower Swords Dance on first turn so Haze doesn't affect it. - const user = game.scene.getPlayerPokemon()!; - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); - - game.move.select(Moves.SWORDS_DANCE); - await game.phaseInterceptor.to(TurnInitPhase); - - const userAtkBefore = user.summonData.battleStats[BattleStat.ATK]; - expect(userAtkBefore).toBe(2); - - game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(MoveEndPhase); - expect(user.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(user.getStatStage(Stat.ATK)).toBe(0); + expect(enemy.getStatStage(Stat.ATK)).toBe(0); }); }); }); diff --git a/src/test/moves/lash_out.test.ts b/src/test/moves/lash_out.test.ts index 78f4b712cf0..74d9fcd66c0 100644 --- a/src/test/moves/lash_out.test.ts +++ b/src/test/moves/lash_out.test.ts @@ -39,7 +39,7 @@ describe("Moves - Lash Out", () => { }); - it("should deal double damage if the user's stats were lowered this turn", async () => { + it("should deal double damage if the user's stat stages were lowered this turn", async () => { vi.spyOn(allMoves[Moves.LASH_OUT], "calculateBattlePower"); await game.classicMode.startBattle(); diff --git a/src/test/moves/make_it_rain.test.ts b/src/test/moves/make_it_rain.test.ts index 0af7763f175..e41472d7561 100644 --- a/src/test/moves/make_it_rain.test.ts +++ b/src/test/moves/make_it_rain.test.ts @@ -1,13 +1,13 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { StatChangePhase } from "#app/phases/stat-change-phase"; +import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import { MoveEndPhase } from "#app/phases/move-end-phase"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; const TIMEOUT = 20 * 1000; @@ -36,17 +36,17 @@ describe("Moves - Make It Rain", () => { game.override.enemyLevel(100); }); - it("should only reduce Sp. Atk. once in a double battle", async () => { + it("should only lower SPATK stat stage by 1 once in a double battle", async () => { await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); - const playerPokemon = game.scene.getPlayerField(); + const playerPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.MAKE_IT_RAIN); game.move.select(Moves.SPLASH, 1); await game.phaseInterceptor.to(MoveEndPhase); - expect(playerPokemon[0].summonData.battleStats[BattleStat.SPATK]).toBe(-1); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(-1); }, TIMEOUT); it("should apply effects even if the target faints", async () => { @@ -60,10 +60,10 @@ describe("Moves - Make It Rain", () => { game.move.select(Moves.MAKE_IT_RAIN); - await game.phaseInterceptor.to(StatChangePhase); + await game.phaseInterceptor.to(StatStageChangePhase); expect(enemyPokemon.isFainted()).toBe(true); - expect(playerPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(-1); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(-1); }, TIMEOUT); it("should reduce Sp. Atk. once after KOing two enemies", async () => { @@ -71,22 +71,22 @@ describe("Moves - Make It Rain", () => { await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); - const playerPokemon = game.scene.getPlayerField(); + const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyField(); game.move.select(Moves.MAKE_IT_RAIN); game.move.select(Moves.SPLASH, 1); - await game.phaseInterceptor.to(StatChangePhase); + await game.phaseInterceptor.to(StatStageChangePhase); enemyPokemon.forEach(p => expect(p.isFainted()).toBe(true)); - expect(playerPokemon[0].summonData.battleStats[BattleStat.SPATK]).toBe(-1); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(-1); }, TIMEOUT); - it("should reduce Sp. Atk if it only hits the second target", async () => { + it("should lower SPATK stat stage by 1 if it only hits the second target", async () => { await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); - const playerPokemon = game.scene.getPlayerField(); + const playerPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.MAKE_IT_RAIN); game.move.select(Moves.SPLASH, 1); @@ -96,6 +96,6 @@ describe("Moves - Make It Rain", () => { await game.phaseInterceptor.to(MoveEndPhase); - expect(playerPokemon[0].summonData.battleStats[BattleStat.SPATK]).toBe(-1); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(-1); }, TIMEOUT); }); diff --git a/src/test/moves/mat_block.test.ts b/src/test/moves/mat_block.test.ts index 29a97806242..4a95985eb92 100644 --- a/src/test/moves/mat_block.test.ts +++ b/src/test/moves/mat_block.test.ts @@ -1,13 +1,13 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { Abilities } from "#enums/abilities"; -import { Moves } from "#enums/moves"; -import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import GameManager from "../utils/gameManager"; +import { Species } from "#enums/species"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { BerryPhase } from "#app/phases/berry-phase"; +import { CommandPhase } from "#app/phases/command-phase"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; const TIMEOUT = 20 * 1000; @@ -76,7 +76,7 @@ describe("Moves - Mat Block", () => { await game.phaseInterceptor.to(BerryPhase, false); - leadPokemon.forEach(p => expect(p.summonData.battleStats[BattleStat.ATK]).toBe(-2)); + leadPokemon.forEach(p => expect(p.getStatStage(Stat.ATK)).toBe(-2)); }, TIMEOUT ); diff --git a/src/test/moves/octolock.test.ts b/src/test/moves/octolock.test.ts index 34dad13b0d9..c86906ea240 100644 --- a/src/test/moves/octolock.test.ts +++ b/src/test/moves/octolock.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { TrappedTag } from "#app/data/battler-tags"; import { CommandPhase } from "#app/phases/command-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase"; @@ -12,110 +12,106 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Octolock", () => { - describe("integration tests", () => { - let phaserGame: Phaser.Game; - let game: GameManager; + let phaserGame: Phaser.Game; + let game: GameManager; - beforeAll(() => { - phaserGame = new Phaser.Game({ - type: Phaser.HEADLESS, - }); - }); - - afterEach(() => { - game.phaseInterceptor.restoreOg(); - }); - - beforeEach(() => { - game = new GameManager(phaserGame); - - game.override.battleType("single"); - - game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset(SPLASH_ONLY); - game.override.enemyAbility(Abilities.BALL_FETCH); - - game.override.startingLevel(2000); - game.override.moveset([Moves.OCTOLOCK, Moves.SPLASH]); - game.override.ability(Abilities.BALL_FETCH); - }); - - it("Reduces DEf and SPDEF by 1 each turn", { timeout: 10000 }, async () => { - await game.startBattle([Species.GRAPPLOCT]); - - const enemyPokemon = game.scene.getEnemyField(); - - // use Octolock and advance to init phase of next turn to check for stat changes - game.move.select(Moves.OCTOLOCK); - await game.phaseInterceptor.to(TurnInitPhase); - - expect(enemyPokemon[0].summonData.battleStats[BattleStat.DEF]).toBe(-1); - expect(enemyPokemon[0].summonData.battleStats[BattleStat.SPDEF]).toBe(-1); - - // take a second turn to make sure stat changes occur again - await game.phaseInterceptor.to(CommandPhase); - game.move.select(Moves.SPLASH); - - await game.phaseInterceptor.to(TurnInitPhase); - expect(enemyPokemon[0].summonData.battleStats[BattleStat.DEF]).toBe(-2); - expect(enemyPokemon[0].summonData.battleStats[BattleStat.SPDEF]).toBe(-2); - }); - - it("If target pokemon has Big Pecks, Octolock should only reduce spdef by 1", { timeout: 10000 }, async () => { - game.override.enemyAbility(Abilities.BIG_PECKS); - await game.startBattle([Species.GRAPPLOCT]); - - const enemyPokemon = game.scene.getEnemyField(); - - // use Octolock and advance to init phase of next turn to check for stat changes - game.move.select(Moves.OCTOLOCK); - await game.phaseInterceptor.to(TurnInitPhase); - - expect(enemyPokemon[0].summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(enemyPokemon[0].summonData.battleStats[BattleStat.SPDEF]).toBe(-1); - }); - - it("If target pokemon has White Smoke, Octolock should not reduce any stats", { timeout: 10000 }, async () => { - game.override.enemyAbility(Abilities.WHITE_SMOKE); - await game.startBattle([Species.GRAPPLOCT]); - - const enemyPokemon = game.scene.getEnemyField(); - - // use Octolock and advance to init phase of next turn to check for stat changes - game.move.select(Moves.OCTOLOCK); - await game.phaseInterceptor.to(TurnInitPhase); - - expect(enemyPokemon[0].summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(enemyPokemon[0].summonData.battleStats[BattleStat.SPDEF]).toBe(0); - }); - - it("If target pokemon has Clear Body, Octolock should not reduce any stats", { timeout: 10000 }, async () => { - game.override.enemyAbility(Abilities.CLEAR_BODY); - await game.startBattle([Species.GRAPPLOCT]); - - const enemyPokemon = game.scene.getEnemyField(); - - // use Octolock and advance to init phase of next turn to check for stat changes - game.move.select(Moves.OCTOLOCK); - await game.phaseInterceptor.to(TurnInitPhase); - - expect(enemyPokemon[0].summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(enemyPokemon[0].summonData.battleStats[BattleStat.SPDEF]).toBe(0); - }); - - it("Traps the target pokemon", { timeout: 10000 }, async () => { - await game.startBattle([Species.GRAPPLOCT]); - - const enemyPokemon = game.scene.getEnemyField(); - - // before Octolock - enemy should not be trapped - expect(enemyPokemon[0].findTag(t => t instanceof TrappedTag)).toBeUndefined(); - - game.move.select(Moves.OCTOLOCK); - - // after Octolock - enemy should be trapped - await game.phaseInterceptor.to(MoveEndPhase); - expect(enemyPokemon[0].findTag(t => t instanceof TrappedTag)).toBeDefined(); + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, }); }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + + game.override.battleType("single") + .enemySpecies(Species.RATTATA) + .enemyMoveset(SPLASH_ONLY) + .enemyAbility(Abilities.BALL_FETCH) + .startingLevel(2000) + .moveset([ Moves.OCTOLOCK, Moves.SPLASH ]) + .ability(Abilities.BALL_FETCH); + }); + + it("lowers DEF and SPDEF stat stages of the target Pokemon by 1 each turn", { timeout: 10000 }, async () => { + await game.classicMode.startBattle([ Species.GRAPPLOCT ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + // use Octolock and advance to init phase of next turn to check for stat changes + game.move.select(Moves.OCTOLOCK); + await game.phaseInterceptor.to(TurnInitPhase); + + expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(-1); + expect(enemyPokemon.getStatStage(Stat.SPDEF)).toBe(-1); + + // take a second turn to make sure stat changes occur again + await game.phaseInterceptor.to(CommandPhase); + game.move.select(Moves.SPLASH); + + await game.phaseInterceptor.to(TurnInitPhase); + expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(-2); + expect(enemyPokemon.getStatStage(Stat.SPDEF)).toBe(-2); + }); + + it("if target pokemon has BIG_PECKS, should only lower SPDEF stat stage by 1", { timeout: 10000 }, async () => { + game.override.enemyAbility(Abilities.BIG_PECKS); + await game.classicMode.startBattle([ Species.GRAPPLOCT ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + // use Octolock and advance to init phase of next turn to check for stat changes + game.move.select(Moves.OCTOLOCK); + await game.phaseInterceptor.to(TurnInitPhase); + + expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPDEF)).toBe(-1); + }); + + it("if target pokemon has WHITE_SMOKE, should not reduce any stat stages", { timeout: 10000 }, async () => { + game.override.enemyAbility(Abilities.WHITE_SMOKE); + await game.classicMode.startBattle([ Species.GRAPPLOCT ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + // use Octolock and advance to init phase of next turn to check for stat changes + game.move.select(Moves.OCTOLOCK); + await game.phaseInterceptor.to(TurnInitPhase); + + expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPDEF)).toBe(0); + }); + + it("if target pokemon has CLEAR_BODY, should not reduce any stat stages", { timeout: 10000 }, async () => { + game.override.enemyAbility(Abilities.CLEAR_BODY); + await game.classicMode.startBattle([ Species.GRAPPLOCT ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + // use Octolock and advance to init phase of next turn to check for stat changes + game.move.select(Moves.OCTOLOCK); + await game.phaseInterceptor.to(TurnInitPhase); + + expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPDEF)).toBe(0); + }); + + it("traps the target pokemon", { timeout: 10000 }, async () => { + await game.classicMode.startBattle([ Species.GRAPPLOCT ]); + + const enemyPokemon = game.scene.getEnemyPokemon()!; + + // before Octolock - enemy should not be trapped + expect(enemyPokemon.findTag(t => t instanceof TrappedTag)).toBeUndefined(); + + game.move.select(Moves.OCTOLOCK); + + // after Octolock - enemy should be trapped + await game.phaseInterceptor.to(MoveEndPhase); + expect(enemyPokemon.findTag(t => t instanceof TrappedTag)).toBeDefined(); + }); }); diff --git a/src/test/moves/parting_shot.test.ts b/src/test/moves/parting_shot.test.ts index 7c2ca3f334c..d9535ca6482 100644 --- a/src/test/moves/parting_shot.test.ts +++ b/src/test/moves/parting_shot.test.ts @@ -1,14 +1,14 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { FaintPhase } from "#app/phases/faint-phase"; -import { MessagePhase } from "#app/phases/message-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, test } from "vitest"; import GameManager from "../utils/gameManager"; +import { Stat } from "#enums/stat"; +import { BerryPhase } from "#app/phases/berry-phase"; +import { FaintPhase } from "#app/phases/faint-phase"; +import { MessagePhase } from "#app/phases/message-phase"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -51,9 +51,8 @@ describe("Moves - Parting Shot", () => { game.move.select(Moves.PARTING_SHOT); await game.phaseInterceptor.to(BerryPhase, false); - const battleStatsOpponent = enemyPokemon.summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(0); expect(game.scene.getPlayerField()[0].species.speciesId).toBe(Species.MURKROW); }, TIMEOUT ); @@ -72,9 +71,8 @@ describe("Moves - Parting Shot", () => { game.move.select(Moves.PARTING_SHOT); await game.phaseInterceptor.to(BerryPhase, false); - const battleStatsOpponent = enemyPokemon.summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(0); expect(game.scene.getPlayerField()[0].species.speciesId).toBe(Species.MURKROW); }, TIMEOUT ); @@ -108,16 +106,15 @@ describe("Moves - Parting Shot", () => { const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon).toBeDefined(); - const battleStatsOpponent = enemyPokemon.summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-6); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(-6); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-6); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(-6); // now parting shot should fail game.move.select(Moves.PARTING_SHOT); await game.phaseInterceptor.to(BerryPhase, false); - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-6); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(-6); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-6); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(-6); expect(game.scene.getPlayerField()[0].species.speciesId).toBe(Species.MURKROW); }, TIMEOUT ); @@ -137,9 +134,8 @@ describe("Moves - Parting Shot", () => { game.move.select(Moves.PARTING_SHOT); await game.phaseInterceptor.to(BerryPhase, false); - const battleStatsOpponent = enemyPokemon.summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(0); expect(game.scene.getPlayerField()[0].species.speciesId).toBe(Species.MURKROW); }, TIMEOUT ); @@ -158,9 +154,8 @@ describe("Moves - Parting Shot", () => { game.move.select(Moves.PARTING_SHOT); await game.phaseInterceptor.to(BerryPhase, false); - const battleStatsOpponent = enemyPokemon.summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(0); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(0); expect(game.scene.getPlayerField()[0].species.speciesId).toBe(Species.MURKROW); }, TIMEOUT ); @@ -176,9 +171,8 @@ describe("Moves - Parting Shot", () => { game.move.select(Moves.PARTING_SHOT); await game.phaseInterceptor.to(BerryPhase, false); - const battleStatsOpponent = enemyPokemon.summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(-1); + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(-1); expect(game.scene.getPlayerField()[0].species.speciesId).toBe(Species.MURKROW); }, TIMEOUT ); @@ -199,9 +193,9 @@ describe("Moves - Parting Shot", () => { game.move.select(Moves.PARTING_SHOT); await game.phaseInterceptor.to(BerryPhase, false); - const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.ATK]).toBe(0); - expect(battleStatsOpponent[BattleStat.SPATK]).toBe(0); + const enemyPokemon = game.scene.getEnemyPokemon()!; + expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(0); expect(game.scene.getPlayerField()[0].species.speciesId).toBe(Species.MEOWTH); }, TIMEOUT ); diff --git a/src/test/moves/power_split.test.ts b/src/test/moves/power_split.test.ts new file mode 100644 index 00000000000..a532a90a54d --- /dev/null +++ b/src/test/moves/power_split.test.ts @@ -0,0 +1,82 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#app/test/utils/gameManager"; +import { Species } from "#enums/species"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +describe("Moves - Power Split", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.NONE) + .enemySpecies(Species.MEW) + .enemyLevel(200) + .moveset([ Moves.POWER_SPLIT ]) + .ability(Abilities.NONE); + }); + + it("should average the user's ATK and SPATK stats with those of the target", async () => { + game.override.enemyMoveset(SPLASH_ONLY); + await game.startBattle([ + Species.INDEEDEE + ]); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + const avgAtk = Math.floor((player.getStat(Stat.ATK, false) + enemy.getStat(Stat.ATK, false)) / 2); + const avgSpAtk = Math.floor((player.getStat(Stat.SPATK, false) + enemy.getStat(Stat.SPATK, false)) / 2); + + game.move.select(Moves.POWER_SPLIT); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStat(Stat.ATK, false)).toBe(avgAtk); + expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk); + + expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + }, 20000); + + it("should be idempotent", async () => { + game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT)); + await game.startBattle([ + Species.INDEEDEE + ]); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + const avgAtk = Math.floor((player.getStat(Stat.ATK, false) + enemy.getStat(Stat.ATK, false)) / 2); + const avgSpAtk = Math.floor((player.getStat(Stat.SPATK, false) + enemy.getStat(Stat.SPATK, false)) / 2); + + game.move.select(Moves.POWER_SPLIT); + await game.phaseInterceptor.to(TurnEndPhase); + + game.move.select(Moves.POWER_SPLIT); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStat(Stat.ATK, false)).toBe(avgAtk); + expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk); + + expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + }, 20000); +}); diff --git a/src/test/moves/power_swap.test.ts b/src/test/moves/power_swap.test.ts new file mode 100644 index 00000000000..f1efeaa3af3 --- /dev/null +++ b/src/test/moves/power_swap.test.ts @@ -0,0 +1,62 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#app/test/utils/gameManager"; +import { Species } from "#enums/species"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { MoveEndPhase } from "#app/phases/move-end-phase"; + +describe("Moves - Power Swap", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH)) + .enemySpecies(Species.MEW) + .enemyLevel(200) + .moveset([ Moves.POWER_SWAP ]) + .ability(Abilities.NONE); + }); + + it("should swap the user's ATK AND SPATK stat stages with the target's", async () => { + await game.startBattle([ + Species.INDEEDEE + ]); + + // Should start with no stat stages + const player = game.scene.getPlayerPokemon()!; + // After Shell Smash, should have +2 in ATK and SPATK, -1 in DEF and SPDEF + const enemy = game.scene.getEnemyPokemon()!; + game.move.select(Moves.POWER_SWAP); + + await game.phaseInterceptor.to(MoveEndPhase); + + expect(player.getStatStage(Stat.ATK)).toBe(0); + expect(player.getStatStage(Stat.SPATK)).toBe(0); + expect(enemy.getStatStage(Stat.ATK)).toBe(2); + expect(enemy.getStatStage(Stat.SPATK)).toBe(2); + + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStatStage(Stat.ATK)).toBe(2); + expect(player.getStatStage(Stat.SPATK)).toBe(2); + expect(enemy.getStatStage(Stat.ATK)).toBe(0); + expect(enemy.getStatStage(Stat.SPATK)).toBe(0); + }, 20000); +}); diff --git a/src/test/moves/protect.test.ts b/src/test/moves/protect.test.ts index 3fd51f4bc93..d792f586a37 100644 --- a/src/test/moves/protect.test.ts +++ b/src/test/moves/protect.test.ts @@ -1,13 +1,13 @@ -import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; -import { BattleStat } from "#app/data/battle-stat"; -import { allMoves } from "#app/data/move"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { Abilities } from "#enums/abilities"; -import { Moves } from "#enums/moves"; -import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import GameManager from "../utils/gameManager"; +import { Species } from "#enums/species"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { allMoves } from "#app/data/move"; +import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; +import { BerryPhase } from "#app/phases/berry-phase"; const TIMEOUT = 20 * 1000; @@ -87,7 +87,7 @@ describe("Moves - Protect", () => { await game.phaseInterceptor.to(BerryPhase, false); - expect(leadPokemon.summonData.battleStats[BattleStat.ATK]).toBe(0); + expect(leadPokemon.getStatStage(Stat.ATK)).toBe(0); }, TIMEOUT ); diff --git a/src/test/moves/quick_guard.test.ts b/src/test/moves/quick_guard.test.ts index 26d9a74e9fd..25f98f8fa61 100644 --- a/src/test/moves/quick_guard.test.ts +++ b/src/test/moves/quick_guard.test.ts @@ -1,12 +1,12 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { Abilities } from "#enums/abilities"; -import { Moves } from "#enums/moves"; -import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import GameManager from "../utils/gameManager"; +import { Species } from "#enums/species"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { BerryPhase } from "#app/phases/berry-phase"; +import { CommandPhase } from "#app/phases/command-phase"; const TIMEOUT = 20 * 1000; @@ -76,7 +76,7 @@ describe("Moves - Quick Guard", () => { await game.phaseInterceptor.to(BerryPhase, false); - leadPokemon.forEach(p => expect(p.summonData.battleStats[BattleStat.ATK]).toBe(0)); + leadPokemon.forEach(p => expect(p.getStatStage(Stat.ATK)).toBe(0)); }, TIMEOUT ); diff --git a/src/test/moves/speed_swap.test.ts b/src/test/moves/speed_swap.test.ts new file mode 100644 index 00000000000..131d506792b --- /dev/null +++ b/src/test/moves/speed_swap.test.ts @@ -0,0 +1,54 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#app/test/utils/gameManager"; +import { Species } from "#enums/species"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +describe("Moves - Speed Swap", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.NONE) + .enemyMoveset(SPLASH_ONLY) + .enemySpecies(Species.MEW) + .enemyLevel(200) + .moveset([ Moves.SPEED_SWAP ]) + .ability(Abilities.NONE); + }); + + it("should swap the user's SPD and the target's SPD stats", async () => { + await game.startBattle([ + Species.INDEEDEE + ]); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + const playerSpd = player.getStat(Stat.SPD, false); + const enemySpd = enemy.getStat(Stat.SPD, false); + + game.move.select(Moves.SPEED_SWAP); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStat(Stat.SPD, false)).toBe(enemySpd); + expect(enemy.getStat(Stat.SPD, false)).toBe(playerSpd); + }, 20000); +}); diff --git a/src/test/moves/spit_up.test.ts b/src/test/moves/spit_up.test.ts index ab47e65d653..f88791efb74 100644 --- a/src/test/moves/spit_up.test.ts +++ b/src/test/moves/spit_up.test.ts @@ -1,22 +1,24 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { StockpilingTag } from "#app/data/battler-tags"; import { allMoves } from "#app/data/move"; import { BattlerTagType } from "#app/enums/battler-tag-type"; import { MoveResult, TurnMove } from "#app/field/pokemon"; -import { MovePhase } from "#app/phases/move-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import { MovePhase } from "#app/phases/move-phase"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Spit Up", () => { let phaserGame: Phaser.Game; let game: GameManager; + const spitUp = allMoves[Moves.SPIT_UP]; + beforeAll(() => { phaserGame = new Phaser.Game({ type: Phaser.HEADLESS }); }); @@ -35,8 +37,10 @@ describe("Moves - Spit Up", () => { game.override.enemyAbility(Abilities.NONE); game.override.enemyLevel(2000); - game.override.moveset([Moves.SPIT_UP, Moves.SPIT_UP, Moves.SPIT_UP, Moves.SPIT_UP]); + game.override.moveset(new Array(4).fill(spitUp.id)); game.override.ability(Abilities.NONE); + + vi.spyOn(spitUp, "calculateBattlePower"); }); describe("consumes all stockpile stacks to deal damage (scaling with stacks)", () => { @@ -53,13 +57,11 @@ describe("Moves - Spit Up", () => { expect(stockpilingTag).toBeDefined(); expect(stockpilingTag.stockpiledCount).toBe(stacksToSetup); - vi.spyOn(allMoves[Moves.SPIT_UP], "calculateBattlePower"); - game.move.select(Moves.SPIT_UP); await game.phaseInterceptor.to(TurnInitPhase); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveBeenCalledOnce(); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveReturnedWith(expectedPower); + expect(spitUp.calculateBattlePower).toHaveBeenCalledOnce(); + expect(spitUp.calculateBattlePower).toHaveReturnedWith(expectedPower); expect(pokemon.getTag(StockpilingTag)).toBeUndefined(); }); @@ -78,13 +80,11 @@ describe("Moves - Spit Up", () => { expect(stockpilingTag).toBeDefined(); expect(stockpilingTag.stockpiledCount).toBe(stacksToSetup); - vi.spyOn(allMoves[Moves.SPIT_UP], "calculateBattlePower"); - game.move.select(Moves.SPIT_UP); await game.phaseInterceptor.to(TurnInitPhase); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveBeenCalledOnce(); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveReturnedWith(expectedPower); + expect(spitUp.calculateBattlePower).toHaveBeenCalledOnce(); + expect(spitUp.calculateBattlePower).toHaveReturnedWith(expectedPower); expect(pokemon.getTag(StockpilingTag)).toBeUndefined(); }); @@ -104,13 +104,11 @@ describe("Moves - Spit Up", () => { expect(stockpilingTag).toBeDefined(); expect(stockpilingTag.stockpiledCount).toBe(stacksToSetup); - vi.spyOn(allMoves[Moves.SPIT_UP], "calculateBattlePower"); - game.move.select(Moves.SPIT_UP); await game.phaseInterceptor.to(TurnInitPhase); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveBeenCalledOnce(); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveReturnedWith(expectedPower); + expect(spitUp.calculateBattlePower).toHaveBeenCalledOnce(); + expect(spitUp.calculateBattlePower).toHaveReturnedWith(expectedPower); expect(pokemon.getTag(StockpilingTag)).toBeUndefined(); }); @@ -124,14 +122,12 @@ describe("Moves - Spit Up", () => { const stockpilingTag = pokemon.getTag(StockpilingTag)!; expect(stockpilingTag).toBeUndefined(); - vi.spyOn(allMoves[Moves.SPIT_UP], "calculateBattlePower"); - game.move.select(Moves.SPIT_UP); await game.phaseInterceptor.to(TurnInitPhase); expect(pokemon.getMoveHistory().at(-1)).toMatchObject({ move: Moves.SPIT_UP, result: MoveResult.FAIL }); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).not.toHaveBeenCalled(); + expect(spitUp.calculateBattlePower).not.toHaveBeenCalled(); }); describe("restores stat boosts granted by stacks", () => { @@ -144,22 +140,20 @@ describe("Moves - Spit Up", () => { const stockpilingTag = pokemon.getTag(StockpilingTag)!; expect(stockpilingTag).toBeDefined(); - vi.spyOn(allMoves[Moves.SPIT_UP], "calculateBattlePower"); - game.move.select(Moves.SPIT_UP); await game.phaseInterceptor.to(MovePhase); - expect(pokemon.summonData.battleStats[BattleStat.DEF]).toBe(1); - expect(pokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(1); + expect(pokemon.getStatStage(Stat.DEF)).toBe(1); + expect(pokemon.getStatStage(Stat.SPDEF)).toBe(1); await game.phaseInterceptor.to(TurnInitPhase); expect(pokemon.getMoveHistory().at(-1)).toMatchObject({ move: Moves.SPIT_UP, result: MoveResult.SUCCESS }); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveBeenCalledOnce(); + expect(spitUp.calculateBattlePower).toHaveBeenCalledOnce(); - expect(pokemon.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(pokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(0); + expect(pokemon.getStatStage(Stat.DEF)).toBe(0); + expect(pokemon.getStatStage(Stat.SPDEF)).toBe(0); expect(pokemon.getTag(StockpilingTag)).toBeUndefined(); }); @@ -175,26 +169,19 @@ describe("Moves - Spit Up", () => { // for the sake of simplicity (and because other tests cover the setup), set boost amounts directly stockpilingTag.statChangeCounts = { - [BattleStat.DEF]: -1, - [BattleStat.SPDEF]: 2, + [Stat.DEF]: -1, + [Stat.SPDEF]: 2, }; - expect(stockpilingTag.statChangeCounts).toMatchObject({ - [BattleStat.DEF]: -1, - [BattleStat.SPDEF]: 2, - }); - - vi.spyOn(allMoves[Moves.SPIT_UP], "calculateBattlePower"); - game.move.select(Moves.SPIT_UP); await game.phaseInterceptor.to(TurnInitPhase); expect(pokemon.getMoveHistory().at(-1)).toMatchObject({ move: Moves.SPIT_UP, result: MoveResult.SUCCESS }); - expect(allMoves[Moves.SPIT_UP].calculateBattlePower).toHaveBeenCalledOnce(); + expect(spitUp.calculateBattlePower).toHaveBeenCalledOnce(); - expect(pokemon.summonData.battleStats[BattleStat.DEF]).toBe(1); - expect(pokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(-2); + expect(pokemon.getStatStage(Stat.DEF)).toBe(1); + expect(pokemon.getStatStage(Stat.SPDEF)).toBe(-2); expect(pokemon.getTag(StockpilingTag)).toBeUndefined(); }); diff --git a/src/test/moves/spotlight.test.ts b/src/test/moves/spotlight.test.ts index e5f4719d1d3..e4dc8815f6d 100644 --- a/src/test/moves/spotlight.test.ts +++ b/src/test/moves/spotlight.test.ts @@ -1,5 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -65,7 +65,7 @@ describe("Moves - Spotlight", () => { * Spotlight will target the slower enemy. In this situation without Spotlight being used, * the faster enemy would normally end up with the Center of Attention tag. */ - enemyPokemon.sort((a, b) => b.getBattleStat(Stat.SPD) - a.getBattleStat(Stat.SPD)); + enemyPokemon.sort((a, b) => b.getEffectiveStat(Stat.SPD) - a.getEffectiveStat(Stat.SPD)); const spotTarget = enemyPokemon[1].getBattlerIndex(); const attackTarget = enemyPokemon[0].getBattlerIndex(); diff --git a/src/test/moves/stockpile.test.ts b/src/test/moves/stockpile.test.ts index b1941b9f9b3..d57768d0ffd 100644 --- a/src/test/moves/stockpile.test.ts +++ b/src/test/moves/stockpile.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { StockpilingTag } from "#app/data/battler-tags"; import { MoveResult, TurnMove } from "#app/field/pokemon"; import { CommandPhase } from "#app/phases/command-phase"; @@ -38,7 +38,7 @@ describe("Moves - Stockpile", () => { game.override.ability(Abilities.NONE); }); - it("Gains a stockpile stack and increases DEF and SPDEF by 1 on each use, fails at max stacks (3)", { timeout: 10000 }, async () => { + it("gains a stockpile stack and raises user's DEF and SPDEF stat stages by 1 on each use, fails at max stacks (3)", { timeout: 10000 }, async () => { await game.startBattle([Species.ABOMASNOW]); const user = game.scene.getPlayerPokemon()!; @@ -47,8 +47,8 @@ describe("Moves - Stockpile", () => { // we just have to know that they're implemented as a BattlerTag. expect(user.getTag(StockpilingTag)).toBeUndefined(); - expect(user.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(user.summonData.battleStats[BattleStat.SPDEF]).toBe(0); + expect(user.getStatStage(Stat.DEF)).toBe(0); + expect(user.getStatStage(Stat.SPDEF)).toBe(0); // use Stockpile four times for (let i = 0; i < 4; i++) { @@ -60,18 +60,16 @@ describe("Moves - Stockpile", () => { await game.phaseInterceptor.to(TurnInitPhase); const stockpilingTag = user.getTag(StockpilingTag)!; - const def = user.summonData.battleStats[BattleStat.DEF]; - const spdef = user.summonData.battleStats[BattleStat.SPDEF]; if (i < 3) { // first three uses should behave normally - expect(def).toBe(i + 1); - expect(spdef).toBe(i + 1); + expect(user.getStatStage(Stat.DEF)).toBe(i + 1); + expect(user.getStatStage(Stat.SPDEF)).toBe(i + 1); expect(stockpilingTag).toBeDefined(); expect(stockpilingTag.stockpiledCount).toBe(i + 1); } else { // fourth should have failed - expect(def).toBe(3); - expect(spdef).toBe(3); + expect(user.getStatStage(Stat.DEF)).toBe(3); + expect(user.getStatStage(Stat.SPDEF)).toBe(3); expect(stockpilingTag).toBeDefined(); expect(stockpilingTag.stockpiledCount).toBe(3); expect(user.getMoveHistory().at(-1)).toMatchObject({ result: MoveResult.FAIL, move: Moves.STOCKPILE }); @@ -79,17 +77,17 @@ describe("Moves - Stockpile", () => { } }); - it("Gains a stockpile stack even if DEF and SPDEF are at +6", { timeout: 10000 }, async () => { + it("gains a stockpile stack even if user's DEF and SPDEF stat stages are at +6", { timeout: 10000 }, async () => { await game.startBattle([Species.ABOMASNOW]); const user = game.scene.getPlayerPokemon()!; - user.summonData.battleStats[BattleStat.DEF] = 6; - user.summonData.battleStats[BattleStat.SPDEF] = 6; + user.setStatStage(Stat.DEF, 6); + user.setStatStage(Stat.SPDEF, 6); expect(user.getTag(StockpilingTag)).toBeUndefined(); - expect(user.summonData.battleStats[BattleStat.DEF]).toBe(6); - expect(user.summonData.battleStats[BattleStat.SPDEF]).toBe(6); + expect(user.getStatStage(Stat.DEF)).toBe(6); + expect(user.getStatStage(Stat.SPDEF)).toBe(6); game.move.select(Moves.STOCKPILE); await game.phaseInterceptor.to(TurnInitPhase); @@ -97,8 +95,8 @@ describe("Moves - Stockpile", () => { const stockpilingTag = user.getTag(StockpilingTag)!; expect(stockpilingTag).toBeDefined(); expect(stockpilingTag.stockpiledCount).toBe(1); - expect(user.summonData.battleStats[BattleStat.DEF]).toBe(6); - expect(user.summonData.battleStats[BattleStat.SPDEF]).toBe(6); + expect(user.getStatStage(Stat.DEF)).toBe(6); + expect(user.getStatStage(Stat.SPDEF)).toBe(6); // do it again, just for good measure await game.phaseInterceptor.to(CommandPhase); @@ -109,8 +107,8 @@ describe("Moves - Stockpile", () => { const stockpilingTagAgain = user.getTag(StockpilingTag)!; expect(stockpilingTagAgain).toBeDefined(); expect(stockpilingTagAgain.stockpiledCount).toBe(2); - expect(user.summonData.battleStats[BattleStat.DEF]).toBe(6); - expect(user.summonData.battleStats[BattleStat.SPDEF]).toBe(6); + expect(user.getStatStage(Stat.DEF)).toBe(6); + expect(user.getStatStage(Stat.SPDEF)).toBe(6); }); }); }); diff --git a/src/test/moves/swallow.test.ts b/src/test/moves/swallow.test.ts index 202f25fee74..9cea7ae8dc9 100644 --- a/src/test/moves/swallow.test.ts +++ b/src/test/moves/swallow.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { StockpilingTag } from "#app/data/battler-tags"; import { BattlerTagType } from "#app/enums/battler-tag-type"; import { MoveResult, TurnMove } from "#app/field/pokemon"; @@ -138,7 +138,7 @@ describe("Moves - Swallow", () => { expect(pokemon.getMoveHistory().at(-1)).toMatchObject({ move: Moves.SWALLOW, result: MoveResult.FAIL }); }); - describe("restores stat boosts granted by stacks", () => { + describe("restores stat stage boosts granted by stacks", () => { it("decreases stats based on stored values (both boosts equal)", { timeout: 10000 }, async () => { await game.startBattle([Species.ABOMASNOW]); @@ -151,20 +151,20 @@ describe("Moves - Swallow", () => { game.move.select(Moves.SWALLOW); await game.phaseInterceptor.to(MovePhase); - expect(pokemon.summonData.battleStats[BattleStat.DEF]).toBe(1); - expect(pokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(1); + expect(pokemon.getStatStage(Stat.DEF)).toBe(1); + expect(pokemon.getStatStage(Stat.SPDEF)).toBe(1); await game.phaseInterceptor.to(TurnInitPhase); expect(pokemon.getMoveHistory().at(-1)).toMatchObject({ move: Moves.SWALLOW, result: MoveResult.SUCCESS }); - expect(pokemon.summonData.battleStats[BattleStat.DEF]).toBe(0); - expect(pokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(0); + expect(pokemon.getStatStage(Stat.DEF)).toBe(0); + expect(pokemon.getStatStage(Stat.SPDEF)).toBe(0); expect(pokemon.getTag(StockpilingTag)).toBeUndefined(); }); - it("decreases stats based on stored values (different boosts)", { timeout: 10000 }, async () => { + it("lower stat stages based on stored values (different boosts)", { timeout: 10000 }, async () => { await game.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; @@ -175,22 +175,18 @@ describe("Moves - Swallow", () => { // for the sake of simplicity (and because other tests cover the setup), set boost amounts directly stockpilingTag.statChangeCounts = { - [BattleStat.DEF]: -1, - [BattleStat.SPDEF]: 2, + [Stat.DEF]: -1, + [Stat.SPDEF]: 2, }; - expect(stockpilingTag.statChangeCounts).toMatchObject({ - [BattleStat.DEF]: -1, - [BattleStat.SPDEF]: 2, - }); - game.move.select(Moves.SWALLOW); + await game.phaseInterceptor.to(TurnInitPhase); expect(pokemon.getMoveHistory().at(-1)).toMatchObject({ move: Moves.SWALLOW, result: MoveResult.SUCCESS }); - expect(pokemon.summonData.battleStats[BattleStat.DEF]).toBe(1); - expect(pokemon.summonData.battleStats[BattleStat.SPDEF]).toBe(-2); + expect(pokemon.getStatStage(Stat.DEF)).toBe(1); + expect(pokemon.getStatStage(Stat.SPDEF)).toBe(-2); expect(pokemon.getTag(StockpilingTag)).toBeUndefined(); }); diff --git a/src/test/moves/tackle.test.ts b/src/test/moves/tackle.test.ts index 5eca9e344c8..b25c7524a1a 100644 --- a/src/test/moves/tackle.test.ts +++ b/src/test/moves/tackle.test.ts @@ -1,4 +1,4 @@ -import { Stat } from "#app/data/pokemon-stat"; +import { Stat } from "#enums/stat"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/tail_whip.test.ts b/src/test/moves/tail_whip.test.ts index 0a999fe1920..04730a04f7a 100644 --- a/src/test/moves/tail_whip.test.ts +++ b/src/test/moves/tail_whip.test.ts @@ -1,12 +1,13 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; +import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Tail whip", () => { @@ -31,23 +32,23 @@ describe("Moves - Tail whip", () => { game.override.enemyAbility(Abilities.INSOMNIA); game.override.ability(Abilities.INSOMNIA); game.override.startingLevel(2000); - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.moveset([ moveToUse ]); + game.override.enemyMoveset(SPLASH_ONLY); }); - it("TAIL_WHIP", async () => { + it("should lower DEF stat stage by 1", async() => { const moveToUse = Moves.TAIL_WHIP; await game.startBattle([ Species.MIGHTYENA, Species.MIGHTYENA, ]); - let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.DEF]).toBe(0); + const enemyPokemon = game.scene.getEnemyPokemon()!; + expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); game.move.select(moveToUse); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase); - battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; - expect(battleStatsOpponent[BattleStat.DEF]).toBe(-1); + + expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(-1); }, 20000); }); diff --git a/src/test/moves/tailwind.test.ts b/src/test/moves/tailwind.test.ts index 6b70122d08d..d158a9cce86 100644 --- a/src/test/moves/tailwind.test.ts +++ b/src/test/moves/tailwind.test.ts @@ -1,5 +1,5 @@ +import { Stat } from "#enums/stat"; import { ArenaTagSide } from "#app/data/arena-tag"; -import { Stat } from "#app/data/pokemon-stat"; import { ArenaTagType } from "#app/enums/arena-tag-type"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; @@ -38,16 +38,16 @@ describe("Moves - Tailwind", () => { const magikarpSpd = magikarp.getStat(Stat.SPD); const meowthSpd = meowth.getStat(Stat.SPD); - expect(magikarp.getBattleStat(Stat.SPD)).equal(magikarpSpd); - expect(meowth.getBattleStat(Stat.SPD)).equal(meowthSpd); + expect(magikarp.getEffectiveStat(Stat.SPD)).equal(magikarpSpd); + expect(meowth.getEffectiveStat(Stat.SPD)).equal(meowthSpd); game.move.select(Moves.TAILWIND); game.move.select(Moves.SPLASH, 1); await game.phaseInterceptor.to(TurnEndPhase); - expect(magikarp.getBattleStat(Stat.SPD)).toBe(magikarpSpd * 2); - expect(meowth.getBattleStat(Stat.SPD)).toBe(meowthSpd * 2); + expect(magikarp.getEffectiveStat(Stat.SPD)).toBe(magikarpSpd * 2); + expect(meowth.getEffectiveStat(Stat.SPD)).toBe(meowthSpd * 2); expect(game.scene.arena.getTagOnSide(ArenaTagType.TAILWIND, ArenaTagSide.PLAYER)).toBeDefined(); }); @@ -86,8 +86,8 @@ describe("Moves - Tailwind", () => { const enemySpd = enemy.getStat(Stat.SPD); - expect(ally.getBattleStat(Stat.SPD)).equal(allySpd); - expect(enemy.getBattleStat(Stat.SPD)).equal(enemySpd); + expect(ally.getEffectiveStat(Stat.SPD)).equal(allySpd); + expect(enemy.getEffectiveStat(Stat.SPD)).equal(enemySpd); expect(game.scene.arena.getTagOnSide(ArenaTagType.TAILWIND, ArenaTagSide.PLAYER)).toBeUndefined(); expect(game.scene.arena.getTagOnSide(ArenaTagType.TAILWIND, ArenaTagSide.ENEMY)).toBeUndefined(); @@ -95,8 +95,8 @@ describe("Moves - Tailwind", () => { await game.phaseInterceptor.to(TurnEndPhase); - expect(ally.getBattleStat(Stat.SPD)).toBe(allySpd * 2); - expect(enemy.getBattleStat(Stat.SPD)).equal(enemySpd); + expect(ally.getEffectiveStat(Stat.SPD)).toBe(allySpd * 2); + expect(enemy.getEffectiveStat(Stat.SPD)).equal(enemySpd); expect(game.scene.arena.getTagOnSide(ArenaTagType.TAILWIND, ArenaTagSide.PLAYER)).toBeDefined(); expect(game.scene.arena.getTagOnSide(ArenaTagType.TAILWIND, ArenaTagSide.ENEMY)).toBeUndefined(); }); diff --git a/src/test/moves/tera_blast.test.ts b/src/test/moves/tera_blast.test.ts index bd7df8403d1..fa7a99adc14 100644 --- a/src/test/moves/tera_blast.test.ts +++ b/src/test/moves/tera_blast.test.ts @@ -1,9 +1,8 @@ import { BattlerIndex } from "#app/battle"; -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { allMoves } from "#app/data/move"; import { Type } from "#app/data/type"; import { Abilities } from "#app/enums/abilities"; -import { Stat } from "#app/enums/stat"; import { HitResult } from "#app/field/pokemon"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -112,7 +111,7 @@ describe("Moves - Tera Blast", () => { await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("MoveEndPhase"); - expect(playerPokemon.summonData.battleStats[BattleStat.SPATK]).toBe(-1); - expect(playerPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-1); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(-1); + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); }, 20000); }); diff --git a/src/test/moves/tidy_up.test.ts b/src/test/moves/tidy_up.test.ts index 1ef7933c114..5204b06106b 100644 --- a/src/test/moves/tidy_up.test.ts +++ b/src/test/moves/tidy_up.test.ts @@ -1,4 +1,4 @@ -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import { ArenaTagType } from "#app/enums/arena-tag-type"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; @@ -60,7 +60,6 @@ describe("Moves - Tidy Up", () => { game.move.select(Moves.TIDY_UP); await game.phaseInterceptor.to(MoveEndPhase); expect(game.scene.arena.getTag(ArenaTagType.STEALTH_ROCK)).toBeUndefined(); - }, 20000); it("toxic spikes are cleared", async () => { @@ -73,7 +72,6 @@ describe("Moves - Tidy Up", () => { game.move.select(Moves.TIDY_UP); await game.phaseInterceptor.to(MoveEndPhase); expect(game.scene.arena.getTag(ArenaTagType.TOXIC_SPIKES)).toBeUndefined(); - }, 20000); it("sticky webs are cleared", async () => { @@ -87,7 +85,6 @@ describe("Moves - Tidy Up", () => { game.move.select(Moves.TIDY_UP); await game.phaseInterceptor.to(MoveEndPhase); expect(game.scene.arena.getTag(ArenaTagType.STICKY_WEB)).toBeUndefined(); - }, 20000); it.skip("substitutes are cleared", async () => { @@ -101,22 +98,20 @@ describe("Moves - Tidy Up", () => { game.move.select(Moves.TIDY_UP); await game.phaseInterceptor.to(MoveEndPhase); // TODO: check for subs here once the move is implemented - }, 20000); it("user's stats are raised with no traps set", async () => { await game.startBattle(); - const player = game.scene.getPlayerPokemon()!.summonData.battleStats; - expect(player[BattleStat.ATK]).toBe(0); - expect(player[BattleStat.SPD]).toBe(0); + const playerPokemon = game.scene.getPlayerPokemon()!; + + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(0); + expect(playerPokemon.getStatStage(Stat.SPD)).toBe(0); game.move.select(Moves.TIDY_UP); await game.phaseInterceptor.to(TurnEndPhase); - expect(player[BattleStat.ATK]).toBe(+1); - expect(player[BattleStat.SPD]).toBe(+1); - + expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1); + expect(playerPokemon.getStatStage(Stat.SPD)).toBe(1); }, 20000); - }); diff --git a/src/test/moves/transform.test.ts b/src/test/moves/transform.test.ts new file mode 100644 index 00000000000..45769447e4d --- /dev/null +++ b/src/test/moves/transform.test.ts @@ -0,0 +1,101 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#app/test/utils/gameManager"; +import { Species } from "#enums/species"; +import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Moves } from "#enums/moves"; +import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +// TODO: Add more tests once Transform is fully implemented +describe("Moves - Transform", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemySpecies(Species.MEW) + .enemyLevel(200) + .enemyAbility(Abilities.BEAST_BOOST) + .enemyPassiveAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY) + .ability(Abilities.INTIMIDATE) + .moveset([ Moves.TRANSFORM ]); + }); + + it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => { + await game.startBattle([ + Species.DITTO + ]); + + game.move.select(Moves.TRANSFORM); + await game.phaseInterceptor.to(TurnEndPhase); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + expect(player.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); + expect(player.getAbility()).toBe(enemy.getAbility()); + expect(player.getGender()).toBe(enemy.getGender()); + + expect(player.getStat(Stat.HP, false)).not.toBe(enemy.getStat(Stat.HP)); + for (const s of EFFECTIVE_STATS) { + expect(player.getStat(s, false)).toBe(enemy.getStat(s, false)); + } + + for (const s of BATTLE_STATS) { + expect(player.getStatStage(s)).toBe(enemy.getStatStage(s)); + } + + const playerMoveset = player.getMoveset(); + const enemyMoveset = player.getMoveset(); + + for (let i = 0; i < playerMoveset.length && i < enemyMoveset.length; i++) { + // TODO: Checks for 5 PP should be done here when that gets addressed + expect(playerMoveset[i]?.moveId).toBe(enemyMoveset[i]?.moveId); + } + + const playerTypes = player.getTypes(); + const enemyTypes = enemy.getTypes(); + + for (let i = 0; i < playerTypes.length && i < enemyTypes.length; i++) { + expect(playerTypes[i]).toBe(enemyTypes[i]); + } + }, 20000); + + it("should copy in-battle overridden stats", async () => { + game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT)); + + await game.startBattle([ + Species.DITTO + ]); + + const player = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + const avgAtk = Math.floor((player.getStat(Stat.ATK, false) + enemy.getStat(Stat.ATK, false)) / 2); + const avgSpAtk = Math.floor((player.getStat(Stat.SPATK, false) + enemy.getStat(Stat.SPATK, false)) / 2); + + game.move.select(Moves.TRANSFORM); + await game.phaseInterceptor.to(TurnEndPhase); + + expect(player.getStat(Stat.ATK, false)).toBe(avgAtk); + expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk); + + expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk); + }); +}); diff --git a/src/test/moves/wide_guard.test.ts b/src/test/moves/wide_guard.test.ts index 616972de01b..6feeff815b5 100644 --- a/src/test/moves/wide_guard.test.ts +++ b/src/test/moves/wide_guard.test.ts @@ -1,12 +1,12 @@ -import { BattleStat } from "#app/data/battle-stat"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { Abilities } from "#enums/abilities"; -import { Moves } from "#enums/moves"; -import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import GameManager from "../utils/gameManager"; +import { Species } from "#enums/species"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Stat } from "#enums/stat"; +import { BerryPhase } from "#app/phases/berry-phase"; +import { CommandPhase } from "#app/phases/command-phase"; const TIMEOUT = 20 * 1000; @@ -75,7 +75,7 @@ describe("Moves - Wide Guard", () => { await game.phaseInterceptor.to(BerryPhase, false); - leadPokemon.forEach(p => expect(p.summonData.battleStats[BattleStat.ATK]).toBe(0)); + leadPokemon.forEach(p => expect(p.getStatStage(Stat.ATK)).toBe(0)); }, TIMEOUT ); diff --git a/src/test/utils/helpers/overridesHelper.ts b/src/test/utils/helpers/overridesHelper.ts index 6451155cf17..cc5f9018325 100644 --- a/src/test/utils/helpers/overridesHelper.ts +++ b/src/test/utils/helpers/overridesHelper.ts @@ -281,6 +281,17 @@ export class OverridesHelper extends GameManagerHelper { return this; } + /** + * Override the items rolled at the end of a battle + * @param items the items to be rolled + * @returns this + */ + itemRewards(items: ModifierOverride[]) { + vi.spyOn(Overrides, "ITEM_REWARD_OVERRIDE", "get").mockReturnValue(items); + this.log("Item rewards set to:", items); + return this; + } + /** * Override the enemy (Pokemon) to have the given amount of health segments * @param healthSegments the number of segments to give diff --git a/src/test/utils/phaseInterceptor.ts b/src/test/utils/phaseInterceptor.ts index de65405abff..389ae36635a 100644 --- a/src/test/utils/phaseInterceptor.ts +++ b/src/test/utils/phaseInterceptor.ts @@ -1,4 +1,5 @@ import { Phase } from "#app/phase"; +import ErrorInterceptor from "#app/test/utils/errorInterceptor"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { BerryPhase } from "#app/phases/berry-phase"; import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; @@ -17,7 +18,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MovePhase } from "#app/phases/move-phase"; import { NewBattlePhase } from "#app/phases/new-battle-phase"; import { NextEncounterPhase } from "#app/phases/next-encounter-phase"; -import { PartyHealPhase } from "#app/phases/party-heal-phase"; import { PostSummonPhase } from "#app/phases/post-summon-phase"; import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; import { SelectGenderPhase } from "#app/phases/select-gender-phase"; @@ -26,7 +26,7 @@ import { SelectStarterPhase } from "#app/phases/select-starter-phase"; import { SelectTargetPhase } from "#app/phases/select-target-phase"; import { ShinySparklePhase } from "#app/phases/shiny-sparkle-phase"; import { ShowAbilityPhase } from "#app/phases/show-ability-phase"; -import { StatChangePhase } from "#app/phases/stat-change-phase"; +import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { SummonPhase } from "#app/phases/summon-phase"; import { SwitchPhase } from "#app/phases/switch-phase"; import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; @@ -37,7 +37,7 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { UnavailablePhase } from "#app/phases/unavailable-phase"; import { VictoryPhase } from "#app/phases/victory-phase"; -import ErrorInterceptor from "#app/test/utils/errorInterceptor"; +import { PartyHealPhase } from "#app/phases/party-heal-phase"; import UI, { Mode } from "#app/ui/ui"; export default class PhaseInterceptor { @@ -86,7 +86,7 @@ export default class PhaseInterceptor { [NewBattlePhase, this.startPhase], [VictoryPhase, this.startPhase], [MoveEndPhase, this.startPhase], - [StatChangePhase, this.startPhase], + [StatStageChangePhase, this.startPhase], [ShinySparklePhase, this.startPhase], [SelectTargetPhase, this.startPhase], [UnavailablePhase, this.startPhase], diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 11b807e8ab7..05c634609f8 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -7,7 +7,7 @@ import { StatusEffect } from "../data/status-effect"; import BattleScene from "../battle-scene"; import { Type, getTypeRgb } from "../data/type"; import { getVariantTint } from "#app/data/variant"; -import { BattleStat } from "#app/data/battle-stat"; +import { Stat } from "#enums/stat"; import BattleFlyout from "./battle-flyout"; import { WindowVariant, addWindow } from "./ui-theme"; import i18next from "i18next"; @@ -30,7 +30,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { private lastLevelExp: integer; private lastLevel: integer; private lastLevelCapped: boolean; - private lastBattleStats: string; + private lastStats: string; private box: Phaser.GameObjects.Sprite; private nameText: Phaser.GameObjects.Text; @@ -68,9 +68,9 @@ export default class BattleInfo extends Phaser.GameObjects.Container { public flyoutMenu?: BattleFlyout; - private battleStatOrder: BattleStat[]; - private battleStatOrderPlayer = [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.ACC, BattleStat.EVA, BattleStat.SPD]; - private battleStatOrderEnemy = [BattleStat.HP, BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.ACC, BattleStat.EVA, BattleStat.SPD]; + private statOrder: Stat[]; + private readonly statOrderPlayer = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.ACC, Stat.EVA, Stat.SPD ]; + private readonly statOrderEnemy = [ Stat.HP, Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.ACC, Stat.EVA, Stat.SPD ]; constructor(scene: Phaser.Scene, x: number, y: number, player: boolean) { super(scene, x, y); @@ -229,9 +229,9 @@ export default class BattleInfo extends Phaser.GameObjects.Container { const startingX = this.player ? -this.statsBox.width + 8 : -this.statsBox.width + 5; const paddingX = this.player ? 4 : 2; const statOverflow = this.player ? 1 : 0; - this.battleStatOrder = this.player ? this.battleStatOrderPlayer : this.battleStatOrderEnemy; // this tells us whether or not to use the player or enemy battle stat order + this.statOrder = this.player ? this.statOrderPlayer : this.statOrderEnemy; // this tells us whether or not to use the player or enemy battle stat order - this.battleStatOrder.map((s, i) => { + this.statOrder.map((s, i) => { // we do a check for i > statOverflow to see when the stat labels go onto the next column // For enemies, we have HP (i=0) by itself then a new column, so we check for i > 0 // For players, we don't have HP, so we start with i = 0 and i = 1 for our first column, and so need to check for i > 1 @@ -239,25 +239,25 @@ export default class BattleInfo extends Phaser.GameObjects.Container { const baseY = -this.statsBox.height / 2 + 4; // this is the baseline for the y-axis let statY: number; // this will be the y-axis placement for the labels - if (this.battleStatOrder[i] === BattleStat.SPD || this.battleStatOrder[i] === BattleStat.HP) { + if (this.statOrder[i] === Stat.SPD || this.statOrder[i] === Stat.HP) { statY = baseY + 5; } else { statY = baseY + (!!(i % 2) === this.player ? 10 : 0); // we compare i % 2 against this.player to tell us where to place the label; because this.battleStatOrder for enemies has HP, this.battleStatOrder[1]=ATK, but for players this.battleStatOrder[0]=ATK, so this comparing i % 2 to this.player fixes this issue for us } - const statLabel = this.scene.add.sprite(statX, statY, "pbinfo_stat", BattleStat[s]); + const statLabel = this.scene.add.sprite(statX, statY, "pbinfo_stat", Stat[s]); statLabel.setName("icon_stat_label_" + i.toString()); statLabel.setOrigin(0, 0); statLabels.push(statLabel); this.statValuesContainer.add(statLabel); - const statNumber = this.scene.add.sprite(statX + statLabel.width, statY, "pbinfo_stat_numbers", this.battleStatOrder[i] !== BattleStat.HP ? "3" : "empty"); + const statNumber = this.scene.add.sprite(statX + statLabel.width, statY, "pbinfo_stat_numbers", this.statOrder[i] !== Stat.HP ? "3" : "empty"); statNumber.setName("icon_stat_number_" + i.toString()); statNumber.setOrigin(0, 0); this.statNumbers.push(statNumber); this.statValuesContainer.add(statNumber); - if (this.battleStatOrder[i] === BattleStat.HP) { + if (this.statOrder[i] === Stat.HP) { statLabel.setVisible(false); statNumber.setVisible(false); } @@ -433,10 +433,10 @@ export default class BattleInfo extends Phaser.GameObjects.Container { this.statValuesContainer.setPosition(8, 7); } - const battleStats = this.battleStatOrder.map(() => 0); + const stats = this.statOrder.map(() => 0); - this.lastBattleStats = battleStats.join(""); - this.updateBattleStats(battleStats); + this.lastStats = stats.join(""); + this.updateStats(stats); } getTextureName(): string { @@ -650,14 +650,12 @@ export default class BattleInfo extends Phaser.GameObjects.Container { this.lastLevel = pokemon.level; } - const battleStats = pokemon.summonData - ? pokemon.summonData.battleStats - : this.battleStatOrder.map(() => 0); - const battleStatsStr = battleStats.join(""); + const stats = pokemon.getStatStages(); + const statsStr = stats.join(""); - if (this.lastBattleStats !== battleStatsStr) { - this.updateBattleStats(battleStats); - this.lastBattleStats = battleStatsStr; + if (this.lastStats !== statsStr) { + this.updateStats(stats); + this.lastStats = statsStr; } this.shinyIcon.setVisible(pokemon.isShiny()); @@ -769,10 +767,10 @@ export default class BattleInfo extends Phaser.GameObjects.Container { } } - updateBattleStats(battleStats: integer[]): void { - this.battleStatOrder.map((s, i) => { - if (s !== BattleStat.HP) { - this.statNumbers[i].setFrame(battleStats[s].toString()); + updateStats(stats: integer[]): void { + this.statOrder.map((s, i) => { + if (s !== Stat.HP) { + this.statNumbers[i].setFrame(stats[s - 1].toString()); } }); } diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index 86f8d9e01a8..4c2b798558a 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -1,13 +1,12 @@ import BattleScene from "../battle-scene"; import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "./text"; import { Mode } from "./ui"; -import * as Utils from "../utils"; import MessageUiHandler from "./message-ui-handler"; -import { getStatName, Stat } from "../data/pokemon-stat"; import { addWindow } from "./ui-theme"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import {Button} from "#enums/buttons"; import i18next from "i18next"; +import { Stat, PERMANENT_STATS, getStatKey } from "#app/enums/stat"; export default class BattleMessageUiHandler extends MessageUiHandler { private levelUpStatsContainer: Phaser.GameObjects.Container; @@ -100,9 +99,8 @@ export default class BattleMessageUiHandler extends MessageUiHandler { const levelUpStatsLabelsContent = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 73, -94, "", TextStyle.WINDOW, { maxLines: 6 }); let levelUpStatsLabelText = ""; - const stats = Utils.getEnumValues(Stat); - for (const s of stats) { - levelUpStatsLabelText += `${getStatName(s)}\n`; + for (const s of PERMANENT_STATS) { + levelUpStatsLabelText += `${i18next.t(getStatKey(s))}\n`; } levelUpStatsLabelsContent.text = levelUpStatsLabelText; levelUpStatsLabelsContent.x -= levelUpStatsLabelsContent.displayWidth; @@ -176,8 +174,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler { } const newStats = (this.scene as BattleScene).getParty()[partyMemberIndex].stats; let levelUpStatsValuesText = ""; - const stats = Utils.getEnumValues(Stat); - for (const s of stats) { + for (const s of PERMANENT_STATS) { levelUpStatsValuesText += `${showTotals ? newStats[s] : newStats[s] - prevStats[s]}\n`; } this.levelUpStatsValuesContent.text = levelUpStatsValuesText; @@ -199,10 +196,9 @@ export default class BattleMessageUiHandler extends MessageUiHandler { return new Promise(resolve => { this.scene.executeWithSeedOffset(() => { let levelUpStatsValuesText = ""; - const stats = Utils.getEnumValues(Stat); const shownStats = this.getTopIvs(ivs, shownIvsCount); - for (const s of stats) { - levelUpStatsValuesText += `${shownStats.indexOf(s) > -1 ? this.getIvDescriptor(ivs[s], s, pokemonId) : "???"}\n`; + for (const s of PERMANENT_STATS) { + levelUpStatsValuesText += `${shownStats.includes(s) ? this.getIvDescriptor(ivs[s], s, pokemonId) : "???"}\n`; } this.levelUpStatsValuesContent.text = levelUpStatsValuesText; this.levelUpStatsIncrContent.setVisible(false); @@ -217,26 +213,17 @@ export default class BattleMessageUiHandler extends MessageUiHandler { } getTopIvs(ivs: integer[], shownIvsCount: integer): Stat[] { - const stats = Utils.getEnumValues(Stat); let shownStats: Stat[] = []; if (shownIvsCount < 6) { - const statsPool = stats.slice(0); + let highestIv = -1; for (let i = 0; i < shownIvsCount; i++) { - let shownStat: Stat | null = null; - let highestIv = -1; - statsPool.map(s => { - if (ivs[s] > highestIv) { - shownStat = s as Stat; - highestIv = ivs[s]; - } - }); - if (shownStat !== null && shownStat !== undefined) { - shownStats.push(shownStat); - statsPool.splice(statsPool.indexOf(shownStat), 1); + if (ivs[i] > highestIv) { + shownStats.push(PERMANENT_STATS[i]); + highestIv = ivs[i]; } } } else { - shownStats = stats; + shownStats = PERMANENT_STATS.slice(); } return shownStats; } diff --git a/src/ui/stats-container.ts b/src/ui/stats-container.ts index 2bd7099a2c5..c6e0ea3a71c 100644 --- a/src/ui/stats-container.ts +++ b/src/ui/stats-container.ts @@ -1,7 +1,8 @@ import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; import BattleScene from "../battle-scene"; -import { Stat, getStatName } from "../data/pokemon-stat"; import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; +import { PERMANENT_STATS, getStatKey } from "#app/enums/stat"; +import i18next from "i18next"; const ivChartSize = 24; const ivChartStatCoordMultipliers = [[0, -1], [0.825, -0.5], [0.825, 0.5], [-0.825, -0.5], [-0.825, 0.5], [0, 1]]; @@ -53,16 +54,16 @@ export class StatsContainer extends Phaser.GameObjects.Container { this.ivStatValueTexts = []; - new Array(6).fill(null).map((_, i: integer) => { - const statLabel = addTextObject(this.scene, ivChartBg.x + (ivChartSize) * ivChartStatCoordMultipliers[i][0] * 1.325, ivChartBg.y + (ivChartSize) * ivChartStatCoordMultipliers[i][1] * 1.325 - 4 + ivLabelOffset[i], getStatName(i as Stat), TextStyle.TOOLTIP_CONTENT); + for (const s of PERMANENT_STATS) { + const statLabel = addTextObject(this.scene, ivChartBg.x + (ivChartSize) * ivChartStatCoordMultipliers[s][0] * 1.325, ivChartBg.y + (ivChartSize) * ivChartStatCoordMultipliers[s][1] * 1.325 - 4 + ivLabelOffset[s], i18next.t(getStatKey(s)), TextStyle.TOOLTIP_CONTENT); statLabel.setOrigin(0.5); - this.ivStatValueTexts[i] = addBBCodeTextObject(this.scene, statLabel.x, statLabel.y + 8, "0", TextStyle.TOOLTIP_CONTENT); - this.ivStatValueTexts[i].setOrigin(0.5); + this.ivStatValueTexts[s] = addBBCodeTextObject(this.scene, statLabel.x, statLabel.y + 8, "0", TextStyle.TOOLTIP_CONTENT); + this.ivStatValueTexts[s].setOrigin(0.5); this.add(statLabel); - this.add(this.ivStatValueTexts[i]); - }); + this.add(this.ivStatValueTexts[s]); + } } updateIvs(ivs: integer[], originalIvs?: integer[]): void { diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index ea7b798f2bf..8ae72f08edd 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -11,7 +11,6 @@ import Move, { MoveCategory } from "../data/move"; import { getPokeballAtlasKey } from "../data/pokeball"; import { getGenderColor, getGenderSymbol } from "../data/gender"; import { getLevelRelExp, getLevelTotalExp } from "../data/exp"; -import { Stat, getStatName } from "../data/pokemon-stat"; import { PokemonHeldItemModifier } from "../modifier/modifier"; import { StatusEffect } from "../data/status-effect"; import { getBiomeName } from "../data/biomes"; @@ -19,10 +18,11 @@ import { Nature, getNatureName, getNatureStatMultiplier } from "../data/nature"; import { loggedInUser } from "../account"; import { Variant, getVariantTint } from "#app/data/variant"; import {Button} from "#enums/buttons"; -import { Ability } from "../data/ability.js"; +import { Ability } from "../data/ability"; import i18next from "i18next"; import {modifierSortFunc} from "../modifier/modifier"; import { PlayerGender } from "#enums/player-gender"; +import { Stat, PERMANENT_STATS, getStatKey } from "#app/enums/stat"; enum Page { PROFILE, @@ -836,10 +836,8 @@ export default class SummaryUiHandler extends UiHandler { const statsContainer = this.scene.add.container(0, -pageBg.height); pageContainer.add(statsContainer); - const stats = Utils.getEnumValues(Stat) as Stat[]; - - stats.forEach((stat, s) => { - const statName = getStatName(stat); + PERMANENT_STATS.forEach((stat, s) => { + const statName = i18next.t(getStatKey(stat)); const rowIndex = s % 3; const colIndex = Math.floor(s / 3); @@ -850,7 +848,7 @@ export default class SummaryUiHandler extends UiHandler { statsContainer.add(statLabel); const statValueText = stat !== Stat.HP - ? Utils.formatStat(this.pokemon?.stats[s]!) // TODO: is this bang correct? + ? Utils.formatStat(this.pokemon?.getStat(stat)!) // TODO: is this bang correct? : `${Utils.formatStat(this.pokemon?.hp!, true)}/${Utils.formatStat(this.pokemon?.getMaxHp()!, true)}`; // TODO: are those bangs correct? const statValue = addTextObject(this.scene, 120 + 88 * colIndex, 56 + 16 * rowIndex, statValueText, TextStyle.WINDOW_ALT); From deb4e9dd2429e6c1263c44b3f08e7fa25a6e2188 Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Mon, 2 Sep 2024 19:14:09 -0700 Subject: [PATCH 06/91] [UI] Run history fixes and improvements (#3987) * Challenge Rules Word Wrap * Fixed Modifiers * Fixed item count color. * removed .js endings --------- Co-authored-by: frutescens --- src/ui/run-info-ui-handler.ts | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 25210277edc..7a183a11d29 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -13,8 +13,9 @@ import { BattleType } from "../battle"; import { TrainerVariant } from "../field/trainer"; import { Challenges } from "#enums/challenges"; import { getLuckString, getLuckTextTint } from "../modifier/modifier-type"; -import RoundRectangle from "phaser3-rex-plugins/plugins/roundrectangle.js"; +import RoundRectangle from "phaser3-rex-plugins/plugins/roundrectangle"; import { Type, getTypeRgb } from "../data/type"; +import { TypeColor, TypeShadow } from "#app/enums/color"; import { getNatureStatMultiplier, getNatureName } from "../data/nature"; import { getVariantTint } from "#app/data/variant"; import { PokemonHeldItemModifier, TerastallizeModifier } from "../modifier/modifier"; @@ -373,15 +374,16 @@ export default class RunInfoUiHandler extends UiHandler { break; case GameModes.CHALLENGE: modeText.appendText(`${i18next.t("gameMode:challenge")}`, false); - modeText.appendText(`\t\t${i18next.t("runHistory:challengeRules")}: `); + modeText.appendText(`${i18next.t("runHistory:challengeRules")}: `); + modeText.setWrapMode(1); // wrap by word + modeText.setWrapWidth(500); const rules: string[] = this.challengeParser(); if (rules) { for (let i = 0; i < rules.length; i++) { - const newline = i > 0 && i%2 === 0; if (i > 0) { - modeText.appendText(" + ", newline); + modeText.appendText(" + ", false); } - modeText.appendText(rules[i], newline); + modeText.appendText(rules[i], false); } } break; @@ -470,14 +472,18 @@ export default class RunInfoUiHandler extends UiHandler { rules.push(i18next.t(`runHistory:challengeMonoGen${this.runInfo.challenges[i].value}`)); break; case Challenges.SINGLE_TYPE: - rules.push(i18next.t(`pokemonInfo:Type.${Type[this.runInfo.challenges[i].value-1]}` as const)); + const typeRule = Type[this.runInfo.challenges[i].value-1]; + const typeTextColor = `[color=${TypeColor[typeRule]}]`; + const typeShadowColor = `[shadow=${TypeShadow[typeRule]}]`; + const typeText = typeTextColor + typeShadowColor + i18next.t(`pokemonInfo:Type.${typeRule}`)!+"[/color]"+"[/shadow]"; + rules.push(typeText); break; case Challenges.FRESH_START: rules.push(i18next.t("challenges:freshStart.name")); break; case Challenges.INVERSE_BATTLE: // - rules.push(i18next.t("challenges:inverseBattle.shortName").split("").reverse().join("")); + rules.push(i18next.t("challenges:inverseBattle.shortName")); break; } } @@ -628,7 +634,7 @@ export default class RunInfoUiHandler extends UiHandler { // Pokemon Held Items - not displayed by default // Endless/Endless Spliced have a different scale because Pokemon tend to accumulate more items in these runs. const heldItemsScale = (this.runInfo.gameMode === GameModes.SPLICED_ENDLESS || this.runInfo.gameMode === GameModes.ENDLESS) ? 0.25 : 0.5; - const heldItemsContainer = this.scene.add.container(-82, 6); + const heldItemsContainer = this.scene.add.container(-82, 2); const heldItemsList : PokemonHeldItemModifier[] = []; if (this.runInfo.modifiers.length) { for (const m of this.runInfo.modifiers) { @@ -648,6 +654,9 @@ export default class RunInfoUiHandler extends UiHandler { break; } const itemIcon = item?.getIcon(this.scene, true); + if (item?.stackCount < item?.getMaxHeldItemCount(pokemon) && itemIcon.list[1] instanceof Phaser.GameObjects.BitmapText) { + itemIcon.list[1].clearTint(); + } itemIcon.setScale(heldItemsScale); itemIcon.setPosition((index%19) * 10, row * 10); heldItemsContainer.add(itemIcon); From 587360c8dae409e6a305a897358cdfba328711a2 Mon Sep 17 00:00:00 2001 From: PigeonBar <56974298+PigeonBar@users.noreply.github.com> Date: Mon, 2 Sep 2024 22:18:18 -0400 Subject: [PATCH 07/91] [Bug] Fix eggs having exploitable RNG (#3913) * [Bug] Fix eggs having exploitable RNG * Fix Wind Rider test having random chance to fail * Revert egg's ID back to its own unseeded generation * Remove change from wind rider test --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com> --- src/battle-scene.ts | 1 + src/data/egg.ts | 140 +++++++++++++++++++--------------- src/test/battle-scene.test.ts | 10 ++- src/test/eggs/egg.test.ts | 75 +++++++++++++++++- 4 files changed, 161 insertions(+), 65 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 70f214f57c6..c9f7362728a 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -974,6 +974,7 @@ export default class BattleScene extends SceneBase { this.setSeed(Overrides.SEED_OVERRIDE || Utils.randomString(24)); console.log("Seed:", this.seed); + this.resetSeed(); // Properly resets RNG after saving and quitting a session this.disableMenu = false; diff --git a/src/data/egg.ts b/src/data/egg.ts index 3e872d364f3..9beb944de69 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -139,46 +139,57 @@ export class Egg { //// constructor(eggOptions?: IEggOptions) { - //if (eggOptions.tier && eggOptions.species) throw Error("Error egg can't have species and tier as option. only choose one of them.") + const generateEggProperties = (eggOptions?: IEggOptions) => { + //if (eggOptions.tier && eggOptions.species) throw Error("Error egg can't have species and tier as option. only choose one of them.") - this._sourceType = eggOptions?.sourceType!; // TODO: is this bang correct? - // Ensure _sourceType is defined before invoking rollEggTier(), as it is referenced - this._tier = eggOptions?.tier ?? (Overrides.EGG_TIER_OVERRIDE ?? this.rollEggTier()); - // If egg was pulled, check if egg pity needs to override the egg tier - if (eggOptions?.pulled) { - // Needs this._tier and this._sourceType to work - this.checkForPityTierOverrides(eggOptions.scene!); // TODO: is this bang correct? - } + this._sourceType = eggOptions?.sourceType!; // TODO: is this bang correct? + // Ensure _sourceType is defined before invoking rollEggTier(), as it is referenced + this._tier = eggOptions?.tier ?? (Overrides.EGG_TIER_OVERRIDE ?? this.rollEggTier()); + // If egg was pulled, check if egg pity needs to override the egg tier + if (eggOptions?.pulled) { + // Needs this._tier and this._sourceType to work + this.checkForPityTierOverrides(eggOptions.scene!); // TODO: is this bang correct? + } - this._id = eggOptions?.id ?? Utils.randInt(EGG_SEED, EGG_SEED * this._tier); + this._id = eggOptions?.id ?? Utils.randInt(EGG_SEED, EGG_SEED * this._tier); - this._sourceType = eggOptions?.sourceType ?? undefined; - this._hatchWaves = eggOptions?.hatchWaves ?? this.getEggTierDefaultHatchWaves(); - this._timestamp = eggOptions?.timestamp ?? new Date().getTime(); + this._sourceType = eggOptions?.sourceType ?? undefined; + this._hatchWaves = eggOptions?.hatchWaves ?? this.getEggTierDefaultHatchWaves(); + this._timestamp = eggOptions?.timestamp ?? new Date().getTime(); - // First roll shiny and variant so we can filter if species with an variant exist - this._isShiny = eggOptions?.isShiny ?? (Overrides.EGG_SHINY_OVERRIDE || this.rollShiny()); - this._variantTier = eggOptions?.variantTier ?? (Overrides.EGG_VARIANT_OVERRIDE ?? this.rollVariant()); - this._species = eggOptions?.species ?? this.rollSpecies(eggOptions!.scene!)!; // TODO: Are those bangs correct? + // First roll shiny and variant so we can filter if species with an variant exist + this._isShiny = eggOptions?.isShiny ?? (Overrides.EGG_SHINY_OVERRIDE || this.rollShiny()); + this._variantTier = eggOptions?.variantTier ?? (Overrides.EGG_VARIANT_OVERRIDE ?? this.rollVariant()); + this._species = eggOptions?.species ?? this.rollSpecies(eggOptions!.scene!)!; // TODO: Are those bangs correct? - this._overrideHiddenAbility = eggOptions?.overrideHiddenAbility ?? false; + this._overrideHiddenAbility = eggOptions?.overrideHiddenAbility ?? false; - // Override egg tier and hatchwaves if species was given - if (eggOptions?.species) { - this._tier = this.getEggTierFromSpeciesStarterValue(); - this._hatchWaves = eggOptions.hatchWaves ?? this.getEggTierDefaultHatchWaves(); - } - // If species has no variant, set variantTier to common. This needs to - // be done because species with no variants get filtered at rollSpecies but if the - // species is set via options or the legendary gacha pokemon gets choosen the check never happens - if (this._species && !getPokemonSpecies(this._species).hasVariants()) { - this._variantTier = VariantTier.COMMON; - } - // Needs this._tier so it needs to be generated afer the tier override if bought from same species - this._eggMoveIndex = eggOptions?.eggMoveIndex ?? this.rollEggMoveIndex(); - if (eggOptions?.pulled) { - this.increasePullStatistic(eggOptions.scene!); // TODO: is this bang correct? - this.addEggToGameData(eggOptions.scene!); // TODO: is this bang correct? + // Override egg tier and hatchwaves if species was given + if (eggOptions?.species) { + this._tier = this.getEggTierFromSpeciesStarterValue(); + this._hatchWaves = eggOptions.hatchWaves ?? this.getEggTierDefaultHatchWaves(); + } + // If species has no variant, set variantTier to common. This needs to + // be done because species with no variants get filtered at rollSpecies but if the + // species is set via options or the legendary gacha pokemon gets choosen the check never happens + if (this._species && !getPokemonSpecies(this._species).hasVariants()) { + this._variantTier = VariantTier.COMMON; + } + // Needs this._tier so it needs to be generated afer the tier override if bought from same species + this._eggMoveIndex = eggOptions?.eggMoveIndex ?? this.rollEggMoveIndex(); + if (eggOptions?.pulled) { + this.increasePullStatistic(eggOptions.scene!); // TODO: is this bang correct? + this.addEggToGameData(eggOptions.scene!); // TODO: is this bang correct? + } + }; + + if (eggOptions?.scene) { + const seedOverride = Utils.randomString(24); + eggOptions?.scene.executeWithSeedOffset(() => { + generateEggProperties(eggOptions); + }, 0, seedOverride); + } else { // For legacy eggs without scene + generateEggProperties(eggOptions); } } @@ -200,37 +211,46 @@ export class Egg { // Generates a PlayerPokemon from an egg public generatePlayerPokemon(scene: BattleScene): PlayerPokemon { - // Legacy egg wants to hatch. Generate missing properties - if (!this._species) { - this._isShiny = this.rollShiny(); - this._species = this.rollSpecies(scene!)!; // TODO: are these bangs correct? - } + let ret: PlayerPokemon; - let pokemonSpecies = getPokemonSpecies(this._species); - // Special condition to have Phione eggs also have a chance of generating Manaphy - if (this._species === Species.PHIONE) { - pokemonSpecies = getPokemonSpecies(Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) ? Species.PHIONE : Species.MANAPHY); - } + const generatePlayerPokemonHelper = (scene: BattleScene) => { + // Legacy egg wants to hatch. Generate missing properties + if (!this._species) { + this._isShiny = this.rollShiny(); + this._species = this.rollSpecies(scene!)!; // TODO: are these bangs correct? + } - // Sets the hidden ability if a hidden ability exists and - // the override is set or the egg hits the chance - let abilityIndex: number | undefined = undefined; - const sameSpeciesEggHACheck = (this._sourceType === EggSourceType.SAME_SPECIES_EGG && !Utils.randSeedInt(SAME_SPECIES_EGG_HA_RATE)); - const gachaEggHACheck = (!(this._sourceType === EggSourceType.SAME_SPECIES_EGG) && !Utils.randSeedInt(GACHA_EGG_HA_RATE)); - if (pokemonSpecies.abilityHidden && (this._overrideHiddenAbility || sameSpeciesEggHACheck || gachaEggHACheck)) { - abilityIndex = 2; - } + let pokemonSpecies = getPokemonSpecies(this._species); + // Special condition to have Phione eggs also have a chance of generating Manaphy + if (this._species === Species.PHIONE) { + pokemonSpecies = getPokemonSpecies(Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) ? Species.PHIONE : Species.MANAPHY); + } - // This function has way to many optional parameters - const ret: PlayerPokemon = scene.addPlayerPokemon(pokemonSpecies, 1, abilityIndex, undefined, undefined, false); - ret.shiny = this._isShiny; - ret.variant = this._variantTier; + // Sets the hidden ability if a hidden ability exists and + // the override is set or the egg hits the chance + let abilityIndex: number | undefined = undefined; + const sameSpeciesEggHACheck = (this._sourceType === EggSourceType.SAME_SPECIES_EGG && !Utils.randSeedInt(SAME_SPECIES_EGG_HA_RATE)); + const gachaEggHACheck = (!(this._sourceType === EggSourceType.SAME_SPECIES_EGG) && !Utils.randSeedInt(GACHA_EGG_HA_RATE)); + if (pokemonSpecies.abilityHidden && (this._overrideHiddenAbility || sameSpeciesEggHACheck || gachaEggHACheck)) { + abilityIndex = 2; + } - const secondaryIvs = Utils.getIvsFromId(Utils.randSeedInt(4294967295)); + // This function has way to many optional parameters + ret = scene.addPlayerPokemon(pokemonSpecies, 1, abilityIndex, undefined, undefined, false); + ret.shiny = this._isShiny; + ret.variant = this._variantTier; - for (let s = 0; s < ret.ivs.length; s++) { - ret.ivs[s] = Math.max(ret.ivs[s], secondaryIvs[s]); - } + const secondaryIvs = Utils.getIvsFromId(Utils.randSeedInt(4294967295)); + + for (let s = 0; s < ret.ivs.length; s++) { + ret.ivs[s] = Math.max(ret.ivs[s], secondaryIvs[s]); + } + }; + + ret = ret!; // Tell TS compiler it's defined now + scene.executeWithSeedOffset(() => { + generatePlayerPokemonHelper(scene); + }, this._id, EGG_SEED.toString()); return ret; } diff --git a/src/test/battle-scene.test.ts b/src/test/battle-scene.test.ts index 9e28ec99791..4da75cea197 100644 --- a/src/test/battle-scene.test.ts +++ b/src/test/battle-scene.test.ts @@ -1,5 +1,5 @@ import { LoadingScene } from "#app/loading-scene"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import GameManager from "./utils/gameManager"; describe("BattleScene", () => { @@ -24,4 +24,12 @@ describe("BattleScene", () => { // `BattleScene.create()` is called during the `new GameManager()` call expect(game.scene.scene.remove).toHaveBeenCalledWith(LoadingScene.KEY); }); + + it("should also reset RNG on reset", () => { + vi.spyOn(game.scene, "resetSeed"); + + game.scene.reset(); + + expect(game.scene.resetSeed).toHaveBeenCalled(); + }); }); diff --git a/src/test/eggs/egg.test.ts b/src/test/eggs/egg.test.ts index 28f1b7f0a6c..4f00e843b47 100644 --- a/src/test/eggs/egg.test.ts +++ b/src/test/eggs/egg.test.ts @@ -12,6 +12,7 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vite describe("Egg Generation Tests", () => { let phaserGame: Phaser.Game; let game: GameManager; + const EGG_HATCH_COUNT: integer = 1000; beforeAll(() => { phaserGame = new Phaser.Game({ @@ -47,14 +48,21 @@ describe("Egg Generation Tests", () => { expect(result).toBe(expectedSpecies); }); - it("should hatch an Arceus. Set from legendary gacha", async () => { + it("should hatch an Arceus around half the time. Set from legendary gacha", async () => { const scene = game.scene; const timestamp = new Date(2024, 6, 10, 15, 0, 0, 0).getTime(); const expectedSpecies = Species.ARCEUS; + let gachaSpeciesCount = 0; - const result = new Egg({ scene, timestamp, sourceType: EggSourceType.GACHA_LEGENDARY, tier: EggTier.MASTER }).generatePlayerPokemon(scene).species.speciesId; + for (let i = 0; i < EGG_HATCH_COUNT; i++) { + const result = new Egg({ scene, timestamp, sourceType: EggSourceType.GACHA_LEGENDARY, tier: EggTier.MASTER }).generatePlayerPokemon(scene).species.speciesId; + if (result === expectedSpecies) { + gachaSpeciesCount++; + } + } - expect(result).toBe(expectedSpecies); + expect(gachaSpeciesCount).toBeGreaterThan(0.4 * EGG_HATCH_COUNT); + expect(gachaSpeciesCount).toBeLessThan(0.6 * EGG_HATCH_COUNT); }); it("should hatch an Arceus. Set from species", () => { const scene = game.scene; @@ -156,7 +164,7 @@ describe("Egg Generation Tests", () => { const scene = game.scene; const eggMoveIndex = new Egg({ scene }).eggMoveIndex; - const result = eggMoveIndex && eggMoveIndex >= 0 && eggMoveIndex <= 3; + const result = !Utils.isNullOrUndefined(eggMoveIndex) && eggMoveIndex >= 0 && eggMoveIndex <= 3; expect(result).toBe(true); }); @@ -309,4 +317,63 @@ describe("Egg Generation Tests", () => { expect(egg.variantTier).toBe(VariantTier.EPIC); }); + + it("should generate egg moves, species, shinyness, and ability unpredictably for the egg gacha", () => { + const scene = game.scene; + scene.setSeed("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + scene.resetSeed(); + + const firstEgg = new Egg({scene, sourceType: EggSourceType.GACHA_SHINY, tier: EggTier.COMMON}); + const firstHatch = firstEgg.generatePlayerPokemon(scene); + let diffEggMove = false; + let diffSpecies = false; + let diffShiny = false; + let diffAbility = false; + for (let i = 0; i < EGG_HATCH_COUNT; i++) { + scene.gameData.unlockPity[EggTier.COMMON] = 0; + scene.setSeed("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + scene.resetSeed(); // Make sure that eggs are unpredictable even if using same seed + + const newEgg = new Egg({scene, sourceType: EggSourceType.GACHA_SHINY, tier: EggTier.COMMON}); + const newHatch = newEgg.generatePlayerPokemon(scene); + diffEggMove = diffEggMove || (newEgg.eggMoveIndex !== firstEgg.eggMoveIndex); + diffSpecies = diffSpecies || (newHatch.species.speciesId !== firstHatch.species.speciesId); + diffShiny = diffShiny || (newHatch.shiny !== firstHatch.shiny); + diffAbility = diffAbility || (newHatch.abilityIndex !== firstHatch.abilityIndex); + } + + expect(diffEggMove).toBe(true); + expect(diffSpecies).toBe(true); + expect(diffShiny).toBe(true); + expect(diffAbility).toBe(true); + }); + + it("should generate egg moves, shinyness, and ability unpredictably for species eggs", () => { + const scene = game.scene; + scene.setSeed("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + scene.resetSeed(); + + const firstEgg = new Egg({scene, species: Species.BULBASAUR}); + const firstHatch = firstEgg.generatePlayerPokemon(scene); + let diffEggMove = false; + let diffSpecies = false; + let diffShiny = false; + let diffAbility = false; + for (let i = 0; i < EGG_HATCH_COUNT; i++) { + scene.setSeed("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + scene.resetSeed(); // Make sure that eggs are unpredictable even if using same seed + + const newEgg = new Egg({scene, species: Species.BULBASAUR}); + const newHatch = newEgg.generatePlayerPokemon(scene); + diffEggMove = diffEggMove || (newEgg.eggMoveIndex !== firstEgg.eggMoveIndex); + diffSpecies = diffSpecies || (newHatch.species.speciesId !== firstHatch.species.speciesId); + diffShiny = diffShiny || (newHatch.shiny !== firstHatch.shiny); + diffAbility = diffAbility || (newHatch.abilityIndex !== firstHatch.abilityIndex); + } + + expect(diffEggMove).toBe(true); + expect(diffSpecies).toBe(false); + expect(diffShiny).toBe(true); + expect(diffAbility).toBe(true); + }); }); From 97a02e7c342dc9c73fdeed514180ed6b94ad2be7 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:59:51 -0700 Subject: [PATCH 08/91] =?UTF-8?q?[Test]=20Set=20boss=20Pok=C3=A9mon=20test?= =?UTF-8?q?=20timeout=20to=2020=20seconds=20instead=20of=202.5=20seconds?= =?UTF-8?q?=20(#3992)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/boss-pokemon.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/boss-pokemon.test.ts b/src/test/boss-pokemon.test.ts index f8437932580..c6fc276551f 100644 --- a/src/test/boss-pokemon.test.ts +++ b/src/test/boss-pokemon.test.ts @@ -10,7 +10,7 @@ import { EnemyPokemon } from "#app/field/pokemon"; import { toDmgValue } from "#app/utils"; describe("Boss Pokemon / Shields", () => { - const TIMEOUT = 2500; + const TIMEOUT = 20 * 1000; let phaserGame: Phaser.Game; let game: GameManager; From 684d7b30094b53fb19057ee7b80b062f707c648d Mon Sep 17 00:00:00 2001 From: chaosgrimmon <31082757+chaosgrimmon@users.noreply.github.com> Date: Tue, 3 Sep 2024 01:02:29 -0400 Subject: [PATCH 09/91] [Misc] Repack Keyboard button sprites (#3993) * [Misc] Repack keyboard input icons * [Misc] Keyboard sprites repacking json * [Bug] Capitalisation of "c" --- public/images/inputs/keyboard.json | 1131 +++++++++++++--------------- public/images/inputs/keyboard.png | Bin 2157 -> 1282 bytes 2 files changed, 528 insertions(+), 603 deletions(-) diff --git a/public/images/inputs/keyboard.json b/public/images/inputs/keyboard.json index a8124004c12..c9b3c79fbfb 100644 --- a/public/images/inputs/keyboard.json +++ b/public/images/inputs/keyboard.json @@ -1,604 +1,529 @@ -{"frames": [ - -{ - "filename": "0.png", - "frame": {"x":0,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "1.png", - "frame": {"x":12,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "2.png", - "frame": {"x":24,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "3.png", - "frame": {"x":36,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "4.png", - "frame": {"x":48,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "5.png", - "frame": {"x":60,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "6.png", - "frame": {"x":72,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "7.png", - "frame": {"x":84,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "8.png", - "frame": {"x":96,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "9.png", - "frame": {"x":108,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "A.png", - "frame": {"x":120,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "ALT.png", - "frame": {"x":132,"y":0,"w":16,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":16,"h":12}, - "sourceSize": {"w":16,"h":12} -}, -{ - "filename": "B.png", - "frame": {"x":148,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "BACK.png", - "frame": {"x":160,"y":0,"w":24,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":24,"h":12}, - "sourceSize": {"w":24,"h":12} -}, -{ - "filename": "C.png", - "frame": {"x":184,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "CTRL.png", - "frame": {"x":196,"y":0,"w":22,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":22,"h":12}, - "sourceSize": {"w":22,"h":12} -}, -{ - "filename": "D.png", - "frame": {"x":218,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "DEL.png", - "frame": {"x":230,"y":0,"w":17,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":17,"h":12}, - "sourceSize": {"w":17,"h":12} -}, -{ - "filename": "E.png", - "frame": {"x":247,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "END.png", - "frame": {"x":259,"y":0,"w":18,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":18,"h":12}, - "sourceSize": {"w":18,"h":12} -}, -{ - "filename": "ENTER.png", - "frame": {"x":277,"y":0,"w":27,"h":11}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":27,"h":11}, - "sourceSize": {"w":27,"h":11} -}, -{ - "filename": "ESC.png", - "frame": {"x":304,"y":0,"w":17,"h":11}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":17,"h":11}, - "sourceSize": {"w":17,"h":11} -}, -{ - "filename": "F.png", - "frame": {"x":321,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "F1.png", - "frame": {"x":333,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F2.png", - "frame": {"x":346,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F3.png", - "frame": {"x":359,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F4.png", - "frame": {"x":372,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F5.png", - "frame": {"x":385,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F6.png", - "frame": {"x":398,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F7.png", - "frame": {"x":411,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F8.png", - "frame": {"x":424,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F9.png", - "frame": {"x":437,"y":0,"w":13,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":12}, - "sourceSize": {"w":13,"h":12} -}, -{ - "filename": "F10.png", - "frame": {"x":450,"y":0,"w":16,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":16,"h":12}, - "sourceSize": {"w":16,"h":12} -}, -{ - "filename": "F11.png", - "frame": {"x":466,"y":0,"w":15,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":15,"h":12}, - "sourceSize": {"w":15,"h":12} -}, -{ - "filename": "F12.png", - "frame": {"x":481,"y":0,"w":16,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":16,"h":12}, - "sourceSize": {"w":16,"h":12} -}, -{ - "filename": "G.png", - "frame": {"x":497,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "H.png", - "frame": {"x":509,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "HOME.png", - "frame": {"x":521,"y":0,"w":23,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":23,"h":12}, - "sourceSize": {"w":23,"h":12} -}, -{ - "filename": "I.png", - "frame": {"x":544,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "INS.png", - "frame": {"x":556,"y":0,"w":16,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":16,"h":12}, - "sourceSize": {"w":16,"h":12} -}, -{ - "filename": "J.png", - "frame": {"x":572,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "K.png", - "frame": {"x":584,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "KEY_ARROW_DOWN.png", - "frame": {"x":596,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "KEY_ARROW_LEFT.png", - "frame": {"x":608,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "KEY_ARROW_RIGHT.png", - "frame": {"x":620,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "KEY_ARROW_UP.png", - "frame": {"x":632,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "L.png", - "frame": {"x":644,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "LEFT_BRACKET.png", - "frame": {"x":656,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "M.png", - "frame": {"x":668,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "MINUS.png", - "frame": {"x":680,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "N.png", - "frame": {"x":692,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "O.png", - "frame": {"x":704,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "P.png", - "frame": {"x":716,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "PAGE_DOWN.png", - "frame": {"x":728,"y":0,"w":20,"h":11}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":20,"h":11}, - "sourceSize": {"w":20,"h":11} -}, -{ - "filename": "PAGE_UP.png", - "frame": {"x":748,"y":0,"w":20,"h":11}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":20,"h":11}, - "sourceSize": {"w":20,"h":11} -}, -{ - "filename": "PLUS.png", - "frame": {"x":768,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "Q.png", - "frame": {"x":780,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "QUOTE.png", - "frame": {"x":792,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "R.png", - "frame": {"x":804,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "RIGHT_BRACKET.png", - "frame": {"x":816,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "S.png", - "frame": {"x":828,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "SEMICOLON.png", - "frame": {"x":840,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "SHIFT.png", - "frame": {"x":852,"y":0,"w":23,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":23,"h":12}, - "sourceSize": {"w":23,"h":12} -}, -{ - "filename": "SPACE.png", - "frame": {"x":875,"y":0,"w":25,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":25,"h":12}, - "sourceSize": {"w":25,"h":12} -}, -{ - "filename": "T.png", - "frame": {"x":900,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "TAB.png", - "frame": {"x":912,"y":0,"w":19,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":19,"h":12}, - "sourceSize": {"w":19,"h":12} -}, -{ - "filename": "TILDE.png", - "frame": {"x":931,"y":0,"w":15,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":15,"h":12}, - "sourceSize": {"w":15,"h":12} -}, -{ - "filename": "U.png", - "frame": {"x":946,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "V.png", - "frame": {"x":958,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "W.png", - "frame": {"x":970,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "X.png", - "frame": {"x":982,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "Y.png", - "frame": {"x":994,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "Z.png", - "frame": {"x":1006,"y":0,"w":12,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, - "sourceSize": {"w":12,"h":12} -}, -{ - "filename": "ACTION.png", - "frame": {"x":1018,"y":0,"w":28,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":28,"h":12}, - "sourceSize": {"w":28,"h":12} -}], -"meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "1.0", - "image": "keyboard.png", - "format": "RGBA8888", - "size": {"w":1018,"h":12}, - "scale": "1", - "smartupdate": "$TexturePacker:SmartUpdate:085d4353a5c4d18c90f82f8926710d72:45908b22b446cf7f4904d4e0b658b16a:bad03abb89ad027d879c383c13fd51bc$" -} +{ "frames": { + "0.png": { + "frame": { "x": 12, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "1.png": { + "frame": { "x": 36, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "2.png": { + "frame": { "x": 0, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "3.png": { + "frame": { "x": 12, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "4.png": { + "frame": { "x": 24, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "5.png": { + "frame": { "x": 84, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "6.png": { + "frame": { "x": 96, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "7.png": { + "frame": { "x": 120, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "8.png": { + "frame": { "x": 132, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "9.png": { + "frame": { "x": 52, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "A.png": { + "frame": { "x": 64, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "ALT.png": { + "frame": { "x": 0, "y": 22, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "B.png": { + "frame": { "x": 76, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "BACK.png": { + "frame": { "x": 80, "y": 0, "w": 24, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 24, "h": 11 }, + "sourceSize": { "w": 24, "h": 11 } + }, + "C.png": { + "frame": { "x": 88, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "CTRL.png": { + "frame": { "x": 0, "y": 11, "w": 22, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 11 }, + "sourceSize": { "w": 22, "h": 11 } + }, + "D.png": { + "frame": { "x": 100, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "DEL.png": { + "frame": { "x": 116, "y": 11, "w": 17, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 17, "h": 11 }, + "sourceSize": { "w": 17, "h": 11 } + }, + "E.png": { + "frame": { "x": 112, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "END.png": { + "frame": { "x": 81, "y": 11, "w": 18, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 18, "h": 11 }, + "sourceSize": { "w": 18, "h": 11 } + }, + "ENTER.png": { + "frame": { "x": 28, "y": 0, "w": 27, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 27, "h": 11 }, + "sourceSize": { "w": 27, "h": 11 } + }, + "ESC.png": { + "frame": { "x": 99, "y": 11, "w": 17, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 17, "h": 11 }, + "sourceSize": { "w": 17, "h": 11 } + }, + "F.png": { + "frame": { "x": 124, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "F1.png": { + "frame": { "x": 78, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F2.png": { + "frame": { "x": 91, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F3.png": { + "frame": { "x": 104, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F4.png": { + "frame": { "x": 117, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F5.png": { + "frame": { "x": 130, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F6.png": { + "frame": { "x": 0, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F7.png": { + "frame": { "x": 13, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F8.png": { + "frame": { "x": 26, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F9.png": { + "frame": { "x": 39, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F10.png": { + "frame": { "x": 16, "y": 22, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "F11.png": { + "frame": { "x": 48, "y": 22, "w": 15, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 15, "h": 11 }, + "sourceSize": { "w": 15, "h": 11 } + }, + "F12.png": { + "frame": { "x": 133, "y": 11, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "G.png": { + "frame": { "x": 136, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "H.png": { + "frame": { "x": 0, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "HOME.png": { + "frame": { "x": 104, "y": 0, "w": 23, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 23, "h": 11 }, + "sourceSize": { "w": 23, "h": 11 } + }, + "I.png": { + "frame": { "x": 24, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "INS.png": { + "frame": { "x": 32, "y": 22, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "J.png": { + "frame": { "x": 48, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "K.png": { + "frame": { "x": 60, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "KEY_ARROW_DOWN.png": { + "frame": { "x": 72, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "KEY_ARROW_LEFT.png": { + "frame": { "x": 72, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "KEY_ARROW_RIGHT.png": { + "frame": { "x": 84, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "KEY_ARROW_UP.png": { + "frame": { "x": 94, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "L.png": { + "frame": { "x": 96, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "LEFT_BRACKET.png": { + "frame": { "x": 127, "y": 66, "w": 10, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 10, "h": 11 }, + "sourceSize": { "w": 10, "h": 11 } + }, + "M.png": { + "frame": { "x": 108, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "MINUS.png": { + "frame": { "x": 105, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "N.png": { + "frame": { "x": 120, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "O.png": { + "frame": { "x": 12, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "P.png": { + "frame": { "x": 132, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "PAGE_DOWN.png": { + "frame": { "x": 22, "y": 11, "w": 20, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 20, "h": 11 }, + "sourceSize": { "w": 20, "h": 11 } + }, + "PAGE_UP.png": { + "frame": { "x": 42, "y": 11, "w": 20, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 20, "h": 11 }, + "sourceSize": { "w": 20, "h": 11 } + }, + "PLUS.png": { + "frame": { "x": 116, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "Q.png": { + "frame": { "x": 36, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "QUOTE.png": { + "frame": { "x": 83, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "R.png": { + "frame": { "x": 48, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "RIGHT_BRACKET.png": { + "frame": { "x": 137, "y": 66, "w": 10, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 10, "h": 11 }, + "sourceSize": { "w": 10, "h": 11 } + }, + "S.png": { + "frame": { "x": 60, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "SEMICOLON.png": { + "frame": { "x": 72, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "SHIFT.png": { + "frame": { "x": 127, "y": 0, "w": 23, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 23, "h": 11 }, + "sourceSize": { "w": 23, "h": 11 } + }, + "SPACE.png": { + "frame": { "x": 55, "y": 0, "w": 25, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 25, "h": 11 }, + "sourceSize": { "w": 25, "h": 11 } + }, + "T.png": { + "frame": { "x": 108, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "TAB.png": { + "frame": { "x": 62, "y": 11, "w": 19, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 11 }, + "sourceSize": { "w": 19, "h": 11 } + }, + "TILDE.png": { + "frame": { "x": 63, "y": 22, "w": 15, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 15, "h": 11 }, + "sourceSize": { "w": 15, "h": 11 } + }, + "U.png": { + "frame": { "x": 0, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "V.png": { + "frame": { "x": 12, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "W.png": { + "frame": { "x": 24, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "X.png": { + "frame": { "x": 36, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "Y.png": { + "frame": { "x": 48, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "Z.png": { + "frame": { "x": 60, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "ACTION.png": { + "frame": { "x": 0, "y": 0, "w": 28, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 28, "h": 11 }, + "sourceSize": { "w": 28, "h": 11 } + } + }, + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.7-dev", + "image": "keyboard.png", + "format": "RGBA8888", + "size": { "w": 150, "h": 77 }, + "scale": "1" + } } diff --git a/public/images/inputs/keyboard.png b/public/images/inputs/keyboard.png index 1fc5adfa31cbea3f5b52a02618d39e43ce652abb..e4d849be0fb26b2ba1a8e790abee68e9bbedadbe 100644 GIT binary patch literal 1282 zcmV+d1^xPoP)Px#7*I@9MF0Q*4htw67ceI!J|iGPGB8FzJ7v<|<$92jQ2+n{2y{|TQvm<}|NsC0 z|JBM=G5`Psgh@m}RA_4wZ(|CNP>|1;=s10KEPT1 zbW-WL2M>99*K|5^IldqDK4SgsdY%aJpAv0>%n#+U>izUA(&3bneUz0=S^K`Sr`})* z@@;X5FS$fHus<}JNSp;%BhRTDxh#8IyOH`!5x2EH9wEGrc3Ua9tt4)Xx57DCMB2(q zgoVQQ*0v{gk8ewd#CHV;cn5AU-&=5wDl5I*AE|Aa-{3KgJxgtw+?;?3t&!y3keddm!JV2|l3}>ZBUZ)e-sDADd|L`T zk~c~tCXG$&WdWpmS^DW1N$R$;L`VmY*2)bgds`|E6+s-2SUq7`6fA%V)UNedp(b`J zVo5~;ij+{xI{d|jkH>^T%}PeO6t*Vs!^dO7pk^hbTnbxRZuj??FsNC{D3`+4XPvrq-@oObxpPh{3s@m07X$?1Sz)~4CfI&w=9 z@fvQO3^>y#6w(n=bCY1x-rsv!S(TN!MI$KGWW!Iu{S=}aI>U~CTap90gQ6y2T)L7X z3PVA}akwlokysAYxWy6=G=23bL8{m%53y}Ib7CfEpGGQz{UEME#NbOi)ZXbOgRIP6{9ay= z<%|%rwO`sapc@80(i%0CwgU_)5K97OqK6oU2o`=dH zcWL57FGRC@2eZvMkGEU>#>9Y;do+EenZqUV^ebkaQj9A7KMv>OW!(q(1owc#wbx zb(>HJklai|P}=L07n9(_ImIR6)Xf=MKT zQZ(Hle8Mv?CLn01gq=MA(TPp4mponM2y%?WC$a@_0uBP8qI1HsayDfh8Fr#Un}1WH zffK@N4rmA;IiUbd1eAPeAgtQUJ3BJ~TFd!^&mH>@K6ln*@R=}IX*~g-`{vQG!15*^ z{67HX>(UnRp>Y$BL$O?!g$Z}+R+gD?#I)0Ma)!^s@K-{ZOjgZ8ERBA&EQCgmfg@O@ zRZ%y5f_GY$0ZSd8ya|V58(5Nh0jb}XmkVNP^k;D3Qk1Qxnk?WmYU0r-ma={vAotDv sb)oePeCABBo`KJt3DzgV=XLPsA7BZsSvU_`Q~&?~07*qoM6N<$f_(8;_W%F@ literal 2157 zcmV-z2$J`SP)Px-CrLy>RCt{2T)}Q#MGWoWiVIQ#9#RcWl?9!RKPg`ei$9`R#;{&*&81n3b-h)-Mcv3Dp38?^!2N>(06;v*cmA^Z zln-g+vxq0vGuHZB(lOPuh~uu;hw$q48SEbn@buY}Th7VxDLj4l1Wt}m0RV14V;t^# zz>B`F^50rMV?Ngl0sfya4!M3;;!lz<@BGev|7rMISo{&iGKTefYc9=NtLrWEb2EAF zJNG*P-1)p-AHom^44{frTG(R5jyZlTE{$Qu#}+%Ko|gErP40Q+Hc}chr%xM?(;NTB zZE$Y=sZWc8YRP*b%?p)#k9SXVA&~kRcCO+2pW%*uj8reShSUbj@33(uPd{774v^M3P8+39I&9Qv#|}n0Ev50OxEAvT zg}}w;FDeJM`6|&v`R4pnx>NtuUh&c|^{<(KbA24^g~0~PZQ6Tczf`~D{KbAHy^rE@ z`?ch}kb--D@mh2K(|14S<@Bd9YR@~l{ww{%iqv<_cWS-0^LuV~rF>~%bq?6NCR>Y1S@RVqBwr~K&<&3C_Yt;E%+t+v6s+_uYJB)p^kr- z>J?8~d$ote;M-FdcgUOq)Ly~B zUDQZoctNwzB)t$j%t`tk<_~)(PL5Aef8Ot^whnq~p)^S$eSf6A$DK;iQnhxR(2sLoPpFI=JHD@$SXHNe=2)SMOl|;8OswX_|5D)DIP_rm5BDNo%7W zBGY%GC7bYFYon5uyprHShYm~W{+P0ytcZjxN3drOmFZ5`A2 z*X%#({7B6p)PBV-jVKM$HBi1&j`WW=-g7FZGk3{_&3e^ONIy=O=|^15)de>?etTYL7||o@ud_ z?mvm1w1{##B)(G}*di-4*@#oxdmVOU*5BBy< z-;oj<>GMnZ-r7pzaF31dmYI~oy)^L3u++uZzyL`mnQ_WnyI(qo%X1o0W zUw`u@yNH)B{(#M9_tv=c?>B$ycyrM+g^sD#p8D~IMJ(?;b(`hcSlPE;b3JSH()yEz zAGqOP!C#V|bg+$m1AP2f`CHcS#kYW`zbW%O_x)GG*T8#LE{S2OY0Msa-}z%;v)TRc zVnJ#EAQ#yA%jQoVZ!UVK&@t88H=AA9Za=_hM`eGx)!@zfTL6HnSZ~hX-fEVhBv0LD zc{Wz|t=C-78ojjsq~WIrsU_>d4tAFQ;~1^vGw>~Yp+&z-{YiVDcYf!-|4R58jBz-e za=l~r(EG?AYbFQySXTy3Ky6{`{AKf}jyD%QQ|Op#?ZHp@?-;0!|3w7 zo;7-D{Yk?Q+*al4mg9g0@c64-%jf>0YP0e4PdO}a|TyJan1Zck(YVzfs j-?{I Date: Mon, 2 Sep 2024 22:59:48 -0700 Subject: [PATCH 10/91] [Test] Remove nature RNG from Beast Boost tests (#3994) --- src/test/abilities/beast_boost.test.ts | 38 ++++++++++---------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/src/test/abilities/beast_boost.test.ts b/src/test/abilities/beast_boost.test.ts index cfe015c822e..05645a1231d 100644 --- a/src/test/abilities/beast_boost.test.ts +++ b/src/test/abilities/beast_boost.test.ts @@ -1,15 +1,12 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import { BattlerIndex } from "#app/battle"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { VictoryPhase } from "#app/phases/victory-phase"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; -import { BattlerIndex } from "#app/battle"; describe("Abilities - Beast Boost", () => { let phaserGame: Phaser.Game; @@ -37,49 +34,44 @@ describe("Abilities - Beast Boost", () => { .enemyMoveset(SPLASH_ONLY); }); - // Note that both MOXIE and BEAST_BOOST test for their current implementation and not their mainline behavior. it("should prefer highest stat to boost its corresponding stat stage by 1 when winning a battle", async() => { - // SLOWBRO's highest stat is DEF, so it should be picked here - await game.startBattle([ - Species.SLOWBRO - ]); + await game.classicMode.startBattle([Species.SLOWBRO]); const playerPokemon = game.scene.getPlayerPokemon()!; + // Set the pokemon's highest stat to DEF, so it should be picked by Beast Boost + vi.spyOn(playerPokemon, "stats", "get").mockReturnValue([ 10000, 100, 1000, 200, 100, 100 ]); + console.log(playerPokemon.stats); expect(playerPokemon.getStatStage(Stat.DEF)).toBe(0); game.move.select(Moves.FLAMETHROWER); - await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase); + await game.phaseInterceptor.to("VictoryPhase"); expect(playerPokemon.getStatStage(Stat.DEF)).toBe(1); }, 20000); it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => { - // If the opponent can GUARD_SPLIT, SLOWBRO's second highest stat should be SPATK game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT)); - await game.startBattle([ - Species.SLOWBRO - ]); + await game.classicMode.startBattle([Species.SLOWBRO]); const playerPokemon = game.scene.getPlayerPokemon()!; + // If the opponent uses Guard Split, the pokemon's second highest stat (SPATK) should be chosen + vi.spyOn(playerPokemon, "stats", "get").mockReturnValue([ 10000, 100, 201, 200, 100, 100 ]); expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(0); game.move.select(Moves.FLAMETHROWER); await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]); - - await game.phaseInterceptor.runFrom(TurnStartPhase).to(VictoryPhase); + await game.phaseInterceptor.to("VictoryPhase"); expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); }, 20000); it("should have order preference in case of stat ties", async() => { // Order preference follows the order of EFFECTIVE_STAT - await game.startBattle([ - Species.SLOWBRO - ]); + await game.classicMode.startBattle([Species.SLOWBRO]); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -90,7 +82,7 @@ describe("Abilities - Beast Boost", () => { game.move.select(Moves.FLAMETHROWER); - await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase); + await game.phaseInterceptor.to("VictoryPhase"); expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); }, 20000); From 940992a94063b31c4a95ce772d03af3945110383 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Tue, 3 Sep 2024 14:48:13 +0200 Subject: [PATCH 11/91] [Localization] [FR] Added missing keys in French (#4000) * Update battle.json * Update menu-ui-handler.json --- src/locales/fr/battle.json | 5 +++-- src/locales/fr/menu-ui-handler.json | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/locales/fr/battle.json b/src/locales/fr/battle.json index 1c108c89ded..b8da3a953ae 100644 --- a/src/locales/fr/battle.json +++ b/src/locales/fr/battle.json @@ -94,5 +94,6 @@ "retryBattle": "Voulez-vous réessayer depuis le début du combat ?", "unlockedSomething": "{{unlockedThing}}\na été débloqué.", "congratulations": "Félicitations !", - "beatModeFirstTime": "{{speciesName}} a battu le mode {{gameMode}} pour la première fois !\nVous avez reçu {{newModifier}} !" -} \ No newline at end of file + "beatModeFirstTime": "{{speciesName}} a battu le mode {{gameMode}} pour la première fois !\nVous avez reçu {{newModifier}} !", + "eggSkipPrompt": "Aller directement au résumé des Œufs éclos ?" +} diff --git a/src/locales/fr/menu-ui-handler.json b/src/locales/fr/menu-ui-handler.json index 807b34f1315..b8627bf91b5 100644 --- a/src/locales/fr/menu-ui-handler.json +++ b/src/locales/fr/menu-ui-handler.json @@ -25,5 +25,6 @@ "unlinkGoogle": "Délier Google", "cancel": "Retour", "losingProgressionWarning": "Vous allez perdre votre progression depuis le début du combat. Continuer ?", - "noEggs": "Vous ne faites actuellement\néclore aucun Œuf !" -} \ No newline at end of file + "noEggs": "Vous ne faites actuellement\néclore aucun Œuf !", + "donate": "Faire un don" +} From 232cd2c91a020aab042ae2843b4d5a4692e6907f Mon Sep 17 00:00:00 2001 From: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:12:57 +0200 Subject: [PATCH 12/91] [Localization] [DE] Added missing keys in DE (#3998) * Add missing keys in DE * Challenge description fix --- src/locales/de/battle.json | 3 ++- src/locales/de/challenges.json | 3 ++- src/locales/de/menu-ui-handler.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/locales/de/battle.json b/src/locales/de/battle.json index 762b5848439..05205b001b6 100644 --- a/src/locales/de/battle.json +++ b/src/locales/de/battle.json @@ -94,5 +94,6 @@ "retryBattle": "Möchtest du vom Beginn des Kampfes neustarten?", "unlockedSomething": "{{unlockedThing}} wurde freigeschaltet.", "congratulations": "Glückwunsch!", - "beatModeFirstTime": "{{speciesName}} hat den {{gameMode}} Modus zum ersten Mal beendet! Du erhältst {{newModifier}}!" + "beatModeFirstTime": "{{speciesName}} hat den {{gameMode}} Modus zum ersten Mal beendet! Du erhältst {{newModifier}}!", + "eggSkipPrompt": "Zur Ei-Zusammenfassung springen?" } \ No newline at end of file diff --git a/src/locales/de/challenges.json b/src/locales/de/challenges.json index 17c33353bc6..c8836c50549 100644 --- a/src/locales/de/challenges.json +++ b/src/locales/de/challenges.json @@ -1,10 +1,11 @@ { + "noneSelected": "Keine ausgewählt", "title": "Herausforderungsmodifikatoren", "illegalEvolution": "{{pokemon}} hat sich in ein Pokémon verwandelt, dass für diese Herausforderung nicht zulässig ist!", "singleGeneration": { "name": "Mono-Generation", "desc": "Du kannst nur Pokémon aus der {{gen}} Generation verwenden.", - "desc_default": "Du kannst nur Pokémon gewählten Generation verwenden.", + "desc_default": "Du kannst nur Pokémon aus der gewählten Generation verwenden.", "gen_1": "ersten", "gen_2": "zweiten", "gen_3": "dritten", diff --git a/src/locales/de/menu-ui-handler.json b/src/locales/de/menu-ui-handler.json index 56c03102b9c..93c3f4c38e8 100644 --- a/src/locales/de/menu-ui-handler.json +++ b/src/locales/de/menu-ui-handler.json @@ -25,5 +25,6 @@ "unlinkGoogle": "Google trennen", "cancel": "Abbrechen", "losingProgressionWarning": "Du wirst jeglichen Fortschritt seit Anfang dieses Kampfes verlieren. Fortfahren?", - "noEggs": "Du brütest aktuell keine Eier aus!" + "noEggs": "Du brütest aktuell keine Eier aus!", + "donate": "Spenden" } \ No newline at end of file From 3a6146935ca5c5ba681ff0e2b42ffc591e420403 Mon Sep 17 00:00:00 2001 From: PigeonBar <56974298+PigeonBar@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:14:45 -0400 Subject: [PATCH 13/91] [Bug] Fix reloads causing RNG inconsistencies, Moody and Acupressure use seeded RNG now (#3952) * [Bug] Fix reloads causing RNG inconsistencies * Minor revisions * Allow reload helper to directly access getSessionSaveData() * Changed Moody and Acupressure to use seeded RNG * Fix broken unit test --- src/data/ability.ts | 4 +- src/data/move.ts | 2 +- src/phases/encounter-phase.ts | 2 + src/system/game-data.ts | 2 +- src/test/reload.test.ts | 137 +++++++++++++++++++++++++ src/test/utils/gameManager.ts | 8 +- src/test/utils/helpers/reloadHelper.ts | 53 ++++++++++ src/test/utils/phaseInterceptor.ts | 20 ++++ 8 files changed, 222 insertions(+), 6 deletions(-) create mode 100644 src/test/reload.test.ts create mode 100644 src/test/utils/helpers/reloadHelper.ts diff --git a/src/data/ability.ts b/src/data/ability.ts index 04dd15f9239..16ae7a2b2d2 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3475,12 +3475,12 @@ export class MoodyAbAttr extends PostTurnAbAttr { if (!simulated) { if (canRaise.length > 0) { - const raisedStat = Utils.randSeedItem(canRaise); + const raisedStat = canRaise[pokemon.randSeedInt(canRaise.length)]; canLower = canRaise.filter(s => s !== raisedStat); pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ raisedStat ], 2)); } if (canLower.length > 0) { - const loweredStat = Utils.randSeedItem(canLower); + const loweredStat = canLower[pokemon.randSeedInt(canLower.length)]; pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ loweredStat ], -1)); } } diff --git a/src/data/move.ts b/src/data/move.ts index bcdb16cdfbc..14d7addead0 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2675,7 +2675,7 @@ export class AcupressureStatStageChangeAttr extends MoveEffectAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise { const randStats = BATTLE_STATS.filter(s => target.getStatStage(s) < 6); if (randStats.length > 0) { - const boostStat = [randStats[Utils.randInt(randStats.length)]]; + const boostStat = [randStats[user.randSeedInt(randStats.length)]]; user.scene.unshiftPhase(new StatStageChangePhase(user.scene, target.getBattlerIndex(), this.selfTarget, boostStat, 2)); return true; } diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 6e0658d4ccb..3f37095569a 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -161,9 +161,11 @@ export class EncounterPhase extends BattlePhase { return this.scene.reset(true); } this.doEncounter(); + this.scene.resetSeed(); }); } else { this.doEncounter(); + this.scene.resetSeed(); } }); }); diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 29bb6057722..50cc6177a84 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -946,7 +946,7 @@ export class GameData { return ret; } - private getSessionSaveData(scene: BattleScene): SessionSaveData { + public getSessionSaveData(scene: BattleScene): SessionSaveData { return { seed: scene.seed, playTime: scene.sessionPlayTime, diff --git a/src/test/reload.test.ts b/src/test/reload.test.ts new file mode 100644 index 00000000000..0a712fcc7df --- /dev/null +++ b/src/test/reload.test.ts @@ -0,0 +1,137 @@ +import { Species } from "#app/enums/species"; +import { GameModes } from "#app/game-mode"; +import GameManager from "#test/utils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "./utils/testUtils"; +import { Moves } from "#app/enums/moves"; +import { Biome } from "#app/enums/biome"; + +describe("Reload", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + }); + + it("should not have RNG inconsistencies in a Classic run", async () => { + await game.classicMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies after a biome switch", async () => { + game.override + .startingWave(10) + .startingBiome(Biome.CAVE) // Will lead to biomes with randomly generated weather + .battleType("single") + .startingLevel(100) + .enemyLevel(1000) + .disableTrainerWaves() + .moveset([Moves.KOWTOW_CLEAVE]) + .enemyMoveset(SPLASH_ONLY); + await game.dailyMode.startBattle(); + + // Transition from Daily Run Wave 10 to Wave 11 in order to trigger biome switch + game.move.select(Moves.KOWTOW_CLEAVE); + await game.phaseInterceptor.to("DamagePhase"); + await game.doKillOpponents(); + await game.toNextWave(); + expect(game.phaseInterceptor.log).toContain("NewBiomeEncounterPhase"); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run wild Pokemon fight", async () => { + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run double battle", async () => { + game.override + .battleType("double"); + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run Gym Leader fight", async () => { + game.override + .battleType("single") + .startingWave(40); + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run regular trainer fight", async () => { + game.override + .battleType("single") + .startingWave(45); + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run wave 50 Boss fight", async () => { + game.override + .battleType("single") + .startingWave(50); + await game.runToFinalBossEncounter([Species.BULBASAUR], GameModes.DAILY); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); +}); diff --git a/src/test/utils/gameManager.ts b/src/test/utils/gameManager.ts index 6724e05521c..998d10ddf12 100644 --- a/src/test/utils/gameManager.ts +++ b/src/test/utils/gameManager.ts @@ -45,6 +45,8 @@ import { ChallengeModeHelper } from "./helpers/challengeModeHelper"; import { MoveHelper } from "./helpers/moveHelper"; import { OverridesHelper } from "./helpers/overridesHelper"; import { SettingsHelper } from "./helpers/settingsHelper"; +import { ReloadHelper } from "./helpers/reloadHelper"; +import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; /** * Class to manage the game state and transitions between phases. @@ -61,6 +63,7 @@ export default class GameManager { public readonly dailyMode: DailyModeHelper; public readonly challengeMode: ChallengeModeHelper; public readonly settings: SettingsHelper; + public readonly reload: ReloadHelper; /** * Creates an instance of GameManager. @@ -82,6 +85,7 @@ export default class GameManager { this.dailyMode = new DailyModeHelper(this); this.challengeMode = new ChallengeModeHelper(this); this.settings = new SettingsHelper(this); + this.reload = new ReloadHelper(this); } /** @@ -231,12 +235,12 @@ export default class GameManager { this.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { const handler = this.scene.ui.getHandler() as ModifierSelectUiHandler; handler.processInput(Button.CANCEL); - }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase), true); + }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase) || this.isCurrentPhase(CheckSwitchPhase), true); this.onNextPrompt("SelectModifierPhase", Mode.CONFIRM, () => { const handler = this.scene.ui.getHandler() as ModifierSelectUiHandler; handler.processInput(Button.ACTION); - }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase)); + }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase) || this.isCurrentPhase(CheckSwitchPhase)); } forceOpponentToSwitch() { diff --git a/src/test/utils/helpers/reloadHelper.ts b/src/test/utils/helpers/reloadHelper.ts new file mode 100644 index 00000000000..c15347b08c9 --- /dev/null +++ b/src/test/utils/helpers/reloadHelper.ts @@ -0,0 +1,53 @@ +import { GameManagerHelper } from "./gameManagerHelper"; +import { TitlePhase } from "#app/phases/title-phase"; +import { Mode } from "#app/ui/ui"; +import { vi } from "vitest"; +import { BattleStyle } from "#app/enums/battle-style"; +import { CommandPhase } from "#app/phases/command-phase"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; + +/** + * Helper to allow reloading sessions in unit tests. + */ +export class ReloadHelper extends GameManagerHelper { + /** + * Simulate reloading the session from the title screen, until reaching the + * beginning of the first turn (equivalent to running `startBattle()`) for + * the reloaded session. + */ + async reloadSession() : Promise { + const scene = this.game.scene; + const sessionData = scene.gameData.getSessionSaveData(scene); + const titlePhase = new TitlePhase(scene); + + scene.clearPhaseQueue(); + + // Set the last saved session to the desired session data + vi.spyOn(scene.gameData, "getSession").mockReturnValue( + new Promise((resolve, reject) => { + resolve(sessionData); + }) + ); + scene.unshiftPhase(titlePhase); + this.game.endPhase(); // End the currently ongoing battle + + titlePhase.loadSaveSlot(-1); // Load the desired session data + this.game.phaseInterceptor.shift(); // Loading the save slot also ended TitlePhase, clean it up + + // Run through prompts for switching Pokemon, copied from classicModeHelper.ts + if (this.game.scene.battleStyle === BattleStyle.SWITCH) { + this.game.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => { + this.game.setMode(Mode.MESSAGE); + this.game.endPhase(); + }, () => this.game.isCurrentPhase(CommandPhase) || this.game.isCurrentPhase(TurnInitPhase)); + + this.game.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => { + this.game.setMode(Mode.MESSAGE); + this.game.endPhase(); + }, () => this.game.isCurrentPhase(CommandPhase) || this.game.isCurrentPhase(TurnInitPhase)); + } + + await this.game.phaseInterceptor.to(CommandPhase); + console.log("==================[New Turn]=================="); + } +} diff --git a/src/test/utils/phaseInterceptor.ts b/src/test/utils/phaseInterceptor.ts index 389ae36635a..1141d0bf0d9 100644 --- a/src/test/utils/phaseInterceptor.ts +++ b/src/test/utils/phaseInterceptor.ts @@ -11,12 +11,14 @@ import { EndEvolutionPhase } from "#app/phases/end-evolution-phase"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { EvolutionPhase } from "#app/phases/evolution-phase"; import { FaintPhase } from "#app/phases/faint-phase"; +import { LevelCapPhase } from "#app/phases/level-cap-phase"; import { LoginPhase } from "#app/phases/login-phase"; import { MessagePhase } from "#app/phases/message-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MovePhase } from "#app/phases/move-phase"; import { NewBattlePhase } from "#app/phases/new-battle-phase"; +import { NewBiomeEncounterPhase } from "#app/phases/new-biome-encounter-phase"; import { NextEncounterPhase } from "#app/phases/next-encounter-phase"; import { PostSummonPhase } from "#app/phases/post-summon-phase"; import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; @@ -62,6 +64,7 @@ export default class PhaseInterceptor { [TitlePhase, this.startPhase], [SelectGenderPhase, this.startPhase], [EncounterPhase, this.startPhase], + [NewBiomeEncounterPhase, this.startPhase], [SelectStarterPhase, this.startPhase], [PostSummonPhase, this.startPhase], [SummonPhase, this.startPhase], @@ -96,6 +99,7 @@ export default class PhaseInterceptor { [PartyHealPhase, this.startPhase], [EvolutionPhase, this.startPhase], [EndEvolutionPhase, this.startPhase], + [LevelCapPhase, this.startPhase], ]; private endBySetMode = [ @@ -237,6 +241,22 @@ export default class PhaseInterceptor { this.scene.shiftPhase(); } + /** + * Remove the current phase from the phase interceptor. + * + * Do not call this unless absolutely necessary. This function is intended + * for cleaning up the phase interceptor when, for whatever reason, a phase + * is manually ended without using the phase interceptor. + * + * @param shouldRun Whether or not the current scene should also be run. + */ + shift(shouldRun: boolean = false) : void { + this.onHold.shift(); + if (shouldRun) { + this.scene.shiftPhase(); + } + } + /** * Method to initialize phases and their corresponding methods. */ From 3242a35341823ba9d81c8975022ebfeebdaba881 Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:13:29 -0700 Subject: [PATCH 14/91] [Misc][UI] Default Cursor Positioning for Command / Fight / Party (#4008) * Cursor Pos. should match mainline * Fixed command mode behavior --------- Co-authored-by: frutescens --- src/ui/command-ui-handler.ts | 14 +++++++++----- src/ui/fight-ui-handler.ts | 8 ++++++-- src/ui/party-ui-handler.ts | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index b22ea5d20fc..27ff923e9a3 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -68,7 +68,11 @@ export default class CommandUiHandler extends UiHandler { messageHandler.movesWindowContainer.setVisible(false); messageHandler.message.setWordWrapWidth(1110); messageHandler.showText(i18next.t("commandUiHandler:actionMessage", {pokemonName: getPokemonNameWithAffix(commandPhase.getPokemon())}), 0); - this.setCursor(this.getCursor()); + if (this.getCursor() === Command.POKEMON) { + this.setCursor(Command.FIGHT); + } else { + this.setCursor(this.getCursor()); + } return true; } @@ -85,7 +89,7 @@ export default class CommandUiHandler extends UiHandler { if (button === Button.ACTION) { switch (cursor) { // Fight - case 0: + case Command.FIGHT: if ((this.scene.getCurrentPhase() as CommandPhase).checkFightOverride()) { return true; } @@ -93,17 +97,17 @@ export default class CommandUiHandler extends UiHandler { success = true; break; // Ball - case 1: + case Command.BALL: ui.setModeWithoutClear(Mode.BALL); success = true; break; // Pokemon - case 2: + case Command.POKEMON: ui.setMode(Mode.PARTY, PartyUiMode.SWITCH, (this.scene.getCurrentPhase() as CommandPhase).getPokemon().getFieldIndex(), null, PartyUiHandler.FilterNonFainted); success = true; break; // Run - case 3: + case Command.RUN: (this.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.RUN, 0); success = true; break; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 0beaddbb517..4bbe88dabd9 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -95,9 +95,13 @@ export default class FightUiHandler extends UiHandler { messageHandler.bg.setVisible(false); messageHandler.commandWindow.setVisible(false); messageHandler.movesWindowContainer.setVisible(true); - this.setCursor(this.getCursor()); + const pokemon = (this.scene.getCurrentPhase() as CommandPhase).getPokemon(); + if (pokemon.battleSummonData.turnCount <= 1) { + this.setCursor(0); + } else { + this.setCursor(this.getCursor()); + } this.displayMoves(); - return true; } diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 176a7098347..98a19402a2b 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -311,7 +311,7 @@ export default class PartyUiHandler extends MessageUiHandler { this.partyContainer.setVisible(true); this.partyBg.setTexture(`party_bg${this.scene.currentBattle.double ? "_double" : ""}`); this.populatePartySlots(); - this.setCursor(this.cursor < 6 ? this.cursor : 0); + this.setCursor(0); return true; } From 4e3a24c247b0f8a8f0e48b53340f03d8a29fd87e Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:19:05 -0700 Subject: [PATCH 15/91] [Localization] [ES] 5 files reviewed and finish. [Ready] (#3921) * Translate party-ui-handler.json via GitLocalize * Translate party-ui-handler.json via GitLocalize * Translate arena-tag.json via GitLocalize * Translate arena-tag.json via GitLocalize * Translate battler-tags.json via GitLocalize * Translate battler-tags.json via GitLocalize * Translate arena-flyout.json via GitLocalize * Translate game-mode.json via GitLocalize * Update src/locales/es/arena-tag.json Co-authored-by: Asdar * Update src/locales/es/battler-tags.json Co-authored-by: Asdar * Update src/locales/es/battler-tags.json Co-authored-by: Asdar * Update src/locales/es/arena-tag.json --------- Co-authored-by: Asdar Co-authored-by: Rafa Co-authored-by: Lugiad Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> --- src/locales/es/arena-flyout.json | 16 +++---- src/locales/es/arena-tag.json | 49 +++++++++++++++++++ src/locales/es/battler-tags.json | 72 +++++++++++++++++++++++++++- src/locales/es/game-mode.json | 12 ++--- src/locales/es/party-ui-handler.json | 23 +++++---- 5 files changed, 148 insertions(+), 24 deletions(-) diff --git a/src/locales/es/arena-flyout.json b/src/locales/es/arena-flyout.json index b2881b5de76..e3ec1dc6d4a 100644 --- a/src/locales/es/arena-flyout.json +++ b/src/locales/es/arena-flyout.json @@ -1,21 +1,21 @@ { - "activeBattleEffects": "Efectos de Terreno Activos", + "activeBattleEffects": "Efectos de terreno activos", "player": "Jugador", "neutral": "Neutral", "enemy": "Enemigo", "sunny": "Sol", "rain": "Lluvia", - "sandstorm": "Tormenta de Arena", + "sandstorm": "Tormenta de arena", "hail": "Granizo", "snow": "Nieve", "fog": "Niebla", "heavyRain": "Diluvio", - "harshSun": "Sol Abrasador", + "harshSun": "Sol abrasador", "strongWinds": "Turbulencias", - "misty": "Campo de Niebla", - "electric": "Campo Eléctrico", - "grassy": "Campo de Hierba", - "psychic": "Campo Psíquico", + "misty": "Campo de niebla", + "electric": "Campo eléctrico", + "grassy": "Campo de hierba", + "psychic": "Campo psíquico", "mudSport": "Chapoteo Lodo", "waterSport": "Hidrochorro", "spikes": "Púas", @@ -37,4 +37,4 @@ "craftyShield": "Truco Defensa", "tailwind": "Viento Afín", "happyHour": "Paga Extra" -} \ No newline at end of file +} diff --git a/src/locales/es/arena-tag.json b/src/locales/es/arena-tag.json index 913876ddf87..0f63b62e784 100644 --- a/src/locales/es/arena-tag.json +++ b/src/locales/es/arena-tag.json @@ -1,4 +1,53 @@ { + "yourTeam": "tu equipo", + "opposingTeam": "el equipo rival", + "arenaOnRemove": "Los efectos de {{moveName}} desaparecieron.", + "arenaOnRemovePlayer": "Los efectos de {{moveName}}\ndesaparecieron en tu bando.", + "arenaOnRemoveEnemy": "Los efectos de {{moveName}}\ndesaparecieron en el bando rival.", + "mistOnAdd": "¡Neblina de {{pokemonNameWithAffix}}\nha cubierto a su equipo!", + "mistApply": "¡La neblina evita los cambios de estadísticas!", + "reflectOnAdd": "¡Reflejo redujo el daño físico!", + "reflectOnAddPlayer": "¡Reflejo redujo el daño físico en tu bando!", + "reflectOnAddEnemy": "Reflejo redujo el daño físico en el bando rival.", + "lightScreenOnAdd": "¡Pantalla de Luz redujo el daño físico!", + "lightScreenOnAddPlayer": "¡Pantalla de Luz redujo el daño físico en tu bando!", + "lightScreenOnAddEnemy": "¡Pantalla de Luz redujo el daño físico en el bando enemigo!", + "auroraVeilOnAdd": "¡Velo Aurora redujo el daño físico!", + "auroraVeilOnAddPlayer": "¡Velo Aurora redujo el daño físico en tu bando!", + "auroraVeilOnAddEnemy": "¡Velo Aurora redujo el daño físico en el bando rival!", + "conditionalProtectOnAdd": "¡{{moveName}} protege a su bando!", + "conditionalProtectOnAddPlayer": "¡{{moveName}} protege a tu bando!", + "conditionalProtectOnAddEnemy": "¡{{moveName}} protege al bando rival!", + "conditionalProtectApply": "¡{{pokemonNameWithAffix}} ha sido protegido por {{moveName}}!", + "matBlockOnAdd": "¡{{pokemonNameWithAffix}} va a usar un tatami para bloquear ataques!", + "noCritOnAddPlayer": "¡{{moveName}} protege a tu bando de golpes críticos!", + "noCritOnAddEnemy": "¡{{moveName}} protege al bando rival de golpes críticos!", + "noCritOnRemove": "¡Los efectos de {{moveName}} de {{pokemonNameWithAffix}} se han disipado!", + "wishTagOnAdd": "¡El deseo de {{pokemonNameWithAffix}} se ha hecho realidad!", + "mudSportOnAdd": "¡Se han debilitado los ataques de tipo Eléctrico!", + "mudSportOnRemove": "Chapoteo Lodo ha dejado de surtir efecto.", + "waterSportOnAdd": "¡Se han debilitado los ataques\nde tipo Fuego!", + "waterSportOnRemove": "Hidrochorro ha dejado de surtir efecto.", + "spikesOnAdd": "¡El equipo de {{opponentDesc}} ha sido rodeado por {{moveName}}!", + "spikesActivateTrap": "¡Las púas han herido a {{pokemonNameWithAffix}}!", + "toxicSpikesOnAdd": "¡El equipo de {{opponentDesc}} ha sido rodeado por {{moveName}}!", + "toxicSpikesActivateTrapPoison": "¡{{pokemonNameWithAffix}} ha sido herido por {{moveName}}!", + "stealthRockOnAdd": "¡El equipo de {{opponentDesc}} ha sido rodeado por piedras puntiagudas!", + "stealthRockActivateTrap": "¡Unas piedras puntiagudas han dañado a {{pokemonNameWithAffix}}!", + "stickyWebOnAdd": "¡Una {{moveName}} se extiende a los pies del bando rival!", + "stickyWebActivateTrap": "¡{{pokemonName}} ha caído en una red viscosa!", + "trickRoomOnAdd": "¡{{pokemonNameWithAffix}} ha alterado las dimensiones!", + "trickRoomOnRemove": "Se han restaurado las dimensiones alteradas.", + "gravityOnAdd": "¡La gravedad se ha incrementado!", + "gravityOnRemove": "La gravedad ha vuelto a su estado normal.", + "tailwindOnAdd": "¡Sopla un viento afín!", + "tailwindOnAddPlayer": "¡El viento sopla a favor de tu bando!", + "tailwindOnAddEnemy": "¡El viento sopla a favor del bando rival!", + "tailwindOnRemove": "Ha dejado de soplar el viento afín.", + "tailwindOnRemovePlayer": "Ha dejado de soplar el viento que favorecía a tu equipo.", + "tailwindOnRemoveEnemy": "Ha dejado de soplar el viento que favorecía al bando rival.", + "happyHourOnAdd": "¡La felicidad se respira en el aire!", + "happyHourOnRemove": "La felicidad ya no se respira en el aire.", "safeguardOnAdd": "¡Todos los Pokémon están protegidos por Velo Sagrado!", "safeguardOnAddPlayer": "¡Tu equipo se ha protegido con Velo Sagrado!", "safeguardOnAddEnemy": "¡El equipo enemigo se ha protegido con Velo Sagrado!", diff --git a/src/locales/es/battler-tags.json b/src/locales/es/battler-tags.json index 9e26dfeeb6e..d917b6c74b5 100644 --- a/src/locales/es/battler-tags.json +++ b/src/locales/es/battler-tags.json @@ -1 +1,71 @@ -{} \ No newline at end of file +{ + "trappedDesc": "trampa", + "flinchedDesc": "retroceso", + "confusedDesc": "confusión", + "infatuatedDesc": "enamoramiento", + "seedDesc": "drenado", + "nightmareDesc": "pesadillas", + "ingrainDesc": "raíces", + "drowsyDesc": "sueño", + "rechargingLapse": "¡{{pokemonNameWithAffix}} necesita\nrecuperarse de su ataque!", + "trappedOnAdd": "¡{{pokemonNameWithAffix}} no puede escapar!", + "trappedOnRemove": "¡{{pokemonNameWithAffix}} se ha\nliberado de {{moveName}}!", + "flinchedLapse": "¡{{pokemonNameWithAffix}} se amedrentó!", + "confusedOnAdd": "¡{{pokemonNameWithAffix}} se encuentra confuso!", + "confusedOnRemove": "¡{{pokemonNameWithAffix}} ya no está confuso!", + "confusedOnOverlap": "¡{{pokemonNameWithAffix}} ya está confuso!", + "confusedLapse": "¡{{pokemonNameWithAffix}} está confuso!", + "confusedLapseHurtItself": "¡Está tan confuso que se ha herido a sí mismo!", + "destinyBondLapseIsBoss": "Mismo Destino no afecta a {{pokemonNameWithAffix}}.", + "destinyBondLapse": "¡{{pokemonNameWithAffix2}} ha sufrido\nel mismo destino que {{pokemonNameWithAffix}}!", + "infatuatedOnAdd": "¡{{pokemonNameWithAffix}} se ha enamorado\nde {{sourcePokemonName}}!", + "infatuatedOnOverlap": "¡{{pokemonNameWithAffix}} ya está enamorado!", + "infatuatedLapse": "¡{{pokemonNameWithAffix}} se ha enamorado\ndebido a {{sourcePokemonName}}!", + "infatuatedLapseImmobilize": "¡El enamoramiento impide que\n{{pokemonNameWithAffix}} reaccione!", + "infatuatedOnRemove": "{{pokemonNameWithAffix}} ya no está enamorado.", + "seededOnAdd": "¡{{pokemonNameWithAffix}} ha sido infectado!", + "seededLapse": "¡Las drenadoras han restado salud a {{pokemonNameWithAffix}}!", + "seededLapseShed": "¡{{pokemonNameWithAffix}} ha absorbido el lodo líquido!", + "nightmareOnAdd": "¡{{pokemonNameWithAffix}} se ha sumido en una pesadilla!", + "nightmareOnOverlap": "¡{{pokemonNameWithAffix}} ya está teniendo pesadillas!", + "nightmareLapse": "¡{{pokemonNameWithAffix}} sufre pesadillas!", + "encoreOnAdd": "¡{{pokemonNameWithAffix}} sufre los efectos de Otra Vez!", + "encoreOnRemove": "¡{{pokemonNameWithAffix}} ya no sufre los efectos de Otra Vez!", + "helpingHandOnAdd": "¡{{pokemonNameWithAffix}} se prepara\npara ayudar a {{pokemonName}}!", + "ingrainLapse": "¡{{pokemonNameWithAffix}} ha absorbido\nnutrientes a través de sus raíces!", + "ingrainOnTrap": "¡{{pokemonNameWithAffix}} ha echado raíces!", + "aquaRingOnAdd": "¡{{pokemonNameWithAffix}} se ha rodeado de un manto de agua!", + "aquaRingLapse": "¡{{pokemonName}} restauró sus PS con {{moveName}}!", + "drowsyOnAdd": "¡{{pokemonNameWithAffix}} empieza a tener sueño!", + "damagingTrapLapse": "¡{{moveName}} hiere a {{pokemonNameWithAffix}}!", + "bindOnTrap": "¡{{moveName}} de {{sourcePokemonName}} oprime a {{pokemonNameWithAffix}}!", + "wrapOnTrap": "¡{{sourcePokemonName}} ha atrapado a {{pokemonNameWithAffix}} con una constricción!", + "vortexOnTrap": "¡{{pokemonNameWithAffix}} no puede salir del torbellino!", + "clampOnTrap": "¡{{sourcePokemonNameWithAffix}} ha atenazado a \n{{pokemonName}}!", + "sandTombOnTrap": "¡{{pokemonNameWithAffix}} ha sido atrapado por {{moveName}}!", + "magmaStormOnTrap": "¡La lluvia ígnea cae sobre {{pokemonNameWithAffix}}!", + "snapTrapOnTrap": "¡{{pokemonNameWithAffix}} cayó en un cepo!", + "thunderCageOnTrap": "¡{{sourcePokemonNameWithAffix}} ha enjaulado a {{pokemonNameWithAffix}}!", + "infestationOnTrap": "¡{{pokemonNameWithAffix}} es presa del acoso de {{sourcePokemonNameWithAffix}}!", + "protectedOnAdd": "{{pokemonNameWithAffix}}\nse está protegiendo.", + "protectedLapse": "¡{{pokemonNameWithAffix}}\nse ha protegido!", + "enduringOnAdd": "{{pokemonNameWithAffix}} se prepara para resistir los ataques...", + "enduringLapse": "¡{{pokemonNameWithAffix}} ha encajado el golpe!", + "sturdyLapse": "¡{{pokemonNameWithAffix}} ha encajado el golpe!", + "perishSongLapse": "La cuenta atrás de Canto Mortal de\n{{pokemonNameWithAffix}} ha bajado a {{turnCount}}.", + "centerOfAttentionOnAdd": "¡{{pokemonNameWithAffix}} es el centro de atención!", + "truantLapse": "{{pokemonNameWithAffix}} está holgazaneando...", + "slowStartOnAdd": "¡{{pokemonNameWithAffix}} no está dando todo de sí!", + "slowStartOnRemove": "¡{{pokemonNameWithAffix}} ya puede darlo todo!", + "highestStatBoostOnAdd": "¡{{pokemonNameWithAffix}} ha reforzado su {{statName}}!", + "highestStatBoostOnRemove": "¡Los efectos de {{abilityName}}\nde {{pokemonNameWithAffix}} han desaparecido!", + "magnetRisenOnAdd": "¡{{pokemonNameWithAffix}} levita gracias a un campo electromagnético!", + "magnetRisenOnRemove": "¡El campo electromagnético de {{pokemonNameWithAffix}} se ha disipado!", + "critBoostOnAdd": "¡{{pokemonNameWithAffix}} se está preparando para luchar!", + "critBoostOnRemove": "{{pokemonNameWithAffix}} se ha relajado.", + "saltCuredOnAdd": "¡{{pokemonNameWithAffix}} está en salazón!", + "saltCuredLapse": "¡{{moveName}} ha herido a {{pokemonNameWithAffix}}!", + "cursedOnAdd": "¡{{pokemonNameWithAffix}} sacrifica algunos PS y maldice a {{pokemonName}}!", + "cursedLapse": "¡{{pokemonNameWithAffix}} es víctima de una maldición!", + "stockpilingOnAdd": "¡{{pokemonNameWithAffix}} ha reservado energía por {{stockpiledCount}}ª vez!" +} diff --git a/src/locales/es/game-mode.json b/src/locales/es/game-mode.json index e7925900253..0dbccb45e1f 100644 --- a/src/locales/es/game-mode.json +++ b/src/locales/es/game-mode.json @@ -1,8 +1,8 @@ { - "classic": "Clásica", - "endless": "Infinita", - "endlessSpliced": "Infinita (Fusión)", - "dailyRun": "Diaria", - "unknown": "Desconicido", + "classic": "Clásico", + "endless": "Infinito", + "endlessSpliced": "Infinito (Fusión)", + "dailyRun": "Diario", + "unknown": "Desconocido", "challenge": "Desafío" -} \ No newline at end of file +} diff --git a/src/locales/es/party-ui-handler.json b/src/locales/es/party-ui-handler.json index 65552a1e1d5..0e59aee6fd1 100644 --- a/src/locales/es/party-ui-handler.json +++ b/src/locales/es/party-ui-handler.json @@ -1,4 +1,9 @@ { + "SEND_OUT": "Enviar", + "SUMMARY": "Resumen", + "CANCEL": "Cancelar", + "RELEASE": "Liberar", + "APPLY": "Aplicar", "TEACH": "Enseñar", "SPLICE": "Fusionar", "UNSPLICE": "Separar", @@ -7,23 +12,23 @@ "TRANSFER": "Transferir", "ALL": "Todo", "PASS_BATON": "Relevo", - "UNPAUSE_EVOLUTION": "Reanudar Evolución", + "UNPAUSE_EVOLUTION": "Reanudar evolución", "REVIVE": "Revivir", "RENAME": "Rename", "choosePokemon": "Elige a un Pokémon.", "doWhatWithThisPokemon": "¿Que quieres hacer con este Pokémon?", - "noEnergy": "¡A {{pokemonName}} no le quedan\nfuerzas para luchar!", - "hasEnergy": "¡A {{pokemonName}} le quedan\nfuerzas para luchar!", - "cantBeUsed": "¡{{pokemonName}} no puede usarse\nen este desafío!", - "tooManyItems": "¡{{pokemonName}} tiene demasiados\nde este objeto!", + "noEnergy": "¡A {{pokemonName}} no le\nquedan fuerzas para luchar!", + "hasEnergy": "¡A {{pokemonName}} le\nquedan fuerzas para luchar!", + "cantBeUsed": "¡{{pokemonName}} no puede usarse en este desafío!", + "tooManyItems": "¡{{pokemonName}} tiene\ndemasiado de este objeto!", "anyEffect": "No tendría ningún efecto.", - "unpausedEvolutions": "Se reanudó las evoluciones de {{pokemonName}}.", + "unpausedEvolutions": "Se reanudaron las evoluciones de {{pokemonName}}.", "unspliceConfirmation": "¿Seguro que quiere separar a {{fusionName}}\nde {{pokemonName}}? {{fusionName}} se perderá.", "wasReverted": "{{fusionName}} se revirtió a {{pokemonName}}.", "releaseConfirmation": "¿Quieres liberar a {{pokemonName}}?", "releaseInBattle": "¡No puedes liberar un Pokémon que está en batalla!", "selectAMove": "Selecciona un movimiento.", - "changeQuantity": "Selecciona un objeto equipado para transferir.\nUsa < y > para cambiar la cantidad.", + "changeQuantity": "Selecciona un ítem para transferir.\nUsa < y > para calibrar.", "selectAnotherPokemonToSplice": "Selecciona otro Pokémon para fusionar.", "cancel": "Salir", "able": "Apto", @@ -36,7 +41,7 @@ "thisIsWhereWePart": "¡Aquí es donde nos despedimos, {{pokemonName}}!", "illMissYou": "¡Te echaré de menos, {{pokemonName}}!", "illNeverForgetYou": "¡Nunca te olvidaré, {{pokemonName}}!", - "untilWeMeetAgain": "¡Hasta que nos volvamos a encontrar, {{pokemonName}}!", + "untilWeMeetAgain": "¡Hasta que nos volvamos a\nencontrar, {{pokemonName}}!", "sayonara": "¡Sayonara, {{pokemonName}}!", "smellYaLater": "¡Nos vemos luego, {{pokemonName}}!" -} \ No newline at end of file +} From f63492d54569843016453e2ba1c7424c1d436f87 Mon Sep 17 00:00:00 2001 From: Frederico Santos Date: Wed, 4 Sep 2024 01:56:37 +0100 Subject: [PATCH 16/91] chore: Update merge_group configuration in GitHub workflows --- .github/workflows/eslint.yml | 2 ++ .github/workflows/github-pages.yml | 2 ++ .github/workflows/tests.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 9068f1ae9a2..2850418bc59 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -11,6 +11,8 @@ on: branches: - main # Trigger on pull request events targeting the main branch - beta # Trigger on pull request events targeting the beta branch + merge_group: + types: [checks_requested] jobs: run-linters: # Define a job named "run-linters" diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 3b7617c45f4..a092ccb425a 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -8,6 +8,8 @@ on: branches: - main - beta + merge_group: + types: [checks_requested] jobs: pages: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ce1d1c5038..adac45519ab 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,8 @@ on: branches: - main # Trigger on pull request events targeting the main branch - beta # Trigger on pull request events targeting the beta branch + merge_group: + types: [checks_requested] jobs: run-tests: # Define a job named "run-tests" From 200deef0edc496d57f1d494825b23c127802c813 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:07:56 +0800 Subject: [PATCH 17/91] [P1 Bug][UI/UX] Address shop cursor target feedbacks (#4009) * address shop cursor target feedbacks * make rewards left-most * fix tests breaking * Update src/test/items/dire_hit.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/items/temp_stat_stage_booster.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/locales/ja/settings.json Co-authored-by: Chapybara-jp * update default value * stylistic change --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: Chapybara-jp --- src/battle-scene.ts | 2 +- src/enums/shop-cursor-target.ts | 12 ++-- src/locales/de/settings.json | 2 +- src/locales/en/settings.json | 2 +- src/locales/es/settings.json | 2 +- src/locales/fr/settings.json | 2 +- src/locales/it/settings.json | 2 +- src/locales/ja/settings.json | 2 +- src/locales/ko/settings.json | 2 +- src/locales/pt_BR/settings.json | 2 +- src/locales/zh_CN/settings.json | 2 +- src/system/settings/settings.ts | 67 ++++++++++++------- src/test/items/dire_hit.test.ts | 5 +- .../items/temp_stat_stage_booster.test.ts | 5 +- src/ui/modifier-select-ui-handler.ts | 3 + 15 files changed, 69 insertions(+), 43 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index c9f7362728a..4cc3f69ebee 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -130,7 +130,7 @@ export default class BattleScene extends SceneBase { public gameSpeed: integer = 1; public damageNumbersMode: integer = 0; public reroll: boolean = false; - public shopCursorTarget: number = ShopCursorTarget.CHECK_TEAM; + public shopCursorTarget: number = ShopCursorTarget.REWARDS; public showMovesetFlyout: boolean = true; public showArenaFlyout: boolean = true; public showTimeOfDayWidget: boolean = true; diff --git a/src/enums/shop-cursor-target.ts b/src/enums/shop-cursor-target.ts index d2f72fed0d6..11f524399b2 100644 --- a/src/enums/shop-cursor-target.ts +++ b/src/enums/shop-cursor-target.ts @@ -1,13 +1,13 @@ /** - * Determines the cursor target when entering the shop phase. + * Determines the row cursor target when entering the shop phase. */ export enum ShopCursorTarget { - /** Cursor points to Reroll */ + /** Cursor points to Reroll row */ REROLL, - /** Cursor points to Items */ - ITEMS, - /** Cursor points to Shop */ + /** Cursor points to Rewards row */ + REWARDS, + /** Cursor points to Shop row */ SHOP, - /** Cursor points to Check Team */ + /** Cursor points to Check Team row */ CHECK_TEAM } diff --git a/src/locales/de/settings.json b/src/locales/de/settings.json index d72a026cf5a..31406f28d17 100644 --- a/src/locales/de/settings.json +++ b/src/locales/de/settings.json @@ -100,7 +100,7 @@ "moveTouchControls": "Bewegung Touch Steuerung", "shopOverlayOpacity": "Shop Overlay Deckkraft", "shopCursorTarget": "Shop-Cursor Ziel", - "items": "Items", + "rewards": "Items", "reroll": "Neu rollen", "shop": "Shop", "checkTeam": "Team überprüfen" diff --git a/src/locales/en/settings.json b/src/locales/en/settings.json index 6528f0368fe..301ebea9b2b 100644 --- a/src/locales/en/settings.json +++ b/src/locales/en/settings.json @@ -100,7 +100,7 @@ "moveTouchControls": "Move Touch Controls", "shopOverlayOpacity": "Shop Overlay Opacity", "shopCursorTarget": "Shop Cursor Target", - "items": "Items", + "rewards": "Rewards", "reroll": "Reroll", "shop": "Shop", "checkTeam": "Check Team" diff --git a/src/locales/es/settings.json b/src/locales/es/settings.json index 9c16fbb0fd6..dc441d48eb8 100644 --- a/src/locales/es/settings.json +++ b/src/locales/es/settings.json @@ -100,7 +100,7 @@ "moveTouchControls": "Controles táctiles", "shopOverlayOpacity": "Opacidad de la fase de compra", "shopCursorTarget": "Cursor de la tienda", - "items": "Objetos", + "rewards": "Objetos", "reroll": "Actualizar", "shop": "Tienda", "checkTeam": "Ver equipo" diff --git a/src/locales/fr/settings.json b/src/locales/fr/settings.json index 181a593cc99..c752b336b6e 100644 --- a/src/locales/fr/settings.json +++ b/src/locales/fr/settings.json @@ -100,7 +100,7 @@ "moveTouchControls": "Déplacer les contrôles tactiles", "shopOverlayOpacity": "Opacité boutique", "shopCursorTarget": "Choix après relance", - "items": "Obj. gratuits", + "rewards": "Obj. gratuits", "reroll": "Relance", "shop": "Boutique", "checkTeam": "Équipe" diff --git a/src/locales/it/settings.json b/src/locales/it/settings.json index 381503f21bd..c09f5e22d4d 100644 --- a/src/locales/it/settings.json +++ b/src/locales/it/settings.json @@ -8,7 +8,7 @@ "moveTouchControls": "Move Touch Controls", "shopOverlayOpacity": "Opacità Finestra Negozio", "shopCursorTarget": "Target Cursore Negozio", - "items": "Oggetti", + "rewards": "Oggetti", "reroll": "Rerolla", "shop": "Negozio", "checkTeam": "Squadra" diff --git a/src/locales/ja/settings.json b/src/locales/ja/settings.json index 4cb10c670de..55d39ee70a4 100644 --- a/src/locales/ja/settings.json +++ b/src/locales/ja/settings.json @@ -100,7 +100,7 @@ "moveTouchControls": "タッチ移動操作", "shopOverlayOpacity": "ショップオーバレイ不透明度", "shopCursorTarget": "ショップカーソル初位置", - "items": "アイテム", + "rewards": "ご褒美", "reroll": "選択肢変更", "shop": "ショップ", "checkTeam": "手持ちを確認" diff --git a/src/locales/ko/settings.json b/src/locales/ko/settings.json index b7fc01cb148..c10046385e1 100644 --- a/src/locales/ko/settings.json +++ b/src/locales/ko/settings.json @@ -100,7 +100,7 @@ "moveTouchControls": "터치 컨트롤 이동", "shopOverlayOpacity": "상점 오버레이 투명도", "shopCursorTarget": "상점 커서 위치", - "items": "아이템", + "rewards": "아이템", "reroll": "갱신", "shop": "상점", "checkTeam": "파티 확인" diff --git a/src/locales/pt_BR/settings.json b/src/locales/pt_BR/settings.json index 58ccb45f86d..74f3918bed8 100644 --- a/src/locales/pt_BR/settings.json +++ b/src/locales/pt_BR/settings.json @@ -100,7 +100,7 @@ "moveTouchControls": "Mover Controles de Toque", "shopOverlayOpacity": "Opacidade da Loja", "shopCursorTarget": "Alvo do Cursor da Loja", - "items": "Itens", + "rewards": "Itens", "reroll": "Atualizar", "shop": "Loja", "checkTeam": "Checar Time" diff --git a/src/locales/zh_CN/settings.json b/src/locales/zh_CN/settings.json index 3ae0fa8204c..dd001213b9e 100644 --- a/src/locales/zh_CN/settings.json +++ b/src/locales/zh_CN/settings.json @@ -99,7 +99,7 @@ "moveTouchControls": "移动触摸控制", "shopOverlayOpacity": "商店显示不透明度", "shopCursorTarget": "商店指针位置", - "items": "道具", + "rewards": "道具", "reroll": "刷新", "shop": "购买", "checkTeam": "检查队伍" diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 7b0fea95a98..6b46b6fe96c 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -25,6 +25,7 @@ const VOLUME_OPTIONS: SettingOption[] = new Array(11).fill(null).map((_, i) => i value: "Mute", label: getTranslation("settings:mute") }); + const SHOP_OVERLAY_OPACITY_OPTIONS: SettingOption[] = new Array(9).fill(null).map((_, i) => { const value = ((i + 1) * 10).toString(); return { @@ -32,6 +33,7 @@ const SHOP_OVERLAY_OPACITY_OPTIONS: SettingOption[] = new Array(9).fill(null).ma label: value, }; }); + const OFF_ON: SettingOption[] = [ { value: "Off", @@ -53,6 +55,40 @@ const AUTO_DISABLED: SettingOption[] = [ } ]; +const SHOP_CURSOR_TARGET_OPTIONS: SettingOption[] = [ + { + value: "Rewards", + label: i18next.t("settings:rewards") + }, + { + value: "Shop", + label: i18next.t("settings:shop") + }, + { + value: "Reroll", + label: i18next.t("settings:reroll") + }, + { + value: "Check Team", + label: i18next.t("settings:checkTeam") + } +]; + +const shopCursorTargetIndexMap = SHOP_CURSOR_TARGET_OPTIONS.map(option => { + switch (option.value) { + case "Rewards": + return ShopCursorTarget.REWARDS; + case "Shop": + return ShopCursorTarget.SHOP; + case "Reroll": + return ShopCursorTarget.REROLL; + case "Check Team": + return ShopCursorTarget.CHECK_TEAM; + default: + throw new Error(`Unknown value: ${option.value}`); + } +}); + /** * Types for helping separate settings to different menus */ @@ -103,7 +139,7 @@ export const SettingKeys = { Damage_Numbers: "DAMAGE_NUMBERS", Move_Animations: "MOVE_ANIMATIONS", Show_Stats_on_Level_Up: "SHOW_LEVEL_UP_STATS", - Reroll_Target: "REROLL_TARGET", + Shop_Cursor_Target: "SHOP_CURSOR_TARGET", Candy_Upgrade_Notification: "CANDY_UPGRADE_NOTIFICATION", Candy_Upgrade_Display: "CANDY_UPGRADE_DISPLAY", Move_Info: "MOVE_INFO", @@ -596,27 +632,10 @@ export const Setting: Array = [ isHidden: () => !hasTouchscreen() }, { - key: SettingKeys.Reroll_Target, + key: SettingKeys.Shop_Cursor_Target, label: i18next.t("settings:shopCursorTarget"), - options: [ - { - value:"Reroll", - label: i18next.t("settings:reroll") - }, - { - value:"Items", - label: i18next.t("settings:items") - }, - { - value:"Shop", - label: i18next.t("settings:shop") - }, - { - value:"Check Team", - label: i18next.t("settings:checkTeam") - } - ], - default: ShopCursorTarget.CHECK_TEAM, + options: SHOP_CURSOR_TARGET_OPTIONS, + default: 0, type: SettingType.DISPLAY }, { @@ -758,8 +777,10 @@ export function setSetting(scene: BattleScene, setting: string, value: integer): case SettingKeys.Show_Stats_on_Level_Up: scene.showLevelUpStats = Setting[index].options[value].value === "On"; break; - case SettingKeys.Reroll_Target: - scene.shopCursorTarget = value; + case SettingKeys.Shop_Cursor_Target: + const selectedValue = shopCursorTargetIndexMap[value]; + scene.shopCursorTarget = selectedValue; + break; case SettingKeys.EXP_Gains_Speed: scene.expGainsSpeed = value; break; diff --git a/src/test/items/dire_hit.test.ts b/src/test/items/dire_hit.test.ts index c43091d1f03..02f7c0d06a4 100644 --- a/src/test/items/dire_hit.test.ts +++ b/src/test/items/dire_hit.test.ts @@ -13,6 +13,7 @@ import { Button } from "#app/enums/buttons"; import { CommandPhase } from "#app/phases/command-phase"; import { NewBattlePhase } from "#app/phases/new-battle-phase"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; describe("Items - Dire Hit", () => { let phaserGame: Phaser.Game; @@ -77,8 +78,8 @@ describe("Items - Dire Hit", () => { game.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { const handler = game.scene.ui.getHandler() as ModifierSelectUiHandler; // Traverse to first modifier slot - handler.processInput(Button.LEFT); - handler.processInput(Button.UP); + handler.setCursor(0); + handler.setRowCursor(ShopCursorTarget.REWARDS); handler.processInput(Button.ACTION); }, () => game.isCurrentPhase(CommandPhase) || game.isCurrentPhase(NewBattlePhase), true); diff --git a/src/test/items/temp_stat_stage_booster.test.ts b/src/test/items/temp_stat_stage_booster.test.ts index e5b95c6c3b6..c81703220db 100644 --- a/src/test/items/temp_stat_stage_booster.test.ts +++ b/src/test/items/temp_stat_stage_booster.test.ts @@ -16,6 +16,7 @@ import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; +import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; describe("Items - Temporary Stat Stage Boosters", () => { @@ -154,8 +155,8 @@ describe("Items - Temporary Stat Stage Boosters", () => { game.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { const handler = game.scene.ui.getHandler() as ModifierSelectUiHandler; // Traverse to first modifier slot - handler.processInput(Button.LEFT); - handler.processInput(Button.UP); + handler.setCursor(0); + handler.setRowCursor(ShopCursorTarget.REWARDS); handler.processInput(Button.ACTION); }, () => game.isCurrentPhase(CommandPhase) || game.isCurrentPhase(NewBattlePhase), true); diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index 6e9a33df5d8..ca5d27f96a4 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -257,6 +257,9 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { if (this.scene.shopCursorTarget === ShopCursorTarget.CHECK_TEAM) { this.setRowCursor(0); this.setCursor(2); + } else if ((this.scene.shopCursorTarget === ShopCursorTarget.SHOP) && this.scene.gameMode.hasNoShop) { + this.setRowCursor(ShopCursorTarget.REWARDS); + this.setCursor(0); } else { this.setRowCursor(this.scene.shopCursorTarget); this.setCursor(0); From 1055386949f016161555a0fa18eaf83dffa95de9 Mon Sep 17 00:00:00 2001 From: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:58:39 +0200 Subject: [PATCH 18/91] starter select defaults to shiny with highest variant again (#4001) --- src/test/ui/starter-select.test.ts | 24 ++++++----------------- src/ui/starter-select-ui-handler.ts | 30 ++++++++++++++++------------- 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/test/ui/starter-select.test.ts b/src/test/ui/starter-select.test.ts index 8ef1ea16b4a..6d26ebfd6b3 100644 --- a/src/test/ui/starter-select.test.ts +++ b/src/test/ui/starter-select.test.ts @@ -53,9 +53,6 @@ describe("UI - Starter select", () => { const handler = game.scene.ui.getHandler() as StarterSelectUiHandler; handler.processInput(Button.RIGHT); handler.processInput(Button.LEFT); - handler.processInput(Button.CYCLE_SHINY); - handler.processInput(Button.V); - handler.processInput(Button.V); handler.processInput(Button.ACTION); game.phaseInterceptor.unlock(); }); @@ -117,9 +114,6 @@ describe("UI - Starter select", () => { handler.processInput(Button.RIGHT); handler.processInput(Button.LEFT); handler.processInput(Button.CYCLE_GENDER); - handler.processInput(Button.CYCLE_SHINY); - handler.processInput(Button.V); - handler.processInput(Button.V); handler.processInput(Button.ACTION); game.phaseInterceptor.unlock(); }); @@ -184,9 +178,6 @@ describe("UI - Starter select", () => { handler.processInput(Button.CYCLE_GENDER); handler.processInput(Button.CYCLE_NATURE); handler.processInput(Button.CYCLE_ABILITY); - handler.processInput(Button.CYCLE_SHINY); - handler.processInput(Button.V); - handler.processInput(Button.V); handler.processInput(Button.ACTION); game.phaseInterceptor.unlock(); }); @@ -227,11 +218,12 @@ describe("UI - Starter select", () => { expect(game.scene.getParty()[0].species.speciesId).toBe(Species.BULBASAUR); expect(game.scene.getParty()[0].shiny).toBe(true); expect(game.scene.getParty()[0].variant).toBe(2); + expect(game.scene.getParty()[0].gender).toBe(Gender.FEMALE); expect(game.scene.getParty()[0].nature).toBe(Nature.LONELY); expect(game.scene.getParty()[0].getAbility().id).toBe(Abilities.CHLOROPHYLL); }, 20000); - it("Bulbasaur - shiny - variant 2 female lonely chlorophyl", async() => { + it("Bulbasaur - shiny - variant 2 female", async() => { await game.importData("src/test/utils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; @@ -249,9 +241,6 @@ describe("UI - Starter select", () => { handler.processInput(Button.RIGHT); handler.processInput(Button.LEFT); handler.processInput(Button.CYCLE_GENDER); - handler.processInput(Button.CYCLE_SHINY); - handler.processInput(Button.V); - handler.processInput(Button.V); handler.processInput(Button.ACTION); game.phaseInterceptor.unlock(); }); @@ -313,6 +302,7 @@ describe("UI - Starter select", () => { handler.processInput(Button.RIGHT); handler.processInput(Button.LEFT); handler.processInput(Button.ACTION); + handler.processInput(Button.CYCLE_SHINY); game.phaseInterceptor.unlock(); }); await game.phaseInterceptor.run(SelectStarterPhase); @@ -371,7 +361,7 @@ describe("UI - Starter select", () => { const handler = game.scene.ui.getHandler() as StarterSelectUiHandler; handler.processInput(Button.RIGHT); handler.processInput(Button.LEFT); - handler.processInput(Button.CYCLE_SHINY); + handler.processInput(Button.V); handler.processInput(Button.V); handler.processInput(Button.ACTION); game.phaseInterceptor.unlock(); @@ -415,7 +405,7 @@ describe("UI - Starter select", () => { expect(game.scene.getParty()[0].variant).toBe(1); }, 20000); - it("Bulbasaur - shiny - variant 2", async() => { + it("Bulbasaur - shiny - variant 0", async() => { await game.importData("src/test/utils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; @@ -432,8 +422,6 @@ describe("UI - Starter select", () => { const handler = game.scene.ui.getHandler() as StarterSelectUiHandler; handler.processInput(Button.RIGHT); handler.processInput(Button.LEFT); - handler.processInput(Button.CYCLE_SHINY); - handler.processInput(Button.V); handler.processInput(Button.V); handler.processInput(Button.ACTION); game.phaseInterceptor.unlock(); @@ -474,7 +462,7 @@ describe("UI - Starter select", () => { expect(game.scene.getParty()[0].species.speciesId).toBe(Species.BULBASAUR); expect(game.scene.getParty()[0].shiny).toBe(true); - expect(game.scene.getParty()[0].variant).toBe(2); + expect(game.scene.getParty()[0].variant).toBe(0); }, 20000); it("Check if first pokemon in party is caterpie from gen 1 and 1rd row, 3rd column", async() => { diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 4906503c803..6b75c46bd45 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1853,10 +1853,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler { switch (button) { case Button.CYCLE_SHINY: if (this.canCycleShiny) { - const newVariant = starterAttributes.variant ? starterAttributes.variant as Variant : props.variant; - starterAttributes.shiny = starterAttributes.shiny ? !starterAttributes.shiny : true; - this.setSpeciesDetails(this.lastSpecies, !props.shiny, undefined, undefined, props.shiny ? 0 : newVariant, undefined, undefined); + starterAttributes.shiny = starterAttributes.shiny !== undefined ? !starterAttributes.shiny : false; + if (starterAttributes.shiny) { + // Change to shiny, we need to get the proper default variant + const newProps = this.scene.gameData.getSpeciesDexAttrProps(this.lastSpecies, this.getCurrentDexProps(this.lastSpecies.speciesId)); + const newVariant = starterAttributes.variant ? starterAttributes.variant as Variant : newProps.variant; + this.setSpeciesDetails(this.lastSpecies, true, undefined, undefined, newVariant, undefined, undefined); + this.scene.playSound("se/sparkle"); // Set the variant label to the shiny tint const tint = getVariantTint(newVariant); @@ -1864,6 +1868,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonShinyIcon.setTint(tint); this.pokemonShinyIcon.setVisible(true); } else { + this.setSpeciesDetails(this.lastSpecies, false, undefined, undefined, 0, undefined, undefined); this.pokemonShinyIcon.setVisible(false); success = true; } @@ -3487,23 +3492,22 @@ export default class StarterSelectUiHandler extends MessageUiHandler { props += DexAttr.MALE; } /* This part is very similar to above, but instead of for gender, it checks for shiny within starter preferences. - * If they're not there, it checks the caughtAttr for shiny only (i.e. SHINY === true && NON_SHINY === false) + * If they're not there, it enables shiny state by default if any shiny was caught */ - if (this.starterPreferences[speciesId]?.shiny || ((caughtAttr & DexAttr.SHINY) > 0n && (caughtAttr & DexAttr.NON_SHINY) === 0n)) { + if (this.starterPreferences[speciesId]?.shiny || ((caughtAttr & DexAttr.SHINY) > 0n && this.starterPreferences[speciesId]?.shiny !== false)) { props += DexAttr.SHINY; - if (this.starterPreferences[speciesId]?.variant) { + if (this.starterPreferences[speciesId]?.variant !== undefined) { props += BigInt(Math.pow(2, this.starterPreferences[speciesId]?.variant)) * DexAttr.DEFAULT_VARIANT; } else { /* This calculates the correct variant if there's no starter preferences for it. - * This gets the lowest tier variant that you've caught (in line with other mechanics) and adds it to the temp props + * This gets the highest tier variant that you've caught and adds it to the temp props */ - if ((caughtAttr & DexAttr.DEFAULT_VARIANT) > 0) { - props += DexAttr.DEFAULT_VARIANT; - } - if ((caughtAttr & DexAttr.VARIANT_2) > 0) { - props += DexAttr.VARIANT_2; - } else if ((caughtAttr & DexAttr.VARIANT_3) > 0) { + if ((caughtAttr & DexAttr.VARIANT_3) > 0) { props += DexAttr.VARIANT_3; + } else if ((caughtAttr & DexAttr.VARIANT_2) > 0) { + props += DexAttr.VARIANT_2; + } else { + props += DexAttr.DEFAULT_VARIANT; } } } else { From 370468002946c433f25a75dd758dd5bd6ec5e002 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Wed, 4 Sep 2024 18:28:10 +0200 Subject: [PATCH 19/91] Update dialogue.json (#4021) --- src/locales/en/dialogue.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/en/dialogue.json b/src/locales/en/dialogue.json index cd544395a27..5565d2258c2 100644 --- a/src/locales/en/dialogue.json +++ b/src/locales/en/dialogue.json @@ -413,7 +413,7 @@ }, "ariana": { "encounter": { - "1": "Hold it right there! We can't someone on the loose.\n$It's harmful to Team Rocket's pride, you see.", + "1": "Hold it right there!\nWe can't have someone on the loose.\n$It's harmful to Team Rocket's pride, you see.", "2": "I don't know or care if what I'm doing is right or wrong...\n$I just put my faith in Giovanni and do as I am told", "3": "Your trip ends here. I'm going to take you down!" }, From e822c91a1641a17b6c5da3e49d38a6f1440efe01 Mon Sep 17 00:00:00 2001 From: James Diefenbach <105332964+j-diefenbach@users.noreply.github.com> Date: Thu, 5 Sep 2024 02:59:25 +1000 Subject: [PATCH 20/91] [Enhancement] Skip egg hatching and show summary (#3726) * cherry picked commits / manual copy * better dex tracking for summary after regular egg hatching * ui changes * updated egg hatch bg, added candy tracker, icon anims for new shiny or new form unlock * added i18 line, reset overrides * touchup * code cleanup, documentation and slight refactor * sprite display fix * load interrupts, simple sfx and no summary for small egg amounts * Garbage Collection + Eslint/Docs approved. * time logging and optimisation * skip redundant load * more time logs and fix pre-load issues * more detailed loading logs * changed loading to be on demand from cursor nav * fix missing variant icon fallback * removing redundant time logs and code touchup * code cleanup * Comments so developer doesn't get bugged about garbage collecton * remove logs n stuff * lang settings touchup and final touchup plus uploading blank egg summary bg * fix nits, js imports, extra docs, magic numbers changed * extra docs and spacing nits * Update Github --------- Co-authored-by: James Diefenbach Co-authored-by: Frederico Santos Co-authored-by: frutescens Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com> --- public/images/ui/egg_summary_bg.png | Bin 0 -> 2160 bytes public/images/ui/egg_summary_bg_blank.png | Bin 0 -> 1628 bytes public/images/ui/icon_egg_move.png | Bin 0 -> 237 bytes public/images/ui/legacy/egg_summary_bg.png | Bin 0 -> 2160 bytes public/images/ui/legacy/icon_egg_move.png | Bin 0 -> 237 bytes src/battle-scene.ts | 23 ++ src/data/egg-hatch-data.ts | 98 +++++++ src/loading-scene.ts | 2 + src/locales/en/battle.json | 1 + src/phases/egg-hatch-phase.ts | 52 ++-- src/phases/egg-lapse-phase.ts | 129 ++++++++- src/phases/egg-summary-phase.ts | 50 ++++ src/system/game-data.ts | 24 +- src/ui/egg-summary-ui-handler.ts | 320 +++++++++++++++++++++ src/ui/pokemon-hatch-info-container.ts | 189 ++++++++++++ src/ui/pokemon-info-container.ts | 98 +++++-- src/ui/ui.ts | 3 + 17 files changed, 913 insertions(+), 76 deletions(-) create mode 100644 public/images/ui/egg_summary_bg.png create mode 100644 public/images/ui/egg_summary_bg_blank.png create mode 100644 public/images/ui/icon_egg_move.png create mode 100644 public/images/ui/legacy/egg_summary_bg.png create mode 100644 public/images/ui/legacy/icon_egg_move.png create mode 100644 src/data/egg-hatch-data.ts create mode 100644 src/phases/egg-summary-phase.ts create mode 100644 src/ui/egg-summary-ui-handler.ts create mode 100644 src/ui/pokemon-hatch-info-container.ts diff --git a/public/images/ui/egg_summary_bg.png b/public/images/ui/egg_summary_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..27e367212aaae20dc43f3f03c9fc122b9d99e8fe GIT binary patch literal 2160 zcmeHJX;e~a7``Bh6l&PyQaYxh)>L$7YKn0IQ%r3!+cZrAZ9A0)R-zP0SW{yV3(EE!?`+RAd-t_+{oGP=b#ZlJd*uMGw+m3z2H7H?3iM=#aKx4ySq z<|boL+7i{0bE`dp;m?=%D3ygno=<7z?WDHk93mpBcte&^oL;IRtmY+-Nn7>A?tY^y z29uPO)H+tduDQw7_chQ=2NjhxlTmK!FqE(<(|fgyy?e{{>BVw3sjjgxL;ih^?$r+B zXkT+a-rrwCd z=$u|JG^r4)qpzs|m6oYqvGW?s<_?Q;`*9-QTV6@TGstZf;v;MB(xFeu6%`B+}SUtLEo5jW%>rL}GO4fTpIi$6zotcmxdJG%%bn7(GW(nW%@=geC*w zZrqWPku4mKM7K?febv0ZTrKAlE5+Fq9|9q}O-N}lnbKl6o5o0--}QpS^s3l99FuOK zf$h#Ea5?V@0Z(333y4!`)dog8@ide*&euH}o)eUr+??*na3BG#VT9-q1j#tCr-jD4ZU!Ia?RJ0%!E#l1e$U=nWu2WK!2ywI;OOL;y zy)7yqaDND!&E=lM($nX2FW^w;H>z1Bnpgjpnis<2>_5YW@;uRx4)rA0y>^x1bKjJE zg6O56>O-6R?QRG-pyF&unvK8)>_KY#FJpEov-*6`i0U0G^;9k9O?L2W3D00q`HTxV+Vy>*S3> zCx0M!O z&Ws4Zo=kYmcuP*5?s#?{>ii*Sx?ZnTLIIdA(7Ec-_#C%-4<5LcT_2ChtiMRKg7L}- zTn~5q%wQ7fdgR;_@DLI_hzxNwI0!=iEpZY~tSZ$y7aq1fYbTrlMLY7b)ElHSVeynZ zjm5)Y7J=I|SDGc?RdGrhaq<(G(HJVV3`>VY>{XwUQY2}KOn<|qiIES4Tjccqd>@tS zvFJhXhL8Q%hr@+!yJ^*vykwQK?`^lH8bv_Ws^XxM>QJBEs zS2~n4#+ZL0s`yL@#Qu0~R%)ta@xyDKSyAJ*=j$F{75kci>{nV`u7gTJeW=Z6!}I5L zGcPRMHQsj!DV9uTdMpB0MMXu4T_P>TF7^*}Z=Vhfb=PMOAeAfvjqPs;Y)i&qy2R-X z>S|n{_T32;U~6MzZnG59=$;y(GO1dib)E&1Z33ue?;V!LP^h4 literal 0 HcmV?d00001 diff --git a/public/images/ui/egg_summary_bg_blank.png b/public/images/ui/egg_summary_bg_blank.png new file mode 100644 index 0000000000000000000000000000000000000000..09bcb63cfa3b515afe0207812b0b46774f79ad80 GIT binary patch literal 1628 zcmeAS@N?(olHy`uVBq!ia0y~yU~~Yow{Wll$)``g3IZv{;vjb?hIQv;UNSJSiFvv> zhE&XXd)IK1l)DJqgKgan0!Ak+m}DFm3bpfb)(XfvD^5H$@s#*M_Zd8!ZWb6>7rc#7 zzM3W8xvX-}`|f$GME0y*`}eB7?X15~|Nj2|U!Rr_|b z>|CCHX5YH9n_3_GPyFL&oAT+~;W^O{7(Oq3_fds^d(lZng%E~MW#3CCwMXy#;$#rQ zu3*ztfq|Iuya$;3DV7l@EW7>kg0QCdcLPJ>FjtglqFs}1t2dzP==S##->b+2#b6*X3`SgK`k#C#{~zIJK<&Cv-vrUvvMWQe)^MC^y$ zt9d_fORjJRJ95PVhbXYiM!CQ!!xb9IHjH{=-Md#*KYOXev2dOzLs5NA{DOI&toL%v z9&P@eOKem_rL3YXV|ebQgdm|j}HsiTz?HR@$$=%Khs@z*ojJbcr!3%aylri^<0bv%B@r)9I|OztT6~+;X=oyfil4OY`V= zuDZDErKy{5{;6k*(VMRO{h{@*ee?g^1d96s#U+z_o6MEe4-&sVJ=CfKVDNPHb6Mw<&;$Sif4F%}28J29*~C-V}>S?=lL7@`rJ zoZ`TI?bx;dj!y39C`Mb@JW4}PIASEAB=}Dhx;GQI>6#Fao1Y;h(-l_ z{uy=uKXT8ww=+j5!Z2dtmKk5_zpt>_(6YIgamKysCrqoHCS)4C?kNeCI2XH*IjrGK zoZ;TyM#0ELe`hgg&%-7goKnmp6n9BK|2Dl*R873>VYzbL`2#jAimdKI;Vst04~^DCIA2c literal 0 HcmV?d00001 diff --git a/public/images/ui/legacy/egg_summary_bg.png b/public/images/ui/legacy/egg_summary_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..27e367212aaae20dc43f3f03c9fc122b9d99e8fe GIT binary patch literal 2160 zcmeHJX;e~a7``Bh6l&PyQaYxh)>L$7YKn0IQ%r3!+cZrAZ9A0)R-zP0SW{yV3(EE!?`+RAd-t_+{oGP=b#ZlJd*uMGw+m3z2H7H?3iM=#aKx4ySq z<|boL+7i{0bE`dp;m?=%D3ygno=<7z?WDHk93mpBcte&^oL;IRtmY+-Nn7>A?tY^y z29uPO)H+tduDQw7_chQ=2NjhxlTmK!FqE(<(|fgyy?e{{>BVw3sjjgxL;ih^?$r+B zXkT+a-rrwCd z=$u|JG^r4)qpzs|m6oYqvGW?s<_?Q;`*9-QTV6@TGstZf;v;MB(xFeu6%`B+}SUtLEo5jW%>rL}GO4fTpIi$6zotcmxdJG%%bn7(GW(nW%@=geC*w zZrqWPku4mKM7K?febv0ZTrKAlE5+Fq9|9q}O-N}lnbKl6o5o0--}QpS^s3l99FuOK zf$h#Ea5?V@0Z(333y4!`)dog8@ide*&euH}o)eUr+??*na3BG#VT9-q1j#tCr-jD4ZU!Ia?RJ0%!E#l1e$U=nWu2WK!2ywI;OOL;y zy)7yqaDND!&E=lM($nX2FW^w;H>z1Bnpgjpnis<2>_5YW@;uRx4)rA0y>^x1bKjJE zg6O56>O-6R?QRG-pyF&unvK8)>_KY#FJpEov-*6`i0U0G^;9k9O?L2W3D00q`HTxV+Vy>*S3> zCx0M!O z&Ws4Zo=kYmcuP*5?s#?{>ii*Sx?ZnTLIIdA(7Ec-_#C%-4<5LcT_2ChtiMRKg7L}- zTn~5q%wQ7fdgR;_@DLI_hzxNwI0!=iEpZY~tSZ$y7aq1fYbTrlMLY7b)ElHSVeynZ zjm5)Y7J=I|SDGc?RdGrhaq<(G(HJVV3`>VY>{XwUQY2}KOn<|qiIES4Tjccqd>@tS zvFJhXhL8Q%hr@+!yJ^*vykwQK?`^lH8bv_Ws^XxM>QJBEs zS2~n4#+ZL0s`yL@#Qu0~R%)ta@xyDKSyAJ*=j$F{75kci>{nV`u7gTJeW=Z6!}I5L zGcPRMHQsj!DV9uTdMpB0MMXu4T_P>TF7^*}Z=Vhfb=PMOAeAfvjqPs;Y)i&qy2R-X z>S|n{_T32;U~6MzZnG59=$;y(GO1dib)E&1Z33ue?;V!LP^h4 literal 0 HcmV?d00001 diff --git a/public/images/ui/legacy/icon_egg_move.png b/public/images/ui/legacy/icon_egg_move.png new file mode 100644 index 0000000000000000000000000000000000000000..6af186e9b0c21a3952b80fc00ed2a7494cee18eb GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>S?=lL7@`rJ zoZ`TI?bx;dj!y39C`Mb@JW4}PIASEAB=}Dhx;GQI>6#Fao1Y;h(-l_ z{uy=uKXT8ww=+j5!Z2dtmKk5_zpt>_(6YIgamKysCrqoHCS)4C?kNeCI2XH*IjrGK zoZ;TyM#0ELe`hgg&%-7goKnmp6n9BK|2Dl*R873>VYzbL`2#jAimdKI;Vst04~^DCIA2c literal 0 HcmV?d00001 diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 4cc3f69ebee..c8100e0d3b9 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2742,6 +2742,29 @@ export default class BattleScene extends SceneBase { (window as any).gameInfo = gameInfo; } + /** + * This function retrieves the sprite and audio keys for active Pokemon. + * Active Pokemon include both enemy and player Pokemon of the current wave. + * Note: Questions on garbage collection go to @frutescens + * @returns a string array of active sprite and audio keys that should not be deleted + */ + getActiveKeys(): string[] { + const keys: string[] = []; + const playerParty = this.getParty(); + playerParty.forEach(p => { + keys.push("pkmn__" + p.species.getSpriteId(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant)); + keys.push("pkmn__" + p.species.getSpriteId(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant, true)); + keys.push("cry/" + p.species.getCryKey(p.species.formIndex)); + }); + // enemyParty has to be operated on separately from playerParty because playerPokemon =/= enemyPokemon + const enemyParty = this.getEnemyParty(); + enemyParty.forEach(p => { + keys.push(p.species.getSpriteKey(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant)); + keys.push("cry/" + p.species.getCryKey(p.species.formIndex)); + }); + return keys; + } + /** * Initialized the 2nd phase of the final boss (e.g. form-change for Eternatus) * @param pokemon The (enemy) pokemon diff --git a/src/data/egg-hatch-data.ts b/src/data/egg-hatch-data.ts new file mode 100644 index 00000000000..e754a9205c4 --- /dev/null +++ b/src/data/egg-hatch-data.ts @@ -0,0 +1,98 @@ +import BattleScene from "#app/battle-scene"; +import { PlayerPokemon } from "#app/field/pokemon"; +import { DexEntry, StarterDataEntry } from "#app/system/game-data"; + +/** + * Stores data associated with a specific egg and the hatched pokemon + * Allows hatch info to be stored at hatch then retrieved for display during egg summary + */ +export class EggHatchData { + /** the pokemon that hatched from the file (including shiny, IVs, ability) */ + public pokemon: PlayerPokemon; + /** index of the egg move from the hatched pokemon (not stored in PlayerPokemon) */ + public eggMoveIndex: number; + /** boolean indicating if the egg move for the hatch is new */ + public eggMoveUnlocked: boolean; + /** stored copy of the hatched pokemon's dex entry before it was updated due to hatch */ + public dexEntryBeforeUpdate: DexEntry; + /** stored copy of the hatched pokemon's starter entry before it was updated due to hatch */ + public starterDataEntryBeforeUpdate: StarterDataEntry; + /** reference to the battle scene to get gamedata and update dex */ + private scene: BattleScene; + + constructor(scene: BattleScene, pokemon: PlayerPokemon, eggMoveIndex: number) { + this.scene = scene; + this.pokemon = pokemon; + this.eggMoveIndex = eggMoveIndex; + } + + /** + * Sets the boolean for if the egg move for the hatch is a new unlock + * @param unlocked True if the EM is new + */ + setEggMoveUnlocked(unlocked: boolean) { + this.eggMoveUnlocked = unlocked; + } + + /** + * Stores a copy of the current DexEntry of the pokemon and StarterDataEntry of its starter + * Used before updating the dex, so comparing the pokemon to these entries will show the new attributes + */ + setDex() { + const currDexEntry = this.scene.gameData.dexData[this.pokemon.species.speciesId]; + const currStarterDataEntry = this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()]; + this.dexEntryBeforeUpdate = { + seenAttr: currDexEntry.seenAttr, + caughtAttr: currDexEntry.caughtAttr, + natureAttr: currDexEntry.natureAttr, + seenCount: currDexEntry.seenCount, + caughtCount: currDexEntry.caughtCount, + hatchedCount: currDexEntry.hatchedCount, + ivs: [...currDexEntry.ivs] + }; + this.starterDataEntryBeforeUpdate = { + moveset: currStarterDataEntry.moveset, + eggMoves: currStarterDataEntry.eggMoves, + candyCount: currStarterDataEntry.candyCount, + friendship: currStarterDataEntry.friendship, + abilityAttr: currStarterDataEntry.abilityAttr, + passiveAttr: currStarterDataEntry.passiveAttr, + valueReduction: currStarterDataEntry.valueReduction, + classicWinCount: currStarterDataEntry.classicWinCount + }; + } + + /** + * Gets the dex entry before update + * @returns Dex Entry corresponding to this pokemon before the pokemon was added / updated to dex + */ + getDex(): DexEntry { + return this.dexEntryBeforeUpdate; + } + + /** + * Gets the starter dex entry before update + * @returns Starter Dex Entry corresponding to this pokemon before the pokemon was added / updated to dex + */ + getStarterEntry(): StarterDataEntry { + return this.starterDataEntryBeforeUpdate; + } + + /** + * Update the pokedex data corresponding with the new hatch's pokemon data + * Also sets whether the egg move is a new unlock or not + * @param showMessage boolean to show messages for the new catches and egg moves (false by default) + * @returns + */ + updatePokemon(showMessage : boolean = false) { + return new Promise(resolve => { + this.scene.gameData.setPokemonCaught(this.pokemon, true, true, showMessage).then(() => { + this.scene.gameData.updateSpeciesDexIvs(this.pokemon.species.speciesId, this.pokemon.ivs); + this.scene.gameData.setEggMoveUnlocked(this.pokemon.species, this.eggMoveIndex, showMessage).then((value) => { + this.setEggMoveUnlocked(value); + resolve(); + }); + }); + }); + } +} diff --git a/src/loading-scene.ts b/src/loading-scene.ts index 432dbcd7469..f6bc41f744d 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -78,6 +78,7 @@ export class LoadingScene extends SceneBase { this.loadAtlas("overlay_hp_boss", "ui"); this.loadImage("overlay_exp", "ui"); this.loadImage("icon_owned", "ui"); + this.loadImage("icon_egg_move", "ui"); this.loadImage("ability_bar_left", "ui"); this.loadImage("bgm_bar", "ui"); this.loadImage("party_exp_bar", "ui"); @@ -272,6 +273,7 @@ export class LoadingScene extends SceneBase { this.loadImage("gacha_knob", "egg"); this.loadImage("egg_list_bg", "ui"); + this.loadImage("egg_summary_bg", "ui"); this.loadImage("end_m", "cg"); this.loadImage("end_f", "cg"); diff --git a/src/locales/en/battle.json b/src/locales/en/battle.json index 662678e7673..918fb38b520 100644 --- a/src/locales/en/battle.json +++ b/src/locales/en/battle.json @@ -61,6 +61,7 @@ "skipItemQuestion": "Are you sure you want to skip taking an item?", "itemStackFull": "The stack for {{fullItemName}} is full.\nYou will receive {{itemName}} instead.", "eggHatching": "Oh?", + "eggSkipPrompt": "Skip to egg summary?", "ivScannerUseQuestion": "Use IV Scanner on {{pokemonName}}?", "wildPokemonWithAffix": "Wild {{pokemonName}}", "foePokemonWithAffix": "Foe {{pokemonName}}", diff --git a/src/phases/egg-hatch-phase.ts b/src/phases/egg-hatch-phase.ts index a5b0252d4de..4b03aa62f02 100644 --- a/src/phases/egg-hatch-phase.ts +++ b/src/phases/egg-hatch-phase.ts @@ -1,23 +1,29 @@ -import BattleScene, { AnySound } from "#app/battle-scene.js"; -import { Egg, EGG_SEED } from "#app/data/egg.js"; -import { EggCountChangedEvent } from "#app/events/egg.js"; -import { PlayerPokemon } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { Phase } from "#app/phase.js"; -import { achvs } from "#app/system/achv.js"; -import EggCounterContainer from "#app/ui/egg-counter-container.js"; -import EggHatchSceneHandler from "#app/ui/egg-hatch-scene-handler.js"; -import PokemonInfoContainer from "#app/ui/pokemon-info-container.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene, { AnySound } from "#app/battle-scene"; +import { Egg } from "#app/data/egg"; +import { EggCountChangedEvent } from "#app/events/egg"; +import { PlayerPokemon } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { Phase } from "#app/phase"; +import { achvs } from "#app/system/achv"; +import EggCounterContainer from "#app/ui/egg-counter-container"; +import EggHatchSceneHandler from "#app/ui/egg-hatch-scene-handler"; +import PokemonInfoContainer from "#app/ui/pokemon-info-container"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; +import { EggLapsePhase } from "./egg-lapse-phase"; +import { EggHatchData } from "#app/data/egg-hatch-data"; + + /** * Class that represents egg hatching */ export class EggHatchPhase extends Phase { /** The egg that is hatching */ private egg: Egg; + /** The new EggHatchData for the egg/pokemon that hatches */ + private eggHatchData: EggHatchData; /** The number of eggs that are hatching */ private eggsToHatchCount: integer; @@ -58,10 +64,11 @@ export class EggHatchPhase extends Phase { private skipped: boolean; /** The sound effect being played when the egg is hatched */ private evolutionBgm: AnySound; + private eggLapsePhase: EggLapsePhase; - constructor(scene: BattleScene, egg: Egg, eggsToHatchCount: integer) { + constructor(scene: BattleScene, hatchScene: EggLapsePhase, egg: Egg, eggsToHatchCount: integer) { super(scene); - + this.eggLapsePhase = hatchScene; this.egg = egg; this.eggsToHatchCount = eggsToHatchCount; } @@ -307,6 +314,7 @@ export class EggHatchPhase extends Phase { * Function to do the logic and animation of completing a hatch and revealing the Pokemon */ doReveal(): void { + // set the previous dex data so info container can show new unlocks in egg summary const isShiny = this.pokemon.isShiny(); if (this.pokemon.species.subLegendary) { this.scene.validateAchv(achvs.HATCH_SUB_LEGENDARY); @@ -345,13 +353,13 @@ export class EggHatchPhase extends Phase { this.scene.ui.showText(i18next.t("egg:hatchFromTheEgg", { pokemonName: getPokemonNameWithAffix(this.pokemon) }), null, () => { this.scene.gameData.updateSpeciesDexIvs(this.pokemon.species.speciesId, this.pokemon.ivs); this.scene.gameData.setPokemonCaught(this.pokemon, true, true).then(() => { - this.scene.gameData.setEggMoveUnlocked(this.pokemon.species, this.eggMoveIndex).then(() => { + this.scene.gameData.setEggMoveUnlocked(this.pokemon.species, this.eggMoveIndex).then((value) => { + this.eggHatchData.setEggMoveUnlocked(value); this.scene.ui.showText("", 0); this.end(); }); }); }, null, true, 3000); - //this.scene.time.delayedCall(Utils.fixedInt(4250), () => this.scene.playBgm()); }); }); this.scene.tweens.add({ @@ -435,17 +443,11 @@ export class EggHatchPhase extends Phase { /** * Generates a Pokemon to be hatched by the egg + * Also stores the generated pokemon in this.eggHatchData * @returns the hatched PlayerPokemon */ generatePokemon(): PlayerPokemon { - let ret: PlayerPokemon; - - this.scene.executeWithSeedOffset(() => { - ret = this.egg.generatePlayerPokemon(this.scene); - this.eggMoveIndex = this.egg.eggMoveIndex; - - }, this.egg.id, EGG_SEED.toString()); - - return ret!; + this.eggHatchData = this.eggLapsePhase.generatePokemon(this.egg); + return this.eggHatchData.pokemon; } } diff --git a/src/phases/egg-lapse-phase.ts b/src/phases/egg-lapse-phase.ts index 50d7106f229..1adb1568166 100644 --- a/src/phases/egg-lapse-phase.ts +++ b/src/phases/egg-lapse-phase.ts @@ -1,11 +1,23 @@ -import BattleScene from "#app/battle-scene.js"; -import { Egg } from "#app/data/egg.js"; -import { Phase } from "#app/phase.js"; +import BattleScene from "#app/battle-scene"; +import { Egg, EGG_SEED } from "#app/data/egg"; +import { Phase } from "#app/phase"; import i18next from "i18next"; import Overrides from "#app/overrides"; import { EggHatchPhase } from "./egg-hatch-phase"; +import { Mode } from "#app/ui/ui"; +import { achvs } from "#app/system/achv"; +import { PlayerPokemon } from "#app/field/pokemon"; +import { EggSummaryPhase } from "./egg-summary-phase"; +import { EggHatchData } from "#app/data/egg-hatch-data"; +/** + * Phase that handles updating eggs, and hatching any ready eggs + * Also handles prompts for skipping animation, and calling the egg summary phase + */ export class EggLapsePhase extends Phase { + + private eggHatchData: EggHatchData[] = []; + private readonly minEggsToPromptSkip: number = 5; constructor(scene: BattleScene) { super(scene); } @@ -16,20 +28,111 @@ export class EggLapsePhase extends Phase { const eggsToHatch: Egg[] = this.scene.gameData.eggs.filter((egg: Egg) => { return Overrides.EGG_IMMEDIATE_HATCH_OVERRIDE ? true : --egg.hatchWaves < 1; }); + const eggsToHatchCount: number = eggsToHatch.length; + this.eggHatchData= []; - let eggCount: integer = eggsToHatch.length; + if (eggsToHatchCount > 0) { - if (eggCount) { - this.scene.queueMessage(i18next.t("battle:eggHatching")); - - for (const egg of eggsToHatch) { - this.scene.unshiftPhase(new EggHatchPhase(this.scene, egg, eggCount)); - if (eggCount > 0) { - eggCount--; - } + if (eggsToHatchCount >= this.minEggsToPromptSkip) { + this.scene.ui.showText(i18next.t("battle:eggHatching"), 0, () => { + // show prompt for skip + this.scene.ui.showText(i18next.t("battle:eggSkipPrompt"), 0); + this.scene.ui.setModeWithoutClear(Mode.CONFIRM, () => { + this.hatchEggsSkipped(eggsToHatch); + this.showSummary(); + }, () => { + this.hatchEggsRegular(eggsToHatch); + this.showSummary(); + } + ); + }, 100, true); + } else { + // regular hatches, no summary + this.scene.queueMessage(i18next.t("battle:eggHatching")); + this.hatchEggsRegular(eggsToHatch); + this.end(); } - + } else { + this.end(); } + } + + /** + * Hatches eggs normally one by one, showing animations + * @param eggsToHatch list of eggs to hatch + */ + hatchEggsRegular(eggsToHatch: Egg[]) { + let eggsToHatchCount: number = eggsToHatch.length; + for (const egg of eggsToHatch) { + this.scene.unshiftPhase(new EggHatchPhase(this.scene, this, egg, eggsToHatchCount)); + eggsToHatchCount--; + } + } + + /** + * Hatches eggs with no animations + * @param eggsToHatch list of eggs to hatch + */ + hatchEggsSkipped(eggsToHatch: Egg[]) { + for (const egg of eggsToHatch) { + this.hatchEggSilently(egg); + } + } + + showSummary() { + this.scene.unshiftPhase(new EggSummaryPhase(this.scene, this.eggHatchData)); this.end(); } + + /** + * Hatches an egg and stores it in the local EggHatchData array without animations + * Also validates the achievements for the hatched pokemon and removes the egg + * @param egg egg to hatch + */ + hatchEggSilently(egg: Egg) { + const eggIndex = this.scene.gameData.eggs.findIndex(e => e.id === egg.id); + if (eggIndex === -1) { + return this.end(); + } + this.scene.gameData.eggs.splice(eggIndex, 1); + + const data = this.generatePokemon(egg); + const pokemon = data.pokemon; + if (pokemon.fusionSpecies) { + pokemon.clearFusionSpecies(); + } + + if (pokemon.species.subLegendary) { + this.scene.validateAchv(achvs.HATCH_SUB_LEGENDARY); + } + if (pokemon.species.legendary) { + this.scene.validateAchv(achvs.HATCH_LEGENDARY); + } + if (pokemon.species.mythical) { + this.scene.validateAchv(achvs.HATCH_MYTHICAL); + } + if (pokemon.isShiny()) { + this.scene.validateAchv(achvs.HATCH_SHINY); + } + + } + + /** + * Generates a Pokemon and creates a new EggHatchData instance for the given egg + * @param egg the egg to hatch + * @returns the hatched PlayerPokemon + */ + generatePokemon(egg: Egg): EggHatchData { + let ret: PlayerPokemon; + let newHatchData: EggHatchData; + this.scene.executeWithSeedOffset(() => { + ret = egg.generatePlayerPokemon(this.scene); + newHatchData = new EggHatchData(this.scene, ret, egg.eggMoveIndex); + newHatchData.setDex(); + this.eggHatchData.push(newHatchData); + + }, egg.id, EGG_SEED.toString()); + return newHatchData!; + } + } diff --git a/src/phases/egg-summary-phase.ts b/src/phases/egg-summary-phase.ts new file mode 100644 index 00000000000..190af17c724 --- /dev/null +++ b/src/phases/egg-summary-phase.ts @@ -0,0 +1,50 @@ +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { Mode } from "#app/ui/ui"; +import EggHatchSceneHandler from "#app/ui/egg-hatch-scene-handler"; +import { EggHatchData } from "#app/data/egg-hatch-data"; + +/** + * Class that represents the egg summary phase + * It does some of the function for updating egg data + * Phase is handled mostly by the egg-hatch-scene-handler UI + */ +export class EggSummaryPhase extends Phase { + private eggHatchData: EggHatchData[]; + private eggHatchHandler: EggHatchSceneHandler; + + constructor(scene: BattleScene, eggHatchData: EggHatchData[]) { + super(scene); + this.eggHatchData = eggHatchData; + } + + start() { + super.start(); + + // updates next pokemon once the current update has been completed + const updateNextPokemon = (i: number) => { + if (i >= this.eggHatchData.length) { + this.scene.ui.setModeForceTransition(Mode.EGG_HATCH_SUMMARY, this.eggHatchData).then(() => { + this.scene.fadeOutBgm(undefined, false); + this.eggHatchHandler = this.scene.ui.getHandler() as EggHatchSceneHandler; + }); + + } else { + this.eggHatchData[i].setDex(); + this.eggHatchData[i].updatePokemon().then(() => { + if (i < this.eggHatchData.length) { + updateNextPokemon(i + 1); + } + }); + } + }; + updateNextPokemon(0); + + } + + end() { + this.eggHatchHandler.clear(); + this.scene.ui.setModeForceTransition(Mode.MESSAGE).then(() => {}); + super.end(); + } +} diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 50cc6177a84..1a47294906e 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1553,11 +1553,11 @@ export class GameData { } } - setPokemonCaught(pokemon: Pokemon, incrementCount: boolean = true, fromEgg: boolean = false): Promise { - return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg); + setPokemonCaught(pokemon: Pokemon, incrementCount: boolean = true, fromEgg: boolean = false, showMessage: boolean = true): Promise { + return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage); } - setPokemonSpeciesCaught(pokemon: Pokemon, species: PokemonSpecies, incrementCount: boolean = true, fromEgg: boolean = false): Promise { + setPokemonSpeciesCaught(pokemon: Pokemon, species: PokemonSpecies, incrementCount: boolean = true, fromEgg: boolean = false, showMessage: boolean = true): Promise { return new Promise(resolve => { const dexEntry = this.dexData[species.speciesId]; const caughtAttr = dexEntry.caughtAttr; @@ -1616,13 +1616,17 @@ export class GameData { const checkPrevolution = () => { if (hasPrevolution) { const prevolutionSpecies = pokemonPrevolutions[species.speciesId]; - return this.setPokemonSpeciesCaught(pokemon, getPokemonSpecies(prevolutionSpecies), incrementCount, fromEgg).then(() => resolve()); + this.setPokemonSpeciesCaught(pokemon, getPokemonSpecies(prevolutionSpecies), incrementCount, fromEgg, showMessage).then(() => resolve()); } else { resolve(); } }; if (newCatch && speciesStarters.hasOwnProperty(species.speciesId)) { + if (!showMessage) { + resolve(); + return; + } this.scene.playSound("level_up_fanfare"); this.scene.ui.showText(i18next.t("battle:addedAsAStarter", { pokemonName: species.name }), null, () => checkPrevolution(), null, true); } else { @@ -1668,7 +1672,7 @@ export class GameData { this.starterData[species.speciesId].candyCount += count; } - setEggMoveUnlocked(species: PokemonSpecies, eggMoveIndex: integer): Promise { + setEggMoveUnlocked(species: PokemonSpecies, eggMoveIndex: integer, showMessage: boolean = true): Promise { return new Promise(resolve => { const speciesId = species.speciesId; if (!speciesEggMoves.hasOwnProperty(speciesId) || !speciesEggMoves[speciesId][eggMoveIndex]) { @@ -1688,11 +1692,15 @@ export class GameData { } this.starterData[speciesId].eggMoves |= value; - + if (!showMessage) { + resolve(true); + return; + } this.scene.playSound("level_up_fanfare"); - const moveName = allMoves[speciesEggMoves[speciesId][eggMoveIndex]].name; - this.scene.ui.showText(eggMoveIndex === 3 ? i18next.t("egg:rareEggMoveUnlock", { moveName: moveName }) : i18next.t("egg:eggMoveUnlock", { moveName: moveName }), null, () => resolve(true), null, true); + this.scene.ui.showText(eggMoveIndex === 3 ? i18next.t("egg:rareEggMoveUnlock", { moveName: moveName }) : i18next.t("egg:eggMoveUnlock", { moveName: moveName }), null, (() => { + resolve(true); + }), null, true); }); } diff --git a/src/ui/egg-summary-ui-handler.ts b/src/ui/egg-summary-ui-handler.ts new file mode 100644 index 00000000000..af82ab33438 --- /dev/null +++ b/src/ui/egg-summary-ui-handler.ts @@ -0,0 +1,320 @@ +import BattleScene from "../battle-scene"; +import { Mode } from "./ui"; +import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler"; +import MessageUiHandler from "./message-ui-handler"; +import { getEggTierForSpecies } from "../data/egg"; +import {Button} from "#enums/buttons"; +import { Gender } from "#app/data/gender"; +import { getVariantTint } from "#app/data/variant"; +import { EggTier } from "#app/enums/egg-type"; +import PokemonHatchInfoContainer from "./pokemon-hatch-info-container"; +import { EggSummaryPhase } from "#app/phases/egg-summary-phase"; +import { DexAttr } from "#app/system/game-data"; +import { EggHatchData } from "#app/data/egg-hatch-data"; + +const iconContainerX = 115; +const iconContainerY = 9; +const numCols = 11; +const iconSize = 18; + +/** + * UI Handler for the egg summary. + * Handles navigation and display of each pokemon as a list + * Also handles display of the pokemon-hatch-info-container + */ +export default class EggSummaryUiHandler extends MessageUiHandler { + /** holds all elements in the scene */ + private eggHatchContainer: Phaser.GameObjects.Container; + /** holds the icon containers and info container */ + private summaryContainer: Phaser.GameObjects.Container; + /** container for the mini pokemon sprites */ + private pokemonIconSpritesContainer: Phaser.GameObjects.Container; + /** container for the icons displayed alongside the mini icons (e.g. shiny, HA capsule) */ + private pokemonIconsContainer: Phaser.GameObjects.Container; + /** hatch info container that displays the current pokemon / hatch (main element on left hand side) */ + private infoContainer: PokemonHatchInfoContainer; + /** handles jumping animations for the pokemon sprite icons */ + private iconAnimHandler: PokemonIconAnimHandler; + private eggHatchBg: Phaser.GameObjects.Image; + private cursorObj: Phaser.GameObjects.Image; + private eggHatchData: EggHatchData[]; + + + /** + * Allows subscribers to listen for events + * + * Current Events: + * - {@linkcode EggEventType.EGG_COUNT_CHANGED} {@linkcode EggCountChangedEvent} + */ + public readonly eventTarget: EventTarget = new EventTarget(); + + constructor(scene: BattleScene) { + super(scene, Mode.EGG_HATCH_SUMMARY); + } + + + setup() { + const ui = this.getUi(); + + this.summaryContainer = this.scene.add.container(0, -this.scene.game.canvas.height / 6); + this.summaryContainer.setVisible(false); + ui.add(this.summaryContainer); + + this.eggHatchContainer = this.scene.add.container(0, -this.scene.game.canvas.height / 6); + this.eggHatchContainer.setVisible(false); + ui.add(this.eggHatchContainer); + + this.iconAnimHandler = new PokemonIconAnimHandler(); + this.iconAnimHandler.setup(this.scene); + + this.eggHatchBg = this.scene.add.image(0, 0, "egg_summary_bg"); + this.eggHatchBg.setOrigin(0, 0); + this.eggHatchContainer.add(this.eggHatchBg); + + this.pokemonIconsContainer = this.scene.add.container(iconContainerX, iconContainerY); + this.pokemonIconSpritesContainer = this.scene.add.container(iconContainerX, iconContainerY); + this.summaryContainer.add(this.pokemonIconsContainer); + this.summaryContainer.add(this.pokemonIconSpritesContainer); + + this.cursorObj = this.scene.add.image(0, 0, "select_cursor"); + this.cursorObj.setOrigin(0, 0); + this.summaryContainer.add(this.cursorObj); + + this.infoContainer = new PokemonHatchInfoContainer(this.scene, this.summaryContainer); + this.infoContainer.setup(); + this.infoContainer.changeToEggSummaryLayout(); + this.infoContainer.setVisible(true); + this.summaryContainer.add(this.infoContainer); + + this.cursor = -1; + } + + clear() { + super.clear(); + this.cursor = -1; + this.summaryContainer.setVisible(false); + this.pokemonIconSpritesContainer.removeAll(true); + this.pokemonIconsContainer.removeAll(true); + this.eggHatchBg.setVisible(false); + this.getUi().hideTooltip(); + // Note: Questions on garbage collection go to @frutescens + const activeKeys = this.scene.getActiveKeys(); + // Removing unnecessary sprites from animation manager + const animKeys = Object.keys(this.scene.anims["anims"]["entries"]); + animKeys.forEach(key => { + if (key.startsWith("pkmn__") && !activeKeys.includes(key)) { + this.scene.anims.remove(key); + } + }); + // Removing unnecessary cries from audio cache + const audioKeys = Object.keys(this.scene.cache.audio.entries.entries); + audioKeys.forEach(key => { + if (key.startsWith("cry/") && !activeKeys.includes(key)) { + delete this.scene.cache.audio.entries.entries[key]; + } + }); + // Clears eggHatchData in EggSummaryUiHandler + this.eggHatchData.length = 0; + // Removes Pokemon icons in EggSummaryUiHandler + this.iconAnimHandler.removeAll(); + console.log("Egg Summary Handler cleared"); + } + + /** + * @param args EggHatchData[][] + * args[0]: list of EggHatchData for each egg/pokemon hatched + */ + show(args: EggHatchData[][]): boolean { + super.show(args); + if (args.length >= 1) { + // sort the egg hatch data by egg tier then by species number (then by order hatched) + this.eggHatchData = args[0].sort(function sortHatchData(a: EggHatchData, b: EggHatchData) { + const speciesA = a.pokemon.species; + const speciesB = b.pokemon.species; + if (getEggTierForSpecies(speciesA) < getEggTierForSpecies(speciesB)) { + return -1; + } else if (getEggTierForSpecies(speciesA) > getEggTierForSpecies(speciesB)) { + return 1; + } else { + if (speciesA.speciesId < speciesB.speciesId) { + return -1; + } else if (speciesA.speciesId > speciesB.speciesId) { + return 1; + } else { + return 0; + } + } + } + + ); + } + + this.getUi().bringToTop(this.summaryContainer); + this.summaryContainer.setVisible(true); + this.eggHatchContainer.setVisible(true); + this.pokemonIconsContainer.setVisible(true); + this.eggHatchBg.setVisible(true); + this.infoContainer.hideDisplayPokemon(); + + this.eggHatchData.forEach( (value: EggHatchData, i: number) => { + const x = (i % numCols) * iconSize; + const y = Math.floor(i / numCols) * iconSize; + + const displayPokemon = value.pokemon; + const offset = 2; + const rightSideX = 12; + + const bg = this.scene.add.image(x+2, y+5, "passive_bg"); + bg.setOrigin(0, 0); + bg.setScale(0.75); + bg.setVisible(true); + this.pokemonIconsContainer.add(bg); + + // set tint for passive bg + switch (getEggTierForSpecies(displayPokemon.species)) { + case EggTier.COMMON: + bg.setVisible(false); + break; + case EggTier.GREAT: + bg.setTint(0xabafff); + break; + case EggTier.ULTRA: + bg.setTint(0xffffaa); + break; + case EggTier.MASTER: + bg.setTint(0xdfffaf); + break; + } + const species = displayPokemon.species; + const female = displayPokemon.gender === Gender.FEMALE; + const formIndex = displayPokemon.formIndex; + const variant = displayPokemon.variant; + const isShiny = displayPokemon.shiny; + + // set pokemon icon (and replace with base sprite if there is a mismatch) + const icon = this.scene.add.sprite(x - offset, y + offset, species.getIconAtlasKey(formIndex, isShiny, variant)); + icon.setScale(0.5); + icon.setOrigin(0, 0); + icon.setFrame(species.getIconId(female, formIndex, isShiny, variant)); + + if (icon.frame.name !== species.getIconId(female, formIndex, isShiny, variant)) { + console.log(`${species.name}'s variant icon does not exist. Replacing with default.`); + icon.setTexture(species.getIconAtlasKey(formIndex, false, variant)); + icon.setFrame(species.getIconId(female, formIndex, false, variant)); + } + this.pokemonIconSpritesContainer.add(icon); + this.iconAnimHandler.addOrUpdate(icon, PokemonIconAnimMode.NONE); + + const shiny = this.scene.add.image(x + rightSideX, y + offset * 2, "shiny_star_small"); + shiny.setScale(0.5); + shiny.setVisible(displayPokemon.shiny); + shiny.setTint(getVariantTint(displayPokemon.variant)); + this.pokemonIconsContainer.add(shiny); + + const ha = this.scene.add.image(x + rightSideX, y + 7, "ha_capsule"); + ha.setScale(0.5); + ha.setVisible((displayPokemon.hasAbility(displayPokemon.species.abilityHidden))); + this.pokemonIconsContainer.add(ha); + + const pb = this.scene.add.image(x + rightSideX, y + offset * 7, "icon_owned"); + pb.setOrigin(0, 0); + pb.setScale(0.5); + + // add animation for new unlocks (new catch or new shiny or new form) + const dexEntry = value.dexEntryBeforeUpdate; + const caughtAttr = dexEntry.caughtAttr; + const newShiny = BigInt(1 << (displayPokemon.shiny ? 1 : 0)); + const newVariant = BigInt(1 << (displayPokemon.variant + 4)); + const newShinyOrVariant = ((newShiny & caughtAttr) === BigInt(0)) || ((newVariant & caughtAttr) === BigInt(0)); + const newForm = (BigInt(1 << displayPokemon.formIndex) * DexAttr.DEFAULT_FORM & caughtAttr) === BigInt(0); + + pb.setVisible(!caughtAttr || newForm); + if (!caughtAttr || newShinyOrVariant || newForm) { + this.iconAnimHandler.addOrUpdate(icon, PokemonIconAnimMode.PASSIVE); + } + this.pokemonIconsContainer.add(pb); + + const em = this.scene.add.image(x, y + offset, "icon_egg_move"); + em.setOrigin(0, 0); + em.setScale(0.5); + em.setVisible(value.eggMoveUnlocked); + this.pokemonIconsContainer.add(em); + }); + + this.setCursor(0); + this.scene.playSoundWithoutBgm("evolution_fanfare"); + return true; + } + + processInput(button: Button): boolean { + const ui = this.getUi(); + + let success = false; + const error = false; + if (button === Button.CANCEL) { + const phase = this.scene.getCurrentPhase(); + if (phase instanceof EggSummaryPhase) { + phase.end(); + } + ui.revertMode(); + success = true; + } else { + const count = this.eggHatchData.length; + const rows = Math.ceil(count / numCols); + const row = Math.floor(this.cursor / numCols); + switch (button) { + case Button.UP: + if (row) { + success = this.setCursor(this.cursor - numCols); + } + break; + case Button.DOWN: + if (row < rows - 2 || (row < rows - 1 && this.cursor % numCols <= (count - 1) % numCols)) { + success = this.setCursor(this.cursor + numCols); + } + break; + case Button.LEFT: + if (this.cursor % numCols) { + success = this.setCursor(this.cursor - 1); + } + break; + case Button.RIGHT: + if (this.cursor % numCols < (row < rows - 1 ? 10 : (count - 1) % numCols)) { + success = this.setCursor(this.cursor + 1); + } + break; + } + } + + if (success) { + ui.playSelect(); + } else if (error) { + ui.playError(); + } + + return success || error; + } + + setCursor(cursor: number): boolean { + let changed = false; + + const lastCursor = this.cursor; + + changed = super.setCursor(cursor); + + if (changed) { + this.cursorObj.setPosition(iconContainerX - 1 + iconSize * (cursor % numCols), iconContainerY + 1 + iconSize * Math.floor(cursor / numCols)); + + if (lastCursor > -1) { + this.iconAnimHandler.addOrUpdate(this.pokemonIconSpritesContainer.getAt(lastCursor) as Phaser.GameObjects.Sprite, PokemonIconAnimMode.NONE); + } + this.iconAnimHandler.addOrUpdate(this.pokemonIconSpritesContainer.getAt(cursor) as Phaser.GameObjects.Sprite, PokemonIconAnimMode.ACTIVE); + + this.infoContainer.showHatchInfo(this.eggHatchData[cursor]); + + } + + return changed; + } + +} diff --git a/src/ui/pokemon-hatch-info-container.ts b/src/ui/pokemon-hatch-info-container.ts new file mode 100644 index 00000000000..f8a9adced36 --- /dev/null +++ b/src/ui/pokemon-hatch-info-container.ts @@ -0,0 +1,189 @@ +import PokemonInfoContainer from "./pokemon-info-container"; +import BattleScene from "../battle-scene"; +import { Gender } from "../data/gender"; +import { Type } from "../data/type"; +import * as Utils from "../utils"; +import { TextStyle, addTextObject } from "./text"; +import { speciesEggMoves } from "#app/data/egg-moves"; +import { allMoves } from "#app/data/move"; +import { Species } from "#app/enums/species"; +import { getEggTierForSpecies } from "#app/data/egg"; +import { starterColors } from "../battle-scene"; +import { argbFromRgba } from "@material/material-color-utilities"; +import { EggHatchData } from "#app/data/egg-hatch-data"; +import { PlayerPokemon } from "#app/field/pokemon"; +import { getPokemonSpeciesForm } from "#app/data/pokemon-species"; + +/** + * Class for the hatch info summary of each pokemon + * Holds an info container as well as an additional egg sprite, name, egg moves and main sprite + */ +export default class PokemonHatchInfoContainer extends PokemonInfoContainer { + private currentPokemonSprite: Phaser.GameObjects.Sprite; + private pokemonNumberText: Phaser.GameObjects.Text; + private pokemonNameText: Phaser.GameObjects.Text; + private pokemonEggMovesContainer: Phaser.GameObjects.Container; + private pokemonEggMoveContainers: Phaser.GameObjects.Container[]; + private pokemonEggMoveBgs: Phaser.GameObjects.NineSlice[]; + private pokemonEggMoveLabels: Phaser.GameObjects.Text[]; + private pokemonHatchedIcon : Phaser.GameObjects.Sprite; + private pokemonListContainer: Phaser.GameObjects.Container; + private pokemonCandyIcon: Phaser.GameObjects.Sprite; + private pokemonCandyOverlayIcon: Phaser.GameObjects.Sprite; + private pokemonCandyCountText: Phaser.GameObjects.Text; + + constructor(scene: BattleScene, listContainer : Phaser.GameObjects.Container, x: number = 115, y: number = 9,) { + super(scene, x, y); + this.pokemonListContainer = listContainer; + + } + setup(): void { + super.setup(); + super.changeToEggSummaryLayout(); + + this.currentPokemonSprite = this.scene.add.sprite(54, 80, "pkmn__sub"); + this.currentPokemonSprite.setScale(0.8); + this.currentPokemonSprite.setPipeline(this.scene.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], ignoreTimeTint: true }); + this.pokemonListContainer.add(this.currentPokemonSprite); + + // setup name and number + this.pokemonNumberText = addTextObject(this.scene, 80, 107.5, "0000", TextStyle.SUMMARY, {fontSize: 74}); + this.pokemonNumberText.setOrigin(0, 0); + this.pokemonListContainer.add(this.pokemonNumberText); + + this.pokemonNameText = addTextObject(this.scene, 7, 107.5, "", TextStyle.SUMMARY, {fontSize: 74}); + this.pokemonNameText.setOrigin(0, 0); + this.pokemonListContainer.add(this.pokemonNameText); + + // setup egg icon and candy count + this.pokemonHatchedIcon = this.scene.add.sprite(-5, 90, "egg_icons"); + this.pokemonHatchedIcon.setOrigin(0, 0.2); + this.pokemonHatchedIcon.setScale(0.8); + this.pokemonListContainer.add(this.pokemonHatchedIcon); + + this.pokemonCandyIcon = this.scene.add.sprite(4.5, 40, "candy"); + this.pokemonCandyIcon.setScale(0.5); + this.pokemonCandyIcon.setOrigin(0, 0); + this.pokemonListContainer.add(this.pokemonCandyIcon); + + this.pokemonCandyOverlayIcon = this.scene.add.sprite(4.5, 40, "candy_overlay"); + this.pokemonCandyOverlayIcon.setScale(0.5); + this.pokemonCandyOverlayIcon.setOrigin(0, 0); + this.pokemonListContainer.add(this.pokemonCandyOverlayIcon); + + this.pokemonCandyCountText = addTextObject(this.scene, 14, 40, "x0", TextStyle.SUMMARY, { fontSize: "56px" }); + this.pokemonCandyCountText.setOrigin(0, 0); + this.pokemonListContainer.add(this.pokemonCandyCountText); + + // setup egg moves + this.pokemonEggMoveContainers = []; + this.pokemonEggMoveBgs = []; + this.pokemonEggMoveLabels = []; + this.pokemonEggMovesContainer = this.scene.add.container(0, 200); + this.pokemonEggMovesContainer.setVisible(false); + this.pokemonEggMovesContainer.setScale(0.5); + + for (let m = 0; m < 4; m++) { + const eggMoveContainer = this.scene.add.container(0, 0 + 6 * m); + + const eggMoveBg = this.scene.add.nineslice(70, 0, "type_bgs", "unknown", 92, 14, 2, 2, 2, 2); + eggMoveBg.setOrigin(1, 0); + + const eggMoveLabel = addTextObject(this.scene, 70 -eggMoveBg.width / 2, 0, "???", TextStyle.PARTY); + eggMoveLabel.setOrigin(0.5, 0); + + this.pokemonEggMoveBgs.push(eggMoveBg); + this.pokemonEggMoveLabels.push(eggMoveLabel); + + eggMoveContainer.add(eggMoveBg); + eggMoveContainer.add(eggMoveLabel); + eggMoveContainer.setScale(0.44); + + this.pokemonEggMoveContainers.push(eggMoveContainer); + + this.pokemonEggMovesContainer.add(eggMoveContainer); + } + + super.add(this.pokemonEggMoveContainers); + + } + + /** + * Disable the sprite (and replace with substitute) + */ + hideDisplayPokemon() { + this.currentPokemonSprite.setVisible(false); + } + + /** + * Display a given pokemon sprite with animations + * assumes the specific pokemon sprite has already been loaded + */ + displayPokemon(pokemon: PlayerPokemon) { + const species = pokemon.species; + const female = pokemon.gender === Gender.FEMALE; + const formIndex = pokemon.formIndex; + const shiny = pokemon.shiny; + const variant = pokemon.variant; + this.currentPokemonSprite.setVisible(false); + species.loadAssets(this.scene, female, formIndex, shiny, variant, true).then(() => { + + getPokemonSpeciesForm(species.speciesId, pokemon.formIndex).cry(this.scene); + this.currentPokemonSprite.play(species.getSpriteKey(female, formIndex, shiny, variant)); + this.currentPokemonSprite.setPipelineData("shiny", shiny); + this.currentPokemonSprite.setPipelineData("variant", variant); + this.currentPokemonSprite.setPipelineData("spriteKey", species.getSpriteKey(female, formIndex, shiny, variant)); + this.currentPokemonSprite.setVisible(true); + }); + } + + /** + * Updates the info container with the appropriate dex data and starter entry from the hatchInfo + * Also updates the displayed name, number, egg moves and main animated sprite for the pokemon + * @param hatchInfo The EggHatchData of the pokemon / new hatch to show + */ + showHatchInfo(hatchInfo: EggHatchData) { + this.pokemonEggMovesContainer.setVisible(true); + + const pokemon = hatchInfo.pokemon; + const species = pokemon.species; + this.displayPokemon(pokemon); + + super.show(pokemon, false, 1, hatchInfo.getDex(), hatchInfo.getStarterEntry(), true); + const colorScheme = starterColors[species.speciesId]; + + this.pokemonCandyIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[0]))); + this.pokemonCandyIcon.setVisible(true); + this.pokemonCandyOverlayIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[1]))); + this.pokemonCandyOverlayIcon.setVisible(true); + this.pokemonCandyCountText.setText(`x${this.scene.gameData.starterData[species.speciesId].candyCount}`); + this.pokemonCandyCountText.setVisible(true); + + this.pokemonNumberText.setText(Utils.padInt(species.speciesId, 4)); + this.pokemonNameText.setText(species.name); + + const hasEggMoves = species && speciesEggMoves.hasOwnProperty(species.speciesId); + + for (let em = 0; em < 4; em++) { + const eggMove = hasEggMoves ? allMoves[speciesEggMoves[species.speciesId][em]] : null; + const eggMoveUnlocked = eggMove && this.scene.gameData.starterData[species.speciesId].eggMoves & Math.pow(2, em); + this.pokemonEggMoveBgs[em].setFrame(Type[eggMove ? eggMove.type : Type.UNKNOWN].toString().toLowerCase()); + + this.pokemonEggMoveLabels[em].setText(eggMove && eggMoveUnlocked ? eggMove.name : "???"); + if (!(eggMove && hatchInfo.starterDataEntryBeforeUpdate.eggMoves & Math.pow(2, em)) && eggMoveUnlocked) { + this.pokemonEggMoveLabels[em].setText("(+) " + eggMove.name); + } + } + + // will always have at least one egg move + this.pokemonEggMovesContainer.setVisible(true); + + if (species.speciesId === Species.MANAPHY || species.speciesId === Species.PHIONE) { + this.pokemonHatchedIcon.setFrame("manaphy"); + } else { + this.pokemonHatchedIcon.setFrame(getEggTierForSpecies(species)); + } + + } + +} diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index edb85ecff7a..49bfd4d7293 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -6,7 +6,7 @@ import { getNatureName } from "../data/nature"; import { Type } from "../data/type"; import Pokemon from "../field/pokemon"; import i18next from "i18next"; -import { DexAttr } from "../system/game-data"; +import { DexAttr, DexEntry, StarterDataEntry } from "../system/game-data"; import * as Utils from "../utils"; import ConfirmUiHandler from "./confirm-ui-handler"; import { StatsContainer } from "./stats-container"; @@ -24,7 +24,7 @@ const languageSettings: { [key: string]: LanguageSetting } = { infoContainerTextSize: "64px" }, "de": { - infoContainerTextSize: "64px" + infoContainerTextSize: "64px", }, "es": { infoContainerTextSize: "64px" @@ -63,6 +63,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { private pokemonMovesContainers: Phaser.GameObjects.Container[]; private pokemonMoveBgs: Phaser.GameObjects.NineSlice[]; private pokemonMoveLabels: Phaser.GameObjects.Text[]; + private infoBg; private numCharsBeforeCutoff = 16; @@ -83,9 +84,9 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { const currentLanguage = i18next.resolvedLanguage!; // TODO: is this bang correct? const langSettingKey = Object.keys(languageSettings).find(lang => currentLanguage?.includes(lang))!; // TODO: is this bang correct? const textSettings = languageSettings[langSettingKey]; - const infoBg = addWindow(this.scene, 0, 0, this.infoWindowWidth, 132); - infoBg.setOrigin(0.5, 0.5); - infoBg.setName("window-info-bg"); + this.infoBg = addWindow(this.scene, 0, 0, this.infoWindowWidth, 132); + this.infoBg.setOrigin(0.5, 0.5); + this.infoBg.setName("window-info-bg"); this.pokemonMovesContainer = this.scene.add.container(6, 14); this.pokemonMovesContainer.setName("pkmn-moves"); @@ -133,7 +134,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.statsContainer = new StatsContainer(this.scene, -48, -64, true); - this.add(infoBg); + this.add(this.infoBg); this.add(this.statsContainer); // The position should be set per language @@ -207,9 +208,16 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.setVisible(false); } - show(pokemon: Pokemon, showMoves: boolean = false, speedMultiplier: number = 1): Promise { + show(pokemon: Pokemon, showMoves: boolean = false, speedMultiplier: number = 1, dexEntry?: DexEntry, starterEntry?: StarterDataEntry, eggInfo = false): Promise { return new Promise(resolve => { - const caughtAttr = BigInt(pokemon.scene.gameData.dexData[pokemon.species.speciesId].caughtAttr); + if (!dexEntry) { + dexEntry = pokemon.scene.gameData.dexData[pokemon.species.speciesId]; + } + if (!starterEntry) { + starterEntry = pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()]; + } + + const caughtAttr = BigInt(dexEntry.caughtAttr); if (pokemon.gender > Gender.GENDERLESS) { this.pokemonGenderText.setText(getGenderSymbol(pokemon.gender)); this.pokemonGenderText.setColor(getGenderColor(pokemon.gender)); @@ -268,7 +276,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { const opponentPokemonAbilityIndex = (opponentPokemonOneNormalAbility && pokemon.abilityIndex === 1) ? 2 : pokemon.abilityIndex; const opponentPokemonAbilityAttr = 1 << opponentPokemonAbilityIndex; - const rootFormHasHiddenAbility = pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].abilityAttr & opponentPokemonAbilityAttr; + const rootFormHasHiddenAbility = starterEntry.abilityAttr & opponentPokemonAbilityAttr; if (!rootFormHasHiddenAbility) { this.pokemonAbilityLabelText.setColor(getTextColor(TextStyle.SUMMARY_BLUE, false, this.scene.uiTheme)); @@ -280,7 +288,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.pokemonNatureText.setText(getNatureName(pokemon.getNature(), true, false, false, this.scene.uiTheme)); - const dexNatures = pokemon.scene.gameData.dexData[pokemon.species.speciesId].natureAttr; + const dexNatures = dexEntry.natureAttr; const newNature = 1 << (pokemon.nature + 1); if (!(dexNatures & newNature)) { @@ -324,31 +332,31 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { } const starterSpeciesId = pokemon.species.getRootSpeciesId(); - const originalIvs: integer[] | null = this.scene.gameData.dexData[starterSpeciesId].caughtAttr - ? this.scene.gameData.dexData[starterSpeciesId].ivs - : null; + const originalIvs: integer[] | null = eggInfo ? (dexEntry.caughtAttr ? dexEntry.ivs : null) : (this.scene.gameData.dexData[starterSpeciesId].caughtAttr + ? this.scene.gameData.dexData[starterSpeciesId].ivs : null); this.statsContainer.updateIvs(pokemon.ivs, originalIvs!); // TODO: is this bang correct? - - this.scene.tweens.add({ - targets: this, - duration: Utils.fixedInt(Math.floor(750 / speedMultiplier)), - ease: "Cubic.easeInOut", - x: this.initialX - this.infoWindowWidth, - onComplete: () => { - resolve(); - } - }); - - if (showMoves) { + if (!eggInfo) { this.scene.tweens.add({ - delay: Utils.fixedInt(Math.floor(325 / speedMultiplier)), - targets: this.pokemonMovesContainer, - duration: Utils.fixedInt(Math.floor(325 / speedMultiplier)), + targets: this, + duration: Utils.fixedInt(Math.floor(750 / speedMultiplier)), ease: "Cubic.easeInOut", - x: this.movesContainerInitialX - 57, - onComplete: () => resolve() + x: this.initialX - this.infoWindowWidth, + onComplete: () => { + resolve(); + } }); + + if (showMoves) { + this.scene.tweens.add({ + delay: Utils.fixedInt(Math.floor(325 / speedMultiplier)), + targets: this.pokemonMovesContainer, + duration: Utils.fixedInt(Math.floor(325 / speedMultiplier)), + ease: "Cubic.easeInOut", + x: this.movesContainerInitialX - 57, + onComplete: () => resolve() + }); + } } for (let m = 0; m < 4; m++) { @@ -364,6 +372,36 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { }); } + changeToEggSummaryLayout() { + // The position should be set per language (and shifted for new layout) + const currentLanguage = i18next.resolvedLanguage!; // TODO: is this bang correct? + const langSettingKey = Object.keys(languageSettings).find(lang => currentLanguage?.includes(lang))!; // TODO: is this bang correct? + const textSettings = languageSettings[langSettingKey]; + + const eggLabelTextOffset = 43; + const infoContainerLabelXPos = (textSettings?.infoContainerLabelXPos || -18) + eggLabelTextOffset; + const infoContainerTextXPos = (textSettings?.infoContainerTextXPos || -14) + eggLabelTextOffset; + + this.x = this.initialX - this.infoWindowWidth; + + this.pokemonGenderText.setPosition(89, -2); + this.pokemonGenderNewText.setPosition(79, -2); + this.pokemonShinyIcon.setPosition(82, 87); + this.pokemonShinyNewIcon.setPosition(72, 87); + + this.pokemonFormLabelText.setPosition(infoContainerLabelXPos, 152); + this.pokemonFormText.setPosition(infoContainerTextXPos, 152); + this.pokemonAbilityLabelText.setPosition(infoContainerLabelXPos, 110); + this.pokemonAbilityText.setPosition(infoContainerTextXPos, 110); + this.pokemonNatureLabelText.setPosition(infoContainerLabelXPos, 125); + this.pokemonNatureText.setPosition(infoContainerTextXPos, 125); + + this.statsContainer.setScale(0.7); + this.statsContainer.setPosition(30, -3); + this.infoBg.setVisible(false); + this.pokemonMovesContainer.setVisible(false); + } + makeRoomForConfirmUi(speedMultiplier: number = 1, fromCatch: boolean = false): Promise { const xPosition = fromCatch ? this.initialX - this.infoWindowWidth - 65 : this.initialX - this.infoWindowWidth - ConfirmUiHandler.windowWidth; return new Promise(resolve => { diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 8ec91b59480..6c988b43043 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -49,6 +49,7 @@ import RenameFormUiHandler from "./rename-form-ui-handler"; import AdminUiHandler from "./admin-ui-handler"; import RunHistoryUiHandler from "./run-history-ui-handler"; import RunInfoUiHandler from "./run-info-ui-handler"; +import EggSummaryUiHandler from "./egg-summary-ui-handler"; import TestDialogueUiHandler from "#app/ui/test-dialogue-ui-handler"; import AutoCompleteUiHandler from "./autocomplete-ui-handler"; @@ -66,6 +67,7 @@ export enum Mode { STARTER_SELECT, EVOLUTION_SCENE, EGG_HATCH_SCENE, + EGG_HATCH_SUMMARY, CONFIRM, OPTION_SELECT, MENU, @@ -171,6 +173,7 @@ export default class UI extends Phaser.GameObjects.Container { new StarterSelectUiHandler(scene), new EvolutionSceneHandler(scene), new EggHatchSceneHandler(scene), + new EggSummaryUiHandler(scene), new ConfirmUiHandler(scene), new OptionSelectUiHandler(scene), new MenuUiHandler(scene), From 11ac929a4dda2fb5825cec6f715d3e35e8eec88c Mon Sep 17 00:00:00 2001 From: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:00:31 +0200 Subject: [PATCH 21/91] fix getting the highest ivs for the iv scanner (#4022) --- src/ui/battle-message-ui-handler.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index 4c2b798558a..3bea0f21433 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -215,12 +215,11 @@ export default class BattleMessageUiHandler extends MessageUiHandler { getTopIvs(ivs: integer[], shownIvsCount: integer): Stat[] { let shownStats: Stat[] = []; if (shownIvsCount < 6) { - let highestIv = -1; + const statsPool = PERMANENT_STATS.slice(); + // Sort the stats from highest to lowest iv + statsPool.sort((s1, s2) => ivs[s2] - ivs[s1]); for (let i = 0; i < shownIvsCount; i++) { - if (ivs[i] > highestIv) { - shownStats.push(PERMANENT_STATS[i]); - highestIv = ivs[i]; - } + shownStats.push(statsPool[i]); } } else { shownStats = PERMANENT_STATS.slice(); From 207b3e1eb70c39245d4266c53ca9e4ab7861e31e Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:56:57 -0700 Subject: [PATCH 22/91] [Test] Add `forceEnemyMove` Game Manager util (#3678) * Add `forceEnemyMove` test util * fix ceaseless edge test * Apply flx's suggestions Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> * Rewrite Follow Me test * Reorganize new imports in game manager * Rewrite Rage Powder + Spotlight tests --------- Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/phases/enemy-command-phase.ts | 4 ++ src/test/moves/ceaseless_edge.test.ts | 2 +- src/test/moves/focus_punch.test.ts | 2 +- src/test/moves/follow_me.test.ts | 56 ++++++++++++++++----------- src/test/moves/rage_powder.test.ts | 24 ++++++------ src/test/moves/spikes.test.ts | 2 +- src/test/moves/spotlight.test.ts | 39 ++++++++----------- src/test/utils/gameManager.ts | 32 ++++++++++++++- 8 files changed, 98 insertions(+), 63 deletions(-) diff --git a/src/phases/enemy-command-phase.ts b/src/phases/enemy-command-phase.ts index d9bb08d6fae..91ee0456cd4 100644 --- a/src/phases/enemy-command-phase.ts +++ b/src/phases/enemy-command-phase.ts @@ -77,4 +77,8 @@ export class EnemyCommandPhase extends FieldPhase { this.end(); } + + getFieldIndex(): number { + return this.fieldIndex; + } } diff --git a/src/test/moves/ceaseless_edge.test.ts b/src/test/moves/ceaseless_edge.test.ts index 34ecf8f39f6..8511b3179c6 100644 --- a/src/test/moves/ceaseless_edge.test.ts +++ b/src/test/moves/ceaseless_edge.test.ts @@ -110,7 +110,7 @@ describe("Moves - Ceaseless Edge", () => { const hpBeforeSpikes = game.scene.currentBattle.enemyParty[1].hp; // Check HP of pokemon that WILL BE switched in (index 1) - game.forceOpponentToSwitch(); + game.forceEnemyToSwitch(); game.move.select(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase, false); expect(game.scene.currentBattle.enemyParty[0].hp).toBeLessThan(hpBeforeSpikes); diff --git a/src/test/moves/focus_punch.test.ts b/src/test/moves/focus_punch.test.ts index 99399623a1c..249647f0294 100644 --- a/src/test/moves/focus_punch.test.ts +++ b/src/test/moves/focus_punch.test.ts @@ -123,7 +123,7 @@ describe("Moves - Focus Punch", () => { await game.startBattle([Species.CHARIZARD]); - game.forceOpponentToSwitch(); + game.forceEnemyToSwitch(); game.move.select(Moves.FOCUS_PUNCH); await game.phaseInterceptor.to(TurnStartPhase); diff --git a/src/test/moves/follow_me.test.ts b/src/test/moves/follow_me.test.ts index 64fc9c16256..7d0c4fdb546 100644 --- a/src/test/moves/follow_me.test.ts +++ b/src/test/moves/follow_me.test.ts @@ -28,48 +28,55 @@ describe("Moves - Follow Me", () => { game = new GameManager(phaserGame); game.override.battleType("double"); game.override.starterSpecies(Species.AMOONGUSS); + game.override.ability(Abilities.BALL_FETCH); game.override.enemySpecies(Species.SNORLAX); game.override.startingLevel(100); game.override.enemyLevel(100); game.override.moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.enemyMoveset([Moves.TACKLE, Moves.FOLLOW_ME, Moves.SPLASH]); }); test( "move should redirect enemy attacks to the user", async () => { - await game.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); const playerPokemon = game.scene.getPlayerField(); - const playerStartingHp = playerPokemon.map(p => p.hp); - game.move.select(Moves.FOLLOW_ME); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY); + + // Force both enemies to target the player Pokemon that did not use Follow Me + await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.phaseInterceptor.to(TurnEndPhase, false); - expect(playerPokemon[0].hp).toBeLessThan(playerStartingHp[0]); - expect(playerPokemon[1].hp).toBe(playerStartingHp[1]); + expect(playerPokemon[0].hp).toBeLessThan(playerPokemon[0].getMaxHp()); + expect(playerPokemon[1].hp).toBe(playerPokemon[1].getMaxHp()); }, TIMEOUT ); test( "move should redirect enemy attacks to the first ally that uses it", async () => { - await game.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); const playerPokemon = game.scene.getPlayerField(); - const playerStartingHp = playerPokemon.map(p => p.hp); - game.move.select(Moves.FOLLOW_ME); game.move.select(Moves.FOLLOW_ME, 1); + + // Each player is targeted by an enemy + await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.phaseInterceptor.to(TurnEndPhase, false); playerPokemon.sort((a, b) => a.getEffectiveStat(Stat.SPD) - b.getEffectiveStat(Stat.SPD)); - expect(playerPokemon[1].hp).toBeLessThan(playerStartingHp[1]); - expect(playerPokemon[0].hp).toBe(playerStartingHp[0]); + expect(playerPokemon[1].hp).toBeLessThan(playerPokemon[1].getMaxHp()); + expect(playerPokemon[0].hp).toBe(playerPokemon[0].getMaxHp()); }, TIMEOUT ); @@ -78,21 +85,23 @@ describe("Moves - Follow Me", () => { async () => { game.override.ability(Abilities.STALWART); game.override.moveset([Moves.QUICK_ATTACK]); - game.override.enemyMoveset([Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME]); - await game.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); const enemyPokemon = game.scene.getEnemyField(); - const enemyStartingHp = enemyPokemon.map(p => p.hp); - game.move.select(Moves.QUICK_ATTACK, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); + + // Target doesn't need to be specified if the move is self-targeted + await game.forceEnemyMove(Moves.FOLLOW_ME); + await game.forceEnemyMove(Moves.SPLASH); + await game.phaseInterceptor.to(TurnEndPhase, false); // If redirection was bypassed, both enemies should be damaged - expect(enemyPokemon[0].hp).toBeLessThan(enemyStartingHp[0]); - expect(enemyPokemon[1].hp).toBeLessThan(enemyStartingHp[1]); + expect(enemyPokemon[0].hp).toBeLessThan(enemyPokemon[0].getMaxHp()); + expect(enemyPokemon[1].hp).toBeLessThan(enemyPokemon[1].getMaxHp()); }, TIMEOUT ); @@ -100,21 +109,22 @@ describe("Moves - Follow Me", () => { "move effect should be bypassed by Snipe Shot", async () => { game.override.moveset([Moves.SNIPE_SHOT]); - game.override.enemyMoveset([Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME]); - await game.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); const enemyPokemon = game.scene.getEnemyField(); - const enemyStartingHp = enemyPokemon.map(p => p.hp); - game.move.select(Moves.SNIPE_SHOT, 0, BattlerIndex.ENEMY); game.move.select(Moves.SNIPE_SHOT, 1, BattlerIndex.ENEMY_2); + + await game.forceEnemyMove(Moves.FOLLOW_ME); + await game.forceEnemyMove(Moves.SPLASH); + await game.phaseInterceptor.to(TurnEndPhase, false); // If redirection was bypassed, both enemies should be damaged - expect(enemyPokemon[0].hp).toBeLessThan(enemyStartingHp[0]); - expect(enemyPokemon[1].hp).toBeLessThan(enemyStartingHp[1]); + expect(enemyPokemon[0].hp).toBeLessThan(enemyPokemon[0].getMaxHp()); + expect(enemyPokemon[1].hp).toBeLessThan(enemyPokemon[1].getMaxHp()); }, TIMEOUT ); }); diff --git a/src/test/moves/rage_powder.test.ts b/src/test/moves/rage_powder.test.ts index 3e78c6fe0c9..3e9f422fda8 100644 --- a/src/test/moves/rage_powder.test.ts +++ b/src/test/moves/rage_powder.test.ts @@ -1,5 +1,4 @@ import { BattlerIndex } from "#app/battle"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -31,27 +30,27 @@ describe("Moves - Rage Powder", () => { game.override.startingLevel(100); game.override.enemyLevel(100); game.override.moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.enemyMoveset([Moves.RAGE_POWDER, Moves.TACKLE, Moves.SPLASH]); }); test( "move effect should be bypassed by Grass type", async () => { - game.override.enemyMoveset([Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER]); - - await game.startBattle([Species.AMOONGUSS, Species.VENUSAUR]); + await game.classicMode.startBattle([Species.AMOONGUSS, Species.VENUSAUR]); const enemyPokemon = game.scene.getEnemyField(); - const enemyStartingHp = enemyPokemon.map(p => p.hp); - game.move.select(Moves.QUICK_ATTACK, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); - await game.phaseInterceptor.to(TurnEndPhase, false); + + await game.forceEnemyMove(Moves.RAGE_POWDER); + await game.forceEnemyMove(Moves.SPLASH); + + await game.phaseInterceptor.to("BerryPhase", false); // If redirection was bypassed, both enemies should be damaged - expect(enemyPokemon[0].hp).toBeLessThan(enemyStartingHp[0]); - expect(enemyPokemon[1].hp).toBeLessThan(enemyStartingHp[1]); + expect(enemyPokemon[0].hp).toBeLessThan(enemyPokemon[0].getMaxHp()); + expect(enemyPokemon[1].hp).toBeLessThan(enemyPokemon[0].getMaxHp()); }, TIMEOUT ); @@ -59,10 +58,9 @@ describe("Moves - Rage Powder", () => { "move effect should be bypassed by Overcoat", async () => { game.override.ability(Abilities.OVERCOAT); - game.override.enemyMoveset([Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER]); // Test with two non-Grass type player Pokemon - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); const enemyPokemon = game.scene.getEnemyField(); @@ -70,7 +68,7 @@ describe("Moves - Rage Powder", () => { game.move.select(Moves.QUICK_ATTACK, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); - await game.phaseInterceptor.to(TurnEndPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); // If redirection was bypassed, both enemies should be damaged expect(enemyPokemon[0].hp).toBeLessThan(enemyStartingHp[0]); diff --git a/src/test/moves/spikes.test.ts b/src/test/moves/spikes.test.ts index 05ea717ebbe..fa2e7521152 100644 --- a/src/test/moves/spikes.test.ts +++ b/src/test/moves/spikes.test.ts @@ -73,7 +73,7 @@ describe("Moves - Spikes", () => { await game.toNextTurn(); game.move.select(Moves.SPLASH); - game.forceOpponentToSwitch(); + game.forceEnemyToSwitch(); await game.toNextTurn(); const enemy = game.scene.getEnemyParty()[0]; diff --git a/src/test/moves/spotlight.test.ts b/src/test/moves/spotlight.test.ts index e4dc8815f6d..aef44369642 100644 --- a/src/test/moves/spotlight.test.ts +++ b/src/test/moves/spotlight.test.ts @@ -1,5 +1,4 @@ import { BattlerIndex } from "#app/battle"; -import { Stat } from "#enums/stat"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -31,52 +30,46 @@ describe("Moves - Spotlight", () => { game.override.startingLevel(100); game.override.enemyLevel(100); game.override.moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.enemyMoveset([Moves.FOLLOW_ME, Moves.SPLASH]); }); test( "move should redirect attacks to the target", async () => { - await game.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); const enemyPokemon = game.scene.getEnemyField(); - const enemyStartingHp = enemyPokemon.map(p => p.hp); - game.move.select(Moves.SPOTLIGHT, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); + + await game.forceEnemyMove(Moves.SPLASH); + await game.forceEnemyMove(Moves.SPLASH); + await game.phaseInterceptor.to(TurnEndPhase, false); - expect(enemyPokemon[0].hp).toBeLessThan(enemyStartingHp[0]); - expect(enemyPokemon[1].hp).toBe(enemyStartingHp[1]); + expect(enemyPokemon[0].hp).toBeLessThan(enemyPokemon[0].getMaxHp()); + expect(enemyPokemon[1].hp).toBe(enemyPokemon[1].getMaxHp()); }, TIMEOUT ); test( "move should cause other redirection moves to fail", async () => { - game.override.enemyMoveset([Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME]); - - await game.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.AMOONGUSS, Species.CHARIZARD]); const enemyPokemon = game.scene.getEnemyField(); - /** - * Spotlight will target the slower enemy. In this situation without Spotlight being used, - * the faster enemy would normally end up with the Center of Attention tag. - */ - enemyPokemon.sort((a, b) => b.getEffectiveStat(Stat.SPD) - a.getEffectiveStat(Stat.SPD)); - const spotTarget = enemyPokemon[1].getBattlerIndex(); - const attackTarget = enemyPokemon[0].getBattlerIndex(); + game.move.select(Moves.SPOTLIGHT, 0, BattlerIndex.ENEMY); + game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); - const enemyStartingHp = enemyPokemon.map(p => p.hp); + await game.forceEnemyMove(Moves.SPLASH); + await game.forceEnemyMove(Moves.FOLLOW_ME); - game.move.select(Moves.SPOTLIGHT, 0, spotTarget); - game.move.select(Moves.QUICK_ATTACK, 1, attackTarget); - await game.phaseInterceptor.to(TurnEndPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); - expect(enemyPokemon[1].hp).toBeLessThan(enemyStartingHp[1]); - expect(enemyPokemon[0].hp).toBe(enemyStartingHp[0]); + expect(enemyPokemon[0].hp).toBeLessThan(enemyPokemon[0].getMaxHp()); + expect(enemyPokemon[1].hp).toBe(enemyPokemon[1].getMaxHp()); }, TIMEOUT ); }); diff --git a/src/test/utils/gameManager.ts b/src/test/utils/gameManager.ts index 998d10ddf12..f367fc70936 100644 --- a/src/test/utils/gameManager.ts +++ b/src/test/utils/gameManager.ts @@ -2,6 +2,8 @@ import { updateUserInfo } from "#app/account"; import { BattlerIndex } from "#app/battle"; import BattleScene from "#app/battle-scene"; import { BattleStyle } from "#app/enums/battle-style"; +import { Moves } from "#app/enums/moves"; +import { getMoveTargets } from "#app/data/move"; import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import Trainer from "#app/field/trainer"; import { GameModes, getGameMode } from "#app/game-mode"; @@ -9,6 +11,7 @@ import { ModifierTypeOption, modifierTypes } from "#app/modifier/modifier-type"; import overrides from "#app/overrides"; import { CommandPhase } from "#app/phases/command-phase"; import { EncounterPhase } from "#app/phases/encounter-phase"; +import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { FaintPhase } from "#app/phases/faint-phase"; import { LoginPhase } from "#app/phases/login-phase"; import { MovePhase } from "#app/phases/move-phase"; @@ -243,7 +246,34 @@ export default class GameManager { }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase) || this.isCurrentPhase(CheckSwitchPhase)); } - forceOpponentToSwitch() { + /** + * Forces the next enemy selecting a move to use the given move in its moveset against the + * given target (if applicable). + * @param moveId {@linkcode Moves} the move the enemy will use + * @param target {@linkcode BattlerIndex} the target on which the enemy will use the given move + */ + async forceEnemyMove(moveId: Moves, target?: BattlerIndex) { + // Wait for the next EnemyCommandPhase to start + await this.phaseInterceptor.to(EnemyCommandPhase, false); + const enemy = this.scene.getEnemyField()[(this.scene.getCurrentPhase() as EnemyCommandPhase).getFieldIndex()]; + const legalTargets = getMoveTargets(enemy, moveId); + + vi.spyOn(enemy, "getNextMove").mockReturnValueOnce({ + move: moveId, + targets: (target && !legalTargets.multiple && legalTargets.targets.includes(target)) + ? [target] + : enemy.getNextTargets(moveId) + }); + + /** + * Run the EnemyCommandPhase to completion. + * This allows this function to be called consecutively to + * force a move for each enemy in a double battle. + */ + await this.phaseInterceptor.to(EnemyCommandPhase); + } + + forceEnemyToSwitch() { const originalMatchupScore = Trainer.prototype.getPartyMemberMatchupScores; Trainer.prototype.getPartyMemberMatchupScores = () => { Trainer.prototype.getPartyMemberMatchupScores = originalMatchupScore; From fde32cea6c9376a64f6d8dcb4e77cef9b4a0a265 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:58:35 -0700 Subject: [PATCH 23/91] [Misc][Bug] Add `isBatonPassable` property to `BattlerTag`s (#3472) * Add `isTransferrable` property to `BattlerTag`s * Update Baton Pass to check `isTransferrable` for `BattlerTag`s * Don't mark Salt Cure as transferrable * Add Destiny Bond, remove `GroundedTag` and `ExposedTag` * Fix daily mode test * Add test * Rename `isTransferrable` to `isBatonPassable` --- src/data/battler-tags.ts | 26 +++++++++-------- src/field/pokemon.ts | 6 +--- src/test/moves/baton_pass.test.ts | 46 +++++++++++++++++++------------ 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 6e53ef00f45..66bcc7b9c3c 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -39,13 +39,15 @@ export class BattlerTag { public turnCount: number; public sourceMove: Moves; public sourceId?: number; + public isBatonPassable: boolean; - constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: number, sourceMove?: Moves, sourceId?: number) { + constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: number, sourceMove?: Moves, sourceId?: number, isBatonPassable: boolean = false) { this.tagType = tagType; this.lapseTypes = Array.isArray(lapseType) ? lapseType : [ lapseType ]; this.turnCount = turnCount; this.sourceMove = sourceMove!; // TODO: is this bang correct? this.sourceId = sourceId; + this.isBatonPassable = isBatonPassable; } canAdd(pokemon: Pokemon): boolean { @@ -206,7 +208,7 @@ export class ShellTrapTag extends BattlerTag { export class TrappedTag extends BattlerTag { constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType, turnCount: number, sourceMove: Moves, sourceId: number) { - super(tagType, lapseType, turnCount, sourceMove, sourceId); + super(tagType, lapseType, turnCount, sourceMove, sourceId, true); } canAdd(pokemon: Pokemon): boolean { @@ -326,7 +328,7 @@ export class InterruptedTag extends BattlerTag { */ export class ConfusedTag extends BattlerTag { constructor(turnCount: number, sourceMove: Moves) { - super(BattlerTagType.CONFUSED, BattlerTagLapseType.MOVE, turnCount, sourceMove); + super(BattlerTagType.CONFUSED, BattlerTagLapseType.MOVE, turnCount, sourceMove, undefined, true); } canAdd(pokemon: Pokemon): boolean { @@ -386,7 +388,7 @@ export class ConfusedTag extends BattlerTag { */ export class DestinyBondTag extends BattlerTag { constructor(sourceMove: Moves, sourceId: number) { - super(BattlerTagType.DESTINY_BOND, BattlerTagLapseType.PRE_MOVE, 1, sourceMove, sourceId); + super(BattlerTagType.DESTINY_BOND, BattlerTagLapseType.PRE_MOVE, 1, sourceMove, sourceId, true); } /** @@ -505,7 +507,7 @@ export class SeedTag extends BattlerTag { private sourceIndex: number; constructor(sourceId: number) { - super(BattlerTagType.SEEDED, BattlerTagLapseType.TURN_END, 1, Moves.LEECH_SEED, sourceId); + super(BattlerTagType.SEEDED, BattlerTagLapseType.TURN_END, 1, Moves.LEECH_SEED, sourceId, true); } /** @@ -776,7 +778,7 @@ export class OctolockTag extends TrappedTag { export class AquaRingTag extends BattlerTag { constructor() { - super(BattlerTagType.AQUA_RING, BattlerTagLapseType.TURN_END, 1, Moves.AQUA_RING, undefined); + super(BattlerTagType.AQUA_RING, BattlerTagLapseType.TURN_END, 1, Moves.AQUA_RING, undefined, true); } onAdd(pokemon: Pokemon): void { @@ -808,7 +810,7 @@ export class AquaRingTag extends BattlerTag { /** Tag used to allow moves that interact with {@link Moves.MINIMIZE} to function */ export class MinimizeTag extends BattlerTag { constructor() { - super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE, undefined); + super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE); } canAdd(pokemon: Pokemon): boolean { @@ -1206,7 +1208,7 @@ export class SturdyTag extends BattlerTag { export class PerishSongTag extends BattlerTag { constructor(turnCount: number) { - super(BattlerTagType.PERISH_SONG, BattlerTagLapseType.TURN_END, turnCount, Moves.PERISH_SONG); + super(BattlerTagType.PERISH_SONG, BattlerTagLapseType.TURN_END, turnCount, Moves.PERISH_SONG, undefined, true); } canAdd(pokemon: Pokemon): boolean { @@ -1262,7 +1264,7 @@ export class AbilityBattlerTag extends BattlerTag { public ability: Abilities; constructor(tagType: BattlerTagType, ability: Abilities, lapseType: BattlerTagLapseType, turnCount: number) { - super(tagType, lapseType, turnCount, undefined); + super(tagType, lapseType, turnCount); this.ability = ability; } @@ -1438,7 +1440,7 @@ export class TypeImmuneTag extends BattlerTag { public immuneType: Type; constructor(tagType: BattlerTagType, sourceMove: Moves, immuneType: Type, length: number = 1) { - super(tagType, BattlerTagLapseType.TURN_END, length, sourceMove); + super(tagType, BattlerTagLapseType.TURN_END, length, sourceMove, undefined, true); this.immuneType = immuneType; } @@ -1502,7 +1504,7 @@ export class TypeBoostTag extends BattlerTag { export class CritBoostTag extends BattlerTag { constructor(tagType: BattlerTagType, sourceMove: Moves) { - super(tagType, BattlerTagLapseType.TURN_END, 1, sourceMove); + super(tagType, BattlerTagLapseType.TURN_END, 1, sourceMove, undefined, true); } onAdd(pokemon: Pokemon): void { @@ -1594,7 +1596,7 @@ export class CursedTag extends BattlerTag { private sourceIndex: number; constructor(sourceId: number) { - super(BattlerTagType.CURSED, BattlerTagLapseType.TURN_END, 1, Moves.CURSE, sourceId); + super(BattlerTagType.CURSED, BattlerTagLapseType.TURN_END, 1, Moves.CURSE, sourceId, true); } /** diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 405a26d4a16..e0a9a4a86ce 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2660,11 +2660,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } for (const tag of source.summonData.tags) { - - // bypass those can not be passed via Baton Pass - const excludeTagTypes = new Set([BattlerTagType.DROWSY, BattlerTagType.INFATUATED, BattlerTagType.FIRE_BOOST]); - - if (excludeTagTypes.has(tag.tagType)) { + if (!tag.isBatonPassable) { continue; } diff --git a/src/test/moves/baton_pass.test.ts b/src/test/moves/baton_pass.test.ts index 0643b73e481..1a4edafdd36 100644 --- a/src/test/moves/baton_pass.test.ts +++ b/src/test/moves/baton_pass.test.ts @@ -1,13 +1,13 @@ -import { Stat } from "#enums/stat"; -import { PostSummonPhase } from "#app/phases/post-summon-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { BattlerIndex } from "#app/battle"; import GameManager from "#app/test/utils/gameManager"; +import { Abilities } from "#enums/abilities"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { Stat } from "#enums/stat"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; - describe("Moves - Baton Pass", () => { let phaserGame: Phaser.Game; @@ -27,20 +27,17 @@ describe("Moves - Baton Pass", () => { game = new GameManager(phaserGame); game.override .battleType("single") - .enemySpecies(Species.DUGTRIO) - .startingLevel(1) - .startingWave(97) + .enemySpecies(Species.MAGIKARP) + .enemyAbility(Abilities.BALL_FETCH) .moveset([Moves.BATON_PASS, Moves.NASTY_PLOT, Moves.SPLASH]) + .ability(Abilities.BALL_FETCH) .enemyMoveset(SPLASH_ONLY) .disableCrits(); }); it("transfers all stat stages when player uses it", async() => { // arrange - await game.startBattle([ - Species.RAICHU, - Species.SHUCKLE - ]); + await game.classicMode.startBattle([Species.RAICHU, Species.SHUCKLE]); // round 1 - buff game.move.select(Moves.NASTY_PLOT); @@ -53,7 +50,7 @@ describe("Moves - Baton Pass", () => { // round 2 - baton pass game.move.select(Moves.BATON_PASS); game.doSelectPartyPokemon(1); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); // assert playerPokemon = game.scene.getPlayerPokemon()!; @@ -66,10 +63,7 @@ describe("Moves - Baton Pass", () => { game.override .startingWave(5) .enemyMoveset(new Array(4).fill([Moves.NASTY_PLOT])); - await game.startBattle([ - Species.RAICHU, - Species.SHUCKLE - ]); + await game.classicMode.startBattle([Species.RAICHU, Species.SHUCKLE]); // round 1 - ai buffs game.move.select(Moves.SPLASH); @@ -79,7 +73,7 @@ describe("Moves - Baton Pass", () => { game.scene.getEnemyPokemon()!.hp = 100; game.override.enemyMoveset(new Array(4).fill(Moves.BATON_PASS)); game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(PostSummonPhase, false); + await game.phaseInterceptor.to("PostSummonPhase", false); // assert // check buffs are still there @@ -94,4 +88,20 @@ describe("Moves - Baton Pass", () => { "PostSummonPhase" ]); }, 20000); + + it("doesn't transfer effects that aren't transferrable", async() => { + game.override.enemyMoveset(Array(4).fill(Moves.SALT_CURE)); + await game.classicMode.startBattle([Species.PIKACHU, Species.FEEBAS]); + + const [player1, player2] = game.scene.getParty(); + + game.move.select(Moves.BATON_PASS); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.phaseInterceptor.to("MoveEndPhase"); + expect(player1.findTag((t) => t.tagType === BattlerTagType.SALT_CURED)).toBeTruthy(); + game.doSelectPartyPokemon(1); + await game.toNextTurn(); + + expect(player2.findTag((t) => t.tagType === BattlerTagType.SALT_CURED)).toBeUndefined(); + }, 20000); }); From a537113c8f186de12fd177b0d3fed7e92c8026b1 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:45:56 -0700 Subject: [PATCH 24/91] Re-add lost i18n strings (#4024) --- src/locales/en/arena-flyout.json | 5 +++-- src/locales/en/arena-tag.json | 8 +++++++- src/locales/en/move-trigger.json | 5 +++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/locales/en/arena-flyout.json b/src/locales/en/arena-flyout.json index 141ed4f743d..043d4127eb8 100644 --- a/src/locales/en/arena-flyout.json +++ b/src/locales/en/arena-flyout.json @@ -39,5 +39,6 @@ "matBlock": "Mat Block", "craftyShield": "Crafty Shield", "tailwind": "Tailwind", - "happyHour": "Happy Hour" -} + "happyHour": "Happy Hour", + "safeguard": "Safeguard" +} \ No newline at end of file diff --git a/src/locales/en/arena-tag.json b/src/locales/en/arena-tag.json index ef0b55b691b..d8fed386b24 100644 --- a/src/locales/en/arena-tag.json +++ b/src/locales/en/arena-tag.json @@ -47,5 +47,11 @@ "tailwindOnRemovePlayer": "Your team's Tailwind petered out!", "tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!", "happyHourOnAdd": "Everyone is caught up in the happy atmosphere!", - "happyHourOnRemove": "The atmosphere returned to normal." + "happyHourOnRemove": "The atmosphere returned to normal.", + "safeguardOnAdd": "The whole field is cloaked in a mystical veil!", + "safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!", + "safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!", + "safeguardOnRemove": "The field is no longer protected by Safeguard!", + "safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!", + "safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!" } \ No newline at end of file diff --git a/src/locales/en/move-trigger.json b/src/locales/en/move-trigger.json index 110d3dc68c7..e70fb9dcfb7 100644 --- a/src/locales/en/move-trigger.json +++ b/src/locales/en/move-trigger.json @@ -65,5 +65,6 @@ "suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!", "revivalBlessing": "{{pokemonName}} was revived!", "swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!", - "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!" -} + "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!", + "safeguard": "{{targetName}} is protected by Safeguard!" +} \ No newline at end of file From 8835ae0299b53520406ef5b22faaa2ebd6f4fc3e Mon Sep 17 00:00:00 2001 From: chaosgrimmon <31082757+chaosgrimmon@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:46:33 -0400 Subject: [PATCH 25/91] [Sprite] Index egg skip UI (#4027) * [Sprite] Index egg skip UI * [Sprite] Index egg skip legacy UI --- public/images/ui/egg_summary_bg.png | Bin 2160 -> 1064 bytes public/images/ui/icon_egg_move.png | Bin 237 -> 179 bytes public/images/ui/legacy/egg_summary_bg.png | Bin 2160 -> 1064 bytes public/images/ui/legacy/icon_egg_move.png | Bin 237 -> 179 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/images/ui/egg_summary_bg.png b/public/images/ui/egg_summary_bg.png index 27e367212aaae20dc43f3f03c9fc122b9d99e8fe..658f5df0e96bd901d105690d73500b965788df5c 100644 GIT binary patch literal 1064 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 diff --git a/public/images/ui/icon_egg_move.png b/public/images/ui/icon_egg_move.png index 6af186e9b0c21a3952b80fc00ed2a7494cee18eb..a5b0bff4ace05ee65752673f6ecb0ff05ad415c8 100644 GIT binary patch delta 162 zcmaFMxS4T+WIZzj1H-O2_WeMLu{g-xiDBJ2nU_G0Xn;?ME0C5JleRXtPAcduuAjPe z&CdV-|A+Pm%>YWUmjw9*GXVKOu(W>JZ=jH+r;B3<$4uKEPd)|%4kp$s|Lu29(`z}b zq9dqm)OW(?kV>l8Y{gJXbzN!c+ikn=?*E-8&FIthyC#8A*OB4evfPeaKvNhzUHx3v IIVCg!08Ak}jQ{`u delta 220 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 diff --git a/public/images/ui/legacy/icon_egg_move.png b/public/images/ui/legacy/icon_egg_move.png index 6af186e9b0c21a3952b80fc00ed2a7494cee18eb..a5b0bff4ace05ee65752673f6ecb0ff05ad415c8 100644 GIT binary patch delta 162 zcmaFMxS4T+WIZzj1H-O2_WeMLu{g-xiDBJ2nU_G0Xn;?ME0C5JleRXtPAcduuAjPe z&CdV-|A+Pm%>YWUmjw9*GXVKOu(W>JZ=jH+r;B3<$4uKEPd)|%4kp$s|Lu29(`z}b zq9dqm)OW(?kV>l8Y{gJXbzN!c+ikn=?*E-8&FIthyC#8A*OB4evfPeaKvNhzUHx3v IIVCg!08Ak}jQ{`u delta 220 zcmV<203-ji0qp^h8Gi-<0050L&%FQu00DDSM?wIu&K&6g005^+L_t(2Q)6U61J=gY z|3N}W&mLt&mV$F&3M_o0!15=yEMs`^_yNPyS5LuezywHx^_&7|vb3165Xl%w93Qje!waVNXLA zLrKFlutH=uSRuL_=k}L@6($#U;ddim&%itcq9Zb^z$SsL0|AuaK@M0@2p}tf$pHZG W(p91VZ8D_*0000 Date: Wed, 4 Sep 2024 16:16:47 -0700 Subject: [PATCH 26/91] I have a brain made of cheese!!! (#4028) Co-authored-by: frutescens --- src/battle-scene.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index c8100e0d3b9..d4c33663c14 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2755,12 +2755,18 @@ export default class BattleScene extends SceneBase { keys.push("pkmn__" + p.species.getSpriteId(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant)); keys.push("pkmn__" + p.species.getSpriteId(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant, true)); keys.push("cry/" + p.species.getCryKey(p.species.formIndex)); + if (p.fusionSpecies && p.getSpeciesForm() !== p.getFusionSpeciesForm()) { + keys.push("cry/"+p.getFusionSpeciesForm().getCryKey(p.fusionSpecies.formIndex)); + } }); // enemyParty has to be operated on separately from playerParty because playerPokemon =/= enemyPokemon const enemyParty = this.getEnemyParty(); enemyParty.forEach(p => { keys.push(p.species.getSpriteKey(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant)); keys.push("cry/" + p.species.getCryKey(p.species.formIndex)); + if (p.fusionSpecies && p.getSpeciesForm() !== p.getFusionSpeciesForm()) { + keys.push("cry/"+p.getFusionSpeciesForm().getCryKey(p.fusionSpecies.formIndex)); + } }); return keys; } From f3ced7e81406b1464487b6d0b059809c0845e705 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:49:01 -0700 Subject: [PATCH 27/91] [Bug] Fix inconsistencies with move type resolution for some ability triggers (#3988) * Fix inconsistencies with ability triggers on variable-type moves * Fix aura effects not accounting for the move user * Fix Wonder Guard evaluating move type as if the defender used the move * Some additional test coverage for move-type-changing effects --- src/data/ability.ts | 43 ++++++++++++++---------- src/data/move.ts | 3 +- src/test/abilities/disguise.test.ts | 19 +++++++++++ src/test/abilities/steely_spirit.test.ts | 30 +++++++++++++---- 4 files changed, 68 insertions(+), 27 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 16ae7a2b2d2..925a7efb79b 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -310,7 +310,7 @@ export class ReceivedMoveDamageMultiplierAbAttr extends PreDefendAbAttr { export class ReceivedTypeDamageMultiplierAbAttr extends ReceivedMoveDamageMultiplierAbAttr { constructor(moveType: Type, damageMultiplier: number) { - super((user, target, move) => move.type === moveType, damageMultiplier); + super((target, user, move) => user.getMoveType(move) === moveType, damageMultiplier); } } @@ -455,7 +455,7 @@ export class NonSuperEffectiveImmunityAbAttr extends TypeImmunityAbAttr { } applyPreDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, cancelled: Utils.BooleanHolder, args: any[]): boolean { - if (move instanceof AttackMove && pokemon.getAttackTypeEffectiveness(pokemon.getMoveType(move), attacker) < 2) { + if (move instanceof AttackMove && pokemon.getAttackTypeEffectiveness(attacker.getMoveType(move), attacker) < 2) { cancelled.value = true; // Suppresses "No Effect" message (args[0] as Utils.NumberHolder).value = 0; return true; @@ -1462,7 +1462,7 @@ export class MovePowerBoostAbAttr extends VariableMovePowerAbAttr { export class MoveTypePowerBoostAbAttr extends MovePowerBoostAbAttr { constructor(boostedType: Type, powerMultiplier?: number) { - super((pokemon, defender, move) => move.type === boostedType, powerMultiplier || 1.5); + super((pokemon, defender, move) => pokemon?.getMoveType(move) === boostedType, powerMultiplier || 1.5); } } @@ -1546,7 +1546,7 @@ export class PreAttackFieldMoveTypePowerBoostAbAttr extends FieldMovePowerBoostA * @param powerMultiplier - The multiplier to apply to the move's power, defaults to 1.5 if not provided. */ constructor(boostedType: Type, powerMultiplier?: number) { - super((pokemon, defender, move) => move.type === boostedType, powerMultiplier || 1.5); + super((pokemon, defender, move) => pokemon?.getMoveType(move) === boostedType, powerMultiplier || 1.5); } } @@ -5100,9 +5100,9 @@ export function initAbilities() { .ignorable(), new Ability(Abilities.TINTED_LENS, 4) //@ts-ignore - .attr(DamageBoostAbAttr, 2, (user, target, move) => target.getAttackTypeEffectiveness(move.type, user) <= 0.5), // TODO: fix TS issues + .attr(DamageBoostAbAttr, 2, (user, target, move) => target?.getMoveEffectiveness(user, move) <= 0.5), // TODO: fix TS issues new Ability(Abilities.FILTER, 4) - .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 0.75) + .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => target.getMoveEffectiveness(user, move) >= 2, 0.75) .ignorable(), new Ability(Abilities.SLOW_START, 4) .attr(PostSummonAddBattlerTagAbAttr, BattlerTagType.SLOW_START, 5), @@ -5118,7 +5118,7 @@ export function initAbilities() { .attr(PostWeatherLapseHealAbAttr, 1, WeatherType.HAIL, WeatherType.SNOW) .partial(), // Healing not blocked by Heal Block new Ability(Abilities.SOLID_ROCK, 4) - .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 0.75) + .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => target.getMoveEffectiveness(user, move) >= 2, 0.75) .ignorable(), new Ability(Abilities.SNOW_WARNING, 4) .attr(PostSummonWeatherChangeAbAttr, WeatherType.SNOW) @@ -5236,10 +5236,13 @@ export function initAbilities() { new Ability(Abilities.MOXIE, 5) .attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1), new Ability(Abilities.JUSTIFIED, 5) - .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.type === Type.DARK && move.category !== MoveCategory.STATUS, Stat.ATK, 1), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === Type.DARK && move.category !== MoveCategory.STATUS, Stat.ATK, 1), new Ability(Abilities.RATTLED, 5) - .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS && (move.type === Type.DARK || move.type === Type.BUG || - move.type === Type.GHOST), Stat.SPD, 1) + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => { + const moveType = user.getMoveType(move); + return move.category !== MoveCategory.STATUS + && (moveType === Type.DARK || moveType === Type.BUG || moveType === Type.GHOST); + }, Stat.SPD, 1) .attr(PostIntimidateStatStageChangeAbAttr, [Stat.SPD], 1), new Ability(Abilities.MAGIC_BOUNCE, 5) .ignorable() @@ -5313,7 +5316,7 @@ export function initAbilities() { .attr(UnsuppressableAbilityAbAttr) .attr(NoFusionAbilityAbAttr), new Ability(Abilities.GALE_WINGS, 6) - .attr(ChangeMovePriorityAbAttr, (pokemon, move) => pokemon.isFullHp() && move.type === Type.FLYING, 1), + .attr(ChangeMovePriorityAbAttr, (pokemon, move) => pokemon.isFullHp() && pokemon.getMoveType(move) === Type.FLYING, 1), new Ability(Abilities.MEGA_LAUNCHER, 6) .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.PULSE_MOVE), 1.5), new Ability(Abilities.GRASS_PELT, 6) @@ -5368,7 +5371,7 @@ export function initAbilities() { .condition(getSheerForceHitDisableAbCondition()) .unimplemented(), new Ability(Abilities.WATER_COMPACTION, 7) - .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.type === Type.WATER && move.category !== MoveCategory.STATUS, Stat.DEF, 2), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === Type.WATER && move.category !== MoveCategory.STATUS, Stat.DEF, 2), new Ability(Abilities.MERCILESS, 7) .attr(ConditionalCritAbAttr, (user, target, move) => target?.status?.effect === StatusEffect.TOXIC || target?.status?.effect === StatusEffect.POISON), new Ability(Abilities.SHIELDS_DOWN, 7) @@ -5424,7 +5427,7 @@ export function initAbilities() { .attr(NoFusionAbilityAbAttr) // Add BattlerTagType.DISGUISE if the pokemon is in its disguised form .conditionalAttr(pokemon => pokemon.formIndex === 0, PostSummonAddBattlerTagAbAttr, BattlerTagType.DISGUISE, 0, false) - .attr(FormBlockDamageAbAttr, (target, user, move) => !!target.getTag(BattlerTagType.DISGUISE) && target.getAttackTypeEffectiveness(move.type, user) > 0, 0, BattlerTagType.DISGUISE, + .attr(FormBlockDamageAbAttr, (target, user, move) => !!target.getTag(BattlerTagType.DISGUISE) && target.getMoveEffectiveness(user, move) > 0, 0, BattlerTagType.DISGUISE, (pokemon, abilityName) => i18next.t("abilityTriggers:disguiseAvoidedDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName: abilityName }), (pokemon) => Utils.toDmgValue(pokemon.getMaxHp() / 8)) .attr(PostBattleInitFormChangeAbAttr, () => 0) @@ -5469,7 +5472,7 @@ export function initAbilities() { .attr(AllyMoveCategoryPowerBoostAbAttr, [MoveCategory.SPECIAL], 1.3), new Ability(Abilities.FLUFFY, 7) .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), 0.5) - .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.type === Type.FIRE, 2) + .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => user.getMoveType(move) === Type.FIRE, 2) .ignorable(), new Ability(Abilities.DAZZLING, 7) .attr(FieldPriorityMoveImmunityAbAttr) @@ -5519,10 +5522,10 @@ export function initAbilities() { new Ability(Abilities.SHADOW_SHIELD, 7) .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => target.isFullHp(), 0.5), new Ability(Abilities.PRISM_ARMOR, 7) - .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 0.75), + .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => target.getMoveEffectiveness(user, move) >= 2, 0.75), new Ability(Abilities.NEUROFORCE, 7) //@ts-ignore - .attr(MovePowerBoostAbAttr, (user, target, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 1.25), // TODO: fix TS issues + .attr(MovePowerBoostAbAttr, (user, target, move) => target?.getMoveEffectiveness(user, move) >= 2, 1.25), // TODO: fix TS issues new Ability(Abilities.INTREPID_SWORD, 8) .attr(PostSummonStatStageChangeAbAttr, [ Stat.ATK ], 1, true) .condition(getOncePerBattleCondition(Abilities.INTREPID_SWORD)), @@ -5553,7 +5556,11 @@ export function initAbilities() { new Ability(Abilities.STALWART, 8) .attr(BlockRedirectAbAttr), new Ability(Abilities.STEAM_ENGINE, 8) - .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => (move.type === Type.FIRE || move.type === Type.WATER) && move.category !== MoveCategory.STATUS, Stat.SPD, 6), + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => { + const moveType = user.getMoveType(move); + return move.category !== MoveCategory.STATUS + && (moveType === Type.FIRE || moveType === Type.WATER); + }, Stat.SPD, 6), new Ability(Abilities.PUNK_ROCK, 8) .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.SOUND_BASED), 1.3) .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.hasFlag(MoveFlags.SOUND_BASED), 0.5) @@ -5653,7 +5660,7 @@ export function initAbilities() { new Ability(Abilities.SEED_SOWER, 9) .attr(PostDefendTerrainChangeAbAttr, TerrainType.GRASSY), new Ability(Abilities.THERMAL_EXCHANGE, 9) - .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.type === Type.FIRE && move.category !== MoveCategory.STATUS, Stat.ATK, 1) + .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === Type.FIRE && move.category !== MoveCategory.STATUS, Stat.ATK, 1) .attr(StatusEffectImmunityAbAttr, StatusEffect.BURN) .ignorable(), new Ability(Abilities.ANGER_SHELL, 9) diff --git a/src/data/move.ts b/src/data/move.ts index 14d7addead0..ddf043c554d 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -761,8 +761,7 @@ export default class Move implements Localizable { .flat(), ); for (const aura of fieldAuras) { - // The only relevant values are `move` and the `power` holder - aura.applyPreAttack(null, null, simulated, null, this, [power]); + aura.applyPreAttack(source, null, simulated, target, this, [power]); } const alliedField: Pokemon[] = source instanceof PlayerPokemon ? source.scene.getPlayerField() : source.scene.getEnemyField(); diff --git a/src/test/abilities/disguise.test.ts b/src/test/abilities/disguise.test.ts index f7c45e91724..ef145262954 100644 --- a/src/test/abilities/disguise.test.ts +++ b/src/test/abilities/disguise.test.ts @@ -1,4 +1,5 @@ import { toDmgValue } from "#app/utils"; +import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#app/data/status-effect"; @@ -205,4 +206,22 @@ describe("Abilities - Disguise", () => { expect(game.scene.getCurrentPhase()?.constructor.name).toBe("CommandPhase"); expect(game.scene.currentBattle.waveIndex).toBe(2); }, TIMEOUT); + + it("activates when Aerilate circumvents immunity to the move's base type", async () => { + game.override.ability(Abilities.AERILATE); + 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); + }, TIMEOUT); }); diff --git a/src/test/abilities/steely_spirit.test.ts b/src/test/abilities/steely_spirit.test.ts index c632d0be777..7aaa0a42ae3 100644 --- a/src/test/abilities/steely_spirit.test.ts +++ b/src/test/abilities/steely_spirit.test.ts @@ -1,7 +1,6 @@ import { allAbilities } from "#app/data/ability"; import { allMoves } from "#app/data/move"; import { Abilities } from "#app/enums/abilities"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; @@ -37,7 +36,7 @@ describe("Abilities - Steely Spirit", () => { }); it("increases Steel-type moves' power used by the user and its allies by 50%", async () => { - await game.startBattle([Species.PIKACHU, Species.SHUCKLE]); + await game.classicMode.startBattle([Species.PIKACHU, Species.SHUCKLE]); const boostSource = game.scene.getPlayerField()[1]; const enemyToCheck = game.scene.getEnemyPokemon()!; @@ -47,13 +46,13 @@ describe("Abilities - Steely Spirit", () => { game.move.select(moveToCheck, 0, enemyToCheck.getBattlerIndex()); game.move.select(Moves.SPLASH, 1); - await game.phaseInterceptor.to(MoveEffectPhase); + await game.phaseInterceptor.to("MoveEffectPhase"); expect(allMoves[moveToCheck].calculateBattlePower).toHaveReturnedWith(ironHeadPower * steelySpiritMultiplier); }); it("stacks if multiple users with this ability are on the field.", async () => { - await game.startBattle([Species.PIKACHU, Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU, Species.PIKACHU]); const enemyToCheck = game.scene.getEnemyPokemon()!; game.scene.getPlayerField().forEach(p => { @@ -64,13 +63,13 @@ describe("Abilities - Steely Spirit", () => { game.move.select(moveToCheck, 0, enemyToCheck.getBattlerIndex()); game.move.select(moveToCheck, 1, enemyToCheck.getBattlerIndex()); - await game.phaseInterceptor.to(MoveEffectPhase); + await game.phaseInterceptor.to("MoveEffectPhase"); expect(allMoves[moveToCheck].calculateBattlePower).toHaveReturnedWith(ironHeadPower * Math.pow(steelySpiritMultiplier, 2)); }); it("does not take effect when suppressed", async () => { - await game.startBattle([Species.PIKACHU, Species.SHUCKLE]); + await game.classicMode.startBattle([Species.PIKACHU, Species.SHUCKLE]); const boostSource = game.scene.getPlayerField()[1]; const enemyToCheck = game.scene.getEnemyPokemon()!; @@ -84,8 +83,25 @@ describe("Abilities - Steely Spirit", () => { game.move.select(moveToCheck, 0, enemyToCheck.getBattlerIndex()); game.move.select(Moves.SPLASH, 1); - await game.phaseInterceptor.to(MoveEffectPhase); + await game.phaseInterceptor.to("MoveEffectPhase"); expect(allMoves[moveToCheck].calculateBattlePower).toHaveReturnedWith(ironHeadPower); }); + + it("affects variable-type moves if their resolved type is Steel", async () => { + game.override + .ability(Abilities.STEELY_SPIRIT) + .moveset([Moves.REVELATION_DANCE]); + + const revelationDance = allMoves[Moves.REVELATION_DANCE]; + vi.spyOn(revelationDance, "calculateBattlePower"); + + await game.classicMode.startBattle([Species.KLINKLANG]); + + game.move.select(Moves.REVELATION_DANCE); + + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(revelationDance.calculateBattlePower).toHaveReturnedWith(revelationDance.power * 1.5); + }); }); From 834255447d429282f15fbb49c3b4abbec7fdf22e Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+Tempo-anon@users.noreply.github.com> Date: Thu, 5 Sep 2024 00:02:45 -0400 Subject: [PATCH 28/91] Fix mbh not using user's nickname (#4033) --- src/modifier/modifier.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 84d8a1385af..f3219c8bf73 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -2488,7 +2488,7 @@ export class TurnHeldItemTransferModifier extends HeldItemTransferModifier { } getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string { - return i18next.t("modifier:turnHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: pokemon.name, typeName: this.type.name }); + return i18next.t("modifier:turnHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: pokemon.getNameToRender(), typeName: this.type.name }); } getMaxHeldItemCount(pokemon: Pokemon): integer { From 31d3bec55ebce5d0d7c9f138ac643077a5ca2985 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:54:51 -0700 Subject: [PATCH 29/91] [Test] Fix Rage Powder test failing randomly (#4038) * Fix random failure in Rage Powder test * Remove redundant override --- src/test/moves/rage_powder.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/moves/rage_powder.test.ts b/src/test/moves/rage_powder.test.ts index 3e9f422fda8..86bc48ef882 100644 --- a/src/test/moves/rage_powder.test.ts +++ b/src/test/moves/rage_powder.test.ts @@ -25,7 +25,6 @@ describe("Moves - Rage Powder", () => { beforeEach(() => { game = new GameManager(phaserGame); game.override.battleType("double"); - game.override.starterSpecies(Species.AMOONGUSS); game.override.enemySpecies(Species.SNORLAX); game.override.startingLevel(100); game.override.enemyLevel(100); @@ -68,6 +67,10 @@ describe("Moves - Rage Powder", () => { game.move.select(Moves.QUICK_ATTACK, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); + + await game.forceEnemyMove(Moves.RAGE_POWDER); + await game.forceEnemyMove(Moves.SPLASH); + await game.phaseInterceptor.to("BerryPhase", false); // If redirection was bypassed, both enemies should be damaged From 237aad2184320203646cff72f5f27859d4eb15a4 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:29:02 -0700 Subject: [PATCH 30/91] [Misc] Clean up the `Battle` class a bit (#3995) * Use default values in the `Battle` class Turn a couple of comments into tsdoc comments Replace a `!!` with `?? false` * Replace `integer` with `number` --- src/battle.ts | 77 +++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 45 deletions(-) diff --git a/src/battle.ts b/src/battle.ts index f9afbf09604..0f1245a4397 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -6,7 +6,7 @@ import Trainer, { TrainerVariant } from "./field/trainer"; import { GameMode } from "./game-mode"; import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/modifier"; import { PokeballType } from "./data/pokeball"; -import {trainerConfigs} from "#app/data/trainer-config"; +import { trainerConfigs } from "#app/data/trainer-config"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattleSpec } from "#enums/battle-spec"; import { Moves } from "#enums/moves"; @@ -31,7 +31,7 @@ export enum BattlerIndex { export interface TurnCommand { command: Command; - cursor?: integer; + cursor?: number; move?: QueuedMove; targets?: BattlerIndex[]; skip?: boolean; @@ -39,38 +39,40 @@ export interface TurnCommand { } interface TurnCommands { - [key: integer]: TurnCommand | null + [key: number]: TurnCommand | null } export default class Battle { protected gameMode: GameMode; - public waveIndex: integer; + public waveIndex: number; public battleType: BattleType; public battleSpec: BattleSpec; public trainer: Trainer | null; - public enemyLevels: integer[] | undefined; - public enemyParty: EnemyPokemon[]; - public seenEnemyPartyMemberIds: Set; + public enemyLevels: number[] | undefined; + public enemyParty: EnemyPokemon[] = []; + public seenEnemyPartyMemberIds: Set = new Set(); public double: boolean; - public started: boolean; - public enemySwitchCounter: integer; - public turn: integer; + public started: boolean = false; + public enemySwitchCounter: number = 0; + public turn: number = 0; public turnCommands: TurnCommands; - public playerParticipantIds: Set; - public battleScore: integer; - public postBattleLoot: PokemonHeldItemModifier[]; - public escapeAttempts: integer; + public playerParticipantIds: Set = new Set(); + public battleScore: number = 0; + public postBattleLoot: PokemonHeldItemModifier[] = []; + public escapeAttempts: number = 0; public lastMove: Moves; - public battleSeed: string; - private battleSeedState: string | null; - public moneyScattered: number; - public lastUsedPokeball: PokeballType | null; - public playerFaints: number; // The amount of times pokemon on the players side have fainted - public enemyFaints: number; // The amount of times pokemon on the enemies side have fainted + public battleSeed: string = Utils.randomString(16, true); + private battleSeedState: string | null = null; + public moneyScattered: number = 0; + public lastUsedPokeball: PokeballType | null = null; + /** The number of times a Pokemon on the player's side has fainted this battle */ + public playerFaints: number = 0; + /** The number of times a Pokemon on the enemy's side has fainted this battle */ + public enemyFaints: number = 0; - private rngCounter: integer = 0; + private rngCounter: number = 0; - constructor(gameMode: GameMode, waveIndex: integer, battleType: BattleType, trainer?: Trainer, double?: boolean) { + constructor(gameMode: GameMode, waveIndex: number, battleType: BattleType, trainer?: Trainer, double?: boolean) { this.gameMode = gameMode; this.waveIndex = waveIndex; this.battleType = battleType; @@ -79,22 +81,7 @@ export default class Battle { this.enemyLevels = battleType !== BattleType.TRAINER ? new Array(double ? 2 : 1).fill(null).map(() => this.getLevelForWave()) : trainer?.getPartyLevels(this.waveIndex); - this.enemyParty = []; - this.seenEnemyPartyMemberIds = new Set(); - this.double = !!double; - this.enemySwitchCounter = 0; - this.turn = 0; - this.playerParticipantIds = new Set(); - this.battleScore = 0; - this.postBattleLoot = []; - this.escapeAttempts = 0; - this.started = false; - this.battleSeed = Utils.randomString(16, true); - this.battleSeedState = null; - this.moneyScattered = 0; - this.lastUsedPokeball = null; - this.playerFaints = 0; - this.enemyFaints = 0; + this.double = double ?? false; } private initBattleSpec(): void { @@ -105,7 +92,7 @@ export default class Battle { this.battleSpec = spec; } - private getLevelForWave(): integer { + private getLevelForWave(): number { const levelWaveIndex = this.gameMode.getWaveForDifficulty(this.waveIndex); const baseLevel = 1 + levelWaveIndex / 2 + Math.pow(levelWaveIndex / 25, 2); const bossMultiplier = 1.2; @@ -138,7 +125,7 @@ export default class Battle { return rand / value; } - getBattlerCount(): integer { + getBattlerCount(): number { return this.double ? 2 : 1; } @@ -367,7 +354,7 @@ export default class Battle { return null; } - randSeedInt(scene: BattleScene, range: integer, min: integer = 0): integer { + randSeedInt(scene: BattleScene, range: number, min: number = 0): number { if (range <= 1) { return min; } @@ -392,7 +379,7 @@ export default class Battle { } export class FixedBattle extends Battle { - constructor(scene: BattleScene, waveIndex: integer, config: FixedBattleConfig) { + constructor(scene: BattleScene, waveIndex: number, config: FixedBattleConfig) { super(scene.gameMode, waveIndex, config.battleType, config.battleType === BattleType.TRAINER ? config.getTrainer(scene) : undefined, config.double); if (config.getEnemyParty) { this.enemyParty = config.getEnemyParty(scene); @@ -408,7 +395,7 @@ export class FixedBattleConfig { public double: boolean; public getTrainer: GetTrainerFunc; public getEnemyParty: GetEnemyPartyFunc; - public seedOffsetWaveIndex: integer; + public seedOffsetWaveIndex: number; setBattleType(battleType: BattleType): FixedBattleConfig { this.battleType = battleType; @@ -430,7 +417,7 @@ export class FixedBattleConfig { return this; } - setSeedOffsetWave(seedOffsetWaveIndex: integer): FixedBattleConfig { + setSeedOffsetWave(seedOffsetWaveIndex: number): FixedBattleConfig { this.seedOffsetWaveIndex = seedOffsetWaveIndex; return this; } @@ -476,7 +463,7 @@ function getRandomTrainerFunc(trainerPool: (TrainerType | TrainerType[])[], rand } export interface FixedBattleConfigs { - [key: integer]: FixedBattleConfig + [key: number]: FixedBattleConfig } /** * Youngster/Lass on 5 From 61ab52c2954859824315f7dbe7591fe0ae4a2b62 Mon Sep 17 00:00:00 2001 From: Opaque02 <66582645+Opaque02@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:29:39 +1000 Subject: [PATCH 31/91] [Balance] Changed escape calculation (#3973) * Changed escape calculation as per Mega * Adding tests * Updates some tests * Updated all tests for bosses * Removed console log lines * Added some clarifying comments * Fixed docs * comment add * comment add * Convert comments into tsdoc comments Convert `integer`/`IntegerHolder` to `number`/`NumberHolder` Clean up tests a bit --------- Co-authored-by: damocleas Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/phases/attempt-run-phase.ts | 69 +++++- src/test/escape-calculations.test.ts | 303 +++++++++++++++++++++++++++ src/test/utils/phaseInterceptor.ts | 2 + 3 files changed, 363 insertions(+), 11 deletions(-) create mode 100644 src/test/escape-calculations.test.ts diff --git a/src/phases/attempt-run-phase.ts b/src/phases/attempt-run-phase.ts index 817801985d2..9cf86fed592 100644 --- a/src/phases/attempt-run-phase.ts +++ b/src/phases/attempt-run-phase.ts @@ -1,31 +1,34 @@ -import BattleScene from "#app/battle-scene.js"; -import { applyAbAttrs, RunSuccessAbAttr } from "#app/data/ability.js"; -import { Stat } from "#app/enums/stat.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; -import Pokemon from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { applyAbAttrs, RunSuccessAbAttr } from "#app/data/ability"; +import { Stat } from "#app/enums/stat"; +import { StatusEffect } from "#app/enums/status-effect"; +import Pokemon, { PlayerPokemon, EnemyPokemon } from "#app/field/pokemon"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { BattleEndPhase } from "./battle-end-phase"; import { NewBattlePhase } from "./new-battle-phase"; import { PokemonPhase } from "./pokemon-phase"; export class AttemptRunPhase extends PokemonPhase { - constructor(scene: BattleScene, fieldIndex: integer) { + constructor(scene: BattleScene, fieldIndex: number) { super(scene, fieldIndex); } start() { super.start(); - const playerPokemon = this.getPokemon(); + const playerField = this.scene.getPlayerField(); const enemyField = this.scene.getEnemyField(); - const enemySpeed = enemyField.reduce((total: integer, enemyPokemon: Pokemon) => total + enemyPokemon.getStat(Stat.SPD), 0) / enemyField.length; + const playerPokemon = this.getPokemon(); + + const escapeChance = new Utils.NumberHolder(0); + + this.attemptRunAway(playerField, enemyField, escapeChance); - const escapeChance = new Utils.IntegerHolder((((playerPokemon.getStat(Stat.SPD) * 128) / enemySpeed) + (30 * this.scene.currentBattle.escapeAttempts++)) % 256); applyAbAttrs(RunSuccessAbAttr, playerPokemon, null, false, escapeChance); - if (playerPokemon.randSeedInt(256) < escapeChance.value) { + if (Utils.randSeedInt(100) < escapeChance.value) { this.scene.playSound("se/flee"); this.scene.queueMessage(i18next.t("battle:runAwaySuccess"), null, true, 500); @@ -53,4 +56,48 @@ export class AttemptRunPhase extends PokemonPhase { this.end(); } + + attemptRunAway(playerField: PlayerPokemon[], enemyField: EnemyPokemon[], escapeChance: Utils.NumberHolder) { + /** Sum of the speed of all enemy pokemon on the field */ + const enemySpeed = enemyField.reduce((total: number, enemyPokemon: Pokemon) => total + enemyPokemon.getStat(Stat.SPD), 0); + /** Sum of the speed of all player pokemon on the field */ + const playerSpeed = playerField.reduce((total: number, playerPokemon: Pokemon) => total + playerPokemon.getStat(Stat.SPD), 0); + + /* The way the escape chance works is by looking at the difference between your speed and the enemy field's average speed as a ratio. The higher this ratio, the higher your chance of success. + * However, there is a cap for the ratio of your speed vs enemy speed which beyond that point, you won't gain any advantage. It also looks at how many times you've tried to escape. + * Again, the more times you've tried to escape, the higher your odds of escaping. Bosses and non-bosses are calculated differently - bosses are harder to escape from vs non-bosses + * Finally, there's a minimum and maximum escape chance as well so that escapes aren't guaranteed, yet they are never 0 either. + * The percentage chance to escape from a pokemon for both bosses and non bosses is linear and based on the minimum and maximum chances, and the speed ratio cap. + * + * At the time of writing, these conditions should be met: + * - The minimum escape chance should be 5% for bosses and non bosses + * - Bosses should have a maximum escape chance of 25%, whereas non-bosses should be 95% + * - The bonus per previous escape attempt should be 2% for bosses and 10% for non-bosses + * - The speed ratio cap should be 6x for bosses and 4x for non-bosses + * - The "default" escape chance when your speed equals the enemy speed should be 8.33% for bosses and 27.5% for non-bosses + * + * From the above, we can calculate the below values + */ + + let isBoss = false; + for (let e = 0; e < enemyField.length; e++) { + isBoss = isBoss || enemyField[e].isBoss(); // this line checks if any of the enemy pokemon on the field are bosses; if so, the calculation for escaping is different + } + + /** The ratio between the speed of your active pokemon and the speed of the enemy field */ + const speedRatio = playerSpeed / enemySpeed; + /** The max ratio before escape chance stops increasing. Increased if there is a boss on the field */ + const speedCap = isBoss ? 6 : 4; + /** Minimum percent chance to escape */ + const minChance = 5; + /** Maximum percent chance to escape. Decreased if a boss is on the field */ + const maxChance = isBoss ? 25 : 95; + /** How much each escape attempt increases the chance of the next attempt. Decreased if a boss is on the field */ + const escapeBonus = isBoss ? 2 : 10; + /** Slope of the escape chance curve */ + const escapeSlope = (maxChance - minChance) / speedCap; + + // This will calculate the escape chance given all of the above and clamp it to the range of [`minChance`, `maxChance`] + escapeChance.value = Phaser.Math.Clamp(Math.round((escapeSlope * speedRatio) + minChance + (escapeBonus * this.scene.currentBattle.escapeAttempts++)), minChance, maxChance); + } } diff --git a/src/test/escape-calculations.test.ts b/src/test/escape-calculations.test.ts new file mode 100644 index 00000000000..ecf22fc74aa --- /dev/null +++ b/src/test/escape-calculations.test.ts @@ -0,0 +1,303 @@ +import { AttemptRunPhase } from "#app/phases/attempt-run-phase"; +import { CommandPhase } from "#app/phases/command-phase"; +import { Command } from "#app/ui/command-ui-handler"; +import * as Utils from "#app/utils"; +import { Abilities } from "#enums/abilities"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Escape chance calculations", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemySpecies(Species.BULBASAUR) + .enemyAbility(Abilities.INSOMNIA) + .ability(Abilities.INSOMNIA); + }); + + it("single non-boss opponent", async () => { + await game.classicMode.startBattle([Species.BULBASAUR]); + + const playerPokemon = game.scene.getPlayerField(); + const enemyField = game.scene.getEnemyField(); + const enemySpeed = 100; + // set enemyPokemon's speed to 100 + vi.spyOn(enemyField[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, enemySpeed]); + + const commandPhase = game.scene.getCurrentPhase() as CommandPhase; + commandPhase.handleCommand(Command.RUN, 0); + + await game.phaseInterceptor.to(AttemptRunPhase, false); + const phase = game.scene.getCurrentPhase() as AttemptRunPhase; + const escapePercentage = new Utils.NumberHolder(0); + + // this sets up an object for multiple attempts. The pokemonSpeedRatio is your speed divided by the enemy speed, the escapeAttempts are the number of escape attempts and the expectedEscapeChance is the chance it should be escaping + const escapeChances: { pokemonSpeedRatio: number, escapeAttempts: number, expectedEscapeChance: number }[] = [ + { pokemonSpeedRatio: 0.01, escapeAttempts: 0, expectedEscapeChance: 5 }, + { pokemonSpeedRatio: 0.1, escapeAttempts: 0, expectedEscapeChance: 7 }, + { pokemonSpeedRatio: 0.25, escapeAttempts: 0, expectedEscapeChance: 11 }, + { pokemonSpeedRatio: 0.5, escapeAttempts: 0, expectedEscapeChance: 16 }, + { pokemonSpeedRatio: 0.8, escapeAttempts: 0, expectedEscapeChance: 23 }, + { pokemonSpeedRatio: 1, escapeAttempts: 0, expectedEscapeChance: 28 }, + { pokemonSpeedRatio: 1.2, escapeAttempts: 0, expectedEscapeChance: 32 }, + { pokemonSpeedRatio: 1.5, escapeAttempts: 0, expectedEscapeChance: 39 }, + { pokemonSpeedRatio: 3, escapeAttempts: 0, expectedEscapeChance: 73 }, + { pokemonSpeedRatio: 3.8, escapeAttempts: 0, expectedEscapeChance: 91 }, + { pokemonSpeedRatio: 4, escapeAttempts: 0, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 4.2, escapeAttempts: 0, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 10, escapeAttempts: 0, expectedEscapeChance: 95 }, + + // retries section + { pokemonSpeedRatio: 0.4, escapeAttempts: 1, expectedEscapeChance: 24 }, + { pokemonSpeedRatio: 1.6, escapeAttempts: 2, expectedEscapeChance: 61 }, + { pokemonSpeedRatio: 3.7, escapeAttempts: 5, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 0.2, escapeAttempts: 2, expectedEscapeChance: 30 }, + { pokemonSpeedRatio: 1, escapeAttempts: 3, expectedEscapeChance: 58 }, + { pokemonSpeedRatio: 2.9, escapeAttempts: 0, expectedEscapeChance: 70 }, + { pokemonSpeedRatio: 0.01, escapeAttempts: 7, expectedEscapeChance: 75 }, + { pokemonSpeedRatio: 16.2, escapeAttempts: 4, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 2, escapeAttempts: 3, expectedEscapeChance: 80 }, + ]; + + for (let i = 0; i < escapeChances.length; i++) { + // sets the number of escape attempts to the required amount + game.scene.currentBattle.escapeAttempts = escapeChances[i].escapeAttempts; + // set playerPokemon's speed to a multiple of the enemySpeed + vi.spyOn(playerPokemon[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, escapeChances[i].pokemonSpeedRatio * enemySpeed]); + phase.attemptRunAway(playerPokemon, enemyField, escapePercentage); + expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance); + } + }, 20000); + + it("double non-boss opponent", async () => { + game.override.battleType("double"); + await game.classicMode.startBattle([Species.BULBASAUR, Species.ABOMASNOW]); + + const playerPokemon = game.scene.getPlayerField(); + const enemyField = game.scene.getEnemyField(); + const enemyASpeed = 70; + const enemyBSpeed = 30; + // gets the sum of the speed of the two pokemon + const totalEnemySpeed = enemyASpeed + enemyBSpeed; + // this is used to find the ratio of the player's first pokemon + const playerASpeedPercentage = 0.4; + // set enemyAPokemon's speed to 70 + vi.spyOn(enemyField[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, enemyASpeed]); + // set enemyBPokemon's speed to 30 + vi.spyOn(enemyField[1], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, enemyBSpeed]); + + const commandPhase = game.scene.getCurrentPhase() as CommandPhase; + commandPhase.handleCommand(Command.RUN, 0); + + await game.phaseInterceptor.to(AttemptRunPhase, false); + const phase = game.scene.getCurrentPhase() as AttemptRunPhase; + const escapePercentage = new Utils.NumberHolder(0); + + // this sets up an object for multiple attempts. The pokemonSpeedRatio is your speed divided by the enemy speed, the escapeAttempts are the number of escape attempts and the expectedEscapeChance is the chance it should be escaping + const escapeChances: { pokemonSpeedRatio: number, escapeAttempts: number, expectedEscapeChance: number }[] = [ + { pokemonSpeedRatio: 0.3, escapeAttempts: 0, expectedEscapeChance: 12 }, + { pokemonSpeedRatio: 0.7, escapeAttempts: 0, expectedEscapeChance: 21 }, + { pokemonSpeedRatio: 1.5, escapeAttempts: 0, expectedEscapeChance: 39 }, + { pokemonSpeedRatio: 3, escapeAttempts: 0, expectedEscapeChance: 73 }, + { pokemonSpeedRatio: 9, escapeAttempts: 0, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 0.01, escapeAttempts: 0, expectedEscapeChance: 5 }, + { pokemonSpeedRatio: 1, escapeAttempts: 0, expectedEscapeChance: 28 }, + { pokemonSpeedRatio: 4.3, escapeAttempts: 0, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 2.7, escapeAttempts: 0, expectedEscapeChance: 66 }, + { pokemonSpeedRatio: 2.1, escapeAttempts: 0, expectedEscapeChance: 52 }, + { pokemonSpeedRatio: 1.8, escapeAttempts: 0, expectedEscapeChance: 46 }, + { pokemonSpeedRatio: 6, escapeAttempts: 0, expectedEscapeChance: 95 }, + + // retries section + { pokemonSpeedRatio: 0.9, escapeAttempts: 1, expectedEscapeChance: 35 }, + { pokemonSpeedRatio: 3.6, escapeAttempts: 2, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 0.03, escapeAttempts: 7, expectedEscapeChance: 76 }, + { pokemonSpeedRatio: 0.02, escapeAttempts: 7, expectedEscapeChance: 75 }, + { pokemonSpeedRatio: 1, escapeAttempts: 5, expectedEscapeChance: 78 }, + { pokemonSpeedRatio: 0.7, escapeAttempts: 3, expectedEscapeChance: 51 }, + { pokemonSpeedRatio: 2.4, escapeAttempts: 9, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 1.8, escapeAttempts: 7, expectedEscapeChance: 95 }, + { pokemonSpeedRatio: 2, escapeAttempts: 10, expectedEscapeChance: 95 }, + + ]; + + for (let i = 0; i < escapeChances.length; i++) { + // sets the number of escape attempts to the required amount + game.scene.currentBattle.escapeAttempts = escapeChances[i].escapeAttempts; + // set the first playerPokemon's speed to a multiple of the enemySpeed + vi.spyOn(playerPokemon[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, Math.floor(escapeChances[i].pokemonSpeedRatio * totalEnemySpeed * playerASpeedPercentage)]); + // set the second playerPokemon's speed to the remaining value of speed + vi.spyOn(playerPokemon[1], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, escapeChances[i].pokemonSpeedRatio * totalEnemySpeed - playerPokemon[0].stats[5]]); + phase.attemptRunAway(playerPokemon, enemyField, escapePercentage); + // checks to make sure the escape values are the same + expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance); + // checks to make sure the sum of the player's speed for all pokemon is equal to the appropriate ratio of the total enemy speed + expect(playerPokemon[0].stats[5] + playerPokemon[1].stats[5]).toBe(escapeChances[i].pokemonSpeedRatio * totalEnemySpeed); + } + }, 20000); + + it("single boss opponent", async () => { + game.override.startingWave(10); + await game.classicMode.startBattle([Species.BULBASAUR]); + + const playerPokemon = game.scene.getPlayerField()!; + const enemyField = game.scene.getEnemyField()!; + const enemySpeed = 100; + // set enemyPokemon's speed to 100 + vi.spyOn(enemyField[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, enemySpeed]); + + const commandPhase = game.scene.getCurrentPhase() as CommandPhase; + commandPhase.handleCommand(Command.RUN, 0); + + await game.phaseInterceptor.to(AttemptRunPhase, false); + const phase = game.scene.getCurrentPhase() as AttemptRunPhase; + const escapePercentage = new Utils.NumberHolder(0); + + // this sets up an object for multiple attempts. The pokemonSpeedRatio is your speed divided by the enemy speed, the escapeAttempts are the number of escape attempts and the expectedEscapeChance is the chance it should be escaping + const escapeChances: { pokemonSpeedRatio: number, escapeAttempts: number, expectedEscapeChance: number }[] = [ + { pokemonSpeedRatio: 0.01, escapeAttempts: 0, expectedEscapeChance: 5 }, + { pokemonSpeedRatio: 0.1, escapeAttempts: 0, expectedEscapeChance: 5 }, + { pokemonSpeedRatio: 0.25, escapeAttempts: 0, expectedEscapeChance: 6 }, + { pokemonSpeedRatio: 0.5, escapeAttempts: 0, expectedEscapeChance: 7 }, + { pokemonSpeedRatio: 0.8, escapeAttempts: 0, expectedEscapeChance: 8 }, + { pokemonSpeedRatio: 1, escapeAttempts: 0, expectedEscapeChance: 8 }, + { pokemonSpeedRatio: 1.2, escapeAttempts: 0, expectedEscapeChance: 9 }, + { pokemonSpeedRatio: 1.5, escapeAttempts: 0, expectedEscapeChance: 10 }, + { pokemonSpeedRatio: 3, escapeAttempts: 0, expectedEscapeChance: 15 }, + { pokemonSpeedRatio: 3.8, escapeAttempts: 0, expectedEscapeChance: 18 }, + { pokemonSpeedRatio: 4, escapeAttempts: 0, expectedEscapeChance: 18 }, + { pokemonSpeedRatio: 4.2, escapeAttempts: 0, expectedEscapeChance: 19 }, + { pokemonSpeedRatio: 4.7, escapeAttempts: 0, expectedEscapeChance: 21 }, + { pokemonSpeedRatio: 5, escapeAttempts: 0, expectedEscapeChance: 22 }, + { pokemonSpeedRatio: 5.9, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 6, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 6.7, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 10, escapeAttempts: 0, expectedEscapeChance: 25 }, + + // retries section + { pokemonSpeedRatio: 0.4, escapeAttempts: 1, expectedEscapeChance: 8 }, + { pokemonSpeedRatio: 1.6, escapeAttempts: 2, expectedEscapeChance: 14 }, + { pokemonSpeedRatio: 3.7, escapeAttempts: 5, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 0.2, escapeAttempts: 2, expectedEscapeChance: 10 }, + { pokemonSpeedRatio: 1, escapeAttempts: 3, expectedEscapeChance: 14 }, + { pokemonSpeedRatio: 2.9, escapeAttempts: 0, expectedEscapeChance: 15 }, + { pokemonSpeedRatio: 0.01, escapeAttempts: 7, expectedEscapeChance: 19 }, + { pokemonSpeedRatio: 16.2, escapeAttempts: 4, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 2, escapeAttempts: 3, expectedEscapeChance: 18 }, + { pokemonSpeedRatio: 4.5, escapeAttempts: 1, expectedEscapeChance: 22 }, + { pokemonSpeedRatio: 6.8, escapeAttempts: 6, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 5.2, escapeAttempts: 8, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 4.7, escapeAttempts: 10, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 5.1, escapeAttempts: 1, expectedEscapeChance: 24 }, + { pokemonSpeedRatio: 6, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 5.9, escapeAttempts: 2, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 6.1, escapeAttempts: 3, expectedEscapeChance: 25 }, + + ]; + + for (let i = 0; i < escapeChances.length; i++) { + // sets the number of escape attempts to the required amount + game.scene.currentBattle.escapeAttempts = escapeChances[i].escapeAttempts; + // set playerPokemon's speed to a multiple of the enemySpeed + vi.spyOn(playerPokemon[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, escapeChances[i].pokemonSpeedRatio * enemySpeed]); + phase.attemptRunAway(playerPokemon, enemyField, escapePercentage); + expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance); + } + }, 20000); + + it("double boss opponent", async () => { + game.override.battleType("double"); + game.override.startingWave(10); + await game.classicMode.startBattle([Species.BULBASAUR, Species.ABOMASNOW]); + + const playerPokemon = game.scene.getPlayerField(); + const enemyField = game.scene.getEnemyField(); + const enemyASpeed = 70; + const enemyBSpeed = 30; + // gets the sum of the speed of the two pokemon + const totalEnemySpeed = enemyASpeed + enemyBSpeed; + // this is used to find the ratio of the player's first pokemon + const playerASpeedPercentage = 0.8; + // set enemyAPokemon's speed to 70 + vi.spyOn(enemyField[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, enemyASpeed]); + // set enemyBPokemon's speed to 30 + vi.spyOn(enemyField[1], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, enemyBSpeed]); + + const commandPhase = game.scene.getCurrentPhase() as CommandPhase; + commandPhase.handleCommand(Command.RUN, 0); + + await game.phaseInterceptor.to(AttemptRunPhase, false); + const phase = game.scene.getCurrentPhase() as AttemptRunPhase; + const escapePercentage = new Utils.NumberHolder(0); + + // this sets up an object for multiple attempts. The pokemonSpeedRatio is your speed divided by the enemy speed, the escapeAttempts are the number of escape attempts and the expectedEscapeChance is the chance it should be escaping + const escapeChances: { pokemonSpeedRatio: number, escapeAttempts: number, expectedEscapeChance: number }[] = [ + { pokemonSpeedRatio: 0.3, escapeAttempts: 0, expectedEscapeChance: 6 }, + { pokemonSpeedRatio: 0.7, escapeAttempts: 0, expectedEscapeChance: 7 }, + { pokemonSpeedRatio: 1.5, escapeAttempts: 0, expectedEscapeChance: 10 }, + { pokemonSpeedRatio: 3, escapeAttempts: 0, expectedEscapeChance: 15 }, + { pokemonSpeedRatio: 9, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 0.01, escapeAttempts: 0, expectedEscapeChance: 5 }, + { pokemonSpeedRatio: 1, escapeAttempts: 0, expectedEscapeChance: 8 }, + { pokemonSpeedRatio: 4.3, escapeAttempts: 0, expectedEscapeChance: 19 }, + { pokemonSpeedRatio: 2.7, escapeAttempts: 0, expectedEscapeChance: 14 }, + { pokemonSpeedRatio: 2.1, escapeAttempts: 0, expectedEscapeChance: 12 }, + { pokemonSpeedRatio: 1.8, escapeAttempts: 0, expectedEscapeChance: 11 }, + { pokemonSpeedRatio: 6, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 4, escapeAttempts: 0, expectedEscapeChance: 18 }, + { pokemonSpeedRatio: 5.7, escapeAttempts: 0, expectedEscapeChance: 24 }, + { pokemonSpeedRatio: 5, escapeAttempts: 0, expectedEscapeChance: 22 }, + { pokemonSpeedRatio: 6.1, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 6.8, escapeAttempts: 0, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 10, escapeAttempts: 0, expectedEscapeChance: 25 }, + + // retries section + { pokemonSpeedRatio: 0.9, escapeAttempts: 1, expectedEscapeChance: 10 }, + { pokemonSpeedRatio: 3.6, escapeAttempts: 2, expectedEscapeChance: 21 }, + { pokemonSpeedRatio: 0.03, escapeAttempts: 7, expectedEscapeChance: 19 }, + { pokemonSpeedRatio: 0.02, escapeAttempts: 7, expectedEscapeChance: 19 }, + { pokemonSpeedRatio: 1, escapeAttempts: 5, expectedEscapeChance: 18 }, + { pokemonSpeedRatio: 0.7, escapeAttempts: 3, expectedEscapeChance: 13 }, + { pokemonSpeedRatio: 2.4, escapeAttempts: 9, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 1.8, escapeAttempts: 7, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 2, escapeAttempts: 10, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 3, escapeAttempts: 1, expectedEscapeChance: 17 }, + { pokemonSpeedRatio: 4.5, escapeAttempts: 3, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 3.7, escapeAttempts: 1, expectedEscapeChance: 19 }, + { pokemonSpeedRatio: 6.5, escapeAttempts: 1, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 12, escapeAttempts: 4, expectedEscapeChance: 25 }, + { pokemonSpeedRatio: 5.2, escapeAttempts: 2, expectedEscapeChance: 25 }, + + ]; + + for (let i = 0; i < escapeChances.length; i++) { + // sets the number of escape attempts to the required amount + game.scene.currentBattle.escapeAttempts = escapeChances[i].escapeAttempts; + // set the first playerPokemon's speed to a multiple of the enemySpeed + vi.spyOn(playerPokemon[0], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, Math.floor(escapeChances[i].pokemonSpeedRatio * totalEnemySpeed * playerASpeedPercentage)]); + // set the second playerPokemon's speed to the remaining value of speed + vi.spyOn(playerPokemon[1], "stats", "get").mockReturnValue([20, 20, 20, 20, 20, escapeChances[i].pokemonSpeedRatio * totalEnemySpeed - playerPokemon[0].stats[5]]); + phase.attemptRunAway(playerPokemon, enemyField, escapePercentage); + // checks to make sure the escape values are the same + expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance); + // checks to make sure the sum of the player's speed for all pokemon is equal to the appropriate ratio of the total enemy speed + expect(playerPokemon[0].stats[5] + playerPokemon[1].stats[5]).toBe(escapeChances[i].pokemonSpeedRatio * totalEnemySpeed); + } + }, 20000); +}); diff --git a/src/test/utils/phaseInterceptor.ts b/src/test/utils/phaseInterceptor.ts index 1141d0bf0d9..2eb5324a2aa 100644 --- a/src/test/utils/phaseInterceptor.ts +++ b/src/test/utils/phaseInterceptor.ts @@ -1,5 +1,6 @@ import { Phase } from "#app/phase"; import ErrorInterceptor from "#app/test/utils/errorInterceptor"; +import { AttemptRunPhase } from "#app/phases/attempt-run-phase"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { BerryPhase } from "#app/phases/berry-phase"; import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; @@ -100,6 +101,7 @@ export default class PhaseInterceptor { [EvolutionPhase, this.startPhase], [EndEvolutionPhase, this.startPhase], [LevelCapPhase, this.startPhase], + [AttemptRunPhase, this.startPhase], ]; private endBySetMode = [ From 1434a3edafc36f5e9ba6991cdc8079e0843efca5 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:31:32 -0700 Subject: [PATCH 32/91] Fix random failure in Parental Bond tests (#4036) Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/test/abilities/parental_bond.test.ts | 333 ++++++++--------------- 1 file changed, 113 insertions(+), 220 deletions(-) diff --git a/src/test/abilities/parental_bond.test.ts b/src/test/abilities/parental_bond.test.ts index e3c6c8ec5bb..81a30524a5e 100644 --- a/src/test/abilities/parental_bond.test.ts +++ b/src/test/abilities/parental_bond.test.ts @@ -2,12 +2,6 @@ import { Stat } from "#enums/stat"; import { StatusEffect } from "#app/data/status-effect"; import { Type } from "#app/data/type"; import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { DamagePhase } from "#app/phases/damage-phase"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { toDmgValue } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; @@ -15,7 +9,7 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; const TIMEOUT = 20 * 1000; @@ -39,36 +33,31 @@ describe("Abilities - Parental Bond", () => { game.override.disableCrits(); game.override.ability(Abilities.PARENTAL_BOND); game.override.enemySpecies(Species.SNORLAX); - game.override.enemyAbility(Abilities.INSOMNIA); + game.override.enemyAbility(Abilities.FUR_COAT); game.override.enemyMoveset(SPLASH_ONLY); game.override.startingLevel(100); game.override.enemyLevel(100); }); - test( - "ability should add second strike to attack move", + it( + "should add second strike to attack move", async () => { game.override.moveset([Moves.TACKLE]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); let enemyStartingHp = enemyPokemon.hp; game.move.select(Moves.TACKLE); - await game.phaseInterceptor.to(MoveEffectPhase, false); - - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); const firstStrikeDamage = enemyStartingHp - enemyPokemon.hp; enemyStartingHp = enemyPokemon.hp; - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); const secondStrikeDamage = enemyStartingHp - enemyPokemon.hp; @@ -77,556 +66,460 @@ describe("Abilities - Parental Bond", () => { }, TIMEOUT ); - test( - "ability should apply secondary effects to both strikes", + it( + "should apply secondary effects to both strikes", async () => { game.override.moveset([Moves.POWER_UP_PUNCH]); game.override.enemySpecies(Species.AMOONGUSS); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.POWER_UP_PUNCH); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.turnData.hitCount).toBe(2); expect(leadPokemon.getStatStage(Stat.ATK)).toBe(2); }, TIMEOUT ); - test( - "ability should not apply to Status moves", + it( + "should not apply to Status moves", async () => { game.override.moveset([Moves.BABY_DOLL_EYES]); - await game.startBattle([Species.CHARIZARD]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); + await game.classicMode.startBattle([Species.MAGIKARP]); const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.BABY_DOLL_EYES); - await game.phaseInterceptor.to(BerryPhase, false); + + await game.phaseInterceptor.to("BerryPhase", false); expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); }, TIMEOUT ); - test( - "ability should not apply to multi-hit moves", + it( + "should not apply to multi-hit moves", async () => { game.override.moveset([Moves.DOUBLE_HIT]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.DOUBLE_HIT); await game.move.forceHit(); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.turnData.hitCount).toBe(2); }, TIMEOUT ); - test( - "ability should not apply to self-sacrifice moves", + it( + "should not apply to self-sacrifice moves", async () => { game.override.moveset([Moves.SELF_DESTRUCT]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.SELF_DESTRUCT); - await game.phaseInterceptor.to(DamagePhase, false); + await game.phaseInterceptor.to("DamagePhase", false); expect(leadPokemon.turnData.hitCount).toBe(1); }, TIMEOUT ); - test( - "ability should not apply to Rollout", + it( + "should not apply to Rollout", async () => { game.override.moveset([Moves.ROLLOUT]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.ROLLOUT); await game.move.forceHit(); - await game.phaseInterceptor.to(DamagePhase, false); + await game.phaseInterceptor.to("DamagePhase", false); expect(leadPokemon.turnData.hitCount).toBe(1); }, TIMEOUT ); - test( - "ability should not apply multiplier to fixed-damage moves", + it( + "should not apply multiplier to fixed-damage moves", async () => { game.override.moveset([Moves.DRAGON_RAGE]); - await game.startBattle([Species.CHARIZARD]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); + await game.classicMode.startBattle([Species.MAGIKARP]); const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); - - const enemyStartingHp = enemyPokemon.hp; game.move.select(Moves.DRAGON_RAGE); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); - expect(enemyPokemon.hp).toBe(enemyStartingHp - 80); + expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp() - 80); }, TIMEOUT ); - test( - "ability should not apply multiplier to counter moves", + it( + "should not apply multiplier to counter moves", async () => { game.override.moveset([Moves.COUNTER]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.SHUCKLE]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); - - const playerStartingHp = leadPokemon.hp; - const enemyStartingHp = enemyPokemon.hp; game.move.select(Moves.COUNTER); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); - const playerDamage = playerStartingHp - leadPokemon.hp; + const playerDamage = leadPokemon.getMaxHp() - leadPokemon.hp; - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); - expect(enemyPokemon.hp).toBe(enemyStartingHp - 4 * playerDamage); + expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp() - 4 * playerDamage); }, TIMEOUT ); - test( - "ability should not apply to multi-target moves", + it( + "should not apply to multi-target moves", async () => { game.override.battleType("double"); game.override.moveset([Moves.EARTHQUAKE]); + game.override.passiveAbility(Abilities.LEVITATE); - await game.startBattle([Species.CHARIZARD, Species.PIDGEOT]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); const playerPokemon = game.scene.getPlayerField(); - expect(playerPokemon.length).toBe(2); - playerPokemon.forEach(p => expect(p).not.toBe(undefined)); - - const enemyPokemon = game.scene.getEnemyField(); - expect(enemyPokemon.length).toBe(2); - enemyPokemon.forEach(p => expect(p).not.toBe(undefined)); game.move.select(Moves.EARTHQUAKE); - await game.phaseInterceptor.to(CommandPhase); - game.move.select(Moves.EARTHQUAKE, 1); - await game.phaseInterceptor.to(BerryPhase, false); + + await game.phaseInterceptor.to("BerryPhase", false); playerPokemon.forEach(p => expect(p.turnData.hitCount).toBe(1)); }, TIMEOUT ); - test( - "ability should apply to multi-target moves when hitting only one target", + it( + "should apply to multi-target moves when hitting only one target", async () => { game.override.moveset([Moves.EARTHQUAKE]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.EARTHQUAKE); - await game.phaseInterceptor.to(DamagePhase, false); + await game.phaseInterceptor.to("DamagePhase", false); expect(leadPokemon.turnData.hitCount).toBe(2); }, TIMEOUT ); - test( - "ability should only trigger post-target move effects once", + it( + "should only trigger post-target move effects once", async () => { game.override.moveset([Moves.MIND_BLOWN]); - await game.startBattle([Species.PIDGEOT]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.MIND_BLOWN); - await game.phaseInterceptor.to(DamagePhase, false); + await game.phaseInterceptor.to("DamagePhase", false); expect(leadPokemon.turnData.hitCount).toBe(2); // This test will time out if the user faints - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); - expect(leadPokemon.hp).toBe(toDmgValue(leadPokemon.getMaxHp() / 2)); + expect(leadPokemon.hp).toBe(Math.ceil(leadPokemon.getMaxHp() / 2)); }, TIMEOUT ); - test( - "Burn Up only removes type after second strike with this ability", + it( + "Burn Up only removes type after the second strike", async () => { game.override.moveset([Moves.BURN_UP]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.BURN_UP); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("MoveEffectPhase"); expect(leadPokemon.turnData.hitCount).toBe(2); expect(enemyPokemon.hp).toBeGreaterThan(0); expect(leadPokemon.isOfType(Type.FIRE)).toBe(true); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.isOfType(Type.FIRE)).toBe(false); }, TIMEOUT ); - test( + it( "Moves boosted by this ability and Multi-Lens should strike 4 times", async () => { game.override.moveset([Moves.TACKLE]); game.override.startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.TACKLE); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(leadPokemon.turnData.hitCount).toBe(4); }, TIMEOUT ); - test( + it( "Super Fang boosted by this ability and Multi-Lens should strike twice", async () => { game.override.moveset([Moves.SUPER_FANG]); game.override.startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); - - const enemyStartingHp = enemyPokemon.hp; game.move.select(Moves.SUPER_FANG); await game.move.forceHit(); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(leadPokemon.turnData.hitCount).toBe(2); - await game.phaseInterceptor.to(MoveEndPhase, false); + await game.phaseInterceptor.to("MoveEndPhase", false); - expect(enemyPokemon.hp).toBe(Math.ceil(enemyStartingHp * 0.25)); + expect(enemyPokemon.hp).toBe(Math.ceil(enemyPokemon.getMaxHp() * 0.25)); }, TIMEOUT ); - test( + it( "Seismic Toss boosted by this ability and Multi-Lens should strike twice", async () => { game.override.moveset([Moves.SEISMIC_TOSS]); game.override.startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); const enemyStartingHp = enemyPokemon.hp; game.move.select(Moves.SEISMIC_TOSS); await game.move.forceHit(); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(leadPokemon.turnData.hitCount).toBe(2); - await game.phaseInterceptor.to(MoveEndPhase, false); + await game.phaseInterceptor.to("MoveEndPhase", false); expect(enemyPokemon.hp).toBe(enemyStartingHp - 200); }, TIMEOUT ); - test( + it( "Hyper Beam boosted by this ability should strike twice, then recharge", async () => { game.override.moveset([Moves.HYPER_BEAM]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.HYPER_BEAM); await game.move.forceHit(); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(leadPokemon.turnData.hitCount).toBe(2); expect(leadPokemon.getTag(BattlerTagType.RECHARGING)).toBeUndefined(); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(leadPokemon.getTag(BattlerTagType.RECHARGING)).toBeDefined(); }, TIMEOUT ); - /** TODO: Fix TRAPPED tag lapsing incorrectly, then run this test */ - test( + it( "Anchor Shot boosted by this ability should only trap the target after the second hit", async () => { game.override.moveset([Moves.ANCHOR_SHOT]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.ANCHOR_SHOT); await game.move.forceHit(); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(leadPokemon.turnData.hitCount).toBe(2); - expect(enemyPokemon.getTag(BattlerTagType.TRAPPED)).toBeUndefined(); // Passes + expect(enemyPokemon.getTag(BattlerTagType.TRAPPED)).toBeUndefined(); - await game.phaseInterceptor.to(MoveEndPhase); - expect(enemyPokemon.getTag(BattlerTagType.TRAPPED)).toBeDefined(); // Passes + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemyPokemon.getTag(BattlerTagType.TRAPPED)).toBeDefined(); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); - expect(enemyPokemon.getTag(BattlerTagType.TRAPPED)).toBeDefined(); // Fails :( + expect(enemyPokemon.getTag(BattlerTagType.TRAPPED)).toBeDefined(); }, TIMEOUT ); - test( + it( "Smack Down boosted by this ability should only ground the target after the second hit", async () => { game.override.moveset([Moves.SMACK_DOWN]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.SMACK_DOWN); await game.move.forceHit(); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(leadPokemon.turnData.hitCount).toBe(2); expect(enemyPokemon.getTag(BattlerTagType.IGNORE_FLYING)).toBeUndefined(); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(enemyPokemon.getTag(BattlerTagType.IGNORE_FLYING)).toBeDefined(); }, TIMEOUT ); - test( + it( "U-turn boosted by this ability should strike twice before forcing a switch", async () => { game.override.moveset([Moves.U_TURN]); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.U_TURN); await game.move.forceHit(); - await game.phaseInterceptor.to(MoveEffectPhase); + await game.phaseInterceptor.to("MoveEffectPhase"); expect(leadPokemon.turnData.hitCount).toBe(2); // This will cause this test to time out if the switch was forced on the first hit. - await game.phaseInterceptor.to(MoveEffectPhase, false); + await game.phaseInterceptor.to("MoveEffectPhase", false); }, TIMEOUT ); - test( + it( "Wake-Up Slap boosted by this ability should only wake up the target after the second hit", async () => { game.override.moveset([Moves.WAKE_UP_SLAP]).enemyStatusEffect(StatusEffect.SLEEP); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.WAKE_UP_SLAP); await game.move.forceHit(); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(leadPokemon.turnData.hitCount).toBe(2); expect(enemyPokemon.status?.effect).toBe(StatusEffect.SLEEP); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(enemyPokemon.status?.effect).toBeUndefined(); }, TIMEOUT ); - test( - "ability should not cause user to hit into King's Shield more than once", + it( + "should not cause user to hit into King's Shield more than once", async () => { game.override.moveset([Moves.TACKLE]); - game.override.enemyMoveset([Moves.KINGS_SHIELD, Moves.KINGS_SHIELD, Moves.KINGS_SHIELD, Moves.KINGS_SHIELD]); + game.override.enemyMoveset(Array(4).fill(Moves.KINGS_SHIELD)); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.TACKLE); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.getStatStage(Stat.ATK)).toBe(-1); }, TIMEOUT ); - test( - "ability should not cause user to hit into Storm Drain more than once", + it( + "should not cause user to hit into Storm Drain more than once", async () => { game.override.moveset([Moves.WATER_GUN]); game.override.enemyAbility(Abilities.STORM_DRAIN); - await game.startBattle([Species.CHARIZARD]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); + await game.classicMode.startBattle([Species.MAGIKARP]); const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).not.toBe(undefined); game.move.select(Moves.WATER_GUN); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(1); }, TIMEOUT ); - test( - "ability should not apply to multi-target moves with Multi-Lens", + it( + "should not apply to multi-target moves with Multi-Lens", async () => { game.override.battleType("double"); game.override.moveset([Moves.EARTHQUAKE, Moves.SPLASH]); + game.override.passiveAbility(Abilities.LEVITATE); game.override.startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); - await game.startBattle([Species.CHARIZARD, Species.PIDGEOT]); - - const playerPokemon = game.scene.getPlayerField(); - expect(playerPokemon.length).toBe(2); - playerPokemon.forEach(p => expect(p).not.toBe(undefined)); + await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); const enemyPokemon = game.scene.getEnemyField(); - expect(enemyPokemon.length).toBe(2); - enemyPokemon.forEach(p => expect(p).not.toBe(undefined)); const enemyStartingHp = enemyPokemon.map(p => p.hp); game.move.select(Moves.EARTHQUAKE); - await game.phaseInterceptor.to(CommandPhase); - game.move.select(Moves.SPLASH, 1); - await game.phaseInterceptor.to(MoveEffectPhase, false); - - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); const enemyFirstHitDamage = enemyStartingHp.map((hp, i) => hp - enemyPokemon[i].hp); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); enemyPokemon.forEach((p, i) => expect(enemyStartingHp[i] - p.hp).toBe(2 * enemyFirstHitDamage[i])); - }, TIMEOUT ); }); From 13f38dce8d53d4a8d176c9de9b0e345ecb4cac49 Mon Sep 17 00:00:00 2001 From: Zach Day Date: Thu, 5 Sep 2024 04:44:22 -0400 Subject: [PATCH 33/91] [Move] Use BattlerTag for move-disabling effects (#2051) * Use BattlerTag for move-disabling effects * Fix RUN command causing freeze * Improve documentation * Clean up and document PokemonMove.isUsable * Fix isMoveDisabled missing return * Tags define the message shown when disabling interrupts a move * Fix -1 duration on Disable effect * Add tests for Disable * En loc and fix message functions * Fix Disable test * Fix broken imports * Fix test * All disable tests passing * Localize remaining strings * Move cancellation logic out of lapse; use use TURN_END for lapse type * Prevent disabling STRUGGLE * Inline struggle check function * Restore RechargingTag docs * Move cancellation logic back to tag Wanted to increase similarity to the existing code base to avoid that stupid hyper beam error but it's still happening here * Fix hyper beam test * Remove erroneous shit * Fill movesets with SPLASH for disable test * More robust condition for disable checking * Remove DisabledTag lapse * Simplify DisablingBattlerTag lapse * Cancel disable-interrupted moves instead of failing them * Avoid disabling virtual moves * Consistent access modifiers across Disable tags * Add abstract function for message when player tries to select the disabled move * Fix syntax mistake * Always disable last-used non-virtual move * Overhaul tests + add tests * Implement loadTag for DisabledTag * Update translations * Update translations * Reimplement phase changes * fix battlertag strings * Fix disable test not running * Update name of base class * Rename "disabling" to "restriction" * Fix sneaky string fuckup * Fix test failure * fix merge problems * fix merge problems * Update tests * rerun RNG test * Properly mock stats in test * Document everything in battlertag * More docs + typo fix * Update tests --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/ability.ts | 13 +--- src/data/battler-tags.ts | 123 +++++++++++++++++++++++++++++ src/data/move.ts | 70 +---------------- src/enums/battler-tag-type.ts | 1 + src/field/pokemon.ts | 53 +++++++++++-- src/locales/en/battle.json | 1 + src/locales/en/battler-tags.json | 6 +- src/phases/command-phase.ts | 5 +- src/phases/move-phase.ts | 9 +-- src/phases/turn-end-phase.ts | 8 -- src/system/pokemon-data.ts | 2 - src/test/moves/disable.test.ts | 129 +++++++++++++++++++++++++++++++ 12 files changed, 315 insertions(+), 105 deletions(-) mode change 100644 => 100755 src/data/ability.ts create mode 100644 src/test/moves/disable.test.ts diff --git a/src/data/ability.ts b/src/data/ability.ts old mode 100644 new mode 100755 index 925a7efb79b..fde39ebb152 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1085,7 +1085,7 @@ export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr { } applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { - if (!attacker.summonData.disabledMove) { + if (attacker.getTag(BattlerTagType.DISABLED) === null) { if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && (this.chance === -1 || pokemon.randSeedInt(100) < this.chance) && !attacker.isMax()) { if (simulated) { return true; @@ -1093,21 +1093,12 @@ export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr { this.attacker = attacker; this.move = move; - - attacker.summonData.disabledMove = move.id; - attacker.summonData.disabledTurns = 4; + this.attacker.addTag(BattlerTagType.DISABLED, 4, 0, pokemon.id); return true; } } return false; } - - getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string { - return i18next.t("abilityTriggers:postDefendMoveDisable", { - pokemonNameWithAffix: getPokemonNameWithAffix(this.attacker), - moveName: this.move.name, - }); - } } export class PostStatStageChangeStatStageChangeAbAttr extends PostStatStageChangeAbAttr { diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 66bcc7b9c3c..ef91dda7b63 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -98,6 +98,127 @@ export interface TerrainBattlerTag { terrainTypes: TerrainType[]; } +/** + * Base class for tags that restrict the usage of moves. This effect is generally referred to as "disabling" a move + * in-game. This is not to be confused with {@linkcode Moves.DISABLE}. + * + * Descendants can override {@linkcode isMoveRestricted} to restrict moves that + * match a condition. A restricted move gets cancelled before it is used. Players and enemies should not be allowed + * to select restricted moves. + */ +export abstract class MoveRestrictionBattlerTag extends BattlerTag { + constructor(tagType: BattlerTagType, turnCount: integer, sourceMove?: Moves, sourceId?: integer) { + super(tagType, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END ], turnCount, sourceMove, sourceId); + } + + /** @override */ + override lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { + if (lapseType === BattlerTagLapseType.PRE_MOVE) { + // Cancel the affected pokemon's selected move + const phase = pokemon.scene.getCurrentPhase() as MovePhase; + const move = phase.move; + + if (this.isMoveRestricted(move.moveId)) { + pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId)); + phase.cancel(); + } + + return true; + } + + return super.lapse(pokemon, lapseType); + } + + /** + * Gets whether this tag is restricting a move. + * + * @param {Moves} move {@linkcode Moves} ID to check restriction for. + * @returns {boolean} `true` if the move is restricted by this tag, otherwise `false`. + */ + abstract isMoveRestricted(move: Moves): boolean; + + /** + * Gets the text to display when the player attempts to select a move that is restricted by this tag. + * + * @param {Pokemon} pokemon {@linkcode Pokemon} for which the player is attempting to select the restricted move + * @param {Moves} move {@linkcode Moves} ID of the move that is having its selection denied + * @returns {string} text to display when the player attempts to select the restricted move + */ + abstract selectionDeniedText(pokemon: Pokemon, move: Moves): string; + + /** + * Gets the text to display when a move's execution is prevented as a result of the restriction. + * Because restriction effects also prevent selection of the move, this situation can only arise if a + * pokemon first selects a move, then gets outsped by a pokemon using a move that restricts the selected move. + * + * @param {Pokemon} pokemon {@linkcode Pokemon} attempting to use the restricted move + * @param {Moves} move {@linkcode Moves} ID of the move being interrupted + * @returns {string} text to display when the move is interrupted + */ + abstract interruptedText(pokemon: Pokemon, move: Moves): string; +} + +/** + * Tag representing the "disabling" effect performed by {@linkcode Moves.DISABLE} and {@linkcode Abilities.CURSED_BODY}. + * When the tag is added, the last-used move of the tag holder is set as the disabled move. + */ +export class DisabledTag extends MoveRestrictionBattlerTag { + /** The move being disabled. Gets set when {@linkcode onAdd} is called for this tag. */ + private moveId: Moves = Moves.NONE; + + constructor(sourceId: number) { + super(BattlerTagType.DISABLED, 4, Moves.DISABLE, sourceId); + } + + /** @override */ + override isMoveRestricted(move: Moves): boolean { + return move === this.moveId; + } + + /** + * @override + * + * Ensures that move history exists on `pokemon` and has a valid move. If so, sets the {@link moveId} and shows a message. + * Otherwise the move ID will not get assigned and this tag will get removed next turn. + */ + override onAdd(pokemon: Pokemon): void { + super.onAdd(pokemon); + + const move = pokemon.getLastXMoves() + .find(m => m.move !== Moves.NONE && m.move !== Moves.STRUGGLE && !m.virtual); + if (move === undefined) { + return; + } + + this.moveId = move.move; + + pokemon.scene.queueMessage(i18next.t("battlerTags:disabledOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[this.moveId].name })); + } + + /** @override */ + override onRemove(pokemon: Pokemon): void { + super.onRemove(pokemon); + + pokemon.scene.queueMessage(i18next.t("battlerTags:disabledLapse", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[this.moveId].name })); + } + + /** @override */ + override selectionDeniedText(pokemon: Pokemon, move: Moves): string { + return i18next.t("battle:moveDisabled", { moveName: allMoves[move].name }); + } + + /** @override */ + override interruptedText(pokemon: Pokemon, move: Moves): string { + return i18next.t("battle:disableInterruptedMove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); + } + + /** @override */ + override loadTag(source: BattlerTag | any): void { + super.loadTag(source); + this.moveId = source.moveId; + } +} + /** * BattlerTag that represents the "recharge" effects of moves like Hyper Beam. */ @@ -1995,6 +2116,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source return new StockpilingTag(sourceMove); case BattlerTagType.OCTOLOCK: return new OctolockTag(sourceId); + case BattlerTagType.DISABLED: + return new DisabledTag(sourceId); case BattlerTagType.IGNORE_GHOST: return new ExposedTag(tagType, sourceMove, Type.GHOST, [Type.NORMAL, Type.FIGHTING]); case BattlerTagType.IGNORE_DARK: diff --git a/src/data/move.ts b/src/data/move.ts index ddf043c554d..a591f12df90 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4332,72 +4332,6 @@ export class TypelessAttr extends MoveAttr { } */ export class BypassRedirectAttr extends MoveAttr { } -export class DisableMoveAttr extends MoveEffectAttr { - constructor() { - super(false); - } - - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - if (!super.apply(user, target, move, args)) { - return false; - } - - const moveQueue = target.getLastXMoves(); - let turnMove: TurnMove | undefined; - while (moveQueue.length) { - turnMove = moveQueue.shift(); - if (turnMove?.virtual) { - continue; - } - - const moveIndex = target.getMoveset().findIndex(m => m?.moveId === turnMove?.move); - if (moveIndex === -1) { - return false; - } - - const disabledMove = target.getMoveset()[moveIndex]; - target.summonData.disabledMove = disabledMove?.moveId!; // TODO: is this bang correct? - target.summonData.disabledTurns = 4; - - user.scene.queueMessage(i18next.t("abilityTriggers:postDefendMoveDisable", { pokemonNameWithAffix: getPokemonNameWithAffix(target), moveName: disabledMove?.getName()})); - - return true; - } - - return false; - } - - getCondition(): MoveConditionFunc { - return (user, target, move): boolean => { // TODO: Not sure what to do here - if (target.summonData.disabledMove || target.isMax()) { - return false; - } - - const moveQueue = target.getLastXMoves(); - let turnMove: TurnMove | undefined; - while (moveQueue.length) { - turnMove = moveQueue.shift(); - if (turnMove?.virtual) { - continue; - } - - const move = target.getMoveset().find(m => m?.moveId === turnMove?.move); - if (!move) { - continue; - } - - return true; - } - - return false; - }; - } - - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { - return -5; - } -} - export class FrenzyAttr extends MoveEffectAttr { constructor() { super(true, MoveEffectTrigger.HIT, false, true); @@ -4488,6 +4422,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr { case BattlerTagType.INFATUATED: case BattlerTagType.NIGHTMARE: case BattlerTagType.DROWSY: + case BattlerTagType.DISABLED: return -5; case BattlerTagType.SEEDED: case BattlerTagType.SALT_CURED: @@ -6673,7 +6608,8 @@ export function initMoves() { new AttackMove(Moves.SONIC_BOOM, Type.NORMAL, MoveCategory.SPECIAL, -1, 90, 20, -1, 0, 1) .attr(FixedDamageAttr, 20), new StatusMove(Moves.DISABLE, Type.NORMAL, 100, 20, -1, 0, 1) - .attr(DisableMoveAttr) + .attr(AddBattlerTagAttr, BattlerTagType.DISABLED, false, true) + .condition((user, target, move) => target.getMoveHistory().reverse().find(m => m.move !== Moves.NONE && m.move !== Moves.STRUGGLE && !m.virtual) !== undefined) .condition(failOnMaxCondition), new AttackMove(Moves.ACID, Type.POISON, MoveCategory.SPECIAL, 40, 100, 30, 10, 0, 1) .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1) diff --git a/src/enums/battler-tag-type.ts b/src/enums/battler-tag-type.ts index 20ceb1b331f..a2bcf9e4c0e 100644 --- a/src/enums/battler-tag-type.ts +++ b/src/enums/battler-tag-type.ts @@ -64,6 +64,7 @@ export enum BattlerTagType { STOCKPILING = "STOCKPILING", RECEIVE_DOUBLE_DAMAGE = "RECEIVE_DOUBLE_DAMAGE", ALWAYS_GET_HIT = "ALWAYS_GET_HIT", + DISABLED = "DISABLED", IGNORE_GHOST = "IGNORE_GHOST", IGNORE_DARK = "IGNORE_DARK", GULP_MISSILE_ARROKUDA = "GULP_MISSILE_ARROKUDA", diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index e0a9a4a86ce..269d0b1dba5 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -17,7 +17,7 @@ import { initMoveAnim, loadMoveAnimAssets } from "../data/battle-anims"; import { Status, StatusEffect, getRandomStatus } from "../data/status-effect"; import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition, FusionSpeciesFormEvolution } from "../data/pokemon-evolutions"; import { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "../data/tms"; -import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, ExposedTag, DragonCheerTag, CritBoostTag, TrappedTag } from "../data/battler-tags"; +import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, MoveRestrictionBattlerTag, ExposedTag, DragonCheerTag, CritBoostTag, TrappedTag } from "../data/battler-tags"; import { WeatherType } from "../data/weather"; import { ArenaTagSide, NoCritTag, WeakenMoveScreenTag } from "../data/arena-tag"; import { Ability, AbAttr, StatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentStatStagesAbAttr, MoveImmunityAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyStatMultiplierAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr, ConditionalCritAbAttr, applyFieldStatMultiplierAbAttrs, FieldMultiplyStatAbAttr, AddSecondStrikeAbAttr, UserFieldStatusEffectImmunityAbAttr, UserFieldBattlerTagImmunityAbAttr, BattlerTagImmunityAbAttr, MoveTypeChangeAbAttr, FullHpResistTypeAbAttr, applyCheckTrappedAbAttrs, CheckTrappedAbAttr } from "../data/ability"; @@ -2670,6 +2670,33 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.updateInfo(); } + /** + * Gets whether the given move is currently disabled for this Pokemon. + * + * @param {Moves} moveId {@linkcode Moves} ID of the move to check + * @returns {boolean} `true` if the move is disabled for this Pokemon, otherwise `false` + * + * @see {@linkcode MoveRestrictionBattlerTag} + */ + isMoveRestricted(moveId: Moves): boolean { + return this.getRestrictingTag(moveId) !== null; + } + + /** + * Gets the {@link MoveRestrictionBattlerTag} that is restricting a move, if it exists. + * + * @param {Moves} moveId {@linkcode Moves} ID of the move to check + * @returns {MoveRestrictionBattlerTag | null} the first tag on this Pokemon that restricts the move, or `null` if the move is not restricted. + */ + getRestrictingTag(moveId: Moves): MoveRestrictionBattlerTag | null { + for (const tag of this.findTags(t => t instanceof MoveRestrictionBattlerTag)) { + if ((tag as MoveRestrictionBattlerTag).isMoveRestricted(moveId)) { + return tag as MoveRestrictionBattlerTag; + } + } + return null; + } + getMoveHistory(): TurnMove[] { return this.battleSummonData.moveHistory; } @@ -4458,8 +4485,6 @@ export interface AttackMoveResult { export class PokemonSummonData { public statStages: number[] = [ 0, 0, 0, 0, 0, 0, 0 ]; public moveQueue: QueuedMove[] = []; - public disabledMove: Moves = Moves.NONE; - public disabledTurns: number = 0; public tags: BattlerTag[] = []; public abilitySuppressed: boolean = false; public abilitiesApplied: Abilities[] = []; @@ -4540,7 +4565,7 @@ export type DamageResult = HitResult.EFFECTIVE | HitResult.SUPER_EFFECTIVE | Hit * It links to {@linkcode Move} class via the move ID. * Compared to {@linkcode Move}, this class also tracks if a move has received. * PP Ups, amount of PP used, and things like that. - * @see {@linkcode isUsable} - checks if move is disabled, out of PP, or not implemented. + * @see {@linkcode isUsable} - checks if move is restricted, out of PP, or not implemented. * @see {@linkcode getMove} - returns {@linkcode Move} object by looking it up via ID. * @see {@linkcode usePp} - removes a point of PP from the move. * @see {@linkcode getMovePp} - returns amount of PP a move currently has. @@ -4560,11 +4585,25 @@ export class PokemonMove { this.virtual = !!virtual; } - isUsable(pokemon: Pokemon, ignorePp?: boolean): boolean { - if (this.moveId && pokemon.summonData?.disabledMove === this.moveId) { + /** + * Checks whether the move can be selected or performed by a Pokemon, without consideration for the move's targets. + * The move is unusable if it is out of PP, restricted by an effect, or unimplemented. + * + * @param {Pokemon} pokemon {@linkcode Pokemon} that would be using this move + * @param {boolean} ignorePp If `true`, skips the PP check + * @param {boolean} ignoreRestrictionTags If `true`, skips the check for move restriction tags (see {@link MoveRestrictionBattlerTag}) + * @returns `true` if the move can be selected and used by the Pokemon, otherwise `false`. + */ + isUsable(pokemon: Pokemon, ignorePp?: boolean, ignoreRestrictionTags?: boolean): boolean { + if (this.moveId && !ignoreRestrictionTags && pokemon.isMoveRestricted(this.moveId)) { return false; } - return (ignorePp || this.ppUsed < this.getMovePp() || this.getMove().pp === -1) && !this.getMove().name.endsWith(" (N)"); + + if (this.getMove().name.endsWith(" (N)")) { + return false; + } + + return (ignorePp || this.ppUsed < this.getMovePp() || this.getMove().pp === -1); } getMove(): Move { diff --git a/src/locales/en/battle.json b/src/locales/en/battle.json index 918fb38b520..120ac749acb 100644 --- a/src/locales/en/battle.json +++ b/src/locales/en/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.", "moveNoPP": "There's no PP left for\nthis move!", "moveDisabled": "{{moveName}} is disabled!", + "disableInterruptedMove": "{{pokemonNameWithAffix}}'s {{moveName}}\nis disabled!", "noPokeballForce": "An unseen force\nprevents using Poké Balls.", "noPokeballTrainer": "You can't catch\nanother trainer's Pokémon!", "noPokeballMulti": "You can only throw a Poké Ball\nwhen there is one Pokémon remaining!", diff --git a/src/locales/en/battler-tags.json b/src/locales/en/battler-tags.json index 94ea3b14958..222aee4087c 100644 --- a/src/locales/en/battler-tags.json +++ b/src/locales/en/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!", "cursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!", "cursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!", - "stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!" -} \ No newline at end of file + "stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!", + "disabledOnAdd": "{{pokemonNameWithAffix}}'s {{moveName}}\nwas disabled!", + "disabledLapse": "{{pokemonNameWithAffix}}'s {{moveName}}\nis no longer disabled." +} diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index 9681a6eeee8..47d212aa598 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -107,8 +107,9 @@ export class CommandPhase extends FieldPhase { // Decides between a Disabled, Not Implemented, or No PP translation message const errorMessage = - playerPokemon.summonData.disabledMove === move.moveId ? "battle:moveDisabled" : - move.getName().endsWith(" (N)") ? "battle:moveNotImplemented" : "battle:moveNoPP"; + playerPokemon.isMoveRestricted(move.moveId) + ? playerPokemon.getRestrictingTag(move.moveId)!.selectionDeniedText(playerPokemon, move.moveId) + : move.getName().endsWith(" (N)") ? "battle:moveNotImplemented" : "battle:moveNoPP"; const moveName = move.getName().replace(" (N)", ""); // Trims off the indicator this.scene.ui.showText(i18next.t(errorMessage, { moveName: moveName }), null, () => { diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index e2893d587a7..0ccf19a462f 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -44,8 +44,8 @@ export class MovePhase extends BattlePhase { this.cancelled = false; } - canMove(): boolean { - return this.pokemon.isActive(true) && this.move.isUsable(this.pokemon, this.ignorePp) && !!this.targets.length; + canMove(ignoreDisableTags?: boolean): boolean { + return this.pokemon.isActive(true) && this.move.isUsable(this.pokemon, this.ignorePp, ignoreDisableTags) && !!this.targets.length; } /**Signifies the current move should fail but still use PP */ @@ -63,10 +63,7 @@ export class MovePhase extends BattlePhase { console.log(Moves[this.move.moveId]); - if (!this.canMove()) { - if (this.move.moveId && this.pokemon.summonData?.disabledMove === this.move.moveId) { - this.scene.queueMessage(i18next.t("battle:moveDisabled", { moveName: this.move.getName() })); - } + if (!this.canMove(true)) { if (this.pokemon.isActive(true) && this.move.ppUsed >= this.move.getMovePp()) { // if the move PP was reduced from Spite or otherwise, the move fails this.fail(); this.showMoveText(); diff --git a/src/phases/turn-end-phase.ts b/src/phases/turn-end-phase.ts index 9f4de46b0fa..c8bd3398bb5 100644 --- a/src/phases/turn-end-phase.ts +++ b/src/phases/turn-end-phase.ts @@ -1,9 +1,7 @@ import BattleScene from "#app/battle-scene.js"; import { applyPostTurnAbAttrs, PostTurnAbAttr } from "#app/data/ability.js"; import { BattlerTagLapseType } from "#app/data/battler-tags.js"; -import { allMoves } from "#app/data/move.js"; import { TerrainType } from "#app/data/terrain.js"; -import { Moves } from "#app/enums/moves.js"; import { WeatherType } from "#app/enums/weather-type.js"; import { TurnEndEvent } from "#app/events/battle-scene.js"; import Pokemon from "#app/field/pokemon.js"; @@ -11,7 +9,6 @@ import { getPokemonNameWithAffix } from "#app/messages.js"; import { TurnHealModifier, EnemyTurnHealModifier, EnemyStatusEffectHealChanceModifier, TurnStatusEffectModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier.js"; import i18next from "i18next"; import { FieldPhase } from "./field-phase"; -import { MessagePhase } from "./message-phase"; import { PokemonHealPhase } from "./pokemon-heal-phase"; export class TurnEndPhase extends FieldPhase { @@ -28,11 +25,6 @@ export class TurnEndPhase extends FieldPhase { const handlePokemon = (pokemon: Pokemon) => { pokemon.lapseTags(BattlerTagLapseType.TURN_END); - if (pokemon.summonData.disabledMove && !--pokemon.summonData.disabledTurns) { - this.scene.pushPhase(new MessagePhase(this.scene, i18next.t("battle:notDisabled", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: allMoves[pokemon.summonData.disabledMove].name }))); - pokemon.summonData.disabledMove = Moves.NONE; - } - this.scene.applyModifiers(TurnHealModifier, pokemon.isPlayer(), pokemon); if (this.scene.arena.terrain?.terrainType === TerrainType.GRASSY && pokemon.isGrounded()) { diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 9a743ceb1d2..1fafcbf8acc 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -127,8 +127,6 @@ export default class PokemonData { this.summonData.stats = source.summonData.stats; this.summonData.statStages = source.summonData.statStages; this.summonData.moveQueue = source.summonData.moveQueue; - this.summonData.disabledMove = source.summonData.disabledMove; - this.summonData.disabledTurns = source.summonData.disabledTurns; this.summonData.abilitySuppressed = source.summonData.abilitySuppressed; this.summonData.abilitiesApplied = source.summonData.abilitiesApplied; diff --git a/src/test/moves/disable.test.ts b/src/test/moves/disable.test.ts new file mode 100644 index 00000000000..3d207035ce3 --- /dev/null +++ b/src/test/moves/disable.test.ts @@ -0,0 +1,129 @@ +import { BattlerIndex } from "#app/battle"; +import { MoveResult } from "#app/field/pokemon"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Moves - Disable", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(async () => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .ability(Abilities.BALL_FETCH) + .enemyAbility(Abilities.BALL_FETCH) + .moveset([Moves.DISABLE, Moves.SPLASH]) + .enemyMoveset(SPLASH_ONLY) + .starterSpecies(Species.PIKACHU) + .enemySpecies(Species.SHUCKLE); + }); + + it("restricts moves", async () => { + await game.classicMode.startBattle(); + + const enemyMon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.DISABLE); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toNextTurn(); + + expect(enemyMon.getMoveHistory()).toHaveLength(1); + expect(enemyMon.isMoveRestricted(Moves.SPLASH)).toBe(true); + }); + + it("fails if enemy has no move history", async() => { + await game.classicMode.startBattle(); + + const playerMon = game.scene.getPlayerPokemon()!; + const enemyMon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.DISABLE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toNextTurn(); + + expect(playerMon.getMoveHistory()[0]).toMatchObject({ move: Moves.DISABLE, result: MoveResult.FAIL }); + expect(enemyMon.isMoveRestricted(Moves.SPLASH)).toBe(false); + }, 20000); + + it("causes STRUGGLE if all usable moves are disabled", async() => { + await game.classicMode.startBattle(); + + const enemyMon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.DISABLE); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toNextTurn(); + + game.move.select(Moves.SPLASH); + await game.toNextTurn(); + + const enemyHistory = enemyMon.getMoveHistory(); + expect(enemyHistory).toHaveLength(2); + expect(enemyHistory[0].move).toBe(Moves.SPLASH); + expect(enemyHistory[1].move).toBe(Moves.STRUGGLE); + }, 20000); + + it("cannot disable STRUGGLE", async() => { + game.override.enemyMoveset(Array(4).fill(Moves.STRUGGLE)); + await game.classicMode.startBattle(); + + const playerMon = game.scene.getPlayerPokemon()!; + const enemyMon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.DISABLE); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toNextTurn(); + + expect(playerMon.getLastXMoves()[0].result).toBe(MoveResult.FAIL); + expect(enemyMon.getLastXMoves()[0].move).toBe(Moves.STRUGGLE); + expect(enemyMon.isMoveRestricted(Moves.STRUGGLE)).toBe(false); + }, 20000); + + it("interrupts target's move when target moves after", async() => { + await game.classicMode.startBattle(); + + const enemyMon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.SPLASH); + await game.toNextTurn(); + + // Both mons just used Splash last turn; now have player use Disable. + game.move.select(Moves.DISABLE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toNextTurn(); + + const enemyHistory = enemyMon.getMoveHistory(); + expect(enemyHistory).toHaveLength(2); + expect(enemyHistory[0]).toMatchObject({ move: Moves.SPLASH, result: MoveResult.SUCCESS }); + expect(enemyHistory[1].result).toBe(MoveResult.FAIL); + }, 20000); + + it("disables NATURE POWER, not the move invoked by it", async() => { + game.override.enemyMoveset(Array(4).fill(Moves.NATURE_POWER)); + await game.classicMode.startBattle(); + + const enemyMon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.DISABLE); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toNextTurn(); + + expect(enemyMon.isMoveRestricted(Moves.NATURE_POWER)).toBe(true); + expect(enemyMon.isMoveRestricted(enemyMon.getLastXMoves(2)[1].move)).toBe(false); + }, 20000); +}); From 1968680104cfa9874e425f614e9e83a2a635feab Mon Sep 17 00:00:00 2001 From: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:52:48 +0900 Subject: [PATCH 34/91] [Enhancement] add font size option per language on registration UI (#3849) * add language setting for register form ui * remove button fontsize option * fix tests * remove deprecated comments * update request changes * update requested changes from es * update requested changes from walker * Update src/locales/es/menu.json Co-authored-by: Asdar --------- Co-authored-by: Asdar --- src/locales/es/menu.json | 4 ++-- src/ui/registration-form-ui-handler.ts | 30 +++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/locales/es/menu.json b/src/locales/es/menu.json index bd2479a02df..3f2caafac21 100644 --- a/src/locales/es/menu.json +++ b/src/locales/es/menu.json @@ -14,14 +14,14 @@ "register": "Registrarse", "emptyUsername": "El usuario no puede estar vacío", "invalidLoginUsername": "El usuario no es válido", - "invalidRegisterUsername": "El usuario solo puede contener letras, números y guiones bajos", + "invalidRegisterUsername": "El usuario solo puede contener letras, números y guiones bajos.", "invalidLoginPassword": "La contraseña no es válida", "invalidRegisterPassword": "La contraseña debe tener 6 o más caracteres.", "usernameAlreadyUsed": "El usuario ya está en uso", "accountNonExistent": "El usuario no existe", "unmatchingPassword": "La contraseña no coincide", "passwordNotMatchingConfirmPassword": "Las contraseñas deben coincidir", - "confirmPassword": "Confirmar Contra.", + "confirmPassword": "Confirmar contraseña", "registrationAgeWarning": "Al registrarte, confirmas tener 13 o más años de edad.", "backToLogin": "Volver al Login", "failedToLoadSaveData": "No se han podido cargar los datos guardados. Por favor, recarga la página.\nSi el fallo continúa, por favor comprueba #announcements en nuestro Discord.", diff --git a/src/ui/registration-form-ui-handler.ts b/src/ui/registration-form-ui-handler.ts index 733aab79b05..0c4b54ac723 100644 --- a/src/ui/registration-form-ui-handler.ts +++ b/src/ui/registration-form-ui-handler.ts @@ -5,6 +5,20 @@ import { Mode } from "./ui"; import { TextStyle, addTextObject } from "./text"; import i18next from "i18next"; + +interface LanguageSetting { + inputFieldFontSize?: string, + warningMessageFontSize?: string, + errorMessageFontSize?: string, +} + +const languageSettings: { [key: string]: LanguageSetting } = { + "es":{ + inputFieldFontSize: "50px", + errorMessageFontSize: "40px", + } +}; + export default class RegistrationFormUiHandler extends FormModalUiHandler { getModalTitle(config?: ModalConfig): string { return i18next.t("menu:register"); @@ -50,7 +64,17 @@ export default class RegistrationFormUiHandler extends FormModalUiHandler { setup(): void { super.setup(); - const label = addTextObject(this.scene, 10, 87, i18next.t("menu:registrationAgeWarning"), TextStyle.TOOLTIP_CONTENT, { fontSize: "42px" }); + this.modalContainer.list.forEach((child: Phaser.GameObjects.GameObject) => { + if (child instanceof Phaser.GameObjects.Text && child !== this.titleText) { + const inputFieldFontSize = languageSettings[i18next.resolvedLanguage!]?.inputFieldFontSize; + if (inputFieldFontSize) { + child.setFontSize(inputFieldFontSize); + } + } + }); + + const warningMessageFontSize = languageSettings[i18next.resolvedLanguage!]?.warningMessageFontSize ?? "42px"; + const label = addTextObject(this.scene, 10, 87, i18next.t("menu:registrationAgeWarning"), TextStyle.TOOLTIP_CONTENT, { fontSize: warningMessageFontSize}); this.modalContainer.add(label); } @@ -68,6 +92,10 @@ export default class RegistrationFormUiHandler extends FormModalUiHandler { const onFail = error => { this.scene.ui.setMode(Mode.REGISTRATION_FORM, Object.assign(config, { errorMessage: error?.trim() })); this.scene.ui.playError(); + const errorMessageFontSize = languageSettings[i18next.resolvedLanguage!]?.errorMessageFontSize; + if (errorMessageFontSize) { + this.errorMessage.setFontSize(errorMessageFontSize); + } }; if (!this.inputs[0].text) { return onFail(i18next.t("menu:emptyUsername")); From 41bb12d0c06734c667918023c28f0caddd14738b Mon Sep 17 00:00:00 2001 From: "Dmitriy K." Date: Thu, 5 Sep 2024 06:08:00 -0400 Subject: [PATCH 35/91] skip pre-commit on merge and rebase, add pre-push (#1607) --- lefthook.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index 01ffebc69c7..662d3b5617b 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -2,6 +2,15 @@ pre-commit: parallel: true commands: eslint: - glob: '*.{js,jsx,ts,tsx}' + glob: "*.{js,jsx,ts,tsx}" run: npx eslint --fix {staged_files} - stage_fixed: true \ No newline at end of file + stage_fixed: true + skip: + - merge + - rebase + +pre-push: + commands: + eslint: + glob: "*.{js,ts,jsx,tsx}" + run: npx eslint --fix {push_files} \ No newline at end of file From c902369eed57b357924701f9d33f39ffe3a1a4b0 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Thu, 5 Sep 2024 14:39:10 +0200 Subject: [PATCH 36/91] [Localization] Restoring "Safeguard" entries in arena-flyout.json of all locales where it existed (#4026) * Update arena-flyout.json * Update arena-flyout.json * Update arena-flyout.json * Update arena-flyout.json * Update arena-flyout.json * Update arena-flyout.json * Update arena-flyout.json * Update arena-flyout.json --- src/locales/de/arena-flyout.json | 5 +++-- src/locales/es/arena-flyout.json | 3 ++- src/locales/fr/arena-flyout.json | 5 +++-- src/locales/it/arena-flyout.json | 5 +++-- src/locales/ko/arena-flyout.json | 5 +++-- src/locales/pt_BR/arena-flyout.json | 3 ++- src/locales/zh_CN/arena-flyout.json | 5 +++-- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/locales/de/arena-flyout.json b/src/locales/de/arena-flyout.json index 30d3e7febb3..a1f2254c642 100644 --- a/src/locales/de/arena-flyout.json +++ b/src/locales/de/arena-flyout.json @@ -36,5 +36,6 @@ "matBlock": "Tatami-Schild", "craftyShield": "Trickschutz", "tailwind": "Rückenwind", - "happyHour": "Goldene Zeiten" -} \ No newline at end of file + "happyHour": "Goldene Zeiten", + "safeguard": "Bodyguard" +} diff --git a/src/locales/es/arena-flyout.json b/src/locales/es/arena-flyout.json index e3ec1dc6d4a..64c9a489d73 100644 --- a/src/locales/es/arena-flyout.json +++ b/src/locales/es/arena-flyout.json @@ -36,5 +36,6 @@ "matBlock": "Escudo Tatami", "craftyShield": "Truco Defensa", "tailwind": "Viento Afín", - "happyHour": "Paga Extra" + "happyHour": "Paga Extra", + "safeguard": "Velo Sagrado" } diff --git a/src/locales/fr/arena-flyout.json b/src/locales/fr/arena-flyout.json index ce78643862e..e90de13b20a 100644 --- a/src/locales/fr/arena-flyout.json +++ b/src/locales/fr/arena-flyout.json @@ -36,5 +36,6 @@ "matBlock": "Tatamigaeshi", "craftyShield": "Vigilance", "tailwind": "Vent Arrière", - "happyHour": "Étrennes" -} \ No newline at end of file + "happyHour": "Étrennes", + "safeguard": "Rune Protect" +} diff --git a/src/locales/it/arena-flyout.json b/src/locales/it/arena-flyout.json index ac6dd4225cc..31c2a4c0015 100644 --- a/src/locales/it/arena-flyout.json +++ b/src/locales/it/arena-flyout.json @@ -36,5 +36,6 @@ "matBlock": "Ribaltappeto", "craftyShield": "Truccodifesa", "tailwind": "Ventoincoda", - "happyHour": "Cuccagna" -} \ No newline at end of file + "happyHour": "Cuccagna", + "safeguard": "Salvaguardia" +} diff --git a/src/locales/ko/arena-flyout.json b/src/locales/ko/arena-flyout.json index bfd24776cdc..e4b271691a5 100644 --- a/src/locales/ko/arena-flyout.json +++ b/src/locales/ko/arena-flyout.json @@ -36,5 +36,6 @@ "matBlock": "마룻바닥세워막기", "craftyShield": "트릭가드", "tailwind": "순풍", - "happyHour": "해피타임" -} \ No newline at end of file + "happyHour": "해피타임", + "safeguard": "신비의부적" +} diff --git a/src/locales/pt_BR/arena-flyout.json b/src/locales/pt_BR/arena-flyout.json index e221fa6c0a5..a4be2727b27 100644 --- a/src/locales/pt_BR/arena-flyout.json +++ b/src/locales/pt_BR/arena-flyout.json @@ -36,5 +36,6 @@ "matBlock": "Mat Block", "craftyShield": "Crafty Shield", "tailwind": "Tailwind", - "happyHour": "Happy Hour" + "happyHour": "Happy Hour", + "safeguard": "Safeguard" } diff --git a/src/locales/zh_CN/arena-flyout.json b/src/locales/zh_CN/arena-flyout.json index 7ddc304f404..fbce213c4aa 100644 --- a/src/locales/zh_CN/arena-flyout.json +++ b/src/locales/zh_CN/arena-flyout.json @@ -36,5 +36,6 @@ "matBlock": "掀榻榻米", "craftyShield": "戏法防守", "tailwind": "顺风", - "happyHour": "快乐时光" -} \ No newline at end of file + "happyHour": "快乐时光", + "safeguard": "神秘守护" +} From 01eb05469a559670de1c4bf5804ddcd58f2fd0ad Mon Sep 17 00:00:00 2001 From: Opaque02 <66582645+Opaque02@users.noreply.github.com> Date: Fri, 6 Sep 2024 00:00:19 +1000 Subject: [PATCH 37/91] [QoL] Username finder (#4040) * Added the ability to potentially get username from login screen * Accidentally made dev login enforced :) * Updated image --- public/images/ui/legacy/settings_icon.png | Bin 0 -> 261 bytes public/images/ui/settings_icon.png | Bin 0 -> 261 bytes src/loading-scene.ts | 1 + src/ui/login-form-ui-handler.ts | 99 ++++++++++++++++++---- 4 files changed, 83 insertions(+), 17 deletions(-) create mode 100644 public/images/ui/legacy/settings_icon.png create mode 100644 public/images/ui/settings_icon.png diff --git a/public/images/ui/legacy/settings_icon.png b/public/images/ui/legacy/settings_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..21680cce7fcdc15309a67cc2465c6e5ee921cd56 GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^;vmey3?#3AQJDm!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h2Ka=yM#aRKnOgvPWpUylqnJyA{DS}gXSjZf7pRtjv%n*=n1O-sFbFdq z&tH)OQtIjA7@`q8x8G6dfC3NG+W++>lUrB3?3rE^5Mi=5d79fPJ0b5i2{Rw1tSB!m z3NO07uGwDm_Y=JXp$790MX=uY-Mle>j`Jgt-2z5oiPL@^w*Q>}UwC;Gh1;^xF5?nCq9p#v3_#E=aWDeFnGH9xvXk44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h2Ka=yM#aRKnOgvPWpUylqnJyA{DS}gXSjZf7pRtjv%n*=n1O-sFbFdq z&tH)OQtIjA7@`q8x8G6dfC3NG+W++>lUrB3?3rE^5Mi=5d79fPJ0b5i2{Rw1tSB!m z3NO07uGwDm_Y=JXp$790MX=uY-Mle>j`Jgt-2z5oiPL@^w*Q>}UwC;Gh1;^xF5?nCq9p#v3_#E=aWDeFnGH9xvX { - const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/google/callback`); - const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID; - const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&redirect_uri=${redirectUri}&response_type=code&scope=openid`; - window.open(googleUrl, "_self"); - }); this.googleImage = googleImage; const discordImage = this.scene.add.image(20, 0, "discord"); @@ -46,12 +46,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler { discordImage.setScale(0.07); discordImage.setInteractive(); discordImage.setName("discord-icon"); - discordImage.on("pointerdown", () => { - const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/discord/callback`); - const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID; - const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify&prompt=none`; - window.open(discordUrl, "_self"); - }); + this.discordImage = discordImage; this.externalPartyContainer.add(this.googleImage); @@ -60,6 +55,17 @@ export default class LoginFormUiHandler extends FormModalUiHandler { this.externalPartyContainer.add(this.googleImage); this.externalPartyContainer.add(this.discordImage); this.externalPartyContainer.setVisible(false); + + const usernameInfoImage = this.scene.add.image(20, 0, "settings_icon"); + usernameInfoImage.setOrigin(0, 0); + usernameInfoImage.setScale(0.5); + usernameInfoImage.setInteractive(); + usernameInfoImage.setName("username-info-icon"); + this.usernameInfoImage = usernameInfoImage; + + this.infoContainer.add(this.usernameInfoImage); + this.getUi().add(this.infoContainer); + this.infoContainer.setVisible(false); } getModalTitle(config?: ModalConfig): string { @@ -104,9 +110,8 @@ export default class LoginFormUiHandler extends FormModalUiHandler { show(args: any[]): boolean { if (super.show(args)) { - this.processExternalProvider(); - const config = args[0] as ModalConfig; + this.processExternalProvider(config); const originalLoginAction = this.submitAction; this.submitAction = (_) => { // Prevent overlapping overrides on action modification @@ -146,22 +151,73 @@ export default class LoginFormUiHandler extends FormModalUiHandler { clear() { super.clear(); this.externalPartyContainer.setVisible(false); + this.infoContainer.setVisible(false); this.discordImage.off("pointerdown"); this.googleImage.off("pointerdown"); + this.usernameInfoImage.off("pointerdown"); } - processExternalProvider() : void { + processExternalProvider(config: ModalConfig) : void { this.externalPartyTitle.setText(i18next.t("menu:orUse") ?? ""); this.externalPartyTitle.setX(20+this.externalPartyTitle.text.length); this.externalPartyTitle.setVisible(true); this.externalPartyContainer.setPositionRelative(this.modalContainer, 175, 0); this.externalPartyContainer.setVisible(true); - this.externalPartyBg.setSize(this.externalPartyTitle.text.length+50, this.modalBg.height); + this.externalPartyBg.setSize(this.externalPartyTitle.text.length + 50, this.modalBg.height); this.getUi().moveTo(this.externalPartyContainer, this.getUi().length - 1); this.googleImage.setPosition(this.externalPartyBg.width/3.1, this.externalPartyBg.height-60); this.discordImage.setPosition(this.externalPartyBg.width/3.1, this.externalPartyBg.height-40); + this.infoContainer.setPosition(5, -76); + this.infoContainer.setVisible(true); + this.getUi().moveTo(this.infoContainer, this.getUi().length - 1); + this.usernameInfoImage.setPositionRelative(this.infoContainer, 0, 0); + + this.discordImage.on("pointerdown", () => { + const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/discord/callback`); + const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID; + const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify&prompt=none`; + window.open(discordUrl, "_self"); + }); + + this.googleImage.on("pointerdown", () => { + const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/google/callback`); + const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID; + const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&redirect_uri=${redirectUri}&response_type=code&scope=openid`; + window.open(googleUrl, "_self"); + }); + + const onFail = error => { + this.scene.ui.setMode(Mode.LOADING, { buttonActions: [] }); + this.scene.ui.setModeForceTransition(Mode.LOGIN_FORM, Object.assign(config, { errorMessage: error?.trim() })); + this.scene.ui.playError(); + }; + + this.usernameInfoImage.on("pointerdown", () => { + const localStorageKeys = Object.keys(localStorage); // this gets the keys for localStorage + const keyToFind = "data_"; + const dataKeys = localStorageKeys.filter(ls => ls.indexOf(keyToFind) >= 0); + if (dataKeys.length > 0 && dataKeys.length <= 2) { + const options: OptionSelectItem[] = []; + for (let i = 0; i < dataKeys.length; i++) { + options.push({ + label: dataKeys[i].replace(keyToFind, ""), + handler: () => { + this.scene.ui.revertMode(); + return true; + } + }); + } + this.scene.ui.setOverlayMode(Mode.OPTION_SELECT, { + options: options, + delay: 1000 + }); + } else { + return onFail("You have too many save files to use this"); + } + }); + this.externalPartyContainer.setAlpha(0); this.scene.tweens.add({ targets: this.externalPartyContainer, @@ -170,5 +226,14 @@ export default class LoginFormUiHandler extends FormModalUiHandler { y: "-=24", alpha: 1 }); + + this.infoContainer.setAlpha(0); + this.scene.tweens.add({ + targets: this.infoContainer, + duration: Utils.fixedInt(1000), + ease: "Sine.easeInOut", + y: "-=24", + alpha: 1 + }); } } From e2e5b2c34941a455388f1410db544e684baa393a Mon Sep 17 00:00:00 2001 From: Chapybara-jp Date: Thu, 5 Sep 2024 19:49:28 +0200 Subject: [PATCH 38/91] [Localisation] [JA] Translated remaining JA text files (#3999) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Localisation] [JA] Begun translation on arena-flyout.json * Added english names to bgm-name.json * Translated common.json * Added English dialogue-double-battle.json To make translation easier * Added English dialogue-final-boss.json * Added english dialogue-misc.json * Added English dialogue.json * Translated fight-ui-handler.json * Update filter-bar.json Changed 飴 to アメ for consistency with its spelling in Pokemon GO * Update game-stats-ui-handler.json changed 孵化 to ふか * Update growth.json Added kanji * Update menu-ui-handler.json changed 孵化 to ふか * Update modifier-type.json Changed name of IV Scanner to match with other files, the rest of the item descriptions need to be changed to Kanji as well. * Update modifier.json * Changed move-trigger.json Added kanji and new moves. * Update party-ui-handler.json Added kanji * Update pokemon-info-container.json Changed to Kanji * Translated pokemon-summary.json The metFragment formatting is taken from BW * Update run-history.json Corrected some misinterpretations. Added correct original line of "Welcome to Hall of Fame!" * Added english splash-messages.json * Update move-trigger.json * Update move-trigger.json * Update move-trigger.json * Update arena-flyout.json * Update move-trigger.json * Translated arena-flyout.json * Update weather.json * Update save-slot-select-ui-handler.json changed wave to ラウンド * Update game-stats-ui-handler.json * Update challenges.json * Update achv.json Corrected some mistakes, misspelling * Added some translations dialogue.json Youngster translation done Female rival dialogue done, needs check * Update dialogue.json * Update dialogue.json * Update dialogue.json * Update dialogue.json * Update dialogue.json --- src/locales/ja/achv.json | 14 +- src/locales/ja/arena-flyout.json | 44 +- src/locales/ja/bgm-name.json | 151 +- src/locales/ja/challenges.json | 2 +- src/locales/ja/common.json | 9 +- src/locales/ja/dialogue-double-battle.json | 85 +- src/locales/ja/dialogue-final-boss.json | 11 +- src/locales/ja/dialogue-misc.json | 7 +- src/locales/ja/dialogue.json | 2828 ++++++++++++++++- src/locales/ja/fight-ui-handler.json | 10 +- src/locales/ja/filter-bar.json | 4 +- src/locales/ja/game-stats-ui-handler.json | 12 +- src/locales/ja/growth.json | 14 +- src/locales/ja/menu-ui-handler.json | 4 +- src/locales/ja/modifier-type.json | 2 +- src/locales/ja/modifier.json | 10 +- src/locales/ja/move-trigger.json | 111 +- src/locales/ja/party-ui-handler.json | 12 +- src/locales/ja/pokemon-info-container.json | 12 +- src/locales/ja/pokemon-summary.json | 45 +- src/locales/ja/run-history.json | 10 +- .../ja/save-slot-select-ui-handler.json | 4 +- src/locales/ja/splash-messages.json | 37 +- src/locales/ja/weather.json | 16 +- 24 files changed, 3329 insertions(+), 125 deletions(-) diff --git a/src/locales/ja/achv.json b/src/locales/ja/achv.json index 182da0aed2e..fd5e4b9e6c4 100644 --- a/src/locales/ja/achv.json +++ b/src/locales/ja/achv.json @@ -37,7 +37,7 @@ "name_female": "ワンパンウーマン" }, "HealAchv": { - "description": "一つの 技や 特性や 持っているアイテムで\n{{healAmount}}{{HP}}を 一気に 回復する" + "description": "一つの 技や 特性や 持たせたアイテムで\n{{HP}}{{healAmount}}を 一気に 回復する" }, "250_HEAL": { "name": "回復発見者" @@ -52,7 +52,7 @@ "name": "ジョーイさん" }, "LevelAchv": { - "description": "一つの ポケモンを Lv{{level}}まで レベルアップする" + "description": "一つの ポケモンを Lv.{{level}}まで 上げる" }, "LV_100": { "name": "まだまだだよ" @@ -82,7 +82,7 @@ "name": "マスターリーグチャンピオン" }, "TRANSFER_MAX_STAT_STAGE": { - "name": "同力", + "name": "連係プレー", "description": "少なくとも 一つの 能力を 最大まで あげて\n他の 手持ちポケモンに バトンタッチする" }, "MAX_FRIENDSHIP": { @@ -94,7 +94,7 @@ "description": "一つの 手持ちポケモンを メガシンカさせる" }, "GIGANTAMAX": { - "name": "太―くて 堪らない", + "name": "太ーくて堪らない", "description": "一つの 手持ちポケモンを キョダイマックスさせる" }, "TERASTALLIZE": { @@ -106,7 +106,7 @@ "description": "一つの 手持ちポケモンを ステラ・テラスタルさせる" }, "SPLICE": { - "name": "インフィニット・フュジョン", + "name": "インフィニット・フュージョン", "description": "遺伝子のくさびで 二つの ポケモンを 吸収合体させる" }, "MINI_BLACK_HOLE": { @@ -205,7 +205,7 @@ "description": "{{type}}タイプの 単一タイプチャレンジを クリアする" }, "MONO_NORMAL": { - "name": "凡人" + "name": "超凡人" }, "MONO_FIGHTING": { "name": "八千以上だ!!" @@ -223,7 +223,7 @@ "name": "タケシの挑戦状" }, "MONO_BUG": { - "name": "チョウチョウせん者" + "name": "チョウチョウ戦者" }, "MONO_GHOST": { "name": "貞子ちゃん" diff --git a/src/locales/ja/arena-flyout.json b/src/locales/ja/arena-flyout.json index 9e26dfeeb6e..fa29b4567c5 100644 --- a/src/locales/ja/arena-flyout.json +++ b/src/locales/ja/arena-flyout.json @@ -1 +1,43 @@ -{} \ No newline at end of file +{ + "activeBattleEffects": "場の効果", + "player": "味方", + "neutral": "場の全員", + "enemy": "相手", + + "sunny": "晴れ", + "rain": "雨", + "sandstorm": "砂あらし", + "hail": "あられ", + "snow": "雪", + "fog": "きり", + "heavyRain": "強い雨", + "harshSun": "大日照り", + "strongWinds": "乱気流", + + "misty": "ミストフィールド", + "electric": "エレキフィールド", + "grassy": "グラスフィールド", + "psychic": "サイコフィールド", + + "mudSport": "どろあそび", + "waterSport": "みずあそび", + "spikes": "まきびし", + "toxicSpikes": "どくびし", + "mist": "しろいきり", + "futureSight": "みらいよち", + "doomDesire": "はめつのねがい", + "wish": "ねがいごと", + "stealthRock": "ステルスロック", + "stickyWeb": "ねばねばネット", + "trickRoom": "トリックルーム", + "gravity": "じゅうりょく", + "reflect": "リフレクター", + "lightScreen": "ひかりのかべ", + "auroraVeil": "オーロラベール", + "quickGuard": "ファストガード", + "wideGuard": "ワイドガード", + "matBlock": "たたみがえし", + "craftyShield": "トリックガード", + "tailwind": "おいかぜ", + "happyHour": "ハッピータイム" +} diff --git a/src/locales/ja/bgm-name.json b/src/locales/ja/bgm-name.json index 9e26dfeeb6e..8838942c8a6 100644 --- a/src/locales/ja/bgm-name.json +++ b/src/locales/ja/bgm-name.json @@ -1 +1,150 @@ -{} \ No newline at end of file +{ + "music": "Music: ", + "missing_entries": "{{name}}", + "battle_kanto_champion": "B2W2 Kanto Champion Battle", + "battle_johto_champion": "B2W2 Johto Champion Battle", + "battle_hoenn_champion_g5": "B2W2 Hoenn Champion Battle", + "battle_hoenn_champion_g6": "ORAS Hoenn Champion Battle", + "battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle", + "battle_champion_alder": "BW Unova Champion Battle", + "battle_champion_iris": "B2W2 Unova Champion Battle", + "battle_kalos_champion": "XY Kalos Champion Battle", + "battle_alola_champion": "USUM Alola Champion Battle", + "battle_galar_champion": "SWSH Galar Champion Battle", + "battle_champion_geeta": "SV Champion Geeta Battle", + "battle_champion_nemona": "SV Champion Nemona Battle", + "battle_champion_kieran": "SV Champion Kieran Battle", + "battle_hoenn_elite": "ORAS Elite Four Battle", + "battle_unova_elite": "BW Elite Four Battle", + "battle_kalos_elite": "XY Elite Four Battle", + "battle_alola_elite": "SM Elite Four Battle", + "battle_galar_elite": "SWSH League Tournament Battle", + "battle_paldea_elite": "SV Elite Four Battle", + "battle_bb_elite": "SV BB League Elite Four Battle", + "battle_final_encounter": "PMD RTDX Rayquaza's Domain", + "battle_final": "BW Ghetsis Battle", + "battle_kanto_gym": "B2W2 Kanto Gym Battle", + "battle_johto_gym": "B2W2 Johto Gym Battle", + "battle_hoenn_gym": "B2W2 Hoenn Gym Battle", + "battle_sinnoh_gym": "B2W2 Sinnoh Gym Battle", + "battle_unova_gym": "BW Unova Gym Battle", + "battle_kalos_gym": "XY Kalos Gym Battle", + "battle_galar_gym": "SWSH Galar Gym Battle", + "battle_paldea_gym": "SV Paldea Gym Battle", + "battle_legendary_kanto": "XY Kanto Legendary Battle", + "battle_legendary_raikou": "HGSS Raikou Battle", + "battle_legendary_entei": "HGSS Entei Battle", + "battle_legendary_suicune": "HGSS Suicune Battle", + "battle_legendary_lugia": "HGSS Lugia Battle", + "battle_legendary_ho_oh": "HGSS Ho-oh Battle", + "battle_legendary_regis_g5": "B2W2 Legendary Titan Battle", + "battle_legendary_regis_g6": "ORAS Legendary Titan Battle", + "battle_legendary_gro_kyo": "ORAS Groudon & Kyogre Battle", + "battle_legendary_rayquaza": "ORAS Rayquaza Battle", + "battle_legendary_deoxys": "ORAS Deoxys Battle", + "battle_legendary_lake_trio": "ORAS Lake Guardians Battle", + "battle_legendary_sinnoh": "ORAS Sinnoh Legendary Battle", + "battle_legendary_dia_pal": "ORAS Dialga & Palkia Battle", + "battle_legendary_origin_forme": "LA Origin Dialga & Palkia Battle", + "battle_legendary_giratina": "ORAS Giratina Battle", + "battle_legendary_arceus": "HGSS Arceus Battle", + "battle_legendary_unova": "BW Unova Legendary Battle", + "battle_legendary_kyurem": "BW Kyurem Battle", + "battle_legendary_res_zek": "BW Reshiram & Zekrom Battle", + "battle_legendary_xern_yvel": "XY Xerneas & Yveltal Battle", + "battle_legendary_tapu": "SM Tapu Battle", + "battle_legendary_sol_lun": "SM Solgaleo & Lunala Battle", + "battle_legendary_ub": "SM Ultra Beast Battle", + "battle_legendary_dusk_dawn": "USUM Dusk Mane & Dawn Wings Necrozma Battle", + "battle_legendary_ultra_nec": "USUM Ultra Necrozma Battle", + "battle_legendary_zac_zam": "SWSH Zacian & Zamazenta Battle", + "battle_legendary_glas_spec": "SWSH Glastrier & Spectrier Battle", + "battle_legendary_calyrex": "SWSH Calyrex Battle", + "battle_legendary_riders": "SWSH Ice & Shadow Rider Calyrex Battle", + "battle_legendary_birds_galar": "SWSH Galarian Legendary Birds Battle", + "battle_legendary_ruinous": "SV Treasures of Ruin Battle", + "battle_legendary_kor_mir": "SV Depths of Area Zero Battle", + "battle_legendary_loyal_three": "SV Loyal Three Battle", + "battle_legendary_ogerpon": "SV Ogerpon Battle", + "battle_legendary_terapagos": "SV Terapagos Battle", + "battle_legendary_pecharunt": "SV Pecharunt Battle", + "battle_rival": "BW Rival Battle", + "battle_rival_2": "BW N Battle", + "battle_rival_3": "BW Final N Battle", + "battle_trainer": "BW Trainer Battle", + "battle_wild": "BW Wild Battle", + "battle_wild_strong": "BW Strong Wild Battle", + "end_summit": "PMD RTDX Sky Tower Summit", + "battle_rocket_grunt": "HGSS Team Rocket Battle", + "battle_aqua_magma_grunt": "ORAS Team Aqua & Magma Battle", + "battle_galactic_grunt": "BDSP Team Galactic Battle", + "battle_plasma_grunt": "BW Team Plasma Battle", + "battle_flare_grunt": "XY Team Flare Battle", + "battle_aether_grunt": "SM Aether Foundation Battle", + "battle_skull_grunt": "SM Team Skull Battle", + "battle_macro_grunt": "SWSH Trainer Battle", + "battle_galactic_admin": "BDSP Team Galactic Admin Battle", + "battle_skull_admin": "SM Team Skull Admin Battle", + "battle_oleana": "SWSH Oleana Battle", + "battle_rocket_boss": "USUM Giovanni Battle", + "battle_aqua_magma_boss": "ORAS Archie & Maxie Battle", + "battle_galactic_boss": "BDSP Cyrus Battle", + "battle_plasma_boss": "B2W2 Ghetsis Battle", + "battle_flare_boss": "XY Lysandre Battle", + "battle_aether_boss": "SM Lusamine Battle", + "battle_skull_boss": "SM Guzma Battle", + "battle_macro_boss": "SWSH Rose Battle", + + "abyss": "PMD EoS Dark Crater", + "badlands": "PMD EoS Barren Valley", + "beach": "PMD EoS Drenched Bluff", + "cave": "PMD EoS Sky Peak Cave", + "construction_site": "PMD EoS Boulder Quarry", + "desert": "PMD EoS Northern Desert", + "dojo": "PMD EoS Marowak Dojo", + "end": "PMD RTDX Sky Tower", + "factory": "PMD EoS Concealed Ruins", + "fairy_cave": "PMD EoS Star Cave", + "forest": "PMD EoS Dusk Forest", + "grass": "PMD EoS Apple Woods", + "graveyard": "PMD EoS Mystifying Forest", + "ice_cave": "PMD EoS Vast Ice Mountain", + "island": "PMD EoS Craggy Coast", + "jungle": "Lmz - Jungle", + "laboratory": "Firel - Laboratory", + "lake": "PMD EoS Crystal Cave", + "meadow": "PMD EoS Sky Peak Forest", + "metropolis": "Firel - Metropolis", + "mountain": "PMD EoS Mt. Horn", + "plains": "PMD EoS Sky Peak Prairie", + "power_plant": "PMD EoS Far Amp Plains", + "ruins": "PMD EoS Deep Sealed Ruin", + "sea": "Andr06 - Marine Mystique", + "seabed": "Firel - Seabed", + "slum": "Andr06 - Sneaky Snom", + "snowy_forest": "PMD EoS Sky Peak Snowfield", + "space": "Firel - Aether", + "swamp": "PMD EoS Surrounded Sea", + "tall_grass": "PMD EoS Foggy Forest", + "temple": "PMD EoS Aegis Cave", + "town": "PMD EoS Random Dungeon Theme 3", + "volcano": "PMD EoS Steam Cave", + "wasteland": "PMD EoS Hidden Highland", + "encounter_ace_trainer": "BW Trainers' Eyes Meet (Ace Trainer)", + "encounter_backpacker": "BW Trainers' Eyes Meet (Backpacker)", + "encounter_clerk": "BW Trainers' Eyes Meet (Clerk)", + "encounter_cyclist": "BW Trainers' Eyes Meet (Cyclist)", + "encounter_lass": "BW Trainers' Eyes Meet (Lass)", + "encounter_parasol_lady": "BW Trainers' Eyes Meet (Parasol Lady)", + "encounter_pokefan": "BW Trainers' Eyes Meet (Poke Fan)", + "encounter_psychic": "BW Trainers' Eyes Meet (Psychic)", + "encounter_rich": "BW Trainers' Eyes Meet (Gentleman)", + "encounter_rival": "BW Cheren", + "encounter_roughneck": "BW Trainers' Eyes Meet (Roughneck)", + "encounter_scientist": "BW Trainers' Eyes Meet (Scientist)", + "encounter_twins": "BW Trainers' Eyes Meet (Twins)", + "encounter_youngster": "BW Trainers' Eyes Meet (Youngster)", + "heal": "BW Pokémon Heal", + "menu": "PMD EoS Welcome to the World of Pokémon!", + "title": "PMD EoS Top Menu Theme" +} diff --git a/src/locales/ja/challenges.json b/src/locales/ja/challenges.json index 99c6e978d49..d137df14086 100644 --- a/src/locales/ja/challenges.json +++ b/src/locales/ja/challenges.json @@ -1,5 +1,5 @@ { - "title": "チャレンジを 設定", + "title": "チャレンジの設定", "illegalEvolution": "{{pokemon}}は このチャレンジで\n対象外の ポケモンに なってしまった!", "singleGeneration": { "name": "単一世代", diff --git a/src/locales/ja/common.json b/src/locales/ja/common.json index 9e26dfeeb6e..d10e3e42c70 100644 --- a/src/locales/ja/common.json +++ b/src/locales/ja/common.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "start": "スタート", + "luckIndicator": "運:", + "shinyOnHover": "色違い", + "commonShiny": "ふつう", + "rareShiny": "レア", + "epicShiny": "超レア" +} diff --git a/src/locales/ja/dialogue-double-battle.json b/src/locales/ja/dialogue-double-battle.json index 9e26dfeeb6e..b2632f3b990 100644 --- a/src/locales/ja/dialogue-double-battle.json +++ b/src/locales/ja/dialogue-double-battle.json @@ -1 +1,84 @@ -{} \ No newline at end of file +{ + "blue_red_double": { + "encounter": { + "1": "Blue: Hey Red, let's show them what we're made of!\n$Red: ...\n$Blue: This is Pallet Town Power!" + }, + "victory": { + "1": "Blue: That was a great battle!\n$Red: ..." + } + }, + "red_blue_double": { + "encounter": { + "1": "Red: ...!\n$Blue: He never talks much.\n$Blue: But dont let that fool you! He is a champ after all!" + }, + "victory": { + "1": "Red: ...!\n$Blue: Next time we will beat you!" + } + }, + "tate_liza_double": { + "encounter": { + "1": "Tate: Are you surprised?\n$Liza: We are two gym leaders at once!\n$Tate: We are twins!\n$Liza: We dont need to talk to understand each other!\n$Tate: Twice the power...\n$Liza: Can you handle it?" + }, + "victory": { + "1": "Tate: What? Our combination was perfect!\n$Liza: Looks like we need to train more..." + } + }, + "liza_tate_double": { + "encounter": { + "1": "Liza: Hihihi... Are you surprised?\n$Tate: Yes, we are really two gym leaders at once!\n$Liza: This is my twin brother Tate!\n$Tate: And this is my twin sister Liza!\n$Liza: Don't you think we are a perfect combination?" + }, + "victory": { + "1": "Liza: Are we...\n$Tate: ...not as strong as we thought?" + } + }, + "wallace_steven_double": { + "encounter": { + "1": "Steven: Wallace, let's show them the power of the champions!\n$Wallace: We will show you the power of Hoenn!\n$Steven: Let's go!" + }, + "victory": { + "1": "Steven: That was a great battle!\n$Wallace: We will win next time!" + } + }, + "steven_wallace_double": { + "encounter": { + "1": "Steven: Do you have any rare Pokémon?\n$Wallace: Steven... We are here for a battle, not to show off our Pokémon.\n$Steven: Oh... I see... Let's go then!" + }, + "victory": { + "1": "Steven: Now that we are done with the battle, let's show off our Pokémon!\n$Wallace: Steven..." + } + }, + "alder_iris_double": { + "encounter": { + "1": "Alder: We are the strongest trainers in Unova!\n$Iris: Fights against strong trainers are the best!" + }, + "victory": { + "1": "Alder: Wow! You are super strong!\n$Iris: We will win next time!" + } + }, + "iris_alder_double": { + "encounter": { + "1": "Iris: Welcome Challenger! I am THE Unova Champion!\n$Alder: Iris, aren't you a bit too excited?", + "1_female": "Iris: Welcome Challenger! I am THE Unova Champion!\n$Alder: Iris, aren't you a bit too excited?" + }, + "victory": { + "1": "Iris: A loss like this is not easy to take...\n$Alder: But we will only get stronger with every loss!" + } + }, + "piers_marnie_double": { + "encounter": { + "1": "Marnie: Brother, let's show them the power of Spikemuth!\n$Piers: We bring darkness!" + }, + "victory": { + "1": "Marnie: You brought light to our darkness!\n$Piers: Its too bright..." + } + }, + "marnie_piers_double": { + "encounter": { + "1": "Piers: Ready for a concert?\n$Marnie: Brother... They are here to fight, not to sing...", + "1_female": "Piers: Ready for a concert?\n$Marnie: Brother... They are here to fight, not to sing..." + }, + "victory": { + "1": "Piers: Now that was a great concert!\n$Marnie: Brother..." + } + } +} diff --git a/src/locales/ja/dialogue-final-boss.json b/src/locales/ja/dialogue-final-boss.json index 9e26dfeeb6e..f20d0f013d1 100644 --- a/src/locales/ja/dialogue-final-boss.json +++ b/src/locales/ja/dialogue-final-boss.json @@ -1 +1,10 @@ -{} \ No newline at end of file +{ + "encounter": "It appears the time has finally come once again.\nYou know why you have come here, do you not?\n$You were drawn here, because you have been here before.\nCountless times.\n$Though, perhaps it can be counted.\nTo be precise, this is in fact your {{cycleCount}} cycle.\n$Each cycle your mind reverts to its former state.\nEven so, somehow, remnants of your former selves remain.\n$Until now you have yet to succeed, but I sense a different presence in you this time.\n\n$You are the only one here, though it is as if there is… another.\n$Will you finally prove a formidable challenge to me?\nThe challenge I have longed after for millennia?\n$We begin.", + "encounter_female": "It appears the time has finally come once again.\nYou know why you have come here, do you not?\n$You were drawn here, because you have been here before.\nCountless times.\n$Though, perhaps it can be counted.\nTo be precise, this is in fact your {{cycleCount}} cycle.\n$Each cycle your mind reverts to its former state.\nEven so, somehow, remnants of your former selves remain.\n$Until now you have yet to succeed, but I sense a different presence in you this time.\n\n$You are the only one here, though it is as if there is… another.\n$Will you finally prove a formidable challenge to me?\nThe challenge I have longed after for millennia?\n$We begin.", + "firstStageWin": "I see. The presence I felt was indeed real.\nIt appears I no longer need to hold back.\n$Do not disappoint me.", + "secondStageWin": "…Magnificent.", + "key_ordinal_one": "st", + "key_ordinal_two": "nd", + "key_ordinal_few": "rd", + "key_ordinal_other": "th" +} diff --git a/src/locales/ja/dialogue-misc.json b/src/locales/ja/dialogue-misc.json index 9e26dfeeb6e..2f333b5f383 100644 --- a/src/locales/ja/dialogue-misc.json +++ b/src/locales/ja/dialogue-misc.json @@ -1 +1,6 @@ -{} \ No newline at end of file +{ + "ending": "@c{shock}You're back?@d{32} Does that mean…@d{96} you won?!\n@c{smile_ehalf}I should have known you had it in you.\n$@c{smile_eclosed}Of course… I always had that feeling.\n@c{smile}It's over now, right? You ended the loop.\n$@c{smile_ehalf}You fulfilled your dream too, didn't you?\nYou didn't lose even once.\n$I'll be the only one to remember what you did.\n@c{angry_mopen}I'll try not to forget!\n$@c{smile_wave_wink}Just kidding!@d{64} @c{smile}I'd never forget.@d{32}\nYour legend will live on in our hearts.\n$@c{smile_wave}Anyway,@d{64} it's getting late…@d{96} I think?\nIt's hard to tell in this place.\n$Let's go home. @c{smile_wave_wink}Maybe tomorrow, we can have another battle, for old time's sake?", + "ending_female": "@c{smile}Oh? You won?@d{96} @c{smile_eclosed}I guess I should've known.\nBut, you're back now.\n$@c{smile}It's over.@d{64} You ended the loop.\n$@c{serious_smile_fists}You fulfilled your dream too, didn't you?\nYou didn't lose even once.\n$@c{neutral}I'm the only one who'll remember what you did.@d{96}\nI guess that's okay, isn't it?\n$@c{serious_smile_fists}Your legend will always live on in our hearts.\n$@c{smile_eclosed}Anyway, I've had about enough of this place, haven't you? Let's head home.\n$@c{serious_smile_fists}Maybe when we get back, we can have another battle?\nIf you're up to it.", + "ending_endless": "Congratulations on reaching the current end!\nMore content is coming soon.", + "ending_name": "Devs" +} diff --git a/src/locales/ja/dialogue.json b/src/locales/ja/dialogue.json index 9e26dfeeb6e..6130ade1cb4 100644 --- a/src/locales/ja/dialogue.json +++ b/src/locales/ja/dialogue.json @@ -1 +1,2827 @@ -{} \ No newline at end of file +{ + "youngster": { + "encounter": { + "1": "よっ 勝負する?", + "2": "あっ 君も 駆け出し トレーナーだね?", + "2_female": "あっ きみも 駆け出し トレーナーだね?", + "3": "あっ 初めてみる 人! 勝負だ!", + "4": "さっき 負けて 悔しいから ポケモン 探してるんだよ。\nでも 君 弱そうだな…… よしっ! 勝負 しようぜ!", + "4_female": "さっき 負けて 悔しいから ポケモン 探してるんだよ。\nでも 君 弱そうだな…… よしっ! 勝負 しようぜ!", + "5": "お久しぶりかな? 初めましてかな?\n覚えてないけど ヨロシクね!", + "6": "よーし 行くぞー!", + "7": "よっしゃ 行っくぜー!\n僕の パワー 見せてやる!", + "8": "へへへ…… 見せて あげるね!\n僕の ポケモンの すごさを!", + "9": "挨拶 なんて よかよか! いつでも かかってきんしゃい!", + "9_female": "挨拶 なんて よかよか! いつでも かかってきんしゃい!", + "10": "小僧  だからって 油断してると\n君 泣いちゃう かもしれないよー.", + "11": "大事に 育てた ポケモンだぞー!\n絶対 倒しちゃ ダメなんだぞ!", + "12": "よく来たな!\nこっから 先は 一筋縄じゃ いかないぞ!", + "12_female": "よく来たな!\nこっから 先は 一筋縄じゃ いかないぞ!", + "13": "勝負は 続くよ! いつまでも!\n終わりなき 世界へ ようこそ!", + "13_female": "勝負は 続くよ!\nいつまでも! 終わりなき 世界へ ようこそ!" + }, + "victory": { + "1": "スゴッ! 君 強いんだ!", + "1_femal1e": "スゴッ! 君 強いんだ!", + "2": "敵わなかったね?", + "3": "僕 大きくなったら 絶対 君を 倒すよ!", + "4": "ゲッ 戦えるポケモン もう いない…", + "5": "トホ…… トホホーイ……\nまた 負けちゃったよ……", + "5_female": "トホ…… トホホーイ……\nまた 負けちゃったよ……", + "6": "うわー! 負けたー!!", + "7": "すごいな 君の パワーは!\nビックリで ドッキリだよ!", + "8": "そんな…… どうして……\n僕の ポケモンは サイキョー なのに……", + "9": "また バトルして くれよな!\n次は 負けないからな!", + "10": "も~! 僕は 小僧だけ だよ!\nそんな全力で 戦っちゃ ひどいぞ!", + "11": "君の ポケモンの 方が すごい!\n僕のと 交換しておくれよ!", + "12": "さっきは 勢いで 言ったけど\n一筋縄って どんな縄?", + "13": "あはは さすが! さすがだね!\nもう 君も この世界の 住人だ!" + } + }, + "lass": { + "encounter": { + "1": "Let's have a battle, shall we?", + "2": "You look like a new trainer. Let's have a battle!", + "2_female": "You look like a new trainer. Let's have a battle!", + "3": "I don't recognize you. How about a battle?", + "4": "Let's have a fun Pokémon battle!", + "5": "I'll show you the ropes of how to really use Pokémon!", + "6": "A serious battle starts from a serious beginning! Are you sure you're ready?", + "6_female": "A serious battle starts from a serious beginning! Are you sure you're ready?", + "7": "You're only young once. And you only get one shot at a given battle. Soon, you'll be nothing but a memory.", + "8": "You'd better go easy on me, OK? Though I'll be seriously fighting!", + "9": "School is boring. I've got nothing to do. Yawn. I'm only battling to kill the time." + }, + "victory": { + "1": "That was impressive! I've got a lot to learn.", + "2": "I didn't think you'd beat me that bad…", + "2_female": "I didn't think you'd beat me that bad…", + "3": "I hope we get to have a rematch some day.", + "4": "That was pretty amazingly fun! You've totally exhausted me…", + "5": "You actually taught me a lesson! You're pretty amazing!", + "6": "Seriously, I lost. That is, like, seriously depressing, but you were seriously cool.", + "6_female": "Seriously, I lost. That is, like, seriously depressing, but you were seriously cool.", + "7": "I don't need memories like this. Deleting memory…", + "8": "Hey! I told you to go easy on me! Still, you're pretty cool when you're serious.", + "8_female": "Hey! I told you to go easy on me! Still, you're pretty cool when you're serious.", + "9": "I'm actually getting tired of battling… There's gotta be something new to do…" + } + }, + "breeder": { + "encounter": { + "1": "Obedient Pokémon, selfish Pokémon… Pokémon have unique characteristics.", + "2": "Even though my upbringing and behavior are poor, I've raised my Pokémon well.", + "3": "Hmm, do you discipline your Pokémon? Pampering them too much is no good." + }, + "victory": { + "1": "It is important to nurture and train each Pokémon's characteristics.", + "2": "Unlike my diabolical self, these are some good Pokémon.", + "3": "Too much praise can spoil both Pokémon and people." + }, + "defeat": { + "1": "You should not get angry at your Pokémon, even if you lose a battle.", + "2": "Right? Pretty good Pokémon, huh? I'm suited to raising things.", + "3": "No matter how much you love your Pokémon, you still have to discipline them when they misbehave." + } + }, + "breeder_female": { + "encounter": { + "1": "Pokémon never betray you. They return all the love you give them.", + "2": "Shall I give you a tip for training good Pokémon?", + "3": "I have raised these very special Pokémon using a special method." + }, + "victory": { + "1": "Ugh… It wasn't supposed to be like this. Did I administer the wrong blend?", + "2": "How could that happen to my Pokémon… What are you feeding your Pokémon?", + "3": "If I lose, that tells you I was just killing time. It doesn't damage my ego at all." + }, + "defeat": { + "1": "This proves my Pokémon have accepted my love.", + "2": "The real trick behind training good Pokémon is catching good Pokémon.", + "3": "Pokémon will be strong or weak depending on how you raise them." + } + }, + "fisherman": { + "encounter": { + "1": "Aack! You made me lose a bite!\nWhat are you going to do about it?", + "2": "Go away! You're scaring the Pokémon!", + "3": "Let's see if you can reel in a victory!" + }, + "victory": { + "1": "Just forget about it.", + "2": "Next time, I'll be reelin' in the triumph!", + "3": "Guess I underestimated the currents this time." + } + }, + "fisherman_female": { + "encounter": { + "1": "Woah! I've hooked a big one!", + "2": "Line's in, ready to reel in success!", + "3": "Ready to make waves!" + }, + "victory": { + "1": "I'll be back with a stronger hook.", + "2": "I'll reel in victory next time.", + "3": "I'm just sharpening my hooks for the comeback!" + } + }, + "swimmer": { + "encounter": { + "1": "Time to dive in!", + "2": "Let's ride the waves of victory!", + "3": "Ready to make a splash!" + }, + "victory": { + "1": "Drenched in defeat!", + "2": "A wave of defeat!", + "3": "Back to shore, I guess." + } + }, + "backpacker": { + "encounter": { + "1": "Pack up, game on!", + "2": "Let's see if you can keep pace!", + "3": "Gear up, challenger!", + "4": "I've spent 20 years trying to find myself… But where am I?" + }, + "victory": { + "1": "Tripped up this time!", + "2": "Oh, I think I'm lost.", + "3": "Dead end!", + "4": "Wait up a second! Hey! Don't you know who I am?" + } + }, + "ace_trainer": { + "encounter": { + "1": "You seem quite confident.", + "1_female": "You seem quite confident.", + "2": "Your Pokémon… Show them to me…", + "3": "Because I'm an Ace Trainer, people think I'm strong.", + "4": "Are you aware of what it takes to be an Ace Trainer?" + }, + "victory": { + "1": "Yes… You have good Pokémon…", + "2": "What?! But I'm a battling genius!", + "3": "Of course, you are the main character!", + "3_female": "Of course, you are the main character!", + "4": "OK! OK! You could be an Ace Trainer!", + "4_female": "OK! OK! You could be an Ace Trainer!" + }, + "defeat": { + "1": "I am devoting my body and soul to Pokémon battles!", + "2": "All within my expectations… Nothing to be surprised about…", + "3": "I thought I'd grow up to be a frail person who looked like they would break if you squeezed them too hard.", + "4": "Of course I'm strong and don't lose. It's important that I win gracefully." + } + }, + "parasol_lady": { + "encounter": { + "1": "Time to grace the battlefield with elegance and poise!" + }, + "victory": { + "1": "My elegance remains unbroken!" + } + }, + "twins": { + "encounter": { + "1": "Get ready, because when we team up, it's double the trouble!", + "2": "Two hearts, one strategy – let's see if you can keep up with our twin power!", + "3": "Hope you're ready for double trouble, because we're about to bring the heat!", + "3_female": "Hope you're ready for double trouble, because we're about to bring the heat!" + }, + "victory": { + "1": "We may have lost this round, but our bond remains unbreakable!", + "2": "Our twin spirit won't be dimmed for long.", + "3": "We'll come back stronger as a dynamic duo!" + }, + "defeat": { + "1": "Twin power reigns supreme!", + "2": "Two hearts, one triumph!", + "3": "Double the smiles, double the victory dance!" + } + }, + "cyclist": { + "encounter": { + "1": "Get ready to eat my dust!", + "2": "Gear up, challenger! I'm about to leave you in the dust!", + "3": "Pedal to the metal, let's see if you can keep pace!" + }, + "victory": { + "1": "Spokes may be still, but determination pedals on.", + "2": "Outpaced!", + "3": "The road to victory has many twists and turns yet to explore." + } + }, + "black_belt": { + "encounter": { + "1": "I praise your courage in challenging me! For I am the one with the strongest kick!", + "2": "Oh, I see. Would you like to be cut to pieces? Or do you prefer the role of punching bag?", + "2_female": "Oh, I see. Would you like to be cut to pieces? Or do you prefer the role of punching bag?" + }, + "victory": { + "1": "Oh. The Pokémon did the fighting. My strong kick didn't help a bit.", + "2": "Hmmm… If I was going to lose anyway, I was hoping to get totally messed up in the process." + } + }, + "battle_girl": { + "encounter": { + "1": "You don't have to try to impress me. You can lose against me." + }, + "victory": { + "1": "It's hard to say good-bye, but we are running out of time…" + } + }, + "hiker": { + "encounter": { + "1": "My middle-age spread has given me as much gravitas as the mountains I hike!", + "2": "I inherited this big-boned body from my parents… I'm like a living mountain range…" + }, + "victory": { + "1": "At least I cannot lose when it comes to BMI!", + "2": "It's not enough… It's never enough. My bad cholesterol isn't high enough…" + } + }, + "ranger": { + "encounter": { + "1": "When I am surrounded by nature, most other things cease to matter.", + "2": "When I'm living without nature in my life, sometimes I'll suddenly feel an anxiety attack coming on." + }, + "victory": { + "1": "It doesn't matter to the vastness of nature whether I win or lose…", + "2": "Something like this is pretty trivial compared to the stifling feelings of city life." + }, + "defeat": { + "1": "I won the battle. But victory is nothing compared to the vastness of nature…", + "2": "I'm sure how you feel is not so bad if you compare it to my anxiety attacks…" + } + }, + "scientist": { + "encounter": { + "1": "My research will lead this world to peace and joy." + }, + "victory": { + "1": "I am a genius… I am not supposed to lose against someone like you…" + } + }, + "school_kid": { + "encounter": { + "1": "…Heehee. I'm confident in my calculations and analysis.", + "2": "I'm gaining as much experience as I can because I want to be a Gym Leader someday." + }, + "victory": { + "1": "Ohhhh… Calculation and analysis are perhaps no match for chance…", + "2": "Even difficult, trying experiences have their purpose, I suppose." + } + }, + "artist": { + "encounter": { + "1": "I used to be popular, but now I am all washed up." + }, + "victory": { + "1": "As times change, values also change. I realized that too late." + } + }, + "guitarist": { + "encounter": { + "1": "Get ready to feel the rhythm of defeat as I strum my way to victory!" + }, + "victory": { + "1": "Silenced for now, but my melody of resilience will play on." + } + }, + "worker": { + "encounter": { + "1": "It bothers me that people always misunderstand me. I'm a lot more pure than everyone thinks." + }, + "victory": { + "1": "I really don't want my skin to burn, so I want to stay in the shade while I work." + } + }, + "worker_female": { + "encounter": { + "1": "It bothers me that people always misunderstand me.\n$I'm a lot more pure than everyone thinks." + }, + "victory": { + "1": "I really don't want my skin to burn, so I want to stay in the shade while I work." + }, + "defeat": { + "1": "My body and mind aren't necessarily always in sync." + } + }, + "worker_double": { + "encounter": { + "1": "I'll show you we can break you. We've been training in the field!" + }, + "victory": { + "1": "How strange… How could this be… I shouldn't have been outmuscled." + } + }, + "hex_maniac": { + "encounter": { + "1": "I normally only ever listen to classical music, but if I lose, I think I shall try a bit of new age!", + "2": "I grow stronger with each tear I cry." + }, + "victory": { + "1": "Is this the dawning of the age of Aquarius?", + "2": "Now I can get even stronger. I grow with every grudge." + }, + "defeat": { + "1": "New age simply refers to twentieth century classical composers, right?", + "2": "Don't get hung up on sadness or frustration. You can use your grudges to motivate yourself.", + "2_female": "Don't get hung up on sadness or frustration. You can use your grudges to motivate yourself." + } + }, + "psychic": { + "encounter": { + "1": "Hi! Focus!" + }, + "victory": { + "1": "Eeeeek!" + } + }, + "officer": { + "encounter": { + "1": "Brace yourself, because justice is about to be served!", + "2": "Ready to uphold the law and serve justice on the battlefield!" + }, + "victory": { + "1": "The weight of justice feels heavier than ever…", + "2": "The shadows of defeat linger in the precinct." + } + }, + "beauty": { + "encounter": { + "1": "My last ever battle… That's the way I'd like us to view this match…" + }, + "victory": { + "1": "It's been fun… Let's have another last battle again someday…" + } + }, + "baker": { + "encounter": { + "1": "Hope you're ready to taste defeat!", + "1_female": "Hope you're ready to taste defeat!" + }, + "victory": { + "1": "I'll bake a comeback." + } + }, + "biker": { + "encounter": { + "1": "Time to rev up and leave you in the dust!" + }, + "victory": { + "1": "I'll tune up for the next race." + } + }, + "firebreather": { + "encounter": { + "1": "My flames shall devour you!", + "2": "My soul is on fire. I'll show you how hot it burns!", + "3": "Step right up and take a look!" + }, + "victory": { + "1": "I burned down to ashes...", + "2": "Yow! That's hot!", + "3": "Ow! I scorched the tip of my nose!" + } + }, + "sailor": { + "encounter": { + "1": "Matey, you're walking the plank if you lose!", + "2": "Come on then! My sailor's pride is at stake!", + "3": "Ahoy there! Are you seasick?", + "3_female": "Ahoy there! Are you seasick?" + }, + "victory": { + "1": "Argh! Beaten by a kid!", + "2": "Your spirit sank me!", + "3": "I think it's me that's seasick..." + } + }, + "archer": { + "encounter": { + "1": "Before you go any further, let's see how you fare against us, Team Rocket!", + "2": "I have received reports that your skills are not insignificant. Let's see if they are true.", + "3": "I am Archer, an Admin of Team Rocket. And I do not go easy on enemies of our organization." + }, + "victory": { + "1": "What a blunder!", + "2": "With my current skills, I was not up to the task after all.", + "3": "F-forgive me, Giovanni... For me to be defeated by a mere trainer..." + } + }, + "ariana": { + "encounter": { + "1": "Hold it right there! We can't someone on the loose.\n$It's harmful to Team Rocket's pride, you see.", + "2": "I don't know or care if what I'm doing is right or wrong...\n$I just put my faith in Giovanni and do as I am told", + "3": "Your trip ends here. I'm going to take you down!" + }, + "victory": { + "1": "Tch, you really are strong. It's too bad.\n$If you were to join Team Rocket, you could become an Executive.", + "1_female": "Tch, you really are strong. It's too bad.\n$If you were to join Team Rocket, you could become an Executive.", + "2": "I... I'm shattered...", + "3": "Aaaieeeee! This can't be happening! I fought hard, but I still lost…" + } + }, + "proton": { + "encounter": { + "1": "What do you want? If you interrupt our work, don't expect any mercy!", + "2": "What do we have here? I am often labeled as the scariest and cruelest guy in Team Rocket…\n$I strongly urge you not to interfere with our business!", + "3": "I am Proton, an Admin of Team Rocket. I am here to put an end to your meddling!" + }, + "victory": { + "1": "The fortress came down!", + "2": "You may have won this time… But all you did was make Team Rocket's wrath grow…", + "3": "I am defeated… But I will not forget this!" + } + }, + "petrel": { + "encounter": { + "1": "Muhahaha, we've been waiting for you. Me? You don't know who I am? It is me, Giovanni.\n$The majestic Giovanni himself! Wahahaha! …Huh? I don't sound anything like Giovanni?\n$I don't even look like Giovanni? How come? I've worked so hard to mimic him!", + "2": "I am Petrel, an Admin of Team Rocket. I will not allow you to interfere with our plans!", + "3": "Rocket Executive Petrel will deal with this intruder!" + }, + "victory": { + "1": "OK, OK. I'll tell you where he is.", + "2": "I… I couldn't do a thing… Giovanni, please forgive me…", + "3": "No, I can't let this affect me. I have to inform the others…" + } + }, + "tabitha": { + "encounter": { + "1": "Hehehe! So you've come all the way here! But you're too late!", + "2": "Hehehe... Got here already, did you? We underestimated you! But this is it! \n$I'm a cut above the Grunts you've seen so far. I'm not stalling for time.\n$I'm going to pulverize you!", + "3": "I'm going to give you a little taste of pain! Resign yourself to it!" + }, + "victory": { + "1": "Hehehe! You might have beaten me, but you don't stand a chance against the boss!\n$If you get lost now, you won't have to face a sound whipping!", + "2": "Hehehe... So, I lost, too...", + "3": "Ahya! How could this be? For an Admin like me to lose to some random trainer...", + "3_female": "Ahya! How could this be? For an Admin like me to lose to some random trainer..." + } + }, + "courtney": { + "encounter": { + "1": "Don't. Get. In. My. Way.", + "2": "You... ...I want to...analyze. Ahahaha", + "3": "... Well then...Deleting..." + }, + "victory": { + "1": "Hah hah... Uhn...hah hah...", + "2": "As anticipated. Unanticipated. You. Target lock...completed.\n$Commencing...experiment. You. Forever. Aha... ♪", + "3": "That's unanticipated. ...I knew it. You...are interesting! ...Haha. ♪" + } + }, + "shelly": { + "encounter": { + "1": "Ahahahaha! You're going to meddle in Team Aqua's affairs?\n$You're either absolutely fearless, simply ignorant, or both!\n$You're so cute, you're disgusting! I'll put you down", + "2": "What's this? Who's this spoiled brat?", + "3": "Cool your jets. Be patient. I'll crush you shortly.", + "3_female": "Cool your jets. Be patient. I'll crush you shortly." + }, + "victory": { + "1": "Ahahahaha! We got meddled with unexpectedly! We're out of options.\n$We'll have to pull out. But this isn't the last you'll see of Team Aqua!\n$We have other plans! Don't you forget it!", + "2": "Ahhh?! Did I go too easy on you?!", + "3": "Uh. Are you telling me you've upped your game even more during the fight?\n$You're a brat with a bright future… My Pokémon and I don't have any strength left to fight…\n$Go on… Go and be destroyed by Archie.", + "3_female": "Uh. Are you telling me you've upped your game even more during the fight?\n$You're a brat with a bright future… My Pokémon and I don't have any strength left to fight…\n$Go on… Go and be destroyed by Archie." + } + }, + "matt": { + "encounter": { + "1": "All right then, until the boss has time for you, I'll be your opponent!", + "2": "Hooah! Full on! I'm burning up! Well! Welll! Wellllll! Let's battle it out until we've got nothing left!", + "3": "Hoo hah! I'm gonna smash you up!" + }, + "victory": { + "1": "Muwuhahaha! That battle was fun even though I lost!", + "2": "I can feel it! I can feel it, all right! The strength coming offa you!\n$More! I still want more! But looks like we're outta time...", + "3": "Oho! That's a loss I can be proud of!", + "3_female": "Oho! That's a loss I can be proud of!" + } + }, + "mars": { + "encounter": { + "1": "I'm Mars, one of Team Galactic's top Commanders.", + "2": "Team Galactic's vision for the future is unwavering. Opposition will be crushed without mercy!", + "3": "Feeling nervous? You should be!", + "3_female": "Feeling nervous? You should be!" + }, + "victory": { + "1": "This can't be happening! How did I lose?!", + "2": "You have some skill, I'll give you that.", + "3": "Defeated... This was a costly mistake." + } + }, + "jupiter": { + "encounter": { + "1": "Jupiter, Commander of Team Galactic, at your service.", + "2": "Resistance is futile. Team Galactic will prevail!", + "3": "You're trembling... scared already?" + }, + "victory": { + "1": "No way... I lost?!", + "2": "Impressive, you've got guts!", + "3": "Losing like this... How embarrassing." + } + }, + "saturn": { + "encounter": { + "1": "I am Saturn, Commander of Team Galactic.", + "2": "Our mission is absolute. Any hindrance will be obliterated!", + "3": "Is that fear I see in your eyes?" + }, + "victory": { + "1": "Impossible... Defeated by you?!", + "2": "You have proven yourself a worthy adversary.", + "3": "Bestowed in defeat... This is unacceptable." + } + }, + "zinzolin": { + "encounter": { + "1": "You could become a threat to Team Plasma, so we will eliminate you here and now!", + "1_female": "You could become a threat to Team Plasma, so we will eliminate you here and now!", + "2": "You don't have the sense to know when to quit, it seems. It's an act of mercy on my part to bring an end to this now!", + "3": "You're an impressive Trainer to have made it this far. But it ends here.", + "3_female": "You're an impressive Trainer to have made it this far. But it ends here." + }, + "victory": { + "1": "Ghetsis... I have failed you...", + "2": "It's bitter cold. I'm shivering. I'm suffering. Yet, we will stand victorious.", + "3": "Hmph. You're a smarter Trainer than I expected, but not smart enough.", + "3_female": "Hmph. You're a smarter Trainer than I expected, but not smart enough." + } + }, + "rood": { + "encounter": { + "1": "You are a threat to Team Plasma. We cannot let you walk away from here and now!", + "1_female": "You are a threat to Team Plasma. We cannot let you walk away from here and now!", + "2": "It seems you don't know when to give up. I'll make sure no one interferes with our plans!", + "3": "You are a remarkable Trainer to have made it this far. But this is where it ends.", + "3_female": "You are a remarkable Trainer to have made it this far. But this is where it ends." + }, + "victory": { + "1": "Ghetsis... I have failed my mission...", + "2": "The cold is piercing. I'm shivering. I'm suffering. Yet, we will stand triumphant.", + "3": "Hm. You are a talented Trainer, but unfortunately not talented enough." + } + }, + "xerosic": { + "encounter": { + "1": "Ah ha ha! It would be my pleasure. Come on, little Trainer! Let's see what you've got!", + "1_female": "Ah ha ha! It would be my pleasure. Come on, little Trainer! Let's see what you've got!", + "2": "Hmm... You're more powerful than you look. I wonder how much energy there is inside you.", + "2_female": "Hmm... You're more powerful than you look. I wonder how much energy there is inside you.", + "3": "I've been waiting for you! I need to do a little research on you! Come, let us begin!" + }, + "victory": { + "1": "Ah, you're quite strong. Oh yes—very strong, indeed.", + "2": "Ding-ding-ding! You did it! To the victor go the spoils!", + "2_female": "Ding-ding-ding! You did it! To the victor go the spoils!", + "3": "Wonderful! Amazing! You have tremendous skill and bravery!" + } + }, + "bryony": { + "encounter": { + "1": "I am Bryony, and it would be my pleasure to battle you. Show me what you've got.", + "2": "Impressive... You're more powerful than you appear. Let's see the true extent of your energy.", + "2_female": "Impressive... You're more powerful than you appear. Let's see the true extent of your energy.", + "3": "I've anticipated your arrival. It's time for a little test. Shall we begin?" + }, + "victory": { + "1": "You're quite strong. Oh yes—very strong, indeed.", + "2": "Ding-ding-ding! You've done well. Victory is yours.", + "3": "Wonderful! Remarkable! Your skill and bravery are commendable." + } + }, + "rocket_grunt": { + "encounter": { + "1": "Prepare for trouble!", + "2": "We're pulling a big job here! Get lost, kid!", + "2_female": "We're pulling a big job here! Get lost, kid!", + "3": "Hand over your Pokémon, or face the wrath of Team Rocket!", + "4": "You're about to experience the true terror of Team Rocket!", + "5": "Hey, kid! Me am a Team Rocket member kind of guy!", + "5_female": "Hey, kid! Me am a Team Rocket member kind of guy!" + }, + "victory": { + "1": "Team Rocket blasting off again!", + "2": "Oh no! I dropped the Lift Key!", + "3": "I blew it!", + "4": "My associates won't stand for this!", + "5": "You say what? Team Rocket bye-bye a go-go? Broken it is says you?" + } + }, + "magma_grunt": { + "encounter": { + "1": "If you get in the way of Team Magma, don’t expect any mercy!", + "2": "You'd better not interfere with our plans! We're making the world a better place!", + "3": "You're in the way! Team Magma has no time for kids like you!", + "4": "I hope you brought marshmallows because things are about to heat up!", + "5": "We're going to use the power of a volcano! It's gonna be... explosive! Get it? Heh heh!" + }, + "victory": { + "1": "Huh? I lost?!", + "2": "I can't believe I lost! I even skipped lunch for this", + "3": "No way! You're just a kid!", + "3_female": "No way! You're just a kid!", + "4": "Urrrgh... I should've ducked into our hideout right away...", + "5": "You beat me... Do you think the boss will dock my pay for this?" + } + }, + "aqua_grunt": { + "encounter": { + "1": "No one who crosses Team Aqua gets any mercy, not even kids!", + "2": "Grrr... You've got some nerve meddling with Team Aqua!", + "3": "You're about to get soaked! And not just from my water Pokémon!", + "4": "We, Team Aqua, exist for the good of all!", + "5": "Prepare to be washed away by the tides of my... uh, Pokémon! Yeah, my Pokémon!" + }, + "victory": { + "1": "You're kidding me!", + "2": "Arrgh, I didn't count on being meddled with by some meddling kid!", + "3": "I lost?! Guess I'll have to swim back to the hideout now...", + "4": "Oh, man, what a disaster... The boss is going to be furious...", + "5": "You beat me... Do you think the boss will make me walk the plank for this?" + } + }, + "galactic_grunt": { + "encounter": { + "1": "Don't mess with Team Galactic!", + "2": "Witness the power of our technology and the future we envision!", + "3": "In the name of Team Galactic, I'll eliminate anyone who stands in our way!", + "4": "Get ready to lose!", + "5": "Hope you're ready for a cosmic beatdown!", + "5_female": "Hope you're ready for a cosmic beatdown!" + }, + "victory": { + "1": "Shut down...", + "2": "This setback means nothing in the grand scheme.", + "3": "Our plans are bigger than this defeat.", + "4": "How?!", + "5": "Note to self: practice Pokémon battling, ASAP." + } + }, + "plasma_grunt": { + "encounter": { + "1": "We won't tolerate people who have different ideas!", + "2": "If I win against you, release your Pokémon!", + "3": "If you get in the way of Team Plasma, I'll take care of you!", + "4": "Team Plasma will liberate Pokémon from selfish humans like you!", + "5": "Our hairstyles are out of this world... but our battling skills? You'll find out soon enough." + }, + "victory": { + "1": "Plasmaaaaaaaaa!", + "2": "How could I lose...", + "3": "...What a weak Pokémon, I'll just have to go steal some better ones!", + "4": "Great plans are always interrupted.", + "5": "This is bad... Badbadbadbadbadbadbad! Bad for Team Plasma! Or Plasbad, for short!" + } + }, + "flare_grunt": { + "encounter": { + "1": "Your Pokémon are no match for the elegance of Team Flare.", + "2": "Hope you brought your sunglasses, because things are about to get bright!", + "2_female": "Hope you brought your sunglasses, because things are about to get bright!", + "3": "Team Flare will cleanse the world of imperfection!", + "4": "Prepare to face the brilliance of Team Flare!", + "5": "Fashion is most important to us!" + }, + "victory": { + "1": "The future doesn't look bright for me.", + "2": "Perhaps there's more to battling than I thought. Back to the drawing board.", + "3": "Gahh?! I lost?!", + "4": "Even in defeat, Team Flare's elegance shines through.", + "5": "You may have beaten me, but when I lose, I go out in style!" + } + }, + "aether_grunt": { + "encounter": { + "1": "I'll fight you with all I have to wipe you out!", + "2": "I don't care if you're a kid or what. I'll send you flying if you threaten us!", + "2_female": "I don't care if you're a kid or what. I'll send you flying if you threaten us!", + "3": "I was told to turn away Trainers, whomever they might be!", + "4": "I'll show you the power of Aether Paradise!", + "5": "Now that you've learned of the darkness at the heart of Aether Paradise, we'll need you to conveniently disappear!" + }, + "victory": { + "1": "Hmph! You seem to have a lot of skill.", + "2": "What does this mean? What does this mean!", + "3": "Hey! You're so strong that there's no way I can turn you away!", + "4": "Hmm... It seems as though I may have lost.", + "5": "Here's an impression for you: Aiyee!" + } + }, + "faba": { + "encounter": { + "1": "I, Branch Chief Faba, shall show you the harshness of the real world!", + "2": "The man who is called Aether Paradise's last line of defense is to battle a mere child?", + "2_female": "The man who is called Aether Paradise's last line of defense is to battle a mere child?", + "3": "I, Faba, am the Aether Branch Chief. The only one in the world, I'm irreplaceable." + }, + "victory": { + "1": "Aiyee!", + "2": "H-h-how can this be?! How could this child...", + "2_female": "H-h-how can this be?! How could this child...", + "3": "This is why... This is why I can't bring myself to like children." + } + }, + "skull_grunt": { + "encounter": { + "1": "We're not bad-we're just hard!", + "2": "You want some? That's how we say hello! Nice knowing you, punks!", + "2_female": "You want some? That's how we say hello! Nice knowing you, punks!", + "3": "We're just a bunch of guys and gals with a great interest in other people's Pokémon!", + "4": "Why you trying to act hard when we're already hard as bones out here, homie?", + "4_female": "Why you trying to act hard when we're already hard as bones out here, homie?", + "5": "Team Skull represent! We can't pay the rent! Had a lot of fun, but our youth was misspent!", + "5_female": "Team Skull represent! We can't pay the rent! Had a lot of fun, but our youth was misspent!" + }, + "victory": { + "1": "Huh? Is it over already?", + "2": "Time for us to break out, yo! Gotta tell y'all peace out, yo!", + "3": "We don't need your wack Pokémon anyway!", + "4": "Wha-?! This kid's way too strong-no bones about it!", + "5": "So, what? I'm lower than a Pokémon?! I already got self-esteem issues, man." + } + }, + "plumeria": { + "encounter": { + "1": " ...Hmph. You don't look like anything special to me.", + "1_female": " ...Hmph. You don't look like anything special to me.", + "2": "It takes these dumb Grunts way too long to deal with you kids...", + "3": "Mess with anyone in Team Skull, and I'll show you how serious I can get." + }, + "victory": { + "1": "Hmmph! You're pretty strong. I'll give you that.", + "1_female": "Hmmph! You're pretty strong. I'll give you that.", + "2": "Hmmph. Guess you are pretty tough. Now I understand why my Grunts waste so much time battling kids.", + "3": "Hmmph! I guess I just have to hold that loss." + } + }, + "macro_grunt": { + "encounter": { + "1": "It looks like this is the end of the line for you!", + "2": "You are a trainer aren't you? I'm afraid that doesn't give you the right to interfere in our work.", + "2_female": "You are a trainer aren't you? I'm afraid that doesn't give you the right to interfere in our work.", + "3": "I'm from Macro Cosmos Insurance! Do you have a life insurance policy?" + }, + "victory": { + "1": "I have little choice but to respectfully retreat.", + "2": "Having to give up my pocket money... Losing means I'm back in the red...", + "3": "Nobody can beat Macro Cosmos when it comes to our dedication to our work!" + } + }, + "oleana": { + "encounter": { + "1": "I won't let anyone interfere with Mr. Rose's plan!", + "2": "So, you got through all of the special staff that I had ordered to stop you. I would expect nothing less.", + "3": "For the chairman! I won't lose!" + }, + "victory": { + "1": "*sigh* I wasn't able to win... Oleana...you really are a hopeless woman.", + "2": "Arghhh! This is inexcusable... What was I thinking... Any trainer who's made it this far would be no pushover..", + "2_female": "Arghhh! This is inexcusable... What was I thinking... Any trainer who's made it this far would be no pushover..", + "3": "*sigh* I am one tired Oleana..." + } + }, + "rocket_boss_giovanni_1": { + "encounter": { + "1": "So! I must say, I am impressed you got here!" + }, + "victory": { + "1": "WHAT! This cannot be!" + }, + "defeat": { + "1": "Mark my words. Not being able to measure your own strength shows that you are still a child.", + "1_female": "Mark my words. Not being able to measure your own strength shows that you are still a child." + } + }, + "rocket_boss_giovanni_2": { + "encounter": { + "1": "My old associates need me... Are you going to get in my way?" + }, + "victory": { + "1": "How is this possible...? The precious dream of Team Rocket has become little more than an illusion..." + }, + "defeat": { + "1": "Team Rocket will be reborn again, and I will rule the world!" + } + }, + "magma_boss_maxie_1": { + "encounter": { + "1": "I will bury you by my own hand. I hope you appreciate this honor!" + }, + "victory": { + "1": "Ugh! You are... quite capable...\nI fell behind, but only by an inch..." + }, + "defeat": { + "1": "Team Magma will prevail!" + } + }, + "magma_boss_maxie_2": { + "encounter": { + "1": "You are the final obstacle remaining between me and my goals.\n$Brace yourself for my ultimate attack! Fuhahaha!" + }, + "victory": { + "1": "This... This is not.. Ngh..." + }, + "defeat": { + "1": "And now... I will transform this planet to a land ideal for humanity." + } + }, + "aqua_boss_archie_1": { + "encounter": { + "1": "I'm the leader of Team Aqua, so I'm afraid it's the rope's end for you." + }, + "victory": { + "1": "Let's meet again somewhere. I'll be sure to remember that face." + }, + "defeat": { + "1": "Brilliant! My team won't hold back now!" + } + }, + "aqua_boss_archie_2": { + "encounter": { + "1": "I've been waiting so long for this day to come.\nThis is the true power of my team!" + }, + "victory": { + "1": "Like I figured..." + }, + "defeat": { + "1": "I'll return everything in this world to its original, pure state!!" + } + }, + "galactic_boss_cyrus_1": { + "encounter": { + "1": "You were compelled to come here by such vacuous sentimentality.\n$I will make you regret paying heed to your heart!", + "1_female": "You were compelled to come here by such vacuous sentimentality.\n$I will make you regret paying heed to your heart!" + }, + "victory": { + "1": "Interesting. And quite curious." + }, + "defeat": { + "1": "I will create my new world..." + } + }, + "galactic_boss_cyrus_2": { + "encounter": { + "1": "So we meet again. It seems our fates have become intertwined.\n$But here and now, I will finally break that bond!" + }, + "victory": { + "1": "How? How? HOW?!" + }, + "defeat": { + "1": "Farewell." + } + }, + "plasma_boss_ghetsis_1": { + "encounter": { + "1": "I won't allow anyone to stop me! No matter who does what!" + }, + "victory": { + "1": "How can this be? I'm the creator of Team Plasma! I'm perfect!" + }, + "defeat": { + "1": "I am the perfect ruler of a perfect new world! Mwa ha ha!" + } + }, + "plasma_boss_ghetsis_2": { + "encounter": { + "1": "Come now! I want to see your face at the moment you lose all hope!" + }, + "victory": { + "1": "My calculations... No! My careful schemes! The world should be mine!" + }, + "defeat": { + "1": "Kyurem! Use Absofusion!" + } + }, + "flare_boss_lysandre_1": { + "encounter": { + "1": "Do you want to stop me? Show me in battle." + }, + "victory": { + "1": "You are here to stop me. But I ask you to wait. " + }, + "defeat": { + "1": "Pokemon...Shall no longer exist." + } + }, + "flare_boss_lysandre_2": { + "encounter": { + "1": "The future you want, or the future I want... Let us see which one is more deserving, shall we?" + }, + "victory": { + "1": "Whaugh!" + }, + "defeat": { + "1": "Fools with no vision will continue to befoul this beautiful world." + } + }, + "aether_boss_lusamine_1": { + "encounter": { + "1": "You're going to startle my sweet beast! It looks like I'll need to silence you first." + }, + "victory": { + "1": "How... how can you be so awful!" + }, + "defeat": { + "1": "Hmph..." + } + }, + "aether_boss_lusamine_2": { + "encounter": { + "1": "Why must you continue to pester me?! I am sick of you. Sick through and through!\n$Enough with this useless talk.. with Nihilego's power I will show you how wrong you were to come here!" + }, + "victory": { + "1": "Aaauuuggghhhhhhhhh!!!" + }, + "defeat": { + "1": "All that I want is my precious beast! I don't care about any of the rest of you!" + } + }, + "skull_boss_guzma_1": { + "encounter": { + "1": "The hated boss who beats you down and beats you down and never lets up...\n$Yeah. Big bad Guzma is here!" + }, + "victory": { + "1": "Tch. I'm gonna beat you down one of these days!" + }, + "defeat": { + "1": "And you came all the way out here just for that, huh?" + } + }, + "skull_boss_guzma_2": { + "encounter": { + "1": "Doesn't matter who I'm up against, I'm gonna beat them down!\n$That's what big bad Guzma is all about!" + }, + "victory": { + "1": "Guzma!!! What is wrong with you?!" + }, + "defeat": { + "1": "Y'all are stupid!" + } + }, + "macro_boss_rose_1": { + "encounter": { + "1": "I must provide limitless energy to ensure everlasting prosperity for everyone...\n$It is my purpose, my duty, my destiny!" + }, + "victory": { + "1": "You still don't understand, trainer...\n$We... No, I am going to change the course of history!" + }, + "defeat": { + "1": "You still don't understand a thing!" + } + }, + "macro_boss_rose_2": { + "encounter": { + "1": "I'm committed to solving the energy problem in the Galar region—and, of course, around the world.\n$My experience and accomplishments that made Macro Cosmos a success are proof my methods work.\n$I don't intend to change my mind, even if I lose." + }, + "victory": { + "1": "I'd forgotten how great Pokémon battles are! It's been so long since I battled...\n$That sure was satisfying, I accept defeat for this battle." + }, + "defeat": { + "1": "I suppose it must seem that I am doing something terrible. I don't expect you to understand.\n$But I must provide the Galar region with limitless energy to ensure everlasting prosperity." + } + }, + "brock": { + "encounter": { + "1": "My expertise on Rock-type Pokémon will take you down! Come on!", + "2": "My rock-hard willpower will overwhelm you!", + "3": "Allow me to show you the true strength of my Pokémon!" + }, + "victory": { + "1": "Your Pokémon's strength have overcome my rock-hard defenses!", + "2": "The world is huge! I'm glad to have had a chance to battle you.", + "3": "Perhaps I should go back to pursuing my dream as a Pokémon Breeder…" + }, + "defeat": { + "1": "The best offense is a good defense!\nThat's my way of doing things!", + "2": "Come study rocks with me next time to better learn how to fight them!", + "3": "Hah, all my traveling around the regions is paying off!" + } + }, + "misty": { + "encounter": { + "1": "My policy is an all out offensive with Water-type Pokémon!", + "1_female": "My policy is an all out offensive with Water-type Pokémon!", + "2": "Hiya, I'll show you the strength of my aquatic Pokémon!", + "3": "My dream was to go on a journey and battle powerful trainers…\nWill you be a sufficient challenge?" + }, + "victory": { + "1": "You really are strong… I'll admit that you are skilled…", + "2": "Grrr… You know you just got lucky, right?!", + "3": "Wow, you're too much! I can't believe you beat me!" + }, + "defeat": { + "1": "Was the mighty Misty too much for you?", + "2": "I hope you saw my Pokémon's elegant swimming techniques!", + "3": "Your Pokémon were no match for my pride and joys!" + } + }, + "lt_surge": { + "encounter": { + "1": "My Electric Pokémon saved me during the war! I'll show you how!", + "1_female": "My Electric Pokémon saved me during the war! I'll show you how!", + "2": "Ten-hut! I'll shock you into surrender!", + "3": "I'll zap you just like I do to all my enemies in battle!" + }, + "victory": { + "1": "Whoa! Your team's the real deal, kid!", + "2": "Aaargh, you're strong! Even my electric tricks lost against you.", + "2_female": "Aaargh, you're strong! Even my electric tricks lost against you.", + "3": "That was an absolutely shocking loss!" + }, + "defeat": { + "1": "Oh yeah! When it comes to Electric-type Pokémon, I'm number one in the world!", + "2": "Hahaha! That was an electrifying battle, kid!", + "3": "A Pokémon battle is war, and I have showed you first-hand combat!" + } + }, + "erika": { + "encounter": { + "1": "Ah, the weather is lovely here…\nOh, a battle? Very well then.", + "2": "My Pokémon battling skills rival that of my flower arranging skills.", + "3": "Oh, I hope the pleasant aroma of my Pokémon doesn't put me to sleep again…", + "4": "Seeing flowers in a garden is so soothing." + }, + "victory": { + "1": "Oh! I concede defeat.", + "2": "That match was most delightful.", + "3": "Ah, it appears it is my loss…", + "4": "Oh, my goodness." + }, + "defeat": { + "1": "I was afraid I would doze off…", + "2": "Oh my, it seems my Grass Pokémon overwhelmed you.", + "2_female": "Oh my, it seems my Grass Pokémon overwhelmed you.", + "3": "That battle was such a soothing experience.", + "4": "Oh… Is that all?" + } + }, + "janine": { + "encounter": { + "1": "I am mastering the art of poisonous attacks.\nI shall spar with you today!", + "2": "Father trusts that I can hold my own.\nI will prove him right!", + "3": "My ninja techniques are only second to my Father's!\nCan you keep up?" + }, + "victory": { + "1": "Even now, I still need training… I understand.", + "2": "Your battle technique has outmatched mine.", + "3": "I'm going to really apply myself and improve my skills." + }, + "defeat": { + "1": "Fufufu… the poison has sapped all your strength to battle.", + "2": "Ha! You didn't stand a chance against my superior ninja skills!", + "3": "Father's faith in me has proven to not be misplaced." + } + }, + "sabrina": { + "encounter": { + "1": "Through my psychic ability, I had a vision of your arrival!", + "2": "I dislike fighting, but if you wish, I will show you my powers!", + "3": "I can sense great ambition in you. I shall see if it not unfounded." + }, + "victory": { + "1": "Your power… It far exceeds what I foresaw…", + "2": "I failed to accurately predict your power.", + "3": "Even with my immense psychic powers, I cannot sense another as strong as you." + }, + "defeat": { + "1": "This victory… It is exactly as I foresaw in my visions!", + "2": "Perhaps it was another I sensed a great desire in…", + "3": "Hone your abilities before recklessly charging into battle.\nYou never know what the future may hold if you do…" + } + }, + "blaine": { + "encounter": { + "1": "Hah! Hope you brought a Burn Heal!", + "2": "My fiery Pokémon will incinerate all challengers!", + "3": "Get ready to play with fire!" + }, + "victory": { + "1": "I have burned down to nothing! Not even ashes remain!", + "2": "Didn't I stoke the flames high enough?", + "3": "I'm all burned out… But this makes my motivation to improve burn even hotter!" + }, + "defeat": { + "1": "My raging inferno cannot be quelled!", + "2": "My Pokémon have been powered up with the heat from this victory!", + "3": "Hah! My passion burns brighter than yours!" + } + }, + "giovanni": { + "encounter": { + "1": "I, the leader of Team Rocket, will make you feel a world of pain!", + "2": "My training here will be vital before I am to face my old associates again.", + "3": "I do not think you are prepared for the level of failure you are about to experience!", + "3_female": "I do not think you are prepared for the level of failure you are about to experience!" + }, + "victory": { + "1": "WHAT! Me, lose?! There is nothing I wish to say to you!", + "2": "Hmph… You could never understand what I hope to achieve.", + "3": "This defeat is merely delaying the inevitable.\nI will rise Team Rocket from the ashes in due time." + }, + "defeat": { + "1": "Not being able to measure your own strength shows that you are still but a child.", + "2": "Do not try to interfere with me again.", + "3": "I hope you understand how foolish challenging me was." + } + }, + "roxanne": { + "encounter": { + "1": "Would you kindly demonstrate how you battle?", + "2": "You can learn many things by battling many trainers.", + "3": "Oh, you caught me strategizing.\nWould you like to battle?" + }, + "victory": { + "1": "Oh, I appear to have lost.\nI understand.", + "2": "It seems that I still have so much more to learn when it comes to battle.", + "3": "I'll take what I learned here today to heart." + }, + "defeat": { + "1": "I have learned many things from our battle.\nI hope you have too.", + "2": "I look forward to battling you again.\nI hope you'll use what you've learned here.", + "3": "I won due to everything I have learned." + } + }, + "brawly": { + "encounter": { + "1": "Oh man, a challenger!\nLet's see what you can do!", + "1_female": "Oh man, a challenger!\nLet's see what you can do!", + "2": "You seem like a big splash.\nLet's battle!", + "3": "Time to create a storm!\nLet's go!" + }, + "victory": { + "1": "Oh woah, you've washed me out!", + "2": "You surfed my wave and crashed me down!", + "3": "I feel like I'm lost in Granite Cave!" + }, + "defeat": { + "1": "Haha, I surfed the big wave!\nChallenge me again sometime.", + "2": "Surf with me again some time!", + "3": "Just like the tides come in and out, I hope you return to challenge me again." + } + }, + "wattson": { + "encounter": { + "1": "Time to get shocked!\nWahahahaha!", + "2": "I'll make sparks fly!\nWahahahaha!", + "3": "I hope you brought Paralyz Heal!\nWahahahaha!" + }, + "victory": { + "1": "Seems like I'm out of charge!\nWahahahaha!", + "2": "You've completely grounded me!\nWahahahaha!", + "3": "Thanks for the thrill!\nWahahahaha!" + }, + "defeat": { + "1": "Recharge your batteries and challenge me again sometime!\nWahahahaha!", + "1_female": "Recharge your batteries and challenge me again sometime!\nWahahahaha!", + "2": "I hope you found our battle electrifying!\nWahahahaha!", + "3": "Aren't you shocked I won?\nWahahahaha!" + } + }, + "flannery": { + "encounter": { + "1": "Nice to meet you! Wait, no…\nI will crush you!", + "2": "I've only been a leader for a little while, but I'll smoke you!", + "3": "It's time to demonstrate the moves my grandfather has taught me! Let's battle!" + }, + "victory": { + "1": "You remind me of my grandfather…\nNo wonder I lost.", + "2": "Am I trying too hard?\nI should relax, can't get too heated.", + "3": "Losing isn't going to smother me out.\nTime to reignite training!" + }, + "defeat": { + "1": "I hope I've made my grandfather proud…\nLet's battle again some time.", + "2": "I…I can't believe I won!\nDoing things my way worked!", + "3": "Let's exchange burning hot moves again soon!" + } + }, + "norman": { + "encounter": { + "1": "I'm surprised you managed to get here.\nLet's battle.", + "2": "I'll do everything in my power as a Gym Leader to win.\nLet's go!", + "3": "You better give this your all.\nIt's time to battle!" + }, + "victory": { + "1": "I lost to you…?\nRules are rules, though.", + "2": "Was moving from Olivine a mistake…?", + "3": "I can't believe it.\nThat was a great match." + }, + "defeat": { + "1": "We both tried our best.\nI hope we can battle again soon.", + "2": "You should try challenging my kid instead.\nYou might learn something!", + "3": "Thank you for the excellent battle.\nBetter luck next time." + } + }, + "winona": { + "encounter": { + "1": "I've been soaring the skies looking for prey…\nAnd you're my target!", + "2": "No matter how our battle is, my Flying Pokémon and I will triumph with grace. Let's battle!", + "3": "I hope you aren't scared of heights.\nLet's ascend!" + }, + "victory": { + "1": "You're the first Trainer I've seen with more grace than I.\nExcellently played.", + "1_female": "You're the first Trainer I've seen with more grace than I.\nExcellently played.", + "2": "Oh, my Flying Pokémon have plummeted!\nVery well.", + "3": "Though I may have fallen, my Pokémon will continue to fly!" + }, + "defeat": { + "1": "My Flying Pokémon and I will forever dance elegantly!", + "2": "I hope you enjoyed our show.\nOur graceful dance is finished.", + "3": "Won't you come see our elegant choreography again?" + } + }, + "tate": { + "encounter": { + "1": "Hehehe…\nWere you surprised to see me without my sister?", + "1_female": "Hehehe…\nWere you surprised to see me without my sister?", + "2": "I can see what you're thinking…\nYou want to battle!", + "3": "How can you defeat someone…\nWho knows your every move?" + }, + "victory": { + "1": "It can't be helped…\nI miss Liza…", + "2": "Your bond with your Pokémon was stronger than mine.", + "3": "If I were with Liza, we would have won.\nWe can finish each other's thoughts!" + }, + "defeat": { + "1": "My Pokémon and I are superior!", + "2": "If you can't even defeat me, you'll never be able to defeat Liza either.", + "3": "It's all thanks to my strict training with Liza.\nI can make myself one with Pokémon." + } + }, + "liza": { + "encounter": { + "1": "Fufufu…\nWere you surprised to see me without my brother?", + "1_female": "Fufufu…\nWere you surprised to see me without my brother?", + "2": "I can determine what you desire…\nYou want to battle, don't you?", + "3": "How can you defeat someone…\nWho's one with their Pokémon?" + }, + "victory": { + "1": "It can't be helped…\nI miss Tate…", + "2": "Your bond with your Pokémon…\nIt's stronger than mine.", + "3": "If I were with Tate, we would have won.\nWe can finish each other's sentences!" + }, + "defeat": { + "1": "My Pokémon and I are victorious.", + "2": "If you can't even defeat me, you'll never be able to defeat Tate either.", + "3": "It's all thanks to my strict training with Tate.\nI can synchronize myself with my Pokémon." + } + }, + "juan": { + "encounter": { + "1": "Now's not the time to act coy.\nLet's battle!", + "2": "Ahahaha, You'll be witness to my artistry with Water Pokémon!", + "3": "A typhoon approaches!\nWill you be able to test me?", + "4": "Please, you shall bear witness to our artistry.\nA grand illusion of water sculpted by my Pokémon and myself!" + }, + "victory": { + "1": "You may be a genius who can take on Wallace!", + "2": "I focused on elegance while you trained.\nIt's only natural that you defeated me.", + "3": "Ahahaha!\nVery well, You have won this time.", + "4": "From you, I sense the brilliant shine of skill that will overcome all." + }, + "defeat": { + "1": "My Pokémon and I have sculpted an illusion of Water and come out victorious.", + "2": "Ahahaha, I have won, and you have lost.", + "3": "Shall I loan you my outfit? It may help you battle!\nAhahaha, I jest!", + "4": "I'm the winner! Which is to say, you lost." + } + }, + "crasher_wake": { + "encounter": { + "1": "Crash! Crash! Watch out!\nCrasher Wake…is…heeere!", + "2": "Crash! Crash! Crasher Wake!", + "3": "I'm the tidal wave of power to wash you away!" + }, + "victory": { + "1": "That puts a grin on my face!\nGuhahaha! That was a blast!", + "2": "Hunwah! It's gone and ended!\nHow will I say this…\nI want more! I wanted to battle a lot more!", + "3": "WHAAAAT!?" + }, + "defeat": { + "1": "Yeeeeah! That's right!", + "2": "I won, but I want more! I wanted to battle a lot more!", + "3": "So long!" + } + }, + "falkner": { + "encounter": { + "1": "I'll show you the real power of the magnificent bird Pokémon!", + "2": "Winds, stay with me!", + "3": "Dad! I hope you're watching me battle from above!" + }, + "victory": { + "1": "I understand… I'll bow out gracefully.", + "2": "A defeat is a defeat. You are strong indeed.", + "3": "…Shoot! Yeah, I lost." + }, + "defeat": { + "1": "Dad! I won with your cherished bird Pokémon…", + "2": "Bird Pokémon are the best after all!", + "3": "Feels like I'm catching up to my dad!" + } + }, + "nessa": { + "encounter": { + "1": "No matter what kind of plan your refined mind may be plotting, my partner and I will be sure to sink it.", + "1_female": "No matter what kind of plan your refined mind may be plotting, my partner and I will be sure to sink it.", + "2": "I'm not here to chat. I'm here to win!", + "3": "This is a little gift from my Pokémon… I hope you can take it!", + "3_female": "This is a little gift from my Pokémon… I hope you can take it!" + }, + "victory": { + "1": "You and your Pokémon are just too much…", + "2": "How…? How can this be?!", + "3": "I was totally washed away!" + }, + "defeat": { + "1": "The raging wave crashes again!", + "2": "Time to ride the wave of victory!", + "3": "Ehehe!" + } + }, + "melony": { + "encounter": { + "1": "I'm not going to hold back!", + "2": "All righty, I suppose we should get started.", + "3": "I'll freeze you solid!" + }, + "victory": { + "1": "You… You're pretty good, huh?", + "1_female": "You… You're pretty good, huh?", + "2": "If you find Gordie around, be sure to give him a right trashing, would you?", + "3": "I think you took breaking the ice a little too literally…" + }, + "defeat": { + "1": "Now do you see how severe battles can be?", + "2": "Hee! Looks like I went and won again!", + "3": "Are you holding back?" + } + }, + "marlon": { + "encounter": { + "1": "You look strong! Shoots! Let's start!", + "2": "I'm strong like the ocean's wide. You're gonna get swept away, fo' sho'.", + "2_female": "I'm strong like the ocean's wide. You're gonna get swept away, fo' sho'.", + "3": "Oh ho, so I'm facing you! That's off the wall." + }, + "victory": { + "1": "You totally rocked that! You're raising some wicked Pokémon. You got this Trainer thing down!", + "1_female": "You totally rocked that! You're raising some wicked Pokémon. You got this Trainer thing down!", + "2": "You don't just look strong, you're strong fo' reals! Eh, I was swept away, too!", + "3": "You're strong as a gnarly wave!" + }, + "defeat": { + "1": "You're tough, but it's not enough to sway the sea, 'K!", + "2": "Hee! Looks like I went and won again!", + "3": "Sweet, sweet victory!" + } + }, + "shauntal": { + "encounter": { + "1": "Excuse me. You're a challenger, right?\nI'm the Elite Four's Ghost-type Pokémon user, Shauntal, and I shall be your opponent.", + "1_female": "Excuse me. You're a challenger, right?\nI'm the Elite Four's Ghost-type Pokémon user, Shauntal, and I shall be your opponent.", + "2": "I absolutely love writing about Trainers who come here and the Pokémon they train.\nCould I use you and your Pokémon as a subject?", + "3": "Every person who works with Pokémon has a story to tell.\nWhat story is about to be told?" + }, + "victory": { + "1": "Wow. I'm dumbstruck!", + "2": "S-sorry! First, I must apologize to my Pokémon…\n\nI'm really sorry you had a bad experience because of me!", + "3": "Even in light of that, I'm still one of the Elite Four!" + }, + "defeat": { + "1": "Eheh.", + "2": "That gave me excellent material for my next novel!", + "3": "And so, another tale ends…" + } + }, + "marshal": { + "encounter": { + "1": "My mentor, Alder, sees your potential as a Trainer and is taking an interest in you.\nIt is my intention to test you--to take you to the limits of your strength. Kiai!", + "1_female": "My mentor, Alder, sees your potential as a Trainer and is taking an interest in you.\nIt is my intention to test you--to take you to the limits of your strength. Kiai!", + "2": "Victory, decisive victory, is my intention! Challenger, here I come!", + "3": "In myself, I seek to develop the strength of a fighter and shatter any weakness in myself!\nPrevailing with the force of my convictions!" + }, + "victory": { + "1": "Whew! Well done!", + "2": "As your battles continue, aim for even greater heights!", + "3": "The strength shown by you and your Pokémon has deeply impressed me…" + }, + "defeat": { + "1": "Hmm.", + "2": "That was good battle.", + "3": "Haaah! Haaah! Haiyaaaah!" + } + }, + "cheren": { + "encounter": { + "1": "You remind me of an old friend. That makes me excited about this Pokémon battle!", + "2": "Pokémon battles have no meaning if you don't think why you battle.\n$Or better said, it makes battling together with Pokémon meaningless.", + "3": "My name's Cheren! I'm a Gym Leader and a teacher! Pleasure to meet you.", + "3_female": "My name's Cheren! I'm a Gym Leader and a teacher! Pleasure to meet you." + }, + "victory": { + "1": "Thank you! I saw what was missing in me.", + "2": "Thank you! I feel like I saw a little of the way toward my ideals.", + "3": "Hmm… This is problematic." + }, + "defeat": { + "1": "As a Gym Leader, I aim to be a wall for you to overcome.", + "2": "All right!", + "3": "I made it where I am because Pokémon were by my side.\nPerhaps we need to think about why Pokémon help us not in terms of Pokémon and Trainers but as a relationship between living beings." + } + }, + "chili": { + "encounter": { + "1": "Yeeeeooow! Time to play with FIRE!! I'm the strongest of us brothers!", + "1_female": "Yeeeeooow! Time to play with FIRE!! I'm the strongest of us brothers!", + "2": "Ta-da! The Fire-type scorcher Chili--that's me--will be your opponent!", + "2_female": "Ta-da! The Fire-type scorcher Chili--that's me--will be your opponent!", + "3": "I'm going to show you what me and my blazing Fire types can do!", + "3_female": "I'm going to show you what me and my blazing Fire types can do!" + }, + "victory": { + "1": "You got me. I am… burned… out…", + "1_female": "You got me. I am… burned… out…", + "2": "Whoa ho! You're on fire!", + "2_female": "Whoa ho! You're on fire!", + "3": "Augh! You got me!" + }, + "defeat": { + "1": "I'm on fire! Play with me, and you'll get burned!", + "1_female": "I'm on fire! Play with me, and you'll get burned!", + "2": "When you play with fire, you get burned!", + "3": "I mean, c'mon, your opponent was me! You didn't have a chance!", + "3_female": "I mean, c'mon, your opponent was me! You didn't have a chance!" + } + }, + "cilan": { + "encounter": { + "1": "Nothing personal... No hard feelings... Me and my Grass-type Pokémon will...\n$Um... We're gonna battle come what may.", + "1_female": "Nothing personal... No hard feelings... Me and my Grass-type Pokémon will...\n$Um... We're gonna battle come what may.", + "2": "So, um, if you're OK with me, I'll, um, put everything I've got into being, er, you know, your opponent.", + "2_female": "So, um, if you're OK with me, I'll, um, put everything I've got into being, er, you know, your opponent.", + "3": "OK… So, um, I'm Cilan, I like Grass-type Pokémon.", + "3_female": "OK… So, um, I'm Cilan, I like Grass-type Pokémon." + }, + "victory": { + "1": "Er… Is it over now?", + "1_female": "Er… Is it over now?", + "2": "…What a surprise. You are very strong, aren't you? \n$I guess my brothers wouldn't have been able to defeat you either…", + "2_female": "…What a surprise. You are very strong, aren't you? \n$I guess my brothers wouldn't have been able to defeat you either…", + "3": "…Huh. Looks like my timing was, um, off?" + }, + "defeat": { + "1": "Huh? Did I win?", + "1_female": "Huh? Did I win?", + "2": "I guess… \n$I suppose I won, because I've been competing with my brothers Chili and Cress, and we all were able to get tougher.", + "2_female": "I guess… \n$I suppose I won, because I've been competing with my brothers Chili and Cress, and we all were able to get tougher.", + "3": "It…it was quite a thrilling experience…", + "3_female": "It…it was quite a thrilling experience…" + } + }, + "roark": { + "encounter": { + "1": "I need to see your potential as a Trainer. And, I'll need to see the toughness of the Pokémon that battle with you!", + "1_female": "I need to see your potential as a Trainer. And, I'll need to see the toughness of the Pokémon that battle with you!", + "2": "Here goes! These are my rocking Pokémon, my pride and joy!", + "3": "Rock-type Pokémon are simply the best!", + "4": "Every day, I toughened up my Pokémon by digging up Fossils nonstop.\n$Could I show you how tough I made them in a battle?", + "4_female": "Every day, I toughened up my Pokémon by digging up Fossils nonstop.\n$Could I show you how tough I made them in a battle?" + }, + "victory": { + "1": "W-what? That can't be! My buffed-up Pokémon!", + "2": "…We lost control there. Next time I'd like to challenge you to a Fossil-digging race underground.", + "2_female": "…We lost control there. Next time I'd like to challenge you to a Fossil-digging race underground.", + "3": "With skill like yours, it's natural for you to win.", + "4": "Wh-what?! It can't be! Even that wasn't enough?" + }, + "defeat": { + "1": "See? I'm proud of my rocking battle style!", + "2": "Thanks! The battle gave me confidence that I may be able to beat my dad!", + "3": "See? These are my rocking Pokémon, my pride and joy!", + "4": "I knew I would win!" + } + }, + "morty": { + "encounter": { + "1": "With a little more, I could see a future in which I meet the legendary Pokémon.\n$You're going to help me reach that level!", + "2": "It's said that a rainbow-hued Pokémon will come down to appear before a truly powerful Trainer. \n$I believed that tale, so I have secretly trained here all my life. As a result, I can now see what others cannot. \n$I see a shadow of the person who will make the Pokémon appear. \n$I believe that person is me! You're going to help me reach that level!", + "3": "Whether you choose to believe or not, mystic power does exist.", + "4": "You can bear witness to the fruits of my training.", + "5": "You must make your soul one with that of Pokémon. Can you do this?", + "6": "Say, do you want to be part of my training?" + }, + "victory": { + "1": "I'm not good enough yet…", + "2": "I see… Your journey has taken you to far-away places and you have witnessed much more than I.\n$I envy you for that…", + "2_female": "I see… Your journey has taken you to far-away places and you have witnessed much more than I.\n$I envy you for that…", + "3": "How is this possible…", + "4": "I don't think our potentials are so different.\n$But you seem to have something more than that… So be it.", + "5": "Guess I need more training.", + "6": "That's a shame." + }, + "defeat": { + "1": "I moved… one step ahead again.", + "2": "Fufufu…", + "3": "Wh-what?! It can't be! Even that wasn't enough?", + "4": "I feel like I just smashed through a really stubborn boulder!", + "5": "Ahahahah!", + "6": "I knew I would win!" + } + }, + "crispin": { + "encounter": { + "1": "I wanna win, so that's exactly what I'll do!", + "2": "I battle because I wanna battle! And you know what? That's how it should be!" + }, + "victory": { + "1": "I wanted to win…but I lost!", + "2": "I lost…'cause I couldn't win!" + }, + "defeat": { + "1": "Hey, wait a sec. Did I just win? I think I just won! Talk about satisfying!", + "2": "Wooo! That was amazing!" + } + }, + "amarys": { + "encounter": { + "1": "I want to be the one to help a certain person. That being the case, I cannot afford to lose.\n$… Our battle starts now." + }, + "victory": { + "1": "I am… not enough, I see." + }, + "defeat": { + "1": "Victory belongs to me. Well fought." + } + }, + "lacey": { + "encounter": { + "1": "I'll be facing you with my usual party as a member of the Elite Four." + }, + "victory": { + "1": "That was a great battle!" + }, + "defeat": { + "1": "Let's give your Pokémon a nice round of applause for their efforts!" + } + }, + "drayton": { + "encounter": { + "1": "Man, I love chairs. Don't you love chairs? What lifesavers. \n$I don't get why everyone doesn't just sit all the time. Standing up's tiring work!" + }, + "victory": { + "1": "Guess I should've expected that!" + }, + "defeat": { + "1": "Heh heh! Don't mind me, just scooping up a W over here. I get it if you're upset, but don't go full Kieran on me, OK?", + "1_female": "Heh heh! Don't mind me, just scooping up a W over here. I get it if you're upset, but don't go full Kieran on me, OK?" + } + }, + "ramos": { + "encounter": { + "1": "Did yeh enjoy the garden playground I made with all these sturdy plants o' mine?\n$Their strength is a sign o' my strength as a gardener and a Gym Leader! Yeh sure yer up to facing all that?", + "1_female": "Did yeh enjoy the garden playground I made with all these sturdy plants o' mine?\n$Their strength is a sign o' my strength as a gardener and a Gym Leader! Yeh sure yer up to facing all that?" + }, + "victory": { + "1": "Yeh believe in yer Pokémon… And they believe in yeh, too… It was a fine battle, sprout." + }, + "defeat": { + "1": "Hohoho… Indeed. Frail little blades o' grass'll break through even concrete." + } + }, + "viola": { + "encounter": { + "1": "Whether it's the tears of frustration that follow a loss or the blossoming of joy that comes with victory…\n$They're both great subjects for my camera! Fantastic! This'll be just fantastic! \n$Now come at me!", + "2": "My lens is always focused on victory--I won't let anything ruin this shot!" + }, + "victory": { + "1": "You and your Pokémon have shown me a whole new depth of field! Fantastic! Just fantastic!", + "2": "The world you see through a lens, and the world you see with a Pokémon by your side…\n$The same world can look entirely different depending on your view." + }, + "defeat": { + "1": "The photo from the moment of my victory will be a real winner, all right!", + "2": "Yes! I took some great photos!" + } + }, + "candice": { + "encounter": { + "1": "You want to challenge Candice? Sure thing! I was waiting for someone tough! \n$But I should tell you, I'm tough because I know how to focus.", + "2": "Pokémon, fashion, romance… It's all about focus! \n$I'll show you just what I mean. Get ready to lose!" + }, + "victory": { + "1": "I must say, I'm warmed up to you! I might even admire you a little.", + "2": "Wow! You're great! You've earned my respect! \n$I think your focus and will bowled us over totally. ", + "2_female": "Wow! You're great! You've earned my respect! \n$I think your focus and will bowled us over totally. " + }, + "defeat": { + "1": "I sensed your will to win, but I don't lose!", + "2": "See? Candice's focus! My Pokémon's focus is great, too!" + } + }, + "gardenia": { + "encounter": { + "1": "You have a winning aura about you. So, anyway, this will be fun. Let's have our battle!" + }, + "victory": { + "1": "Amazing! You're very good, aren't you?", + "1_female": "Amazing! You're very good, aren't you?" + }, + "defeat": { + "1": "Yes! My Pokémon and I are perfectly good!" + } + }, + "aaron": { + "encounter": { + "1": "Ok! Let me take you on!" + }, + "victory": { + "1": "Battling is a deep and complex affair…" + }, + "defeat": { + "1": "Victory over an Elite Four member doesn't come easily." + } + }, + "cress": { + "encounter": { + "1": "That is correct! It shall be I and my esteemed Water types that you must face in battle!" + }, + "victory": { + "1": "Lose? Me? I don't believe this." + }, + "defeat": { + "1": "This is the appropriate result when I'm your opponent." + } + }, + "allister": { + "encounter": { + "1": "'M Allister.\nH-here… I go…" + }, + "victory": { + "1": "I nearly lost my mask from the shock… That was…\n$Wow. I can see your skill for what it is." + }, + "defeat": { + "1": "Th-that was ace!" + } + }, + "clay": { + "encounter": { + "1": "Harrumph! Kept me waitin', didn't ya, kid? All right, time to see what ya can do!", + "1_female": "Harrumph! Kept me waitin', didn't ya, kid? All right, time to see what ya can do!" + }, + "victory": { + "1": "Man oh man… It feels good to go all out and still be defeated!" + }, + "defeat": { + "1": "What's important is how ya react to losin'. \n$That's why folks who use losin' as fuel to get better are tough." + } + }, + "kofu": { + "encounter": { + "1": "I'mma serve you a full course o' Water-type Pokémon! Don't try to eat 'em, though!" + }, + "victory": { + "1": "Vaultin' Veluza! Yer a lively one, aren't ya! A little TOO lively, if I do say so myself!", + "1_female": "Vaultin' Veluza! Yer a lively one, aren't ya! A little TOO lively, if I do say so myself!" + }, + "defeat": { + "1": "You come back to see me again now, ya hear?" + } + }, + "tulip": { + "encounter": { + "1": "Allow me to put my skills to use to make your cute little Pokémon even more beautiful!" + }, + "victory": { + "1": "Your strength has a magic to it that cannot be washed away." + }, + "defeat": { + "1": "You know, in my line of work, people who lack talent in one area or the other often fade away quickly—never to be heard of again." + } + }, + "sidney": { + "encounter": { + "1": "I like that look you're giving me. I guess you'll give me a good match.\n$That's good! Looking real good! All right!\n$You and me, let's enjoy a battle that can only be staged here!" + }, + "victory": { + "1": "Well, how do you like that? I lost! Eh, it was fun, so it doesn't matter." + }, + "defeat": { + "1": "No hard feelings, alright?" + } + }, + "phoebe": { + "encounter": { + "1": "While I trained, I gained the ability to commune with Ghost-type Pokémon. \n$Yes, the bond I developed with Pokémon is extremely tight. \n$So, come on, just try and see if you can even inflict damage on my Pokémon!" + }, + "victory": { + "1": "Oh, darn. I've gone and lost." + }, + "defeat": { + "1": "I look forward to battling you again sometime!" + } + }, + "glacia": { + "encounter": { + "1": "All I have seen are challenges by weak Trainers and their Pokémon. \n$What about you? It would please me to no end if I could go all out against you!" + }, + "victory": { + "1": "You and your Pokémon… How hot your spirits burn!\n$The all-consuming heat overwhelms. \n$It's no surprise that my icy skills failed to harm you." + }, + "defeat": { + "1": "A fiercely passionate battle, indeed." + } + }, + "drake": { + "encounter": { + "1": "For us to battle with Pokémon as partners, do you know what it takes? Do you know what is needed? \n$If you don't, then you will never prevail over me!" + }, + "victory": { + "1": "Superb, it should be said." + }, + "defeat": { + "1": "I gave my all for that battle!" + } + }, + "wallace": { + "encounter": { + "1": "There's something about you… A difference in your demeanor. \n$I think I sense that in you. Now, show me. Show me the power you wield with your Pokémon. \n$And I, in turn, shall present you with a performance of illusions in water by me and my Pokémon!" + }, + "victory": { + "1": "Bravo. I realize now your authenticity and magnificence as a Pokémon Trainer. \n$I find much joy in having met you and your Pokémon. You have proven yourself worthy.", + "1_female": "Bravo. I realize now your authenticity and magnificence as a Pokémon Trainer. \n$I find much joy in having met you and your Pokémon. You have proven yourself worthy." + }, + "defeat": { + "1": "A grand illusion!" + } + }, + "lorelei": { + "encounter": { + "1": "No one can best me when it comes to icy Pokémon! Freezing moves are powerful!\n$Your Pokémon will be at my mercy when they are frozen solid! Hahaha! Are you ready?", + "1_female": "No one can best me when it comes to icy Pokémon! Freezing moves are powerful!\n$Your Pokémon will be at my mercy when they are frozen solid! Hahaha! Are you ready?" + }, + "victory": { + "1": "How dare you!" + }, + "defeat": { + "1": "There's nothing you can do once you're frozen.", + "1_female": "There's nothing you can do once you're frozen." + } + }, + "will": { + "encounter": { + "1": "I have trained all around the world, making my psychic Pokémon powerful.\n$I can only keep getting better! Losing is not an option!" + }, + "victory": { + "1": "I… I can't… believe it…" + }, + "defeat": { + "1": "That was close. I wonder what it is that you lack." + } + }, + "malva": { + "encounter": { + "1": "I feel like my heart might just burst into flames. \n$I'm burning up with my hatred for you, runt!", + "1_female": "I feel like my heart might just burst into flames. \n$I'm burning up with my hatred for you, runt!" + }, + "victory": { + "1": "What news… So a new challenger has defeated Malva!", + "1_female": "What news… So a new challenger has defeated Malva!" + }, + "defeat": { + "1": "I am delighted! Yes, delighted that I could squash you beneath my heel." + } + }, + "hala": { + "encounter": { + "1": "Old Hala is here to make you holler!" + }, + "victory": { + "1": "I could feel the power you gained on your journey." + }, + "defeat": { + "1": "Haha! What a delightful battle!" + } + }, + "molayne": { + "encounter": { + "1": "I gave the captain position to my cousin Sophocles, but I'm confident in my ability. \n$My strength is like that of a supernova!" + }, + "victory": { + "1": "I certainly found an interesting Trainer to face!", + "1_female": "I certainly found an interesting Trainer to face!" + }, + "defeat": { + "1": "Ahaha. What an interesting battle." + } + }, + "rika": { + "encounter": { + "1": "I'd say I'll go easy on you, but… I'd be lying! Think fast!" + }, + "victory": { + "1": "Not bad, kiddo.", + "1_female": "Not bad, kiddo." + }, + "defeat": { + "1": "Nahahaha! You really are something else, kiddo!", + "1_female": "Nahahaha! You really are something else, kiddo!" + } + }, + "bruno": { + "encounter": { + "1": "We will grind you down with our superior power! Hoo hah!" + }, + "victory": { + "1": "Why? How could I lose?" + }, + "defeat": { + "1": "You can challenge me all you like, but the results will never change!" + } + }, + "bugsy": { + "encounter": { + "1": "I'm Bugsy! I never lose when it comes to bug Pokémon!" + }, + "victory": { + "1": "Whoa, amazing! You're an expert on Pokémon!\nMy research isn't complete yet. OK, you win.", + "1_female": "Whoa, amazing! You're an expert on Pokémon!\nMy research isn't complete yet. OK, you win." + }, + "defeat": { + "1": "Thanks! Thanks to our battle, I was also able to make progress in my research!" + } + }, + "koga": { + "encounter": { + "1": "Fwahahahaha! Pokémon are not merely about brute force--you shall see soon enough!" + }, + "victory": { + "1": "Ah! You've proven your worth!" + }, + "defeat": { + "1": "Have you learned to fear the techniques of the ninja?" + } + }, + "bertha": { + "encounter": { + "1": "Well, would you show this old lady how much you've learned?" + }, + "victory": { + "1": "Well! Dear child, I must say, that was most impressive. \n$Your Pokémon believed in you and did their best to earn you the win. \n$Even though I've lost, I find myself with this silly grin!" + }, + "defeat": { + "1": "Hahahahah! Looks like this old lady won!" + } + }, + "lenora": { + "encounter": { + "1": "Well then, challenger, I'm going to research how you battle with the Pokémon you've so lovingly raised!", + "1_female": "Well then, challenger, I'm going to research how you battle with the Pokémon you've so lovingly raised!" + }, + "victory": { + "1": "My theory about you was correct. You're more than just talented… You're motivated! I salute you!", + "1_female": "My theory about you was correct. You're more than just talented… You're motivated! I salute you!" + }, + "defeat": { + "1": "Ah ha ha! If you lose, make sure to analyze why, and use that knowledge in your next battle!" + } + }, + "siebold": { + "encounter": { + "1": "As long as I am alive, I shall strive onward to seek the ultimate cuisine... and the strongest opponents in battle!" + }, + "victory": { + "1": "I shall store my memory of you and your Pokémon forever away within my heart." + }, + "defeat": { + "1": "Our Pokémon battle was like food for my soul. It shall keep me going. \n$That is how I will pay my respects to you for giving your all in battle!" + } + }, + "roxie": { + "encounter": { + "1": "Get ready! I'm gonna knock some sense outta ya!" + }, + "victory": { + "1": "Wild! Your reason's already more toxic than mine!" + }, + "defeat": { + "1": "Hey, c'mon! Get serious! You gotta put more out there!", + "1_female": "Hey, c'mon! Get serious! You gotta put more out there!" + } + }, + "olivia": { + "encounter": { + "1": "No introduction needed here. Time to battle me, Olivia!" + }, + "victory": { + "1": "Really lovely… Both you and your Pokémon…" + }, + "defeat": { + "1": "Mmm-hmm." + } + }, + "poppy": { + "encounter": { + "1": "Oooh! Do you wanna have a Pokémon battle with me?" + }, + "victory": { + "1": "Uagh?! Mmmuuuggghhh…" + }, + "defeat": { + "1": "Yaaay! I did it! I de-feet-ed you! You can come for… For… An avenge match? \n$Come for an avenge match anytime you want!" + } + }, + "agatha": { + "encounter": { + "1": "Pokémon are for battling! I'll show you how a real Trainer battles!" + }, + "victory": { + "1": "Oh my! You're something special, child!" + }, + "defeat": { + "1": "Bahaha. That's how a proper battle's done!" + } + }, + "flint": { + "encounter": { + "1": "Hope you're warmed up, cause here comes the Big Bang!", + "1_female": "Hope you're warmed up, cause here comes the Big Bang!" + }, + "victory": { + "1": "Incredible! Your moves are so hot, they make mine look lukewarm!" + }, + "defeat": { + "1": "Huh? Is that it? I think you need a bit more passion." + } + }, + "grimsley": { + "encounter": { + "1": "The winner takes everything, and there's nothing left for the loser." + }, + "victory": { + "1": "When one loses, they lose everything… The next thing I'll look for will be victory, too!" + }, + "defeat": { + "1": "If somebody wins, the person who fought against that person will lose." + } + }, + "caitlin": { + "encounter": { + "1": "It's me who appeared when the flower opened up. You who have been waiting…\n$You look like a Pokémon Trainer with refined strength and deepened kindness. \n$What I look for in my opponent is superb strength… \n$Please unleash your power to the fullest!", + "1_female": "It's me who appeared when the flower opened up. You who have been waiting…\n$You look like a Pokémon Trainer with refined strength and deepened kindness. \n$What I look for in my opponent is superb strength… \n$Please unleash your power to the fullest!" + }, + "victory": { + "1": "My Pokémon and I learned so much! I offer you my thanks." + }, + "defeat": { + "1": "I aspire to claim victory with elegance and grace." + } + }, + "diantha": { + "encounter": { + "1": "Battling against you and your Pokémon, all of you brimming with hope for the future… \n$Honestly, it just fills me up with energy I need to keep facing each new day! It does!" + }, + "victory": { + "1": "Witnessing the noble spirits of you and your Pokémon in battle has really touched my heart…" + }, + "defeat": { + "1": "Oh, fantastic! What did you think? My team was pretty cool, right?" + } + }, + "wikstrom": { + "encounter": { + "1": "Well met, young challenger! Verily am I the famed blade of hardened steel, Duke Wikstrom! \n$Let the battle begin! En garde!", + "1_female": "Well met, young challenger! Verily am I the famed blade of hardened steel, Duke Wikstrom! \n$Let the battle begin! En garde!" + }, + "victory": { + "1": "Glorious! The trust that you share with your honorable Pokémon surpasses even mine!", + "1_female": "Glorious! The trust that you share with your honorable Pokémon surpasses even mine!" + }, + "defeat": { + "1": "What manner of magic is this? My heart, it doth hammer ceaselessly in my breast! \n$Winning against such a worthy opponent doth give my soul wings--thus do I soar!", + "1_female": "What manner of magic is this? My heart, it doth hammer ceaselessly in my breast! \n$Winning against such a worthy opponent doth give my soul wings--thus do I soar!" + } + }, + "acerola": { + "encounter": { + "1": "Battling is just plain fun! Come on, I can take you!" + }, + "victory": { + "1": "I'm… I'm speechless! How did you do it?!" + }, + "defeat": { + "1": "Ehaha! What an amazing victory!" + } + }, + "larry_elite": { + "encounter": { + "1": "Hello there… It's me, Larry.\n$I serve as a member of the Elite Four too, yes… Unfortunately for me." + }, + "victory": { + "1": "Well, that took the wind from under our wings…" + }, + "defeat": { + "1": "It's time for a meeting with the boss." + } + }, + "lance": { + "encounter": { + "1": "I've been waiting for you. Allow me to test your skill.", + "2": "I thought that you would be able to get this far. Let's get this started." + }, + "victory": { + "1": "You got me. You are magnificent!", + "1_female": "You got me. You are magnificent!", + "2": "I never expected another trainer to beat me… I'm surprised.", + "2_female": "I never expected another trainer to beat me… I'm surprised." + }, + "defeat": { + "1": "That was close. Want to try again?", + "2": "It's not that you are weak. Don't let it bother you.", + "2_female": "It's not that you are weak. Don't let it bother you." + } + }, + "karen": { + "encounter": { + "1": "I am Karen. Would you care for a showdown with my Dark-type Pokémon?", + "2": "I am unlike those you've already met.", + "3": "You've assembled a charming team. Our battle should be a good one." + }, + "victory": { + "1": "No! I can't win. How did you become so strong?", + "2": "I will not stray from my chosen path.", + "3": "The Champion is looking forward to meeting you." + }, + "defeat": { + "1": "That's about what I expected.", + "2": "Well, that was relatively entertaining.", + "3": "Come visit me anytime." + } + }, + "milo": { + "encounter": { + "1": "Sure seems like you understand Pokémon real well. \n$This is gonna be a doozy of a battle! \n$I'll have to Dynamax my Pokémon if I want to win!" + }, + "victory": { + "1": "The power of Grass has wilted… What an incredible Challenger!", + "1_female": "The power of Grass has wilted… What an incredible Challenger!" + }, + "defeat": { + "1": "This'll really leave you in shock and awe." + } + }, + "lucian": { + "encounter": { + "1": "Just a moment, please. The book I'm reading has nearly reached its thrilling climax… \n$The hero has obtained a mystic sword and is about to face their final trial… Ah, never mind. \n$Since you've made it this far, I'll put that aside and battle you. \n$Let me see if you'll achieve as much glory as the hero of my book!" + }, + "victory": { + "1": "I see… It appears you've put me in checkmate." + }, + "defeat": { + "1": "I have a reputation to uphold." + } + }, + "drasna": { + "encounter": { + "1": "You must be a strong Trainer. Yes, quite strong indeed…\n$That's just wonderful news! Facing opponents like you and your team will make my Pokémon grow like weeds!", + "1_female": "You must be a strong Trainer. Yes, quite strong indeed…\n$That's just wonderful news! Facing opponents like you and your team will make my Pokémon grow like weeds!" + }, + "victory": { + "1": "Oh, dear me. That sure was a quick battle… I do hope you'll come back again sometime!" + }, + "defeat": { + "1": "How can this be?" + } + }, + "kahili": { + "encounter": { + "1": "So, here you are… Why don't we see who the winds favor today, you… Or me?" + }, + "victory": { + "1": "It's frustrating to me as a member of the Elite Four, but it seems your strength is the real deal." + }, + "defeat": { + "1": "That was an ace!" + } + }, + "hassel": { + "encounter": { + "1": "Prepare to learn firsthand how the fiery breath of ferocious battle feels!" + }, + "victory": { + "1": "Fortune smiled on me this time, but… \n$Judging from how the match went, who knows if I will be so lucky next time." + }, + "defeat": { + "1": "That was an ace!" + } + }, + "blue": { + "encounter": { + "1": "You must be pretty good to get this far.", + "1_female": "You must be pretty good to get this far." + }, + "victory": { + "1": "I've only lost to him and now to you… Him? Hee, hee…" + }, + "defeat": { + "1": "See? My power is what got me here." + } + }, + "piers": { + "encounter": { + "1": "Get ready for a mosh pit with me and my party! Spikemuth, it's time to rock!" + }, + "victory": { + "1": "Me an' my team gave it our best. Let's meet up again for a battle some time…" + }, + "defeat": { + "1": "My throat's ragged from shoutin'… But 'at was an excitin' battle!" + } + }, + "red": { + "encounter": { + "1": "…!" + }, + "victory": { + "1": "…?" + }, + "defeat": { + "1": "…!" + } + }, + "jasmine": { + "encounter": { + "1": "Oh… Your Pokémon are impressive. I think I will enjoy this." + }, + "victory": { + "1": "You are truly strong. I'll have to try much harder, too." + }, + "defeat": { + "1": "I never expected to win." + } + }, + "lance_champion": { + "encounter": { + "1": "I am still the Champion. I won't hold anything back." + }, + "victory": { + "1": "This is the emergence of a new Champion.", + "1_female": "This is the emergence of a new Champion." + }, + "defeat": { + "1": "I successfully defended my Championship." + } + }, + "steven": { + "encounter": { + "1": "Tell me… What have you seen on your journey with your Pokémon? \n$What have you felt, meeting so many other Trainers out there? \n$Traveling this rich land… Has it awoken something inside you? \n$I want you to come at me with all that you've learned. \n$My Pokémon and I will respond in turn with all that we know!" + }, + "victory": { + "1": "So I, the Champion, fall in defeat…" + }, + "defeat": { + "1": "That was time well spent! Thank you!" + } + }, + "cynthia": { + "encounter": { + "1": "I, Cynthia, accept your challenge! There won't be any letup from me!" + }, + "victory": { + "1": "No matter how fun the battle is, it will always end sometime…" + }, + "defeat": { + "1": "Even if you lose, never lose your love of Pokémon." + } + }, + "iris": { + "encounter": { + "1": "Know what? I really look forward to having serious battles with strong Trainers! \n$I mean, come on! The Trainers who make it here are Trainers who desire victory with every fiber of their being! \n$And they are battling alongside Pokémon that have been through countless difficult battles! \n$If I battle with people like that, not only will I get stronger, my Pokémon will, too! \n$And we'll get to know each other even better! OK! Brace yourself! \n$I'm Iris, the Pokémon League Champion, and I'm going to defeat you!" + }, + "victory": { + "1": "Aghhhh… I did my best, but we lost…" + }, + "defeat": { + "1": "Yay! We won!" + } + }, + "hau": { + "encounter": { + "1": "I wonder if a Trainer battles differently depending on whether they're from a warm region or a cold region.\n$Let's test it out!" + }, + "victory": { + "1": "That was awesome! I think I kinda understand your vibe a little better now!" + }, + "defeat": { + "1": "Ma-an, that was some kinda battle!" + } + }, + "geeta": { + "encounter": { + "1": "I decided to throw my hat in the ring once more. \n$Come now… Show me the fruits of your training." + }, + "victory": { + "1": "I eagerly await news of all your achievements!" + }, + "defeat": { + "1": "What's the matter? This isn't all, is it?" + } + }, + "nemona": { + "encounter": { + "1": "Yesss! I'm so psyched! Time for us to let loose!" + }, + "victory": { + "1": "Well, that stinks, but I still had fun! I'll getcha next time!" + }, + "defeat": { + "1": "Well, that was a great battle! Fruitful for sure." + } + }, + "leon": { + "encounter": { + "1": "We're gonna have an absolutely champion time!" + }, + "victory": { + "1": "My time as Champion is over… \n$But what a champion time it's been! \n$Thank you for the greatest battle I've ever had!" + }, + "defeat": { + "1": "An absolute champion time, that was!" + } + }, + "whitney": { + "encounter": { + "1": "Hey! Don't you think Pokémon are, like, super cute?" + }, + "victory": { + "1": "Waaah! Waaah! You're so mean!", + "1_female": "Waaah! Waaah! You're so mean!" + }, + "defeat": { + "1": "And that's that!" + } + }, + "chuck": { + "encounter": { + "1": "Hah! You want to challenge me? Are you brave or just ignorant?", + "1_female": "Hah! You want to challenge me? Are you brave or just ignorant?" + }, + "victory": { + "1": "You're strong! Would you please make me your apprentice?" + }, + "defeat": { + "1": "There. Do you realize how much more powerful I am than you?" + } + }, + "katy": { + "encounter": { + "1": "Don't let your guard down unless you would like to find yourself knocked off your feet!", + "1_female": "Don't let your guard down unless you would like to find yourself knocked off your feet!" + }, + "victory": { + "1": "All of my sweet little Pokémon dropped like flies!" + }, + "defeat": { + "1": "Eat up, my cute little Vivillon!" + } + }, + "pryce": { + "encounter": { + "1": "Youth alone does not ensure victory! Experience is what counts." + }, + "victory": { + "1": "Outstanding! That was perfect. Try not to forget what you feel now." + }, + "defeat": { + "1": "Just as I envisioned." + } + }, + "clair": { + "encounter": { + "1": "Do you know who I am? And you still dare to challenge me?" + }, + "victory": { + "1": "I wonder how far you can get with your skill level. This should be fascinating." + }, + "defeat": { + "1": "That's that." + } + }, + "maylene": { + "encounter": { + "1": "I've come to challenge you now, and I won't hold anything back. \n$Please prepare yourself for battle!", + "1_female": "I've come to challenge you now, and I won't hold anything back. \n$Please prepare yourself for battle!" + }, + "victory": { + "1": "I admit defeat…" + }, + "defeat": { + "1": "That was awesome." + } + }, + "fantina": { + "encounter": { + "1": "You shall challenge me, yes? But I shall win. \n$That is what the Gym Leader of Hearthome does, non?" + }, + "victory": { + "1": "You are so fantastically strong. I know why I have lost." + }, + "defeat": { + "1": "I am so, so, very happy!" + } + }, + "byron": { + "encounter": { + "1": "Trainer! You're young, just like my son, Roark. \n$With more young Trainers taking charge, the future of Pokémon is bright! \n$So, as a wall for young people, I'll take your challenge!", + "1_female": "Trainer! You're young, just like my son, Roark. \n$With more young Trainers taking charge, the future of Pokémon is bright! \n$So, as a wall for young people, I'll take your challenge!" + }, + "victory": { + "1": "Hmm! My sturdy Pokémon--defeated!" + }, + "defeat": { + "1": "Gwahahaha! How were my sturdy Pokémon?!" + } + }, + "olympia": { + "encounter": { + "1": "An ancient custom deciding one's destiny. The battle begins!" + }, + "victory": { + "1": "Create your own path. Let nothing get in your way. Your fate, your future." + }, + "defeat": { + "1": "Our path is clear now." + } + }, + "volkner": { + "encounter": { + "1": "Since you've come this far, you must be quite strong…\n$I hope you're the Trainer who'll make me remember how fun it is to battle!", + "1_female": "Since you've come this far, you must be quite strong…\n$I hope you're the Trainer who'll make me remember how fun it is to battle!" + }, + "victory": { + "1": "You've got me beat…\n$Your desire and the noble way your Pokémon battled for you… \n$I even felt thrilled during our match. That was a very good battle." + }, + "defeat": { + "1": "It was not shocking at all… \n$That is not what I wanted!" + } + }, + "burgh": { + "encounter": { + "1": "M'hm… If I win this battle, I feel like I can draw a picture unlike any before it. \n$OK! I can hear my battle muse loud and clear. Let's get straight to it!", + "2": "Of course, I'm really proud of all of my Pokémon! \n$Well now… Let's get right to it!" + }, + "victory": { + "1": "Is it over? Has my muse abandoned me?", + "2": "Hmm… It's over! You're incredible!" + }, + "defeat": { + "1": "Wow… It's beautiful somehow, isn't it…", + "2": "Sometimes I hear people say something was an ugly win. \n$I think if you're trying your best, any win is beautiful." + } + }, + "elesa": { + "encounter": { + "1": "C'est fini! When I'm certain of that, I feel an electric jolt run through my body! \n$I want to feel the sensation, so now my beloved Pokémon are going to make your head spin!" + }, + "victory": { + "1": "I meant to make your head spin, but you shocked me instead." + }, + "defeat": { + "1": "That was unsatisfying somehow… Will you give it your all next time?" + } + }, + "skyla": { + "encounter": { + "1": "It's finally time for a showdown! That means the Pokémon battle that decides who's at the top, right? \n$I love being on the summit! 'Cause you can see forever and ever from high places! \n$So, how about you and I have some fun?" + }, + "victory": { + "1": "Being your opponent in battle is a new source of strength to me. Thank you!" + }, + "defeat": { + "1": "Win or lose, you always gain something from a battle, right?" + } + }, + "brycen": { + "encounter": { + "1": "There is also strength in being with other people and Pokémon. \n$Receiving their support makes you stronger. I'll show you this power!" + }, + "victory": { + "1": "The wonderful combination of you and your Pokémon! What a beautiful friendship!" + }, + "defeat": { + "1": "Extreme conditions really test you and train you!" + } + }, + "drayden": { + "encounter": { + "1": "What I want to find is a young Trainer who can show me a bright future. \n$Let's battle with everything we have: your skill, my experience, and the love we've raised our Pokémon with!" + }, + "victory": { + "1": "This intense feeling that floods me after a defeat… I don't know how to describe it." + }, + "defeat": { + "1": "Harrumph! I know your ability is greater than that!" + } + }, + "grant": { + "encounter": { + "1": "There is only one thing I wish for. \n$That by surpassing one another, we find a way to even greater heights." + }, + "victory": { + "1": "You are a wall that I am unable to surmount!" + }, + "defeat": { + "1": "Do not give up. \n$That is all there really is to it. \n$The most important lessons in life are simple." + } + }, + "korrina": { + "encounter": { + "1": "Time for Lady Korrina's big appearance!" + }, + "victory": { + "1": "It's your very being that allows your Pokémon to evolve!" + }, + "defeat": { + "1": "What an explosive battle!" + } + }, + "clemont": { + "encounter": { + "1": "Oh! I'm glad that we got to meet!" + }, + "victory": { + "1": "Your passion for battle inspires me!" + }, + "defeat": { + "1": "Looks like my Trainer-Grow-Stronger Machine, Mach 2 is really working!" + } + }, + "valerie": { + "encounter": { + "1": "Oh, if it isn't a young Trainer… It is lovely to get to meet you like this. \n$Then I suppose you have earned yourself the right to a battle, as a reward for your efforts. \n$The elusive Fairy may appear frail as the breeze and delicate as a bloom, but it is strong.", + "1_female": "Oh, if it isn't a young Trainer… It is lovely to get to meet you like this. \n$Then I suppose you have earned yourself the right to a battle, as a reward for your efforts. \n$The elusive Fairy may appear frail as the breeze and delicate as a bloom, but it is strong." + }, + "victory": { + "1": "I hope that you will find things worth smiling about tomorrow…" + }, + "defeat": { + "1": "Oh goodness, what a pity…" + } + }, + "wulfric": { + "encounter": { + "1": "You know what? We all talk big about what you learn from battling and bonds and all that…\n$But really, I just do it 'cause it's fun. \n$Who cares about the grandstanding? Let's get to battling!" + }, + "victory": { + "1": "Outstanding! I'm tough as an iceberg, but you smashed me through and through!" + }, + "defeat": { + "1": "Tussle with me and this is what happens!" + } + }, + "kabu": { + "encounter": { + "1": "Every Trainer and Pokémon trains hard in pursuit of victory. \n$But that means your opponent is also working hard to win. \n$In the end, the match is decided by which side is able to unleash their true potential." + }, + "victory": { + "1": "I'm glad I could battle you today!" + }, + "defeat": { + "1": "That's a great way for me to feel my own growth!" + } + }, + "bea": { + "encounter": { + "1": "Do you have an unshakable spirit that won't be moved, no matter how you are attacked? \n$I think I'll just test that out, shall I?" + }, + "victory": { + "1": "I felt the fighting spirit of your Pokémon as you led them in battle." + }, + "defeat": { + "1": "That was the best sort of match anyone could ever hope for." + } + }, + "opal": { + "encounter": { + "1": "Let me have a look at how you and your partner Pokémon behave!" + }, + "victory": { + "1": "Your pink is still lacking, but you're an excellent Trainer with excellent Pokémon.", + "1_female": "Your pink is still lacking, but you're an excellent Trainer with excellent Pokémon." + }, + "defeat": { + "1": "Too bad for you, I guess." + } + }, + "bede": { + "encounter": { + "1": "I suppose I should prove beyond doubt just how pathetic you are and how strong I am.", + "1_female": "I suppose I should prove beyond doubt just how pathetic you are and how strong I am." + }, + "victory": { + "1": "I see… Well, that's fine. I wasn't really trying all that hard anyway." + }, + "defeat": { + "1": "Not a bad job, I suppose." + } + }, + "gordie": { + "encounter": { + "1": "So, let's get this over with." + }, + "victory": { + "1": "I just want to climb into a hole… Well, I guess it'd be more like falling from here." + }, + "defeat": { + "1": "Battle like you always do, victory will follow!" + } + }, + "marnie": { + "encounter": { + "1": "The truth is, when all's said and done… I really just wanna become Champion for myself! \n$So don't take it personal when I kick your butt!" + }, + "victory": { + "1": "OK, so I lost… But I got to see a lot of the good points of you and your Pokémon!" + }, + "defeat": { + "1": "Hope you enjoyed our battle tactics." + } + }, + "raihan": { + "encounter": { + "1": "I'm going to defeat the Champion, win the whole tournament, and prove to the world just how strong the great Raihan really is!" + }, + "victory": { + "1": "I look this good even when I lose. \n$It's a real curse. \n$Guess it's time for another selfie!" + }, + "defeat": { + "1": "Let's take a selfie to remember this." + } + }, + "brassius": { + "encounter": { + "1": "I assume you are ready? Let our collaborative work of art begin!", + "1_female": "I assume you are ready? Let our collaborative work of art begin!" + }, + "victory": { + "1": "Ahhh…vant-garde!" + }, + "defeat": { + "1": "I will begin on a new piece at once!" + } + }, + "iono": { + "encounter": { + "1": "How're ya feelin' about this battle?\n$...\n$Let's get this show on the road! How strong is our challenger? \n$I 'unno! Let's find out together!", + "1_female": "How're ya feelin' about this battle?\n$...\n$Let's get this show on the road! How strong is our challenger? \n$I 'unno! Let's find out together!" + }, + "victory": { + "1": "You're as flashy and bright as a 10,000,000-volt Thunderbolt, friendo!", + "1_female": "You're as flashy and bright as a 10,000,000-volt Thunderbolt, friendo!" + }, + "defeat": { + "1": "Your eyeballs are MINE!" + } + }, + "larry": { + "encounter": { + "1": "When all's said and done, simplicity is strongest." + }, + "victory": { + "1": "A serving of defeat, huh?" + }, + "defeat": { + "1": "I'll call it a day." + } + }, + "ryme": { + "encounter": { + "1": "Come on, baby! Rattle me down to the bone!" + }, + "victory": { + "1": "You're cool, my friend—you move my SOUL!", + "1_female": "You're cool, my friend—you move my SOUL!" + }, + "defeat": { + "1": "Later, baby!" + } + }, + "grusha": { + "encounter": { + "1": "All I need to do is make sure the power of my Pokémon chills you to the bone!" + }, + "victory": { + "1": "Your burning passion… I kinda like it, to be honest." + }, + "defeat": { + "1": "Things didn't heat up for you." + } + }, + "marnie_elite": { + "encounter": { + "1": "You've made it this far, huh? Let's see if you can handle my Pokémon!", + "2": "I'll give it my best shot, but don't think I'll go easy on you!" + }, + "victory": { + "1": "I can't believe I lost... But you deserved that win. Well done!", + "2": "Looks like I've still got a lot to learn. Great battle, though!" + }, + "defeat": { + "1": "You put up a good fight, but I've got the edge! Better luck next time!", + "2": "Seems like my training's paid off. Thanks for the battle!" + } + }, + "nessa_elite": { + "encounter": { + "1": "The tides are turning in my favor. Ready to get swept away?", + "1_female": "The tides are turning in my favor. Ready to get swept away?", + "2": "Let's make some waves with this battle! I hope you're prepared!", + "2_female": "Let's make some waves with this battle! I hope you're prepared!" + }, + "victory": { + "1": "You navigated those waters perfectly... Well done!", + "2": "Looks like my currents were no match for you. Great job!" + }, + "defeat": { + "1": "Water always finds a way. That was a refreshing battle!", + "2": "You fought well, but the ocean's power is unstoppable!" + } + }, + "bea_elite": { + "encounter": { + "1": "Prepare yourself! My fighting spirit burns bright!", + "2": "Let's see if you can keep up with my relentless pace!" + }, + "victory": { + "1": "Your strength... It's impressive. You truly deserve this win.", + "2": "I've never felt this intensity before. Amazing job!" + }, + "defeat": { + "1": "Another victory for my intense training regimen! Well done!", + "2": "You've got strength, but I trained harder. Great battle!" + } + }, + "allister_elite": { + "encounter": { + "1": "Shadows fall... Are you ready to face your fears?", + "1_female": "Shadows fall... Are you ready to face your fears?", + "2": "Let's see if you can handle the darkness that I command." + }, + "victory": { + "1": "You've dispelled the shadows... For now. Well done.", + "2": "Your light pierced through my darkness. Great job." + }, + "defeat": { + "1": "The shadows have spoken... Your strength isn't enough.", + "2": "Darkness triumphs... Maybe next time you'll see the light." + } + }, + "raihan_elite": { + "encounter": { + "1": "Storm's brewing! Let's see if you can weather this fight!", + "2": "Get ready to face the eye of the storm!" + }, + "victory": { + "1": "You've bested the storm... Incredible job!", + "2": "You rode the winds perfectly... Great battle!" + }, + "defeat": { + "1": "Another storm weathered, another victory claimed! Well fought!", + "2": "You got caught in my storm! Better luck next time!", + "2_female": "You got caught in my storm! Better luck next time!" + } + }, + "alder": { + "encounter": { + "1": "Prepare yourself for a match against the strongest Trainer in Unova!" + }, + "victory": { + "1": "Well done! You certainly are an unmatched talent." + }, + "defeat": { + "1": "A fresh wind blows through my heart...\n$What an extraordinary effort!" + } + }, + "kieran": { + "encounter": { + "1": "Through hard work, I become stronger and stronger!\n$I don't lose." + }, + "victory": { + "1": "I don't believe it...\n$What a fun and heart-pounding battle!" + }, + "defeat": { + "1": "Wowzers, what a battle!\n$Time for you to train even harder." + } + }, + "rival": { + "encounter": { + "1": "@c{smile}あっ、ここに いたんだ! 旅に 出る前に 「じゃ またね!」って くらい 聞きたかったよ……$@c{smile_eclosed}やっぱり 夢を 追ってこうと しているんだ? 信じられない ほどね……$@c{serious_smile_fists}じゃあ、 ここまで 来たから バトルしよっか? 覚悟してるかを 確かめたい から!$@c{serious_mopen_fists}遠慮せずに 全力で かかってこいぜ!" + }, + "victory": { + "1": "@c{shock}ウワッ、カンゼンに ぶっ壊したぜ。\n初心者だとは 思えないほど……$@c{smile}たぶん 運が良っかった だけが……\n最後まで 行ける素質が あるかもな!$こっちの アイテムを あげよう、 博士に そう言いつけたから。 結構 スゴそうな もんだ!$@c{serious_smile_fists}ここからも ガンバレ!" + } + }, + "rival_female": { + "encounter": { + "1": "@c{smile_wave}あ、ついに 見つけた! あちこち 探したのよ! \n@c{angry_mopen}だーい親友に お別れを 言うまでも 忘れちゃった?$@c{smile_ehalf}大切な 夢を 追っていくのね?\n やっぱり、この日が 来たのね……$@c{smile}とにかく! アタシを 忘れちゃったのを 許せる 条件は 一つ: \n@c{smile_wave_wink}アタシと バトルだ!$@c{angry_mopen}全力で かかってきなさい!\n冒険が 第一歩で 終わっちゃうと もったいない でしょう?" + }, + "victory": { + "1": "@c{shock}始まった バッカリなのに そんなに強い?!@d{96}\n@c{angry}完全に チートだろう?\n$@c{smile_wave_wink}なんちゃって!@d{64} @c{smile_eclosed}正々堂々と 負けたよ。 冒険 上手く行ける 気がするね!\n$@c{smile}ところで、こっち! 博士からの アイテムを あげるわ。きっと 便利だと 思うよ!\n$@c{smile_wave}いつも通り 頑張ってね! 信じてるから!" + } + }, + "rival_2": { + "encounter": { + "1": "@c{smile}おや、なんと グウゼン。\n@c{smile_eclosed}今までも パーフェクトに 勝った ようだな……\n$@c{serious_mopen_fists}なんか 忍び寄った みたいだとは 分かるけど、 そんなことない… ほとんどはな。\n$@c{serious_smile_fists}ぶっちゃけ言うと、 オレが 負けた時から 再戦したくて ウズウズしてたぜ。\n$張り切って 特訓したから 今は ちゃんと 勢い 見せるんだ。\n$@c{serious_mopen_fists}今回も 遠慮しな!\n行こうぜ!" + }, + "victory": { + "1": "@c{neutral_eclosed}あ。 自信過剰かも。\n$@c{smile}いいけどさ、 こうなるのを 見込んだから。\n@c{serious_mopen_fists}次回まで もっと頑張らなくちゃ ってことだよな!\n\n$@c{smile}きっと 助け 要らないんだが、 もう一つの アイテムが 欲しいかと 思ったから あげるぜ。\n\n$@c{serious_smile_fists}でも これで ラストだ!\n相手に 利点を あげ続けると 行けないんだろう!" + } + }, + "rival_2_female": { + "encounter": { + "1": "@c{smile_wave}あっ、 こんなとこで 偶然だね! まだ 倒れないようだ。@c{angry_mopen}フム、えらいえらい!\n$@c{angry_mopen}考えてるのは 分かる、 つきまとってるワケ じゃないから!@c{smile_eclosed}この辺に いただけよ。\n$@c{smile_ehalf}ここまで 頑張っていて 良かったけど、 時々 負けることも 大丈夫だと 知ってるよね?\n$@c{smile}みんなは 失敗から 学ぶ… いつまでも 成功し続ける よりもね。\n$@c{angry_mopen}とにかく! 再戦の ために 大変 トレーニングしてたから 全・勢・力で 戦おう!" + }, + "victory": { + "1": "@c{neutral}…今回は 負ける はずじゃなかった…\n$@c{smile}しょうがないね。 次回まで もっともっと トレーニングしなくちゃ ってこと!\n$@c{smile_wave}そして! もう二つの アイテム、 どうぞ!\n@c{smile_wave_wink}「ありがと」なんて 必要ない!\n$@c{angry_mopen}でもね、 これで 最後! 今から サービス 一つも あげないよ~" + }, + "defeat": { + "1": "時々 負けることも いいんだよ…" + } + }, + "rival_3": { + "encounter": { + "1": "@c{smile}Hey, look who it is! It's been a while.\n@c{neutral}You're… still undefeated? Huh.\n$@c{neutral_eclosed}Things have been kind of… strange.\nIt's not the same back home without you.\n$@c{serious}I know it's selfish, but I need to get this off my chest.\n@c{neutral_eclosed}I think you're in over your head here.\n$@c{serious}Never losing once is just unrealistic.\nWe need to lose sometimes in order to grow.\n$@c{neutral_eclosed}You've had a great run but there's still so much ahead, and it only gets harder. @c{neutral}Are you prepared for that?\n$@c{serious_mopen_fists}If so, prove it to me." + }, + "victory": { + "1": "@c{angry_mhalf}This is ridiculous… I've hardly stopped training…\nHow are we still so far apart?" + } + }, + "rival_3_female": { + "encounter": { + "1": "@c{smile_wave}ヒサブリ~! まだ 負けてないね。\n@c{angry}だんだん イラッと来る。@c{smile_wave_wink}なんちゃって!\n$@c{smile_ehalf}でもよ、 本当に ふるさとが 恋しくないの? それとも… アタシ…?\nずっと会いたいよ… あの、みんなはね!\n$@c{smile_eclosed}夢を 叶ってるのを 応援してるけど、 実際は やがて 負ける。\n$@c{smile}その時が 来たら アタシは いつも通り そばにいるよ。\n@c{angry_mopen}さあ、 ここまで 頑張ってきた アタシの 力を 見せさせて!" + }, + "victory": { + "1": "@c{shock}もう… 足りなかった…?\nこのままで 決して 帰らない だろう……" + }, + "defeat": { + "1": "ベストを 尽くした。 じゃ、 帰りましょう。" + } + }, + "rival_4": { + "encounter": { + "1": "@c{neutral}Hey.\n$I won't mince words or pleasantries with you.\n@c{neutral_eclosed}I'm here to win, plain and simple.\n$@c{serious_mhalf_fists}I've learned to maximize my potential by putting all my time into training.\n$@c{smile}You get a lot of extra time when you cut out the unnecessary sleep and social interaction.\n$@c{serious_mopen_fists}None of that matters anymore, not until I win.\n$@c{neutral_eclosed}I've even reached the point where I don't lose anymore.\n@c{smile_eclosed}I suppose your philosophy wasn't so wrong after all.\n$@c{angry_mhalf}Losing is for the weak, and I'm not weak anymore.\n$@c{serious_mopen_fists}Prepare yourself." + }, + "victory": { + "1": "@c{neutral}What…@d{64} What are you?" + } + }, + "rival_4_female": { + "encounter": { + "1": "@c{neutral}アタシよ! また 忘れちゃった… のね?\n$@c{smile}こんな 遠くまで 来たのは 鼻が高いことだよ! おめでと~\nしかし、 ここは 終着点だね。\n$@c{smile_eclosed}アタシの 中にある 全然 知らなかった 部分を 目覚めたよ。\n今は、 トレーニングしか してないみたい。\n$@c{smile_ehalf}食べたり 寝たりも しなくて 朝から晩まで ポケモンを 育って、 毎日 昨日より 強くなってる。\n$@c{neutral}実は… もう 自分 認識できない。\n$結局、 峠を越して まるで カミに なった。\n今は 誰にも アタシを 倒せないと 思う。\n$ねえ、分かる? 全ては アンタの お陰で。\n@c{smile_ehalf}お礼を言うか アンタのこと嫌いか どうしたらいいの 分からない。\n$@c{angry_mopen}覚悟しなさい。" + }, + "victory": { + "1": "@c{neutral}一体…@d{64} 何モノか…?" + }, + "defeat": { + "1": "$@c{smile}ここまで 頑張ってたのを 誇りに思ってね。" + } + }, + "rival_5": { + "encounter": { + "1": "@c{neutral}…" + }, + "victory": { + "1": "@c{neutral}…" + } + }, + "rival_5_female": { + "encounter": { + "1": "@c{neutral}…" + }, + "victory": { + "1": "@c{neutral}…" + }, + "defeat": { + "1": "$@c{smile_ehalf}…" + } + }, + "rival_6": { + "encounter": { + "1": "@c{smile_eclosed}We meet again.\n$@c{neutral}I've had some time to reflect on all this.\nThere's a reason this all seems so strange.\n$@c{neutral_eclosed}Your dream, my drive to beat you…\nIt's all a part of something greater.\n$@c{serious}This isn't about me, or about you… This is about the world, @c{serious_mhalf_fists}and it's my purpose to push you to your limits.\n$@c{neutral_eclosed}Whether I've fulfilled that purpose I can't say, but I've done everything in my power.\n$@c{neutral}This place we ended up in is terrifying… Yet somehow I feel unphased, like I've been here before.\n$@c{serious_mhalf_fists}You feel the same, don't you?\n$@c{serious}…and it's like something here is speaking to me.\nThis is all the world's known for a long time now.\n$Those times we cherished together that seem so recent are nothing but a distant memory.\n$@c{neutral_eclosed}Who can say whether they were ever even real in the first place.\n$@c{serious_mopen_fists}You need to keep pushing, because if you don't, it will never end. You're the only one who can do this.\n$@c{serious_smile_fists}I hardly know what any of this means, I just know that it's true.\n$@c{serious_mopen_fists}If you can't defeat me here and now, you won't stand a chance." + }, + "victory": { + "1": "@c{smile_eclosed}It looks like my work is done here.\n$I want you to promise me one thing.\n@c{smile}After you heal the world, please come home." + } + }, + "rival_6_female": { + "encounter": { + "1": "@c{smile_ehalf}また アタシたちだけに なった。\n$@c{smile_eclosed}ねえ、 頭の中に グルグル 巡ることが あってよ。\n$@c{smile_ehalf}アタシとアナタの 間に 起こしたことも, この変な感情も……\n$@c{smile}アナタの夢、 アタシの野心…\n$アタシたちが し続けることも 全ては… より高い 目的が あると思うよ。\n$@c{smile_eclosed}最果ての 限界まで 押すこと… それは アタシの 役割だと思う。\n$@c{smile_ehalf}今まで 役割を 上手く果たせたかは 分からないけど…… 一生懸命 頑張った。\n$こんな奇妙な 恐ろしい場所で なんか… 全てが 明らかに 見られるみたい。\n$昔から… これだけしかは この世界こそ そのもの。\n$@c{smile_eclosed}アタシたちが 大切にした 心にギュッと 抱いた思い出… もう 思い出せない。\n$@c{smile_ehalf}本当は 全部 ウソだったの? 今は 遠い彼方に あるみたい。\n$@c{angry_mopen}アナタは 最後まで 戦い続けなければ 決して 終わらない。 アナタしか できないのよ。\n$@c{smile_ehalf}この全ての 意味、 全然 分からないけど… 真実だと 感じてる。\n$@c{neutral}今ここで アタシを 倒せないと 最後に 勝ち目は ナイ。" + }, + "victory": { + "1": "@c{smile_ehalf}役割… 果たせたと思う。\n$@c{smile_eclosed}ね、 約束して。 この世界を 癒やしたら… お願い 無事に 帰って。\n$@c{smile_ehalf}……ありがとう。" + } + } +} diff --git a/src/locales/ja/fight-ui-handler.json b/src/locales/ja/fight-ui-handler.json index 2318cebd2d3..41ec140c2ca 100644 --- a/src/locales/ja/fight-ui-handler.json +++ b/src/locales/ja/fight-ui-handler.json @@ -1,7 +1,7 @@ { "pp": "PP", - "power": "いりょく", - "accuracy": "めいちゅう", - "abilityFlyInText": " {{pokemonName}}の {{passive}}{{abilityName}}", - "passive": "Passive " -} \ No newline at end of file + "power": "威力", + "accuracy": "命中", + "abilityFlyInText": " {{pokemonName}}の\n{{passive}}:{{abilityName}}", + "passive": "パッシブ " +} diff --git a/src/locales/ja/filter-bar.json b/src/locales/ja/filter-bar.json index c09705d9b50..891b7d87674 100644 --- a/src/locales/ja/filter-bar.json +++ b/src/locales/ja/filter-bar.json @@ -32,7 +32,7 @@ "noPokerus": "ポケルス - なし", "sortByNumber": "No.", "sortByCost": "ポイント", - "sortByCandies": "飴の数", + "sortByCandies": "アメの数", "sortByIVs": "個体値", "sortByName": "名前" -} \ No newline at end of file +} diff --git a/src/locales/ja/game-stats-ui-handler.json b/src/locales/ja/game-stats-ui-handler.json index 2fff802734a..25301aa4297 100644 --- a/src/locales/ja/game-stats-ui-handler.json +++ b/src/locales/ja/game-stats-ui-handler.json @@ -12,26 +12,26 @@ "dailyRunAttempts": "デイリーラン", "dailyRunWins": "デイリーラン勝利", "endlessRuns": "エンドレスラン", - "highestWaveEndless": "エンドレス最高波", + "highestWaveEndless": "エンドレス最高ラウンド", "highestMoney": "最大貯金", "highestDamage": "最大ダメージ", "highestHPHealed": "最大HP回復", "pokemonEncountered": "遭遇したポケモン", "pokemonDefeated": "倒したポケモン", "pokemonCaught": "捕まえたポケモン", - "eggsHatched": "孵化したタマゴ", + "eggsHatched": "ふかしたタマゴ", "subLegendsSeen": "見つけた順伝説ポケモン", "subLegendsCaught": "捕まえた準伝説ポケモン", - "subLegendsHatched": "孵化した準伝説ポケモン", + "subLegendsHatched": "ふかした準伝説ポケモン", "legendsSeen": "見つけた伝説ポケモン", "legendsCaught": "捕まえた伝説ポケモン", - "legendsHatched": "孵化した伝説ポケモン", + "legendsHatched": "ふかした伝説ポケモン", "mythicalsSeen": "見つけた幻ポケモン", "mythicalsCaught": "捕まえた幻ポケモン", - "mythicalsHatched": "孵化した幻ポケモン", + "mythicalsHatched": "ふかした幻ポケモン", "shiniesSeen": "見つけた色違いポケモン", "shiniesCaught": "捕まえた色違いポケモン", - "shiniesHatched": "孵化した色違いポケモン", + "shiniesHatched": "ふかした色違いポケモン", "pokemonFused": "吸収合体したポケモン", "trainersDefeated": "倒したトレーナー", "eggsPulled": "引いたタマゴ", diff --git a/src/locales/ja/growth.json b/src/locales/ja/growth.json index 3d23fa1f46d..e5c1317632f 100644 --- a/src/locales/ja/growth.json +++ b/src/locales/ja/growth.json @@ -1,8 +1,8 @@ { - "Erratic": "60まんタイプ", - "Fast": "80まんタイプ", - "Medium_Fast": "100まんタイプ", - "Medium_Slow": "105まんタイプ", - "Slow": "125まんタイプ", - "Fluctuating": "164まんタイプ" -} \ No newline at end of file + "Erratic": "60万タイプ", + "Fast": "80万タイプ", + "Medium_Fast": "100万タイプ", + "Medium_Slow": "105万タイプ", + "Slow": "125万タイプ", + "Fluctuating": "164万タイプ" +} diff --git a/src/locales/ja/menu-ui-handler.json b/src/locales/ja/menu-ui-handler.json index 1930c3999c6..851c8478e9d 100644 --- a/src/locales/ja/menu-ui-handler.json +++ b/src/locales/ja/menu-ui-handler.json @@ -24,6 +24,6 @@ "linkGoogle": "Google連携", "unlinkGoogle": "Google連携解除", "cancel": "キャンセル", - "losingProgressionWarning": "戦闘開始からの データが 保存されません。\nよろしいですか?", - "noEggs": "現在は タマゴを 孵化していません!" + "losingProgressionWarning": "戦闘開始からの データが セーブされません。\nよろしいですか?", + "noEggs": "現在は タマゴを ふかしていません!" } diff --git a/src/locales/ja/modifier-type.json b/src/locales/ja/modifier-type.json index f1fcc4d3005..e249e3c430f 100644 --- a/src/locales/ja/modifier-type.json +++ b/src/locales/ja/modifier-type.json @@ -353,7 +353,7 @@ "description": "やせいのポケモンがかくれとくせいをもつかくりつをおおきくふやす" }, "IV_SCANNER": { - "name": "こたいち たんちき", + "name": "こたいちスキャナー", "description": "やせいのポケモンのこたいちをスキャンできる。スタックごとに2つのこたいちがあきらかになる。もっともたかいこたいちがさいしょにひょうじされる" }, "DNA_SPLICERS": { diff --git a/src/locales/ja/modifier.json b/src/locales/ja/modifier.json index a42a849e232..c33bb9be151 100644 --- a/src/locales/ja/modifier.json +++ b/src/locales/ja/modifier.json @@ -1,12 +1,12 @@ { "surviveDamageApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で もちこたえた!", - "turnHealApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 少し 回復!", - "hitHealApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 少し 回復!", + "turnHealApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 少し 体力を 回復した!", + "hitHealApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 少し 体力を 回復した!", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}}は\n{{typeName}}で 復活した!", "resetNegativeStatStageApply": "{{pokemonNameWithAffix}}は {{typeName}}で\n下がった能力が 元に戻った!", "moneyInterestApply": "{{typeName}}から {{moneyAmount}}円 取得した!", - "turnHeldItemTransferApply": "{{pokemonName}}の {{typeName}}が\n{{pokemonNameWithAffix}}の {{itemName}}を 吸い取った!", - "contactHeldItemTransferApply": "{{pokemonName}}の {{typeName}}が\n{{pokemonNameWithAffix}}の {{itemName}}を うばい取った!", + "turnHeldItemTransferApply": "{{pokemonName}}の {{typeName}}が\n{{pokemonNameWithAffix}}の {{itemName}}を 吸い取った!", + "contactHeldItemTransferApply": "{{pokemonName}}の {{typeName}}が\n{{pokemonNameWithAffix}}の {{itemName}}を 奪い取った!", "enemyTurnHealApply": "{{pokemonNameWithAffix}}は\n体力を 回復!", "bypassSpeedChanceApply": "{{pokemonName}}は {{itemName}}で\n行動が はやくなった!" -} \ No newline at end of file +} diff --git a/src/locales/ja/move-trigger.json b/src/locales/ja/move-trigger.json index 11a327c01d7..7449d8c6e4b 100644 --- a/src/locales/ja/move-trigger.json +++ b/src/locales/ja/move-trigger.json @@ -1,64 +1,69 @@ { - "hitWithRecoil": "{{pokemonName}}は\nはんどうによる ダメージを うけた!", - "cutHpPowerUpMove": "{{pokemonName}}は\nたいりょくを けずって パワーぜんかい!", - "absorbedElectricity": "{{pokemonName}}は\n でんきを きゅうしゅうした!", - "switchedStatChanges": "{{pokemonName}}は あいてと じぶんの\nのうりょくへんかを いれかえた!", - "sharedGuard": "{{pokemonName}}は\nおたがいのガードを シェアした!", - "sharedPower": "{{pokemonName}}は\nおたがいのパワーを シェアした!", - "goingAllOutForAttack": "{{pokemonName}}は\nほんきを だした!", - "regainedHealth": "{{pokemonName}}は\nたいりょくを かいふくした!", - "keptGoingAndCrashed": "いきおいあまって {{pokemonName}}は\nじめんに ぶつかった!", - "fled": "{{pokemonName}}は にげだした!", - "cannotBeSwitchedOut": "{{pokemonName}}を\nもどすことが できない!", - "swappedAbilitiesWithTarget": "{{pokemonName}}は\nおたがいの とくせいを いれかえた!", - "coinsScatteredEverywhere": "こばんが あたりに ちらばった!", + "hitWithRecoil": "{{pokemonName}}は\n反動による ダメージを 受けた!", + "cutHpPowerUpMove": "{{pokemonName}}は\n体力を 削って 技の 威力を 上がった!", + "absorbedElectricity": "{{pokemonName}}は\n 電気を 吸収した!", + "switchedStatChanges": "{{pokemonName}}は 相手と 自分の\n能力変化を 入れ替えた!", + "switchedTwoStatChanges": "{{pokemonName}}は 相手と 自分の {{firstStat}}と\n{{secondStat}}の 能力変化を 入れ替えた!", + "switchedStat": "{{pokemonName}}は 相手と {{stat}}を 入れ替えた!", + "sharedGuard": "{{pokemonName}}は\nお互いのガードを シェアした!", + "sharedPower": "{{pokemonName}}は\nお互いのパワーを シェアした!", + "goingAllOutForAttack": "{{pokemonName}}は\n本気を 出した!", + "regainedHealth": "{{pokemonName}}は\n体力を 回復した!", + "keptGoingAndCrashed": "勢い余って {{pokemonName}}は\n地面に ぶつかった!", + "fled": "{{pokemonName}}は 逃げ出した!", + "cannotBeSwitchedOut": "{{pokemonName}}を\n戻すことが できない!", + "swappedAbilitiesWithTarget": "{{pokemonName}}は\nお互いの 特性を 入れ替えた!", + "coinsScatteredEverywhere": "小判が 辺りに 散らばった!", "attackedByItem": "{{pokemonName}}に\n{{itemName}}が おそいかかる!", - "whippedUpAWhirlwind": "{{pokemonName}}の まわりで\nくうきが うずをまく!", - "flewUpHigh": "{{pokemonName}}は\nそらたかく とびあがった!", - "tookInSunlight": "{{pokemonName}}は\nひかりを きゅうしゅうした!", - "dugAHole": "{{pokemonName}}は\nじめんに もぐった!", - "loweredItsHead": "{{pokemonName}}は\nくびを ひっこめた!", - "isGlowing": "{{pokemonName}}を\nはげしいひかりが つつむ!", - "bellChimed": "すずのおとが ひびきわたった!", - "foresawAnAttack": "{{pokemonName}}は\nみらいに こうげきを よちした!", - "hidUnderwater": "{{pokemonName}}は\nすいちゅうに みをひそめた!", - "soothingAromaWaftedThroughArea": "ここちよい かおりが ひろがった!", - "sprangUp": "{{pokemonName}}は\nたかく とびはねた!", - "choseDoomDesireAsDestiny": "{{pokemonName}}は\nはめつのねがいを みらいに たくした!", - "vanishedInstantly": "{{pokemonName}}の すがたが\nいっしゅんにして きえた!", - "tookTargetIntoSky": "{{pokemonName}}は {{targetName}}を\nじょうくうに つれさった!", - "becameCloakedInFreezingLight": "{{pokemonName}}は\nつめたいひかりに つつまれた!", - "becameCloakedInFreezingAir": "{{pokemonName}}は\nこごえるくうきに つつまれた!", - "isChargingPower": "{{pokemonName}}は\nパワーを ためこんでいる!", - "burnedItselfOut": "{{pokemonName}}の ほのうは\nもえつきた!", - "startedHeatingUpBeak": "{{pokemonName}}は\nクチバシを かねつしはじめた!", + "whippedUpAWhirlwind": "{{pokemonName}}の 周りで\n空気が 渦を巻く!", + "flewUpHigh": "{{pokemonName}}は\n空高く 飛び上がった!", + "tookInSunlight": "{{pokemonName}}は\n光を 吸収した!", + "dugAHole": "{{pokemonName}}は\n地面に 潜った!", + "loweredItsHead": "{{pokemonName}}は\n首を 引っ込めた!", + "isGlowing": "{{pokemonName}}を\n激しい光が 包む!", + "bellChimed": "鈴の音が 響き渡った!", + "foresawAnAttack": "{{pokemonName}}は\n未来に 攻撃を 予知した!", + "isTighteningFocus": "{{pokemonName}}は\n集中力を 高めている!", + "hidUnderwater": "{{pokemonName}}は\n水中に 身を潜めた!", + "soothingAromaWaftedThroughArea": "心地よい 香りが 広がった!", + "sprangUp": "{{pokemonName}}は\n高く 飛び跳ねた!", + "choseDoomDesireAsDestiny": "{{pokemonName}}は\nはめつのねがいを 未来に 託した!", + "vanishedInstantly": "{{pokemonName}}の 姿が\n一瞬にして 消えた!", + "tookTargetIntoSky": "{{pokemonName}}は {{targetName}}を\n上空に 連れ去った!", + "becameCloakedInFreezingLight": "{{pokemonName}}は\n冷たい光に 包まれた!", + "becameCloakedInFreezingAir": "{{pokemonName}}は\n凍える空気に 包まれた!", + "isChargingPower": "{{pokemonName}}は\nパワーを 溜め込んでいる!", + "burnedItselfOut": "{{pokemonName}}の 炎は 燃え尽きた!", + "startedHeatingUpBeak": "{{pokemonName}}は\nクチバシを 加熱し始めた!", "setUpShellTrap": "{{pokemonName}}は\nトラップシェルを 仕掛けた!", - "isOverflowingWithSpacePower": "{{pokemonName}}に\nうちゅうの ちからが あふれだす!", - "usedUpAllElectricity": "{{pokemonName}}は\nでんきを つかいきった!", - "stoleItem": "{{pokemonName}}は\n{{targetName}}の {{itemName}}を ぬすんだ!", - "incineratedItem": "{{pokemonName}}は\n{{targetName}}の {{itemName}}を もやした!", - "knockedOffItem": "{{pokemonName}}は\n{{targetName}}の {{itemName}}を はたきおとした!", - "tookMoveAttack": "{{pokemonName}}は\n{{moveName}}の こうげきを うけた!", - "cutOwnHpAndMaximizedStat": "{{pokemonName}}は\nたいりょくを けずって {{statName}}ぜんかい!", - "copiedStatChanges": "{{pokemonName}}は {{targetName}}の\nのうりょくへんかを コピーした!", + "isOverflowingWithSpacePower": "{{pokemonName}}に\n宇宙の 力が 溢れ出す!", + "usedUpAllElectricity": "{{pokemonName}}は\n電気を 使い切った!", + "stoleItem": "{{pokemonName}}は\n{{targetName}}の {{itemName}}を 盗んだ!", + "incineratedItem": "{{pokemonName}}は\n{{targetName}}の {{itemName}}を 燃やした!", + "knockedOffItem": "{{pokemonName}}は\n{{targetName}}の {{itemName}}を はたき落とした!", + "tookMoveAttack": "{{pokemonName}}は\n{{moveName}}の 攻撃を 受けた!", + "cutOwnHpAndMaximizedStat": "{{pokemonName}}は\n体力を 削って {{statName}}全開!", + "copiedStatChanges": "{{pokemonName}}は {{targetName}}の\n能力変化を コピーした!", "magnitudeMessage": "マグニチュード{{magnitude}}!", - "tookAimAtTarget": "{{pokemonName}}は {{targetName}}に\nねらいを さだめた!", + "tookAimAtTarget": "{{pokemonName}}は {{targetName}}に\n狙いを 定めた!", "transformedIntoType": "{{pokemonName}}は\n{{typeName}}タイプに なった!", "copiedMove": "{{pokemonName}}は\n{{moveName}}を コピーした!", "sketchedMove": "{{pokemonName}}は\n{{moveName}}を スケッチした!", - "acquiredAbility": "{{pokemonName}}の とくせいが\n{{abilityName}}に なった!", + "acquiredAbility": "{{pokemonName}}の 特性が\n{{abilityName}}に なった!", "copiedTargetAbility": "{{pokemonName}}は\n{{targetName}}の {{abilityName}}を コピーした!", - "transformedIntoTarget": "{{pokemonName}}は\n{{targetName}}に へんしんした!", - "tryingToTakeFoeDown": "{{pokemonName}}は あいてを\nみちづれに しようとしている!", - "addType": "{{pokemonName}}に\n{{typeName}}タイプが ついかされた!", - "cannotUseMove": "{{pokemonName}}は\n{{moveName}}を つかえなかった!", - "healHp": "{{pokemonName}}の\nたいりょくが かいふくした!", - "sacrificialFullRestore": "{{pokemonName}}の\nねがいごとが かなった!", - "invertStats": "{{pokemonName}}の\nのうりょくへんかが ぎゃくてんした!", - "resetStats": "{{pokemonName}}の\nのうりょくへんかが もとにもどった!", - "faintCountdown": "{{pokemonName}}は\n{{turnCount}}ターンごに ほろびてしまう!", + "transformedIntoTarget": "{{pokemonName}}は\n{{targetName}}に 変身した!", + "tryingToTakeFoeDown": "{{pokemonName}}は 相手を\nみちづれに しようとしている!", + "addType": "{{pokemonName}}に\n{{typeName}}タイプが 追加された!", + "cannotUseMove": "{{pokemonName}}は\n{{moveName}}を 使えなかった!", + "healHp": "{{pokemonName}}の\n体力が 回復した!", + "sacrificialFullRestore": "{{pokemonName}}の\nいやしのねがいが 叶った!", + "invertStats": "{{pokemonName}}は\n能力変化が ひっくり返った!", + "resetStats": "{{pokemonName}}の\n能力変化が 元に戻った!", + "statEliminated": "全ての 能力変化が 元に戻った!", + "faintCountdown": "{{pokemonName}}は\n{{turnCount}}ターン後に 滅びてしまう!", "copyType": "{{pokemonName}}は {{targetPokemonName}}と\n同じタイプに なった!", - "suppressAbilities": "{{pokemonName}}の とくせいが きかなくなった!", + "suppressAbilities": "{{pokemonName}}の 特性が 効かなくなった!", "revivalBlessing": "{{pokemonName}}は\n復活して 戦えるようになった!", - "swapArenaTags": "{{pokemonName}}は\nおたがいの ばのこうかを いれかえた!" + "swapArenaTags": "{{pokemonName}}は\nお互いの 場の 効果を 入れ替えた!", + "exposedMove": "{{pokemonName}}は {{targetPokemonName}}の\n正体を 見破った!" } diff --git a/src/locales/ja/party-ui-handler.json b/src/locales/ja/party-ui-handler.json index a3a88b2dd6e..b112653c544 100644 --- a/src/locales/ja/party-ui-handler.json +++ b/src/locales/ja/party-ui-handler.json @@ -1,8 +1,8 @@ { - "SEND_OUT": "いれかえる", - "SUMMARY": "つよさをみる", + "SEND_OUT": "入れ替える", + "SUMMARY": "強さを見る", "CANCEL": "やめる", - "RELEASE": "にがす", - "APPLY": "つかう", - "TEACH": "おしえる" -} \ No newline at end of file + "RELEASE": "逃がす", + "APPLY": "使う", + "TEACH": "教える" +} diff --git a/src/locales/ja/pokemon-info-container.json b/src/locales/ja/pokemon-info-container.json index 796ac706731..287eed23c74 100644 --- a/src/locales/ja/pokemon-info-container.json +++ b/src/locales/ja/pokemon-info-container.json @@ -1,7 +1,7 @@ { - "moveset": "わざ", - "gender": "せいべつ:", - "ability": "とくせい:", - "nature": "せいかく:", - "form": "すがた:" -} \ No newline at end of file + "moveset": "技", + "gender": "性別:", + "ability": "特性:", + "nature": "性格:", + "form": "姿:" +} diff --git a/src/locales/ja/pokemon-summary.json b/src/locales/ja/pokemon-summary.json index 9e26dfeeb6e..cf35befe6fd 100644 --- a/src/locales/ja/pokemon-summary.json +++ b/src/locales/ja/pokemon-summary.json @@ -1 +1,44 @@ -{} \ No newline at end of file +{ + "pokemonInfo": "ポケモン情報", + "status": "ステータス", + "powerAccuracyCategory": "威力\n命中\n分類", + "type": "タイプ", + "unknownTrainer": "???", + "ot": "親", + "nature": "性格", + "expPoints": "経験値", + "nextLv": "次のレベルまで", + "cancel": "キャンセル", + "memoString": "{{natureFragment}}な性格。\n{{metFragment}}", + "metFragment": { + "normal": "{{biome}}で\nLv.{{level}}の時に出会った。", + "apparently": "{{biome}}で\nLv.{{level}}の時に出会ったようだ。" + }, + "natureFragment": { + "Hardy": "{{nature}}", + "Lonely": "{{nature}}", + "Brave": "{{nature}}", + "Adamant": "{{nature}}", + "Naughty": "{{nature}}", + "Bold": "{{nature}}", + "Docile": "{{nature}}", + "Relaxed": "{{nature}}", + "Impish": "{{nature}}", + "Lax": "{{nature}}", + "Timid": "{{nature}}", + "Hasty": "{{nature}}", + "Serious": "{{nature}}", + "Jolly": "{{nature}}", + "Naive": "{{nature}}", + "Modest": "{{nature}}", + "Mild": "{{nature}}", + "Quiet": "{{nature}}", + "Bashful": "{{nature}}", + "Rash": "{{nature}}", + "Calm": "{{nature}}", + "Gentle": "{{nature}}", + "Sassy": "{{nature}}", + "Careful": "{{nature}}", + "Quirky": "{{nature}}" + } +} diff --git a/src/locales/ja/run-history.json b/src/locales/ja/run-history.json index 222f7de728d..3bf9de32c68 100644 --- a/src/locales/ja/run-history.json +++ b/src/locales/ja/run-history.json @@ -28,10 +28,10 @@ "SPDshortened": "速さ", "runInfo": "ラン情報", "money": "お金", - "runLength": "ラン最高ウェーブ", - "viewHeldItems": "手持ちアイテム", - "hallofFameText": "殿堂へようこそ!", - "hallofFameText_female": "殿堂へようこそ!", + "runLength": "時間", + "viewHeldItems": "持たせたアイテム", + "hallofFameText": "殿堂入り おめでとう!", + "hallofFameText_female": "殿堂入り おめでとう!", "viewHallOfFame": "殿堂登録を見る!", "viewEndingSplash": "クリア後のアートを見る!" -} \ No newline at end of file +} diff --git a/src/locales/ja/save-slot-select-ui-handler.json b/src/locales/ja/save-slot-select-ui-handler.json index a84e3aca23d..73250a08f4b 100644 --- a/src/locales/ja/save-slot-select-ui-handler.json +++ b/src/locales/ja/save-slot-select-ui-handler.json @@ -1,7 +1,7 @@ { "overwriteData": "選択した スロットに データを 上書きします?", "loading": "読込中…", - "wave": "波", + "wave": "ラウンド", "lv": "Lv", "empty": "なし" -} \ No newline at end of file +} diff --git a/src/locales/ja/splash-messages.json b/src/locales/ja/splash-messages.json index 9e26dfeeb6e..b7378e7a916 100644 --- a/src/locales/ja/splash-messages.json +++ b/src/locales/ja/splash-messages.json @@ -1 +1,36 @@ -{} \ No newline at end of file +{ + "battlesWon": "Battles Won!", + "joinTheDiscord": "Join the Discord!", + "infiniteLevels": "Infinite Levels!", + "everythingStacks": "Everything Stacks!", + "optionalSaveScumming": "Optional Save Scumming!", + "biomes": "35 Biomes!", + "openSource": "Open Source!", + "playWithSpeed": "Play with 5x Speed!", + "liveBugTesting": "Live Bug Testing!", + "heavyInfluence": "Heavy RoR2 Influence!", + "pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!", + "nowWithMoreSalt": "Now with 33% More Salt!", + "infiniteFusionAtHome": "Infinite Fusion at Home!", + "brokenEggMoves": "Broken Egg Moves!", + "magnificent": "Magnificent!", + "mubstitute": "Mubstitute!", + "thatsCrazy": "That's Crazy!", + "oranceJuice": "Orance Juice!", + "questionableBalancing": "Questionable Balancing!", + "coolShaders": "Cool Shaders!", + "aiFree": "AI-Free!", + "suddenDifficultySpikes": "Sudden Difficulty Spikes!", + "basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!", + "moreAddictiveThanIntended": "More Addictive than Intended!", + "mostlyConsistentSeeds": "Mostly Consistent Seeds!", + "achievementPointsDontDoAnything": "Achievement Points Don't Do Anything!", + "youDoNotStartAtLevel": "You Do Not Start at Level 2000!", + "dontTalkAboutTheManaphyEggIncident": "Don't Talk About the Manaphy Egg Incident!", + "alsoTryPokengine": "Also Try Pokéngine!", + "alsoTryEmeraldRogue": "Also Try Emerald Rogue!", + "alsoTryRadicalRed": "Also Try Radical Red!", + "eeveeExpo": "Eevee Expo!", + "ynoproject": "YNOproject!", + "breedersInSpace": "Breeders in space!" +} diff --git a/src/locales/ja/weather.json b/src/locales/ja/weather.json index 92728b81461..e2d3c6c4e32 100644 --- a/src/locales/ja/weather.json +++ b/src/locales/ja/weather.json @@ -16,17 +16,17 @@ "snowStartMessage": "雪が 降り始めた!", "snowLapseMessage": "雪が 降っている!", "snowClearMessage": "雪が 止んだ!", - "fogStartMessage": "足下に 霧(きり)が立ち込めた!", - "fogLapseMessage": "足下に 霧(きり)が 立ち込めている!", - "fogClearMessage": "足下の 霧(きり)が消え去った!", + "fogStartMessage": "足下に 霧が 立ち込めた!", + "fogLapseMessage": "足下に 霧が 立ち込めている!", + "fogClearMessage": "足下の 霧が 消え去った!", "heavyRainStartMessage": "強い雨が 降り始めた!", "heavyRainLapseMessage": "強い雨が 降っている!", "heavyRainClearMessage": "強い雨が あがった!", "harshSunStartMessage": "日差しが とても強くなった!", "harshSunLapseMessage": "日差しが とても強い!", "harshSunClearMessage": "日差しが 元に戻った!", - "strongWindsStartMessage": "謎(なぞ)の 乱気流(らんきりゅう)が\nひこうポケモンを 護(まも)る!", - "strongWindsLapseMessage": "謎(なぞ)の 乱気流(らんきりゅう)の 勢(いきお)いは 止まらない!", - "strongWindsEffectMessage": "謎(なぞ)の 乱気流(らんきりゅう)が 攻撃(こうげき)を 弱(よわ)めた!", - "strongWindsClearMessage": "謎(なぞ)の 乱気流(らんきりゅう)が おさまった!" -} \ No newline at end of file + "strongWindsStartMessage": "謎の 乱気流が\nひこうポケモンを 護る!", + "strongWindsLapseMessage": "謎の 乱気流の 勢いは 止まらない!", + "strongWindsEffectMessage": "謎の 乱気流が 攻撃を 弱めた!", + "strongWindsClearMessage": "謎の 乱気流が おさまった!" +} From 6d312a29098faf5a7953f71830af90fc08306570 Mon Sep 17 00:00:00 2001 From: damocleas Date: Thu, 5 Sep 2024 14:50:28 -0400 Subject: [PATCH 39/91] Update egg.ts Same-Species Egg Shiny Rate (#4052) --- src/data/egg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/egg.ts b/src/data/egg.ts index 9beb944de69..508263c9c8e 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -15,7 +15,7 @@ export const EGG_SEED = 1073741824; // Rates for specific random properties in 1/x const DEFAULT_SHINY_RATE = 128; const GACHA_SHINY_UP_SHINY_RATE = 64; -const SAME_SPECIES_EGG_SHINY_RATE = 24; +const SAME_SPECIES_EGG_SHINY_RATE = 12; const SAME_SPECIES_EGG_HA_RATE = 8; const MANAPHY_EGG_MANAPHY_RATE = 8; const GACHA_EGG_HA_RATE = 192; From 6e26db27b864b135303c08b23c88037b9b107f21 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:07:04 -0700 Subject: [PATCH 40/91] Protection moves now fail when used last (#4045) --- src/data/move.ts | 42 ++++++++++++++------- src/test/moves/protect.test.ts | 41 ++++++++++++++++----- src/test/moves/quick_guard.test.ts | 59 ++++++++++++++++++------------ 3 files changed, 96 insertions(+), 46 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index a591f12df90..bb85e62519b 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -6234,6 +6234,8 @@ const userSleptOrComatoseCondition: MoveConditionFunc = (user: Pokemon, target: const targetSleptOrComatoseCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => target.status?.effect === StatusEffect.SLEEP || target.hasAbility(Abilities.COMATOSE); +const failIfLastCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => user.scene.phaseQueue.find(phase => phase instanceof MovePhase) !== undefined; + export type MoveAttrFilter = (attr: MoveAttr) => boolean; function applyMoveAttrsInternal(attrFilter: MoveAttrFilter, user: Pokemon | null, target: Pokemon | null, move: Move, args: any[]): Promise { @@ -6972,7 +6974,8 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.FREEZE) .target(MoveTarget.ALL_NEAR_ENEMIES), new SelfStatusMove(Moves.PROTECT, Type.NORMAL, -1, 10, -1, 4, 2) - .attr(ProtectAttr), + .attr(ProtectAttr) + .condition(failIfLastCondition), new AttackMove(Moves.MACH_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 40, 100, 30, -1, 1, 2) .punchingMove(), new StatusMove(Moves.SCARY_FACE, Type.NORMAL, 100, 10, -1, 0, 2) @@ -7023,7 +7026,8 @@ export function initMoves() { .windMove() .target(MoveTarget.ALL_NEAR_ENEMIES), new SelfStatusMove(Moves.DETECT, Type.FIGHTING, -1, 5, -1, 4, 2) - .attr(ProtectAttr), + .attr(ProtectAttr) + .condition(failIfLastCondition), new AttackMove(Moves.BONE_RUSH, Type.GROUND, MoveCategory.PHYSICAL, 25, 90, 10, -1, 0, 2) .attr(MultiHitAttr) .makesContact(false), @@ -7041,7 +7045,8 @@ export function initMoves() { .attr(HitHealAttr) .triageMove(), new SelfStatusMove(Moves.ENDURE, Type.NORMAL, -1, 10, -1, 4, 2) - .attr(ProtectAttr, BattlerTagType.ENDURING), + .attr(ProtectAttr, BattlerTagType.ENDURING) + .condition(failIfLastCondition), new StatusMove(Moves.CHARM, Type.FAIRY, 100, 20, -1, 0, 2) .attr(StatStageChangeAttr, [ Stat.ATK ], -2), new AttackMove(Moves.ROLLOUT, Type.ROCK, MoveCategory.PHYSICAL, 30, 90, 20, -1, 0, 2) @@ -7788,7 +7793,8 @@ export function initMoves() { .attr(StatStageChangeAttr, [ Stat.ATK, Stat.ACC ], 1, true), new StatusMove(Moves.WIDE_GUARD, Type.ROCK, -1, 10, -1, 3, 5) .target(MoveTarget.USER_SIDE) - .attr(AddArenaTagAttr, ArenaTagType.WIDE_GUARD, 1, true, true), + .attr(AddArenaTagAttr, ArenaTagType.WIDE_GUARD, 1, true, true) + .condition(failIfLastCondition), new StatusMove(Moves.GUARD_SPLIT, Type.PSYCHIC, -1, 10, -1, 0, 5) .attr(AverageStatsAttr, [ Stat.DEF, Stat.SPDEF ], "moveTriggers:sharedGuard"), new StatusMove(Moves.POWER_SPLIT, Type.PSYCHIC, -1, 10, -1, 0, 5) @@ -7876,7 +7882,8 @@ export function initMoves() { .attr(PositiveStatStagePowerAttr), new StatusMove(Moves.QUICK_GUARD, Type.FIGHTING, -1, 15, -1, 3, 5) .target(MoveTarget.USER_SIDE) - .attr(AddArenaTagAttr, ArenaTagType.QUICK_GUARD, 1, true, true), + .attr(AddArenaTagAttr, ArenaTagType.QUICK_GUARD, 1, true, true) + .condition(failIfLastCondition), new SelfStatusMove(Moves.ALLY_SWITCH, Type.PSYCHIC, -1, 15, -1, 2, 5) .ignoresProtect() .unimplemented(), @@ -8047,7 +8054,8 @@ export function initMoves() { new StatusMove(Moves.MAT_BLOCK, Type.FIGHTING, -1, 10, -1, 0, 6) .target(MoveTarget.USER_SIDE) .attr(AddArenaTagAttr, ArenaTagType.MAT_BLOCK, 1, true, true) - .condition(new FirstMoveCondition()), + .condition(new FirstMoveCondition()) + .condition(failIfLastCondition), new AttackMove(Moves.BELCH, Type.POISON, MoveCategory.SPECIAL, 120, 90, 10, -1, 0, 6) .condition((user, target, move) => user.battleData.berriesEaten.length > 0), new StatusMove(Moves.ROTOTILLER, Type.GROUND, -1, 10, -1, 0, 6) @@ -8105,7 +8113,8 @@ export function initMoves() { .triageMove(), new StatusMove(Moves.CRAFTY_SHIELD, Type.FAIRY, -1, 10, -1, 3, 6) .target(MoveTarget.USER_SIDE) - .attr(AddArenaTagAttr, ArenaTagType.CRAFTY_SHIELD, 1, true, true), + .attr(AddArenaTagAttr, ArenaTagType.CRAFTY_SHIELD, 1, true, true) + .condition(failIfLastCondition), new StatusMove(Moves.FLOWER_SHIELD, Type.FAIRY, -1, 10, -1, 0, 6) .target(MoveTarget.ALL) .attr(StatStageChangeAttr, [ Stat.DEF ], 1, false, (user, target, move) => target.getTypes().includes(Type.GRASS) && !target.getTag(SemiInvulnerableTag)), @@ -8130,7 +8139,8 @@ export function initMoves() { .target(MoveTarget.BOTH_SIDES) .unimplemented(), new SelfStatusMove(Moves.KINGS_SHIELD, Type.STEEL, -1, 10, -1, 4, 6) - .attr(ProtectAttr, BattlerTagType.KINGS_SHIELD), + .attr(ProtectAttr, BattlerTagType.KINGS_SHIELD) + .condition(failIfLastCondition), new StatusMove(Moves.PLAY_NICE, Type.NORMAL, -1, 20, -1, 0, 6) .attr(StatStageChangeAttr, [ Stat.ATK ], -1), new StatusMove(Moves.CONFIDE, Type.NORMAL, -1, 20, -1, 0, 6) @@ -8153,7 +8163,8 @@ export function initMoves() { new AttackMove(Moves.MYSTICAL_FIRE, Type.FIRE, MoveCategory.SPECIAL, 75, 100, 10, 100, 0, 6) .attr(StatStageChangeAttr, [ Stat.SPATK ], -1), new SelfStatusMove(Moves.SPIKY_SHIELD, Type.GRASS, -1, 10, -1, 4, 6) - .attr(ProtectAttr, BattlerTagType.SPIKY_SHIELD), + .attr(ProtectAttr, BattlerTagType.SPIKY_SHIELD) + .condition(failIfLastCondition), new StatusMove(Moves.AROMATIC_MIST, Type.FAIRY, -1, 20, -1, 0, 6) .attr(StatStageChangeAttr, [ Stat.SPDEF ], 1) .target(MoveTarget.NEAR_ALLY), @@ -8349,7 +8360,8 @@ export function initMoves() { new AttackMove(Moves.FIRST_IMPRESSION, Type.BUG, MoveCategory.PHYSICAL, 90, 100, 10, -1, 2, 7) .condition(new FirstMoveCondition()), new SelfStatusMove(Moves.BANEFUL_BUNKER, Type.POISON, -1, 10, -1, 4, 7) - .attr(ProtectAttr, BattlerTagType.BANEFUL_BUNKER), + .attr(ProtectAttr, BattlerTagType.BANEFUL_BUNKER) + .condition(failIfLastCondition), new AttackMove(Moves.SPIRIT_SHACKLE, Type.GHOST, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 7) .attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, false, 1, 1, true) .makesContact(false), @@ -8592,6 +8604,7 @@ export function initMoves() { /* Unused */ new SelfStatusMove(Moves.MAX_GUARD, Type.NORMAL, -1, 10, -1, 4, 8) .attr(ProtectAttr) + .condition(failIfLastCondition) .ignoresVirtual(), /* End Unused */ new AttackMove(Moves.DYNAMAX_CANNON, Type.DRAGON, MoveCategory.SPECIAL, 100, 100, 5, -1, 0, 8) @@ -8770,7 +8783,8 @@ export function initMoves() { .target(MoveTarget.USER_AND_ALLIES) .ignoresProtect(), new SelfStatusMove(Moves.OBSTRUCT, Type.DARK, 100, 10, -1, 4, 8) - .attr(ProtectAttr, BattlerTagType.OBSTRUCT), + .attr(ProtectAttr, BattlerTagType.OBSTRUCT) + .condition(failIfLastCondition), new AttackMove(Moves.FALSE_SURRENDER, Type.DARK, MoveCategory.PHYSICAL, 80, -1, 10, -1, 0, 8), new AttackMove(Moves.METEOR_ASSAULT, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 5, -1, 0, 8) .attr(RechargeAttr) @@ -9061,7 +9075,8 @@ export function initMoves() { .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1, true, (user, target, move) => user.isTerastallized() && user.isOfType(Type.STELLAR)) .partial(), new SelfStatusMove(Moves.SILK_TRAP, Type.BUG, -1, 10, -1, 4, 9) - .attr(ProtectAttr, BattlerTagType.SILK_TRAP), + .attr(ProtectAttr, BattlerTagType.SILK_TRAP) + .condition(failIfLastCondition), new AttackMove(Moves.AXE_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 90, 10, 30, 0, 9) .attr(MissEffectAttr, crashDamageFunc) .attr(NoEffectAttr, crashDamageFunc) @@ -9253,7 +9268,8 @@ export function initMoves() { .attr(PreMoveMessageAttr, doublePowerChanceMessageFunc) .attr(DoublePowerChanceAttr), new SelfStatusMove(Moves.BURNING_BULWARK, Type.FIRE, -1, 10, -1, 4, 9) - .attr(ProtectAttr, BattlerTagType.BURNING_BULWARK), + .attr(ProtectAttr, BattlerTagType.BURNING_BULWARK) + .condition(failIfLastCondition), new AttackMove(Moves.THUNDERCLAP, Type.ELECTRIC, MoveCategory.SPECIAL, 70, 100, 5, -1, 1, 9) .condition((user, target, move) => user.scene.currentBattle.turnCommands[target.getBattlerIndex()]?.command === Command.FIGHT && !target.turnData.acted && allMoves[user.scene.currentBattle.turnCommands[target.getBattlerIndex()]?.move?.move!].category !== MoveCategory.STATUS), // TODO: is this bang correct? new AttackMove(Moves.MIGHTY_CLEAVE, Type.ROCK, MoveCategory.PHYSICAL, 95, 100, 5, -1, 0, 9) diff --git a/src/test/moves/protect.test.ts b/src/test/moves/protect.test.ts index d792f586a37..83cd088aa47 100644 --- a/src/test/moves/protect.test.ts +++ b/src/test/moves/protect.test.ts @@ -7,7 +7,8 @@ import { Moves } from "#enums/moves"; import { Stat } from "#enums/stat"; import { allMoves } from "#app/data/move"; import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; -import { BerryPhase } from "#app/phases/berry-phase"; +import { BattlerIndex } from "#app/battle"; +import { MoveResult } from "#app/field/pokemon"; const TIMEOUT = 20 * 1000; @@ -43,13 +44,13 @@ describe("Moves - Protect", () => { test( "should protect the user from attacks", async () => { - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const leadPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.PROTECT); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); }, TIMEOUT @@ -61,13 +62,13 @@ describe("Moves - Protect", () => { game.override.enemyMoveset(Array(4).fill(Moves.CEASELESS_EDGE)); vi.spyOn(allMoves[Moves.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const leadPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.PROTECT); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); expect(game.scene.arena.getTagOnSide(ArenaTrapTag, ArenaTagSide.ENEMY)).toBeUndefined(); @@ -79,13 +80,13 @@ describe("Moves - Protect", () => { async () => { game.override.enemyMoveset(Array(4).fill(Moves.CHARM)); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const leadPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.PROTECT); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.getStatStage(Stat.ATK)).toBe(0); }, TIMEOUT @@ -96,18 +97,38 @@ describe("Moves - Protect", () => { async () => { game.override.enemyMoveset(Array(4).fill(Moves.TACHYON_CUTTER)); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const leadPokemon = game.scene.getPlayerPokemon()!; - const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.PROTECT); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); expect(enemyPokemon.turnData.hitCount).toBe(1); }, TIMEOUT ); + + test( + "should fail if the user is the last to move in the turn", + async () => { + game.override.enemyMoveset(Array(4).fill(Moves.PROTECT)); + + await game.classicMode.startBattle([Species.CHARIZARD]); + + const leadPokemon = game.scene.getPlayerPokemon()!; + const enemyPokemon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.PROTECT); + + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + + await game.phaseInterceptor.to("BerryPhase", false); + + expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS); + expect(leadPokemon.getLastXMoves()[0].result).toBe(MoveResult.FAIL); + }, TIMEOUT + ); }); diff --git a/src/test/moves/quick_guard.test.ts b/src/test/moves/quick_guard.test.ts index 25f98f8fa61..5f4af40eb71 100644 --- a/src/test/moves/quick_guard.test.ts +++ b/src/test/moves/quick_guard.test.ts @@ -5,8 +5,8 @@ import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Stat } from "#enums/stat"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; +import { BattlerIndex } from "#app/battle"; +import { MoveResult } from "#app/field/pokemon"; const TIMEOUT = 20 * 1000; @@ -42,19 +42,16 @@ describe("Moves - Quick Guard", () => { test( "should protect the user and allies from priority moves", async () => { - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); - const leadPokemon = game.scene.getPlayerField(); + const playerPokemon = game.scene.getPlayerField(); game.move.select(Moves.QUICK_GUARD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(Moves.SPLASH, 1); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); - leadPokemon.forEach(p => expect(p.hp).toBe(p.getMaxHp())); + playerPokemon.forEach(p => expect(p.hp).toBe(p.getMaxHp())); }, TIMEOUT ); @@ -64,19 +61,16 @@ describe("Moves - Quick Guard", () => { game.override.enemyAbility(Abilities.PRANKSTER); game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); - const leadPokemon = game.scene.getPlayerField(); + const playerPokemon = game.scene.getPlayerField(); game.move.select(Moves.QUICK_GUARD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(Moves.SPLASH, 1); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); - leadPokemon.forEach(p => expect(p.getStatStage(Stat.ATK)).toBe(0)); + playerPokemon.forEach(p => expect(p.getStatStage(Stat.ATK)).toBe(0)); }, TIMEOUT ); @@ -85,21 +79,40 @@ describe("Moves - Quick Guard", () => { async () => { game.override.enemyMoveset(Array(4).fill(Moves.WATER_SHURIKEN)); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); - const leadPokemon = game.scene.getPlayerField(); + const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); game.move.select(Moves.QUICK_GUARD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(Moves.FOLLOW_ME, 1); - await game.phaseInterceptor.to(BerryPhase, false); + await game.phaseInterceptor.to("BerryPhase", false); - leadPokemon.forEach(p => expect(p.hp).toBe(p.getMaxHp())); + playerPokemon.forEach(p => expect(p.hp).toBe(p.getMaxHp())); enemyPokemon.forEach(p => expect(p.turnData.hitCount).toBe(1)); } ); + + test( + "should fail if the user is the last to move in the turn", + async () => { + game.override.battleType("single"); + game.override.enemyMoveset(Array(4).fill(Moves.QUICK_GUARD)); + + await game.classicMode.startBattle([Species.CHARIZARD]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + const enemyPokemon = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.QUICK_GUARD); + + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + + await game.phaseInterceptor.to("BerryPhase", false); + + expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS); + expect(playerPokemon.getLastXMoves()[0].result).toBe(MoveResult.FAIL); + }, TIMEOUT + ); }); From deac3141a1ea35c5a34c0b5353b290c82fc342d6 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Fri, 6 Sep 2024 04:05:09 +0800 Subject: [PATCH 41/91] remove partial from tera blast (#4044) --- src/data/move.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index bb85e62519b..252c474864c 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -9072,8 +9072,7 @@ export function initMoves() { .attr(TeraBlastCategoryAttr) .attr(TeraBlastTypeAttr) .attr(TeraBlastPowerAttr) - .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1, true, (user, target, move) => user.isTerastallized() && user.isOfType(Type.STELLAR)) - .partial(), + .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1, true, (user, target, move) => user.isTerastallized() && user.isOfType(Type.STELLAR)), new SelfStatusMove(Moves.SILK_TRAP, Type.BUG, -1, 10, -1, 4, 9) .attr(ProtectAttr, BattlerTagType.SILK_TRAP) .condition(failIfLastCondition), From 57a3efd9e2e5106c5ebee015921982535cf08446 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:51:05 -0700 Subject: [PATCH 42/91] [Bug] Fix off-by-one errors in some random number calls (#3665) * Fix off-by-one error in some random number calls * Fix mock RNG function used by tests Also remove unnecessary extra RNG mock from Glaive Rush test * Just some github UI manipulation don't mind me * Update Glaive Rush test * Remove unnecessary `Math.floor()` * Remove resolved comment * Add tsdocs to various functions * Remove `src/rng.md` file * Update tsdoc --- src/battle-scene.ts | 17 ++++- src/battle.ts | 6 ++ src/data/ability.ts | 2 +- src/data/battler-tags.ts | 2 +- src/data/move.ts | 2 +- src/field/pokemon.ts | 22 ++++++- src/phases/move-effect-phase.ts | 6 +- src/test/moves/glaive_rush.test.ts | 102 ++++++++++++++++------------- src/test/utils/gameManager.ts | 2 +- src/utils.ts | 8 ++- 10 files changed, 110 insertions(+), 59 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index d4c33663c14..9123a213f4c 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -855,7 +855,7 @@ export default class BattleScene extends SceneBase { overrideModifiers(this, false); overrideHeldItems(this, pokemon, false); if (boss && !dataSource) { - const secondaryIvs = Utils.getIvsFromId(Utils.randSeedInt(4294967295)); + const secondaryIvs = Utils.getIvsFromId(Utils.randSeedInt(4294967296)); for (let s = 0; s < pokemon.ivs.length; s++) { pokemon.ivs[s] = Math.round(Phaser.Math.Linear(Math.min(pokemon.ivs[s], secondaryIvs[s]), Math.max(pokemon.ivs[s], secondaryIvs[s]), 0.75)); @@ -961,6 +961,16 @@ export default class BattleScene extends SceneBase { this.offsetGym = this.gameMode.isClassic && this.getGeneratedOffsetGym(); } + /** + * Generates a random number using the current battle's seed + * + * This calls {@linkcode Battle.randSeedInt}(`scene`, {@linkcode range}, {@linkcode min}) in `src/battle.ts` + * which calls {@linkcode Utils.randSeedInt randSeedInt}({@linkcode range}, {@linkcode min}) in `src/utils.ts` + * + * @param range How large of a range of random numbers to choose from. If {@linkcode range} <= 1, returns {@linkcode min} + * @param min The minimum integer to pick, default `0` + * @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1) + */ randBattleSeedInt(range: integer, min: integer = 0): integer { return this.currentBattle?.randSeedInt(this, range, min); } @@ -1112,7 +1122,8 @@ export default class BattleScene extends SceneBase { doubleTrainer = false; } } - newTrainer = trainerData !== undefined ? trainerData.toTrainer(this) : new Trainer(this, trainerType, doubleTrainer ? TrainerVariant.DOUBLE : Utils.randSeedInt(2) ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT); + const variant = doubleTrainer ? TrainerVariant.DOUBLE : (Utils.randSeedInt(2) ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT); + newTrainer = trainerData !== undefined ? trainerData.toTrainer(this) : new Trainer(this, trainerType, variant); this.field.add(newTrainer); } } @@ -2620,7 +2631,7 @@ export default class BattleScene extends SceneBase { if (mods.length < 1) { return mods; } - const rand = Math.floor(Utils.randSeedInt(mods.length)); + const rand = Utils.randSeedInt(mods.length); return [mods[rand], ...shuffleModifiers(mods.filter((_, i) => i !== rand))]; }; modifiers = shuffleModifiers(modifiers); diff --git a/src/battle.ts b/src/battle.ts index 0f1245a4397..b80caa9e679 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -354,6 +354,12 @@ export default class Battle { return null; } + /** + * Generates a random number using the current battle's seed. Calls {@linkcode Utils.randSeedInt} + * @param range How large of a range of random numbers to choose from. If {@linkcode range} <= 1, returns {@linkcode min} + * @param min The minimum integer to pick, default `0` + * @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1) + */ randSeedInt(scene: BattleScene, range: number, min: number = 0): number { if (range <= 1) { return min; diff --git a/src/data/ability.ts b/src/data/ability.ts index fde39ebb152..2407460b87d 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2642,7 +2642,7 @@ export class ConfusionOnStatusEffectAbAttr extends PostAttackAbAttr { if (simulated) { return defender.canAddTag(BattlerTagType.CONFUSED); } else { - return defender.addTag(BattlerTagType.CONFUSED, pokemon.randSeedInt(3, 2), move.id, defender.id); + return defender.addTag(BattlerTagType.CONFUSED, pokemon.randSeedIntRange(2, 5), move.id, defender.id); } } return false; diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index ef91dda7b63..ddb85600c18 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -486,7 +486,7 @@ export class ConfusedTag extends BattlerTag { if (pokemon.randSeedInt(3) === 0) { const atk = pokemon.getEffectiveStat(Stat.ATK); const def = pokemon.getEffectiveStat(Stat.DEF); - const damage = Utils.toDmgValue(((((2 * pokemon.level / 5 + 2) * 40 * atk / def) / 50) + 2) * (pokemon.randSeedInt(15, 85) / 100)); + const damage = Utils.toDmgValue(((((2 * pokemon.level / 5 + 2) * 40 * atk / def) / 50) + 2) * (pokemon.randSeedIntRange(85, 100) / 100)); pokemon.scene.queueMessage(i18next.t("battlerTags:confusedLapseHurtItself")); pokemon.damageAndUpdate(damage); pokemon.battleData.hitCount++; diff --git a/src/data/move.ts b/src/data/move.ts index 252c474864c..96b780a8330 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4400,7 +4400,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr { const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true); if (moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance) { - return (this.selfTarget ? user : target).addTag(this.tagType, user.randSeedInt(this.turnCountMax - this.turnCountMin, this.turnCountMin), move.id, user.id); + return (this.selfTarget ? user : target).addTag(this.tagType, user.randSeedIntRange(this.turnCountMin, this.turnCountMax), move.id, user.id); } return false; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 269d0b1dba5..f522d50f357 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1720,7 +1720,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { }; this.fusionSpecies = this.scene.randomSpecies(this.scene.currentBattle?.waveIndex || 0, this.level, false, filter, true); - this.fusionAbilityIndex = (this.fusionSpecies.abilityHidden && hasHiddenAbility ? this.fusionSpecies.ability2 ? 2 : 1 : this.fusionSpecies.ability2 ? randAbilityIndex : 0); + this.fusionAbilityIndex = (this.fusionSpecies.abilityHidden && hasHiddenAbility ? 2 : this.fusionSpecies.ability2 !== this.fusionSpecies.ability1 ? randAbilityIndex : 0); this.fusionShiny = this.shiny; this.fusionVariant = this.variant; @@ -2278,7 +2278,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (!isTypeImmune) { const levelMultiplier = (2 * source.level / 5 + 2); - const randomMultiplier = ((this.scene.randBattleSeedInt(16) + 85) / 100); + const randomMultiplier = (this.randSeedIntRange(85, 100) / 100); damage.value = Utils.toDmgValue((((levelMultiplier * power * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier @@ -3448,12 +3448,30 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { fusionCanvas.remove(); } + /** + * Generates a random number using the current battle's seed, or the global seed if `this.scene.currentBattle` is falsy + * + * This calls either {@linkcode BattleScene.randBattleSeedInt}({@linkcode range}, {@linkcode min}) in `src/battle-scene.ts` + * which calls {@linkcode Battle.randSeedInt}(`scene`, {@linkcode range}, {@linkcode min}) in `src/battle.ts` + * which calls {@linkcode Utils.randSeedInt randSeedInt}({@linkcode range}, {@linkcode min}) in `src/utils.ts`, + * or it directly calls {@linkcode Utils.randSeedInt randSeedInt}({@linkcode range}, {@linkcode min}) in `src/utils.ts` if there is no current battle + * + * @param range How large of a range of random numbers to choose from. If {@linkcode range} <= 1, returns {@linkcode min} + * @param min The minimum integer to pick, default `0` + * @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1) + */ randSeedInt(range: integer, min: integer = 0): integer { return this.scene.currentBattle ? this.scene.randBattleSeedInt(range, min) : Utils.randSeedInt(range, min); } + /** + * Generates a random number using the current battle's seed, or the global seed if `this.scene.currentBattle` is falsy + * @param min The minimum integer to generate + * @param max The maximum integer to generate + * @returns a random integer between {@linkcode min} and {@linkcode max} inclusive + */ randSeedIntRange(min: integer, max: integer): integer { return this.randSeedInt((max - min) + 1, min); } diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index f100a763219..9b22c520e19 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -377,16 +377,16 @@ export class MoveEffectPhase extends PokemonPhase { return false; } - const moveAccuracy = this.move.getMove().calculateBattleAccuracy(user!, target); // TODO: is the bang correct here? + const moveAccuracy = this.move.getMove().calculateBattleAccuracy(user, target); if (moveAccuracy === -1) { return true; } const accuracyMultiplier = user.getAccuracyMultiplier(target, this.move.getMove()); - const rand = user.randSeedInt(100, 1); + const rand = user.randSeedInt(100); - return rand <= moveAccuracy * (accuracyMultiplier!); // TODO: is this bang correct? + return rand < (moveAccuracy * accuracyMultiplier); } /** Returns the {@linkcode Pokemon} using this phase's invoked move */ diff --git a/src/test/moves/glaive_rush.test.ts b/src/test/moves/glaive_rush.test.ts index 1eac3c32bb4..5867ef751b8 100644 --- a/src/test/moves/glaive_rush.test.ts +++ b/src/test/moves/glaive_rush.test.ts @@ -1,13 +1,12 @@ import { allMoves } from "#app/data/move"; import { Abilities } from "#app/enums/abilities"; -import { DamagePhase } from "#app/phases/damage-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { Moves } from "#enums/moves"; -import { Species } from "#enums/species"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +const TIMEOUT = 20 * 1000; describe("Moves - Glaive Rush", () => { let phaserGame: Phaser.Game; @@ -25,131 +24,142 @@ describe("Moves - Glaive Rush", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleType("single"); - game.override.disableCrits(); - game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset(Array(4).fill(Moves.GLAIVE_RUSH)); - game.override.starterSpecies(Species.KLINK); - game.override.ability(Abilities.UNNERVE); - game.override.passiveAbility(Abilities.FUR_COAT); - game.override.moveset([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]); + game.override + .battleType("single") + .disableCrits() + .enemySpecies(Species.MAGIKARP) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(Array(4).fill(Moves.GLAIVE_RUSH)) + .starterSpecies(Species.KLINK) + .ability(Abilities.BALL_FETCH) + .moveset([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]); }); it("takes double damage from attacks", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); + const enemy = game.scene.getEnemyPokemon()!; enemy.hp = 1000; - vi.spyOn(game.scene, "randBattleSeedInt").mockReturnValue(0); game.move.select(Moves.SHADOW_SNEAK); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); const damageDealt = 1000 - enemy.hp; - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); game.move.select(Moves.SHADOW_SNEAK); - await game.phaseInterceptor.to(DamagePhase); + await game.phaseInterceptor.to("DamagePhase"); expect(enemy.hp).toBeLessThanOrEqual(1001 - (damageDealt * 3)); - }, 5000); // TODO: revert back to 20s + }, TIMEOUT); it("always gets hit by attacks", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); + const enemy = game.scene.getEnemyPokemon()!; enemy.hp = 1000; allMoves[Moves.AVALANCHE].accuracy = 0; game.move.select(Moves.AVALANCHE); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(enemy.hp).toBeLessThan(1000); - }, 20000); + }, TIMEOUT); it("interacts properly with multi-lens", async () => { - game.override.startingHeldItems([{ name: "MULTI_LENS", count: 2 }]); - game.override.enemyMoveset(Array(4).fill(Moves.AVALANCHE)); - await game.startBattle(); + game.override + .startingHeldItems([{ name: "MULTI_LENS", count: 2 }]) + .enemyMoveset(Array(4).fill(Moves.AVALANCHE)); + await game.classicMode.startBattle(); + const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + enemy.hp = 1000; player.hp = 1000; allMoves[Moves.AVALANCHE].accuracy = 0; game.move.select(Moves.GLAIVE_RUSH); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.hp).toBeLessThan(1000); player.hp = 1000; game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.hp).toBe(1000); - }, 20000); + }, TIMEOUT); it("secondary effects only last until next move", async () => { game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); - await game.startBattle(); + await game.classicMode.startBattle(); + const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + enemy.hp = 1000; player.hp = 1000; allMoves[Moves.SHADOW_SNEAK].accuracy = 0; game.move.select(Moves.GLAIVE_RUSH); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.hp).toBe(1000); game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); const damagedHp = player.hp; expect(player.hp).toBeLessThan(1000); game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.hp).toBe(damagedHp); - }, 20000); + }, TIMEOUT); it("secondary effects are removed upon switching", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); - game.override.starterSpecies(0); - await game.startBattle([Species.KLINK, Species.FEEBAS]); + game.override + .enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)) + .starterSpecies(0); + await game.classicMode.startBattle([Species.KLINK, Species.FEEBAS]); + const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + enemy.hp = 1000; allMoves[Moves.SHADOW_SNEAK].accuracy = 0; game.move.select(Moves.GLAIVE_RUSH); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.hp).toBe(player.getMaxHp()); game.doSwitchPokemon(1); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); game.doSwitchPokemon(1); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.hp).toBe(player.getMaxHp()); - }, 20000); + }, TIMEOUT); it("secondary effects don't activate if move fails", async () => { game.override.moveset([Moves.SHADOW_SNEAK, Moves.PROTECT, Moves.SPLASH, Moves.GLAIVE_RUSH]); - await game.startBattle(); + await game.classicMode.startBattle(); + const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + enemy.hp = 1000; player.hp = 1000; game.move.select(Moves.PROTECT); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); game.move.select(Moves.SHADOW_SNEAK); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); game.override.enemyMoveset(Array(4).fill(Moves.SPLASH)); const damagedHP1 = 1000 - enemy.hp; enemy.hp = 1000; game.move.select(Moves.SHADOW_SNEAK); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); const damagedHP2 = 1000 - enemy.hp; expect(damagedHP2).toBeGreaterThanOrEqual((damagedHP1 * 2) - 1); - }, 20000); + }, TIMEOUT); }); diff --git a/src/test/utils/gameManager.ts b/src/test/utils/gameManager.ts index f367fc70936..ade33aa1148 100644 --- a/src/test/utils/gameManager.ts +++ b/src/test/utils/gameManager.ts @@ -76,7 +76,7 @@ export default class GameManager { constructor(phaserGame: Phaser.Game, bypassLogin: boolean = true) { localStorage.clear(); ErrorInterceptor.getInstance().clear(); - BattleScene.prototype.randBattleSeedInt = (arg) => arg-1; + BattleScene.prototype.randBattleSeedInt = (range, min: number = 0) => min + range - 1; // This simulates a max roll this.gameWrapper = new GameWrapper(phaserGame, bypassLogin); this.scene = new BattleScene(); this.phaseInterceptor = new PhaseInterceptor(this.scene); diff --git a/src/utils.ts b/src/utils.ts index 173ea25b17c..fd5430d7276 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ -import i18next from "i18next"; import { MoneyFormat } from "#enums/money-format"; +import i18next from "i18next"; export const MissingTextureKey = "__MISSING"; @@ -82,6 +82,12 @@ export function randInt(range: integer, min: integer = 0): integer { return Math.floor(Math.random() * range) + min; } +/** + * Generates a random number using the global seed, or the current battle's seed if called via `Battle.randSeedInt` + * @param range How large of a range of random numbers to choose from. If {@linkcode range} <= 1, returns {@linkcode min} + * @param min The minimum integer to pick, default `0` + * @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1) + */ export function randSeedInt(range: integer, min: integer = 0): integer { if (range <= 1) { return min; From 39f3572c1bda83a1f91911364a5f0ed240503d96 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Fri, 6 Sep 2024 07:51:47 +0800 Subject: [PATCH 43/91] [Test] Add Dragon Cheer tests (#4013) * add dragon cheer tests * Update src/test/moves/dragon_cheer.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update tests --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/test/moves/dragon_cheer.test.ts | 101 ++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 src/test/moves/dragon_cheer.test.ts diff --git a/src/test/moves/dragon_cheer.test.ts b/src/test/moves/dragon_cheer.test.ts new file mode 100644 index 00000000000..747d71bd000 --- /dev/null +++ b/src/test/moves/dragon_cheer.test.ts @@ -0,0 +1,101 @@ +import { BattlerIndex } from "#app/battle"; +import { Type } from "#app/data/type"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { Abilities } from "#enums/abilities"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Moves - Dragon Cheer", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("double") + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY) + .enemyLevel(20) + .moveset([Moves.DRAGON_CHEER, Moves.TACKLE, Moves.SPLASH]); + }); + + it("increases the user's allies' critical hit ratio by one stage", async () => { + await game.classicMode.startBattle([Species.DRAGONAIR, Species.MAGIKARP]); + + const enemy = game.scene.getEnemyField()[0]; + + vi.spyOn(enemy, "getCritStage"); + + game.move.select(Moves.DRAGON_CHEER, 0); + game.move.select(Moves.TACKLE, 1, BattlerIndex.ENEMY); + + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); + + // After Tackle + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getCritStage).toHaveReturnedWith(1); // getCritStage is called on defender + }, TIMEOUT); + + it("increases the user's Dragon-type allies' critical hit ratio by two stages", async () => { + await game.classicMode.startBattle([Species.MAGIKARP, Species.DRAGONAIR]); + + const enemy = game.scene.getEnemyField()[0]; + + vi.spyOn(enemy, "getCritStage"); + + game.move.select(Moves.DRAGON_CHEER, 0); + game.move.select(Moves.TACKLE, 1, BattlerIndex.ENEMY); + + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); + + // After Tackle + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getCritStage).toHaveReturnedWith(2); // getCritStage is called on defender + }, TIMEOUT); + + it("applies the effect based on the allies' type upon use of the move, and do not change if the allies' type changes later in battle", async () => { + await game.classicMode.startBattle([Species.DRAGONAIR, Species.MAGIKARP]); + + const magikarp = game.scene.getPlayerField()[1]; + const enemy = game.scene.getEnemyField()[0]; + + vi.spyOn(enemy, "getCritStage"); + + game.move.select(Moves.DRAGON_CHEER, 0); + game.move.select(Moves.TACKLE, 1, BattlerIndex.ENEMY); + + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); + + // After Tackle + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getCritStage).toHaveReturnedWith(1); // getCritStage is called on defender + + await game.toNextTurn(); + + // Change Magikarp's type to Dragon + vi.spyOn(magikarp, "getTypes").mockReturnValue([Type.DRAGON]); + expect(magikarp.getTypes()).toEqual([Type.DRAGON]); + + game.move.select(Moves.SPLASH, 0); + game.move.select(Moves.TACKLE, 1, BattlerIndex.ENEMY); + + await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getCritStage).toHaveReturnedWith(1); // getCritStage is called on defender + }, TIMEOUT); +}); From f3bdaa12cadd7f1447acf08e84bab4603f74a0a2 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:07:24 -0700 Subject: [PATCH 44/91] [Bug][Refactor] fix username-finder issues + code & visual improvements (#4055) * fix username-finder issues & refactor `login-form-ui-handler` - reduce redundancy - add hover effect for interactable game objects - add error handler for "No save files found!" - Make user finder errors support i18n * add `disableInteractive` to mockContainer --- src/locales/en/menu.json | 4 +- .../mocks/mocksContainer/mockContainer.ts | 1 + src/ui/login-form-ui-handler.ts | 121 +++++++++++------- src/ui/modal-ui-handler.ts | 56 +++++--- src/ui/ui-handler.ts | 9 ++ 5 files changed, 127 insertions(+), 64 deletions(-) diff --git a/src/locales/en/menu.json b/src/locales/en/menu.json index 97cfc0b019d..91888e9db31 100644 --- a/src/locales/en/menu.json +++ b/src/locales/en/menu.json @@ -51,5 +51,7 @@ "renamePokemon": "Rename Pokémon", "rename": "Rename", "nickname": "Nickname", - "errorServerDown": "Oops! There was an issue contacting the server.\n\nYou may leave this window open,\nthe game will automatically reconnect." + "errorServerDown": "Oops! There was an issue contacting the server.\n\nYou may leave this window open,\nthe game will automatically reconnect.", + "noSaves": "You don't have any save files on record!", + "tooManySaves": "You have too many save files on record!" } \ No newline at end of file diff --git a/src/test/utils/mocks/mocksContainer/mockContainer.ts b/src/test/utils/mocks/mocksContainer/mockContainer.ts index 5babd9e71b2..d2cdd852257 100644 --- a/src/test/utils/mocks/mocksContainer/mockContainer.ts +++ b/src/test/utils/mocks/mocksContainer/mockContainer.ts @@ -208,4 +208,5 @@ export default class MockContainer implements MockGameObject { return this.list; } + disableInteractive = vi.fn(); } diff --git a/src/ui/login-form-ui-handler.ts b/src/ui/login-form-ui-handler.ts index 87b7730e8df..631b2e50b02 100644 --- a/src/ui/login-form-ui-handler.ts +++ b/src/ui/login-form-ui-handler.ts @@ -8,7 +8,21 @@ import { addTextObject, TextStyle } from "./text"; import { addWindow } from "./ui-theme"; import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; +interface BuildInteractableImageOpts { + scale?: number; + x?: number; + y?: number; + origin?: { x: number; y: number }; +} + export default class LoginFormUiHandler extends FormModalUiHandler { + private readonly ERR_USERNAME: string = "invalid username"; + private readonly ERR_PASSWORD: string = "invalid password"; + private readonly ERR_ACCOUNT_EXIST: string = "account doesn't exist"; + private readonly ERR_PASSWORD_MATCH: string = "password doesn't match"; + private readonly ERR_NO_SAVES: string = "No save files found"; + private readonly ERR_TOO_MANY_SAVES: string = "Too many save files found"; + private googleImage: Phaser.GameObjects.Image; private discordImage: Phaser.GameObjects.Image; private usernameInfoImage: Phaser.GameObjects.Image; @@ -21,8 +35,23 @@ export default class LoginFormUiHandler extends FormModalUiHandler { } setup(): void { - super.setup(); + this.buildExternalPartyContainer(); + + this.infoContainer = this.scene.add.container(0, 0); + + this.usernameInfoImage = this.buildInteractableImage("settings_icon", "username-info-icon", { + x: 20, + scale: 0.5 + }); + + this.infoContainer.add(this.usernameInfoImage); + this.getUi().add(this.infoContainer); + this.infoContainer.setVisible(false); + this.infoContainer.disableInteractive(); + } + + private buildExternalPartyContainer() { this.externalPartyContainer = this.scene.add.container(0, 0); this.externalPartyContainer.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.scene.game.canvas.width / 12, this.scene.game.canvas.height / 12), Phaser.Geom.Rectangle.Contains); this.externalPartyTitle = addTextObject(this.scene, 0, 4, "", TextStyle.SETTINGS_LABEL); @@ -31,23 +60,8 @@ export default class LoginFormUiHandler extends FormModalUiHandler { this.externalPartyContainer.add(this.externalPartyBg); this.externalPartyContainer.add(this.externalPartyTitle); - this.infoContainer = this.scene.add.container(0, 0); - this.infoContainer.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.scene.game.canvas.width / 12, this.scene.game.canvas.height / 12), Phaser.Geom.Rectangle.Contains); - - const googleImage = this.scene.add.image(0, 0, "google"); - googleImage.setOrigin(0, 0); - googleImage.setScale(0.07); - googleImage.setInteractive(); - googleImage.setName("google-icon"); - this.googleImage = googleImage; - - const discordImage = this.scene.add.image(20, 0, "discord"); - discordImage.setOrigin(0, 0); - discordImage.setScale(0.07); - discordImage.setInteractive(); - discordImage.setName("discord-icon"); - - this.discordImage = discordImage; + this.googleImage = this.buildInteractableImage("google", "google-icon"); + this.discordImage = this.buildInteractableImage("discord", "discord-icon"); this.externalPartyContainer.add(this.googleImage); this.externalPartyContainer.add(this.discordImage); @@ -55,59 +69,52 @@ export default class LoginFormUiHandler extends FormModalUiHandler { this.externalPartyContainer.add(this.googleImage); this.externalPartyContainer.add(this.discordImage); this.externalPartyContainer.setVisible(false); - - const usernameInfoImage = this.scene.add.image(20, 0, "settings_icon"); - usernameInfoImage.setOrigin(0, 0); - usernameInfoImage.setScale(0.5); - usernameInfoImage.setInteractive(); - usernameInfoImage.setName("username-info-icon"); - this.usernameInfoImage = usernameInfoImage; - - this.infoContainer.add(this.usernameInfoImage); - this.getUi().add(this.infoContainer); - this.infoContainer.setVisible(false); } - getModalTitle(config?: ModalConfig): string { + override getModalTitle(_config?: ModalConfig): string { return i18next.t("menu:login"); } - getFields(config?: ModalConfig): string[] { + override getFields(_config?: ModalConfig): string[] { return [ i18next.t("menu:username"), i18next.t("menu:password") ]; } - getWidth(config?: ModalConfig): number { + override getWidth(_config?: ModalConfig): number { return 160; } - getMargin(config?: ModalConfig): [number, number, number, number] { + override getMargin(_config?: ModalConfig): [number, number, number, number] { return [ 0, 0, 48, 0 ]; } - getButtonLabels(config?: ModalConfig): string[] { + override getButtonLabels(_config?: ModalConfig): string[] { return [ i18next.t("menu:login"), i18next.t("menu:register")]; } - getReadableErrorMessage(error: string): string { + override getReadableErrorMessage(error: string): string { const colonIndex = error?.indexOf(":"); if (colonIndex > 0) { error = error.slice(0, colonIndex); } switch (error) { - case "invalid username": + case this.ERR_USERNAME: return i18next.t("menu:invalidLoginUsername"); - case "invalid password": + case this.ERR_PASSWORD: return i18next.t("menu:invalidLoginPassword"); - case "account doesn't exist": + case this.ERR_ACCOUNT_EXIST: return i18next.t("menu:accountNonExistent"); - case "password doesn't match": + case this.ERR_PASSWORD_MATCH: return i18next.t("menu:unmatchingPassword"); + case this.ERR_NO_SAVES: + return i18next.t("menu:noSaves"); + case this.ERR_TOO_MANY_SAVES: + return i18next.t("menu:tooManySaves"); } return super.getReadableErrorMessage(error); } - show(args: any[]): boolean { + override show(args: any[]): boolean { if (super.show(args)) { const config = args[0] as ModalConfig; @@ -148,17 +155,16 @@ export default class LoginFormUiHandler extends FormModalUiHandler { return false; } - clear() { + override clear() { super.clear(); this.externalPartyContainer.setVisible(false); this.infoContainer.setVisible(false); + this.setMouseCursorStyle("default"); //reset cursor - this.discordImage.off("pointerdown"); - this.googleImage.off("pointerdown"); - this.usernameInfoImage.off("pointerdown"); + [this.discordImage, this.googleImage, this.usernameInfoImage].forEach((img) => img.off("pointerdown")); } - processExternalProvider(config: ModalConfig) : void { + private processExternalProvider(config: ModalConfig) : void { this.externalPartyTitle.setText(i18next.t("menu:orUse") ?? ""); this.externalPartyTitle.setX(20+this.externalPartyTitle.text.length); this.externalPartyTitle.setVisible(true); @@ -205,6 +211,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler { label: dataKeys[i].replace(keyToFind, ""), handler: () => { this.scene.ui.revertMode(); + this.infoContainer.disableInteractive(); return true; } }); @@ -213,8 +220,13 @@ export default class LoginFormUiHandler extends FormModalUiHandler { options: options, delay: 1000 }); + this.infoContainer.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.scene.game.canvas.width, this.scene.game.canvas.height), Phaser.Geom.Rectangle.Contains); } else { - return onFail("You have too many save files to use this"); + if (dataKeys.length > 2) { + return onFail(this.ERR_TOO_MANY_SAVES); + } else { + return onFail(this.ERR_NO_SAVES); + } } }); @@ -236,4 +248,21 @@ export default class LoginFormUiHandler extends FormModalUiHandler { alpha: 1 }); } + + private buildInteractableImage(texture: string, name: string, opts: BuildInteractableImageOpts = {}) { + const { + scale = 0.07, + x = 0, + y = 0, + origin = { x: 0, y: 0 } + } = opts; + const img = this.scene.add.image(x, y, texture); + img.setName(name); + img.setOrigin(origin.x, origin.y); + img.setScale(scale); + img.setInteractive(); + this.addInteractionHoverEffect(img); + + return img; + } } diff --git a/src/ui/modal-ui-handler.ts b/src/ui/modal-ui-handler.ts index cecdacc1eb9..5f586ec8db7 100644 --- a/src/ui/modal-ui-handler.ts +++ b/src/ui/modal-ui-handler.ts @@ -57,29 +57,35 @@ export abstract class ModalUiHandler extends UiHandler { const buttonLabels = this.getButtonLabels(); - const buttonTopMargin = this.getButtonTopMargin(); - for (const label of buttonLabels) { - const buttonLabel = addTextObject(this.scene, 0, 8, label, TextStyle.TOOLTIP_CONTENT); - buttonLabel.setOrigin(0.5, 0.5); - - const buttonBg = addWindow(this.scene, 0, 0, buttonLabel.getBounds().width + 8, 16, false, false, 0, 0, WindowVariant.THIN); - buttonBg.setOrigin(0.5, 0); - buttonBg.setInteractive(new Phaser.Geom.Rectangle(0, 0, buttonBg.width, buttonBg.height), Phaser.Geom.Rectangle.Contains); - - const buttonContainer = this.scene.add.container(0, buttonTopMargin); - - this.buttonBgs.push(buttonBg); - this.buttonContainers.push(buttonContainer); - - buttonContainer.add(buttonBg); - buttonContainer.add(buttonLabel); - this.modalContainer.add(buttonContainer); + this.addButton(label); } this.modalContainer.setVisible(false); } + private addButton(label: string) { + const buttonTopMargin = this.getButtonTopMargin(); + const buttonLabel = addTextObject(this.scene, 0, 8, label, TextStyle.TOOLTIP_CONTENT); + buttonLabel.setOrigin(0.5, 0.5); + + const buttonBg = addWindow(this.scene, 0, 0, buttonLabel.getBounds().width + 8, 16, false, false, 0, 0, WindowVariant.THIN); + buttonBg.setOrigin(0.5, 0); + buttonBg.setInteractive(new Phaser.Geom.Rectangle(0, 0, buttonBg.width, buttonBg.height), Phaser.Geom.Rectangle.Contains); + + const buttonContainer = this.scene.add.container(0, buttonTopMargin); + + this.buttonBgs.push(buttonBg); + this.buttonContainers.push(buttonContainer); + + buttonContainer.add(buttonBg); + buttonContainer.add(buttonLabel); + + this.addInteractionHoverEffect(buttonBg); + + this.modalContainer.add(buttonContainer); + } + show(args: any[]): boolean { if (args.length >= 1 && "buttonActions" in args[0]) { super.show(args); @@ -135,4 +141,20 @@ export abstract class ModalUiHandler extends UiHandler { this.buttonBgs.map(bg => bg.off("pointerdown")); } + + /** + * Adds a hover effect to a game object which changes the cursor to a `pointer` and tints it slighly + * @param gameObject the game object to add hover events/effects to + */ + protected addInteractionHoverEffect(gameObject: Phaser.GameObjects.Image | Phaser.GameObjects.NineSlice | Phaser.GameObjects.Sprite) { + gameObject.on("pointerover", () => { + this.setMouseCursorStyle("pointer"); + gameObject.setTint(0xbbbbbb); + }); + + gameObject.on("pointerout", () => { + this.setMouseCursorStyle("default"); + gameObject.clearTint(); + }); + } } diff --git a/src/ui/ui-handler.ts b/src/ui/ui-handler.ts index 94625efaa75..d9f0a876b71 100644 --- a/src/ui/ui-handler.ts +++ b/src/ui/ui-handler.ts @@ -52,6 +52,15 @@ export default abstract class UiHandler { return changed; } + /** + * Changes the style of the mouse cursor. + * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/cursor} + * @param cursorStyle cursor style to apply + */ + protected setMouseCursorStyle(cursorStyle: "pointer" | "default") { + this.scene.input.manager.canvas.style.cursor = cursorStyle; + } + clear() { this.active = false; } From f1650d251594307e75170b8f0954b4e87bc3a5d4 Mon Sep 17 00:00:00 2001 From: chaosgrimmon <31082757+chaosgrimmon@users.noreply.github.com> Date: Thu, 5 Sep 2024 22:32:13 -0400 Subject: [PATCH 45/91] [Sprite] Fix Tangrowth Variants (#4059) * [Sprite] Front Tangrowth male variants * [Sprite] Front Tangrowth female variants * [Sprite] Back Tangrowth female variants * [Sprite] Back Tangrowth male epic palette * Delete public/images/pokemon/variant/465_2.png * Delete public/images/pokemon/variant/back/465_3.png * Delete public/images/pokemon/variant/465_3.png * Delete public/images/pokemon/variant/465_2.json * Delete public/images/pokemon/variant/465_3.json * Delete public/images/pokemon/variant/back/465_3.json * [Sprite] Update Tangrowth variants with females --- public/images/pokemon/variant/465.json | 22 + public/images/pokemon/variant/465_2.json | 4094 ----------------- public/images/pokemon/variant/465_2.png | Bin 38802 -> 0 bytes public/images/pokemon/variant/465_3.json | 4094 ----------------- public/images/pokemon/variant/465_3.png | Bin 43995 -> 0 bytes .../images/pokemon/variant/_masterlist.json | 16 +- public/images/pokemon/variant/back/465.json | 11 +- public/images/pokemon/variant/back/465_3.json | 4094 ----------------- public/images/pokemon/variant/back/465_3.png | Bin 34654 -> 0 bytes .../pokemon/variant/back/female/465.json | 21 + public/images/pokemon/variant/female/465.json | 22 + 11 files changed, 88 insertions(+), 12286 deletions(-) create mode 100644 public/images/pokemon/variant/465.json delete mode 100644 public/images/pokemon/variant/465_2.json delete mode 100644 public/images/pokemon/variant/465_2.png delete mode 100644 public/images/pokemon/variant/465_3.json delete mode 100644 public/images/pokemon/variant/465_3.png delete mode 100644 public/images/pokemon/variant/back/465_3.json delete mode 100644 public/images/pokemon/variant/back/465_3.png create mode 100644 public/images/pokemon/variant/back/female/465.json create mode 100644 public/images/pokemon/variant/female/465.json diff --git a/public/images/pokemon/variant/465.json b/public/images/pokemon/variant/465.json new file mode 100644 index 00000000000..a7ff2338057 --- /dev/null +++ b/public/images/pokemon/variant/465.json @@ -0,0 +1,22 @@ +{ + "1": { + "529cc5": "8153c7", + "d65a94": "5ad662", + "3a73ad": "6b3aad", + "bd216b": "21bd69", + "5a193a": "195a2a", + "193a63": "391963", + "295a84": "472984" + }, + "2": { + "529cc5": "ffedb6", + "d65a94": "e67d2f", + "3a73ad": "ebc582", + "bd216b": "b35131", + "31313a": "3d1519", + "5a193a": "752e2e", + "193a63": "705040", + "295a84": "ad875a", + "4a4a52": "57211a" + } +} \ No newline at end of file diff --git a/public/images/pokemon/variant/465_2.json b/public/images/pokemon/variant/465_2.json deleted file mode 100644 index 7c6d5ea081a..00000000000 --- a/public/images/pokemon/variant/465_2.json +++ /dev/null @@ -1,4094 +0,0 @@ -{ - "textures": [ - { - "image": "465_2.png", - "format": "RGBA8888", - "size": { - "w": 407, - "h": 407 - }, - "scale": 1, - "frames": [ - { - "filename": "0009.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0010.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0041.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0042.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0073.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0074.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0139.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0140.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0171.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0172.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0007.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0008.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0039.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0040.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0071.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0072.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0137.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0138.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0169.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0170.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0023.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0024.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0055.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0056.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0087.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0088.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0153.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0154.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0185.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0186.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0025.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0026.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0057.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0058.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0089.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0090.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0155.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0156.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0187.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0188.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0017.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0018.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0033.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0034.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0049.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0050.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0065.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0066.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0081.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0082.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0097.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0098.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0129.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0130.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0131.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0132.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0147.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0148.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0163.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0164.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0179.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0180.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0011.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0012.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0043.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0044.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0075.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0076.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0141.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0142.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0173.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0174.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0105.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0106.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0121.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0122.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0035.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0036.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0067.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0068.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0133.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0134.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0165.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0166.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0027.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0028.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0059.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0060.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0091.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0092.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0157.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0158.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0189.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0190.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0005.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0006.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0037.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0038.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0069.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0070.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0135.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0136.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0167.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0168.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0015.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0016.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0047.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0048.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0079.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0080.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0145.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0146.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0177.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0178.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0031.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0032.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0063.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0064.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0095.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0096.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0161.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0162.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0193.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0194.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0019.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0020.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0051.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0052.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0083.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0084.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0149.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0150.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0181.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0182.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0013.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0014.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0045.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0046.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0077.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0078.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0143.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0144.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0175.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0176.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0021.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0022.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0053.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0054.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0085.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0086.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0151.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0152.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0183.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0184.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0099.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 196, - "w": 86, - "h": 66 - } - }, - { - "filename": "0100.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 196, - "w": 86, - "h": 66 - } - }, - { - "filename": "0101.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0102.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0125.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0126.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0103.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 176, - "y": 198, - "w": 94, - "h": 66 - } - }, - { - "filename": "0104.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 176, - "y": 198, - "w": 94, - "h": 66 - } - }, - { - "filename": "0107.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 270, - "y": 198, - "w": 97, - "h": 66 - } - }, - { - "filename": "0108.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 270, - "y": 198, - "w": 97, - "h": 66 - } - }, - { - "filename": "0127.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 262, - "w": 86, - "h": 66 - } - }, - { - "filename": "0128.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 262, - "w": 86, - "h": 66 - } - }, - { - "filename": "0029.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0030.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0061.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0062.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0093.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0094.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0159.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0160.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0191.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0192.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0109.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0110.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0117.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0118.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0111.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 254, - "y": 264, - "w": 97, - "h": 66 - } - }, - { - "filename": "0112.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 254, - "y": 264, - "w": 97, - "h": 66 - } - }, - { - "filename": "0113.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 0, - "y": 330, - "w": 98, - "h": 66 - } - }, - { - "filename": "0114.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 0, - "y": 330, - "w": 98, - "h": 66 - } - }, - { - "filename": "0115.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 98, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0116.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 98, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0119.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 195, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0120.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 195, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0123.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 3, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 292, - "y": 330, - "w": 94, - "h": 66 - } - }, - { - "filename": "0124.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 3, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 292, - "y": 330, - "w": 94, - "h": 66 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:9fb6238f8e585be9be5e520abb59e23d:2204e0edc6a9e184240a16c4ee5faa7c:06d67de9e8d7f60fc986e0c00145d6b1$" - } -} \ No newline at end of file diff --git a/public/images/pokemon/variant/465_2.png b/public/images/pokemon/variant/465_2.png deleted file mode 100644 index db25e88ad987fbad282a87365e121b0f2755af87..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38802 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 acmjR-T^1VC^$#3i9C|uN+GUz{VgCiM=7Yij diff --git a/public/images/pokemon/variant/465_3.json b/public/images/pokemon/variant/465_3.json deleted file mode 100644 index c092ec585e7..00000000000 --- a/public/images/pokemon/variant/465_3.json +++ /dev/null @@ -1,4094 +0,0 @@ -{ - "textures": [ - { - "image": "465_3.png", - "format": "RGBA8888", - "size": { - "w": 407, - "h": 407 - }, - "scale": 1, - "frames": [ - { - "filename": "0009.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0010.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0041.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0042.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0073.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0074.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0139.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0140.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0171.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0172.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 3, - "w": 74, - "h": 64 - }, - "frame": { - "x": 0, - "y": 0, - "w": 74, - "h": 64 - } - }, - { - "filename": "0007.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0008.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0039.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0040.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0071.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0072.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0137.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0138.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0169.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0170.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 74, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0023.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0024.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0055.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0056.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0087.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0088.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0153.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0154.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0185.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0186.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 83, - "h": 65 - }, - "frame": { - "x": 157, - "y": 0, - "w": 83, - "h": 65 - } - }, - { - "filename": "0025.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0026.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0057.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0058.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0089.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0090.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0155.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0156.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0187.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0188.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 12, - "y": 2, - "w": 74, - "h": 65 - }, - "frame": { - "x": 240, - "y": 0, - "w": 74, - "h": 65 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0017.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0018.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0033.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0034.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0049.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0050.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0065.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0066.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0081.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0082.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0097.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0098.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0129.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0130.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0131.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0132.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0147.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0148.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0163.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0164.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0179.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0180.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 83, - "h": 66 - }, - "frame": { - "x": 314, - "y": 0, - "w": 83, - "h": 66 - } - }, - { - "filename": "0011.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0012.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0043.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0044.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0075.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0076.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0141.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0142.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0173.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0174.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 0, - "y": 64, - "w": 64, - "h": 66 - } - }, - { - "filename": "0105.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0106.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0121.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0122.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 1, - "w": 98, - "h": 65 - }, - "frame": { - "x": 64, - "y": 65, - "w": 98, - "h": 65 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0035.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0036.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0067.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0068.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0133.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0134.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0165.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0166.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 162, - "y": 65, - "w": 88, - "h": 66 - } - }, - { - "filename": "0027.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0028.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0059.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0060.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0091.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0092.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0157.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0158.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0189.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0190.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 17, - "y": 1, - "w": 64, - "h": 66 - }, - "frame": { - "x": 250, - "y": 65, - "w": 64, - "h": 66 - } - }, - { - "filename": "0005.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0006.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0037.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0038.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0069.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0070.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0135.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0136.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0167.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0168.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 314, - "y": 66, - "w": 93, - "h": 66 - } - }, - { - "filename": "0015.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0016.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0047.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0048.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0079.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0080.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0145.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0146.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0177.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0178.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 0, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0031.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0032.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0063.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0064.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0095.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0096.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0161.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0162.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0193.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0194.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 11, - "y": 0, - "w": 76, - "h": 66 - }, - "frame": { - "x": 76, - "y": 130, - "w": 76, - "h": 66 - } - }, - { - "filename": "0019.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0020.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0051.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0052.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0083.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0084.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0149.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0150.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0181.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0182.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 88, - "h": 66 - }, - "frame": { - "x": 152, - "y": 131, - "w": 88, - "h": 66 - } - }, - { - "filename": "0013.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0014.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0045.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0046.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0077.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0078.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0143.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0144.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0175.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0176.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 240, - "y": 131, - "w": 70, - "h": 67 - } - }, - { - "filename": "0021.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0022.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0053.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0054.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0085.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0086.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0151.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0152.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0183.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0184.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 2, - "y": 0, - "w": 93, - "h": 66 - }, - "frame": { - "x": 310, - "y": 132, - "w": 93, - "h": 66 - } - }, - { - "filename": "0099.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 196, - "w": 86, - "h": 66 - } - }, - { - "filename": "0100.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 196, - "w": 86, - "h": 66 - } - }, - { - "filename": "0101.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0102.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0125.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0126.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 4, - "y": 0, - "w": 90, - "h": 66 - }, - "frame": { - "x": 86, - "y": 197, - "w": 90, - "h": 66 - } - }, - { - "filename": "0103.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 176, - "y": 198, - "w": 94, - "h": 66 - } - }, - { - "filename": "0104.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 176, - "y": 198, - "w": 94, - "h": 66 - } - }, - { - "filename": "0107.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 270, - "y": 198, - "w": 97, - "h": 66 - } - }, - { - "filename": "0108.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 270, - "y": 198, - "w": 97, - "h": 66 - } - }, - { - "filename": "0127.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 262, - "w": 86, - "h": 66 - } - }, - { - "filename": "0128.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 86, - "h": 66 - }, - "frame": { - "x": 0, - "y": 262, - "w": 86, - "h": 66 - } - }, - { - "filename": "0029.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0030.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0061.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0062.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0093.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0094.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0159.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0160.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0191.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0192.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 14, - "y": 0, - "w": 70, - "h": 67 - }, - "frame": { - "x": 86, - "y": 263, - "w": 70, - "h": 67 - } - }, - { - "filename": "0109.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0110.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0117.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0118.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 156, - "y": 264, - "w": 98, - "h": 66 - } - }, - { - "filename": "0111.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 254, - "y": 264, - "w": 97, - "h": 66 - } - }, - { - "filename": "0112.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 254, - "y": 264, - "w": 97, - "h": 66 - } - }, - { - "filename": "0113.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 0, - "y": 330, - "w": 98, - "h": 66 - } - }, - { - "filename": "0114.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 98, - "h": 66 - }, - "frame": { - "x": 0, - "y": 330, - "w": 98, - "h": 66 - } - }, - { - "filename": "0115.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 98, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0116.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 98, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0119.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 195, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0120.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 97, - "h": 66 - }, - "frame": { - "x": 195, - "y": 330, - "w": 97, - "h": 66 - } - }, - { - "filename": "0123.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 3, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 292, - "y": 330, - "w": 94, - "h": 66 - } - }, - { - "filename": "0124.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 98, - "h": 67 - }, - "spriteSourceSize": { - "x": 3, - "y": 0, - "w": 94, - "h": 66 - }, - "frame": { - "x": 292, - "y": 330, - "w": 94, - "h": 66 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:9fb6238f8e585be9be5e520abb59e23d:2204e0edc6a9e184240a16c4ee5faa7c:06d67de9e8d7f60fc986e0c00145d6b1$" - } -} \ No newline at end of file diff --git a/public/images/pokemon/variant/465_3.png b/public/images/pokemon/variant/465_3.png deleted file mode 100644 index fe8e764028b87c1e1e5cc7148976b299c5cb583d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43995 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

GW16L@n!k&t zT@5-HTNuveUiFs*EAZ5F^r|9CgZ=cT?^MhmK17-d$pBaE`U6)Tt%h8Gt+&F0axJz1 zxsYKdBOmwgbNQ7f$%oN5!Gwg5a>wlXQ&qqMWc`@?Rb}mWNg@Ur*e#=Lrr0zoxEre^ zMh0!`z@IH9)mb4Js#9lu%*`LFv_kCX7MOL_JF1u+;cyCD20z)wgjwM53^m{P(3nxy zLXXh|XWgP7xQ_I&HYcEs2KH(v)=#cq+wxsr6Z#8PF!&5gX$@)`@x6?Mhd^iOBNJCcsB+sOz0HMh<*~gks3^-w>UU2b zFtA7}Ka>|O{Tu(+4wJn_xp%HSp2o(8il{Hf)3vsqZNJJ~lNW_P`Pt!`0X#9&l(YFq za&Ch70S_K#4E8pBBE1zI0^%W>=}rNj5uKAW?jRIMGV6HJ!(A%Oy{U3-)7btDR>Qj5 zwNRhrg+zn%;u%3^Zkf>Z?9fIDzvt~{lydD)>qcfRn=QM)MEz!5fjcN?qZq1B0q zQRq=n8%sXK9zv5EulXHrR-Oecj^v$P{^cY@bDT<9c5mVyATajX+XX&kWZB zP!I%<^(f>0+a2czeV>p~y2oFmmE0llVv}G<@tN!8=^1~?;D?JF*tK~cO*)HjNEt;> zCDcqsYU`3Ro&T3@Q71p*ax(rR8{u$z`z-|0b9rrmgjvwsTq6XRvVD4%b9wQ+l0F(* zG4?@V)k-M_v_kAW+rA0SW1J3N1{-^FA@X9Y>TG>qs?0>_J~I3}d=_$}l{07O9Q@Qi z7_jHX(cL|@(uLntLCUQW{PToBA7YW=GfMlHPB(Qf_>>x9aZxu8w{GUK_uNS%>>KmE*S!F7bGmAy;eu_I-+S1o|TZ?^tm?Z@afxw_iP+poYh` z-!K?NtPI*9B$p;-Z z4mNSKPlWd8gAg+#p+}AkE5!5ughhh{j&&_ljjpo7Bzla#&&|ixQ#Hk(A8A6;u5GC- z4o}42>?8-j71<;~NR|pa;x$FW|L Date: Fri, 6 Sep 2024 00:59:22 -0700 Subject: [PATCH 46/91] [Bug] Fix Aura Break applying without Dark/Fairy Aura present (#4057) * Fix Aura Break ignoring active Dark/Fairy Aura condition * Add conditional post-summon message --------- Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/data/ability.ts | 6 ++++-- src/data/move.ts | 5 ++++- src/locales/en/ability-trigger.json | 1 + src/test/abilities/aura_break.test.ts | 27 ++++++++++++++++++++------- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 2407460b87d..10aba1f030e 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -5333,8 +5333,10 @@ export function initAbilities() { .attr(FieldMoveTypePowerBoostAbAttr, Type.FAIRY, 4 / 3), new Ability(Abilities.AURA_BREAK, 6) .ignorable() - .conditionalAttr(target => target.hasAbility(Abilities.DARK_AURA), FieldMoveTypePowerBoostAbAttr, Type.DARK, 9 / 16) - .conditionalAttr(target => target.hasAbility(Abilities.FAIRY_AURA), FieldMoveTypePowerBoostAbAttr, Type.FAIRY, 9 / 16), + .conditionalAttr(pokemon => pokemon.scene.getField(true).some(p => p.hasAbility(Abilities.DARK_AURA)), FieldMoveTypePowerBoostAbAttr, Type.DARK, 9 / 16) + .conditionalAttr(pokemon => pokemon.scene.getField(true).some(p => p.hasAbility(Abilities.FAIRY_AURA)), FieldMoveTypePowerBoostAbAttr, Type.FAIRY, 9 / 16) + .conditionalAttr(pokemon => pokemon.scene.getField(true).some(p => p.hasAbility(Abilities.DARK_AURA) || p.hasAbility(Abilities.FAIRY_AURA)), + PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAuraBreak", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })), new Ability(Abilities.PRIMORDIAL_SEA, 6) .attr(PostSummonWeatherChangeAbAttr, WeatherType.HEAVY_RAIN) .attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.HEAVY_RAIN) diff --git a/src/data/move.ts b/src/data/move.ts index 96b780a8330..19014c0eb30 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -757,7 +757,10 @@ export default class Move implements Localizable { const fieldAuras = new Set( source.scene.getField(true) - .map((p) => p.getAbilityAttrs(FieldMoveTypePowerBoostAbAttr) as FieldMoveTypePowerBoostAbAttr[]) + .map((p) => p.getAbilityAttrs(FieldMoveTypePowerBoostAbAttr).filter(attr => { + const condition = attr.getCondition(); + return (!condition || condition(p)); + }) as FieldMoveTypePowerBoostAbAttr[]) .flat(), ); for (const aura of fieldAuras) { diff --git a/src/locales/en/ability-trigger.json b/src/locales/en/ability-trigger.json index 4f1d4dac766..a7383cea16b 100644 --- a/src/locales/en/ability-trigger.json +++ b/src/locales/en/ability-trigger.json @@ -52,6 +52,7 @@ "postSummonTeravolt": "{{pokemonNameWithAffix}} is radiating a bursting aura!", "postSummonDarkAura": "{{pokemonNameWithAffix}} is radiating a Dark Aura!", "postSummonFairyAura": "{{pokemonNameWithAffix}} is radiating a Fairy Aura!", + "postSummonAuraBreak": "{{pokemonNameWithAffix}} reversed all other Pokémon's auras!", "postSummonNeutralizingGas": "{{pokemonNameWithAffix}}'s Neutralizing Gas filled the area!", "postSummonAsOneGlastrier": "{{pokemonNameWithAffix}} has two Abilities!", "postSummonAsOneSpectrier": "{{pokemonNameWithAffix}} has two Abilities!", diff --git a/src/test/abilities/aura_break.test.ts b/src/test/abilities/aura_break.test.ts index 7de300c157a..0fb2212d817 100644 --- a/src/test/abilities/aura_break.test.ts +++ b/src/test/abilities/aura_break.test.ts @@ -1,5 +1,4 @@ import { allMoves } from "#app/data/move"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -33,31 +32,45 @@ describe("Abilities - Aura Break", () => { game.override.enemySpecies(Species.SHUCKLE); }); - it("reverses the effect of fairy aura", async () => { + it("reverses the effect of Fairy Aura", async () => { const moveToCheck = allMoves[Moves.MOONBLAST]; const basePower = moveToCheck.power; game.override.ability(Abilities.FAIRY_AURA); vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); game.move.select(Moves.MOONBLAST); - await game.phaseInterceptor.to(MoveEffectPhase); + await game.phaseInterceptor.to("MoveEffectPhase"); expect(moveToCheck.calculateBattlePower).toHaveReturnedWith(expect.closeTo(basePower * auraBreakMultiplier)); }); - it("reverses the effect of dark aura", async () => { + it("reverses the effect of Dark Aura", async () => { const moveToCheck = allMoves[Moves.DARK_PULSE]; const basePower = moveToCheck.power; game.override.ability(Abilities.DARK_AURA); vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); game.move.select(Moves.DARK_PULSE); - await game.phaseInterceptor.to(MoveEffectPhase); + await game.phaseInterceptor.to("MoveEffectPhase"); expect(moveToCheck.calculateBattlePower).toHaveReturnedWith(expect.closeTo(basePower * auraBreakMultiplier)); }); + + it("has no effect if neither Fairy Aura nor Dark Aura are present", async () => { + const moveToCheck = allMoves[Moves.MOONBLAST]; + const basePower = moveToCheck.power; + + game.override.ability(Abilities.BALL_FETCH); + vi.spyOn(moveToCheck, "calculateBattlePower"); + + await game.classicMode.startBattle([Species.PIKACHU]); + game.move.select(Moves.MOONBLAST); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(moveToCheck.calculateBattlePower).toHaveReturnedWith(basePower); + }); }); From d58f03528776a56e0fc1b8cfc6d1a99ae3561038 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Fri, 6 Sep 2024 17:41:48 +0800 Subject: [PATCH 47/91] [Misc] Migrate REROLL_TARGET to SHOP_CURSOR_TARGET (#4016) * migrate reroll target to shop cursor target * delete key after migrating --- src/system/game-data.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 1a47294906e..746af4d47a5 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -857,6 +857,14 @@ export class GameData { const settings = JSON.parse(localStorage.getItem("settings")!); // TODO: is this bang correct? + // TODO: Remove this block after save migration is implemented + if (settings.hasOwnProperty("REROLL_TARGET") && !settings.hasOwnProperty(SettingKeys.Shop_Cursor_Target)) { + settings[SettingKeys.Shop_Cursor_Target] = settings["REROLL_TARGET"]; + delete settings["REROLL_TARGET"]; + localStorage.setItem("settings", JSON.stringify(settings)); + } + // End of block to remove + for (const setting of Object.keys(settings)) { setSetting(this.scene, setting, settings[setting]); } From d8304421cf145f0b714ec77908a72db5fb137562 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:23:19 -0700 Subject: [PATCH 48/91] fix endless end dialogue (#4069) It was only displaying `ending_endless` because the `PGM` prefix was still present --- src/phases/game-over-phase.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/phases/game-over-phase.ts b/src/phases/game-over-phase.ts index ebe58b20d3e..17805e90f0f 100644 --- a/src/phases/game-over-phase.ts +++ b/src/phases/game-over-phase.ts @@ -49,7 +49,9 @@ export class GameOverPhase extends BattlePhase { } if (this.victory && this.scene.gameMode.isEndless) { - this.scene.ui.showDialogue(i18next.t("PGMmiscDialogue:ending_endless"), i18next.t("PGMmiscDialogue:ending_name"), 0, () => this.handleGameOver()); + const genderIndex = this.scene.gameData.gender ?? PlayerGender.UNSET; + const genderStr = PlayerGender[genderIndex].toLowerCase(); + this.scene.ui.showDialogue(i18next.t("miscDialogue:ending_endless", { context: genderStr }), i18next.t("miscDialogue:ending_name"), 0, () => this.handleGameOver()); } else if (this.victory || !this.scene.enableRetries) { this.handleGameOver(); } else { From acda34c2e4d040aba44908691b23e1005dfdb1a6 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Sat, 7 Sep 2024 02:15:15 +0800 Subject: [PATCH 49/91] [P2 Bug] Underwater and underground Pokemond do not take sand/hail damage (#4047) * fix sandstorm/hail interaction with semi invulnerable state * cant fly high enough to avoid sandstorm/hail damage --- src/phases/weather-effect-phase.ts | 15 +++--- src/test/arena/weather_hail.test.ts | 62 ++++++++++++++++++++++++ src/test/arena/weather_sandstorm.test.ts | 59 ++++++++++++++++++++++ 3 files changed, 129 insertions(+), 7 deletions(-) create mode 100644 src/test/arena/weather_hail.test.ts create mode 100644 src/test/arena/weather_sandstorm.test.ts diff --git a/src/phases/weather-effect-phase.ts b/src/phases/weather-effect-phase.ts index 71ca7f9b505..ccfc9abb64f 100644 --- a/src/phases/weather-effect-phase.ts +++ b/src/phases/weather-effect-phase.ts @@ -1,10 +1,11 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { applyPreWeatherEffectAbAttrs, SuppressWeatherEffectAbAttr, PreWeatherDamageAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPostWeatherLapseAbAttrs, PostWeatherLapseAbAttr } from "#app/data/ability.js"; -import { CommonAnim } from "#app/data/battle-anims.js"; -import { Weather, getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weather.js"; -import { WeatherType } from "#app/enums/weather-type.js"; -import Pokemon, { HitResult } from "#app/field/pokemon.js"; -import * as Utils from "#app/utils.js"; +import { CommonAnim } from "#app/data/battle-anims"; +import { Weather, getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weather"; +import { BattlerTagType } from "#app/enums/battler-tag-type.js"; +import { WeatherType } from "#app/enums/weather-type"; +import Pokemon, { HitResult } from "#app/field/pokemon"; +import * as Utils from "#app/utils"; import { CommonAnimPhase } from "./common-anim-phase"; export class WeatherEffectPhase extends CommonAnimPhase { @@ -39,7 +40,7 @@ export class WeatherEffectPhase extends CommonAnimPhase { applyPreWeatherEffectAbAttrs(PreWeatherDamageAbAttr, pokemon, this.weather, cancelled); applyAbAttrs(BlockNonDirectDamageAbAttr, pokemon, cancelled); - if (cancelled.value) { + if (cancelled.value || pokemon.getTag(BattlerTagType.UNDERGROUND) || pokemon.getTag(BattlerTagType.UNDERWATER)) { return; } diff --git a/src/test/arena/weather_hail.test.ts b/src/test/arena/weather_hail.test.ts new file mode 100644 index 00000000000..75125b3448c --- /dev/null +++ b/src/test/arena/weather_hail.test.ts @@ -0,0 +1,62 @@ +import { WeatherType } from "#app/data/weather"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; +import { BattlerIndex } from "#app/battle"; + +describe("Weather - Hail", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .weather(WeatherType.HAIL) + .battleType("single") + .moveset(SPLASH_ONLY) + .enemyMoveset(SPLASH_ONLY) + .enemySpecies(Species.MAGIKARP); + }); + + it("inflicts damage equal to 1/16 of Pokemon's max HP at turn end", async () => { + await game.classicMode.startBattle([Species.MAGIKARP]); + + game.move.select(Moves.SPLASH); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + + await game.phaseInterceptor.to("TurnEndPhase"); + + game.scene.getField(true).forEach(pokemon => { + expect(pokemon.hp).toBeLessThan(pokemon.getMaxHp() - Math.floor(pokemon.getMaxHp() / 16)); + }); + }); + + it("does not inflict damage to a Pokemon that is underwater (Dive) or underground (Dig)", async () => { + game.override.moveset([Moves.DIG]); + await game.classicMode.startBattle([Species.MAGIKARP]); + + game.move.select(Moves.DIG); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + + await game.phaseInterceptor.to("TurnEndPhase"); + + const playerPokemon = game.scene.getPlayerPokemon()!; + const enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(playerPokemon.hp).toBe(playerPokemon.getMaxHp()); + expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp() - Math.floor(enemyPokemon.getMaxHp() / 16)); + }); +}); diff --git a/src/test/arena/weather_sandstorm.test.ts b/src/test/arena/weather_sandstorm.test.ts new file mode 100644 index 00000000000..978774ba4c1 --- /dev/null +++ b/src/test/arena/weather_sandstorm.test.ts @@ -0,0 +1,59 @@ +import { WeatherType } from "#app/data/weather"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +describe("Weather - Sandstorm", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .weather(WeatherType.SANDSTORM) + .battleType("single") + .moveset(SPLASH_ONLY) + .enemyMoveset(SPLASH_ONLY) + .enemySpecies(Species.MAGIKARP); + }); + + it("inflicts damage equal to 1/16 of Pokemon's max HP at turn end", async () => { + await game.classicMode.startBattle([Species.MAGIKARP]); + + game.move.select(Moves.SPLASH); + + await game.phaseInterceptor.to("TurnEndPhase"); + + game.scene.getField(true).forEach(pokemon => { + expect(pokemon.hp).toBeLessThan(pokemon.getMaxHp() - Math.floor(pokemon.getMaxHp() / 16)); + }); + }); + + it("does not inflict damage to a Pokemon that is underwater (Dive) or underground (Dig)", async () => { + game.override.moveset([Moves.DIVE]); + await game.classicMode.startBattle([Species.MAGIKARP]); + + game.move.select(Moves.DIVE); + + await game.phaseInterceptor.to("TurnEndPhase"); + + const playerPokemon = game.scene.getPlayerPokemon()!; + const enemyPokemon = game.scene.getEnemyPokemon()!; + + expect(playerPokemon.hp).toBe(playerPokemon.getMaxHp()); + expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp() - Math.floor(enemyPokemon.getMaxHp() / 16)); + }); +}); From 33cb99977493c6b7bd03a07ae20ddc574b7800bf Mon Sep 17 00:00:00 2001 From: Chapybara-jp Date: Fri, 6 Sep 2024 20:51:32 +0200 Subject: [PATCH 50/91] [Localization] [JA] Translated bgm-name.json (#4066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translated bgm-name.json Song titles from Bulbapedia and https://w.atwiki.jp/gamemusicbest100/ Kept mainline game abbrevs., changed PMD to ポケダン for clarity Added translations for the original songs * Update bgm-name.json * Update bgm-name.json * Update bgm-name.json --- src/locales/ja/bgm-name.json | 292 +++++++++++++++++------------------ 1 file changed, 146 insertions(+), 146 deletions(-) diff --git a/src/locales/ja/bgm-name.json b/src/locales/ja/bgm-name.json index 8838942c8a6..fc3d4c0fdd2 100644 --- a/src/locales/ja/bgm-name.json +++ b/src/locales/ja/bgm-name.json @@ -1,150 +1,150 @@ { - "music": "Music: ", + "music": "BGM: ", "missing_entries": "{{name}}", - "battle_kanto_champion": "B2W2 Kanto Champion Battle", - "battle_johto_champion": "B2W2 Johto Champion Battle", - "battle_hoenn_champion_g5": "B2W2 Hoenn Champion Battle", - "battle_hoenn_champion_g6": "ORAS Hoenn Champion Battle", - "battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle", - "battle_champion_alder": "BW Unova Champion Battle", - "battle_champion_iris": "B2W2 Unova Champion Battle", - "battle_kalos_champion": "XY Kalos Champion Battle", - "battle_alola_champion": "USUM Alola Champion Battle", - "battle_galar_champion": "SWSH Galar Champion Battle", - "battle_champion_geeta": "SV Champion Geeta Battle", - "battle_champion_nemona": "SV Champion Nemona Battle", - "battle_champion_kieran": "SV Champion Kieran Battle", - "battle_hoenn_elite": "ORAS Elite Four Battle", - "battle_unova_elite": "BW Elite Four Battle", - "battle_kalos_elite": "XY Elite Four Battle", - "battle_alola_elite": "SM Elite Four Battle", - "battle_galar_elite": "SWSH League Tournament Battle", - "battle_paldea_elite": "SV Elite Four Battle", - "battle_bb_elite": "SV BB League Elite Four Battle", - "battle_final_encounter": "PMD RTDX Rayquaza's Domain", - "battle_final": "BW Ghetsis Battle", - "battle_kanto_gym": "B2W2 Kanto Gym Battle", - "battle_johto_gym": "B2W2 Johto Gym Battle", - "battle_hoenn_gym": "B2W2 Hoenn Gym Battle", - "battle_sinnoh_gym": "B2W2 Sinnoh Gym Battle", - "battle_unova_gym": "BW Unova Gym Battle", - "battle_kalos_gym": "XY Kalos Gym Battle", - "battle_galar_gym": "SWSH Galar Gym Battle", - "battle_paldea_gym": "SV Paldea Gym Battle", - "battle_legendary_kanto": "XY Kanto Legendary Battle", - "battle_legendary_raikou": "HGSS Raikou Battle", - "battle_legendary_entei": "HGSS Entei Battle", - "battle_legendary_suicune": "HGSS Suicune Battle", - "battle_legendary_lugia": "HGSS Lugia Battle", - "battle_legendary_ho_oh": "HGSS Ho-oh Battle", - "battle_legendary_regis_g5": "B2W2 Legendary Titan Battle", - "battle_legendary_regis_g6": "ORAS Legendary Titan Battle", - "battle_legendary_gro_kyo": "ORAS Groudon & Kyogre Battle", - "battle_legendary_rayquaza": "ORAS Rayquaza Battle", - "battle_legendary_deoxys": "ORAS Deoxys Battle", - "battle_legendary_lake_trio": "ORAS Lake Guardians Battle", - "battle_legendary_sinnoh": "ORAS Sinnoh Legendary Battle", - "battle_legendary_dia_pal": "ORAS Dialga & Palkia Battle", - "battle_legendary_origin_forme": "LA Origin Dialga & Palkia Battle", - "battle_legendary_giratina": "ORAS Giratina Battle", - "battle_legendary_arceus": "HGSS Arceus Battle", - "battle_legendary_unova": "BW Unova Legendary Battle", - "battle_legendary_kyurem": "BW Kyurem Battle", - "battle_legendary_res_zek": "BW Reshiram & Zekrom Battle", - "battle_legendary_xern_yvel": "XY Xerneas & Yveltal Battle", - "battle_legendary_tapu": "SM Tapu Battle", - "battle_legendary_sol_lun": "SM Solgaleo & Lunala Battle", - "battle_legendary_ub": "SM Ultra Beast Battle", - "battle_legendary_dusk_dawn": "USUM Dusk Mane & Dawn Wings Necrozma Battle", - "battle_legendary_ultra_nec": "USUM Ultra Necrozma Battle", - "battle_legendary_zac_zam": "SWSH Zacian & Zamazenta Battle", - "battle_legendary_glas_spec": "SWSH Glastrier & Spectrier Battle", - "battle_legendary_calyrex": "SWSH Calyrex Battle", - "battle_legendary_riders": "SWSH Ice & Shadow Rider Calyrex Battle", - "battle_legendary_birds_galar": "SWSH Galarian Legendary Birds Battle", - "battle_legendary_ruinous": "SV Treasures of Ruin Battle", - "battle_legendary_kor_mir": "SV Depths of Area Zero Battle", - "battle_legendary_loyal_three": "SV Loyal Three Battle", - "battle_legendary_ogerpon": "SV Ogerpon Battle", - "battle_legendary_terapagos": "SV Terapagos Battle", - "battle_legendary_pecharunt": "SV Pecharunt Battle", - "battle_rival": "BW Rival Battle", - "battle_rival_2": "BW N Battle", - "battle_rival_3": "BW Final N Battle", - "battle_trainer": "BW Trainer Battle", - "battle_wild": "BW Wild Battle", - "battle_wild_strong": "BW Strong Wild Battle", - "end_summit": "PMD RTDX Sky Tower Summit", - "battle_rocket_grunt": "HGSS Team Rocket Battle", - "battle_aqua_magma_grunt": "ORAS Team Aqua & Magma Battle", - "battle_galactic_grunt": "BDSP Team Galactic Battle", - "battle_plasma_grunt": "BW Team Plasma Battle", - "battle_flare_grunt": "XY Team Flare Battle", - "battle_aether_grunt": "SM Aether Foundation Battle", - "battle_skull_grunt": "SM Team Skull Battle", - "battle_macro_grunt": "SWSH Trainer Battle", - "battle_galactic_admin": "BDSP Team Galactic Admin Battle", - "battle_skull_admin": "SM Team Skull Admin Battle", - "battle_oleana": "SWSH Oleana Battle", - "battle_rocket_boss": "USUM Giovanni Battle", - "battle_aqua_magma_boss": "ORAS Archie & Maxie Battle", - "battle_galactic_boss": "BDSP Cyrus Battle", - "battle_plasma_boss": "B2W2 Ghetsis Battle", - "battle_flare_boss": "XY Lysandre Battle", - "battle_aether_boss": "SM Lusamine Battle", - "battle_skull_boss": "SM Guzma Battle", - "battle_macro_boss": "SWSH Rose Battle", + "battle_kanto_champion": "B2W2 戦闘!チャンピオン(カントー)", + "battle_johto_champion": "B2W2 戦闘!チャンピオン(ジョウト)", + "battle_hoenn_champion_g5": "B2W2 戦闘!チャンピオン(ホウエン)", + "battle_hoenn_champion_g6": "ORAS 決戦!ダイゴ", + "battle_sinnoh_champion": "B2W2 戦闘!チャンピオン(シンオウ)", + "battle_champion_alder": "BW チャンピオン アデク", + "battle_champion_iris": "B2W2 戦闘!チャンピオンアイリス", + "battle_kalos_champion": "XY 戦闘!チャンピオン", + "battle_alola_champion": "USUM 頂上決戦!ハウ", + "battle_galar_champion": "SWSH 決戦!チャンピオンダンデ", + "battle_champion_geeta": "SV 戦闘!トップチャンピオン", + "battle_champion_nemona": "SV 戦闘!チャンピオンネモ", + "battle_champion_kieran": "SV 戦闘!チャンピオンスグリ", + "battle_hoenn_elite": "ORAS 戦闘!四天王", + "battle_unova_elite": "BW 戦闘!四天王", + "battle_kalos_elite": "XY 戦闘!四天王", + "battle_alola_elite": "SM 戦闘!四天王", + "battle_galar_elite": "SWSH 戦闘!ファイナルトーナメント!", + "battle_paldea_elite": "SV 戦闘!四天王", + "battle_bb_elite": "SV 戦闘!ブルベリーグ四天王", + "battle_final_encounter": "ポケダンDX レックウザ登場", + "battle_final": "BW 戦闘!ゲーチス", + "battle_kanto_gym": "B2W2 戦闘!ジムリーダー(カントー)", + "battle_johto_gym": "B2W2 戦闘!ジムリーダー(ジョウト)", + "battle_hoenn_gym": "B2W2 戦闘!ジムリーダー(ホウエン)", + "battle_sinnoh_gym": "B2W2 戦闘!ジムリーダー(シンオウ)", + "battle_unova_gym": "BW 戦闘!ジムリーダー", + "battle_kalos_gym": "XY 戦闘!ジムリーダー", + "battle_galar_gym": "SWSH 戦闘!ジムリーダー", + "battle_paldea_gym": "SV 戦闘!ジムリーダー", + "battle_legendary_kanto": "XY 戦闘!ミュウツー", + "battle_legendary_raikou": "HGSS 戦闘!ライコウ", + "battle_legendary_entei": "HGSS 戦闘!エンテイ", + "battle_legendary_suicune": "HGSS 戦闘!スイクン", + "battle_legendary_lugia": "HGSS 戦闘!ルギア", + "battle_legendary_ho_oh": "HGSS 戦闘!ホウオウ", + "battle_legendary_regis_g5": "B2W2 戦闘!レジロック・レジアイス・レジスチル", + "battle_legendary_regis_g6": "ORAS 戦闘!レジロック・レジアイス・レジスチル", + "battle_legendary_gro_kyo": "ORAS 戦闘!ゲンシカイキ", + "battle_legendary_rayquaza": "ORAS 戦闘!超古代ポケモン", + "battle_legendary_deoxys": "ORAS 戦闘!デオキシス", + "battle_legendary_lake_trio": "ORAS 戦闘!ユクシー・エムリット・アグノム", + "battle_legendary_sinnoh": "ORAS 戦闘!伝説のポケモン(シンオウ)", + "battle_legendary_dia_pal": "ORAS 戦闘!ディアルガ・パルキア", + "battle_legendary_origin_forme": "LA 戦い:ディアルガ・パルキア(オリジンフォルム)", + "battle_legendary_giratina": "ORAS 戦闘!ギラティナ", + "battle_legendary_arceus": "HGSS アルセウス", + "battle_legendary_unova": "BW 戦闘!伝説のポケモン", + "battle_legendary_kyurem": "BW 戦闘!キュレム", + "battle_legendary_res_zek": "BW 戦闘!ゼクロム・レシラム", + "battle_legendary_xern_yvel": "XY 戦闘!ゼルネアス・イベルタル・ジガルデ", + "battle_legendary_tapu": "SM 戦闘!カプ", + "battle_legendary_sol_lun": "SM 戦闘!ソルガレオ・ルナアーラ", + "battle_legendary_ub": "SM 戦闘!ウルトラビースト", + "battle_legendary_dusk_dawn": "USUM 戦闘!日食・月食ネクロズマ", + "battle_legendary_ultra_nec": "USUM 戦闘!ウルトラネクロズマ", + "battle_legendary_zac_zam": "SWSH 戦闘!ザシアン・ザマゼンタ", + "battle_legendary_glas_spec": "SWSH 戦闘!ブリザポス・レイスポス", + "battle_legendary_calyrex": "SWSH 戦闘!バドレックス", + "battle_legendary_riders": "SWSH 戦闘!豊穣の王", + "battle_legendary_birds_galar": "SWSH 戦闘!伝説のとりポケモン", + "battle_legendary_ruinous": "SV 戦闘!災厄ポケモン", + "battle_legendary_kor_mir": "SV 戦闘!エリアゼロのポケモン", + "battle_legendary_loyal_three": "SV 戦闘!ともっこ", + "battle_legendary_ogerpon": "SV 戦闘!オーガポン", + "battle_legendary_terapagos": "SV 戦闘!テラパゴス", + "battle_legendary_pecharunt": "SV 戦闘!モモワロウ", + "battle_rival": "BW 戦闘!チェレン・ベル", + "battle_rival_2": "BW 戦闘!N", + "battle_rival_3": "BW 決戦!N", + "battle_trainer": "BW 戦闘!トレーナー", + "battle_wild": "BW 戦闘!野生ポケモン", + "battle_wild_strong": "BW 戦闘!強い野生ポケモン", + "end_summit": "ポケダンDX 天空の塔 最上階", + "battle_rocket_grunt": "HGSS 戦闘!ロケット団", + "battle_aqua_magma_grunt": "ORAS 戦闘!アクア団・マグマ団", + "battle_galactic_grunt": "BDSP 戦闘!ギンガ団", + "battle_plasma_grunt": "BW 戦闘!プラズマ団", + "battle_flare_grunt": "XY 戦闘!フレア団", + "battle_aether_grunt": "SM 戦闘!エーテル財団トレーナー", + "battle_skull_grunt": "SM 戦闘!スカル団", + "battle_macro_grunt": "SWSH 戦闘!トレーナー", + "battle_galactic_admin": "BDSP 戦闘!ギンガ団幹部", + "battle_skull_admin": "SM 戦闘!スカル団幹部", + "battle_oleana": "SWSH 戦闘!オリーヴ", + "battle_rocket_boss": "USUM 戦闘!レインボーロケット団ボス", + "battle_aqua_magma_boss": "ORAS 戦闘!アクア団・マグマ団のリーダー", + "battle_galactic_boss": "BDSP 戦闘!ギンガ団ボス", + "battle_plasma_boss": "B2W2 戦闘!ゲーチス", + "battle_flare_boss": "XY 戦闘!フラダリ", + "battle_aether_boss": "SM 戦闘!ルザミーネ", + "battle_skull_boss": "SM 戦闘!スカル団ボス", + "battle_macro_boss": "SWSH 戦闘!ローズ", - "abyss": "PMD EoS Dark Crater", - "badlands": "PMD EoS Barren Valley", - "beach": "PMD EoS Drenched Bluff", - "cave": "PMD EoS Sky Peak Cave", - "construction_site": "PMD EoS Boulder Quarry", - "desert": "PMD EoS Northern Desert", - "dojo": "PMD EoS Marowak Dojo", - "end": "PMD RTDX Sky Tower", - "factory": "PMD EoS Concealed Ruins", - "fairy_cave": "PMD EoS Star Cave", - "forest": "PMD EoS Dusk Forest", - "grass": "PMD EoS Apple Woods", - "graveyard": "PMD EoS Mystifying Forest", - "ice_cave": "PMD EoS Vast Ice Mountain", - "island": "PMD EoS Craggy Coast", - "jungle": "Lmz - Jungle", - "laboratory": "Firel - Laboratory", - "lake": "PMD EoS Crystal Cave", - "meadow": "PMD EoS Sky Peak Forest", - "metropolis": "Firel - Metropolis", - "mountain": "PMD EoS Mt. Horn", - "plains": "PMD EoS Sky Peak Prairie", - "power_plant": "PMD EoS Far Amp Plains", - "ruins": "PMD EoS Deep Sealed Ruin", - "sea": "Andr06 - Marine Mystique", - "seabed": "Firel - Seabed", - "slum": "Andr06 - Sneaky Snom", - "snowy_forest": "PMD EoS Sky Peak Snowfield", - "space": "Firel - Aether", - "swamp": "PMD EoS Surrounded Sea", - "tall_grass": "PMD EoS Foggy Forest", - "temple": "PMD EoS Aegis Cave", - "town": "PMD EoS Random Dungeon Theme 3", - "volcano": "PMD EoS Steam Cave", - "wasteland": "PMD EoS Hidden Highland", - "encounter_ace_trainer": "BW Trainers' Eyes Meet (Ace Trainer)", - "encounter_backpacker": "BW Trainers' Eyes Meet (Backpacker)", - "encounter_clerk": "BW Trainers' Eyes Meet (Clerk)", - "encounter_cyclist": "BW Trainers' Eyes Meet (Cyclist)", - "encounter_lass": "BW Trainers' Eyes Meet (Lass)", - "encounter_parasol_lady": "BW Trainers' Eyes Meet (Parasol Lady)", - "encounter_pokefan": "BW Trainers' Eyes Meet (Poke Fan)", - "encounter_psychic": "BW Trainers' Eyes Meet (Psychic)", - "encounter_rich": "BW Trainers' Eyes Meet (Gentleman)", - "encounter_rival": "BW Cheren", - "encounter_roughneck": "BW Trainers' Eyes Meet (Roughneck)", - "encounter_scientist": "BW Trainers' Eyes Meet (Scientist)", - "encounter_twins": "BW Trainers' Eyes Meet (Twins)", - "encounter_youngster": "BW Trainers' Eyes Meet (Youngster)", - "heal": "BW Pokémon Heal", - "menu": "PMD EoS Welcome to the World of Pokémon!", - "title": "PMD EoS Top Menu Theme" + "abyss": "ポケダン空 やみのかこう", + "badlands": "ポケダン空 こかつのたに", + "beach": "ポケダン空 しめったいわば", + "cave": "ポケダン空 そらのいただき(どうくつ)", + "construction_site": "ポケダン空 きょだいがんせきぐん", + "desert": "ポケダン空 きたのさばく", + "dojo": "ポケダン空 ガラガラどうじょう", + "end": "ポケダンDX 天空の塔", + "factory": "ポケダン空 かくされたいせき", + "fairy_cave": "ポケダン空 ほしのどうくつ", + "forest": "ポケダン空 くろのもり", + "grass": "ポケダン空 リンゴのもり", + "graveyard": "ポケダン空 しんぴのもり", + "ice_cave": "ポケダン空 だいひょうざん", + "island": "ポケダン空 えんがんのいわば", + "jungle": "Lmz - Jungle(ジャングル)", + "laboratory": "Firel - Laboratory(ラボラトリー)", + "lake": "ポケダン空 すいしょうのどうくつ", + "meadow": "ポケダン空 そらのいただき(もり)", + "metropolis": "Firel - Metropolis(大都市)", + "mountain": "ポケダン空 ツノやま", + "plains": "ポケダン空 そらのいただき(そうげん)", + "power_plant": "ポケダン空 エレキへいげん", + "ruins": "ポケダン空 ふういんのいわば", + "sea": "Andr06 - Marine Mystique(海の神秘性)", + "seabed": "Firel - Seabed(海底)", + "slum": "Andr06 - Sneaky Snom(ずるいユキハミ)", + "snowy_forest": "ポケダン空 そらのいただき(ゆきやま)", + "space": "Firel - Aether(エーテル)", + "swamp": "ポケダン空 とざされたうみ", + "tall_grass": "ポケダン空 のうむのもり", + "temple": "ポケダン空 ばんにんのどうくつ", + "town": "ポケダン空 ランダムダンジョン3", + "volcano": "ポケダン空 ねっすいのどうくつ", + "wasteland": "ポケダン空 まぼろしのだいち", + "encounter_ace_trainer": "BW 視線!エリートトレーナー", + "encounter_backpacker": "BW 視線!バックパッカー", + "encounter_clerk": "BW 視線!ビジネスマン", + "encounter_cyclist": "BW 視線!サイクリング", + "encounter_lass": "BW 視線!ミニスカート", + "encounter_parasol_lady": "BW 視線!パラソルおねえさん", + "encounter_pokefan": "BW 視線!だいすきクラブ", + "encounter_psychic": "BW 視線!サイキッカー", + "encounter_rich": "BW 視線!ジェントルマン", + "encounter_rival": "BW チェレンのテーマ", + "encounter_roughneck": "BW 視線!スキンヘッズ", + "encounter_scientist": "BW 視線!けんきゅういん", + "encounter_twins": "BW 視線!ふたごちゃん", + "encounter_youngster": "BW 視線!たんぱんこぞう", + "heal": "BW 回復", + "menu": "ポケダン空 ようこそ! ポケモンたちのせかいへ!", + "title": "ポケダン空 トップメニュー" } From e6a574c48f3627b7ec6283cbd1772213c372851d Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Sat, 7 Sep 2024 03:17:08 +0800 Subject: [PATCH 51/91] =?UTF-8?q?[P2=20Bug]=20Revert=20to=20normal=20form?= =?UTF-8?q?=20when=20Pok=C3=A9mon=20is=20fainted=20(#4049)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * revert to normal forms when fainted * Remove `.js` from import Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/phases/faint-phase.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/phases/faint-phase.ts b/src/phases/faint-phase.ts index d5dd9f61340..48366afaad4 100644 --- a/src/phases/faint-phase.ts +++ b/src/phases/faint-phase.ts @@ -17,6 +17,7 @@ import { ToggleDoublePositionPhase } from "./toggle-double-position-phase"; import { GameOverPhase } from "./game-over-phase"; import { SwitchPhase } from "./switch-phase"; import { VictoryPhase } from "./victory-phase"; +import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms"; export class FaintPhase extends PokemonPhase { private preventEndure: boolean; @@ -59,6 +60,7 @@ export class FaintPhase extends PokemonPhase { } this.scene.queueMessage(i18next.t("battle:fainted", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), null, true); + this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true); if (pokemon.turnData?.attacksReceived?.length) { const lastAttack = pokemon.turnData.attacksReceived[0]; From ae50db7710ce371eb806f93c7dde386bee45e948 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:24:38 -0700 Subject: [PATCH 52/91] [Optimization] parallel testing (#4075) * add: vitest projects (multiple) preparations for parallel testing * update: tests workflow better parallel testing --- .github/workflows/tests.yml | 78 +++++++++++++++++++++++++++++++++++-- vitest.config.ts | 59 +++++++++++++++------------- vitest.workspace.ts | 54 +++++++++++++++++++++++++ 3 files changed, 160 insertions(+), 31 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index adac45519ab..2a78ec252b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,8 +15,8 @@ on: types: [checks_requested] jobs: - run-tests: # Define a job named "run-tests" - name: Run tests # Human-readable name for the job + run-misc-tests: # Define a job named "run-tests" + name: Run misc tests # Human-readable name for the job runs-on: ubuntu-latest # Specify the latest Ubuntu runner for the job steps: @@ -31,5 +31,75 @@ jobs: - name: Install Node.js dependencies # Step to install Node.js dependencies run: npm ci # Use 'npm ci' to install dependencies - - name: tests # Step to run tests - run: npm run test:silent \ No newline at end of file + - name: pre-test # pre-test to check overrides + run: npx vitest run --project pre + - name: test misc + run: npx vitest --project misc + + run-abilities-tests: + name: Run abilities tests + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install Node.js dependencies + run: npm ci + - name: pre-test + run: npx vitest run --project pre + - name: test abilities + run: npx vitest --project abilities + + run-items-tests: + name: Run items tests + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install Node.js dependencies + run: npm ci + - name: pre-test + run: npx vitest run --project pre + - name: test items + run: npx vitest --project items + + run-moves-tests: + name: Run moves tests + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install Node.js dependencies + run: npm ci + - name: pre-test + run: npx vitest run --project pre + - name: test moves + run: npx vitest --project moves + + run-battle-tests: + name: Run battle tests + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install Node.js dependencies + run: npm ci + - name: pre-test + run: npx vitest run --project pre + - name: test battle + run: npx vitest --project battle \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts index d1827103807..9a765a89ae7 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,38 +1,43 @@ -import { defineProject } from 'vitest/config'; +import { defineProject, UserWorkspaceConfig } from 'vitest/config'; import { defaultConfig } from './vite.config'; +export const defaultProjectTestConfig: UserWorkspaceConfig["test"] = { + setupFiles: ['./src/test/vitest.setup.ts'], + server: { + deps: { + inline: ['vitest-canvas-mock'], + //@ts-ignore + optimizer: { + web: { + include: ['vitest-canvas-mock'], + } + } + } + }, + environment: 'jsdom' as const, + environmentOptions: { + jsdom: { + resources: 'usable', + }, + }, + threads: false, + trace: true, + restoreMocks: true, + watch: false, + coverage: { + provider: 'istanbul' as const, + reportsDirectory: 'coverage' as const, + reporters: ['text-summary', 'html'], + }, +} + export default defineProject(({ mode }) => ({ ...defaultConfig, test: { + ...defaultProjectTestConfig, name: "main", include: ["./src/test/**/*.{test,spec}.ts"], exclude: ["./src/test/pre.test.ts"], - setupFiles: ['./src/test/vitest.setup.ts'], - server: { - deps: { - inline: ['vitest-canvas-mock'], - optimizer: { - web: { - include: ['vitest-canvas-mock'], - } - } - } - }, - environment: 'jsdom' as const, - environmentOptions: { - jsdom: { - resources: 'usable', - }, - }, - threads: false, - trace: true, - restoreMocks: true, - watch: false, - coverage: { - provider: 'istanbul' as const, - reportsDirectory: 'coverage' as const, - reporters: ['text-summary', 'html'], - }, }, esbuild: { pure: mode === 'production' ? [ 'console.log' ] : [], diff --git a/vitest.workspace.ts b/vitest.workspace.ts index 38121942004..a885b77dc9d 100644 --- a/vitest.workspace.ts +++ b/vitest.workspace.ts @@ -1,5 +1,6 @@ import { defineWorkspace } from "vitest/config"; import { defaultConfig } from "./vite.config"; +import { defaultProjectTestConfig } from "./vitest.config"; export default defineWorkspace([ { @@ -10,5 +11,58 @@ export default defineWorkspace([ environment: "jsdom", }, }, + { + ...defaultConfig, + test: { + ...defaultProjectTestConfig, + name: "misc", + include: [ + "src/test/achievements/**/*.{test,spec}.ts", + "src/test/arena/**/*.{test,spec}.ts", + "src/test/battlerTags/**/*.{test,spec}.ts", + "src/test/eggs/**/*.{test,spec}.ts", + "src/test/field/**/*.{test,spec}.ts", + "src/test/inputs/**/*.{test,spec}.ts", + "src/test/localization/**/*.{test,spec}.ts", + "src/test/phases/**/*.{test,spec}.ts", + "src/test/settingMenu/**/*.{test,spec}.ts", + "src/test/sprites/**/*.{test,spec}.ts", + "src/test/ui/**/*.{test,spec}.ts", + "src/test/*.{test,spec}.ts", + ], + }, + }, + { + ...defaultConfig, + test: { + ...defaultProjectTestConfig, + name: "abilities", + include: ["src/test/abilities/**/*.{test,spec}.ts"], + }, + }, + { + ...defaultConfig, + test: { + ...defaultProjectTestConfig, + name: "battle", + include: ["src/test/battle/**/*.{test,spec}.ts"], + }, + }, + { + ...defaultConfig, + test: { + ...defaultProjectTestConfig, + name: "items", + include: ["src/test/items/**/*.{test,spec}.ts"], + }, + }, + { + ...defaultConfig, + test: { + ...defaultProjectTestConfig, + name: "moves", + include: ["src/test/moves/**/*.{test,spec}.ts"], + }, + }, "./vitest.config.ts", ]); From ba212945deb7c48ad843ac939d4e43531c100c2f Mon Sep 17 00:00:00 2001 From: James Diefenbach <105332964+j-diefenbach@users.noreply.github.com> Date: Sat, 7 Sep 2024 10:34:13 +1000 Subject: [PATCH 53/91] [Enhancement] Darker egg summary background image (#4076) * darker egg-summary background * reset old background for beta * darker egg summary bg --------- Co-authored-by: James Diefenbach --- public/images/ui/egg_summary_bg.png | Bin 1064 -> 2209 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/public/images/ui/egg_summary_bg.png b/public/images/ui/egg_summary_bg.png index 658f5df0e96bd901d105690d73500b965788df5c..b4ee3d86a507bfb99b4f9af2d71b5065e4ac943b 100644 GIT binary patch literal 2209 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 Date: Fri, 6 Sep 2024 22:54:54 -0400 Subject: [PATCH 54/91] [Item/Balance] Overhaul Lapsing Modifiers (#4032) * Refactor Lapsing Modifiers, Lerp Hue of Count * Fix Unit Tests * Add Documentation to `hslToHex` Function * Change Descriptions for New Behavior * Add Documentation to Lapsing Modifiers * Add Unit Tests for Lures * Update Unit Tests for X Items and Lures * Update Boilerplate Error Message * Update Boilerplate Docs --- create-test-boilerplate.js | 12 +- src/locales/en/modifier-type.json | 8 +- src/modifier/modifier-type.ts | 44 ++-- src/modifier/modifier.ts | 207 +++++++++--------- src/test/items/dire_hit.test.ts | 4 +- .../double_battle_chance_booster.test.ts | 105 +++++++++ .../items/temp_stat_stage_booster.test.ts | 28 +-- src/utils.ts | 20 ++ 8 files changed, 285 insertions(+), 143 deletions(-) create mode 100644 src/test/items/double_battle_chance_booster.test.ts diff --git a/create-test-boilerplate.js b/create-test-boilerplate.js index bf68258f321..3c53eb1125b 100644 --- a/create-test-boilerplate.js +++ b/create-test-boilerplate.js @@ -4,7 +4,8 @@ import { fileURLToPath } from 'url'; /** * This script creates a test boilerplate file for a move or ability. - * @param {string} type - The type of test to create. Either "move" or "ability". + * @param {string} type - The type of test to create. Either "move", "ability", + * or "item". * @param {string} fileName - The name of the file to create. * @example npm run create-test move tackle */ @@ -19,7 +20,7 @@ const type = args[0]; // "move" or "ability" let fileName = args[1]; // The file name if (!type || !fileName) { - console.error('Please provide both a type ("move" or "ability") and a file name.'); + console.error('Please provide both a type ("move", "ability", or "item") and a file name.'); process.exit(1); } @@ -40,8 +41,11 @@ if (type === 'move') { } else if (type === 'ability') { dir = path.join(__dirname, 'src', 'test', 'abilities'); description = `Abilities - ${formattedName}`; +} else if (type === "item") { + dir = path.join(__dirname, 'src', 'test', 'items'); + description = `Items - ${formattedName}`; } else { - console.error('Invalid type. Please use "move" or "ability".'); + console.error('Invalid type. Please use "move", "ability", or "item".'); process.exit(1); } @@ -98,4 +102,4 @@ describe("${description}", () => { // Write the template content to the file fs.writeFileSync(filePath, content, 'utf8'); -console.log(`File created at: ${filePath}`); \ No newline at end of file +console.log(`File created at: ${filePath}`); diff --git a/src/locales/en/modifier-type.json b/src/locales/en/modifier-type.json index f73a3dcccae..babad57b81b 100644 --- a/src/locales/en/modifier-type.json +++ b/src/locales/en/modifier-type.json @@ -47,10 +47,14 @@ "description": "Changes a Pokémon's nature to {{natureName}} and permanently unlocks the nature for the starter." }, "DoubleBattleChanceBoosterModifierType": { - "description": "Doubles the chance of an encounter being a double battle for {{battleCount}} battles." + "description": "Quadruples the chance of an encounter being a double battle for up to {{battleCount}} battles." }, "TempStatStageBoosterModifierType": { - "description": "Increases the {{stat}} of all party members by 1 stage for 5 battles." + "description": "Increases the {{stat}} of all party members by {{amount}} for up to 5 battles.", + "extra": { + "stage": "1 stage", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "Increases the power of a Pokémon's {{moveType}}-type moves by 20%." diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index fe586074c79..d6cfd017829 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -433,37 +433,44 @@ export class RememberMoveModifierType extends PokemonModifierType { } export class DoubleBattleChanceBoosterModifierType extends ModifierType { - public battleCount: integer; + private maxBattles: number; - constructor(localeKey: string, iconImage: string, battleCount: integer) { - super(localeKey, iconImage, (_type, _args) => new Modifiers.DoubleBattleChanceBoosterModifier(this, this.battleCount), "lure"); + constructor(localeKey: string, iconImage: string, maxBattles: number) { + super(localeKey, iconImage, (_type, _args) => new Modifiers.DoubleBattleChanceBoosterModifier(this, maxBattles), "lure"); - this.battleCount = battleCount; + this.maxBattles = maxBattles; } - getDescription(scene: BattleScene): string { - return i18next.t("modifierType:ModifierType.DoubleBattleChanceBoosterModifierType.description", { battleCount: this.battleCount }); + getDescription(_scene: BattleScene): string { + return i18next.t("modifierType:ModifierType.DoubleBattleChanceBoosterModifierType.description", { + battleCount: this.maxBattles + }); } } export class TempStatStageBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType { private stat: TempBattleStat; - private key: string; + private nameKey: string; + private quantityKey: string; constructor(stat: TempBattleStat) { - const key = TempStatStageBoosterModifierTypeGenerator.items[stat]; - super("", key, (_type, _args) => new Modifiers.TempStatStageBoosterModifier(this, this.stat)); + const nameKey = TempStatStageBoosterModifierTypeGenerator.items[stat]; + super("", nameKey, (_type, _args) => new Modifiers.TempStatStageBoosterModifier(this, this.stat, 5)); this.stat = stat; - this.key = key; + this.nameKey = nameKey; + this.quantityKey = (stat !== Stat.ACC) ? "percentage" : "stage"; } get name(): string { - return i18next.t(`modifierType:TempStatStageBoosterItem.${this.key}`); + return i18next.t(`modifierType:TempStatStageBoosterItem.${this.nameKey}`); } getDescription(_scene: BattleScene): string { - return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t(getStatKey(this.stat)) }); + return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { + stat: i18next.t(getStatKey(this.stat)), + amount: i18next.t(`modifierType:ModifierType.TempStatStageBoosterModifierType.extra.${this.quantityKey}`) + }); } getPregenArgs(): any[] { @@ -1348,9 +1355,9 @@ export const modifierTypes = { SUPER_REPEL: () => new DoubleBattleChanceBoosterModifierType('Super Repel', 10), MAX_REPEL: () => new DoubleBattleChanceBoosterModifierType('Max Repel', 25),*/ - LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.LURE", "lure", 5), - SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.SUPER_LURE", "super_lure", 10), - MAX_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.MAX_LURE", "max_lure", 25), + LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.LURE", "lure", 10), + SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.SUPER_LURE", "super_lure", 15), + MAX_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.MAX_LURE", "max_lure", 30), SPECIES_STAT_BOOSTER: () => new SpeciesStatBoosterModifierTypeGenerator(), @@ -1358,9 +1365,12 @@ export const modifierTypes = { DIRE_HIT: () => new class extends ModifierType { getDescription(_scene: BattleScene): string { - return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t("modifierType:ModifierType.DIRE_HIT.extra.raises") }); + return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { + stat: i18next.t("modifierType:ModifierType.DIRE_HIT.extra.raises"), + amount: i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.extra.stage") + }); } - }("modifierType:ModifierType.DIRE_HIT", "dire_hit", (type, _args) => new Modifiers.TempCritBoosterModifier(type)), + }("modifierType:ModifierType.DIRE_HIT", "dire_hit", (type, _args) => new Modifiers.TempCritBoosterModifier(type, 5)), BASE_STAT_BOOSTER: () => new BaseStatBoosterModifierTypeGenerator(), diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index f3219c8bf73..c1d58a7bf39 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -292,70 +292,131 @@ export class AddVoucherModifier extends ConsumableModifier { } } +/** + * Modifier used for party-wide or passive items that start an initial + * {@linkcode battleCount} equal to {@linkcode maxBattles} that, for every + * battle, decrements. Typically, when {@linkcode battleCount} reaches 0, the + * modifier will be removed. If a modifier of the same type is to be added, it + * will reset {@linkcode battleCount} back to {@linkcode maxBattles} of the + * existing modifier instead of adding that modifier directly. + * @extends PersistentModifier + * @abstract + * @see {@linkcode add} + */ export abstract class LapsingPersistentModifier extends PersistentModifier { - protected battlesLeft: integer; + /** The maximum amount of battles the modifier will exist for */ + private maxBattles: number; + /** The current amount of battles the modifier will exist for */ + private battleCount: number; - constructor(type: ModifierTypes.ModifierType, battlesLeft?: integer, stackCount?: integer) { + constructor(type: ModifierTypes.ModifierType, maxBattles: number, battleCount?: number, stackCount?: integer) { super(type, stackCount); - this.battlesLeft = battlesLeft!; // TODO: is this bang correct? + this.maxBattles = maxBattles; + this.battleCount = battleCount ?? this.maxBattles; } - lapse(args: any[]): boolean { - return !!--this.battlesLeft; + /** + * Goes through existing modifiers for any that match the selected modifier, + * which will then either add it to the existing modifiers if none were found + * or, if one was found, it will refresh {@linkcode battleCount}. + * @param modifiers {@linkcode PersistentModifier} array of the player's modifiers + * @param _virtual N/A + * @param _scene N/A + * @returns true if the modifier was successfully added or applied, false otherwise + */ + add(modifiers: PersistentModifier[], _virtual: boolean, scene: BattleScene): boolean { + for (const modifier of modifiers) { + if (this.match(modifier)) { + const modifierInstance = modifier as LapsingPersistentModifier; + if (modifierInstance.getBattleCount() < modifierInstance.getMaxBattles()) { + modifierInstance.resetBattleCount(); + scene.playSound("se/restore"); + return true; + } + // should never get here + return false; + } + } + + modifiers.push(this); + return true; + } + + lapse(_args: any[]): boolean { + this.battleCount--; + return this.battleCount > 0; } getIcon(scene: BattleScene): Phaser.GameObjects.Container { const container = super.getIcon(scene); - const battleCountText = addTextObject(scene, 27, 0, this.battlesLeft.toString(), TextStyle.PARTY, { fontSize: "66px", color: "#f89890" }); + // Linear interpolation on hue + const hue = Math.floor(120 * (this.battleCount / this.maxBattles) + 5); + + // Generates the color hex code with a constant saturation and lightness but varying hue + const typeHex = Utils.hslToHex(hue, 0.50, 0.90); + const strokeHex = Utils.hslToHex(hue, 0.70, 0.30); + + const battleCountText = addTextObject(scene, 27, 0, this.battleCount.toString(), TextStyle.PARTY, { fontSize: "66px", color: typeHex }); battleCountText.setShadow(0, 0); - battleCountText.setStroke("#984038", 16); + battleCountText.setStroke(strokeHex, 16); battleCountText.setOrigin(1, 0); container.add(battleCountText); return container; } - getBattlesLeft(): integer { - return this.battlesLeft; + getBattleCount(): number { + return this.battleCount; } - getMaxStackCount(scene: BattleScene, forThreshold?: boolean): number { - return 99; - } -} - -export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier { - constructor(type: ModifierTypes.DoubleBattleChanceBoosterModifierType, battlesLeft: integer, stackCount?: integer) { - super(type, battlesLeft, stackCount); + resetBattleCount(): void { + this.battleCount = this.maxBattles; } - match(modifier: Modifier): boolean { - if (modifier instanceof DoubleBattleChanceBoosterModifier) { - // Check type id to not match different tiers of lures - return modifier.type.id === this.type.id && modifier.battlesLeft === this.battlesLeft; - } - return false; - } - - clone(): DoubleBattleChanceBoosterModifier { - return new DoubleBattleChanceBoosterModifier(this.type as ModifierTypes.DoubleBattleChanceBoosterModifierType, this.battlesLeft, this.stackCount); + getMaxBattles(): number { + return this.maxBattles; } getArgs(): any[] { - return [ this.battlesLeft ]; + return [ this.maxBattles, this.battleCount ]; } + + getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number { + return 1; + } +} + +/** + * Modifier used for passive items, specifically lures, that + * temporarily increases the chance of a double battle. + * @extends LapsingPersistentModifier + * @see {@linkcode apply} + */ +export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier { + constructor(type: ModifierType, maxBattles:number, battleCount?: number, stackCount?: integer) { + super(type, maxBattles, battleCount, stackCount); + } + + match(modifier: Modifier): boolean { + return (modifier instanceof DoubleBattleChanceBoosterModifier) && (modifier.getMaxBattles() === this.getMaxBattles()); + } + + clone(): DoubleBattleChanceBoosterModifier { + return new DoubleBattleChanceBoosterModifier(this.type as ModifierTypes.DoubleBattleChanceBoosterModifierType, this.getMaxBattles(), this.getBattleCount(), this.stackCount); + } + /** * Modifies the chance of a double battle occurring - * @param args A single element array containing the double battle chance as a NumberHolder - * @returns {boolean} Returns true if the modifier was applied + * @param args [0] {@linkcode Utils.NumberHolder} for double battle chance + * @returns true if the modifier was applied */ apply(args: any[]): boolean { const doubleBattleChance = args[0] as Utils.NumberHolder; // This is divided because the chance is generated as a number from 0 to doubleBattleChance.value using Utils.randSeedInt // A double battle will initiate if the generated number is 0 - doubleBattleChance.value = Math.ceil(doubleBattleChance.value / 2); + doubleBattleChance.value = Math.ceil(doubleBattleChance.value / 4); return true; } @@ -369,16 +430,18 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier * @see {@linkcode apply} */ export class TempStatStageBoosterModifier extends LapsingPersistentModifier { + /** The stat whose stat stage multiplier will be temporarily increased */ private stat: TempBattleStat; - private multiplierBoost: number; + /** The amount by which the stat stage itself or its multiplier will be increased by */ + private boost: number; - constructor(type: ModifierType, stat: TempBattleStat, battlesLeft?: number, stackCount?: number) { - super(type, battlesLeft ?? 5, stackCount); + constructor(type: ModifierType, stat: TempBattleStat, maxBattles: number, battleCount?: number, stackCount?: number) { + super(type, maxBattles, battleCount, stackCount); this.stat = stat; // Note that, because we want X Accuracy to maintain its original behavior, // it will increment as it did previously, directly to the stat stage. - this.multiplierBoost = stat !== Stat.ACC ? 0.3 : 1; + this.boost = (stat !== Stat.ACC) ? 0.3 : 1; } match(modifier: Modifier): boolean { @@ -390,11 +453,11 @@ export class TempStatStageBoosterModifier extends LapsingPersistentModifier { } clone() { - return new TempStatStageBoosterModifier(this.type, this.stat, this.battlesLeft, this.stackCount); + return new TempStatStageBoosterModifier(this.type, this.stat, this.getMaxBattles(), this.getBattleCount(), this.stackCount); } getArgs(): any[] { - return [ this.stat, this.battlesLeft ]; + return [ this.stat, ...super.getArgs() ]; } /** @@ -409,44 +472,14 @@ export class TempStatStageBoosterModifier extends LapsingPersistentModifier { } /** - * Increases the incoming stat stage matching {@linkcode stat} by {@linkcode multiplierBoost}. + * Increases the incoming stat stage matching {@linkcode stat} by {@linkcode boost}. * @param args [0] {@linkcode TempBattleStat} N/A * [1] {@linkcode Utils.NumberHolder} that holds the resulting value of the stat stage multiplier */ apply(args: any[]): boolean { - (args[1] as Utils.NumberHolder).value += this.multiplierBoost; + (args[1] as Utils.NumberHolder).value += this.boost; return true; } - - /** - * Goes through existing modifiers for any that match the selected modifier, - * which will then either add it to the existing modifiers if none were found - * or, if one was found, it will refresh {@linkcode battlesLeft}. - * @param modifiers {@linkcode PersistentModifier} array of the player's modifiers - * @param _virtual N/A - * @param _scene N/A - * @returns true if the modifier was successfully added or applied, false otherwise - */ - add(modifiers: PersistentModifier[], _virtual: boolean, _scene: BattleScene): boolean { - for (const modifier of modifiers) { - if (this.match(modifier)) { - const modifierInstance = modifier as TempStatStageBoosterModifier; - if (modifierInstance.getBattlesLeft() < 5) { - modifierInstance.battlesLeft = 5; - return true; - } - // should never get here - return false; - } - } - - modifiers.push(this); - return true; - } - - getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number { - return 1; - } } /** @@ -456,12 +489,12 @@ export class TempStatStageBoosterModifier extends LapsingPersistentModifier { * @see {@linkcode apply} */ export class TempCritBoosterModifier extends LapsingPersistentModifier { - constructor(type: ModifierType, battlesLeft?: integer, stackCount?: number) { - super(type, battlesLeft || 5, stackCount); + constructor(type: ModifierType, maxBattles: number, battleCount?: number, stackCount?: number) { + super(type, maxBattles, battleCount, stackCount); } clone() { - return new TempCritBoosterModifier(this.type, this.stackCount); + return new TempCritBoosterModifier(this.type, this.getMaxBattles(), this.getBattleCount(), this.stackCount); } match(modifier: Modifier): boolean { @@ -486,36 +519,6 @@ export class TempCritBoosterModifier extends LapsingPersistentModifier { (args[0] as Utils.NumberHolder).value++; return true; } - - /** - * Goes through existing modifiers for any that match the selected modifier, - * which will then either add it to the existing modifiers if none were found - * or, if one was found, it will refresh {@linkcode battlesLeft}. - * @param modifiers {@linkcode PersistentModifier} array of the player's modifiers - * @param _virtual N/A - * @param _scene N/A - * @returns true if the modifier was successfully added or applied, false otherwise - */ - add(modifiers: PersistentModifier[], _virtual: boolean, _scene: BattleScene): boolean { - for (const modifier of modifiers) { - if (this.match(modifier)) { - const modifierInstance = modifier as TempCritBoosterModifier; - if (modifierInstance.getBattlesLeft() < 5) { - modifierInstance.battlesLeft = 5; - return true; - } - // should never get here - return false; - } - } - - modifiers.push(this); - return true; - } - - getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number { - return 1; - } } export class MapModifier extends PersistentModifier { diff --git a/src/test/items/dire_hit.test.ts b/src/test/items/dire_hit.test.ts index 02f7c0d06a4..4b5988294f3 100644 --- a/src/test/items/dire_hit.test.ts +++ b/src/test/items/dire_hit.test.ts @@ -72,7 +72,7 @@ describe("Items - Dire Hit", () => { await game.phaseInterceptor.to(BattleEndPhase); const modifier = game.scene.findModifier(m => m instanceof TempCritBoosterModifier) as TempCritBoosterModifier; - expect(modifier.getBattlesLeft()).toBe(4); + expect(modifier.getBattleCount()).toBe(4); // Forced DIRE_HIT to spawn in the first slot with override game.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { @@ -90,7 +90,7 @@ describe("Items - Dire Hit", () => { for (const m of game.scene.modifiers) { if (m instanceof TempCritBoosterModifier) { count++; - expect((m as TempCritBoosterModifier).getBattlesLeft()).toBe(5); + expect((m as TempCritBoosterModifier).getBattleCount()).toBe(5); } } expect(count).toBe(1); diff --git a/src/test/items/double_battle_chance_booster.test.ts b/src/test/items/double_battle_chance_booster.test.ts new file mode 100644 index 00000000000..808d4c7ca51 --- /dev/null +++ b/src/test/items/double_battle_chance_booster.test.ts @@ -0,0 +1,105 @@ +import { Moves } from "#app/enums/moves.js"; +import { Species } from "#app/enums/species.js"; +import { DoubleBattleChanceBoosterModifier } from "#app/modifier/modifier"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "../utils/testUtils"; +import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js"; +import { Mode } from "#app/ui/ui.js"; +import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler.js"; +import { Button } from "#app/enums/buttons.js"; + +describe("Items - Double Battle Chance Boosters", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + }); + + it("should guarantee double battle with 2 unique tiers", async () => { + game.override + .startingModifier([ + { name: "LURE" }, + { name: "SUPER_LURE" } + ]) + .startingWave(2); + + await game.classicMode.startBattle(); + + expect(game.scene.getEnemyField().length).toBe(2); + }, TIMEOUT); + + it("should guarantee double boss battle with 3 unique tiers", async () => { + game.override + .startingModifier([ + { name: "LURE" }, + { name: "SUPER_LURE" }, + { name: "MAX_LURE" } + ]) + .startingWave(10); + + await game.classicMode.startBattle(); + + const enemyField = game.scene.getEnemyField(); + + expect(enemyField.length).toBe(2); + expect(enemyField[0].isBoss()).toBe(true); + expect(enemyField[1].isBoss()).toBe(true); + }, TIMEOUT); + + it("should renew how many battles are left of existing booster when picking up new booster of same tier", async() => { + game.override + .startingModifier([{ name: "LURE" }]) + .itemRewards([{ name: "LURE" }]) + .moveset(SPLASH_ONLY) + .startingLevel(200); + + await game.classicMode.startBattle([ + Species.PIKACHU + ]); + + game.move.select(Moves.SPLASH); + + await game.doKillOpponents(); + + await game.phaseInterceptor.to("BattleEndPhase"); + + const modifier = game.scene.findModifier(m => m instanceof DoubleBattleChanceBoosterModifier) as DoubleBattleChanceBoosterModifier; + expect(modifier.getBattleCount()).toBe(9); + + // Forced LURE to spawn in the first slot with override + game.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { + const handler = game.scene.ui.getHandler() as ModifierSelectUiHandler; + // Traverse to first modifier slot + handler.setCursor(0); + handler.setRowCursor(ShopCursorTarget.REWARDS); + handler.processInput(Button.ACTION); + }, () => game.isCurrentPhase("CommandPhase") || game.isCurrentPhase("NewBattlePhase"), true); + + await game.phaseInterceptor.to("TurnInitPhase"); + + // Making sure only one booster is in the modifier list even after picking up another + let count = 0; + for (const m of game.scene.modifiers) { + if (m instanceof DoubleBattleChanceBoosterModifier) { + count++; + const modifierInstance = m as DoubleBattleChanceBoosterModifier; + expect(modifierInstance.getBattleCount()).toBe(modifierInstance.getMaxBattles()); + } + } + expect(count).toBe(1); + }, TIMEOUT); +}); diff --git a/src/test/items/temp_stat_stage_booster.test.ts b/src/test/items/temp_stat_stage_booster.test.ts index c81703220db..3e32fa13a04 100644 --- a/src/test/items/temp_stat_stage_booster.test.ts +++ b/src/test/items/temp_stat_stage_booster.test.ts @@ -10,12 +10,7 @@ import { Abilities } from "#app/enums/abilities"; import { TempStatStageBoosterModifier } from "#app/modifier/modifier"; import { Mode } from "#app/ui/ui"; import { Button } from "#app/enums/buttons"; -import { CommandPhase } from "#app/phases/command-phase"; -import { NewBattlePhase } from "#app/phases/new-battle-phase"; import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; -import { BattleEndPhase } from "#app/phases/battle-end-phase"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; @@ -46,7 +41,7 @@ describe("Items - Temporary Stat Stage Boosters", () => { }); it("should provide a x1.3 stat stage multiplier", async() => { - await game.startBattle([ + await game.classicMode.startBattle([ Species.PIKACHU ]); @@ -56,7 +51,7 @@ describe("Items - Temporary Stat Stage Boosters", () => { game.move.select(Moves.TACKLE); - await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase); + await game.phaseInterceptor.runFrom("EnemyCommandPhase").to(TurnEndPhase); expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(1.3); }, 20000); @@ -66,7 +61,7 @@ describe("Items - Temporary Stat Stage Boosters", () => { .startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]) .ability(Abilities.SIMPLE); - await game.startBattle([ + await game.classicMode.startBattle([ Species.PIKACHU ]); @@ -89,7 +84,7 @@ describe("Items - Temporary Stat Stage Boosters", () => { it("should increase existing stat stage multiplier by 3/10 for the rest of the boosters", async() => { - await game.startBattle([ + await game.classicMode.startBattle([ Species.PIKACHU ]); @@ -113,7 +108,7 @@ describe("Items - Temporary Stat Stage Boosters", () => { it("should not increase past maximum stat stage multiplier", async() => { game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }, { name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]); - await game.startBattle([ + await game.classicMode.startBattle([ Species.PIKACHU ]); @@ -138,7 +133,7 @@ describe("Items - Temporary Stat Stage Boosters", () => { .startingLevel(200) .itemRewards([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]); - await game.startBattle([ + await game.classicMode.startBattle([ Species.PIKACHU ]); @@ -146,10 +141,10 @@ describe("Items - Temporary Stat Stage Boosters", () => { await game.doKillOpponents(); - await game.phaseInterceptor.to(BattleEndPhase); + await game.phaseInterceptor.to("BattleEndPhase"); const modifier = game.scene.findModifier(m => m instanceof TempStatStageBoosterModifier) as TempStatStageBoosterModifier; - expect(modifier.getBattlesLeft()).toBe(4); + expect(modifier.getBattleCount()).toBe(4); // Forced X_ATTACK to spawn in the first slot with override game.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { @@ -158,16 +153,17 @@ describe("Items - Temporary Stat Stage Boosters", () => { handler.setCursor(0); handler.setRowCursor(ShopCursorTarget.REWARDS); handler.processInput(Button.ACTION); - }, () => game.isCurrentPhase(CommandPhase) || game.isCurrentPhase(NewBattlePhase), true); + }, () => game.isCurrentPhase("CommandPhase") || game.isCurrentPhase("NewBattlePhase"), true); - await game.phaseInterceptor.to(TurnInitPhase); + await game.phaseInterceptor.to("TurnInitPhase"); // Making sure only one booster is in the modifier list even after picking up another let count = 0; for (const m of game.scene.modifiers) { if (m instanceof TempStatStageBoosterModifier) { count++; - expect((m as TempStatStageBoosterModifier).getBattlesLeft()).toBe(5); + const modifierInstance = m as TempStatStageBoosterModifier; + expect(modifierInstance.getBattleCount()).toBe(modifierInstance.getMaxBattles()); } } expect(count).toBe(1); diff --git a/src/utils.ts b/src/utils.ts index fd5430d7276..592981c7643 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -455,6 +455,26 @@ export function rgbaToInt(rgba: integer[]): integer { return (rgba[0] << 24) + (rgba[1] << 16) + (rgba[2] << 8) + rgba[3]; } +/** + * Provided valid HSV values, calculates and stitches together a string of that + * HSV color's corresponding hex code. + * + * Sourced from {@link https://stackoverflow.com/a/44134328}. + * @param h Hue in degrees, must be in a range of [0, 360] + * @param s Saturation percentage, must be in a range of [0, 1] + * @param l Ligthness percentage, must be in a range of [0, 1] + * @returns a string of the corresponding color hex code with a "#" prefix + */ +export function hslToHex(h: number, s: number, l: number): string { + const a = s * Math.min(l, 1 - l); + const f = (n: number) => { + const k = (n + h / 30) % 12; + const rgb = l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1)); + return Math.round(rgb * 255).toString(16).padStart(2, "0"); + }; + return `#${f(0)}${f(8)}${f(4)}`; +} + /*This function returns true if the current lang is available for some functions If the lang is not in the function, it usually means that lang is going to use the default english version This function is used in: From dfa399386460d2657695e76faf13d52a33a93c62 Mon Sep 17 00:00:00 2001 From: James Diefenbach <105332964+j-diefenbach@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:32:49 +1000 Subject: [PATCH 55/91] Egg summary background touchup (#4091) * darker egg-summary background * reset old background for beta * update egg summary bg * reset overrides --------- Co-authored-by: James Diefenbach --- public/images/ui/egg_summary_bg.png | Bin 2209 -> 2247 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/public/images/ui/egg_summary_bg.png b/public/images/ui/egg_summary_bg.png index b4ee3d86a507bfb99b4f9af2d71b5065e4ac943b..e81934b9d75b3acbed35b113f803dfa119a78631 100644 GIT binary patch literal 2247 zcmeH}{a;dd8^@2xRGMkvYeuEyW6ssYRV$W{iB6ruc?k;777XhDvtLxCg(9dFEvZxN%}<6DSC;`;R8hVF<&pLM2`nb!n|hMu|jFgY++ zF@1B7BJ3@irr`ENBMJ_Wj*gxTQ*fDsTy&plfyON~EL6~*jQ(+c(eVB2Dz3?7Dwpi! ztGvCIv|4`qx>lAzTaDh|TjIB;F_+5q8fQiJW#4W}pMur4hlrCB?UQ2pa;wEdMTu-rw>!2(k`mYcE#m;Q^# z!R~haj4N|s)K)z&;kLHR8GmTVZYUH-Q1-2plhY#=tzcq#s|UZXJ$*nXlX0Vqs&9TH zU!;s4zmi3To&3r8WYP4Ne()M+K5g#P0@L;J@l?m5++FiaNCau?ImczRclRF7x8m8l z>gwwH_csxUL|122a3(dr;ojlb#IxIL2mf_@T0=4$$?tEfR>Eb}2czz%?CtFzvuGy6 zQB_h?oKz)nsw9Fbme2MXyXH{0BphmwJHemMXbbkj(GKRaw8yWUy?WOh7OW0AKg7c( zLa^=#OsQfk$w7~ojOU+%CUnvZW2Dd?%Bm)4@vgSsHD3qc!slwS92UZ>N) z_R0C;P5Q+E*o71YrDJ}sCngVg58t#2b^#xUzZ?hgyT5B=R*)fJuX_;!c{vv1H-&6UFaBoNJ(s zQKz8AxHcbkUOKt{z~KgGP6KtV1P<5egSS=+!{gIb5BLT|r#>6Ws44`-LP@Te&iha6 z=p+D6p4zz|Hq0=f2_3$HBffN(BP#+3OuyZ-C*36r=9m{Ny@s1UnSJQtX)x+(-Dwc) zKE&TD)~Ke9;0v|F#5!ogk9nbE#HD>;cm6N?KWM^72wlrU@dBevmR5)(I?J;qg2^+L zLjN6iD+1_DkdgjxSfCA^lM&tZqUqx#X>q01A<@@{&?nD{rgxe~%3YaJk&fOQRARej zf-hZli+wXso3%sXgayxjqF$Kq%Tn-^UrE<2SRGiR@=@=*J$>SxPYw*?XOb78`~4Wl z`r3m4&_2V|0Cj)=Zp9JVo;RFj4D~xToCX5u#q_YFTsGUqQLNXKwVtmuHMY*?E?;sh z67RGyOG?-+mP|_Ok7;3`#6$y{QS*$KF$@s0V0-w$1X>cVQ&Y?IZHkzlj`p7eW(st1opF4XfoH z2vF(;fx6F&gqh@(R9+ywHo~?U#QYzTG0*pWK7U??IhNHz6T<%qI(--%NGr9AGT6m+ zSG5$Q`oI)%Wx!Pmg_(MR5T+A=X&ibnN|4AmMG!w}>dRBl=fB(k3wOYcw=$N7ebv)U z=9px%oIg3K^niAYc+fK?)^$nAl=#C6hjW{&&EGDJ(Ol_pX9C1VB}BGG;J^3_=!8=B literal 2209 zcmeHJdsLEV9R5VSkQ8Pv%jHbd%;kmVQp*BU4DCW4b7h*ru=JEBT3VVYQkk?;OgqsE zrQ0bTLo{zF1YdcZV`-fdFsH03OEb|lykNqrK|eYGD^H;ZQHf65;B8 zXB(?7pFHn@d*8aYzMLLz`-^o-w%nqz9mg-e_Mjy#wz;q87M_VQ0pUl2aBMcaN}NY| zu2fPo5V!JQh)-3le%X3|imEFetXFh)9-@ZS3Izg26M4;4;7DJeQ*$Qqfr7_znUK>+ z!yS~0iC47@hA#%AmhhAwWj$i;I9K1T9pWnWPl(q%Wy9Q?BISYw3%nDQ<61Ds^%1E-LSea)-zIS_?CY_w{*9rcY0e?%4N- zy%&HJOj;gvsVUgB(Z1&^Dm7U29*WH#RHcU4+gTZ#M5T(7K%O3>nm#eylOfkX4%>I1 zFXKrl{2rRh(oL*kE&BanDaKTh5;eH>&`%;%Gu1#Pa*(o2*hGG!wc6~^kYN&C8}5d& z&!Y5*4rRD2t7>a)_(VxU#?tL}c6Lol{dkGyp#RBsqL?A)6KQF1-)oN|_P6hGXGvu& z^w&})R)US8{n%MEV<%KZNRl!$zl!$av`=r$h8I7Ixuuhus|(V{rrtfBo*0hyzScA~ zm9`;uPVMPY?tIrZz7T z9Y(9@^s7#Zr`+i`JP_>gL2CKXYoXvcP_~=PrP$6#AfHuT1f!klLPkEgQ(6rd4|t)x z2!?F(YDY4K;`vQJ=)ZlUN1QS3N*N4+fy^ghp~CZ# z5a~~_T0oSH8}dJc8URIs=+BWtQ3j3vpZ0Sj{P)`SFG{W3*G#TpFy7qe*gb(fy#(@f zZv-s8aSg$z+jG`6E9k%torZr(e7#56S*hJOEq*cj7r99*^ho zv$3Tq7{&4NsQ4f%L0ME(L}Gh*cxYWpvQDZWy&T)20@xBQ5r<=Ab@*N>xmydl`9({b zL-MS>A?LmQ1$Ct$7aqfQLO*k+FN!Nd)f8peOc;}HIwitB=@1GW2poq|avgUxVVYTD9;FVM^C zWK*QB&J#~uMp~p&g|a($rn_6W94?S*;dzYrV+Nz}=`JP=kAnq9$*of3()|d89n+6e zXS+0)X|#Sa%k_=h2W+DO{j=4AXu$C(n+s2KDl26y;6x|~q|FT6mB}BvW7tI@q>|u| z?f)*4M7n37R(}~(?JD!iG{_zRGcHtRKSrcFeEUqbcaBEWW*AK*dRtna)jBdzZUyx? z3r_giAo?UV3p|jv*w+YwObMAw$hHYEE`)^qBr^D8&5sL?1p>M4GMwNK@wD=-Fv#NY zk7Ng$7ydGAMn>m0{GM7YLBQ%Db!Y)2(?du5rcu1YduCAn`C!bTAxgQAIElf&I zu9{loZ)T5nE;jjq{rv`V`n0j8>VTj1&>w&0mNev`2f4V^iFkRSrCEP! Date: Sun, 8 Sep 2024 11:33:33 +1000 Subject: [PATCH 56/91] Fixed small RNG misusage (#4092) --- src/phases/attempt-run-phase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phases/attempt-run-phase.ts b/src/phases/attempt-run-phase.ts index 9cf86fed592..46d68f6005a 100644 --- a/src/phases/attempt-run-phase.ts +++ b/src/phases/attempt-run-phase.ts @@ -28,7 +28,7 @@ export class AttemptRunPhase extends PokemonPhase { applyAbAttrs(RunSuccessAbAttr, playerPokemon, null, false, escapeChance); - if (Utils.randSeedInt(100) < escapeChance.value) { + if (playerPokemon.randSeedInt(100) < escapeChance.value) { this.scene.playSound("se/flee"); this.scene.queueMessage(i18next.t("battle:runAwaySuccess"), null, true, 500); From ffcedfd9a4b9f35ad61c035ebe22a494ecf45500 Mon Sep 17 00:00:00 2001 From: "Amani H." <109637146+xsn34kzx@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:40:45 -0400 Subject: [PATCH 57/91] [Dev] Save Data Version Migration (#4080) * Initial Draft * Successfuly Migration with Vitamins and White Herb * Apply Session Data Patches Earlier * Remove Stray `console.log` --- src/system/game-data.ts | 138 ++++++-------------------------- src/system/modifier-data.ts | 10 +-- src/system/version-converter.ts | 137 +++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+), 120 deletions(-) create mode 100644 src/system/version-converter.ts diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 746af4d47a5..800b8baecff 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1,7 +1,7 @@ import i18next from "i18next"; import BattleScene, { PokeballCounts, bypassLogin } from "../battle-scene"; import Pokemon, { EnemyPokemon, PlayerPokemon } from "../field/pokemon"; -import { pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions"; +import { pokemonPrevolutions } from "../data/pokemon-evolutions"; import PokemonSpecies, { allSpecies, getPokemonSpecies, noStarterFormKeys, speciesStarters } from "../data/pokemon-species"; import * as Utils from "../utils"; import Overrides from "#app/overrides"; @@ -27,7 +27,7 @@ import { Tutorial } from "../tutorial"; import { speciesEggMoves } from "../data/egg-moves"; import { allMoves } from "../data/move"; import { TrainerVariant } from "../field/trainer"; -import { Variant, variantData } from "#app/data/variant"; +import { Variant } from "#app/data/variant"; import {setSettingGamepad, SettingGamepad, settingGamepadDefaults} from "./settings/settings-gamepad"; import {setSettingKeyboard, SettingKeyboard} from "#app/system/settings/settings-keyboard"; import { TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena.js"; @@ -45,6 +45,7 @@ import { TerrainType } from "#app/data/terrain.js"; import { OutdatedPhase } from "#app/phases/outdated-phase.js"; import { ReloadSessionPhase } from "#app/phases/reload-session-phase.js"; import { RUN_HISTORY_LIMIT } from "#app/ui/run-history-ui-handler"; +import { applySessionDataPatches, applySettingsDataPatches, applySystemDataPatches } from "./version-converter"; export const defaultStarterSpecies: Species[] = [ Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, @@ -93,7 +94,7 @@ export function decrypt(data: string, bypassLogin: boolean): string { : (data: string) => AES.decrypt(data, saveKey).toString(enc.Utf8))(data); } -interface SystemSaveData { +export interface SystemSaveData { trainerId: integer; secretId: integer; gender: PlayerGender; @@ -456,17 +457,14 @@ export class GameData { localStorage.setItem(`data_${loggedInUser?.username}`, encrypt(systemDataStr, bypassLogin)); - /*const versions = [ this.scene.game.config.gameVersion, data.gameVersion || '0.0.0' ]; - - if (versions[0] !== versions[1]) { - const [ versionNumbers, oldVersionNumbers ] = versions.map(ver => ver.split('.').map(v => parseInt(v))); - }*/ const lsItemKey = `runHistoryData_${loggedInUser?.username}`; const lsItem = localStorage.getItem(lsItemKey); if (!lsItem) { localStorage.setItem(lsItemKey, ""); } + applySystemDataPatches(systemData); + this.trainerId = systemData.trainerId; this.secretId = systemData.secretId; @@ -474,9 +472,7 @@ export class GameData { this.saveSetting(SettingKeys.Player_Gender, systemData.gender === PlayerGender.FEMALE ? 1 : 0); - const initStarterData = !systemData.starterData; - - if (initStarterData) { + if (!systemData.starterData) { this.initStarterData(); if (systemData["starterMoveData"]) { @@ -494,25 +490,20 @@ export class GameData { } this.migrateStarterAbilities(systemData, this.starterData); - } else { - if ([ "1.0.0", "1.0.1" ].includes(systemData.gameVersion)) { - this.migrateStarterAbilities(systemData); - } - //this.fixVariantData(systemData); - this.fixStarterData(systemData); - // Migrate ability starter data if empty for caught species - Object.keys(systemData.starterData).forEach(sd => { - if (systemData.dexData[sd].caughtAttr && !systemData.starterData[sd].abilityAttr) { - systemData.starterData[sd].abilityAttr = 1; + + const starterIds = Object.keys(this.starterData).map(s => parseInt(s) as Species); + for (const s of starterIds) { + this.starterData[s].candyCount += this.dexData[s].caughtCount; + this.starterData[s].candyCount += this.dexData[s].hatchedCount * 2; + if (this.dexData[s].caughtAttr & DexAttr.SHINY) { + this.starterData[s].candyCount += 4; } - }); + } + } else { this.starterData = systemData.starterData; } if (systemData.gameStats) { - if (systemData.gameStats.legendaryPokemonCaught !== undefined && systemData.gameStats.subLegendaryPokemonCaught === undefined) { - this.fixLegendaryStats(systemData); - } this.gameStats = systemData.gameStats; } @@ -558,17 +549,6 @@ export class GameData { this.consolidateDexData(this.dexData); this.defaultDexData = null; - if (initStarterData) { - const starterIds = Object.keys(this.starterData).map(s => parseInt(s) as Species); - for (const s of starterIds) { - this.starterData[s].candyCount += this.dexData[s].caughtCount; - this.starterData[s].candyCount += this.dexData[s].hatchedCount * 2; - if (this.dexData[s].caughtAttr & DexAttr.SHINY) { - this.starterData[s].candyCount += 4; - } - } - } - resolve(true); } catch (err) { console.error(err); @@ -747,6 +727,7 @@ export class GameData { setSetting(this.scene, setting, valueIndex); settings[setting] = valueIndex; + settings["gameVersion"] = this.scene.game.config.gameVersion; localStorage.setItem("settings", JSON.stringify(settings)); @@ -857,13 +838,7 @@ export class GameData { const settings = JSON.parse(localStorage.getItem("settings")!); // TODO: is this bang correct? - // TODO: Remove this block after save migration is implemented - if (settings.hasOwnProperty("REROLL_TARGET") && !settings.hasOwnProperty(SettingKeys.Shop_Cursor_Target)) { - settings[SettingKeys.Shop_Cursor_Target] = settings["REROLL_TARGET"]; - delete settings["REROLL_TARGET"]; - localStorage.setItem("settings", JSON.stringify(settings)); - } - // End of block to remove + applySettingsDataPatches(settings); for (const setting of Object.keys(settings)) { setSetting(this.scene, setting, settings[setting]); @@ -1226,7 +1201,7 @@ export class GameData { } parseSessionData(dataStr: string): SessionSaveData { - return JSON.parse(dataStr, (k: string, v: any) => { + const sessionData = JSON.parse(dataStr, (k: string, v: any) => { /*const versions = [ scene.game.config.gameVersion, sessionData.gameVersion || '0.0.0' ]; if (versions[0] !== versions[1]) { @@ -1283,6 +1258,10 @@ export class GameData { return v; }) as SessionSaveData; + + applySessionDataPatches(sessionData); + + return sessionData; } saveAll(scene: BattleScene, skipVerification: boolean = false, sync: boolean = false, useCachedSession: boolean = false, useCachedSystem: boolean = false): Promise { @@ -1885,75 +1864,4 @@ export class GameData { } } } - - fixVariantData(systemData: SystemSaveData): void { - const starterIds = Object.keys(this.starterData).map(s => parseInt(s) as Species); - const starterData = systemData.starterData; - const dexData = systemData.dexData; - if (starterIds.find(id => (dexData[id].caughtAttr & DexAttr.VARIANT_2 || dexData[id].caughtAttr & DexAttr.VARIANT_3) && !variantData[id])) { - for (const s of starterIds) { - const species = getPokemonSpecies(s); - if (variantData[s]) { - const tempCaughtAttr = dexData[s].caughtAttr; - let seenVariant2 = false; - let seenVariant3 = false; - const checkEvoSpecies = (es: Species) => { - seenVariant2 ||= !!(dexData[es].seenAttr & DexAttr.VARIANT_2); - seenVariant3 ||= !!(dexData[es].seenAttr & DexAttr.VARIANT_3); - if (pokemonEvolutions.hasOwnProperty(es)) { - for (const pe of pokemonEvolutions[es]) { - checkEvoSpecies(pe.speciesId); - } - } - }; - checkEvoSpecies(s); - if (dexData[s].caughtAttr & DexAttr.VARIANT_2 && !seenVariant2) { - dexData[s].caughtAttr ^= DexAttr.VARIANT_2; - } - if (dexData[s].caughtAttr & DexAttr.VARIANT_3 && !seenVariant3) { - dexData[s].caughtAttr ^= DexAttr.VARIANT_3; - } - starterData[s].abilityAttr = (tempCaughtAttr & DexAttr.DEFAULT_VARIANT ? AbilityAttr.ABILITY_1 : 0) - | (tempCaughtAttr & DexAttr.VARIANT_2 && species.ability2 ? AbilityAttr.ABILITY_2 : 0) - | (tempCaughtAttr & DexAttr.VARIANT_3 && species.abilityHidden ? AbilityAttr.ABILITY_HIDDEN : 0); - } else { - const tempCaughtAttr = dexData[s].caughtAttr; - if (dexData[s].caughtAttr & DexAttr.VARIANT_2) { - dexData[s].caughtAttr ^= DexAttr.VARIANT_2; - } - if (dexData[s].caughtAttr & DexAttr.VARIANT_3) { - dexData[s].caughtAttr ^= DexAttr.VARIANT_3; - } - starterData[s].abilityAttr = (tempCaughtAttr & DexAttr.DEFAULT_VARIANT ? AbilityAttr.ABILITY_1 : 0) - | (tempCaughtAttr & DexAttr.VARIANT_2 && species.ability2 ? AbilityAttr.ABILITY_2 : 0) - | (tempCaughtAttr & DexAttr.VARIANT_3 && species.abilityHidden ? AbilityAttr.ABILITY_HIDDEN : 0); - } - } - } - } - - fixStarterData(systemData: SystemSaveData): void { - for (const starterId of defaultStarterSpecies) { - systemData.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1; - systemData.dexData[starterId].caughtAttr |= DexAttr.FEMALE; - } - } - - fixLegendaryStats(systemData: SystemSaveData): void { - systemData.gameStats.subLegendaryPokemonSeen = 0; - systemData.gameStats.subLegendaryPokemonCaught = 0; - systemData.gameStats.subLegendaryPokemonHatched = 0; - allSpecies.filter(s => s.subLegendary).forEach(s => { - const dexEntry = systemData.dexData[s.speciesId]; - systemData.gameStats.subLegendaryPokemonSeen += dexEntry.seenCount; - systemData.gameStats.legendaryPokemonSeen = Math.max(systemData.gameStats.legendaryPokemonSeen - dexEntry.seenCount, 0); - systemData.gameStats.subLegendaryPokemonCaught += dexEntry.caughtCount; - systemData.gameStats.legendaryPokemonCaught = Math.max(systemData.gameStats.legendaryPokemonCaught - dexEntry.caughtCount, 0); - systemData.gameStats.subLegendaryPokemonHatched += dexEntry.hatchedCount; - systemData.gameStats.legendaryPokemonHatched = Math.max(systemData.gameStats.legendaryPokemonHatched - dexEntry.hatchedCount, 0); - }); - systemData.gameStats.subLegendaryPokemonSeen = Math.max(systemData.gameStats.subLegendaryPokemonSeen, systemData.gameStats.subLegendaryPokemonCaught); - systemData.gameStats.legendaryPokemonSeen = Math.max(systemData.gameStats.legendaryPokemonSeen, systemData.gameStats.legendaryPokemonCaught); - systemData.gameStats.mythicalPokemonSeen = Math.max(systemData.gameStats.mythicalPokemonSeen, systemData.gameStats.mythicalPokemonCaught); - } } diff --git a/src/system/modifier-data.ts b/src/system/modifier-data.ts index 0f3e28fe11c..1514f7e3fb3 100644 --- a/src/system/modifier-data.ts +++ b/src/system/modifier-data.ts @@ -3,11 +3,11 @@ import { PersistentModifier } from "../modifier/modifier"; import { GeneratedPersistentModifierType, ModifierType, ModifierTypeGenerator, getModifierTypeFuncById } from "../modifier/modifier-type"; export default class ModifierData { - private player: boolean; - private typeId: string; - private typePregenArgs: any[]; - private args: any[]; - private stackCount: integer; + public player: boolean; + public typeId: string; + public typePregenArgs: any[]; + public args: any[]; + public stackCount: integer; public className: string; diff --git a/src/system/version-converter.ts b/src/system/version-converter.ts new file mode 100644 index 00000000000..ed65fcd99b8 --- /dev/null +++ b/src/system/version-converter.ts @@ -0,0 +1,137 @@ +import { allSpecies } from "#app/data/pokemon-species.js"; +import { AbilityAttr, defaultStarterSpecies, DexAttr, SessionSaveData, SystemSaveData } from "./game-data"; +import { SettingKeys } from "./settings/settings"; + +const LATEST_VERSION = "1.0.5"; + +export function applySessionDataPatches(data: SessionSaveData) { + const curVersion = data.gameVersion; + if (curVersion !== LATEST_VERSION) { + switch (curVersion) { + case "1.0.0": + case "1.0.1": + case "1.0.2": + case "1.0.3": + case "1.0.4": + // --- PATCHES --- + + // Fix Battle Items, Vitamins, and Lures + data.modifiers.forEach((m) => { + if (m.className === "PokemonBaseStatModifier") { + m.className = "BaseStatModifier"; + } else if (m.className === "PokemonResetNegativeStatStageModifier") { + m.className = "ResetNegativeStatStageModifier"; + } else if (m.className === "TempBattleStatBoosterModifier") { + m.className = "TempStatStageBoosterModifier"; + m.typeId = "TEMP_STAT_STAGE_BOOSTER"; + + // Migration from TempBattleStat to Stat + const newStat = m.typePregenArgs[0] + 1; + m.typePregenArgs[0] = newStat; + + // From [ stat, battlesLeft ] to [ stat, maxBattles, battleCount ] + m.args = [ newStat, 5, m.args[1] ]; + } else if (m.className === "DoubleBattleChanceBoosterModifier") { + let maxBattles: number; + switch (m.typeId) { + case "MAX_LURE": + maxBattles = 30; + break; + case "SUPER_LURE": + maxBattles = 15; + break; + default: + maxBattles = 10; + break; + } + + // From [ battlesLeft ] to [ maxBattles, battleCount ] + m.args = [ maxBattles, m.args[0] ]; + } + }); + + data.enemyModifiers.forEach((m) => { + if (m.className === "PokemonBaseStatModifier") { + m.className = "BaseStatModifier"; + } + }); + } + + data.gameVersion = LATEST_VERSION; + } +} + +export function applySystemDataPatches(data: SystemSaveData) { + const curVersion = data.gameVersion; + if (curVersion !== LATEST_VERSION) { + switch (curVersion) { + case "1.0.0": + case "1.0.1": + case "1.0.2": + case "1.0.3": + case "1.0.4": + // --- LEGACY PATCHES --- + if (data.starterData) { + // Migrate ability starter data if empty for caught species + Object.keys(data.starterData).forEach(sd => { + if (data.dexData[sd].caughtAttr && !data.starterData[sd].abilityAttr) { + data.starterData[sd].abilityAttr = 1; + } + }); + } + + // Fix Legendary Stats + if (data.gameStats && (data.gameStats.legendaryPokemonCaught !== undefined && data.gameStats.subLegendaryPokemonCaught === undefined)) { + data.gameStats.subLegendaryPokemonSeen = 0; + data.gameStats.subLegendaryPokemonCaught = 0; + data.gameStats.subLegendaryPokemonHatched = 0; + allSpecies.filter(s => s.subLegendary).forEach(s => { + const dexEntry = data.dexData[s.speciesId]; + data.gameStats.subLegendaryPokemonSeen += dexEntry.seenCount; + data.gameStats.legendaryPokemonSeen = Math.max(data.gameStats.legendaryPokemonSeen - dexEntry.seenCount, 0); + data.gameStats.subLegendaryPokemonCaught += dexEntry.caughtCount; + data.gameStats.legendaryPokemonCaught = Math.max(data.gameStats.legendaryPokemonCaught - dexEntry.caughtCount, 0); + data.gameStats.subLegendaryPokemonHatched += dexEntry.hatchedCount; + data.gameStats.legendaryPokemonHatched = Math.max(data.gameStats.legendaryPokemonHatched - dexEntry.hatchedCount, 0); + }); + data.gameStats.subLegendaryPokemonSeen = Math.max(data.gameStats.subLegendaryPokemonSeen, data.gameStats.subLegendaryPokemonCaught); + data.gameStats.legendaryPokemonSeen = Math.max(data.gameStats.legendaryPokemonSeen, data.gameStats.legendaryPokemonCaught); + data.gameStats.mythicalPokemonSeen = Math.max(data.gameStats.mythicalPokemonSeen, data.gameStats.mythicalPokemonCaught); + } + + // --- PATCHES --- + + // Fix Starter Data + if (data.gameVersion) { + for (const starterId of defaultStarterSpecies) { + data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1; + data.dexData[starterId].caughtAttr |= DexAttr.FEMALE; + } + } + } + + data.gameVersion = LATEST_VERSION; + } +} + +export function applySettingsDataPatches(settings: Object) { + const curVersion = settings.hasOwnProperty("gameVersion") ? settings["gameVersion"] : "1.0.0"; + if (curVersion !== LATEST_VERSION) { + switch (curVersion) { + case "1.0.0": + case "1.0.1": + case "1.0.2": + case "1.0.3": + case "1.0.4": + // --- PATCHES --- + + // Fix Reward Cursor Target + if (settings.hasOwnProperty("REROLL_TARGET") && !settings.hasOwnProperty(SettingKeys.Shop_Cursor_Target)) { + settings[SettingKeys.Shop_Cursor_Target] = settings["REROLL_TARGET"]; + delete settings["REROLL_TARGET"]; + localStorage.setItem("settings", JSON.stringify(settings)); + } + } + // Note that the current game version will be written at `saveSettings` + } +} From f73a830f7749b8289edc282e55dccd5305c772c8 Mon Sep 17 00:00:00 2001 From: DustinLin <39450497+DustinLin@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:36:47 -0700 Subject: [PATCH 58/91] [DOCS] adding JSDocs to `arena.ts` (#3590) * adding some docs * Update src/field/pokemon.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * seems like battleStats changed to statStages * Apply suggestions from code review editing doc text Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> * Update tsdocs, convert comment to tsdoc in `pokemon.ts` --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/field/arena.ts | 58 ++++++++++++++++++++++++++++++++++++++++---- src/field/pokemon.ts | 1 + 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/src/field/arena.ts b/src/field/arena.ts index e8defbd1a8e..5b167791769 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -60,7 +60,7 @@ export class Arena { this.scene.arenaBg.setTexture(`${biomeKey}_bg`); this.scene.arenaBgTransition.setTexture(`${biomeKey}_bg`); - // Redo this on initialise because during save/load the current wave isn't always + // Redo this on initialize because during save/load the current wave isn't always // set correctly during construction this.updatePoolsForTimeOfDay(); } @@ -289,7 +289,7 @@ export class Arena { /** * Sets weather to the override specified in overrides.ts - * @param weather new weather to set of type WeatherType + * @param weather new {@linkcode WeatherType} to set * @returns true to force trySetWeather to return true */ trySetWeatherOverride(weather: WeatherType): boolean { @@ -301,8 +301,8 @@ export class Arena { /** * Attempts to set a new weather to the battle - * @param weather new weather to set of type WeatherType - * @param hasPokemonSource is the new weather from a pokemon + * @param weather {@linkcode WeatherType} new {@linkcode WeatherType} to set + * @param hasPokemonSource boolean if the new weather is from a pokemon * @returns true if new weather set, false if no weather provided or attempting to set the same weather as currently in use */ trySetWeather(weather: WeatherType, hasPokemonSource: boolean): boolean { @@ -573,6 +573,12 @@ export class Arena { this.ignoreAbilities = ignoreAbilities; } + /** + * Applies each `ArenaTag` in this Arena, based on which side (self, enemy, or both) is passed in as a parameter + * @param tagType Either an {@linkcode ArenaTagType} string, or an actual {@linkcode ArenaTag} class to filter which ones to apply + * @param side {@linkcode ArenaTagSide} which side's arena tags to apply + * @param args array of parameters that the called upon tags may need + */ applyTagsForSide(tagType: ArenaTagType | Constructor, side: ArenaTagSide, ...args: unknown[]): void { let tags = typeof tagType === "string" ? this.tags.filter(t => t.tagType === tagType) @@ -583,11 +589,28 @@ export class Arena { tags.forEach(t => t.apply(this, args)); } + /** + * Applies the specified tag to both sides (ie: both user and trainer's tag that match the Tag specified) + * by calling {@linkcode applyTagsForSide()} + * @param tagType Either an {@linkcode ArenaTagType} string, or an actual {@linkcode ArenaTag} class to filter which ones to apply + * @param args array of parameters that the called upon tags may need + */ applyTags(tagType: ArenaTagType | Constructor, ...args: unknown[]): void { this.applyTagsForSide(tagType, ArenaTagSide.BOTH, ...args); } - addTag(tagType: ArenaTagType, turnCount: integer, sourceMove: Moves | undefined, sourceId: integer, side: ArenaTagSide = ArenaTagSide.BOTH, quiet: boolean = false, targetIndex?: BattlerIndex): boolean { + /** + * Adds a new tag to the arena + * @param tagType {@linkcode ArenaTagType} the tag being added + * @param turnCount How many turns the tag lasts + * @param sourceMove {@linkcode Moves} the move the tag came from, or `undefined` if not from a move + * @param sourceId The ID of the pokemon in play the tag came from (see {@linkcode BattleScene.getPokemonById}) + * @param side {@linkcode ArenaTagSide} which side(s) the tag applies to + * @param quiet If a message should be queued on screen to announce the tag being added + * @param targetIndex The {@linkcode BattlerIndex} of the target pokemon + * @returns `false` if there already exists a tag of this type in the Arena + */ + addTag(tagType: ArenaTagType, turnCount: number, sourceMove: Moves | undefined, sourceId: number, side: ArenaTagSide = ArenaTagSide.BOTH, quiet: boolean = false, targetIndex?: BattlerIndex): boolean { const existingTag = this.getTagOnSide(tagType, side); if (existingTag) { existingTag.onOverlap(this); @@ -600,6 +623,7 @@ export class Arena { return false; } + // creates a new tag object const newTag = getArenaTag(tagType, turnCount || 0, sourceMove, sourceId, targetIndex, side); if (newTag) { this.tags.push(newTag); @@ -613,6 +637,11 @@ export class Arena { return true; } + /** + * Attempts to get a tag from the Arena via {@linkcode getTagOnSide} that applies to both sides + * @param tagType The {@linkcode ArenaTagType} or {@linkcode ArenaTag} to get + * @returns either the {@linkcode ArenaTag}, or `undefined` if it isn't there + */ getTag(tagType: ArenaTagType | Constructor): ArenaTag | undefined { return this.getTagOnSide(tagType, ArenaTagSide.BOTH); } @@ -621,16 +650,35 @@ export class Arena { return !!this.getTag(tagType); } + /** + * Attempts to get a tag from the Arena from a specific side (the tag passed in has to either apply to both sides, or the specific side only) + * + * eg: `MIST` only applies to the user's side, while `MUD_SPORT` applies to both user and enemy side + * @param tagType The {@linkcode ArenaTagType} or {@linkcode ArenaTag} to get + * @param side The {@linkcode ArenaTagSide} to look at + * @returns either the {@linkcode ArenaTag}, or `undefined` if it isn't there + */ getTagOnSide(tagType: ArenaTagType | Constructor, side: ArenaTagSide): ArenaTag | undefined { return typeof(tagType) === "string" ? this.tags.find(t => t.tagType === tagType && (side === ArenaTagSide.BOTH || t.side === ArenaTagSide.BOTH || t.side === side)) : this.tags.find(t => t instanceof tagType && (side === ArenaTagSide.BOTH || t.side === ArenaTagSide.BOTH || t.side === side)); } + /** + * Uses {@linkcode findTagsOnSide} to filter (using the parameter function) for specific tags that apply to both sides + * @param tagPredicate a function mapping {@linkcode ArenaTag}s to `boolean`s + * @returns array of {@linkcode ArenaTag}s from which the Arena's tags return true and apply to both sides + */ findTags(tagPredicate: (t: ArenaTag) => boolean): ArenaTag[] { return this.findTagsOnSide(tagPredicate, ArenaTagSide.BOTH); } + /** + * Returns specific tags from the arena that pass the `tagPredicate` function passed in as a parameter, and apply to the given side + * @param tagPredicate a function mapping {@linkcode ArenaTag}s to `boolean`s + * @param side The {@linkcode ArenaTagSide} to look at + * @returns array of {@linkcode ArenaTag}s from which the Arena's tags return `true` and apply to the given side + */ findTagsOnSide(tagPredicate: (t: ArenaTag) => boolean, side: ArenaTagSide): ArenaTag[] { return this.tags.filter(t => tagPredicate(t) && (side === ArenaTagSide.BOTH || t.side === ArenaTagSide.BOTH || t.side === side)); } diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f522d50f357..35a33907850 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -4501,6 +4501,7 @@ export interface AttackMoveResult { } export class PokemonSummonData { + /** [Atk, Def, SpAtk, SpDef, Spd, Acc, Eva] */ public statStages: number[] = [ 0, 0, 0, 0, 0, 0, 0 ]; public moveQueue: QueuedMove[] = []; public tags: BattlerTag[] = []; From 2fc3179bd90dfd8929ee1f1ff765f0075915d945 Mon Sep 17 00:00:00 2001 From: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> Date: Sun, 8 Sep 2024 13:37:14 +0900 Subject: [PATCH 59/91] [Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067) * fix scrappy + etc. update inverse battle test code * update test code following request from swain --- src/field/pokemon.ts | 12 +- src/test/battle/inverse_battle.test.ts | 155 +++++++++++++++++++------ 2 files changed, 126 insertions(+), 41 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 35a33907850..863b0f41d2c 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1427,22 +1427,26 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } let multiplier = types.map(defType => { + const multiplier = new Utils.NumberHolder(getTypeDamageMultiplier(moveType, defType)); + applyChallenges(this.scene.gameMode, ChallengeType.TYPE_EFFECTIVENESS, multiplier); if (source) { const ignoreImmunity = new Utils.BooleanHolder(false); if (source.isActive(true) && source.hasAbilityWithAttr(IgnoreTypeImmunityAbAttr)) { applyAbAttrs(IgnoreTypeImmunityAbAttr, source, ignoreImmunity, simulated, moveType, defType); } if (ignoreImmunity.value) { - return 1; + if (multiplier.value === 0) { + return 1; + } } const exposedTags = this.findTags(tag => tag instanceof ExposedTag) as ExposedTag[]; if (exposedTags.some(t => t.ignoreImmunity(defType, moveType))) { - return 1; + if (multiplier.value === 0) { + return 1; + } } } - const multiplier = new Utils.NumberHolder(getTypeDamageMultiplier(moveType, defType)); - applyChallenges(this.scene.gameMode, ChallengeType.TYPE_EFFECTIVENESS, multiplier); return multiplier.value; }).reduce((acc, cur) => acc * cur, 1) as TypeDamageMultiplier; diff --git a/src/test/battle/inverse_battle.test.ts b/src/test/battle/inverse_battle.test.ts index be8b04155eb..2a561a09e5e 100644 --- a/src/test/battle/inverse_battle.test.ts +++ b/src/test/battle/inverse_battle.test.ts @@ -1,8 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import { allMoves } from "#app/data/move"; import { Type } from "#app/data/type"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { Challenges } from "#enums/challenges"; @@ -11,7 +8,8 @@ import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const TIMEOUT = 20 * 1000; @@ -39,43 +37,63 @@ describe("Inverse Battle", () => { .starterSpecies(Species.FEEBAS) .ability(Abilities.BALL_FETCH) .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH); + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY); }); - it("1. immune types are 2x effective - Thunderbolt against Ground Type", async () => { - game.override.enemySpecies(Species.SANDSHREW); + it("Immune types are 2x effective - Thunderbolt against Ground Type", async () => { + game.override + .moveset([Moves.THUNDERBOLT]) + .enemySpecies(Species.SANDSHREW); + await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.THUNDERBOLT])).toBe(2); + game.move.select(Moves.THUNDERBOLT); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); - it("2. 2x effective types are 0.5x effective - Thunderbolt against Flying Type", async () => { - game.override.enemySpecies(Species.PIDGEY); + it("2x effective types are 0.5x effective - Thunderbolt against Flying Type", async () => { + game.override + .moveset([Moves.THUNDERBOLT]) + .enemySpecies(Species.PIDGEY); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.THUNDERBOLT])).toBe(0.5); + game.move.select(Moves.THUNDERBOLT); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(0.5); }, TIMEOUT); - it("3. 0.5x effective types are 2x effective - Thunderbolt against Electric Type", async () => { - game.override.enemySpecies(Species.CHIKORITA); + it("0.5x effective types are 2x effective - Thunderbolt against Electric Type", async () => { + game.override + .moveset([Moves.THUNDERBOLT]) + .enemySpecies(Species.CHIKORITA); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.THUNDERBOLT])).toBe(2); + game.move.select(Moves.THUNDERBOLT); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); - it("4. Stealth Rock follows the inverse matchups - Stealth Rock against Charizard deals 1/32 of max HP", async () => { + it("Stealth Rock follows the inverse matchups - Stealth Rock against Charizard deals 1/32 of max HP", async () => { game.scene.arena.addTag(ArenaTagType.STEALTH_ROCK, 1, Moves.STEALTH_ROCK, 0); game.override .enemySpecies(Species.CHARIZARD) @@ -95,18 +113,24 @@ describe("Inverse Battle", () => { expect(currentHp).toBeGreaterThan(maxHp * 31 / 32 - 1); }, TIMEOUT); - it("5. Freeze Dry is 2x effective against Water Type like other Ice type Move - Freeze Dry against Squirtle", async () => { - game.override.enemySpecies(Species.SQUIRTLE); + it("Freeze Dry is 2x effective against Water Type like other Ice type Move - Freeze Dry against Squirtle", async () => { + game.override + .moveset([Moves.FREEZE_DRY]) + .enemySpecies(Species.SQUIRTLE); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.FREEZE_DRY])).toBe(2); + game.move.select(Moves.FREEZE_DRY); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); - it("6. Water Absorb should heal against water moves - Water Absorb against Water gun", async () => { + it("Water Absorb should heal against water moves - Water Absorb against Water gun", async () => { game.override .moveset([Moves.WATER_GUN]) .enemyAbility(Abilities.WATER_ABSORB); @@ -117,13 +141,12 @@ describe("Inverse Battle", () => { enemy.hp = enemy.getMaxHp() - 1; game.move.select(Moves.WATER_GUN); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); - - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); expect(enemy.hp).toBe(enemy.getMaxHp()); }, TIMEOUT); - it("7. Fire type does not get burned - Will-O-Wisp against Charmander", async () => { + it("Fire type does not get burned - Will-O-Wisp against Charmander", async () => { game.override .moveset([Moves.WILL_O_WISP]) .enemySpecies(Species.CHARMANDER); @@ -135,13 +158,12 @@ describe("Inverse Battle", () => { game.move.select(Moves.WILL_O_WISP); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.move.forceHit(); - - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); expect(enemy.status?.effect).not.toBe(StatusEffect.BURN); }, TIMEOUT); - it("8. Electric type does not get paralyzed - Nuzzle against Pikachu", async () => { + it("Electric type does not get paralyzed - Nuzzle against Pikachu", async () => { game.override .moveset([Moves.NUZZLE]) .enemySpecies(Species.PIKACHU) @@ -153,14 +175,30 @@ describe("Inverse Battle", () => { game.move.select(Moves.NUZZLE); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); - - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); expect(enemy.status?.effect).not.toBe(StatusEffect.PARALYSIS); }, TIMEOUT); + it("Ground type is not immune to Thunder Wave - Thunder Wave against Sandshrew", async () => { + game.override + .moveset([Moves.THUNDER_WAVE]) + .enemySpecies(Species.SANDSHREW); - it("10. Anticipation should trigger on 2x effective moves - Anticipation against Thunderbolt", async () => { + await game.challengeMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.THUNDER_WAVE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.move.forceHit(); + await game.phaseInterceptor.to("MoveEndPhase"); + + expect(enemy.status?.effect).toBe(StatusEffect.PARALYSIS); + }, TIMEOUT); + + + it("Anticipation should trigger on 2x effective moves - Anticipation against Thunderbolt", async () => { game.override .moveset([Moves.THUNDERBOLT]) .enemySpecies(Species.SANDSHREW) @@ -171,7 +209,7 @@ describe("Inverse Battle", () => { expect(game.scene.getEnemyPokemon()?.summonData.abilitiesApplied[0]).toBe(Abilities.ANTICIPATION); }, TIMEOUT); - it("11. Conversion 2 should change the type to the resistive type - Conversion 2 against Dragonite", async () => { + it("Conversion 2 should change the type to the resistive type - Conversion 2 against Dragonite", async () => { game.override .moveset([Moves.CONVERSION_2]) .enemyMoveset([Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW]); @@ -183,21 +221,64 @@ describe("Inverse Battle", () => { game.move.select(Moves.CONVERSION_2); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.getTypes()[0]).toBe(Type.DRAGON); }, TIMEOUT); - it("12. Flying Press should be 0.25x effective against Grass + Dark Type - Flying Press against Meowscarada", async () => { + it("Flying Press should be 0.25x effective against Grass + Dark Type - Flying Press against Meowscarada", async () => { game.override .moveset([Moves.FLYING_PRESS]) .enemySpecies(Species.MEOWSCARADA); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.FLYING_PRESS])).toBe(0.25); + game.move.select(Moves.FLYING_PRESS); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(0.25); + }, TIMEOUT); + + it("Scrappy ability has no effect - Tackle against Ghost Type still 2x effective with Scrappy", async () => { + game.override + .moveset([Moves.TACKLE]) + .ability(Abilities.SCRAPPY) + .enemySpecies(Species.GASTLY); + + await game.challengeMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TACKLE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); + }, TIMEOUT); + + it("FORESIGHT has no effect - Tackle against Ghost Type still 2x effective with Foresight", async () => { + game.override + .moveset([Moves.FORESIGHT, Moves.TACKLE]) + .enemySpecies(Species.GASTLY); + + await game.challengeMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.FORESIGHT); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.phaseInterceptor.to("TurnEndPhase"); + + game.move.select(Moves.TACKLE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); }); From 2bd07cb84e02d51345a4e2c85543b023a35bdec7 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:37:37 -0700 Subject: [PATCH 60/91] fix and optimize imports (#4061) - remove any `.js` extension imports - remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static - increase vite chunk-size warning limit Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com> --- src/@types/common.ts | 2 +- src/@types/i18next.d.ts | 2 +- src/battle-scene.ts | 2 +- src/configs/inputs/pad_procon.ts | 2 +- src/data/challenge.ts | 14 ++++---- src/data/egg.ts | 2 +- src/data/pokemon-forms.ts | 2 +- src/data/terrain.ts | 2 +- src/data/variant.ts | 2 +- src/events/arena.ts | 6 ++-- src/inputs-controller.ts | 2 +- src/main.ts | 4 +-- src/modifier/modifier-type.ts | 2 +- src/modifier/modifier.ts | 6 ++-- src/phases/add-enemy-buff-modifier-phase.ts | 10 +++--- src/phases/attempt-capture-phase.ts | 28 +++++++-------- src/phases/battle-end-phase.ts | 4 +-- src/phases/battle-phase.ts | 6 ++-- src/phases/berry-phase.ts | 12 +++---- src/phases/check-switch-phase.ts | 10 +++--- src/phases/common-anim-phase.ts | 6 ++-- src/phases/damage-phase.ts | 10 +++--- src/phases/end-card-phase.ts | 8 ++--- src/phases/end-evolution-phase.ts | 6 ++-- .../enemy-party-member-pokemon-phase.ts | 4 +-- src/phases/exp-phase.ts | 8 ++--- src/phases/field-phase.ts | 2 +- src/phases/game-over-modifier-reward-phase.ts | 6 ++-- src/phases/hide-party-exp-bar-phase.ts | 2 +- src/phases/learn-move-phase.ts | 18 +++++----- src/phases/level-cap-phase.ts | 4 +-- src/phases/level-up-phase.ts | 14 ++++---- src/phases/login-phase.ts | 12 +++---- src/phases/message-phase.ts | 4 +-- src/phases/modifier-reward-phase.ts | 4 +-- src/phases/money-reward-phase.ts | 8 ++--- src/phases/move-anim-test-phase.ts | 10 +++--- src/phases/move-effect-phase.ts | 28 +++++++-------- src/phases/move-end-phase.ts | 6 ++-- src/phases/move-header-phase.ts | 6 ++-- src/phases/move-phase.ts | 36 +++++++++---------- src/phases/new-biome-encounter-phase.ts | 6 ++-- src/phases/next-encounter-phase.ts | 2 +- src/phases/obtain-status-effect-phase.ts | 14 ++++---- src/phases/outdated-phase.ts | 6 ++-- src/phases/party-heal-phase.ts | 4 +-- src/phases/party-member-pokemon-phase.ts | 4 +-- src/phases/party-status-cure-phase.ts | 6 ++-- .../player-party-member-pokemon-phase.ts | 4 +-- src/phases/pokemon-heal-phase.ts | 20 +++++------ src/phases/pokemon-phase.ts | 6 ++-- src/phases/post-game-over-phase.ts | 4 +-- src/phases/post-summon-phase.ts | 10 +++--- src/phases/post-turn-status-effect-phase.ts | 18 +++++----- src/phases/quiet-form-change-phase.ts | 14 ++++---- src/phases/reload-session-phase.ts | 8 ++--- src/phases/return-phase.ts | 4 +-- src/phases/ribbon-modifier-reward-phase.ts | 8 ++--- src/phases/scan-ivs-phase.ts | 14 ++++---- src/phases/select-biome-phase.ts | 14 ++++---- src/phases/select-challenge-phase.ts | 6 ++-- src/phases/select-gender-phase.ts | 10 +++--- src/phases/select-modifier-phase.ts | 16 ++++----- src/phases/select-starter-phase.ts | 24 ++++++------- src/phases/select-target-phase.ts | 8 ++--- src/phases/shiny-sparkle-phase.ts | 4 +-- src/phases/show-ability-phase.ts | 4 +-- src/phases/show-party-exp-bar-phase.ts | 8 ++--- src/phases/show-trainer-phase.ts | 4 +-- src/phases/summon-missing-phase.ts | 4 +-- src/phases/summon-phase.ts | 18 +++++----- src/phases/switch-biome-phase.ts | 6 ++-- src/phases/switch-phase.ts | 6 ++-- src/phases/switch-summon-phase.ts | 20 +++++------ src/phases/test-message-phase.ts | 2 +- src/phases/title-phase.ts | 34 +++++++++--------- src/phases/toggle-double-position-phase.ts | 4 +-- src/phases/trainer-message-test-phase.ts | 6 ++-- src/phases/trainer-victory-phase.ts | 12 +++---- src/phases/turn-end-phase.ts | 18 +++++----- src/phases/turn-init-phase.ts | 8 ++--- src/phases/unavailable-phase.ts | 6 ++-- src/phases/unlock-phase.ts | 8 ++--- src/phases/victory-phase.ts | 10 +++--- src/phases/weather-effect-phase.ts | 2 +- src/plugins/i18n.ts | 22 ++++++------ src/system/arena-data.ts | 2 +- src/system/challenge-data.ts | 2 +- src/system/egg-data.ts | 2 +- src/system/game-data.ts | 24 ++++++------- src/system/settings/settings.ts | 2 +- src/system/voucher.ts | 4 +-- src/test/abilities/tera_shell.test.ts | 2 +- src/test/battle/damage_calculation.test.ts | 2 +- src/test/moves/gigaton_hammer.test.ts | 2 +- src/test/moves/lunar_blessing.test.ts | 4 +-- src/test/utils/helpers/overridesHelper.ts | 10 +++--- src/test/utils/testUtils.ts | 2 +- src/ui/ability-bar.ts | 2 +- src/ui/admin-ui-handler.ts | 4 +-- src/ui/arena-flyout.ts | 10 +++--- src/ui/ball-ui-handler.ts | 2 +- src/ui/battle-flyout.ts | 6 ++-- src/ui/command-ui-handler.ts | 4 +-- src/ui/dropdown.ts | 4 +-- src/ui/egg-counter-container.ts | 4 +-- src/ui/egg-hatch-scene-handler.ts | 2 +- src/ui/fight-ui-handler.ts | 6 ++-- src/ui/filter-bar.ts | 2 +- src/ui/party-ui-handler.ts | 8 ++--- src/ui/rename-form-ui-handler.ts | 2 +- src/ui/run-info-ui-handler.ts | 15 ++++---- src/ui/save-slot-select-ui-handler.ts | 8 ++--- .../settings/abstract-settings-ui-handler.ts | 2 +- .../settings/move-touch-controls-handler.ts | 4 +-- src/ui/settings/navigationMenu.ts | 2 +- src/ui/settings/settings-audio-ui-handler.ts | 2 +- .../settings/settings-display-ui-handler.ts | 2 +- .../settings/settings-gamepad-ui-handler.ts | 2 +- .../settings/settings-keyboard-ui-handler.ts | 2 +- src/ui/time-of-day-widget.ts | 2 +- src/ui/title-ui-handler.ts | 2 +- vite.config.ts | 1 + 123 files changed, 456 insertions(+), 460 deletions(-) diff --git a/src/@types/common.ts b/src/@types/common.ts index 6868d766008..fcd946656dc 100644 --- a/src/@types/common.ts +++ b/src/@types/common.ts @@ -1,3 +1,3 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; export type ConditionFn = (scene: BattleScene, args?: any[]) => boolean; diff --git a/src/@types/i18next.d.ts b/src/@types/i18next.d.ts index d895659acef..9e8418a8977 100644 --- a/src/@types/i18next.d.ts +++ b/src/@types/i18next.d.ts @@ -1,4 +1,4 @@ -import { type enConfig } from "#app/locales/en/config.js"; +import { type enConfig } from "#app/locales/en/config"; import { TOptions } from "i18next"; //TODO: this needs to be type properly in the future diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 9123a213f4c..ff4258a13f5 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -63,7 +63,7 @@ import { Moves } from "#enums/moves"; import { PlayerGender } from "#enums/player-gender"; import { Species } from "#enums/species"; import { UiTheme } from "#enums/ui-theme"; -import { TimedEventManager } from "#app/timed-event-manager.js"; +import { TimedEventManager } from "#app/timed-event-manager"; import i18next from "i18next"; import { TrainerType } from "#enums/trainer-type"; import { battleSpecDialogue } from "./data/dialogue"; diff --git a/src/configs/inputs/pad_procon.ts b/src/configs/inputs/pad_procon.ts index 8cb707f882a..be751cc3acc 100644 --- a/src/configs/inputs/pad_procon.ts +++ b/src/configs/inputs/pad_procon.ts @@ -1,4 +1,4 @@ -import {SettingGamepad} from "#app/system/settings/settings-gamepad.js"; +import {SettingGamepad} from "#app/system/settings/settings-gamepad"; import {Button} from "#enums/buttons"; /** diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 62751b92f9c..2205519c532 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -1,18 +1,18 @@ import * as Utils from "../utils"; import i18next from "i18next"; -import { defaultStarterSpecies, DexAttrProps, GameData } from "#app/system/game-data.js"; +import { defaultStarterSpecies, DexAttrProps, GameData } from "#app/system/game-data"; import PokemonSpecies, { getPokemonSpecies, getPokemonSpeciesForm, speciesStarters } from "./pokemon-species"; -import Pokemon, { PokemonMove } from "#app/field/pokemon.js"; -import { BattleType, FixedBattleConfig } from "#app/battle.js"; -import Trainer, { TrainerVariant } from "#app/field/trainer.js"; -import { GameMode } from "#app/game-mode.js"; +import Pokemon, { PokemonMove } from "#app/field/pokemon"; +import { BattleType, FixedBattleConfig } from "#app/battle"; +import Trainer, { TrainerVariant } from "#app/field/trainer"; +import { GameMode } from "#app/game-mode"; import { Type } from "./type"; import { Challenges } from "#enums/challenges"; import { Species } from "#enums/species"; import { TrainerType } from "#enums/trainer-type"; import { Nature } from "./nature"; -import { Moves } from "#app/enums/moves.js"; -import { TypeColor, TypeShadow } from "#app/enums/color.js"; +import { Moves } from "#app/enums/moves"; +import { TypeColor, TypeShadow } from "#app/enums/color"; import { pokemonEvolutions } from "./pokemon-evolutions"; import { pokemonFormChanges } from "./pokemon-forms"; diff --git a/src/data/egg.ts b/src/data/egg.ts index 508263c9c8e..ce27030ebef 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -8,7 +8,7 @@ import { PlayerPokemon } from "#app/field/pokemon"; import i18next from "i18next"; import { EggTier } from "#enums/egg-type"; import { Species } from "#enums/species"; -import { EggSourceType } from "#app/enums/egg-source-types.js"; +import { EggSourceType } from "#app/enums/egg-source-types"; export const EGG_SEED = 1073741824; diff --git a/src/data/pokemon-forms.ts b/src/data/pokemon-forms.ts index bc815b91f3a..0d3e511bcba 100644 --- a/src/data/pokemon-forms.ts +++ b/src/data/pokemon-forms.ts @@ -8,7 +8,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { TimeOfDay } from "#enums/time-of-day"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import { getPokemonNameWithAffix } from "#app/messages"; import i18next from "i18next"; import { WeatherType } from "./weather"; diff --git a/src/data/terrain.ts b/src/data/terrain.ts index d4789078af7..6db68b92239 100644 --- a/src/data/terrain.ts +++ b/src/data/terrain.ts @@ -4,7 +4,7 @@ import { Type } from "./type"; import * as Utils from "../utils"; import { ChangeMovePriorityAbAttr, applyAbAttrs } from "./ability"; import { ProtectAttr } from "./move"; -import { BattlerIndex } from "#app/battle.js"; +import { BattlerIndex } from "#app/battle"; import i18next from "i18next"; export enum TerrainType { diff --git a/src/data/variant.ts b/src/data/variant.ts index 48369d112db..b7a01a4be89 100644 --- a/src/data/variant.ts +++ b/src/data/variant.ts @@ -1,4 +1,4 @@ -import { VariantTier } from "#app/enums/variant-tier.js"; +import { VariantTier } from "#app/enums/variant-tier"; export type Variant = 0 | 1 | 2; diff --git a/src/events/arena.ts b/src/events/arena.ts index 9fbbe572601..c05e67d353c 100644 --- a/src/events/arena.ts +++ b/src/events/arena.ts @@ -1,7 +1,7 @@ -import { ArenaTagSide } from "#app/data/arena-tag.js"; +import { ArenaTagSide } from "#app/data/arena-tag"; import { ArenaTagType } from "#enums/arena-tag-type"; -import { TerrainType } from "#app/data/terrain.js"; -import { WeatherType } from "#app/data/weather.js"; +import { TerrainType } from "#app/data/terrain"; +import { WeatherType } from "#app/data/weather"; /** Alias for all {@linkcode ArenaEvent} type strings */ export enum ArenaEventType { diff --git a/src/inputs-controller.ts b/src/inputs-controller.ts index 652e3d58062..bb3cfcbeb3b 100644 --- a/src/inputs-controller.ts +++ b/src/inputs-controller.ts @@ -16,7 +16,7 @@ import { getIconForLatestInput, swap, } from "#app/configs/inputs/configHandler"; import BattleScene from "./battle-scene"; -import {SettingGamepad} from "#app/system/settings/settings-gamepad.js"; +import {SettingGamepad} from "#app/system/settings/settings-gamepad"; import {SettingKeyboard} from "#app/system/settings/settings-keyboard"; import TouchControl from "#app/touch-controls"; import { Button } from "#enums/buttons"; diff --git a/src/main.ts b/src/main.ts index 8a69d3f1b72..b5f813bdf2f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,8 +4,8 @@ import InvertPostFX from "./pipelines/invert"; import { version } from "../package.json"; import UIPlugin from "phaser3-rex-plugins/templates/ui/ui-plugin"; import BBCodeTextPlugin from "phaser3-rex-plugins/plugins/bbcodetext-plugin"; -import InputTextPlugin from "phaser3-rex-plugins/plugins/inputtext-plugin.js"; -import TransitionImagePackPlugin from "phaser3-rex-plugins/templates/transitionimagepack/transitionimagepack-plugin.js"; +import InputTextPlugin from "phaser3-rex-plugins/plugins/inputtext-plugin"; +import TransitionImagePackPlugin from "phaser3-rex-plugins/templates/transitionimagepack/transitionimagepack-plugin"; import { LoadingScene } from "./loading-scene"; diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index d6cfd017829..fdfe60332f5 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -25,7 +25,7 @@ import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import { getPokemonNameWithAffix } from "#app/messages"; import { PermanentStat, TEMP_BATTLE_STATS, TempBattleStat, Stat, getStatKey } from "#app/enums/stat"; const outputModifierData = false; diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index c1d58a7bf39..0b105a0c852 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -26,9 +26,9 @@ import i18next from "i18next"; import { allMoves } from "#app/data/move"; import { Abilities } from "#app/enums/abilities"; -import { LearnMovePhase } from "#app/phases/learn-move-phase.js"; -import { LevelUpPhase } from "#app/phases/level-up-phase.js"; -import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase.js"; +import { LearnMovePhase } from "#app/phases/learn-move-phase"; +import { LevelUpPhase } from "#app/phases/level-up-phase"; +import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; export type ModifierPredicate = (modifier: Modifier) => boolean; diff --git a/src/phases/add-enemy-buff-modifier-phase.ts b/src/phases/add-enemy-buff-modifier-phase.ts index a9936eb765d..451e6e2662c 100644 --- a/src/phases/add-enemy-buff-modifier-phase.ts +++ b/src/phases/add-enemy-buff-modifier-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { ModifierTier } from "#app/modifier/modifier-tier.js"; -import { regenerateModifierPoolThresholds, ModifierPoolType, getEnemyBuffModifierForWave } from "#app/modifier/modifier-type.js"; -import { EnemyPersistentModifier } from "#app/modifier/modifier.js"; -import { Phase } from "#app/phase.js"; +import BattleScene from "#app/battle-scene"; +import { ModifierTier } from "#app/modifier/modifier-tier"; +import { regenerateModifierPoolThresholds, ModifierPoolType, getEnemyBuffModifierForWave } from "#app/modifier/modifier-type"; +import { EnemyPersistentModifier } from "#app/modifier/modifier"; +import { Phase } from "#app/phase"; export class AddEnemyBuffModifierPhase extends Phase { constructor(scene: BattleScene) { diff --git a/src/phases/attempt-capture-phase.ts b/src/phases/attempt-capture-phase.ts index 72995c0f006..55a82affaf6 100644 --- a/src/phases/attempt-capture-phase.ts +++ b/src/phases/attempt-capture-phase.ts @@ -1,17 +1,17 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { getPokeballCatchMultiplier, getPokeballAtlasKey, getPokeballTintColor, doPokeballBounceAnim } from "#app/data/pokeball.js"; -import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect.js"; -import { PokeballType } from "#app/enums/pokeball.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; -import { addPokeballOpenParticles, addPokeballCaptureStars } from "#app/field/anims.js"; -import { EnemyPokemon } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { PokemonHeldItemModifier } from "#app/modifier/modifier.js"; -import { achvs } from "#app/system/achv.js"; -import { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler.js"; -import { SummaryUiMode } from "#app/ui/summary-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { getPokeballCatchMultiplier, getPokeballAtlasKey, getPokeballTintColor, doPokeballBounceAnim } from "#app/data/pokeball"; +import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect"; +import { PokeballType } from "#app/enums/pokeball"; +import { StatusEffect } from "#app/enums/status-effect"; +import { addPokeballOpenParticles, addPokeballCaptureStars } from "#app/field/anims"; +import { EnemyPokemon } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { PokemonHeldItemModifier } from "#app/modifier/modifier"; +import { achvs } from "#app/system/achv"; +import { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler"; +import { SummaryUiMode } from "#app/ui/summary-ui-handler"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { PokemonPhase } from "./pokemon-phase"; import { VictoryPhase } from "./victory-phase"; diff --git a/src/phases/battle-end-phase.ts b/src/phases/battle-end-phase.ts index 06315668a8b..f08e04b443a 100644 --- a/src/phases/battle-end-phase.ts +++ b/src/phases/battle-end-phase.ts @@ -1,5 +1,5 @@ -import { applyPostBattleAbAttrs, PostBattleAbAttr } from "#app/data/ability.js"; -import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier.js"; +import { applyPostBattleAbAttrs, PostBattleAbAttr } from "#app/data/ability"; +import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier"; import { BattlePhase } from "./battle-phase"; import { GameOverPhase } from "./game-over-phase"; diff --git a/src/phases/battle-phase.ts b/src/phases/battle-phase.ts index 3e7e0e28596..b51e19bdf0e 100644 --- a/src/phases/battle-phase.ts +++ b/src/phases/battle-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { TrainerSlot } from "#app/data/trainer-config.js"; -import { Phase } from "#app/phase.js"; +import BattleScene from "#app/battle-scene"; +import { TrainerSlot } from "#app/data/trainer-config"; +import { Phase } from "#app/phase"; export class BattlePhase extends Phase { constructor(scene: BattleScene) { diff --git a/src/phases/berry-phase.ts b/src/phases/berry-phase.ts index 504fb6ec163..66ecaa6c7f8 100644 --- a/src/phases/berry-phase.ts +++ b/src/phases/berry-phase.ts @@ -1,10 +1,10 @@ -import { applyAbAttrs, PreventBerryUseAbAttr, HealFromBerryUseAbAttr } from "#app/data/ability.js"; -import { CommonAnim } from "#app/data/battle-anims.js"; -import { BerryUsedEvent } from "#app/events/battle-scene.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { BerryModifier } from "#app/modifier/modifier.js"; +import { applyAbAttrs, PreventBerryUseAbAttr, HealFromBerryUseAbAttr } from "#app/data/ability"; +import { CommonAnim } from "#app/data/battle-anims"; +import { BerryUsedEvent } from "#app/events/battle-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { BerryModifier } from "#app/modifier/modifier"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { FieldPhase } from "./field-phase"; import { CommonAnimPhase } from "./common-anim-phase"; diff --git a/src/phases/check-switch-phase.ts b/src/phases/check-switch-phase.ts index cd8f2b00c46..a069ba224a2 100644 --- a/src/phases/check-switch-phase.ts +++ b/src/phases/check-switch-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattleStyle } from "#app/enums/battle-style.js"; -import { BattlerTagType } from "#app/enums/battler-tag-type.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { BattleStyle } from "#app/enums/battle-style"; +import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { BattlePhase } from "./battle-phase"; import { PostSummonPhase } from "./post-summon-phase"; diff --git a/src/phases/common-anim-phase.ts b/src/phases/common-anim-phase.ts index d3663abe3b6..a85cd7629d9 100644 --- a/src/phases/common-anim-phase.ts +++ b/src/phases/common-anim-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { CommonAnim, CommonBattleAnim } from "#app/data/battle-anims.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { CommonAnim, CommonBattleAnim } from "#app/data/battle-anims"; import { PokemonPhase } from "./pokemon-phase"; export class CommonAnimPhase extends PokemonPhase { diff --git a/src/phases/damage-phase.ts b/src/phases/damage-phase.ts index 029c1e717f1..5add0345358 100644 --- a/src/phases/damage-phase.ts +++ b/src/phases/damage-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { BattleSpec } from "#app/enums/battle-spec.js"; -import { DamageResult, HitResult } from "#app/field/pokemon.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { BattleSpec } from "#app/enums/battle-spec"; +import { DamageResult, HitResult } from "#app/field/pokemon"; +import * as Utils from "#app/utils"; import { PokemonPhase } from "./pokemon-phase"; export class DamagePhase extends PokemonPhase { diff --git a/src/phases/end-card-phase.ts b/src/phases/end-card-phase.ts index 0b70664b993..274a745017a 100644 --- a/src/phases/end-card-phase.ts +++ b/src/phases/end-card-phase.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; -import { PlayerGender } from "#app/enums/player-gender.js"; -import { Phase } from "#app/phase.js"; -import { addTextObject, TextStyle } from "#app/ui/text.js"; +import BattleScene from "#app/battle-scene"; +import { PlayerGender } from "#app/enums/player-gender"; +import { Phase } from "#app/phase"; +import { addTextObject, TextStyle } from "#app/ui/text"; import i18next from "i18next"; export class EndCardPhase extends Phase { diff --git a/src/phases/end-evolution-phase.ts b/src/phases/end-evolution-phase.ts index 2a6d492a425..8a6ce52553d 100644 --- a/src/phases/end-evolution-phase.ts +++ b/src/phases/end-evolution-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { Mode } from "#app/ui/ui"; export class EndEvolutionPhase extends Phase { diff --git a/src/phases/enemy-party-member-pokemon-phase.ts b/src/phases/enemy-party-member-pokemon-phase.ts index 10af0913f93..bb34f53b475 100644 --- a/src/phases/enemy-party-member-pokemon-phase.ts +++ b/src/phases/enemy-party-member-pokemon-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { EnemyPokemon } from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { EnemyPokemon } from "#app/field/pokemon"; import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; export abstract class EnemyPartyMemberPokemonPhase extends PartyMemberPokemonPhase { diff --git a/src/phases/exp-phase.ts b/src/phases/exp-phase.ts index 9c2ba95d550..81982980d2a 100644 --- a/src/phases/exp-phase.ts +++ b/src/phases/exp-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { ExpBoosterModifier } from "#app/modifier/modifier.js"; +import BattleScene from "#app/battle-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { ExpBoosterModifier } from "#app/modifier/modifier"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; import { LevelUpPhase } from "./level-up-phase"; diff --git a/src/phases/field-phase.ts b/src/phases/field-phase.ts index b65e903a32b..46c3c4983b4 100644 --- a/src/phases/field-phase.ts +++ b/src/phases/field-phase.ts @@ -1,4 +1,4 @@ -import Pokemon from "#app/field/pokemon.js"; +import Pokemon from "#app/field/pokemon"; import { BattlePhase } from "./battle-phase"; type PokemonFunc = (pokemon: Pokemon) => void; diff --git a/src/phases/game-over-modifier-reward-phase.ts b/src/phases/game-over-modifier-reward-phase.ts index c27659bf9d4..a698e62e2e1 100644 --- a/src/phases/game-over-modifier-reward-phase.ts +++ b/src/phases/game-over-modifier-reward-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { ModifierTypeFunc } from "#app/modifier/modifier-type.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { ModifierTypeFunc } from "#app/modifier/modifier-type"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { ModifierRewardPhase } from "./modifier-reward-phase"; diff --git a/src/phases/hide-party-exp-bar-phase.ts b/src/phases/hide-party-exp-bar-phase.ts index c2c9d96462e..303650ea1ad 100644 --- a/src/phases/hide-party-exp-bar-phase.ts +++ b/src/phases/hide-party-exp-bar-phase.ts @@ -1,4 +1,4 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { BattlePhase } from "./battle-phase"; export class HidePartyExpBarPhase extends BattlePhase { diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index 201019e8860..049fc6951b6 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -1,12 +1,12 @@ -import BattleScene from "#app/battle-scene.js"; -import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims.js"; -import { allMoves } from "#app/data/move.js"; -import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms.js"; -import { Moves } from "#app/enums/moves.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import EvolutionSceneHandler from "#app/ui/evolution-scene-handler.js"; -import { SummaryUiMode } from "#app/ui/summary-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; +import { allMoves } from "#app/data/move"; +import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms"; +import { Moves } from "#app/enums/moves"; +import { getPokemonNameWithAffix } from "#app/messages"; +import EvolutionSceneHandler from "#app/ui/evolution-scene-handler"; +import { SummaryUiMode } from "#app/ui/summary-ui-handler"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; diff --git a/src/phases/level-cap-phase.ts b/src/phases/level-cap-phase.ts index db59fbd6473..d1404e45010 100644 --- a/src/phases/level-cap-phase.ts +++ b/src/phases/level-cap-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { FieldPhase } from "./field-phase"; diff --git a/src/phases/level-up-phase.ts b/src/phases/level-up-phase.ts index a8a6b8f3d80..a99e038acba 100644 --- a/src/phases/level-up-phase.ts +++ b/src/phases/level-up-phase.ts @@ -1,11 +1,11 @@ -import BattleScene from "#app/battle-scene.js"; -import { ExpNotification } from "#app/enums/exp-notification.js"; -import { EvolutionPhase } from "#app/phases/evolution-phase.js"; -import { PlayerPokemon } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { LevelAchv } from "#app/system/achv.js"; +import BattleScene from "#app/battle-scene"; +import { ExpNotification } from "#app/enums/exp-notification"; +import { EvolutionPhase } from "#app/phases/evolution-phase"; +import { PlayerPokemon } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { LevelAchv } from "#app/system/achv"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; import { LearnMovePhase } from "./learn-move-phase"; diff --git a/src/phases/login-phase.ts b/src/phases/login-phase.ts index b58cc9bca1f..89ced201e9e 100644 --- a/src/phases/login-phase.ts +++ b/src/phases/login-phase.ts @@ -1,10 +1,10 @@ -import { updateUserInfo } from "#app/account.js"; -import BattleScene, { bypassLogin } from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; -import { handleTutorial, Tutorial } from "#app/tutorial.js"; -import { Mode } from "#app/ui/ui.js"; +import { updateUserInfo } from "#app/account"; +import BattleScene, { bypassLogin } from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { handleTutorial, Tutorial } from "#app/tutorial"; +import { Mode } from "#app/ui/ui"; import i18next, { t } from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { SelectGenderPhase } from "./select-gender-phase"; import { UnavailablePhase } from "./unavailable-phase"; diff --git a/src/phases/message-phase.ts b/src/phases/message-phase.ts index 46e907ae2ba..2244980c899 100644 --- a/src/phases/message-phase.ts +++ b/src/phases/message-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; export class MessagePhase extends Phase { private text: string; diff --git a/src/phases/modifier-reward-phase.ts b/src/phases/modifier-reward-phase.ts index 4d083a367a6..20a8366d9c6 100644 --- a/src/phases/modifier-reward-phase.ts +++ b/src/phases/modifier-reward-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { ModifierType, ModifierTypeFunc, getModifierType } from "#app/modifier/modifier-type.js"; +import BattleScene from "#app/battle-scene"; +import { ModifierType, ModifierTypeFunc, getModifierType } from "#app/modifier/modifier-type"; import i18next from "i18next"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/money-reward-phase.ts b/src/phases/money-reward-phase.ts index e0bff608972..2f0a4f7b990 100644 --- a/src/phases/money-reward-phase.ts +++ b/src/phases/money-reward-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { ArenaTagType } from "#app/enums/arena-tag-type.js"; -import { MoneyMultiplierModifier } from "#app/modifier/modifier.js"; +import BattleScene from "#app/battle-scene"; +import { ArenaTagType } from "#app/enums/arena-tag-type"; +import { MoneyMultiplierModifier } from "#app/modifier/modifier"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { BattlePhase } from "./battle-phase"; export class MoneyRewardPhase extends BattlePhase { diff --git a/src/phases/move-anim-test-phase.ts b/src/phases/move-anim-test-phase.ts index 7fb3c1d61e7..2d3b54bfd9a 100644 --- a/src/phases/move-anim-test-phase.ts +++ b/src/phases/move-anim-test-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { initMoveAnim, loadMoveAnimAssets, MoveAnim } from "#app/data/battle-anims.js"; -import { allMoves, SelfStatusMove } from "#app/data/move.js"; -import { Moves } from "#app/enums/moves.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import { initMoveAnim, loadMoveAnimAssets, MoveAnim } from "#app/data/battle-anims"; +import { allMoves, SelfStatusMove } from "#app/data/move"; +import { Moves } from "#app/enums/moves"; +import * as Utils from "#app/utils"; import { BattlePhase } from "./battle-phase"; export class MoveAnimTestPhase extends BattlePhase { diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index 9b22c520e19..fb2b82ada03 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -1,18 +1,18 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { applyPreAttackAbAttrs, AddSecondStrikeAbAttr, IgnoreMoveEffectsAbAttr, applyPostDefendAbAttrs, PostDefendAbAttr, applyPostAttackAbAttrs, PostAttackAbAttr, MaxMultiHitAbAttr, AlwaysHitAbAttr } from "#app/data/ability.js"; -import { ArenaTagSide, ConditionalProtectTag } from "#app/data/arena-tag.js"; -import { MoveAnim } from "#app/data/battle-anims.js"; -import { BattlerTagLapseType, ProtectedTag, SemiInvulnerableTag } from "#app/data/battler-tags.js"; -import { MoveTarget, applyMoveAttrs, OverrideMoveEffectAttr, MultiHitAttr, AttackMove, FixedDamageAttr, VariableTargetAttr, MissEffectAttr, MoveFlags, applyFilteredMoveAttrs, MoveAttr, MoveEffectAttr, MoveEffectTrigger, ChargeAttr, MoveCategory, NoEffectAttr, HitsTagAttr } from "#app/data/move.js"; -import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms.js"; -import { BattlerTagType } from "#app/enums/battler-tag-type.js"; -import { Moves } from "#app/enums/moves.js"; -import Pokemon, { PokemonMove, MoveResult, HitResult } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { PokemonMultiHitModifier, FlinchChanceModifier, EnemyAttackStatusEffectChanceModifier, ContactHeldItemTransferChanceModifier, HitHealModifier } from "#app/modifier/modifier.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { applyPreAttackAbAttrs, AddSecondStrikeAbAttr, IgnoreMoveEffectsAbAttr, applyPostDefendAbAttrs, PostDefendAbAttr, applyPostAttackAbAttrs, PostAttackAbAttr, MaxMultiHitAbAttr, AlwaysHitAbAttr } from "#app/data/ability"; +import { ArenaTagSide, ConditionalProtectTag } from "#app/data/arena-tag"; +import { MoveAnim } from "#app/data/battle-anims"; +import { BattlerTagLapseType, ProtectedTag, SemiInvulnerableTag } from "#app/data/battler-tags"; +import { MoveTarget, applyMoveAttrs, OverrideMoveEffectAttr, MultiHitAttr, AttackMove, FixedDamageAttr, VariableTargetAttr, MissEffectAttr, MoveFlags, applyFilteredMoveAttrs, MoveAttr, MoveEffectAttr, MoveEffectTrigger, ChargeAttr, MoveCategory, NoEffectAttr, HitsTagAttr } from "#app/data/move"; +import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms"; +import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { Moves } from "#app/enums/moves"; +import Pokemon, { PokemonMove, MoveResult, HitResult } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { PokemonMultiHitModifier, FlinchChanceModifier, EnemyAttackStatusEffectChanceModifier, ContactHeldItemTransferChanceModifier, HitHealModifier } from "#app/modifier/modifier"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { PokemonPhase } from "./pokemon-phase"; export class MoveEffectPhase extends PokemonPhase { diff --git a/src/phases/move-end-phase.ts b/src/phases/move-end-phase.ts index 4bce2185aea..e03f2ec14b0 100644 --- a/src/phases/move-end-phase.ts +++ b/src/phases/move-end-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { BattlerTagLapseType } from "#app/data/battler-tags.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { BattlerTagLapseType } from "#app/data/battler-tags"; import { PokemonPhase } from "./pokemon-phase"; export class MoveEndPhase extends PokemonPhase { diff --git a/src/phases/move-header-phase.ts b/src/phases/move-header-phase.ts index 5166f287731..c307ff0be6e 100644 --- a/src/phases/move-header-phase.ts +++ b/src/phases/move-header-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/move.js"; -import Pokemon, { PokemonMove } from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/move"; +import Pokemon, { PokemonMove } from "#app/field/pokemon"; import { BattlePhase } from "./battle-phase"; export class MoveHeaderPhase extends BattlePhase { diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 0ccf19a462f..8209bdd44d1 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -1,21 +1,21 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { applyAbAttrs, applyPostMoveUsedAbAttrs, applyPreAttackAbAttrs, BlockRedirectAbAttr, IncreasePpAbAttr, PokemonTypeChangeAbAttr, PostMoveUsedAbAttr, RedirectMoveAbAttr } from "#app/data/ability.js"; -import { CommonAnim } from "#app/data/battle-anims.js"; -import { BattlerTagLapseType, CenterOfAttentionTag } from "#app/data/battler-tags.js"; -import { allMoves, applyMoveAttrs, BypassRedirectAttr, BypassSleepAttr, ChargeAttr, CopyMoveAttr, HealStatusEffectAttr, MoveFlags, PreMoveMessageAttr } from "#app/data/move.js"; -import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms.js"; -import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect.js"; -import { Type } from "#app/data/type.js"; -import { getTerrainBlockMessage } from "#app/data/weather.js"; -import { Abilities } from "#app/enums/abilities.js"; -import { BattlerTagType } from "#app/enums/battler-tag-type.js"; -import { Moves } from "#app/enums/moves.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; -import { MoveUsedEvent } from "#app/events/battle-scene.js"; -import Pokemon, { MoveResult, PokemonMove, TurnMove } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { applyAbAttrs, applyPostMoveUsedAbAttrs, applyPreAttackAbAttrs, BlockRedirectAbAttr, IncreasePpAbAttr, PokemonTypeChangeAbAttr, PostMoveUsedAbAttr, RedirectMoveAbAttr } from "#app/data/ability"; +import { CommonAnim } from "#app/data/battle-anims"; +import { BattlerTagLapseType, CenterOfAttentionTag } from "#app/data/battler-tags"; +import { allMoves, applyMoveAttrs, BypassRedirectAttr, BypassSleepAttr, ChargeAttr, CopyMoveAttr, HealStatusEffectAttr, MoveFlags, PreMoveMessageAttr } from "#app/data/move"; +import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms"; +import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect"; +import { Type } from "#app/data/type"; +import { getTerrainBlockMessage } from "#app/data/weather"; +import { Abilities } from "#app/enums/abilities"; +import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { Moves } from "#app/enums/moves"; +import { StatusEffect } from "#app/enums/status-effect"; +import { MoveUsedEvent } from "#app/events/battle-scene"; +import Pokemon, { MoveResult, PokemonMove, TurnMove } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import * as Utils from "#app/utils"; import i18next from "i18next"; import { BattlePhase } from "./battle-phase"; import { CommonAnimPhase } from "./common-anim-phase"; diff --git a/src/phases/new-biome-encounter-phase.ts b/src/phases/new-biome-encounter-phase.ts index c447e78f7b1..9f1209fb7ee 100644 --- a/src/phases/new-biome-encounter-phase.ts +++ b/src/phases/new-biome-encounter-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { applyAbAttrs, PostBiomeChangeAbAttr } from "#app/data/ability.js"; -import { getRandomWeatherType } from "#app/data/weather.js"; +import BattleScene from "#app/battle-scene"; +import { applyAbAttrs, PostBiomeChangeAbAttr } from "#app/data/ability"; +import { getRandomWeatherType } from "#app/data/weather"; import { NextEncounterPhase } from "./next-encounter-phase"; export class NewBiomeEncounterPhase extends NextEncounterPhase { diff --git a/src/phases/next-encounter-phase.ts b/src/phases/next-encounter-phase.ts index 89987534fc0..d51aa374b6e 100644 --- a/src/phases/next-encounter-phase.ts +++ b/src/phases/next-encounter-phase.ts @@ -1,4 +1,4 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { EncounterPhase } from "./encounter-phase"; export class NextEncounterPhase extends EncounterPhase { diff --git a/src/phases/obtain-status-effect-phase.ts b/src/phases/obtain-status-effect-phase.ts index ac6e66a2e9f..bb06fafb1c9 100644 --- a/src/phases/obtain-status-effect-phase.ts +++ b/src/phases/obtain-status-effect-phase.ts @@ -1,10 +1,10 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims.js"; -import { getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; -import Pokemon from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims"; +import { getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect"; +import { StatusEffect } from "#app/enums/status-effect"; +import Pokemon from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; import { PokemonPhase } from "./pokemon-phase"; import { PostTurnStatusEffectPhase } from "./post-turn-status-effect-phase"; diff --git a/src/phases/outdated-phase.ts b/src/phases/outdated-phase.ts index 72d1bb3671d..4baf16d2f56 100644 --- a/src/phases/outdated-phase.ts +++ b/src/phases/outdated-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { Mode } from "#app/ui/ui"; export class OutdatedPhase extends Phase { constructor(scene: BattleScene) { diff --git a/src/phases/party-heal-phase.ts b/src/phases/party-heal-phase.ts index d9179826a19..e6ee11202df 100644 --- a/src/phases/party-heal-phase.ts +++ b/src/phases/party-heal-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import * as Utils from "#app/utils"; import { BattlePhase } from "./battle-phase"; export class PartyHealPhase extends BattlePhase { diff --git a/src/phases/party-member-pokemon-phase.ts b/src/phases/party-member-pokemon-phase.ts index 1f27826884e..2b6ca01261d 100644 --- a/src/phases/party-member-pokemon-phase.ts +++ b/src/phases/party-member-pokemon-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import Pokemon from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import Pokemon from "#app/field/pokemon"; import { FieldPhase } from "./field-phase"; export abstract class PartyMemberPokemonPhase extends FieldPhase { diff --git a/src/phases/party-status-cure-phase.ts b/src/phases/party-status-cure-phase.ts index a11aa01b63a..e4903c7fc1f 100644 --- a/src/phases/party-status-cure-phase.ts +++ b/src/phases/party-status-cure-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { Abilities } from "#app/enums/abilities.js"; -import Pokemon from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { Abilities } from "#app/enums/abilities"; +import Pokemon from "#app/field/pokemon"; import { BattlePhase } from "./battle-phase"; import { ShowAbilityPhase } from "./show-ability-phase"; diff --git a/src/phases/player-party-member-pokemon-phase.ts b/src/phases/player-party-member-pokemon-phase.ts index 4b1600b33d2..87855b9334c 100644 --- a/src/phases/player-party-member-pokemon-phase.ts +++ b/src/phases/player-party-member-pokemon-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { PlayerPokemon } from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { PlayerPokemon } from "#app/field/pokemon"; import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; export abstract class PlayerPartyMemberPokemonPhase extends PartyMemberPokemonPhase { diff --git a/src/phases/pokemon-heal-phase.ts b/src/phases/pokemon-heal-phase.ts index 6db8aeb4fca..49db2641e98 100644 --- a/src/phases/pokemon-heal-phase.ts +++ b/src/phases/pokemon-heal-phase.ts @@ -1,14 +1,14 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { CommonAnim } from "#app/data/battle-anims.js"; -import { getStatusEffectHealText } from "#app/data/status-effect.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; -import { HitResult, DamageResult } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { HealingBoosterModifier } from "#app/modifier/modifier.js"; -import { HealAchv } from "#app/system/achv.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { CommonAnim } from "#app/data/battle-anims"; +import { getStatusEffectHealText } from "#app/data/status-effect"; +import { StatusEffect } from "#app/enums/status-effect"; +import { HitResult, DamageResult } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { HealingBoosterModifier } from "#app/modifier/modifier"; +import { HealAchv } from "#app/system/achv"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { CommonAnimPhase } from "./common-anim-phase"; export class PokemonHealPhase extends CommonAnimPhase { diff --git a/src/phases/pokemon-phase.ts b/src/phases/pokemon-phase.ts index 871ee57d7a5..b980c1d1719 100644 --- a/src/phases/pokemon-phase.ts +++ b/src/phases/pokemon-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import Pokemon from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import Pokemon from "#app/field/pokemon"; import { FieldPhase } from "./field-phase"; export abstract class PokemonPhase extends FieldPhase { diff --git a/src/phases/post-game-over-phase.ts b/src/phases/post-game-over-phase.ts index 02413b41a23..beeb30c7260 100644 --- a/src/phases/post-game-over-phase.ts +++ b/src/phases/post-game-over-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; import { EndCardPhase } from "./end-card-phase"; import { TitlePhase } from "./title-phase"; diff --git a/src/phases/post-summon-phase.ts b/src/phases/post-summon-phase.ts index e671bf30ed1..47a5513f0eb 100644 --- a/src/phases/post-summon-phase.ts +++ b/src/phases/post-summon-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { applyPostSummonAbAttrs, PostSummonAbAttr } from "#app/data/ability.js"; -import { ArenaTrapTag } from "#app/data/arena-tag.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { applyPostSummonAbAttrs, PostSummonAbAttr } from "#app/data/ability"; +import { ArenaTrapTag } from "#app/data/arena-tag"; +import { StatusEffect } from "#app/enums/status-effect"; import { PokemonPhase } from "./pokemon-phase"; export class PostSummonPhase extends PokemonPhase { diff --git a/src/phases/post-turn-status-effect-phase.ts b/src/phases/post-turn-status-effect-phase.ts index 47db32303a5..413f9eae65e 100644 --- a/src/phases/post-turn-status-effect-phase.ts +++ b/src/phases/post-turn-status-effect-phase.ts @@ -1,12 +1,12 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { applyAbAttrs, BlockNonDirectDamageAbAttr, BlockStatusDamageAbAttr, ReduceBurnDamageAbAttr } from "#app/data/ability.js"; -import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims.js"; -import { getStatusEffectActivationText } from "#app/data/status-effect.js"; -import { BattleSpec } from "#app/enums/battle-spec.js"; -import { StatusEffect } from "#app/enums/status-effect.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { applyAbAttrs, BlockNonDirectDamageAbAttr, BlockStatusDamageAbAttr, ReduceBurnDamageAbAttr } from "#app/data/ability"; +import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims"; +import { getStatusEffectActivationText } from "#app/data/status-effect"; +import { BattleSpec } from "#app/enums/battle-spec"; +import { StatusEffect } from "#app/enums/status-effect"; +import { getPokemonNameWithAffix } from "#app/messages"; +import * as Utils from "#app/utils"; import { PokemonPhase } from "./pokemon-phase"; export class PostTurnStatusEffectPhase extends PokemonPhase { diff --git a/src/phases/quiet-form-change-phase.ts b/src/phases/quiet-form-change-phase.ts index 3d30d36907e..6a1d31d137d 100644 --- a/src/phases/quiet-form-change-phase.ts +++ b/src/phases/quiet-form-change-phase.ts @@ -1,10 +1,10 @@ -import BattleScene from "#app/battle-scene.js"; -import { SemiInvulnerableTag } from "#app/data/battler-tags.js"; -import { SpeciesFormChange, getSpeciesFormChangeMessage } from "#app/data/pokemon-forms.js"; -import { getTypeRgb } from "#app/data/type.js"; -import { BattleSpec } from "#app/enums/battle-spec.js"; -import Pokemon, { EnemyPokemon } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import BattleScene from "#app/battle-scene"; +import { SemiInvulnerableTag } from "#app/data/battler-tags"; +import { SpeciesFormChange, getSpeciesFormChangeMessage } from "#app/data/pokemon-forms"; +import { getTypeRgb } from "#app/data/type"; +import { BattleSpec } from "#app/enums/battle-spec"; +import Pokemon, { EnemyPokemon } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; import { BattlePhase } from "./battle-phase"; import { MovePhase } from "./move-phase"; import { PokemonHealPhase } from "./pokemon-heal-phase"; diff --git a/src/phases/reload-session-phase.ts b/src/phases/reload-session-phase.ts index a61c52323bf..f8a38105869 100644 --- a/src/phases/reload-session-phase.ts +++ b/src/phases/reload-session-phase.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; -import { Mode } from "#app/ui/ui.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { Mode } from "#app/ui/ui"; +import * as Utils from "#app/utils"; export class ReloadSessionPhase extends Phase { private systemDataStr: string | null; diff --git a/src/phases/return-phase.ts b/src/phases/return-phase.ts index e1753670ad4..dfc458eb817 100644 --- a/src/phases/return-phase.ts +++ b/src/phases/return-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms.js"; +import BattleScene from "#app/battle-scene"; +import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms"; import { SwitchSummonPhase } from "./switch-summon-phase"; export class ReturnPhase extends SwitchSummonPhase { diff --git a/src/phases/ribbon-modifier-reward-phase.ts b/src/phases/ribbon-modifier-reward-phase.ts index 4a80325b7e7..fabb3bfa1b1 100644 --- a/src/phases/ribbon-modifier-reward-phase.ts +++ b/src/phases/ribbon-modifier-reward-phase.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; -import PokemonSpecies from "#app/data/pokemon-species.js"; -import { ModifierTypeFunc } from "#app/modifier/modifier-type.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import PokemonSpecies from "#app/data/pokemon-species"; +import { ModifierTypeFunc } from "#app/modifier/modifier-type"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { ModifierRewardPhase } from "./modifier-reward-phase"; diff --git a/src/phases/scan-ivs-phase.ts b/src/phases/scan-ivs-phase.ts index f5e1a814612..ba27e4f1943 100644 --- a/src/phases/scan-ivs-phase.ts +++ b/src/phases/scan-ivs-phase.ts @@ -1,10 +1,10 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims.js"; -import { Stat } from "#app/enums/stat.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { getTextColor, TextStyle } from "#app/ui/text.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims"; +import { Stat } from "#app/enums/stat"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { getTextColor, TextStyle } from "#app/ui/text"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { PokemonPhase } from "./pokemon-phase"; diff --git a/src/phases/select-biome-phase.ts b/src/phases/select-biome-phase.ts index 68c2cd29f26..fe9b5b3996b 100644 --- a/src/phases/select-biome-phase.ts +++ b/src/phases/select-biome-phase.ts @@ -1,11 +1,11 @@ -import BattleScene from "#app/battle-scene.js"; -import { biomeLinks, getBiomeName } from "#app/data/biomes.js"; -import { Biome } from "#app/enums/biome.js"; -import { MoneyInterestModifier, MapModifier } from "#app/modifier/modifier.js"; -import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { biomeLinks, getBiomeName } from "#app/data/biomes"; +import { Biome } from "#app/enums/biome"; +import { MoneyInterestModifier, MapModifier } from "#app/modifier/modifier"; +import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; +import { Mode } from "#app/ui/ui"; import { BattlePhase } from "./battle-phase"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { PartyHealPhase } from "./party-heal-phase"; import { SwitchBiomePhase } from "./switch-biome-phase"; diff --git a/src/phases/select-challenge-phase.ts b/src/phases/select-challenge-phase.ts index eaf830e0059..9450c60fec5 100644 --- a/src/phases/select-challenge-phase.ts +++ b/src/phases/select-challenge-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { Mode } from "#app/ui/ui"; export class SelectChallengePhase extends Phase { constructor(scene: BattleScene) { diff --git a/src/phases/select-gender-phase.ts b/src/phases/select-gender-phase.ts index 3fc6916e233..7f2c965f1d1 100644 --- a/src/phases/select-gender-phase.ts +++ b/src/phases/select-gender-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { PlayerGender } from "#app/enums/player-gender.js"; -import { Phase } from "#app/phase.js"; -import { SettingKeys } from "#app/system/settings/settings.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { PlayerGender } from "#app/enums/player-gender"; +import { Phase } from "#app/phase"; +import { SettingKeys } from "#app/system/settings/settings"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; export class SelectGenderPhase extends Phase { diff --git a/src/phases/select-modifier-phase.ts b/src/phases/select-modifier-phase.ts index 1c96d278d69..e14638c5dd2 100644 --- a/src/phases/select-modifier-phase.ts +++ b/src/phases/select-modifier-phase.ts @@ -1,12 +1,12 @@ -import BattleScene from "#app/battle-scene.js"; -import { ModifierTier } from "#app/modifier/modifier-tier.js"; -import { regenerateModifierPoolThresholds, ModifierTypeOption, ModifierType, getPlayerShopModifierTypeOptionsForWave, PokemonModifierType, FusePokemonModifierType, PokemonMoveModifierType, TmModifierType, RememberMoveModifierType, PokemonPpRestoreModifierType, PokemonPpUpModifierType, ModifierPoolType, getPlayerModifierTypeOptions } from "#app/modifier/modifier-type.js"; -import { ExtraModifierModifier, Modifier, PokemonHeldItemModifier } from "#app/modifier/modifier.js"; -import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "#app/ui/modifier-select-ui-handler.js"; -import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { ModifierTier } from "#app/modifier/modifier-tier"; +import { regenerateModifierPoolThresholds, ModifierTypeOption, ModifierType, getPlayerShopModifierTypeOptionsForWave, PokemonModifierType, FusePokemonModifierType, PokemonMoveModifierType, TmModifierType, RememberMoveModifierType, PokemonPpRestoreModifierType, PokemonPpUpModifierType, ModifierPoolType, getPlayerModifierTypeOptions } from "#app/modifier/modifier-type"; +import { ExtraModifierModifier, Modifier, PokemonHeldItemModifier } from "#app/modifier/modifier"; +import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "#app/ui/modifier-select-ui-handler"; +import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { BattlePhase } from "./battle-phase"; import Overrides from "#app/overrides"; diff --git a/src/phases/select-starter-phase.ts b/src/phases/select-starter-phase.ts index ad972a49225..cd3c112549c 100644 --- a/src/phases/select-starter-phase.ts +++ b/src/phases/select-starter-phase.ts @@ -1,15 +1,15 @@ -import BattleScene from "#app/battle-scene.js"; -import { applyChallenges, ChallengeType } from "#app/data/challenge.js"; -import { Gender } from "#app/data/gender.js"; -import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms.js"; -import { getPokemonSpecies } from "#app/data/pokemon-species.js"; -import { Species } from "#app/enums/species.js"; -import { PlayerPokemon } from "#app/field/pokemon.js"; -import { overrideModifiers, overrideHeldItems } from "#app/modifier/modifier.js"; -import { Phase } from "#app/phase.js"; -import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler.js"; -import { Starter } from "#app/ui/starter-select-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { applyChallenges, ChallengeType } from "#app/data/challenge"; +import { Gender } from "#app/data/gender"; +import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms"; +import { getPokemonSpecies } from "#app/data/pokemon-species"; +import { Species } from "#app/enums/species"; +import { PlayerPokemon } from "#app/field/pokemon"; +import { overrideModifiers, overrideHeldItems } from "#app/modifier/modifier"; +import { Phase } from "#app/phase"; +import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler"; +import { Starter } from "#app/ui/starter-select-ui-handler"; +import { Mode } from "#app/ui/ui"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import { TitlePhase } from "./title-phase"; import Overrides from "#app/overrides"; diff --git a/src/phases/select-target-phase.ts b/src/phases/select-target-phase.ts index fe72335e312..716d2737a6c 100644 --- a/src/phases/select-target-phase.ts +++ b/src/phases/select-target-phase.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { Command } from "#app/ui/command-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { Command } from "#app/ui/command-ui-handler"; +import { Mode } from "#app/ui/ui"; import { CommandPhase } from "./command-phase"; import { PokemonPhase } from "./pokemon-phase"; diff --git a/src/phases/shiny-sparkle-phase.ts b/src/phases/shiny-sparkle-phase.ts index 4cd2b68f881..49c60a82dd5 100644 --- a/src/phases/shiny-sparkle-phase.ts +++ b/src/phases/shiny-sparkle-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; import { PokemonPhase } from "./pokemon-phase"; export class ShinySparklePhase extends PokemonPhase { diff --git a/src/phases/show-ability-phase.ts b/src/phases/show-ability-phase.ts index ee0b98f7886..cf34e327b4f 100644 --- a/src/phases/show-ability-phase.ts +++ b/src/phases/show-ability-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; import { PokemonPhase } from "./pokemon-phase"; export class ShowAbilityPhase extends PokemonPhase { diff --git a/src/phases/show-party-exp-bar-phase.ts b/src/phases/show-party-exp-bar-phase.ts index 9920472e801..9e019b202a5 100644 --- a/src/phases/show-party-exp-bar-phase.ts +++ b/src/phases/show-party-exp-bar-phase.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; -import { ExpNotification } from "#app/enums/exp-notification.js"; -import { ExpBoosterModifier } from "#app/modifier/modifier.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import { ExpNotification } from "#app/enums/exp-notification"; +import { ExpBoosterModifier } from "#app/modifier/modifier"; +import * as Utils from "#app/utils"; import { HidePartyExpBarPhase } from "./hide-party-exp-bar-phase"; import { LevelUpPhase } from "./level-up-phase"; import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; diff --git a/src/phases/show-trainer-phase.ts b/src/phases/show-trainer-phase.ts index 8a869f582d8..26ccddd53fc 100644 --- a/src/phases/show-trainer-phase.ts +++ b/src/phases/show-trainer-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { PlayerGender } from "#app/enums/player-gender.js"; +import BattleScene from "#app/battle-scene"; +import { PlayerGender } from "#app/enums/player-gender"; import { BattlePhase } from "./battle-phase"; export class ShowTrainerPhase extends BattlePhase { diff --git a/src/phases/summon-missing-phase.ts b/src/phases/summon-missing-phase.ts index bb9607285ad..83ac8779dd8 100644 --- a/src/phases/summon-missing-phase.ts +++ b/src/phases/summon-missing-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import BattleScene from "#app/battle-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; import i18next from "i18next"; import { SummonPhase } from "./summon-phase"; diff --git a/src/phases/summon-phase.ts b/src/phases/summon-phase.ts index f65a2063d4c..2645060c547 100644 --- a/src/phases/summon-phase.ts +++ b/src/phases/summon-phase.ts @@ -1,12 +1,12 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattleType } from "#app/battle.js"; -import { getPokeballAtlasKey, getPokeballTintColor } from "#app/data/pokeball.js"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms.js"; -import { TrainerSlot } from "#app/data/trainer-config.js"; -import { PlayerGender } from "#app/enums/player-gender.js"; -import { addPokeballOpenParticles } from "#app/field/anims.js"; -import Pokemon, { FieldPosition } from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import BattleScene from "#app/battle-scene"; +import { BattleType } from "#app/battle"; +import { getPokeballAtlasKey, getPokeballTintColor } from "#app/data/pokeball"; +import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms"; +import { TrainerSlot } from "#app/data/trainer-config"; +import { PlayerGender } from "#app/enums/player-gender"; +import { addPokeballOpenParticles } from "#app/field/anims"; +import Pokemon, { FieldPosition } from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; import i18next from "i18next"; import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; import { PostSummonPhase } from "./post-summon-phase"; diff --git a/src/phases/switch-biome-phase.ts b/src/phases/switch-biome-phase.ts index f20cd59b240..9cf5635a39f 100644 --- a/src/phases/switch-biome-phase.ts +++ b/src/phases/switch-biome-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { Biome } from "#app/enums/biome.js"; -import { getBiomeKey } from "#app/field/arena.js"; +import BattleScene from "#app/battle-scene"; +import { Biome } from "#app/enums/biome"; +import { getBiomeKey } from "#app/field/arena"; import { BattlePhase } from "./battle-phase"; export class SwitchBiomePhase extends BattlePhase { diff --git a/src/phases/switch-phase.ts b/src/phases/switch-phase.ts index 93b0943febf..b1a2e991ed8 100644 --- a/src/phases/switch-phase.ts +++ b/src/phases/switch-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler"; +import { Mode } from "#app/ui/ui"; import { BattlePhase } from "./battle-phase"; import { SwitchSummonPhase } from "./switch-summon-phase"; diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 8201f2879ed..2a5fd0cc3ac 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -1,13 +1,13 @@ -import BattleScene from "#app/battle-scene.js"; -import { applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr } from "#app/data/ability.js"; -import { allMoves, ForceSwitchOutAttr } from "#app/data/move.js"; -import { getPokeballTintColor } from "#app/data/pokeball.js"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms.js"; -import { TrainerSlot } from "#app/data/trainer-config.js"; -import Pokemon from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { SwitchEffectTransferModifier } from "#app/modifier/modifier.js"; -import { Command } from "#app/ui/command-ui-handler.js"; +import BattleScene from "#app/battle-scene"; +import { applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr } from "#app/data/ability"; +import { allMoves, ForceSwitchOutAttr } from "#app/data/move"; +import { getPokeballTintColor } from "#app/data/pokeball"; +import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms"; +import { TrainerSlot } from "#app/data/trainer-config"; +import Pokemon from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { SwitchEffectTransferModifier } from "#app/modifier/modifier"; +import { Command } from "#app/ui/command-ui-handler"; import i18next from "i18next"; import { PostSummonPhase } from "./post-summon-phase"; import { SummonPhase } from "./summon-phase"; diff --git a/src/phases/test-message-phase.ts b/src/phases/test-message-phase.ts index 14fed24ef4b..464a5ed1f94 100644 --- a/src/phases/test-message-phase.ts +++ b/src/phases/test-message-phase.ts @@ -1,4 +1,4 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { MessagePhase } from "./message-phase"; export class TestMessagePhase extends MessagePhase { diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 4c89b725c2d..52503501837 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -1,21 +1,21 @@ -import { loggedInUser } from "#app/account.js"; -import BattleScene from "#app/battle-scene.js"; -import { BattleType } from "#app/battle.js"; -import { getDailyRunStarters, fetchDailyRunSeed } from "#app/data/daily-run.js"; -import { Gender } from "#app/data/gender.js"; -import { getBiomeKey } from "#app/field/arena.js"; -import { GameModes, GameMode, getGameMode } from "#app/game-mode.js"; -import { regenerateModifierPoolThresholds, ModifierPoolType, modifierTypes, getDailyRunStarterModifiers } from "#app/modifier/modifier-type.js"; -import { Phase } from "#app/phase.js"; -import { SessionSaveData } from "#app/system/game-data.js"; -import { Unlockables } from "#app/system/unlockables.js"; -import { vouchers } from "#app/system/voucher.js"; -import { OptionSelectItem, OptionSelectConfig } from "#app/ui/abstact-option-select-ui-handler.js"; -import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler.js"; -import { Mode } from "#app/ui/ui.js"; +import { loggedInUser } from "#app/account"; +import BattleScene from "#app/battle-scene"; +import { BattleType } from "#app/battle"; +import { getDailyRunStarters, fetchDailyRunSeed } from "#app/data/daily-run"; +import { Gender } from "#app/data/gender"; +import { getBiomeKey } from "#app/field/arena"; +import { GameModes, GameMode, getGameMode } from "#app/game-mode"; +import { regenerateModifierPoolThresholds, ModifierPoolType, modifierTypes, getDailyRunStarterModifiers } from "#app/modifier/modifier-type"; +import { Phase } from "#app/phase"; +import { SessionSaveData } from "#app/system/game-data"; +import { Unlockables } from "#app/system/unlockables"; +import { vouchers } from "#app/system/voucher"; +import { OptionSelectItem, OptionSelectConfig } from "#app/ui/abstact-option-select-ui-handler"; +import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; -import { Modifier } from "#app/modifier/modifier.js"; +import * as Utils from "#app/utils"; +import { Modifier } from "#app/modifier/modifier"; import { CheckSwitchPhase } from "./check-switch-phase"; import { EncounterPhase } from "./encounter-phase"; import { SelectChallengePhase } from "./select-challenge-phase"; diff --git a/src/phases/toggle-double-position-phase.ts b/src/phases/toggle-double-position-phase.ts index fe3d0482483..563af8575d7 100644 --- a/src/phases/toggle-double-position-phase.ts +++ b/src/phases/toggle-double-position-phase.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { FieldPosition } from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { FieldPosition } from "#app/field/pokemon"; import { BattlePhase } from "./battle-phase"; export class ToggleDoublePositionPhase extends BattlePhase { diff --git a/src/phases/trainer-message-test-phase.ts b/src/phases/trainer-message-test-phase.ts index 4ea451660c3..8075dd761e2 100644 --- a/src/phases/trainer-message-test-phase.ts +++ b/src/phases/trainer-message-test-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { trainerConfigs } from "#app/data/trainer-config.js"; -import { TrainerType } from "#app/enums/trainer-type.js"; +import BattleScene from "#app/battle-scene"; +import { trainerConfigs } from "#app/data/trainer-config"; +import { TrainerType } from "#app/enums/trainer-type"; import { BattlePhase } from "./battle-phase"; import { TestMessagePhase } from "./test-message-phase"; diff --git a/src/phases/trainer-victory-phase.ts b/src/phases/trainer-victory-phase.ts index a38874c9acd..e925f0c47d4 100644 --- a/src/phases/trainer-victory-phase.ts +++ b/src/phases/trainer-victory-phase.ts @@ -1,10 +1,10 @@ -import BattleScene from "#app/battle-scene.js"; -import { getCharVariantFromDialogue } from "#app/data/dialogue.js"; -import { TrainerType } from "#app/enums/trainer-type.js"; -import { modifierTypes } from "#app/modifier/modifier-type.js"; -import { vouchers } from "#app/system/voucher.js"; +import BattleScene from "#app/battle-scene"; +import { getCharVariantFromDialogue } from "#app/data/dialogue"; +import { TrainerType } from "#app/enums/trainer-type"; +import { modifierTypes } from "#app/modifier/modifier-type"; +import { vouchers } from "#app/system/voucher"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { BattlePhase } from "./battle-phase"; import { ModifierRewardPhase } from "./modifier-reward-phase"; import { MoneyRewardPhase } from "./money-reward-phase"; diff --git a/src/phases/turn-end-phase.ts b/src/phases/turn-end-phase.ts index c8bd3398bb5..724a5206d74 100644 --- a/src/phases/turn-end-phase.ts +++ b/src/phases/turn-end-phase.ts @@ -1,12 +1,12 @@ -import BattleScene from "#app/battle-scene.js"; -import { applyPostTurnAbAttrs, PostTurnAbAttr } from "#app/data/ability.js"; -import { BattlerTagLapseType } from "#app/data/battler-tags.js"; -import { TerrainType } from "#app/data/terrain.js"; -import { WeatherType } from "#app/enums/weather-type.js"; -import { TurnEndEvent } from "#app/events/battle-scene.js"; -import Pokemon from "#app/field/pokemon.js"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { TurnHealModifier, EnemyTurnHealModifier, EnemyStatusEffectHealChanceModifier, TurnStatusEffectModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier.js"; +import BattleScene from "#app/battle-scene"; +import { applyPostTurnAbAttrs, PostTurnAbAttr } from "#app/data/ability"; +import { BattlerTagLapseType } from "#app/data/battler-tags"; +import { TerrainType } from "#app/data/terrain"; +import { WeatherType } from "#app/enums/weather-type"; +import { TurnEndEvent } from "#app/events/battle-scene"; +import Pokemon from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { TurnHealModifier, EnemyTurnHealModifier, EnemyStatusEffectHealChanceModifier, TurnStatusEffectModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier"; import i18next from "i18next"; import { FieldPhase } from "./field-phase"; import { PokemonHealPhase } from "./pokemon-heal-phase"; diff --git a/src/phases/turn-init-phase.ts b/src/phases/turn-init-phase.ts index a999d57ca0f..568cfdc5714 100644 --- a/src/phases/turn-init-phase.ts +++ b/src/phases/turn-init-phase.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex } from "#app/battle.js"; -import { TurnInitEvent } from "#app/events/battle-scene.js"; -import { PlayerPokemon } from "#app/field/pokemon.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex } from "#app/battle"; +import { TurnInitEvent } from "#app/events/battle-scene"; +import { PlayerPokemon } from "#app/field/pokemon"; import i18next from "i18next"; import { FieldPhase } from "./field-phase"; import { ToggleDoublePositionPhase } from "./toggle-double-position-phase"; diff --git a/src/phases/unavailable-phase.ts b/src/phases/unavailable-phase.ts index 4757af5e15d..59bfca7875e 100644 --- a/src/phases/unavailable-phase.ts +++ b/src/phases/unavailable-phase.ts @@ -1,6 +1,6 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { Mode } from "#app/ui/ui"; import { LoginPhase } from "./login-phase"; export class UnavailablePhase extends Phase { diff --git a/src/phases/unlock-phase.ts b/src/phases/unlock-phase.ts index 1662afaa758..65060309a6c 100644 --- a/src/phases/unlock-phase.ts +++ b/src/phases/unlock-phase.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; -import { Phase } from "#app/phase.js"; -import { Unlockables, getUnlockableName } from "#app/system/unlockables.js"; -import { Mode } from "#app/ui/ui.js"; +import BattleScene from "#app/battle-scene"; +import { Phase } from "#app/phase"; +import { Unlockables, getUnlockableName } from "#app/system/unlockables"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; export class UnlockPhase extends Phase { diff --git a/src/phases/victory-phase.ts b/src/phases/victory-phase.ts index b7587de4dbb..9679a79a37d 100644 --- a/src/phases/victory-phase.ts +++ b/src/phases/victory-phase.ts @@ -1,8 +1,8 @@ -import BattleScene from "#app/battle-scene.js"; -import { BattlerIndex, BattleType } from "#app/battle.js"; -import { modifierTypes } from "#app/modifier/modifier-type.js"; -import { ExpShareModifier, ExpBalanceModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier } from "#app/modifier/modifier.js"; -import * as Utils from "#app/utils.js"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex, BattleType } from "#app/battle"; +import { modifierTypes } from "#app/modifier/modifier-type"; +import { ExpShareModifier, ExpBalanceModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier } from "#app/modifier/modifier"; +import * as Utils from "#app/utils"; import Overrides from "#app/overrides"; import { BattleEndPhase } from "./battle-end-phase"; import { NewBattlePhase } from "./new-battle-phase"; diff --git a/src/phases/weather-effect-phase.ts b/src/phases/weather-effect-phase.ts index ccfc9abb64f..e85ef0326f6 100644 --- a/src/phases/weather-effect-phase.ts +++ b/src/phases/weather-effect-phase.ts @@ -2,7 +2,7 @@ import BattleScene from "#app/battle-scene"; import { applyPreWeatherEffectAbAttrs, SuppressWeatherEffectAbAttr, PreWeatherDamageAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPostWeatherLapseAbAttrs, PostWeatherLapseAbAttr } from "#app/data/ability.js"; import { CommonAnim } from "#app/data/battle-anims"; import { Weather, getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weather"; -import { BattlerTagType } from "#app/enums/battler-tag-type.js"; +import { BattlerTagType } from "#app/enums/battler-tag-type"; import { WeatherType } from "#app/enums/weather-type"; import Pokemon, { HitResult } from "#app/field/pokemon"; import * as Utils from "#app/utils"; diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 3d24458a06c..705fd5143a4 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -2,17 +2,17 @@ import i18next from "i18next"; import LanguageDetector from "i18next-browser-languagedetector"; import processor, { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor"; -import { caEsConfig} from "#app/locales/ca_ES/config.js"; -import { deConfig } from "#app/locales/de/config.js"; -import { enConfig } from "#app/locales/en/config.js"; -import { esConfig } from "#app/locales/es/config.js"; -import { frConfig } from "#app/locales/fr/config.js"; -import { itConfig } from "#app/locales/it/config.js"; -import { koConfig } from "#app/locales/ko/config.js"; -import { jaConfig } from "#app/locales/ja/config.js"; -import { ptBrConfig } from "#app/locales/pt_BR/config.js"; -import { zhCnConfig } from "#app/locales/zh_CN/config.js"; -import { zhTwConfig } from "#app/locales/zh_TW/config.js"; +import { caEsConfig} from "#app/locales/ca_ES/config"; +import { deConfig } from "#app/locales/de/config"; +import { enConfig } from "#app/locales/en/config"; +import { esConfig } from "#app/locales/es/config"; +import { frConfig } from "#app/locales/fr/config"; +import { itConfig } from "#app/locales/it/config"; +import { koConfig } from "#app/locales/ko/config"; +import { jaConfig } from "#app/locales/ja/config"; +import { ptBrConfig } from "#app/locales/pt_BR/config"; +import { zhCnConfig } from "#app/locales/zh_CN/config"; +import { zhTwConfig } from "#app/locales/zh_TW/config"; interface LoadingFontFaceProperty { face: FontFace, diff --git a/src/system/arena-data.ts b/src/system/arena-data.ts index 886129edcf6..5b907805372 100644 --- a/src/system/arena-data.ts +++ b/src/system/arena-data.ts @@ -2,7 +2,7 @@ import { Arena } from "../field/arena"; import { ArenaTag } from "../data/arena-tag"; import { Biome } from "#enums/biome"; import { Weather } from "../data/weather"; -import { Terrain } from "#app/data/terrain.js"; +import { Terrain } from "#app/data/terrain"; export default class ArenaData { public biome: Biome; diff --git a/src/system/challenge-data.ts b/src/system/challenge-data.ts index 69df11dd395..394d63867be 100644 --- a/src/system/challenge-data.ts +++ b/src/system/challenge-data.ts @@ -1,4 +1,4 @@ -import { Challenge, copyChallenge } from "#app/data/challenge.js"; +import { Challenge, copyChallenge } from "#app/data/challenge"; export default class ChallengeData { public id: integer; diff --git a/src/system/egg-data.ts b/src/system/egg-data.ts index b4bd4368bd9..785ae364efe 100644 --- a/src/system/egg-data.ts +++ b/src/system/egg-data.ts @@ -2,7 +2,7 @@ import { EggTier } from "#enums/egg-type"; import { Species } from "#enums/species"; import { VariantTier } from "#enums/variant-tiers"; import { EGG_SEED, Egg } from "../data/egg"; -import { EggSourceType } from "#app/enums/egg-source-types.js"; +import { EggSourceType } from "#app/enums/egg-source-types"; export default class EggData { public id: integer; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 800b8baecff..677bbe4add6 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -30,20 +30,20 @@ import { TrainerVariant } from "../field/trainer"; import { Variant } from "#app/data/variant"; import {setSettingGamepad, SettingGamepad, settingGamepadDefaults} from "./settings/settings-gamepad"; import {setSettingKeyboard, SettingKeyboard} from "#app/system/settings/settings-keyboard"; -import { TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena.js"; -import { EnemyAttackStatusEffectChanceModifier } from "../modifier/modifier"; -import { StatusEffect } from "#app/data/status-effect.js"; +import { TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena"; +import * as Modifier from "../modifier/modifier"; +import { StatusEffect } from "#app/data/status-effect"; import ChallengeData from "./challenge-data"; import { Device } from "#enums/devices"; import { GameDataType } from "#enums/game-data-type"; import { Moves } from "#enums/moves"; import { PlayerGender } from "#enums/player-gender"; import { Species } from "#enums/species"; -import { applyChallenges, ChallengeType } from "#app/data/challenge.js"; -import { WeatherType } from "#app/enums/weather-type.js"; -import { TerrainType } from "#app/data/terrain.js"; -import { OutdatedPhase } from "#app/phases/outdated-phase.js"; -import { ReloadSessionPhase } from "#app/phases/reload-session-phase.js"; +import { applyChallenges, ChallengeType } from "#app/data/challenge"; +import { WeatherType } from "#app/enums/weather-type"; +import { TerrainType } from "#app/data/terrain"; +import { OutdatedPhase } from "#app/phases/outdated-phase"; +import { ReloadSessionPhase } from "#app/phases/reload-session-phase"; import { RUN_HISTORY_LIMIT } from "#app/ui/run-history-ui-handler"; import { applySessionDataPatches, applySettingsDataPatches, applySystemDataPatches } from "./version-converter"; @@ -1065,10 +1065,8 @@ export class GameData { // TODO //scene.arena.tags = sessionData.arena.tags; - const modifiersModule = await import("../modifier/modifier"); - for (const modifierData of sessionData.modifiers) { - const modifier = modifierData.toModifier(scene, modifiersModule[modifierData.className]); + const modifier = modifierData.toModifier(scene, Modifier[modifierData.className]); if (modifier) { scene.addModifier(modifier, true); } @@ -1077,7 +1075,7 @@ export class GameData { scene.updateModifiers(true); for (const enemyModifierData of sessionData.enemyModifiers) { - const modifier = enemyModifierData.toModifier(scene, modifiersModule[enemyModifierData.className]); + const modifier = enemyModifierData.toModifier(scene, Modifier[enemyModifierData.className]); if (modifier) { scene.addEnemyModifier(modifier, true); } @@ -1233,7 +1231,7 @@ export class GameData { if (md?.className === "ExpBalanceModifier") { // Temporarily limit EXP Balance until it gets reworked md.stackCount = Math.min(md.stackCount, 4); } - if (md instanceof EnemyAttackStatusEffectChanceModifier && md.effect === StatusEffect.FREEZE || md.effect === StatusEffect.SLEEP) { + if (md instanceof Modifier.EnemyAttackStatusEffectChanceModifier && md.effect === StatusEffect.FREEZE || md.effect === StatusEffect.SLEEP) { continue; } ret.push(new PersistentModifierData(md, player)); diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 6b46b6fe96c..bc88c21e1e1 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -8,7 +8,7 @@ import SettingsUiHandler from "#app/ui/settings/settings-ui-handler"; import { EaseType } from "#enums/ease-type"; import { MoneyFormat } from "#enums/money-format"; import { PlayerGender } from "#enums/player-gender"; -import { getIsInitialized, initI18n } from "#app/plugins/i18n.js"; +import { getIsInitialized, initI18n } from "#app/plugins/i18n"; import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; function getTranslation(key: string): string { diff --git a/src/system/voucher.ts b/src/system/voucher.ts index 2f94308d9c8..06edfe5c6a6 100644 --- a/src/system/voucher.ts +++ b/src/system/voucher.ts @@ -3,8 +3,8 @@ import i18next from "i18next"; import { AchvTier, achvs, getAchievementDescription } from "./achv"; import { PlayerGender } from "#enums/player-gender"; import { TrainerType } from "#enums/trainer-type"; -import { ConditionFn } from "#app/@types/common.js"; -import { trainerConfigs } from "#app/data/trainer-config.js"; +import { ConditionFn } from "#app/@types/common"; +import { trainerConfigs } from "#app/data/trainer-config"; export enum VoucherType { REGULAR, diff --git a/src/test/abilities/tera_shell.test.ts b/src/test/abilities/tera_shell.test.ts index f9cb2935619..6a6b7bb252b 100644 --- a/src/test/abilities/tera_shell.test.ts +++ b/src/test/abilities/tera_shell.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; -import { HitResult } from "#app/field/pokemon.js"; +import { HitResult } from "#app/field/pokemon"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/battle/damage_calculation.test.ts b/src/test/battle/damage_calculation.test.ts index 665000450be..9c7c9dc9d3e 100644 --- a/src/test/battle/damage_calculation.test.ts +++ b/src/test/battle/damage_calculation.test.ts @@ -1,4 +1,4 @@ -import { DamagePhase } from "#app/phases/damage-phase.js"; +import { DamagePhase } from "#app/phases/damage-phase"; import { toDmgValue } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; diff --git a/src/test/moves/gigaton_hammer.test.ts b/src/test/moves/gigaton_hammer.test.ts index 9379e9d98b2..0162375cdb2 100644 --- a/src/test/moves/gigaton_hammer.test.ts +++ b/src/test/moves/gigaton_hammer.test.ts @@ -1,4 +1,4 @@ -import { BattlerIndex } from "#app/battle.js"; +import { BattlerIndex } from "#app/battle"; import GameManager from "#app/test/utils/gameManager"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/lunar_blessing.test.ts b/src/test/moves/lunar_blessing.test.ts index 73647716f06..92428c39029 100644 --- a/src/test/moves/lunar_blessing.test.ts +++ b/src/test/moves/lunar_blessing.test.ts @@ -1,5 +1,5 @@ -import { StatusEffect } from "#app/enums/status-effect.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import { StatusEffect } from "#app/enums/status-effect"; +import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/utils/helpers/overridesHelper.ts b/src/test/utils/helpers/overridesHelper.ts index cc5f9018325..a42ef84b496 100644 --- a/src/test/utils/helpers/overridesHelper.ts +++ b/src/test/utils/helpers/overridesHelper.ts @@ -1,12 +1,12 @@ -import { StatusEffect } from "#app/data/status-effect.js"; +import { StatusEffect } from "#app/data/status-effect"; import { Weather, WeatherType } from "#app/data/weather"; -import { Abilities } from "#app/enums/abilities.js"; +import { Abilities } from "#app/enums/abilities"; import { Biome } from "#app/enums/biome"; -import { Moves } from "#app/enums/moves.js"; -import { Species } from "#app/enums/species.js"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; import * as GameMode from "#app/game-mode"; import { GameModes, getGameMode } from "#app/game-mode"; -import { ModifierOverride } from "#app/modifier/modifier-type.js"; +import { ModifierOverride } from "#app/modifier/modifier-type"; import Overrides from "#app/overrides"; import { vi } from "vitest"; import { GameManagerHelper } from "./gameManagerHelper"; diff --git a/src/test/utils/testUtils.ts b/src/test/utils/testUtils.ts index 378c3d23fde..2265cf8d79c 100644 --- a/src/test/utils/testUtils.ts +++ b/src/test/utils/testUtils.ts @@ -1,4 +1,4 @@ -import { Moves } from "#app/enums/moves.js"; +import { Moves } from "#app/enums/moves"; import i18next, { type ParseKeys } from "i18next"; import { vi } from "vitest"; diff --git a/src/ui/ability-bar.ts b/src/ui/ability-bar.ts index b8259af9f3d..a924d545852 100644 --- a/src/ui/ability-bar.ts +++ b/src/ui/ability-bar.ts @@ -1,4 +1,4 @@ -import { getPokemonNameWithAffix } from "#app/messages.js"; +import { getPokemonNameWithAffix } from "#app/messages"; import BattleScene from "../battle-scene"; import Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; diff --git a/src/ui/admin-ui-handler.ts b/src/ui/admin-ui-handler.ts index 5c91a36ab64..c48138853fc 100644 --- a/src/ui/admin-ui-handler.ts +++ b/src/ui/admin-ui-handler.ts @@ -1,9 +1,9 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { ModalConfig } from "./modal-ui-handler"; import { Mode } from "./ui"; import * as Utils from "../utils"; import { FormModalUiHandler } from "./form-modal-ui-handler"; -import { Button } from "#app/enums/buttons.js"; +import { Button } from "#app/enums/buttons"; export default class AdminUiHandler extends FormModalUiHandler { diff --git a/src/ui/arena-flyout.ts b/src/ui/arena-flyout.ts index 882c15d3d8c..42a2396e665 100644 --- a/src/ui/arena-flyout.ts +++ b/src/ui/arena-flyout.ts @@ -1,10 +1,10 @@ import { addTextObject, TextStyle } from "./text"; -import BattleScene from "#app/battle-scene.js"; -import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag.js"; -import { WeatherType } from "#app/data/weather.js"; -import { TerrainType } from "#app/data/terrain.js"; +import BattleScene from "#app/battle-scene"; +import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; +import { WeatherType } from "#app/data/weather"; +import { TerrainType } from "#app/data/terrain"; import { addWindow, WindowVariant } from "./ui-theme"; -import { ArenaEvent, ArenaEventType, TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena.js"; +import { ArenaEvent, ArenaEventType, TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena"; import { BattleSceneEventType, TurnEndEvent } from "../events/battle-scene"; import { ArenaTagType } from "#enums/arena-tag-type"; import TimeOfDayWidget from "./time-of-day-widget"; diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index 04691886d9c..332fe5f65b9 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -6,7 +6,7 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import { addWindow } from "./ui-theme"; import {Button} from "#enums/buttons"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import { CommandPhase } from "#app/phases/command-phase"; export default class BallUiHandler extends UiHandler { private pokeballSelectContainer: Phaser.GameObjects.Container; diff --git a/src/ui/battle-flyout.ts b/src/ui/battle-flyout.ts index 6204fa2f928..fe561b76c9f 100644 --- a/src/ui/battle-flyout.ts +++ b/src/ui/battle-flyout.ts @@ -1,13 +1,13 @@ import { default as Pokemon } from "../field/pokemon"; import { addTextObject, TextStyle } from "./text"; import * as Utils from "../utils"; -import BattleScene from "#app/battle-scene.js"; -import Move from "#app/data/move.js"; +import BattleScene from "#app/battle-scene"; +import Move from "#app/data/move"; import { BattleSceneEventType, BerryUsedEvent, MoveUsedEvent } from "../events/battle-scene"; import { BerryType } from "#enums/berry-type"; import { Moves } from "#enums/moves"; import { UiTheme } from "#enums/ui-theme"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import { getPokemonNameWithAffix } from "#app/messages"; /** Container for info about a {@linkcode Move} */ interface MoveInfo { diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index 27ff923e9a3..764e71a8c3f 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -5,8 +5,8 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import i18next from "i18next"; import {Button} from "#enums/buttons"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { CommandPhase } from "#app/phases/command-phase"; export enum Command { FIGHT = 0, diff --git a/src/ui/dropdown.ts b/src/ui/dropdown.ts index 08d55b03cdb..4e1235c211d 100644 --- a/src/ui/dropdown.ts +++ b/src/ui/dropdown.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { SceneBase } from "#app/scene-base.js"; +import BattleScene from "#app/battle-scene"; +import { SceneBase } from "#app/scene-base"; import { addTextObject, TextStyle } from "./text"; import { addWindow, WindowVariant } from "./ui-theme"; import i18next from "i18next"; diff --git a/src/ui/egg-counter-container.ts b/src/ui/egg-counter-container.ts index a688b8b7efc..21cebf5d97e 100644 --- a/src/ui/egg-counter-container.ts +++ b/src/ui/egg-counter-container.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { addWindow } from "./ui-theme"; import { addTextObject, TextStyle } from "./text"; -import { EggCountChangedEvent, EggEventType } from "#app/events/egg.js"; +import { EggCountChangedEvent, EggEventType } from "#app/events/egg"; import EggHatchSceneHandler from "./egg-hatch-scene-handler"; /** diff --git a/src/ui/egg-hatch-scene-handler.ts b/src/ui/egg-hatch-scene-handler.ts index 733873b974e..7b01ef7a3a6 100644 --- a/src/ui/egg-hatch-scene-handler.ts +++ b/src/ui/egg-hatch-scene-handler.ts @@ -2,7 +2,7 @@ import BattleScene from "../battle-scene"; import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import {Button} from "#enums/buttons"; -import { EggHatchPhase } from "#app/phases/egg-hatch-phase.js"; +import { EggHatchPhase } from "#app/phases/egg-hatch-phase"; export default class EggHatchSceneHandler extends UiHandler { public eggHatchContainer: Phaser.GameObjects.Container; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 4bbe88dabd9..60db9d19eef 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -5,11 +5,11 @@ import { Command } from "./command-ui-handler"; import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import * as Utils from "../utils"; -import { MoveCategory } from "#app/data/move.js"; +import { MoveCategory } from "#app/data/move"; import i18next from "i18next"; import {Button} from "#enums/buttons"; -import Pokemon, { PokemonMove } from "#app/field/pokemon.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import Pokemon, { PokemonMove } from "#app/field/pokemon"; +import { CommandPhase } from "#app/phases/command-phase"; export default class FightUiHandler extends UiHandler { public static readonly MOVES_CONTAINER_NAME = "moves"; diff --git a/src/ui/filter-bar.ts b/src/ui/filter-bar.ts index 31d7c562da2..aa0f575d398 100644 --- a/src/ui/filter-bar.ts +++ b/src/ui/filter-bar.ts @@ -1,4 +1,4 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { DropDown, DropDownType } from "./dropdown"; import { StarterContainer } from "./starter-container"; import { addTextObject, getTextColor, TextStyle } from "./text"; diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 98a19402a2b..9e025dbe086 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -15,15 +15,15 @@ import { addWindow } from "./ui-theme"; import { SpeciesFormChangeItemTrigger, FormChangeItem } from "../data/pokemon-forms"; import { getVariantTint } from "#app/data/variant"; import {Button} from "#enums/buttons"; -import { applyChallenges, ChallengeType } from "#app/data/challenge.js"; +import { applyChallenges, ChallengeType } from "#app/data/challenge"; import MoveInfoOverlay from "./move-info-overlay"; import i18next from "i18next"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase.js"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { CommandPhase } from "#app/phases/command-phase"; +import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; const defaultMessage = i18next.t("partyUiHandler:choosePokemon"); diff --git a/src/ui/rename-form-ui-handler.ts b/src/ui/rename-form-ui-handler.ts index 33885509344..078177cafb1 100644 --- a/src/ui/rename-form-ui-handler.ts +++ b/src/ui/rename-form-ui-handler.ts @@ -1,7 +1,7 @@ import { FormModalUiHandler } from "./form-modal-ui-handler"; import { ModalConfig } from "./modal-ui-handler"; import i18next from "i18next"; -import { PlayerPokemon } from "#app/field/pokemon.js"; +import { PlayerPokemon } from "#app/field/pokemon"; export default class RenameFormUiHandler extends FormModalUiHandler { getModalTitle(config?: ModalConfig): string { diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 7a183a11d29..d6bafb8599e 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -18,8 +18,7 @@ import { Type, getTypeRgb } from "../data/type"; import { TypeColor, TypeShadow } from "#app/enums/color"; import { getNatureStatMultiplier, getNatureName } from "../data/nature"; import { getVariantTint } from "#app/data/variant"; -import { PokemonHeldItemModifier, TerastallizeModifier } from "../modifier/modifier"; -import {modifierSortFunc} from "../modifier/modifier"; +import * as Modifier from "../modifier/modifier"; import { Species } from "#enums/species"; import { PlayerGender } from "#enums/player-gender"; @@ -68,7 +67,7 @@ export default class RunInfoUiHandler extends UiHandler { override async setup() { this.runContainer = this.scene.add.container(1, -(this.scene.game.canvas.height / 6) + 1); // The import of the modifiersModule is loaded here to sidestep async/await issues. - this.modifiersModule = await import("../modifier/modifier"); + this.modifiersModule = Modifier; this.runContainer.setVisible(false); } @@ -303,7 +302,7 @@ export default class RunInfoUiHandler extends UiHandler { const teraPokemon = {}; this.runInfo.enemyModifiers.forEach((m) => { const modifier = m.toModifier(this.scene, this.modifiersModule[m.className]); - if (modifier instanceof TerastallizeModifier) { + if (modifier instanceof Modifier.TerastallizeModifier) { const teraDetails = modifier?.getArgs(); const pkmnId = teraDetails[0]; teraPokemon[pkmnId] = teraDetails[1]; @@ -434,7 +433,7 @@ export default class RunInfoUiHandler extends UiHandler { modifierIconsContainer.setScale(0.45); for (const m of this.runInfo.modifiers) { const modifier = m.toModifier(this.scene, this.modifiersModule[m.className]); - if (modifier instanceof PokemonHeldItemModifier) { + if (modifier instanceof Modifier.PokemonHeldItemModifier) { continue; } const icon = modifier?.getIcon(this.scene, false); @@ -635,17 +634,17 @@ export default class RunInfoUiHandler extends UiHandler { // Endless/Endless Spliced have a different scale because Pokemon tend to accumulate more items in these runs. const heldItemsScale = (this.runInfo.gameMode === GameModes.SPLICED_ENDLESS || this.runInfo.gameMode === GameModes.ENDLESS) ? 0.25 : 0.5; const heldItemsContainer = this.scene.add.container(-82, 2); - const heldItemsList : PokemonHeldItemModifier[] = []; + const heldItemsList : Modifier.PokemonHeldItemModifier[] = []; if (this.runInfo.modifiers.length) { for (const m of this.runInfo.modifiers) { const modifier = m.toModifier(this.scene, this.modifiersModule[m.className]); - if (modifier instanceof PokemonHeldItemModifier && modifier.pokemonId === pokemon.id) { + if (modifier instanceof Modifier.PokemonHeldItemModifier && modifier.pokemonId === pokemon.id) { modifier.stackCount = m["stackCount"]; heldItemsList.push(modifier); } } if (heldItemsList.length > 0) { - (heldItemsList as PokemonHeldItemModifier[]).sort(modifierSortFunc); + (heldItemsList as Modifier.PokemonHeldItemModifier[]).sort(Modifier.modifierSortFunc); let row = 0; for (const [index, item] of heldItemsList.entries()) { if ( index > 36 ) { diff --git a/src/ui/save-slot-select-ui-handler.ts b/src/ui/save-slot-select-ui-handler.ts index e6ab0d3b3c3..89b20322a68 100644 --- a/src/ui/save-slot-select-ui-handler.ts +++ b/src/ui/save-slot-select-ui-handler.ts @@ -2,7 +2,7 @@ import i18next from "i18next"; import BattleScene from "../battle-scene"; import { Button } from "#enums/buttons"; import { GameMode } from "../game-mode"; -import { PokemonHeldItemModifier } from "../modifier/modifier"; +import * as Modifier from "../modifier/modifier"; import { SessionSaveData } from "../system/game-data"; import PokemonData from "../system/pokemon-data"; import * as Utils from "../utils"; @@ -306,14 +306,12 @@ class SessionSlot extends Phaser.GameObjects.Container { this.add(pokemonIconsContainer); - const modifiersModule = await import("../modifier/modifier"); - const modifierIconsContainer = this.scene.add.container(148, 30); modifierIconsContainer.setScale(0.5); let visibleModifierIndex = 0; for (const m of data.modifiers) { - const modifier = m.toModifier(this.scene, modifiersModule[m.className]); - if (modifier instanceof PokemonHeldItemModifier) { + const modifier = m.toModifier(this.scene, Modifier[m.className]); + if (modifier instanceof Modifier.PokemonHeldItemModifier) { continue; } const icon = modifier?.getIcon(this.scene, false); diff --git a/src/ui/settings/abstract-settings-ui-handler.ts b/src/ui/settings/abstract-settings-ui-handler.ts index f21f2ebcc9d..570377eab43 100644 --- a/src/ui/settings/abstract-settings-ui-handler.ts +++ b/src/ui/settings/abstract-settings-ui-handler.ts @@ -5,7 +5,7 @@ import { Mode } from "../ui"; import UiHandler from "../ui-handler"; import { addWindow } from "../ui-theme"; import {Button} from "#enums/buttons"; -import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler"; import NavigationMenu, {NavigationManager} from "#app/ui/settings/navigationMenu"; import { Setting, SettingKeys, SettingType } from "#app/system/settings/settings"; import i18next from "i18next"; diff --git a/src/ui/settings/move-touch-controls-handler.ts b/src/ui/settings/move-touch-controls-handler.ts index cf56bf47d3b..cff68fa523d 100644 --- a/src/ui/settings/move-touch-controls-handler.ts +++ b/src/ui/settings/move-touch-controls-handler.ts @@ -1,5 +1,5 @@ -import TouchControl from "#app/touch-controls.js"; -import UI from "#app/ui/ui.js"; +import TouchControl from "#app/touch-controls"; +import UI from "#app/ui/ui"; import { Scene } from "phaser"; export const TOUCH_CONTROL_POSITIONS_LANDSCAPE = "touchControlPositionsLandscape"; diff --git a/src/ui/settings/navigationMenu.ts b/src/ui/settings/navigationMenu.ts index 370b6f67c76..7d7761b7b69 100644 --- a/src/ui/settings/navigationMenu.ts +++ b/src/ui/settings/navigationMenu.ts @@ -1,6 +1,6 @@ import BattleScene from "#app/battle-scene"; import {Mode} from "#app/ui/ui"; -import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler"; import {addTextObject, setTextStyle, TextStyle} from "#app/ui/text"; import {addWindow} from "#app/ui/ui-theme"; import {Button} from "#enums/buttons"; diff --git a/src/ui/settings/settings-audio-ui-handler.ts b/src/ui/settings/settings-audio-ui-handler.ts index 4a895fc3170..86c6a9bce40 100644 --- a/src/ui/settings/settings-audio-ui-handler.ts +++ b/src/ui/settings/settings-audio-ui-handler.ts @@ -1,6 +1,6 @@ import BattleScene from "../../battle-scene"; import { Mode } from "../ui"; -"#app/inputs-controller.js"; +"#app/inputs-controller"; import AbstractSettingsUiHandler from "./abstract-settings-ui-handler"; import { SettingType } from "#app/system/settings/settings"; diff --git a/src/ui/settings/settings-display-ui-handler.ts b/src/ui/settings/settings-display-ui-handler.ts index 25dda6e9bfb..3d602c50a78 100644 --- a/src/ui/settings/settings-display-ui-handler.ts +++ b/src/ui/settings/settings-display-ui-handler.ts @@ -1,6 +1,6 @@ import BattleScene from "../../battle-scene"; import { Mode } from "../ui"; -"#app/inputs-controller.js"; +"#app/inputs-controller"; import AbstractSettingsUiHandler from "./abstract-settings-ui-handler"; import { SettingKeys, SettingType } from "#app/system/settings/settings"; diff --git a/src/ui/settings/settings-gamepad-ui-handler.ts b/src/ui/settings/settings-gamepad-ui-handler.ts index 902d7eff34e..63a9d2ab23b 100644 --- a/src/ui/settings/settings-gamepad-ui-handler.ts +++ b/src/ui/settings/settings-gamepad-ui-handler.ts @@ -12,7 +12,7 @@ import pad_xbox360 from "#app/configs/inputs/pad_xbox360"; import pad_dualshock from "#app/configs/inputs/pad_dualshock"; import pad_unlicensedSNES from "#app/configs/inputs/pad_unlicensedSNES"; import {InterfaceConfig} from "#app/inputs-controller"; -import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler"; import {Device} from "#enums/devices"; import {truncateString} from "#app/utils"; import i18next from "i18next"; diff --git a/src/ui/settings/settings-keyboard-ui-handler.ts b/src/ui/settings/settings-keyboard-ui-handler.ts index dc6de8c90dc..7e020034bc6 100644 --- a/src/ui/settings/settings-keyboard-ui-handler.ts +++ b/src/ui/settings/settings-keyboard-ui-handler.ts @@ -9,7 +9,7 @@ import { settingKeyboardOptions } from "#app/system/settings/settings-keyboard"; import {reverseValueToKeySetting, truncateString} from "#app/utils"; -import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler"; import {InterfaceConfig} from "#app/inputs-controller"; import {addTextObject, TextStyle} from "#app/ui/text"; import {deleteBind} from "#app/configs/inputs/configHandler"; diff --git a/src/ui/time-of-day-widget.ts b/src/ui/time-of-day-widget.ts index 5d2f184e679..ea80a6e524a 100644 --- a/src/ui/time-of-day-widget.ts +++ b/src/ui/time-of-day-widget.ts @@ -1,5 +1,5 @@ import * as Utils from "../utils"; -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { BattleSceneEventType } from "../events/battle-scene"; import { EaseType } from "#enums/ease-type"; import { TimeOfDay } from "#enums/time-of-day"; diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index 3c25ed34d61..67a4f7260e6 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -5,7 +5,7 @@ import * as Utils from "../utils"; import { TextStyle, addTextObject, getTextStyleOptions } from "./text"; import { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages"; import i18next from "i18next"; -import { TimedEventDisplay } from "#app/timed-event-manager.js"; +import { TimedEventDisplay } from "#app/timed-event-manager"; export default class TitleUiHandler extends OptionSelectUiHandler { private titleContainer: Phaser.GameObjects.Container; diff --git a/vite.config.ts b/vite.config.ts index 8fa7d799f27..1fd85e2572f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,6 +10,7 @@ export const defaultConfig: UserConfig = { clearScreen: false, appType: "mpa", build: { + chunkSizeWarningLimit: 10000, minify: 'esbuild', sourcemap: false, rollupOptions: { From df250c8b90c7ca0ebc23906689409243f4484b90 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Sun, 8 Sep 2024 13:57:17 +0200 Subject: [PATCH 61/91] [Localization] New translations batch locales (Move-disabling effects, abilities triggers, error messages and some misc ajustements) (#4068) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update battle.json * Update battler-tags.json * Update battle.json * Update battle.json * Update battler-tags.json * Update battle.json * Update battler-tags.json * Update battler-tags.json * Update battle.json * Update battle.json * Update battler-tags.json * Update battler-tags.json * Update battle.json * Update battle.json * Update battler-tags.json * Update battler-tags.json * Update battle.json * Update battle.json * Update battler-tags.json * Update battle.json * Update battle.json * Update battle.json * Update battler-tags.json * Update battle.json * Update battle.json * Update src/locales/de/battle.json Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/battler-tags.json Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update battler-tags.json * Update src/locales/ko/battle.json Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> * Update src/locales/ko/battler-tags.json Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> * Update src/locales/it/battle.json Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> * Update src/locales/it/battler-tags.json Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> * Update menu.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update menu.json * Update menu.json * Update menu.json * Update menu.json * Update menu.json * Update menu.json * Update menu.json * Update menu.json * Update src/locales/de/ability-trigger.json Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/ability-trigger.json Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/menu.json Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/ko/ability-trigger.json Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> * Update src/locales/ko/menu.json Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> * Update src/locales/ko/ability-trigger.json Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> * Update src/locales/ko/menu.json Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> * Update menu.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update ability-trigger.json * Update menu.json * Update ability-trigger.json * Update battle.json * Update battler-tags.json * Update src/locales/zh_CN/battle.json Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_TW/battle.json Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update menu.json * Update battler-tags.json * Update battle.json * Update ability-trigger.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update modifier-type.json * Update menu.json * Update battle.json * Update tutorial.json * Update tutorial.json * Update egg.json * Update battle.json * Update battle.json * Update tutorial.json * Update egg.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update modifier-type.json * Update challenges.json * Update src/locales/ko/modifier-type.json Co-authored-by: Enoch * Update src/locales/ko/modifier-type.json Co-authored-by: Enoch * Update src/locales/ja/battle.json Co-authored-by: Chapybara-jp * Update src/locales/ja/menu.json Co-authored-by: Chapybara-jp * Update src/locales/ja/modifier-type.json Co-authored-by: Chapybara-jp * Update src/locales/ja/modifier-type.json Co-authored-by: Chapybara-jp * Update src/locales/ja/modifier-type.json Co-authored-by: Chapybara-jp * Update dialogue.json * Update dialogue-misc.json * Update dialogue-final-boss.json * Update dialogue-double-battle.json * Update ability-trigger.json * Update achv.json * Update arena-tag.json * Update battle.json * Update battler-tags.json * Update command-ui-handler.json * Update menu.json * Update modifier-type.json * Update modifier.json * Update move-trigger.json * Update pokemon-info-container.json * Update pokemon-info.json * Update splash-messages.json * Update status-effect.json * Update tutorial.json * Update voucher.json * Update weather.json * Update ability-trigger.json * Update src/locales/de/modifier-type.json Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/modifier-type.json Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update modifier-type.json * Update bgm-name.json * Update bgm-name.json * Update src/locales/it/menu.json Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> * types_ja.png update * Apply suggestions from code review Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Enoch Co-authored-by: Chapybara-jp --- public/images/types_ja.png | Bin 9300 -> 7057 bytes src/locales/de/ability-trigger.json | 4 +- src/locales/de/battle.json | 3 +- src/locales/de/battler-tags.json | 6 +- src/locales/de/menu.json | 6 +- src/locales/de/modifier-type.json | 8 +- src/locales/en/ability-trigger.json | 4 +- src/locales/en/challenges.json | 4 +- src/locales/es/ability-trigger.json | 2 + src/locales/es/battle.json | 3 +- src/locales/es/battler-tags.json | 4 +- src/locales/es/menu.json | 4 +- src/locales/es/modifier-type.json | 8 +- src/locales/fr/ability-trigger.json | 18 +-- src/locales/fr/achv.json | 4 +- src/locales/fr/arena-tag.json | 2 +- src/locales/fr/battle.json | 117 +++++++++--------- src/locales/fr/battler-tags.json | 32 ++--- src/locales/fr/command-ui-handler.json | 4 +- src/locales/fr/dialogue-double-battle.json | 42 +++---- src/locales/fr/dialogue-final-boss.json | 6 +- src/locales/fr/dialogue-misc.json | 6 +- src/locales/fr/dialogue.json | 132 ++++++++++----------- src/locales/fr/egg.json | 4 +- src/locales/fr/menu.json | 26 ++-- src/locales/fr/modifier-type.json | 24 ++-- src/locales/fr/modifier.json | 2 +- src/locales/fr/move-trigger.json | 16 +-- src/locales/fr/pokemon-info-container.json | 8 +- src/locales/fr/pokemon-info.json | 4 +- src/locales/fr/splash-messages.json | 66 +++++------ src/locales/fr/status-effect.json | 4 +- src/locales/fr/tutorial.json | 18 +-- src/locales/fr/voucher.json | 10 +- src/locales/fr/weather.json | 54 ++++----- src/locales/it/ability-trigger.json | 4 +- src/locales/it/battle.json | 3 +- src/locales/it/battler-tags.json | 6 +- src/locales/it/menu.json | 6 +- src/locales/it/modifier-type.json | 8 +- src/locales/ja/ability-trigger.json | 4 +- src/locales/ja/battle.json | 3 +- src/locales/ja/battler-tags.json | 4 +- src/locales/ja/menu.json | 4 +- src/locales/ja/modifier-type.json | 8 +- src/locales/ko/ability-trigger.json | 4 +- src/locales/ko/battle.json | 3 +- src/locales/ko/battler-tags.json | 6 +- src/locales/ko/menu.json | 4 +- src/locales/ko/modifier-type.json | 8 +- src/locales/pt_BR/battle.json | 2 +- src/locales/pt_BR/battler-tags.json | 2 +- src/locales/pt_BR/modifier-type.json | 8 +- src/locales/zh_CN/ability-trigger.json | 4 +- src/locales/zh_CN/battle.json | 3 +- src/locales/zh_CN/battler-tags.json | 6 +- src/locales/zh_CN/menu.json | 6 +- src/locales/zh_CN/modifier-type.json | 8 +- src/locales/zh_TW/ability-trigger.json | 4 +- src/locales/zh_TW/battle.json | 3 +- src/locales/zh_TW/battler-tags.json | 6 +- src/locales/zh_TW/menu.json | 6 +- src/locales/zh_TW/modifier-type.json | 8 +- 63 files changed, 444 insertions(+), 352 deletions(-) diff --git a/public/images/types_ja.png b/public/images/types_ja.png index e60d8e071aa42c3ae09c7ae30937704d465606a0..a6f3b00607f6eaa8c3a4f88cf54bc4f14fbd6710 100644 GIT binary patch delta 4764 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 YXO}q%hF2Z^R{rltSIYofpke9vKl Date: Sun, 8 Sep 2024 20:48:09 -0700 Subject: [PATCH 62/91] [Bug] Fix incorrect defensive properties on Terastallized Pokemon (#4070) * Fix incorrect defensive properties on Terastallized Pokemon * Add tests to `effectiveness.test.ts` * Suppress errors from Tera achievement validation --- src/field/pokemon.ts | 5 +++- src/test/moves/effectiveness.test.ts | 39 +++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 863b0f41d2c..6d29e30254a 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1049,6 +1049,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const teraType = this.getTeraType(); if (teraType !== Type.UNKNOWN) { types.push(teraType); + if (forDefend) { + return types; + } } } @@ -1368,7 +1371,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { : 1); applyMoveAttrs(VariableMoveTypeMultiplierAttr, source, this, move, typeMultiplier); - if (this.getTypes().find(t => move.isTypeImmune(source, this, t))) { + if (this.getTypes(true, true).find(t => move.isTypeImmune(source, this, t))) { typeMultiplier.value = 0; } diff --git a/src/test/moves/effectiveness.test.ts b/src/test/moves/effectiveness.test.ts index af44586b69d..d1903c79844 100644 --- a/src/test/moves/effectiveness.test.ts +++ b/src/test/moves/effectiveness.test.ts @@ -1,23 +1,32 @@ import { allMoves } from "#app/data/move"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import { TrainerSlot } from "#app/data/trainer-config"; +import { Type } from "#app/data/type"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import * as Messages from "#app/messages"; +import { TerastallizeModifier } from "#app/modifier/modifier"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; function testMoveEffectiveness(game: GameManager, move: Moves, targetSpecies: Species, - expected: number, targetAbility: Abilities = Abilities.BALL_FETCH): void { + expected: number, targetAbility: Abilities = Abilities.BALL_FETCH, teraType?: Type): void { // Suppress getPokemonNameWithAffix because it calls on a null battle spec vi.spyOn(Messages, "getPokemonNameWithAffix").mockReturnValue(""); game.override.enemyAbility(targetAbility); + + if (teraType !== undefined) { + game.override.enemyHeldItems([{ name:"TERA_SHARD", type: teraType }]); + } + const user = game.scene.addPlayerPokemon(getPokemonSpecies(Species.SNORLAX), 5); const target = game.scene.addEnemyPokemon(getPokemonSpecies(targetSpecies), 5, TrainerSlot.NONE); expect(target.getMoveEffectiveness(user, allMoves[move])).toBe(expected); + user.destroy(); + target.destroy(); } describe("Moves - Type Effectiveness", () => { @@ -29,6 +38,8 @@ describe("Moves - Type Effectiveness", () => { type: Phaser.HEADLESS, }); game = new GameManager(phaserGame); + TerastallizeModifier.prototype.apply = (args) => true; + game.override.ability(Abilities.BALL_FETCH); }); @@ -67,4 +78,30 @@ describe("Moves - Type Effectiveness", () => { it("Electric-type attacks are negated by Volt Absorb", () => testMoveEffectiveness(game, Moves.THUNDERBOLT, Species.GYARADOS, 0, Abilities.VOLT_ABSORB) ); + + it("Electric-type attacks are super-effective against Tera-Water Pokemon", + () => testMoveEffectiveness(game, Moves.THUNDERBOLT, Species.EXCADRILL, 2, Abilities.BALL_FETCH, Type.WATER) + ); + + it("Powder moves have no effect on Grass-type Pokemon", + () => testMoveEffectiveness(game, Moves.SLEEP_POWDER, Species.AMOONGUSS, 0) + ); + + it("Powder moves have no effect on Tera-Grass Pokemon", + () => testMoveEffectiveness(game, Moves.SLEEP_POWDER, Species.SNORLAX, 0, Abilities.BALL_FETCH, Type.GRASS) + ); + + it("Prankster-boosted status moves have no effect on Dark-type Pokemon", + () => { + game.override.ability(Abilities.PRANKSTER); + testMoveEffectiveness(game, Moves.BABY_DOLL_EYES, Species.MIGHTYENA, 0); + } + ); + + it("Prankster-boosted status moves have no effect on Tera-Dark Pokemon", + () => { + game.override.ability(Abilities.PRANKSTER); + testMoveEffectiveness(game, Moves.BABY_DOLL_EYES, Species.SNORLAX, 0, Abilities.BALL_FETCH, Type.DARK); + } + ); }); From 06f98f6737ba959f2894c1dc48fbdac7e3ecf5ed Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:50:47 +0800 Subject: [PATCH 63/91] [Bug] Fix console error from undefined stockpilingTag (#4118) --- src/data/move.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 19014c0eb30..e6e7f574671 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -3472,7 +3472,7 @@ export class SpitUpPowerAttr extends VariablePowerAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const stockpilingTag = user.getTag(StockpilingTag); - if (stockpilingTag !== null && stockpilingTag.stockpiledCount > 0) { + if (stockpilingTag && stockpilingTag.stockpiledCount > 0) { const power = args[0] as Utils.IntegerHolder; power.value = this.multiplier * stockpilingTag.stockpiledCount; return true; @@ -3490,7 +3490,7 @@ export class SwallowHealAttr extends HealAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const stockpilingTag = user.getTag(StockpilingTag); - if (stockpilingTag !== null && stockpilingTag?.stockpiledCount > 0) { + if (stockpilingTag && stockpilingTag.stockpiledCount > 0) { const stockpiled = stockpilingTag.stockpiledCount; let healRatio: number; From 39b6a725175aa41b250719945dbf709768813daa Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Sun, 8 Sep 2024 22:10:47 -0700 Subject: [PATCH 64/91] [Bug] Fix #762: All Pokemon become invisible when capturing then switching with your only pokemon that was not fainted (#4025) * fix #762 by using slotIndex to add to party for now the new pokemon was ALWAYS just pushed to the party array. Now it's put into the slot that was also previously selected as the mon to release * add docs for `Pokemon.addToParty()` * add simple tests for addToParty * update `isBetween` docs. Remove `.js` imports --- src/constants.ts | 1 + src/field/pokemon.ts | 19 +++++++++++++--- src/phases/attempt-capture-phase.ts | 6 ++--- src/test/field/pokemon.test.ts | 35 +++++++++++++++++++++++++++++ src/utils.ts | 11 +++++++++ 5 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 src/constants.ts diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 00000000000..a2f7e47b996 --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const PLAYER_PARTY_MAX_SIZE = 6; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 6d29e30254a..e2f238e29af 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -58,6 +58,7 @@ import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase"; import { Challenges } from "#enums/challenges"; +import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; export enum FieldPosition { CENTER, @@ -4465,17 +4466,29 @@ export class EnemyPokemon extends Pokemon { return BattlerIndex.ENEMY + this.getFieldIndex(); } - addToParty(pokeballType: PokeballType) { + /** + * Add a new pokemon to the player's party (at `slotIndex` if set). + * @param pokeballType the type of pokeball the pokemon was caught with + * @param slotIndex an optional index to place the pokemon in the party + * @returns the pokemon that was added or null if the pokemon could not be added + */ + addToParty(pokeballType: PokeballType, slotIndex: number = -1) { const party = this.scene.getParty(); let ret: PlayerPokemon | null = null; - if (party.length < 6) { + if (party.length < PLAYER_PARTY_MAX_SIZE) { this.pokeball = pokeballType; this.metLevel = this.level; this.metBiome = this.scene.arena.biomeType; this.metSpecies = this.species.speciesId; const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.variant, this.ivs, this.nature, this); - party.push(newPokemon); + + if (Utils.isBetween(slotIndex, 0, PLAYER_PARTY_MAX_SIZE - 1)) { + party.splice(slotIndex, 0, newPokemon); + } else { + party.push(newPokemon); + } + ret = newPokemon; this.scene.triggerPokemonFormChange(newPokemon, SpeciesFormChangeActiveTrigger, true); } diff --git a/src/phases/attempt-capture-phase.ts b/src/phases/attempt-capture-phase.ts index 55a82affaf6..cf9ce997bfd 100644 --- a/src/phases/attempt-capture-phase.ts +++ b/src/phases/attempt-capture-phase.ts @@ -221,8 +221,8 @@ export class AttemptCapturePhase extends PokemonPhase { this.scene.clearEnemyHeldItemModifiers(); this.scene.field.remove(pokemon, true); }; - const addToParty = () => { - const newPokemon = pokemon.addToParty(this.pokeballType); + const addToParty = (slotIndex?: number) => { + const newPokemon = pokemon.addToParty(this.pokeballType, slotIndex); const modifiers = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier, false); if (this.scene.getParty().filter(p => p.isShiny()).length === 6) { this.scene.validateAchv(achvs.SHINY_PARTY); @@ -253,7 +253,7 @@ export class AttemptCapturePhase extends PokemonPhase { this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => { this.scene.ui.setMode(Mode.MESSAGE).then(() => { if (slotIndex < 6) { - addToParty(); + addToParty(slotIndex); } else { promptRelease(); } diff --git a/src/test/field/pokemon.test.ts b/src/test/field/pokemon.test.ts index d597cd5219c..f7c1cf8bc3d 100644 --- a/src/test/field/pokemon.test.ts +++ b/src/test/field/pokemon.test.ts @@ -1,6 +1,8 @@ import { Species } from "#app/enums/species"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import GameManager from "../utils/gameManager"; +import { PokeballType } from "#app/enums/pokeball"; +import BattleScene from "#app/battle-scene"; describe("Spec - Pokemon", () => { let phaserGame: Phaser.Game; @@ -28,4 +30,37 @@ describe("Spec - Pokemon", () => { expect(pkm.trySetStatus(undefined)).toBe(true); }); + + describe("Add To Party", () => { + let scene: BattleScene; + + beforeEach(async () => { + game.override.enemySpecies(Species.ZUBAT); + await game.classicMode.runToSummon([Species.ABRA, Species.ABRA, Species.ABRA, Species.ABRA, Species.ABRA]); // 5 Abra, only 1 slot left + scene = game.scene; + }); + + it("should append a new pokemon by default", async () => { + const zubat = scene.getEnemyPokemon()!; + zubat.addToParty(PokeballType.LUXURY_BALL); + + const party = scene.getParty(); + expect(party).toHaveLength(6); + party.forEach((pkm, index) =>{ + expect(pkm.species.speciesId).toBe(index === 5 ? Species.ZUBAT : Species.ABRA); + }); + }); + + it("should put a new pokemon into the passed slotIndex", async () => { + const slotIndex = 1; + const zubat = scene.getEnemyPokemon()!; + zubat.addToParty(PokeballType.LUXURY_BALL, slotIndex); + + const party = scene.getParty(); + expect(party).toHaveLength(6); + party.forEach((pkm, index) =>{ + expect(pkm.species.speciesId).toBe(index === slotIndex ? Species.ZUBAT : Species.ABRA); + }); + }); + }); }); diff --git a/src/utils.ts b/src/utils.ts index 592981c7643..7decf9bb4c0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -609,3 +609,14 @@ export function toDmgValue(value: number, minValue: number = 1) { export function getLocalizedSpriteKey(baseKey: string) { return `${baseKey}${verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`; } + +/** + * Check if a number is **inclusive** between two numbers + * @param num the number to check + * @param min the minimum value (included) + * @param max the maximum value (included) + * @returns true if number is **inclusive** between min and max + */ +export function isBetween(num: number, min: number, max: number): boolean { + return num >= min && num <= max; +} From c710f85fd3bb133a814207fecc6bbd0f04d0ce62 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Sun, 8 Sep 2024 23:19:59 -0700 Subject: [PATCH 65/91] Fix `Pokemon.isTrapped` only checking enemy Pokemon for trapping abilities (#4124) --- src/field/pokemon.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index e2f238e29af..a1305b6b1b2 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1324,9 +1324,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } const trappedByAbility = new Utils.BooleanHolder(false); + const opposingField = this.isPlayer() ? this.scene.getEnemyField() : this.scene.getPlayerField(); - this.scene.getEnemyField()!.forEach(enemyPokemon => - applyCheckTrappedAbAttrs(CheckTrappedAbAttr, enemyPokemon, trappedByAbility, this, trappedAbMessages, simulated) + opposingField.forEach(opponent => + applyCheckTrappedAbAttrs(CheckTrappedAbAttr, opponent, trappedByAbility, this, trappedAbMessages, simulated) ); return (trappedByAbility.value || !!this.getTag(TrappedTag)); From f5bf766ff7ed0314e98b6d12e6a238848407e0e1 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:42:53 +0800 Subject: [PATCH 66/91] [Move] Fully implement Tar Shot (#4043) --- src/data/battler-tags.ts | 33 ++++++++ src/data/move.ts | 2 +- src/enums/battler-tag-type.ts | 1 + src/field/pokemon.ts | 10 ++- src/locales/en/battler-tags.json | 3 +- src/test/moves/tar_shot.test.ts | 133 +++++++++++++++++++++++++++++++ 6 files changed, 177 insertions(+), 5 deletions(-) create mode 100644 src/test/moves/tar_shot.test.ts diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index ddb85600c18..c26412c776f 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1984,7 +1984,38 @@ export class ExposedTag extends BattlerTag { } } +/** + * Tag that doubles the type effectiveness of Fire-type moves. + * @extends BattlerTag + */ +export class TarShotTag extends BattlerTag { + constructor() { + super(BattlerTagType.TAR_SHOT, BattlerTagLapseType.CUSTOM, 0); + } + /** + * If the Pokemon is terastallized, the tag cannot be added. + * @param {Pokemon} pokemon the {@linkcode Pokemon} to which the tag is added + * @returns whether the tag is applied + */ + override canAdd(pokemon: Pokemon): boolean { + return !pokemon.isTerastallized(); + } + + override onAdd(pokemon: Pokemon): void { + pokemon.scene.queueMessage(i18next.t("battlerTags:tarShotOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); + } +} + +/** + * Retrieves a {@linkcode BattlerTag} based on the provided tag type, turn count, source move, and source ID. + * + * @param {BattlerTagType} tagType the type of the {@linkcode BattlerTagType}. + * @param turnCount the turn count. + * @param {Moves} sourceMove the source {@linkcode Moves}. + * @param sourceId the source ID. + * @returns {BattlerTag} the corresponding {@linkcode BattlerTag} object. + */ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, sourceMove: Moves, sourceId: number): BattlerTag { switch (tagType) { case BattlerTagType.RECHARGING: @@ -2125,6 +2156,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source case BattlerTagType.GULP_MISSILE_ARROKUDA: case BattlerTagType.GULP_MISSILE_PIKACHU: return new GulpMissileTag(tagType, sourceMove); + case BattlerTagType.TAR_SHOT: + return new TarShotTag(); case BattlerTagType.NONE: default: return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); diff --git a/src/data/move.ts b/src/data/move.ts index e6e7f574671..21b859b22ac 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -8644,7 +8644,7 @@ export function initMoves() { .condition((user, target, move) => user.getTag(TrappedTag)?.sourceMove !== Moves.NO_RETREAT), // fails if the user is currently trapped by No Retreat new StatusMove(Moves.TAR_SHOT, Type.ROCK, 100, 15, -1, 0, 8) .attr(StatStageChangeAttr, [ Stat.SPD ], -1) - .partial(), + .attr(AddBattlerTagAttr, BattlerTagType.TAR_SHOT, false), new StatusMove(Moves.MAGIC_POWDER, Type.PSYCHIC, 100, 20, -1, 0, 8) .attr(ChangeTypeAttr, Type.PSYCHIC) .powderMove(), diff --git a/src/enums/battler-tag-type.ts b/src/enums/battler-tag-type.ts index a2bcf9e4c0e..0878bd00cd5 100644 --- a/src/enums/battler-tag-type.ts +++ b/src/enums/battler-tag-type.ts @@ -73,4 +73,5 @@ export enum BattlerTagType { SHELL_TRAP = "SHELL_TRAP", DRAGON_CHEER = "DRAGON_CHEER", NO_RETREAT = "NO_RETREAT", + TAR_SHOT = "TAR_SHOT", } diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index a1305b6b1b2..01d728d6de0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -17,7 +17,7 @@ import { initMoveAnim, loadMoveAnimAssets } from "../data/battle-anims"; import { Status, StatusEffect, getRandomStatus } from "../data/status-effect"; import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition, FusionSpeciesFormEvolution } from "../data/pokemon-evolutions"; import { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "../data/tms"; -import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, MoveRestrictionBattlerTag, ExposedTag, DragonCheerTag, CritBoostTag, TrappedTag } from "../data/battler-tags"; +import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, MoveRestrictionBattlerTag, ExposedTag, DragonCheerTag, CritBoostTag, TrappedTag, TarShotTag } from "../data/battler-tags"; import { WeatherType } from "../data/weather"; import { ArenaTagSide, NoCritTag, WeakenMoveScreenTag } from "../data/arena-tag"; import { Ability, AbAttr, StatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentStatStagesAbAttr, MoveImmunityAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyStatMultiplierAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr, ConditionalCritAbAttr, applyFieldStatMultiplierAbAttrs, FieldMultiplyStatAbAttr, AddSecondStrikeAbAttr, UserFieldStatusEffectImmunityAbAttr, UserFieldBattlerTagImmunityAbAttr, BattlerTagImmunityAbAttr, MoveTypeChangeAbAttr, FullHpResistTypeAbAttr, applyCheckTrappedAbAttrs, CheckTrappedAbAttr } from "../data/ability"; @@ -1353,7 +1353,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { /** * Calculates the effectiveness of a move against the Pokémon. - * + * This includes modifiers from move and ability attributes. * @param source {@linkcode Pokemon} The attacking Pokémon. * @param move {@linkcode Move} The move being used by the attacking Pokémon. * @param ignoreAbility Whether to ignore abilities that might affect type effectiveness or immunity (defaults to `false`). @@ -1377,6 +1377,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { typeMultiplier.value = 0; } + if (this.getTag(TarShotTag) && (this.getMoveType(move) === Type.FIRE)) { + typeMultiplier.value *= 2; + } + const cancelledHolder = cancelled ?? new Utils.BooleanHolder(false); if (!ignoreAbility) { applyPreDefendAbAttrs(TypeImmunityAbAttr, this, source, move, cancelledHolder, simulated, typeMultiplier); @@ -1408,7 +1412,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } /** - * Calculates the type effectiveness multiplier for an attack type + * Calculates the move's type effectiveness multiplier based on the target's type/s. * @param moveType {@linkcode Type} the type of the move being used * @param source {@linkcode Pokemon} the Pokemon using the move * @param ignoreStrongWinds whether or not this ignores strong winds (anticipation, forewarn, stealth rocks) diff --git a/src/locales/en/battler-tags.json b/src/locales/en/battler-tags.json index 222aee4087c..5c351fc6961 100644 --- a/src/locales/en/battler-tags.json +++ b/src/locales/en/battler-tags.json @@ -69,5 +69,6 @@ "cursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!", "stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!", "disabledOnAdd": "{{pokemonNameWithAffix}}'s {{moveName}}\nwas disabled!", - "disabledLapse": "{{pokemonNameWithAffix}}'s {{moveName}}\nis no longer disabled." + "disabledLapse": "{{pokemonNameWithAffix}}'s {{moveName}}\nis no longer disabled.", + "tarShotOnAdd": "{{pokemonNameWithAffix}} became weaker to fire!" } diff --git a/src/test/moves/tar_shot.test.ts b/src/test/moves/tar_shot.test.ts new file mode 100644 index 00000000000..15667122a37 --- /dev/null +++ b/src/test/moves/tar_shot.test.ts @@ -0,0 +1,133 @@ +import { BattlerIndex } from "#app/battle"; +import { Type } from "#app/data/type"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { Stat } from "#app/enums/stat"; +import { Abilities } from "#enums/abilities"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Moves - Tar Shot", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY) + .enemySpecies(Species.TANGELA) + .enemyLevel(1000) + .moveset([Moves.TAR_SHOT, Moves.FIRE_PUNCH]) + .disableCrits(); + }); + + it("lowers the target's Speed stat by one stage and doubles the effectiveness of Fire-type moves used on the target", async () => { + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(4); + }, TIMEOUT); + + it("will not double the effectiveness of Fire-type moves used on a target that is already under the effect of Tar Shot (but may still lower its Speed)", async () => { + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-2); + + await game.toNextTurn(); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(4); + }, TIMEOUT); + + it("does not double the effectiveness of Fire-type moves against a Pokémon that is Terastallized", async () => { + game.override.enemyHeldItems([{ name: "TERA_SHARD", type: Type.GRASS }]).enemySpecies(Species.SPRIGATITO); + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(2); + }, TIMEOUT); + + it("doubles the effectiveness of Fire-type moves against a Pokémon that is already under the effects of Tar Shot before it Terastallized", async () => { + game.override.enemySpecies(Species.SPRIGATITO); + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.override.enemyHeldItems([{ name: "TERA_SHARD", type: Type.GRASS }]); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(4); + }, TIMEOUT); +}); From 26eb63cf67ce77fa62072033397d3f22dcf6e42b Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:11:46 -0700 Subject: [PATCH 67/91] [Refactor] Cleaning up Learn move phase (#3672) * Learn Move Phase rewrite * Typedocs * messages with confirm do not need an extra button press no more * Added Documentation * This does not work * so sad * Some updates * Eslint issues + clean up * Additions to handle learning during evolution + test fixes * some more checks * Update src/overrides.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/phases/learn-move-phase.test.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Added new function and updated tests * Fixed bracketing and added parameter types * Added Sketch to the conditional * Added some fixes. Weird stuff going on. * Whoops * async implementation done * Update src/phases/learn-move-phase.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Made showText=> summary a promise * adapt learn-move-phase to `async-await` * await add --------- Co-authored-by: frutescens Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/phases/learn-move-phase.ts | 198 +++++++++++++--------- src/test/phases/learn-move-phase.test.ts | 47 +++++ src/test/utils/helpers/overridesHelper.ts | 11 ++ src/test/utils/phaseInterceptor.ts | 2 + src/ui/ui.ts | 6 + 5 files changed, 186 insertions(+), 78 deletions(-) create mode 100644 src/test/phases/learn-move-phase.test.ts diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index 049fc6951b6..fad7eac9b68 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -1,6 +1,6 @@ import BattleScene from "#app/battle-scene"; import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; -import { allMoves } from "#app/data/move"; +import Move, { allMoves } from "#app/data/move"; import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms"; import { Moves } from "#app/enums/moves"; import { getPokemonNameWithAffix } from "#app/messages"; @@ -9,14 +9,15 @@ import { SummaryUiMode } from "#app/ui/summary-ui-handler"; import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; +import Pokemon from "#app/field/pokemon"; export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { private moveId: Moves; + private messageMode: Mode; private fromTM: boolean; constructor(scene: BattleScene, partyMemberIndex: integer, moveId: Moves, fromTM?: boolean) { super(scene, partyMemberIndex); - this.moveId = moveId; this.fromTM = fromTM ?? false; } @@ -26,87 +27,128 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { const pokemon = this.getPokemon(); const move = allMoves[this.moveId]; + const currentMoveset = pokemon.getMoveset(); - const existingMoveIndex = pokemon.getMoveset().findIndex(m => m?.moveId === move.id); - - if (existingMoveIndex > -1) { + // The game first checks if the Pokemon already has the move and ends the phase if it does. + const hasMoveAlready = currentMoveset.some(m => m?.moveId === move.id) && this.moveId !== Moves.SKETCH; + if (hasMoveAlready) { return this.end(); } - const emptyMoveIndex = pokemon.getMoveset().length < 4 - ? pokemon.getMoveset().length - : pokemon.getMoveset().findIndex(m => m === null); - - const messageMode = this.scene.ui.getHandler() instanceof EvolutionSceneHandler - ? Mode.EVOLUTION_SCENE - : Mode.MESSAGE; - - if (emptyMoveIndex > -1) { - pokemon.setMove(emptyMoveIndex, this.moveId); - if (this.fromTM) { - pokemon.usedTMs.push(this.moveId); - } - initMoveAnim(this.scene, this.moveId).then(() => { - loadMoveAnimAssets(this.scene, [this.moveId], true) - .then(() => { - this.scene.ui.setMode(messageMode).then(() => { - // Sound loaded into game as is - this.scene.playSound("level_up_fanfare"); - this.scene.ui.showText(i18next.t("battle:learnMove", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), null, () => { - this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeMoveLearnedTrigger, true); - this.end(); - }, messageMode === Mode.EVOLUTION_SCENE ? 1000 : null, true); - }); - }); - }); + this.messageMode = this.scene.ui.getHandler() instanceof EvolutionSceneHandler ? Mode.EVOLUTION_SCENE : Mode.MESSAGE; + this.scene.ui.setMode(this.messageMode); + // If the Pokemon has less than 4 moves, the new move is added to the largest empty moveset index + // If it has 4 moves, the phase then checks if the player wants to replace the move itself. + if (currentMoveset.length < 4) { + this.learnMove(currentMoveset.length, move, pokemon); } else { - this.scene.ui.setMode(messageMode).then(() => { - this.scene.ui.showText(i18next.t("battle:learnMovePrompt", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), null, () => { - this.scene.ui.showText(i18next.t("battle:learnMoveLimitReached", { pokemonName: getPokemonNameWithAffix(pokemon) }), null, () => { - this.scene.ui.showText(i18next.t("battle:learnMoveReplaceQuestion", { moveName: move.name }), null, () => { - const noHandler = () => { - this.scene.ui.setMode(messageMode).then(() => { - this.scene.ui.showText(i18next.t("battle:learnMoveStopTeaching", { moveName: move.name }), null, () => { - this.scene.ui.setModeWithoutClear(Mode.CONFIRM, () => { - this.scene.ui.setMode(messageMode); - this.scene.ui.showText(i18next.t("battle:learnMoveNotLearned", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), null, () => this.end(), null, true); - }, () => { - this.scene.ui.setMode(messageMode); - this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, this.moveId)); - this.end(); - }); - }); - }); - }; - this.scene.ui.setModeWithoutClear(Mode.CONFIRM, () => { - this.scene.ui.setMode(messageMode); - this.scene.ui.showText(i18next.t("battle:learnMoveForgetQuestion"), null, () => { - this.scene.ui.setModeWithoutClear(Mode.SUMMARY, this.getPokemon(), SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => { - if (moveIndex === 4) { - noHandler(); - return; - } - this.scene.ui.setMode(messageMode).then(() => { - this.scene.ui.showText(i18next.t("battle:countdownPoof"), null, () => { - this.scene.ui.showText(i18next.t("battle:learnMoveForgetSuccess", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: pokemon.moveset[moveIndex]!.getName() }), null, () => { // TODO: is the bang correct? - this.scene.ui.showText(i18next.t("battle:learnMoveAnd"), null, () => { - if (this.fromTM) { - pokemon.usedTMs.push(this.moveId); - } - pokemon.setMove(moveIndex, Moves.NONE); - this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, this.moveId)); - this.end(); - }, null, true); - }, null, true); - }, null, true); - }); - }); - }, null, true); - }, noHandler); - }); - }, null, true); - }, null, true); - }); + this.replaceMoveCheck(move, pokemon); } } + + /** + * This displays a chain of messages (listed below) and asks if the user wishes to forget a move. + * + * > [Pokemon] wants to learn the move [MoveName] + * > However, [Pokemon] already knows four moves. + * > Should a move be forgotten and replaced with [MoveName]? --> `Mode.CONFIRM` -> Yes: Go to `this.forgetMoveProcess()`, No: Go to `this.rejectMoveAndEnd()` + * @param move The Move to be learned + * @param Pokemon The Pokemon learning the move + */ + async replaceMoveCheck(move: Move, pokemon: Pokemon) { + const learnMovePrompt = i18next.t("battle:learnMovePrompt", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }); + const moveLimitReached = i18next.t("battle:learnMoveLimitReached", { pokemonName: getPokemonNameWithAffix(pokemon) }); + const shouldReplaceQ = i18next.t("battle:learnMoveReplaceQuestion", { moveName: move.name }); + const preQText = [learnMovePrompt, moveLimitReached].join("$"); + await this.scene.ui.showTextPromise(preQText); + await this.scene.ui.showTextPromise(shouldReplaceQ, undefined, false); + await this.scene.ui.setModeWithoutClear(Mode.CONFIRM, + () => this.forgetMoveProcess(move, pokemon), // Yes + () => { // No + this.scene.ui.setMode(this.messageMode); + this.rejectMoveAndEnd(move, pokemon); + } + ); + } + + /** + * This facilitates the process in which an old move is chosen to be forgotten. + * + * > Which move should be forgotten? + * + * The game then goes `Mode.SUMMARY` to select a move to be forgotten. + * If a player does not select a move or chooses the new move (`moveIndex === 4`), the game goes to `this.rejectMoveAndEnd()`. + * If an old move is selected, the function then passes the `moveIndex` to `this.learnMove()` + * @param move The Move to be learned + * @param Pokemon The Pokemon learning the move + */ + async forgetMoveProcess(move: Move, pokemon: Pokemon) { + this.scene.ui.setMode(this.messageMode); + await this.scene.ui.showTextPromise(i18next.t("battle:learnMoveForgetQuestion"), undefined, true); + await this.scene.ui.setModeWithoutClear(Mode.SUMMARY, pokemon, SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => { + if (moveIndex === 4) { + this.scene.ui.setMode(this.messageMode).then(() => this.rejectMoveAndEnd(move, pokemon)); + return; + } + const forgetSuccessText = i18next.t("battle:learnMoveForgetSuccess", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: pokemon.moveset[moveIndex]!.getName() }); + const fullText = [i18next.t("battle:countdownPoof"), forgetSuccessText, i18next.t("battle:learnMoveAnd")].join("$"); + this.scene.ui.setMode(this.messageMode).then(() => this.learnMove(moveIndex, move, pokemon, fullText)); + }); + } + + /** + * This asks the player if they wish to end the current move learning process. + * + * > Stop trying to teach [MoveName]? --> `Mode.CONFIRM` --> Yes: > [Pokemon] did not learn the move [MoveName], No: `this.replaceMoveCheck()` + * + * If the player wishes to not teach the Pokemon the move, it displays a message and ends the phase. + * If the player reconsiders, it repeats the process for a Pokemon with a full moveset once again. + * @param move The Move to be learned + * @param Pokemon The Pokemon learning the move + */ + async rejectMoveAndEnd(move: Move, pokemon: Pokemon) { + await this.scene.ui.showTextPromise(i18next.t("battle:learnMoveStopTeaching", { moveName: move.name }), undefined, false); + this.scene.ui.setModeWithoutClear(Mode.CONFIRM, + () => { + this.scene.ui.setMode(this.messageMode); + this.scene.ui.showTextPromise(i18next.t("battle:learnMoveNotLearned", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), undefined, true).then(() => this.end()); + }, + () => { + this.scene.ui.setMode(this.messageMode); + this.replaceMoveCheck(move, pokemon); + } + ); + } + + /** + * This teaches the Pokemon the new move and ends the phase. + * When a Pokemon forgets a move and learns a new one, its 'Learn Move' message is significantly longer. + * + * Pokemon with a `moveset.length < 4` + * > [Pokemon] learned [MoveName] + * + * Pokemon with a `moveset.length > 4` + * > 1... 2... and 3... and Poof! + * > [Pokemon] forgot how to use [MoveName] + * > And... + * > [Pokemon] learned [MoveName]! + * @param move The Move to be learned + * @param Pokemon The Pokemon learning the move + */ + async learnMove(index: number, move: Move, pokemon: Pokemon, textMessage?: string) { + if (this.fromTM) { + pokemon.usedTMs.push(this.moveId); + } + pokemon.setMove(index, this.moveId); + initMoveAnim(this.scene, this.moveId).then(() => { + loadMoveAnimAssets(this.scene, [this.moveId], true); + this.scene.playSound("level_up_fanfare"); // Sound loaded into game as is + }); + this.scene.ui.setMode(this.messageMode); + const learnMoveText = i18next.t("battle:learnMove", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }); + textMessage = textMessage ? textMessage+"$"+learnMoveText : learnMoveText; + await this.scene.ui.showTextPromise(textMessage, this.messageMode === Mode.EVOLUTION_SCENE ? 1000 : undefined, true); + this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeMoveLearnedTrigger, true); + this.end(); + } } diff --git a/src/test/phases/learn-move-phase.test.ts b/src/test/phases/learn-move-phase.test.ts new file mode 100644 index 00000000000..60cdbee8570 --- /dev/null +++ b/src/test/phases/learn-move-phase.test.ts @@ -0,0 +1,47 @@ +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import Phaser from "phaser"; +import GameManager from "#test/utils/gameManager"; +import { Species } from "#enums/species"; +import { Moves } from "#enums/moves"; +import { LearnMovePhase } from "#app/phases/learn-move-phase"; + +describe("Learn Move Phase", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override.xpMultiplier(50); + }); + + it("If Pokemon has less than 4 moves, its newest move will be added to the lowest empty index", async () => { + game.override.moveset([Moves.SPLASH]); + await game.startBattle([Species.BULBASAUR]); + const pokemon = game.scene.getPlayerPokemon()!; + const newMovePos = pokemon?.getMoveset().length; + game.move.select(Moves.SPLASH); + await game.doKillOpponents(); + await game.phaseInterceptor.to(LearnMovePhase); + const levelMove = pokemon.getLevelMoves(5)[0]; + const levelReq = levelMove[0]; + const levelMoveId = levelMove[1]; + expect(pokemon.level).toBeGreaterThanOrEqual(levelReq); + expect(pokemon?.getMoveset()[newMovePos]?.moveId).toBe(levelMoveId); + }); + + /** + * Future Tests: + * If a Pokemon has four moves, the user can specify an old move to be forgotten and a new move will take its place. + * If a Pokemon has four moves, the user can reject the new move, keeping the moveset the same. + */ +}); diff --git a/src/test/utils/helpers/overridesHelper.ts b/src/test/utils/helpers/overridesHelper.ts index a42ef84b496..3eeeecbc5f8 100644 --- a/src/test/utils/helpers/overridesHelper.ts +++ b/src/test/utils/helpers/overridesHelper.ts @@ -48,6 +48,17 @@ export class OverridesHelper extends GameManagerHelper { return this; } + /** + * Override the XP Multiplier + * @param value the XP multiplier to set + * @returns `this` + */ + xpMultiplier(value: number): this { + vi.spyOn(Overrides, "XP_MULTIPLIER_OVERRIDE", "get").mockReturnValue(value); + this.log(`XP Multiplier set to ${value}!`); + return this; + } + /** * Override the player (pokemon) starting held items * @param items the items to hold diff --git a/src/test/utils/phaseInterceptor.ts b/src/test/utils/phaseInterceptor.ts index 2eb5324a2aa..a89d1788be9 100644 --- a/src/test/utils/phaseInterceptor.ts +++ b/src/test/utils/phaseInterceptor.ts @@ -12,6 +12,7 @@ import { EndEvolutionPhase } from "#app/phases/end-evolution-phase"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { EvolutionPhase } from "#app/phases/evolution-phase"; import { FaintPhase } from "#app/phases/faint-phase"; +import { LearnMovePhase } from "#app/phases/learn-move-phase"; import { LevelCapPhase } from "#app/phases/level-cap-phase"; import { LoginPhase } from "#app/phases/login-phase"; import { MessagePhase } from "#app/phases/message-phase"; @@ -89,6 +90,7 @@ export default class PhaseInterceptor { [NextEncounterPhase, this.startPhase], [NewBattlePhase, this.startPhase], [VictoryPhase, this.startPhase], + [LearnMovePhase, this.startPhase], [MoveEndPhase, this.startPhase], [StatStageChangePhase, this.startPhase], [ShinySparklePhase, this.startPhase], diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 6c988b43043..a9bcbbf0cb5 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -289,6 +289,12 @@ export default class UI extends Phaser.GameObjects.Container { return handler.processInput(button); } + showTextPromise(text: string, callbackDelay: number = 0, prompt: boolean = true, promptDelay?: integer | null): Promise { + return new Promise(resolve => { + this.showText(text ?? "", null, () => resolve(), callbackDelay, prompt, promptDelay); + }); + } + showText(text: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null): void { if (prompt && text.indexOf("$") > -1) { const messagePages = text.split(/\$/g).map(m => m.trim()); From e84fe8c24e75bf7d0af92f08ed55dab1df8770f9 Mon Sep 17 00:00:00 2001 From: Chapybara-jp Date: Mon, 9 Sep 2024 18:50:30 +0200 Subject: [PATCH 68/91] [Localisation] [JA] Translated/updated spacing in several files, fixed Ice Face bug (#4129) * Update ability-trigger.json * Update ability.json * Update arena-flyout.json * Update arena-tag.json * Update battle.json * Update fight-ui-handler.json * Update berry.json * Update menu.json * Update party-ui-handler.json * Update starter-select-ui-handler.json * Update tutorial.json * Update move.json * Update battle.json * Update arena-flyout.json * Update arena-flyout.json * Update arena-tag.json * Update party-ui-handler.json * Update settings.json --- src/locales/ja/ability-trigger.json | 4 +- src/locales/ja/ability.json | 620 +++--- src/locales/ja/arena-flyout.json | 3 +- src/locales/ja/arena-tag.json | 10 +- src/locales/ja/battle.json | 5 +- src/locales/ja/berry.json | 22 +- src/locales/ja/fight-ui-handler.json | 2 +- src/locales/ja/menu.json | 6 +- src/locales/ja/move.json | 1872 ++++++++--------- src/locales/ja/party-ui-handler.json | 41 +- src/locales/ja/settings.json | 2 +- src/locales/ja/starter-select-ui-handler.json | 2 +- src/locales/ja/tutorial.json | 18 +- 13 files changed, 1327 insertions(+), 1280 deletions(-) diff --git a/src/locales/ja/ability-trigger.json b/src/locales/ja/ability-trigger.json index 1b30e52c490..26d27701aef 100644 --- a/src/locales/ja/ability-trigger.json +++ b/src/locales/ja/ability-trigger.json @@ -2,11 +2,11 @@ "blockRecoilDamage": "{{pokemonName}}は {{abilityName}}で 反動ダメージを 受けない!", "badDreams": "{{pokemonName}}は ナイトメアに うなされている!", "costar": "{{pokemonName}}は {{allyName}}の\n能力変化を コピーした!", - "iceFaceAvoidedDamage": "{{pokemonName}}は\n{{abilityName}}で ダメージを 受けない!", + "iceFaceAvoidedDamage": "{{pokemonNameWithAffix}}は\n{{abilityName}}で ダメージを 受けない!", "perishBody": "{{pokemonName}}の {{abilityName}}で\nおたがいは 3ターン後に ほろびいてしまう!", "poisonHeal": "{{pokemonName}}は {{abilityName}}で 回復した!", "trace": "{{pokemonName}}は 相手の {{targetName}}の\n{{abilityName}}を トレースした!", - "windPowerCharged": "{{pokemonName}}は\n{{moveName}}を 受けて じゅうでんした!", + "windPowerCharged": "{{pokemonNameWithAffix}}は\n{{moveName}}を 受けて じゅうでんした!", "quickDraw": "{{pokemonName}}は クイックドロウで\n行動が はやくなった!", "disguiseAvoidedDamage": "{{pokemonNameWithAffix}}の\nばけのかわが はがれた!", "blockItemTheft": "{{pokemonNameWithAffix}}の {{abilityName}}で\n道具を うばわれない!", diff --git a/src/locales/ja/ability.json b/src/locales/ja/ability.json index bfbf5d3a3c8..c44eeb06234 100644 --- a/src/locales/ja/ability.json +++ b/src/locales/ja/ability.json @@ -1,1071 +1,1071 @@ { "stench": { "name": "あくしゅう", - "description": "臭い においを 放つことによって 攻撃した ときに 相手を ひるませることが ある。" + "description": "臭い においを 放つことによって 攻撃した ときに 相手を ひるませることが ある。" }, "drizzle": { "name": "あめふらし", - "description": "登場 したときに 天気を 雨に する。" + "description": "登場 したときに 天気を 雨に する。" }, "speedBoost": { "name": "かそく", - "description": "毎ターン 素早さが 上がる。" + "description": "毎ターン 素早さが 上がる。" }, "battleArmor": { "name": "カブトアーマー", - "description": "硬い 甲羅に 守られて 相手の 攻撃が 急所に 当たらない。" + "description": "硬い 甲羅に 守られて 相手の 攻撃が 急所に 当たらない。" }, "sturdy": { "name": "がんじょう", - "description": "相手の 技を 受けても 一撃で 倒されることが ない。 一撃必殺技も 効かない。" + "description": "相手の 技を 受けても 一撃で 倒されることが ない。 一撃必殺技も 効かない。" }, "damp": { "name": "しめりけ", - "description": "あたりを 湿らせることに よって じばく などの 爆発する 技を だれも 使えなくなる。" + "description": "あたりを 湿らせることに よって じばく などの 爆発する 技を だれも 使えなくなる。" }, "limber": { "name": "じゅうなん", - "description": "柔軟な 体によって まひ状態に ならない。" + "description": "柔軟な 体によって まひ状態に ならない。" }, "sandVeil": { "name": "すながくれ", - "description": "砂あらしの とき 回避率が 上がる。" + "description": "砂あらしの とき 回避率が 上がる。" }, "static": { "name": "せいでんき", - "description": "静電気を 体に まとい 触った 相手を まひさせる ことがある。" + "description": "静電気を 体に まとい 触った 相手を まひさせる ことがある。" }, "voltAbsorb": { "name": "ちくでん", - "description": "でんきタイプの 技を 受けると ダメージを 受けずに 回復する。" + "description": "でんきタイプの 技を 受けると ダメージを 受けずに 回復する。" }, "waterAbsorb": { "name": "ちょすい", - "description": "みずタイプの 技を 受けると ダメージを 受けずに 回復する。" + "description": "みずタイプの 技を 受けると ダメージを 受けずに 回復する。" }, "oblivious": { "name": "どんかん", - "description": "鈍感なので メロメロや ちょうはつ状態に ならない。" + "description": "鈍感なので メロメロや ちょうはつ状態に ならない。" }, "cloudNine": { "name": "ノーてんき", - "description": "あらゆる 天気の 影響が なくなって しまう。" + "description": "あらゆる 天気の 影響が なくなって しまう。" }, "compoundEyes": { "name": "ふくがん", - "description": "複眼を 持っているため 技の 命中率が 上がる。" + "description": "複眼を 持っているため 技の 命中率が 上がる。" }, "insomnia": { "name": "ふみん", - "description": "眠れない 体質 なので ねむり状態に ならない。" + "description": "眠れない 体質 なので ねむり状態に ならない。" }, "colorChange": { "name": "へんしょく", - "description": "相手から 受けた 技の タイプに 自分の タイプが 変化 する。" + "description": "相手から 受けた 技の タイプに 自分の タイプが 変化 する。" }, "immunity": { "name": "めんえき", - "description": "体内に 免疫を 持っているため どく状態に ならない。" + "description": "体内に 免疫を 持っているため どく状態に ならない。" }, "flashFire": { "name": "もらいび", - "description": "ほのおタイプの 技を 受けると 炎を もらい 自分が 出す ほのおタイプの 技が 強くなる。" + "description": "ほのおタイプの 技を 受けると 炎を もらい 自分が 出す ほのおタイプの 技が 強くなる。" }, "shieldDust": { "name": "りんぷん", - "description": "りんぷんに 守られて 技の 追加効果を 受けなくなる。" + "description": "りんぷんに 守られて 技の 追加効果を 受けなくなる。" }, "ownTempo": { "name": "マイペース", - "description": "マイペースなので こんらん状態に ならない。" + "description": "マイペースなので こんらん状態に ならない。" }, "suctionCups": { "name": "きゅうばん", - "description": "吸盤で 地面に 張り付き ポケモンを 入れ替えさせる 技や 道具が 効かなくなる。" + "description": "吸盤で 地面に 張り付き ポケモンを 入れ替えさせる 技や 道具が 効かなくなる。" }, "intimidate": { "name": "いかく", - "description": "登場 したとき 威嚇して 相手を 萎縮させ 相手の 攻撃を 下げて しまう。" + "description": "登場 したとき 威嚇して 相手を 萎縮させ 相手の 攻撃を 下げて しまう。" }, "shadowTag": { "name": "かげふみ", - "description": "相手の 影を 踏み 逃げたり 交代 できなくする。" + "description": "相手の 影を 踏み 逃げたり 交代 できなくする。" }, "roughSkin": { "name": "さめはだ", - "description": "攻撃を 受けたとき 自分に 触れた 相手を ざらざらの 肌で キズつける。" + "description": "攻撃を 受けたとき 自分に 触れた 相手を ざらざらの 肌で キズつける。" }, "wonderGuard": { "name": "ふしぎなまもり", - "description": "効果バツグンの 技しか 当たらない 不思議な 力。" + "description": "効果バツグンの 技しか 当たらない 不思議な 力。" }, "levitate": { "name": "ふゆう", - "description": "地面から 浮くことによって じめんタイプの 技を 受けない。" + "description": "地面から 浮くことによって じめんタイプの 技を 受けない。" }, "effectSpore": { "name": "ほうし", - "description": "攻撃で 自分に 触れた 相手を どくや まひや ねむり状態に する ことがある。" + "description": "攻撃で 自分に 触れた 相手を どくや まひや ねむり状態に する ことがある。" }, "synchronize": { "name": "シンクロ", - "description": "自分が なってしまった どくや まひや やけどを 相手に うつす。" + "description": "自分が なってしまった どくや まひや やけどを 相手に うつす。" }, "clearBody": { "name": "クリアボディ", - "description": "相手の 技や 特性で 能力を 下げられない。" + "description": "相手の 技や 特性で 能力を 下げられない。" }, "naturalCure": { "name": "しぜんかいふく", - "description": "手持ちに ひっこむと 状態異常が 治る。" + "description": "手持ちに ひっこむと 状態異常が 治る。" }, "lightningRod": { "name": "ひらいしん", - "description": "でんきタイプの 技を 自分に 寄せつけ ダメージを 受けずに 特攻が 上がる。" + "description": "でんきタイプの 技を 自分に 寄せつけ ダメージを 受けずに 特攻が 上がる。" }, "sereneGrace": { "name": "てんのめぐみ", - "description": "天の恵みの おかげで 技の 追加効果が でやすい。" + "description": "天の恵みの おかげで 技の 追加効果が でやすい。" }, "swiftSwim": { "name": "すいすい", - "description": "天気が 雨のとき 素早さが 上がる。" + "description": "天気が 雨のとき 素早さが 上がる。" }, "chlorophyll": { "name": "ようりょくそ", - "description": "天気が 晴れのとき 素早さが 上がる。" + "description": "天気が 晴れのとき 素早さが 上がる。" }, "illuminate": { "name": "はっこう", - "description": "あたりを 明るくすることで 命中率を 下げられない。" + "description": "あたりを 明るくすることで 命中率を 下げられない。" }, "trace": { "name": "トレース", - "description": "登場 したとき 相手の 特性を トレースして 同じ 特性に なる。" + "description": "登場 したとき 相手の 特性を トレースして 同じ 特性に なる。" }, "hugePower": { "name": "ちからもち", - "description": "物理攻撃の 威力が 2倍になる。" + "description": "物理攻撃の 威力が 2倍になる。" }, "poisonPoint": { "name": "どくのトゲ", - "description": "自分に 触った 相手を どく状態に することがある。" + "description": "自分に 触った 相手を どく状態に することがある。" }, "innerFocus": { "name": "せいしんりょく", - "description": "鍛えられた 精神に よって 相手の 攻撃に ひるまない。" + "description": "鍛えられた 精神に よって 相手の 攻撃に ひるまない。" }, "magmaArmor": { "name": "マグマのよろい", - "description": "熱い マグマを 身にまとい こおり状態に ならない。" + "description": "熱い マグマを 身にまとい こおり状態に ならない。" }, "waterVeil": { "name": "みずのベール", - "description": "水のベールを 身にまとい やけど状態に ならない。" + "description": "水のベールを 身にまとい やけど状態に ならない。" }, "magnetPull": { "name": "じりょく", - "description": "はがねタイプの ポケモンを 磁力で 引きつけて 逃げられなくする。" + "description": "はがねタイプの ポケモンを 磁力で 引きつけて 逃げられなくする。" }, "soundproof": { "name": "ぼうおん", - "description": "音を 遮断 することに よって 音の 攻撃を 受けない。" + "description": "音を 遮断 することに よって 音の 攻撃を 受けない。" }, "rainDish": { "name": "あめうけざら", - "description": "天気が 雨のとき 少しずつ HPを 回復する。" + "description": "天気が 雨のとき 少しずつ HPを 回復する。" }, "sandStream": { "name": "すなおこし", - "description": "登場 したとき 天気を 砂あらしにする。" + "description": "登場 したとき 天気を 砂あらしにする。" }, "pressure": { "name": "プレッシャー", - "description": "プレッシャーを あたえて 相手の 使う 技の PPを 多く 減らす。" + "description": "プレッシャーを あたえて 相手の 使う 技の PPを 多く 減らす。" }, "thickFat": { "name": "あついしぼう", - "description": "厚い 脂肪で 守られているので ほのおタイプと こおりタイプの 技の ダメージを 半減させる。" + "description": "厚い 脂肪で 守られているので ほのおタイプと こおりタイプの 技の ダメージを 半減させる。" }, "earlyBird": { "name": "はやおき", - "description": "ねむり状態に なっても 2倍の 早さで 目覚める ことが できる。" + "description": "ねむり状態に なっても 2倍の 早さで 目覚める ことが できる。" }, "flameBody": { "name": "ほのおのからだ", - "description": "自分に 触った 相手を やけど状態に する ことがある。" + "description": "自分に 触った 相手を やけど状態に する ことがある。" }, "runAway": { "name": "にげあし", - "description": "野生の ポケモンから 必ず 逃げられる。" + "description": "野生の ポケモンから 必ず 逃げられる。" }, "keenEye": { "name": "するどいめ", - "description": "鋭い 目の おかげで 命中率を 下げられない。" + "description": "鋭い 目の おかげで 命中率を 下げられない。" }, "hyperCutter": { "name": "かいりきバサミ", - "description": "力自慢の ハサミを 持っているので 相手に 攻撃を 下げられない。" + "description": "力自慢の ハサミを 持っているので 相手に 攻撃を 下げられない。" }, "pickup": { "name": "ものひろい", - "description": "戦闘が 終わったとき 相手の 持った 道具を 一つ 拾ってくることが ある。" + "description": "戦闘が 終わったとき 相手の 持った 道具を 一つ 拾ってくることが ある。" }, "truant": { "name": "なまけ", - "description": "技を 出すと 次の ターンは 休んでしまう。" + "description": "技を 出すと 次の ターンは 休んでしまう。" }, "hustle": { "name": "はりきり", - "description": "自分の 攻撃が 高くなるが 命中率が 下がる。" + "description": "自分の 攻撃が 高くなるが 命中率が 下がる。" }, "cuteCharm": { "name": "メロメロボディ", - "description": "自分に 触った 相手を メロメロに することが ある。" + "description": "自分に 触った 相手を メロメロに することが ある。" }, "plus": { "name": "プラス", - "description": "プラスか マイナスの 特性を 持つ ポケモンが 仲間に いると 自分の 特攻が 上がる。" + "description": "プラスか マイナスの 特性を 持つ ポケモンが 仲間に いると 自分の 特攻が 上がる。" }, "minus": { "name": "マイナス", - "description": "プラスか マイナスの 特性を 持つ ポケモンが 仲間に いると 自分の 特攻が 上がる。" + "description": "プラスか マイナスの 特性を 持つ ポケモンが 仲間に いると 自分の 特攻が 上がる。" }, "forecast": { "name": "てんきや", - "description": "天気の 影響を 受けて みずタイプ ほのおタイプ こおりタイプの どれかに 変化する。" + "description": "天気の 影響を 受けて みずタイプ ほのおタイプ こおりタイプの どれかに 変化する。" }, "stickyHold": { "name": "ねんちゃく", - "description": "粘着質の 体に 道具が くっついているため 相手に 道具を 奪われない。" + "description": "粘着質の 体に 道具が くっついているため 相手に 道具を 奪われない。" }, "shedSkin": { "name": "だっぴ", - "description": "体の 皮を 脱ぎ捨てることで 状態異常を 治すことが ある。" + "description": "体の 皮を 脱ぎ捨てることで 状態異常を 治すことが ある。" }, "guts": { "name": "こんじょう", - "description": "状態異常に なると 根性を だして 攻撃が 上がる。" + "description": "状態異常に なると 根性を だして 攻撃が 上がる。" }, "marvelScale": { "name": "ふしぎなうろこ", - "description": "状態異常に なると 不思議なウロコが 反応して 防御が 上がる。" + "description": "状態異常に なると 不思議なウロコが 反応して 防御が 上がる。" }, "liquidOoze": { "name": "ヘドロえき", - "description": "ヘドロ液を 吸い取った 相手は 強烈な 悪臭で ダメージを 受けて HPを 減らす。" + "description": "ヘドロ液を 吸い取った 相手は 強烈な 悪臭で ダメージを 受けて HPを 減らす。" }, "overgrow": { "name": "しんりょく", - "description": "HPが 減ったとき くさタイプの 技の 威力が 上がる。" + "description": "HPが 減ったとき くさタイプの 技の 威力が 上がる。" }, "blaze": { "name": "もうか", - "description": "HPが 減ったとき ほのおタイプの 技の 威力が 上がる。" + "description": "HPが 減ったとき ほのおタイプの 技の 威力が 上がる。" }, "torrent": { "name": "げきりゅう", - "description": "HPが 減ったとき みずタイプの 技の 威力が 上がる。" + "description": "HPが 減ったとき みずタイプの 技の 威力が 上がる。" }, "swarm": { "name": "むしのしらせ", - "description": "HPが 減ったとき むしタイプの 技の 威力が 上がる。" + "description": "HPが 減ったとき むしタイプの 技の 威力が 上がる。" }, "rockHead": { "name": "いしあたま", - "description": "反動を 受ける 技を 出しても HPが 減らない。" + "description": "反動を 受ける 技を 出しても HPが 減らない。" }, "drought": { "name": "ひでり", - "description": "登場 したときに 天気を 晴れに する。" + "description": "登場 したときに 天気を 晴れに する。" }, "arenaTrap": { "name": "ありじごく", - "description": "戦闘で 相手を 逃げられなくする。" + "description": "戦闘で 相手を 逃げられなくする。" }, "vitalSpirit": { "name": "やるき", - "description": "やる気を だすことに よって ねむり状態に ならない。" + "description": "やる気を だすことに よって ねむり状態に ならない。" }, "whiteSmoke": { "name": "しろいけむり", - "description": "白い煙に 守られて 相手に 能力を 下げられない。" + "description": "白い煙に 守られて 相手に 能力を 下げられない。" }, "purePower": { "name": "ヨガパワー", - "description": "ヨガの 力で 物理攻撃の 威力が 2倍に なる。" + "description": "ヨガの 力で 物理攻撃の 威力が 2倍に なる。" }, "shellArmor": { "name": "シェルアーマー", - "description": "硬い 殻に 守られ 相手の 攻撃が 急所に 当たらない。" + "description": "硬い 殻に 守られ 相手の 攻撃が 急所に 当たらない。" }, "airLock": { "name": "エアロック", - "description": "あらゆる 天気の 影響が なくなって しまう。" + "description": "あらゆる 天気の 影響が なくなって しまう。" }, "tangledFeet": { "name": "ちどりあし", - "description": "こんらん状態の ときは 回避率が アップする。" + "description": "こんらん状態の ときは 回避率が アップする。" }, "motorDrive": { "name": "でんきエンジン", - "description": "でんきタイプの 技を 受けると ダメージを 受けずに 素早さが 上がる。" + "description": "でんきタイプの 技を 受けると ダメージを 受けずに 素早さが 上がる。" }, "rivalry": { "name": "とうそうしん", - "description": "性別が 同じだと 闘争心を 燃やして 強くなる。 性別が 違うと 弱くなる。" + "description": "性別が 同じだと 闘争心を 燃やして 強くなる。 性別が 違うと 弱くなる。" }, "steadfast": { "name": "ふくつのこころ", - "description": "ひるむ たびに 不屈の心を 燃やして 素早さが 上がる。" + "description": "ひるむ たびに 不屈の心を 燃やして 素早さが 上がる。" }, "snowCloak": { "name": "ゆきがくれ", - "description": "天気が ゆきのとき 回避率が 上がる。" + "description": "天気が ゆきのとき 回避率が 上がる。" }, "gluttony": { "name": "くいしんぼう", - "description": "HPが 少なくなったら 食べる きのみを HP 半分の 時に 食べてしまう。" + "description": "HPが 少なくなったら 食べる きのみを HP 半分の 時に 食べてしまう。" }, "angerPoint": { "name": "いかりのつぼ", - "description": "急所に 攻撃が 当たると 怒りくるって 攻撃力が 最大に なる。" + "description": "急所に 攻撃が 当たると 怒りくるって 攻撃力が 最大に なる。" }, "unburden": { "name": "かるわざ", - "description": "持っていた 道具が なくなると 素早さが 上がる。" + "description": "持っていた 道具が なくなると 素早さが 上がる。" }, "heatproof": { "name": "たいねつ", - "description": "耐熱の 体に よって ほのおタイプの 技の 威力を 半減させる。" + "description": "耐熱の 体に よって ほのおタイプの 技の 威力を 半減させる。" }, "simple": { "name": "たんじゅん", - "description": "能力 変化が いつもの 2倍に なる。" + "description": "能力 変化が いつもの 2倍に なる。" }, "drySkin": { "name": "かんそうはだ", - "description": "天気が 雨の時や みずタイプの 技で HPが 回復し はれの時や ほのおタイプの 技で 減ってしまう。" + "description": "天気が 雨の時や みずタイプの 技で HPが 回復し はれの時や ほのおタイプの 技で 減ってしまう。" }, "download": { "name": "ダウンロード", - "description": "相手の 防御と 特防を くらべて 低い ほうの 能力に あわせて 自分の 攻撃か 特攻を 上げる。" + "description": "相手の 防御と 特防を くらべて 低い ほうの 能力に あわせて 自分の 攻撃か 特攻を 上げる。" }, "ironFist": { "name": "てつのこぶし", - "description": "パンチを 使う 技の 威力が 上がる。" + "description": "パンチを 使う 技の 威力が 上がる。" }, "poisonHeal": { "name": "ポイズンヒール", - "description": "どく状態に なると HPが 減らずに 増えていく。" + "description": "どく状態に なると HPが 減らずに 増えていく。" }, "adaptability": { "name": "てきおうりょく", - "description": "自分と おなじ タイプの 技の 威力が 上がる。" + "description": "自分と おなじ タイプの 技の 威力が 上がる。" }, "skillLink": { "name": "スキルリンク", - "description": "連続技を 使うと いつも 最高回数 出すことが できる。" + "description": "連続技を 使うと いつも 最高回数 出すことが できる。" }, "hydration": { "name": "うるおいボディ", - "description": "天気が 雨のとき 状態異常が 治る。" + "description": "天気が 雨のとき 状態異常が 治る。" }, "solarPower": { "name": "サンパワー", - "description": "天気が 晴れると 特攻が 上がるが 毎ターン HPが 減る。" + "description": "天気が 晴れると 特攻が 上がるが 毎ターン HPが 減る。" }, "quickFeet": { "name": "はやあし", - "description": "状態異常に なると 素早さが 上がる。" + "description": "状態異常に なると 素早さが 上がる。" }, "normalize": { "name": "ノーマルスキン", - "description": "どんな タイプの 技でも すべて ノーマルタイプに なる。 威力が 少し 上がる。" + "description": "どんな タイプの 技でも すべて ノーマルタイプに なる。 威力が 少し 上がる。" }, "sniper": { "name": "スナイパー", - "description": "攻撃を 急所に 当てると 威力が さらに 上がる。" + "description": "攻撃を 急所に 当てると 威力が さらに 上がる。" }, "magicGuard": { "name": "マジックガード", - "description": "攻撃 以外では ダメージを 受けない。" + "description": "攻撃 以外では ダメージを 受けない。" }, "noGuard": { "name": "ノーガード", - "description": "ノーガード戦法に よって お互いの 出す 技が かならず 当たる ようになる。" + "description": "ノーガード戦法に よって お互いの 出す 技が かならず 当たる ようになる。" }, "stall": { "name": "あとだし", - "description": "技を 出す 順番が かならず 最後に なる。" + "description": "技を 出す 順番が かならず 最後に なる。" }, "technician": { "name": "テクニシャン", - "description": "威力が 低い 技の 威力を 高くして 攻撃できる。" + "description": "威力が 低い 技の 威力を 高くして 攻撃できる。" }, "leafGuard": { "name": "リーフガード", - "description": "天気が 晴れのときは 状態異常に ならない。" + "description": "天気が 晴れのときは 状態異常に ならない。" }, "klutz": { "name": "ぶきよう", - "description": "持っている 道具を 使うことが できない。" + "description": "持っている 道具を 使うことが できない。" }, "moldBreaker": { "name": "かたやぶり", - "description": "相手の 特性に ジャマされる ことなく 相手に 技を 出すことが できる。" + "description": "相手の 特性に ジャマされる ことなく 相手に 技を 出すことが できる。" }, "superLuck": { "name": "きょううん", - "description": "強運を 持っているため 相手の 急所に 攻撃が 当たりやすい。" + "description": "強運を 持っているため 相手の 急所に 攻撃が 当たりやすい。" }, "aftermath": { "name": "ゆうばく", - "description": "ひんしに なったとき 触った 相手に ダメージを あたえる。" + "description": "ひんしに なったとき 触った 相手に ダメージを あたえる。" }, "anticipation": { "name": "きけんよち", - "description": "相手の 持つ 危険な 技を 察知する ことができる。" + "description": "相手の 持つ 危険な 技を 察知する ことができる。" }, "forewarn": { "name": "よちむ", - "description": "登場 したとき 相手の 持つ 技を ひとつだけ 読み取る。" + "description": "登場 したとき 相手の 持つ 技を ひとつだけ 読み取る。" }, "unaware": { "name": "てんねん", - "description": "相手の 能力の 変化を 無視して 攻撃が できる。" + "description": "相手の 能力の 変化を 無視して 攻撃が できる。" }, "tintedLens": { "name": "いろめがね", - "description": "効果が いまひとつの 技を 通常の 威力で 出すことが できる。" + "description": "効果が いまひとつの 技を 通常の 威力で 出すことが できる。" }, "filter": { "name": "フィルター", - "description": "効果バツグンに なってしまう 攻撃の 威力を 弱める ことが できる。" + "description": "効果バツグンに なってしまう 攻撃の 威力を 弱める ことが できる。" }, "slowStart": { "name": "スロースタート", - "description": "5ターンの あいだ 攻撃と 素早さが 半分に なる。" + "description": "5ターンの あいだ 攻撃と 素早さが 半分に なる。" }, "scrappy": { "name": "きもったま", - "description": "ゴーストタイプの ポケモンに ノーマルタイプと かくとうタイプの 技を 当てることが できる。" + "description": "ゴーストタイプの ポケモンに ノーマルタイプと かくとうタイプの 技を 当てることが できる。" }, "stormDrain": { "name": "よびみず", - "description": "みずタイプの 技を 自分に よせつけ ダメージは 受けずに 特攻が 上がる。" + "description": "みずタイプの 技を 自分に よせつけ ダメージは 受けずに 特攻が 上がる。" }, "iceBody": { "name": "アイスボディ", - "description": "天気が ゆきのとき HPを 少しずつ 回復 する。" + "description": "天気が ゆきのとき HPを 少しずつ 回復 する。" }, "solidRock": { "name": "ハードロック", - "description": "効果バツグンに なってしまう 攻撃の 威力を 弱める ことが できる。" + "description": "効果バツグンに なってしまう 攻撃の 威力を 弱める ことが できる。" }, "snowWarning": { "name": "ゆきふらし", - "description": "登場 したときに 天気を ゆきに する。" + "description": "登場 したときに 天気を ゆきに する。" }, "honeyGather": { "name": "みつあつめ", - "description": "戦闘が 終わったとき あまいミツを 拾う。そのあまいミツが 売られて お金を もらう。" + "description": "戦闘が 終わったとき あまいミツを 拾う。そのあまいミツが 売られて お金を もらう。" }, "frisk": { "name": "おみとおし", - "description": "登場 したとき 相手の 持ち物を 見通すことが できる。" + "description": "登場 したとき 相手の 持ち物を 見通すことが できる。" }, "reckless": { "name": "すてみ", - "description": "反動で ダメージを 受ける 技の 威力が 上がる。" + "description": "反動で ダメージを 受ける 技の 威力が 上がる。" }, "multitype": { "name": "マルチタイプ", - "description": "持っている プレートや Zクリスタルの タイプによって 自分の タイプが 変わる。" + "description": "持っている プレートや Zクリスタルの タイプによって 自分の タイプが 変わる。" }, "flowerGift": { "name": "フラワーギフト", - "description": "天気が 晴れのとき 自分と 味方の 攻撃と 特防の 能力が 上がる。" + "description": "天気が 晴れのとき 自分と 味方の 攻撃と 特防の 能力が 上がる。" }, "badDreams": { "name": "ナイトメア", - "description": "ねむり状態の 相手に ダメージを あたえる。" + "description": "ねむり状態の 相手に ダメージを あたえる。" }, "pickpocket": { "name": "わるいてぐせ", - "description": "触られた 相手の 道具を 盗んで しまう。" + "description": "触られた 相手の 道具を 盗んで しまう。" }, "sheerForce": { "name": "ちからずく", - "description": "技の 追加効果は なくなるが そのぶん 高い 威力で 技を 出すことが できる。" + "description": "技の 追加効果は なくなるが そのぶん 高い 威力で 技を 出すことが できる。" }, "contrary": { "name": "あまのじゃく", - "description": "能力の 変化が 逆転して 上がるときに 下がり 下がるときに 上がる。" + "description": "能力の 変化が 逆転して 上がるときに 下がり 下がるときに 上がる。" }, "unnerve": { "name": "きんちょうかん", - "description": "相手を 緊張させて きのみを 食べられなく させる。" + "description": "相手を 緊張させて きのみを 食べられなく させる。" }, "defiant": { "name": "まけんき", - "description": "能力を 下げられると 攻撃が ぐーんと 上がる。" + "description": "能力を 下げられると 攻撃が ぐーんと 上がる。" }, "defeatist": { "name": "よわき", - "description": "HPが 半分に なると 弱気に なって 攻撃と 特攻が 半減する。" + "description": "HPが 半分に なると 弱気に なって 攻撃と 特攻が 半減する。" }, "cursedBody": { "name": "のろわれボディ", - "description": "攻撃を 受けると 相手の 技を かなしばり状態に することが ある。" + "description": "攻撃を 受けると 相手の 技を かなしばり状態に することが ある。" }, "healer": { "name": "いやしのこころ", - "description": "状態異常の 味方を たまに 治してあげる。" + "description": "状態異常の 味方を たまに 治してあげる。" }, "friendGuard": { "name": "フレンドガード", - "description": "味方の ダメージを 減らすことが できる。" + "description": "味方の ダメージを 減らすことが できる。" }, "weakArmor": { "name": "くだけるよろい", - "description": "物理技で ダメージを 受けると 防御が 下がり 素早さが ぐーんと 上がる。" + "description": "物理技で ダメージを 受けると 防御が 下がり 素早さが ぐーんと 上がる。" }, "heavyMetal": { "name": "ヘヴィメタル", - "description": "自分の 重さが 2倍に なる。" + "description": "自分の 重さが 2倍に なる。" }, "lightMetal": { "name": "ライトメタル", - "description": "自分の 重さが 半分に なる。" + "description": "自分の 重さが 半分に なる。" }, "multiscale": { "name": "マルチスケイル", - "description": "HPが 満タンの ときに 受ける ダメージが 少なくなる。" + "description": "HPが 満タンの ときに 受ける ダメージが 少なくなる。" }, "toxicBoost": { "name": "どくぼうそう", - "description": "どく状態に なったとき 物理技の 威力が 上がる。" + "description": "どく状態に なったとき 物理技の 威力が 上がる。" }, "flareBoost": { "name": "ねつぼうそう", - "description": "やけど状態に なったとき 特殊技の 威力が 上がる。" + "description": "やけど状態に なったとき 特殊技の 威力が 上がる。" }, "harvest": { "name": "しゅうかく", - "description": "使った きのみを 何回も 作りだす。" + "description": "使った きのみを 何回も 作りだす。" }, "telepathy": { "name": "テレパシー", - "description": "味方の 攻撃を 読み取って 技を 回避する。" + "description": "味方の 攻撃を 読み取って 技を 回避する。" }, "moody": { "name": "ムラっけ", - "description": "毎ターン 能力の どれかが ぐーんと 上がって どれかが 下がる。" + "description": "毎ターン 能力の どれかが ぐーんと 上がって どれかが 下がる。" }, "overcoat": { "name": "ぼうじん", - "description": "すなあらしや あられなどの ダメージを 受けない。 粉の 技を 受けない。" + "description": "すなあらしや あられなどの ダメージを 受けない。 粉の 技を 受けない。" }, "poisonTouch": { "name": "どくしゅ", - "description": "触る だけで 相手を どく 状態に することがある。" + "description": "触る だけで 相手を どく 状態に することがある。" }, "regenerator": { "name": "さいせいりょく", - "description": "手持ちに 引っ込むと HPが 少し 回復する。" + "description": "手持ちに 引っ込むと HPが 少し 回復する。" }, "bigPecks": { "name": "はとむね", - "description": "防御を 下げる 効果を 受けない。" + "description": "防御を 下げる 効果を 受けない。" }, "sandRush": { "name": "すなかき", - "description": "天気が すなあらし のとき 素早さが 上がる。" + "description": "天気が すなあらし のとき 素早さが 上がる。" }, "wonderSkin": { "name": "ミラクルスキン", - "description": "変化技を 受けにくい 体に なっている。" + "description": "変化技を 受けにくい 体に なっている。" }, "analytic": { "name": "アナライズ", - "description": "いちばん 最後に 技を 出すと 技の 威力が 上がる。" + "description": "いちばん 最後に 技を 出すと 技の 威力が 上がる。" }, "illusion": { "name": "イリュージョン", - "description": "手持ちの いちばん うしろに いる ポケモンに なりきって 登場して 相手を 化かす。" + "description": "手持ちの いちばん うしろに いる ポケモンに なりきって 登場して 相手を 化かす。" }, "imposter": { "name": "かわりもの", - "description": "目の前の ポケモンに 変身 してしまう。" + "description": "目の前の ポケモンに 変身 してしまう。" }, "infiltrator": { "name": "すりぬけ", - "description": "相手の 壁や 身代わりを すりぬけて 攻撃 できる" + "description": "相手の 壁や 身代わりを すりぬけて 攻撃 できる" }, "mummy": { "name": "ミイラ", - "description": "相手に 触られると 相手を ミイラに してしまう。" + "description": "相手に 触られると 相手を ミイラに してしまう。" }, "moxie": { "name": "じしんかじょう", - "description": "相手を 倒すと 自信が ついて 攻撃が 上がる。" + "description": "相手を 倒すと 自信が ついて 攻撃が 上がる。" }, "justified": { "name": "せいぎのこころ", - "description": "あくタイプの 攻撃を 受けると 正義感で 攻撃が 上がる。" + "description": "あくタイプの 攻撃を 受けると 正義感で 攻撃が 上がる。" }, "rattled": { "name": "びびり", - "description": "あく ゴースト むしタイプの 攻撃を 受けたり いかくを されると びびって 素早さが 上がる。" + "description": "あく ゴースト むしタイプの 攻撃を 受けたり いかくを されると びびって 素早さが 上がる。" }, "magicBounce": { "name": "マジックミラー", - "description": "相手に だされた 変化技を 受けずに そのまま 返す ことが できる。" + "description": "相手に だされた 変化技を 受けずに そのまま 返す ことが できる。" }, "sapSipper": { "name": "そうしょく", - "description": "くさタイプの 技を 受けると ダメージを 受けずに 攻撃が 上がる。" + "description": "くさタイプの 技を 受けると ダメージを 受けずに 攻撃が 上がる。" }, "prankster": { "name": "いたずらごころ", - "description": "変化技を 先制で 出すことが できる。" + "description": "変化技を 先制で 出すことが できる。" }, "sandForce": { "name": "すなのちから", - "description": "天気が すなあらしの とき いわタイプと じめんタイプと はがねタイプの 威力が 上がる。" + "description": "天気が すなあらしの とき いわタイプと じめんタイプと はがねタイプの 威力が 上がる。" }, "ironBarbs": { "name": "てつのトゲ", - "description": "自分に 触った 相手に 鉄のトゲで ダメージを あたえる。" + "description": "自分に 触った 相手に 鉄のトゲで ダメージを あたえる。" }, "zenMode": { "name": "ダルマモード", - "description": "HPが 半分 以下に なると 姿が 変化する。" + "description": "HPが 半分 以下に なると 姿が 変化する。" }, "victoryStar": { "name": "しょうりのほし", - "description": "自分や 味方の 命中率が 上がる。" + "description": "自分や 味方の 命中率が 上がる。" }, "turboblaze": { "name": "ターボブレイズ", - "description": "相手の 特性に ジャマされる ことなく 相手に 技を 出すことが できる。" + "description": "相手の 特性に ジャマされる ことなく 相手に 技を 出すことが できる。" }, "teravolt": { "name": "テラボルテージ", - "description": "相手の 特性に ジャマされる ことなく 相手に 技を 出すことが できる。" + "description": "相手の 特性に ジャマされる ことなく 相手に 技を 出すことが できる。" }, "aromaVeil": { "name": "アロマベール", - "description": "自分と 味方への メンタル 攻撃を 防ぐことが できる。" + "description": "自分と 味方への メンタル 攻撃を 防ぐことが できる。" }, "flowerVeil": { "name": "フラワーベール", - "description": "味方の 草ポケモンは 能力が 下がらず 状態異常にも ならない。" + "description": "味方の 草ポケモンは 能力が 下がらず 状態異常にも ならない。" }, "cheekPouch": { "name": "ほおぶくろ", - "description": "どんな きのみでも 食べると HPも 回復する。" + "description": "どんな きのみでも 食べると HPも 回復する。" }, "protean": { "name": "へんげんじざい", - "description": "自分が 出す 技と 同じ タイプに 変化する。" + "description": "自分が 出す 技と 同じ タイプに 変化する。" }, "furCoat": { "name": "ファーコート", - "description": "相手から 受ける 物理技の ダメージが 半分に なる。" + "description": "相手から 受ける 物理技の ダメージが 半分に なる。" }, "magician": { "name": "マジシャン", - "description": "技を 当てた 相手の 道具を 奪ってしまう。" + "description": "技を 当てた 相手の 道具を 奪ってしまう。" }, "bulletproof": { "name": "ぼうだん", - "description": "相手の 弾や 爆弾などの 技を 防ぐことが できる。" + "description": "相手の 弾や 爆弾などの 技を 防ぐことが できる。" }, "competitive": { "name": "かちき", - "description": "能力を 下げられると 特攻が ぐーんと 上がる。" + "description": "能力を 下げられると 特攻が ぐーんと 上がる。" }, "strongJaw": { "name": "がんじょうあご", - "description": "あごが 頑丈で 噛む 技の 威力が 高くなる。" + "description": "あごが 頑丈で 噛む 技の 威力が 高くなる。" }, "refrigerate": { "name": "フリーズスキン", - "description": "ノーマルタイプの 技が こおりタイプに なる。 威力が 少し 上がる。" + "description": "ノーマルタイプの 技が こおりタイプに なる。 威力が 少し 上がる。" }, "sweetVeil": { "name": "スイートベール", - "description": "味方の ポケモンは 眠らなくなる。" + "description": "味方の ポケモンは 眠らなくなる。" }, "stanceChange": { "name": "バトルスイッチ", - "description": "攻撃技を 出すと ブレードフォルムに 技 キングシールドを 出すと シールドフォルムに 変化する。" + "description": "攻撃技を 出すと ブレードフォルムに 技 キングシールドを 出すと シールドフォルムに 変化する。" }, "galeWings": { "name": "はやてのつばさ", - "description": "HPが 満タン だと ひこうタイプの 技を 先制で 出すことが できる。" + "description": "HPが 満タン だと ひこうタイプの 技を 先制で 出すことが できる。" }, "megaLauncher": { "name": "メガランチャー", - "description": "波動の 技の 威力が 高くなる。" + "description": "波動の 技の 威力が 高くなる。" }, "grassPelt": { "name": "くさのけがわ", - "description": "グラスフィールドのとき 防御が 上がる。" + "description": "グラスフィールドのとき 防御が 上がる。" }, "symbiosis": { "name": "きょうせい", - "description": "味方が 道具を 使うと 自分の 持っている 道具を 味方に 渡す。" + "description": "味方が 道具を 使うと 自分の 持っている 道具を 味方に 渡す。" }, "toughClaws": { "name": "かたいツメ", - "description": "相手に 接触する 技の 威力が 高くなる。" + "description": "相手に 接触する 技の 威力が 高くなる。" }, "pixilate": { "name": "フェアリースキン", - "description": "ノーマルタイプの 技が フェアリータイプになる。 威力が 少し 上がる。" + "description": "ノーマルタイプの 技が フェアリータイプになる。 威力が 少し 上がる。" }, "gooey": { "name": "ぬめぬめ", - "description": "攻撃で 自分に 触れた 相手の 素早さを 下げる。" + "description": "攻撃で 自分に 触れた 相手の 素早さを 下げる。" }, "aerilate": { "name": "スカイスキン", - "description": "ノーマルタイプの 技が ひこうタイプになる。 威力が 少し 上がる。" + "description": "ノーマルタイプの 技が ひこうタイプになる。 威力が 少し 上がる。" }, "parentalBond": { "name": "おやこあい", - "description": "親子 2匹で 2回 攻撃することが できる。" + "description": "親子 2匹で 2回 攻撃することが できる。" }, "darkAura": { "name": "ダークオーラ", - "description": "全員の あくタイプの 技が 強くなる。" + "description": "全員の あくタイプの 技が 強くなる。" }, "fairyAura": { "name": "フェアリーオーラ", - "description": "全員の フェアリータイプの 技が 強くなる。" + "description": "全員の フェアリータイプの 技が 強くなる。" }, "auraBreak": { "name": "オーラブレイク", - "description": "オーラの 効果を 逆転させて 威力を 下げる。" + "description": "オーラの 効果を 逆転させて 威力を 下げる。" }, "primordialSea": { "name": "はじまりのうみ", - "description": "ほのおタイプの 攻撃を 受けない 天気にする。" + "description": "ほのおタイプの 攻撃を 受けない 天気にする。" }, "desolateLand": { "name": "おわりのだいち", - "description": "みずタイプの 攻撃を 受けない 天気にする。" + "description": "みずタイプの 攻撃を 受けない 天気にする。" }, "deltaStream": { "name": "デルタストリーム", - "description": "ひこうタイプの 弱点が なくなる 天気にする。" + "description": "ひこうタイプの 弱点が なくなる 天気にする。" }, "stamina": { "name": "じきゅうりょく", - "description": "攻撃を 受けると 防御が 上がる。" + "description": "攻撃を 受けると 防御が 上がる。" }, "wimpOut": { "name": "にげごし", - "description": "HPが 半分に なると あわてて 逃げ出して 手持ちに 引っ込んで しまう。" + "description": "HPが 半分に なると あわてて 逃げ出して 手持ちに 引っ込んで しまう。" }, "emergencyExit": { "name": "ききかいひ", - "description": "HPが 半分に なると 危険を 回避するため 手持ちに 引っ込んで しまう。" + "description": "HPが 半分に なると 危険を 回避するため 手持ちに 引っ込んで しまう。" }, "waterCompaction": { "name": "みずがため", - "description": "みずタイプの 技を 受けると 防御が ぐーんと 上がる。" + "description": "みずタイプの 技を 受けると 防御が ぐーんと 上がる。" }, "merciless": { "name": "ひとでなし", - "description": "どく状態の 相手を 攻撃すると かならず 急所に 当たる。" + "description": "どく状態の 相手を 攻撃すると かならず 急所に 当たる。" }, "shieldsDown": { "name": "リミットシールド", - "description": "HPが 半分に なると 殻が 壊れて 攻撃的に なる。" + "description": "HPが 半分に なると 殻が 壊れて 攻撃的に なる。" }, "stakeout": { "name": "はりこみ", - "description": "交代で 出てきた 相手に 2倍の ダメージで 攻撃 できる。" + "description": "交代で 出てきた 相手に 2倍の ダメージで 攻撃 できる。" }, "waterBubble": { "name": "すいほう", - "description": "自分に 対する ほのおタイプの 技の 威力を 下げる。 やけど しない。" + "description": "自分に 対する ほのおタイプの 技の 威力を 下げる。 やけど しない。" }, "steelworker": { "name": "はがねつかい", - "description": "はがねタイプの 技の 威力が 上がる。" + "description": "はがねタイプの 技の 威力が 上がる。" }, "berserk": { "name": "ぎゃくじょう", - "description": "相手の 攻撃で HPが 半分に なると 特攻が 上がる。" + "description": "相手の 攻撃で HPが 半分に なると 特攻が 上がる。" }, "slushRush": { "name": "ゆきかき", - "description": "天気が ゆき のとき 素早さが 上がる。" + "description": "天気が ゆき のとき 素早さが 上がる。" }, "longReach": { "name": "えんかく", - "description": "すべての 技を 相手に 接触 しないで 出すことが できる。" + "description": "すべての 技を 相手に 接触 しないで 出すことが できる。" }, "liquidVoice": { "name": "うるおいボイス", - "description": "すべての 音技が みずタイプに なる。" + "description": "すべての 音技が みずタイプに なる。" }, "triage": { "name": "ヒーリングシフト", - "description": "回復技を 先制で 出すことが できる。" + "description": "回復技を 先制で 出すことが できる。" }, "galvanize": { "name": "エレキスキン", - "description": "ノーマルタイプの 技が でんきタイプになる。 威力が 少し 上がる。" + "description": "ノーマルタイプの 技が でんきタイプになる。 威力が 少し 上がる。" }, "surgeSurfer": { "name": "サーフテール", - "description": "エレキフィールド のとき 素早さが 2倍に なる。" + "description": "エレキフィールド のとき 素早さが 2倍に なる。" }, "schooling": { "name": "ぎょぐん", - "description": "HPが 多いときは 群れて 強くなる。 HPの 残りが 少なくなると 群れは 散り散りに なってしまう。" + "description": "HPが 多いときは 群れて 強くなる。 HPの 残りが 少なくなると 群れは 散り散りに なってしまう。" }, "disguise": { "name": "ばけのかわ", - "description": "体を 被う 化けの皮で 1回 攻撃を 防ぐことが できる。" + "description": "体を 被う 化けの皮で 1回 攻撃を 防ぐことが できる。" }, "battleBond": { "name": "きずなへんげ", - "description": "相手を 倒すと トレーナーとの キズナが 深まり サトシゲッコウガに 変化する。みずしゅりけんが 強くなる。" + "description": "相手を 倒すと トレーナーとの キズナが 深まり サトシゲッコウガに 変化する。みずしゅりけんが 強くなる。" }, "powerConstruct": { "name": "スワームチェンジ", - "description": "HPが 半分に なると セルたちが 応援に 駆けつけ パーフェクトフォルムに 姿を 変える。" + "description": "HPが 半分に なると セルたちが 応援に 駆けつけ パーフェクトフォルムに 姿を 変える。" }, "corrosion": { "name": "ふしょく", - "description": "はがねタイプや どくタイプも どく状態に することが できる。" + "description": "はがねタイプや どくタイプも どく状態に することが できる。" }, "comatose": { "name": "ぜったいねむり", - "description": "つねに 夢うつつの 状態で 絶対に 目覚めない。 眠ったまま 攻撃が できる。" + "description": "つねに 夢うつつの 状態で 絶対に 目覚めない。 眠ったまま 攻撃が できる。" }, "queenlyMajesty": { "name": "じょおうのいげん", - "description": "相手に 威圧感を あたえ こちらに むかって 先制技を 出せない ようにする。" + "description": "相手に 威圧感を あたえ こちらに むかって 先制技を 出せない ようにする。" }, "innardsOut": { "name": "とびだすなかみ", - "description": "相手に 倒されたとき HPの 残りの ぶんだけ 相手に ダメージを あたえる。" + "description": "相手に 倒されたとき HPの 残りの ぶんだけ 相手に ダメージを あたえる。" }, "dancer": { "name": "おどりこ", - "description": "だれかが 踊り技を 使うと 自分も それに 続いて 踊り技を 出すことが できる。" + "description": "だれかが 踊り技を 使うと 自分も それに 続いて 踊り技を 出すことが できる。" }, "battery": { "name": "バッテリー", - "description": "味方の 特殊技の 威力を 上げる。" + "description": "味方の 特殊技の 威力を 上げる。" }, "fluffy": { "name": "もふもふ", - "description": "相手から 受けた 接触する 技の ダメージを 半減するが ほのおタイプの 技の ダメージは 2倍になる。" + "description": "相手から 受けた 接触する 技の ダメージを 半減するが ほのおタイプの 技の ダメージは 2倍になる。" }, "dazzling": { "name": "ビビッドボディ", - "description": "相手を びっくり させて こちらに むかって 先制技を 出せない ようにする。" + "description": "相手を びっくり させて こちらに むかって 先制技を 出せない ようにする。" }, "soulHeart": { "name": "ソウルハート", - "description": "ポケモンが ひんしに なるたびに 特攻が 上がる。" + "description": "ポケモンが ひんしに なるたびに 特攻が 上がる。" }, "tanglingHair": { "name": "カーリーヘアー", - "description": "攻撃で 自分に 触れた 相手の 素早さを 下げる。" + "description": "攻撃で 自分に 触れた 相手の 素早さを 下げる。" }, "receiver": { "name": "レシーバー", - "description": "倒された 味方の 特性を 受け継いで 同じ 特性に なる。" + "description": "倒された 味方の 特性を 受け継いで 同じ 特性に なる。" }, "powerOfAlchemy": { "name": "かがくのちから", - "description": "倒された 味方の 特性を 受け継いで 同じ 特性に なる。" + "description": "倒された 味方の 特性を 受け継いで 同じ 特性に なる。" }, "beastBoost": { "name": "ビーストブースト", - "description": "相手を 倒したとき 自分の いちばん 高い 能力が 上がる。" + "description": "相手を 倒したとき 自分の いちばん 高い 能力が 上がる。" }, "rksSystem": { "name": "ARシステム", - "description": "持っている メモリで 自分の タイプが 変わる。" + "description": "持っている メモリで 自分の タイプが 変わる。" }, "electricSurge": { "name": "エレキメイカー", - "description": "登場 したときに エレキフィールドを はりめぐらせる。" + "description": "登場 したときに エレキフィールドを はりめぐらせる。" }, "psychicSurge": { "name": "サイコメイカー", - "description": "登場 したときに サイコフィールドを はりめぐらせる。" + "description": "登場 したときに サイコフィールドを はりめぐらせる。" }, "mistySurge": { "name": "ミストメイカー", - "description": "登場 したときに ミストフィールドを はりめぐらせる。" + "description": "登場 したときに ミストフィールドを はりめぐらせる。" }, "grassySurge": { "name": "グラスメイカー", - "description": "登場 したときに グラスフィールドを はりめぐらせる。" + "description": "登場 したときに グラスフィールドを はりめぐらせる。" }, "fullMetalBody": { "name": "メタルプロテクト", - "description": "相手の 技や 特性で 能力を 下げられない。" + "description": "相手の 技や 特性で 能力を 下げられない。" }, "shadowShield": { "name": "ファントムガード", - "description": "HPが 満タンの ときに 受ける ダメージが 少なくなる。" + "description": "HPが 満タンの ときに 受ける ダメージが 少なくなる。" }, "prismArmor": { "name": "プリズムアーマー", - "description": "効果バツグンに なってしまう 攻撃の 威力を 弱める ことが できる。" + "description": "効果バツグンに なってしまう 攻撃の 威力を 弱める ことが できる。" }, "neuroforce": { "name": "ブレインフォース", - "description": "効果バツグンの 攻撃で 威力が さらに 上がる。" + "description": "効果バツグンの 攻撃で 威力が さらに 上がる。" }, "intrepidSword": { "name": "ふとうのけん", - "description": "登場 したときに 攻撃が 上がる。" + "description": "登場 したときに 攻撃が 上がる。" }, "dauntlessShield": { "name": "ふくつのたて", - "description": "登場 したときに 防御が 上がる。" + "description": "登場 したときに 防御が 上がる。" }, "libero": { "name": "リベロ", - "description": "自分が 出す 技と 同じ タイプに 変化する。" + "description": "自分が 出す 技と 同じ タイプに 変化する。" }, "ballFetch": { "name": "たまひろい", - "description": "1回目に 投げて 失敗 した モンスターボールを 拾ってくる。" + "description": "1回目に 投げて 失敗 した モンスターボールを 拾ってくる。" }, "cottonDown": { "name": "わたげ", - "description": "攻撃を 受けると わたげを ばらまいて 自分以外の ポケモン すべての 素早さを 下げる。" + "description": "攻撃を 受けると わたげを ばらまいて 自分以外の ポケモン すべての 素早さを 下げる。" }, "propellerTail": { "name": "スクリューおびれ", - "description": "相手の 技を 引き受ける 特性や 技の 影響を 無視 できる。" + "description": "相手の 技を 引き受ける 特性や 技の 影響を 無視 できる。" }, "mirrorArmor": { "name": "ミラーアーマー", - "description": "自分が 受けた 能力 ダウンの 効果 だけを 跳ね返す。" + "description": "自分が 受けた 能力 ダウンの 効果 だけを 跳ね返す。" }, "gulpMissile": { "name": "うのミサイル", - "description": "なみのりか ダイビングを すると 獲物を くわえてくる。 ダメージを 受けると 獲物を 吐きだして 攻撃。" + "description": "なみのりか ダイビングを すると 獲物を くわえてくる。 ダメージを 受けると 獲物を 吐きだして 攻撃。" }, "stalwart": { "name": "すじがねいり", - "description": "相手の 技を 引き受ける 特性や 技の 影響を 無視 できる。" + "description": "相手の 技を 引き受ける 特性や 技の 影響を 無視 できる。" }, "steamEngine": { "name": "じょうききかん", - "description": "みずタイプ ほのおタイプの 技を 受けると 素早さが ぐぐーんと 上がる。" + "description": "みずタイプ ほのおタイプの 技を 受けると 素早さが ぐぐーんと 上がる。" }, "punkRock": { "name": "パンクロック", - "description": "音技の 威力が 上がる。 受けた 音技の ダメージは 半分に なる。" + "description": "音技の 威力が 上がる。 受けた 音技の ダメージは 半分に なる。" }, "sandSpit": { "name": "すなはき", - "description": "攻撃を 受けると 砂あらしを 起こす。" + "description": "攻撃を 受けると 砂あらしを 起こす。" }, "iceScales": { "name": "こおりのりんぷん", - "description": "こおりのりんぷんに 守られて 特殊攻撃で 受ける ダメージが 半減 する。" + "description": "こおりのりんぷんに 守られて 特殊攻撃で 受ける ダメージが 半減 する。" }, "ripen": { "name": "じゅくせい", - "description": "熟成 させることで きのみの 効果が 倍に なる。" + "description": "熟成 させることで きのみの 効果が 倍に なる。" }, "iceFace": { "name": "アイスフェイス", - "description": "物理攻撃は 頭の 氷が みがわりに なるが 姿も 変わる。 氷は あられが 降ると 元に戻る。" + "description": "物理攻撃は 頭の 氷が みがわりに なるが 姿も 変わる。 氷は あられが 降ると 元に戻る。" }, "powerSpot": { "name": "パワースポット", - "description": "隣に いるだけで 技の 威力が 上がる。" + "description": "隣に いるだけで 技の 威力が 上がる。" }, "mimicry": { "name": "ぎたい", - "description": "フィールドの 状態に あわせて ポケモンの タイプが 変わる。" + "description": "フィールドの 状態に あわせて ポケモンの タイプが 変わる。" }, "screenCleaner": { "name": "バリアフリー", - "description": "登場 したときに 敵と 味方の ひかりのかべ リフレクター オーロラベールの 効果が 消える。" + "description": "登場 したときに 敵と 味方の ひかりのかべ リフレクター オーロラベールの 効果が 消える。" }, "steelySpirit": { "name": "はがねのせいしん", - "description": "味方の はがねタイプの 攻撃の 威力が 上がる。" + "description": "味方の はがねタイプの 攻撃の 威力が 上がる。" }, "perishBody": { "name": "ほろびのボディ", - "description": "接触する 技を 受けると お互い 3ターン たつと ひんしになる。 交代すると 効果は なくなる。" + "description": "接触する 技を 受けると お互い 3ターン たつと ひんしになる。 交代すると 効果は なくなる。" }, "wanderingSpirit": { "name": "さまようたましい", - "description": "接触する 技で 攻撃 してきた ポケモンと 特性を 入れ替える。" + "description": "接触する 技で 攻撃 してきた ポケモンと 特性を 入れ替える。" }, "gorillaTactics": { "name": "ごりむちゅう", - "description": "攻撃は 上がるが 最初に 選んだ 技しか 出せなくなる。" + "description": "攻撃は 上がるが 最初に 選んだ 技しか 出せなくなる。" }, "neutralizingGas": { "name": "かがくへんかガス", - "description": "かがくへんかガスの ポケモンが 場にいると すべての ポケモンの 特性の 効果が 消えたり 発動 しなくなる。" + "description": "かがくへんかガスの ポケモンが 場にいると すべての ポケモンの 特性の 効果が 消えたり 発動 しなくなる。" }, "pastelVeil": { "name": "パステルベール", - "description": "自分も 味方も どくの 状態異常を 受けなくなる。" + "description": "自分も 味方も どくの 状態異常を 受けなくなる。" }, "hungerSwitch": { "name": "はらぺこスイッチ", - "description": "ターンの 終わりに まんぷくもよう はらぺこもよう まんぷくもよう……と 交互に 姿を 変える。" + "description": "ターンの 終わりに まんぷくもよう はらぺこもよう まんぷくもよう……と 交互に 姿を 変える。" }, "quickDraw": { "name": "クイックドロウ", - "description": "相手より 先に 行動できることが ある。" + "description": "相手より 先に 行動できることが ある。" }, "unseenFist": { "name": "ふかしのこぶし", - "description": "相手に 接触する 技なら 守りの 効果を 無視して 攻撃することが できる。" + "description": "相手に 接触する 技なら 守りの 効果を 無視して 攻撃することが できる。" }, "curiousMedicine": { "name": "きみょうなくすり", - "description": "登場 したときに 貝がらから 薬を 振りまいて 味方の 能力変化を 元に戻す。" + "description": "登場 したときに 貝がらから 薬を 振りまいて 味方の 能力変化を 元に戻す。" }, "transistor": { "name": "トランジスタ", - "description": "でんきタイプの 技の 威力が 上がる。" + "description": "でんきタイプの 技の 威力が 上がる。" }, "dragonsMaw": { "name": "りゅうのあぎと", - "description": "ドラゴンタイプの 技の 威力が 上がる。" + "description": "ドラゴンタイプの 技の 威力が 上がる。" }, "chillingNeigh": { "name": "しろのいななき", - "description": "相手を 倒すと 冷たい 声で いなないて 攻撃が 上がる。" + "description": "相手を 倒すと 冷たい 声で いなないて 攻撃が 上がる。" }, "grimNeigh": { "name": "くろのいななき", - "description": "相手を 倒すと 恐ろしい 声で いなないて 特攻が 上がる。" + "description": "相手を 倒すと 恐ろしい 声で いなないて 特攻が 上がる。" }, "asOneGlastrier": { "name": "じんばいったい", - "description": "バドレックスの きんちょうかんと ブリザポスの しろのいななきの 二つの 特性を あわせ持つ。" + "description": "バドレックスの きんちょうかんと ブリザポスの しろのいななきの 二つの 特性を あわせ持つ。" }, "asOneSpectrier": { "name": "じんばいったい", - "description": "バドレックスの きんちょうかんと レイスポスの くろのいななきの 二つの 特性を あわせ持つ。" + "description": "バドレックスの きんちょうかんと レイスポスの くろのいななきの 二つの 特性を あわせ持つ。" }, "lingeringAroma": { "name": "とれないにおい", @@ -1073,170 +1073,170 @@ }, "seedSower": { "name": "こぼれダネ", - "description": "攻撃を 受けると グラスフィールドに する。" + "description": "攻撃を 受けると グラスフィールドに する。" }, "thermalExchange": { "name": "ねつこうかん", - "description": "ほのおタイプの 技を 受けると 攻撃が 上がる。 やけど状態に ならない。" + "description": "ほのおタイプの 技を 受けると 攻撃が 上がる。 やけど状態に ならない。" }, "angerShell": { "name": "いかりのこうら", - "description": "相手の攻撃で HPが 半分に なると 怒りで 防御と 特防が 下がるが 攻撃 特攻 素早さが 上がる。" + "description": "相手の攻撃で HPが 半分に なると 怒りで 防御と 特防が 下がるが 攻撃 特攻 素早さが 上がる。" }, "purifyingSalt": { "name": "きよめのしお", - "description": "清らかな塩で 状態異常に ならない。 ゴーストタイプの 技の ダメージを 半減させる。" + "description": "清らかな塩で 状態異常に ならない。 ゴーストタイプの 技の ダメージを 半減させる。" }, "wellBakedBody": { "name": "こんがりボディ", - "description": "ほのおタイプの 技を 受けると ダメージを 受けずに 防御が ぐーんと 上がる。" + "description": "ほのおタイプの 技を 受けると ダメージを 受けずに 防御が ぐーんと 上がる。" }, "windRider": { "name": "かぜのり", - "description": "おいかぜが 吹いたり 風技を 受けると ダメージを 受けずに 攻撃が 上がる。" + "description": "おいかぜが 吹いたり 風技を 受けると ダメージを 受けずに 攻撃が 上がる。" }, "guardDog": { "name": "ばんけん", - "description": "いかく されると 攻撃が 上がる。 ポケモンを 入れ替えさせる 技や 道具が 効かない。" + "description": "いかく されると 攻撃が 上がる。 ポケモンを 入れ替えさせる 技や 道具が 効かない。" }, "rockyPayload": { "name": "いわはこび", - "description": "いわタイプの 技の 威力が 上がる。" + "description": "いわタイプの 技の 威力が 上がる。" }, "windPower": { "name": "ふうりょくでんき", - "description": "風技を 受けると じゅうでん 状態に なる。" + "description": "風技を 受けると じゅうでん 状態に なる。" }, "zeroToHero": { "name": "マイティチェンジ", - "description": "手持ちに ひっこむと マイティフォルムに 変化する。" + "description": "手持ちに ひっこむと マイティフォルムに 変化する。" }, "commander": { "name": "しれいとう", - "description": "登場したとき 味方に ヘイラッシャが いると 口の中に 入って そこから 指令を だす。" + "description": "登場したとき 味方に ヘイラッシャが いると 口の中に 入って そこから 指令を だす。" }, "electromorphosis": { "name": "でんきにかえる", - "description": "ダメージを 受けると じゅうでん 状態に なる。" + "description": "ダメージを 受けると じゅうでん 状態に なる。" }, "protosynthesis": { "name": "こだいかっせい", - "description": "ブーストエナジーを 持たせるか 天気が 晴れのとき いちばん 高い能力が 上がる。" + "description": "ブーストエナジーを 持たせるか 天気が 晴れのとき いちばん 高い能力が 上がる。" }, "quarkDrive": { "name": "クォークチャージ", - "description": "ブーストエナジーを 持たせるか エレキフィールドのとき いちばん 高い能力が 上がる。" + "description": "ブーストエナジーを 持たせるか エレキフィールドのとき いちばん 高い能力が 上がる。" }, "goodAsGold": { "name": "おうごんのからだ", - "description": "酸化せず 丈夫な 黄金の体は 相手からの 変化技を 受けない。" + "description": "酸化せず 丈夫な 黄金の体は 相手からの 変化技を 受けない。" }, "vesselOfRuin": { "name": "わざわいのうつわ", - "description": "災厄を 呼ぶ 器の力で 自分以外の 特攻が 弱くなる。" + "description": "災厄を 呼ぶ 器の力で 自分以外の 特攻が 弱くなる。" }, "swordOfRuin": { "name": "わざわいのつるぎ", - "description": "災厄を 呼ぶ 剣の力で 自分以外の 防御が 弱くなる。" + "description": "災厄を 呼ぶ 剣の力で 自分以外の 防御が 弱くなる。" }, "tabletsOfRuin": { "name": "わざわいのおふだ", - "description": "災厄を 呼ぶ 木札の力で 自分以外の 攻撃が 弱くなる。" + "description": "災厄を 呼ぶ 木札の力で 自分以外の 攻撃が 弱くなる。" }, "beadsOfRuin": { "name": "わざわいのたま", - "description": "災厄を 呼ぶ 勾玉の力で 自分以外の 特防が 弱くなる。" + "description": "災厄を 呼ぶ 勾玉の力で 自分以外の 特防が 弱くなる。" }, "orichalcumPulse": { "name": "ひひいろのこどう", - "description": "登場したとき 天気を 晴れにする。 日差しが 強いと 古代の 鼓動により 攻撃が 高まる。" + "description": "登場したとき 天気を 晴れにする。 日差しが 強いと 古代の 鼓動により 攻撃が 高まる。" }, "hadronEngine": { "name": "ハドロンエンジン", - "description": "登場したとき エレキフィールドを はる。 エレキフィールドだと 未来の 機関により 特攻が 高まる。" + "description": "登場したとき エレキフィールドを はる。 エレキフィールドだと 未来の 機関により 特攻が 高まる。" }, "opportunist": { "name": "びんじょう", - "description": "相手の 能力が 上がったとき 自分も 便乗して 同じように 能力を 上げる。" + "description": "相手の 能力が 上がったとき 自分も 便乗して 同じように 能力を 上げる。" }, "cudChew": { "name": "はんすう", - "description": "きのみを 食べると 次のターンの 終わりに 胃から 出して もう1回だけ 食べる。" + "description": "きのみを 食べると 次のターンの 終わりに 胃から 出して もう1回だけ 食べる。" }, "sharpness": { "name": "きれあじ", - "description": "相手を 切る技の 威力が 上がる。" + "description": "相手を 切る技の 威力が 上がる。" }, "supremeOverlord": { "name": "そうだいしょう", - "description": "登場したとき 今まで 倒された 味方の 数が 多いほど 少しずつ 攻撃と 特攻が 上がる。" + "description": "登場したとき 今まで 倒された 味方の 数が 多いほど 少しずつ 攻撃と 特攻が 上がる。" }, "costar": { "name": "きょうえん", - "description": "登場 したときに 味方の 能力変化を コピーする。" + "description": "登場 したときに 味方の 能力変化を コピーする。" }, "toxicDebris": { "name": "どくげしょう", - "description": "物理技で ダメージを 受けると 相手の 足下に どくびしが ちらばる。" + "description": "物理技で ダメージを 受けると 相手の 足下に どくびしが ちらばる。" }, "armorTail": { "name": "テイルアーマー", - "description": "頭を包む 謎のしっぽが こちらに むかって 先制技を 出せない ようにする。" + "description": "頭を包む 謎のしっぽが こちらに むかって 先制技を 出せない ようにする。" }, "earthEater": { "name": "どしょく", - "description": "じめんタイプの 技を 受けると ダメージを 受けずに 回復する。" + "description": "じめんタイプの 技を 受けると ダメージを 受けずに 回復する。" }, "myceliumMight": { "name": "きんしのちから", - "description": "変化技を 出すとき 必ず 行動が 遅くなるが 相手の 特性に ジャマされない。" + "description": "変化技を 出すとき 必ず 行動が 遅くなるが 相手の 特性に ジャマされない。" }, "mindsEye": { "name": "しんがん", - "description": "ノーマル かくとうタイプの技を ゴーストタイプに 当てることが できる。 相手の 回避率の 変化を 無視し 命中率も 下げられない。" + "description": "ノーマル かくとうタイプの技を ゴーストタイプに 当てることが できる。 相手の 回避率の 変化を 無視し 命中率も 下げられない。" }, "supersweetSyrup": { "name": "かんろなミツ", - "description": "最初に 登場 したとき 甘ったるい 蜜の香りを ふりまいて 相手の 回避率を 下げる。" + "description": "最初に 登場 したとき 甘ったるい 蜜の香りを ふりまいて 相手の 回避率を 下げる。" }, "hospitality": { "name": "おもてなし", - "description": "登場したとき 味方を もてなして HPを 少しだけ 回復してあげる。" + "description": "登場したとき 味方を もてなして HPを 少しだけ 回復してあげる。" }, "toxicChain": { "name": "どくのくさり", - "description": "毒素を ふくんだ 鎖の力で 技を 当てた 相手を 猛毒の状態に することが ある。" + "description": "毒素を ふくんだ 鎖の力で 技を 当てた 相手を 猛毒の状態に することが ある。" }, "embodyAspectTeal": { "name": "おもかげやどし", - "description": "思い出を 心に 宿すことで みどりのめんを かがやかせ 自分の 素早さを 上げる。" + "description": "思い出を 心に 宿すことで みどりのめんを かがやかせ 自分の 素早さを 上げる。" }, "embodyAspectWellspring": { "name": "おもかげやどし", - "description": "思い出を 心に 宿すことで いどのめんを かがやかせ 自分の 特防を 上げる。" + "description": "思い出を 心に 宿すことで いどのめんを かがやかせ 自分の 特防を 上げる。" }, "embodyAspectHearthflame": { "name": "おもかげやどし", - "description": "思い出を 心に 宿すことで かまどのめんを かがやかせ 自分の 攻撃を 上げる。" + "description": "思い出を 心に 宿すことで かまどのめんを かがやかせ 自分の 攻撃を 上げる。" }, "embodyAspectCornerstone": { "name": "おもかげやどし", - "description": "思い出を 心に 宿すことで いしずえのめんを かがやかせ 自分の 防御を 上げる。" + "description": "思い出を 心に 宿すことで いしずえのめんを かがやかせ 自分の 防御を 上げる。" }, "teraShift": { "name": "テラスチェンジ", - "description": "登場したとき 周囲の エネルギーを 吸収し テラスタルフォルムに 変化する。" + "description": "登場したとき 周囲の エネルギーを 吸収し テラスタルフォルムに 変化する。" }, "teraShell": { "name": "テラスシェル", - "description": "全タイプの力を 秘めた甲羅は HPが 満タンの ときに 受ける ダメージを すべて 今ひとつに する。" + "description": "全タイプの力を 秘めた甲羅は HPが 満タンの ときに 受ける ダメージを すべて 今ひとつに する。" }, "teraformZero": { "name": "ゼロフォーミング", - "description": "テラパゴスが ステラフォルムに なったとき 秘められた力で 天気と フィールドの 影響を すべて ゼロにする。" + "description": "テラパゴスが ステラフォルムに なったとき 秘められた力で 天気と フィールドの 影響を すべて ゼロにする。" }, "poisonPuppeteer": { "name": "どくくぐつ", - "description": "モモワロウの 技によって どく状態に なった 相手は こんらん状態にも なってしまう。" + "description": "モモワロウの 技によって どく状態に なった 相手は こんらん状態にも なってしまう。" } -} \ No newline at end of file +} diff --git a/src/locales/ja/arena-flyout.json b/src/locales/ja/arena-flyout.json index fa29b4567c5..8585b8e8fb4 100644 --- a/src/locales/ja/arena-flyout.json +++ b/src/locales/ja/arena-flyout.json @@ -39,5 +39,6 @@ "matBlock": "たたみがえし", "craftyShield": "トリックガード", "tailwind": "おいかぜ", - "happyHour": "ハッピータイム" + "happyHour": "ハッピータイム", + "safeguard": "しんぴなまもり" } diff --git a/src/locales/ja/arena-tag.json b/src/locales/ja/arena-tag.json index 56be30d8d55..a81942338fd 100644 --- a/src/locales/ja/arena-tag.json +++ b/src/locales/ja/arena-tag.json @@ -47,5 +47,11 @@ "tailwindOnRemovePlayer": "味方の 追い風が 止んだ!", "tailwindOnRemoveEnemy": "相手の 追い風が 止んだ!", "happyHourOnAdd": "みんなが ハッピーな気分に\n包まれた!", - "happyHourOnRemove": "みんなの 気分が 元に戻った" -} \ No newline at end of file + "happyHourOnRemove": "みんなの 気分が 元に戻った", + "safeguardOnAdd": "場の全体は 神秘のベールに 包まれた!", + "safeguardOnAddPlayer": "味方は 神秘のベールに 包まれた!", + "safeguardOnAddEnemy": "相手は 神秘のベールに 包まれた!", + "safeguardOnRemove": "場の全体を 包んでいた\n神秘のベールが なくなった!", + "safeguardOnRemovePlayer": "味方を 包んでいた\n神秘のベールが なくなった!", + "safeguardOnRemoveEnemy": "相手を 包んでいた\n神秘のベールが なくなった!" +} diff --git a/src/locales/ja/battle.json b/src/locales/ja/battle.json index 636d17f23d6..1fe24068cdf 100644 --- a/src/locales/ja/battle.json +++ b/src/locales/ja/battle.json @@ -4,7 +4,7 @@ "trainerAppearedDouble": "{{trainerName}}が\n勝負を しかけてきた!", "trainerSendOut": "{{trainerName}}は\n{{pokemonName}}を 繰り出した!", "singleWildAppeared": "あっ! 野生の {{pokemonName}}が 飛び出してきた!", - "multiWildAppeared": "あっ! 野生の {{pokemonName1}}と\n{{pokemonName2}}が 飛び出してきた!", + "multiWildAppeared": "あっ! 野生の {{pokemonName1}}と\n{{pokemonName2}}が 飛び出してきた!", "playerComeBack": "{{pokemonName}}! 戻れ!", "trainerComeBack": "{{trainerName}}は\n{{pokemonName}}を 引っ込めた!", "playerGo": "ゆけっ! {{pokemonName}}!", @@ -51,7 +51,7 @@ "noPokeballStrong": "相手の ポケモンが 強すぎて 捕まえられない!\nまずは 弱めよう!", "noEscapeForce": "見えない 力の せいで\n逃げることが できない!", "noEscapeTrainer": "ダメだ! 勝負の最中に\n相手に 背中を 見せられない!", - "noEscapePokemon": "{{pokemonName}}の {{moveName}}で {{escapeVerb}}!", + "noEscapePokemon": "{{pokemonName}}の {{moveName}}で\n{{escapeVerb}}!", "runAwaySuccess": " うまく 逃げ切れた!", "runAwayCannotEscape": "逃げることが できない!", "escapeVerbSwitch": "入れ替えることが できない", @@ -62,6 +62,7 @@ "skipItemQuestion": "本当に アイテムを 取らずに 進みますか?", "itemStackFull": "{{fullItemName}}の スタックが いっぱいです。\n代わりに {{itemName}}を 取得します。", "eggHatching": "おや?", + "eggSkipPrompt": "タマゴは ふかします!\nタマゴまとめに 飛ばしますか?", "ivScannerUseQuestion": "{{pokemonName}}を\n個体値スキャナーで 操作しますか?", "wildPokemonWithAffix": "野生の {{pokemonName}}", "foePokemonWithAffix": "相手の {{pokemonName}}", diff --git a/src/locales/ja/berry.json b/src/locales/ja/berry.json index 73d13d5e8f0..1d1e01296d1 100644 --- a/src/locales/ja/berry.json +++ b/src/locales/ja/berry.json @@ -1,46 +1,46 @@ { "SITRUS": { "name": "オボンのみ", - "effect": "持たせると HPが 50%以下になるとき HPを 25% 回復する" + "effect": "持たせると HPが 50%以下に なるとき HPを 25% 回復する" }, "LUM": { "name": "ラムのみ", - "effect": "持たせると 状態異常や 混乱になるとき 回復する\n" + "effect": "持たせると 状態異常や 混乱に なるとき 回復する" }, "ENIGMA": { "name": "ナゾのみ", - "effect": "持たせると 効果バツグンの 技を 受けたとき HPを 25%回復する" + "effect": "持たせると 効果バツグンの 技を 受けたとき HPを 25%回復する" }, "LIECHI": { "name": "チイラのみ", - "effect": "持たせると HPが 25%以下に なるとき 攻撃が あがる" + "effect": "持たせると HPが 25%以下に なるとき 攻撃が あがる" }, "GANLON": { "name": "リュガのみ", - "effect": "持たせると HPが 25%以下に なるとき 防御が あがる\n" + "effect": "持たせると HPが 25%以下に なるとき 防御が あがる" }, "PETAYA": { "name": "ヤタピのみ", - "effect": "持たせると HPが 25%以下に なるとき 特攻が あがる\n" + "effect": "持たせると HPが 25%以下に なるとき 特攻が あがる" }, "APICOT": { "name": "ズアのみ", - "effect": "持たせると HPが 25%以下に なるとき 特防が あがる\n" + "effect": "持たせると HPが 25%以下に なるとき 特防が あがる" }, "SALAC": { "name": "カムラのみ", - "effect": "持たせると HPが 25%以下に なるとき 素早さが あがる" + "effect": "持たせると HPが 25%以下に なるとき 素早さが あがる" }, "LANSAT": { "name": "サンのみ", - "effect": "持たせると HPが 25%以下に なるとき 攻撃が 急所に 当たりやすくなる" + "effect": "持たせると HPが 25%以下に なるとき 攻撃が 急所に 当たりやすくなる" }, "STARF": { "name": "スターのみ", - "effect": "持たせると HPが 25%以下に なるとき どれか 1つの 能力が ぐーんと あがる" + "effect": "持たせると HPが 25%以下に なるとき どれか 1つの 能力が ぐーんと あがる" }, "LEPPA": { "name": "ヒメリのみ", - "effect": "持たせると PPが 0になる 技のPPを 10回復する" + "effect": "持たせると PPが0になる 技の PPを 10回復する" } } diff --git a/src/locales/ja/fight-ui-handler.json b/src/locales/ja/fight-ui-handler.json index 41ec140c2ca..c0c725ccaf3 100644 --- a/src/locales/ja/fight-ui-handler.json +++ b/src/locales/ja/fight-ui-handler.json @@ -2,6 +2,6 @@ "pp": "PP", "power": "威力", "accuracy": "命中", - "abilityFlyInText": " {{pokemonName}}の\n{{passive}}:{{abilityName}}", + "abilityFlyInText": " {{pokemonName}}の\n{{passive}} {{abilityName}}", "passive": "パッシブ " } diff --git a/src/locales/ja/menu.json b/src/locales/ja/menu.json index 3630f7590ba..f0914a7941c 100644 --- a/src/locales/ja/menu.json +++ b/src/locales/ja/menu.json @@ -22,7 +22,7 @@ "unmatchingPassword": "入力したパスワードが 一致しません", "passwordNotMatchingConfirmPassword": "パスワードは パスワード確認と 一致する 必要があります", "confirmPassword": "パスワード確認", - "registrationAgeWarning": "登録では 13歳以上 であることを 確認します。", + "registrationAgeWarning": "登録では 13歳以上 であることを 確認します。", "backToLogin": "ログインへ", "failedToLoadSaveData": "セーブデータの 読み込みは 不可能でした。ページを 再読み込み してください。\n長い間に続く 場合は 管理者に 連絡してください。", "sessionSuccess": "セッションが 正常に 読み込まれました。", @@ -46,10 +46,10 @@ "yes": "はい", "no": "いいえ", "disclaimer": "免責", - "disclaimerDescription": "このゲームは 未完成作品です。\nセーブデータの 損失を含める ゲーム性に関する 問題が 起きる可能性が あります。\nなお、ゲームは 予告なく変更される 可能性もあり、さらに更新され、完成されるとも 限りません。", + "disclaimerDescription": "このゲームは 未完成作品です。\nセーブデータの 損失を含める ゲーム性に関する 問題が 起きる可能性が あります。\nなお、ゲームは 予告なく変更される 可能性もあり、\nさらに更新され、完成されるとも 限りません。", "choosePokemon": "ポケモンを選ぶ", "renamePokemon": "ニックネームを変える", - "rename": "変える", + "rename": "名前を変える", "nickname": "ニックネーム", "errorServerDown": "おや!\nサーバーとの 接続中に 問題が 発生しました。\nゲームは 自動的に 再接続されます から\nウィンドウは 開いたままに しておいても よろしいです。", "noSaves": "何の セーブファイルも ありません!", diff --git a/src/locales/ja/move.json b/src/locales/ja/move.json index fbeb2132d23..2e602407902 100644 --- a/src/locales/ja/move.json +++ b/src/locales/ja/move.json @@ -1,2491 +1,2491 @@ { "pound": { "name": "はたく", - "effect": "長い しっぽや 手などを 使って 相手を はたいて 攻撃する。" + "effect": "長い しっぽや 手などを 使って 相手を はたいて 攻撃する。" }, "karateChop": { "name": "からてチョップ", - "effect": "鋭い チョップで 相手を たたいて 攻撃する。 急所に 当たりやすい。" + "effect": "鋭い チョップで 相手を たたいて 攻撃する。 急所に 当たりやすい。" }, "doubleSlap": { "name": "おうふくビンタ", - "effect": "おうふく ビンタで 相手を たたいて 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "おうふく ビンタで 相手を たたいて 攻撃する。 2ー5回の 間 連続で だす。" }, "cometPunch": { "name": "れんぞくパンチ", - "effect": "どとうの パンチで 相手を なぐりつけて 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "どとうの パンチで 相手を なぐりつけて 攻撃する。 2ー5回の 間 連続で だす。" }, "megaPunch": { "name": "メガトンパンチ", - "effect": "力を こめた パンチで 相手を 攻撃する。" + "effect": "力を こめた パンチで 相手を 攻撃する。" }, "payDay": { "name": "ネコにこばん", - "effect": "相手の 体に 小判を 投げつけて 攻撃する。 戦闘の あとで お金が もらえる。" + "effect": "相手の 体に 小判を 投げつけて 攻撃する。 戦闘の あとで お金が もらえる。" }, "firePunch": { "name": "ほのおのパンチ", - "effect": "炎を こめた パンチで 相手を 攻撃する。 やけど状態に することが ある。" + "effect": "炎を こめた パンチで 相手を 攻撃する。 やけど状態に することが ある。" }, "icePunch": { "name": "れいとうパンチ", - "effect": "冷気を こめた パンチで 相手を 攻撃する。 こおり状態に することが ある。" + "effect": "冷気を こめた パンチで 相手を 攻撃する。 こおり状態に することが ある。" }, "thunderPunch": { "name": "かみなりパンチ", - "effect": "電撃を こめた パンチで 相手を 攻撃する。 まひ状態に することが ある。" + "effect": "電撃を こめた パンチで 相手を 攻撃する。 まひ状態に することが ある。" }, "scratch": { "name": "ひっかく", - "effect": "硬く とがった 鋭い ツメで 相手を ひっかいて 攻撃する。" + "effect": "硬く とがった 鋭い ツメで 相手を ひっかいて 攻撃する。" }, "viseGrip": { "name": "はさむ", - "effect": "相手を 両側から はさんで ダメージを あたえる。" + "effect": "相手を 両側から はさんで ダメージを あたえる。" }, "guillotine": { "name": "ハサミギロチン", - "effect": "大きな ハサミで 相手を 切り裂いて 攻撃する。 当たれば 一撃で ひんしに する。" + "effect": "大きな ハサミで 相手を 切り裂いて 攻撃する。 当たれば 一撃で ひんしに する。" }, "razorWind": { "name": "かまいたち", - "effect": "風の 刃を つくり 2ターン目に 相手を 攻撃する。 急所に 当たりやすい。" + "effect": "風の 刃を つくり 2ターン目に 相手を 攻撃する。 急所に 当たりやすい。" }, "swordsDance": { "name": "つるぎのまい", - "effect": "戦いの舞を 激しく おどって 気合を 高める。 自分の 攻撃を ぐーんと あげる。" + "effect": "戦いの舞を 激しく おどって 気合を 高める。 自分の 攻撃を ぐーんと あげる。" }, "cut": { "name": "いあいぎり", - "effect": "カマや ツメなどで 相手を 切りつけて 攻撃する。" + "effect": "カマや ツメなどで 相手を 切りつけて 攻撃する。" }, "gust": { "name": "かぜおこし", - "effect": "翼で おこした 激しい 風を 相手に ぶつけて 攻撃する。" + "effect": "翼で おこした 激しい 風を 相手に ぶつけて 攻撃する。" }, "wingAttack": { "name": "つばさでうつ", - "effect": "大きく ひろげた りっぱな 翼を 相手に ぶつけて 攻撃する。" + "effect": "大きく ひろげた りっぱな 翼を 相手に ぶつけて 攻撃する。" }, "whirlwind": { "name": "ふきとばし", - "effect": "相手を 吹きとばして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" + "effect": "相手を 吹きとばして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" }, "fly": { "name": "そらをとぶ", - "effect": "1ターン目で 空へ 飛び 2ターン目に 相手を 攻撃する。" + "effect": "1ターン目で 空へ 飛び 2ターン目に 相手を 攻撃する。" }, "bind": { "name": "しめつける", - "effect": "長い 体や つるなどを 使い 4ー5ターンの 間 相手を 締めつけて 攻撃する。" + "effect": "長い 体や つるなどを 使い 4ー5ターンの 間 相手を 締めつけて 攻撃する。" }, "slam": { "name": "たたきつける", - "effect": "長い しっぽや つるなどを 使い 相手を たたきつけて 攻撃する。" + "effect": "長い しっぽや つるなどを 使い 相手を たたきつけて 攻撃する。" }, "vineWhip": { "name": "つるのムチ", - "effect": "ムチのように しなる 細長い つるで 相手を たたきつけて 攻撃する。" + "effect": "ムチのように しなる 細長い つるで 相手を たたきつけて 攻撃する。" }, "stomp": { "name": "ふみつけ", - "effect": "大きな 足で 相手を 踏みつけて 攻撃する。 相手を ひるませることが ある。" + "effect": "大きな 足で 相手を 踏みつけて 攻撃する。 相手を ひるませることが ある。" }, "doubleKick": { "name": "にどげり", - "effect": "2本の 足で 相手を けとばして 攻撃する。 2回連続で ダメージを 与える。" + "effect": "2本の 足で 相手を けとばして 攻撃する。 2回連続で ダメージを 与える。" }, "megaKick": { "name": "メガトンキック", - "effect": "ものすごい 力を こめた キックで 相手を けとばして 攻撃する。" + "effect": "ものすごい 力を こめた キックで 相手を けとばして 攻撃する。" }, "jumpKick": { "name": "とびげり", - "effect": "高い ジャンプからの キックで 相手を 攻撃する。 はずすと 自分が ダメージを 受ける。" + "effect": "高い ジャンプからの キックで 相手を 攻撃する。 はずすと 自分が ダメージを 受ける。" }, "rollingKick": { "name": "まわしげり", - "effect": "体を 素早く 回転させながら けとばして 攻撃する。 相手を ひるませる ことが ある。" + "effect": "体を 素早く 回転させながら けとばして 攻撃する。 相手を ひるませる ことが ある。" }, "sandAttack": { "name": "すなかけ", - "effect": "相手の 顔に 砂を かけて 命中率を さげる。" + "effect": "相手の 顔に 砂を かけて 命中率を さげる。" }, "headbutt": { "name": "ずつき", - "effect": "頭を 突きだして まっすぐ つっこんで 攻撃する。 相手を ひるませることが ある。" + "effect": "頭を 突きだして まっすぐ つっこんで 攻撃する。 相手を ひるませることが ある。" }, "hornAttack": { "name": "つのでつく", - "effect": "鋭く とがった つので 相手を 攻撃する。" + "effect": "鋭く とがった つので 相手を 攻撃する。" }, "furyAttack": { "name": "みだれづき", - "effect": "つのや くちばしで 相手を つついて 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "つのや くちばしで 相手を つついて 攻撃する。 2ー5回の 間 連続で だす。" }, "hornDrill": { "name": "つのドリル", - "effect": "回転する つのを 相手に 突き刺して 攻撃する。 当たれば 一撃で ひんしに する。" + "effect": "回転する つのを 相手に 突き刺して 攻撃する。 当たれば 一撃で ひんしに する。" }, "tackle": { "name": "たいあたり", - "effect": "相手に むかって 全身で ぶつかっていき 攻撃する。" + "effect": "相手に むかって 全身で ぶつかっていき 攻撃する。" }, "bodySlam": { "name": "のしかかり", - "effect": "全身で 相手に のしかかり 攻撃する。 まひ状態に することが ある。" + "effect": "全身で 相手に のしかかり 攻撃する。 まひ状態に することが ある。" }, "wrap": { "name": "まきつく", - "effect": "長い 体や つるなどを 使って 4ー5ターンの 間 相手に まきついて 攻撃する。" + "effect": "長い 体や つるなどを 使って 4ー5ターンの 間 相手に まきついて 攻撃する。" }, "takeDown": { "name": "とっしん", - "effect": "すごい 勢いで 相手に ぶつかって 攻撃する。 自分も 少し ダメージを 受ける。" + "effect": "すごい 勢いで 相手に ぶつかって 攻撃する。 自分も 少し ダメージを 受ける。" }, "thrash": { "name": "あばれる", - "effect": "2ー3ターンの 間 暴れまくって 相手を 攻撃する。 暴れたあとは 混乱する。" + "effect": "2ー3ターンの 間 暴れまくって 相手を 攻撃する。 暴れたあとは 混乱する。" }, "doubleEdge": { "name": "すてみタックル", - "effect": "命を 懸けて 相手に 突進して 攻撃する。 自分も かなり ダメージを 受ける。" + "effect": "命を 懸けて 相手に 突進して 攻撃する。 自分も かなり ダメージを 受ける。" }, "tailWhip": { "name": "しっぽをふる", - "effect": "しっぽを 左右に かわいく ふって 油断を 誘う。 相手の 防御を さげる。" + "effect": "しっぽを 左右に かわいく ふって 油断を 誘う。 相手の 防御を さげる。" }, "poisonSting": { "name": "どくばり", - "effect": "毒の ある ハリを 相手に 突き刺して 攻撃する。 毒状態に することが ある。" + "effect": "毒の ある ハリを 相手に 突き刺して 攻撃する。 毒状態に することが ある。" }, "twineedle": { "name": "ダブルニードル", - "effect": "2本の ハリを 相手に 突き刺し 2回連続で ダメージ。 毒状態に することが ある。" + "effect": "2本の ハリを 相手に 突き刺し 2回連続で ダメージ。 毒状態に することが ある。" }, "pinMissile": { "name": "ミサイルばり", - "effect": "鋭い ハリを 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "鋭い ハリを 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" }, "leer": { "name": "にらみつける", - "effect": "鋭い 目つきで おびえさせて 相手の 防御を さげる。" + "effect": "鋭い 目つきで おびえさせて 相手の 防御を さげる。" }, "bite": { "name": "かみつく", - "effect": "鋭く とがった 歯で かみついて 攻撃する。 相手を ひるませることが ある。" + "effect": "鋭く とがった 歯で かみついて 攻撃する。 相手を ひるませることが ある。" }, "growl": { "name": "なきごえ", - "effect": "かわいい なきごえを 聞かせて 気を ひき 油断を させて 相手の 攻撃を さげる。" + "effect": "かわいい なきごえを 聞かせて 気を ひき 油断を させて 相手の 攻撃を さげる。" }, "roar": { "name": "ほえる", - "effect": "相手を 逃がして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" + "effect": "相手を 逃がして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" }, "sing": { "name": "うたう", - "effect": "心地好い きれいな 歌声を 聞かせて 相手を 眠り状態に する。" + "effect": "心地好い きれいな 歌声を 聞かせて 相手を 眠り状態に する。" }, "supersonic": { "name": "ちょうおんぱ", - "effect": "特殊な 音波を 体から 発して 相手を 混乱させる。" + "effect": "特殊な 音波を 体から 発して 相手を 混乱させる。" }, "sonicBoom": { "name": "ソニックブーム", - "effect": "衝撃波を 相手に ぶつけて 攻撃する。 20の ダメージを 決まって 与える。" + "effect": "衝撃波を 相手に ぶつけて 攻撃する。 20の ダメージを 決まって 与える。" }, "disable": { "name": "かなしばり", - "effect": "相手の 動きを とめて 直前に だしていた 技を 4ターンの 間 使えなくする。" + "effect": "相手の 動きを とめて 直前に だしていた 技を 4ターンの 間 使えなくする。" }, "acid": { "name": "ようかいえき", - "effect": "強い 酸を 相手に かけて 攻撃する。 相手の 特防を さげることが ある。" + "effect": "強い 酸を 相手に かけて 攻撃する。 相手の 特防を さげることが ある。" }, "ember": { "name": "ひのこ", - "effect": "小さな 炎を 相手に 発射して 攻撃する。 やけど状態に することが ある。" + "effect": "小さな 炎を 相手に 発射して 攻撃する。 やけど状態に することが ある。" }, "flamethrower": { "name": "かえんほうしゃ", - "effect": "激しい 炎を 相手に 発射して 攻撃する。 やけど状態に することが ある。" + "effect": "激しい 炎を 相手に 発射して 攻撃する。 やけど状態に することが ある。" }, "mist": { "name": "しろいきり", - "effect": "白い霧で 体を おおう。 5ターンの 間 相手に 能力を さげられなく なる。" + "effect": "白い霧で 体を おおう。 5ターンの 間 相手に 能力を さげられなく なる。" }, "waterGun": { "name": "みずでっぽう", - "effect": "水を 勢いよく 相手に 発射して 攻撃する。" + "effect": "水を 勢いよく 相手に 発射して 攻撃する。" }, "hydroPump": { "name": "ハイドロポンプ", - "effect": "大量の 水を 激しい 勢いで 相手に 発射して 攻撃する。" + "effect": "大量の 水を 激しい 勢いで 相手に 発射して 攻撃する。" }, "surf": { "name": "なみのり", - "effect": "大きな 波で 自分の 周りに いるものを 攻撃する。" + "effect": "大きな 波で 自分の 周りに いるものを 攻撃する。" }, "iceBeam": { "name": "れいとうビーム", - "effect": "凍える ビームを 相手に 発射して 攻撃する。 こおり状態に することが ある。" + "effect": "凍える ビームを 相手に 発射して 攻撃する。 こおり状態に することが ある。" }, "blizzard": { "name": "ふぶき", - "effect": "激しい 吹雪を 相手に 吹きつけて 攻撃する。 こおり状態に することが ある。" + "effect": "激しい 吹雪を 相手に 吹きつけて 攻撃する。 こおり状態に することが ある。" }, "psybeam": { "name": "サイケこうせん", - "effect": "不思議な 光線を 相手に 発射して 攻撃する。 混乱させることが ある。" + "effect": "不思議な 光線を 相手に 発射して 攻撃する。 混乱させることが ある。" }, "bubbleBeam": { "name": "バブルこうせん", - "effect": "泡を 勢いよく 相手に 発射して 攻撃する。 素早さを さげる ことが ある。" + "effect": "泡を 勢いよく 相手に 発射して 攻撃する。 素早さを さげる ことが ある。" }, "auroraBeam": { "name": "オーロラビーム", - "effect": "にじいろの ビームを 相手に 発射して 攻撃する。 攻撃を さげる ことが ある。" + "effect": "にじいろの ビームを 相手に 発射して 攻撃する。 攻撃を さげる ことが ある。" }, "hyperBeam": { "name": "はかいこうせん", - "effect": "強い 光線を 相手に 発射して 攻撃する。 次の ターンは 動けなくなる。" + "effect": "強い 光線を 相手に 発射して 攻撃する。 次の ターンは 動けなくなる。" }, "peck": { "name": "つつく", - "effect": "鋭く とがった くちばしや つので 相手を 突いて 攻撃する。" + "effect": "鋭く とがった くちばしや つので 相手を 突いて 攻撃する。" }, "drillPeck": { "name": "ドリルくちばし", - "effect": "回転しながら とがった くちばしを 相手に 突き刺して 攻撃する。" + "effect": "回転しながら とがった くちばしを 相手に 突き刺して 攻撃する。" }, "submission": { "name": "じごくぐるま", - "effect": "地面に 自分ごと 相手を 投げつけて 攻撃する。 自分も 少し ダメージを 受ける。" + "effect": "地面に 自分ごと 相手を 投げつけて 攻撃する。 自分も 少し ダメージを 受ける。" }, "lowKick": { "name": "けたぐり", - "effect": "足を 強く けり 相手を 転ばせて 攻撃する。 相手が 重いほど 威力が あがる。" + "effect": "足を 強く けり 相手を 転ばせて 攻撃する。 相手が 重いほど 威力が あがる。" }, "counter": { "name": "カウンター", - "effect": "相手から 受けた 物理攻撃の ダメージを 2倍に して 同じ 相手に 返す。" + "effect": "相手から 受けた 物理攻撃の ダメージを 2倍に して 同じ 相手に 返す。" }, "seismicToss": { "name": "ちきゅうなげ", - "effect": "引力を 使い 投げとばす。 自分の レベルと 同じ ダメージを 相手に 与える。" + "effect": "引力を 使い 投げとばす。 自分の レベルと 同じ ダメージを 相手に 与える。" }, "strength": { "name": "かいりき", - "effect": "こん身の 力で 相手を なぐりつけて 攻撃する。" + "effect": "こん身の 力で 相手を なぐりつけて 攻撃する。" }, "absorb": { "name": "すいとる", - "effect": "養分を 吸い取り 攻撃する。 相手に 与えた ダメージの 半分の HPを 回復できる。" + "effect": "養分を 吸い取り 攻撃する。 相手に 与えた ダメージの 半分の HPを 回復できる。" }, "megaDrain": { "name": "メガドレイン", - "effect": "養分を 吸い取り 攻撃する。 相手に 与えた ダメージの 半分の HPを 回復できる。" + "effect": "養分を 吸い取り 攻撃する。 相手に 与えた ダメージの 半分の HPを 回復できる。" }, "leechSeed": { "name": "やどりぎのタネ", - "effect": "植えつけた 相手の HPを 毎ターン 少しだけ 吸い取り 自分の HPを 回復する。" + "effect": "植えつけた 相手の HPを 毎ターン 少しだけ 吸い取り 自分の HPを 回復する。" }, "growth": { "name": "せいちょう", - "effect": "体を 一気に 大きく 生長させて 攻撃と 特攻を あげる。" + "effect": "体を 一気に 大きく 生長させて 攻撃と 特攻を あげる。" }, "razorLeaf": { "name": "はっぱカッター", - "effect": "はっぱを とばして 相手を 切りつけて 攻撃する。 急所に 当たりやすい。" + "effect": "はっぱを とばして 相手を 切りつけて 攻撃する。 急所に 当たりやすい。" }, "solarBeam": { "name": "ソーラービーム", - "effect": "1ターン目に 光を いっぱいに 集め 2ターン目に 光の 束を 発射して 攻撃する。" + "effect": "1ターン目に 光を いっぱいに 集め 2ターン目に 光の 束を 発射して 攻撃する。" }, "poisonPowder": { "name": "どくのこな", - "effect": "毒の ある 粉を たくさん ふりまいて 相手を 毒状態に する。" + "effect": "毒の ある 粉を たくさん ふりまいて 相手を 毒状態に する。" }, "stunSpore": { "name": "しびれごな", - "effect": "しびれる 粉を たくさん ふりまいて 相手を まひ状態に する。" + "effect": "しびれる 粉を たくさん ふりまいて 相手を まひ状態に する。" }, "sleepPowder": { "name": "ねむりごな", - "effect": "眠くなる 粉を たくさん ふりまいて 相手を 眠り状態に する。" + "effect": "眠くなる 粉を たくさん ふりまいて 相手を 眠り状態に する。" }, "petalDance": { "name": "はなびらのまい", - "effect": "2ー3ターンの 間 花を まきちらして 相手を 攻撃する。 まきちらした あとは 混乱する。" + "effect": "2ー3ターンの 間 花を まきちらして 相手を 攻撃する。 まきちらした あとは 混乱する。" }, "stringShot": { "name": "いとをはく", - "effect": "口から 吹きだした 糸を まきつけて 相手の 素早さを がくっと さげる。" + "effect": "口から 吹きだした 糸を まきつけて 相手の 素早さを がくっと さげる。" }, "dragonRage": { "name": "りゅうのいかり", - "effect": "怒りの 衝撃波を 相手に ぶつけて 攻撃する。 40の ダメージを 決まって 与える。" + "effect": "怒りの 衝撃波を 相手に ぶつけて 攻撃する。 40の ダメージを 決まって 与える。" }, "fireSpin": { "name": "ほのおのうず", - "effect": "激しく 渦をまく 炎の中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" + "effect": "激しく 渦をまく 炎の中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" }, "thunderShock": { "name": "でんきショック", - "effect": "電気の 刺激を 相手に 浴びせて 攻撃する。 まひ状態に することが ある。" + "effect": "電気の 刺激を 相手に 浴びせて 攻撃する。 まひ状態に することが ある。" }, "thunderbolt": { "name": "10まんボルト", - "effect": "強い 電撃を 相手に 浴びせて 攻撃する。 まひ状態に することが ある。" + "effect": "強い 電撃を 相手に 浴びせて 攻撃する。 まひ状態に することが ある。" }, "thunderWave": { "name": "でんじは", - "effect": "弱い 電撃を 浴びせることで 相手を まひ状態に する。" + "effect": "弱い 電撃を 浴びせることで 相手を まひ状態に する。" }, "thunder": { "name": "かみなり", - "effect": "激しい 雷を 相手に 落として 攻撃する。 まひ状態に することが ある。" + "effect": "激しい 雷を 相手に 落として 攻撃する。 まひ状態に することが ある。" }, "rockThrow": { "name": "いわおとし", - "effect": "小さな 岩を 持ちあげて 相手に 投げつけて 攻撃する。" + "effect": "小さな 岩を 持ちあげて 相手に 投げつけて 攻撃する。" }, "earthquake": { "name": "じしん", - "effect": "地震の 衝撃で 自分の 周りに いるものを 攻撃する。" + "effect": "地震の 衝撃で 自分の 周りに いるものを 攻撃する。" }, "fissure": { "name": "じわれ", - "effect": "地割れの 裂け目に 相手を 落として 攻撃する。 当たれば 一撃で ひんしに する。" + "effect": "地割れの 裂け目に 相手を 落として 攻撃する。 当たれば 一撃で ひんしに する。" }, "dig": { "name": "あなをほる", - "effect": "1ターン目に 潜り 2ターン目で 相手を 攻撃する。" + "effect": "1ターン目に 潜り 2ターン目で 相手を 攻撃する。" }, "toxic": { "name": "どくどく", - "effect": "相手を 猛毒の 状態に する。 ターンが すすむほど 毒の ダメージが 増えていく。" + "effect": "相手を 猛毒の 状態に する。 ターンが すすむほど 毒の ダメージが 増えていく。" }, "confusion": { "name": "ねんりき", - "effect": "弱い 念力を 相手に 送って 攻撃する。 相手を 混乱させることが ある。" + "effect": "弱い 念力を 相手に 送って 攻撃する。 相手を 混乱させることが ある。" }, "psychic": { "name": "サイコキネシス", - "effect": "強い 念力を 相手に 送って 攻撃する。 相手の 特防を さげることが ある。" + "effect": "強い 念力を 相手に 送って 攻撃する。 相手の 特防を さげることが ある。" }, "hypnosis": { "name": "さいみんじゅつ", - "effect": "眠気を 誘う 暗示を かけて 相手を 眠り状態に する。" + "effect": "眠気を 誘う 暗示を かけて 相手を 眠り状態に する。" }, "meditate": { "name": "ヨガのポーズ", - "effect": "眠っている 力を 体の 奥から ひきだして 自分の 攻撃を あげる。" + "effect": "眠っている 力を 体の 奥から ひきだして 自分の 攻撃を あげる。" }, "agility": { "name": "こうそくいどう", - "effect": "力を ぬいて 体を 軽くして 高速で 動く。 自分の 素早さを ぐーんと あげる。" + "effect": "力を ぬいて 体を 軽くして 高速で 動く。 自分の 素早さを ぐーんと あげる。" }, "quickAttack": { "name": "でんこうせっか", - "effect": "目にも 留まらぬ ものすごい 速さで 相手に つっこむ。 必ず 先制攻撃 できる。" + "effect": "目にも 留まらぬ ものすごい 速さで 相手に つっこむ。 必ず 先制攻撃 できる。" }, "rage": { "name": "いかり", - "effect": "技を だしたときに 攻撃を 受けると 怒りの 力で 攻撃が あがる。" + "effect": "技を だしたときに 攻撃を 受けると 怒りの 力で 攻撃が あがる。" }, "teleport": { "name": "テレポート", - "effect": "ひかえの ポケモンが いるときに 使うと 入れ替わる。 野生の ポケモンは 逃げてしまう。" + "effect": "ひかえの ポケモンが いるときに 使うと 入れ替わる。 野生の ポケモンは 逃げてしまう。" }, "nightShade": { "name": "ナイトヘッド", - "effect": "恐ろしい 幻を みせて 自分の レベルと 同じだけの ダメージを 相手に 与える。" + "effect": "恐ろしい 幻を みせて 自分の レベルと 同じだけの ダメージを 相手に 与える。" }, "mimic": { "name": "ものまね", - "effect": "相手が 最後に 使った 技を 戦闘の あいだ 自分の 技に することが できる。" + "effect": "相手が 最後に 使った 技を 戦闘の あいだ 自分の 技に することが できる。" }, "screech": { "name": "いやなおと", - "effect": "おもわず 耳を ふさぎたくなる いやなおとを だして 相手の 防御を がくっと さげる。" + "effect": "おもわず 耳を ふさぎたくなる いやなおとを だして 相手の 防御を がくっと さげる。" }, "doubleTeam": { "name": "かげぶんしん", - "effect": "素早い 動きで 分身を つくり 相手を まどわせて 回避率を あげる。" + "effect": "素早い 動きで 分身を つくり 相手を まどわせて 回避率を あげる。" }, "recover": { "name": "じこさいせい", - "effect": "細胞を 再生させて 自分の 最大HPの 半分の HPを 回復する。" + "effect": "細胞を 再生させて 自分の 最大HPの 半分の HPを 回復する。" }, "harden": { "name": "かたくなる", - "effect": "全身に 力を こめて 体を 硬くして 自分の 防御を あげる。" + "effect": "全身に 力を こめて 体を 硬くして 自分の 防御を あげる。" }, "minimize": { "name": "ちいさくなる", - "effect": "体を ちぢめて 小さく みせて 自分の 回避率を ぐーんと あげる。" + "effect": "体を ちぢめて 小さく みせて 自分の 回避率を ぐーんと あげる。" }, "smokescreen": { "name": "えんまく", - "effect": "煙や 墨などを 吹きかけて 相手の 命中率を さげる。" + "effect": "煙や 墨などを 吹きかけて 相手の 命中率を さげる。" }, "confuseRay": { "name": "あやしいひかり", - "effect": "怪しい 光を 相手に みせて まどわせる。 相手を 混乱させる。" + "effect": "怪しい 光を 相手に みせて まどわせる。 相手を 混乱させる。" }, "withdraw": { "name": "からにこもる", - "effect": "殻に 潜りこんで 身を守り 自分の 防御を あげる。" + "effect": "殻に 潜りこんで 身を守り 自分の 防御を あげる。" }, "defenseCurl": { "name": "まるくなる", - "effect": "体を まるめて ちぢこまり 自分の 防御を あげる。" + "effect": "体を まるめて ちぢこまり 自分の 防御を あげる。" }, "barrier": { "name": "バリアー", - "effect": "頑丈な 壁を つくって 自分の 防御を ぐーんと あげる。" + "effect": "頑丈な 壁を つくって 自分の 防御を ぐーんと あげる。" }, "lightScreen": { "name": "ひかりのかべ", - "effect": "5ターンの 間 不思議な かべで 相手から 受ける 特殊攻撃の ダメージを 弱める。" + "effect": "5ターンの 間 不思議な かべで 相手から 受ける 特殊攻撃の ダメージを 弱める。" }, "haze": { "name": "くろいきり", - "effect": "黒い霧を だして 戦闘に でている ポケモン 全員の 能力変化を もとに もどす。" + "effect": "黒い霧を だして 戦闘に でている ポケモン 全員の 能力変化を もとに もどす。" }, "reflect": { "name": "リフレクター", - "effect": "5ターンの 間 不思議な かべで 相手から 受ける 物理攻撃の ダメージを 弱める。" + "effect": "5ターンの 間 不思議な かべで 相手から 受ける 物理攻撃の ダメージを 弱める。" }, "focusEnergy": { "name": "きあいだめ", - "effect": "深く 息を 吸い 気合を こめる。 自分の 攻撃が 急所に 当たりやすくなる。" + "effect": "深く 息を 吸い 気合を こめる。 自分の 攻撃が 急所に 当たりやすくなる。" }, "bide": { "name": "がまん", - "effect": "2ターンの 間 攻撃に たえて 受けた ダメージを 2倍にして 相手に 返す。" + "effect": "2ターンの 間 攻撃に たえて 受けた ダメージを 2倍にして 相手に 返す。" }, "metronome": { "name": "ゆびをふる", - "effect": "指をふり 自分の 脳を 刺激して すべての 技の なかから どれか 1つを くりだす。" + "effect": "指をふり 自分の 脳を 刺激して すべての 技の なかから どれか 1つを くりだす。" }, "mirrorMove": { "name": "オウムがえし", - "effect": "相手の 使った 技を まねして 自分も 同じ技を 使う。" + "effect": "相手の 使った 技を まねして 自分も 同じ技を 使う。" }, "selfDestruct": { "name": "じばく", - "effect": "爆発を おこして 自分の 周りに いるものを 攻撃する。 使ったあとに ひんしに なる。" + "effect": "爆発を おこして 自分の 周りに いるものを 攻撃する。 使ったあとに ひんしに なる。" }, "eggBomb": { "name": "タマゴばくだん", - "effect": "大きな タマゴを 力いっぱい 相手に 投げつけて 攻撃する。" + "effect": "大きな タマゴを 力いっぱい 相手に 投げつけて 攻撃する。" }, "lick": { "name": "したでなめる", - "effect": "長い 舌で 相手を なめまわして 攻撃する。 まひ状態に することが ある。" + "effect": "長い 舌で 相手を なめまわして 攻撃する。 まひ状態に することが ある。" }, "smog": { "name": "スモッグ", - "effect": "汚れた ガスを 相手に 吹きつけて 攻撃する。 毒状態に することが ある。" + "effect": "汚れた ガスを 相手に 吹きつけて 攻撃する。 毒状態に することが ある。" }, "sludge": { "name": "ヘドロこうげき", - "effect": "汚い ヘドロを 相手に 投げつけて 攻撃する。 毒状態に することが ある。" + "effect": "汚い ヘドロを 相手に 投げつけて 攻撃する。 毒状態に することが ある。" }, "boneClub": { "name": "ホネこんぼう", - "effect": "手に 持った ホネで 相手を なぐりつけて 攻撃する。 相手を ひるませることが ある。" + "effect": "手に 持った ホネで 相手を なぐりつけて 攻撃する。 相手を ひるませることが ある。" }, "fireBlast": { "name": "だいもんじ", - "effect": "大の字の 炎で 相手を 焼きつくす。 やけど状態に することが ある。" + "effect": "大の字の 炎で 相手を 焼きつくす。 やけど状態に することが ある。" }, "waterfall": { "name": "たきのぼり", - "effect": "すごい 勢いで 相手に つっこむ。 相手を ひるませることが ある。" + "effect": "すごい 勢いで 相手に つっこむ。 相手を ひるませることが ある。" }, "clamp": { "name": "からではさむ", - "effect": "とても 頑丈な ぶあつい 殻に 4ー5ターンの 間 相手を はさんで 攻撃する。" + "effect": "とても 頑丈な ぶあつい 殻に 4ー5ターンの 間 相手を はさんで 攻撃する。" }, "swift": { "name": "スピードスター", - "effect": "星型の 光を 発射して 相手を 攻撃する。 攻撃は 必ず 命中する。" + "effect": "星型の 光を 発射して 相手を 攻撃する。 攻撃は 必ず 命中する。" }, "skullBash": { "name": "ロケットずつき", - "effect": "1ターン目に 頭を ひっこめて 防御を あげる。 2ターン目に 相手を 攻撃する。" + "effect": "1ターン目に 頭を ひっこめて 防御を あげる。 2ターン目に 相手を 攻撃する。" }, "spikeCannon": { "name": "とげキャノン", - "effect": "鋭い ハリを 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "鋭い ハリを 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" }, "constrict": { "name": "からみつく", - "effect": "触手や ツタなどを からみつけて 攻撃する。相手の 素早さを さげることが ある。" + "effect": "触手や ツタなどを からみつけて 攻撃する。相手の 素早さを さげることが ある。" }, "amnesia": { "name": "ドわすれ", - "effect": "頭を からにして 一瞬 なにかを 忘れることで 自分の 特防を ぐーんと あげる。" + "effect": "頭を からにして 一瞬 なにかを 忘れることで 自分の 特防を ぐーんと あげる。" }, "kinesis": { "name": "スプーンまげ", - "effect": "スプーンを まげて 注意を ひき 相手の 命中率を さげる。" + "effect": "スプーンを まげて 注意を ひき 相手の 命中率を さげる。" }, "softBoiled": { "name": "タマゴうみ", - "effect": "最大HPの 半分 自分の HPを 回復する。" + "effect": "最大HPの 半分 自分の HPを 回復する。" }, "highJumpKick": { "name": "とびひざげり", - "effect": "ジャンプからの ひざげりで 相手を 攻撃する。 はずすと 自分が ダメージを 受ける。" + "effect": "ジャンプからの ひざげりで 相手を 攻撃する。 はずすと 自分が ダメージを 受ける。" }, "glare": { "name": "へびにらみ", - "effect": "おなかの 模様で おびえさせて 相手を まひの 状態に する。" + "effect": "おなかの 模様で おびえさせて 相手を まひの 状態に する。" }, "dreamEater": { "name": "ゆめくい", - "effect": "寝ている 相手の 夢を 食べて 攻撃する。 ダメージの 半分の HPを 回復する。" + "effect": "寝ている 相手の 夢を 食べて 攻撃する。 ダメージの 半分の HPを 回復する。" }, "poisonGas": { "name": "どくガス", - "effect": "毒ガスを 相手の 顔に 吹きかけて 毒の 状態に する。" + "effect": "毒ガスを 相手の 顔に 吹きかけて 毒の 状態に する。" }, "barrage": { "name": "たまなげ", - "effect": "まるい ものを 相手に 投げつけて 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "まるい ものを 相手に 投げつけて 攻撃する。 2ー5回の 間 連続で だす。" }, "leechLife": { "name": "きゅうけつ", - "effect": "血を 吸い取って 相手を 攻撃する。 与えた ダメージの 半分の HPを 回復できる。" + "effect": "血を 吸い取って 相手を 攻撃する。 与えた ダメージの 半分の HPを 回復できる。" }, "lovelyKiss": { "name": "あくまのキッス", - "effect": "恐ろしい 顔で キスを せまる。 相手を 眠り状態に する。" + "effect": "恐ろしい 顔で キスを せまる。 相手を 眠り状態に する。" }, "skyAttack": { "name": "ゴッドバード", - "effect": "2ターン目に 相手を 攻撃する。 たまに ひるませる。 急所にも 当たりやすい。" + "effect": "2ターン目に 相手を 攻撃する。 たまに ひるませる。 急所にも 当たりやすい。" }, "transform": { "name": "へんしん", - "effect": "相手の ポケモンに 変身することで 相手と まったく 同じ 技が 使える。" + "effect": "相手の ポケモンに 変身することで 相手と まったく 同じ 技が 使える。" }, "bubble": { "name": "あわ", - "effect": "無数の 泡を 相手に 吹きかけて 攻撃する。 相手の 素早さを さげることが ある。" + "effect": "無数の 泡を 相手に 吹きかけて 攻撃する。 相手の 素早さを さげることが ある。" }, "dizzyPunch": { "name": "ピヨピヨパンチ", - "effect": "リズミカルに パンチを くりだして 相手を 攻撃する。 混乱させることが ある。" + "effect": "リズミカルに パンチを くりだして 相手を 攻撃する。 混乱させることが ある。" }, "spore": { "name": "キノコのほうし", - "effect": "催眠効果の ある 胞子を パラパラと ふりまき 相手を 眠り状態に する。" + "effect": "催眠効果の ある 胞子を パラパラと ふりまき 相手を 眠り状態に する。" }, "flash": { "name": "フラッシュ", - "effect": "まぶしい 光で 相手の 命中率を さげる。" + "effect": "まぶしい 光で 相手の 命中率を さげる。" }, "psywave": { "name": "サイコウェーブ", - "effect": "不思議な 念波を 相手に 発射して 攻撃する。 使うたびに ダメージが 変わる。" + "effect": "不思議な 念波を 相手に 発射して 攻撃する。 使うたびに ダメージが 変わる。" }, "splash": { "name": "はねる", - "effect": "攻撃もせずに ピョン ピョンと 跳ねるだけで なにも おこらない……。" + "effect": "攻撃もせずに ピョン ピョンと 跳ねるだけで なにも おこらない……。" }, "acidArmor": { "name": "とける", - "effect": "細胞の 変化で 液状に なり 自分の 防御を ぐーんと あげる。" + "effect": "細胞の 変化で 液状に なり 自分の 防御を ぐーんと あげる。" }, "crabhammer": { "name": "クラブハンマー", - "effect": "大きな ハサミを 相手に たたきつけて 攻撃する。 急所に 当たりやすい。" + "effect": "大きな ハサミを 相手に たたきつけて 攻撃する。 急所に 当たりやすい。" }, "explosion": { "name": "だいばくはつ", - "effect": "大きな 爆発で 自分の 周りに いるものを 攻撃する。 使ったあとに ひんしに なる。" + "effect": "大きな 爆発で 自分の 周りに いるものを 攻撃する。 使ったあとに ひんしに なる。" }, "furySwipes": { "name": "みだれひっかき", - "effect": "ツメや カマなどで 相手を ひっかいて 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "ツメや カマなどで 相手を ひっかいて 攻撃する。 2ー5回の 間 連続で だす。" }, "bonemerang": { "name": "ホネブーメラン", - "effect": "手に 持った ホネを 相手に 投げつけ 行きと 帰りの 2回連続で ダメージを 与える。" + "effect": "手に 持った ホネを 相手に 投げつけ 行きと 帰りの 2回連続で ダメージを 与える。" }, "rest": { "name": "ねむる", - "effect": "2ターンの 間 眠り続ける。 自分の HPと 状態異常を すべて 回復する。" + "effect": "2ターンの 間 眠り続ける。 自分の HPと 状態異常を すべて 回復する。" }, "rockSlide": { "name": "いわなだれ", - "effect": "大きな 岩を 激しく ぶつけて 攻撃する。 相手を ひるませることが ある。" + "effect": "大きな 岩を 激しく ぶつけて 攻撃する。 相手を ひるませることが ある。" }, "hyperFang": { "name": "ひっさつまえば", - "effect": "鋭い 前歯で 強く かみついて 攻撃する。 相手を ひるませることが ある。" + "effect": "鋭い 前歯で 強く かみついて 攻撃する。 相手を ひるませることが ある。" }, "sharpen": { "name": "かくばる", - "effect": "体の かどを 増やして カクカクに なることで 自分の 攻撃を あげる。" + "effect": "体の かどを 増やして カクカクに なることで 自分の 攻撃を あげる。" }, "conversion": { "name": "テクスチャー", - "effect": "自分の タイプを おぼえている 技で 一番 上の 技と 同じ タイプに する。" + "effect": "自分の タイプを おぼえている 技で 一番 上の 技と 同じ タイプに する。" }, "triAttack": { "name": "トライアタック", - "effect": "3つの 光線で 攻撃する。 まひか やけどか こおり状態の どれかに することが ある。" + "effect": "3つの 光線で 攻撃する。 まひか やけどか こおり状態の どれかに することが ある。" }, "superFang": { "name": "いかりのまえば", - "effect": "鋭い 前歯で 激しく かみついて 攻撃する。 相手の HPは 半分に なる。" + "effect": "鋭い 前歯で 激しく かみついて 攻撃する。 相手の HPは 半分に なる。" }, "slash": { "name": "きりさく", - "effect": "ツメや カマなどで 相手を 切り裂いて 攻撃する。 急所に 当たりやすい。" + "effect": "ツメや カマなどで 相手を 切り裂いて 攻撃する。 急所に 当たりやすい。" }, "substitute": { "name": "みがわり", - "effect": "自分の HPを 少し 削って 分身を だす。 分身は 自分の 身代わりに なる。" + "effect": "自分の HPを 少し 削って 分身を だす。 分身は 自分の 身代わりに なる。" }, "struggle": { "name": "わるあがき", - "effect": "自分の PPが なくなると あがいて 相手を 攻撃する。 自分も 少し ダメージを 受ける。" + "effect": "自分の PPが なくなると あがいて 相手を 攻撃する。 自分も 少し ダメージを 受ける。" }, "sketch": { "name": "スケッチ", - "effect": "相手が 使った 技を 自分の ものに する。 1回 使うと スケッチは 消える。" + "effect": "相手が 使った 技を 自分の ものに する。 1回 使うと スケッチは 消える。" }, "tripleKick": { "name": "トリプルキック", - "effect": "3回連続で キックを くりだして 攻撃する。 技が 当たるたびに 威力は あがる。" + "effect": "3回連続で キックを くりだして 攻撃する。 技が 当たるたびに 威力は あがる。" }, "thief": { "name": "どろぼう", - "effect": "攻撃と 同時に 道具を 盗もうとする。 盗む 可能性は 30%。" + "effect": "攻撃と 同時に 道具を 盗もうとする。 盗む 可能性は 30%。" }, "spiderWeb": { "name": "クモのす", - "effect": "ネバネバした 細い 糸を グルグルと からませて 相手を 戦闘から 逃げられなくする。" + "effect": "ネバネバした 細い 糸を グルグルと からませて 相手を 戦闘から 逃げられなくする。" }, "mindReader": { "name": "こころのめ", - "effect": "相手の 動きを 心で 感じて 次の 攻撃が 必ず 相手に 当たるように する。" + "effect": "相手の 動きを 心で 感じて 次の 攻撃が 必ず 相手に 当たるように する。" }, "nightmare": { "name": "あくむ", - "effect": "眠り状態の 相手に 悪夢を みせて 毎ターン 少しずつ HPを 減らしていく。" + "effect": "眠り状態の 相手に 悪夢を みせて 毎ターン 少しずつ HPを 減らしていく。" }, "flameWheel": { "name": "かえんぐるま", - "effect": "炎を まとい 相手に 突進して 攻撃する。 やけど状態に することが ある。" + "effect": "炎を まとい 相手に 突進して 攻撃する。 やけど状態に することが ある。" }, "snore": { "name": "いびき", - "effect": "自分が 寝ているときに 雑音を だして 攻撃する。 相手を ひるませることが ある。" + "effect": "自分が 寝ているときに 雑音を だして 攻撃する。 相手を ひるませることが ある。" }, "curse": { "name": "のろい", - "effect": "使う ポケモンが ゴーストタイプと それ以外 とでは 効果が 変わる。" + "effect": "使う ポケモンが ゴーストタイプと それ以外 とでは 効果が 変わる。" }, "flail": { "name": "じたばた", - "effect": "じたばた 暴れて 攻撃する。 自分の HPが 少ないほど 技の 威力は あがる。" + "effect": "じたばた 暴れて 攻撃する。 自分の HPが 少ないほど 技の 威力は あがる。" }, "conversion2": { "name": "テクスチャー2", - "effect": "相手が 最後に 使った技に 抵抗できる ように 自分の タイプを 変化させる。" + "effect": "相手が 最後に 使った技に 抵抗できる ように 自分の タイプを 変化させる。" }, "aeroblast": { "name": "エアロブラスト", - "effect": "空気の 渦を 発射して 攻撃する。 急所に 当たりやすい。" + "effect": "空気の 渦を 発射して 攻撃する。 急所に 当たりやすい。" }, "cottonSpore": { "name": "わたほうし", - "effect": "綿のような フワフワの 胞子を まとわり つかせて 相手の 素早さを がくっと さげる。" + "effect": "綿のような フワフワの 胞子を まとわり つかせて 相手の 素早さを がくっと さげる。" }, "reversal": { "name": "きしかいせい", - "effect": "力を ふりしぼり 攻撃する。 自分の HPが 少ないほど 技の 威力は あがる。" + "effect": "力を ふりしぼり 攻撃する。 自分の HPが 少ないほど 技の 威力は あがる。" }, "spite": { "name": "うらみ", - "effect": "相手が 最後に 使った技に 恨みを 抱いて その技の PPを 4だけ 減らす。" + "effect": "相手が 最後に 使った技に 恨みを 抱いて その技の PPを 4だけ 減らす。" }, "powderSnow": { "name": "こなゆき", - "effect": "冷たい 粉雪を 相手に 吹きつけて 攻撃する。 こおり状態に することが ある。" + "effect": "冷たい 粉雪を 相手に 吹きつけて 攻撃する。 こおり状態に することが ある。" }, "protect": { "name": "まもる", - "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。" + "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。" }, "machPunch": { "name": "マッハパンチ", - "effect": "目にも 留まらぬ ものすごい 速さで パンチを くりだす。 必ず 先制攻撃 できる。" + "effect": "目にも 留まらぬ ものすごい 速さで パンチを くりだす。 必ず 先制攻撃 できる。" }, "scaryFace": { "name": "こわいかお", - "effect": "恐ろしい 顔で にらみ おびえさせて 相手の 素早さを がくっと さげる。" + "effect": "恐ろしい 顔で にらみ おびえさせて 相手の 素早さを がくっと さげる。" }, "feintAttack": { "name": "だましうち", - "effect": "さりげなく 相手に ちかづき 油断した すきを みて なぐりつける。 攻撃は 必ず 命中する。" + "effect": "さりげなく 相手に ちかづき 油断した すきを みて なぐりつける。 攻撃は 必ず 命中する。" }, "sweetKiss": { "name": "てんしのキッス", - "effect": "天使のように かわいく キスして 相手を 混乱させる。" + "effect": "天使のように かわいく キスして 相手を 混乱させる。" }, "bellyDrum": { "name": "はらだいこ", - "effect": "自分の HPを 最大HPの 半分 減らして 自分の 攻撃を 最大に あげる。" + "effect": "自分の HPを 最大HPの 半分 減らして 自分の 攻撃を 最大に あげる。" }, "sludgeBomb": { "name": "ヘドロばくだん", - "effect": "汚い ヘドロを 相手に 投げつけて 攻撃する。 毒状態に することが ある。" + "effect": "汚い ヘドロを 相手に 投げつけて 攻撃する。 毒状態に することが ある。" }, "mudSlap": { "name": "どろかけ", - "effect": "相手の 顔などに 泥を 投げつけて 攻撃する。 命中率を さげる。" + "effect": "相手の 顔などに 泥を 投げつけて 攻撃する。 命中率を さげる。" }, "octazooka": { "name": "オクタンほう", - "effect": "相手の 顔などに 墨を 吹きかけて 攻撃する。 命中率を さげることが ある。" + "effect": "相手の 顔などに 墨を 吹きかけて 攻撃する。 命中率を さげることが ある。" }, "spikes": { "name": "まきびし", - "effect": "相手の 足下に まきびしを しかける。交代で でてきた 相手の ポケモンに ダメージを 与える。" + "effect": "相手の 足下に まきびしを しかける。交代で でてきた 相手の ポケモンに ダメージを 与える。" }, "zapCannon": { "name": "でんじほう", - "effect": "大砲の ような 電気を 発射して 攻撃する。 相手を まひの 状態に する。" + "effect": "大砲の ような 電気を 発射して 攻撃する。 相手を まひの 状態に する。" }, "foresight": { "name": "みやぶる", - "effect": "ゴーストタイプに 効果がない 技や 回避率の 高い 相手に 攻撃が 当たるように なる。" + "effect": "ゴーストタイプに 効果がない 技や 回避率の 高い 相手に 攻撃が 当たるように なる。" }, "destinyBond": { "name": "みちづれ", - "effect": "技のあと 相手の 攻撃で ひんしに なると 攻撃 相手も ひんしにする。 連続して 出すと 失敗する。" + "effect": "技のあと 相手の 攻撃で ひんしに なると 攻撃 相手も ひんしにする。 連続して 出すと 失敗する。" }, "perishSong": { "name": "ほろびのうた", - "effect": "歌を 聴いた ポケモンは 3ターン たつと ひんしに なる。 交代すると 効果は なくなる。" + "effect": "歌を 聴いた ポケモンは 3ターン たつと ひんしに なる。 交代すると 効果は なくなる。" }, "icyWind": { "name": "こごえるかぜ", - "effect": "凍てつく 冷気を 相手に 吹きつけて 攻撃する。 相手の 素早さを さげる。" + "effect": "凍てつく 冷気を 相手に 吹きつけて 攻撃する。 相手の 素早さを さげる。" }, "detect": { "name": "みきり", - "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。" + "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。" }, "boneRush": { "name": "ボーンラッシュ", - "effect": "硬い ホネで 相手を なぐりつけて 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "硬い ホネで 相手を なぐりつけて 攻撃する。 2ー5回の 間 連続で だす。" }, "lockOn": { "name": "ロックオン", - "effect": "照準を しっかり あわせて 次の 攻撃が 必ず 相手に 当たるように する。" + "effect": "照準を しっかり あわせて 次の 攻撃が 必ず 相手に 当たるように する。" }, "outrage": { "name": "げきりん", - "effect": "2ー3ターンの 間 暴れまくって 相手を 攻撃する。 暴れたあとは 混乱する。" + "effect": "2ー3ターンの 間 暴れまくって 相手を 攻撃する。 暴れたあとは 混乱する。" }, "sandstorm": { "name": "すなあらし", - "effect": "5ターンの 間 砂あらしで いわ じめん はがねタイプ 以外に ダメージ。 いわタイプの 特防が あがる。" + "effect": "5ターンの 間 砂あらしで いわ じめん はがねタイプ 以外に ダメージ。 いわタイプの 特防が あがる。" }, "gigaDrain": { "name": "ギガドレイン", - "effect": "養分を 吸い取り 攻撃する。 相手に 与えた ダメージの 半分の HPを 回復できる。" + "effect": "養分を 吸い取り 攻撃する。 相手に 与えた ダメージの 半分の HPを 回復できる。" }, "endure": { "name": "こらえる", - "effect": "攻撃を 受けても HPを 必ず 1だけ 残せる。 連続で だすと 失敗しやすい。" + "effect": "攻撃を 受けても HPを 必ず 1だけ 残せる。 連続で だすと 失敗しやすい。" }, "charm": { "name": "あまえる", - "effect": "かわいく みつめて 油断を 誘い 相手の 攻撃を がくっと さげる。" + "effect": "かわいく みつめて 油断を 誘い 相手の 攻撃を がくっと さげる。" }, "rollout": { "name": "ころがる", - "effect": "5ターンの 間 転がり続けて 攻撃する。 技が 当たるたびに 威力が あがる。" + "effect": "5ターンの 間 転がり続けて 攻撃する。 技が 当たるたびに 威力が あがる。" }, "falseSwipe": { "name": "みねうち", - "effect": "相手の HPが 必ず 1だけ 残るように 手加減して 攻撃する。" + "effect": "相手の HPが 必ず 1だけ 残るように 手加減して 攻撃する。" }, "swagger": { "name": "いばる", - "effect": "相手を 怒らせて 混乱させる。 怒りで 相手の 攻撃は ぐーんと あがってしまう。" + "effect": "相手を 怒らせて 混乱させる。 怒りで 相手の 攻撃は ぐーんと あがってしまう。" }, "milkDrink": { "name": "ミルクのみ", - "effect": "最大HPの 半分 自分の HPを 回復する。" + "effect": "最大HPの 半分 自分の HPを 回復する。" }, "spark": { "name": "スパーク", - "effect": "電気を まとい 相手に 突進して 攻撃する。 まひ状態に することが ある。" + "effect": "電気を まとい 相手に 突進して 攻撃する。 まひ状態に することが ある。" }, "furyCutter": { "name": "れんぞくぎり", - "effect": "カマや ツメなどで 相手を 切りつけて 攻撃する。 連続で 当てると 威力が あがる。" + "effect": "カマや ツメなどで 相手を 切りつけて 攻撃する。 連続で 当てると 威力が あがる。" }, "steelWing": { "name": "はがねのつばさ", - "effect": "硬い 翼を 相手に たたきつけて 攻撃する。 自分の 防御が あがることが ある。" + "effect": "硬い 翼を 相手に たたきつけて 攻撃する。 自分の 防御が あがることが ある。" }, "meanLook": { "name": "くろいまなざし", - "effect": "吸いこまれるような 黒い まなざしで じっと みつめて 相手を 戦闘から 逃げられなくする。" + "effect": "吸いこまれるような 黒い まなざしで じっと みつめて 相手を 戦闘から 逃げられなくする。" }, "attract": { "name": "メロメロ", - "effect": "♂なら♀を ♀なら♂を 誘惑して メロメロに する。 相手は 技が だしにくくなる。" + "effect": "♂なら♀を ♀なら♂を 誘惑して メロメロに する。 相手は 技が だしにくくなる。" }, "sleepTalk": { "name": "ねごと", - "effect": "自分が おぼえている 技の うち どれか 1つを くりだす。 自分が 寝ているときだけ 使える。" + "effect": "自分が おぼえている 技の うち どれか 1つを くりだす。 自分が 寝ているときだけ 使える。" }, "healBell": { "name": "いやしのすず", - "effect": "心地好い 鈴の 音色を 聞かせて 味方 全員の 状態異常を 回復 する。" + "effect": "心地好い 鈴の 音色を 聞かせて 味方 全員の 状態異常を 回復 する。" }, "return": { "name": "おんがえし", - "effect": "トレーナーの ために 全力で 相手を 攻撃する。 なついているほど 威力は あがる。" + "effect": "トレーナーの ために 全力で 相手を 攻撃する。 なついているほど 威力は あがる。" }, "present": { "name": "プレゼント", - "effect": "わなを しかけた 箱を 相手に わたして 攻撃する。HPが 回復して しまうことも ある。" + "effect": "わなを しかけた 箱を 相手に わたして 攻撃する。HPが 回復して しまうことも ある。" }, "frustration": { "name": "やつあたり", - "effect": "不満を はらすため 全力で 相手を 攻撃する。 なついていないほど 威力は あがる。" + "effect": "不満を はらすため 全力で 相手を 攻撃する。 なついていないほど 威力は あがる。" }, "safeguard": { "name": "しんぴのまもり", - "effect": "5ターンの 間 不思議な 力に 守られて 状態異常に ならなくなる。" + "effect": "5ターンの 間 不思議な 力に 守られて 状態異常に ならなくなる。" }, "painSplit": { "name": "いたみわけ", - "effect": "自分の HPと 相手の HPを あわせて それを 自分と 相手で なかよく わける。" + "effect": "自分の HPと 相手の HPを あわせて それを 自分と 相手で なかよく わける。" }, "sacredFire": { "name": "せいなるほのお", - "effect": "神秘の 炎で 相手を 焼きつくして 攻撃する。 やけど状態に することが ある。" + "effect": "神秘の 炎で 相手を 焼きつくして 攻撃する。 やけど状態に することが ある。" }, "magnitude": { "name": "マグニチュード", - "effect": "地面を 揺らして 自分の 周りに いるものを 攻撃する。 技の 威力は いろいろ 変わる。" + "effect": "地面を 揺らして 自分の 周りに いるものを 攻撃する。 技の 威力は いろいろ 変わる。" }, "dynamicPunch": { "name": "ばくれつパンチ", - "effect": "こん身の 力で パンチを くりだして 攻撃する。 相手を 必ず 混乱させる。" + "effect": "こん身の 力で パンチを くりだして 攻撃する。 相手を 必ず 混乱させる。" }, "megahorn": { "name": "メガホーン", - "effect": "硬くて りっぱな つので おもいっきり 相手を 突き刺して 攻撃する。" + "effect": "硬くて りっぱな つので おもいっきり 相手を 突き刺して 攻撃する。" }, "dragonBreath": { "name": "りゅうのいぶき", - "effect": "ものすごい 息を 相手に 吹きつけて 攻撃する。 まひ状態に することが ある。" + "effect": "ものすごい 息を 相手に 吹きつけて 攻撃する。 まひ状態に することが ある。" }, "batonPass": { "name": "バトンタッチ", - "effect": "控えの ポケモンと 入れ替わる。 能力変化は 替わった ポケモンが そのまま 受けつぐ。" + "effect": "控えの ポケモンと 入れ替わる。 能力変化は 替わった ポケモンが そのまま 受けつぐ。" }, "encore": { "name": "アンコール", - "effect": "相手に アンコールした 技を 3回 続けて 出させる。" + "effect": "相手に アンコールした 技を 3回 続けて 出させる。" }, "pursuit": { "name": "おいうち", - "effect": "相手 ポケモンが 入れ替わるときに 技を だしていると 倍の 威力で 攻撃できる。" + "effect": "相手 ポケモンが 入れ替わるときに 技を だしていると 倍の 威力で 攻撃できる。" }, "rapidSpin": { "name": "こうそくスピン", - "effect": "回転して 相手を 攻撃する。 しめつける まきつく やどりぎのタネ など 吹きとばす。自分の 素早さも あがる。" + "effect": "回転して 相手を 攻撃する。 しめつける まきつく やどりぎのタネ など 吹きとばす。自分の 素早さも あがる。" }, "sweetScent": { "name": "あまいかおり", - "effect": "香りで 相手の 回避率を がくっと さげる。" + "effect": "香りで 相手の 回避率を がくっと さげる。" }, "ironTail": { "name": "アイアンテール", - "effect": "硬い しっぽで 相手を たたきつけて 攻撃する。 相手の 防御を さげることが ある。" + "effect": "硬い しっぽで 相手を たたきつけて 攻撃する。 相手の 防御を さげることが ある。" }, "metalClaw": { "name": "メタルクロー", - "effect": "鋼鉄の ツメで 相手を 切り裂いて 攻撃する。 自分の 攻撃が あがることが ある。" + "effect": "鋼鉄の ツメで 相手を 切り裂いて 攻撃する。 自分の 攻撃が あがることが ある。" }, "vitalThrow": { "name": "あてみなげ", - "effect": "相手より あとに 攻撃する。 そのかわり 自分の 攻撃は 必ず 命中する。" + "effect": "相手より あとに 攻撃する。 そのかわり 自分の 攻撃は 必ず 命中する。" }, "morningSun": { "name": "あさのひざし", - "effect": "自分の HPを 回復する。 天気に よって 回復の 量が 変化する。" + "effect": "自分の HPを 回復する。 天気に よって 回復の 量が 変化する。" }, "synthesis": { "name": "こうごうせい", - "effect": "自分の HPを 回復する。 天気に よって 回復の 量が 変化する。" + "effect": "自分の HPを 回復する。 天気に よって 回復の 量が 変化する。" }, "moonlight": { "name": "つきのひかり", - "effect": "自分の HPを 回復する。 天気に よって 回復の 量が 変化する。" + "effect": "自分の HPを 回復する。 天気に よって 回復の 量が 変化する。" }, "hiddenPower": { "name": "めざめるパワー", - "effect": "技を 使った ポケモンに よって 技の タイプが 変わる。" + "effect": "技を 使った ポケモンに よって 技の タイプが 変わる。" }, "crossChop": { "name": "クロスチョップ", - "effect": "両手チョップを 相手に たたきつけて 攻撃する。 急所に 当たりやすい。" + "effect": "両手チョップを 相手に たたきつけて 攻撃する。 急所に 当たりやすい。" }, "twister": { "name": "たつまき", - "effect": "竜巻を おこして 相手を まきこみ 攻撃する。 相手を ひるませることが ある。" + "effect": "竜巻を おこして 相手を まきこみ 攻撃する。 相手を ひるませることが ある。" }, "rainDance": { "name": "あまごい", - "effect": "5ターンの 間 雨を 降らせて みずタイプの 威力を あげる。 ほのおタイプの 威力は さがる。" + "effect": "5ターンの 間 雨を 降らせて みずタイプの 威力を あげる。 ほのおタイプの 威力は さがる。" }, "sunnyDay": { "name": "にほんばれ", - "effect": "5ターンの 間 日差しを 強くして ほのおタイプの 威力を あげる。 みずタイプの 威力は さがる。" + "effect": "5ターンの 間 日差しを 強くして ほのおタイプの 威力を あげる。 みずタイプの 威力は さがる。" }, "crunch": { "name": "かみくだく", - "effect": "鋭い 歯で 相手を かみくだいて 攻撃する。 相手の 防御を さげることが ある。" + "effect": "鋭い 歯で 相手を かみくだいて 攻撃する。 相手の 防御を さげることが ある。" }, "mirrorCoat": { "name": "ミラーコート", - "effect": "相手から 受けた 特殊攻撃の ダメージを 2倍に して その相手に 返す。" + "effect": "相手から 受けた 特殊攻撃の ダメージを 2倍に して その相手に 返す。" }, "psychUp": { "name": "じこあんじ", - "effect": "自分に 暗示を かけることで 能力変化の 状態を 相手と 同じにする。" + "effect": "自分に 暗示を かけることで 能力変化の 状態を 相手と 同じにする。" }, "extremeSpeed": { "name": "しんそく", - "effect": "目にも 留まらぬ ものすごい 速さで 相手に 突進して 攻撃する。 必ず 先制攻撃 できる。" + "effect": "目にも 留まらぬ ものすごい 速さで 相手に 突進して 攻撃する。 必ず 先制攻撃 できる。" }, "ancientPower": { "name": "げんしのちから", - "effect": "原始の 力で 攻撃する。 自分の すべての 能力が あがることが ある。" + "effect": "原始の 力で 攻撃する。 自分の すべての 能力が あがることが ある。" }, "shadowBall": { "name": "シャドーボール", - "effect": "黒い影の 塊を 投げつけて 攻撃する。 相手の 特防を さげることが ある。" + "effect": "黒い影の 塊を 投げつけて 攻撃する。 相手の 特防を さげることが ある。" }, "futureSight": { "name": "みらいよち", - "effect": "技を 使った 2ターン後に 相手に 念力の 塊を 送って 攻撃する。" + "effect": "技を 使った 2ターン後に 相手に 念力の 塊を 送って 攻撃する。" }, "rockSmash": { "name": "いわくだき", - "effect": "パンチで 攻撃する。相手の 防御を さげる ことが ある。" + "effect": "パンチで 攻撃する。相手の 防御を さげる ことが ある。" }, "whirlpool": { "name": "うずしお", - "effect": "激しく 渦をまく 水の中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" + "effect": "激しく 渦をまく 水の中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" }, "beatUp": { "name": "ふくろだたき", - "effect": "味方 全員で 攻撃する。 仲間の ポケモンが 多いほど 技の 攻撃回数が 増える。" + "effect": "味方 全員で 攻撃する。 仲間の ポケモンが 多いほど 技の 攻撃回数が 増える。" }, "fakeOut": { "name": "ねこだまし", - "effect": "先制攻撃で 相手を ひるませる。 戦闘に でたら すぐに ださないと 成功しない。" + "effect": "先制攻撃で 相手を ひるませる。 戦闘に でたら すぐに ださないと 成功しない。" }, "uproar": { "name": "さわぐ", - "effect": "3ターンの 間 騒いで 相手を 攻撃する。 そのあいだは だれも 眠れなくなる。" + "effect": "3ターンの 間 騒いで 相手を 攻撃する。 そのあいだは だれも 眠れなくなる。" }, "stockpile": { "name": "たくわえる", - "effect": "力を 蓄えて 自分の 防御と 特防を あげる。 最大 3回まで 蓄えられる。" + "effect": "力を 蓄えて 自分の 防御と 特防を あげる。 最大 3回まで 蓄えられる。" }, "spitUp": { "name": "はきだす", - "effect": "蓄えた 力を 相手に ぶつけて 攻撃する。 蓄えているほど 威力が あがる。" + "effect": "蓄えた 力を 相手に ぶつけて 攻撃する。 蓄えているほど 威力が あがる。" }, "swallow": { "name": "のみこむ", - "effect": "蓄えた 力を のみこんで 自分の HPを 回復する。 蓄えているほど 回復する。" + "effect": "蓄えた 力を のみこんで 自分の HPを 回復する。 蓄えているほど 回復する。" }, "heatWave": { "name": "ねっぷう", - "effect": "熱い 息を 相手に 吹きつけて 攻撃する。 やけど状態に することが ある。" + "effect": "熱い 息を 相手に 吹きつけて 攻撃する。 やけど状態に することが ある。" }, "hail": { "name": "あられ", - "effect": "5ターンの 間 あられを 降らして こおりタイプで ない ポケモン 全員に ダメージを 与える。" + "effect": "5ターンの 間 あられを 降らして こおりタイプで ない ポケモン 全員に ダメージを 与える。" }, "torment": { "name": "いちゃもん", - "effect": "相手に いちゃもんを つけて 同じ 技を 2回連続で だせなくする。" + "effect": "相手に いちゃもんを つけて 同じ 技を 2回連続で だせなくする。" }, "flatter": { "name": "おだてる", - "effect": "相手を おだてて 混乱させる。 同時に 相手の 特攻も あげてしまう。" + "effect": "相手を おだてて 混乱させる。 同時に 相手の 特攻も あげてしまう。" }, "willOWisp": { "name": "おにび", - "effect": "不気味で 怪しい 炎を 放って 相手を やけどの 状態に する。" + "effect": "不気味で 怪しい 炎を 放って 相手を やけどの 状態に する。" }, "memento": { "name": "おきみやげ", - "effect": "自分は ひんしに なるが そのかわりに 相手の 攻撃と 特攻を がくっと さげる。" + "effect": "自分は ひんしに なるが そのかわりに 相手の 攻撃と 特攻を がくっと さげる。" }, "facade": { "name": "からげんき", - "effect": "自分が 毒 まひ やけど 状態のとき 相手に くりだすと 技の 威力が 2倍に なる。" + "effect": "自分が 毒 まひ やけど 状態のとき 相手に くりだすと 技の 威力が 2倍に なる。" }, "focusPunch": { "name": "きあいパンチ", - "effect": "精神を 高めて パンチを くりだす。 技を だすまでに 攻撃を 受けると 失敗する。" + "effect": "精神を 高めて パンチを くりだす。 技を だすまでに 攻撃を 受けると 失敗する。" }, "smellingSalts": { "name": "きつけ", - "effect": "まひ状態の 相手には 威力が 2倍に なるが かわりに 相手の まひが 治る。" + "effect": "まひ状態の 相手には 威力が 2倍に なるが かわりに 相手の まひが 治る。" }, "followMe": { "name": "このゆびとまれ", - "effect": "自分に 注目させて 相手からの 攻撃を すべて 自分に むけさせる。" + "effect": "自分に 注目させて 相手からの 攻撃を すべて 自分に むけさせる。" }, "naturePower": { "name": "しぜんのちから", - "effect": "自然の 力で 攻撃する。 使う 場所で でてくる 技が 変化する。" + "effect": "自然の 力で 攻撃する。 使う 場所で でてくる 技が 変化する。" }, "charge": { "name": "じゅうでん", - "effect": "次の ターンに だす でんきタイプの 技の 威力を あげる。 自分の 特防も あがる。" + "effect": "次の ターンに だす でんきタイプの 技の 威力を あげる。 自分の 特防も あがる。" }, "taunt": { "name": "ちょうはつ", - "effect": "相手を 怒らせる。 3ターンの 間 相手は ダメージを 与える 技しか だせなくなる。" + "effect": "相手を 怒らせる。 3ターンの 間 相手は ダメージを 与える 技しか だせなくなる。" }, "helpingHand": { "name": "てだすけ", - "effect": "仲間を 助ける。 てだすけ された ポケモンの 技の 威力は いつもより 大きくなる。" + "effect": "仲間を 助ける。 てだすけ された ポケモンの 技の 威力は いつもより 大きくなる。" }, "trick": { "name": "トリック", - "effect": "相手の すきを ついて 自分と 相手の 持ち物を 交換する。" + "effect": "相手の すきを ついて 自分と 相手の 持ち物を 交換する。" }, "rolePlay": { "name": "なりきり", - "effect": "相手に なりきって 自分も 相手と 同じ 特性に 変化する。" + "effect": "相手に なりきって 自分も 相手と 同じ 特性に 変化する。" }, "wish": { "name": "ねがいごと", - "effect": "次の ターンに 自分 もしくは 入れ替わった ポケモンの HPを 最大HPの 半分 回復する。" + "effect": "次の ターンに 自分 もしくは 入れ替わった ポケモンの HPを 最大HPの 半分 回復する。" }, "assist": { "name": "ねこのて", - "effect": "大急ぎで 味方の 助けを かりて 味方の ポケモンが おぼえている 技を どれか 1つ 使う。" + "effect": "大急ぎで 味方の 助けを かりて 味方の ポケモンが おぼえている 技を どれか 1つ 使う。" }, "ingrain": { "name": "ねをはる", - "effect": "大地に 根を 張り 毎ターン 自分の HPを 回復する。 根を 張っているので 入れ替えられない。" + "effect": "大地に 根を 張り 毎ターン 自分の HPを 回復する。 根を 張っているので 入れ替えられない。" }, "superpower": { "name": "ばかぢから", - "effect": "すごい 力を 発揮して 相手を 攻撃する。自分の 攻撃と 防御が さがる。" + "effect": "すごい 力を 発揮して 相手を 攻撃する。自分の 攻撃と 防御が さがる。" }, "magicCoat": { "name": "マジックコート", - "effect": "状態異常に なる 技や やどりぎのタネ などを だされたとき 相手に 跳ね返す。" + "effect": "状態異常に なる 技や やどりぎのタネ などを だされたとき 相手に 跳ね返す。" }, "recycle": { "name": "リサイクル", - "effect": "戦闘中に 使って なくなった 自分の 持ち物を 再生させて 使えるように する。" + "effect": "戦闘中に 使って なくなった 自分の 持ち物を 再生させて 使えるように する。" }, "revenge": { "name": "リベンジ", - "effect": "相手から 技を 受けていると その相手に 対して 与える ダメージが 2倍に なる。" + "effect": "相手から 技を 受けていると その相手に 対して 与える ダメージが 2倍に なる。" }, "brickBreak": { "name": "かわらわり", - "effect": "手刀を 勢いよく 振りおろして 相手を 攻撃する。 ひかりのかべや リフレクター なども 破壊できる。" + "effect": "手刀を 勢いよく 振りおろして 相手を 攻撃する。 ひかりのかべや リフレクター なども 破壊できる。" }, "yawn": { "name": "あくび", - "effect": "大きな あくびで 眠気を 誘う。 次の ターンに 相手を 眠り状態に する。" + "effect": "大きな あくびで 眠気を 誘う。 次の ターンに 相手を 眠り状態に する。" }, "knockOff": { "name": "はたきおとす", - "effect": "相手の 持ち物を はたき 落として 戦闘が 終わるまで 使えなくする。 物を持つ 相手には ダメージが増す。" + "effect": "相手の 持ち物を はたき 落として 戦闘が 終わるまで 使えなくする。 物を持つ 相手には ダメージが増す。" }, "endeavor": { "name": "がむしゃら", - "effect": "相手の HPが 自分の HPと 同じくらいに なるように ダメージを 与える。" + "effect": "相手の HPが 自分の HPと 同じくらいに なるように ダメージを 与える。" }, "eruption": { "name": "ふんか", - "effect": "怒りを 爆発させて 相手を 攻撃する。 自分の HPが 少ないほど 技の 威力は さがる。" + "effect": "怒りを 爆発させて 相手を 攻撃する。 自分の HPが 少ないほど 技の 威力は さがる。" }, "skillSwap": { "name": "スキルスワップ", - "effect": "超能力で 自分の 特性と 相手の 特性を 入れ替える。" + "effect": "超能力で 自分の 特性と 相手の 特性を 入れ替える。" }, "imprison": { "name": "ふういん", - "effect": "相手が 自分と 同じ 技を おぼえていたら 相手だけ その技を 使えなくする。" + "effect": "相手が 自分と 同じ 技を おぼえていたら 相手だけ その技を 使えなくする。" }, "refresh": { "name": "リフレッシュ", - "effect": "体を やすめて 自分が おっている 毒 まひ やけどの 状態異常を 治す。" + "effect": "体を やすめて 自分が おっている 毒 まひ やけどの 状態異常を 治す。" }, "grudge": { "name": "おんねん", - "effect": "相手の 技で ひんしに されたとき おんねんを かけて その技の PPを 0に する。" + "effect": "相手の 技で ひんしに されたとき おんねんを かけて その技の PPを 0に する。" }, "snatch": { "name": "よこどり", - "effect": "相手が 使おうと した 回復技や 能力変化の 技を うばって 自分に 使う。" + "effect": "相手が 使おうと した 回復技や 能力変化の 技を うばって 自分に 使う。" }, "secretPower": { "name": "ひみつのちから", - "effect": "使う場所で 追加効果が 変化する 攻撃。" + "effect": "使う場所で 追加効果が 変化する 攻撃。" }, "dive": { "name": "ダイビング", - "effect": "1ターン目で 潜り 2ターン目に 浮きあがって 攻撃する。" + "effect": "1ターン目で 潜り 2ターン目に 浮きあがって 攻撃する。" }, "armThrust": { "name": "つっぱり", - "effect": "ひらいた 両手で 相手を つっぱって 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "ひらいた 両手で 相手を つっぱって 攻撃する。 2ー5回の 間 連続で だす。" }, "camouflage": { "name": "ほごしょく", - "effect": "水辺や 草むら どうくつなど いる 場所に あわせて 自分の タイプを 変える。" + "effect": "水辺や 草むら どうくつなど いる 場所に あわせて 自分の タイプを 変える。" }, "tailGlow": { "name": "ほたるび", - "effect": "点滅する 光を 眺めて 自分の 精神を 統一し 特攻を ぐぐーんと あげる。" + "effect": "点滅する 光を 眺めて 自分の 精神を 統一し 特攻を ぐぐーんと あげる。" }, "lusterPurge": { "name": "ラスターパージ", - "effect": "まばゆい 光を 解放して 攻撃する。 相手の 特防を さげることが ある。" + "effect": "まばゆい 光を 解放して 攻撃する。 相手の 特防を さげることが ある。" }, "mistBall": { "name": "ミストボール", - "effect": "霧状の 羽毛で 包みこみ 攻撃する。 相手の 特攻を さげることが ある。" + "effect": "霧状の 羽毛で 包みこみ 攻撃する。 相手の 特攻を さげることが ある。" }, "featherDance": { "name": "フェザーダンス", - "effect": "羽毛を ふりまいて 相手の 体に からませる。 相手の 攻撃を がくっと さげる。" + "effect": "羽毛を ふりまいて 相手の 体に からませる。 相手の 攻撃を がくっと さげる。" }, "teeterDance": { "name": "フラフラダンス", - "effect": "フラフラと ダンスを おどって 自分の 周りに いるものを 混乱状態に させる。" + "effect": "フラフラと ダンスを おどって 自分の 周りに いるものを 混乱状態に させる。" }, "blazeKick": { "name": "ブレイズキック", - "effect": "攻撃した 相手を やけど状態に することが ある。 急所にも 当たりやすい。" + "effect": "攻撃した 相手を やけど状態に することが ある。 急所にも 当たりやすい。" }, "mudSport": { "name": "どろあそび", - "effect": "あたりを 泥まみれにする。 5ターンの 間 でんきタイプの 技を 弱める。" + "effect": "あたりを 泥まみれにする。 5ターンの 間 でんきタイプの 技を 弱める。" }, "iceBall": { "name": "アイスボール", - "effect": "5ターンの 間 相手を 攻撃する。 技が 当たるたび 威力が あがる。" + "effect": "5ターンの 間 相手を 攻撃する。 技が 当たるたび 威力が あがる。" }, "needleArm": { "name": "ニードルアーム", - "effect": "トゲの 腕を 激しく ふるって 攻撃する。 相手を ひるませることが ある。" + "effect": "トゲの 腕を 激しく ふるって 攻撃する。 相手を ひるませることが ある。" }, "slackOff": { "name": "なまける", - "effect": "怠けて やすむ。 自分の HPを 最大HPの 半分 回復する。" + "effect": "怠けて やすむ。 自分の HPを 最大HPの 半分 回復する。" }, "hyperVoice": { "name": "ハイパーボイス", - "effect": "うるさく 響く 大きな 振動を 相手に 与えて 攻撃する。" + "effect": "うるさく 響く 大きな 振動を 相手に 与えて 攻撃する。" }, "poisonFang": { "name": "どくどくのキバ", - "effect": "毒の ある キバで 相手に かみついて 攻撃する。 猛毒を おわせる ことが ある。" + "effect": "毒の ある キバで 相手に かみついて 攻撃する。 猛毒を おわせる ことが ある。" }, "crushClaw": { "name": "ブレイククロー", - "effect": "硬く 鋭い ツメで 切り裂いて 攻撃する。 相手の 防御を さげることが ある。" + "effect": "硬く 鋭い ツメで 切り裂いて 攻撃する。 相手の 防御を さげることが ある。" }, "blastBurn": { "name": "ブラストバーン", - "effect": "爆発の 炎で 相手を 焼きつくして 攻撃する。 次の ターンは 動けなくなる。" + "effect": "爆発の 炎で 相手を 焼きつくして 攻撃する。 次の ターンは 動けなくなる。" }, "hydroCannon": { "name": "ハイドロカノン", - "effect": "水の 大砲を 相手に 発射して 攻撃する。 次の ターンは 動けなくなる。" + "effect": "水の 大砲を 相手に 発射して 攻撃する。 次の ターンは 動けなくなる。" }, "meteorMash": { "name": "コメットパンチ", - "effect": "すい星の ごとく パンチを くりだして 相手を 攻撃する。 自分の 攻撃が あがることが ある。" + "effect": "すい星の ごとく パンチを くりだして 相手を 攻撃する。 自分の 攻撃が あがることが ある。" }, "astonish": { "name": "おどろかす", - "effect": "大きな 声などで 不意に 驚かして 攻撃する。 相手を ひるませることが ある。" + "effect": "大きな 声などで 不意に 驚かして 攻撃する。 相手を ひるませることが ある。" }, "weatherBall": { "name": "ウェザーボール", - "effect": "使ったときの 天気に よって 技の タイプと 威力が 変わる。" + "effect": "使ったときの 天気に よって 技の タイプと 威力が 変わる。" }, "aromatherapy": { "name": "アロマセラピー", - "effect": "心地好い やすらぐ 香りを かがせて 味方全員の 状態異常を 回復する。" + "effect": "心地好い やすらぐ 香りを かがせて 味方全員の 状態異常を 回復する。" }, "fakeTears": { "name": "うそなき", - "effect": "ないた ふりをして 涙を 流す。 こまらせる ことで 相手の 特防を がくっと さげる。" + "effect": "ないた ふりをして 涙を 流す。 こまらせる ことで 相手の 特防を がくっと さげる。" }, "airCutter": { "name": "エアカッター", - "effect": "鋭い 風で 相手を 切りつけて 攻撃する。 急所に 当たりやすい。" + "effect": "鋭い 風で 相手を 切りつけて 攻撃する。 急所に 当たりやすい。" }, "overheat": { "name": "オーバーヒート", - "effect": "フルパワーで 相手を 攻撃する。 使うと 反動で 自分の 特攻が がくっと さがる。" + "effect": "フルパワーで 相手を 攻撃する。 使うと 反動で 自分の 特攻が がくっと さがる。" }, "odorSleuth": { "name": "かぎわける", - "effect": "ゴーストタイプに 効果がない 技や 回避率の 高い 相手に 攻撃が 当たるように なる。" + "effect": "ゴーストタイプに 効果がない 技や 回避率の 高い 相手に 攻撃が 当たるように なる。" }, "rockTomb": { "name": "がんせきふうじ", - "effect": "岩石を 投げつけて 攻撃する。 相手の 動きを 封じることで 素早さを さげる。" + "effect": "岩石を 投げつけて 攻撃する。 相手の 動きを 封じることで 素早さを さげる。" }, "silverWind": { "name": "ぎんいろのかぜ", - "effect": "風に りんぷんを のせて 相手を 攻撃する。自分の すべての 能力が あがることが ある。" + "effect": "風に りんぷんを のせて 相手を 攻撃する。自分の すべての 能力が あがることが ある。" }, "metalSound": { "name": "きんぞくおん", - "effect": "金属を こすって でるような いやな 音を 聞かせる。 相手の 特防を がくっと さげる。" + "effect": "金属を こすって でるような いやな 音を 聞かせる。 相手の 特防を がくっと さげる。" }, "grassWhistle": { "name": "くさぶえ", - "effect": "心地好い 笛の 音色を 聞かせて 相手を 眠りの 状態に する。" + "effect": "心地好い 笛の 音色を 聞かせて 相手を 眠りの 状態に する。" }, "tickle": { "name": "くすぐる", - "effect": "体を くすぐり 笑わせる ことで 相手の 攻撃と 防御を さげる。" + "effect": "体を くすぐり 笑わせる ことで 相手の 攻撃と 防御を さげる。" }, "cosmicPower": { "name": "コスモパワー", - "effect": "宇宙から 神秘の 力を とりこむ ことで 自分の 防御と 特防を あげる。" + "effect": "宇宙から 神秘の 力を とりこむ ことで 自分の 防御と 特防を あげる。" }, "waterSpout": { "name": "しおふき", - "effect": "潮を 吹きつけて 攻撃する。 自分の HPが 少ないほど 技の 威力は さがる。" + "effect": "潮を 吹きつけて 攻撃する。 自分の HPが 少ないほど 技の 威力は さがる。" }, "signalBeam": { "name": "シグナルビーム", - "effect": "不思議な 光を 発射して 攻撃する。 相手を 混乱させることが ある。" + "effect": "不思議な 光を 発射して 攻撃する。 相手を 混乱させることが ある。" }, "shadowPunch": { "name": "シャドーパンチ", - "effect": "影に まぎれて パンチを くりだす。 攻撃は 必ず 命中する。" + "effect": "影に まぎれて パンチを くりだす。 攻撃は 必ず 命中する。" }, "extrasensory": { "name": "じんつうりき", - "effect": "みえない 不思議な 力を 送って 攻撃する。 相手を ひるませることが ある。" + "effect": "みえない 不思議な 力を 送って 攻撃する。 相手を ひるませることが ある。" }, "skyUppercut": { "name": "スカイアッパー", - "effect": "空に むかうような 高い アッパーで 相手を 突きあげて 攻撃する。" + "effect": "空に むかうような 高い アッパーで 相手を 突きあげて 攻撃する。" }, "sandTomb": { "name": "すなじごく", - "effect": "激しく 吹きあれる 砂あらしの 中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" + "effect": "激しく 吹きあれる 砂あらしの 中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" }, "sheerCold": { "name": "ぜったいれいど", - "effect": "相手を 一撃で 瀕死に する。 こおりタイプ 以外の ポケモンが 使うと 当たりにくい。" + "effect": "相手を 一撃で 瀕死に する。 こおりタイプ 以外の ポケモンが 使うと 当たりにくい。" }, "muddyWater": { "name": "だくりゅう", - "effect": "濁った 水を 相手に 発射して 攻撃する。 命中率を さげることが ある。" + "effect": "濁った 水を 相手に 発射して 攻撃する。 命中率を さげることが ある。" }, "bulletSeed": { "name": "タネマシンガン", - "effect": "タネを 勢いよく 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "タネを 勢いよく 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" }, "aerialAce": { "name": "つばめがえし", - "effect": "素早い 動きで 相手を ほんろうして 切りつける。 攻撃は 必ず 命中する。" + "effect": "素早い 動きで 相手を ほんろうして 切りつける。 攻撃は 必ず 命中する。" }, "icicleSpear": { "name": "つららばり", - "effect": "鋭い 氷柱を 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "鋭い 氷柱を 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" }, "ironDefense": { "name": "てっぺき", - "effect": "皮膚を 鉄のように 硬くする ことで 自分の 防御を ぐーんと あげる。" + "effect": "皮膚を 鉄のように 硬くする ことで 自分の 防御を ぐーんと あげる。" }, "block": { "name": "とおせんぼう", - "effect": "両手を ひろげて たちはだかり 相手の 逃げ道を ふさいで 逃げられなくする。" + "effect": "両手を ひろげて たちはだかり 相手の 逃げ道を ふさいで 逃げられなくする。" }, "howl": { "name": "とおぼえ", - "effect": "大声で ほえて 気合を 高め 自分と 味方の 攻撃を あげる。" + "effect": "大声で ほえて 気合を 高め 自分と 味方の 攻撃を あげる。" }, "dragonClaw": { "name": "ドラゴンクロー", - "effect": "鋭く とがった 巨大な ツメで 相手を 切り裂いて 攻撃する。" + "effect": "鋭く とがった 巨大な ツメで 相手を 切り裂いて 攻撃する。" }, "frenzyPlant": { "name": "ハードプラント", - "effect": "大きな 樹木で 相手を たたきつけて 攻撃する。 次の ターンは 動けなくなる。" + "effect": "大きな 樹木で 相手を たたきつけて 攻撃する。 次の ターンは 動けなくなる。" }, "bulkUp": { "name": "ビルドアップ", - "effect": "体に 力を こめて 筋肉を ぶあつく することで 自分の 攻撃と 防御を あげる。" + "effect": "体に 力を こめて 筋肉を ぶあつく することで 自分の 攻撃と 防御を あげる。" }, "bounce": { "name": "とびはねる", - "effect": "空高く 飛び跳ねて 2ターン目に 相手を 攻撃する。 まひ状態に することが ある。" + "effect": "空高く 飛び跳ねて 2ターン目に 相手を 攻撃する。 まひ状態に することが ある。" }, "mudShot": { "name": "マッドショット", - "effect": "泥の 塊を 相手に 投げつけて 攻撃する。 同時に 相手の 素早さを さげる。" + "effect": "泥の 塊を 相手に 投げつけて 攻撃する。 同時に 相手の 素早さを さげる。" }, "poisonTail": { "name": "ポイズンテール", - "effect": "しっぽで たたく。 毒状態に することが あり 急所にも 当たりやすい。" + "effect": "しっぽで たたく。 毒状態に することが あり 急所にも 当たりやすい。" }, "covet": { "name": "ほしがる", - "effect": "かわいく あまえながら 相手に ちかづき 持っている 道具を うばおうとする。 うばう 可能性は 30%。" + "effect": "かわいく あまえながら 相手に ちかづき 持っている 道具を うばおうとする。 うばう 可能性は 30%。" }, "voltTackle": { "name": "ボルテッカー", - "effect": "電気を まとって 突進する。 自分も かなり ダメージを 受ける。 まひ状態に することが ある。" + "effect": "電気を まとって 突進する。 自分も かなり ダメージを 受ける。 まひ状態に することが ある。" }, "magicalLeaf": { "name": "マジカルリーフ", - "effect": "相手を 追跡する 不思議な はっぱを まきちらす。 攻撃は 必ず 命中する。" + "effect": "相手を 追跡する 不思議な はっぱを まきちらす。 攻撃は 必ず 命中する。" }, "waterSport": { "name": "みずあそび", - "effect": "あたりを 水で びしょびしょにする。 5ターンの 間 ほのおタイプの 技を 弱める。" + "effect": "あたりを 水で びしょびしょにする。 5ターンの 間 ほのおタイプの 技を 弱める。" }, "calmMind": { "name": "めいそう", - "effect": "静かに 精神を 統一し 心を 鎮めることで 自分の 特攻と 特防を あげる。" + "effect": "静かに 精神を 統一し 心を 鎮めることで 自分の 特攻と 特防を あげる。" }, "leafBlade": { "name": "リーフブレード", - "effect": "はっぱを 剣のように あやつり 相手を 切りつけて 攻撃する。 急所に 当たりやすい。" + "effect": "はっぱを 剣のように あやつり 相手を 切りつけて 攻撃する。 急所に 当たりやすい。" }, "dragonDance": { "name": "りゅうのまい", - "effect": "神秘的で 力強い 舞を 激しく おどる。 自分の 攻撃と 素早さを あげる。" + "effect": "神秘的で 力強い 舞を 激しく おどる。 自分の 攻撃と 素早さを あげる。" }, "rockBlast": { "name": "ロックブラスト", - "effect": "硬い 岩石を 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "硬い 岩石を 相手に 発射して 攻撃する。 2ー5回の 間 連続で だす。" }, "shockWave": { "name": "でんげきは", - "effect": "電撃を 素早く 相手に 浴びせる。 攻撃は 必ず 命中する。" + "effect": "電撃を 素早く 相手に 浴びせる。 攻撃は 必ず 命中する。" }, "waterPulse": { "name": "みずのはどう", - "effect": "水の 振動を 相手に 与えて 攻撃する。 相手を 混乱させることが ある。" + "effect": "水の 振動を 相手に 与えて 攻撃する。 相手を 混乱させることが ある。" }, "doomDesire": { "name": "はめつのねがい", - "effect": "技を 使った 2ターン後に 無数の 光の 束で 相手を 攻撃する。" + "effect": "技を 使った 2ターン後に 無数の 光の 束で 相手を 攻撃する。" }, "psychoBoost": { "name": "サイコブースト", - "effect": "フルパワーで 相手を 攻撃する。 使うと 反動で 自分の 特攻が がくっと さがる。" + "effect": "フルパワーで 相手を 攻撃する。 使うと 反動で 自分の 特攻が がくっと さがる。" }, "roost": { "name": "はねやすめ", - "effect": "地面に 降りて 体を やすめる。 最大HPの 半分の HPを 回復する。" + "effect": "地面に 降りて 体を やすめる。 最大HPの 半分の HPを 回復する。" }, "gravity": { "name": "じゅうりょく", - "effect": "5ターンの間 ふゆうや ひこうタイプに じめんタイプの 技が 当たるようになる。 空中に 飛ぶ 技も 使えない。" + "effect": "5ターンの間 ふゆうや ひこうタイプに じめんタイプの 技が 当たるようになる。 空中に 飛ぶ 技も 使えない。" }, "miracleEye": { "name": "ミラクルアイ", - "effect": "あくタイプに 効果がない 技や 回避率の 高い 相手に 攻撃が 当たるように なる。" + "effect": "あくタイプに 効果がない 技や 回避率の 高い 相手に 攻撃が 当たるように なる。" }, "wakeUpSlap": { "name": "めざましビンタ", - "effect": "眠り状態の 相手に 大きな ダメージを 与える。 かわりに 相手は 眠りから さめる。" + "effect": "眠り状態の 相手に 大きな ダメージを 与える。 かわりに 相手は 眠りから さめる。" }, "hammerArm": { "name": "アームハンマー", - "effect": "強くて 重い こぶしを ふるって ダメージを 与える。 自分の 素早さが さがる。" + "effect": "強くて 重い こぶしを ふるって ダメージを 与える。 自分の 素早さが さがる。" }, "gyroBall": { "name": "ジャイロボール", - "effect": "体を 高速に 回転させて 体当たりする。相手より 素早さが 低いほど 強い。" + "effect": "体を 高速に 回転させて 体当たりする。相手より 素早さが 低いほど 強い。" }, "healingWish": { "name": "いやしのねがい", - "effect": "自分は ひんしに なるが 控えから でてくる ポケモンの 状態異常と HPを 回復する。" + "effect": "自分は ひんしに なるが 控えから でてくる ポケモンの 状態異常と HPを 回復する。" }, "brine": { "name": "しおみず", - "effect": "相手が HPの 半分くらい きずを おっていると 技の 威力が 2倍に なる。" + "effect": "相手が HPの 半分くらい きずを おっていると 技の 威力が 2倍に なる。" }, "naturalGift": { "name": "しぜんのめぐみ", - "effect": "きのみから 力を もらい 攻撃する。持たせた きのみで 技の タイプと 威力が 変わる。" + "effect": "きのみから 力を もらい 攻撃する。持たせた きのみで 技の タイプと 威力が 変わる。" }, "feint": { "name": "フェイント", - "effect": "まもるや みきり などを している 相手に 攻撃が できる。 守りの 効果を 解除させる。" + "effect": "まもるや みきり などを している 相手に 攻撃が できる。 守りの 効果を 解除させる。" }, "pluck": { "name": "ついばむ", - "effect": "くちばしで 攻撃。 相手が きのみを 持っているとき 食べて きのみの 効果を 受けられる。" + "effect": "くちばしで 攻撃。 相手が きのみを 持っているとき 食べて きのみの 効果を 受けられる。" }, "tailwind": { "name": "おいかぜ", - "effect": "激しく 吹きあれる 風の渦を つくり 4ターンの 間 味方 全員の 素早さを あげる。" + "effect": "激しく 吹きあれる 風の渦を つくり 4ターンの 間 味方 全員の 素早さを あげる。" }, "acupressure": { "name": "つぼをつく", - "effect": "つぼおしで 体を 活性化させる。 能力の どれか 1つを ぐーんと あげる。" + "effect": "つぼおしで 体を 活性化させる。 能力の どれか 1つを ぐーんと あげる。" }, "metalBurst": { "name": "メタルバースト", - "effect": "技を だす前に 最後に 受けた 技の ダメージを 大きくして だした 相手に 返す。" + "effect": "技を だす前に 最後に 受けた 技の ダメージを 大きくして だした 相手に 返す。" }, "uTurn": { "name": "とんぼがえり", - "effect": "攻撃したあと ものすごい スピードで もどってきて 控えの ポケモンと 入れ替わる。" + "effect": "攻撃したあと ものすごい スピードで もどってきて 控えの ポケモンと 入れ替わる。" }, "closeCombat": { "name": "インファイト", - "effect": "守りを 捨てて 相手の ふところに 突撃する。 自分の 防御と 特防が さがる。" + "effect": "守りを 捨てて 相手の ふところに 突撃する。 自分の 防御と 特防が さがる。" }, "payback": { "name": "しっぺがえし", - "effect": "ためこんで 攻撃する。 相手より あとに 攻撃できると 技の 威力は 2倍に なる。" + "effect": "ためこんで 攻撃する。 相手より あとに 攻撃できると 技の 威力は 2倍に なる。" }, "assurance": { "name": "ダメおし", - "effect": "そのターンに 相手が すでに ダメージを 受けていたら 技の 威力は 2倍に なる。" + "effect": "そのターンに 相手が すでに ダメージを 受けていたら 技の 威力は 2倍に なる。" }, "embargo": { "name": "さしおさえ", - "effect": "持たせた 道具を 5ターンの 間 使えなくする。 トレーナーも その ポケモンには 道具を 使えない。" + "effect": "持たせた 道具を 5ターンの 間 使えなくする。 トレーナーも その ポケモンには 道具を 使えない。" }, "fling": { "name": "なげつける", - "effect": "持たせた 道具を 素早く 投げつけて 攻撃する。 道具で 威力と 効果が 変わる。" + "effect": "持たせた 道具を 素早く 投げつけて 攻撃する。 道具で 威力と 効果が 変わる。" }, "psychoShift": { "name": "サイコシフト", - "effect": "超能力で 暗示を かけて 自分の 受けている 状態異常を 相手に うつす。" + "effect": "超能力で 暗示を かけて 自分の 受けている 状態異常を 相手に うつす。" }, "trumpCard": { "name": "きりふだ", - "effect": "きりふだの 残り PPが 少なければ 少ないほど 技の 威力が あがる。" + "effect": "きりふだの 残り PPが 少なければ 少ないほど 技の 威力が あがる。" }, "healBlock": { "name": "かいふくふうじ", - "effect": "5ターンの 間 技や 特性や 持っている 道具によって HPを 回復 できなくする。" + "effect": "5ターンの 間 技や 特性や 持っている 道具によって HPを 回復 できなくする。" }, "wringOut": { "name": "しぼりとる", - "effect": "強く 締めあげて 攻撃を する。 相手の HPが 残っているほど 威力は あがる。" + "effect": "強く 締めあげて 攻撃を する。 相手の HPが 残っているほど 威力は あがる。" }, "powerTrick": { "name": "パワートリック", - "effect": "超能力で 自分の 攻撃と 防御の 力を 交換する。" + "effect": "超能力で 自分の 攻撃と 防御の 力を 交換する。" }, "gastroAcid": { "name": "いえき", - "effect": "胃液を 相手の 体に 吐きつける。 ついた 胃液は 相手の 特性の 効果を 消す。" + "effect": "胃液を 相手の 体に 吐きつける。 ついた 胃液は 相手の 特性の 効果を 消す。" }, "luckyChant": { "name": "おまじない", - "effect": "天に むかって おいのりを ささげ 5ターンの 間 相手の 攻撃を 急所に 当たらなくする。" + "effect": "天に むかって おいのりを ささげ 5ターンの 間 相手の 攻撃を 急所に 当たらなくする。" }, "meFirst": { "name": "さきどり", - "effect": "威力を あげて 相手が だそうとする 技を 先にだす。 先に だせないと 失敗する。" + "effect": "威力を あげて 相手が だそうとする 技を 先にだす。 先に だせないと 失敗する。" }, "copycat": { "name": "まねっこ", - "effect": "直前に でた 技を まねして 同じ 技を だす。 技が でていないと 失敗する。" + "effect": "直前に でた 技を まねして 同じ 技を だす。 技が でていないと 失敗する。" }, "powerSwap": { "name": "パワースワップ", - "effect": "超能力で 自分と 相手の 攻撃と 特攻の 能力変化を 入れ替える。" + "effect": "超能力で 自分と 相手の 攻撃と 特攻の 能力変化を 入れ替える。" }, "guardSwap": { "name": "ガードスワップ", - "effect": "超能力で 自分と 相手の 防御と 特防の 能力変化を 入れ替える。" + "effect": "超能力で 自分と 相手の 防御と 特防の 能力変化を 入れ替える。" }, "punishment": { "name": "おしおき", - "effect": "能力変化で 相手が パワーアップ しているほど 技の 威力が あがる。" + "effect": "能力変化で 相手が パワーアップ しているほど 技の 威力が あがる。" }, "lastResort": { "name": "とっておき", - "effect": "戦闘中に おぼえている 技を すべて 使うと はじめて だせる とっておきの 技。" + "effect": "戦闘中に おぼえている 技を すべて 使うと はじめて だせる とっておきの 技。" }, "worrySeed": { "name": "なやみのタネ", - "effect": "心を なやませる タネを 植えつける。 相手を 眠れなくして 特性を ふみんに する。" + "effect": "心を なやませる タネを 植えつける。 相手を 眠れなくして 特性を ふみんに する。" }, "suckerPunch": { "name": "ふいうち", - "effect": "相手より 先に 攻撃 できる。 相手が だす技が 攻撃技でないと 失敗する。" + "effect": "相手より 先に 攻撃 できる。 相手が だす技が 攻撃技でないと 失敗する。" }, "toxicSpikes": { "name": "どくびし", - "effect": "相手の 足下に どくびしを しかける。 交代で でてきた 相手の ポケモンに 毒を おわせる。" + "effect": "相手の 足下に どくびしを しかける。 交代で でてきた 相手の ポケモンに 毒を おわせる。" }, "heartSwap": { "name": "ハートスワップ", - "effect": "超能力で 自分と 相手に かかっている 能力変化を 入れ替える。" + "effect": "超能力で 自分と 相手に かかっている 能力変化を 入れ替える。" }, "aquaRing": { "name": "アクアリング", - "effect": "自分の 体の 周りを 水で つくった ベールで おおう。 毎ターン HPを 回復する。" + "effect": "自分の 体の 周りを 水で つくった ベールで おおう。 毎ターン HPを 回復する。" }, "magnetRise": { "name": "でんじふゆう", - "effect": "電気で つくった 磁力の 力で 宙に 浮かぶ。 5ターンの 間 浮遊できる。" + "effect": "電気で つくった 磁力の 力で 宙に 浮かぶ。 5ターンの 間 浮遊できる。" }, "flareBlitz": { "name": "フレアドライブ", - "effect": "炎を まとって 突進する。 自分も かなり ダメージを 受ける。 やけど状態に することが ある。" + "effect": "炎を まとって 突進する。 自分も かなり ダメージを 受ける。 やけど状態に することが ある。" }, "forcePalm": { "name": "はっけい", - "effect": "相手の 体に 衝撃波を 当てて 攻撃する。 まひ状態に することが ある。" + "effect": "相手の 体に 衝撃波を 当てて 攻撃する。 まひ状態に することが ある。" }, "auraSphere": { "name": "はどうだん", - "effect": "体の 奥から 波導の 力を 相手に うち放つ。 攻撃は 必ず 命中する。" + "effect": "体の 奥から 波導の 力を 相手に うち放つ。 攻撃は 必ず 命中する。" }, "rockPolish": { "name": "ロックカット", - "effect": "自分の 体を 磨いて 空気の 抵抗を 少なくする。素早さを ぐーんと あげることが できる。" + "effect": "自分の 体を 磨いて 空気の 抵抗を 少なくする。素早さを ぐーんと あげることが できる。" }, "poisonJab": { "name": "どくづき", - "effect": "毒に そまった 触手や 腕で 相手を 突き刺す。 毒状態に することが ある。" + "effect": "毒に そまった 触手や 腕で 相手を 突き刺す。 毒状態に することが ある。" }, "darkPulse": { "name": "あくのはどう", - "effect": "体から 悪意に みちた 恐ろしい オーラを 発する。 相手を ひるませることが ある。" + "effect": "体から 悪意に みちた 恐ろしい オーラを 発する。 相手を ひるませることが ある。" }, "nightSlash": { "name": "つじぎり", - "effect": "一瞬の すきを ついて 相手を 切りはらう。 急所に 当たりやすい。" + "effect": "一瞬の すきを ついて 相手を 切りはらう。 急所に 当たりやすい。" }, "aquaTail": { "name": "アクアテール", - "effect": "激しく あれくるう 荒波の ように 大きな しっぽを ふって 相手を 攻撃する。" + "effect": "激しく あれくるう 荒波の ように 大きな しっぽを ふって 相手を 攻撃する。" }, "seedBomb": { "name": "タネばくだん", - "effect": "硬い 殻を もつ 大きな タネを 上から たたきつけて 相手を 攻撃する。" + "effect": "硬い 殻を もつ 大きな タネを 上から たたきつけて 相手を 攻撃する。" }, "airSlash": { "name": "エアスラッシュ", - "effect": "空をも 切り裂く 空気の 刃で 攻撃する。 相手を ひるませることが ある。" + "effect": "空をも 切り裂く 空気の 刃で 攻撃する。 相手を ひるませることが ある。" }, "xScissor": { "name": "シザークロス", - "effect": "カマや ツメを ハサミのように 交差させながら 相手を 切り裂く。" + "effect": "カマや ツメを ハサミのように 交差させながら 相手を 切り裂く。" }, "bugBuzz": { "name": "むしのさざめき", - "effect": "振動で 音波を おこして 攻撃する。相手の 特防を さげることが ある。" + "effect": "振動で 音波を おこして 攻撃する。相手の 特防を さげることが ある。" }, "dragonPulse": { "name": "りゅうのはどう", - "effect": "大きな 口から 衝撃波を まきおこして 相手を 攻撃する。" + "effect": "大きな 口から 衝撃波を まきおこして 相手を 攻撃する。" }, "dragonRush": { "name": "ドラゴンダイブ", - "effect": "すさまじい 殺気で 威圧しながら 体当たりする。 相手を ひるませることが ある。" + "effect": "すさまじい 殺気で 威圧しながら 体当たりする。 相手を ひるませることが ある。" }, "powerGem": { "name": "パワージェム", - "effect": "宝石のように きらめく 光を 発射して 相手を 攻撃する。" + "effect": "宝石のように きらめく 光を 発射して 相手を 攻撃する。" }, "drainPunch": { "name": "ドレインパンチ", - "effect": "こぶしから 相手の 力を 吸い取る。 与えた ダメージの 半分の HPを 回復できる。" + "effect": "こぶしから 相手の 力を 吸い取る。 与えた ダメージの 半分の HPを 回復できる。" }, "vacuumWave": { "name": "しんくうは", - "effect": "こぶしを ふって 真空の 波を まきおこす。 必ず 先制攻撃できる。" + "effect": "こぶしを ふって 真空の 波を まきおこす。 必ず 先制攻撃できる。" }, "focusBlast": { "name": "きあいだま", - "effect": "気合を 高めて ありったけの 力を 放出する。 相手の 特防を さげることが ある。" + "effect": "気合を 高めて ありったけの 力を 放出する。 相手の 特防を さげることが ある。" }, "energyBall": { "name": "エナジーボール", - "effect": "自然から 集めた 命の力を 発射する。 相手の 特防を さげることがある。" + "effect": "自然から 集めた 命の力を 発射する。 相手の 特防を さげることがある。" }, "braveBird": { "name": "ブレイブバード", - "effect": "はねを おりたたみ 低空飛行で 突撃する。 自分も かなり ダメージを 受ける。" + "effect": "はねを おりたたみ 低空飛行で 突撃する。 自分も かなり ダメージを 受ける。" }, "earthPower": { "name": "だいちのちから", - "effect": "相手の 足下へ 大地の力を 放出する。相手の 特防を さげることが ある。" + "effect": "相手の 足下へ 大地の力を 放出する。相手の 特防を さげることが ある。" }, "switcheroo": { "name": "すりかえ", - "effect": "目にも とまらぬ 速さで 自分と 相手の 持ち物を 交換する。" + "effect": "目にも とまらぬ 速さで 自分と 相手の 持ち物を 交換する。" }, "gigaImpact": { "name": "ギガインパクト", - "effect": "持てる 力を すべて 使って 相手に 突撃する。 次の ターンは 動けなくなる。" + "effect": "持てる 力を すべて 使って 相手に 突撃する。 次の ターンは 動けなくなる。" }, "nastyPlot": { "name": "わるだくみ", - "effect": "悪いことを 考えて 頭を 活性化させる。 自分の 特攻を ぐーんと あげる。" + "effect": "悪いことを 考えて 頭を 活性化させる。 自分の 特攻を ぐーんと あげる。" }, "bulletPunch": { "name": "バレットパンチ", - "effect": "弾丸の ような 速くて 硬い パンチを 相手に くりだす。 必ず 先制攻撃 できる。" + "effect": "弾丸の ような 速くて 硬い パンチを 相手に くりだす。 必ず 先制攻撃 できる。" }, "avalanche": { "name": "ゆきなだれ", - "effect": "相手から 技を 受けていると その 相手に 対して 技の 威力が 2倍に なる。" + "effect": "相手から 技を 受けていると その 相手に 対して 技の 威力が 2倍に なる。" }, "iceShard": { "name": "こおりのつぶて", - "effect": "氷の塊を 一瞬で つくり 相手に 素早く 放つ。 必ず 先制攻撃 できる。" + "effect": "氷の塊を 一瞬で つくり 相手に 素早く 放つ。 必ず 先制攻撃 できる。" }, "shadowClaw": { "name": "シャドークロー", - "effect": "影から つくった 鋭い ツメで 相手を 切り裂く。 急所に 当たりやすい。" + "effect": "影から つくった 鋭い ツメで 相手を 切り裂く。 急所に 当たりやすい。" }, "thunderFang": { "name": "かみなりのキバ", - "effect": "電気を ためた キバで かみつく。 相手を ひるませたり まひ状態に することが ある。" + "effect": "電気を ためた キバで かみつく。 相手を ひるませたり まひ状態に することが ある。" }, "iceFang": { "name": "こおりのキバ", - "effect": "冷気を ひめた キバで かみつく。 相手を ひるませたり こおり状態に することが ある。" + "effect": "冷気を ひめた キバで かみつく。 相手を ひるませたり こおり状態に することが ある。" }, "fireFang": { "name": "ほのおのキバ", - "effect": "炎を まとった キバで かみつく。 相手を ひるませたり やけど状態に することが ある。" + "effect": "炎を まとった キバで かみつく。 相手を ひるませたり やけど状態に することが ある。" }, "shadowSneak": { "name": "かげうち", - "effect": "影を のばして 相手の 背後から 攻撃する。 必ず 先制攻撃 できる。" + "effect": "影を のばして 相手の 背後から 攻撃する。 必ず 先制攻撃 できる。" }, "mudBomb": { "name": "どろばくだん", - "effect": "硬い 泥の 弾を 相手に 発射して 攻撃する。 命中率を さげることが ある。" + "effect": "硬い 泥の 弾を 相手に 発射して 攻撃する。 命中率を さげることが ある。" }, "psychoCut": { "name": "サイコカッター", - "effect": "実体化させた 心の 刃で 相手を 切り裂く。 急所に 当たりやすい。" + "effect": "実体化させた 心の 刃で 相手を 切り裂く。 急所に 当たりやすい。" }, "zenHeadbutt": { "name": "しねんのずつき", - "effect": "思念の 力を 額に 集めて 攻撃する。 相手を ひるませることが ある。" + "effect": "思念の 力を 額に 集めて 攻撃する。 相手を ひるませることが ある。" }, "mirrorShot": { "name": "ミラーショット", - "effect": "磨きあげられた 体から せん光の 力を 相手に 放つ。 命中率を さげることが ある。" + "effect": "磨きあげられた 体から せん光の 力を 相手に 放つ。 命中率を さげることが ある。" }, "flashCannon": { "name": "ラスターカノン", - "effect": "体の 光を 一点に 集めて 力を 放つ。 相手の 特防を さげることが ある。" + "effect": "体の 光を 一点に 集めて 力を 放つ。 相手の 特防を さげることが ある。" }, "rockClimb": { "name": "ロッククライム", - "effect": "すごい 勢いで 相手に つっこみ 攻撃する。 相手を 混乱させることが ある。" + "effect": "すごい 勢いで 相手に つっこみ 攻撃する。 相手を 混乱させることが ある。" }, "defog": { "name": "きりばらい", - "effect": "強い風で 相手の リフレクターや ひかりのかべ などを はらいのける。 回避率も さげる。" + "effect": "強い風で 相手の リフレクターや ひかりのかべ などを はらいのける。 回避率も さげる。" }, "trickRoom": { "name": "トリックルーム", - "effect": "まか不思議な 空間を つくる。 5ターンの 間 遅い ポケモンから 行動できる。" + "effect": "まか不思議な 空間を つくる。 5ターンの 間 遅い ポケモンから 行動できる。" }, "dracoMeteor": { "name": "りゅうせいぐん", - "effect": "天空から 隕石を 相手に 落とす。使うと 反動で 自分の 特攻が がくっと さがる。" + "effect": "天空から 隕石を 相手に 落とす。使うと 反動で 自分の 特攻が がくっと さがる。" }, "discharge": { "name": "ほうでん", - "effect": "まばゆい 電撃で 自分の 周りに いるものを 攻撃する。 まひ状態に することが ある。" + "effect": "まばゆい 電撃で 自分の 周りに いるものを 攻撃する。 まひ状態に することが ある。" }, "lavaPlume": { "name": "ふんえん", - "effect": "真っ赤な 炎で 自分の 周りに いるものを 攻撃する。 やけど状態に することが ある。" + "effect": "真っ赤な 炎で 自分の 周りに いるものを 攻撃する。 やけど状態に することが ある。" }, "leafStorm": { "name": "リーフストーム", - "effect": "とがった はっぱで 相手に あらしを おこす。使うと 反動で 自分の 特攻が がくっと さがる。" + "effect": "とがった はっぱで 相手に あらしを おこす。使うと 反動で 自分の 特攻が がくっと さがる。" }, "powerWhip": { "name": "パワーウィップ", - "effect": "ツタや 触手を 激しく ふるって 相手を たたきつけ 攻撃する。" + "effect": "ツタや 触手を 激しく ふるって 相手を たたきつけ 攻撃する。" }, "rockWrecker": { "name": "がんせきほう", - "effect": "巨大な 岩を 相手に 発射して 攻撃する。 次の ターンは 動けなくなる。" + "effect": "巨大な 岩を 相手に 発射して 攻撃する。 次の ターンは 動けなくなる。" }, "crossPoison": { "name": "クロスポイズン", - "effect": "毒の 刃で 相手を 切り裂く。 毒状態に することが あり 急所にも 当たりやすい。" + "effect": "毒の 刃で 相手を 切り裂く。 毒状態に することが あり 急所にも 当たりやすい。" }, "gunkShot": { "name": "ダストシュート", - "effect": "汚い ゴミを 相手に ぶつけて 攻撃する。 毒状態に することが ある。" + "effect": "汚い ゴミを 相手に ぶつけて 攻撃する。 毒状態に することが ある。" }, "ironHead": { "name": "アイアンヘッド", - "effect": "鋼の ような 硬い 頭で 攻撃する。 相手を ひるませることが ある。" + "effect": "鋼の ような 硬い 頭で 攻撃する。 相手を ひるませることが ある。" }, "magnetBomb": { "name": "マグネットボム", - "effect": "相手に 吸いつく 鋼の 爆弾を 発射する。 攻撃は 必ず 命中 する。" + "effect": "相手に 吸いつく 鋼の 爆弾を 発射する。 攻撃は 必ず 命中 する。" }, "stoneEdge": { "name": "ストーンエッジ", - "effect": "とがった 岩を 相手に 突き刺して 攻撃する。 急所に 当たりやすい。" + "effect": "とがった 岩を 相手に 突き刺して 攻撃する。 急所に 当たりやすい。" }, "captivate": { "name": "ゆうわく", - "effect": "♂なら♀を ♀なら♂を 誘惑して 相手の 特攻を がくっと さげる。" + "effect": "♂なら♀を ♀なら♂を 誘惑して 相手の 特攻を がくっと さげる。" }, "stealthRock": { "name": "ステルスロック", - "effect": "相手の 周りに 無数の 岩を 浮かべて 交代で でてきた 相手の ポケモンに ダメージを 与える。" + "effect": "相手の 周りに 無数の 岩を 浮かべて 交代で でてきた 相手の ポケモンに ダメージを 与える。" }, "grassKnot": { "name": "くさむすび", - "effect": "草を からませて 相手を 転ばせる。相手が 重いほど 威力が あがる。" + "effect": "草を からませて 相手を 転ばせる。相手が 重いほど 威力が あがる。" }, "chatter": { "name": "おしゃべり", - "effect": "とても うるさい おしゃべりの 音波で 相手を 攻撃する。 相手を 混乱させる。" + "effect": "とても うるさい おしゃべりの 音波で 相手を 攻撃する。 相手を 混乱させる。" }, "judgment": { "name": "さばきのつぶて", - "effect": "無数の 光弾を 相手に 放出する。 自分の 持つ プレートに より タイプが 変わる。" + "effect": "無数の 光弾を 相手に 放出する。 自分の 持つ プレートに より タイプが 変わる。" }, "bugBite": { "name": "むしくい", - "effect": "かみついて 攻撃する。 相手が きのみを 持っているとき 食べて きのみの 効果を 受けられる。" + "effect": "かみついて 攻撃する。 相手が きのみを 持っているとき 食べて きのみの 効果を 受けられる。" }, "chargeBeam": { "name": "チャージビーム", - "effect": "電撃の 束を 相手に 発射する。電気を ためて 自分の 特攻を あげることが ある。" + "effect": "電撃の 束を 相手に 発射する。電気を ためて 自分の 特攻を あげることが ある。" }, "woodHammer": { "name": "ウッドハンマー", - "effect": "硬い 胴体を 相手に たたきつけて 攻撃する。 自分も かなり ダメージを 受ける。" + "effect": "硬い 胴体を 相手に たたきつけて 攻撃する。 自分も かなり ダメージを 受ける。" }, "aquaJet": { "name": "アクアジェット", - "effect": "目にも 留まらぬ ものすごい 速さで 相手に つっこむ。 必ず 先制攻撃 できる。" + "effect": "目にも 留まらぬ ものすごい 速さで 相手に つっこむ。 必ず 先制攻撃 できる。" }, "attackOrder": { "name": "こうげきしれい", - "effect": "しもべを 呼びだして 相手に むかって 攻撃させる。 急所に 当たりやすい。" + "effect": "しもべを 呼びだして 相手に むかって 攻撃させる。 急所に 当たりやすい。" }, "defendOrder": { "name": "ぼうぎょしれい", - "effect": "しもべを 呼びだして 自分の 体に おおい つかせる。防御と 特防を あげることが できる。" + "effect": "しもべを 呼びだして 自分の 体に おおい つかせる。防御と 特防を あげることが できる。" }, "healOrder": { "name": "かいふくしれい", - "effect": "しもべを 呼びだして きずを 治す。 最大HPの 半分 自分の HPを 回復する。" + "effect": "しもべを 呼びだして きずを 治す。 最大HPの 半分 自分の HPを 回復する。" }, "headSmash": { "name": "もろはのずつき", - "effect": "命を 懸けて こん身の 力で 相手に ずつきを する。 自分も ものすごい ダメージを 受ける。" + "effect": "命を 懸けて こん身の 力で 相手に ずつきを する。 自分も ものすごい ダメージを 受ける。" }, "doubleHit": { "name": "ダブルアタック", - "effect": "しっぽなどを 使い 相手を たたいて 攻撃する。 2回連続で ダメージを 与える。" + "effect": "しっぽなどを 使い 相手を たたいて 攻撃する。 2回連続で ダメージを 与える。" }, "roarOfTime": { "name": "ときのほうこう", - "effect": "時間が ゆがむほどの 力を うちだして 相手を 攻撃する。 次の ターンは 動けなくなる。" + "effect": "時間が ゆがむほどの 力を うちだして 相手を 攻撃する。 次の ターンは 動けなくなる。" }, "spacialRend": { "name": "あくうせつだん", - "effect": "周りの 空間ごと 相手を 引き裂き ダメージを 与える。 急所に 当たりやすい。" + "effect": "周りの 空間ごと 相手を 引き裂き ダメージを 与える。 急所に 当たりやすい。" }, "lunarDance": { "name": "みかづきのまい", - "effect": "自分は ひんしに なるが 控えから でてくる ポケモンの すべての 状態を 回復する。" + "effect": "自分は ひんしに なるが 控えから でてくる ポケモンの すべての 状態を 回復する。" }, "crushGrip": { "name": "にぎりつぶす", - "effect": "すさまじい 力で 相手を にぎりつぶす。 相手の HPが 残っているほど 威力が あがる。" + "effect": "すさまじい 力で 相手を にぎりつぶす。 相手の HPが 残っているほど 威力が あがる。" }, "magmaStorm": { "name": "マグマストーム", - "effect": "激しく 燃えたぎる 炎の なかに 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" + "effect": "激しく 燃えたぎる 炎の なかに 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" }, "darkVoid": { "name": "ダークホール", - "effect": "暗黒の 世界に ひきずり 落として 相手を 眠り状態に する。" + "effect": "暗黒の 世界に ひきずり 落として 相手を 眠り状態に する。" }, "seedFlare": { "name": "シードフレア", - "effect": "体の 中から 衝撃波を 発生させる。相手の 特防を がくっと さげることが ある。" + "effect": "体の 中から 衝撃波を 発生させる。相手の 特防を がくっと さげることが ある。" }, "ominousWind": { "name": "あやしいかぜ", - "effect": "みのけも よだつ 突風で 相手を 攻撃する。自分の すべての 能力が あがることが ある。" + "effect": "みのけも よだつ 突風で 相手を 攻撃する。自分の すべての 能力が あがることが ある。" }, "shadowForce": { "name": "シャドーダイブ", - "effect": "1ターン目で 姿を 消して 2ターン目に 相手を 攻撃する。 守っていても 攻撃は 当たる。" + "effect": "1ターン目で 姿を 消して 2ターン目に 相手を 攻撃する。 守っていても 攻撃は 当たる。" }, "honeClaws": { "name": "つめとぎ", - "effect": "ツメを 磨いて 鋭く する。 自分の 攻撃と 命中率を あげる。" + "effect": "ツメを 磨いて 鋭く する。 自分の 攻撃と 命中率を あげる。" }, "wideGuard": { "name": "ワイドガード", - "effect": "味方全員に 当たる 攻撃を 1ターンの 間 防ぐ。" + "effect": "味方全員に 当たる 攻撃を 1ターンの 間 防ぐ。" }, "guardSplit": { "name": "ガードシェア", - "effect": "超能力で 自分と 相手の 防御と 特防を たして 半分に わける。" + "effect": "超能力で 自分と 相手の 防御と 特防を たして 半分に わける。" }, "powerSplit": { "name": "パワーシェア", - "effect": "超能力で 自分と 相手の 攻撃と 特攻を たして 半分に わける。" + "effect": "超能力で 自分と 相手の 攻撃と 特攻を たして 半分に わける。" }, "wonderRoom": { "name": "ワンダールーム", - "effect": "まか不思議な 空間を つくる。 5ターンのあいだ すべてのポケモンの 防御と 特防が 入れ替わる。" + "effect": "まか不思議な 空間を つくる。 5ターンのあいだ すべてのポケモンの 防御と 特防が 入れ替わる。" }, "psyshock": { "name": "サイコショック", - "effect": "不思議な 念波を 実体化して 相手を 攻撃する。 物理的な ダメージを 与える。" + "effect": "不思議な 念波を 実体化して 相手を 攻撃する。 物理的な ダメージを 与える。" }, "venoshock": { "name": "ベノムショック", - "effect": "特殊な 毒液を 浴びせかける。 毒状態の 相手には 威力が 2倍に なる。" + "effect": "特殊な 毒液を 浴びせかける。 毒状態の 相手には 威力が 2倍に なる。" }, "autotomize": { "name": "ボディパージ", - "effect": "体の ムダな 部分を 削る。 自分の 素早さを ぐーんと あげて 体重も 軽くなる。" + "effect": "体の ムダな 部分を 削る。 自分の 素早さを ぐーんと あげて 体重も 軽くなる。" }, "ragePowder": { "name": "いかりのこな", - "effect": "イライラさせる 粉を 自分に ふりかけて 注意を ひく。 相手の 攻撃を すべて 自分に むける。" + "effect": "イライラさせる 粉を 自分に ふりかけて 注意を ひく。 相手の 攻撃を すべて 自分に むける。" }, "telekinesis": { "name": "テレキネシス", - "effect": "超能力で 相手を 浮かせる。 3ターンの 間 攻撃が 相手に 当たりやすく なる。" + "effect": "超能力で 相手を 浮かせる。 3ターンの 間 攻撃が 相手に 当たりやすく なる。" }, "magicRoom": { "name": "マジックルーム", - "effect": "まか不思議な 空間を つくる。 5ターンの間 すべてのポケモンの 道具の 効果が なくなる。" + "effect": "まか不思議な 空間を つくる。 5ターンの間 すべてのポケモンの 道具の 効果が なくなる。" }, "smackDown": { "name": "うちおとす", - "effect": "石や 弾を 投げて 飛んでいる 相手を 攻撃する。 相手は うち落とされて 地面に 落ちる。" + "effect": "石や 弾を 投げて 飛んでいる 相手を 攻撃する。 相手は うち落とされて 地面に 落ちる。" }, "stormThrow": { "name": "やまあらし", - "effect": "強烈な 一撃を 相手に くりだす。攻撃は 必ず 急所に 当たる。" + "effect": "強烈な 一撃を 相手に くりだす。攻撃は 必ず 急所に 当たる。" }, "flameBurst": { "name": "はじけるほのお", - "effect": "当たると はじける 炎で 相手を 攻撃する。はじけた 炎は 隣の 相手にも ふりかかる。" + "effect": "当たると はじける 炎で 相手を 攻撃する。はじけた 炎は 隣の 相手にも ふりかかる。" }, "sludgeWave": { "name": "ヘドロウェーブ", - "effect": "ヘドロの 波で 自分の 周りに いるものを 攻撃する。 毒状態に することが ある。" + "effect": "ヘドロの 波で 自分の 周りに いるものを 攻撃する。 毒状態に することが ある。" }, "quiverDance": { "name": "ちょうのまい", - "effect": "神秘的で 美しい 舞を 軽やかに おどる。 自分の 特攻と 特防と 素早さを あげる。" + "effect": "神秘的で 美しい 舞を 軽やかに おどる。 自分の 特攻と 特防と 素早さを あげる。" }, "heavySlam": { "name": "ヘビーボンバー", - "effect": "重たい 体で 相手に ぶつかって 攻撃する。 自分が 相手より 重いほど 威力が あがる。" + "effect": "重たい 体で 相手に ぶつかって 攻撃する。 自分が 相手より 重いほど 威力が あがる。" }, "synchronoise": { "name": "シンクロノイズ", - "effect": "不思議な 電波で 周りに いる 自分と 同じ タイプの ポケモンに ダメージを 与える。" + "effect": "不思議な 電波で 周りに いる 自分と 同じ タイプの ポケモンに ダメージを 与える。" }, "electroBall": { "name": "エレキボール", - "effect": "電気の 塊を 相手に ぶつける。相手より 素早さが 速いほど 威力が あがる。" + "effect": "電気の 塊を 相手に ぶつける。相手より 素早さが 速いほど 威力が あがる。" }, "soak": { "name": "みずびたし", - "effect": "たくさんの 水を 浴びせかけて 相手を みずタイプに する。" + "effect": "たくさんの 水を 浴びせかけて 相手を みずタイプに する。" }, "flameCharge": { "name": "ニトロチャージ", - "effect": "炎を まとい 相手を 攻撃する。 力を ためて 自分の 素早さを あげる。" + "effect": "炎を まとい 相手を 攻撃する。 力を ためて 自分の 素早さを あげる。" }, "coil": { "name": "とぐろをまく", - "effect": "とぐろを まいて 集中する。 自分の 攻撃と 防御と 命中率を あげる。" + "effect": "とぐろを まいて 集中する。 自分の 攻撃と 防御と 命中率を あげる。" }, "lowSweep": { "name": "ローキック", - "effect": "素早い 動きで 相手の 足を ねらって 攻撃する。 相手の 素早さを さげる。" + "effect": "素早い 動きで 相手の 足を ねらって 攻撃する。 相手の 素早さを さげる。" }, "acidSpray": { "name": "アシッドボム", - "effect": "相手を とかす 液体を 吐きだして 攻撃する。 相手の 特防を がくっと さげる。" + "effect": "相手を とかす 液体を 吐きだして 攻撃する。 相手の 特防を がくっと さげる。" }, "foulPlay": { "name": "イカサマ", - "effect": "相手の 力を 利用する。 戦っている 相手の 攻撃が 高いほど ダメージが あがる。" + "effect": "相手の 力を 利用する。 戦っている 相手の 攻撃が 高いほど ダメージが あがる。" }, "simpleBeam": { "name": "シンプルビーム", - "effect": "なぞの 念波を 相手に 送る。 念波を 受けとった 相手は 特性が たんじゅんに なる。" + "effect": "なぞの 念波を 相手に 送る。 念波を 受けとった 相手は 特性が たんじゅんに なる。" }, "entrainment": { "name": "なかまづくり", - "effect": "不思議な リズムで おどる。 動きを まねさせて 自分と 相手の 特性を 同じに する。" + "effect": "不思議な リズムで おどる。 動きを まねさせて 自分と 相手の 特性を 同じに する。" }, "afterYou": { "name": "おさきにどうぞ", - "effect": "相手の 行動を サポートして 自分の 行動の あとに 続けて 動けるように する。" + "effect": "相手の 行動を サポートして 自分の 行動の あとに 続けて 動けるように する。" }, "round": { "name": "りんしょう", - "effect": "歌で 相手を 攻撃する。 みんなで 輪唱すると 続けて だすことが でき 威力も あがる。" + "effect": "歌で 相手を 攻撃する。 みんなで 輪唱すると 続けて だすことが でき 威力も あがる。" }, "echoedVoice": { "name": "エコーボイス", - "effect": "響く 声で 相手を 攻撃する。 毎ターン だれかが 技を 使い続けると 威力が あがる。" + "effect": "響く 声で 相手を 攻撃する。 毎ターン だれかが 技を 使い続けると 威力が あがる。" }, "chipAway": { "name": "なしくずし", - "effect": "すきを みて 堅実に 攻撃する。 相手の 能力変化に 関係なく ダメージを 与える。" + "effect": "すきを みて 堅実に 攻撃する。 相手の 能力変化に 関係なく ダメージを 与える。" }, "clearSmog": { "name": "クリアスモッグ", - "effect": "特殊な 泥の 塊を 相手に 投げつけて 攻撃する。 能力変化を もとに もどす。" + "effect": "特殊な 泥の 塊を 相手に 投げつけて 攻撃する。 能力変化を もとに もどす。" }, "storedPower": { "name": "アシストパワー", - "effect": "蓄積された パワーで 相手を 攻撃する。自分の 能力が あがっているほど 威力が あがる。" + "effect": "蓄積された パワーで 相手を 攻撃する。自分の 能力が あがっているほど 威力が あがる。" }, "quickGuard": { "name": "ファストガード", - "effect": "自分と 味方を 相手の 先制攻撃から 守る。" + "effect": "自分と 味方を 相手の 先制攻撃から 守る。" }, "allySwitch": { "name": "サイドチェンジ", - "effect": "不思議な 力で テレポートして 自分と 味方の 居場所を 入れ替える。" + "effect": "不思議な 力で テレポートして 自分と 味方の 居場所を 入れ替える。" }, "scald": { "name": "ねっとう", - "effect": "熱く 煮えたぎる 水を 相手に 発射して 攻撃する。 やけど状態に することが ある。" + "effect": "熱く 煮えたぎる 水を 相手に 発射して 攻撃する。 やけど状態に することが ある。" }, "shellSmash": { "name": "からをやぶる", - "effect": "殻を やぶって 自分の 防御 特防を さげるが 攻撃 特攻 素早さを ぐーんと あげる。" + "effect": "殻を やぶって 自分の 防御 特防を さげるが 攻撃 特攻 素早さを ぐーんと あげる。" }, "healPulse": { "name": "いやしのはどう", - "effect": "いやしのはどうを とばして 最大HPの 半分 相手の HPを 回復する。" + "effect": "いやしのはどうを とばして 最大HPの 半分 相手の HPを 回復する。" }, "hex": { "name": "たたりめ", - "effect": "たたみかける ように 攻撃する。 状態異常の 相手に 大きな ダメージを 与える。" + "effect": "たたみかける ように 攻撃する。 状態異常の 相手に 大きな ダメージを 与える。" }, "skyDrop": { "name": "フリーフォール", - "effect": "1ターン目で 相手を 空へ 連れさり 2ターン目に 落として 攻撃する。 連れさられた 相手は 動けない。" + "effect": "1ターン目で 相手を 空へ 連れさり 2ターン目に 落として 攻撃する。 連れさられた 相手は 動けない。" }, "shiftGear": { "name": "ギアチェンジ", - "effect": "歯車を 回して 自分の 攻撃を あげる だけでなく 素早さも ぐーんと あげる。" + "effect": "歯車を 回して 自分の 攻撃を あげる だけでなく 素早さも ぐーんと あげる。" }, "circleThrow": { "name": "ともえなげ", - "effect": "相手を 投げとばして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" + "effect": "相手を 投げとばして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" }, "incinerate": { "name": "やきつくす", - "effect": "炎で 相手を 攻撃する。 相手が きのみなどを 持っているとき 燃やして 使えなくする。" + "effect": "炎で 相手を 攻撃する。 相手が きのみなどを 持っているとき 燃やして 使えなくする。" }, "quash": { "name": "さきおくり", - "effect": "相手を おさえつけて 行動の 順番を 最後に する。" + "effect": "相手を おさえつけて 行動の 順番を 最後に する。" }, "acrobatics": { "name": "アクロバット", - "effect": "軽やかに 相手を 攻撃する。 自分が 道具を 持っていないとき 大きな ダメージを 与える。" + "effect": "軽やかに 相手を 攻撃する。 自分が 道具を 持っていないとき 大きな ダメージを 与える。" }, "reflectType": { "name": "ミラータイプ", - "effect": "相手の タイプを 反射して 自分も 同じ タイプに なる。" + "effect": "相手の タイプを 反射して 自分も 同じ タイプに なる。" }, "retaliate": { "name": "かたきうち", - "effect": "倒れた 味方の かたきを 討つ。 前の ターンに 味方が 倒されていると 威力が あがる。" + "effect": "倒れた 味方の かたきを 討つ。 前の ターンに 味方が 倒されていると 威力が あがる。" }, "finalGambit": { "name": "いのちがけ", - "effect": "命懸けで 相手を 攻撃する。 自分は ひんしに なるが 相手に HP分の ダメージを 与える。" + "effect": "命懸けで 相手を 攻撃する。 自分は ひんしに なるが 相手に HP分の ダメージを 与える。" }, "bestow": { "name": "ギフトパス", - "effect": "相手が 道具を 持っていないとき 自分が 持っている 道具を 相手に わたす。" + "effect": "相手が 道具を 持っていないとき 自分が 持っている 道具を 相手に わたす。" }, "inferno": { "name": "れんごく", - "effect": "激しい 炎で 相手を 包みこみ 攻撃する。 やけど状態に する。" + "effect": "激しい 炎で 相手を 包みこみ 攻撃する。 やけど状態に する。" }, "waterPledge": { "name": "みずのちかい", - "effect": "水の柱で 攻撃する。 ほのおと 組みあわせると 威力が あがって 空に にじが かかる。" + "effect": "水の柱で 攻撃する。 ほのおと 組みあわせると 威力が あがって 空に にじが かかる。" }, "firePledge": { "name": "ほのおのちかい", - "effect": "炎の柱で 攻撃する。 くさと 組みあわせると 威力が あがって 周りが 火の海に なる。" + "effect": "炎の柱で 攻撃する。 くさと 組みあわせると 威力が あがって 周りが 火の海に なる。" }, "grassPledge": { "name": "くさのちかい", - "effect": "草の柱で 攻撃する。 みずと 組みあわせると 威力が あがって あたりが 湿原に なる。" + "effect": "草の柱で 攻撃する。 みずと 組みあわせると 威力が あがって あたりが 湿原に なる。" }, "voltSwitch": { "name": "ボルトチェンジ", - "effect": "攻撃したあと ものすごい スピードで もどってきて 控えの ポケモンと 入れ替わる。" + "effect": "攻撃したあと ものすごい スピードで もどってきて 控えの ポケモンと 入れ替わる。" }, "struggleBug": { "name": "むしのていこう", - "effect": "抵抗して 相手を 攻撃する。 相手の 特攻を さげる。" + "effect": "抵抗して 相手を 攻撃する。 相手の 特攻を さげる。" }, "bulldoze": { "name": "じならし", - "effect": "地面を 踏みならして 自分の 周りに いるものを 攻撃する。 相手の 素早さを さげる。" + "effect": "地面を 踏みならして 自分の 周りに いるものを 攻撃する。 相手の 素早さを さげる。" }, "frostBreath": { "name": "こおりのいぶき", - "effect": "冷たい 息を 相手に 吹きつけて 攻撃する。 必ず 急所に 当たる。" + "effect": "冷たい 息を 相手に 吹きつけて 攻撃する。 必ず 急所に 当たる。" }, "dragonTail": { "name": "ドラゴンテール", - "effect": "相手を はじきとばして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" + "effect": "相手を はじきとばして 控えの ポケモンを ひきずりだす。 野生の 場合は 戦闘が 終わる。" }, "workUp": { "name": "ふるいたてる", - "effect": "自分を 奮いたてて 攻撃と 特攻を あげる。" + "effect": "自分を 奮いたてて 攻撃と 特攻を あげる。" }, "electroweb": { "name": "エレキネット", - "effect": "電気の ネットで 相手を 捕まえて 攻撃する。 相手の 素早さを さげる。" + "effect": "電気の ネットで 相手を 捕まえて 攻撃する。 相手の 素早さを さげる。" }, "wildCharge": { "name": "ワイルドボルト", - "effect": "電気を まとって 相手に ぶつかって 攻撃する。 自分も 少し ダメージを 受ける。" + "effect": "電気を まとって 相手に ぶつかって 攻撃する。 自分も 少し ダメージを 受ける。" }, "drillRun": { "name": "ドリルライナー", - "effect": "ドリルのように 体を 回転しながら 相手に 体当たりする。 急所に 当たりやすい。" + "effect": "ドリルのように 体を 回転しながら 相手に 体当たりする。 急所に 当たりやすい。" }, "dualChop": { "name": "ダブルチョップ", - "effect": "体の 硬い部分で 相手を たたいて 攻撃する。 2回連続で ダメージを 与える。" + "effect": "体の 硬い部分で 相手を たたいて 攻撃する。 2回連続で ダメージを 与える。" }, "heartStamp": { "name": "ハートスタンプ", - "effect": "かわいい しぐさで 油断させて 強烈な 一撃を 浴びせる。 相手を ひるませることが ある。" + "effect": "かわいい しぐさで 油断させて 強烈な 一撃を 浴びせる。 相手を ひるませることが ある。" }, "hornLeech": { "name": "ウッドホーン", - "effect": "つのを 突き刺して 相手の 養分を 吸い取る。 与えた ダメージの 半分の HPを 回復できる。" + "effect": "つのを 突き刺して 相手の 養分を 吸い取る。 与えた ダメージの 半分の HPを 回復できる。" }, "sacredSword": { "name": "せいなるつるぎ", - "effect": "長い つので 切りつけ 攻撃する。 相手の 能力変化に 関係なく ダメージを 与える。" + "effect": "長い つので 切りつけ 攻撃する。 相手の 能力変化に 関係なく ダメージを 与える。" }, "razorShell": { "name": "シェルブレード", - "effect": "鋭い 貝殻で 切りつけて 攻撃する。 相手の 防御を さげることが ある。" + "effect": "鋭い 貝殻で 切りつけて 攻撃する。 相手の 防御を さげることが ある。" }, "heatCrash": { "name": "ヒートスタンプ", - "effect": "燃える 体で 相手に ぶつかって 攻撃する。 自分が 相手より 重いほど 威力が あがる。" + "effect": "燃える 体で 相手に ぶつかって 攻撃する。 自分が 相手より 重いほど 威力が あがる。" }, "leafTornado": { "name": "グラスミキサー", - "effect": "鋭い はっぱで 相手を 包みこんで 攻撃する。 命中率を さげることが ある。" + "effect": "鋭い はっぱで 相手を 包みこんで 攻撃する。 命中率を さげることが ある。" }, "steamroller": { "name": "ハードローラー", - "effect": "まるめた 体で 回転して 相手を おしつぶす。 相手を ひるませることが ある。" + "effect": "まるめた 体で 回転して 相手を おしつぶす。 相手を ひるませることが ある。" }, "cottonGuard": { "name": "コットンガード", - "effect": "フワフワの 綿毛で 自分の 体を 包みこんで 守る。 防御を ぐぐーんと あげる。" + "effect": "フワフワの 綿毛で 自分の 体を 包みこんで 守る。 防御を ぐぐーんと あげる。" }, "nightDaze": { "name": "ナイトバースト", - "effect": "暗黒の 衝撃波を とばして 相手を 攻撃する。 命中率を さげることが ある。" + "effect": "暗黒の 衝撃波を とばして 相手を 攻撃する。 命中率を さげることが ある。" }, "psystrike": { "name": "サイコブレイク", - "effect": "不思議な 念波を 実体化して 相手を 攻撃する。 物理的な ダメージを 与える。" + "effect": "不思議な 念波を 実体化して 相手を 攻撃する。 物理的な ダメージを 与える。" }, "tailSlap": { "name": "スイープビンタ", - "effect": "硬い しっぽで 相手を たたいて 攻撃する。 2ー5回の 間 連続で だす。" + "effect": "硬い しっぽで 相手を たたいて 攻撃する。 2ー5回の 間 連続で だす。" }, "hurricane": { "name": "ぼうふう", - "effect": "強烈な 風で 相手を 包みこんで 攻撃する。 相手を 混乱させることが ある。" + "effect": "強烈な 風で 相手を 包みこんで 攻撃する。 相手を 混乱させることが ある。" }, "headCharge": { "name": "アフロブレイク", - "effect": "すごい アフロの 頭で 相手に 突進して 攻撃する。 自分も 少し ダメージを 受ける。" + "effect": "すごい アフロの 頭で 相手に 突進して 攻撃する。 自分も 少し ダメージを 受ける。" }, "gearGrind": { "name": "ギアソーサー", - "effect": "鋼鉄の ギアを 相手に 投げつけて 攻撃する。 2回連続で ダメージを 与える。" + "effect": "鋼鉄の ギアを 相手に 投げつけて 攻撃する。 2回連続で ダメージを 与える。" }, "searingShot": { "name": "かえんだん", - "effect": "真っ赤な 炎で 自分の 周りに いるものを 攻撃する。 やけど状態に することが ある。" + "effect": "真っ赤な 炎で 自分の 周りに いるものを 攻撃する。 やけど状態に することが ある。" }, "technoBlast": { "name": "テクノバスター", - "effect": "光弾を 相手に 放出する。 自分の 持つ カセットにより タイプが 変わる。" + "effect": "光弾を 相手に 放出する。 自分の 持つ カセットにより タイプが 変わる。" }, "relicSong": { "name": "いにしえのうた", - "effect": "いにしえのうたを 相手に 聞かせて 心に うったえて 攻撃する。 眠り状態に することが ある。" + "effect": "いにしえのうたを 相手に 聞かせて 心に うったえて 攻撃する。 眠り状態に することが ある。" }, "secretSword": { "name": "しんぴのつるぎ", - "effect": "長い つので 切りつけ 攻撃する。 つのが まとった 不思議な 力は 物理的な ダメージを 与える。" + "effect": "長い つので 切りつけ 攻撃する。 つのが まとった 不思議な 力は 物理的な ダメージを 与える。" }, "glaciate": { "name": "こごえるせかい", - "effect": "凍えるような 冷気を 相手に 吹きつけて 攻撃する。 相手の 素早さを さげる。" + "effect": "凍えるような 冷気を 相手に 吹きつけて 攻撃する。 相手の 素早さを さげる。" }, "boltStrike": { "name": "らいげき", - "effect": "ぼうだいな 電気を 身に まとって 相手に 突進して 攻撃する。 まひ状態に することが ある。" + "effect": "ぼうだいな 電気を 身に まとって 相手に 突進して 攻撃する。 まひ状態に することが ある。" }, "blueFlare": { "name": "あおいほのお", - "effect": "美しくも 激しい 青い炎で 相手を 包みこんで 攻撃する。 やけど状態に することが ある。" + "effect": "美しくも 激しい 青い炎で 相手を 包みこんで 攻撃する。 やけど状態に することが ある。" }, "fieryDance": { "name": "ほのおのまい", - "effect": "炎を まとい はばたいて 相手を 攻撃する。自分の 特攻が あがることが ある。" + "effect": "炎を まとい はばたいて 相手を 攻撃する。自分の 特攻が あがることが ある。" }, "freezeShock": { "name": "フリーズボルト", - "effect": "電気を まとった 氷の 塊で 2ターン目に 相手を たたきつける。 まひ状態に することが ある。" + "effect": "電気を まとった 氷の 塊で 2ターン目に 相手を たたきつける。 まひ状態に することが ある。" }, "iceBurn": { "name": "コールドフレア", - "effect": "すべてを 凍らせる 激しい 冷気で 2ターン目に 相手を 包みこむ。 やけど状態に することが ある。" + "effect": "すべてを 凍らせる 激しい 冷気で 2ターン目に 相手を 包みこむ。 やけど状態に することが ある。" }, "snarl": { "name": "バークアウト", - "effect": "まくしたてる ように 怒鳴りつけて 相手の 特攻を さげる。" + "effect": "まくしたてる ように 怒鳴りつけて 相手の 特攻を さげる。" }, "icicleCrash": { "name": "つららおとし", - "effect": "大きな 氷柱を 激しく ぶつけて 攻撃する。 相手を ひるませることが ある。" + "effect": "大きな 氷柱を 激しく ぶつけて 攻撃する。 相手を ひるませることが ある。" }, "vCreate": { "name": "Vジェネレート", - "effect": "灼熱の 炎を 額から 発生させて 捨て身の 体当たり。 防御 特防 素早さが さがる。" + "effect": "灼熱の 炎を 額から 発生させて 捨て身の 体当たり。 防御 特防 素早さが さがる。" }, "fusionFlare": { "name": "クロスフレイム", - "effect": "巨大な 炎を たたきつける。 巨大な 雷の 影響を受け 技の 威力が あがる。" + "effect": "巨大な 炎を たたきつける。 巨大な 雷の 影響を受け 技の 威力が あがる。" }, "fusionBolt": { "name": "クロスサンダー", - "effect": "巨大な 雷を たたきつける。 巨大な 炎の 影響を受け 技の 威力が あがる。" + "effect": "巨大な 雷を たたきつける。 巨大な 炎の 影響を受け 技の 威力が あがる。" }, "flyingPress": { "name": "フライングプレス", - "effect": "空中から 相手に ダイブする。 この技は かくとうタイプと 同時に ひこうタイプでも ある。" + "effect": "空中から 相手に ダイブする。 この技は かくとうタイプと 同時に ひこうタイプでも ある。" }, "matBlock": { "name": "たたみがえし", - "effect": "かえした タタミを 盾にして 自分や 味方への 技の ダメージを 防ぐ。 変化技は 防ぐことが できない。" + "effect": "かえした タタミを 盾にして 自分や 味方への 技の ダメージを 防ぐ。 変化技は 防ぐことが できない。" }, "belch": { "name": "ゲップ", - "effect": "相手に 向かって ゲップを 浴びせて ダメージを 与える。 きのみを 食べないと だせない。" + "effect": "相手に 向かって ゲップを 浴びせて ダメージを 与える。 きのみを 食べないと だせない。" }, "rototiller": { "name": "たがやす", - "effect": "地面を 耕して 草木が 育ちやすいようにする。 くさタイプの 攻撃と 特攻が あがる。" + "effect": "地面を 耕して 草木が 育ちやすいようにする。 くさタイプの 攻撃と 特攻が あがる。" }, "stickyWeb": { "name": "ねばねばネット", - "effect": "相手の 周りに ねばねばした ネットを はりめぐらせ 交代で でてきた 相手の 素早さを さげる。" + "effect": "相手の 周りに ねばねばした ネットを はりめぐらせ 交代で でてきた 相手の 素早さを さげる。" }, "fellStinger": { "name": "とどめばり", - "effect": "この 技を 使って 相手を 倒すと 攻撃が ぐぐーんと あがる。" + "effect": "この 技を 使って 相手を 倒すと 攻撃が ぐぐーんと あがる。" }, "phantomForce": { "name": "ゴーストダイブ", - "effect": "1ターンめで どこかに 消えて 2ターンめに 相手を 攻撃する。 守りを 無視して 攻撃できる。" + "effect": "1ターンめで どこかに 消えて 2ターンめに 相手を 攻撃する。 守りを 無視して 攻撃できる。" }, "trickOrTreat": { "name": "ハロウィン", - "effect": "相手を ハロウィンに 誘う。 相手の タイプに ゴーストタイプが 追加される。" + "effect": "相手を ハロウィンに 誘う。 相手の タイプに ゴーストタイプが 追加される。" }, "nobleRoar": { "name": "おたけび", - "effect": "おたけびを あげて 相手を 威嚇し 相手の 攻撃と 特攻を さげる。" + "effect": "おたけびを あげて 相手を 威嚇し 相手の 攻撃と 特攻を さげる。" }, "ionDeluge": { "name": "プラズマシャワー", - "effect": "電気を 帯びた 粒子を 拡散し ノーマルタイプの 技を でんきタイプに してしまう。" + "effect": "電気を 帯びた 粒子を 拡散し ノーマルタイプの 技を でんきタイプに してしまう。" }, "parabolicCharge": { "name": "パラボラチャージ", - "effect": "周りにいる ポケモン 全員に ダメージ。 与えた ダメージの 半分を 自分が 回復する。" + "effect": "周りにいる ポケモン 全員に ダメージ。 与えた ダメージの 半分を 自分が 回復する。" }, "forestsCurse": { "name": "もりののろい", - "effect": "相手に 森ののろいを かける。 のろいを かけられた 相手は タイプに くさタイプが 追加される。" + "effect": "相手に 森ののろいを かける。 のろいを かけられた 相手は タイプに くさタイプが 追加される。" }, "petalBlizzard": { "name": "はなふぶき", - "effect": "激しい 花吹雪を 起こし 周りに いるものに 攻撃して ダメージを 与える。" + "effect": "激しい 花吹雪を 起こし 周りに いるものに 攻撃して ダメージを 与える。" }, "freezeDry": { "name": "フリーズドライ", - "effect": "相手を 急激に 冷やして こおり 状態に することが ある。 みずタイプにも 効果バツグンになる。" + "effect": "相手を 急激に 冷やして こおり 状態に することが ある。 みずタイプにも 効果バツグンになる。" }, "disarmingVoice": { "name": "チャームボイス", - "effect": "魅惑の 鳴き声を だして 相手に 精神的な ダメージを 与える。 攻撃は 必ず 命中 する。" + "effect": "魅惑の 鳴き声を だして 相手に 精神的な ダメージを 与える。 攻撃は 必ず 命中 する。" }, "partingShot": { "name": "すてゼリフ", - "effect": "すてゼリフで 相手を いかくし 攻撃と 特攻を さげたのち 控えの ポケモンと 入れ替わる。" + "effect": "すてゼリフで 相手を いかくし 攻撃と 特攻を さげたのち 控えの ポケモンと 入れ替わる。" }, "topsyTurvy": { "name": "ひっくりかえす", - "effect": "相手に かかっている すべての 能力変化を ひっくり返して 逆にする。" + "effect": "相手に かかっている すべての 能力変化を ひっくり返して 逆にする。" }, "drainingKiss": { "name": "ドレインキッス", - "effect": "キッスによって 相手から HPを 吸い取る。 与えた ダメージの 半分以上 HPを 回復する。" + "effect": "キッスによって 相手から HPを 吸い取る。 与えた ダメージの 半分以上 HPを 回復する。" }, "craftyShield": { "name": "トリックガード", - "effect": "不思議な 力を 使って 味方への 変化技を 防ぐ。 ダメージ技は 受けてしまう。" + "effect": "不思議な 力を 使って 味方への 変化技を 防ぐ。 ダメージ技は 受けてしまう。" }, "flowerShield": { "name": "フラワーガード", - "effect": "不思議な 力を 使って 場にいる くさタイプの ポケモン 全員の 防御を あげる。" + "effect": "不思議な 力を 使って 場にいる くさタイプの ポケモン 全員の 防御を あげる。" }, "grassyTerrain": { "name": "グラスフィールド", - "effect": "5ターンの 間 グラスフィールドにする。 地面にいると 毎ターン 回復する。 くさタイプの 威力が あがる。" + "effect": "5ターンの 間 グラスフィールドにする。 地面にいると 毎ターン 回復する。 くさタイプの 威力が あがる。" }, "mistyTerrain": { "name": "ミストフィールド", - "effect": "5ターンの 間 地面にいると 状態異常に ならず ドラゴン技の ダメージも 半分になる。" + "effect": "5ターンの 間 地面にいると 状態異常に ならず ドラゴン技の ダメージも 半分になる。" }, "electrify": { "name": "そうでん", - "effect": "相手が 技を だす前に そうでん すると そのターン 相手の 技は でんきタイプになる。" + "effect": "相手が 技を だす前に そうでん すると そのターン 相手の 技は でんきタイプになる。" }, "playRough": { "name": "じゃれつく", - "effect": "相手に じゃれついて 攻撃する。 相手の 攻撃を さげる ことがある。" + "effect": "相手に じゃれついて 攻撃する。 相手の 攻撃を さげる ことがある。" }, "fairyWind": { "name": "ようせいのかぜ", - "effect": "ようせいのかぜを 起こし 相手に 吹きつけて 攻撃する。" + "effect": "ようせいのかぜを 起こし 相手に 吹きつけて 攻撃する。" }, "moonblast": { "name": "ムーンフォース", - "effect": "月の パワーを かりて 相手を 攻撃する。 相手の 特攻を さげる ことがある。" + "effect": "月の パワーを かりて 相手を 攻撃する。 相手の 特攻を さげる ことがある。" }, "boomburst": { "name": "ばくおんぱ", - "effect": "すさまじい 爆音の 破壊力に よって 周りに いるものを 攻撃する。" + "effect": "すさまじい 爆音の 破壊力に よって 周りに いるものを 攻撃する。" }, "fairyLock": { "name": "フェアリーロック", - "effect": "ロックを かけることによって 次のターン すべての ポケモンを 逃げられなくする。" + "effect": "ロックを かけることによって 次のターン すべての ポケモンを 逃げられなくする。" }, "kingsShield": { "name": "キングシールド", - "effect": "相手の 攻撃を 防ぐと 同時に 防御態勢になる。 触れた 相手の 攻撃を さげる。" + "effect": "相手の 攻撃を 防ぐと 同時に 防御態勢になる。 触れた 相手の 攻撃を さげる。" }, "playNice": { "name": "なかよくする", - "effect": "相手と なかよくなって 戦う 気力を 失わせ 相手の 攻撃を さげる。" + "effect": "相手と なかよくなって 戦う 気力を 失わせ 相手の 攻撃を さげる。" }, "confide": { "name": "ないしょばなし", - "effect": "ないしょばなしを することで 相手の 集中力を 失わせ 相手の 特攻を さげる。" + "effect": "ないしょばなしを することで 相手の 集中力を 失わせ 相手の 特攻を さげる。" }, "diamondStorm": { "name": "ダイヤストーム", - "effect": "ダイヤの 嵐を 巻き起こし ダメージを 与える。 自分の 防御を ぐーんと あげることが ある。" + "effect": "ダイヤの 嵐を 巻き起こし ダメージを 与える。 自分の 防御を ぐーんと あげることが ある。" }, "steamEruption": { "name": "スチームバースト", - "effect": "ものすごく 熱い 蒸気を 相手に 浴びせる。 相手は やけどする ことがある。" + "effect": "ものすごく 熱い 蒸気を 相手に 浴びせる。 相手は やけどする ことがある。" }, "hyperspaceHole": { "name": "いじげんホール", - "effect": "異次元ホールで 突然 相手の 真横に 現れ 攻撃する。 まもるや みきり なども 無視 できる。" + "effect": "異次元ホールで 突然 相手の 真横に 現れ 攻撃する。 まもるや みきり なども 無視 できる。" }, "waterShuriken": { "name": "みずしゅりけん", - "effect": "粘液で できた 手裏剣を 2ー5回の 間 連続で だす。 必ず 先制攻撃 できる。" + "effect": "粘液で できた 手裏剣を 2ー5回の 間 連続で だす。 必ず 先制攻撃 できる。" }, "mysticalFire": { "name": "マジカルフレイム", - "effect": "口から 吐きだす 特別 熱い 炎で 攻撃する。 相手の 特攻を さげる。" + "effect": "口から 吐きだす 特別 熱い 炎で 攻撃する。 相手の 特攻を さげる。" }, "spikyShield": { "name": "ニードルガード", - "effect": "相手の 攻撃を 防ぐと 同時に 触れた 相手の 体力を 削って しまう。" + "effect": "相手の 攻撃を 防ぐと 同時に 触れた 相手の 体力を 削って しまう。" }, "aromaticMist": { "name": "アロマミスト", - "effect": "不思議な アロマの 香りによって 味方の 特防を あげる。" + "effect": "不思議な アロマの 香りによって 味方の 特防を あげる。" }, "eerieImpulse": { "name": "かいでんぱ", - "effect": "体から かいでんぱを 放ち 相手に 浴びせる ことによって 特攻を がくっと さげる。" + "effect": "体から かいでんぱを 放ち 相手に 浴びせる ことによって 特攻を がくっと さげる。" }, "venomDrench": { "name": "ベノムトラップ", - "effect": "特殊な 毒液を 浴びせかける。 毒状態の 相手は 攻撃 特攻 素早さが さがる。" + "effect": "特殊な 毒液を 浴びせかける。 毒状態の 相手は 攻撃 特攻 素早さが さがる。" }, "powder": { "name": "ふんじん", - "effect": "ふんじんを 浴びせた 相手が ほのお技を 使うと 爆発して ダメージを 与える。" + "effect": "ふんじんを 浴びせた 相手が ほのお技を 使うと 爆発して ダメージを 与える。" }, "geomancy": { "name": "ジオコントロール", - "effect": "1ターン目で エネルギーを 吸収し 2ターン目に 特攻 特防 素早さを ぐーんと あげる。" + "effect": "1ターン目で エネルギーを 吸収し 2ターン目に 特攻 特防 素早さを ぐーんと あげる。" }, "magneticFlux": { "name": "じばそうさ", - "effect": "磁場を 操作 することによって 特性 プラスと マイナスの 防御 特防が あがる。" + "effect": "磁場を 操作 することによって 特性 プラスと マイナスの 防御 特防が あがる。" }, "happyHour": { "name": "ハッピータイム", - "effect": "ハッピータイムの 技を 使うと 戦闘の あとで もらえる お金が 倍になる。" + "effect": "ハッピータイムの 技を 使うと 戦闘の あとで もらえる お金が 倍になる。" }, "electricTerrain": { "name": "エレキフィールド", - "effect": "5ターンの 間 エレキフィールドにする。 地面にいる ポケモンは 眠らない。 でんきタイプの 威力が あがる。" + "effect": "5ターンの 間 エレキフィールドにする。 地面にいる ポケモンは 眠らない。 でんきタイプの 威力が あがる。" }, "dazzlingGleam": { "name": "マジカルシャイン", - "effect": "強力な 光を 放ち 相手に ダメージを 与える。" + "effect": "強力な 光を 放ち 相手に ダメージを 与える。" }, "celebrate": { "name": "おいわい", - "effect": "ポケモンが とっても ハッピーな あなたのことを お祝い してくれる。" + "effect": "ポケモンが とっても ハッピーな あなたのことを お祝い してくれる。" }, "holdHands": { "name": "てをつなぐ", - "effect": "味方の ポケモン 同士が 手をつなぐ。 とっても 幸せな 気持ちに なれる。" + "effect": "味方の ポケモン 同士が 手をつなぐ。 とっても 幸せな 気持ちに なれる。" }, "babyDollEyes": { "name": "つぶらなひとみ", - "effect": "つぶらなひとみで 相手を みつめて 攻撃を さげる。 必ず 先制攻撃 できる。" + "effect": "つぶらなひとみで 相手を みつめて 攻撃を さげる。 必ず 先制攻撃 できる。" }, "nuzzle": { "name": "ほっぺすりすり", - "effect": "電気を 帯びた ほっぺを すりつけて 攻撃。 相手を まひ状態に する。" + "effect": "電気を 帯びた ほっぺを すりつけて 攻撃。 相手を まひ状態に する。" }, "holdBack": { "name": "てかげん", - "effect": "手加減 した 攻撃で 相手の HPを 必ず 1だけ 残す。" + "effect": "手加減 した 攻撃で 相手の HPを 必ず 1だけ 残す。" }, "infestation": { "name": "まとわりつく", - "effect": "4ー5ターンの 間 相手に まとわりついて 攻撃する。 そのあいだ 相手は 逃げられない。" + "effect": "4ー5ターンの 間 相手に まとわりついて 攻撃する。 そのあいだ 相手は 逃げられない。" }, "powerUpPunch": { "name": "グロウパンチ", - "effect": "繰り返し 打つことで だんだん こぶしが 固くなる。 相手に 当てると 攻撃が あがる。" + "effect": "繰り返し 打つことで だんだん こぶしが 固くなる。 相手に 当てると 攻撃が あがる。" }, "oblivionWing": { "name": "デスウイング", - "effect": "ねらいを 定めた 相手から HPを 吸い取る。 与えた ダメージの 半分以上 HPを 回復する。" + "effect": "ねらいを 定めた 相手から HPを 吸い取る。 与えた ダメージの 半分以上 HPを 回復する。" }, "thousandArrows": { "name": "サウザンアロー", - "effect": "浮いている ポケモンにも 当たる。 浮いていた 相手は 撃ち落とされて 地面に 落ちる。" + "effect": "浮いている ポケモンにも 当たる。 浮いていた 相手は 撃ち落とされて 地面に 落ちる。" }, "thousandWaves": { "name": "サウザンウェーブ", - "effect": "地をはう 波によって 攻撃。 波に 巻き込まれた 相手は 戦闘から 逃げられなくなる。" + "effect": "地をはう 波によって 攻撃。 波に 巻き込まれた 相手は 戦闘から 逃げられなくなる。" }, "landsWrath": { "name": "グランドフォース", - "effect": "大地の パワーを 集め 力を 相手に 集中させて ダメージを 与える。" + "effect": "大地の パワーを 集め 力を 相手に 集中させて ダメージを 与える。" }, "lightOfRuin": { "name": "はめつのひかり", - "effect": "永遠の花 の パワーを かりて 強力な 光線を 撃ちだす。 自分も かなりの ダメージを 受ける。" + "effect": "永遠の花 の パワーを かりて 強力な 光線を 撃ちだす。 自分も かなりの ダメージを 受ける。" }, "originPulse": { "name": "こんげんのはどう", - "effect": "青白く 輝く 無数の 光線で 相手を 攻撃する。" + "effect": "青白く 輝く 無数の 光線で 相手を 攻撃する。" }, "precipiceBlades": { "name": "だんがいのつるぎ", - "effect": "大地の 力を 刃に 変えて 相手を 攻撃する。" + "effect": "大地の 力を 刃に 変えて 相手を 攻撃する。" }, "dragonAscent": { "name": "ガリョウテンセイ", - "effect": "大空から 急速落下 して 相手を 攻撃する。 自分の 防御と 特防が さがる。" + "effect": "大空から 急速落下 して 相手を 攻撃する。 自分の 防御と 特防が さがる。" }, "hyperspaceFury": { "name": "いじげんラッシュ", - "effect": "たくさんの 腕で まもるや みきり などを 無視した 連続攻撃。 自分の 防御が さがる。" + "effect": "たくさんの 腕で まもるや みきり などを 無視した 連続攻撃。 自分の 防御が さがる。" }, "breakneckBlitzPhysical": { "name": "ウルトラダッシュアタック", - "effect": "Zパワーで 勢いを つけて 全力で 相手に ぶつかる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 勢いを つけて 全力で 相手に ぶつかる。 元になった 技で 威力が 変わる。" }, "breakneckBlitzSpecial": { "name": "ウルトラダッシュアタック", @@ -2493,7 +2493,7 @@ }, "allOutPummelingPhysical": { "name": "ぜんりょくむそうげきれつけん", - "effect": "Zパワーで 作った エネルギーの 弾を 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 作った エネルギーの 弾を 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" }, "allOutPummelingSpecial": { "name": "ぜんりょくむそうげきれつけん", @@ -2501,7 +2501,7 @@ }, "supersonicSkystrikePhysical": { "name": "ファイナルダイブクラッシュ", - "effect": "Zパワーで 勢いよく 飛びあがり 相手に 向かって 全力で 落下。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 勢いよく 飛びあがり 相手に 向かって 全力で 落下。 元になった 技で 威力が 変わる。" }, "supersonicSkystrikeSpecial": { "name": "ファイナルダイブクラッシュ", @@ -2509,7 +2509,7 @@ }, "acidDownpourPhysical": { "name": "アシッドポイズンデリート", - "effect": "Zパワーで 毒の 沼を 湧きあがらせ 全力で 相手を 沈める。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 毒の 沼を 湧きあがらせ 全力で 相手を 沈める。 元になった 技で 威力が 変わる。" }, "acidDownpourSpecial": { "name": "アシッドポイズンデリート", @@ -2517,7 +2517,7 @@ }, "tectonicRagePhysical": { "name": "ライジングランドオーバー", - "effect": "Zパワーで 地面の 奥深くに 潜り 全力で 相手に ぶつかる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 地面の 奥深くに 潜り 全力で 相手に ぶつかる。 元になった 技で 威力が 変わる。" }, "tectonicRageSpecial": { "name": "ライジングランドオーバー", @@ -2525,7 +2525,7 @@ }, "continentalCrushPhysical": { "name": "ワールズエンドフォール", - "effect": "Zパワーで 大きな 岩山を 呼びだし 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 大きな 岩山を 呼びだし 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" }, "continentalCrushSpecial": { "name": "ワールズエンドフォール", @@ -2533,7 +2533,7 @@ }, "savageSpinOutPhysical": { "name": "ぜったいほしょくかいてんざん", - "effect": "Zパワーで 吐きだした 糸が 全力で 相手を 縛りつける。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 吐きだした 糸が 全力で 相手を 縛りつける。 元になった 技で 威力が 変わる。" }, "savageSpinOutSpecial": { "name": "ぜったいほしょくかいてんざん", @@ -2541,7 +2541,7 @@ }, "neverEndingNightmarePhysical": { "name": "むげんあんやへのいざない", - "effect": "Zパワーで 呼びよせた 強い 怨念が 全力で 相手に 降りかかる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 呼びよせた 強い 怨念が 全力で 相手に 降りかかる。 元になった 技で 威力が 変わる。" }, "neverEndingNightmareSpecial": { "name": "むげんあんやへのいざない", @@ -2549,7 +2549,7 @@ }, "corkscrewCrashPhysical": { "name": "ちょうぜつらせんれんげき", - "effect": "Zパワーで 高速回転を おこない 全力で 相手に ぶつかる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 高速回転を おこない 全力で 相手に ぶつかる。 元になった 技で 威力が 変わる。" }, "corkscrewCrashSpecial": { "name": "ちょうぜつらせんれんげき", @@ -2557,7 +2557,7 @@ }, "infernoOverdrivePhysical": { "name": "ダイナミックフルフレイム", - "effect": "Zパワーで 燃えさかる 炎を 吐きだし 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 燃えさかる 炎を 吐きだし 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" }, "infernoOverdriveSpecial": { "name": "ダイナミックフルフレイム", @@ -2565,7 +2565,7 @@ }, "hydroVortexPhysical": { "name": "スーパーアクアトルネード", - "effect": "Zパワーで 大きな 渦潮を 作り 全力で 相手を 飲みこむ。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 大きな 渦潮を 作り 全力で 相手を 飲みこむ。 元になった 技で 威力が 変わる。" }, "hydroVortexSpecial": { "name": "スーパーアクアトルネード", @@ -2573,7 +2573,7 @@ }, "bloomDoomPhysical": { "name": "ブルームシャインエクストラ", - "effect": "Zパワーで 草花の エネルギーを 借り 全力で 相手を 攻撃する。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 草花の エネルギーを 借り 全力で 相手を 攻撃する。 元になった 技で 威力が 変わる。" }, "bloomDoomSpecial": { "name": "ブルームシャインエクストラ", @@ -2581,7 +2581,7 @@ }, "gigavoltHavocPhysical": { "name": "スパーキングギガボルト", - "effect": "Zパワーで 溜めた 強い 電気を 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 溜めた 強い 電気を 全力で 相手に ぶつける。 元になった 技で 威力が 変わる。" }, "gigavoltHavocSpecial": { "name": "スパーキングギガボルト", @@ -2589,7 +2589,7 @@ }, "shatteredPsychePhysical": { "name": "マキシマムサイブレイカー", - "effect": "Zパワーで 相手を 操り 全力で 痛い 思いを させる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 相手を 操り 全力で 痛い 思いを させる。 元になった 技で 威力が 変わる。" }, "shatteredPsycheSpecial": { "name": "マキシマムサイブレイカー", @@ -2597,7 +2597,7 @@ }, "subzeroSlammerPhysical": { "name": "レイジングジオフリーズ", - "effect": "Zパワーで 気温を 急激に 下げ 全力で 相手を 凍らせる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 気温を 急激に 下げ 全力で 相手を 凍らせる。 元になった 技で 威力が 変わる。" }, "subzeroSlammerSpecial": { "name": "レイジングジオフリーズ", @@ -2605,7 +2605,7 @@ }, "devastatingDrakePhysical": { "name": "アルティメットドラゴンバーン", - "effect": "Zパワーで オーラを 実体化し 全力で 相手に 襲いかかる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで オーラを 実体化し 全力で 相手に 襲いかかる。 元になった 技で 威力が 変わる。" }, "devastatingDrakeSpecial": { "name": "アルティメットドラゴンバーン", @@ -2613,7 +2613,7 @@ }, "blackHoleEclipsePhysical": { "name": "ブラックホールイクリプス", - "effect": "Zパワーで 悪の エネルギーを 集め 全力で 相手を 吸いよせる。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 悪の エネルギーを 集め 全力で 相手を 吸いよせる。 元になった 技で 威力が 変わる。" }, "blackHoleEclipseSpecial": { "name": "ブラックホールイクリプス", @@ -2621,7 +2621,7 @@ }, "twinkleTacklePhysical": { "name": "ラブリースターインパクト", - "effect": "Zパワーで 魅惑の 空間を 作り 全力で 相手を もてあそぶ。 元になった 技で 威力が 変わる。" + "effect": "Zパワーで 魅惑の 空間を 作り 全力で 相手を もてあそぶ。 元になった 技で 威力が 変わる。" }, "twinkleTackleSpecial": { "name": "ラブリースターインパクト", @@ -2629,1182 +2629,1182 @@ }, "catastropika": { "name": "ひっさつのピカチュート", - "effect": "Zパワーで 最大 電力を 身に まとったピカチュウが 全力で 相手に 飛び掛る。" + "effect": "Zパワーで 最大 電力を 身に まとったピカチュウが 全力で 相手に 飛び掛る。" }, "shoreUp": { "name": "すなあつめ", - "effect": "最大HPの 半分 自分の HPを 回復する。 すなあらしの時は 多く 回復。" + "effect": "最大HPの 半分 自分の HPを 回復する。 すなあらしの時は 多く 回復。" }, "firstImpression": { "name": "であいがしら", - "effect": "威力が 高い 技 だが 戦闘に 出たら すぐに 出さないと 成功 しない。" + "effect": "威力が 高い 技 だが 戦闘に 出たら すぐに 出さないと 成功 しない。" }, "banefulBunker": { "name": "トーチカ", - "effect": "相手の 攻撃を 防ぐと 同時に 触れた 相手に 毒を 与えてしまう。" + "effect": "相手の 攻撃を 防ぐと 同時に 触れた 相手に 毒を 与えてしまう。" }, "spiritShackle": { "name": "かげぬい", - "effect": "攻撃と 同時に 相手の 影を 縫い付けて 逃げられなくする。" + "effect": "攻撃と 同時に 相手の 影を 縫い付けて 逃げられなくする。" }, "darkestLariat": { "name": "DDラリアット", - "effect": "両腕を 回し 相手に 当てる。 相手の 能力変化に 関係なく ダメージを 与える。" + "effect": "両腕を 回し 相手に 当てる。 相手の 能力変化に 関係なく ダメージを 与える。" }, "sparklingAria": { "name": "うたかたのアリア", - "effect": "歌うことによって たくさんの バルーンを 放出する。 技を 受けると やけどが 治る。" + "effect": "歌うことによって たくさんの バルーンを 放出する。 技を 受けると やけどが 治る。" }, "iceHammer": { "name": "アイスハンマー", - "effect": "強くて 重い こぶしを ふるって ダメージを 与える。 自分の 素早さが さがる。" + "effect": "強くて 重い こぶしを ふるって ダメージを 与える。 自分の 素早さが さがる。" }, "floralHealing": { "name": "フラワーヒール", - "effect": "最大HPの 半分 相手の HPを 回復する。 グラスフィールドの時 効果が あがる。" + "effect": "最大HPの 半分 相手の HPを 回復する。 グラスフィールドの時 効果が あがる。" }, "highHorsepower": { "name": "10まんばりき", - "effect": "全身を 使って 相手に 猛アタックする。" + "effect": "全身を 使って 相手に 猛アタックする。" }, "strengthSap": { "name": "ちからをすいとる", - "effect": "相手の 攻撃力と 同じだけ 自分の HPを 回復する。 そして 相手の 攻撃を さげる。" + "effect": "相手の 攻撃力と 同じだけ 自分の HPを 回復する。 そして 相手の 攻撃を さげる。" }, "solarBlade": { "name": "ソーラーブレード", - "effect": "1ターン目に 光を いっぱいに 集め 2ターン目に その 力を 剣に 込めて 攻撃する。" + "effect": "1ターン目に 光を いっぱいに 集め 2ターン目に その 力を 剣に 込めて 攻撃する。" }, "leafage": { "name": "このは", - "effect": "はっぱを 相手に 当てて 攻撃する。" + "effect": "はっぱを 相手に 当てて 攻撃する。" }, "spotlight": { "name": "スポットライト", - "effect": "ポケモンに スポットライトを 当て そのターンに そのポケモンしか 狙えない ようにする。" + "effect": "ポケモンに スポットライトを 当て そのターンに そのポケモンしか 狙えない ようにする。" }, "toxicThread": { "name": "どくのいと", - "effect": "毒の 混じった 糸を 吹き付ける。 相手を 毒にして 素早さを さげる。" + "effect": "毒の 混じった 糸を 吹き付ける。 相手を 毒にして 素早さを さげる。" }, "laserFocus": { "name": "とぎすます", - "effect": "精神を 集中して 次の 攻撃を 必ず 急所に 当てる。" + "effect": "精神を 集中して 次の 攻撃を 必ず 急所に 当てる。" }, "gearUp": { "name": "アシストギア", - "effect": "ギアを 入れる ことによって 特性 プラスと マイナスの 攻撃と 特攻が あがる。" + "effect": "ギアを 入れる ことによって 特性 プラスと マイナスの 攻撃と 特攻が あがる。" }, "throatChop": { "name": "じごくづき", - "effect": "この 技を 受けた 相手は 地獄の 苦しみから 2ターンの間 音の 技を 出すことが できなくなる。" + "effect": "この 技を 受けた 相手は 地獄の 苦しみから 2ターンの間 音の 技を 出すことが できなくなる。" }, "pollenPuff": { "name": "かふんだんご", - "effect": "敵には 爆発する だんごを 使って 攻撃。 味方には 回復する だんごを 与える。" + "effect": "敵には 爆発する だんごを 使って 攻撃。 味方には 回復する だんごを 与える。" }, "anchorShot": { "name": "アンカーショット", - "effect": "アンカーを 相手に からませて 攻撃する。 相手は 逃げることが できなくなる。" + "effect": "アンカーを 相手に からませて 攻撃する。 相手は 逃げることが できなくなる。" }, "psychicTerrain": { "name": "サイコフィールド", - "effect": "5ターンの間 地面にいると 先制技を 受けない。 エスパータイプの 威力が あがる。" + "effect": "5ターンの間 地面にいると 先制技を 受けない。 エスパータイプの 威力が あがる。" }, "lunge": { "name": "とびかかる", - "effect": "全力で 相手に 飛びかかって 攻撃。 相手の 攻撃を さげる。" + "effect": "全力で 相手に 飛びかかって 攻撃。 相手の 攻撃を さげる。" }, "fireLash": { "name": "ほのおのムチ", - "effect": "焼けたムチで 相手を 打ちつける。 攻撃を 受けた 相手は 防御が さがる。" + "effect": "焼けたムチで 相手を 打ちつける。 攻撃を 受けた 相手は 防御が さがる。" }, "powerTrip": { "name": "つけあがる", - "effect": "自分の 強さを 鼻高々に 攻撃する。自分の 能力が あがって いるほど 威力が あがる。" + "effect": "自分の 強さを 鼻高々に 攻撃する。自分の 能力が あがって いるほど 威力が あがる。" }, "burnUp": { "name": "もえつきる", - "effect": "全身の ほのおを すべて 燃やして 大ダメージを 与える。 自分の ほのおタイプが なくなる。" + "effect": "全身の ほのおを すべて 燃やして 大ダメージを 与える。 自分の ほのおタイプが なくなる。" }, "speedSwap": { "name": "スピードスワップ", - "effect": "相手の 素早さと 自分の 素早さを 入れ替えてしまう。" + "effect": "相手の 素早さと 自分の 素早さを 入れ替えてしまう。" }, "smartStrike": { "name": "スマートホーン", - "effect": "とがった つので 相手を 突き刺して 攻撃する。 攻撃は 必ず 命中する。" + "effect": "とがった つので 相手を 突き刺して 攻撃する。 攻撃は 必ず 命中する。" }, "purify": { "name": "じょうか", - "effect": "相手の 状態異常を 治す。 治すと 自分は HPを 回復 することが できる。" + "effect": "相手の 状態異常を 治す。 治すと 自分は HPを 回復 することが できる。" }, "revelationDance": { "name": "めざめるダンス", - "effect": "全力で 踊って 攻撃する。 この 技の タイプは 自分の タイプと 同じになる。" + "effect": "全力で 踊って 攻撃する。 この 技の タイプは 自分の タイプと 同じになる。" }, "coreEnforcer": { "name": "コアパニッシャー", - "effect": "ダメージを 与えた 相手が すでに 行動を 終えていたら 相手の 特性を 消してしまう。" + "effect": "ダメージを 与えた 相手が すでに 行動を 終えていたら 相手の 特性を 消してしまう。" }, "tropKick": { "name": "トロピカルキック", - "effect": "南国 由来の 熱い キックを 相手に 浴びせる。 相手の 攻撃を さげる。" + "effect": "南国 由来の 熱い キックを 相手に 浴びせる。 相手の 攻撃を さげる。" }, "instruct": { "name": "さいはい", - "effect": "相手が 出した 技を 指示して もう一度 出させることが できる。" + "effect": "相手が 出した 技を 指示して もう一度 出させることが できる。" }, "beakBlast": { "name": "くちばしキャノン", - "effect": "最初に クチバシを 加熱してから 攻撃を くりだす。 加熱中に さわると やけどする。" + "effect": "最初に クチバシを 加熱してから 攻撃を くりだす。 加熱中に さわると やけどする。" }, "clangingScales": { "name": "スケイルノイズ", - "effect": "全身の うろこを こすり 大きな 音を 出して 攻撃する。 攻撃後 自分の 防御が さがる。" + "effect": "全身の うろこを こすり 大きな 音を 出して 攻撃する。 攻撃後 自分の 防御が さがる。" }, "dragonHammer": { "name": "ドラゴンハンマー", - "effect": "体を ハンマーのように 使って 相手に 襲いかかり ダメージを 与える。" + "effect": "体を ハンマーのように 使って 相手に 襲いかかり ダメージを 与える。" }, "brutalSwing": { "name": "ぶんまわす", - "effect": "自分の 体を ぶんまわして 相手に ダメージを 与える。" + "effect": "自分の 体を ぶんまわして 相手に ダメージを 与える。" }, "auroraVeil": { "name": "オーロラベール", - "effect": "5ターンの 間 物理と 特殊の ダメージを 弱める。 ゆきの 時しか 出すことが できない。" + "effect": "5ターンの 間 物理と 特殊の ダメージを 弱める。 ゆきの 時しか 出すことが できない。" }, "sinisterArrowRaid": { "name": "シャドーアローズストライク", - "effect": "Zパワーで 無数の 矢を 作りだした ジュナイパーが 全力で 相手を 射抜く 攻撃。" + "effect": "Zパワーで 無数の 矢を 作りだした ジュナイパーが 全力で 相手を 射抜く 攻撃。" }, "maliciousMoonsault": { "name": "ハイパーダーククラッシャー", - "effect": "Zパワーで タフな 肉体を 得た ガオガエンが 全力で 相手に ぶつかって 攻撃する。" + "effect": "Zパワーで タフな 肉体を 得た ガオガエンが 全力で 相手に ぶつかって 攻撃する。" }, "oceanicOperetta": { "name": "わだつみのシンフォニア", - "effect": "Zパワーで 大量の 水を 呼んだ アシレーヌが 全力で 相手を 攻撃する。" + "effect": "Zパワーで 大量の 水を 呼んだ アシレーヌが 全力で 相手を 攻撃する。" }, "guardianOfAlola": { "name": "ガーディアン・デ・アローラ", - "effect": "Zパワーで アローラの 力を 得た とちがみポケモン 全力の 攻撃。 相手の 残りHPを たくさん 減らす。" + "effect": "Zパワーで アローラの 力を 得た とちがみポケモン 全力の 攻撃。 相手の 残りHPを たくさん 減らす。" }, "soulStealing7StarStrike": { "name": "しちせいだっこんたい", - "effect": "Zパワーを 得た マーシャドーが パンチと キックの 連続技を 全力で 相手に 叩き込む。" + "effect": "Zパワーを 得た マーシャドーが パンチと キックの 連続技を 全力で 相手に 叩き込む。" }, "stokedSparksurfer": { "name": "ライトニングサーフライド", - "effect": "Zパワーを 得た アローラ地方の ライチュウが 全力で 攻撃する。 相手を まひ 状態に する。" + "effect": "Zパワーを 得た アローラ地方の ライチュウが 全力で 攻撃する。 相手を まひ 状態に する。" }, "pulverizingPancake": { - "name": "ほんきをだす こうげき", - "effect": "Zパワーで 本気を 出した カビゴンが 巨体を 躍動させて 全力で 相手に 襲いかかる。" + "name": "ほんきをだす こうげき", + "effect": "Zパワーで 本気を 出した カビゴンが 巨体を 躍動させて 全力で 相手に 襲いかかる。" }, "extremeEvoboost": { "name": "ナインエボルブースト", - "effect": "Zパワーを 得た イーブイが 進化した 仲間たちの 力を 借りて 能力を ぐーんと 上げる。" + "effect": "Zパワーを 得た イーブイが 進化した 仲間たちの 力を 借りて 能力を ぐーんと 上げる。" }, "genesisSupernova": { "name": "オリジンズスーパーノヴァ", - "effect": "Zパワーを 得た ミュウが 全力で 相手を 攻撃する。 足元が サイコフィールドになる。" + "effect": "Zパワーを 得た ミュウが 全力で 相手を 攻撃する。 足元が サイコフィールドになる。" }, "shellTrap": { "name": "トラップシェル", - "effect": "こうらの トラップを しかける。 相手が 物理技を 出すと 爆発して ダメージを 与える。" + "effect": "こうらの トラップを しかける。 相手が 物理技を 出すと 爆発して ダメージを 与える。" }, "fleurCannon": { "name": "フルールカノン", - "effect": "強力な ビームを 放ったあと 自分の 特攻が がくっと さがる。" + "effect": "強力な ビームを 放ったあと 自分の 特攻が がくっと さがる。" }, "psychicFangs": { "name": "サイコファング", - "effect": "サイコパワーで かみついて 相手を 攻撃する。 ひかりのかべや リフレクター なども 破壊できる。" + "effect": "サイコパワーで かみついて 相手を 攻撃する。 ひかりのかべや リフレクター なども 破壊できる。" }, "stompingTantrum": { "name": "じだんだ", - "effect": "悔しさを バネにして 攻撃する。 前の ターンに 技を 外していると 威力が 倍に なる。" + "effect": "悔しさを バネにして 攻撃する。 前の ターンに 技を 外していると 威力が 倍に なる。" }, "shadowBone": { "name": "シャドーボーン", - "effect": "魂の 宿った ホネで 相手を なぐりつけて 攻撃する。 相手の 防御を さげる ことがある。" + "effect": "魂の 宿った ホネで 相手を なぐりつけて 攻撃する。 相手の 防御を さげる ことがある。" }, "accelerock": { "name": "アクセルロック", - "effect": "素早い スピードで 相手に ぶつかって 攻撃する。 必ず 先制攻撃 できる。" + "effect": "素早い スピードで 相手に ぶつかって 攻撃する。 必ず 先制攻撃 できる。" }, "liquidation": { "name": "アクアブレイク", - "effect": "水の 力で 相手に ぶつかって 攻撃する。 相手の 防御を さげる ことがある。" + "effect": "水の 力で 相手に ぶつかって 攻撃する。 相手の 防御を さげる ことがある。" }, "prismaticLaser": { "name": "プリズムレーザー", - "effect": "プリズムの 力で 強力な 光線を 発射する。 次の ターンは 動けなくなる。" + "effect": "プリズムの 力で 強力な 光線を 発射する。 次の ターンは 動けなくなる。" }, "spectralThief": { "name": "シャドースチール", - "effect": "相手の 影に 潜り込み 相手の 能力アップを 奪って 攻撃する。" + "effect": "相手の 影に 潜り込み 相手の 能力アップを 奪って 攻撃する。" }, "sunsteelStrike": { "name": "メテオドライブ", - "effect": "流星の ような 勢いで 突進する。 相手の 特性を 無視して 攻撃 することが できる。" + "effect": "流星の ような 勢いで 突進する。 相手の 特性を 無視して 攻撃 することが できる。" }, "moongeistBeam": { "name": "シャドーレイ", - "effect": "怪しい 光線を 放って 攻撃する。相手の 特性を 無視して 攻撃 することが できる。" + "effect": "怪しい 光線を 放って 攻撃する。相手の 特性を 無視して 攻撃 することが できる。" }, "tearfulLook": { "name": "なみだめ", - "effect": "なみだめに なって 相手の 戦力を 喪失させる。 相手の 攻撃と 特攻が さがる。" + "effect": "なみだめに なって 相手の 戦力を 喪失させる。 相手の 攻撃と 特攻が さがる。" }, "zingZap": { "name": "びりびりちくちく", - "effect": "相手に ぶつかって 強力な 電気を浴びせ びりびりちくちく させる。 相手を ひるませる ことが ある。" + "effect": "相手に ぶつかって 強力な 電気を浴びせ びりびりちくちく させる。 相手を ひるませる ことが ある。" }, "naturesMadness": { "name": "しぜんのいかり", - "effect": "自然の 怒りを 相手に ぶつける。 相手の HPは 半分に なる。" + "effect": "自然の 怒りを 相手に ぶつける。 相手の HPは 半分に なる。" }, "multiAttack": { "name": "マルチアタック", - "effect": "高い エネルギーを まといつつ 相手に ぶつかって 攻撃する。 メモリに より タイプが 変わる。" + "effect": "高い エネルギーを まといつつ 相手に ぶつかって 攻撃する。 メモリに より タイプが 変わる。" }, "tenMillionVoltThunderbolt": { "name": "1000まんボルト", - "effect": "帽子を かぶった ピカチュウが Zパワーで パワーアップした 電撃を 放つ。 急所に 当たりやすい。" + "effect": "帽子を かぶった ピカチュウが Zパワーで パワーアップした 電撃を 放つ。 急所に 当たりやすい。" }, "mindBlown": { "name": "ビックリヘッド", - "effect": "自分の 頭を 爆発 させて 周りの すべてを 攻撃する。 自分も ダメージを 受けてしまう。" + "effect": "自分の 頭を 爆発 させて 周りの すべてを 攻撃する。 自分も ダメージを 受けてしまう。" }, "plasmaFists": { "name": "プラズマフィスト", - "effect": "電気を まとった こぶしで 攻撃。 ノーマルタイプの 技を でんきタイプに してしまう。" + "effect": "電気を まとった こぶしで 攻撃。 ノーマルタイプの 技を でんきタイプに してしまう。" }, "photonGeyser": { "name": "フォトンゲイザー", - "effect": "光の 柱で 攻撃する。 攻撃と 特攻を 比べて 高いほうで ダメージを 与える。" + "effect": "光の 柱で 攻撃する。 攻撃と 特攻を 比べて 高いほうで ダメージを 与える。" }, "lightThatBurnsTheSky": { "name": "てんこがすめつぼうのひかり", - "effect": "ネクロズマが 相手の 特性の 効果を 無視して 攻撃と 特攻の 高い方で ダメージを 与える。" + "effect": "ネクロズマが 相手の 特性の 効果を 無視して 攻撃と 特攻の 高い方で ダメージを 与える。" }, "searingSunrazeSmash": { "name": "サンシャインスマッシャー", - "effect": "Zパワーを 得た ソルガレオが 全力で 攻撃する。 相手の 特性の 効果を 無視できる。" + "effect": "Zパワーを 得た ソルガレオが 全力で 攻撃する。 相手の 特性の 効果を 無視できる。" }, "menacingMoonrazeMaelstrom": { "name": "ムーンライトブラスター", - "effect": "Zパワーを 得た ルナアーラが 全力で 攻撃する。 相手の 特性の 効果を 無視できる。" + "effect": "Zパワーを 得た ルナアーラが 全力で 攻撃する。 相手の 特性の 効果を 無視できる。" }, "letsSnuggleForever": { "name": "ぽかぼかフレンドタイム", - "effect": "Zパワーを 得た ミミッキュが 全力で ぽかぽか 攻撃。" + "effect": "Zパワーを 得た ミミッキュが 全力で ぽかぽか 攻撃。" }, "splinteredStormshards": { "name": "ラジアルエッジストーム", - "effect": "Zパワーを 得た ルガルガンが 全力で 攻撃する。 追加で フィールド状態を 打ち消す。" + "effect": "Zパワーを 得た ルガルガンが 全力で 攻撃する。 追加で フィールド状態を 打ち消す。" }, "clangorousSoulblaze": { "name": "ブレイジングソウルビート", - "effect": "Zパワーを 得た ジャラランガが 全力で 相手を 攻撃する。 追加で 自分の 能力が 上がる。" + "effect": "Zパワーを 得た ジャラランガが 全力で 相手を 攻撃する。 追加で 自分の 能力が 上がる。" }, "zippyZap": { "name": "ばちばちアクセル", - "effect": "猛スピードの 電撃 アタック。 必ず 先制攻撃 できて 急所に あたる。" + "effect": "猛スピードの 電撃 アタック。 必ず 先制攻撃 できて 急所に あたる。" }, "splishySplash": { "name": "ざぶざぶサーフ", - "effect": "大きな 波に 電気を あびせ 相手に ぶつけて 攻撃する。 まひ状態に することが ある。" + "effect": "大きな 波に 電気を あびせ 相手に ぶつけて 攻撃する。 まひ状態に することが ある。" }, "floatyFall": { "name": "ふわふわフォール", - "effect": "ふんわりと 浮かび あがり 一気に 急降下して 攻撃。 相手を ひるませることが ある。" + "effect": "ふんわりと 浮かび あがり 一気に 急降下して 攻撃。 相手を ひるませることが ある。" }, "pikaPapow": { "name": "ピカピカサンダー", - "effect": "トレーナーへの 大好きな 気持ちが 強いほど 威力が あがる 電撃。 必ず 命中する。" + "effect": "トレーナーへの 大好きな 気持ちが 強いほど 威力が あがる 電撃。 必ず 命中する。" }, "bouncyBubble": { "name": "いきいきバブル", - "effect": "水のかたまりを ぶつけて 攻撃。 水を 吸いとり ダメージの 半分の HPを 回復する。" + "effect": "水のかたまりを ぶつけて 攻撃。 水を 吸いとり ダメージの 半分の HPを 回復する。" }, "buzzyBuzz": { "name": "びりびりエレキ", - "effect": "電気を 飛ばし 相手に あびせて 攻撃する。 相手を まひ状態に する。" + "effect": "電気を 飛ばし 相手に あびせて 攻撃する。 相手を まひ状態に する。" }, "sizzlySlide": { "name": "めらめらバーン", - "effect": "炎を まとった 体で 勢いよく 相手に ぶつかる。 相手を やけど状態に する。" + "effect": "炎を まとった 体で 勢いよく 相手に ぶつかる。 相手を やけど状態に する。" }, "glitzyGlow": { "name": "どばどばオーラ", - "effect": "念力を これでもかと あびせる。 相手の 特殊攻撃を 弱める 不思議な かべを つくりだす。" + "effect": "念力を これでもかと あびせる。 相手の 特殊攻撃を 弱める 不思議な かべを つくりだす。" }, "baddyBad": { "name": "わるわるゾーン", - "effect": "わるさを アピールして 攻撃。 相手の 物理攻撃を 弱める 不思議な かべを つくりだす。" + "effect": "わるさを アピールして 攻撃。 相手の 物理攻撃を 弱める 不思議な かべを つくりだす。" }, "sappySeed": { "name": "すくすくボンバー", - "effect": "巨大な ツルを 生やし タネを 撒きちらかして 攻撃する。 タネは 毎ターン 相手の HPを 吸いとる。" + "effect": "巨大な ツルを 生やし タネを 撒きちらかして 攻撃する。 タネは 毎ターン 相手の HPを 吸いとる。" }, "freezyFrost": { "name": "こちこちフロスト", - "effect": "冷たく 凍った くろいきりの 結晶で 攻撃。 全員の 能力変化を もとに もどす。" + "effect": "冷たく 凍った くろいきりの 結晶で 攻撃。 全員の 能力変化を もとに もどす。" }, "sparklySwirl": { "name": "きらきらストーム", - "effect": "むせかえる ような 香りの 竜巻で 相手を つつんで 攻撃。 味方の 状態異常を 回復する。" + "effect": "むせかえる ような 香りの 竜巻で 相手を つつんで 攻撃。 味方の 状態異常を 回復する。" }, "veeveeVolley": { "name": "ブイブイブレイク", - "effect": "イーブイの トレーナーへの 大好きな 気持ちが 強いほど 威力が あがる 体当たり。 必ず 命中する。" + "effect": "イーブイの トレーナーへの 大好きな 気持ちが 強いほど 威力が あがる 体当たり。 必ず 命中する。" }, "doubleIronBash": { "name": "ダブルパンツァー", - "effect": "胸の ナットを 軸に 回転して 2回 続けて うでを たたきつける。 相手を ひるませる ことが ある。" + "effect": "胸の ナットを 軸に 回転して 2回 続けて うでを たたきつける。 相手を ひるませる ことが ある。" }, "maxGuard": { "name": "ダイウォール", - "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。" + "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。" }, "dynamaxCannon": { "name": "ダイマックスほう", - "effect": "コアから ビームを 放つ。相手の レベルが 過度に 上がっている 場合は 与える ダメージが 最大 2倍に 増える。" + "effect": "コアから ビームを 放つ。相手の レベルが 過度に 上がっている 場合は 与える ダメージが 最大 2倍に 増える。" }, "snipeShot": { "name": "ねらいうち", - "effect": "相手の 技を 引き受ける 特性や 技の 影響を 無視して 選んだ 相手を 攻撃 できる。" + "effect": "相手の 技を 引き受ける 特性や 技の 影響を 無視して 選んだ 相手を 攻撃 できる。" }, "jawLock": { "name": "くらいつく", - "effect": "お互い ひんしに なるまで 交代が できなくなる。 どちらかの ポケモンが いなくなると 効果は消える。" + "effect": "お互い ひんしに なるまで 交代が できなくなる。 どちらかの ポケモンが いなくなると 効果は消える。" }, "stuffCheeks": { "name": "ほおばる", - "effect": "持っている きのみを 食べて 防御を ぐーんと あげる。" + "effect": "持っている きのみを 食べて 防御を ぐーんと あげる。" }, "noRetreat": { "name": "はいすいのじん", - "effect": "自分の すべての 能力が 上がるが 交代 したり 逃げることが できなくなる。" + "effect": "自分の すべての 能力が 上がるが 交代 したり 逃げることが できなくなる。" }, "tarShot": { "name": "タールショット", - "effect": "ねばねばの タールを 浴びせて 相手の 素早さを 下げる。 相手は ほのおが 弱点に なる。" + "effect": "ねばねばの タールを 浴びせて 相手の 素早さを 下げる。 相手は ほのおが 弱点に なる。" }, "magicPowder": { "name": "まほうのこな", - "effect": "まほうのこなを 浴びせて 相手を エスパータイプに 変化させる。" + "effect": "まほうのこなを 浴びせて 相手を エスパータイプに 変化させる。" }, "dragonDarts": { "name": "ドラゴンアロー", - "effect": "ドラメシヤで 2回 攻撃。 相手が 2匹 いるときは それぞれに 1回ずつ 攻撃する。" + "effect": "ドラメシヤで 2回 攻撃。 相手が 2匹 いるときは それぞれに 1回ずつ 攻撃する。" }, "teatime": { "name": "おちゃかい", - "effect": "おちゃかいを ひらいて 場にいる ポケモンが それぞれ 持っている きのみを 食べる。" + "effect": "おちゃかいを ひらいて 場にいる ポケモンが それぞれ 持っている きのみを 食べる。" }, "octolock": { "name": "たこがため", - "effect": "相手を 逃げられなくする。 かためられた 相手は 毎ターン 防御と 特防が 下がる。" + "effect": "相手を 逃げられなくする。 かためられた 相手は 毎ターン 防御と 特防が 下がる。" }, "boltBeak": { "name": "でんげきくちばし", - "effect": "電気を まとった くちばしで 刺す。 相手より 先に 攻撃できると 技の 威力は 2倍に なる。" + "effect": "電気を まとった くちばしで 刺す。 相手より 先に 攻撃できると 技の 威力は 2倍に なる。" }, "fishiousRend": { "name": "エラがみ", - "effect": "かたい エラで かみつく。 相手より 先に 攻撃できると 技の 威力は 2倍に なる。" + "effect": "かたい エラで かみつく。 相手より 先に 攻撃できると 技の 威力は 2倍に なる。" }, "courtChange": { "name": "コートチェンジ", - "effect": "不思議な 力で お互いの 場の 効果を 入れ替える。" + "effect": "不思議な 力で お互いの 場の 効果を 入れ替える。" }, "maxFlare": { "name": "ダイバーン", - "effect": "ダイマックスした ポケモンが 繰りだす ほのおタイプの 攻撃。 5ターンの 間 日差しを 強くする。" + "effect": "ダイマックスした ポケモンが 繰りだす ほのおタイプの 攻撃。 5ターンの 間 日差しを 強くする。" }, "maxFlutterby": { "name": "ダイワーム", - "effect": "ダイマックスした ポケモンが 繰りだす むしタイプの 攻撃。 相手の 特攻を 下げる。" + "effect": "ダイマックスした ポケモンが 繰りだす むしタイプの 攻撃。 相手の 特攻を 下げる。" }, "maxLightning": { "name": "ダイサンダー", - "effect": "ダイマックスした ポケモンが 繰りだす でんきタイプの 攻撃。 5ターンの 間 エレキフィールドにする。" + "effect": "ダイマックスした ポケモンが 繰りだす でんきタイプの 攻撃。 5ターンの 間 エレキフィールドにする。" }, "maxStrike": { "name": "ダイアタック", - "effect": "ダイマックスした ポケモンが 繰りだす ノーマルタイプの 攻撃。 相手の 素早さを 下げる。" + "effect": "ダイマックスした ポケモンが 繰りだす ノーマルタイプの 攻撃。 相手の 素早さを 下げる。" }, "maxKnuckle": { "name": "ダイナックル", - "effect": "ダイマックスした ポケモンが 繰りだす かくとうタイプの 攻撃。 味方の 攻撃を 上げる。" + "effect": "ダイマックスした ポケモンが 繰りだす かくとうタイプの 攻撃。 味方の 攻撃を 上げる。" }, "maxPhantasm": { "name": "ダイホロウ", - "effect": "ダイマックスした ポケモンが 繰りだす ゴーストタイプの 攻撃。 相手の 防御を 下げる。" + "effect": "ダイマックスした ポケモンが 繰りだす ゴーストタイプの 攻撃。 相手の 防御を 下げる。" }, "maxHailstorm": { "name": "ダイアイス", - "effect": "ダイマックスした ポケモンが 繰りだす こおりタイプの 攻撃。 5ターンの 間 あられを 降らす。" + "effect": "ダイマックスした ポケモンが 繰りだす こおりタイプの 攻撃。 5ターンの 間 あられを 降らす。" }, "maxOoze": { "name": "ダイアシッド", - "effect": "ダイマックスした ポケモンが 繰りだす どくタイプの 攻撃。 味方の 特攻を 上げる。" + "effect": "ダイマックスした ポケモンが 繰りだす どくタイプの 攻撃。 味方の 特攻を 上げる。" }, "maxGeyser": { "name": "ダイストリーム", - "effect": "ダイマックスした ポケモンが 繰りだす みずタイプの 攻撃。 5ターンの 間 雨を 降らせる。" + "effect": "ダイマックスした ポケモンが 繰りだす みずタイプの 攻撃。 5ターンの 間 雨を 降らせる。" }, "maxAirstream": { "name": "ダイジェット", - "effect": "ダイマックスした ポケモンが 繰りだす ひこうタイプの 攻撃。 味方の 素早さを 上げる。" + "effect": "ダイマックスした ポケモンが 繰りだす ひこうタイプの 攻撃。 味方の 素早さを 上げる。" }, "maxStarfall": { "name": "ダイフェアリー", - "effect": "ダイマックスした ポケモンが 繰りだす フェアリータイプの 攻撃。 5ターンの 間 ミストフィールドにする。" + "effect": "ダイマックスした ポケモンが 繰りだす フェアリータイプの 攻撃。 5ターンの 間 ミストフィールドにする。" }, "maxWyrmwind": { "name": "ダイドラグーン", - "effect": "ダイマックスした ポケモンが 繰りだす ドラゴンタイプの 攻撃。 相手の 攻撃を 下げる。" + "effect": "ダイマックスした ポケモンが 繰りだす ドラゴンタイプの 攻撃。 相手の 攻撃を 下げる。" }, "maxMindstorm": { "name": "ダイサイコ", - "effect": "ダイマックスした ポケモンが 繰りだす エスパータイプの 攻撃。 5ターンの 間 サイコフィールドにする。" + "effect": "ダイマックスした ポケモンが 繰りだす エスパータイプの 攻撃。 5ターンの 間 サイコフィールドにする。" }, "maxRockfall": { "name": "ダイロック", - "effect": "ダイマックスした ポケモンが 繰りだす いわタイプの 攻撃。 5ターンの 間 砂あらしにする。" + "effect": "ダイマックスした ポケモンが 繰りだす いわタイプの 攻撃。 5ターンの 間 砂あらしにする。" }, "maxQuake": { "name": "ダイアース", - "effect": "ダイマックスした ポケモンが 繰りだす じめんタイプの 攻撃。 味方の 特防を 上げる。" + "effect": "ダイマックスした ポケモンが 繰りだす じめんタイプの 攻撃。 味方の 特防を 上げる。" }, "maxDarkness": { "name": "ダイアーク", - "effect": "ダイマックスした ポケモンが 繰りだす あくタイプの 攻撃。 相手の 特防を 下げる。" + "effect": "ダイマックスした ポケモンが 繰りだす あくタイプの 攻撃。 相手の 特防を 下げる。" }, "maxOvergrowth": { "name": "ダイソウゲン", - "effect": "ダイマックスした ポケモンが 繰りだす くさタイプの 攻撃。 5ターンの 間 グラスフィールドにする。" + "effect": "ダイマックスした ポケモンが 繰りだす くさタイプの 攻撃。 5ターンの 間 グラスフィールドにする。" }, "maxSteelspike": { "name": "ダイスチル", - "effect": "ダイマックスした ポケモンが 繰りだす はがねタイプの 攻撃。 味方の 防御を 上げる。" + "effect": "ダイマックスした ポケモンが 繰りだす はがねタイプの 攻撃。 味方の 防御を 上げる。" }, "clangorousSoul": { "name": "ソウルビート", - "effect": "自分の HPを 少し 削って すべての 能力を 上げる。" + "effect": "自分の HPを 少し 削って すべての 能力を 上げる。" }, "bodyPress": { "name": "ボディプレス", - "effect": "体を ぶつけて 攻撃。 防御が 高いほど 与える ダメージが 増える。" + "effect": "体を ぶつけて 攻撃。 防御が 高いほど 与える ダメージが 増える。" }, "decorate": { "name": "デコレーション", - "effect": "かざりつけを することで 相手の 攻撃と 特攻を ぐーんと 上げる。" + "effect": "かざりつけを することで 相手の 攻撃と 特攻を ぐーんと 上げる。" }, "drumBeating": { "name": "ドラムアタック", - "effect": "ドラムの 根っこを ドラミングで コントロールして こうげき することで 相手の 素早さを 下げる。" + "effect": "ドラムの 根っこを ドラミングで コントロールして こうげき することで 相手の 素早さを 下げる。" }, "snapTrap": { "name": "トラバサミ", - "effect": "トラバサミで 捕らえて 4-5ターンの 間 相手を はさんで 攻撃する。" + "effect": "トラバサミで 捕らえて 4-5ターンの 間 相手を はさんで 攻撃する。" }, "pyroBall": { "name": "かえんボール", - "effect": "小石を 燃やした 炎の ボールで 相手を 攻撃する。 やけど 状態に することが ある。" + "effect": "小石を 燃やした 炎の ボールで 相手を 攻撃する。 やけど 状態に することが ある。" }, "behemothBlade": { "name": "きょじゅうざん", - "effect": "全身で 強大な剣を 振りかざし 勢いよく 切りかかって 攻撃する。" + "effect": "全身で 強大な剣を 振りかざし 勢いよく 切りかかって 攻撃する。" }, "behemothBash": { "name": "きょじゅうだん", - "effect": "全身を 強固な盾へと 変化させ 勢いよく ぶつかって 攻撃する。" + "effect": "全身を 強固な盾へと 変化させ 勢いよく ぶつかって 攻撃する。" }, "auraWheel": { "name": "オーラぐるま", - "effect": "ほほぶくろに 溜めた エネルギーで 攻撃し 自分の 素早さを あげる。 モルペコの 姿で タイプが 変わる。" + "effect": "ほほぶくろに 溜めた エネルギーで 攻撃し 自分の 素早さを あげる。 モルペコの 姿で タイプが 変わる。" }, "breakingSwipe": { "name": "ワイドブレイカー", - "effect": "きょうじんな しっぽを 激しく ふりはらって 相手を 攻撃する。 相手の 攻撃を 下げる。" + "effect": "きょうじんな しっぽを 激しく ふりはらって 相手を 攻撃する。 相手の 攻撃を 下げる。" }, "branchPoke": { "name": "えだづき", - "effect": "するどく とがった 枝で 相手を 突いて 攻撃する。" + "effect": "するどく とがった 枝で 相手を 突いて 攻撃する。" }, "overdrive": { "name": "オーバードライブ", - "effect": "ギターや ベースを かきならして 激しく 響く 大きな 振動を 相手に 与えて 攻撃する。" + "effect": "ギターや ベースを かきならして 激しく 響く 大きな 振動を 相手に 与えて 攻撃する。" }, "appleAcid": { "name": "りんごさん", - "effect": "すっぱい りんごから つくりだした 酸性の 液体で 攻撃。 相手の 特防を 下げる。" + "effect": "すっぱい りんごから つくりだした 酸性の 液体で 攻撃。 相手の 特防を 下げる。" }, "gravApple": { "name": "Gのちから", - "effect": "高いところから りんごを 落として ダメージを 与える。 相手の 防御を 下げる。" + "effect": "高いところから りんごを 落として ダメージを 与える。 相手の 防御を 下げる。" }, "spiritBreak": { "name": "ソウルクラッシュ", - "effect": "食らうと くじけるほどの 勢いで 攻撃。 相手の 特攻を 下げる。" + "effect": "食らうと くじけるほどの 勢いで 攻撃。 相手の 特攻を 下げる。" }, "strangeSteam": { "name": "ワンダースチーム", - "effect": "煙を 噴出して 相手を 攻撃。 混乱 させることが ある。" + "effect": "煙を 噴出して 相手を 攻撃。 混乱 させることが ある。" }, "lifeDew": { "name": "いのちのしずく", - "effect": "不思議な 水を ふりまいて 自分と 場にいる 味方の HPを 回復する。" + "effect": "不思議な 水を ふりまいて 自分と 場にいる 味方の HPを 回復する。" }, "obstruct": { "name": "ブロッキング", - "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。 触れると 防御が がくっと 下がる。" + "effect": "相手の 攻撃を まったく 受けない。 連続で だすと 失敗しやすい。 触れると 防御が がくっと 下がる。" }, "falseSurrender": { "name": "どげざつき", - "effect": "頭を 下げる ふりを しながら 振りみだした 髪の毛を 突き刺す。 攻撃は 必ず 命中する。" + "effect": "頭を 下げる ふりを しながら 振りみだした 髪の毛を 突き刺す。 攻撃は 必ず 命中する。" }, "meteorAssault": { "name": "スターアサルト", - "effect": "太い クキを ふりまわして 攻撃。 ただし 自分も よろめいてしまうため 次の ターンは 動けなくなる。" + "effect": "太い クキを ふりまわして 攻撃。 ただし 自分も よろめいてしまうため 次の ターンは 動けなくなる。" }, "eternabeam": { "name": "ムゲンダイビーム", - "effect": "本来の 姿と なった ムゲンダイナ 最大の 攻撃。 次の ターンは 動けなくなる。" + "effect": "本来の 姿と なった ムゲンダイナ 最大の 攻撃。 次の ターンは 動けなくなる。" }, "steelBeam": { "name": "てっていこうせん", - "effect": "全身から 集めた はがねを ビームとして 激しく 撃ちだす。 自分も ダメージを 受けてしまう。" + "effect": "全身から 集めた はがねを ビームとして 激しく 撃ちだす。 自分も ダメージを 受けてしまう。" }, "expandingForce": { "name": "ワイドフォース", - "effect": "サイコパワーで 相手を 攻撃する。 サイコフィールドの時 威力が あがり すべての 相手に ダメージを 与える。" + "effect": "サイコパワーで 相手を 攻撃する。 サイコフィールドの時 威力が あがり すべての 相手に ダメージを 与える。" }, "steelRoller": { "name": "アイアンローラー", - "effect": "フィールドを 破壊しながら 攻撃。 なんらかの フィールド状態に 変わっていないと 技は 失敗する。" + "effect": "フィールドを 破壊しながら 攻撃。 なんらかの フィールド状態に 変わっていないと 技は 失敗する。" }, "scaleShot": { "name": "スケイルショット", - "effect": "ウロコを 撃ちだして 攻撃する。 2ー5回の 間 連続で だす。 素早さが あがるが 防御が さがる。" + "effect": "ウロコを 撃ちだして 攻撃する。 2ー5回の 間 連続で だす。 素早さが あがるが 防御が さがる。" }, "meteorBeam": { "name": "メテオビーム", - "effect": "1ターン目に 宇宙の 力を 集めることで 特攻が あがり 2ターン目に 相手を 攻撃する。" + "effect": "1ターン目に 宇宙の 力を 集めることで 特攻が あがり 2ターン目に 相手を 攻撃する。" }, "shellSideArm": { "name": "シェルアームズ", - "effect": "物理か 特殊か より多く ダメージを 与えられる 能力で 攻撃する。 毒状態に することが ある。" + "effect": "物理か 特殊か より多く ダメージを 与えられる 能力で 攻撃する。 毒状態に することが ある。" }, "mistyExplosion": { "name": "ミストバースト", - "effect": "自分の 周りに いる すべてを 攻撃するが 使うと 瀕死になる。 ミストフィールドで 威力が あがる。" + "effect": "自分の 周りに いる すべてを 攻撃するが 使うと 瀕死になる。 ミストフィールドで 威力が あがる。" }, "grassyGlide": { "name": "グラススライダー", - "effect": "地面を 滑るように 相手を 攻撃。 グラスフィールドの時 必ず 先制攻撃 できる。" + "effect": "地面を 滑るように 相手を 攻撃。 グラスフィールドの時 必ず 先制攻撃 できる。" }, "risingVoltage": { "name": "ライジングボルト", - "effect": "地面から 立ちのぼる 電撃で 攻撃。 相手が エレキフィールドに いる時 技の 威力が 2倍に なる。" + "effect": "地面から 立ちのぼる 電撃で 攻撃。 相手が エレキフィールドに いる時 技の 威力が 2倍に なる。" }, "terrainPulse": { "name": "だいちのはどう", - "effect": "フィールドの力を 借りて 攻撃。 使った時の フィールドの状態に よって 技の タイプと 威力が 変わる。" + "effect": "フィールドの力を 借りて 攻撃。 使った時の フィールドの状態に よって 技の タイプと 威力が 変わる。" }, "skitterSmack": { "name": "はいよるいちげき", - "effect": "背後から はいより 攻撃する。 相手の 特攻を さげる。" + "effect": "背後から はいより 攻撃する。 相手の 特攻を さげる。" }, "burningJealousy": { "name": "しっとのほのお", - "effect": "しっとの エネルギーで 相手を 攻撃。 そのターン 能力が あがった ポケモンを やけどの 状態に する。" + "effect": "しっとの エネルギーで 相手を 攻撃。 そのターン 能力が あがった ポケモンを やけどの 状態に する。" }, "lashOut": { "name": "うっぷんばらし", - "effect": "相手への いらだちを ぶつけて 攻撃。 そのターンに 能力を さげられていると 技の 威力が 2倍に なる。" + "effect": "相手への いらだちを ぶつけて 攻撃。 そのターンに 能力を さげられていると 技の 威力が 2倍に なる。" }, "poltergeist": { "name": "ポルターガイスト", - "effect": "相手の 持ち物を あやつって 攻撃。 相手が 道具を 持っていない 場合は 失敗する。" + "effect": "相手の 持ち物を あやつって 攻撃。 相手が 道具を 持っていない 場合は 失敗する。" }, "corrosiveGas": { "name": "ふしょくガス", - "effect": "強い 酸性の ガスで 周りに いるものを 包みこみ 持っている 道具を 溶かしてしまう。" + "effect": "強い 酸性の ガスで 周りに いるものを 包みこみ 持っている 道具を 溶かしてしまう。" }, "coaching": { "name": "コーチング", - "effect": "的確な 指導を おこなうことで 味方 全員の 攻撃と 防御を 上げる。" + "effect": "的確な 指導を おこなうことで 味方 全員の 攻撃と 防御を 上げる。" }, "flipTurn": { "name": "クイックターン", - "effect": "攻撃したあと ものすごい スピードで もどってきて 控えの ポケモンと 入れ替わる。" + "effect": "攻撃したあと ものすごい スピードで もどってきて 控えの ポケモンと 入れ替わる。" }, "tripleAxel": { "name": "トリプルアクセル", - "effect": "3回連続で キックを くりだして 攻撃する。 技が 当たるたびに 威力は あがる。" + "effect": "3回連続で キックを くりだして 攻撃する。 技が 当たるたびに 威力は あがる。" }, "dualWingbeat": { "name": "ダブルウイング", - "effect": "翼を 相手に ぶつけて 攻撃する。 2回連続で ダメージを 与える。" + "effect": "翼を 相手に ぶつけて 攻撃する。 2回連続で ダメージを 与える。" }, "scorchingSands": { "name": "ねっさのだいち", - "effect": "熱く 焼けた 砂を 相手に ぶつけて 攻撃する。 やけど状態に することが ある。" + "effect": "熱く 焼けた 砂を 相手に ぶつけて 攻撃する。 やけど状態に することが ある。" }, "jungleHealing": { "name": "ジャングルヒール", - "effect": "ジャングルと 一体化して 自分と 場にいる 味方の HPと 状態を 回復する。" + "effect": "ジャングルと 一体化して 自分と 場にいる 味方の HPと 状態を 回復する。" }, "wickedBlow": { "name": "あんこくきょうだ", - "effect": "あくの型を 極めし 強烈な 一撃。 必ず 急所に 当たる。" + "effect": "あくの型を 極めし 強烈な 一撃。 必ず 急所に 当たる。" }, "surgingStrikes": { "name": "すいりゅうれんだ", - "effect": "みずの型を 極めし 流れるような 3回の 連撃。 必ず 急所に 当たる。" + "effect": "みずの型を 極めし 流れるような 3回の 連撃。 必ず 急所に 当たる。" }, "thunderCage": { "name": "サンダープリズン", - "effect": "ほとばしる 電気の おりの 中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" + "effect": "ほとばしる 電気の おりの 中に 4ー5ターンの 間 相手を 閉じこめて 攻撃する。" }, "dragonEnergy": { "name": "ドラゴンエナジー", - "effect": "生命力を パワーに 変え 相手を 攻撃する。 自分の HPが 少ないほど 技の 威力は さがる。" + "effect": "生命力を パワーに 変え 相手を 攻撃する。 自分の HPが 少ないほど 技の 威力は さがる。" }, "freezingGlare": { "name": "いてつくしせん", - "effect": "両目から サイコパワーを 撃ちだして 攻撃する。 こおり状態に することが ある。" + "effect": "両目から サイコパワーを 撃ちだして 攻撃する。 こおり状態に することが ある。" }, "fieryWrath": { "name": "もえあがるいかり", - "effect": "怒りを 炎の ような オーラに 変えて 攻撃する。 相手を ひるませることが ある。" + "effect": "怒りを 炎の ような オーラに 変えて 攻撃する。 相手を ひるませることが ある。" }, "thunderousKick": { "name": "らいめいげり", - "effect": "雷の ような 動きで 相手を 翻弄しながら キックする。 相手の 防御を さげる。" + "effect": "雷の ような 動きで 相手を 翻弄しながら キックする。 相手の 防御を さげる。" }, "glacialLance": { "name": "ブリザードランス", - "effect": "吹雪を まとった 氷の 槍を 相手に 投げつけて 攻撃する。" + "effect": "吹雪を まとった 氷の 槍を 相手に 投げつけて 攻撃する。" }, "astralBarrage": { "name": "アストラルビット", - "effect": "たくさんの 小さな 霊体を 相手に ぶつけて 攻撃する。" + "effect": "たくさんの 小さな 霊体を 相手に ぶつけて 攻撃する。" }, "eerieSpell": { "name": "ぶきみなじゅもん", - "effect": "強力な サイコパワーで 攻撃。 相手が 最後に 使った技の PPを 3だけ 減らす。" + "effect": "強力な サイコパワーで 攻撃。 相手が 最後に 使った技の PPを 3だけ 減らす。" }, "direClaw": { "name": "フェイタルクロー", - "effect": "破滅的なツメで 攻撃する。 相手を どく まひ ねむりの いずれかの状態に することも ある。" + "effect": "破滅的なツメで 攻撃する。 相手を どく まひ ねむりの いずれかの状態に することも ある。" }, "psyshieldBash": { "name": "バリアーラッシュ", - "effect": "思念のエネルギーを まといながら 相手に ぶつかっていく。 自分の 防御を あげる。" + "effect": "思念のエネルギーを まといながら 相手に ぶつかっていく。 自分の 防御を あげる。" }, "powerShift": { "name": "パワーシフト", - "effect": "自分の 攻撃と防御を 入れ替える。" + "effect": "自分の 攻撃と防御を 入れ替える。" }, "stoneAxe": { "name": "がんせきアックス", - "effect": "岩の斧で 攻撃する。 ばらまかれた 岩の破片が 相手の 周りに 浮かぶ。" + "effect": "岩の斧で 攻撃する。 ばらまかれた 岩の破片が 相手の 周りに 浮かぶ。" }, "springtideStorm": { "name": "はるのあらし", - "effect": "愛憎 入りまじった 強烈な風で 相手を 包みこんで 攻撃する。 相手の 攻撃を さげることが ある。" + "effect": "愛憎 入りまじった 強烈な風で 相手を 包みこんで 攻撃する。 相手の 攻撃を さげることが ある。" }, "mysticalPower": { "name": "しんぴのちから", - "effect": "不思議な力を 放出して 攻撃する。 自分の 特攻が あがる。" + "effect": "不思議な力を 放出して 攻撃する。 自分の 特攻が あがる。" }, "ragingFury": { "name": "だいふんげき", - "effect": "2-3ターンの 間 炎を 放ちながら 暴れまわる。 暴れたあとは 混乱する。" + "effect": "2-3ターンの 間 炎を 放ちながら 暴れまわる。 暴れたあとは 混乱する。" }, "waveCrash": { "name": "ウェーブタックル", - "effect": "水を まといつつ 全身で 相手に ぶつかるが 自分も かなりの ダメージ を受ける。" + "effect": "水を まといつつ 全身で 相手に ぶつかるが 自分も かなりの ダメージ を受ける。" }, "chloroblast": { "name": "クロロブラスト", - "effect": "自身の 葉緑素を 集約し 放出して 攻撃する。 自分も ダメージを 受けてしまう。" + "effect": "自身の 葉緑素を 集約し 放出して 攻撃する。 自分も ダメージを 受けてしまう。" }, "mountainGale": { "name": "ひょうざんおろし", - "effect": "氷山のような 大きな 氷塊を ぶつけて 攻撃する。 相手を ひるませることが ある。" + "effect": "氷山のような 大きな 氷塊を ぶつけて 攻撃する。 相手を ひるませることが ある。" }, "victoryDance": { "name": "しょうりのまい", - "effect": "勝利を 呼びこむ 舞を 激しく 踊って 自分の 攻撃と 防御と 素早さを あげる。" + "effect": "勝利を 呼びこむ 舞を 激しく 踊って 自分の 攻撃と 防御と 素早さを あげる。" }, "headlongRush": { "name": "ぶちかまし", - "effect": "全身全霊の たいあたりを くらわせる。 自分の 防御と 特防が さがる。" + "effect": "全身全霊の たいあたりを くらわせる。 自分の 防御と 特防が さがる。" }, "barbBarrage": { "name": "どくばりセンボン", - "effect": "無数の毒針で 相手を 毒状態に することもある。 相手が 毒状態だと 威力は 2倍になる。" + "effect": "無数の毒針で 相手を 毒状態に することもある。 相手が 毒状態だと 威力は 2倍になる。" }, "esperWing": { "name": "オーラウイング", - "effect": "オーラで 強化した翼で 切り裂く。 急所に 当たりやすい。 自分の 素早さを あげる。" + "effect": "オーラで 強化した翼で 切り裂く。 急所に 当たりやすい。 自分の 素早さを あげる。" }, "bitterMalice": { "name": "うらみつらみ", - "effect": "背筋が 凍るような 怨念で 攻撃して 相手の 攻撃を さげる。" + "effect": "背筋が 凍るような 怨念で 攻撃して 相手の 攻撃を さげる。" }, "shelter": { "name": "たてこもる", - "effect": "皮膚を 鉄の盾のように 硬くすることで 自分の 防御を ぐーんと あげる。" + "effect": "皮膚を 鉄の盾のように 硬くすることで 自分の 防御を ぐーんと あげる。" }, "tripleArrows": { "name": "3ぼんのや", - "effect": "足技のあと 3本の矢を 同時に放つ。 相手の 防御を さげたり ひるませることが ある。 急所に 当たりやすい。" + "effect": "足技のあと 3本の矢を 同時に放つ。 相手の 防御を さげたり ひるませることが ある。 急所に 当たりやすい。" }, "infernalParade": { "name": "ひゃっきやこう", - "effect": "無数の火の玉で 攻撃して やけど状態に することが ある。 相手が 状態異常だと 威力は 2倍。" + "effect": "無数の火の玉で 攻撃して やけど状態に することが ある。 相手が 状態異常だと 威力は 2倍。" }, "ceaselessEdge": { "name": "ひけん・ちえなみ", - "effect": "貝殻の剣で 攻撃する。 ばらまかれた 貝殻の破片は 相手の 足下に まきびし となって 散らばる。" + "effect": "貝殻の剣で 攻撃する。 ばらまかれた 貝殻の破片は 相手の 足下に まきびし となって 散らばる。" }, "bleakwindStorm": { "name": "こがらしあらし", - "effect": "身も心も 震える 冷たく 激しい風で 攻撃する。 相手の 素早さを さげることが ある。" + "effect": "身も心も 震える 冷たく 激しい風で 攻撃する。 相手の 素早さを さげることが ある。" }, "wildboltStorm": { "name": "かみなりあらし", - "effect": "嵐を 起こし 雷雲を 呼びよせ 雷と風で 激しく 攻撃をする。 相手を まひ状態に することもある。" + "effect": "嵐を 起こし 雷雲を 呼びよせ 雷と風で 激しく 攻撃をする。 相手を まひ状態に することもある。" }, "sandsearStorm": { "name": "ねっさのあらし", - "effect": "熱く焼けた砂と 強烈な風で 包みこんで 攻撃する。 相手を やけど状態に することがある。" + "effect": "熱く焼けた砂と 強烈な風で 包みこんで 攻撃する。 相手を やけど状態に することがある。" }, "lunarBlessing": { "name": "みかづきのいのり", - "effect": "みかづきに いのりを ささげて 自分と 場にいる 味方の HPと 状態を 回復する。" + "effect": "みかづきに いのりを ささげて 自分と 場にいる 味方の HPと 状態を 回復する。" }, "takeHeart": { "name": "ブレイブチャージ", - "effect": "心を 奮わせて 自分の 状態異常を 治し さらには 特攻と 特防を あげる。" + "effect": "心を 奮わせて 自分の 状態異常を 治し さらには 特攻と 特防を あげる。" }, "gMaxWildfire": { "name": "キョダイゴクエン", - "effect": "キョダイマックスした リザードンが 繰りだす ほのおタイプの 攻撃。 4ターンの 間 ダメージを 与える。" + "effect": "キョダイマックスした リザードンが 繰りだす ほのおタイプの 攻撃。 4ターンの 間 ダメージを 与える。" }, "gMaxBefuddle": { "name": "キョダイコワク", - "effect": "キョダイマックスした バタフリーが 繰り出す むしタイプの 攻撃。 毒・まひ・眠りの どれかに する。" + "effect": "キョダイマックスした バタフリーが 繰り出す むしタイプの 攻撃。 毒・まひ・眠りの どれかに する。" }, "gMaxVoltCrash": { "name": "キョダイバンライ", - "effect": "キョダイマックスした ピカチュウが 繰りだす でんきタイプの 攻撃。 相手を まひ状態に する。" + "effect": "キョダイマックスした ピカチュウが 繰りだす でんきタイプの 攻撃。 相手を まひ状態に する。" }, "gMaxGoldRush": { "name": "キョダイコバン", - "effect": "キョダイマックスした ニャースが 繰り出す ノーマルタイプの 攻撃。 相手を 混乱させ お金も もらえる。" + "effect": "キョダイマックスした ニャースが 繰り出す ノーマルタイプの 攻撃。 相手を 混乱させ お金も もらえる。" }, "gMaxChiStrike": { "name": "キョダイシンゲキ", - "effect": "キョダイマックスした カイリキーが 繰りだす かくとうタイプの 攻撃。 急所に 当たりやすく なる。" + "effect": "キョダイマックスした カイリキーが 繰りだす かくとうタイプの 攻撃。 急所に 当たりやすく なる。" }, "gMaxTerror": { "name": "キョダイゲンエイ", - "effect": "キョダイマックスした ゲンガーが 繰りだす ゴーストタイプの 攻撃。 影を 踏み 交代 できなくする。" + "effect": "キョダイマックスした ゲンガーが 繰りだす ゴーストタイプの 攻撃。 影を 踏み 交代 できなくする。" }, "gMaxResonance": { "name": "キョダイセンリツ", - "effect": "キョダイマックスした ラプラスが 繰りだす こおりタイプの 攻撃。 5ターンの 間 ダメージを 弱める。" + "effect": "キョダイマックスした ラプラスが 繰りだす こおりタイプの 攻撃。 5ターンの 間 ダメージを 弱める。" }, "gMaxCuddle": { "name": "キョダイホーヨー", - "effect": "キョダイマックスした イーブイが 繰りだす ノーマルタイプの 攻撃。 相手を メロメロに する。" + "effect": "キョダイマックスした イーブイが 繰りだす ノーマルタイプの 攻撃。 相手を メロメロに する。" }, "gMaxReplenish": { "name": "キョダイサイセイ", - "effect": "キョダイマックスした カビゴンが 繰りだす ノーマルタイプの 攻撃。 食べた きのみを 再生する。" + "effect": "キョダイマックスした カビゴンが 繰りだす ノーマルタイプの 攻撃。 食べた きのみを 再生する。" }, "gMaxMalodor": { "name": "キョダイシュウキ", - "effect": "キョダイマックスした ダストダスが 繰りだす どくタイプの 攻撃。 相手を 毒 状態に する。" + "effect": "キョダイマックスした ダストダスが 繰りだす どくタイプの 攻撃。 相手を 毒 状態に する。" }, "gMaxStonesurge": { "name": "キョダイガンジン", - "effect": "キョダイマックスした カジリガメが 繰りだす みずタイプの 攻撃。 鋭い 無数の 岩を ばらまく。" + "effect": "キョダイマックスした カジリガメが 繰りだす みずタイプの 攻撃。 鋭い 無数の 岩を ばらまく。" }, "gMaxWindRage": { "name": "キョダイフウゲキ", - "effect": "キョダイマックスした アーマーガアが 繰りだす ひこうタイプの 攻撃。 リフレクターや ひかりのかべを 消し去る。" + "effect": "キョダイマックスした アーマーガアが 繰りだす ひこうタイプの 攻撃。 リフレクターや ひかりのかべを 消し去る。" }, "gMaxStunShock": { "name": "キョダイカンデン", - "effect": "キョダイマックスした ストリンダーが 繰り出す でんきタイプの 攻撃。 相手を 毒 か まひ どちらかにする。" + "effect": "キョダイマックスした ストリンダーが 繰り出す でんきタイプの 攻撃。 相手を 毒 か まひ どちらかにする。" }, "gMaxFinale": { "name": "キョダイダンエン", - "effect": "キョダイマックスした マホイップが 繰りだす フェアリータイプの 攻撃。 味方の HPを 回復する。" + "effect": "キョダイマックスした マホイップが 繰りだす フェアリータイプの 攻撃。 味方の HPを 回復する。" }, "gMaxDepletion": { "name": "キョダイゲンスイ", - "effect": "キョダイマックスした ジュラルドンが 繰りだす ドラゴンタイプの 攻撃。 最後に 使われた わざPPを 減らす。" + "effect": "キョダイマックスした ジュラルドンが 繰りだす ドラゴンタイプの 攻撃。 最後に 使われた わざPPを 減らす。" }, "gMaxGravitas": { "name": "キョダイテンドウ", - "effect": "キョダイマックスした イオルブが 繰りだす エスパータイプの 攻撃。 5ターンの 間 重力が 変わる。" + "effect": "キョダイマックスした イオルブが 繰りだす エスパータイプの 攻撃。 5ターンの 間 重力が 変わる。" }, "gMaxVolcalith": { "name": "キョダイフンセキ", - "effect": "キョダイマックスした セキタンザンが 繰りだす いわタイプの 攻撃。 4ターンの 間 ダメージを 与える。" + "effect": "キョダイマックスした セキタンザンが 繰りだす いわタイプの 攻撃。 4ターンの 間 ダメージを 与える。" }, "gMaxSandblast": { "name": "キョダイサジン", - "effect": "キョダイマックスした サダイジャが 繰りだす じめんタイプの 攻撃。 4-5ターンの間 砂が 吹き荒れる。" + "effect": "キョダイマックスした サダイジャが 繰りだす じめんタイプの 攻撃。 4-5ターンの間 砂が 吹き荒れる。" }, "gMaxSnooze": { "name": "キョダイスイマ", - "effect": "キョダイマックスした オーロンゲが 繰りだす あくタイプの 攻撃。 大きな あくびで 眠気を 誘う。" + "effect": "キョダイマックスした オーロンゲが 繰りだす あくタイプの 攻撃。 大きな あくびで 眠気を 誘う。" }, "gMaxTartness": { "name": "キョダイサンゲキ", - "effect": "キョダイマックスした アップリューが 繰りだす くさタイプの 攻撃。 相手の 回避率を 下げる。" + "effect": "キョダイマックスした アップリューが 繰りだす くさタイプの 攻撃。 相手の 回避率を 下げる。" }, "gMaxSweetness": { "name": "キョダイカンロ", - "effect": "キョダイマックスした タルップルが 繰りだす くさタイプの 攻撃。 味方の 状態異常を 回復する。" + "effect": "キョダイマックスした タルップルが 繰りだす くさタイプの 攻撃。 味方の 状態異常を 回復する。" }, "gMaxSmite": { "name": "キョダイテンバツ", - "effect": "キョダイマックスした ブリムオンが 繰りだす フェアリータイプの 攻撃。 相手を 混乱させる。" + "effect": "キョダイマックスした ブリムオンが 繰りだす フェアリータイプの 攻撃。 相手を 混乱させる。" }, "gMaxSteelsurge": { "name": "キョダイコウジン", - "effect": "キョダイマックスした ダイオウドウが 繰りだす タイプの 攻撃。 鋭い 無数の とげを ばらまく。" + "effect": "キョダイマックスした ダイオウドウが 繰りだす タイプの 攻撃。 鋭い 無数の とげを ばらまく。" }, "gMaxMeltdown": { "name": "キョダイユウゲキ", - "effect": "キョダイマックスした メルメタルが 繰りだす はがねタイプの 攻撃。 同じ 技を 連続で 出せなくする。" + "effect": "キョダイマックスした メルメタルが 繰りだす はがねタイプの 攻撃。 同じ 技を 連続で 出せなくする。" }, "gMaxFoamBurst": { "name": "キョダイホウマツ", - "effect": "キョダイマックスした キングラーが 繰りだす みずタイプの 攻撃。 相手の 素早さを がくっと さげる。" + "effect": "キョダイマックスした キングラーが 繰りだす みずタイプの 攻撃。 相手の 素早さを がくっと さげる。" }, "gMaxCentiferno": { "name": "キョダイヒャッカ", - "effect": "キョダイマックスした マルヤクデが 繰りだす ほのおタイプの 攻撃。 4-5ターンの間 炎に 閉じこめる。" + "effect": "キョダイマックスした マルヤクデが 繰りだす ほのおタイプの 攻撃。 4-5ターンの間 炎に 閉じこめる。" }, "gMaxVineLash": { "name": "キョダイベンタツ", - "effect": "キョダイマックスした フシギバナが 繰りだす くさタイプの 攻撃。 4ターンの 間 ダメージを 与える。" + "effect": "キョダイマックスした フシギバナが 繰りだす くさタイプの 攻撃。 4ターンの 間 ダメージを 与える。" }, "gMaxCannonade": { "name": "キョダイホウゲキ", - "effect": "キョダイマックスした カメックスが 繰りだす みずタイプの 攻撃。 4ターンの 間 ダメージを 与える。" + "effect": "キョダイマックスした カメックスが 繰りだす みずタイプの 攻撃。 4ターンの 間 ダメージを 与える。" }, "gMaxDrumSolo": { "name": "キョダイコランダ", - "effect": "キョダイマックスした ゴリランダーが 繰りだす くさタイプの 攻撃。 相手の 特性に ジャマされない。" + "effect": "キョダイマックスした ゴリランダーが 繰りだす くさタイプの 攻撃。 相手の 特性に ジャマされない。" }, "gMaxFireball": { "name": "キョダイカキュウ", - "effect": "キョダイマックスした エースバーンが 繰りだす ほのおタイプの 攻撃。 相手の 特性に ジャマされない。" + "effect": "キョダイマックスした エースバーンが 繰りだす ほのおタイプの 攻撃。 相手の 特性に ジャマされない。" }, "gMaxHydrosnipe": { "name": "キョダイソゲキ", - "effect": "キョダイマックスした インテレオンが 繰りだす みずタイプの 攻撃。 相手の 特性に ジャマされない。" + "effect": "キョダイマックスした インテレオンが 繰りだす みずタイプの 攻撃。 相手の 特性に ジャマされない。" }, "gMaxOneBlow": { "name": "キョダイイチゲキ", - "effect": "キョダイマックスした ウーラオスが 繰りだす あくタイプの 攻撃。 ダイウォールを 無視できる 一撃。" + "effect": "キョダイマックスした ウーラオスが 繰りだす あくタイプの 攻撃。 ダイウォールを 無視できる 一撃。" }, "gMaxRapidFlow": { "name": "キョダイレンゲキ", - "effect": "キョダイマックスした ウーラオスが 繰りだす みずタイプの 攻撃。 ダイウォールを 無視できる 連撃。" + "effect": "キョダイマックスした ウーラオスが 繰りだす みずタイプの 攻撃。 ダイウォールを 無視できる 連撃。" }, "teraBlast": { "name": "テラバースト", - "effect": "テラスタルだと テラスタイプの エネルギーを 放出して 攻撃する。 攻撃と 特攻を 比べて 高いほうで ダメージを 与える。" + "effect": "テラスタルだと テラスタイプの エネルギーを 放出して 攻撃する。 攻撃と 特攻を 比べて 高いほうで ダメージを 与える。" }, "silkTrap": { "name": "スレッドトラップ", - "effect": "糸の罠を はりめぐらせる。 相手の 攻撃を 防ぐと 同時に 触れた 相手の 素早さを さげる。" + "effect": "糸の罠を はりめぐらせる。 相手の 攻撃を 防ぐと 同時に 触れた 相手の 素早さを さげる。" }, "axeKick": { "name": "かかとおとし", - "effect": "蹴りあげた かかとを 落として 攻撃する。 相手を 混乱させることが ある。 はずすと 自分が ダメージを 受ける。" + "effect": "蹴りあげた かかとを 落として 攻撃する。 相手を 混乱させることが ある。 はずすと 自分が ダメージを 受ける。" }, "lastRespects": { "name": "おはかまいり", - "effect": "仲間の 無念を 晴らすため 攻撃する。 倒された 味方のポケモンが 多いほど 技の 威力が 増える。" + "effect": "仲間の 無念を 晴らすため 攻撃する。 倒された 味方のポケモンが 多いほど 技の 威力が 増える。" }, "luminaCrash": { "name": "ルミナコリジョン", - "effect": "精神にも 作用する 奇妙な光を 放って 攻撃する。 相手の 特防を がくっと さげる。" + "effect": "精神にも 作用する 奇妙な光を 放って 攻撃する。 相手の 特防を がくっと さげる。" }, "orderUp": { "name": "いっちょうあがり", - "effect": "いなせな 身のこなしで 攻撃。 口の中に シャリタツが いると そのすがたによって 能力が あがる。" + "effect": "いなせな 身のこなしで 攻撃。 口の中に シャリタツが いると そのすがたによって 能力が あがる。" }, "jetPunch": { "name": "ジェットパンチ", - "effect": "激流を こぶしに まとって 目にも 留まらぬ パンチを くりだす。 必ず 先制攻撃 できる。" + "effect": "激流を こぶしに まとって 目にも 留まらぬ パンチを くりだす。 必ず 先制攻撃 できる。" }, "spicyExtract": { "name": "ハバネロエキス", - "effect": "とんでもなく 辛いエキスを 出す。 相手の 攻撃が ぐーんと あがり 防御が がくっと さがる。" + "effect": "とんでもなく 辛いエキスを 出す。 相手の 攻撃が ぐーんと あがり 防御が がくっと さがる。" }, "spinOut": { "name": "ホイールスピン", - "effect": "足に 負荷を かけることにより 激しく 回転して ダメージを 与える。 自分の 素早さが がくっと さがる。" + "effect": "足に 負荷を かけることにより 激しく 回転して ダメージを 与える。 自分の 素早さが がくっと さがる。" }, "populationBomb": { "name": "ネズミざん", - "effect": "仲間たちが わらわらと 集まって コンビネーションで 攻撃を 与えていく。 1-10回の 間 連続で あたる。" + "effect": "仲間たちが わらわらと 集まって コンビネーションで 攻撃を 与えていく。 1-10回の 間 連続で あたる。" }, "iceSpinner": { "name": "アイススピナー", - "effect": "足に 薄い氷を まとい クルクルと 回りながら ぶつかる。 回転の 動きによって フィールドを 壊す。" + "effect": "足に 薄い氷を まとい クルクルと 回りながら ぶつかる。 回転の 動きによって フィールドを 壊す。" }, "glaiveRush": { "name": "きょけんとつげき", - "effect": "体を 投げだす 無謀な突撃。 技のあと 相手からの 攻撃は 必ず 命中し ダメージが 2倍に なってしまう。" + "effect": "体を 投げだす 無謀な突撃。 技のあと 相手からの 攻撃は 必ず 命中し ダメージが 2倍に なってしまう。" }, "revivalBlessing": { "name": "さいきのいのり", - "effect": "慈愛の心で いのることにより 控えにいる ひんしの ポケモンを HPを 半分の状態で 復活させる。" + "effect": "慈愛の心で いのることにより 控えにいる ひんしの ポケモンを HPを 半分の状態で 復活させる。" }, "saltCure": { "name": "しおづけ", - "effect": "相手を しおづけ状態に して 毎ターン ダメージを 与える。 はがね みずタイプは より 苦しむ。" + "effect": "相手を しおづけ状態に して 毎ターン ダメージを 与える。 はがね みずタイプは より 苦しむ。" }, "tripleDive": { "name": "トリプルダイブ", - "effect": "息のあった 飛びこみを することで 相手に 水しぶきを あてる。 3回連続で ダメージを 与える。" + "effect": "息のあった 飛びこみを することで 相手に 水しぶきを あてる。 3回連続で ダメージを 与える。" }, "mortalSpin": { "name": "キラースピン", - "effect": "回転して 相手を 攻撃する。 しめつける まきつく やどりぎのタネ など 吹きとばす。 相手を 毒状態に する。" + "effect": "回転して 相手を 攻撃する。 しめつける まきつく やどりぎのタネ など 吹きとばす。 相手を 毒状態に する。" }, "doodle": { "name": "うつしえ", - "effect": "相手の本質を とらえて うつしだし 自分と 味方を 相手と 同じ 特性に 変化させる。" + "effect": "相手の本質を とらえて うつしだし 自分と 味方を 相手と 同じ 特性に 変化させる。" }, "filletAway": { "name": "みをけずる", - "effect": "自分の HPを けずって 自分の 攻撃と 特攻と 素早さを ぐーんと あげる。" + "effect": "自分の HPを けずって 自分の 攻撃と 特攻と 素早さを ぐーんと あげる。" }, "kowtowCleave": { "name": "ドゲザン", - "effect": "土下座して 相手を 油断させておいて 切りかかる。 攻撃は 必ず 命中する。" + "effect": "土下座して 相手を 油断させておいて 切りかかる。 攻撃は 必ず 命中する。" }, "flowerTrick": { "name": "トリックフラワー", - "effect": "細工がある 花たばを 相手に 投げて 攻撃する。 必ず 命中して 急所にも 当たる。" + "effect": "細工がある 花たばを 相手に 投げて 攻撃する。 必ず 命中して 急所にも 当たる。" }, "torchSong": { "name": "フレアソング", - "effect": "燃えたぎる 火炎を 歌うように 吹きつけて 相手を 焦がす。 自分の 特攻を あげる。" + "effect": "燃えたぎる 火炎を 歌うように 吹きつけて 相手を 焦がす。 自分の 特攻を あげる。" }, "aquaStep": { "name": "アクアステップ", - "effect": "水もしたたる かろやかな 足どりで 相手を 翻弄し ダメージを 与える。 自分の 素早さを あげる。" + "effect": "水もしたたる かろやかな 足どりで 相手を 翻弄し ダメージを 与える。 自分の 素早さを あげる。" }, "ragingBull": { "name": "レイジングブル", - "effect": "怒り狂う あばれうしの 猛烈な タックル。 フォルムで 技のタイプが 変わり ひかりのかべや リフレクターなども 破壊できる。" + "effect": "怒り狂う あばれうしの 猛烈な タックル。 フォルムで 技のタイプが 変わり ひかりのかべや リフレクターなども 破壊できる。" }, "makeItRain": { "name": "ゴールドラッシュ", - "effect": "大量のコインを ぶちまけて 攻撃。 自分の 特攻が さがる。 戦闘の あとで お金も もらえる。" + "effect": "大量のコインを ぶちまけて 攻撃。 自分の 特攻が さがる。 戦闘の あとで お金も もらえる。" }, "psyblade": { "name": "サイコブレイド", - "effect": "実体のない刃で 相手を 切り裂く。 エレキフィールドに いるとき 技の威力が 1.5倍に なる。" + "effect": "実体のない刃で 相手を 切り裂く。 エレキフィールドに いるとき 技の威力が 1.5倍に なる。" }, "hydroSteam": { "name": "ハイドロスチーム", - "effect": "煮えたぎる水を 勢いよく 浴びせる。 日差しが 強いとき 技の威力が さがるどころか 1.5倍になる。" + "effect": "煮えたぎる水を 勢いよく 浴びせる。 日差しが 強いとき 技の威力が さがるどころか 1.5倍になる。" }, "ruination": { "name": "カタストロフィ", - "effect": "破滅的な 災厄を 巻き起こし 相手の HPを 半分に する。" + "effect": "破滅的な 災厄を 巻き起こし 相手の HPを 半分に する。" }, "collisionCourse": { "name": "アクセルブレイク", - "effect": "変形しながら 荒々しく 落下し いにしえの 大爆発を 引き起こす。 弱点をつくと さらに 威力が 増す。" + "effect": "変形しながら 荒々しく 落下し いにしえの 大爆発を 引き起こす。 弱点をつくと さらに 威力が 増す。" }, "electroDrift": { "name": "イナズマドライブ", - "effect": "変形しながら 超高速で 走行し 未知なる 電撃が 相手を つらぬく。 弱点をつくと さらに 威力が 増す。" + "effect": "変形しながら 超高速で 走行し 未知なる 電撃が 相手を つらぬく。 弱点をつくと さらに 威力が 増す。" }, "shedTail": { "name": "しっぽきり", - "effect": "自分の HPを 削って 分身を だしたあと もどってきて 控えの ポケモンと 入れ替わる。" + "effect": "自分の HPを 削って 分身を だしたあと もどってきて 控えの ポケモンと 入れ替わる。" }, "chillyReception": { "name": "さむいギャグ", - "effect": "場を 凍らせる ギャグを 言い残し 控えの ポケモンと 入れ替わる。 5ターンの 間 ゆきを 降らす。" + "effect": "場を 凍らせる ギャグを 言い残し 控えの ポケモンと 入れ替わる。 5ターンの 間 ゆきを 降らす。" }, "tidyUp": { "name": "おかたづけ", - "effect": "まきびし ステルスロック ねばねばネット どくびし みがわりを すべて かたづける。 自分の 攻撃と 素早さが あがる。" + "effect": "まきびし ステルスロック ねばねばネット どくびし みがわりを すべて かたづける。 自分の 攻撃と 素早さが あがる。" }, "snowscape": { "name": "ゆきげしき", - "effect": "5ターンの 間 ゆきを 降らせる。 こおりタイプの 防御が あがる。" + "effect": "5ターンの 間 ゆきを 降らせる。 こおりタイプの 防御が あがる。" }, "pounce": { "name": "とびつく", - "effect": "相手に 飛びついて 攻撃する。 相手の 素早さを さげる。" + "effect": "相手に 飛びついて 攻撃する。 相手の 素早さを さげる。" }, "trailblaze": { "name": "くさわけ", - "effect": "草むらから 飛びだすように 攻撃する。 軽快な 足どりに よって 自分の 素早さを あげる。" + "effect": "草むらから 飛びだすように 攻撃する。 軽快な 足どりに よって 自分の 素早さを あげる。" }, "chillingWater": { "name": "ひやみず", - "effect": "相手の 元気を 失わせるくらい 冷たい水を 浴びせて 攻撃する。 相手の 攻撃を さげる。" + "effect": "相手の 元気を 失わせるくらい 冷たい水を 浴びせて 攻撃する。 相手の 攻撃を さげる。" }, "hyperDrill": { "name": "ハイパードリル", - "effect": "とがった 体の部位を 急速に 回転させ つらぬく。 まもるや みきり なども 無視 できる。" + "effect": "とがった 体の部位を 急速に 回転させ つらぬく。 まもるや みきり なども 無視 できる。" }, "twinBeam": { "name": "ツインビーム", - "effect": "両目から 不可思議な 光線を 発射して 攻撃する。 2回連続で ダメージを 与える。" + "effect": "両目から 不可思議な 光線を 発射して 攻撃する。 2回連続で ダメージを 与える。" }, "rageFist": { "name": "ふんどのこぶし", - "effect": "怒りを エネルギーに 変えて 攻撃。 受けた 攻撃の 回数が 多いほど 技の 威力が あがる。" + "effect": "怒りを エネルギーに 変えて 攻撃。 受けた 攻撃の 回数が 多いほど 技の 威力が あがる。" }, "armorCannon": { "name": "アーマーキャノン", - "effect": "みずからの ヨロイを 燃えたぎる 弾として 撃ち出して 攻撃する。 自分の 防御と 特防が さがる。" + "effect": "みずからの ヨロイを 燃えたぎる 弾として 撃ち出して 攻撃する。 自分の 防御と 特防が さがる。" }, "bitterBlade": { "name": "むねんのつるぎ", - "effect": "この世への 未練を 剣先に こめて 切りつける。 与えた ダメージの 半分の HPを 回復できる。" + "effect": "この世への 未練を 剣先に こめて 切りつける。 与えた ダメージの 半分の HPを 回復できる。" }, "doubleShock": { "name": "でんこうそうげき", - "effect": "全身の でんきを すべて 放って 大ダメージを 与える。 自分の でんきタイプが なくなる。" + "effect": "全身の でんきを すべて 放って 大ダメージを 与える。 自分の でんきタイプが なくなる。" }, "gigatonHammer": { "name": "デカハンマー", - "effect": "大きな ハンマーを 体ごと ぶんまわして 攻撃する。 この技は 2回連続で だせない。" + "effect": "大きな ハンマーを 体ごと ぶんまわして 攻撃する。 この技は 2回連続で だせない。" }, "comeuppance": { "name": "ほうふく", - "effect": "技を だす前に 最後に 受けた 技の ダメージを 大きくして だした 相手に 返す。" + "effect": "技を だす前に 最後に 受けた 技の ダメージを 大きくして だした 相手に 返す。" }, "aquaCutter": { "name": "アクアカッター", - "effect": "加圧された 水を 刃のように 噴射して 相手を 切り裂く。 急所に 当たりやすい。" + "effect": "加圧された 水を 刃のように 噴射して 相手を 切り裂く。 急所に 当たりやすい。" }, "blazingTorque": { "name": "バーンアクセル", - "effect": "メラメラの エンジンを 吹かして 相手に ぶつかる。やけど状態に することが ある。" + "effect": "メラメラの エンジンを 吹かして 相手に ぶつかる。やけど状態に することが ある。" }, "wickedTorque": { "name": "ダークアクセル", - "effect": "悪意で エンジンを 吹かして 相手に ぶつかる。眠り状態に することが ある。" + "effect": "悪意で エンジンを 吹かして 相手に ぶつかる。眠り状態に することが ある。" }, "noxiousTorque": { "name": "ポイズンアクセル", - "effect": "有毒な エンジンを 吹かして 相手に ぶつかる。毒状態に することが ある。" + "effect": "有毒な エンジンを 吹かして 相手に ぶつかる。毒状態に することが ある。" }, "combatTorque": { "name": "ファイトアクセル", - "effect": "力いっぱい エンジンを 吹かして 相手に ぶつかる。まひ状態に することが ある。" + "effect": "力いっぱい エンジンを 吹かして 相手に ぶつかる。まひ状態に することが ある。" }, "magicalTorque": { "name": "マジカルアクセル", - "effect": "幻想的な エンジンを 吹かして 相手に ぶつかる。混乱させることが ある。" + "effect": "幻想的な エンジンを 吹かして 相手に ぶつかる。混乱させることが ある。" }, "bloodMoon": { "name": "ブラッドムーン", - "effect": "血のように 赤い満月から ありったけの 気迫を 撃ちだす。 この技は 2回連続で だせない。" + "effect": "血のように 赤い満月から ありったけの 気迫を 撃ちだす。 この技は 2回連続で だせない。" }, "matchaGotcha": { "name": "シャカシャカほう", - "effect": "かきまぜた お茶の 大砲は 与えた ダメージの 半分を 回復して やけど状態に することも ある。" + "effect": "かきまぜた お茶の 大砲は 与えた ダメージの 半分を 回復して やけど状態に することも ある。" }, "syrupBomb": { "name": "みずあめボム", - "effect": "ねっとりした みずあめを 爆発させ 相手を あめまみれ 状態にして 3ターンの間 素早さを さげ続ける。" + "effect": "ねっとりした みずあめを 爆発させ 相手を あめまみれ 状態にして 3ターンの間 素早さを さげ続ける。" }, "ivyCudgel": { "name": "ツタこんぼう", - "effect": "ツタを まきつけた こん棒で なぐる。 かぶっている お面で タイプが 変わる。 急所に 当たりやすい。" + "effect": "ツタを まきつけた こん棒で なぐる。 かぶっている お面で タイプが 変わる。 急所に 当たりやすい。" }, "electroShot": { "name": "エレクトロビーム", - "effect": "1ターン目に 電気を 集めて 特攻が あがり 2ターン目に 高圧の 電気を 発射する。 天気が 雨のときは すぐに 発射できる。" + "effect": "1ターン目に 電気を 集めて 特攻が あがり 2ターン目に 高圧の 電気を 発射する。 天気が 雨のときは すぐに 発射できる。" }, "teraStarstorm": { "name": "テラクラスター", - "effect": "結晶の力を 照射し 敵を 排除する。 テラパゴスが ステラフォルムで 放つと すべての 相手に ダメージを 与える。" + "effect": "結晶の力を 照射し 敵を 排除する。 テラパゴスが ステラフォルムで 放つと すべての 相手に ダメージを 与える。" }, "fickleBeam": { "name": "きまぐレーザー", - "effect": "光線を 発射して 攻撃する。 ときどき ほかの首も 協力して レーザーを 放ち 威力が 2倍に なる。" + "effect": "光線を 発射して 攻撃する。 ときどき ほかの首も 協力して レーザーを 放ち 威力が 2倍に なる。" }, "burningBulwark": { "name": "かえんのまもり", - "effect": "相手の 攻撃を 超高熱の 体毛で 防ぎ 同時に 触れた 相手に やけどを 与えてしまう。" + "effect": "相手の 攻撃を 超高熱の 体毛で 防ぎ 同時に 触れた 相手に やけどを 与えてしまう。" }, "thunderclap": { "name": "じんらい", - "effect": "相手より 先に 電撃を 浴びせる。 相手が だす技が 攻撃技でないと 失敗する。" + "effect": "相手より 先に 電撃を 浴びせる。 相手が だす技が 攻撃技でないと 失敗する。" }, "mightyCleave": { "name": "パワフルエッジ", - "effect": "頭部に 蓄積した 光で 切断する。 守りを 無視して 攻撃できる。" + "effect": "頭部に 蓄積した 光で 切断する。 守りを 無視して 攻撃できる。" }, "tachyonCutter": { "name": "タキオンカッター", - "effect": "粒子の刃を たて続けに 発射して 2回連続で ダメージを 与える。 攻撃は 必ず 命中する。" + "effect": "粒子の刃を たて続けに 発射して 2回連続で ダメージを 与える。 攻撃は 必ず 命中する。" }, "hardPress": { "name": "ハードプレス", - "effect": "腕やハサミで 相手を 圧迫する。 相手の HPが 残っているほど 威力が あがる。" + "effect": "腕やハサミで 相手を 圧迫する。 相手の HPが 残っているほど 威力が あがる。" }, "dragonCheer": { "name": "ドラゴンエール", - "effect": "竜の鼓舞で 士気を 上げて 味方の技が 急所に 当たりやすくなる。 ドラゴンタイプだと より 鼓舞される。" + "effect": "竜の鼓舞で 士気を 上げて 味方の技が 急所に 当たりやすくなる。 ドラゴンタイプだと より 鼓舞される。" }, "alluringVoice": { "name": "みわくのボイス", - "effect": "天使のような 歌声で 相手を 攻撃。 そのターン 能力が あがった ポケモンを 混乱の 状態に する。" + "effect": "天使のような 歌声で 相手を 攻撃。 そのターン 能力が あがった ポケモンを 混乱の 状態に する。" }, "temperFlare": { "name": "やけっぱち", - "effect": "自棄になった 勢いで 攻撃する。 前の ターンに 技を 外していると 威力が 倍に なる。" + "effect": "自棄になった 勢いで 攻撃する。 前の ターンに 技を 外していると 威力が 倍に なる。" }, "supercellSlam": { "name": "サンダーダイブ", - "effect": "体を 帯電させ て相手に のしかかる。 はずすと 自分が ダメージを 受ける。" + "effect": "体を 帯電させ て相手に のしかかる。 はずすと 自分が ダメージを 受ける。" }, "psychicNoise": { "name": "サイコノイズ", - "effect": "不快な音波を 相手に 浴びせて 攻撃。 2ターンの間 技や 特性や 持っている 道具によって HPを 回復できなくなる。" + "effect": "不快な音波を 相手に 浴びせて 攻撃。 2ターンの間 技や 特性や 持っている 道具によって HPを 回復できなくなる。" }, "upperHand": { "name": "はやてがえし", - "effect": "動きに 反応して 掌底を 打ちこみ 相手を ひるませる。 相手が だす技が 先制攻撃でないと 失敗する。" + "effect": "動きに 反応して 掌底を 打ちこみ 相手を ひるませる。 相手が だす技が 先制攻撃でないと 失敗する。" }, "malignantChain": { "name": "じゃどくのくさり", - "effect": "毒でできた鎖を 相手に 巻きつけ 毒素を 流しこんで 蝕む。 猛毒の 状態に することが ある。" + "effect": "毒でできた鎖を 相手に 巻きつけ 毒素を 流しこんで 蝕む。 猛毒の 状態に することが ある。" } -} \ No newline at end of file +} diff --git a/src/locales/ja/party-ui-handler.json b/src/locales/ja/party-ui-handler.json index b112653c544..096d8d5bcba 100644 --- a/src/locales/ja/party-ui-handler.json +++ b/src/locales/ja/party-ui-handler.json @@ -4,5 +4,44 @@ "CANCEL": "やめる", "RELEASE": "逃がす", "APPLY": "使う", - "TEACH": "教える" + "TEACH": "教える", + "SPLICE": "吸収合体", + "UNSPLICE": "合体を分離", + "ACTIVATE": "有効にする", + "DEACTIVATE": "無効にする", + "TRANSFER": "アイテムを移動", + "ALL": "全部", + "PASS_BATON": "バトンタッチ", + "UNPAUSE_EVOLUTION": "進化を有効にする", + "REVIVE": "復活する", + "RENAME": "名前を変える", + "choosePokemon": "ポケモンを 選んで ください。", + "doWhatWithThisPokemon": "このポケモンを どうする?", + "noEnergy": "{{pokemonName}}は 戦うための\n元気が 残っていません!", + "hasEnergy": "{{pokemonName}}は まだまだ 元気だ!", + "cantBeUsed": "{{pokemonName}}は このチャレンジで\n使えられません!", + "tooManyItems": "{{pokemonName}}は このアイテムが\nこれ以上 持ちきれない!", + "anyEffect": "使っても 効果がないよ", + "unpausedEvolutions": "{{pokemonName}}は また 進化できる。", + "unspliceConfirmation": "本当に {{pokemonName}}を {{fusionName}}から\n分離しますか? {{fusionName}}は なくなる。", + "wasReverted": "{{fusionName}}は {{pokemonName}}に 回帰した。", + "releaseConfirmation": "本当に {{pokemonName}}を 逃がしますか?", + "releaseInBattle": "戦闘中の ポケモンを\n逃がすことは できません!", + "selectAMove": "技を 選んでください。", + "changeQuantity": "移動する アイテムを 選んでください。\n< と > で 数量が 変えられる。", + "selectAnotherPokemonToSplice": "もう一つの ポケモンを 選んで 合体する。", + "cancel": "キャンセル", + "able": "可能", + "notAble": "不可能", + "learned": "覚えている", + "goodbye": "グッバイ {{pokemonName}}!", + "byebye": "ばいばい {{pokemonName}}!", + "farewell": "さようなら {{pokemonName}}!", + "soLong": "じゃあね {{pokemonName}}!", + "thisIsWhereWePart": "これでお別れだね {{pokemonName}}!", + "illMissYou": "恋しく思うよ {{pokemonName}}!", + "illNeverForgetYou": "一生忘れない {{pokemonName}}!", + "untilWeMeetAgain": "また出会える日まで、{{pokemonName}}!", + "sayonara": "さらば {{pokemonName}}!", + "smellYaLater": "そんじゃ あばよ {{pokemonName}}!" } diff --git a/src/locales/ja/settings.json b/src/locales/ja/settings.json index 55d39ee70a4..afb2f94a047 100644 --- a/src/locales/ja/settings.json +++ b/src/locales/ja/settings.json @@ -20,7 +20,7 @@ "normal": "普通", "fast": "早い", "faster": "とても早い", - "skip": "スキップ", + "skip": "飛ばす", "levelUpNotifications": "レベルアップ時のみ", "on": "オン", "off": "オフ", diff --git a/src/locales/ja/starter-select-ui-handler.json b/src/locales/ja/starter-select-ui-handler.json index cab5c500df6..cefc5322385 100644 --- a/src/locales/ja/starter-select-ui-handler.json +++ b/src/locales/ja/starter-select-ui-handler.json @@ -23,7 +23,7 @@ "manageNature": "性格を変える", "addToFavorites": "お気に入りにする", "removeFromFavorites": "お気に入りから除く", - "useCandies": "飴を使う", + "useCandies": "アメを使う", "selectNature": "性格を選んでください。", "selectMoveSwapOut": "入れ替えたい技を選んでください。", "selectMoveSwapWith": "他の技と交換してください。", diff --git a/src/locales/ja/tutorial.json b/src/locales/ja/tutorial.json index 21b1b4856c8..99019b03f7f 100644 --- a/src/locales/ja/tutorial.json +++ b/src/locales/ja/tutorial.json @@ -1,10 +1,10 @@ { - "intro": "PokéRogueへようこそ!ログライク要素が\n加わったバトル中心のポケモンファンゲームです。\n$このゲームは収益を上げず、Pokémonおよび使用される\n著作権資産に対する所有権を主張しません。\n$ゲームはまだ作業中ですが、完全にプレイすることができます。\nバグ報告はディスコードコミュニティをご利用ください。\n$ゲームが遅い場合は、ブラウザ設定で「ハードウェア\nアクセラレーション」がオンになっていることを確認してください", - "accessMenu": "メニューにアクセスするには、入力待ちの間にMキーまたはEscを押してください。\nメニューには設定やさまざまな機能が含まれています。", - "menu": "このメニューから設定にアクセスできます。\n$設定ではゲームスピード、ウィンドウスタイル、\nおよびその他のオプションを変更できます。\n$ここにはさまざまな他の機能もありますので、\nぜひ確認してみてください!", - "starterSelect": "この画面でZキーやSpaceを押してポケモンを選択できます。\n選んだポケモンは自分の最初のパーティーになります。\n$最大6匹のパーティーで始めることができますが\nポケモンによってポイントがあり、合計10を超えてはなりません。\n$捕まえたりふかさせたりすることで\n選択できる性別、特性、フォルムなどの幅を広げることができます。\n$個体値も徐々に累積して高くなるので、\n同じポケモンをたくさん捕まえてみてください!", - "pokerus": "毎日ランダムでスターターの\n3種類に紫色の枠が表示されます。\n$登録されたスターターの中にあれば、\nパーティに追加してつよさを確認してみましょう!", - "statChange": "ポケモンは交代しない限り、\n次のバトルでも能力変化が維持されます。\n$その代わりに、トレーナーバトルや新しいバイオームに\n入る直前に自動的にリセットされます。\n$CキーまたはShiftキーを押し続けると、\n現在のポケモンの能力変化を確認できます。\n$Vキーを押すと、\n相手が使用した技も確認できます。\n$ただし、今のバトルで相手ポケモンがすでに\n使った技のみが表示されます。", - "selectItem": "バトルが終わるたびに、\nランダムなアイテム3つの中から1つを選んで獲得します。\n$種類は消耗品、ポケモンの持ち物、\n永続的なパッシブアイテムなど様々です。\n$ほとんどの消耗しない道具は\n効果が累積されます。\n$進化用など一部のアイテムは\n使用できる場合にのみ登場します。\n$持ち物を渡す機能を使用して\nポケモン同士で道具を持たせることもできます。\n$持ち物があれば、アイテム選択画面の\n右下に渡す機能が表示されます。\n$お金で消耗品を購入することもでき、\nウェーブが進むにつれて購入可能な種類が増えます。\n$アイテムを選択すると次のウェーブに進むため、\nまず消耗品の購入を行ってください。", - "eggGacha": "この画面でポケモンのたまごクーポンを\nガチャができます。\n$卵は戦闘を繰り返すうちにふかします。\n珍しいほどもっと長くかかります。\n$ふかさせたポケモンはパーティーに追加されず、\nスターティングに登録されます。\n$卵からふかしたポケモンは一般的に\n野生で捕まえたポケモンよりも高い個体値を持ちます。\n$一部のポケモンは卵からしか手に入りません。\n$各ガチャマシンがそれぞれ異なるボーナスを持っているため、\n好きな方を使ってみてください!," -} \ No newline at end of file + "intro": "PokéRogueへ ようこそ! ローグライク要素が\n加わった バトル中心の ポケモンファンゲームです。\n$このゲームは 収益を上げず、Pokémonおよび 使用される\n著作権資産に 対する所有権を 主張しません。\n$ゲームは まだ開発中ですが、完全に プレイすることが できます。\nバグ報告は ディスコードコミュニティを ご利用ください。\n$ゲームが 遅い場合は、ブラウザ設定で「ハードウェア\nアクセラレーション」が オンになっている ことを 確認してください。", + "accessMenu": "メニューを開くには 入力待ちの間に Mキー/Escを 押してください。\nメニューには 設定や 様々な機能が 含まれています。", + "menu": "このメニューから 設定が 開けます。\n$設定では、ゲームの速さや ウィンドウタイプなどの オプションを 変更できます。\n$ここには 様々な機能が ありますので、\nぜひ 確認してみてください!", + "starterSelect": "この画面では Zキー/空白キーを押して ポケモンが 選択できます。\n選んだポケモンは 最初の手持ちに なります。\n$各ポケモンは ポイントが ある。最大6つを 選べますが\nポケモンのポイントが 合計10を超えては いけません。\n$ポケモンを 捕まえたり タマゴからふかしたり することで\n選択できる 性別、特性、フォルムなどの 幅を広げられます。\n$個体値も 徐々に 累積して 高くなるので、\n同じポケモンを たくさん 捕まえて みてください!", + "pokerus": "毎日、無作為に スターターの\n3種類には 紫色の枠が 表示されます。\n$登録された スターターの 中に いれば、\n手持ちに加えて 強さを 確認してみましょう!", + "statChange": "ポケモンを 入れ替えない限り、\n次のバトルでも 能力変化は なくなりません。\n$その代わりに、トレーナーバトルや 新しいバイオームに\n入る直前に 自動的に 能力変化は 元に戻ります。\n$Cキー/Shiftキーを 押し続けると、\n場にいるポケモンの 能力変化を 確認できます。\n$Vキーを押すと、\n相手が出した技も 確認できます。\n$ただし、現在のバトルでの 相手ポケモンが\nすでに使った 技のみが 表示されます。", + "selectItem": "バトルが 終わるたびには、「ショップ」という\n画面で 3つのご褒美から 1つが選べます。\n$種類は 消耗品、ポケモンの持ち物や道具、\n永続的な パッシブアイテムなど 様々です。\n$ほとんどの 消耗しない 道具は\n効果が 累積されます。\n$例えば 進化アイテムなどの ご褒美は\n使用できる 場合にのみ 登場します。\n$持ち物や道具が\n手持ちポケモン間に 移動できる\n$持ち物や道具が あれば、ショップ画面の\n右下に「アイテム移行」が 表示されます。\n$ショップ画面で お金で 消耗品を 買えます。\nラウンドが 進むにつれて 買えるアイテムが 増えます。\n$ご褒美を 選択すると 次のラウンドに\n進むから、まず 消耗品を 買ってください。", + "eggGacha": "この画面では、「タマゴクーポン」で\nポケモンのタマゴを 取得できます。\n$タマゴは ラウンドが進めるうちに ふかします。\nタマゴのふかは レア度によって 時間が かかります。\n$ふかしたポケモンは 手持ちに 加えられず、\nスターターに 登録されます。\n$ふかしたポケモンは 一般的に\n野生ポケモンよりも 高い個体値があります。\n$あるポケモンは タマゴからしか 手に入りません。\n$各ガチャマシンは 個性的なボーナスが あるますから、\n好きな方から 引いてみてください!," +} From a88b9899398a595d1c31ed808e605c84c36d3c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ricardo?= Date: Mon, 9 Sep 2024 13:50:47 -0300 Subject: [PATCH 69/91] [Localization] [pt_BR] Updated some translations (#4131) --- src/locales/pt_BR/ability-trigger.json | 1 + src/locales/pt_BR/battle.json | 4 +++- src/locales/pt_BR/battler-tags.json | 4 +++- src/locales/pt_BR/challenges.json | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/locales/pt_BR/ability-trigger.json b/src/locales/pt_BR/ability-trigger.json index f6a11267f9d..cd47fd8e3dc 100644 --- a/src/locales/pt_BR/ability-trigger.json +++ b/src/locales/pt_BR/ability-trigger.json @@ -12,6 +12,7 @@ "blockItemTheft": "{{abilityName}} de {{pokemonNameWithAffix}}\nprevine o roubo de itens!", "typeImmunityHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaurou um pouco de PS!", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}} evitou dano\ncom {{abilityName}}!", + "fullHpResistType": "{{pokemonNameWithAffix}} fez seu casco brilhar!\nEstá distorcendo o confronte de tipos!", "moveImmunity": "Isso não afeta {{pokemonNameWithAffix}}!", "reverseDrain": "{{pokemonNameWithAffix}} absorveu a gosma líquida!", "postDefendTypeChange": "{{abilityName}} de {{pokemonNameWithAffix}}\ntransformou-o no tipo {{typeName}}!", diff --git a/src/locales/pt_BR/battle.json b/src/locales/pt_BR/battle.json index 2b20e0062ea..08eeb99e0cd 100644 --- a/src/locales/pt_BR/battle.json +++ b/src/locales/pt_BR/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}} ainda não foi implementado e não pode ser usado.", "moveNoPP": "Não há mais PP\npara esse movimento!", "moveDisabled": "Não se pode usar {{moveName}} porque foi desabilitado!", + "disableInterruptedMove": "{{moveName}} de {{pokemonNameWithAffix}}\nestá desabilitado!", "noPokeballForce": "Uma força misteriosa\nte impede de usar Poké Bolas.", "noPokeballTrainer": "Não se pode capturar\nPokémon dos outros!", "noPokeballMulti": "Não se pode lançar Poké Bolas\nquando há mais de um Pokémon!", @@ -61,6 +62,7 @@ "skipItemQuestion": "Tem certeza de que não quer escolher um item?", "itemStackFull": "O estoque de {{fullItemName}} está cheio.\nVocê receberá {{itemName}} no lugar.", "eggHatching": "Opa?", + "eggSkipPrompt": "Pular para súmario de ovos?", "ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?", "wildPokemonWithAffix": "{{pokemonName}} selvagem", "foePokemonWithAffix": "{{pokemonName}} adversário", @@ -89,7 +91,7 @@ "statSeverelyFell_other": "{{stats}} de {{pokemonNameWithAffix}} diminuíram severamente!", "statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}} não vai mais diminuir!", "statWontGoAnyLower_other": "{{stats}} de {{pokemonNameWithAffix}} não vão mais diminuir!", - "transformedIntoType": "{{pokemonName}} transformed\ninto the {{type}} type!", + "transformedIntoType": "{{pokemonName}} se transformou\nno tipo {{type}}!", "ppReduced": "O PP do movimento {{moveName}} de\n{{targetName}} foi reduzido em {{reduction}}!", "retryBattle": "Você gostaria de tentar novamente desde o início da batalha?", "unlockedSomething": "{{unlockedThing}}\nfoi desbloqueado.", diff --git a/src/locales/pt_BR/battler-tags.json b/src/locales/pt_BR/battler-tags.json index e0f6538404b..9c0f4732013 100644 --- a/src/locales/pt_BR/battler-tags.json +++ b/src/locales/pt_BR/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "{{pokemonNameWithAffix}} foi ferido pelo {{moveName}}!", "cursedOnAdd": "{{pokemonNameWithAffix}} cortou seus PS pela metade e amaldiçoou {{pokemonName}}!", "cursedLapse": "{{pokemonNameWithAffix}} foi ferido pelo Curse!", - "stockpilingOnAdd": "{{pokemonNameWithAffix}} estocou {{stockpiledCount}}!" + "stockpilingOnAdd": "{{pokemonNameWithAffix}} estocou {{stockpiledCount}}!", + "disabledOnAdd": "{{moveName}} de {{pokemonNameWithAffix}}\nfoi desabilitado!", + "disabledLapse": "{{moveName}} de {{pokemonNameWithAffix}}\nnão está mais desabilitado." } diff --git a/src/locales/pt_BR/challenges.json b/src/locales/pt_BR/challenges.json index 8402ad106b6..9dc613651a6 100644 --- a/src/locales/pt_BR/challenges.json +++ b/src/locales/pt_BR/challenges.json @@ -1,6 +1,7 @@ { "title": "Desafios", "illegalEvolution": "{{pokemon}} não pode ser escolhido\nnesse desafio!", + "noneSelected": "Nada Selecionado", "singleGeneration": { "name": "Geração Única", "desc": "Você só pode user Pokémon da {{gen}} geração.", @@ -33,4 +34,4 @@ "value.0": "Desligado", "value.1": "Ligado" } -} +} \ No newline at end of file From 3c05237b2e7b0995f6d8554a55ddf7a499ae4085 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Tue, 10 Sep 2024 00:52:20 +0800 Subject: [PATCH 70/91] [Move] Fully implement Throat Chop (#4115) * fully implement throat chop * add linkcode in docs * address comments * update test --- src/data/battler-tags.ts | 51 +++++++++++++++++++++++++-- src/data/move.ts | 2 +- src/enums/battler-tag-type.ts | 1 + src/locales/en/battle.json | 2 ++ src/test/moves/throat_chop.test.ts | 55 ++++++++++++++++++++++++++++++ 5 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 src/test/moves/throat_chop.test.ts diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index c26412c776f..71385facb23 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -107,8 +107,8 @@ export interface TerrainBattlerTag { * to select restricted moves. */ export abstract class MoveRestrictionBattlerTag extends BattlerTag { - constructor(tagType: BattlerTagType, turnCount: integer, sourceMove?: Moves, sourceId?: integer) { - super(tagType, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END ], turnCount, sourceMove, sourceId); + constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: integer, sourceMove?: Moves, sourceId?: integer) { + super(tagType, lapseType, turnCount, sourceMove, sourceId); } /** @override */ @@ -158,6 +158,49 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag { abstract interruptedText(pokemon: Pokemon, move: Moves): string; } +/** + * Tag representing the "Throat Chop" effect. Pokemon with this tag cannot use sound-based moves. + * @see {@link https://bulbapedia.bulbagarden.net/wiki/Throat_Chop_(move) | Throat Chop} + * @extends MoveRestrictionBattlerTag + */ +export class ThroatChoppedTag extends MoveRestrictionBattlerTag { + constructor() { + super(BattlerTagType.THROAT_CHOPPED, [ BattlerTagLapseType.TURN_END, BattlerTagLapseType.PRE_MOVE ], 2, Moves.THROAT_CHOP); + } + + /** + * Checks if a {@linkcode Moves | move} is restricted by Throat Chop. + * @override + * @param {Moves} move the {@linkcode Moves | move} to check for sound-based restriction + * @returns true if the move is sound-based + */ + override isMoveRestricted(move: Moves): boolean { + return allMoves[move].hasFlag(MoveFlags.SOUND_BASED); + } + + /** + * Shows a message when the player attempts to select a move that is restricted by Throat Chop. + * @override + * @param {Pokemon} pokemon the {@linkcode Pokemon} that is attempting to select the restricted move + * @param {Moves} move the {@linkcode Moves | move} that is being restricted + * @returns the message to display when the player attempts to select the restricted move + */ + override selectionDeniedText(pokemon: Pokemon, move: Moves): string { + return i18next.t("battle:moveCannotBeSelected", { moveName: allMoves[move].name }); + } + + /** + * Shows a message when a move is interrupted by Throat Chop. + * @override + * @param {Pokemon} pokemon the interrupted {@linkcode Pokemon} + * @param {Moves} move the {@linkcode Moves | move} that was interrupted + * @returns the message to display when the move is interrupted + */ + override interruptedText(pokemon: Pokemon, move: Moves): string { + return i18next.t("battle:throatChopInterruptedMove", { pokemonName: getPokemonNameWithAffix(pokemon) }); + } +} + /** * Tag representing the "disabling" effect performed by {@linkcode Moves.DISABLE} and {@linkcode Abilities.CURSED_BODY}. * When the tag is added, the last-used move of the tag holder is set as the disabled move. @@ -167,7 +210,7 @@ export class DisabledTag extends MoveRestrictionBattlerTag { private moveId: Moves = Moves.NONE; constructor(sourceId: number) { - super(BattlerTagType.DISABLED, 4, Moves.DISABLE, sourceId); + super(BattlerTagType.DISABLED, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END ], 4, Moves.DISABLE, sourceId); } /** @override */ @@ -2158,6 +2201,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source return new GulpMissileTag(tagType, sourceMove); case BattlerTagType.TAR_SHOT: return new TarShotTag(); + case BattlerTagType.THROAT_CHOPPED: + return new ThroatChoppedTag(); case BattlerTagType.NONE: default: return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); diff --git a/src/data/move.ts b/src/data/move.ts index 21b859b22ac..6ab134c1708 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -8404,7 +8404,7 @@ export function initMoves() { .target(MoveTarget.USER_AND_ALLIES) .condition((user, target, move) => !![ user, user.getAlly() ].filter(p => p?.isActive()).find(p => !![ Abilities.PLUS, Abilities.MINUS].find(a => p.hasAbility(a, false)))), new AttackMove(Moves.THROAT_CHOP, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 15, 100, 0, 7) - .partial(), + .attr(AddBattlerTagAttr, BattlerTagType.THROAT_CHOPPED), new AttackMove(Moves.POLLEN_PUFF, Type.BUG, MoveCategory.SPECIAL, 90, 100, 15, -1, 0, 7) .attr(StatusCategoryOnAllyAttr) .attr(HealOnAllyAttr, 0.5, true, false) diff --git a/src/enums/battler-tag-type.ts b/src/enums/battler-tag-type.ts index 0878bd00cd5..7d559f32cb3 100644 --- a/src/enums/battler-tag-type.ts +++ b/src/enums/battler-tag-type.ts @@ -73,5 +73,6 @@ export enum BattlerTagType { SHELL_TRAP = "SHELL_TRAP", DRAGON_CHEER = "DRAGON_CHEER", NO_RETREAT = "NO_RETREAT", + THROAT_CHOPPED = "THROAT_CHOPPED", TAR_SHOT = "TAR_SHOT", } diff --git a/src/locales/en/battle.json b/src/locales/en/battle.json index 120ac749acb..0aabaacd99c 100644 --- a/src/locales/en/battle.json +++ b/src/locales/en/battle.json @@ -44,7 +44,9 @@ "moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.", "moveNoPP": "There's no PP left for\nthis move!", "moveDisabled": "{{moveName}} is disabled!", + "moveCannotBeSelected": "{{moveName}} cannot be selected!", "disableInterruptedMove": "{{pokemonNameWithAffix}}'s {{moveName}}\nis disabled!", + "throatChopInterruptedMove": "The effects of Throat Chop prevent\n{{pokemonName}} from using certain moves!", "noPokeballForce": "An unseen force\nprevents using Poké Balls.", "noPokeballTrainer": "You can't catch\nanother trainer's Pokémon!", "noPokeballMulti": "You can only throw a Poké Ball\nwhen there is one Pokémon remaining!", diff --git a/src/test/moves/throat_chop.test.ts b/src/test/moves/throat_chop.test.ts new file mode 100644 index 00000000000..151aec58b38 --- /dev/null +++ b/src/test/moves/throat_chop.test.ts @@ -0,0 +1,55 @@ +import { BattlerIndex } from "#app/battle"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { Stat } from "#app/enums/stat"; +import { Abilities } from "#enums/abilities"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; + +describe("Moves - Throat Chop", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .moveset(Array(4).fill(Moves.GROWL)) + .battleType("single") + .ability(Abilities.BALL_FETCH) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(Array(4).fill(Moves.THROAT_CHOP)) + .enemySpecies(Species.MAGIKARP); + }); + + it("prevents the target from using sound-based moves for two turns", async () => { + await game.classicMode.startBattle([Species.MAGIKARP]); + + game.move.select(Moves.GROWL); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + + // First turn, move is interrupted + await game.phaseInterceptor.to("TurnEndPhase"); + expect(game.scene.getPlayerPokemon()?.getStatStage(Stat.ATK)).toBe(0); + + // Second turn, struggle if no valid moves + await game.toNextTurn(); + + game.move.select(Moves.GROWL); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(game.scene.getEnemyPokemon()!.isFullHp()).toBe(false); + }, TIMEOUT); +}); From 3d01e905dfb8ce245a70688170303d137f1312fc Mon Sep 17 00:00:00 2001 From: Lugiad Date: Mon, 9 Sep 2024 18:53:22 +0200 Subject: [PATCH 71/91] [Localization][UI/UX] Clean up of unused localized images (#4110) * Delete public/images/ui/legacy/summary_moves_effect_de.png * Delete public/images/ui/legacy/summary_moves_effect_es.png * Delete public/images/ui/legacy/summary_moves_effect_fr.png * Delete public/images/ui/legacy/summary_moves_effect_it.png * Delete public/images/ui/legacy/summary_moves_effect_pt-BR.png * Delete public/images/ui/legacy/summary_moves_effect_zh-CN.png --- .../images/ui/legacy/summary_moves_effect_de.png | Bin 799 -> 0 bytes .../images/ui/legacy/summary_moves_effect_es.png | Bin 807 -> 0 bytes .../images/ui/legacy/summary_moves_effect_fr.png | Bin 1787 -> 0 bytes .../images/ui/legacy/summary_moves_effect_it.png | Bin 799 -> 0 bytes .../ui/legacy/summary_moves_effect_pt-BR.png | Bin 800 -> 0 bytes .../ui/legacy/summary_moves_effect_zh-CN.png | Bin 799 -> 0 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 public/images/ui/legacy/summary_moves_effect_de.png delete mode 100644 public/images/ui/legacy/summary_moves_effect_es.png delete mode 100644 public/images/ui/legacy/summary_moves_effect_fr.png delete mode 100644 public/images/ui/legacy/summary_moves_effect_it.png delete mode 100644 public/images/ui/legacy/summary_moves_effect_pt-BR.png delete mode 100644 public/images/ui/legacy/summary_moves_effect_zh-CN.png diff --git a/public/images/ui/legacy/summary_moves_effect_de.png b/public/images/ui/legacy/summary_moves_effect_de.png deleted file mode 100644 index 8d6ef024cf3bda09f70455b9400db5a1e2bb7b40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 799 zcmeAS@N?(olHy`uVBq!ia0vp^DL`z;!3-o{Y5ILWn z&^SMJqNNA3qeQFy;zca3M?{pwqFuCE0|mW17jdwubUp~(vD>h7LhRwZrrxCq+7T5d zajm^uw~1|QQmAOSaVtXeR>zwEIZT{REbMJRD~#V8er988kGx#;`qzO?pZ#)_7M(qJ zHk((UC39)3pUK^l;)_2jnpQpj+$Xj5-nUgc|IBAiKE009bk>KCnZ=(Dc^`7l{yFDS z?86B&FHSy`e#o{jCg6wTOSg&fqRVUfR-BnIxuch>y=7|&tF&lNnv8cvfW@3GIVbtg zh*_?zh}}3?kQ>jn&XaXZy7nLb?%#b{ z;5yebi(?T-oxcBFVgKXq+SyVs^wmsV7yP^V`QGjYiPHPF+q{2$;`6@#h2J>!-fpV@ zD$r){a$hU^A#=vfhR>@vrM)?DRBem>vl933OQU8shH%~Udpi5sg12l<+(++u{ho8j z*=g6TU2S`7U-)@{OPX449`^0qbIJYoO7;`>7Hy92JzW8e6s-WC5LXWeiy(&o*$m%X zIKD6Cc)wTR{XL2I|Ns9l&Q8wudfzkU`PzH;zW)bC9>Y?>+2?>1UrCT(Fi-&kFt{GL za{?&CS>O>_%)r1c48n{Iv*t(u1wVVbIEF;HzrA^zugO4w<-)D*rs@Cx$KFicC7?Sy zN|Qgu-)Xf+n$y#jJEmJt^v-|r!LCIjc$Z&Z$`84h>~a}Vo|?x5_B`LSDCnfasbo6~ zSt;*r?p^cu>)!H8iL`TTd2X2=sV@bQWO%VG-2^3 zp+=dhQ#qcjSmUDLo~p`ZsiiH5Mak8jUVJyd{dgTVVez9$%-a@Kgs;`sdb$2TH{


mdKI;Vst09W^QA^-pY diff --git a/public/images/ui/legacy/summary_moves_effect_es.png b/public/images/ui/legacy/summary_moves_effect_es.png deleted file mode 100644 index a48f90cc8f6fabe76b4964b4a9004ba92852df9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 807 zcmeAS@N?(olHy`uVBq!ia0vp^DL`z;!3-o{Y5ILWn z&^SMJqNNA3qeQFy;zca3M?{pwqFuCE0|mW17jdwubUp~(vD>h7LhRwZrrxCq+7T5d zajm^uw~1|QQmAOSaVtXeR>zwEIZT{REbMJRD~#V8er988kGx#;`qzO?pZ#)_7M(qJ zHk((UC39)3pUK^l;)_2jnpQpj+$Xj5-nUgc|IBAiKE009bk>KCnZ=(Dc^`7l{yFDS z?86B&FHSy`e#o{jCg6wTOSg&fqRVUfR-BnIxuch>y=7|&tF&lNnv8cvfW@3GIVbtg zh*_?zh}}3?kQ>jn&XaXZy7nLb?%#b{ z;5yebi(?T-oxcBFVgKXq+SyVs^wmsV7yP^V`QGjYiPHPF+q{2$;`6@#h2J>!-fpV@ zD$r){a$hU^A#=vfhR>@vrM)?DRBem>vl933OQU8shH%~Udpi5sg12l<+(++u{ho8j z*=g6TU2S`7U-)@{OPX449`^0qbIJYoO7;`>7Hy92JzW8e6s-WC5LXWeiy(&o*$m%X zIKD6Cc)wTR{XL2I|Ns9l&Q8wudfzkU`PzH;zW)bC9>Y?>+2?>1UrCT(Fi-&kFt{GL za{?&CS>O>_%)r1c48n{Iv*t(u1%G?GIEF;Hznytgs9Ax>RnvQQ?7#oz*_XUCWM?gm zs3|B)6DpWl?e>N9?qS)E%NY+o*tJLmTj|GiyxeRVp-@E(I_+MWBXMIj!Wo;vz`l0Fe=*x4W>I+=q+ zhUK)B>AC&B{Y^5W)81?lJ-R!~S@C4WvHt=E?>K*D-wEEcNMs=}7#KWV{an^LB{Ts5 DAgUg%e zd4KQk`SU){bFU}j15J(F8VQ1Eibg_7yvq3Paomr8uXn~vc-dqo2l|Oq^XNNiA)km>|7 z8imfHs$(=k_M`1?M0@U*7=O|K<1Jtl5#>Vs@%qo#d0}f5bQ_^Hk^2t7Cj+M$(!vQ)$AV@AI0fh;jF4^^mHCdP6#te!;{GPCF(sB7DI7{Dox#cDP- z^hH%`CQK_lj>D*CWka-?n$RJWgeDp@Bp4pYZg$ww=wi@-z(Pg}q5S%VCDvUggF*7C zVMUWs!R)Mq!w|4wfZ|!+O|u@F^Q3rucRrEz>|}Y7Wh>Aal9lwtMo>-=J=`5oTsShY zz+J(zB&Ly}0vxWQf(&GIEklvDB#J?lM+P>Gy>r#;qrqUpKxrk9HwL1(AVQ^-&jnHYNiD=2}VN!3g^bDD6%Mfz1^%wkZ8^Y0L^o5f%XEoj~2RJf`S`Yh!I$b(Rb^fw%Y`HY z$!?GUCE1k$WvZ%H?m0OX+Cmm$(toL$3d}@ls{jnxm%)j=TSYQ;VfY!lrRziUGaF^0 zf~y+^WsZs#&lxP?bL&ISmTH3%YIr&tcntpj*z-9&La#pFPJf&I#`0zx7OQJ-tKVwRf#>*Vip)3x`Xe z7&9{;ez!7Pcw~0w_L;LMuTuwyzt3ED{CMo!1@BwEmv{Yf^NH5glgiZ1rejOY(!t(8 zyWSiu9XN7dd*^4y`A>=PlP|p3@J!eAjg`mSRvsQtwY6T_vp2MV0JgsJ=xliNe^FeU zZohR&`eFB1ho?Ip@K0ZT|G>UIC(f_NBs=wz-mPoBhRzhU1}A{reC71-*(( A`Tzg` diff --git a/public/images/ui/legacy/summary_moves_effect_it.png b/public/images/ui/legacy/summary_moves_effect_it.png deleted file mode 100644 index 8d6ef024cf3bda09f70455b9400db5a1e2bb7b40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 799 zcmeAS@N?(olHy`uVBq!ia0vp^DL`z;!3-o{Y5ILWn z&^SMJqNNA3qeQFy;zca3M?{pwqFuCE0|mW17jdwubUp~(vD>h7LhRwZrrxCq+7T5d zajm^uw~1|QQmAOSaVtXeR>zwEIZT{REbMJRD~#V8er988kGx#;`qzO?pZ#)_7M(qJ zHk((UC39)3pUK^l;)_2jnpQpj+$Xj5-nUgc|IBAiKE009bk>KCnZ=(Dc^`7l{yFDS z?86B&FHSy`e#o{jCg6wTOSg&fqRVUfR-BnIxuch>y=7|&tF&lNnv8cvfW@3GIVbtg zh*_?zh}}3?kQ>jn&XaXZy7nLb?%#b{ z;5yebi(?T-oxcBFVgKXq+SyVs^wmsV7yP^V`QGjYiPHPF+q{2$;`6@#h2J>!-fpV@ zD$r){a$hU^A#=vfhR>@vrM)?DRBem>vl933OQU8shH%~Udpi5sg12l<+(++u{ho8j z*=g6TU2S`7U-)@{OPX449`^0qbIJYoO7;`>7Hy92JzW8e6s-WC5LXWeiy(&o*$m%X zIKD6Cc)wTR{XL2I|Ns9l&Q8wudfzkU`PzH;zW)bC9>Y?>+2?>1UrCT(Fi-&kFt{GL za{?&CS>O>_%)r1c48n{Iv*t(u1wVVbIEF;HzrA^zugO4w<-)D*rs@Cx$KFicC7?Sy zN|Qgu-)Xf+n$y#jJEmJt^v-|r!LCIjc$Z&Z$`84h>~a}Vo|?x5_B`LSDCnfasbo6~ zSt;*r?p^cu>)!H8iL`TTd2X2=sV@bQWO%VG-2^3 zp+=dhQ#qcjSmUDLo~p`ZsiiH5Mak8jUVJyd{dgTVVez9$%-a@Kgs;`sdb$2TH{
mdKI;Vst09W^QA^-pY diff --git a/public/images/ui/legacy/summary_moves_effect_pt-BR.png b/public/images/ui/legacy/summary_moves_effect_pt-BR.png deleted file mode 100644 index f5a0c2ea736e57910270f605be6950e87388e089..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 800 zcmeAS@N?(olHy`uVBq!ia0vp^DL`z;!3-o{Y5ILWn z&^SMJqNNA3qeQFy;zca3M?{pwqFuCE0|mW17jdwubUp~(vD>h7LhRwZrrxCq+7T5d zajm^uw~1|QQmAOSaVtXeR>zwEIZT{REbMJRD~#V8er988kGx#;`qzO?pZ#)_7M(qJ zHk((UC39)3pUK^l;)_2jnpQpj+$Xj5-nUgc|IBAiKE009bk>KCnZ=(Dc^`7l{yFDS z?86B&FHSy`e#o{jCg6wTOSg&fqRVUfR-BnIxuch>y=7|&tF&lNnv8cvfW@3GIVbtg zh*_?zh}}3?kQ>jn&XaXZy7nLb?%#b{ z;5yebi(?T-oxcBFVgKXq+SyVs^wmsV7yP^V`QGjYiPHPF+q{2$;`6@#h2J>!-fpV@ zD$r){a$hU^A#=vfhR>@vrM)?DRBem>vl933OQU8shH%~Udpi5sg12l<+(++u{ho8j z*=g6TU2S`7U-)@{OPX449`^0qbIJYoO7;`>7Hy92JzW8e6s-WC5LXWeiy(&o*$m%X zIKD6Cc)wTR{XL2I|Ns9l&Q8wudfzkU`PzH;zW)bC9>Y?>+2?>1UrCT(Fi-&kFt{GL za{?&CS>O>_%)r1c48n{Iv*t(u1;2Q@IEF;HzrA^zugO4wCE$(g!PEc$ue)o+?DBfq zwA0KtCvON~;*kp9yhZ=#eR7oBq;o`~>HE2-dlm(G>YtkI z?$>^7(*58^$ICZwo0J)Cr*>#((C;$Q^mB8Wn z&^SMJqNNA3qeQFy;zca3M?{pwqFuCE0|mW17jdwubUp~(vD>h7LhRwZrrxCq+7T5d zajm^uw~1|QQmAOSaVtXeR>zwEIZT{REbMJRD~#V8er988kGx#;`qzO?pZ#)_7M(qJ zHk((UC39)3pUK^l;)_2jnpQpj+$Xj5-nUgc|IBAiKE009bk>KCnZ=(Dc^`7l{yFDS z?86B&FHSy`e#o{jCg6wTOSg&fqRVUfR-BnIxuch>y=7|&tF&lNnv8cvfW@3GIVbtg zh*_?zh}}3?kQ>jn&XaXZy7nLb?%#b{ z;5yebi(?T-oxcBFVgKXq+SyVs^wmsV7yP^V`QGjYiPHPF+q{2$;`6@#h2J>!-fpV@ zD$r){a$hU^A#=vfhR>@vrM)?DRBem>vl933OQU8shH%~Udpi5sg12l<+(++u{ho8j z*=g6TU2S`7U-)@{OPX449`^0qbIJYoO7;`>7Hy92JzW8e6s-WC5LXWeiy(&o*$m%X zIKD6Cc)wTR{XL2I|Ns9l&Q8wudfzkU`PzH;zW)bC9>Y?>+2?>1UrCT(Fi-&kFt{GL za{?&CS>O>_%)r1c48n{Iv*t(u1wVVbIEF;HzrA^zugO4w<-)D*rs@Cx$KFicC7?Sy zN|Qgu-)Xf+n$y#jJEmJt^v-|r!LCIjc$Z&Z$`84h>~a}Vo|?x5_B`LSDCnfasbo6~ zSt;*r?p^cu>)!H8iL`TTd2X2=sV@bQWO%VG-2^3 zp+=dhQ#qcjSmUDLo~p`ZsiiH5Mak8jUVJyd{dgTVVez9$%-a@Kgs;`sdb$2TH{
mdKI;Vst09W^QA^-pY From 89b33466a9b6e6dbf3169bbc490c411291e23485 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:53:45 -0700 Subject: [PATCH 72/91] [Test] Fix Safeguard test that relied on a now-fixed bug (#4098) --- src/test/moves/safeguard.test.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/test/moves/safeguard.test.ts b/src/test/moves/safeguard.test.ts index 94a7aa6031e..8068c475539 100644 --- a/src/test/moves/safeguard.test.ts +++ b/src/test/moves/safeguard.test.ts @@ -38,7 +38,7 @@ describe("Moves - Safeguard", () => { }); it("protects from damaging moves with additional effects", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; game.move.select(Moves.NUZZLE); @@ -49,7 +49,7 @@ describe("Moves - Safeguard", () => { }, TIMEOUT); it("protects from status moves", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.SPORE); @@ -61,7 +61,7 @@ describe("Moves - Safeguard", () => { it("protects from confusion", async () => { game.override.moveset([Moves.CONFUSE_RAY]); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.CONFUSE_RAY); @@ -74,7 +74,7 @@ describe("Moves - Safeguard", () => { it("protects ally from status", async () => { game.override.battleType("double"); - await game.startBattle(); + await game.classicMode.startBattle(); game.move.select(Moves.SPORE, 0, BattlerIndex.ENEMY_2); game.move.select(Moves.NUZZLE, 1, BattlerIndex.ENEMY_2); @@ -90,7 +90,7 @@ describe("Moves - Safeguard", () => { }, TIMEOUT); it("protects from Yawn", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.YAWN); @@ -101,7 +101,7 @@ describe("Moves - Safeguard", () => { }, TIMEOUT); it("doesn't protect from already existing Yawn", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.YAWN); @@ -116,12 +116,13 @@ describe("Moves - Safeguard", () => { it("doesn't protect from self-inflicted via Rest or Flame Orb", async () => { game.override.enemyHeldItems([{name: "FLAME_ORB"}]); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); + enemyPokemon.damageAndUpdate(1); expect(enemyPokemon.status?.effect).toEqual(StatusEffect.BURN); @@ -135,7 +136,7 @@ describe("Moves - Safeguard", () => { it("protects from ability-inflicted status", async () => { game.override.ability(Abilities.STATIC); vi.spyOn(allAbilities[Abilities.STATIC].getAttrs(PostDefendContactApplyStatusEffectAbAttr)[0], "chance", "get").mockReturnValue(100); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.SPLASH); From 80e347840df421780cb9fc4647ce6f20a76ba165 Mon Sep 17 00:00:00 2001 From: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> Date: Tue, 10 Sep 2024 01:54:17 +0900 Subject: [PATCH 73/91] [Bug] Fix line spacing in level up stats and move info in Japanese (#4095) --- src/ui/battle-message-ui-handler.ts | 3 +++ src/ui/move-info-overlay.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index 3bea0f21433..9a694d50b29 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -97,6 +97,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler { this.levelUpStatsContainer = levelUpStatsContainer; const levelUpStatsLabelsContent = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 73, -94, "", TextStyle.WINDOW, { maxLines: 6 }); + levelUpStatsLabelsContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5); let levelUpStatsLabelText = ""; for (const s of PERMANENT_STATS) { @@ -112,11 +113,13 @@ export default class BattleMessageUiHandler extends MessageUiHandler { levelUpStatsContainer.add(levelUpStatsLabelsContent); const levelUpStatsIncrContent = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 50, -94, "+\n+\n+\n+\n+\n+", TextStyle.WINDOW, { maxLines: 6 }); + levelUpStatsIncrContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5); levelUpStatsContainer.add(levelUpStatsIncrContent); this.levelUpStatsIncrContent = levelUpStatsIncrContent; const levelUpStatsValuesContent = addBBCodeTextObject(this.scene, (this.scene.game.canvas.width / 6) - 7, -94, "", TextStyle.WINDOW, { maxLines: 6, lineSpacing: 5}); + levelUpStatsValuesContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5); levelUpStatsValuesContent.setOrigin(1, 0); levelUpStatsValuesContent.setAlign("right"); levelUpStatsContainer.add(levelUpStatsValuesContent); diff --git a/src/ui/move-info-overlay.ts b/src/ui/move-info-overlay.ts index 859e95a39b6..77010f84528 100644 --- a/src/ui/move-info-overlay.ts +++ b/src/ui/move-info-overlay.ts @@ -58,6 +58,7 @@ export default class MoveInfoOverlay extends Phaser.GameObjects.Container implem // set up the description; wordWrap uses true pixels, unaffected by any scaling, while other values are affected this.desc = addTextObject(scene, (options?.onSide && !options?.right ? EFF_WIDTH : 0) + BORDER, (options?.top ? EFF_HEIGHT : 0) + BORDER - 2, "", TextStyle.BATTLE_INFO, { wordWrap: { width: (width - (BORDER - 2) * 2 - (options?.onSide ? EFF_WIDTH : 0)) * GLOBAL_SCALE } }); + this.desc.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5); // limit the text rendering, required for scrolling later on const maskPointOrigin = { From c59f6edf36dd0fa2176128c49fadd0acb357d1d0 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Tue, 10 Sep 2024 00:54:31 +0800 Subject: [PATCH 74/91] [Move] Implement Power Shift (#4083) * fully implement power shift * cleanup --- src/data/move.ts | 64 ++++++++++++++++++++++++++++-- src/locales/en/move-trigger.json | 1 + src/test/moves/power_shift.test.ts | 64 ++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 src/test/moves/power_shift.test.ts diff --git a/src/data/move.ts b/src/data/move.ts index 6ab134c1708..d9e385fdd0e 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5987,9 +5987,8 @@ export class SwapStatAttr extends MoveEffectAttr { } /** - * Takes the average of the user's and target's corresponding current - * {@linkcode stat} values and sets that stat to the average for both - * temporarily. + * Swaps the user's and target's corresponding current + * {@linkcode EffectiveStat | stat} values * @param user the {@linkcode Pokemon} that used the move * @param target the {@linkcode Pokemon} that the move was used on * @param move N/A @@ -6013,6 +6012,62 @@ export class SwapStatAttr extends MoveEffectAttr { } } +/** + * Attribute used to switch the user's own stats. + * Used by Power Shift. + * @extends MoveEffectAttr + */ +export class ShiftStatAttr extends MoveEffectAttr { + private statToSwitch: EffectiveStat; + private statToSwitchWith: EffectiveStat; + + constructor(statToSwitch: EffectiveStat, statToSwitchWith: EffectiveStat) { + super(); + + this.statToSwitch = statToSwitch; + this.statToSwitchWith = statToSwitchWith; + } + + /** + * Switches the user's stats based on the {@linkcode statToSwitch} and {@linkcode statToSwitchWith} attributes. + * @param {Pokemon} user the {@linkcode Pokemon} that used the move + * @param target n/a + * @param move n/a + * @param args n/a + * @returns whether the effect was applied + */ + override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (!super.apply(user, target, move, args)) { + return false; + } + + const firstStat = user.getStat(this.statToSwitch, false); + const secondStat = user.getStat(this.statToSwitchWith, false); + + user.setStat(this.statToSwitch, secondStat, false); + user.setStat(this.statToSwitchWith, firstStat, false); + + user.scene.queueMessage(i18next.t("moveTriggers:shiftedStats", { + pokemonName: getPokemonNameWithAffix(user), + statToSwitch: i18next.t(getStatKey(this.statToSwitch)), + statToSwitchWith: i18next.t(getStatKey(this.statToSwitchWith)) + })); + + return true; + } + + /** + * Encourages the user to use the move if the stat to switch with is greater than the stat to switch. + * @param {Pokemon} user the {@linkcode Pokemon} that used the move + * @param target n/a + * @param move n/a + * @returns number of points to add to the user's benefit score + */ + override getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + return user.getStat(this.statToSwitchWith, false) > user.getStat(this.statToSwitch, false) ? 10 : 0; + } +} + /** * Attribute used for status moves, namely Power Split and Guard Split, * that take the average of a user's and target's corresponding @@ -8894,7 +8949,8 @@ export function initMoves() { new AttackMove(Moves.PSYSHIELD_BASH, Type.PSYCHIC, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8) .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true), new SelfStatusMove(Moves.POWER_SHIFT, Type.NORMAL, -1, 10, -1, 0, 8) - .unimplemented(), + .target(MoveTarget.USER) + .attr(ShiftStatAttr, Stat.ATK, Stat.DEF), new AttackMove(Moves.STONE_AXE, Type.ROCK, MoveCategory.PHYSICAL, 65, 90, 15, 100, 0, 8) .attr(AddArenaTrapTagHitAttr, ArenaTagType.STEALTH_ROCK) .slicingMove(), diff --git a/src/locales/en/move-trigger.json b/src/locales/en/move-trigger.json index e70fb9dcfb7..867905c5a9f 100644 --- a/src/locales/en/move-trigger.json +++ b/src/locales/en/move-trigger.json @@ -7,6 +7,7 @@ "switchedStat": "{{pokemonName}} switched {{stat}} with its target!", "sharedGuard": "{{pokemonName}} shared its guard with the target!", "sharedPower": "{{pokemonName}} shared its power with the target!", + "shiftedStats": "{{pokemonName}} switched its {{statToSwitch}} and {{statToSwitchWith}}!", "goingAllOutForAttack": "{{pokemonName}} is going all out for this attack!", "regainedHealth": "{{pokemonName}} regained\nhealth!", "keptGoingAndCrashed": "{{pokemonName}} kept going\nand crashed!", diff --git a/src/test/moves/power_shift.test.ts b/src/test/moves/power_shift.test.ts new file mode 100644 index 00000000000..350041d9e4e --- /dev/null +++ b/src/test/moves/power_shift.test.ts @@ -0,0 +1,64 @@ +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { Stat } from "#app/enums/stat"; +import { Abilities } from "#enums/abilities"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Moves - Power Shift", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .moveset([Moves.POWER_SHIFT, Moves.BULK_UP]) + .battleType("single") + .ability(Abilities.BALL_FETCH) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY); + }); + + it("switches the user's raw Attack stat with its raw Defense stat", async () => { + await game.classicMode.startBattle([Species.MAGIKARP]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + + playerPokemon.setStat(Stat.ATK, 10, false); + playerPokemon.setStat(Stat.DEF, 20, false); + + game.move.select(Moves.BULK_UP); + + await game.phaseInterceptor.to("TurnEndPhase"); + + // Stat stages are increased by 1 + expect(playerPokemon.getStatStageMultiplier(Stat.ATK)).toBe(1.5); + expect(playerPokemon.getStatStageMultiplier(Stat.DEF)).toBe(1.5); + + await game.toNextTurn(); + + game.move.select(Moves.POWER_SHIFT); + + await game.phaseInterceptor.to("TurnEndPhase"); + + // Effective stats are calculated correctly + expect(playerPokemon.getEffectiveStat(Stat.ATK)).toBe(30); + expect(playerPokemon.getEffectiveStat(Stat.DEF)).toBe(15); + // Raw stats are swapped + expect(playerPokemon.getStat(Stat.ATK, false)).toBe(20); + expect(playerPokemon.getStat(Stat.DEF, false)).toBe(10); + }, TIMEOUT); +}); From 11d912bad8f2ec36b36d7151afa5e3e649e2b834 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:55:11 -0700 Subject: [PATCH 75/91] [Dev] Make `OPP_MOVESET_OVERRIDE` fully override the enemy's moveset (#4062) * Make `OPP_MOVESET_OVERRIDE` fully override the enemy's moveset * Update tests with new override behavior * Fix tests * Fix another test * Move overrides no longer required to be arrays * Remove `SPLASH_ONLY` test utility variable * Update moveset override helper functions * Missed some tests --- src/field/pokemon.ts | 10 ++- src/overrides.ts | 4 +- src/test/abilities/aura_break.test.ts | 3 +- src/test/abilities/battery.test.ts | 3 +- src/test/abilities/beast_boost.test.ts | 5 +- src/test/abilities/contrary.test.ts | 8 +- src/test/abilities/costar.test.ts | 3 +- src/test/abilities/dancer.test.ts | 2 +- src/test/abilities/disguise.test.ts | 7 +- src/test/abilities/dry_skin.test.ts | 80 ++++++++----------- src/test/abilities/flash_fire.test.ts | 13 ++- src/test/abilities/flower_gift.test.ts | 7 +- src/test/abilities/forecast.test.ts | 7 +- src/test/abilities/galvanize.test.ts | 3 +- src/test/abilities/gulp_missile.test.ts | 19 +++-- src/test/abilities/heatproof.test.ts | 3 +- src/test/abilities/hustle.test.ts | 3 +- src/test/abilities/hyper_cutter.test.ts | 3 +- src/test/abilities/imposter.test.ts | 7 +- src/test/abilities/intimidate.test.ts | 5 +- src/test/abilities/libero.test.ts | 3 +- src/test/abilities/magic_guard.test.ts | 3 +- src/test/abilities/moody.test.ts | 5 +- src/test/abilities/moxie.test.ts | 3 +- src/test/abilities/parental_bond.test.ts | 7 +- src/test/abilities/pastel_veil.test.ts | 3 +- src/test/abilities/power_spot.test.ts | 3 +- src/test/abilities/protean.test.ts | 3 +- src/test/abilities/quick_draw.test.ts | 4 +- src/test/abilities/sand_spit.test.ts | 4 +- src/test/abilities/sap_sipper.test.ts | 11 ++- src/test/abilities/simple.test.ts | 8 +- src/test/abilities/steely_spirit.test.ts | 3 +- src/test/abilities/sweet_veil.test.ts | 5 +- src/test/abilities/tera_shell.test.ts | 8 +- src/test/abilities/wind_power.test.ts | 3 +- src/test/abilities/wind_rider.test.ts | 3 +- src/test/abilities/wonder_skin.test.ts | 3 +- src/test/abilities/zero_to_hero.test.ts | 5 +- src/test/arena/arena_gravity.test.ts | 3 +- src/test/arena/weather_fog.test.ts | 2 +- src/test/arena/weather_hail.test.ts | 5 +- src/test/arena/weather_sandstorm.test.ts | 5 +- src/test/battle/battle.test.ts | 3 +- src/test/battle/damage_calculation.test.ts | 3 +- src/test/battle/double_battle.test.ts | 3 +- src/test/battle/inverse_battle.test.ts | 3 +- src/test/boss-pokemon.test.ts | 3 +- src/test/evolution.test.ts | 5 +- src/test/final_boss.test.ts | 3 +- src/test/items/dire_hit.test.ts | 3 +- .../double_battle_chance_booster.test.ts | 3 +- src/test/items/grip_claw.test.ts | 3 +- src/test/items/scope_lens.test.ts | 3 +- .../items/temp_stat_stage_booster.test.ts | 3 +- src/test/moves/alluring_voice.test.ts | 2 +- src/test/moves/baton_pass.test.ts | 10 ++- src/test/moves/beak_blast.test.ts | 6 +- src/test/moves/beat_up.test.ts | 2 +- src/test/moves/belly_drum.test.ts | 3 +- src/test/moves/burning_jealousy.test.ts | 7 +- src/test/moves/clangorous_soul.test.ts | 3 +- src/test/moves/crafty_shield.test.ts | 6 +- src/test/moves/disable.test.ts | 7 +- src/test/moves/dragon_cheer.test.ts | 3 +- src/test/moves/dragon_rage.test.ts | 3 +- src/test/moves/dragon_tail.test.ts | 7 +- src/test/moves/fake_out.test.ts | 3 +- src/test/moves/fillet_away.test.ts | 3 +- src/test/moves/fissure.test.ts | 3 +- src/test/moves/flame_burst.test.ts | 2 +- src/test/moves/flower_shield.test.ts | 3 +- src/test/moves/focus_punch.test.ts | 7 +- src/test/moves/foresight.test.ts | 5 +- src/test/moves/freeze_dry.test.ts | 5 +- src/test/moves/freezy_frost.test.ts | 3 +- src/test/moves/gastro_acid.test.ts | 3 +- src/test/moves/gigaton_hammer.test.ts | 3 +- src/test/moves/glaive_rush.test.ts | 10 +-- src/test/moves/growth.test.ts | 3 +- src/test/moves/guard_split.test.ts | 5 +- src/test/moves/guard_swap.test.ts | 2 +- src/test/moves/hard_press.test.ts | 3 +- src/test/moves/haze.test.ts | 3 +- src/test/moves/hyper_beam.test.ts | 2 +- src/test/moves/jaw_lock.test.ts | 5 +- src/test/moves/lash_out.test.ts | 2 +- src/test/moves/lucky_chant.test.ts | 4 +- src/test/moves/lunar_blessing.test.ts | 3 +- src/test/moves/make_it_rain.test.ts | 3 +- src/test/moves/mat_block.test.ts | 4 +- src/test/moves/miracle_eye.test.ts | 3 +- src/test/moves/multi_target.test.ts | 3 +- src/test/moves/octolock.test.ts | 3 +- src/test/moves/parting_shot.test.ts | 5 +- src/test/moves/power_split.test.ts | 5 +- src/test/moves/power_swap.test.ts | 2 +- src/test/moves/protect.test.ts | 10 +-- src/test/moves/quick_guard.test.ts | 8 +- src/test/moves/rollout.test.ts | 3 +- src/test/moves/safeguard.test.ts | 10 ++- src/test/moves/shell_trap.test.ts | 9 +-- src/test/moves/speed_swap.test.ts | 3 +- src/test/moves/spikes.test.ts | 3 +- src/test/moves/spit_up.test.ts | 3 +- src/test/moves/stockpile.test.ts | 3 +- src/test/moves/swallow.test.ts | 3 +- src/test/moves/tail_whip.test.ts | 3 +- src/test/moves/tailwind.test.ts | 3 +- src/test/moves/tera_blast.test.ts | 3 +- src/test/moves/thunder_wave.test.ts | 3 +- src/test/moves/tidy_up.test.ts | 3 +- src/test/moves/transform.test.ts | 5 +- src/test/moves/u_turn.test.ts | 3 +- src/test/moves/wide_guard.test.ts | 8 +- src/test/reload.test.ts | 3 +- src/test/ui/type-hints.test.ts | 5 +- src/test/utils/helpers/overridesHelper.ts | 10 ++- src/test/utils/testUtils.ts | 4 - 119 files changed, 260 insertions(+), 352 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 01d728d6de0..4bc4aca448c 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -984,10 +984,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { : this.moveset; // Overrides moveset based on arrays specified in overrides.ts - const overrideArray: Array = this.isPlayer() ? Overrides.MOVESET_OVERRIDE : Overrides.OPP_MOVESET_OVERRIDE; + let overrideArray: Moves | Array = this.isPlayer() ? Overrides.MOVESET_OVERRIDE : Overrides.OPP_MOVESET_OVERRIDE; + if (!Array.isArray(overrideArray)) { + overrideArray = [overrideArray]; + } if (overrideArray.length > 0) { + if (!this.isPlayer()) { + this.moveset = []; + } overrideArray.forEach((move: Moves, index: number) => { - const ppUsed = this.moveset[index]?.ppUsed || 0; + const ppUsed = this.moveset[index]?.ppUsed ?? 0; this.moveset[index] = new PokemonMove(move, Math.min(ppUsed, allMoves[move].pp)); }); } diff --git a/src/overrides.ts b/src/overrides.ts index 48c118b55bc..d1597dfdee8 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -98,7 +98,7 @@ class DefaultOverrides { readonly PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE; readonly STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE; readonly GENDER_OVERRIDE: Gender | null = null; - readonly MOVESET_OVERRIDE: Array = []; + readonly MOVESET_OVERRIDE: Moves | Array = []; readonly SHINY_OVERRIDE: boolean = false; readonly VARIANT_OVERRIDE: Variant = 0; @@ -111,7 +111,7 @@ class DefaultOverrides { readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE; readonly OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE; readonly OPP_GENDER_OVERRIDE: Gender | null = null; - readonly OPP_MOVESET_OVERRIDE: Array = []; + readonly OPP_MOVESET_OVERRIDE: Moves | Array = []; readonly OPP_SHINY_OVERRIDE: boolean = false; readonly OPP_VARIANT_OVERRIDE: Variant = 0; readonly OPP_IVS_OVERRIDE: number | number[] = []; diff --git a/src/test/abilities/aura_break.test.ts b/src/test/abilities/aura_break.test.ts index 0fb2212d817..422ac5178c1 100644 --- a/src/test/abilities/aura_break.test.ts +++ b/src/test/abilities/aura_break.test.ts @@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -27,7 +26,7 @@ describe("Abilities - Aura Break", () => { game = new GameManager(phaserGame); game.override.battleType("single"); game.override.moveset([Moves.MOONBLAST, Moves.DARK_PULSE, Moves.MOONBLAST, Moves.DARK_PULSE]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.AURA_BREAK); game.override.enemySpecies(Species.SHUCKLE); }); diff --git a/src/test/abilities/battery.test.ts b/src/test/abilities/battery.test.ts index 020866509d6..cd02ed0c4eb 100644 --- a/src/test/abilities/battery.test.ts +++ b/src/test/abilities/battery.test.ts @@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -31,7 +30,7 @@ describe("Abilities - Battery", () => { game.override.enemySpecies(Species.SHUCKLE); game.override.enemyAbility(Abilities.BALL_FETCH); game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("raises the power of allies' special moves by 30%", async () => { diff --git a/src/test/abilities/beast_boost.test.ts b/src/test/abilities/beast_boost.test.ts index 05645a1231d..26bae7b8838 100644 --- a/src/test/abilities/beast_boost.test.ts +++ b/src/test/abilities/beast_boost.test.ts @@ -4,7 +4,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -31,7 +30,7 @@ describe("Abilities - Beast Boost", () => { .ability(Abilities.BEAST_BOOST) .startingLevel(2000) .moveset([ Moves.FLAMETHROWER ]) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("should prefer highest stat to boost its corresponding stat stage by 1 when winning a battle", async() => { @@ -51,7 +50,7 @@ describe("Abilities - Beast Boost", () => { }, 20000); it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => { - game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT)); + game.override.enemyMoveset([Moves.GUARD_SPLIT]); await game.classicMode.startBattle([Species.SLOWBRO]); diff --git a/src/test/abilities/contrary.test.ts b/src/test/abilities/contrary.test.ts index 19ecc7e0240..95a209395dc 100644 --- a/src/test/abilities/contrary.test.ts +++ b/src/test/abilities/contrary.test.ts @@ -1,10 +1,10 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import { Moves } from "#app/enums/moves"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Abilities - Contrary", () => { let phaserGame: Phaser.Game; @@ -27,7 +27,7 @@ describe("Abilities - Contrary", () => { .enemySpecies(Species.BULBASAUR) .enemyAbility(Abilities.CONTRARY) .ability(Abilities.INTIMIDATE) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("should invert stat changes when applied", async() => { diff --git a/src/test/abilities/costar.test.ts b/src/test/abilities/costar.test.ts index 96ec775f2a0..794bed0d3cf 100644 --- a/src/test/abilities/costar.test.ts +++ b/src/test/abilities/costar.test.ts @@ -5,7 +5,6 @@ import { Species } from "#app/enums/species"; import { CommandPhase } from "#app/phases/command-phase"; import { MessagePhase } from "#app/phases/message-phase"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; @@ -30,7 +29,7 @@ describe("Abilities - COSTAR", () => { game.override.battleType("double"); game.override.ability(Abilities.COSTAR); game.override.moveset([Moves.SPLASH, Moves.NASTY_PLOT]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); diff --git a/src/test/abilities/dancer.test.ts b/src/test/abilities/dancer.test.ts index d80f497f8b2..ec5ce53f4c3 100644 --- a/src/test/abilities/dancer.test.ts +++ b/src/test/abilities/dancer.test.ts @@ -30,7 +30,7 @@ describe("Abilities - Dancer", () => { .moveset([Moves.SWORDS_DANCE, Moves.SPLASH]) .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.DANCER) - .enemyMoveset(Array(4).fill(Moves.VICTORY_DANCE)); + .enemyMoveset([Moves.VICTORY_DANCE]); }); // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Dancer_(Ability) diff --git a/src/test/abilities/disguise.test.ts b/src/test/abilities/disguise.test.ts index ef145262954..fa7f26d2716 100644 --- a/src/test/abilities/disguise.test.ts +++ b/src/test/abilities/disguise.test.ts @@ -6,7 +6,6 @@ import { StatusEffect } from "#app/data/status-effect"; import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -31,7 +30,7 @@ describe("Abilities - Disguise", () => { game.override .battleType("single") .enemySpecies(Species.MIMIKYU) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .starterSpecies(Species.REGIELEKI) .moveset([Moves.SHADOW_SNEAK, Moves.VACUUM_WAVE, Moves.TOXIC_THREAD, Moves.SPLASH]); }, TIMEOUT); @@ -108,7 +107,7 @@ describe("Abilities - Disguise", () => { }, TIMEOUT); it("persists form change when switched out", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); + game.override.enemyMoveset([Moves.SHADOW_SNEAK]); game.override.starterSpecies(0); await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]); @@ -194,7 +193,7 @@ describe("Abilities - Disguise", () => { }, TIMEOUT); it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.ENDURE)); + game.override.enemyMoveset([Moves.ENDURE]); await game.classicMode.startBattle(); const mimikyu = game.scene.getEnemyPokemon()!; diff --git a/src/test/abilities/dry_skin.test.ts b/src/test/abilities/dry_skin.test.ts index b337e4d96f7..1af8831f25b 100644 --- a/src/test/abilities/dry_skin.test.ts +++ b/src/test/abilities/dry_skin.test.ts @@ -1,9 +1,7 @@ import { Species } from "#app/enums/species"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -23,63 +21,56 @@ describe("Abilities - Dry Skin", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleType("single"); - game.override.disableCrits(); - game.override.enemyAbility(Abilities.DRY_SKIN); - game.override.enemyMoveset(SPLASH_ONLY); - game.override.enemySpecies(Species.CHARMANDER); - game.override.ability(Abilities.UNNERVE); - game.override.starterSpecies(Species.CHANDELURE); + game.override + .battleType("single") + .disableCrits() + .enemyAbility(Abilities.DRY_SKIN) + .enemyMoveset(Moves.SPLASH) + .enemySpecies(Species.CHARMANDER) + .ability(Abilities.BALL_FETCH) + .moveset([Moves.SUNNY_DAY, Moves.RAIN_DANCE, Moves.SPLASH, Moves.WATER_GUN]) + .starterSpecies(Species.CHANDELURE); }); it("during sunlight, lose 1/8 of maximum health at the end of each turn", async () => { - game.override.moveset([Moves.SUNNY_DAY, Moves.SPLASH]); - - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; - expect(enemy).not.toBe(undefined); // first turn - let previousEnemyHp = enemy.hp; game.move.select(Moves.SUNNY_DAY); - await game.phaseInterceptor.to(TurnEndPhase); - expect(enemy.hp).toBeLessThan(previousEnemyHp); + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.hp).toBeLessThan(enemy.getMaxHp()); // second turn - previousEnemyHp = enemy.hp; + enemy.hp = enemy.getMaxHp(); game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - expect(enemy.hp).toBeLessThan(previousEnemyHp); + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.hp).toBeLessThan(enemy.getMaxHp()); }); it("during rain, gain 1/8 of maximum health at the end of each turn", async () => { - game.override.moveset([Moves.RAIN_DANCE, Moves.SPLASH]); - - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; - expect(enemy).not.toBe(undefined); enemy.hp = 1; // first turn - let previousEnemyHp = enemy.hp; game.move.select(Moves.RAIN_DANCE); - await game.phaseInterceptor.to(TurnEndPhase); - expect(enemy.hp).toBeGreaterThan(previousEnemyHp); + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.hp).toBeGreaterThan(1); // second turn - previousEnemyHp = enemy.hp; + enemy.hp = 1; game.move.select(Moves.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - expect(enemy.hp).toBeGreaterThan(previousEnemyHp); + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.hp).toBeGreaterThan(1); }); it("opposing fire attacks do 25% more damage", async () => { game.override.moveset([Moves.FLAMETHROWER]); - - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; const initialHP = 1000; @@ -87,72 +78,65 @@ describe("Abilities - Dry Skin", () => { // first turn game.move.select(Moves.FLAMETHROWER); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); const fireDamageTakenWithDrySkin = initialHP - enemy.hp; - expect(enemy.hp > 0); enemy.hp = initialHP; game.override.enemyAbility(Abilities.NONE); // second turn game.move.select(Moves.FLAMETHROWER); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); const fireDamageTakenWithoutDrySkin = initialHP - enemy.hp; expect(fireDamageTakenWithDrySkin).toBeGreaterThan(fireDamageTakenWithoutDrySkin); }); it("opposing water attacks heal 1/4 of maximum health and deal no damage", async () => { - game.override.moveset([Moves.WATER_GUN]); - - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; - expect(enemy).not.toBe(undefined); enemy.hp = 1; game.move.select(Moves.WATER_GUN); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(enemy.hp).toBeGreaterThan(1); }); it("opposing water attacks do not heal if they were protected from", async () => { - game.override.moveset([Moves.WATER_GUN]); + game.override.enemyMoveset([Moves.PROTECT]); - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; - expect(enemy).not.toBe(undefined); enemy.hp = 1; - game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]); game.move.select(Moves.WATER_GUN); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(enemy.hp).toBe(1); }); it("multi-strike water attacks only heal once", async () => { game.override.moveset([Moves.WATER_GUN, Moves.WATER_SHURIKEN]); - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; - expect(enemy).not.toBe(undefined); enemy.hp = 1; // first turn game.move.select(Moves.WATER_SHURIKEN); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); const healthGainedFromWaterShuriken = enemy.hp - 1; enemy.hp = 1; // second turn game.move.select(Moves.WATER_GUN); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); const healthGainedFromWaterGun = enemy.hp - 1; expect(healthGainedFromWaterShuriken).toBe(healthGainedFromWaterGun); diff --git a/src/test/abilities/flash_fire.test.ts b/src/test/abilities/flash_fire.test.ts index de40873998f..c3cf31496ea 100644 --- a/src/test/abilities/flash_fire.test.ts +++ b/src/test/abilities/flash_fire.test.ts @@ -7,7 +7,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -38,7 +37,7 @@ describe("Abilities - Flash Fire", () => { it("immune to Fire-type moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY); + game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH); await game.startBattle([Species.BLISSEY]); const blissey = game.scene.getPlayerPokemon()!; @@ -49,7 +48,7 @@ describe("Abilities - Flash Fire", () => { }, 20000); it("not activate if the Pokémon is protected from the Fire-type move", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.PROTECT]); + game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.PROTECT]); await game.startBattle([Species.BLISSEY]); const blissey = game.scene.getPlayerPokemon()!; @@ -60,7 +59,7 @@ describe("Abilities - Flash Fire", () => { }, 20000); it("activated by Will-O-Wisp", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.WILL_O_WISP)).moveset(SPLASH_ONLY); + game.override.enemyMoveset([Moves.WILL_O_WISP]).moveset(Moves.SPLASH); await game.startBattle([Species.BLISSEY]); const blissey = game.scene.getPlayerPokemon()!; @@ -75,7 +74,7 @@ describe("Abilities - Flash Fire", () => { }, 20000); it("activated after being frozen", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY); + game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH); game.override.statusEffect(StatusEffect.FREEZE); await game.startBattle([Species.BLISSEY]); @@ -88,7 +87,7 @@ describe("Abilities - Flash Fire", () => { }, 20000); it("not passing with baton pass", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.BATON_PASS]); + game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.BATON_PASS]); await game.startBattle([Species.BLISSEY, Species.CHANSEY]); // ensure use baton pass after enemy moved @@ -104,7 +103,7 @@ describe("Abilities - Flash Fire", () => { }, 20000); it("boosts Fire-type move when the ability is activated", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.FIRE_PLEDGE)).moveset([Moves.EMBER, Moves.SPLASH]); + game.override.enemyMoveset([Moves.FIRE_PLEDGE]).moveset([Moves.EMBER, Moves.SPLASH]); game.override.enemyAbility(Abilities.FLASH_FIRE).ability(Abilities.NONE); await game.startBattle([Species.BLISSEY]); const blissey = game.scene.getPlayerPokemon()!; diff --git a/src/test/abilities/flower_gift.test.ts b/src/test/abilities/flower_gift.test.ts index de07bd29478..256b61c6fea 100644 --- a/src/test/abilities/flower_gift.test.ts +++ b/src/test/abilities/flower_gift.test.ts @@ -5,7 +5,6 @@ import { WeatherType } from "#app/enums/weather-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -44,7 +43,7 @@ describe("Abilities - Flower Gift", () => { game.override .moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.SKILL_SWAP]) .enemySpecies(Species.MAGIKARP) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH); }); @@ -92,7 +91,7 @@ describe("Abilities - Flower Gift", () => { }); it("reverts to Overcast Form when the Pokémon loses Flower Gift, changes form under Harsh Sunlight/Sunny when it regains it", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP)).weather(WeatherType.HARSH_SUN); + game.override.enemyMoveset([Moves.SKILL_SWAP]).weather(WeatherType.HARSH_SUN); await game.classicMode.startBattle([Species.CHERRIM]); @@ -111,7 +110,7 @@ describe("Abilities - Flower Gift", () => { }); it("reverts to Overcast Form when the Flower Gift is suppressed, changes form under Harsh Sunlight/Sunny when it regains it", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.HARSH_SUN); + game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.HARSH_SUN); await game.classicMode.startBattle([Species.CHERRIM, Species.MAGIKARP]); diff --git a/src/test/abilities/forecast.test.ts b/src/test/abilities/forecast.test.ts index 78453c5f4d2..c1eb3600b8b 100644 --- a/src/test/abilities/forecast.test.ts +++ b/src/test/abilities/forecast.test.ts @@ -10,7 +10,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -67,7 +66,7 @@ describe("Abilities - Forecast", () => { game.override .moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.TACKLE]) .enemySpecies(Species.MAGIKARP) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH); }); @@ -229,7 +228,7 @@ describe("Abilities - Forecast", () => { }); it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.RAIN); + game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN); await game.startBattle([Species.CASTFORM, Species.PIKACHU]); const castform = game.scene.getPlayerPokemon()!; @@ -260,7 +259,7 @@ describe("Abilities - Forecast", () => { }); it("does not change Castform's form until after Stealth Rock deals damage", async () => { - game.override.weather(WeatherType.RAIN).enemyMoveset(Array(4).fill(Moves.STEALTH_ROCK)); + game.override.weather(WeatherType.RAIN).enemyMoveset([Moves.STEALTH_ROCK]); await game.startBattle([Species.PIKACHU, Species.CASTFORM]); // First turn - set up stealth rock diff --git a/src/test/abilities/galvanize.test.ts b/src/test/abilities/galvanize.test.ts index 4b0ddc14d7c..f81b854180a 100644 --- a/src/test/abilities/galvanize.test.ts +++ b/src/test/abilities/galvanize.test.ts @@ -6,7 +6,6 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { HitResult } from "#app/field/pokemon"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -36,7 +35,7 @@ describe("Abilities - Galvanize", () => { .moveset([Moves.TACKLE, Moves.REVELATION_DANCE, Moves.FURY_SWIPES]) .enemySpecies(Species.DUSCLOPS) .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyLevel(100); }); diff --git a/src/test/abilities/gulp_missile.test.ts b/src/test/abilities/gulp_missile.test.ts index 286c3af1c56..ac0efd8e8d1 100644 --- a/src/test/abilities/gulp_missile.test.ts +++ b/src/test/abilities/gulp_missile.test.ts @@ -11,7 +11,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { Stat } from "#enums/stat"; describe("Abilities - Gulp Missile", () => { @@ -49,7 +48,7 @@ describe("Abilities - Gulp Missile", () => { .moveset([Moves.SURF, Moves.DIVE, Moves.SPLASH]) .enemySpecies(Species.SNORLAX) .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyLevel(5); }); @@ -108,7 +107,7 @@ describe("Abilities - Gulp Missile", () => { }); it("deals 1/4 of the attacker's maximum HP when hit by a damaging attack", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle([Species.CRAMORANT]); const enemy = game.scene.getEnemyPokemon()!; @@ -121,7 +120,7 @@ describe("Abilities - Gulp Missile", () => { }); it("does not have any effect when hit by non-damaging attack", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TAIL_WHIP)); + game.override.enemyMoveset([Moves.TAIL_WHIP]); await game.startBattle([Species.CRAMORANT]); const cramorant = game.scene.getPlayerPokemon()!; @@ -140,7 +139,7 @@ describe("Abilities - Gulp Missile", () => { }); it("lowers attacker's DEF stat stage by 1 when hit in Gulping form", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle([Species.CRAMORANT]); const cramorant = game.scene.getPlayerPokemon()!; @@ -164,7 +163,7 @@ describe("Abilities - Gulp Missile", () => { }); it("paralyzes the enemy when hit in Gorging form", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle([Species.CRAMORANT]); const cramorant = game.scene.getPlayerPokemon()!; @@ -188,7 +187,7 @@ describe("Abilities - Gulp Missile", () => { }); it("does not activate the ability when underwater", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SURF)); + game.override.enemyMoveset([Moves.SURF]); await game.startBattle([Species.CRAMORANT]); const cramorant = game.scene.getPlayerPokemon()!; @@ -201,7 +200,7 @@ describe("Abilities - Gulp Missile", () => { }); it("prevents effect damage but inflicts secondary effect on attacker with Magic Guard", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)).enemyAbility(Abilities.MAGIC_GUARD); + game.override.enemyMoveset([Moves.TACKLE]).enemyAbility(Abilities.MAGIC_GUARD); await game.startBattle([Species.CRAMORANT]); const cramorant = game.scene.getPlayerPokemon()!; @@ -225,7 +224,7 @@ describe("Abilities - Gulp Missile", () => { }); it("cannot be suppressed", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)); + game.override.enemyMoveset([Moves.GASTRO_ACID]); await game.startBattle([Species.CRAMORANT]); const cramorant = game.scene.getPlayerPokemon()!; @@ -245,7 +244,7 @@ describe("Abilities - Gulp Missile", () => { }); it("cannot be swapped with another ability", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP)); + game.override.enemyMoveset([Moves.SKILL_SWAP]); await game.startBattle([Species.CRAMORANT]); const cramorant = game.scene.getPlayerPokemon()!; diff --git a/src/test/abilities/heatproof.test.ts b/src/test/abilities/heatproof.test.ts index e2a558e6d99..61c406201bd 100644 --- a/src/test/abilities/heatproof.test.ts +++ b/src/test/abilities/heatproof.test.ts @@ -5,7 +5,6 @@ import { toDmgValue } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -30,7 +29,7 @@ describe("Abilities - Heatproof", () => { .disableCrits() .enemySpecies(Species.CHARMANDER) .enemyAbility(Abilities.HEATPROOF) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyLevel(100) .starterSpecies(Species.CHANDELURE) .ability(Abilities.BALL_FETCH) diff --git a/src/test/abilities/hustle.test.ts b/src/test/abilities/hustle.test.ts index ff96b98c7ac..29cbfdc1a5d 100644 --- a/src/test/abilities/hustle.test.ts +++ b/src/test/abilities/hustle.test.ts @@ -4,7 +4,6 @@ import { Stat } from "#app/enums/stat"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -29,7 +28,7 @@ describe("Abilities - Hustle", () => { .moveset([ Moves.TACKLE, Moves.GIGA_DRAIN, Moves.FISSURE ]) .disableCrits() .battleType("single") - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemySpecies(Species.SHUCKLE) .enemyAbility(Abilities.BALL_FETCH); }); diff --git a/src/test/abilities/hyper_cutter.test.ts b/src/test/abilities/hyper_cutter.test.ts index 64e04ac2fd3..ec947add939 100644 --- a/src/test/abilities/hyper_cutter.test.ts +++ b/src/test/abilities/hyper_cutter.test.ts @@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -29,7 +28,7 @@ describe("Abilities - Hyper Cutter", () => { .ability(Abilities.BALL_FETCH) .enemySpecies(Species.SHUCKLE) .enemyAbility(Abilities.HYPER_CUTTER) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability) diff --git a/src/test/abilities/imposter.test.ts b/src/test/abilities/imposter.test.ts index 2857f80632a..27673564aaa 100644 --- a/src/test/abilities/imposter.test.ts +++ b/src/test/abilities/imposter.test.ts @@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { Abilities } from "#enums/abilities"; -import { SPLASH_ONLY } from "../utils/testUtils"; // TODO: Add more tests once Imposter is fully implemented describe("Abilities - Imposter", () => { @@ -31,9 +30,9 @@ describe("Abilities - Imposter", () => { .enemyLevel(200) .enemyAbility(Abilities.BEAST_BOOST) .enemyPassiveAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .ability(Abilities.IMPOSTER) - .moveset(SPLASH_ONLY); + .moveset(Moves.SPLASH); }); it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => { @@ -77,7 +76,7 @@ describe("Abilities - Imposter", () => { }, 20000); it("should copy in-battle overridden stats", async () => { - game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT)); + game.override.enemyMoveset([Moves.POWER_SPLIT]); await game.startBattle([ Species.DITTO diff --git a/src/test/abilities/intimidate.test.ts b/src/test/abilities/intimidate.test.ts index f90ba6c0e1e..d4c097022df 100644 --- a/src/test/abilities/intimidate.test.ts +++ b/src/test/abilities/intimidate.test.ts @@ -7,7 +7,6 @@ import { getMovePosition } from "#test/utils/gameManagerUtils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; describe("Abilities - Intimidate", () => { let phaserGame: Phaser.Game; @@ -31,7 +30,7 @@ describe("Abilities - Intimidate", () => { .enemyPassiveAbility(Abilities.HYDRATION) .ability(Abilities.INTIMIDATE) .startingWave(3) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("should lower ATK stat stage by 1 of enemy Pokemon on entry and player switch", async () => { @@ -108,7 +107,7 @@ describe("Abilities - Intimidate", () => { it("should lower ATK stat stage by 1 for every switch", async () => { game.override.moveset([Moves.SPLASH]) - .enemyMoveset(new Array(4).fill(Moves.VOLT_SWITCH)) + .enemyMoveset([Moves.VOLT_SWITCH]) .startingWave(5); await game.classicMode.startBattle([ Species.MIGHTYENA, Species.POOCHYENA ]); diff --git a/src/test/abilities/libero.test.ts b/src/test/abilities/libero.test.ts index 7895e7de6bf..51f182d5401 100644 --- a/src/test/abilities/libero.test.ts +++ b/src/test/abilities/libero.test.ts @@ -9,7 +9,6 @@ import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; @@ -183,7 +182,7 @@ describe("Abilities - Libero", () => { "ability applies correctly even if the pokemon's move misses", async () => { game.override.moveset([Moves.TACKLE]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([Species.MAGIKARP]); diff --git a/src/test/abilities/magic_guard.test.ts b/src/test/abilities/magic_guard.test.ts index 64c1746c7d9..4b3fb0ba985 100644 --- a/src/test/abilities/magic_guard.test.ts +++ b/src/test/abilities/magic_guard.test.ts @@ -8,7 +8,6 @@ import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -39,7 +38,7 @@ describe("Abilities - Magic Guard", () => { /** Enemy Pokemon overrides */ game.override.enemySpecies(Species.SNORLAX); game.override.enemyAbility(Abilities.INSOMNIA); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyLevel(100); }); diff --git a/src/test/abilities/moody.test.ts b/src/test/abilities/moody.test.ts index 5c46ea68ec5..166f69b0fe3 100644 --- a/src/test/abilities/moody.test.ts +++ b/src/test/abilities/moody.test.ts @@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -29,8 +28,8 @@ describe("Abilities - Moody", () => { .enemySpecies(Species.RATTATA) .enemyAbility(Abilities.BALL_FETCH) .ability(Abilities.MOODY) - .enemyMoveset(SPLASH_ONLY) - .moveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH) + .moveset(Moves.SPLASH); }); it("should increase one stat stage by 2 and decrease a different stat stage by 1", diff --git a/src/test/abilities/moxie.test.ts b/src/test/abilities/moxie.test.ts index e713d78f39e..5f337fedabb 100644 --- a/src/test/abilities/moxie.test.ts +++ b/src/test/abilities/moxie.test.ts @@ -5,7 +5,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { BattlerIndex } from "#app/battle"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { VictoryPhase } from "#app/phases/victory-phase"; @@ -34,7 +33,7 @@ describe("Abilities - Moxie", () => { game.override.ability(Abilities.MOXIE); game.override.startingLevel(2000); game.override.moveset([ moveToUse ]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("should raise ATK stat stage by 1 when winning a battle", async() => { diff --git a/src/test/abilities/parental_bond.test.ts b/src/test/abilities/parental_bond.test.ts index 81a30524a5e..2ad3f9e3f5c 100644 --- a/src/test/abilities/parental_bond.test.ts +++ b/src/test/abilities/parental_bond.test.ts @@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -34,7 +33,7 @@ describe("Abilities - Parental Bond", () => { game.override.ability(Abilities.PARENTAL_BOND); game.override.enemySpecies(Species.SNORLAX); game.override.enemyAbility(Abilities.FUR_COAT); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.startingLevel(100); game.override.enemyLevel(100); }); @@ -175,7 +174,7 @@ describe("Abilities - Parental Bond", () => { "should not apply multiplier to counter moves", async () => { game.override.moveset([Moves.COUNTER]); - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.classicMode.startBattle([Species.SHUCKLE]); @@ -465,7 +464,7 @@ describe("Abilities - Parental Bond", () => { "should not cause user to hit into King's Shield more than once", async () => { game.override.moveset([Moves.TACKLE]); - game.override.enemyMoveset(Array(4).fill(Moves.KINGS_SHIELD)); + game.override.enemyMoveset([Moves.KINGS_SHIELD]); await game.classicMode.startBattle([Species.MAGIKARP]); diff --git a/src/test/abilities/pastel_veil.test.ts b/src/test/abilities/pastel_veil.test.ts index ba90c7e3b3f..31490aab143 100644 --- a/src/test/abilities/pastel_veil.test.ts +++ b/src/test/abilities/pastel_veil.test.ts @@ -8,7 +8,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Abilities - Pastel Veil", () => { let phaserGame: Phaser.Game; @@ -31,7 +30,7 @@ describe("Abilities - Pastel Veil", () => { .moveset([Moves.TOXIC_THREAD, Moves.SPLASH]) .enemyAbility(Abilities.BALL_FETCH) .enemySpecies(Species.SUNKERN) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("prevents the user and its allies from being afflicted by poison", async () => { diff --git a/src/test/abilities/power_spot.test.ts b/src/test/abilities/power_spot.test.ts index b83284c0bac..6d349a1a3f9 100644 --- a/src/test/abilities/power_spot.test.ts +++ b/src/test/abilities/power_spot.test.ts @@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -29,7 +28,7 @@ describe("Abilities - Power Spot", () => { game = new GameManager(phaserGame); game.override.battleType("double"); game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemySpecies(Species.SHUCKLE); game.override.enemyAbility(Abilities.BALL_FETCH); }); diff --git a/src/test/abilities/protean.test.ts b/src/test/abilities/protean.test.ts index 6ecabbfade0..4be58a677a6 100644 --- a/src/test/abilities/protean.test.ts +++ b/src/test/abilities/protean.test.ts @@ -9,7 +9,6 @@ import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; @@ -183,7 +182,7 @@ describe("Abilities - Protean", () => { "ability applies correctly even if the pokemon's move misses", async () => { game.override.moveset([Moves.TACKLE]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([Species.MAGIKARP]); diff --git a/src/test/abilities/quick_draw.test.ts b/src/test/abilities/quick_draw.test.ts index 00d344ed333..a02ee5cf56a 100644 --- a/src/test/abilities/quick_draw.test.ts +++ b/src/test/abilities/quick_draw.test.ts @@ -32,7 +32,7 @@ describe("Abilities - Quick Draw", () => { game.override.enemyLevel(100); game.override.enemySpecies(Species.MAGIKARP); game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); vi.spyOn(allAbilities[Abilities.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue(100); }); @@ -76,7 +76,7 @@ describe("Abilities - Quick Draw", () => { ); test("does not increase priority", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.EXTREME_SPEED)); + game.override.enemyMoveset([Moves.EXTREME_SPEED]); await game.startBattle(); diff --git a/src/test/abilities/sand_spit.test.ts b/src/test/abilities/sand_spit.test.ts index 041e20faf7f..add13ede296 100644 --- a/src/test/abilities/sand_spit.test.ts +++ b/src/test/abilities/sand_spit.test.ts @@ -35,7 +35,7 @@ describe("Abilities - Sand Spit", () => { }); it("should trigger when hit with damaging move", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle(); game.move.select(Moves.SPLASH); @@ -45,7 +45,7 @@ describe("Abilities - Sand Spit", () => { }, 20000); it("should not trigger when targetted with status moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); + game.override.enemyMoveset([Moves.GROWL]); await game.startBattle(); game.move.select(Moves.COIL); diff --git a/src/test/abilities/sap_sipper.test.ts b/src/test/abilities/sap_sipper.test.ts index 2d70ede3530..5e8cac74c95 100644 --- a/src/test/abilities/sap_sipper.test.ts +++ b/src/test/abilities/sap_sipper.test.ts @@ -9,7 +9,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; // See also: TypeImmunityAbAttr describe("Abilities - Sap Sipper", () => { @@ -37,7 +36,7 @@ describe("Abilities - Sap Sipper", () => { const enemyAbility = Abilities.SAP_SIPPER; game.override.moveset([ moveToUse ]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemySpecies(Species.DUSKULL); game.override.enemyAbility(enemyAbility); @@ -59,7 +58,7 @@ describe("Abilities - Sap Sipper", () => { const enemyAbility = Abilities.SAP_SIPPER; game.override.moveset([ moveToUse ]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(enemyAbility); @@ -80,7 +79,7 @@ describe("Abilities - Sap Sipper", () => { const enemyAbility = Abilities.SAP_SIPPER; game.override.moveset([ moveToUse ]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(enemyAbility); @@ -100,7 +99,7 @@ describe("Abilities - Sap Sipper", () => { const enemyAbility = Abilities.SAP_SIPPER; game.override.moveset([ moveToUse ]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(enemyAbility); @@ -123,7 +122,7 @@ describe("Abilities - Sap Sipper", () => { game.override.moveset([ moveToUse ]); game.override.ability(ability); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemySpecies(Species.RATTATA); game.override.enemyAbility(Abilities.NONE); diff --git a/src/test/abilities/simple.test.ts b/src/test/abilities/simple.test.ts index 4310c5d45d1..e5ca474d7c3 100644 --- a/src/test/abilities/simple.test.ts +++ b/src/test/abilities/simple.test.ts @@ -1,10 +1,10 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import { Moves } from "#app/enums/moves"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Abilities - Simple", () => { let phaserGame: Phaser.Game; @@ -27,7 +27,7 @@ describe("Abilities - Simple", () => { .enemySpecies(Species.BULBASAUR) .enemyAbility(Abilities.SIMPLE) .ability(Abilities.INTIMIDATE) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("should double stat changes when applied", async() => { diff --git a/src/test/abilities/steely_spirit.test.ts b/src/test/abilities/steely_spirit.test.ts index 7aaa0a42ae3..7b5879555be 100644 --- a/src/test/abilities/steely_spirit.test.ts +++ b/src/test/abilities/steely_spirit.test.ts @@ -4,7 +4,6 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -31,7 +30,7 @@ describe("Abilities - Steely Spirit", () => { game.override.enemySpecies(Species.SHUCKLE); game.override.enemyAbility(Abilities.BALL_FETCH); game.override.moveset([Moves.IRON_HEAD, Moves.SPLASH]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); vi.spyOn(allMoves[moveToCheck], "calculateBattlePower"); }); diff --git a/src/test/abilities/sweet_veil.test.ts b/src/test/abilities/sweet_veil.test.ts index 5de3c7285a9..c2946443245 100644 --- a/src/test/abilities/sweet_veil.test.ts +++ b/src/test/abilities/sweet_veil.test.ts @@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -45,7 +44,7 @@ describe("Abilities - Sweet Veil", () => { }); it("causes Rest to fail when used by the user or its allies", async () => { - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); game.move.select(Moves.SPLASH); @@ -72,7 +71,7 @@ describe("Abilities - Sweet Veil", () => { game.override.enemySpecies(Species.PIKACHU); game.override.enemyLevel(5); game.override.startingLevel(5); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]); diff --git a/src/test/abilities/tera_shell.test.ts b/src/test/abilities/tera_shell.test.ts index 6a6b7bb252b..2826469f3bf 100644 --- a/src/test/abilities/tera_shell.test.ts +++ b/src/test/abilities/tera_shell.test.ts @@ -30,7 +30,7 @@ describe("Abilities - Tera Shell", () => { .moveset([Moves.SPLASH]) .enemySpecies(Species.SNORLAX) .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(Array(4).fill(Moves.MACH_PUNCH)) + .enemyMoveset([Moves.MACH_PUNCH]) .startingLevel(100) .enemyLevel(100); }); @@ -60,7 +60,7 @@ describe("Abilities - Tera Shell", () => { it( "should not override type immunities", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); + game.override.enemyMoveset([Moves.SHADOW_SNEAK]); await game.classicMode.startBattle([Species.SNORLAX]); @@ -77,7 +77,7 @@ describe("Abilities - Tera Shell", () => { it( "should not override type multipliers less than 0.5x", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.QUICK_ATTACK)); + game.override.enemyMoveset([Moves.QUICK_ATTACK]); await game.classicMode.startBattle([Species.AGGRON]); @@ -94,7 +94,7 @@ describe("Abilities - Tera Shell", () => { it( "should not affect the effectiveness of fixed-damage moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.DRAGON_RAGE)); + game.override.enemyMoveset([Moves.DRAGON_RAGE]); await game.classicMode.startBattle([Species.CHARIZARD]); diff --git a/src/test/abilities/wind_power.test.ts b/src/test/abilities/wind_power.test.ts index c944e01b43a..12b8d2f2299 100644 --- a/src/test/abilities/wind_power.test.ts +++ b/src/test/abilities/wind_power.test.ts @@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -28,7 +27,7 @@ describe("Abilities - Wind Power", () => { game.override.enemySpecies(Species.SHIFTRY); game.override.enemyAbility(Abilities.WIND_POWER); game.override.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("it becomes charged when hit by wind moves", async () => { diff --git a/src/test/abilities/wind_rider.test.ts b/src/test/abilities/wind_rider.test.ts index 7a1fee6794a..c917f56e101 100644 --- a/src/test/abilities/wind_rider.test.ts +++ b/src/test/abilities/wind_rider.test.ts @@ -3,7 +3,6 @@ import GameManager from "#test/utils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -28,7 +27,7 @@ describe("Abilities - Wind Rider", () => { .enemySpecies(Species.SHIFTRY) .enemyAbility(Abilities.WIND_RIDER) .moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("takes no damage from wind moves and its ATK stat stage is raised by 1 when hit by one", async () => { diff --git a/src/test/abilities/wonder_skin.test.ts b/src/test/abilities/wonder_skin.test.ts index 0c2aedc8ce8..6ef985fbd42 100644 --- a/src/test/abilities/wonder_skin.test.ts +++ b/src/test/abilities/wonder_skin.test.ts @@ -5,7 +5,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -30,7 +29,7 @@ describe("Abilities - Wonder Skin", () => { game.override.ability(Abilities.BALL_FETCH); game.override.enemySpecies(Species.SHUCKLE); game.override.enemyAbility(Abilities.WONDER_SKIN); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("lowers accuracy of status moves to 50%", async () => { diff --git a/src/test/abilities/zero_to_hero.test.ts b/src/test/abilities/zero_to_hero.test.ts index 1a9697f974e..eafc32b4c79 100644 --- a/src/test/abilities/zero_to_hero.test.ts +++ b/src/test/abilities/zero_to_hero.test.ts @@ -6,7 +6,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -30,8 +29,8 @@ describe("Abilities - ZERO TO HERO", () => { game = new GameManager(phaserGame); game.override .battleType("single") - .moveset(SPLASH_ONLY) - .enemyMoveset(SPLASH_ONLY) + .moveset(Moves.SPLASH) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH); }); diff --git a/src/test/arena/arena_gravity.test.ts b/src/test/arena/arena_gravity.test.ts index eda8c687ba1..47b8bf4cf70 100644 --- a/src/test/arena/arena_gravity.test.ts +++ b/src/test/arena/arena_gravity.test.ts @@ -8,7 +8,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Arena - Gravity", () => { let phaserGame: Phaser.Game; @@ -32,7 +31,7 @@ describe("Arena - Gravity", () => { .ability(Abilities.UNNERVE) .enemyAbility(Abilities.BALL_FETCH) .enemySpecies(Species.SHUCKLE) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); // Reference: https://bulbapedia.bulbagarden.net/wiki/Gravity_(move) diff --git a/src/test/arena/weather_fog.test.ts b/src/test/arena/weather_fog.test.ts index b36b0de2e06..b47145e8dd0 100644 --- a/src/test/arena/weather_fog.test.ts +++ b/src/test/arena/weather_fog.test.ts @@ -31,7 +31,7 @@ describe("Weather - Fog", () => { game.override.ability(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH)); + game.override.enemyMoveset([Moves.SPLASH]); }); it("move accuracy is multiplied by 90%", async () => { diff --git a/src/test/arena/weather_hail.test.ts b/src/test/arena/weather_hail.test.ts index 75125b3448c..31d20be2ded 100644 --- a/src/test/arena/weather_hail.test.ts +++ b/src/test/arena/weather_hail.test.ts @@ -4,7 +4,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { BattlerIndex } from "#app/battle"; describe("Weather - Hail", () => { @@ -26,8 +25,8 @@ describe("Weather - Hail", () => { game.override .weather(WeatherType.HAIL) .battleType("single") - .moveset(SPLASH_ONLY) - .enemyMoveset(SPLASH_ONLY) + .moveset(Moves.SPLASH) + .enemyMoveset(Moves.SPLASH) .enemySpecies(Species.MAGIKARP); }); diff --git a/src/test/arena/weather_sandstorm.test.ts b/src/test/arena/weather_sandstorm.test.ts index 978774ba4c1..91188de6985 100644 --- a/src/test/arena/weather_sandstorm.test.ts +++ b/src/test/arena/weather_sandstorm.test.ts @@ -4,7 +4,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Weather - Sandstorm", () => { let phaserGame: Phaser.Game; @@ -25,8 +24,8 @@ describe("Weather - Sandstorm", () => { game.override .weather(WeatherType.SANDSTORM) .battleType("single") - .moveset(SPLASH_ONLY) - .enemyMoveset(SPLASH_ONLY) + .moveset(Moves.SPLASH) + .enemyMoveset(Moves.SPLASH) .enemySpecies(Species.MAGIKARP); }); diff --git a/src/test/battle/battle.test.ts b/src/test/battle/battle.test.ts index 25dfbc765bd..6e15bbd99d9 100644 --- a/src/test/battle/battle.test.ts +++ b/src/test/battle/battle.test.ts @@ -25,7 +25,6 @@ import { PlayerGender } from "#enums/player-gender"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Test Battle Phase", () => { let phaserGame: Phaser.Game; @@ -319,7 +318,7 @@ describe("Test Battle Phase", () => { .startingWave(1) .startingLevel(100) .moveset([moveToUse]) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .startingHeldItems([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]); await game.startBattle(); diff --git a/src/test/battle/damage_calculation.test.ts b/src/test/battle/damage_calculation.test.ts index 9c7c9dc9d3e..89f2bb4c269 100644 --- a/src/test/battle/damage_calculation.test.ts +++ b/src/test/battle/damage_calculation.test.ts @@ -5,7 +5,6 @@ import { ArenaTagType } from "#enums/arena-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -31,7 +30,7 @@ describe("Round Down and Minimun 1 test in Damage Calculation", () => { it("When the user fails to use Jump Kick with Wonder Guard ability, the damage should be 1.", async () => { game.override.enemySpecies(Species.GASTLY); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.starterSpecies(Species.SHEDINJA); game.override.moveset([Moves.JUMP_KICK]); game.override.ability(Abilities.WONDER_GUARD); diff --git a/src/test/battle/double_battle.test.ts b/src/test/battle/double_battle.test.ts index d264a29ef9b..b7a5616d642 100644 --- a/src/test/battle/double_battle.test.ts +++ b/src/test/battle/double_battle.test.ts @@ -4,7 +4,6 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -29,7 +28,7 @@ describe("Double Battles", () => { // double-battle player's pokemon both fainted in same round, then revive one, and next double battle summons two player's pokemon successfully. // (There were bugs that either only summon one when can summon two, player stuck in switchPhase etc) it("3v2 edge case: player summons 2 pokemon on the next battle after being fainted and revived", async () => { - game.override.battleType("double").enemyMoveset(SPLASH_ONLY).moveset(SPLASH_ONLY); + game.override.battleType("double").enemyMoveset(Moves.SPLASH).moveset(Moves.SPLASH); await game.startBattle([ Species.BULBASAUR, Species.CHARIZARD, diff --git a/src/test/battle/inverse_battle.test.ts b/src/test/battle/inverse_battle.test.ts index 2a561a09e5e..d808f71addb 100644 --- a/src/test/battle/inverse_battle.test.ts +++ b/src/test/battle/inverse_battle.test.ts @@ -8,7 +8,6 @@ import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const TIMEOUT = 20 * 1000; @@ -38,7 +37,7 @@ describe("Inverse Battle", () => { .ability(Abilities.BALL_FETCH) .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("Immune types are 2x effective - Thunderbolt against Ground Type", async () => { diff --git a/src/test/boss-pokemon.test.ts b/src/test/boss-pokemon.test.ts index c6fc276551f..8a0a0e01617 100644 --- a/src/test/boss-pokemon.test.ts +++ b/src/test/boss-pokemon.test.ts @@ -2,7 +2,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import GameManager from "./utils/gameManager"; import { Species } from "#app/enums/species"; import { getPokemonSpecies } from "#app/data/pokemon-species"; -import { SPLASH_ONLY } from "./utils/testUtils"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { EFFECTIVE_STATS } from "#app/enums/stat"; @@ -33,7 +32,7 @@ describe("Boss Pokemon / Shields", () => { .disableTrainerWaves() .disableCrits() .enemySpecies(Species.RATTATA) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyHeldItems([]) .startingLevel(1000) .moveset([Moves.FALSE_SWIPE, Moves.SUPER_FANG, Moves.SPLASH]) diff --git a/src/test/evolution.test.ts b/src/test/evolution.test.ts index 9f0806b8e24..16922babd7c 100644 --- a/src/test/evolution.test.ts +++ b/src/test/evolution.test.ts @@ -6,7 +6,6 @@ import * as Utils from "#app/utils"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "./utils/testUtils"; describe("Evolution", () => { let phaserGame: Phaser.Game; @@ -99,7 +98,7 @@ describe("Evolution", () => { it("should increase both HP and max HP when evolving", async () => { game.override.moveset([Moves.SURF]) .enemySpecies(Species.GOLEM) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .startingWave(21) .startingLevel(16) .enemyLevel(50); @@ -126,7 +125,7 @@ describe("Evolution", () => { it("should not fully heal HP when evolving", async () => { game.override.moveset([Moves.SURF]) .enemySpecies(Species.GOLEM) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .startingWave(21) .startingLevel(13) .enemyLevel(30); diff --git a/src/test/final_boss.test.ts b/src/test/final_boss.test.ts index 5d006998a0b..fee4dc6c8f6 100644 --- a/src/test/final_boss.test.ts +++ b/src/test/final_boss.test.ts @@ -7,7 +7,6 @@ import { GameModes } from "#app/game-mode"; import { TurnHeldItemTransferModifier } from "#app/modifier/modifier"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import GameManager from "./utils/gameManager"; -import { SPLASH_ONLY } from "./utils/testUtils"; const FinalWave = { Classic: 200, @@ -29,7 +28,7 @@ describe("Final Boss", () => { .startingWave(FinalWave.Classic) .startingBiome(Biome.END) .disableCrits() - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .moveset([ Moves.SPLASH, Moves.WILL_O_WISP, Moves.DRAGON_PULSE ]) .startingLevel(10000); }); diff --git a/src/test/items/dire_hit.test.ts b/src/test/items/dire_hit.test.ts index 4b5988294f3..601552de7f1 100644 --- a/src/test/items/dire_hit.test.ts +++ b/src/test/items/dire_hit.test.ts @@ -4,7 +4,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { TempCritBoosterModifier } from "#app/modifier/modifier"; import { Mode } from "#app/ui/ui"; @@ -34,7 +33,7 @@ describe("Items - Dire Hit", () => { game.override .enemySpecies(Species.MAGIKARP) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .moveset([ Moves.POUND ]) .startingHeldItems([{ name: "DIRE_HIT" }]) .battleType("single") diff --git a/src/test/items/double_battle_chance_booster.test.ts b/src/test/items/double_battle_chance_booster.test.ts index 808d4c7ca51..f581af7afc5 100644 --- a/src/test/items/double_battle_chance_booster.test.ts +++ b/src/test/items/double_battle_chance_booster.test.ts @@ -4,7 +4,6 @@ import { DoubleBattleChanceBoosterModifier } from "#app/modifier/modifier"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js"; import { Mode } from "#app/ui/ui.js"; import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler.js"; @@ -64,7 +63,7 @@ describe("Items - Double Battle Chance Boosters", () => { game.override .startingModifier([{ name: "LURE" }]) .itemRewards([{ name: "LURE" }]) - .moveset(SPLASH_ONLY) + .moveset(Moves.SPLASH) .startingLevel(200); await game.classicMode.startBattle([ diff --git a/src/test/items/grip_claw.test.ts b/src/test/items/grip_claw.test.ts index 09afa9aea0b..d9871616449 100644 --- a/src/test/items/grip_claw.test.ts +++ b/src/test/items/grip_claw.test.ts @@ -8,7 +8,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import GameManager from "#test/utils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; // 20 seconds @@ -38,7 +37,7 @@ describe("Items - Grip Claw", () => { ]) .enemySpecies(Species.SNORLAX) .ability(Abilities.KLUTZ) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyHeldItems([ { name: "BERRY", type: BerryType.SITRUS, count: 2 }, { name: "BERRY", type: BerryType.LUM, count: 2 }, diff --git a/src/test/items/scope_lens.test.ts b/src/test/items/scope_lens.test.ts index c8629093ab5..e39517ceae9 100644 --- a/src/test/items/scope_lens.test.ts +++ b/src/test/items/scope_lens.test.ts @@ -4,7 +4,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Items - Scope Lens", () => { let phaserGame: Phaser.Game; @@ -25,7 +24,7 @@ describe("Items - Scope Lens", () => { game.override .enemySpecies(Species.MAGIKARP) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .moveset([ Moves.POUND ]) .startingHeldItems([{ name: "SCOPE_LENS" }]) .battleType("single") diff --git a/src/test/items/temp_stat_stage_booster.test.ts b/src/test/items/temp_stat_stage_booster.test.ts index 3e32fa13a04..6186799623a 100644 --- a/src/test/items/temp_stat_stage_booster.test.ts +++ b/src/test/items/temp_stat_stage_booster.test.ts @@ -5,7 +5,6 @@ import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { Moves } from "#app/enums/moves"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { Abilities } from "#app/enums/abilities"; import { TempStatStageBoosterModifier } from "#app/modifier/modifier"; import { Mode } from "#app/ui/ui"; @@ -34,7 +33,7 @@ describe("Items - Temporary Stat Stage Boosters", () => { game.override .battleType("single") .enemySpecies(Species.SHUCKLE) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH) .moveset([ Moves.TACKLE, Moves.SPLASH, Moves.HONE_CLAWS, Moves.BELLY_DRUM ]) .startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]); diff --git a/src/test/moves/alluring_voice.test.ts b/src/test/moves/alluring_voice.test.ts index 9807d1bce85..b438d0f736a 100644 --- a/src/test/moves/alluring_voice.test.ts +++ b/src/test/moves/alluring_voice.test.ts @@ -31,7 +31,7 @@ describe("Moves - Alluring Voice", () => { .disableCrits() .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.ICE_SCALES) - .enemyMoveset(Array(4).fill(Moves.HOWL)) + .enemyMoveset([Moves.HOWL]) .startingLevel(10) .enemyLevel(10) .starterSpecies(Species.FEEBAS) diff --git a/src/test/moves/baton_pass.test.ts b/src/test/moves/baton_pass.test.ts index 1a4edafdd36..5643efceae2 100644 --- a/src/test/moves/baton_pass.test.ts +++ b/src/test/moves/baton_pass.test.ts @@ -5,7 +5,6 @@ import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -31,7 +30,7 @@ describe("Moves - Baton Pass", () => { .enemyAbility(Abilities.BALL_FETCH) .moveset([Moves.BATON_PASS, Moves.NASTY_PLOT, Moves.SPLASH]) .ability(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .disableCrits(); }); @@ -71,7 +70,10 @@ describe("Moves - Baton Pass", () => { // round 2 - baton pass game.scene.getEnemyPokemon()!.hp = 100; - game.override.enemyMoveset(new Array(4).fill(Moves.BATON_PASS)); + game.override.enemyMoveset([Moves.BATON_PASS]); + // Force moveset to update mid-battle + // TODO: replace with enemy ai control function when it's added + game.scene.getEnemyParty()[0].getMoveset(); game.move.select(Moves.SPLASH); await game.phaseInterceptor.to("PostSummonPhase", false); @@ -90,7 +92,7 @@ describe("Moves - Baton Pass", () => { }, 20000); it("doesn't transfer effects that aren't transferrable", async() => { - game.override.enemyMoveset(Array(4).fill(Moves.SALT_CURE)); + game.override.enemyMoveset([Moves.SALT_CURE]); await game.classicMode.startBattle([Species.PIKACHU, Species.FEEBAS]); const [player1, player2] = game.scene.getParty(); diff --git a/src/test/moves/beak_blast.test.ts b/src/test/moves/beak_blast.test.ts index 2a93dc00a54..fe748c87826 100644 --- a/src/test/moves/beak_blast.test.ts +++ b/src/test/moves/beak_blast.test.ts @@ -34,7 +34,7 @@ describe("Moves - Beak Blast", () => { .moveset([Moves.BEAK_BLAST]) .enemySpecies(Species.SNORLAX) .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(Array(4).fill(Moves.TACKLE)) + .enemyMoveset([Moves.TACKLE]) .startingLevel(100) .enemyLevel(100); }); @@ -80,7 +80,7 @@ describe("Moves - Beak Blast", () => { it( "should not burn attackers that don't make contact", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.WATER_GUN)); + game.override.enemyMoveset([Moves.WATER_GUN]); await game.startBattle([Species.BLASTOISE]); @@ -116,7 +116,7 @@ describe("Moves - Beak Blast", () => { it( "should be blocked by Protect", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.PROTECT)); + game.override.enemyMoveset([Moves.PROTECT]); await game.startBattle([Species.BLASTOISE]); diff --git a/src/test/moves/beat_up.test.ts b/src/test/moves/beat_up.test.ts index ce1598a49b4..70b33f56583 100644 --- a/src/test/moves/beat_up.test.ts +++ b/src/test/moves/beat_up.test.ts @@ -29,7 +29,7 @@ describe("Moves - Beat Up", () => { game.override.enemySpecies(Species.SNORLAX); game.override.enemyLevel(100); - game.override.enemyMoveset(Array(4).fill(Moves.SPLASH)); + game.override.enemyMoveset([Moves.SPLASH]); game.override.enemyAbility(Abilities.INSOMNIA); game.override.startingLevel(100); diff --git a/src/test/moves/belly_drum.test.ts b/src/test/moves/belly_drum.test.ts index 7024deb3f18..3d85c59a2a5 100644 --- a/src/test/moves/belly_drum.test.ts +++ b/src/test/moves/belly_drum.test.ts @@ -6,7 +6,6 @@ import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { Abilities } from "#app/enums/abilities"; const TIMEOUT = 20 * 1000; @@ -37,7 +36,7 @@ describe("Moves - BELLY DRUM", () => { .startingLevel(100) .enemyLevel(100) .moveset([Moves.BELLY_DRUM]) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH); }); diff --git a/src/test/moves/burning_jealousy.test.ts b/src/test/moves/burning_jealousy.test.ts index 2cb6a0bc52a..3f2bf453684 100644 --- a/src/test/moves/burning_jealousy.test.ts +++ b/src/test/moves/burning_jealousy.test.ts @@ -7,7 +7,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -32,7 +31,7 @@ describe("Moves - Burning Jealousy", () => { .disableCrits() .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.ICE_SCALES) - .enemyMoveset(Array(4).fill(Moves.HOWL)) + .enemyMoveset([Moves.HOWL]) .startingLevel(10) .enemyLevel(10) .starterSpecies(Species.FEEBAS) @@ -73,7 +72,7 @@ describe("Moves - Burning Jealousy", () => { game.override .enemySpecies(Species.DITTO) .enemyAbility(Abilities.IMPOSTER) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; @@ -91,7 +90,7 @@ describe("Moves - Burning Jealousy", () => { it("should be boosted by Sheer Force even if opponent didn't raise stat stages", async () => { game.override .ability(Abilities.SHEER_FORCE) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); vi.spyOn(allMoves[Moves.BURNING_JEALOUSY], "calculateBattlePower"); await game.classicMode.startBattle(); diff --git a/src/test/moves/clangorous_soul.test.ts b/src/test/moves/clangorous_soul.test.ts index 9bd3bc2379e..015b73b4dab 100644 --- a/src/test/moves/clangorous_soul.test.ts +++ b/src/test/moves/clangorous_soul.test.ts @@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; const TIMEOUT = 20 * 1000; /** HP Cost of Move */ @@ -34,7 +33,7 @@ describe("Moves - Clangorous Soul", () => { game.override.startingLevel(100); game.override.enemyLevel(100); game.override.moveset([Moves.CLANGOROUS_SOUL]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move) diff --git a/src/test/moves/crafty_shield.test.ts b/src/test/moves/crafty_shield.test.ts index e73a1fd256d..7b962518944 100644 --- a/src/test/moves/crafty_shield.test.ts +++ b/src/test/moves/crafty_shield.test.ts @@ -33,7 +33,7 @@ describe("Moves - Crafty Shield", () => { game.override.moveset([Moves.CRAFTY_SHIELD, Moves.SPLASH, Moves.SWORDS_DANCE]); game.override.enemySpecies(Species.SNORLAX); - game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); + game.override.enemyMoveset([Moves.GROWL]); game.override.enemyAbility(Abilities.INSOMNIA); game.override.startingLevel(100); @@ -62,7 +62,7 @@ describe("Moves - Crafty Shield", () => { test( "should not protect the user and allies from attack moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); @@ -84,7 +84,7 @@ describe("Moves - Crafty Shield", () => { "should protect the user and allies from moves that ignore other protection", async () => { game.override.enemySpecies(Species.DUSCLOPS); - game.override.enemyMoveset(Array(4).fill(Moves.CURSE)); + game.override.enemyMoveset([Moves.CURSE]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); diff --git a/src/test/moves/disable.test.ts b/src/test/moves/disable.test.ts index 3d207035ce3..a35d294e91f 100644 --- a/src/test/moves/disable.test.ts +++ b/src/test/moves/disable.test.ts @@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Disable", () => { @@ -28,7 +27,7 @@ describe("Moves - Disable", () => { .ability(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH) .moveset([Moves.DISABLE, Moves.SPLASH]) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .starterSpecies(Species.PIKACHU) .enemySpecies(Species.SHUCKLE); }); @@ -79,7 +78,7 @@ describe("Moves - Disable", () => { }, 20000); it("cannot disable STRUGGLE", async() => { - game.override.enemyMoveset(Array(4).fill(Moves.STRUGGLE)); + game.override.enemyMoveset([Moves.STRUGGLE]); await game.classicMode.startBattle(); const playerMon = game.scene.getPlayerPokemon()!; @@ -114,7 +113,7 @@ describe("Moves - Disable", () => { }, 20000); it("disables NATURE POWER, not the move invoked by it", async() => { - game.override.enemyMoveset(Array(4).fill(Moves.NATURE_POWER)); + game.override.enemyMoveset([Moves.NATURE_POWER]); await game.classicMode.startBattle(); const enemyMon = game.scene.getEnemyPokemon()!; diff --git a/src/test/moves/dragon_cheer.test.ts b/src/test/moves/dragon_cheer.test.ts index 747d71bd000..0fc389ccfb6 100644 --- a/src/test/moves/dragon_cheer.test.ts +++ b/src/test/moves/dragon_cheer.test.ts @@ -4,7 +4,6 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { Abilities } from "#enums/abilities"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -28,7 +27,7 @@ describe("Moves - Dragon Cheer", () => { game.override .battleType("double") .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyLevel(20) .moveset([Moves.DRAGON_CHEER, Moves.TACKLE, Moves.SPLASH]); }); diff --git a/src/test/moves/dragon_rage.test.ts b/src/test/moves/dragon_rage.test.ts index 5da6e082ce5..cab8c3f808b 100644 --- a/src/test/moves/dragon_rage.test.ts +++ b/src/test/moves/dragon_rage.test.ts @@ -8,7 +8,6 @@ import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -42,7 +41,7 @@ describe("Moves - Dragon Rage", () => { game.override.startingLevel(100); game.override.enemySpecies(Species.SNORLAX); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyPassiveAbility(Abilities.BALL_FETCH); game.override.enemyLevel(100); diff --git a/src/test/moves/dragon_tail.test.ts b/src/test/moves/dragon_tail.test.ts index 362383e2fe3..e1af29b2db1 100644 --- a/src/test/moves/dragon_tail.test.ts +++ b/src/test/moves/dragon_tail.test.ts @@ -9,7 +9,6 @@ import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import GameManager from "../utils/gameManager"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -32,7 +31,7 @@ describe("Moves - Dragon Tail", () => { game.override.battleType("single") .moveset([Moves.DRAGON_TAIL, Moves.SPLASH]) .enemySpecies(Species.WAILORD) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .startingLevel(5) .enemyLevel(5); @@ -82,7 +81,7 @@ describe("Moves - Dragon Tail", () => { test( "Double battles should proceed without crashing", async () => { - game.override.battleType("double").enemyMoveset(SPLASH_ONLY); + game.override.battleType("double").enemyMoveset(Moves.SPLASH); game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER]) .enemyAbility(Abilities.ROUGH_SKIN); await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]); @@ -116,7 +115,7 @@ describe("Moves - Dragon Tail", () => { test( "Flee move redirection works", async () => { - game.override.battleType("double").enemyMoveset(SPLASH_ONLY); + game.override.battleType("double").enemyMoveset(Moves.SPLASH); game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER]); game.override.enemyAbility(Abilities.ROUGH_SKIN); await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]); diff --git a/src/test/moves/fake_out.test.ts b/src/test/moves/fake_out.test.ts index ac09917daea..04d6216b952 100644 --- a/src/test/moves/fake_out.test.ts +++ b/src/test/moves/fake_out.test.ts @@ -3,7 +3,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Fake Out", () => { let phaserGame: Phaser.Game; @@ -26,7 +25,7 @@ describe("Moves - Fake Out", () => { .enemySpecies(Species.CORVIKNIGHT) .starterSpecies(Species.FEEBAS) .moveset([Moves.FAKE_OUT, Moves.SPLASH]) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .disableCrits(); }); diff --git a/src/test/moves/fillet_away.test.ts b/src/test/moves/fillet_away.test.ts index a639a86c5c1..68ace42c2ec 100644 --- a/src/test/moves/fillet_away.test.ts +++ b/src/test/moves/fillet_away.test.ts @@ -4,7 +4,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; @@ -35,7 +34,7 @@ describe("Moves - FILLET AWAY", () => { game.override.startingLevel(100); game.override.enemyLevel(100); game.override.moveset([Moves.FILLET_AWAY]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move) diff --git a/src/test/moves/fissure.test.ts b/src/test/moves/fissure.test.ts index 34612d1fb18..8689ce4079e 100644 --- a/src/test/moves/fissure.test.ts +++ b/src/test/moves/fissure.test.ts @@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -38,7 +37,7 @@ describe("Moves - Fissure", () => { game.override.startingLevel(100); game.override.enemySpecies(Species.SNORLAX); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyPassiveAbility(Abilities.BALL_FETCH); game.override.enemyLevel(100); diff --git a/src/test/moves/flame_burst.test.ts b/src/test/moves/flame_burst.test.ts index 2777b8178b8..b2858af2b24 100644 --- a/src/test/moves/flame_burst.test.ts +++ b/src/test/moves/flame_burst.test.ts @@ -42,7 +42,7 @@ describe("Moves - Flame Burst", () => { game.override.startingWave(4); game.override.enemySpecies(Species.SHUCKLE); game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH)); + game.override.enemyMoveset([Moves.SPLASH]); }); it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => { diff --git a/src/test/moves/flower_shield.test.ts b/src/test/moves/flower_shield.test.ts index ffe8ae995d3..f5fe8d532cc 100644 --- a/src/test/moves/flower_shield.test.ts +++ b/src/test/moves/flower_shield.test.ts @@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -31,7 +30,7 @@ describe("Moves - Flower Shield", () => { game.override.enemyAbility(Abilities.NONE); game.override.battleType("single"); game.override.moveset([Moves.FLOWER_SHIELD, Moves.SPLASH]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - single battle", async () => { diff --git a/src/test/moves/focus_punch.test.ts b/src/test/moves/focus_punch.test.ts index 249647f0294..ca80c688169 100644 --- a/src/test/moves/focus_punch.test.ts +++ b/src/test/moves/focus_punch.test.ts @@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -35,7 +34,7 @@ describe("Moves - Focus Punch", () => { .moveset([Moves.FOCUS_PUNCH]) .enemySpecies(Species.GROUDON) .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .startingLevel(100) .enemyLevel(100); }); @@ -68,7 +67,7 @@ describe("Moves - Focus Punch", () => { it( "should fail if the user is hit", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle([Species.CHARIZARD]); @@ -95,7 +94,7 @@ describe("Moves - Focus Punch", () => { it( "should be cancelled if the user falls asleep mid-turn", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SPORE)); + game.override.enemyMoveset([Moves.SPORE]); await game.startBattle([Species.CHARIZARD]); diff --git a/src/test/moves/foresight.test.ts b/src/test/moves/foresight.test.ts index b856ec0f852..d58097691fd 100644 --- a/src/test/moves/foresight.test.ts +++ b/src/test/moves/foresight.test.ts @@ -4,7 +4,6 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Foresight", () => { let phaserGame: Phaser.Game; @@ -25,7 +24,7 @@ describe("Moves - Foresight", () => { game.override .disableCrits() .enemySpecies(Species.GASTLY) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyLevel(5) .starterSpecies(Species.MAGIKARP) .moveset([Moves.FORESIGHT, Moves.QUICK_ATTACK, Moves.MACH_PUNCH]); @@ -55,7 +54,7 @@ describe("Moves - Foresight", () => { }); it("should ignore target's evasiveness boosts", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.MINIMIZE)); + game.override.enemyMoveset([Moves.MINIMIZE]); await game.startBattle(); const pokemon = game.scene.getPlayerPokemon()!; diff --git a/src/test/moves/freeze_dry.test.ts b/src/test/moves/freeze_dry.test.ts index 445a432a812..ff9e2f07162 100644 --- a/src/test/moves/freeze_dry.test.ts +++ b/src/test/moves/freeze_dry.test.ts @@ -3,7 +3,6 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -28,7 +27,7 @@ describe("Moves - Freeze-Dry", () => { .battleType("single") .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .starterSpecies(Species.FEEBAS) .ability(Abilities.BALL_FETCH) .moveset([Moves.FREEZE_DRY]); @@ -92,7 +91,7 @@ describe("Moves - Freeze-Dry", () => { // enable once Electrify is implemented (and the interaction is fixed, as above) it.todo("should deal 2x damage to water types under Electrify", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.ELECTRIFY)); + game.override.enemyMoveset([Moves.ELECTRIFY]); await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; diff --git a/src/test/moves/freezy_frost.test.ts b/src/test/moves/freezy_frost.test.ts index ae42d5b6dc6..05c61aab49a 100644 --- a/src/test/moves/freezy_frost.test.ts +++ b/src/test/moves/freezy_frost.test.ts @@ -5,7 +5,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import { allMoves } from "#app/data/move"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; @@ -28,7 +27,7 @@ describe("Moves - Freezy Frost", () => { game.override.enemySpecies(Species.RATTATA); game.override.enemyLevel(100); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.NONE); game.override.startingLevel(100); diff --git a/src/test/moves/gastro_acid.test.ts b/src/test/moves/gastro_acid.test.ts index 67fd3464cf9..cfc458a908f 100644 --- a/src/test/moves/gastro_acid.test.ts +++ b/src/test/moves/gastro_acid.test.ts @@ -4,7 +4,6 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { MoveResult } from "#app/field/pokemon"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; const TIMEOUT = 20 * 1000; @@ -31,7 +30,7 @@ describe("Moves - Gastro Acid", () => { game.override.ability(Abilities.NONE); game.override.moveset([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]); game.override.enemySpecies(Species.BIDOOF); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.WATER_ABSORB); }); diff --git a/src/test/moves/gigaton_hammer.test.ts b/src/test/moves/gigaton_hammer.test.ts index 0162375cdb2..b0ab06fdeb5 100644 --- a/src/test/moves/gigaton_hammer.test.ts +++ b/src/test/moves/gigaton_hammer.test.ts @@ -4,7 +4,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Gigaton Hammer", () => { let phaserGame: Phaser.Game; @@ -29,7 +28,7 @@ describe("Moves - Gigaton Hammer", () => { .moveset([Moves.GIGATON_HAMMER]) .startingLevel(10) .enemyLevel(100) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .disableCrits(); }); diff --git a/src/test/moves/glaive_rush.test.ts b/src/test/moves/glaive_rush.test.ts index 5867ef751b8..9eed6868432 100644 --- a/src/test/moves/glaive_rush.test.ts +++ b/src/test/moves/glaive_rush.test.ts @@ -29,7 +29,7 @@ describe("Moves - Glaive Rush", () => { .disableCrits() .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(Array(4).fill(Moves.GLAIVE_RUSH)) + .enemyMoveset([Moves.GLAIVE_RUSH]) .starterSpecies(Species.KLINK) .ability(Abilities.BALL_FETCH) .moveset([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]); @@ -67,7 +67,7 @@ describe("Moves - Glaive Rush", () => { it("interacts properly with multi-lens", async () => { game.override .startingHeldItems([{ name: "MULTI_LENS", count: 2 }]) - .enemyMoveset(Array(4).fill(Moves.AVALANCHE)); + .enemyMoveset([Moves.AVALANCHE]); await game.classicMode.startBattle(); const player = game.scene.getPlayerPokemon()!; @@ -88,7 +88,7 @@ describe("Moves - Glaive Rush", () => { }, TIMEOUT); it("secondary effects only last until next move", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); + game.override.enemyMoveset([Moves.SHADOW_SNEAK]); await game.classicMode.startBattle(); const player = game.scene.getPlayerPokemon()!; @@ -115,7 +115,7 @@ describe("Moves - Glaive Rush", () => { it("secondary effects are removed upon switching", async () => { game.override - .enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)) + .enemyMoveset([Moves.SHADOW_SNEAK]) .starterSpecies(0); await game.classicMode.startBattle([Species.KLINK, Species.FEEBAS]); @@ -152,7 +152,7 @@ describe("Moves - Glaive Rush", () => { game.move.select(Moves.SHADOW_SNEAK); await game.phaseInterceptor.to("TurnEndPhase"); - game.override.enemyMoveset(Array(4).fill(Moves.SPLASH)); + game.override.enemyMoveset([Moves.SPLASH]); const damagedHP1 = 1000 - enemy.hp; enemy.hp = 1000; diff --git a/src/test/moves/growth.test.ts b/src/test/moves/growth.test.ts index defe5e26f41..a66e4ec6719 100644 --- a/src/test/moves/growth.test.ts +++ b/src/test/moves/growth.test.ts @@ -5,7 +5,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; @@ -29,7 +28,7 @@ describe("Moves - Growth", () => { game.override.enemyAbility(Abilities.MOXIE); game.override.ability(Abilities.INSOMNIA); game.override.moveset([ Moves.GROWTH ]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("should raise SPATK stat stage by 1", async() => { diff --git a/src/test/moves/guard_split.test.ts b/src/test/moves/guard_split.test.ts index f95d09f726c..36be82ba5e4 100644 --- a/src/test/moves/guard_split.test.ts +++ b/src/test/moves/guard_split.test.ts @@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Guard Split", () => { let phaserGame: Phaser.Game; @@ -34,7 +33,7 @@ describe("Moves - Guard Split", () => { }); it("should average the user's DEF and SPDEF stats with those of the target", async () => { - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([ Species.INDEEDEE ]); @@ -56,7 +55,7 @@ describe("Moves - Guard Split", () => { }, 20000); it("should be idempotent", async () => { - game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT)); + game.override.enemyMoveset([Moves.GUARD_SPLIT]); await game.startBattle([ Species.INDEEDEE ]); diff --git a/src/test/moves/guard_swap.test.ts b/src/test/moves/guard_swap.test.ts index 407d475de09..a27afaaa7ba 100644 --- a/src/test/moves/guard_swap.test.ts +++ b/src/test/moves/guard_swap.test.ts @@ -27,7 +27,7 @@ describe("Moves - Guard Swap", () => { game.override .battleType("single") .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH)) + .enemyMoveset([Moves.SHELL_SMASH]) .enemySpecies(Species.MEW) .enemyLevel(200) .moveset([ Moves.GUARD_SWAP ]) diff --git a/src/test/moves/hard_press.test.ts b/src/test/moves/hard_press.test.ts index 70c78490269..5d2e4e5b145 100644 --- a/src/test/moves/hard_press.test.ts +++ b/src/test/moves/hard_press.test.ts @@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -30,7 +29,7 @@ describe("Moves - Hard Press", () => { game.override.ability(Abilities.BALL_FETCH); game.override.enemySpecies(Species.MUNCHLAX); game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.moveset([Moves.HARD_PRESS]); vi.spyOn(moveToCheck, "calculateBattlePower"); }); diff --git a/src/test/moves/haze.test.ts b/src/test/moves/haze.test.ts index 42081ce74e8..211c1a41409 100644 --- a/src/test/moves/haze.test.ts +++ b/src/test/moves/haze.test.ts @@ -5,7 +5,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Haze", () => { @@ -28,7 +27,7 @@ describe("Moves - Haze", () => { game.override.enemySpecies(Species.RATTATA); game.override.enemyLevel(100); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.NONE); game.override.startingLevel(100); diff --git a/src/test/moves/hyper_beam.test.ts b/src/test/moves/hyper_beam.test.ts index 1280d8b429a..7aa2dbfec2b 100644 --- a/src/test/moves/hyper_beam.test.ts +++ b/src/test/moves/hyper_beam.test.ts @@ -32,7 +32,7 @@ describe("Moves - Hyper Beam", () => { game.override.ability(Abilities.BALL_FETCH); game.override.enemySpecies(Species.SNORLAX); game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset(Array(4).fill(Moves.SPLASH)); + game.override.enemyMoveset([Moves.SPLASH]); game.override.enemyLevel(100); game.override.moveset([Moves.HYPER_BEAM, Moves.TACKLE]); diff --git a/src/test/moves/jaw_lock.test.ts b/src/test/moves/jaw_lock.test.ts index 42f7a244977..75fd6f0ff32 100644 --- a/src/test/moves/jaw_lock.test.ts +++ b/src/test/moves/jaw_lock.test.ts @@ -6,7 +6,6 @@ import { FaintPhase } from "#app/phases/faint-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import GameManager from "#app/test/utils/gameManager"; -import { SPLASH_ONLY } from "#app/test/utils/testUtils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; @@ -35,7 +34,7 @@ describe("Moves - Jaw Lock", () => { .battleType("single") .enemySpecies(Species.SNORLAX) .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .moveset([Moves.JAW_LOCK, Moves.SPLASH]) .startingLevel(100) .enemyLevel(100) @@ -153,7 +152,7 @@ describe("Moves - Jaw Lock", () => { it( "should not trap either pokemon if the target is protected", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.PROTECT)); + game.override.enemyMoveset([Moves.PROTECT]); await game.startBattle([Species.BULBASAUR]); diff --git a/src/test/moves/lash_out.test.ts b/src/test/moves/lash_out.test.ts index 74d9fcd66c0..8c414832f36 100644 --- a/src/test/moves/lash_out.test.ts +++ b/src/test/moves/lash_out.test.ts @@ -30,7 +30,7 @@ describe("Moves - Lash Out", () => { .disableCrits() .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.FUR_COAT) - .enemyMoveset(Array(4).fill(Moves.GROWL)) + .enemyMoveset([Moves.GROWL]) .startingLevel(10) .enemyLevel(10) .starterSpecies(Species.FEEBAS) diff --git a/src/test/moves/lucky_chant.test.ts b/src/test/moves/lucky_chant.test.ts index 7d5bfe02476..57e5ff80f1d 100644 --- a/src/test/moves/lucky_chant.test.ts +++ b/src/test/moves/lucky_chant.test.ts @@ -31,7 +31,7 @@ describe("Moves - Lucky Chant", () => { .moveset([Moves.LUCKY_CHANT, Moves.SPLASH, Moves.FOLLOW_ME]) .enemySpecies(Species.SNORLAX) .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(Array(4).fill(Moves.FLOWER_TRICK)) + .enemyMoveset([Moves.FLOWER_TRICK]) .startingLevel(100) .enemyLevel(100); }); @@ -87,7 +87,7 @@ describe("Moves - Lucky Chant", () => { it( "should prevent critical hits from field effects", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle([Species.CHARIZARD]); diff --git a/src/test/moves/lunar_blessing.test.ts b/src/test/moves/lunar_blessing.test.ts index 92428c39029..6a104762f4d 100644 --- a/src/test/moves/lunar_blessing.test.ts +++ b/src/test/moves/lunar_blessing.test.ts @@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -26,7 +25,7 @@ describe("Moves - Lunar Blessing", () => { game.override.battleType("double"); game.override.enemySpecies(Species.SHUCKLE); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.BALL_FETCH); game.override.moveset([Moves.LUNAR_BLESSING, Moves.SPLASH]); diff --git a/src/test/moves/make_it_rain.test.ts b/src/test/moves/make_it_rain.test.ts index e41472d7561..5ac35168f92 100644 --- a/src/test/moves/make_it_rain.test.ts +++ b/src/test/moves/make_it_rain.test.ts @@ -5,7 +5,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; @@ -31,7 +30,7 @@ describe("Moves - Make It Rain", () => { game.override.moveset([Moves.MAKE_IT_RAIN, Moves.SPLASH]); game.override.enemySpecies(Species.SNORLAX); game.override.enemyAbility(Abilities.INSOMNIA); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.startingLevel(100); game.override.enemyLevel(100); }); diff --git a/src/test/moves/mat_block.test.ts b/src/test/moves/mat_block.test.ts index 4a95985eb92..b759f49bf98 100644 --- a/src/test/moves/mat_block.test.ts +++ b/src/test/moves/mat_block.test.ts @@ -33,7 +33,7 @@ describe("Moves - Mat Block", () => { game.override.moveset([Moves.MAT_BLOCK, Moves.SPLASH]); game.override.enemySpecies(Species.SNORLAX); - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); game.override.enemyAbility(Abilities.INSOMNIA); game.override.startingLevel(100); @@ -62,7 +62,7 @@ describe("Moves - Mat Block", () => { test( "should not protect the user and allies from status moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); + game.override.enemyMoveset([Moves.GROWL]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); diff --git a/src/test/moves/miracle_eye.test.ts b/src/test/moves/miracle_eye.test.ts index d6b21a5dc2f..0528b509c82 100644 --- a/src/test/moves/miracle_eye.test.ts +++ b/src/test/moves/miracle_eye.test.ts @@ -5,7 +5,6 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Miracle Eye", () => { let phaserGame: Phaser.Game; @@ -26,7 +25,7 @@ describe("Moves - Miracle Eye", () => { game.override .disableCrits() .enemySpecies(Species.UMBREON) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyLevel(5) .starterSpecies(Species.MAGIKARP) .moveset([Moves.MIRACLE_EYE, Moves.CONFUSION]); diff --git a/src/test/moves/multi_target.test.ts b/src/test/moves/multi_target.test.ts index 16ccd5519b1..5e830f23fc7 100644 --- a/src/test/moves/multi_target.test.ts +++ b/src/test/moves/multi_target.test.ts @@ -4,7 +4,6 @@ import { Species } from "#app/enums/species"; import * as Utils from "#app/utils"; import { Moves } from "#enums/moves"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -32,7 +31,7 @@ describe("Multi-target damage reduction", () => { .enemyLevel(100) .startingLevel(100) .enemySpecies(Species.POLIWAG) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH) .moveset([Moves.TACKLE, Moves.DAZZLING_GLEAM, Moves.EARTHQUAKE, Moves.SPLASH]) .ability(Abilities.BALL_FETCH); diff --git a/src/test/moves/octolock.test.ts b/src/test/moves/octolock.test.ts index c86906ea240..7618b08e9fc 100644 --- a/src/test/moves/octolock.test.ts +++ b/src/test/moves/octolock.test.ts @@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -30,7 +29,7 @@ describe("Moves - Octolock", () => { game.override.battleType("single") .enemySpecies(Species.RATTATA) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH) .startingLevel(2000) .moveset([ Moves.OCTOLOCK, Moves.SPLASH ]) diff --git a/src/test/moves/parting_shot.test.ts b/src/test/moves/parting_shot.test.ts index d9535ca6482..52cfaf98111 100644 --- a/src/test/moves/parting_shot.test.ts +++ b/src/test/moves/parting_shot.test.ts @@ -9,7 +9,6 @@ import { BerryPhase } from "#app/phases/berry-phase"; import { FaintPhase } from "#app/phases/faint-phase"; import { MessagePhase } from "#app/phases/message-phase"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -31,7 +30,7 @@ describe("Moves - Parting Shot", () => { game = new GameManager(phaserGame); game.override.battleType("single"); game.override.moveset([Moves.PARTING_SHOT, Moves.SPLASH]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.startingLevel(5); game.override.enemyLevel(5); @@ -125,7 +124,7 @@ describe("Moves - Parting Shot", () => { game.override .enemySpecies(Species.ALTARIA) .enemyAbility(Abilities.NONE) - .enemyMoveset(Array(4).fill(Moves.MIST)); + .enemyMoveset([Moves.MIST]); await game.startBattle([Species.SNORLAX, Species.MEOWTH]); const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/src/test/moves/power_split.test.ts b/src/test/moves/power_split.test.ts index a532a90a54d..aaf34541567 100644 --- a/src/test/moves/power_split.test.ts +++ b/src/test/moves/power_split.test.ts @@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Power Split", () => { let phaserGame: Phaser.Game; @@ -34,7 +33,7 @@ describe("Moves - Power Split", () => { }); it("should average the user's ATK and SPATK stats with those of the target", async () => { - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([ Species.INDEEDEE ]); @@ -56,7 +55,7 @@ describe("Moves - Power Split", () => { }, 20000); it("should be idempotent", async () => { - game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT)); + game.override.enemyMoveset([Moves.POWER_SPLIT]); await game.startBattle([ Species.INDEEDEE ]); diff --git a/src/test/moves/power_swap.test.ts b/src/test/moves/power_swap.test.ts index f1efeaa3af3..a3d4bfca19a 100644 --- a/src/test/moves/power_swap.test.ts +++ b/src/test/moves/power_swap.test.ts @@ -27,7 +27,7 @@ describe("Moves - Power Swap", () => { game.override .battleType("single") .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH)) + .enemyMoveset([Moves.SHELL_SMASH]) .enemySpecies(Species.MEW) .enemyLevel(200) .moveset([ Moves.POWER_SWAP ]) diff --git a/src/test/moves/protect.test.ts b/src/test/moves/protect.test.ts index 83cd088aa47..24bbcbb9d34 100644 --- a/src/test/moves/protect.test.ts +++ b/src/test/moves/protect.test.ts @@ -35,7 +35,7 @@ describe("Moves - Protect", () => { game.override.enemySpecies(Species.SNORLAX); game.override.enemyAbility(Abilities.INSOMNIA); - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); game.override.startingLevel(100); game.override.enemyLevel(100); @@ -59,7 +59,7 @@ describe("Moves - Protect", () => { test( "should prevent secondary effects from the opponent's attack", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.CEASELESS_EDGE)); + game.override.enemyMoveset([Moves.CEASELESS_EDGE]); vi.spyOn(allMoves[Moves.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100); await game.classicMode.startBattle([Species.CHARIZARD]); @@ -78,7 +78,7 @@ describe("Moves - Protect", () => { test( "should protect the user from status moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.CHARM)); + game.override.enemyMoveset([Moves.CHARM]); await game.classicMode.startBattle([Species.CHARIZARD]); @@ -95,7 +95,7 @@ describe("Moves - Protect", () => { test( "should stop subsequent hits of a multi-hit move", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACHYON_CUTTER)); + game.override.enemyMoveset([Moves.TACHYON_CUTTER]); await game.classicMode.startBattle([Species.CHARIZARD]); @@ -114,7 +114,7 @@ describe("Moves - Protect", () => { test( "should fail if the user is the last to move in the turn", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.PROTECT)); + game.override.enemyMoveset([Moves.PROTECT]); await game.classicMode.startBattle([Species.CHARIZARD]); diff --git a/src/test/moves/quick_guard.test.ts b/src/test/moves/quick_guard.test.ts index 5f4af40eb71..9ab0fe1509c 100644 --- a/src/test/moves/quick_guard.test.ts +++ b/src/test/moves/quick_guard.test.ts @@ -32,7 +32,7 @@ describe("Moves - Quick Guard", () => { game.override.moveset([Moves.QUICK_GUARD, Moves.SPLASH, Moves.FOLLOW_ME]); game.override.enemySpecies(Species.SNORLAX); - game.override.enemyMoveset(Array(4).fill(Moves.QUICK_ATTACK)); + game.override.enemyMoveset([Moves.QUICK_ATTACK]); game.override.enemyAbility(Abilities.INSOMNIA); game.override.startingLevel(100); @@ -59,7 +59,7 @@ describe("Moves - Quick Guard", () => { "should protect the user and allies from Prankster-boosted moves", async () => { game.override.enemyAbility(Abilities.PRANKSTER); - game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); + game.override.enemyMoveset([Moves.GROWL]); await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); @@ -77,7 +77,7 @@ describe("Moves - Quick Guard", () => { test( "should stop subsequent hits of a multi-hit priority move", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.WATER_SHURIKEN)); + game.override.enemyMoveset([Moves.WATER_SHURIKEN]); await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); @@ -98,7 +98,7 @@ describe("Moves - Quick Guard", () => { "should fail if the user is the last to move in the turn", async () => { game.override.battleType("single"); - game.override.enemyMoveset(Array(4).fill(Moves.QUICK_GUARD)); + game.override.enemyMoveset([Moves.QUICK_GUARD]); await game.classicMode.startBattle([Species.CHARIZARD]); diff --git a/src/test/moves/rollout.test.ts b/src/test/moves/rollout.test.ts index ddb0b22e642..c08535a61df 100644 --- a/src/test/moves/rollout.test.ts +++ b/src/test/moves/rollout.test.ts @@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -32,7 +31,7 @@ describe("Moves - Rollout", () => { game.override.enemyAbility(Abilities.BALL_FETCH); game.override.startingLevel(100); game.override.enemyLevel(100); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("should double it's dmg on sequential uses but reset after 5", async () => { diff --git a/src/test/moves/safeguard.test.ts b/src/test/moves/safeguard.test.ts index 8068c475539..2caf698a73a 100644 --- a/src/test/moves/safeguard.test.ts +++ b/src/test/moves/safeguard.test.ts @@ -29,7 +29,7 @@ describe("Moves - Safeguard", () => { game.override .battleType("single") .enemySpecies(Species.DRATINI) - .enemyMoveset(Array(4).fill(Moves.SAFEGUARD)) + .enemyMoveset([Moves.SAFEGUARD]) .enemyAbility(Abilities.BALL_FETCH) .enemyLevel(5) .starterSpecies(Species.DRATINI) @@ -126,8 +126,12 @@ describe("Moves - Safeguard", () => { expect(enemyPokemon.status?.effect).toEqual(StatusEffect.BURN); - game.override.enemyMoveset(Array(4).fill(Moves.REST)); + game.override.enemyMoveset([Moves.REST]); + // Force the moveset to update mid-battle + // TODO: Remove after enemy AI rework is in + enemyPokemon.getMoveset(); game.move.select(Moves.SPLASH); + enemyPokemon.damageAndUpdate(1); await game.toNextTurn(); expect(enemyPokemon.status?.effect).toEqual(StatusEffect.SLEEP); @@ -142,7 +146,7 @@ describe("Moves - Safeguard", () => { game.move.select(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); game.move.select(Moves.SPLASH); await game.toNextTurn(); diff --git a/src/test/moves/shell_trap.test.ts b/src/test/moves/shell_trap.test.ts index 4549a8b2b73..213b9c3fd0a 100644 --- a/src/test/moves/shell_trap.test.ts +++ b/src/test/moves/shell_trap.test.ts @@ -9,7 +9,6 @@ import { MovePhase } from "#app/phases/move-phase"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -33,7 +32,7 @@ describe("Moves - Shell Trap", () => { .battleType("double") .moveset([Moves.SHELL_TRAP, Moves.SPLASH, Moves.BULLDOZE]) .enemySpecies(Species.SNORLAX) - .enemyMoveset(Array(4).fill(Moves.RAZOR_LEAF)) + .enemyMoveset([Moves.RAZOR_LEAF]) .startingLevel(100) .enemyLevel(100); @@ -67,7 +66,7 @@ describe("Moves - Shell Trap", () => { it( "should fail if the user is only hit by special attacks", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SWIFT)); + game.override.enemyMoveset([Moves.SWIFT]); await game.startBattle([Species.CHARIZARD, Species.TURTONATOR]); @@ -93,7 +92,7 @@ describe("Moves - Shell Trap", () => { it( "should fail if the user isn't hit with any attack", async () => { - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([Species.CHARIZARD, Species.TURTONATOR]); @@ -119,7 +118,7 @@ describe("Moves - Shell Trap", () => { it( "should not activate from an ally's attack", async () => { - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); diff --git a/src/test/moves/speed_swap.test.ts b/src/test/moves/speed_swap.test.ts index 131d506792b..179f1212394 100644 --- a/src/test/moves/speed_swap.test.ts +++ b/src/test/moves/speed_swap.test.ts @@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Speed Swap", () => { let phaserGame: Phaser.Game; @@ -27,7 +26,7 @@ describe("Moves - Speed Swap", () => { game.override .battleType("single") .enemyAbility(Abilities.NONE) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemySpecies(Species.MEW) .enemyLevel(200) .moveset([ Moves.SPEED_SWAP ]) diff --git a/src/test/moves/spikes.test.ts b/src/test/moves/spikes.test.ts index fa2e7521152..aa59912d802 100644 --- a/src/test/moves/spikes.test.ts +++ b/src/test/moves/spikes.test.ts @@ -4,7 +4,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Spikes", () => { @@ -28,7 +27,7 @@ describe("Moves - Spikes", () => { .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .moveset([Moves.SPIKES, Moves.SPLASH, Moves.ROAR]); }); diff --git a/src/test/moves/spit_up.test.ts b/src/test/moves/spit_up.test.ts index f88791efb74..acf7f01d991 100644 --- a/src/test/moves/spit_up.test.ts +++ b/src/test/moves/spit_up.test.ts @@ -9,7 +9,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import { MovePhase } from "#app/phases/move-phase"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; @@ -33,7 +32,7 @@ describe("Moves - Spit Up", () => { game.override.battleType("single"); game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.NONE); game.override.enemyLevel(2000); diff --git a/src/test/moves/stockpile.test.ts b/src/test/moves/stockpile.test.ts index d57768d0ffd..8e7a44d053b 100644 --- a/src/test/moves/stockpile.test.ts +++ b/src/test/moves/stockpile.test.ts @@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -30,7 +29,7 @@ describe("Moves - Stockpile", () => { game.override.battleType("single"); game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.NONE); game.override.startingLevel(2000); diff --git a/src/test/moves/swallow.test.ts b/src/test/moves/swallow.test.ts index 9cea7ae8dc9..5a0e63e6e78 100644 --- a/src/test/moves/swallow.test.ts +++ b/src/test/moves/swallow.test.ts @@ -8,7 +8,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -30,7 +29,7 @@ describe("Moves - Swallow", () => { game.override.battleType("single"); game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.enemyAbility(Abilities.NONE); game.override.enemyLevel(2000); diff --git a/src/test/moves/tail_whip.test.ts b/src/test/moves/tail_whip.test.ts index 04730a04f7a..5c83feb8a4e 100644 --- a/src/test/moves/tail_whip.test.ts +++ b/src/test/moves/tail_whip.test.ts @@ -5,7 +5,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; @@ -33,7 +32,7 @@ describe("Moves - Tail whip", () => { game.override.ability(Abilities.INSOMNIA); game.override.startingLevel(2000); game.override.moveset([ moveToUse ]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("should lower DEF stat stage by 1", async() => { diff --git a/src/test/moves/tailwind.test.ts b/src/test/moves/tailwind.test.ts index d158a9cce86..6a08cfe802f 100644 --- a/src/test/moves/tailwind.test.ts +++ b/src/test/moves/tailwind.test.ts @@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -27,7 +26,7 @@ describe("Moves - Tailwind", () => { game = new GameManager(phaserGame); game.override.battleType("double"); game.override.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); }); it("doubles the Speed stat of the Pokemons on its side", async () => { diff --git a/src/test/moves/tera_blast.test.ts b/src/test/moves/tera_blast.test.ts index fa7a99adc14..55d61496297 100644 --- a/src/test/moves/tera_blast.test.ts +++ b/src/test/moves/tera_blast.test.ts @@ -9,7 +9,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - Tera Blast", () => { let phaserGame: Phaser.Game; @@ -37,7 +36,7 @@ describe("Moves - Tera Blast", () => { .ability(Abilities.BALL_FETCH) .startingHeldItems([{ name: "TERA_SHARD", type: Type.FIRE }]) .enemySpecies(Species.MAGIKARP) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH) .enemyLevel(20); diff --git a/src/test/moves/thunder_wave.test.ts b/src/test/moves/thunder_wave.test.ts index 0c91be29714..7ad59518013 100644 --- a/src/test/moves/thunder_wave.test.ts +++ b/src/test/moves/thunder_wave.test.ts @@ -6,7 +6,6 @@ import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; const TIMEOUT = 20 * 1000; @@ -30,7 +29,7 @@ describe("Moves - Thunder Wave", () => { .battleType("single") .starterSpecies(Species.PIKACHU) .moveset([Moves.THUNDER_WAVE]) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); // References: https://bulbapedia.bulbagarden.net/wiki/Thunder_Wave_(move) diff --git a/src/test/moves/tidy_up.test.ts b/src/test/moves/tidy_up.test.ts index 5204b06106b..255fe948447 100644 --- a/src/test/moves/tidy_up.test.ts +++ b/src/test/moves/tidy_up.test.ts @@ -6,7 +6,6 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -30,7 +29,7 @@ describe("Moves - Tidy Up", () => { game.override.battleType("single"); game.override.enemySpecies(Species.MAGIKARP); game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset(SPLASH_ONLY); + game.override.enemyMoveset(Moves.SPLASH); game.override.starterSpecies(Species.FEEBAS); game.override.ability(Abilities.BALL_FETCH); game.override.moveset([Moves.TIDY_UP]); diff --git a/src/test/moves/transform.test.ts b/src/test/moves/transform.test.ts index 45769447e4d..6686f1fc73b 100644 --- a/src/test/moves/transform.test.ts +++ b/src/test/moves/transform.test.ts @@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { Abilities } from "#enums/abilities"; -import { SPLASH_ONLY } from "../utils/testUtils"; // TODO: Add more tests once Transform is fully implemented describe("Moves - Transform", () => { @@ -31,7 +30,7 @@ describe("Moves - Transform", () => { .enemyLevel(200) .enemyAbility(Abilities.BEAST_BOOST) .enemyPassiveAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .ability(Abilities.INTIMIDATE) .moveset([ Moves.TRANSFORM ]); }); @@ -77,7 +76,7 @@ describe("Moves - Transform", () => { }, 20000); it("should copy in-battle overridden stats", async () => { - game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT)); + game.override.enemyMoveset([Moves.POWER_SPLIT]); await game.startBattle([ Species.DITTO diff --git a/src/test/moves/u_turn.test.ts b/src/test/moves/u_turn.test.ts index ae55302bb42..c4b6ae2497f 100644 --- a/src/test/moves/u_turn.test.ts +++ b/src/test/moves/u_turn.test.ts @@ -7,7 +7,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("Moves - U-turn", () => { let phaserGame: Phaser.Game; @@ -31,7 +30,7 @@ describe("Moves - U-turn", () => { .startingLevel(90) .startingWave(97) .moveset([Moves.U_TURN]) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .disableCrits(); }); diff --git a/src/test/moves/wide_guard.test.ts b/src/test/moves/wide_guard.test.ts index 6feeff815b5..b4e6e305539 100644 --- a/src/test/moves/wide_guard.test.ts +++ b/src/test/moves/wide_guard.test.ts @@ -32,7 +32,7 @@ describe("Moves - Wide Guard", () => { game.override.moveset([Moves.WIDE_GUARD, Moves.SPLASH, Moves.SURF]); game.override.enemySpecies(Species.SNORLAX); - game.override.enemyMoveset(Array(4).fill(Moves.SWIFT)); + game.override.enemyMoveset([Moves.SWIFT]); game.override.enemyAbility(Abilities.INSOMNIA); game.override.startingLevel(100); @@ -61,7 +61,7 @@ describe("Moves - Wide Guard", () => { test( "should protect the user and allies from multi-target status moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); + game.override.enemyMoveset([Moves.GROWL]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); @@ -82,7 +82,7 @@ describe("Moves - Wide Guard", () => { test( "should not protect the user and allies from single-target moves", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); + game.override.enemyMoveset([Moves.TACKLE]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); @@ -103,7 +103,7 @@ describe("Moves - Wide Guard", () => { test( "should protect the user from its ally's multi-target move", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SPLASH)); + game.override.enemyMoveset([Moves.SPLASH]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); diff --git a/src/test/reload.test.ts b/src/test/reload.test.ts index 0a712fcc7df..a96a525ca2d 100644 --- a/src/test/reload.test.ts +++ b/src/test/reload.test.ts @@ -2,7 +2,6 @@ import { Species } from "#app/enums/species"; import { GameModes } from "#app/game-mode"; import GameManager from "#test/utils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SPLASH_ONLY } from "./utils/testUtils"; import { Moves } from "#app/enums/moves"; import { Biome } from "#app/enums/biome"; @@ -45,7 +44,7 @@ describe("Reload", () => { .enemyLevel(1000) .disableTrainerWaves() .moveset([Moves.KOWTOW_CLEAVE]) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); await game.dailyMode.startBattle(); // Transition from Daily Run Wave 10 to Wave 11 in order to trigger biome switch diff --git a/src/test/ui/type-hints.test.ts b/src/test/ui/type-hints.test.ts index ccab02b82bf..726094b258a 100644 --- a/src/test/ui/type-hints.test.ts +++ b/src/test/ui/type-hints.test.ts @@ -8,7 +8,6 @@ import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import MockText from "../utils/mocks/mocksContainer/mockText"; -import { SPLASH_ONLY } from "../utils/testUtils"; describe("UI - Type Hints", () => { let phaserGame: Phaser.Game; @@ -27,7 +26,7 @@ describe("UI - Type Hints", () => { beforeEach(async () => { game = new GameManager(phaserGame); game.settings.typeHints(true); //activate type hints - game.override.battleType("single").startingLevel(100).startingWave(1).enemyMoveset(SPLASH_ONLY); + game.override.battleType("single").startingLevel(100).startingWave(1).enemyMoveset(Moves.SPLASH); }); it("check immunity color", async () => { @@ -36,7 +35,7 @@ describe("UI - Type Hints", () => { .startingLevel(100) .startingWave(1) .enemySpecies(Species.FLORGES) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .moveset([Moves.DRAGON_CLAW]); game.settings.typeHints(true); //activate type hints diff --git a/src/test/utils/helpers/overridesHelper.ts b/src/test/utils/helpers/overridesHelper.ts index 3eeeecbc5f8..a17b841b682 100644 --- a/src/test/utils/helpers/overridesHelper.ts +++ b/src/test/utils/helpers/overridesHelper.ts @@ -133,8 +133,11 @@ export class OverridesHelper extends GameManagerHelper { * @param moveset the {@linkcode Moves | moves}set to set * @returns this */ - moveset(moveset: Moves[]): this { + moveset(moveset: Moves | Moves[]): this { vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue(moveset); + if (!Array.isArray(moveset)) { + moveset = [moveset]; + } const movesetStr = moveset.map((moveId) => Moves[moveId]).join(", "); this.log(`Player Pokemon moveset set to ${movesetStr} (=[${moveset.join(", ")}])!`); return this; @@ -252,8 +255,11 @@ export class OverridesHelper extends GameManagerHelper { * @param moveset the {@linkcode Moves | moves}set to set * @returns this */ - enemyMoveset(moveset: Moves[]): this { + enemyMoveset(moveset: Moves | Moves[]): this { vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(moveset); + if (!Array.isArray(moveset)) { + moveset = [moveset]; + } const movesetStr = moveset.map((moveId) => Moves[moveId]).join(", "); this.log(`Enemy Pokemon moveset set to ${movesetStr} (=[${moveset.join(", ")}])!`); return this; diff --git a/src/test/utils/testUtils.ts b/src/test/utils/testUtils.ts index 2265cf8d79c..b922fc9c61c 100644 --- a/src/test/utils/testUtils.ts +++ b/src/test/utils/testUtils.ts @@ -1,10 +1,6 @@ -import { Moves } from "#app/enums/moves"; import i18next, { type ParseKeys } from "i18next"; import { vi } from "vitest"; -/** Ready to use array of Moves.SPLASH x4 */ -export const SPLASH_ONLY = [Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]; - /** * Sets up the i18next mock. * Includes a i18next.t mocked implementation only returning the raw key (`(key) => key`) From 8df7422e8fa520813b3549f5e53f684ad7419ec6 Mon Sep 17 00:00:00 2001 From: Taylor Le Lievre <78890517+tlelievre26@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:59:58 -0400 Subject: [PATCH 76/91] [Bug] Primal weather no longer persists if last mon dies to indirect damage (#3492) * Fixed Delta Stream remaining active when last mon dies to indirect damage * Rebasing changes * Linting fix * Combined if statements * Changed params to optional * Added unit test * Apply suggestions from code review * Fix test and remove `.js` from import --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/ability.ts | 14 ++++++------- src/phases/faint-phase.ts | 2 ++ src/test/arena/weather_strong_winds.test.ts | 23 +++++++++++++++++---- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 10aba1f030e..1304f281285 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3923,7 +3923,7 @@ export class PostBattleLootAbAttr extends PostBattleAbAttr { } export class PostFaintAbAttr extends AbAttr { - applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { + applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean { return false; } } @@ -3974,7 +3974,7 @@ export class PostFaintClearWeatherAbAttr extends PostFaintAbAttr { * @param args N/A * @returns {boolean} Returns true if the weather clears, otherwise false. */ - applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { + applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean { const weatherType = pokemon.scene.arena.weather?.weatherType; let turnOffWeather = false; @@ -4022,8 +4022,8 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr { this.damageRatio = damageRatio; } - applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { - if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) { + applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean { + if (move !== undefined && attacker !== undefined && move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) { //If the mon didn't die to indirect damage const cancelled = new Utils.BooleanHolder(false); pokemon.scene.getField(true).map(p => applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled, simulated)); if (cancelled.value || attacker.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) { @@ -4052,8 +4052,8 @@ export class PostFaintHPDamageAbAttr extends PostFaintAbAttr { super (); } - applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { - if (!simulated) { + applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean { + if (move !== undefined && attacker !== undefined && !simulated) { //If the mon didn't die to indirect damage const damage = pokemon.turnData.attacksReceived[0].damage; attacker.damageAndUpdate((damage), HitResult.OTHER); attacker.turnData.damageTaken += damage; @@ -4711,7 +4711,7 @@ export function applyPostBattleAbAttrs(attrType: Constructor, } export function applyPostFaintAbAttrs(attrType: Constructor, - pokemon: Pokemon, attacker: Pokemon, move: Move, hitResult: HitResult, simulated: boolean = false, ...args: any[]): Promise { + pokemon: Pokemon, attacker?: Pokemon, move?: Move, hitResult?: HitResult, simulated: boolean = false, ...args: any[]): Promise { return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostFaint(pokemon, passive, simulated, attacker, move, hitResult, args), args, false, simulated); } diff --git a/src/phases/faint-phase.ts b/src/phases/faint-phase.ts index 48366afaad4..c30003b79aa 100644 --- a/src/phases/faint-phase.ts +++ b/src/phases/faint-phase.ts @@ -65,6 +65,8 @@ export class FaintPhase extends PokemonPhase { if (pokemon.turnData?.attacksReceived?.length) { const lastAttack = pokemon.turnData.attacksReceived[0]; applyPostFaintAbAttrs(PostFaintAbAttr, pokemon, this.scene.getPokemonById(lastAttack.sourceId)!, new PokemonMove(lastAttack.move).getMove(), lastAttack.result); // TODO: is this bang correct? + } else { //If killed by indirect damage, apply post-faint abilities without providing a last move + applyPostFaintAbAttrs(PostFaintAbAttr, pokemon); } const alivePlayField = this.scene.getField(true); diff --git a/src/test/arena/weather_strong_winds.test.ts b/src/test/arena/weather_strong_winds.test.ts index 8b2d3e2547e..5ce0e61e647 100644 --- a/src/test/arena/weather_strong_winds.test.ts +++ b/src/test/arena/weather_strong_winds.test.ts @@ -1,4 +1,5 @@ import { allMoves } from "#app/data/move"; +import { StatusEffect } from "#app/enums/status-effect"; import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; @@ -33,7 +34,7 @@ describe("Weather - Strong Winds", () => { it("electric type move is not very effective on Rayquaza", async () => { game.override.enemySpecies(Species.RAYQUAZA); - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const pikachu = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -44,7 +45,7 @@ describe("Weather - Strong Winds", () => { }); it("electric type move is neutral for flying type pokemon", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const pikachu = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -55,7 +56,7 @@ describe("Weather - Strong Winds", () => { }); it("ice type move is neutral for flying type pokemon", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const pikachu = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -66,7 +67,7 @@ describe("Weather - Strong Winds", () => { }); it("rock type move is neutral for flying type pokemon", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const pikachu = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -75,4 +76,18 @@ describe("Weather - Strong Winds", () => { await game.phaseInterceptor.to(TurnStartPhase); expect(enemy.getAttackTypeEffectiveness(allMoves[Moves.ROCK_SLIDE].type, pikachu)).toBe(1); }); + + it("weather goes away when last trainer pokemon dies to indirect damage", async () => { + game.override.enemyStatusEffect(StatusEffect.POISON); + + await game.classicMode.startBattle([Species.MAGIKARP]); + + const enemy = game.scene.getEnemyPokemon()!; + enemy.hp = 1; + + game.move.select(Moves.SPLASH); + await game.phaseInterceptor.to("TurnEndPhase"); + + expect(game.scene.arena.weather?.weatherType).toBeUndefined(); + }); }); From 401568609b86fc816b03be5d8c15bde9f0944fcb Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Tue, 10 Sep 2024 01:00:26 +0800 Subject: [PATCH 77/91] [Dev] Add imports, Handle kebab-case fileName argument in test boilerplate script (#4072) * add imports, handle kebab-case fileName argument * fix spacing --- create-test-boilerplate.js | 46 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/create-test-boilerplate.js b/create-test-boilerplate.js index 3c53eb1125b..3e598384fee 100644 --- a/create-test-boilerplate.js +++ b/create-test-boilerplate.js @@ -20,54 +20,59 @@ const type = args[0]; // "move" or "ability" let fileName = args[1]; // The file name if (!type || !fileName) { - console.error('Please provide both a type ("move", "ability", or "item") and a file name.'); - process.exit(1); + console.error('Please provide a type ("move", "ability", or "item") and a file name.'); + process.exit(1); } -// Convert fileName from to snake_case if camelCase is given -fileName = fileName.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase(); +// Convert fileName from kebab-case or camelCase to snake_case +fileName = fileName + .replace(/-+/g, '_') // Convert kebab-case (dashes) to underscores + .replace(/([a-z])([A-Z])/g, '$1_$2') // Convert camelCase to snake_case + .toLowerCase(); // Ensure all lowercase // Format the description for the test case const formattedName = fileName - .replace(/_/g, ' ') - .replace(/\b\w/g, char => char.toUpperCase()); + .replace(/_/g, ' ') + .replace(/\b\w/g, char => char.toUpperCase()); // Determine the directory based on the type let dir; let description; if (type === 'move') { - dir = path.join(__dirname, 'src', 'test', 'moves'); - description = `Moves - ${formattedName}`; + dir = path.join(__dirname, 'src', 'test', 'moves'); + description = `Moves - ${formattedName}`; } else if (type === 'ability') { - dir = path.join(__dirname, 'src', 'test', 'abilities'); - description = `Abilities - ${formattedName}`; + dir = path.join(__dirname, 'src', 'test', 'abilities'); + description = `Abilities - ${formattedName}`; } else if (type === "item") { - dir = path.join(__dirname, 'src', 'test', 'items'); - description = `Items - ${formattedName}`; + dir = path.join(__dirname, 'src', 'test', 'items'); + description = `Items - ${formattedName}`; } else { - console.error('Invalid type. Please use "move", "ability", or "item".'); - process.exit(1); + console.error('Invalid type. Please use "move", "ability", or "item".'); + process.exit(1); } // Ensure the directory exists if (!fs.existsSync(dir)) { - fs.mkdirSync(dir, { recursive: true }); + fs.mkdirSync(dir, { recursive: true }); } // Create the file with the given name const filePath = path.join(dir, `${fileName}.test.ts`); if (fs.existsSync(filePath)) { - console.error(`File "${fileName}.test.ts" already exists.`); - process.exit(1); + console.error(`File "${fileName}.test.ts" already exists.`); + process.exit(1); } // Define the content template const content = `import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; describe("${description}", () => { let phaserGame: Phaser.Game; @@ -87,14 +92,15 @@ describe("${description}", () => { beforeEach(() => { game = new GameManager(phaserGame); game.override + .moveset([Moves.SPLASH]) .battleType("single") .enemyAbility(Abilities.BALL_FETCH) .enemyMoveset(SPLASH_ONLY); }); it("test case", async () => { - // await game.classicMode.startBattle(); - // game.move.select(); + // await game.classicMode.startBattle([Species.MAGIKARP]); + // game.move.select(Moves.SPLASH); }, TIMEOUT); }); `; From 9afab182e9dc15c865b410ccd2555dd3b2fc5e39 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Tue, 10 Sep 2024 03:02:11 +0800 Subject: [PATCH 78/91] [Test] Remove obsolete splash_only (#4139) --- create-test-boilerplate.js | 3 +-- src/test/moves/power_shift.test.ts | 3 +-- src/test/moves/tar_shot.test.ts | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/create-test-boilerplate.js b/create-test-boilerplate.js index 3e598384fee..d9cdbd4e7cf 100644 --- a/create-test-boilerplate.js +++ b/create-test-boilerplate.js @@ -70,7 +70,6 @@ const content = `import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; @@ -95,7 +94,7 @@ describe("${description}", () => { .moveset([Moves.SPLASH]) .battleType("single") .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("test case", async () => { diff --git a/src/test/moves/power_shift.test.ts b/src/test/moves/power_shift.test.ts index 350041d9e4e..3fda315193e 100644 --- a/src/test/moves/power_shift.test.ts +++ b/src/test/moves/power_shift.test.ts @@ -3,7 +3,6 @@ import { Species } from "#app/enums/species"; import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -29,7 +28,7 @@ describe("Moves - Power Shift", () => { .battleType("single") .ability(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY); + .enemyMoveset(Moves.SPLASH); }); it("switches the user's raw Attack stat with its raw Defense stat", async () => { diff --git a/src/test/moves/tar_shot.test.ts b/src/test/moves/tar_shot.test.ts index 15667122a37..2963f061fc6 100644 --- a/src/test/moves/tar_shot.test.ts +++ b/src/test/moves/tar_shot.test.ts @@ -5,7 +5,6 @@ import { Species } from "#app/enums/species"; import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import GameManager from "#test/utils/gameManager"; -import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -29,7 +28,7 @@ describe("Moves - Tar Shot", () => { game.override .battleType("single") .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(SPLASH_ONLY) + .enemyMoveset(Moves.SPLASH) .enemySpecies(Species.TANGELA) .enemyLevel(1000) .moveset([Moves.TAR_SHOT, Moves.FIRE_PUNCH]) From 93170930441ef5524a438a77b188b2ca056622bf Mon Sep 17 00:00:00 2001 From: Brandon Bay Date: Mon, 9 Sep 2024 15:07:00 -0400 Subject: [PATCH 79/91] [Enhancement] [UI/UX] Add ability and passive tooltips to starter select screen (#4023) * Add ability and passive tooltips to starter select screen * Remove explicit casts to BattleScene * Increase tooltip size, reverse y when necessary, and always show passive tooltip * Add ability name to tooltip title and persist tooltips between Pokemon * Use vi function mocks --- .../mocks/mocksContainer/mockContainer.ts | 5 +- .../utils/mocks/mocksContainer/mockSprite.ts | 5 +- .../utils/mocks/mocksContainer/mockText.ts | 2 + src/ui/starter-select-ui-handler.ts | 87 ++++++++++++++++--- src/ui/ui.ts | 30 +++++-- 5 files changed, 104 insertions(+), 25 deletions(-) diff --git a/src/test/utils/mocks/mocksContainer/mockContainer.ts b/src/test/utils/mocks/mocksContainer/mockContainer.ts index d2cdd852257..94ae61a6ce4 100644 --- a/src/test/utils/mocks/mocksContainer/mockContainer.ts +++ b/src/test/utils/mocks/mocksContainer/mockContainer.ts @@ -52,9 +52,8 @@ export default class MockContainer implements MockGameObject { /// Sets the position of this Game Object to be a relative position from the source Game Object. } - setInteractive(hitArea?, callback?, dropZone?) { - /// Sets the InteractiveObject to be a drop zone for a drag and drop operation. - } + setInteractive = vi.fn(); + setOrigin(x, y) { this.x = x; this.y = y; diff --git a/src/test/utils/mocks/mocksContainer/mockSprite.ts b/src/test/utils/mocks/mocksContainer/mockSprite.ts index 35cd2d5faab..ae43df46cf5 100644 --- a/src/test/utils/mocks/mocksContainer/mockSprite.ts +++ b/src/test/utils/mocks/mocksContainer/mockSprite.ts @@ -1,5 +1,6 @@ import Phaser from "phaser"; import { MockGameObject } from "../mockGameObject"; +import { vi } from "vitest"; import Sprite = Phaser.GameObjects.Sprite; import Frame = Phaser.Textures.Frame; @@ -101,9 +102,7 @@ export default class MockSprite implements MockGameObject { return this.phaserSprite.stop(); } - setInteractive(hitArea, hitAreaCallback, dropZone) { - return null; - } + setInteractive = vi.fn(); on(event, callback, source) { return this.phaserSprite.on(event, callback, source); diff --git a/src/test/utils/mocks/mocksContainer/mockText.ts b/src/test/utils/mocks/mocksContainer/mockText.ts index 6b9ecf083fd..5a89432902b 100644 --- a/src/test/utils/mocks/mocksContainer/mockText.ts +++ b/src/test/utils/mocks/mocksContainer/mockText.ts @@ -197,6 +197,8 @@ export default class MockText implements MockGameObject { this.color = color; }); + setInteractive = vi.fn(); + setShadowColor(color) { // Sets the shadow color. // return this.phaserText.setShadowColor(color); diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 6b75c46bd45..e1269499b10 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -266,6 +266,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private pokemonPassiveDisabledIcon: Phaser.GameObjects.Sprite; private pokemonPassiveLockedIcon: Phaser.GameObjects.Sprite; + private activeTooltip: "ABILITY" | "PASSIVE" | "CANDY" | undefined; private instructionsContainer: Phaser.GameObjects.Container; private filterInstructionsContainer: Phaser.GameObjects.Container; private shinyIconElement: Phaser.GameObjects.Sprite; @@ -561,10 +562,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127 + starterInfoYOffset, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize }); this.pokemonAbilityLabelText.setOrigin(0, 0); this.pokemonAbilityLabelText.setVisible(false); + this.starterSelectContainer.add(this.pokemonAbilityLabelText); this.pokemonAbilityText = addTextObject(this.scene, starterInfoXPos, 127 + starterInfoYOffset, "", TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize }); this.pokemonAbilityText.setOrigin(0, 0); + this.pokemonAbilityText.setInteractive(new Phaser.Geom.Rectangle(0, 0, 250, 55), Phaser.Geom.Rectangle.Contains); + this.starterSelectContainer.add(this.pokemonAbilityText); this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136 + starterInfoYOffset, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize }); @@ -574,6 +578,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonPassiveText = addTextObject(this.scene, starterInfoXPos, 136 + starterInfoYOffset, "", TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize }); this.pokemonPassiveText.setOrigin(0, 0); + this.pokemonPassiveText.setInteractive(new Phaser.Geom.Rectangle(0, 0, 250, 55), Phaser.Geom.Rectangle.Contains); this.starterSelectContainer.add(this.pokemonPassiveText); this.pokemonPassiveDisabledIcon = this.scene.add.sprite(starterInfoXPos, 137 + starterInfoYOffset, "icon_stop"); @@ -1921,6 +1926,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } } while (newAbilityIndex !== this.abilityCursor); starterAttributes.ability = newAbilityIndex; // store the selected ability + + const { visible: tooltipVisible } = this.scene.ui.getTooltip(); + + if (tooltipVisible && this.activeTooltip === "ABILITY") { + const newAbility = allAbilities[this.lastSpecies.getAbility(newAbilityIndex)]; + this.scene.ui.editTooltip(`${newAbility.name}`, `${newAbility.description}`); + } + this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, newAbilityIndex, undefined); success = true; } @@ -2687,12 +2700,30 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } } + getFriendship(speciesId: number) { + let currentFriendship = this.scene.gameData.starterData[speciesId].friendship; + if (!currentFriendship || currentFriendship === undefined) { + currentFriendship = 0; + } + + const friendshipCap = getStarterValueFriendshipCap(speciesStarters[speciesId]); + + return { currentFriendship, friendshipCap }; + } + setSpecies(species: PokemonSpecies | null) { this.speciesStarterDexEntry = species ? this.scene.gameData.dexData[species.speciesId] : null; this.dexAttrCursor = species ? this.getCurrentDexProps(species.speciesId) : 0n; this.abilityCursor = species ? this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species) : 0; this.natureCursor = species ? this.scene.gameData.getSpeciesDefaultNature(species) : 0; + if (!species && this.scene.ui.getTooltip().visible) { + this.scene.ui.hideTooltip(); + } + + this.pokemonAbilityText.off("pointerover"); + this.pokemonPassiveText.off("pointerover"); + const starterAttributes : StarterAttributes | null = species ? {...this.starterPreferences[species.speciesId]} : null; if (starterAttributes?.nature) { @@ -2807,17 +2838,18 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonHatchedIcon.setVisible(true); this.pokemonHatchedCountText.setVisible(true); - let currentFriendship = this.scene.gameData.starterData[this.lastSpecies.speciesId].friendship; - if (!currentFriendship || currentFriendship === undefined) { - currentFriendship = 0; - } - - const friendshipCap = getStarterValueFriendshipCap(speciesStarters[this.lastSpecies.speciesId]); + const { currentFriendship, friendshipCap } = this.getFriendship(this.lastSpecies.speciesId); const candyCropY = 16 - (16 * (currentFriendship / friendshipCap)); if (this.pokemonCandyDarknessOverlay.visible) { - this.pokemonCandyDarknessOverlay.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip("", `${currentFriendship}/${friendshipCap}`, true)); - this.pokemonCandyDarknessOverlay.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip()); + this.pokemonCandyDarknessOverlay.on("pointerover", () => { + this.scene.ui.showTooltip("", `${currentFriendship}/${friendshipCap}`, true); + this.activeTooltip = "CANDY"; + }); + this.pokemonCandyDarknessOverlay.on("pointerout", () => { + this.scene.ui.hideTooltip(); + this.activeTooltip = undefined; + }); } this.pokemonCandyDarknessOverlay.setCrop(0, 0, 16, candyCropY); @@ -2932,6 +2964,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.abilityCursor = -1; this.natureCursor = -1; + if (this.activeTooltip === "CANDY") { + const { currentFriendship, friendshipCap } = this.getFriendship(this.lastSpecies.speciesId); + this.scene.ui.editTooltip("", `${currentFriendship}/${friendshipCap}`); + } + if (species?.forms?.find(f => f.formKey === "female")) { if (female !== undefined) { formIndex = female ? 1 : 0; @@ -3081,8 +3118,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } if (dexEntry.caughtAttr) { - const ability = this.lastSpecies.getAbility(abilityIndex!); // TODO: is this bang correct? - this.pokemonAbilityText.setText(allAbilities[ability].name); + const ability = allAbilities[this.lastSpecies.getAbility(abilityIndex!)]; // TODO: is this bang correct? + this.pokemonAbilityText.setText(ability.name); const isHidden = abilityIndex === (this.lastSpecies.ability2 ? 2 : 1); this.pokemonAbilityText.setColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD)); @@ -3091,6 +3128,21 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const passiveAttr = this.scene.gameData.starterData[species.speciesId].passiveAttr; const passiveAbility = allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]]; + if (this.pokemonAbilityText.visible) { + if (this.activeTooltip === "ABILITY") { + this.scene.ui.editTooltip(`${ability.name}`, `${ability.description}`); + } + + this.pokemonAbilityText.on("pointerover", () => { + this.scene.ui.showTooltip(`${ability.name}`, `${ability.description}`, true); + this.activeTooltip = "ABILITY"; + }); + this.pokemonAbilityText.on("pointerout", () => { + this.scene.ui.hideTooltip(); + this.activeTooltip = undefined; + }); + } + if (passiveAbility) { const isUnlocked = !!(passiveAttr & PassiveAttr.UNLOCKED); const isEnabled = !!(passiveAttr & PassiveAttr.ENABLED); @@ -3107,6 +3159,21 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonPassiveText.setAlpha(textAlpha); this.pokemonPassiveText.setShadowColor(this.getTextColor(textStyle, true)); + if (this.activeTooltip === "PASSIVE") { + this.scene.ui.editTooltip(`${passiveAbility.name}`, `${passiveAbility.description}`); + } + + if (this.pokemonPassiveText.visible) { + this.pokemonPassiveText.on("pointerover", () => { + this.scene.ui.showTooltip(`${passiveAbility.name}`, `${passiveAbility.description}`, true); + this.activeTooltip = "PASSIVE"; + }); + this.pokemonPassiveText.on("pointerout", () => { + this.scene.ui.hideTooltip(); + this.activeTooltip = undefined; + }); + } + const iconPosition = { x: this.pokemonPassiveText.x + this.pokemonPassiveText.displayWidth + 1, y: this.pokemonPassiveText.y + this.pokemonPassiveText.displayHeight / 2 diff --git a/src/ui/ui.ts b/src/ui/ui.ts index a9bcbbf0cb5..50fb240aad8 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -244,7 +244,7 @@ export default class UI extends Phaser.GameObjects.Container { this.tooltipContent = addTextObject(this.scene, 6, 16, "", TextStyle.TOOLTIP_CONTENT); this.tooltipContent.setName("text-tooltip-content"); - this.tooltipContent.setWordWrapWidth(696); + this.tooltipContent.setWordWrapWidth(850); this.tooltipContainer.add(this.tooltipBg); this.tooltipContainer.add(this.tooltipTitle); @@ -368,14 +368,13 @@ export default class UI extends Phaser.GameObjects.Container { return false; } + getTooltip(): { visible: boolean; title: string; content: string } { + return { visible: this.tooltipContainer.visible, title: this.tooltipTitle.text, content: this.tooltipContent.text }; + } + showTooltip(title: string, content: string, overlap?: boolean): void { this.tooltipContainer.setVisible(true); - this.tooltipTitle.setText(title || ""); - const wrappedContent = this.tooltipContent.runWordWrap(content); - this.tooltipContent.setText(wrappedContent); - this.tooltipContent.y = title ? 16 : 4; - this.tooltipBg.width = Math.min(Math.max(this.tooltipTitle.displayWidth, this.tooltipContent.displayWidth) + 12, 684); - this.tooltipBg.height = (title ? 31 : 19) + 10.5 * (wrappedContent.split("\n").length - 1); + this.editTooltip(title, content); if (overlap) { (this.scene as BattleScene).uiContainer.moveAbove(this.tooltipContainer, this); } else { @@ -383,6 +382,15 @@ export default class UI extends Phaser.GameObjects.Container { } } + editTooltip(title: string, content: string): void { + this.tooltipTitle.setText(title || ""); + const wrappedContent = this.tooltipContent.runWordWrap(content); + this.tooltipContent.setText(wrappedContent); + this.tooltipContent.y = title ? 16 : 4; + this.tooltipBg.width = Math.min(Math.max(this.tooltipTitle.displayWidth, this.tooltipContent.displayWidth) + 12, 838); + this.tooltipBg.height = (title ? 31 : 19) + 10.5 * (wrappedContent.split("\n").length - 1); + } + hideTooltip(): void { this.tooltipContainer.setVisible(false); this.tooltipTitle.clearTint(); @@ -390,8 +398,12 @@ export default class UI extends Phaser.GameObjects.Container { update(): void { if (this.tooltipContainer.visible) { - const reverse = this.scene.game.input.mousePointer && this.scene.game.input.mousePointer.x >= this.scene.game.canvas.width - this.tooltipBg.width * 6 - 12; - this.tooltipContainer.setPosition(!reverse ? this.scene.game.input.mousePointer!.x / 6 + 2 : this.scene.game.input.mousePointer!.x / 6 - this.tooltipBg.width - 2, this.scene.game.input.mousePointer!.y / 6 + 2); // TODO: are these bangs correct? + const xReverse = this.scene.game.input.mousePointer && this.scene.game.input.mousePointer.x >= this.scene.game.canvas.width - this.tooltipBg.width * 6 - 12; + const yReverse = this.scene.game.input.mousePointer && this.scene.game.input.mousePointer.y >= this.scene.game.canvas.height - this.tooltipBg.height * 6 - 12; + this.tooltipContainer.setPosition( + !xReverse ? this.scene.game.input.mousePointer!.x / 6 + 2 : this.scene.game.input.mousePointer!.x / 6 - this.tooltipBg.width - 2, + !yReverse ? this.scene.game.input.mousePointer!.y / 6 + 2 : this.scene.game.input.mousePointer!.y / 6 - this.tooltipBg.height - 2, + ); } } From a82d64b5b5b4705902566484fc643f1ec2852d53 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Tue, 10 Sep 2024 03:41:53 +0800 Subject: [PATCH 80/91] [Ability] Implement Gorilla Tactics (#4051) * fully implement gorilla tactics * fix atk increase * update oversight * add showAbility param * fix postmerge * fix postmerge * update tests --- src/data/ability.ts | 40 +++++++++- src/data/battler-tags.ts | 85 +++++++++++++++++++++- src/enums/battler-tag-type.ts | 1 + src/locales/en/battle.json | 1 + src/test/abilities/gorilla_tactics.test.ts | 84 +++++++++++++++++++++ 5 files changed, 204 insertions(+), 7 deletions(-) create mode 100644 src/test/abilities/gorilla_tactics.test.ts diff --git a/src/data/ability.ts b/src/data/ability.ts index 1304f281285..6acf77cfca5 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1595,8 +1595,8 @@ export class PostAttackAbAttr extends AbAttr { private attackCondition: PokemonAttackCondition; /** The default attackCondition requires that the selected move is a damaging move */ - constructor(attackCondition: PokemonAttackCondition = (user, target, move) => (move.category !== MoveCategory.STATUS)) { - super(); + constructor(attackCondition: PokemonAttackCondition = (user, target, move) => (move.category !== MoveCategory.STATUS), showAbility: boolean = true) { + super(showAbility); this.attackCondition = attackCondition; } @@ -1624,6 +1624,40 @@ export class PostAttackAbAttr extends AbAttr { } } +/** + * Ability attribute for Gorilla Tactics + * @extends PostAttackAbAttr + */ +export class GorillaTacticsAbAttr extends PostAttackAbAttr { + constructor() { + super((user, target, move) => true, false); + } + + /** + * + * @param {Pokemon} pokemon the {@linkcode Pokemon} with this ability + * @param passive n/a + * @param simulated whether the ability is being simulated + * @param defender n/a + * @param move n/a + * @param hitResult n/a + * @param args n/a + * @returns `true` if the ability is applied + */ + applyPostAttackAfterMoveTypeCheck(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean | Promise { + if (simulated) { + return simulated; + } + + if (pokemon.getTag(BattlerTagType.GORILLA_TACTICS)) { + return false; + } + + pokemon.addTag(BattlerTagType.GORILLA_TACTICS); + return true; + } +} + export class PostAttackStealHeldItemAbAttr extends PostAttackAbAttr { private stealCondition: PokemonAttackCondition | null; @@ -5597,7 +5631,7 @@ export function initAbilities() { .bypassFaint() .partial(), new Ability(Abilities.GORILLA_TACTICS, 8) - .unimplemented(), + .attr(GorillaTacticsAbAttr), new Ability(Abilities.NEUTRALIZING_GAS, 8) .attr(SuppressFieldAbilitiesAbAttr) .attr(UncopiableAbilityAbAttr) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 71385facb23..52e039ed874 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -119,7 +119,9 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag { const move = phase.move; if (this.isMoveRestricted(move.moveId)) { - pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId)); + if (this.interruptedText(pokemon, move.moveId)) { + pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId)); + } phase.cancel(); } @@ -155,7 +157,9 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag { * @param {Moves} move {@linkcode Moves} ID of the move being interrupted * @returns {string} text to display when the move is interrupted */ - abstract interruptedText(pokemon: Pokemon, move: Moves): string; + interruptedText(pokemon: Pokemon, move: Moves): string { + return ""; + } } /** @@ -221,7 +225,7 @@ export class DisabledTag extends MoveRestrictionBattlerTag { /** * @override * - * Ensures that move history exists on `pokemon` and has a valid move. If so, sets the {@link moveId} and shows a message. + * Ensures that move history exists on `pokemon` and has a valid move. If so, sets the {@linkcode moveId} and shows a message. * Otherwise the move ID will not get assigned and this tag will get removed next turn. */ override onAdd(pokemon: Pokemon): void { @@ -250,7 +254,12 @@ export class DisabledTag extends MoveRestrictionBattlerTag { return i18next.t("battle:moveDisabled", { moveName: allMoves[move].name }); } - /** @override */ + /** + * @override + * @param {Pokemon} pokemon {@linkcode Pokemon} attempting to use the restricted move + * @param {Moves} move {@linkcode Moves} ID of the move being interrupted + * @returns {string} text to display when the move is interrupted + */ override interruptedText(pokemon: Pokemon, move: Moves): string { return i18next.t("battle:disableInterruptedMove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); } @@ -262,6 +271,72 @@ export class DisabledTag extends MoveRestrictionBattlerTag { } } +/** + * Tag used by Gorilla Tactics to restrict the user to using only one move. + * @extends MoveRestrictionBattlerTag + */ +export class GorillaTacticsTag extends MoveRestrictionBattlerTag { + private moveId = Moves.NONE; + + constructor() { + super(BattlerTagType.GORILLA_TACTICS, BattlerTagLapseType.CUSTOM, 0); + } + + /** @override */ + override isMoveRestricted(move: Moves): boolean { + return move !== this.moveId; + } + + /** + * @override + * @param {Pokemon} pokemon the {@linkcode Pokemon} to check if the tag can be added + * @returns `true` if the pokemon has a valid move and no existing {@linkcode GorillaTacticsTag}; `false` otherwise + */ + override canAdd(pokemon: Pokemon): boolean { + return (this.getLastValidMove(pokemon) !== undefined) && !pokemon.getTag(GorillaTacticsTag); + } + + /** + * Ensures that move history exists on {@linkcode Pokemon} and has a valid move. + * If so, sets the {@linkcode moveId} and increases the user's Attack by 50%. + * @override + * @param {Pokemon} pokemon the {@linkcode Pokemon} to add the tag to + */ + override onAdd(pokemon: Pokemon): void { + const lastValidMove = this.getLastValidMove(pokemon); + + if (!lastValidMove) { + return; + } + + this.moveId = lastValidMove; + pokemon.setStat(Stat.ATK, pokemon.getStat(Stat.ATK, false) * 1.5, false); + } + + /** + * + * @override + * @param {Pokemon} pokemon n/a + * @param {Moves} move {@linkcode Moves} ID of the move being denied + * @returns {string} text to display when the move is denied + */ + override selectionDeniedText(pokemon: Pokemon, move: Moves): string { + return i18next.t("battle:canOnlyUseMove", { moveName: allMoves[this.moveId].name, pokemonName: getPokemonNameWithAffix(pokemon) }); + } + + /** + * Gets the last valid move from the pokemon's move history. + * @param {Pokemon} pokemon {@linkcode Pokemon} to get the last valid move from + * @returns {Moves | undefined} the last valid move from the pokemon's move history + */ + getLastValidMove(pokemon: Pokemon): Moves | undefined { + const move = pokemon.getLastXMoves() + .find(m => m.move !== Moves.NONE && m.move !== Moves.STRUGGLE && !m.virtual); + + return move?.move; + } +} + /** * BattlerTag that represents the "recharge" effects of moves like Hyper Beam. */ @@ -2203,6 +2278,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source return new TarShotTag(); case BattlerTagType.THROAT_CHOPPED: return new ThroatChoppedTag(); + case BattlerTagType.GORILLA_TACTICS: + return new GorillaTacticsTag(); case BattlerTagType.NONE: default: return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); diff --git a/src/enums/battler-tag-type.ts b/src/enums/battler-tag-type.ts index 7d559f32cb3..cb83ebf4882 100644 --- a/src/enums/battler-tag-type.ts +++ b/src/enums/battler-tag-type.ts @@ -73,6 +73,7 @@ export enum BattlerTagType { SHELL_TRAP = "SHELL_TRAP", DRAGON_CHEER = "DRAGON_CHEER", NO_RETREAT = "NO_RETREAT", + GORILLA_TACTICS = "GORILLA_TACTICS", THROAT_CHOPPED = "THROAT_CHOPPED", TAR_SHOT = "TAR_SHOT", } diff --git a/src/locales/en/battle.json b/src/locales/en/battle.json index 0aabaacd99c..217c77422d1 100644 --- a/src/locales/en/battle.json +++ b/src/locales/en/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.", "moveNoPP": "There's no PP left for\nthis move!", "moveDisabled": "{{moveName}} is disabled!", + "canOnlyUseMove": "{{pokemonName}} can only use {{moveName}}!", "moveCannotBeSelected": "{{moveName}} cannot be selected!", "disableInterruptedMove": "{{pokemonNameWithAffix}}'s {{moveName}}\nis disabled!", "throatChopInterruptedMove": "The effects of Throat Chop prevent\n{{pokemonName}} from using certain moves!", diff --git a/src/test/abilities/gorilla_tactics.test.ts b/src/test/abilities/gorilla_tactics.test.ts new file mode 100644 index 00000000000..e772088ea97 --- /dev/null +++ b/src/test/abilities/gorilla_tactics.test.ts @@ -0,0 +1,84 @@ +import { BattlerIndex } from "#app/battle"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { Stat } from "#app/enums/stat"; +import { Abilities } from "#enums/abilities"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Abilities - Gorilla Tactics", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset([Moves.SPLASH, Moves.DISABLE]) + .enemySpecies(Species.MAGIKARP) + .enemyLevel(30) + .moveset([Moves.SPLASH, Moves.TACKLE]) + .ability(Abilities.GORILLA_TACTICS); + }); + + it("boosts the Pokémon's Attack by 50%, but limits the Pokémon to using only one move", async () => { + await game.classicMode.startBattle([Species.GALAR_DARMANITAN]); + + const darmanitan = game.scene.getPlayerPokemon()!; + const initialAtkStat = darmanitan.getStat(Stat.ATK); + + game.move.select(Moves.SPLASH); + await game.forceEnemyMove(Moves.SPLASH); + + await game.phaseInterceptor.to("TurnEndPhase"); + + expect(darmanitan.getStat(Stat.ATK, false)).toBeCloseTo(initialAtkStat * 1.5); + // Other moves should be restricted + expect(darmanitan.isMoveRestricted(Moves.TACKLE)).toBe(true); + expect(darmanitan.isMoveRestricted(Moves.SPLASH)).toBe(false); + }, TIMEOUT); + + it("should struggle if the only usable move is disabled", async () => { + await game.classicMode.startBattle([Species.GALAR_DARMANITAN]); + + const darmanitan = game.scene.getPlayerPokemon()!; + const enemy = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.SPLASH); + + await game.phaseInterceptor.to("TurnEndPhase"); + + // Turn where Tackle is interrupted by Disable + await game.toNextTurn(); + + game.move.select(Moves.SPLASH); + await game.forceEnemyMove(Moves.DISABLE); + + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.hp).toBe(enemy.getMaxHp()); + + // Turn where Struggle is used + await game.toNextTurn(); + + game.move.select(Moves.TACKLE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(darmanitan.hp).toBeLessThan(darmanitan.getMaxHp()); + }, TIMEOUT); +}); From d9a8448c6eb898cd55710aced996e12199906024 Mon Sep 17 00:00:00 2001 From: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Date: Mon, 9 Sep 2024 21:57:07 +0200 Subject: [PATCH 81/91] [Enhancement] Added the ability to localize the tera type hover text (#4138) --- src/locales/de/fight-ui-handler.json | 3 ++- src/locales/en/fight-ui-handler.json | 3 ++- src/ui/battle-info.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/locales/de/fight-ui-handler.json b/src/locales/de/fight-ui-handler.json index 6965540c703..f803375e8de 100644 --- a/src/locales/de/fight-ui-handler.json +++ b/src/locales/de/fight-ui-handler.json @@ -3,5 +3,6 @@ "power": "Stärke", "accuracy": "Genauigkeit", "abilityFlyInText": "{{passive}}{{abilityName}} von {{pokemonName}} wirkt!", - "passive": "Passive Fähigkeit " + "passive": "Passive Fähigkeit ", + "teraHover": "Tera-Typ {{type}}" } \ No newline at end of file diff --git a/src/locales/en/fight-ui-handler.json b/src/locales/en/fight-ui-handler.json index 35b7f42772a..1b8bd1f5c71 100644 --- a/src/locales/en/fight-ui-handler.json +++ b/src/locales/en/fight-ui-handler.json @@ -3,5 +3,6 @@ "power": "Power", "accuracy": "Accuracy", "abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}", - "passive": "Passive " + "passive": "Passive ", + "teraHover": "{{type}} Terastallized" } \ No newline at end of file diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 05c634609f8..c7b82dc826e 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -323,7 +323,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { this.teraIcon.setVisible(this.lastTeraType !== Type.UNKNOWN); this.teraIcon.on("pointerover", () => { if (this.lastTeraType !== Type.UNKNOWN) { - (this.scene as BattleScene).ui.showTooltip("", `${Utils.toReadableString(Type[this.lastTeraType])} Terastallized`); + (this.scene as BattleScene).ui.showTooltip("", i18next.t("fightUiHandler:teraHover", {type: i18next.t(`pokemonInfo:Type.${Type[this.lastTeraType]}`) })); } }); this.teraIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip()); From e9595954710669526350a04ac2889d34a60016d8 Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Tue, 10 Sep 2024 04:03:29 +0800 Subject: [PATCH 82/91] [Test] Fix throat chop and gorilla tactics tests (#4140) --- src/test/abilities/gorilla_tactics.test.ts | 17 ++++++++--------- src/test/moves/throat_chop.test.ts | 6 ++++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/test/abilities/gorilla_tactics.test.ts b/src/test/abilities/gorilla_tactics.test.ts index e772088ea97..df698194323 100644 --- a/src/test/abilities/gorilla_tactics.test.ts +++ b/src/test/abilities/gorilla_tactics.test.ts @@ -30,7 +30,7 @@ describe("Abilities - Gorilla Tactics", () => { .enemyMoveset([Moves.SPLASH, Moves.DISABLE]) .enemySpecies(Species.MAGIKARP) .enemyLevel(30) - .moveset([Moves.SPLASH, Moves.TACKLE]) + .moveset([Moves.SPLASH, Moves.TACKLE, Moves.GROWL]) .ability(Abilities.GORILLA_TACTICS); }); @@ -57,22 +57,21 @@ describe("Abilities - Gorilla Tactics", () => { const darmanitan = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; - game.move.select(Moves.SPLASH); + // First turn, lock move to Growl + game.move.select(Moves.GROWL); + await game.forceEnemyMove(Moves.SPLASH); - await game.phaseInterceptor.to("TurnEndPhase"); - - // Turn where Tackle is interrupted by Disable + // Second turn, Growl is interrupted by Disable await game.toNextTurn(); - game.move.select(Moves.SPLASH); + game.move.select(Moves.GROWL); await game.forceEnemyMove(Moves.DISABLE); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase"); - expect(enemy.hp).toBe(enemy.getMaxHp()); + expect(enemy.getStatStage(Stat.ATK)).toBe(-1); // Only the effect of the first Growl should be applied - // Turn where Struggle is used + // Third turn, Struggle is used await game.toNextTurn(); game.move.select(Moves.TACKLE); diff --git a/src/test/moves/throat_chop.test.ts b/src/test/moves/throat_chop.test.ts index 151aec58b38..cb34b4bafff 100644 --- a/src/test/moves/throat_chop.test.ts +++ b/src/test/moves/throat_chop.test.ts @@ -36,12 +36,14 @@ describe("Moves - Throat Chop", () => { it("prevents the target from using sound-based moves for two turns", async () => { await game.classicMode.startBattle([Species.MAGIKARP]); + const enemy = game.scene.getEnemyPokemon()!; + game.move.select(Moves.GROWL); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); // First turn, move is interrupted await game.phaseInterceptor.to("TurnEndPhase"); - expect(game.scene.getPlayerPokemon()?.getStatStage(Stat.ATK)).toBe(0); + expect(enemy.getStatStage(Stat.ATK)).toBe(0); // Second turn, struggle if no valid moves await game.toNextTurn(); @@ -50,6 +52,6 @@ describe("Moves - Throat Chop", () => { await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("MoveEndPhase"); - expect(game.scene.getEnemyPokemon()!.isFullHp()).toBe(false); + expect(enemy.isFullHp()).toBe(false); }, TIMEOUT); }); From a919b9c0afc0ea3d49af2aff00bfb503ccc497fe Mon Sep 17 00:00:00 2001 From: Raidette <73134872+Raidette@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:35:04 +0200 Subject: [PATCH 83/91] [Move] Implement After You (#1789) * Complete after you implementation (no localization) * reset override changes * Remove hardcoded English text, add tests * Fix test * Make sure phases occur in the correct order * fix after-you issues - fix i18n interpolation ot state "target name" and not "pokemon name" as the target takes the offer, not the user - fix some tsdocs - add override to apply - update scene.findPhase to be able to use generic types. Add tsdocs * add move-trigger.afterYou for DE * fix after_you.test.ts --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/battle-scene.ts | 10 ++++- src/data/move.ts | 35 ++++++++++++++++- src/locales/de/move-trigger.json | 3 +- src/locales/en/move-trigger.json | 5 ++- src/test/moves/after_you.test.ts | 65 ++++++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+), 6 deletions(-) create mode 100644 src/test/moves/after_you.test.ts diff --git a/src/battle-scene.ts b/src/battle-scene.ts index ff4258a13f5..72778fa8589 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2193,8 +2193,14 @@ export default class BattleScene extends SceneBase { return true; } - findPhase(phaseFilter: (phase: Phase) => boolean): Phase | undefined { - return this.phaseQueue.find(phaseFilter); + /** + * Find a specific {@linkcode Phase} in the phase queue. + * + * @param phaseFilter filter function to use to find the wanted phase + * @returns the found phase or undefined if none found + */ + findPhase

(phaseFilter: (phase: P) => boolean): P | undefined { + return this.phaseQueue.find(phaseFilter) as P; } tryReplacePhase(phaseFilter: (phase: Phase) => boolean, phase: Phase): boolean { diff --git a/src/data/move.ts b/src/data/move.ts index d9e385fdd0e..7800d6df12a 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -6272,12 +6272,42 @@ export class VariableTargetAttr extends MoveAttr { } } +/** + * Attribute for {@linkcode Moves.AFTER_YOU} + * + * [After You - Move | Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/After_You_(move)) + */ +export class AfterYouAttr extends MoveEffectAttr { + /** + * Allows the target of this move to act right after the user. + * + * @param user {@linkcode Pokemon} that is using the move. + * @param target {@linkcode Pokemon} that will move right after this move is used. + * @param move {@linkcode Move} {@linkcode Moves.AFTER_YOU} + * @param _args N/A + * @returns true + */ + override apply(user: Pokemon, target: Pokemon, _move: Move, _args: any[]): boolean { + user.scene.queueMessage(i18next.t("moveTriggers:afterYou", {targetName: getPokemonNameWithAffix(target)})); + + //Will find next acting phase of the targeted pokémon, delete it and queue it next on successful delete. + const nextAttackPhase = target.scene.findPhase((phase) => phase.pokemon === target); + if (nextAttackPhase && target.scene.tryRemovePhase((phase: MovePhase) => phase.pokemon === target)) { + target.scene.prependToPhase(new MovePhase(target.scene, target, [...nextAttackPhase.targets], nextAttackPhase.move), MovePhase); + } + + return true; + } +} + const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY); const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune(); const failOnMaxCondition: MoveConditionFunc = (user, target, move) => !target.isMax(); +const failIfSingleBattle: MoveConditionFunc = (user, target, move) => user.scene.currentBattle.double; + const failIfDampCondition: MoveConditionFunc = (user, target, move) => { const cancelled = new Utils.BooleanHolder(false); user.scene.getField(true).map(p=>applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled)); @@ -7925,7 +7955,10 @@ export function initMoves() { .attr(AbilityGiveAttr), new StatusMove(Moves.AFTER_YOU, Type.NORMAL, -1, 15, -1, 0, 5) .ignoresProtect() - .unimplemented(), + .target(MoveTarget.NEAR_OTHER) + .condition(failIfSingleBattle) + .condition((user, target, move) => !target.turnData.acted) + .attr(AfterYouAttr), new AttackMove(Moves.ROUND, Type.NORMAL, MoveCategory.SPECIAL, 60, 100, 15, -1, 0, 5) .soundBased() .partial(), diff --git a/src/locales/de/move-trigger.json b/src/locales/de/move-trigger.json index 61283c9e62e..01b22429fb3 100644 --- a/src/locales/de/move-trigger.json +++ b/src/locales/de/move-trigger.json @@ -66,5 +66,6 @@ "revivalBlessing": "{{pokemonName}} ist wieder fit und kampfbereit!", "swapArenaTags": "{{pokemonName}} hat die Effekte, die auf den beiden Seiten des Kampffeldes wirken, miteinander getauscht!", "exposedMove": "{{pokemonName}} erkennt {{targetPokemonName}}!", - "safeguard": "{{targetName}} wird durch Bodyguard geschützt!" + "safeguard": "{{targetName}} wird durch Bodyguard geschützt!", + "afterYou": "{{targetName}} lässt sich auf Galanterie ein!" } diff --git a/src/locales/en/move-trigger.json b/src/locales/en/move-trigger.json index 867905c5a9f..375ea354d33 100644 --- a/src/locales/en/move-trigger.json +++ b/src/locales/en/move-trigger.json @@ -67,5 +67,6 @@ "revivalBlessing": "{{pokemonName}} was revived!", "swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!", "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!", - "safeguard": "{{targetName}} is protected by Safeguard!" -} \ No newline at end of file + "safeguard": "{{targetName}} is protected by Safeguard!", + "afterYou": "{{pokemonName}} took the kind offer!" +} diff --git a/src/test/moves/after_you.test.ts b/src/test/moves/after_you.test.ts new file mode 100644 index 00000000000..efce1b28a17 --- /dev/null +++ b/src/test/moves/after_you.test.ts @@ -0,0 +1,65 @@ +import { BattlerIndex } from "#app/battle"; +import { Abilities } from "#app/enums/abilities"; +import { MoveResult } from "#app/field/pokemon"; +import { MovePhase } from "#app/phases/move-phase"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +const TIMEOUT = 20 * 1000; + +describe("Moves - After You", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("double") + .enemyLevel(5) + .enemySpecies(Species.PIKACHU) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(Moves.SPLASH) + .ability(Abilities.BALL_FETCH) + .moveset([Moves.AFTER_YOU, Moves.SPLASH]); + }); + + it("makes the target move immediately after the user", async () => { + await game.classicMode.startBattle([Species.REGIELEKI, Species.SHUCKLE]); + + game.move.select(Moves.AFTER_YOU, 0, BattlerIndex.PLAYER_2); + game.move.select(Moves.SPLASH, 1); + + await game.phaseInterceptor.to("MoveEffectPhase"); + await game.phaseInterceptor.to(MovePhase, false); + const phase = game.scene.getCurrentPhase() as MovePhase; + expect(phase.pokemon).toBe(game.scene.getPlayerField()[1]); + await game.phaseInterceptor.to("MoveEndPhase"); + }, TIMEOUT); + + it("fails if target already moved", async () => { + game.override.enemySpecies(Species.SHUCKLE); + await game.classicMode.startBattle([Species.REGIELEKI, Species.PIKACHU]); + + game.move.select(Moves.SPLASH); + game.move.select(Moves.AFTER_YOU, 1, BattlerIndex.PLAYER); + + await game.phaseInterceptor.to("MoveEndPhase"); + await game.phaseInterceptor.to("MoveEndPhase"); + await game.phaseInterceptor.to(MovePhase); + + expect(game.scene.getPlayerField()[1].getLastXMoves(1)[0].result).toBe(MoveResult.FAIL); + }, TIMEOUT); +}); From 9c4c19b5fb1870911e420f692644374ed1c6fe97 Mon Sep 17 00:00:00 2001 From: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:12:17 +0200 Subject: [PATCH 84/91] [UI Bug] Fix HA icon not always showing in egg summary screen (#4150) --- src/ui/egg-summary-ui-handler.ts | 104 +++++++++++++++++-------------- src/ui/pokemon-info-container.ts | 2 +- 2 files changed, 57 insertions(+), 49 deletions(-) diff --git a/src/ui/egg-summary-ui-handler.ts b/src/ui/egg-summary-ui-handler.ts index af82ab33438..1d18e75f530 100644 --- a/src/ui/egg-summary-ui-handler.ts +++ b/src/ui/egg-summary-ui-handler.ts @@ -29,8 +29,10 @@ export default class EggSummaryUiHandler extends MessageUiHandler { private summaryContainer: Phaser.GameObjects.Container; /** container for the mini pokemon sprites */ private pokemonIconSpritesContainer: Phaser.GameObjects.Container; - /** container for the icons displayed alongside the mini icons (e.g. shiny, HA capsule) */ + /** container for the icons displayed on top of the mini pokemon sprites (e.g. shiny, HA capsule) */ private pokemonIconsContainer: Phaser.GameObjects.Container; + /** container for the elements displayed behind the mini pokemon sprites (e.g. egg rarity bg) */ + private pokemonBackgroundContainer: Phaser.GameObjects.Container; /** hatch info container that displays the current pokemon / hatch (main element on left hand side) */ private infoContainer: PokemonHatchInfoContainer; /** handles jumping animations for the pokemon sprite icons */ @@ -71,15 +73,17 @@ export default class EggSummaryUiHandler extends MessageUiHandler { this.eggHatchBg.setOrigin(0, 0); this.eggHatchContainer.add(this.eggHatchBg); - this.pokemonIconsContainer = this.scene.add.container(iconContainerX, iconContainerY); - this.pokemonIconSpritesContainer = this.scene.add.container(iconContainerX, iconContainerY); - this.summaryContainer.add(this.pokemonIconsContainer); - this.summaryContainer.add(this.pokemonIconSpritesContainer); - this.cursorObj = this.scene.add.image(0, 0, "select_cursor"); this.cursorObj.setOrigin(0, 0); this.summaryContainer.add(this.cursorObj); + this.pokemonIconSpritesContainer = this.scene.add.container(iconContainerX, iconContainerY); + this.pokemonIconsContainer = this.scene.add.container(iconContainerX, iconContainerY); + this.pokemonBackgroundContainer = this.scene.add.container(iconContainerX, iconContainerY); + this.summaryContainer.add(this.pokemonBackgroundContainer); + this.summaryContainer.add(this.pokemonIconSpritesContainer); + this.summaryContainer.add(this.pokemonIconsContainer); + this.infoContainer = new PokemonHatchInfoContainer(this.scene, this.summaryContainer); this.infoContainer.setup(); this.infoContainer.changeToEggSummaryLayout(); @@ -95,6 +99,7 @@ export default class EggSummaryUiHandler extends MessageUiHandler { this.summaryContainer.setVisible(false); this.pokemonIconSpritesContainer.removeAll(true); this.pokemonIconsContainer.removeAll(true); + this.pokemonBackgroundContainer.removeAll(true); this.eggHatchBg.setVisible(false); this.getUi().hideTooltip(); // Note: Questions on garbage collection go to @frutescens @@ -164,25 +169,25 @@ export default class EggSummaryUiHandler extends MessageUiHandler { const offset = 2; const rightSideX = 12; - const bg = this.scene.add.image(x+2, y+5, "passive_bg"); - bg.setOrigin(0, 0); - bg.setScale(0.75); - bg.setVisible(true); - this.pokemonIconsContainer.add(bg); + const rarityBg = this.scene.add.image(x + 2, y + 5, "passive_bg"); + rarityBg.setOrigin(0, 0); + rarityBg.setScale(0.75); + rarityBg.setVisible(true); + this.pokemonBackgroundContainer.add(rarityBg); // set tint for passive bg switch (getEggTierForSpecies(displayPokemon.species)) { case EggTier.COMMON: - bg.setVisible(false); + rarityBg.setVisible(false); break; case EggTier.GREAT: - bg.setTint(0xabafff); + rarityBg.setTint(0xabafff); break; case EggTier.ULTRA: - bg.setTint(0xffffaa); + rarityBg.setTint(0xffffaa); break; case EggTier.MASTER: - bg.setTint(0xdfffaf); + rarityBg.setTint(0xdfffaf); break; } const species = displayPokemon.species; @@ -192,35 +197,31 @@ export default class EggSummaryUiHandler extends MessageUiHandler { const isShiny = displayPokemon.shiny; // set pokemon icon (and replace with base sprite if there is a mismatch) - const icon = this.scene.add.sprite(x - offset, y + offset, species.getIconAtlasKey(formIndex, isShiny, variant)); - icon.setScale(0.5); - icon.setOrigin(0, 0); - icon.setFrame(species.getIconId(female, formIndex, isShiny, variant)); + const pokemonIcon = this.scene.add.sprite(x - offset, y + offset, species.getIconAtlasKey(formIndex, isShiny, variant)); + pokemonIcon.setScale(0.5); + pokemonIcon.setOrigin(0, 0); + pokemonIcon.setFrame(species.getIconId(female, formIndex, isShiny, variant)); - if (icon.frame.name !== species.getIconId(female, formIndex, isShiny, variant)) { + if (pokemonIcon.frame.name !== species.getIconId(female, formIndex, isShiny, variant)) { console.log(`${species.name}'s variant icon does not exist. Replacing with default.`); - icon.setTexture(species.getIconAtlasKey(formIndex, false, variant)); - icon.setFrame(species.getIconId(female, formIndex, false, variant)); + pokemonIcon.setTexture(species.getIconAtlasKey(formIndex, false, variant)); + pokemonIcon.setFrame(species.getIconId(female, formIndex, false, variant)); } - this.pokemonIconSpritesContainer.add(icon); - this.iconAnimHandler.addOrUpdate(icon, PokemonIconAnimMode.NONE); + this.pokemonIconSpritesContainer.add(pokemonIcon); - const shiny = this.scene.add.image(x + rightSideX, y + offset * 2, "shiny_star_small"); - shiny.setScale(0.5); - shiny.setVisible(displayPokemon.shiny); - shiny.setTint(getVariantTint(displayPokemon.variant)); - this.pokemonIconsContainer.add(shiny); + const shinyIcon = this.scene.add.image(x + rightSideX, y + offset, "shiny_star_small"); + shinyIcon.setOrigin(0, 0); + shinyIcon.setScale(0.5); + shinyIcon.setVisible(displayPokemon.shiny); + shinyIcon.setTint(getVariantTint(displayPokemon.variant)); + this.pokemonIconsContainer.add(shinyIcon); - const ha = this.scene.add.image(x + rightSideX, y + 7, "ha_capsule"); - ha.setScale(0.5); - ha.setVisible((displayPokemon.hasAbility(displayPokemon.species.abilityHidden))); - this.pokemonIconsContainer.add(ha); + const haIcon = this.scene.add.image(x + rightSideX, y + offset * 4, "ha_capsule"); + haIcon.setOrigin(0, 0); + haIcon.setScale(0.5); + haIcon.setVisible(displayPokemon.abilityIndex === 2); + this.pokemonIconsContainer.add(haIcon); - const pb = this.scene.add.image(x + rightSideX, y + offset * 7, "icon_owned"); - pb.setOrigin(0, 0); - pb.setScale(0.5); - - // add animation for new unlocks (new catch or new shiny or new form) const dexEntry = value.dexEntryBeforeUpdate; const caughtAttr = dexEntry.caughtAttr; const newShiny = BigInt(1 << (displayPokemon.shiny ? 1 : 0)); @@ -228,17 +229,24 @@ export default class EggSummaryUiHandler extends MessageUiHandler { const newShinyOrVariant = ((newShiny & caughtAttr) === BigInt(0)) || ((newVariant & caughtAttr) === BigInt(0)); const newForm = (BigInt(1 << displayPokemon.formIndex) * DexAttr.DEFAULT_FORM & caughtAttr) === BigInt(0); - pb.setVisible(!caughtAttr || newForm); - if (!caughtAttr || newShinyOrVariant || newForm) { - this.iconAnimHandler.addOrUpdate(icon, PokemonIconAnimMode.PASSIVE); - } - this.pokemonIconsContainer.add(pb); + const pokeballIcon = this.scene.add.image(x + rightSideX, y + offset * 7, "icon_owned"); + pokeballIcon.setOrigin(0, 0); + pokeballIcon.setScale(0.5); + pokeballIcon.setVisible(!caughtAttr || newForm); + this.pokemonIconsContainer.add(pokeballIcon); - const em = this.scene.add.image(x, y + offset, "icon_egg_move"); - em.setOrigin(0, 0); - em.setScale(0.5); - em.setVisible(value.eggMoveUnlocked); - this.pokemonIconsContainer.add(em); + const eggMoveIcon = this.scene.add.image(x, y + offset, "icon_egg_move"); + eggMoveIcon.setOrigin(0, 0); + eggMoveIcon.setScale(0.5); + eggMoveIcon.setVisible(value.eggMoveUnlocked); + this.pokemonIconsContainer.add(eggMoveIcon); + + // add animation to the Pokemon sprite for new unlocks (new catch, new shiny or new form) + if (!caughtAttr || newShinyOrVariant || newForm) { + this.iconAnimHandler.addOrUpdate(pokemonIcon, PokemonIconAnimMode.PASSIVE); + } else { + this.iconAnimHandler.addOrUpdate(pokemonIcon, PokemonIconAnimMode.NONE); + } }); this.setCursor(0); diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index 49bfd4d7293..3c54e529d43 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -262,7 +262,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.pokemonFormText.disableInteractive(); } - const abilityTextStyle = pokemon.abilityIndex === (pokemon.species.ability2 ? 2 : 1) ? TextStyle.MONEY : TextStyle.WINDOW; + const abilityTextStyle = pokemon.abilityIndex === 2 ? TextStyle.MONEY : TextStyle.WINDOW; this.pokemonAbilityText.setText(pokemon.getAbility(true).name); this.pokemonAbilityText.setColor(getTextColor(abilityTextStyle, false, this.scene.uiTheme)); this.pokemonAbilityText.setShadowColor(getTextColor(abilityTextStyle, true, this.scene.uiTheme)); From 4b8083211ab114c94d7f194494a168bf353647b1 Mon Sep 17 00:00:00 2001 From: Madmadness65 <59298170+Madmadness65@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:13:16 -0500 Subject: [PATCH 85/91] [P3 Bug] Fix Transform SFX not playing on quiet form changes (#4144) --- src/phases/quiet-form-change-phase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phases/quiet-form-change-phase.ts b/src/phases/quiet-form-change-phase.ts index 6a1d31d137d..dde500e156a 100644 --- a/src/phases/quiet-form-change-phase.ts +++ b/src/phases/quiet-form-change-phase.ts @@ -65,7 +65,7 @@ export class QuietFormChangePhase extends BattlePhase { pokemonFormTintSprite.setVisible(false); pokemonFormTintSprite.setTintFill(0xFFFFFF); - this.scene.playSound("PRSFX- Transform"); + this.scene.playSound("battle_anims/PRSFX- Transform"); this.scene.tweens.add({ targets: pokemonTintSprite, From 5bf21a4f7519d2a8850e6ea5b4c7e12b9d89909d Mon Sep 17 00:00:00 2001 From: PigeonBar <56974298+PigeonBar@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:15:07 -0400 Subject: [PATCH 86/91] [Bug] Fix rare egg move and species rates for Manaphy eggs (#4125) --- src/data/egg.ts | 12 ++- src/test/eggs/manaphy-egg.test.ts | 118 ++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 src/test/eggs/manaphy-egg.test.ts diff --git a/src/data/egg.ts b/src/data/egg.ts index ce27030ebef..1cd5c65fc18 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -222,7 +222,7 @@ export class Egg { let pokemonSpecies = getPokemonSpecies(this._species); // Special condition to have Phione eggs also have a chance of generating Manaphy - if (this._species === Species.PHIONE) { + if (this._species === Species.PHIONE && this._sourceType === EggSourceType.SAME_SPECIES_EGG) { pokemonSpecies = getPokemonSpecies(Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) ? Species.PHIONE : Species.MANAPHY); } @@ -326,7 +326,8 @@ export class Egg { break; } - return Utils.randSeedInt(baseChance * Math.pow(2, 3 - this.tier)) ? Utils.randSeedInt(3) : 3; + const tierMultiplier = this.isManaphyEgg() ? 2 : Math.pow(2, 3 - this.tier); + return Utils.randSeedInt(baseChance * tierMultiplier) ? Utils.randSeedInt(3) : 3; } private getEggTierDefaultHatchWaves(eggTier?: EggTier): number { @@ -361,7 +362,12 @@ export class Egg { * the species that was the legendary focus at the time */ if (this.isManaphyEgg()) { - const rand = Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE); + /** + * Adding a technicality to make unit tests easier: By making this check pass + * when Utils.randSeedInt(8) = 1, and by making the generatePlayerPokemon() species + * check pass when Utils.randSeedInt(8) = 0, we can tell them apart during tests. + */ + const rand = (Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) !== 1); return rand ? Species.PHIONE : Species.MANAPHY; } else if (this.tier === EggTier.MASTER && this._sourceType === EggSourceType.GACHA_LEGENDARY) { diff --git a/src/test/eggs/manaphy-egg.test.ts b/src/test/eggs/manaphy-egg.test.ts new file mode 100644 index 00000000000..257bf330bb8 --- /dev/null +++ b/src/test/eggs/manaphy-egg.test.ts @@ -0,0 +1,118 @@ +import { Egg } from "#app/data/egg"; +import { EggSourceType } from "#app/enums/egg-source-types"; +import { EggTier } from "#app/enums/egg-type"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Manaphy Eggs", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const EGG_HATCH_COUNT: integer = 48; + let rngSweepProgress: number = 0; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + game = new GameManager(phaserGame); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + vi.restoreAllMocks(); + }); + + beforeEach(async () => { + await game.importData("src/test/utils/saves/everything.prsv"); + + /** + * In our tests, we will perform an "RNG sweep" by letting rngSweepProgress + * increase uniformly from 0 to 1 in order to get a uniform sample of the + * possible RNG outcomes. This will let us quickly and consistently find + * the probability of each RNG outcome. + */ + vi.spyOn(Phaser.Math.RND, "realInRange").mockImplementation((min: number, max: number) => { + return rngSweepProgress * (max - min) + min; + }); + }); + + it("should have correct Manaphy rates and Rare Egg Move rates, from the egg gacha", () => { + const scene = game.scene; + + let manaphyCount = 0; + let phioneCount = 0; + let rareEggMoveCount = 0; + for (let i = 0; i < EGG_HATCH_COUNT; i++) { + rngSweepProgress = (2 * i + 1) / (2 * EGG_HATCH_COUNT); + + const newEgg = new Egg({ scene, tier: EggTier.COMMON, sourceType: EggSourceType.GACHA_SHINY, id: 204 }); + const newHatch = newEgg.generatePlayerPokemon(scene); + if (newHatch.species.speciesId === Species.MANAPHY) { + manaphyCount++; + } else if (newHatch.species.speciesId === Species.PHIONE) { + phioneCount++; + } + if (newEgg.eggMoveIndex === 3) { + rareEggMoveCount++; + } + } + + expect(manaphyCount + phioneCount).toBe(EGG_HATCH_COUNT); + expect(manaphyCount).toBe(1/8 * EGG_HATCH_COUNT); + expect(rareEggMoveCount).toBe(1/12 * EGG_HATCH_COUNT); + }); + + it("should have correct Manaphy rates and Rare Egg Move rates, from Phione species eggs", () => { + const scene = game.scene; + + let manaphyCount = 0; + let phioneCount = 0; + let rareEggMoveCount = 0; + for (let i = 0; i < EGG_HATCH_COUNT; i++) { + rngSweepProgress = (2 * i + 1) / (2 * EGG_HATCH_COUNT); + + const newEgg = new Egg({ scene, species: Species.PHIONE, sourceType: EggSourceType.SAME_SPECIES_EGG }); + const newHatch = newEgg.generatePlayerPokemon(scene); + if (newHatch.species.speciesId === Species.MANAPHY) { + manaphyCount++; + } else if (newHatch.species.speciesId === Species.PHIONE) { + phioneCount++; + } + if (newEgg.eggMoveIndex === 3) { + rareEggMoveCount++; + } + } + + expect(manaphyCount + phioneCount).toBe(EGG_HATCH_COUNT); + expect(manaphyCount).toBe(1/8 * EGG_HATCH_COUNT); + expect(rareEggMoveCount).toBe(1/6 * EGG_HATCH_COUNT); + }); + + it("should have correct Manaphy rates and Rare Egg Move rates, from Manaphy species eggs", () => { + const scene = game.scene; + + let manaphyCount = 0; + let phioneCount = 0; + let rareEggMoveCount = 0; + for (let i = 0; i < EGG_HATCH_COUNT; i++) { + rngSweepProgress = (2 * i + 1) / (2 * EGG_HATCH_COUNT); + + const newEgg = new Egg({ scene, species: Species.MANAPHY, sourceType: EggSourceType.SAME_SPECIES_EGG }); + const newHatch = newEgg.generatePlayerPokemon(scene); + if (newHatch.species.speciesId === Species.MANAPHY) { + manaphyCount++; + } else if (newHatch.species.speciesId === Species.PHIONE) { + phioneCount++; + } + if (newEgg.eggMoveIndex === 3) { + rareEggMoveCount++; + } + } + + expect(phioneCount).toBe(0); + expect(manaphyCount).toBe(EGG_HATCH_COUNT); + expect(rareEggMoveCount).toBe(1/6 * EGG_HATCH_COUNT); + }); +}); From 150ab3d1b29a7191bfef6d2107e3ffe43a38aa54 Mon Sep 17 00:00:00 2001 From: AJ Fontaine <36677462+Fontbane@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:54:23 -0400 Subject: [PATCH 87/91] [UI/UX] Make "CH-CHING!" sound when unlocking passive (#4151) * Make "CH-CHING!" sound when unlocking passive * Remove unused parameters in line above sound --- src/ui/starter-select-ui-handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index e1269499b10..89f1b87bcf4 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1724,7 +1724,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } }); ui.setMode(Mode.STARTER_SELECT); - this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined, undefined); + this.setSpeciesDetails(this.lastSpecies); + this.scene.playSound("se/buy"); // if starterContainer exists, update the passive background if (starterContainer) { From d1b058fe3e4224343283a74e44d98589d6702a20 Mon Sep 17 00:00:00 2001 From: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:00:50 +0200 Subject: [PATCH 88/91] [UI] fix candy upgrade icon not updating after purchasing eggs (#4153) --- src/ui/starter-select-ui-handler.ts | 53 +++++++++++++++++------------ 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 89f1b87bcf4..0c3d8de61b0 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1220,6 +1220,19 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } } + /** + * Update the display of candy upgrade icons or animations for the given StarterContainer + * @param starterContainer the container for the Pokemon to update + */ + updateCandyUpgradeDisplay(starterContainer: StarterContainer) { + if (this.isUpgradeIconEnabled() ) { + this.setUpgradeIcon(starterContainer); + } + if (this.isUpgradeAnimationEnabled()) { + this.setUpgradeAnimation(starterContainer.icon, this.lastSpecies, true); + } + } + /** * Processes an {@linkcode CandyUpgradeNotificationChangedEvent} sent when the corresponding setting changes * @param event {@linkcode Event} sent by the callback @@ -1624,7 +1637,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } }); } - const candyCount = starterData.candyCount; + const passiveAttr = starterData.passiveAttr; if (passiveAttr & PassiveAttr.UNLOCKED) { // this is for enabling and disabling the passive if (!(passiveAttr & PassiveAttr.ENABLED)) { @@ -1705,8 +1718,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return true; } }); - const showUseCandies = () => { // this lets you use your candies + + // Purchases with Candy + const candyCount = starterData.candyCount; + const showUseCandies = () => { const options: any[] = []; // TODO: add proper type + + // Unlock passive option if (!(passiveAttr & PassiveAttr.UNLOCKED)) { const passiveCost = getPassiveCandyCount(speciesStarters[this.lastSpecies.speciesId]); options.push({ @@ -1727,16 +1745,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.setSpeciesDetails(this.lastSpecies); this.scene.playSound("se/buy"); - // if starterContainer exists, update the passive background + // update the passive background and icon/animation for available upgrade if (starterContainer) { - // Update the candy upgrade display - if (this.isUpgradeIconEnabled() ) { - this.setUpgradeIcon(starterContainer); - } - if (this.isUpgradeAnimationEnabled()) { - this.setUpgradeAnimation(starterContainer.icon, this.lastSpecies, true); - } - + this.updateCandyUpgradeDisplay(starterContainer); starterContainer.starterPassiveBgs.setVisible(!!this.scene.gameData.starterData[this.lastSpecies.speciesId].passiveAttr); } return true; @@ -1747,6 +1758,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { itemArgs: starterColors[this.lastSpecies.speciesId] }); } + + // Reduce cost option const valueReduction = starterData.valueReduction; if (valueReduction < valueReductionMax) { const reductionCost = getValueReductionCandyCounts(speciesStarters[this.lastSpecies.speciesId])[valueReduction]; @@ -1768,19 +1781,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler { ui.setMode(Mode.STARTER_SELECT); this.scene.playSound("se/buy"); - // if starterContainer exists, update the value reduction background + // update the value label and icon/animation for available upgrade if (starterContainer) { this.updateStarterValueLabel(starterContainer); - - // If the notification setting is set to 'On', update the candy upgrade display - if (this.scene.candyUpgradeNotification === 2) { - if (this.isUpgradeIconEnabled() ) { - this.setUpgradeIcon(starterContainer); - } - if (this.isUpgradeAnimationEnabled()) { - this.setUpgradeAnimation(starterContainer.icon, this.lastSpecies, true); - } - } + this.updateCandyUpgradeDisplay(starterContainer); } return true; } @@ -1813,6 +1817,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler { ui.setMode(Mode.STARTER_SELECT); this.scene.playSound("se/buy"); + // update the icon/animation for available upgrade + if (starterContainer) { + this.updateCandyUpgradeDisplay(starterContainer); + } + return true; } return false; From 14ace406344b02151ad7e1bdedcc3c77a599d04d Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Tue, 10 Sep 2024 13:34:50 -0700 Subject: [PATCH 89/91] [Misc] eslint rule to prevent `.js` imports (#4160) * add `eslint-plugin-import-x` module * add import eslint rules * remove .js extensions * rename account.spec to account.test * move fontFace.setup into `setupFiles` instead of importing it in `vitest.setup.ts` --- eslint.config.js | 7 +- package-lock.json | 200 ++++++++++++++++++ package.json | 1 + src/phases/weather-effect-phase.ts | 2 +- src/system/version-converter.ts | 2 +- src/test/{account.spec.ts => account.test.ts} | 0 .../double_battle_chance_booster.test.ts | 12 +- src/test/vitest.setup.ts | 1 - vitest.config.ts | 2 +- 9 files changed, 214 insertions(+), 13 deletions(-) rename src/test/{account.spec.ts => account.test.ts} (100%) diff --git a/eslint.config.js b/eslint.config.js index eeea38e3178..80e9e67b525 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,7 @@ import tseslint from '@typescript-eslint/eslint-plugin'; import stylisticTs from '@stylistic/eslint-plugin-ts' import parser from '@typescript-eslint/parser'; -// import imports from 'eslint-plugin-import'; // Disabled due to not being compatible with eslint v9 +import importX from 'eslint-plugin-import-x'; export default [ { @@ -11,7 +11,7 @@ export default [ parser: parser }, plugins: { - // imports: imports.configs.recommended // Disabled due to not being compatible with eslint v9 + "import-x": importX, '@stylistic/ts': stylisticTs, '@typescript-eslint': tseslint }, @@ -39,7 +39,8 @@ export default [ }], "space-before-blocks": ["error", "always"], // Enforces a space before blocks "keyword-spacing": ["error", { "before": true, "after": true }], // Enforces spacing before and after keywords - "comma-spacing": ["error", { "before": false, "after": true }] // Enforces spacing after comma + "comma-spacing": ["error", { "before": false, "after": true }], // Enforces spacing after comma + "import-x/extensions": ["error", "never", { "json": "always" }], // Enforces no extension for imports unless json } } ] diff --git a/package-lock.json b/package-lock.json index 0605b299dab..4a447554819 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "@vitest/coverage-istanbul": "^2.0.4", "dependency-cruiser": "^16.3.10", "eslint": "^9.7.0", + "eslint-plugin-import-x": "^4.2.1", "jsdom": "^24.0.0", "lefthook": "^1.6.12", "phaser3spectorjs": "^0.0.8", @@ -2505,6 +2506,19 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -2687,6 +2701,155 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import-x": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.2.1.tgz", + "integrity": "sha512-WWi2GedccIJa0zXxx3WDnTgouGQTtdYK1nhXMwywbqqAgB0Ov+p1pYBsWh3VaB0bvBOwLse6OfVII7jZD9xo5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^8.1.0", + "debug": "^4.3.4", + "doctrine": "^3.0.0", + "eslint-import-resolver-node": "^0.3.9", + "get-tsconfig": "^4.7.3", + "is-glob": "^4.0.3", + "minimatch": "^9.0.3", + "semver": "^7.6.3", + "stable-hash": "^0.0.4", + "tslib": "^2.6.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-import-x/node_modules/@typescript-eslint/scope-manager": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", + "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-import-x/node_modules/@typescript-eslint/types": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", + "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-import-x/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", + "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-import-x/node_modules/@typescript-eslint/utils": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", + "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-import-x/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", + "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/eslint-scope": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", @@ -3143,6 +3306,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-tsconfig": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.0.tgz", + "integrity": "sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -4854,6 +5030,16 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -5069,6 +5255,13 @@ "node": ">=0.10.0" } }, + "node_modules/stable-hash": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", + "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==", + "dev": true, + "license": "MIT" + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -5460,6 +5653,13 @@ "node": ">=6" } }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true, + "license": "0BSD" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 83e82585d1e..dddf5aedebd 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@vitest/coverage-istanbul": "^2.0.4", "dependency-cruiser": "^16.3.10", "eslint": "^9.7.0", + "eslint-plugin-import-x": "^4.2.1", "jsdom": "^24.0.0", "lefthook": "^1.6.12", "phaser3spectorjs": "^0.0.8", diff --git a/src/phases/weather-effect-phase.ts b/src/phases/weather-effect-phase.ts index e85ef0326f6..73de44389d0 100644 --- a/src/phases/weather-effect-phase.ts +++ b/src/phases/weather-effect-phase.ts @@ -1,5 +1,5 @@ import BattleScene from "#app/battle-scene"; -import { applyPreWeatherEffectAbAttrs, SuppressWeatherEffectAbAttr, PreWeatherDamageAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPostWeatherLapseAbAttrs, PostWeatherLapseAbAttr } from "#app/data/ability.js"; +import { applyPreWeatherEffectAbAttrs, SuppressWeatherEffectAbAttr, PreWeatherDamageAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPostWeatherLapseAbAttrs, PostWeatherLapseAbAttr } from "#app/data/ability"; import { CommonAnim } from "#app/data/battle-anims"; import { Weather, getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weather"; import { BattlerTagType } from "#app/enums/battler-tag-type"; diff --git a/src/system/version-converter.ts b/src/system/version-converter.ts index ed65fcd99b8..1a7c7b2026a 100644 --- a/src/system/version-converter.ts +++ b/src/system/version-converter.ts @@ -1,4 +1,4 @@ -import { allSpecies } from "#app/data/pokemon-species.js"; +import { allSpecies } from "#app/data/pokemon-species"; import { AbilityAttr, defaultStarterSpecies, DexAttr, SessionSaveData, SystemSaveData } from "./game-data"; import { SettingKeys } from "./settings/settings"; diff --git a/src/test/account.spec.ts b/src/test/account.test.ts similarity index 100% rename from src/test/account.spec.ts rename to src/test/account.test.ts diff --git a/src/test/items/double_battle_chance_booster.test.ts b/src/test/items/double_battle_chance_booster.test.ts index f581af7afc5..1d5051fa9e9 100644 --- a/src/test/items/double_battle_chance_booster.test.ts +++ b/src/test/items/double_battle_chance_booster.test.ts @@ -1,13 +1,13 @@ -import { Moves } from "#app/enums/moves.js"; -import { Species } from "#app/enums/species.js"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; import { DoubleBattleChanceBoosterModifier } from "#app/modifier/modifier"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js"; -import { Mode } from "#app/ui/ui.js"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler.js"; -import { Button } from "#app/enums/buttons.js"; +import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; +import { Mode } from "#app/ui/ui"; +import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; +import { Button } from "#app/enums/buttons"; describe("Items - Double Battle Chance Boosters", () => { let phaserGame: Phaser.Game; diff --git a/src/test/vitest.setup.ts b/src/test/vitest.setup.ts index eaa987c1a66..bf806cd053a 100644 --- a/src/test/vitest.setup.ts +++ b/src/test/vitest.setup.ts @@ -1,4 +1,3 @@ -import "#test/fontFace.setup"; import "vitest-canvas-mock"; import { initLoggedInUser } from "#app/account"; diff --git a/vitest.config.ts b/vitest.config.ts index 9a765a89ae7..bfa380ec5fa 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,7 +2,7 @@ import { defineProject, UserWorkspaceConfig } from 'vitest/config'; import { defaultConfig } from './vite.config'; export const defaultProjectTestConfig: UserWorkspaceConfig["test"] = { - setupFiles: ['./src/test/vitest.setup.ts'], + setupFiles: ['./src/test/fontFace.setup.ts', './src/test/vitest.setup.ts'], server: { deps: { inline: ['vitest-canvas-mock'], From e17bf592c22a7e53d7a06e6e891d975dc0962ffe Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:13:42 -0700 Subject: [PATCH 90/91] [Bug] Use silent mode during tests (unless debugging!) + test workflow optimization (#4154) * add :silent to all tests but disable it if the runner is in debug mode! * fix: use `--silent` instead of `:silent` Cause the previous was npm scrpt specific (whops) * remove env and replace with logic in each call * reduce redundancy by checking out once * move pre-test into `needs` after `checkout` * use cache approach in pre-test * add node.js install step to `setup` job * WIP: setup -> pre-test -> all other tests with using cache * use matrix approach for tests * fix matrix approach for tests * fix wrong use of env var in `run-test-template.yml` * test: out-comment `run-tests` to see whats wrong * test: see if this works * let's try using matrix again... * make `node-version` input a string * remove `node-version` input for now * test: without a matrix fornow * change usage of reuseable workflow call * fix call of matrix.project * try using working-dir * try setup for pre-tests * remove `runs-on` from run-tests * fix some identations for run-tests * add pre-test as requirement for running tests * use `1` instead of `'1'` to check `runner.debug` * add `options` input. Possible fix for debug = not silent * try again... * not as an ENV but inside * move 2nd ${{ !runner.debug && '--silent' }} check into test-template * fix printing `false` instead of empty-string on runner-debug check * try a yml array approach * test running with file include path * make `project` always `main` for now * remove all extra vitest workspaces * adopt `shards` workflow in vitest * fix workflow reference in tests.yml * add missing `$` in test-shard-template.yml` * chore: fix vitest.config.ts after merge man.. cant trust these machines * make `project` a variable. try to use inputs on job names * adjust `test-shard-template` job name --- .github/workflows/test-shard-template.yml | 30 +++++++ .github/workflows/tests.yml | 98 +++++------------------ vitest.config.ts | 84 +++++++++---------- vitest.workspace.ts | 54 ------------- 4 files changed, 90 insertions(+), 176 deletions(-) create mode 100644 .github/workflows/test-shard-template.yml diff --git a/.github/workflows/test-shard-template.yml b/.github/workflows/test-shard-template.yml new file mode 100644 index 00000000000..ac89b503f0c --- /dev/null +++ b/.github/workflows/test-shard-template.yml @@ -0,0 +1,30 @@ +name: Test Template + +on: + workflow_call: + inputs: + project: + required: true + type: string + shard: + required: true + type: number + totalShards: + required: true + type: number + +jobs: + test: + name: Shard ${{ inputs.shard }} of ${{ inputs.totalShards }} + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install Node.js dependencies + run: npm ci + - name: Run tests + run: npx vitest --project ${{ inputs.project }} --shard=${{ inputs.shard }}/${{ inputs.totalShards }} ${{ !runner.debug && '--silent' || '' }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a78ec252b8..66cc3ecc139 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,91 +15,33 @@ on: types: [checks_requested] jobs: - run-misc-tests: # Define a job named "run-tests" - name: Run misc tests # Human-readable name for the job - runs-on: ubuntu-latest # Specify the latest Ubuntu runner for the job - - steps: - - name: Check out Git repository # Step to check out the repository - uses: actions/checkout@v4 # Use the checkout action version 4 - - - name: Set up Node.js # Step to set up Node.js environment - uses: actions/setup-node@v4 # Use the setup-node action version 4 - with: - node-version: 20 # Specify Node.js version 20 - - - name: Install Node.js dependencies # Step to install Node.js dependencies - run: npm ci # Use 'npm ci' to install dependencies - - - name: pre-test # pre-test to check overrides - run: npx vitest run --project pre - - name: test misc - run: npx vitest --project misc - - run-abilities-tests: - name: Run abilities tests - runs-on: ubuntu-latest + pre-test: + name: Run Pre-test + runs-on: ubuntu-latest steps: - name: Check out Git repository uses: actions/checkout@v4 + with: + path: tests-action - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 20 - name: Install Node.js dependencies + working-directory: tests-action run: npm ci - - name: pre-test - run: npx vitest run --project pre - - name: test abilities - run: npx vitest --project abilities + - name: Run Pre-test + working-directory: tests-action + run: npx vitest run --project pre ${{ !runner.debug && '--silent' || '' }} - run-items-tests: - name: Run items tests - runs-on: ubuntu-latest - steps: - - name: Check out Git repository - uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Install Node.js dependencies - run: npm ci - - name: pre-test - run: npx vitest run --project pre - - name: test items - run: npx vitest --project items - - run-moves-tests: - name: Run moves tests - runs-on: ubuntu-latest - steps: - - name: Check out Git repository - uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Install Node.js dependencies - run: npm ci - - name: pre-test - run: npx vitest run --project pre - - name: test moves - run: npx vitest --project moves - - run-battle-tests: - name: Run battle tests - runs-on: ubuntu-latest - steps: - - name: Check out Git repository - uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Install Node.js dependencies - run: npm ci - - name: pre-test - run: npx vitest run --project pre - - name: test battle - run: npx vitest --project battle \ No newline at end of file + run-tests: + name: Run Tests + needs: [pre-test] + strategy: + matrix: + shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + uses: ./.github/workflows/test-shard-template.yml + with: + project: main + shard: ${{ matrix.shard }} + totalShards: 10 \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts index bfa380ec5fa..54462675704 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,46 +1,42 @@ -import { defineProject, UserWorkspaceConfig } from 'vitest/config'; -import { defaultConfig } from './vite.config'; - -export const defaultProjectTestConfig: UserWorkspaceConfig["test"] = { - setupFiles: ['./src/test/fontFace.setup.ts', './src/test/vitest.setup.ts'], - server: { - deps: { - inline: ['vitest-canvas-mock'], - //@ts-ignore - optimizer: { - web: { - include: ['vitest-canvas-mock'], - } - } - } - }, - environment: 'jsdom' as const, - environmentOptions: { - jsdom: { - resources: 'usable', - }, - }, - threads: false, - trace: true, - restoreMocks: true, - watch: false, - coverage: { - provider: 'istanbul' as const, - reportsDirectory: 'coverage' as const, - reporters: ['text-summary', 'html'], - }, -} +import { defineProject } from "vitest/config"; +import { defaultConfig } from "./vite.config"; export default defineProject(({ mode }) => ({ - ...defaultConfig, - test: { - ...defaultProjectTestConfig, - name: "main", - include: ["./src/test/**/*.{test,spec}.ts"], - exclude: ["./src/test/pre.test.ts"], - }, - esbuild: { - pure: mode === 'production' ? [ 'console.log' ] : [], - keepNames: true, - }, -})) + ...defaultConfig, + test: { + setupFiles: ["./src/test/fontFace.setup.ts", "./src/test/vitest.setup.ts"], + server: { + deps: { + inline: ["vitest-canvas-mock"], + //@ts-ignore + optimizer: { + web: { + include: ["vitest-canvas-mock"], + }, + }, + }, + }, + environment: "jsdom" as const, + environmentOptions: { + jsdom: { + resources: "usable", + }, + }, + threads: false, + trace: true, + restoreMocks: true, + watch: false, + coverage: { + provider: "istanbul" as const, + reportsDirectory: "coverage" as const, + reporters: ["text-summary", "html"], + }, + name: "main", + include: ["./src/test/**/*.{test,spec}.ts"], + exclude: ["./src/test/pre.test.ts"], + }, + esbuild: { + pure: mode === "production" ? ["console.log"] : [], + keepNames: true, + }, +})); diff --git a/vitest.workspace.ts b/vitest.workspace.ts index a885b77dc9d..38121942004 100644 --- a/vitest.workspace.ts +++ b/vitest.workspace.ts @@ -1,6 +1,5 @@ import { defineWorkspace } from "vitest/config"; import { defaultConfig } from "./vite.config"; -import { defaultProjectTestConfig } from "./vitest.config"; export default defineWorkspace([ { @@ -11,58 +10,5 @@ export default defineWorkspace([ environment: "jsdom", }, }, - { - ...defaultConfig, - test: { - ...defaultProjectTestConfig, - name: "misc", - include: [ - "src/test/achievements/**/*.{test,spec}.ts", - "src/test/arena/**/*.{test,spec}.ts", - "src/test/battlerTags/**/*.{test,spec}.ts", - "src/test/eggs/**/*.{test,spec}.ts", - "src/test/field/**/*.{test,spec}.ts", - "src/test/inputs/**/*.{test,spec}.ts", - "src/test/localization/**/*.{test,spec}.ts", - "src/test/phases/**/*.{test,spec}.ts", - "src/test/settingMenu/**/*.{test,spec}.ts", - "src/test/sprites/**/*.{test,spec}.ts", - "src/test/ui/**/*.{test,spec}.ts", - "src/test/*.{test,spec}.ts", - ], - }, - }, - { - ...defaultConfig, - test: { - ...defaultProjectTestConfig, - name: "abilities", - include: ["src/test/abilities/**/*.{test,spec}.ts"], - }, - }, - { - ...defaultConfig, - test: { - ...defaultProjectTestConfig, - name: "battle", - include: ["src/test/battle/**/*.{test,spec}.ts"], - }, - }, - { - ...defaultConfig, - test: { - ...defaultProjectTestConfig, - name: "items", - include: ["src/test/items/**/*.{test,spec}.ts"], - }, - }, - { - ...defaultConfig, - test: { - ...defaultProjectTestConfig, - name: "moves", - include: ["src/test/moves/**/*.{test,spec}.ts"], - }, - }, "./vitest.config.ts", ]); From e657322294bc39f9f398b72c0f8fdcd8f4d496d5 Mon Sep 17 00:00:00 2001 From: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> Date: Wed, 11 Sep 2024 12:45:53 +0900 Subject: [PATCH 91/91] [Enhancement] Update instruction for gamepad in run history UI (#4053) * update instruction for pad in run history UI * move getGamepadType function to ui.ts * Update src/ui/ui.ts Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com> --------- Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com> --- src/ui/run-info-ui-handler.ts | 23 +++++++++++++++++++---- src/ui/ui.ts | 17 +++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index d6bafb8599e..f398abed6f5 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -21,6 +21,7 @@ import { getVariantTint } from "#app/data/variant"; import * as Modifier from "../modifier/modifier"; import { Species } from "#enums/species"; import { PlayerGender } from "#enums/player-gender"; +import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; /** * RunInfoUiMode indicates possible overlays of RunInfoUiHandler. @@ -151,7 +152,13 @@ export default class RunInfoUiHandler extends UiHandler { const headerBgCoords = headerBg.getTopRight(); const abilityButtonContainer = this.scene.add.container(0, 0); const abilityButtonText = addTextObject(this.scene, 8, 0, i18next.t("runHistory:viewHeldItems"), TextStyle.WINDOW, {fontSize:"34px"}); - const abilityButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 2, "keyboard", "E.png"); + const gamepadType = this.getUi().getGamepadType(); + let abilityButtonElement: Phaser.GameObjects.Sprite; + if (gamepadType === "touch") { + abilityButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 2, "keyboard", "E.png"); + } else { + abilityButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 2, gamepadType, this.scene.inputController?.getIconForLatestInputRecorded(SettingKeyboard.Button_Cycle_Ability)); + } abilityButtonContainer.add([abilityButtonText, abilityButtonElement]); abilityButtonContainer.setPosition(headerBgCoords.x - abilityButtonText.displayWidth - abilityButtonElement.displayWidth - 8, 10); this.runContainer.add(abilityButtonContainer); @@ -180,11 +187,19 @@ export default class RunInfoUiHandler extends UiHandler { if (this.isVictory) { const hallofFameInstructionContainer = this.scene.add.container(0, 0); const shinyButtonText = addTextObject(this.scene, 8, 0, i18next.t("runHistory:viewHallOfFame"), TextStyle.WINDOW, {fontSize:"65px"}); - const shinyButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 4, "keyboard", "R.png"); + const formButtonText = addTextObject(this.scene, 8, 12, i18next.t("runHistory:viewEndingSplash"), TextStyle.WINDOW, {fontSize:"65px"}); + const gamepadType = this.getUi().getGamepadType(); + let shinyButtonElement: Phaser.GameObjects.Sprite; + let formButtonElement: Phaser.GameObjects.Sprite; + if (gamepadType === "touch") { + shinyButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 4, "keyboard", "R.png"); + formButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 16, "keyboard", "F.png"); + } else { + shinyButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 4, gamepadType, this.scene.inputController?.getIconForLatestInputRecorded(SettingKeyboard.Button_Cycle_Shiny)); + formButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 16, gamepadType, this.scene.inputController?.getIconForLatestInputRecorded(SettingKeyboard.Button_Cycle_Form)); + } hallofFameInstructionContainer.add([shinyButtonText, shinyButtonElement]); - const formButtonText = addTextObject(this.scene, 8, 12, i18next.t("runHistory:viewEndingSplash"), TextStyle.WINDOW, {fontSize:"65px"}); - const formButtonElement = new Phaser.GameObjects.Sprite(this.scene, 0, 16, "keyboard", "F.png"); hallofFameInstructionContainer.add([formButtonText, formButtonElement]); hallofFameInstructionContainer.setPosition(12, 25); diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 50fb240aad8..82b3ee6b4fa 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -52,6 +52,7 @@ import RunInfoUiHandler from "./run-info-ui-handler"; import EggSummaryUiHandler from "./egg-summary-ui-handler"; import TestDialogueUiHandler from "#app/ui/test-dialogue-ui-handler"; import AutoCompleteUiHandler from "./autocomplete-ui-handler"; +import { Device } from "#enums/devices"; export enum Mode { MESSAGE, @@ -578,4 +579,20 @@ export default class UI extends Phaser.GameObjects.Container { public getModeChain(): Mode[] { return this.modeChain; } + + /** + * getGamepadType - returns the type of gamepad being used + * inputMethod could be "keyboard" or "touch" or "gamepad" + * if inputMethod is "keyboard" or "touch", then the inputMethod is returned + * if inputMethod is "gamepad", then the gamepad type is returned it could be "xbox" or "dualshock" + * @returns gamepad type + */ + public getGamepadType(): string { + const scene = this.scene as BattleScene; + if (scene.inputMethod === "gamepad") { + return scene.inputController.getConfig(scene.inputController.selectedDevice[Device.GAMEPAD]).padType; + } else { + return scene.inputMethod; + } + } }