diff --git a/.github/workflows/deploy-beta.yml b/.github/workflows/deploy-beta.yml index 44df0310557..0894032c8ad 100644 --- a/.github/workflows/deploy-beta.yml +++ b/.github/workflows/deploy-beta.yml @@ -11,7 +11,7 @@ on: jobs: deploy: - if: github.repository == 'pagefaultgames/pokerogue' && github.ref_name == ${{ vars.BETA_DEPLOY_BRANCH || 'beta' }} + if: github.repository == 'pagefaultgames/pokerogue' && github.ref_name == (vars.BETA_DEPLOY_BRANCH || 'beta') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/CREDITS.md b/CREDITS.md index 6d884c8fd60..bca89c816ca 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -40,6 +40,7 @@ ## Backgrounds - Squip (Paid Commissions) - Contributions by Someonealive-QN +- Contributions by redactedinlight ## UI - GAMEFREAK diff --git a/biome.jsonc b/biome.jsonc index ff541f4dcc2..d4cb67d33a6 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -38,14 +38,13 @@ ] }, - // TODO: Configure and enable import sorting "assist": { "actions": { "source": { "organizeImports": { - "level": "off", + "level": "on", "options": { - "groups": [] + "groups": [":ALIAS:", ":NODE:", ":PACKAGE_WITH_PROTOCOL:", ":PACKAGE:", ":PATH:"] } } } @@ -140,7 +139,7 @@ "useAdjacentGetterSetter": "error", "noConstantBinaryExpression": "error", "noTsIgnore": "error", - "noAwaitInLoop": "warn", + "noAwaitInLoop": "off", "useJsonImportAttribute": "off", // "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'. ts(2823)" "useIndexOf": "error", "useObjectSpread": "error", diff --git a/lefthook.yml b/lefthook.yml index 28178432c31..40875073fdd 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -15,4 +15,6 @@ post-merge: post-checkout: commands: update-submodules: - run: git submodule update --init --recursive \ No newline at end of file + # cf https://git-scm.com/docs/githooks#_post_checkout: + # The 3rd argument is 1 for branch checkouts and 0 for file checkouts. + run: if test {3} -eq "1"; then git submodule update --init --recursive; fi \ No newline at end of file diff --git a/package.json b/package.json index d1adeaa3419..64f2f9786db 100644 --- a/package.json +++ b/package.json @@ -29,34 +29,34 @@ "devDependencies": { "@biomejs/biome": "2.0.0", "@types/jsdom": "^21.1.7", - "@types/node": "^22.13.14", - "@vitest/coverage-istanbul": "^3.0.9", + "@types/node": "^22.16.3", + "@vitest/coverage-istanbul": "^3.2.4", "chalk": "^5.4.1", - "dependency-cruiser": "^16.3.10", - "inquirer": "^12.4.2", - "jsdom": "^26.0.0", - "lefthook": "^1.11.5", - "msw": "^2.7.3", + "dependency-cruiser": "^16.10.4", + "inquirer": "^12.7.0", + "jsdom": "^26.1.0", + "lefthook": "^1.12.2", + "msw": "^2.10.4", "phaser3spectorjs": "^0.0.8", - "typedoc": "^0.28.1", - "typescript": "^5.8.2", - "vite": "^6.3.4", + "typedoc": "^0.28.7", + "typescript": "^5.8.3", + "vite": "^6.3.5", "vite-tsconfig-paths": "^5.1.4", - "vitest": "^3.0.9", + "vitest": "^3.2.4", "vitest-canvas-mock": "^0.3.3" }, "dependencies": { "@material/material-color-utilities": "^0.2.7", "compare-versions": "^6.1.1", "crypto-js": "^4.2.0", - "i18next": "^24.2.2", - "i18next-browser-languagedetector": "^8.0.4", + "i18next": "^24.2.3", + "i18next-browser-languagedetector": "^8.2.0", "i18next-http-backend": "^3.0.2", "i18next-korean-postposition-processor": "^1.0.0", - "json-stable-stringify": "^1.2.0", + "json-stable-stringify": "^1.3.0", "jszip": "^3.10.1", - "phaser": "^3.88.2", - "phaser3-rex-plugins": "^1.80.15" + "phaser": "^3.90.0", + "phaser3-rex-plugins": "^1.80.16" }, "engines": { "node": ">=22.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc90a04ed93..9f465c56778 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,29 +18,29 @@ importers: specifier: ^4.2.0 version: 4.2.0 i18next: - specifier: ^24.2.2 - version: 24.2.3(typescript@5.8.2) + specifier: ^24.2.3 + version: 24.2.3(typescript@5.8.3) i18next-browser-languagedetector: - specifier: ^8.0.4 - version: 8.0.4 + specifier: ^8.2.0 + version: 8.2.0 i18next-http-backend: specifier: ^3.0.2 version: 3.0.2 i18next-korean-postposition-processor: specifier: ^1.0.0 - version: 1.0.0(i18next@24.2.3(typescript@5.8.2)) + version: 1.0.0(i18next@24.2.3(typescript@5.8.3)) json-stable-stringify: - specifier: ^1.2.0 - version: 1.2.1 + specifier: ^1.3.0 + version: 1.3.0 jszip: specifier: ^3.10.1 version: 3.10.1 phaser: - specifier: ^3.88.2 - version: 3.88.2 + specifier: ^3.90.0 + version: 3.90.0 phaser3-rex-plugins: - specifier: ^1.80.15 - version: 1.80.15(graphology-types@0.24.8) + specifier: ^1.80.16 + version: 1.80.16(graphology-types@0.24.8) devDependencies: '@biomejs/biome': specifier: 2.0.0 @@ -49,50 +49,50 @@ importers: specifier: ^21.1.7 version: 21.1.7 '@types/node': - specifier: ^22.13.14 - version: 22.13.14 + specifier: ^22.16.3 + version: 22.16.3 '@vitest/coverage-istanbul': - specifier: ^3.0.9 - version: 3.0.9(vitest@3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1)) + specifier: ^3.2.4 + version: 3.2.4(vitest@3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0)) chalk: specifier: ^5.4.1 version: 5.4.1 dependency-cruiser: - specifier: ^16.3.10 - version: 16.3.10 + specifier: ^16.10.4 + version: 16.10.4 inquirer: - specifier: ^12.4.2 - version: 12.5.0(@types/node@22.13.14) + specifier: ^12.7.0 + version: 12.7.0(@types/node@22.16.3) jsdom: - specifier: ^26.0.0 - version: 26.0.0 + specifier: ^26.1.0 + version: 26.1.0 lefthook: - specifier: ^1.11.5 - version: 1.11.6 + specifier: ^1.12.2 + version: 1.12.2 msw: - specifier: ^2.7.3 - version: 2.7.3(@types/node@22.13.14)(typescript@5.8.2) + specifier: ^2.10.4 + version: 2.10.4(@types/node@22.16.3)(typescript@5.8.3) phaser3spectorjs: specifier: ^0.0.8 version: 0.0.8 typedoc: - specifier: ^0.28.1 - version: 0.28.1(typescript@5.8.2) + specifier: ^0.28.7 + version: 0.28.7(typescript@5.8.3) typescript: - specifier: ^5.8.2 - version: 5.8.2 + specifier: ^5.8.3 + version: 5.8.3 vite: - specifier: ^6.3.4 - version: 6.3.4(@types/node@22.13.14)(yaml@2.7.1) + specifier: ^6.3.5 + version: 6.3.5(@types/node@22.16.3)(yaml@2.8.0) vite-tsconfig-paths: specifier: ^5.1.4 - version: 5.1.4(typescript@5.8.2)(vite@6.3.4(@types/node@22.13.14)(yaml@2.7.1)) + version: 5.1.4(typescript@5.8.3)(vite@6.3.5(@types/node@22.16.3)(yaml@2.8.0)) vitest: - specifier: ^3.0.9 - version: 3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1) + specifier: ^3.2.4 + version: 3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0) vitest-canvas-mock: specifier: ^0.3.3 - version: 0.3.3(vitest@3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1)) + version: 0.3.3(vitest@3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0)) packages: @@ -100,59 +100,43 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@asamuzakjp/css-color@3.1.1': - resolution: {integrity: sha512-hpRD68SV2OMcZCsrbdkccTw5FXjNDLo5OuqSHyHZfwweGsDWZwDJ2+gONyNAbazZclobMirACLw0lk8WVxIqxA==} + '@asamuzakjp/css-color@3.2.0': + resolution: {integrity: sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==} '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.24.9': - resolution: {integrity: sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==} + '@babel/compat-data@7.28.0': + resolution: {integrity: sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==} engines: {node: '>=6.9.0'} - '@babel/core@7.24.9': - resolution: {integrity: sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==} + '@babel/core@7.28.0': + resolution: {integrity: sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.10': - resolution: {integrity: sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==} + '@babel/generator@7.28.0': + resolution: {integrity: sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.24.8': - resolution: {integrity: sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==} + '@babel/helper-compilation-targets@7.27.2': + resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==} engines: {node: '>=6.9.0'} - '@babel/helper-environment-visitor@7.24.7': - resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} + '@babel/helper-globals@7.28.0': + resolution: {integrity: sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==} engines: {node: '>=6.9.0'} - '@babel/helper-function-name@7.24.7': - resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} + '@babel/helper-module-imports@7.27.1': + resolution: {integrity: sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==} engines: {node: '>=6.9.0'} - '@babel/helper-hoist-variables@7.24.7': - resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-imports@7.24.7': - resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-transforms@7.24.9': - resolution: {integrity: sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==} + '@babel/helper-module-transforms@7.27.3': + resolution: {integrity: sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.24.7': - resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} - engines: {node: '>=6.9.0'} - - '@babel/helper-split-export-declaration@7.24.7': - resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} @@ -161,33 +145,33 @@ packages: resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.24.8': - resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} + '@babel/helper-validator-option@7.27.1': + resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} engines: {node: '>=6.9.0'} '@babel/helpers@7.27.6': resolution: {integrity: sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==} engines: {node: '>=6.9.0'} - '@babel/parser@7.27.5': - resolution: {integrity: sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==} + '@babel/parser@7.28.0': + resolution: {integrity: sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/runtime@7.27.0': - resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==} + '@babel/runtime@7.27.6': + resolution: {integrity: sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==} engines: {node: '>=6.9.0'} '@babel/template@7.27.2': resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.8': - resolution: {integrity: sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==} + '@babel/traverse@7.28.0': + resolution: {integrity: sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==} engines: {node: '>=6.9.0'} - '@babel/types@7.27.6': - resolution: {integrity: sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==} + '@babel/types@7.28.1': + resolution: {integrity: sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==} engines: {node: '>=6.9.0'} '@biomejs/biome@2.0.0': @@ -256,185 +240,191 @@ packages: resolution: {integrity: sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==} engines: {node: '>=18'} - '@csstools/css-calc@2.1.2': - resolution: {integrity: sha512-TklMyb3uBB28b5uQdxjReG4L80NxAqgrECqLZFQbyLekwwlcDDS8r3f07DKqeo8C4926Br0gf/ZDe17Zv4wIuw==} + '@csstools/css-calc@2.1.4': + resolution: {integrity: sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==} engines: {node: '>=18'} peerDependencies: - '@csstools/css-parser-algorithms': ^3.0.4 - '@csstools/css-tokenizer': ^3.0.3 + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 - '@csstools/css-color-parser@3.0.8': - resolution: {integrity: sha512-pdwotQjCCnRPuNi06jFuP68cykU1f3ZWExLe/8MQ1LOs8Xq+fTkYgd+2V8mWUWMrOn9iS2HftPVaMZDaXzGbhQ==} + '@csstools/css-color-parser@3.0.10': + resolution: {integrity: sha512-TiJ5Ajr6WRd1r8HSiwJvZBiJOqtH86aHpUjq5aEKWHiII2Qfjqd/HCWKPOW8EP4vcspXbHnXrwIDlu5savQipg==} engines: {node: '>=18'} peerDependencies: - '@csstools/css-parser-algorithms': ^3.0.4 - '@csstools/css-tokenizer': ^3.0.3 + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 - '@csstools/css-parser-algorithms@3.0.4': - resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} + '@csstools/css-parser-algorithms@3.0.5': + resolution: {integrity: sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==} engines: {node: '>=18'} peerDependencies: - '@csstools/css-tokenizer': ^3.0.3 + '@csstools/css-tokenizer': ^3.0.4 - '@csstools/css-tokenizer@3.0.3': - resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} + '@csstools/css-tokenizer@3.0.4': + resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} engines: {node: '>=18'} - '@esbuild/aix-ppc64@0.25.2': - resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==} + '@esbuild/aix-ppc64@0.25.6': + resolution: {integrity: sha512-ShbM/3XxwuxjFiuVBHA+d3j5dyac0aEVVq1oluIDf71hUw0aRF59dV/efUsIwFnR6m8JNM2FjZOzmaZ8yG61kw==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.25.2': - resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==} + '@esbuild/android-arm64@0.25.6': + resolution: {integrity: sha512-hd5zdUarsK6strW+3Wxi5qWws+rJhCCbMiC9QZyzoxfk5uHRIE8T287giQxzVpEvCwuJ9Qjg6bEjcRJcgfLqoA==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.2': - resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==} + '@esbuild/android-arm@0.25.6': + resolution: {integrity: sha512-S8ToEOVfg++AU/bHwdksHNnyLyVM+eMVAOf6yRKFitnwnbwwPNqKr3srzFRe7nzV69RQKb5DgchIX5pt3L53xg==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.2': - resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==} + '@esbuild/android-x64@0.25.6': + resolution: {integrity: sha512-0Z7KpHSr3VBIO9A/1wcT3NTy7EB4oNC4upJ5ye3R7taCc2GUdeynSLArnon5G8scPwaU866d3H4BCrE5xLW25A==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.25.2': - resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==} + '@esbuild/darwin-arm64@0.25.6': + resolution: {integrity: sha512-FFCssz3XBavjxcFxKsGy2DYK5VSvJqa6y5HXljKzhRZ87LvEi13brPrf/wdyl/BbpbMKJNOr1Sd0jtW4Ge1pAA==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.2': - resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==} + '@esbuild/darwin-x64@0.25.6': + resolution: {integrity: sha512-GfXs5kry/TkGM2vKqK2oyiLFygJRqKVhawu3+DOCk7OxLy/6jYkWXhlHwOoTb0WqGnWGAS7sooxbZowy+pK9Yg==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.2': - resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==} + '@esbuild/freebsd-arm64@0.25.6': + resolution: {integrity: sha512-aoLF2c3OvDn2XDTRvn8hN6DRzVVpDlj2B/F66clWd/FHLiHaG3aVZjxQX2DYphA5y/evbdGvC6Us13tvyt4pWg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.2': - resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==} + '@esbuild/freebsd-x64@0.25.6': + resolution: {integrity: sha512-2SkqTjTSo2dYi/jzFbU9Plt1vk0+nNg8YC8rOXXea+iA3hfNJWebKYPs3xnOUf9+ZWhKAaxnQNUf2X9LOpeiMQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.2': - resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==} + '@esbuild/linux-arm64@0.25.6': + resolution: {integrity: sha512-b967hU0gqKd9Drsh/UuAm21Khpoh6mPBSgz8mKRq4P5mVK8bpA+hQzmm/ZwGVULSNBzKdZPQBRT3+WuVavcWsQ==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.2': - resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==} + '@esbuild/linux-arm@0.25.6': + resolution: {integrity: sha512-SZHQlzvqv4Du5PrKE2faN0qlbsaW/3QQfUUc6yO2EjFcA83xnwm91UbEEVx4ApZ9Z5oG8Bxz4qPE+HFwtVcfyw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.25.2': - resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==} + '@esbuild/linux-ia32@0.25.6': + resolution: {integrity: sha512-aHWdQ2AAltRkLPOsKdi3xv0mZ8fUGPdlKEjIEhxCPm5yKEThcUjHpWB1idN74lfXGnZ5SULQSgtr5Qos5B0bPw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.25.2': - resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==} + '@esbuild/linux-loong64@0.25.6': + resolution: {integrity: sha512-VgKCsHdXRSQ7E1+QXGdRPlQ/e08bN6WMQb27/TMfV+vPjjTImuT9PmLXupRlC90S1JeNNW5lzkAEO/McKeJ2yg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.25.2': - resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==} + '@esbuild/linux-mips64el@0.25.6': + resolution: {integrity: sha512-WViNlpivRKT9/py3kCmkHnn44GkGXVdXfdc4drNmRl15zVQ2+D2uFwdlGh6IuK5AAnGTo2qPB1Djppj+t78rzw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.2': - resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==} + '@esbuild/linux-ppc64@0.25.6': + resolution: {integrity: sha512-wyYKZ9NTdmAMb5730I38lBqVu6cKl4ZfYXIs31Baf8aoOtB4xSGi3THmDYt4BTFHk7/EcVixkOV2uZfwU3Q2Jw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.2': - resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==} + '@esbuild/linux-riscv64@0.25.6': + resolution: {integrity: sha512-KZh7bAGGcrinEj4qzilJ4hqTY3Dg2U82c8bv+e1xqNqZCrCyc+TL9AUEn5WGKDzm3CfC5RODE/qc96OcbIe33w==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.25.2': - resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==} + '@esbuild/linux-s390x@0.25.6': + resolution: {integrity: sha512-9N1LsTwAuE9oj6lHMyyAM+ucxGiVnEqUdp4v7IaMmrwb06ZTEVCIs3oPPplVsnjPfyjmxwHxHMF8b6vzUVAUGw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.2': - resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==} + '@esbuild/linux-x64@0.25.6': + resolution: {integrity: sha512-A6bJB41b4lKFWRKNrWoP2LHsjVzNiaurf7wyj/XtFNTsnPuxwEBWHLty+ZE0dWBKuSK1fvKgrKaNjBS7qbFKig==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.2': - resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==} + '@esbuild/netbsd-arm64@0.25.6': + resolution: {integrity: sha512-IjA+DcwoVpjEvyxZddDqBY+uJ2Snc6duLpjmkXm/v4xuS3H+3FkLZlDm9ZsAbF9rsfP3zeA0/ArNDORZgrxR/Q==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.2': - resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==} + '@esbuild/netbsd-x64@0.25.6': + resolution: {integrity: sha512-dUXuZr5WenIDlMHdMkvDc1FAu4xdWixTCRgP7RQLBOkkGgwuuzaGSYcOpW4jFxzpzL1ejb8yF620UxAqnBrR9g==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.2': - resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==} + '@esbuild/openbsd-arm64@0.25.6': + resolution: {integrity: sha512-l8ZCvXP0tbTJ3iaqdNf3pjaOSd5ex/e6/omLIQCVBLmHTlfXW3zAxQ4fnDmPLOB1x9xrcSi/xtCWFwCZRIaEwg==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.2': - resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==} + '@esbuild/openbsd-x64@0.25.6': + resolution: {integrity: sha512-hKrmDa0aOFOr71KQ/19JC7az1P0GWtCN1t2ahYAf4O007DHZt/dW8ym5+CUdJhQ/qkZmI1HAF8KkJbEFtCL7gw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.25.2': - resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==} + '@esbuild/openharmony-arm64@0.25.6': + resolution: {integrity: sha512-+SqBcAWoB1fYKmpWoQP4pGtx+pUUC//RNYhFdbcSA16617cchuryuhOCRpPsjCblKukAckWsV+aQ3UKT/RMPcA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.25.6': + resolution: {integrity: sha512-dyCGxv1/Br7MiSC42qinGL8KkG4kX0pEsdb0+TKhmJZgCUDBGmyo1/ArCjNGiOLiIAgdbWgmWgib4HoCi5t7kA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.25.2': - resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==} + '@esbuild/win32-arm64@0.25.6': + resolution: {integrity: sha512-42QOgcZeZOvXfsCBJF5Afw73t4veOId//XD3i+/9gSkhSV6Gk3VPlWncctI+JcOyERv85FUo7RxuxGy+z8A43Q==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.2': - resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==} + '@esbuild/win32-ia32@0.25.6': + resolution: {integrity: sha512-4AWhgXmDuYN7rJI6ORB+uU9DHLq/erBbuMoAuB4VWJTu5KtCgcKYPynF0YI1VkBNuEfjNlLrFr9KZPJzrtLkrQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.2': - resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==} + '@esbuild/win32-x64@0.25.6': + resolution: {integrity: sha512-NgJPHHbEpLQgDH2MjQu90pzW/5vvXIZ7KOnPyNBm92A6WgZ/7b6fJyUBjoumLqeOQQGqY2QjQxRo97ah4Sj0cA==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@gerrit0/mini-shiki@3.2.2': - resolution: {integrity: sha512-vaZNGhGLKMY14HbF53xxHNgFO9Wz+t5lTlGNpl2N9xFiKQ0I5oIe0vKjU9dh7Nb3Dw6lZ7wqUE0ri+zcdpnK+Q==} + '@gerrit0/mini-shiki@3.7.0': + resolution: {integrity: sha512-7iY9wg4FWXmeoFJpUL2u+tsmh0d0jcEJHAIzVxl3TG4KL493JNnisdLAILZ77zcD+z3J0keEXZ+lFzUgzQzPDg==} - '@inquirer/checkbox@4.1.4': - resolution: {integrity: sha512-d30576EZdApjAMceijXA5jDzRQHT/MygbC+J8I7EqA6f/FRpYxlRtRJbHF8gHeWYeSdOuTEJqonn7QLB1ELezA==} + '@inquirer/checkbox@4.1.9': + resolution: {integrity: sha512-DBJBkzI5Wx4jFaYm221LHvAhpKYkhVS0k9plqHwaHhofGNxvYB7J3Bz8w+bFJ05zaMb0sZNHo4KdmENQFlNTuQ==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -442,8 +432,8 @@ packages: '@types/node': optional: true - '@inquirer/confirm@5.1.8': - resolution: {integrity: sha512-dNLWCYZvXDjO3rnQfk2iuJNL4Ivwz/T2+C3+WnNfJKsNGSuOs3wAo2F6e0p946gtSAk31nZMfW+MRmYaplPKsg==} + '@inquirer/confirm@5.1.13': + resolution: {integrity: sha512-EkCtvp67ICIVVzjsquUiVSd+V5HRGOGQfsqA4E4vMWhYnB7InUL0pa0TIWt1i+OfP16Gkds8CdIu6yGZwOM1Yw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -451,8 +441,8 @@ packages: '@types/node': optional: true - '@inquirer/core@10.1.9': - resolution: {integrity: sha512-sXhVB8n20NYkUBfDYgizGHlpRVaCRjtuzNZA6xpALIUbkgfd2Hjz+DfEN6+h1BRnuxw0/P4jCIMjMsEOAMwAJw==} + '@inquirer/core@10.1.14': + resolution: {integrity: sha512-Ma+ZpOJPewtIYl6HZHZckeX1STvDnHTCB2GVINNUlSEn2Am6LddWwfPkIGY0IUFVjUUrr/93XlBwTK6mfLjf0A==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -460,8 +450,8 @@ packages: '@types/node': optional: true - '@inquirer/editor@4.2.9': - resolution: {integrity: sha512-8HjOppAxO7O4wV1ETUlJFg6NDjp/W2NP5FB9ZPAcinAlNT4ZIWOLe2pUVwmmPRSV0NMdI5r/+lflN55AwZOKSw==} + '@inquirer/editor@4.2.14': + resolution: {integrity: sha512-yd2qtLl4QIIax9DTMZ1ZN2pFrrj+yL3kgIWxm34SS6uwCr0sIhsNyudUjAo5q3TqI03xx4SEBkUJqZuAInp9uA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -469,8 +459,8 @@ packages: '@types/node': optional: true - '@inquirer/expand@4.0.11': - resolution: {integrity: sha512-OZSUW4hFMW2TYvX/Sv+NnOZgO8CHT2TU1roUCUIF2T+wfw60XFRRp9MRUPCT06cRnKL+aemt2YmTWwt7rOrNEA==} + '@inquirer/expand@4.0.16': + resolution: {integrity: sha512-oiDqafWzMtofeJyyGkb1CTPaxUkjIcSxePHHQCfif8t3HV9pHcw1Kgdw3/uGpDvaFfeTluwQtWiqzPVjAqS3zA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -478,12 +468,12 @@ packages: '@types/node': optional: true - '@inquirer/figures@1.0.11': - resolution: {integrity: sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==} + '@inquirer/figures@1.0.12': + resolution: {integrity: sha512-MJttijd8rMFcKJC8NYmprWr6hD3r9Gd9qUC0XwPNwoEPWSMVJwA2MlXxF+nhZZNMY+HXsWa+o7KY2emWYIn0jQ==} engines: {node: '>=18'} - '@inquirer/input@4.1.8': - resolution: {integrity: sha512-WXJI16oOZ3/LiENCAxe8joniNp8MQxF6Wi5V+EBbVA0ZIOpFcL4I9e7f7cXse0HJeIPCWO8Lcgnk98juItCi7Q==} + '@inquirer/input@4.2.0': + resolution: {integrity: sha512-opqpHPB1NjAmDISi3uvZOTrjEEU5CWVu/HBkDby8t93+6UxYX0Z7Ps0Ltjm5sZiEbWenjubwUkivAEYQmy9xHw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -491,8 +481,8 @@ packages: '@types/node': optional: true - '@inquirer/number@3.0.11': - resolution: {integrity: sha512-pQK68CsKOgwvU2eA53AG/4npRTH2pvs/pZ2bFvzpBhrznh8Mcwt19c+nMO7LHRr3Vreu1KPhNBF3vQAKrjIulw==} + '@inquirer/number@3.0.16': + resolution: {integrity: sha512-kMrXAaKGavBEoBYUCgualbwA9jWUx2TjMA46ek+pEKy38+LFpL9QHlTd8PO2kWPUgI/KB+qi02o4y2rwXbzr3Q==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -500,8 +490,8 @@ packages: '@types/node': optional: true - '@inquirer/password@4.0.11': - resolution: {integrity: sha512-dH6zLdv+HEv1nBs96Case6eppkRggMe8LoOTl30+Gq5Wf27AO/vHFgStTVz4aoevLdNXqwE23++IXGw4eiOXTg==} + '@inquirer/password@4.0.16': + resolution: {integrity: sha512-g8BVNBj5Zeb5/Y3cSN+hDUL7CsIFDIuVxb9EPty3lkxBaYpjL5BNRKSYOF9yOLe+JOcKFd+TSVeADQ4iSY7rbg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -509,8 +499,8 @@ packages: '@types/node': optional: true - '@inquirer/prompts@7.4.0': - resolution: {integrity: sha512-EZiJidQOT4O5PYtqnu1JbF0clv36oW2CviR66c7ma4LsupmmQlUwmdReGKRp456OWPWMz3PdrPiYg3aCk3op2w==} + '@inquirer/prompts@7.6.0': + resolution: {integrity: sha512-jAhL7tyMxB3Gfwn4HIJ0yuJ5pvcB5maYUcouGcgd/ub79f9MqZ+aVnBtuFf+VC2GTkCBF+R+eo7Vi63w5VZlzw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -518,8 +508,8 @@ packages: '@types/node': optional: true - '@inquirer/rawlist@4.0.11': - resolution: {integrity: sha512-uAYtTx0IF/PqUAvsRrF3xvnxJV516wmR6YVONOmCWJbbt87HcDHLfL9wmBQFbNJRv5kCjdYKrZcavDkH3sVJPg==} + '@inquirer/rawlist@4.1.4': + resolution: {integrity: sha512-5GGvxVpXXMmfZNtvWw4IsHpR7RzqAR624xtkPd1NxxlV5M+pShMqzL4oRddRkg8rVEOK9fKdJp1jjVML2Lr7TQ==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -527,8 +517,8 @@ packages: '@types/node': optional: true - '@inquirer/search@3.0.11': - resolution: {integrity: sha512-9CWQT0ikYcg6Ls3TOa7jljsD7PgjcsYEM0bYE+Gkz+uoW9u8eaJCRHJKkucpRE5+xKtaaDbrND+nPDoxzjYyew==} + '@inquirer/search@3.0.16': + resolution: {integrity: sha512-POCmXo+j97kTGU6aeRjsPyuCpQQfKcMXdeTMw708ZMtWrj5aykZvlUxH4Qgz3+Y1L/cAVZsSpA+UgZCu2GMOMg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -536,8 +526,8 @@ packages: '@types/node': optional: true - '@inquirer/select@4.1.0': - resolution: {integrity: sha512-z0a2fmgTSRN+YBuiK1ROfJ2Nvrpij5lVN3gPDkQGhavdvIVGHGW29LwYZfM/j42Ai2hUghTI/uoBuTbrJk42bA==} + '@inquirer/select@4.2.4': + resolution: {integrity: sha512-unTppUcTjmnbl/q+h8XeQDhAqIOmwWYWNyiiP2e3orXrg6tOaa5DHXja9PChCSbChOsktyKgOieRZFnajzxoBg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -545,8 +535,8 @@ packages: '@types/node': optional: true - '@inquirer/type@3.0.5': - resolution: {integrity: sha512-ZJpeIYYueOz/i/ONzrfof8g89kNdO2hjGuvULROo3O8rlB2CRtSseE5KeirnyE4t/thAn/EwvS/vuQeJCn+NZg==} + '@inquirer/type@3.0.7': + resolution: {integrity: sha512-PfunHQcjwnju84L+ycmcMKB/pTPIngjUJvfnRhKY6FKPuYXlM4aQCb/nIdTFR6BEhMjFvngzvng/vBAJMZpLSA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -562,29 +552,24 @@ packages: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} - '@jridgewell/gen-mapping@0.3.5': - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} - engines: {node: '>=6.0.0'} + '@jridgewell/gen-mapping@0.3.12': + resolution: {integrity: sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==} '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - '@jridgewell/set-array@1.2.1': - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} + '@jridgewell/sourcemap-codec@1.5.4': + resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - - '@jridgewell/trace-mapping@0.3.25': - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.29': + resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==} '@material/material-color-utilities@0.2.7': resolution: {integrity: sha512-0FCeqG6WvK4/Cc06F/xXMd/pv4FeisI0c1tUpBbfhA2n9Y8eZEv4Karjbmf2ZqQCPUWMrGp8A571tCjizxoTiQ==} - '@mswjs/interceptors@0.37.6': - resolution: {integrity: sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==} + '@mswjs/interceptors@0.39.2': + resolution: {integrity: sha512-RuzCup9Ct91Y7V79xwCb146RaBRHZ7NBbrIUySumd1rpKqHL5OonaqrGIbug5hNwP/fRyxFMA6ISgw4FTtYFYg==} engines: {node: '>=18'} '@open-draft/deferred-promise@2.2.0': @@ -596,130 +581,176 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@oxlint/darwin-arm64@1.6.0': + resolution: {integrity: sha512-m3wyqBh1TOHjpr/dXeIZY7OoX+MQazb+bMHQdDtwUvefrafUx+5YHRvulYh1sZSQ449nQ3nk3qj5qj535vZRjg==} + cpu: [arm64] + os: [darwin] + + '@oxlint/darwin-x64@1.6.0': + resolution: {integrity: sha512-75fJfF/9xNypr7cnOYoZBhfmG1yP7ex3pUOeYGakmtZRffO9z1i1quLYhjZsmaDXsAIZ3drMhenYHMmFKS3SRg==} + cpu: [x64] + os: [darwin] + + '@oxlint/linux-arm64-gnu@1.6.0': + resolution: {integrity: sha512-YhXGf0FXa72bEt4F7eTVKx5X3zWpbAOPnaA/dZ6/g8tGhw1m9IFjrabVHFjzcx3dQny4MgA59EhyElkDvpUe8A==} + cpu: [arm64] + os: [linux] + + '@oxlint/linux-arm64-musl@1.6.0': + resolution: {integrity: sha512-T3JDhx8mjGjvh5INsPZJrlKHmZsecgDYvtvussKRdkc1Nnn7WC+jH9sh5qlmYvwzvmetlPVNezAoNvmGO9vtMg==} + cpu: [arm64] + os: [linux] + + '@oxlint/linux-x64-gnu@1.6.0': + resolution: {integrity: sha512-Dx7ghtAl8aXBdqofJpi338At6lkeCtTfoinTYQXd9/TEJx+f+zCGNlQO6nJz3ydJBX48FDuOFKkNC+lUlWrd8w==} + cpu: [x64] + os: [linux] + + '@oxlint/linux-x64-musl@1.6.0': + resolution: {integrity: sha512-7KvMGdWmAZtAtg6IjoEJHKxTXdAcrHnUnqfgs0JpXst7trquV2mxBeRZusQXwxpu4HCSomKMvJfsp1qKaqSFDg==} + cpu: [x64] + os: [linux] + + '@oxlint/win32-arm64@1.6.0': + resolution: {integrity: sha512-iSGC9RwX+dl7o5KFr5aH7Gq3nFbkq/3Gda6mxNPMvNkWrgXdIyiINxpyD8hJu566M+QSv1wEAu934BZotFDyoQ==} + cpu: [arm64] + os: [win32] + + '@oxlint/win32-x64@1.6.0': + resolution: {integrity: sha512-jOj3L/gfLc0IwgOTkZMiZ5c673i/hbAmidlaylT0gE6H18hln9HxPgp5GCf4E4y6mwEJlW8QC5hQi221+9otdA==} + cpu: [x64] + os: [win32] + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@rollup/rollup-android-arm-eabi@4.40.1': - resolution: {integrity: sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==} + '@rollup/rollup-android-arm-eabi@4.45.0': + resolution: {integrity: sha512-2o/FgACbji4tW1dzXOqAV15Eu7DdgbKsF2QKcxfG4xbh5iwU7yr5RRP5/U+0asQliSYv5M4o7BevlGIoSL0LXg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.40.1': - resolution: {integrity: sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==} + '@rollup/rollup-android-arm64@4.45.0': + resolution: {integrity: sha512-PSZ0SvMOjEAxwZeTx32eI/j5xSYtDCRxGu5k9zvzoY77xUNssZM+WV6HYBLROpY5CkXsbQjvz40fBb7WPwDqtQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.40.1': - resolution: {integrity: sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==} + '@rollup/rollup-darwin-arm64@4.45.0': + resolution: {integrity: sha512-BA4yPIPssPB2aRAWzmqzQ3y2/KotkLyZukVB7j3psK/U3nVJdceo6qr9pLM2xN6iRP/wKfxEbOb1yrlZH6sYZg==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.40.1': - resolution: {integrity: sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==} + '@rollup/rollup-darwin-x64@4.45.0': + resolution: {integrity: sha512-Pr2o0lvTwsiG4HCr43Zy9xXrHspyMvsvEw4FwKYqhli4FuLE5FjcZzuQ4cfPe0iUFCvSQG6lACI0xj74FDZKRA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.40.1': - resolution: {integrity: sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==} + '@rollup/rollup-freebsd-arm64@4.45.0': + resolution: {integrity: sha512-lYE8LkE5h4a/+6VnnLiL14zWMPnx6wNbDG23GcYFpRW1V9hYWHAw9lBZ6ZUIrOaoK7NliF1sdwYGiVmziUF4vA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.40.1': - resolution: {integrity: sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==} + '@rollup/rollup-freebsd-x64@4.45.0': + resolution: {integrity: sha512-PVQWZK9sbzpvqC9Q0GlehNNSVHR+4m7+wET+7FgSnKG3ci5nAMgGmr9mGBXzAuE5SvguCKJ6mHL6vq1JaJ/gvw==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.40.1': - resolution: {integrity: sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==} + '@rollup/rollup-linux-arm-gnueabihf@4.45.0': + resolution: {integrity: sha512-hLrmRl53prCcD+YXTfNvXd776HTxNh8wPAMllusQ+amcQmtgo3V5i/nkhPN6FakW+QVLoUUr2AsbtIRPFU3xIA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.40.1': - resolution: {integrity: sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==} + '@rollup/rollup-linux-arm-musleabihf@4.45.0': + resolution: {integrity: sha512-XBKGSYcrkdiRRjl+8XvrUR3AosXU0NvF7VuqMsm7s5nRy+nt58ZMB19Jdp1RdqewLcaYnpk8zeVs/4MlLZEJxw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.40.1': - resolution: {integrity: sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==} + '@rollup/rollup-linux-arm64-gnu@4.45.0': + resolution: {integrity: sha512-fRvZZPUiBz7NztBE/2QnCS5AtqLVhXmUOPj9IHlfGEXkapgImf4W9+FSkL8cWqoAjozyUzqFmSc4zh2ooaeF6g==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.40.1': - resolution: {integrity: sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==} + '@rollup/rollup-linux-arm64-musl@4.45.0': + resolution: {integrity: sha512-Btv2WRZOcUGi8XU80XwIvzTg4U6+l6D0V6sZTrZx214nrwxw5nAi8hysaXj/mctyClWgesyuxbeLylCBNauimg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.40.1': - resolution: {integrity: sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.45.0': + resolution: {integrity: sha512-Li0emNnwtUZdLwHjQPBxn4VWztcrw/h7mgLyHiEI5Z0MhpeFGlzaiBHpSNVOMB/xucjXTTcO+dhv469Djr16KA==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': - resolution: {integrity: sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==} + '@rollup/rollup-linux-powerpc64le-gnu@4.45.0': + resolution: {integrity: sha512-sB8+pfkYx2kvpDCfd63d5ScYT0Fz1LO6jIb2zLZvmK9ob2D8DeVqrmBDE0iDK8KlBVmsTNzrjr3G1xV4eUZhSw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.40.1': - resolution: {integrity: sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==} + '@rollup/rollup-linux-riscv64-gnu@4.45.0': + resolution: {integrity: sha512-5GQ6PFhh7E6jQm70p1aW05G2cap5zMOvO0se5JMecHeAdj5ZhWEHbJ4hiKpfi1nnnEdTauDXxPgXae/mqjow9w==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.40.1': - resolution: {integrity: sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==} + '@rollup/rollup-linux-riscv64-musl@4.45.0': + resolution: {integrity: sha512-N/euLsBd1rekWcuduakTo/dJw6U6sBP3eUq+RXM9RNfPuWTvG2w/WObDkIvJ2KChy6oxZmOSC08Ak2OJA0UiAA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.40.1': - resolution: {integrity: sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==} + '@rollup/rollup-linux-s390x-gnu@4.45.0': + resolution: {integrity: sha512-2l9sA7d7QdikL0xQwNMO3xURBUNEWyHVHfAsHsUdq+E/pgLTUcCE+gih5PCdmyHmfTDeXUWVhqL0WZzg0nua3g==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.40.1': - resolution: {integrity: sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==} + '@rollup/rollup-linux-x64-gnu@4.45.0': + resolution: {integrity: sha512-XZdD3fEEQcwG2KrJDdEQu7NrHonPxxaV0/w2HpvINBdcqebz1aL+0vM2WFJq4DeiAVT6F5SUQas65HY5JDqoPw==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.40.1': - resolution: {integrity: sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==} + '@rollup/rollup-linux-x64-musl@4.45.0': + resolution: {integrity: sha512-7ayfgvtmmWgKWBkCGg5+xTQ0r5V1owVm67zTrsEY1008L5ro7mCyGYORomARt/OquB9KY7LpxVBZes+oSniAAQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.40.1': - resolution: {integrity: sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==} + '@rollup/rollup-win32-arm64-msvc@4.45.0': + resolution: {integrity: sha512-B+IJgcBnE2bm93jEW5kHisqvPITs4ddLOROAcOc/diBgrEiQJJ6Qcjby75rFSmH5eMGrqJryUgJDhrfj942apQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.40.1': - resolution: {integrity: sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==} + '@rollup/rollup-win32-ia32-msvc@4.45.0': + resolution: {integrity: sha512-+CXwwG66g0/FpWOnP/v1HnrGVSOygK/osUbu3wPRy8ECXjoYKjRAyfxYpDQOfghC5qPJYLPH0oN4MCOjwgdMug==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.40.1': - resolution: {integrity: sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==} + '@rollup/rollup-win32-x64-msvc@4.45.0': + resolution: {integrity: sha512-SRf1cytG7wqcHVLrBc9VtPK4pU5wxiB/lNIkNmW2ApKXIg+RpqwHfsaEK+e7eH4A1BpI6BX/aBWXxZCIrJg3uA==} cpu: [x64] os: [win32] - '@shikijs/engine-oniguruma@3.2.1': - resolution: {integrity: sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ==} + '@shikijs/engine-oniguruma@3.7.0': + resolution: {integrity: sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==} - '@shikijs/langs@3.2.1': - resolution: {integrity: sha512-If0iDHYRSGbihiA8+7uRsgb1er1Yj11pwpX1c6HLYnizDsKAw5iaT3JXj5ZpaimXSWky/IhxTm7C6nkiYVym+A==} + '@shikijs/langs@3.7.0': + resolution: {integrity: sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==} - '@shikijs/themes@3.2.1': - resolution: {integrity: sha512-k5DKJUT8IldBvAm8WcrDT5+7GA7se6lLksR+2E3SvyqGTyFMzU2F9Gb7rmD+t+Pga1MKrYFxDIeyWjMZWM6uBQ==} + '@shikijs/themes@3.7.0': + resolution: {integrity: sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==} - '@shikijs/types@3.2.1': - resolution: {integrity: sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA==} + '@shikijs/types@3.7.0': + resolution: {integrity: sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==} '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + '@types/chai@5.2.2': + resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/estree@1.0.7': - resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} @@ -727,11 +758,11 @@ packages: '@types/jsdom@21.1.7': resolution: {integrity: sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==} - '@types/node@22.13.14': - resolution: {integrity: sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==} + '@types/node@22.16.3': + resolution: {integrity: sha512-sr4Xz74KOUeYadexo1r8imhRtlVXcs+j3XK3TcoiYk7B1t3YRVJgtaD3cwX73NYb71pmVuMLNRhJ9XKdoDB74g==} - '@types/statuses@2.0.5': - resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/statuses@2.0.6': + resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} '@types/tough-cookie@4.0.5': resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} @@ -739,39 +770,39 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@vitest/coverage-istanbul@3.0.9': - resolution: {integrity: sha512-/TXh2qmOhclmVPjOnPTpIO4Xr6l2P5EwyXQygenwq4/ZQ/vPsrz+GCRZF9kBeQi6xrGcHv368Si9PGImWQawVg==} + '@vitest/coverage-istanbul@3.2.4': + resolution: {integrity: sha512-IDlpuFJiWU9rhcKLkpzj8mFu/lpe64gVgnV15ZOrYx1iFzxxrxCzbExiUEKtwwXRvEiEMUS6iZeYgnMxgbqbxQ==} peerDependencies: - vitest: 3.0.9 + vitest: 3.2.4 - '@vitest/expect@3.0.9': - resolution: {integrity: sha512-5eCqRItYgIML7NNVgJj6TVCmdzE7ZVgJhruW0ziSQV4V7PvLkDL1bBkBdcTs/VuIz0IxPb5da1IDSqc1TR9eig==} + '@vitest/expect@3.2.4': + resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} - '@vitest/mocker@3.0.9': - resolution: {integrity: sha512-ryERPIBOnvevAkTq+L1lD+DTFBRcjueL9lOUfXsLfwP92h4e+Heb+PjiqS3/OURWPtywfafK0kj++yDFjWUmrA==} + '@vitest/mocker@3.2.4': + resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@3.0.9': - resolution: {integrity: sha512-OW9F8t2J3AwFEwENg3yMyKWweF7oRJlMyHOMIhO5F3n0+cgQAJZBjNgrF8dLwFTEXl5jUqBLXd9QyyKv8zEcmA==} + '@vitest/pretty-format@3.2.4': + resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} - '@vitest/runner@3.0.9': - resolution: {integrity: sha512-NX9oUXgF9HPfJSwl8tUZCMP1oGx2+Sf+ru6d05QjzQz4OwWg0psEzwY6VexP2tTHWdOkhKHUIZH+fS6nA7jfOw==} + '@vitest/runner@3.2.4': + resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} - '@vitest/snapshot@3.0.9': - resolution: {integrity: sha512-AiLUiuZ0FuA+/8i19mTYd+re5jqjEc2jZbgJ2up0VY0Ddyyxg/uUtBDpIFAy4uzKaQxOW8gMgBdAJJ2ydhu39A==} + '@vitest/snapshot@3.2.4': + resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} - '@vitest/spy@3.0.9': - resolution: {integrity: sha512-/CcK2UDl0aQ2wtkp3YVWldrpLRNCfVcIOFGlVGKO4R5eajsH393Z1yiXLVQ7vWsj26JOEjeZI0x5sm5P4OGUNQ==} + '@vitest/spy@3.2.4': + resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} - '@vitest/utils@3.0.9': - resolution: {integrity: sha512-ilHM5fHhZ89MCp5aAaM9uhfl1c2JdxVxl3McqsdVyVNN6JffnEen8UMCdRTzOhGXNQGo5GNL9QugHrz727Wnng==} + '@vitest/utils@3.2.4': + resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} acorn-jsx-walk@2.0.0: resolution: {integrity: sha512-uuo6iJj4D4ygkdzd6jPtcxs8vZgDX9YFIkqczGImoypX2fQ4dVImmu3UzA4ynixCIMTrEOWW+95M2HuBaCEOVA==} @@ -781,21 +812,21 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-loose@8.4.0: - resolution: {integrity: sha512-M0EUka6rb+QC4l9Z3T0nJEzNOO7JcoJlYMrBlyBCiFSXRyxjLKayd4TbQs2FDRWQU1h9FR7QVNHt+PEaoNL5rQ==} + acorn-loose@8.5.2: + resolution: {integrity: sha512-PPvV6g8UGMGgjrMu+n/f9E/tCSkNQ2Y97eFvuVdJfG11+xdIeDcLyNdC8SHcrHbRqkfwLASdplyR6B6sKM1U4A==} engines: {node: '>=0.4.0'} - acorn-walk@8.3.3: - resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} - acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} engines: {node: '>=0.4.0'} hasBin: true - agent-base@7.1.3: - resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} ajv@8.17.1: @@ -809,8 +840,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} ansi-styles@4.3.0: @@ -828,17 +859,14 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} - browserslist@4.23.2: - resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==} + browserslist@4.25.1: + resolution: {integrity: sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -858,12 +886,12 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} - caniuse-lite@1.0.30001642: - resolution: {integrity: sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==} + caniuse-lite@1.0.30001727: + resolution: {integrity: sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==} - chai@5.2.0: - resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} - engines: {node: '>=12'} + chai@5.2.1: + resolution: {integrity: sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==} + engines: {node: '>=18'} chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -895,12 +923,8 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - - commander@12.1.0: - resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + commander@13.1.0: + resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} engines: {node: '>=18'} compare-versions@6.1.1: @@ -929,8 +953,8 @@ packages: cssfontparser@1.2.1: resolution: {integrity: sha512-6tun4LoZnj7VN6YeegOVb67KBX/7JJsqvj+pv3ZA7F878/eN33AbGa5b/S/wXxS/tcp8nc40xRUrsPlxIyNUPg==} - cssstyle@4.3.0: - resolution: {integrity: sha512-6r0NiY0xizYqfBvWp1G7WXJ06/bZyrk7Dc6PHql82C/pKGUTKu4yAX4Y8JPamb1ob9nBKuxWzCGTRuGwU3yxJQ==} + cssstyle@4.6.0: + resolution: {integrity: sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==} engines: {node: '>=18'} dagre@0.8.5: @@ -940,8 +964,8 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} - debug@4.4.0: - resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -949,8 +973,8 @@ packages: supports-color: optional: true - decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} @@ -960,12 +984,8 @@ packages: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - - dependency-cruiser@16.3.10: - resolution: {integrity: sha512-WkCnibHBfvaiaQ+S46LZ6h4AR6oj42Vsf5/0Vgtrwdwn7ZekMJdZ/ALoTwNp/RaGlKW+MbV/fhSZOvmhAWVWzQ==} + dependency-cruiser@16.10.4: + resolution: {integrity: sha512-hrxVOjIm8idZ9ZVDGSyyG3SHiNcEUPhL6RTEmO/3wfQWLepH5pA3nuDMMrcJ1DkZztFA7xg3tk8OVO+MmwwH9w==} engines: {node: ^18.17||>=20} hasBin: true @@ -976,8 +996,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.4.830: - resolution: {integrity: sha512-TrPKKH20HeN0J1LHzsYLs2qwXrp8TF4nHdu4sq61ozGbzMpWhI7iIOPYPPkxeq1azMT9PZ8enPFcftbs/Npcjg==} + electron-to-chromium@1.5.182: + resolution: {integrity: sha512-Lv65Btwv9W4J9pyODI6EWpdnhfvrve/us5h1WspW8B2Fb0366REPtY3hX7ounk1CkV/TBjWCEvCBBbYbmV0qCA==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -985,14 +1005,18 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - enhanced-resolve@5.17.1: - resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} + enhanced-resolve@5.18.2: + resolution: {integrity: sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==} engines: {node: '>=10.13.0'} entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + es-define-property@1.0.1: resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} @@ -1001,24 +1025,20 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-module-lexer@1.6.0: - resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.1.0: - resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} - engines: {node: '>= 0.4'} - - esbuild@0.25.2: - resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==} + esbuild@0.25.6: + resolution: {integrity: sha512-GVuzuUwtdsghE3ocJ9Bs8PNoF13HNQ5TXbEi2AhvVb8xU1Iwt9Fos9FEamfoee+u/TOsn7GUWc04lz46n2bbTg==} engines: {node: '>=18'} hasBin: true - escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} estree-walker@3.0.3: @@ -1034,8 +1054,8 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - expect-type@1.1.0: - resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} + expect-type@1.2.2: + resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} engines: {node: '>=12.0.0'} external-editor@3.1.0: @@ -1045,25 +1065,21 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-uri@3.0.1: - resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + fast-uri@3.0.6: + resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} - fdir@6.4.4: - resolution: {integrity: sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==} + fdir@6.4.6: + resolution: {integrity: sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==} peerDependencies: picomatch: ^3 || ^4 peerDependenciesMeta: picomatch: optional: true - foreground-child@3.2.1: - resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - form-data@4.0.2: - resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} - engines: {node: '>= 6'} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1096,10 +1112,6 @@ packages: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} engines: {node: '>=18'} - globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} @@ -1121,8 +1133,8 @@ packages: peerDependencies: graphology-types: '>=0.24.0' - graphql@16.9.0: - resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} + graphql@16.11.0: + resolution: {integrity: sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} has-flag@4.0.0: @@ -1136,10 +1148,6 @@ packages: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} - has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -1162,8 +1170,8 @@ packages: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} - i18next-browser-languagedetector@8.0.4: - resolution: {integrity: sha512-f3frU3pIxD50/Tz20zx9TD9HobKYg47fmAETb117GKGPrhwcSSPJDoCposXlVycVebQ9GQohC3Efbpq7/nnJ5w==} + i18next-browser-languagedetector@8.2.0: + resolution: {integrity: sha512-P+3zEKLnOF0qmiesW383vsLdtQVyKtCNA9cjSoKCppTKPQVfKd2W8hbVo5ZhNJKDqeM7BOcvNoKJOjpHh4Js9g==} i18next-http-backend@2.7.3: resolution: {integrity: sha512-FgZxrXdRA5u44xfYsJlEBL4/KH3f2IluBpgV/7riW0YW2VEyM8FzVt2XHAOi6id0Ppj7vZvCZVpp5LrGXnc8Ig==} @@ -1195,8 +1203,8 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + ignore@7.0.5: + resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} engines: {node: '>= 4'} immediate@3.0.6: @@ -1209,8 +1217,8 @@ packages: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - inquirer@12.5.0: - resolution: {integrity: sha512-aiBBq5aKF1k87MTxXDylLfwpRwToShiHrSv4EmB07EYyLgmnjEz5B3rn0aGw1X3JA/64Ngf2T54oGwc+BCsPIQ==} + inquirer@12.7.0: + resolution: {integrity: sha512-KKFRc++IONSyE2UYw9CJ1V0IWx5yQKomwB+pp3cWomWs+v2+ZsG11G2OVfAjFS6WWCppKw+RfKmpqGfSzD5QBQ==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -1222,8 +1230,8 @@ packages: resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} engines: {node: '>=10.13.0'} - is-core-module@2.15.0: - resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} is-fullwidth-code-point@3.0.0: @@ -1282,12 +1290,15 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsdom@26.0.0: - resolution: {integrity: sha512-BZYDGVAIriBWTpIxYzrXjv3E/4u8+/pSG5bQdIYCbNCGOvsPkDQfTVLAIXAf9ETdCpduCVTkDe2NNZ8NIwUVzw==} + jsdom@26.1.0: + resolution: {integrity: sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==} engines: {node: '>=18'} peerDependencies: canvas: ^3.0.0 @@ -1295,16 +1306,16 @@ packages: canvas: optional: true - jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} hasBin: true json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - json-stable-stringify@1.2.1: - resolution: {integrity: sha512-Lp6HbbBgosLmJbjx0pBLbgvx68FaFU1sdkmBuckmhhJ88kL13OA51CDtR2yJB50eCNMH9wRqtQNNiAqQH4YXnA==} + json-stable-stringify@1.3.0: + resolution: {integrity: sha512-qtYiSSFlwot9XHtF9bD9c7rwKjr+RecWT//ZnPvSmEjpV5mmPOCN4j8UjY5hbjNkOwZ/jQv3J6R1/pL7RwgMsg==} engines: {node: '>= 0.4'} json5@2.2.3: @@ -1322,58 +1333,58 @@ packages: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} - lefthook-darwin-arm64@1.11.6: - resolution: {integrity: sha512-gWgdWrKgZgX+bKc6Vs/x7JkO+58lLOpRzpteLx//82D0MKVPlNZwjd4zz4AbIBXtM4Hcj+6gSsOzQ7QDXxjVvQ==} + lefthook-darwin-arm64@1.12.2: + resolution: {integrity: sha512-fTxeI9tEskrHjc3QyEO+AG7impBXY2Ed8V5aiRc3fw9POfYtVh9b5jRx90fjk2+ld5hf+Z1DsyyLq/vOHDFskQ==} cpu: [arm64] os: [darwin] - lefthook-darwin-x64@1.11.6: - resolution: {integrity: sha512-Ia0TjTKuYcSaDTuoCnbWtpPZ2VEoKzgn33OB90VjNaSVs4ooE0PIdpO+w00x1elqIaf1pbrpq6HgeB26Du8KbQ==} + lefthook-darwin-x64@1.12.2: + resolution: {integrity: sha512-T1dCDKAAfdHgYZ8qtrS02SJSHoR52RFcrGArFNll9Mu4ZSV19Sp8BO+kTwDUOcLYdcPGNaqOp9PkRBQGZWQC7g==} cpu: [x64] os: [darwin] - lefthook-freebsd-arm64@1.11.6: - resolution: {integrity: sha512-PxIwj+hmjLahyzEmcIfalIBDhgklAQCavwM4sGCgbzDi4/+VQX+4aEs4pQqtd7v3aohmjtO/4n2emzTI8donww==} + lefthook-freebsd-arm64@1.12.2: + resolution: {integrity: sha512-2n9z7Q4BKeMBoB9cuEdv0UBQH82Z4GgBQpCrfjCtyzpDnYQwrH8Tkrlnlko4qPh9MM6nLLGIYMKsA5nltzo8Cg==} cpu: [arm64] os: [freebsd] - lefthook-freebsd-x64@1.11.6: - resolution: {integrity: sha512-3o1lMKxz1VtWaP/o117wgUn3ZOpefMoSf+8LuiTzI3/PDprIuzgyw2nXKlBZAMDpNPHMNnJeQNts9XLMRmkldg==} + lefthook-freebsd-x64@1.12.2: + resolution: {integrity: sha512-1hNY/irY+/3kjRzKoJYxG+m3BYI8QxopJUK1PQnknGo1Wy5u302SdX+tR7pnpz6JM5chrNw4ozSbKKOvdZ5VEw==} cpu: [x64] os: [freebsd] - lefthook-linux-arm64@1.11.6: - resolution: {integrity: sha512-nKPFZ5cA9f5tVn0ybDVqcXXlpTHZqo05N4KQRhWTj5Nem+JoD2YzJIlvZhdJhUrldERqj6deDMXChH5T3z4Rrw==} + lefthook-linux-arm64@1.12.2: + resolution: {integrity: sha512-1W4swYIVRkxq/LFTuuK4oVpd6NtTKY4E3VY2Uq2JDkIOJV46+8qGBF+C/QA9K3O9chLffgN7c+i+NhIuGiZ/Vw==} cpu: [arm64] os: [linux] - lefthook-linux-x64@1.11.6: - resolution: {integrity: sha512-naN8dllLCOEeP+wznLnq+oXrs1dvt/iMLkcl+pOPWLqFccPfDiHzr8V8GslaTa+rSFsAnvjR7SJIOi5C29xedA==} + lefthook-linux-x64@1.12.2: + resolution: {integrity: sha512-J6VGuMfhq5iCsg1Pv7xULbuXC63gP5LaikT0PhkyBNMi3HQneZFDJ8k/sp0Ue9HkQv6QfWIo3/FgB9gz38MCFw==} cpu: [x64] os: [linux] - lefthook-openbsd-arm64@1.11.6: - resolution: {integrity: sha512-dPxhJfYQ667T+U3pz1+O3mTRNHzXH/BvPlXSH+oy8uiSry4AtVNRXkVvXPUcpLlrAy6HuFYodsrpCIlWFeYwiQ==} + lefthook-openbsd-arm64@1.12.2: + resolution: {integrity: sha512-wncDRW3ml24DaOyH22KINumjvCohswbQqbxyH2GORRCykSnE859cTjOrRIchTKBIARF7PSeGPUtS7EK0+oDbaw==} cpu: [arm64] os: [openbsd] - lefthook-openbsd-x64@1.11.6: - resolution: {integrity: sha512-9D26kcSsjiW4D0AuVDdi+0ZqrsOzRWOpMS/kcUbLfrU99yCvma0rMTqKbbDMkVur/znS7qL53oGahXCXDNA+IQ==} + lefthook-openbsd-x64@1.12.2: + resolution: {integrity: sha512-2jDOkCHNnc/oK/vR62hAf3vZb1EQ6Md2GjIlgZ/V7A3ztOsM8QZ5IxwYN3D1UOIR5ZnwMBy7PtmTJC/HJrig5w==} cpu: [x64] os: [openbsd] - lefthook-windows-arm64@1.11.6: - resolution: {integrity: sha512-xdCenr4+BFnfBEhiXj6GJp02EPmcwTAGa7NYm6hVTfDwGXw24tuLv7lpnGjgK3kovN6EukgLH1FYkeyDOBEMnA==} + lefthook-windows-arm64@1.12.2: + resolution: {integrity: sha512-ZMH/q6UNSidhHEG/1QoqIl1n4yPTBWuVmKx5bONtKHicoz4QCQ+QEiNjKsG5OO4C62nfyHGThmweCzZVUQECJw==} cpu: [arm64] os: [win32] - lefthook-windows-x64@1.11.6: - resolution: {integrity: sha512-Fg2GzLhzeDV/GX8+ydrI0wBOytQWpPkNdngx+a8B/feCDbwjAiFklDG5oV4ytuWrtg1JPEEWLJd6nHefj4wtHA==} + lefthook-windows-x64@1.12.2: + resolution: {integrity: sha512-TqT2jIPcTQ9uwaw+v+DTmvnUHM/p7bbsSrPoPX+fRXSGLzFjyiY+12C9dObSwfCQq6rT70xqQJ9AmftJQsa5/Q==} cpu: [x64] os: [win32] - lefthook@1.11.6: - resolution: {integrity: sha512-j0VmMM50WlPDassmgvapRum9po29Tv1BXzBNFpzGkk9E91CEG9jKik/OHyH/r/na+q8qNIUUyPL6QQuTN/UhQQ==} + lefthook@1.12.2: + resolution: {integrity: sha512-2CeTu5NcmoT9YnqsHTq/TF36MlqlzHzhivGx3DrXHwcff4TdvrkIwUTA56huM3Nlo5ODAF/0hlPzaKLmNHCBnQ==} hasBin: true lie@3.3.0: @@ -1385,8 +1396,8 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - loupe@3.1.3: - resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} + loupe@3.1.4: + resolution: {integrity: sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==} lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -1418,18 +1429,10 @@ packages: mdurl@2.0.0: resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - memoize@10.0.0: - resolution: {integrity: sha512-H6cBLgsi6vMWOcCpvVCdFFnl3kerEXbrYh9q+lY6VXvQSmM6CkmV08VOwT+WE2tzIEqRPFfAq3fm4v/UIW6mSA==} + memoize@10.1.0: + resolution: {integrity: sha512-MMbFhJzh4Jlg/poq1si90XRlTZRDHVqdlz2mPyGJ6kqMpyHUyVpDd5gpFAvVehW64+RA1eKE9Yt8aSLY7w2Kgg==} engines: {node: '>=18'} - mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - - mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - mimic-function@5.0.1: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} @@ -1451,8 +1454,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.7.3: - resolution: {integrity: sha512-+mycXv8l2fEAjFZ5sjrtjJDmm2ceKGjrNbBr1durRg6VkU9fNUE/gsmQ51hWbHqs+l35W1iM+ZsmOD9Fd6lspw==} + msw@2.10.4: + resolution: {integrity: sha512-6R1or/qyele7q3RyPwNuvc0IxO8L8/Aim6Sz5ncXEgcWUNxSKE+udriTOWHtpMwmfkLYlacA2y7TIx4cL5lgHA==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -1483,8 +1486,8 @@ packages: encoding: optional: true - node-releases@2.0.17: - resolution: {integrity: sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==} + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} nwsapi@2.2.20: resolution: {integrity: sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==} @@ -1503,17 +1506,22 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + oxlint@1.6.0: + resolution: {integrity: sha512-jtaD65PqzIa1udvSxxscTKBxYKuZoFXyKGLiU1Qjo1ulq3uv/fQDtoV1yey1FrQZrQjACGPi1Widsy1TucC7Jg==} + engines: {node: '>=8.*'} + hasBin: true + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} - papaparse@5.4.1: - resolution: {integrity: sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==} + papaparse@5.5.3: + resolution: {integrity: sha512-5QvjGxYVjxO59MGU2lHVYpRWBBtKHnlIAcSe1uNFCkkptUh63NFRj0FJQm7nR67puEruUci/ZkjmEFrjCAyP4A==} - parse5@7.2.1: - resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} @@ -1532,21 +1540,18 @@ packages: pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - pathval@2.0.0: - resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} engines: {node: '>= 14.16'} - phaser3-rex-plugins@1.80.15: - resolution: {integrity: sha512-Ur973N1W5st6XEYBcJko8eTcEbdDHMM+m7VqvT3j/EJeJwYyJ3bVb33JJDsFgefk3A2iAz2itP/UY7CzxJOJVA==} + phaser3-rex-plugins@1.80.16: + resolution: {integrity: sha512-c34SfEjdK7rz8EbM7bDmJwB/xCb/YR77IaAaowzqkCLb7pLeI3E8PfLivm882iirN11XOHjYT2uYlvtdbNAtMA==} phaser3spectorjs@0.0.8: resolution: {integrity: sha512-0dSO7/aMjEUPrp5EcjRvRRsEf+jXDbmzalPeJ6VtTB2Pn1PeaKc+qlL/DmO3l1Dvc5lkzc+Sil1Ta+Hkyi5cbA==} - phaser@3.88.2: - resolution: {integrity: sha512-UBgd2sAFuRJbF2xKaQ5jpMWB8oETncChLnymLGHcrnT53vaqiGrQWbUKUDBawKLm24sghjKo4Bf+/xfv8espZQ==} - - picocolors@1.0.1: - resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + phaser@3.90.0: + resolution: {integrity: sha512-/cziz/5ZIn02uDkC9RzN8VF9x3Gs3XdFFf9nkiMEQT3p7hQlWuyjy4QWosU802qqno2YSLn2BfqwOKLv/sSVfQ==} picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1555,10 +1560,15 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - postcss@8.5.3: - resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} + postcss@8.5.6: + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} + prettier@3.6.2: + resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + engines: {node: '>=14'} + hasBin: true + process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -1566,8 +1576,8 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} - psl@1.9.0: - resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + psl@1.15.0: + resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} punycode.js@2.3.1: resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} @@ -1587,9 +1597,6 @@ packages: resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} engines: {node: '>= 10.13.0'} - regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -1605,20 +1612,21 @@ packages: requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} hasBin: true - rollup@4.40.1: - resolution: {integrity: sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==} + rollup@4.45.0: + resolution: {integrity: sha512-WLjEcJRIo7i3WDDgOIJqVI2d+lAC3EwvOGy+Xfq6hs+GQuAA4Di/H72xmXkOhrIWFg2PFYSKZYfH0f4vfKXN4A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true rrweb-cssom@0.8.0: resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} - run-async@3.0.0: - resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + run-async@4.0.4: + resolution: {integrity: sha512-2cgeRHnV11lSXBEhq7sN7a5UVjTKm9JTb9x8ApIT//16D7QL96AgnNeWSGoB4gIHc0iYw/Ha0Z+waBaCYZVNhg==} engines: {node: '>=0.12.0'} rxjs@7.8.2: @@ -1641,8 +1649,8 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.7.1: - resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + semver@7.7.2: + resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} hasBin: true @@ -1678,12 +1686,12 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} - std-env@3.8.0: - resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} strict-event-emitter@0.5.1: resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} @@ -1711,6 +1719,9 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + strip-literal@3.0.0: + resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -1722,8 +1733,8 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - tapable@2.2.1: - resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + tapable@2.2.2: + resolution: {integrity: sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==} engines: {node: '>=6'} teamcity-service-messages@0.1.14: @@ -1739,27 +1750,27 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.13: - resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==} + tinyglobby@0.2.14: + resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} engines: {node: '>=12.0.0'} - tinypool@1.0.2: - resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} engines: {node: ^18.0.0 || >=20.0.0} tinyrainbow@2.0.0: resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} engines: {node: '>=14.0.0'} - tinyspy@3.0.2: - resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + tinyspy@4.0.3: + resolution: {integrity: sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==} engines: {node: '>=14.0.0'} - tldts-core@6.1.85: - resolution: {integrity: sha512-DTjUVvxckL1fIoPSb3KE7ISNtkWSawZdpfxGxwiIrZoO6EbHVDXXUIlIuWympPaeS+BLGyggozX/HTMsRAdsoA==} + tldts-core@6.1.86: + resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} - tldts@6.1.85: - resolution: {integrity: sha512-gBdZ1RjCSevRPFix/hpaUWeak2/RNUZB4/8frF1r5uYMHjFptkiT0JXIebWvgI/0ZHXvxaUDDJshiA0j6GdL3w==} + tldts@6.1.86: + resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true tmp@0.0.33: @@ -1777,12 +1788,12 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - tr46@5.1.0: - resolution: {integrity: sha512-IUWnUK7ADYR5Sl1fZlO1INDUhVhatWl7BtJWsIhwJ0UAK7ilzzIa8uIqOO/aYVWHZPJkKbEL+362wrzoeRF7bw==} + tr46@5.1.1: + resolution: {integrity: sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==} engines: {node: '>=18'} - tsconfck@3.1.1: - resolution: {integrity: sha512-00eoI6WY57SvZEVjm13stEVE90VkEdJAFGgpFLTsZbJyW/LwFQ7uQxJHWpZ2hzSWgCPKc9AnBnNP+0X7o3hAmQ==} + tsconfck@3.1.6: + resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} engines: {node: ^18 || >=20} hasBin: true peerDependencies: @@ -1791,8 +1802,8 @@ packages: typescript: optional: true - tsconfig-paths-webpack-plugin@4.1.0: - resolution: {integrity: sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA==} + tsconfig-paths-webpack-plugin@4.2.0: + resolution: {integrity: sha512-zbem3rfRS8BgeNK50Zz5SIQgXzLafiHjOwUAvk/38/o1jHn/V5QAgVUcz884or7WYcPaH3N2CIfUc2u0ul7UcA==} engines: {node: '>=10.13.0'} tsconfig-paths@4.2.0: @@ -1806,34 +1817,34 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - type-fest@4.26.1: - resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - typedoc@0.28.1: - resolution: {integrity: sha512-Mn2VPNMaxoe/hlBiLriG4U55oyAa3Xo+8HbtEwV7F5WEOPXqtxzGuMZhJYHaqFJpajeQ6ZDUC2c990NAtTbdgw==} + typedoc@0.28.7: + resolution: {integrity: sha512-lpz0Oxl6aidFkmS90VQDQjk/Qf2iw0IUvFqirdONBdj7jPSN9mGXhy66BcGNDxx5ZMyKKiBVAREvPEzT6Uxipw==} engines: {node: '>= 18', pnpm: '>= 10'} hasBin: true peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x - typescript@5.8.2: - resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} engines: {node: '>=14.17'} hasBin: true uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} - update-browserslist-db@1.1.0: - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + update-browserslist-db@1.1.3: + resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -1844,8 +1855,8 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - vite-node@3.0.9: - resolution: {integrity: sha512-w3Gdx7jDcuT9cNn9jExXgOyKmf5UOTb6WMHz8LGAm54eS1Elf5OuBhCxl6zJxGhEeIkgsE1WbHuoL0mj/UXqXg==} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true @@ -1857,8 +1868,8 @@ packages: vite: optional: true - vite@6.3.4: - resolution: {integrity: sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==} + vite@6.3.5: + resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -1902,16 +1913,16 @@ packages: peerDependencies: vitest: '*' - vitest@3.0.9: - resolution: {integrity: sha512-BbcFDqNyBlfSpATmTtXOAOj71RNKDDvjBM/uPfnxxVGrG+FSH2RQIwgeEngTaTkuU/h0ScFvf+tRcKfYXzBybQ==} + vitest@3.2.4: + resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/debug': ^4.1.12 '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.0.9 - '@vitest/ui': 3.0.9 + '@vitest/browser': 3.2.4 + '@vitest/ui': 3.2.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -1934,8 +1945,8 @@ packages: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} - watskeburt@4.1.0: - resolution: {integrity: sha512-KkY5H51ajqy9HYYI+u9SIURcWnqeVVhdH0I+ab6aXPGHfZYxgRCwnR6Lm3+TYB6jJVt5jFqw4GAKmwf1zHmGQw==} + watskeburt@4.2.3: + resolution: {integrity: sha512-uG9qtQYoHqAsnT711nG5iZc/8M5inSmkGCOp7pFaytKG2aTfIca7p//CjiVzAE4P7hzaYuCozMjNNaLgmhbK5g==} engines: {node: ^18||>=20} hasBin: true @@ -1986,8 +1997,8 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + ws@8.18.3: + resolution: {integrity: sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -2012,9 +2023,9 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yaml@2.7.1: - resolution: {integrity: sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==} - engines: {node: '>= 14'} + yaml@2.8.0: + resolution: {integrity: sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==} + engines: {node: '>= 14.6'} hasBin: true yargs-parser@21.1.1: @@ -2033,15 +2044,15 @@ snapshots: '@ampproject/remapping@2.3.0': dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping': 0.3.12 + '@jridgewell/trace-mapping': 0.3.29 - '@asamuzakjp/css-color@3.1.1': + '@asamuzakjp/css-color@3.2.0': dependencies: - '@csstools/css-calc': 2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-color-parser': 3.0.8(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 + '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 lru-cache: 10.4.3 '@babel/code-frame@7.27.1': @@ -2050,126 +2061,98 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.24.9': {} + '@babel/compat-data@7.28.0': {} - '@babel/core@7.24.9': + '@babel/core@7.28.0': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.27.1 - '@babel/generator': 7.24.10 - '@babel/helper-compilation-targets': 7.24.8 - '@babel/helper-module-transforms': 7.24.9(@babel/core@7.24.9) + '@babel/generator': 7.28.0 + '@babel/helper-compilation-targets': 7.27.2 + '@babel/helper-module-transforms': 7.27.3(@babel/core@7.28.0) '@babel/helpers': 7.27.6 - '@babel/parser': 7.27.5 + '@babel/parser': 7.28.0 '@babel/template': 7.27.2 - '@babel/traverse': 7.24.8 - '@babel/types': 7.27.6 + '@babel/traverse': 7.28.0 + '@babel/types': 7.28.1 convert-source-map: 2.0.0 - debug: 4.4.0 + debug: 4.4.1 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/generator@7.24.10': + '@babel/generator@7.28.0': dependencies: - '@babel/types': 7.27.6 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 + '@jridgewell/gen-mapping': 0.3.12 + '@jridgewell/trace-mapping': 0.3.29 + jsesc: 3.1.0 - '@babel/helper-compilation-targets@7.24.8': + '@babel/helper-compilation-targets@7.27.2': dependencies: - '@babel/compat-data': 7.24.9 - '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.2 + '@babel/compat-data': 7.28.0 + '@babel/helper-validator-option': 7.27.1 + browserslist: 4.25.1 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-environment-visitor@7.24.7': - dependencies: - '@babel/types': 7.27.6 + '@babel/helper-globals@7.28.0': {} - '@babel/helper-function-name@7.24.7': + '@babel/helper-module-imports@7.27.1': dependencies: - '@babel/template': 7.27.2 - '@babel/types': 7.27.6 - - '@babel/helper-hoist-variables@7.24.7': - dependencies: - '@babel/types': 7.27.6 - - '@babel/helper-module-imports@7.24.7': - dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.27.6 + '@babel/traverse': 7.28.0 + '@babel/types': 7.28.1 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.24.9(@babel/core@7.24.9)': + '@babel/helper-module-transforms@7.27.3(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.9 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-simple-access': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 + '@babel/core': 7.28.0 + '@babel/helper-module-imports': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 + '@babel/traverse': 7.28.0 transitivePeerDependencies: - supports-color - '@babel/helper-simple-access@7.24.7': - dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.27.6 - transitivePeerDependencies: - - supports-color - - '@babel/helper-split-export-declaration@7.24.7': - dependencies: - '@babel/types': 7.27.6 - '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.27.1': {} - '@babel/helper-validator-option@7.24.8': {} + '@babel/helper-validator-option@7.27.1': {} '@babel/helpers@7.27.6': dependencies: '@babel/template': 7.27.2 - '@babel/types': 7.27.6 + '@babel/types': 7.28.1 - '@babel/parser@7.27.5': + '@babel/parser@7.28.0': dependencies: - '@babel/types': 7.27.6 + '@babel/types': 7.28.1 - '@babel/runtime@7.27.0': - dependencies: - regenerator-runtime: 0.14.1 + '@babel/runtime@7.27.6': {} '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 - '@babel/parser': 7.27.5 - '@babel/types': 7.27.6 + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 - '@babel/traverse@7.24.8': + '@babel/traverse@7.28.0': dependencies: '@babel/code-frame': 7.27.1 - '@babel/generator': 7.24.10 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.27.5 - '@babel/types': 7.27.6 - debug: 4.4.0 - globals: 11.12.0 + '@babel/generator': 7.28.0 + '@babel/helper-globals': 7.28.0 + '@babel/parser': 7.28.0 + '@babel/template': 7.27.2 + '@babel/types': 7.28.1 + debug: 4.4.1 transitivePeerDependencies: - supports-color - '@babel/types@7.27.6': + '@babel/types@7.28.1': dependencies: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 @@ -2215,7 +2198,7 @@ snapshots: '@bundled-es-modules/statuses@1.0.1': dependencies: - statuses: 2.0.1 + statuses: 2.0.2 '@bundled-es-modules/tough-cookie@0.1.6': dependencies: @@ -2224,128 +2207,131 @@ snapshots: '@csstools/color-helpers@5.0.2': {} - '@csstools/css-calc@2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 - '@csstools/css-color-parser@3.0.8(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + '@csstools/css-color-parser@3.0.10(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/color-helpers': 5.0.2 - '@csstools/css-calc': 2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 + '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 - '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': + '@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4)': dependencies: - '@csstools/css-tokenizer': 3.0.3 + '@csstools/css-tokenizer': 3.0.4 - '@csstools/css-tokenizer@3.0.3': {} + '@csstools/css-tokenizer@3.0.4': {} - '@esbuild/aix-ppc64@0.25.2': + '@esbuild/aix-ppc64@0.25.6': optional: true - '@esbuild/android-arm64@0.25.2': + '@esbuild/android-arm64@0.25.6': optional: true - '@esbuild/android-arm@0.25.2': + '@esbuild/android-arm@0.25.6': optional: true - '@esbuild/android-x64@0.25.2': + '@esbuild/android-x64@0.25.6': optional: true - '@esbuild/darwin-arm64@0.25.2': + '@esbuild/darwin-arm64@0.25.6': optional: true - '@esbuild/darwin-x64@0.25.2': + '@esbuild/darwin-x64@0.25.6': optional: true - '@esbuild/freebsd-arm64@0.25.2': + '@esbuild/freebsd-arm64@0.25.6': optional: true - '@esbuild/freebsd-x64@0.25.2': + '@esbuild/freebsd-x64@0.25.6': optional: true - '@esbuild/linux-arm64@0.25.2': + '@esbuild/linux-arm64@0.25.6': optional: true - '@esbuild/linux-arm@0.25.2': + '@esbuild/linux-arm@0.25.6': optional: true - '@esbuild/linux-ia32@0.25.2': + '@esbuild/linux-ia32@0.25.6': optional: true - '@esbuild/linux-loong64@0.25.2': + '@esbuild/linux-loong64@0.25.6': optional: true - '@esbuild/linux-mips64el@0.25.2': + '@esbuild/linux-mips64el@0.25.6': optional: true - '@esbuild/linux-ppc64@0.25.2': + '@esbuild/linux-ppc64@0.25.6': optional: true - '@esbuild/linux-riscv64@0.25.2': + '@esbuild/linux-riscv64@0.25.6': optional: true - '@esbuild/linux-s390x@0.25.2': + '@esbuild/linux-s390x@0.25.6': optional: true - '@esbuild/linux-x64@0.25.2': + '@esbuild/linux-x64@0.25.6': optional: true - '@esbuild/netbsd-arm64@0.25.2': + '@esbuild/netbsd-arm64@0.25.6': optional: true - '@esbuild/netbsd-x64@0.25.2': + '@esbuild/netbsd-x64@0.25.6': optional: true - '@esbuild/openbsd-arm64@0.25.2': + '@esbuild/openbsd-arm64@0.25.6': optional: true - '@esbuild/openbsd-x64@0.25.2': + '@esbuild/openbsd-x64@0.25.6': optional: true - '@esbuild/sunos-x64@0.25.2': + '@esbuild/openharmony-arm64@0.25.6': optional: true - '@esbuild/win32-arm64@0.25.2': + '@esbuild/sunos-x64@0.25.6': optional: true - '@esbuild/win32-ia32@0.25.2': + '@esbuild/win32-arm64@0.25.6': optional: true - '@esbuild/win32-x64@0.25.2': + '@esbuild/win32-ia32@0.25.6': optional: true - '@gerrit0/mini-shiki@3.2.2': + '@esbuild/win32-x64@0.25.6': + optional: true + + '@gerrit0/mini-shiki@3.7.0': dependencies: - '@shikijs/engine-oniguruma': 3.2.1 - '@shikijs/langs': 3.2.1 - '@shikijs/themes': 3.2.1 - '@shikijs/types': 3.2.1 + '@shikijs/engine-oniguruma': 3.7.0 + '@shikijs/langs': 3.7.0 + '@shikijs/themes': 3.7.0 + '@shikijs/types': 3.7.0 '@shikijs/vscode-textmate': 10.0.2 - '@inquirer/checkbox@4.1.4(@types/node@22.13.14)': + '@inquirer/checkbox@4.1.9(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.16.3) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/confirm@5.1.8(@types/node@22.13.14)': + '@inquirer/confirm@5.1.13(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/core@10.1.9(@types/node@22.13.14)': + '@inquirer/core@10.1.14(@types/node@22.16.3)': dependencies: - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.16.3) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -2353,93 +2339,93 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/editor@4.2.9(@types/node@22.13.14)': + '@inquirer/editor@4.2.14(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) external-editor: 3.1.0 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/expand@4.0.11(@types/node@22.13.14)': + '@inquirer/expand@4.0.16(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/figures@1.0.11': {} + '@inquirer/figures@1.0.12': {} - '@inquirer/input@4.1.8(@types/node@22.13.14)': + '@inquirer/input@4.2.0(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/number@3.0.11(@types/node@22.13.14)': + '@inquirer/number@3.0.16(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/password@4.0.11(@types/node@22.13.14)': + '@inquirer/password@4.0.16(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) ansi-escapes: 4.3.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/prompts@7.4.0(@types/node@22.13.14)': + '@inquirer/prompts@7.6.0(@types/node@22.16.3)': dependencies: - '@inquirer/checkbox': 4.1.4(@types/node@22.13.14) - '@inquirer/confirm': 5.1.8(@types/node@22.13.14) - '@inquirer/editor': 4.2.9(@types/node@22.13.14) - '@inquirer/expand': 4.0.11(@types/node@22.13.14) - '@inquirer/input': 4.1.8(@types/node@22.13.14) - '@inquirer/number': 3.0.11(@types/node@22.13.14) - '@inquirer/password': 4.0.11(@types/node@22.13.14) - '@inquirer/rawlist': 4.0.11(@types/node@22.13.14) - '@inquirer/search': 3.0.11(@types/node@22.13.14) - '@inquirer/select': 4.1.0(@types/node@22.13.14) + '@inquirer/checkbox': 4.1.9(@types/node@22.16.3) + '@inquirer/confirm': 5.1.13(@types/node@22.16.3) + '@inquirer/editor': 4.2.14(@types/node@22.16.3) + '@inquirer/expand': 4.0.16(@types/node@22.16.3) + '@inquirer/input': 4.2.0(@types/node@22.16.3) + '@inquirer/number': 3.0.16(@types/node@22.16.3) + '@inquirer/password': 4.0.16(@types/node@22.16.3) + '@inquirer/rawlist': 4.1.4(@types/node@22.16.3) + '@inquirer/search': 3.0.16(@types/node@22.16.3) + '@inquirer/select': 4.2.4(@types/node@22.16.3) optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/rawlist@4.0.11(@types/node@22.13.14)': + '@inquirer/rawlist@4.1.4(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/search@3.0.11(@types/node@22.13.14)': + '@inquirer/search@3.0.16(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.16.3) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/select@4.1.0(@types/node@22.13.14)': + '@inquirer/select@4.2.4(@types/node@22.16.3)': dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.16.3) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 - '@inquirer/type@3.0.5(@types/node@22.13.14)': + '@inquirer/type@3.0.7(@types/node@22.16.3)': optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 '@isaacs/cliui@8.0.2': dependencies: @@ -2452,26 +2438,23 @@ snapshots: '@istanbuljs/schema@0.1.3': {} - '@jridgewell/gen-mapping@0.3.5': + '@jridgewell/gen-mapping@0.3.12': dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/sourcemap-codec': 1.5.4 + '@jridgewell/trace-mapping': 0.3.29 '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/set-array@1.2.1': {} + '@jridgewell/sourcemap-codec@1.5.4': {} - '@jridgewell/sourcemap-codec@1.5.0': {} - - '@jridgewell/trace-mapping@0.3.25': + '@jridgewell/trace-mapping@0.3.29': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.4 '@material/material-color-utilities@0.2.7': {} - '@mswjs/interceptors@0.37.6': + '@mswjs/interceptors@0.39.2': dependencies: '@open-draft/deferred-promise': 2.2.0 '@open-draft/logger': 0.3.0 @@ -2489,92 +2472,122 @@ snapshots: '@open-draft/until@2.1.0': {} + '@oxlint/darwin-arm64@1.6.0': + optional: true + + '@oxlint/darwin-x64@1.6.0': + optional: true + + '@oxlint/linux-arm64-gnu@1.6.0': + optional: true + + '@oxlint/linux-arm64-musl@1.6.0': + optional: true + + '@oxlint/linux-x64-gnu@1.6.0': + optional: true + + '@oxlint/linux-x64-musl@1.6.0': + optional: true + + '@oxlint/win32-arm64@1.6.0': + optional: true + + '@oxlint/win32-x64@1.6.0': + optional: true + '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/rollup-android-arm-eabi@4.40.1': + '@rollup/rollup-android-arm-eabi@4.45.0': optional: true - '@rollup/rollup-android-arm64@4.40.1': + '@rollup/rollup-android-arm64@4.45.0': optional: true - '@rollup/rollup-darwin-arm64@4.40.1': + '@rollup/rollup-darwin-arm64@4.45.0': optional: true - '@rollup/rollup-darwin-x64@4.40.1': + '@rollup/rollup-darwin-x64@4.45.0': optional: true - '@rollup/rollup-freebsd-arm64@4.40.1': + '@rollup/rollup-freebsd-arm64@4.45.0': optional: true - '@rollup/rollup-freebsd-x64@4.40.1': + '@rollup/rollup-freebsd-x64@4.45.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.40.1': + '@rollup/rollup-linux-arm-gnueabihf@4.45.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.40.1': + '@rollup/rollup-linux-arm-musleabihf@4.45.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.40.1': + '@rollup/rollup-linux-arm64-gnu@4.45.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.40.1': + '@rollup/rollup-linux-arm64-musl@4.45.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.40.1': + '@rollup/rollup-linux-loongarch64-gnu@4.45.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': + '@rollup/rollup-linux-powerpc64le-gnu@4.45.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.40.1': + '@rollup/rollup-linux-riscv64-gnu@4.45.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.40.1': + '@rollup/rollup-linux-riscv64-musl@4.45.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.40.1': + '@rollup/rollup-linux-s390x-gnu@4.45.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.40.1': + '@rollup/rollup-linux-x64-gnu@4.45.0': optional: true - '@rollup/rollup-linux-x64-musl@4.40.1': + '@rollup/rollup-linux-x64-musl@4.45.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.40.1': + '@rollup/rollup-win32-arm64-msvc@4.45.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.40.1': + '@rollup/rollup-win32-ia32-msvc@4.45.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.40.1': + '@rollup/rollup-win32-x64-msvc@4.45.0': optional: true - '@shikijs/engine-oniguruma@3.2.1': + '@shikijs/engine-oniguruma@3.7.0': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.7.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@3.2.1': + '@shikijs/langs@3.7.0': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.7.0 - '@shikijs/themes@3.2.1': + '@shikijs/themes@3.7.0': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.7.0 - '@shikijs/types@3.2.1': + '@shikijs/types@3.7.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 '@shikijs/vscode-textmate@10.0.2': {} + '@types/chai@5.2.2': + dependencies: + '@types/deep-eql': 4.0.2 + '@types/cookie@0.6.0': {} - '@types/estree@1.0.7': {} + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.8': {} '@types/hast@3.0.4': dependencies: @@ -2582,24 +2595,24 @@ snapshots: '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 '@types/tough-cookie': 4.0.5 - parse5: 7.2.1 + parse5: 7.3.0 - '@types/node@22.13.14': + '@types/node@22.16.3': dependencies: - undici-types: 6.20.0 + undici-types: 6.21.0 - '@types/statuses@2.0.5': {} + '@types/statuses@2.0.6': {} '@types/tough-cookie@4.0.5': {} '@types/unist@3.0.3': {} - '@vitest/coverage-istanbul@3.0.9(vitest@3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1))': + '@vitest/coverage-istanbul@3.2.4(vitest@3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0))': dependencies: '@istanbuljs/schema': 0.1.3 - debug: 4.4.0 + debug: 4.4.1 istanbul-lib-coverage: 3.2.2 istanbul-lib-instrument: 6.0.3 istanbul-lib-report: 3.0.1 @@ -2608,73 +2621,75 @@ snapshots: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1) + vitest: 3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0) transitivePeerDependencies: - supports-color - '@vitest/expect@3.0.9': + '@vitest/expect@3.2.4': dependencies: - '@vitest/spy': 3.0.9 - '@vitest/utils': 3.0.9 - chai: 5.2.0 + '@types/chai': 5.2.2 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.2.1 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.9(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(vite@6.3.4(@types/node@22.13.14)(yaml@2.7.1))': + '@vitest/mocker@3.2.4(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(vite@6.3.5(@types/node@22.16.3)(yaml@2.8.0))': dependencies: - '@vitest/spy': 3.0.9 + '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - msw: 2.7.3(@types/node@22.13.14)(typescript@5.8.2) - vite: 6.3.4(@types/node@22.13.14)(yaml@2.7.1) + msw: 2.10.4(@types/node@22.16.3)(typescript@5.8.3) + vite: 6.3.5(@types/node@22.16.3)(yaml@2.8.0) - '@vitest/pretty-format@3.0.9': + '@vitest/pretty-format@3.2.4': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@3.0.9': + '@vitest/runner@3.2.4': dependencies: - '@vitest/utils': 3.0.9 + '@vitest/utils': 3.2.4 pathe: 2.0.3 + strip-literal: 3.0.0 - '@vitest/snapshot@3.0.9': + '@vitest/snapshot@3.2.4': dependencies: - '@vitest/pretty-format': 3.0.9 + '@vitest/pretty-format': 3.2.4 magic-string: 0.30.17 pathe: 2.0.3 - '@vitest/spy@3.0.9': + '@vitest/spy@3.2.4': dependencies: - tinyspy: 3.0.2 + tinyspy: 4.0.3 - '@vitest/utils@3.0.9': + '@vitest/utils@3.2.4': dependencies: - '@vitest/pretty-format': 3.0.9 - loupe: 3.1.3 + '@vitest/pretty-format': 3.2.4 + loupe: 3.1.4 tinyrainbow: 2.0.0 acorn-jsx-walk@2.0.0: {} - acorn-jsx@5.3.2(acorn@8.12.1): + acorn-jsx@5.3.2(acorn@8.15.0): dependencies: - acorn: 8.12.1 + acorn: 8.15.0 - acorn-loose@8.4.0: + acorn-loose@8.5.2: dependencies: - acorn: 8.12.1 + acorn: 8.15.0 - acorn-walk@8.3.3: + acorn-walk@8.3.4: dependencies: - acorn: 8.12.1 + acorn: 8.15.0 - acorn@8.12.1: {} + acorn@8.15.0: {} - agent-base@7.1.3: {} + agent-base@7.1.4: {} ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.1 + fast-uri: 3.0.6 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -2684,7 +2699,7 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.0.1: {} + ansi-regex@6.1.0: {} ansi-styles@4.3.0: dependencies: @@ -2696,20 +2711,18 @@ snapshots: assertion-error@2.0.1: {} - asynckit@0.4.0: {} - balanced-match@1.0.2: {} brace-expansion@2.0.2: dependencies: balanced-match: 1.0.2 - browserslist@4.23.2: + browserslist@4.25.1: dependencies: - caniuse-lite: 1.0.30001642 - electron-to-chromium: 1.4.830 - node-releases: 2.0.17 - update-browserslist-db: 1.1.0(browserslist@4.23.2) + caniuse-lite: 1.0.30001727 + electron-to-chromium: 1.5.182 + node-releases: 2.0.19 + update-browserslist-db: 1.1.3(browserslist@4.25.1) cac@6.7.14: {} @@ -2730,15 +2743,15 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 - caniuse-lite@1.0.30001642: {} + caniuse-lite@1.0.30001727: {} - chai@5.2.0: + chai@5.2.1: dependencies: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.3 - pathval: 2.0.0 + loupe: 3.1.4 + pathval: 2.0.1 chalk@4.1.2: dependencies: @@ -2765,11 +2778,7 @@ snapshots: color-name@1.1.4: {} - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - - commander@12.1.0: {} + commander@13.1.0: {} compare-versions@6.1.1: {} @@ -2795,9 +2804,9 @@ snapshots: cssfontparser@1.2.1: {} - cssstyle@4.3.0: + cssstyle@4.6.0: dependencies: - '@asamuzakjp/css-color': 3.1.1 + '@asamuzakjp/css-color': 3.2.0 rrweb-cssom: 0.8.0 dagre@0.8.5: @@ -2810,11 +2819,11 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - debug@4.4.0: + debug@4.4.1: dependencies: ms: 2.1.3 - decimal.js@10.4.3: {} + decimal.js@10.6.0: {} deep-eql@5.0.2: {} @@ -2824,32 +2833,30 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 - delayed-stream@1.0.0: {} - - dependency-cruiser@16.3.10: + dependency-cruiser@16.10.4: dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.15.0 + acorn-jsx: 5.3.2(acorn@8.15.0) acorn-jsx-walk: 2.0.0 - acorn-loose: 8.4.0 - acorn-walk: 8.3.3 + acorn-loose: 8.5.2 + acorn-walk: 8.3.4 ajv: 8.17.1 - commander: 12.1.0 - enhanced-resolve: 5.17.1 - ignore: 5.3.1 + commander: 13.1.0 + enhanced-resolve: 5.18.2 + ignore: 7.0.5 interpret: 3.1.1 is-installed-globally: 1.0.0 json5: 2.2.3 - memoize: 10.0.0 - picocolors: 1.0.1 + memoize: 10.1.0 + picocolors: 1.1.1 picomatch: 4.0.2 prompts: 2.4.2 rechoir: 0.8.0 safe-regex: 2.1.1 - semver: 7.7.1 + semver: 7.7.2 teamcity-service-messages: 0.1.14 - tsconfig-paths-webpack-plugin: 4.1.0 - watskeburt: 4.1.0 + tsconfig-paths-webpack-plugin: 4.2.0 + watskeburt: 4.2.3 dunder-proto@1.0.1: dependencies: @@ -2859,69 +2866,65 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.4.830: {} + electron-to-chromium@1.5.182: {} emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} - enhanced-resolve@5.17.1: + enhanced-resolve@5.18.2: dependencies: graceful-fs: 4.2.11 - tapable: 2.2.1 + tapable: 2.2.2 entities@4.5.0: {} + entities@6.0.1: {} + es-define-property@1.0.1: {} es-errors@1.3.0: {} - es-module-lexer@1.6.0: {} + es-module-lexer@1.7.0: {} es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 - es-set-tostringtag@2.1.0: - dependencies: - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - esbuild@0.25.2: + esbuild@0.25.6: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.2 - '@esbuild/android-arm': 0.25.2 - '@esbuild/android-arm64': 0.25.2 - '@esbuild/android-x64': 0.25.2 - '@esbuild/darwin-arm64': 0.25.2 - '@esbuild/darwin-x64': 0.25.2 - '@esbuild/freebsd-arm64': 0.25.2 - '@esbuild/freebsd-x64': 0.25.2 - '@esbuild/linux-arm': 0.25.2 - '@esbuild/linux-arm64': 0.25.2 - '@esbuild/linux-ia32': 0.25.2 - '@esbuild/linux-loong64': 0.25.2 - '@esbuild/linux-mips64el': 0.25.2 - '@esbuild/linux-ppc64': 0.25.2 - '@esbuild/linux-riscv64': 0.25.2 - '@esbuild/linux-s390x': 0.25.2 - '@esbuild/linux-x64': 0.25.2 - '@esbuild/netbsd-arm64': 0.25.2 - '@esbuild/netbsd-x64': 0.25.2 - '@esbuild/openbsd-arm64': 0.25.2 - '@esbuild/openbsd-x64': 0.25.2 - '@esbuild/sunos-x64': 0.25.2 - '@esbuild/win32-arm64': 0.25.2 - '@esbuild/win32-ia32': 0.25.2 - '@esbuild/win32-x64': 0.25.2 + '@esbuild/aix-ppc64': 0.25.6 + '@esbuild/android-arm': 0.25.6 + '@esbuild/android-arm64': 0.25.6 + '@esbuild/android-x64': 0.25.6 + '@esbuild/darwin-arm64': 0.25.6 + '@esbuild/darwin-x64': 0.25.6 + '@esbuild/freebsd-arm64': 0.25.6 + '@esbuild/freebsd-x64': 0.25.6 + '@esbuild/linux-arm': 0.25.6 + '@esbuild/linux-arm64': 0.25.6 + '@esbuild/linux-ia32': 0.25.6 + '@esbuild/linux-loong64': 0.25.6 + '@esbuild/linux-mips64el': 0.25.6 + '@esbuild/linux-ppc64': 0.25.6 + '@esbuild/linux-riscv64': 0.25.6 + '@esbuild/linux-s390x': 0.25.6 + '@esbuild/linux-x64': 0.25.6 + '@esbuild/netbsd-arm64': 0.25.6 + '@esbuild/netbsd-x64': 0.25.6 + '@esbuild/openbsd-arm64': 0.25.6 + '@esbuild/openbsd-x64': 0.25.6 + '@esbuild/openharmony-arm64': 0.25.6 + '@esbuild/sunos-x64': 0.25.6 + '@esbuild/win32-arm64': 0.25.6 + '@esbuild/win32-ia32': 0.25.6 + '@esbuild/win32-x64': 0.25.6 - escalade@3.1.2: {} + escalade@3.2.0: {} estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 eventemitter3@3.1.2: {} @@ -2929,7 +2932,7 @@ snapshots: events@3.3.0: {} - expect-type@1.1.0: {} + expect-type@1.2.2: {} external-editor@3.1.0: dependencies: @@ -2939,24 +2942,17 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-uri@3.0.1: {} + fast-uri@3.0.6: {} - fdir@6.4.4(picomatch@4.0.2): + fdir@6.4.6(picomatch@4.0.2): optionalDependencies: picomatch: 4.0.2 - foreground-child@3.2.1: + foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@4.0.2: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - mime-types: 2.1.35 - fsevents@2.3.3: optional: true @@ -2986,19 +2982,17 @@ snapshots: glob@10.4.5: dependencies: - foreground-child: 3.2.1 + foreground-child: 3.3.1 jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 path-scurry: 1.11.1 global-directory@4.0.1: dependencies: ini: 4.1.1 - globals@11.12.0: {} - globrex@0.1.2: {} gopd@1.2.0: {} @@ -3017,7 +3011,7 @@ snapshots: graphology-types: 0.24.8 obliterator: 2.0.5 - graphql@16.9.0: {} + graphql@16.11.0: {} has-flag@4.0.0: {} @@ -3027,10 +3021,6 @@ snapshots: has-symbols@1.1.0: {} - has-tostringtag@1.0.2: - dependencies: - has-symbols: 1.1.0 - hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -3045,21 +3035,21 @@ snapshots: http-proxy-agent@7.0.2: dependencies: - agent-base: 7.1.3 - debug: 4.4.0 + agent-base: 7.1.4 + debug: 4.4.1 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: - agent-base: 7.1.3 - debug: 4.4.0 + agent-base: 7.1.4 + debug: 4.4.1 transitivePeerDependencies: - supports-color - i18next-browser-languagedetector@8.0.4: + i18next-browser-languagedetector@8.2.0: dependencies: - '@babel/runtime': 7.27.0 + '@babel/runtime': 7.27.6 i18next-http-backend@2.7.3: dependencies: @@ -3073,19 +3063,19 @@ snapshots: transitivePeerDependencies: - encoding - i18next-korean-postposition-processor@1.0.0(i18next@24.2.3(typescript@5.8.2)): + i18next-korean-postposition-processor@1.0.0(i18next@24.2.3(typescript@5.8.3)): dependencies: - i18next: 24.2.3(typescript@5.8.2) + i18next: 24.2.3(typescript@5.8.3) i18next@22.5.1: dependencies: - '@babel/runtime': 7.27.0 + '@babel/runtime': 7.27.6 - i18next@24.2.3(typescript@5.8.2): + i18next@24.2.3(typescript@5.8.3): dependencies: - '@babel/runtime': 7.27.0 + '@babel/runtime': 7.27.6 optionalDependencies: - typescript: 5.8.2 + typescript: 5.8.3 iconv-lite@0.4.24: dependencies: @@ -3095,7 +3085,7 @@ snapshots: dependencies: safer-buffer: 2.1.2 - ignore@5.3.1: {} + ignore@7.0.5: {} immediate@3.0.6: {} @@ -3103,21 +3093,21 @@ snapshots: ini@4.1.1: {} - inquirer@12.5.0(@types/node@22.13.14): + inquirer@12.7.0(@types/node@22.16.3): dependencies: - '@inquirer/core': 10.1.9(@types/node@22.13.14) - '@inquirer/prompts': 7.4.0(@types/node@22.13.14) - '@inquirer/type': 3.0.5(@types/node@22.13.14) + '@inquirer/core': 10.1.14(@types/node@22.16.3) + '@inquirer/prompts': 7.6.0(@types/node@22.16.3) + '@inquirer/type': 3.0.7(@types/node@22.16.3) ansi-escapes: 4.3.2 mute-stream: 2.0.0 - run-async: 3.0.0 + run-async: 4.0.4 rxjs: 7.8.2 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 interpret@3.1.1: {} - is-core-module@2.15.0: + is-core-module@2.16.1: dependencies: hasown: 2.0.2 @@ -3144,11 +3134,11 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: - '@babel/core': 7.24.9 - '@babel/parser': 7.27.5 + '@babel/core': 7.28.0 + '@babel/parser': 7.28.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.7.1 + semver: 7.7.2 transitivePeerDependencies: - supports-color @@ -3160,8 +3150,8 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: - '@jridgewell/trace-mapping': 0.3.25 - debug: 4.4.0 + '@jridgewell/trace-mapping': 0.3.29 + debug: 4.4.1 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -3184,22 +3174,23 @@ snapshots: js-tokens@4.0.0: {} + js-tokens@9.0.1: {} + js-yaml@4.1.0: dependencies: argparse: 2.0.1 - jsdom@26.0.0: + jsdom@26.1.0: dependencies: - cssstyle: 4.3.0 + cssstyle: 4.6.0 data-urls: 5.0.0 - decimal.js: 10.4.3 - form-data: 4.0.2 + decimal.js: 10.6.0 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.20 - parse5: 7.2.1 + parse5: 7.3.0 rrweb-cssom: 0.8.0 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -3209,18 +3200,18 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - ws: 8.18.0 + ws: 8.18.3 xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - jsesc@2.5.2: {} + jsesc@3.1.0: {} json-schema-traverse@1.0.0: {} - json-stable-stringify@1.2.1: + json-stable-stringify@1.3.0: dependencies: call-bind: 1.0.8 call-bound: 1.0.4 @@ -3241,48 +3232,48 @@ snapshots: kleur@3.0.3: {} - lefthook-darwin-arm64@1.11.6: + lefthook-darwin-arm64@1.12.2: optional: true - lefthook-darwin-x64@1.11.6: + lefthook-darwin-x64@1.12.2: optional: true - lefthook-freebsd-arm64@1.11.6: + lefthook-freebsd-arm64@1.12.2: optional: true - lefthook-freebsd-x64@1.11.6: + lefthook-freebsd-x64@1.12.2: optional: true - lefthook-linux-arm64@1.11.6: + lefthook-linux-arm64@1.12.2: optional: true - lefthook-linux-x64@1.11.6: + lefthook-linux-x64@1.12.2: optional: true - lefthook-openbsd-arm64@1.11.6: + lefthook-openbsd-arm64@1.12.2: optional: true - lefthook-openbsd-x64@1.11.6: + lefthook-openbsd-x64@1.12.2: optional: true - lefthook-windows-arm64@1.11.6: + lefthook-windows-arm64@1.12.2: optional: true - lefthook-windows-x64@1.11.6: + lefthook-windows-x64@1.12.2: optional: true - lefthook@1.11.6: + lefthook@1.12.2: optionalDependencies: - lefthook-darwin-arm64: 1.11.6 - lefthook-darwin-x64: 1.11.6 - lefthook-freebsd-arm64: 1.11.6 - lefthook-freebsd-x64: 1.11.6 - lefthook-linux-arm64: 1.11.6 - lefthook-linux-x64: 1.11.6 - lefthook-openbsd-arm64: 1.11.6 - lefthook-openbsd-x64: 1.11.6 - lefthook-windows-arm64: 1.11.6 - lefthook-windows-x64: 1.11.6 + lefthook-darwin-arm64: 1.12.2 + lefthook-darwin-x64: 1.12.2 + lefthook-freebsd-arm64: 1.12.2 + lefthook-freebsd-x64: 1.12.2 + lefthook-linux-arm64: 1.12.2 + lefthook-linux-x64: 1.12.2 + lefthook-openbsd-arm64: 1.12.2 + lefthook-openbsd-x64: 1.12.2 + lefthook-windows-arm64: 1.12.2 + lefthook-windows-x64: 1.12.2 lie@3.3.0: dependencies: @@ -3294,7 +3285,7 @@ snapshots: lodash@4.17.21: {} - loupe@3.1.3: {} + loupe@3.1.4: {} lru-cache@10.4.3: {} @@ -3306,17 +3297,17 @@ snapshots: magic-string@0.30.17: dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.4 magicast@0.3.5: dependencies: - '@babel/parser': 7.27.5 - '@babel/types': 7.27.6 + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 source-map-js: 1.2.1 make-dir@4.0.0: dependencies: - semver: 7.7.1 + semver: 7.7.2 markdown-it@14.1.0: dependencies: @@ -3331,16 +3322,10 @@ snapshots: mdurl@2.0.0: {} - memoize@10.0.0: + memoize@10.1.0: dependencies: mimic-function: 5.0.1 - mime-db@1.52.0: {} - - mime-types@2.1.35: - dependencies: - mime-db: 1.52.0 - mimic-function@5.0.1: {} minimatch@9.0.5: @@ -3357,28 +3342,28 @@ snapshots: ms@2.1.3: {} - msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2): + msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.8(@types/node@22.13.14) - '@mswjs/interceptors': 0.37.6 + '@inquirer/confirm': 5.1.13(@types/node@22.16.3) + '@mswjs/interceptors': 0.39.2 '@open-draft/deferred-promise': 2.2.0 '@open-draft/until': 2.1.0 '@types/cookie': 0.6.0 - '@types/statuses': 2.0.5 - graphql: 16.9.0 + '@types/statuses': 2.0.6 + graphql: 16.11.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 path-to-regexp: 6.3.0 picocolors: 1.1.1 strict-event-emitter: 0.5.1 - type-fest: 4.26.1 + type-fest: 4.41.0 yargs: 17.7.2 optionalDependencies: - typescript: 5.8.2 + typescript: 5.8.3 transitivePeerDependencies: - '@types/node' @@ -3392,7 +3377,7 @@ snapshots: dependencies: whatwg-url: 5.0.0 - node-releases@2.0.17: {} + node-releases@2.0.19: {} nwsapi@2.2.20: {} @@ -3404,15 +3389,26 @@ snapshots: outvariant@1.4.3: {} - package-json-from-dist@1.0.0: {} + oxlint@1.6.0: + optionalDependencies: + '@oxlint/darwin-arm64': 1.6.0 + '@oxlint/darwin-x64': 1.6.0 + '@oxlint/linux-arm64-gnu': 1.6.0 + '@oxlint/linux-arm64-musl': 1.6.0 + '@oxlint/linux-x64-gnu': 1.6.0 + '@oxlint/linux-x64-musl': 1.6.0 + '@oxlint/win32-arm64': 1.6.0 + '@oxlint/win32-x64': 1.6.0 + + package-json-from-dist@1.0.1: {} pako@1.0.11: {} - papaparse@5.4.1: {} + papaparse@5.5.3: {} - parse5@7.2.1: + parse5@7.3.0: dependencies: - entities: 4.5.0 + entities: 6.0.1 path-key@3.1.1: {} @@ -3427,9 +3423,9 @@ snapshots: pathe@2.0.3: {} - pathval@2.0.0: {} + pathval@2.0.1: {} - phaser3-rex-plugins@1.80.15(graphology-types@0.24.8): + phaser3-rex-plugins@1.80.16(graphology-types@0.24.8): dependencies: dagre: 0.8.5 eventemitter3: 3.1.2 @@ -3438,7 +3434,7 @@ snapshots: i18next-http-backend: 2.7.3 js-yaml: 4.1.0 mustache: 4.2.0 - papaparse: 5.4.1 + papaparse: 5.5.3 webfontloader: 1.6.28 transitivePeerDependencies: - encoding @@ -3446,22 +3442,22 @@ snapshots: phaser3spectorjs@0.0.8: {} - phaser@3.88.2: + phaser@3.90.0: dependencies: eventemitter3: 5.0.1 - picocolors@1.0.1: {} - picocolors@1.1.1: {} picomatch@4.0.2: {} - postcss@8.5.3: + postcss@8.5.6: dependencies: nanoid: 3.3.11 picocolors: 1.1.1 source-map-js: 1.2.1 + prettier@3.6.2: {} + process-nextick-args@2.0.1: {} prompts@2.4.2: @@ -3469,7 +3465,9 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 - psl@1.9.0: {} + psl@1.15.0: + dependencies: + punycode: 2.3.1 punycode.js@2.3.1: {} @@ -3489,9 +3487,7 @@ snapshots: rechoir@0.8.0: dependencies: - resolve: 1.22.8 - - regenerator-runtime@0.14.1: {} + resolve: 1.22.10 regexp-tree@0.1.27: {} @@ -3501,41 +3497,44 @@ snapshots: requires-port@1.0.0: {} - resolve@1.22.8: + resolve@1.22.10: dependencies: - is-core-module: 2.15.0 + is-core-module: 2.16.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - rollup@4.40.1: + rollup@4.45.0: dependencies: - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.40.1 - '@rollup/rollup-android-arm64': 4.40.1 - '@rollup/rollup-darwin-arm64': 4.40.1 - '@rollup/rollup-darwin-x64': 4.40.1 - '@rollup/rollup-freebsd-arm64': 4.40.1 - '@rollup/rollup-freebsd-x64': 4.40.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.40.1 - '@rollup/rollup-linux-arm-musleabihf': 4.40.1 - '@rollup/rollup-linux-arm64-gnu': 4.40.1 - '@rollup/rollup-linux-arm64-musl': 4.40.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.40.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.40.1 - '@rollup/rollup-linux-riscv64-gnu': 4.40.1 - '@rollup/rollup-linux-riscv64-musl': 4.40.1 - '@rollup/rollup-linux-s390x-gnu': 4.40.1 - '@rollup/rollup-linux-x64-gnu': 4.40.1 - '@rollup/rollup-linux-x64-musl': 4.40.1 - '@rollup/rollup-win32-arm64-msvc': 4.40.1 - '@rollup/rollup-win32-ia32-msvc': 4.40.1 - '@rollup/rollup-win32-x64-msvc': 4.40.1 + '@rollup/rollup-android-arm-eabi': 4.45.0 + '@rollup/rollup-android-arm64': 4.45.0 + '@rollup/rollup-darwin-arm64': 4.45.0 + '@rollup/rollup-darwin-x64': 4.45.0 + '@rollup/rollup-freebsd-arm64': 4.45.0 + '@rollup/rollup-freebsd-x64': 4.45.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.45.0 + '@rollup/rollup-linux-arm-musleabihf': 4.45.0 + '@rollup/rollup-linux-arm64-gnu': 4.45.0 + '@rollup/rollup-linux-arm64-musl': 4.45.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.45.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.45.0 + '@rollup/rollup-linux-riscv64-gnu': 4.45.0 + '@rollup/rollup-linux-riscv64-musl': 4.45.0 + '@rollup/rollup-linux-s390x-gnu': 4.45.0 + '@rollup/rollup-linux-x64-gnu': 4.45.0 + '@rollup/rollup-linux-x64-musl': 4.45.0 + '@rollup/rollup-win32-arm64-msvc': 4.45.0 + '@rollup/rollup-win32-ia32-msvc': 4.45.0 + '@rollup/rollup-win32-x64-msvc': 4.45.0 fsevents: 2.3.3 rrweb-cssom@0.8.0: {} - run-async@3.0.0: {} + run-async@4.0.4: + dependencies: + oxlint: 1.6.0 + prettier: 3.6.2 rxjs@7.8.2: dependencies: @@ -3555,7 +3554,7 @@ snapshots: semver@6.3.1: {} - semver@7.7.1: {} + semver@7.7.2: {} set-function-length@1.2.2: dependencies: @@ -3584,9 +3583,9 @@ snapshots: stackback@0.0.2: {} - statuses@2.0.1: {} + statuses@2.0.2: {} - std-env@3.8.0: {} + std-env@3.9.0: {} strict-event-emitter@0.5.1: {} @@ -3612,10 +3611,14 @@ snapshots: strip-ansi@7.1.0: dependencies: - ansi-regex: 6.0.1 + ansi-regex: 6.1.0 strip-bom@3.0.0: {} + strip-literal@3.0.0: + dependencies: + js-tokens: 9.0.1 + supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -3624,7 +3627,7 @@ snapshots: symbol-tree@3.2.4: {} - tapable@2.2.1: {} + tapable@2.2.2: {} teamcity-service-messages@0.1.14: {} @@ -3638,22 +3641,22 @@ snapshots: tinyexec@0.3.2: {} - tinyglobby@0.2.13: + tinyglobby@0.2.14: dependencies: - fdir: 6.4.4(picomatch@4.0.2) + fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 - tinypool@1.0.2: {} + tinypool@1.1.1: {} tinyrainbow@2.0.0: {} - tinyspy@3.0.2: {} + tinyspy@4.0.3: {} - tldts-core@6.1.85: {} + tldts-core@6.1.86: {} - tldts@6.1.85: + tldts@6.1.86: dependencies: - tldts-core: 6.1.85 + tldts-core: 6.1.86 tmp@0.0.33: dependencies: @@ -3661,29 +3664,30 @@ snapshots: tough-cookie@4.1.4: dependencies: - psl: 1.9.0 + psl: 1.15.0 punycode: 2.3.1 universalify: 0.2.0 url-parse: 1.5.10 tough-cookie@5.1.2: dependencies: - tldts: 6.1.85 + tldts: 6.1.86 tr46@0.0.3: {} - tr46@5.1.0: + tr46@5.1.1: dependencies: punycode: 2.3.1 - tsconfck@3.1.1(typescript@5.8.2): + tsconfck@3.1.6(typescript@5.8.3): optionalDependencies: - typescript: 5.8.2 + typescript: 5.8.3 - tsconfig-paths-webpack-plugin@4.1.0: + tsconfig-paths-webpack-plugin@4.2.0: dependencies: chalk: 4.1.2 - enhanced-resolve: 5.17.1 + enhanced-resolve: 5.18.2 + tapable: 2.2.2 tsconfig-paths: 4.2.0 tsconfig-paths@4.2.0: @@ -3696,29 +3700,29 @@ snapshots: type-fest@0.21.3: {} - type-fest@4.26.1: {} + type-fest@4.41.0: {} - typedoc@0.28.1(typescript@5.8.2): + typedoc@0.28.7(typescript@5.8.3): dependencies: - '@gerrit0/mini-shiki': 3.2.2 + '@gerrit0/mini-shiki': 3.7.0 lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 - typescript: 5.8.2 - yaml: 2.7.1 + typescript: 5.8.3 + yaml: 2.8.0 - typescript@5.8.2: {} + typescript@5.8.3: {} uc.micro@2.1.0: {} - undici-types@6.20.0: {} + undici-types@6.21.0: {} universalify@0.2.0: {} - update-browserslist-db@1.1.0(browserslist@4.23.2): + update-browserslist-db@1.1.3(browserslist@4.25.1): dependencies: - browserslist: 4.23.2 - escalade: 3.1.2 + browserslist: 4.25.1 + escalade: 3.2.0 picocolors: 1.1.1 url-parse@1.5.10: @@ -3728,13 +3732,13 @@ snapshots: util-deprecate@1.0.2: {} - vite-node@3.0.9(@types/node@22.13.14)(yaml@2.7.1): + vite-node@3.2.4(@types/node@22.16.3)(yaml@2.8.0): dependencies: cac: 6.7.14 - debug: 4.4.0 - es-module-lexer: 1.6.0 + debug: 4.4.1 + es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.3.4(@types/node@22.13.14)(yaml@2.7.1) + vite: 6.3.5(@types/node@22.16.3)(yaml@2.8.0) transitivePeerDependencies: - '@types/node' - jiti @@ -3749,60 +3753,63 @@ snapshots: - tsx - yaml - vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.3.4(@types/node@22.13.14)(yaml@2.7.1)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@6.3.5(@types/node@22.16.3)(yaml@2.8.0)): dependencies: - debug: 4.4.0 + debug: 4.4.1 globrex: 0.1.2 - tsconfck: 3.1.1(typescript@5.8.2) + tsconfck: 3.1.6(typescript@5.8.3) optionalDependencies: - vite: 6.3.4(@types/node@22.13.14)(yaml@2.7.1) + vite: 6.3.5(@types/node@22.16.3)(yaml@2.8.0) transitivePeerDependencies: - supports-color - typescript - vite@6.3.4(@types/node@22.13.14)(yaml@2.7.1): + vite@6.3.5(@types/node@22.16.3)(yaml@2.8.0): dependencies: - esbuild: 0.25.2 - fdir: 6.4.4(picomatch@4.0.2) + esbuild: 0.25.6 + fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 - postcss: 8.5.3 - rollup: 4.40.1 - tinyglobby: 0.2.13 + postcss: 8.5.6 + rollup: 4.45.0 + tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.16.3 fsevents: 2.3.3 - yaml: 2.7.1 + yaml: 2.8.0 - vitest-canvas-mock@0.3.3(vitest@3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1)): + vitest-canvas-mock@0.3.3(vitest@3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0)): dependencies: jest-canvas-mock: 2.5.2 - vitest: 3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1) + vitest: 3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0) - vitest@3.0.9(@types/node@22.13.14)(jsdom@26.0.0)(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(yaml@2.7.1): + vitest@3.2.4(@types/node@22.16.3)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(yaml@2.8.0): dependencies: - '@vitest/expect': 3.0.9 - '@vitest/mocker': 3.0.9(msw@2.7.3(@types/node@22.13.14)(typescript@5.8.2))(vite@6.3.4(@types/node@22.13.14)(yaml@2.7.1)) - '@vitest/pretty-format': 3.0.9 - '@vitest/runner': 3.0.9 - '@vitest/snapshot': 3.0.9 - '@vitest/spy': 3.0.9 - '@vitest/utils': 3.0.9 - chai: 5.2.0 - debug: 4.4.0 - expect-type: 1.1.0 + '@types/chai': 5.2.2 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(msw@2.10.4(@types/node@22.16.3)(typescript@5.8.3))(vite@6.3.5(@types/node@22.16.3)(yaml@2.8.0)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.2.1 + debug: 4.4.1 + expect-type: 1.2.2 magic-string: 0.30.17 pathe: 2.0.3 - std-env: 3.8.0 + picomatch: 4.0.2 + std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 - tinypool: 1.0.2 + tinyglobby: 0.2.14 + tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 6.3.4(@types/node@22.13.14)(yaml@2.7.1) - vite-node: 3.0.9(@types/node@22.13.14)(yaml@2.7.1) + vite: 6.3.5(@types/node@22.16.3)(yaml@2.8.0) + vite-node: 3.2.4(@types/node@22.16.3)(yaml@2.8.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.13.14 - jsdom: 26.0.0 + '@types/node': 22.16.3 + jsdom: 26.1.0 transitivePeerDependencies: - jiti - less @@ -3821,7 +3828,7 @@ snapshots: dependencies: xml-name-validator: 5.0.0 - watskeburt@4.1.0: {} + watskeburt@4.2.3: {} webfontloader@1.6.28: {} @@ -3837,7 +3844,7 @@ snapshots: whatwg-url@14.2.0: dependencies: - tr46: 5.1.0 + tr46: 5.1.1 webidl-conversions: 7.0.0 whatwg-url@5.0.0: @@ -3872,7 +3879,7 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 - ws@8.18.0: {} + ws@8.18.3: {} xml-name-validator@5.0.0: {} @@ -3882,14 +3889,14 @@ snapshots: yallist@3.1.1: {} - yaml@2.7.1: {} + yaml@2.8.0: {} yargs-parser@21.1.1: {} yargs@17.7.2: dependencies: cliui: 8.0.1 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 diff --git a/public/fonts/item-count.png b/public/fonts/item-count.png index 85cfe88e902..ea6ad8d8ee5 100644 Binary files a/public/fonts/item-count.png and b/public/fonts/item-count.png differ diff --git a/public/images/arenas/abyss_a.png b/public/images/arenas/abyss_a.png index 1b3b9d287d3..9bd8f1a9032 100644 Binary files a/public/images/arenas/abyss_a.png and b/public/images/arenas/abyss_a.png differ diff --git a/public/images/arenas/abyss_b.png b/public/images/arenas/abyss_b.png index 2bcf8b6f243..98811c108f2 100644 Binary files a/public/images/arenas/abyss_b.png and b/public/images/arenas/abyss_b.png differ diff --git a/public/images/arenas/abyss_b_1.png b/public/images/arenas/abyss_b_1.png index 24f1340de48..91ab529e898 100644 Binary files a/public/images/arenas/abyss_b_1.png and b/public/images/arenas/abyss_b_1.png differ diff --git a/public/images/arenas/abyss_b_2.png b/public/images/arenas/abyss_b_2.png index 1ba1aa60e59..1a9bd1dc9f4 100644 Binary files a/public/images/arenas/abyss_b_2.png and b/public/images/arenas/abyss_b_2.png differ diff --git a/public/images/arenas/abyss_b_3.png b/public/images/arenas/abyss_b_3.png index 4dddce63274..823c36d6c8b 100644 Binary files a/public/images/arenas/abyss_b_3.png and b/public/images/arenas/abyss_b_3.png differ diff --git a/public/images/arenas/abyss_bg.png b/public/images/arenas/abyss_bg.png index 1abc378806a..224071c0dac 100644 Binary files a/public/images/arenas/abyss_bg.png and b/public/images/arenas/abyss_bg.png differ diff --git a/public/images/arenas/badlands_a.png b/public/images/arenas/badlands_a.png index 2e404d30253..f1118d46310 100644 Binary files a/public/images/arenas/badlands_a.png and b/public/images/arenas/badlands_a.png differ diff --git a/public/images/arenas/badlands_b.png b/public/images/arenas/badlands_b.png index 6232eddfede..355e82883f0 100644 Binary files a/public/images/arenas/badlands_b.png and b/public/images/arenas/badlands_b.png differ diff --git a/public/images/arenas/badlands_b_1.png b/public/images/arenas/badlands_b_1.png index a4cbe062061..f8568ff4163 100644 Binary files a/public/images/arenas/badlands_b_1.png and b/public/images/arenas/badlands_b_1.png differ diff --git a/public/images/arenas/badlands_b_2.png b/public/images/arenas/badlands_b_2.png index 64396591282..21da949a4ce 100644 Binary files a/public/images/arenas/badlands_b_2.png and b/public/images/arenas/badlands_b_2.png differ diff --git a/public/images/arenas/badlands_b_3.png b/public/images/arenas/badlands_b_3.png index ba8553182fd..4ab8d7d5520 100644 Binary files a/public/images/arenas/badlands_b_3.png and b/public/images/arenas/badlands_b_3.png differ diff --git a/public/images/arenas/badlands_bg.png b/public/images/arenas/badlands_bg.png index 71efce424fa..92a8562c21a 100644 Binary files a/public/images/arenas/badlands_bg.png and b/public/images/arenas/badlands_bg.png differ diff --git a/public/images/arenas/beach_a.png b/public/images/arenas/beach_a.png index 90e9189a4be..ea66c2d19d6 100644 Binary files a/public/images/arenas/beach_a.png and b/public/images/arenas/beach_a.png differ diff --git a/public/images/arenas/beach_b.png b/public/images/arenas/beach_b.png index e3b7e31ea96..233fb53358e 100644 Binary files a/public/images/arenas/beach_b.png and b/public/images/arenas/beach_b.png differ diff --git a/public/images/arenas/beach_b_1.png b/public/images/arenas/beach_b_1.png index 1441c75abde..73ad6db675b 100644 Binary files a/public/images/arenas/beach_b_1.png and b/public/images/arenas/beach_b_1.png differ diff --git a/public/images/arenas/beach_b_2.png b/public/images/arenas/beach_b_2.png index 8f79f5b59f2..50c9be97b0d 100644 Binary files a/public/images/arenas/beach_b_2.png and b/public/images/arenas/beach_b_2.png differ diff --git a/public/images/arenas/beach_b_3.png b/public/images/arenas/beach_b_3.png index 45904c68986..c31a4f6b7f6 100644 Binary files a/public/images/arenas/beach_b_3.png and b/public/images/arenas/beach_b_3.png differ diff --git a/public/images/arenas/beach_bg.png b/public/images/arenas/beach_bg.png index b1ee271c7b7..48c81a61336 100644 Binary files a/public/images/arenas/beach_bg.png and b/public/images/arenas/beach_bg.png differ diff --git a/public/images/arenas/cave_a.png b/public/images/arenas/cave_a.png index 23e79a31b43..071546b4411 100644 Binary files a/public/images/arenas/cave_a.png and b/public/images/arenas/cave_a.png differ diff --git a/public/images/arenas/cave_b.png b/public/images/arenas/cave_b.png index 884a2232b66..7b3f53c6465 100644 Binary files a/public/images/arenas/cave_b.png and b/public/images/arenas/cave_b.png differ diff --git a/public/images/arenas/cave_b_1.png b/public/images/arenas/cave_b_1.png index 4e6a3219081..fe9f07f6ebd 100644 Binary files a/public/images/arenas/cave_b_1.png and b/public/images/arenas/cave_b_1.png differ diff --git a/public/images/arenas/cave_b_2.png b/public/images/arenas/cave_b_2.png index cc2bdd98f27..f76560e1f03 100644 Binary files a/public/images/arenas/cave_b_2.png and b/public/images/arenas/cave_b_2.png differ diff --git a/public/images/arenas/cave_b_3.png b/public/images/arenas/cave_b_3.png index d05144c6d1e..346fd5f08e6 100644 Binary files a/public/images/arenas/cave_b_3.png and b/public/images/arenas/cave_b_3.png differ diff --git a/public/images/arenas/cave_bg.png b/public/images/arenas/cave_bg.png index 37f4b9c41ff..24c0462a231 100644 Binary files a/public/images/arenas/cave_bg.png and b/public/images/arenas/cave_bg.png differ diff --git a/public/images/arenas/construction_site_a.png b/public/images/arenas/construction_site_a.png index bbd63269244..8c8ea7d49fb 100644 Binary files a/public/images/arenas/construction_site_a.png and b/public/images/arenas/construction_site_a.png differ diff --git a/public/images/arenas/construction_site_b.png b/public/images/arenas/construction_site_b.png index 51884ff0453..4c1333c12d0 100644 Binary files a/public/images/arenas/construction_site_b.png and b/public/images/arenas/construction_site_b.png differ diff --git a/public/images/arenas/construction_site_b_1.png b/public/images/arenas/construction_site_b_1.png index cc01a5a86d5..4e3e22f1fae 100644 Binary files a/public/images/arenas/construction_site_b_1.png and b/public/images/arenas/construction_site_b_1.png differ diff --git a/public/images/arenas/construction_site_b_2.png b/public/images/arenas/construction_site_b_2.png index b4ad8d154d8..4dc1c383952 100644 Binary files a/public/images/arenas/construction_site_b_2.png and b/public/images/arenas/construction_site_b_2.png differ diff --git a/public/images/arenas/construction_site_b_3.png b/public/images/arenas/construction_site_b_3.png index fd00a05fb9f..484dd7197f4 100644 Binary files a/public/images/arenas/construction_site_b_3.png and b/public/images/arenas/construction_site_b_3.png differ diff --git a/public/images/arenas/construction_site_bg.png b/public/images/arenas/construction_site_bg.png index 79aaaef7cab..ff324a620b1 100644 Binary files a/public/images/arenas/construction_site_bg.png and b/public/images/arenas/construction_site_bg.png differ diff --git a/public/images/arenas/default_bg.png b/public/images/arenas/default_bg.png index 3c1ae88d032..f49ff0de8fa 100644 Binary files a/public/images/arenas/default_bg.png and b/public/images/arenas/default_bg.png differ diff --git a/public/images/arenas/desert_a.png b/public/images/arenas/desert_a.png index 0d8ead8251e..83e5a9d5122 100644 Binary files a/public/images/arenas/desert_a.png and b/public/images/arenas/desert_a.png differ diff --git a/public/images/arenas/desert_b.png b/public/images/arenas/desert_b.png index 85403341266..c03b5fa4d4b 100644 Binary files a/public/images/arenas/desert_b.png and b/public/images/arenas/desert_b.png differ diff --git a/public/images/arenas/desert_b_1.png b/public/images/arenas/desert_b_1.png index 1e8d33d48b7..f1f04caef99 100644 Binary files a/public/images/arenas/desert_b_1.png and b/public/images/arenas/desert_b_1.png differ diff --git a/public/images/arenas/desert_b_2.png b/public/images/arenas/desert_b_2.png index a907372731e..3c0561040c2 100644 Binary files a/public/images/arenas/desert_b_2.png and b/public/images/arenas/desert_b_2.png differ diff --git a/public/images/arenas/desert_b_3.png b/public/images/arenas/desert_b_3.png index 8016fe6c933..101b2bbada5 100644 Binary files a/public/images/arenas/desert_b_3.png and b/public/images/arenas/desert_b_3.png differ diff --git a/public/images/arenas/desert_bg.png b/public/images/arenas/desert_bg.png index 57c00d7bbc5..f4d44e69afc 100644 Binary files a/public/images/arenas/desert_bg.png and b/public/images/arenas/desert_bg.png differ diff --git a/public/images/arenas/dojo_a.png b/public/images/arenas/dojo_a.png index a68acc61a5a..969bd0c09cf 100644 Binary files a/public/images/arenas/dojo_a.png and b/public/images/arenas/dojo_a.png differ diff --git a/public/images/arenas/dojo_b.png b/public/images/arenas/dojo_b.png index 1797a371cf4..4a55429c4ec 100644 Binary files a/public/images/arenas/dojo_b.png and b/public/images/arenas/dojo_b.png differ diff --git a/public/images/arenas/dojo_bg.png b/public/images/arenas/dojo_bg.png index 2a23c835211..c1c9e883627 100644 Binary files a/public/images/arenas/dojo_bg.png and b/public/images/arenas/dojo_bg.png differ diff --git a/public/images/arenas/end_a.png b/public/images/arenas/end_a.png index eeaef65eb7a..06a82254e0c 100644 Binary files a/public/images/arenas/end_a.png and b/public/images/arenas/end_a.png differ diff --git a/public/images/arenas/end_b.png b/public/images/arenas/end_b.png index 37a59201d23..6093d09dd61 100644 Binary files a/public/images/arenas/end_b.png and b/public/images/arenas/end_b.png differ diff --git a/public/images/arenas/end_b_1.png b/public/images/arenas/end_b_1.png index a79e8d0e0ea..2cb508226f0 100644 Binary files a/public/images/arenas/end_b_1.png and b/public/images/arenas/end_b_1.png differ diff --git a/public/images/arenas/end_b_2.png b/public/images/arenas/end_b_2.png index 8753543b8b0..9c66867b5bc 100644 Binary files a/public/images/arenas/end_b_2.png and b/public/images/arenas/end_b_2.png differ diff --git a/public/images/arenas/end_b_3.png b/public/images/arenas/end_b_3.png index 2ce6e372487..3310c9b9c18 100644 Binary files a/public/images/arenas/end_b_3.png and b/public/images/arenas/end_b_3.png differ diff --git a/public/images/arenas/end_bg.png b/public/images/arenas/end_bg.png index 0f821d9e357..0cfae7f7b40 100644 Binary files a/public/images/arenas/end_bg.png and b/public/images/arenas/end_bg.png differ diff --git a/public/images/arenas/factory_a.png b/public/images/arenas/factory_a.png index 7752f08e938..aa1b1024619 100644 Binary files a/public/images/arenas/factory_a.png and b/public/images/arenas/factory_a.png differ diff --git a/public/images/arenas/factory_b.png b/public/images/arenas/factory_b.png index eea4397eac6..31242986bc0 100644 Binary files a/public/images/arenas/factory_b.png and b/public/images/arenas/factory_b.png differ diff --git a/public/images/arenas/factory_b_1.png b/public/images/arenas/factory_b_1.png index 73530a9acbe..c38ffe00b0d 100644 Binary files a/public/images/arenas/factory_b_1.png and b/public/images/arenas/factory_b_1.png differ diff --git a/public/images/arenas/factory_b_2.png b/public/images/arenas/factory_b_2.png index 4b60c243717..0b2347b36c4 100644 Binary files a/public/images/arenas/factory_b_2.png and b/public/images/arenas/factory_b_2.png differ diff --git a/public/images/arenas/factory_b_3.png b/public/images/arenas/factory_b_3.png index 83c0c29f80c..f2bb93128cf 100644 Binary files a/public/images/arenas/factory_b_3.png and b/public/images/arenas/factory_b_3.png differ diff --git a/public/images/arenas/factory_bg.png b/public/images/arenas/factory_bg.png index 1d3b7e7cfd6..5bc8939f3f7 100644 Binary files a/public/images/arenas/factory_bg.png and b/public/images/arenas/factory_bg.png differ diff --git a/public/images/arenas/fairy_cave_a.png b/public/images/arenas/fairy_cave_a.png index f2636d6f601..ffbe4397a9a 100644 Binary files a/public/images/arenas/fairy_cave_a.png and b/public/images/arenas/fairy_cave_a.png differ diff --git a/public/images/arenas/fairy_cave_b.png b/public/images/arenas/fairy_cave_b.png index 5d9f4e8cad0..0afd5cf86a9 100644 Binary files a/public/images/arenas/fairy_cave_b.png and b/public/images/arenas/fairy_cave_b.png differ diff --git a/public/images/arenas/fairy_cave_b_1.png b/public/images/arenas/fairy_cave_b_1.png index e1c86ddfc0e..c30fd89bdf3 100644 Binary files a/public/images/arenas/fairy_cave_b_1.png and b/public/images/arenas/fairy_cave_b_1.png differ diff --git a/public/images/arenas/fairy_cave_b_2.png b/public/images/arenas/fairy_cave_b_2.png index 2b73e8111b7..6738be06508 100644 Binary files a/public/images/arenas/fairy_cave_b_2.png and b/public/images/arenas/fairy_cave_b_2.png differ diff --git a/public/images/arenas/fairy_cave_b_3.png b/public/images/arenas/fairy_cave_b_3.png index 8e0459f94d0..44fe937fe25 100644 Binary files a/public/images/arenas/fairy_cave_b_3.png and b/public/images/arenas/fairy_cave_b_3.png differ diff --git a/public/images/arenas/fairy_cave_bg.png b/public/images/arenas/fairy_cave_bg.png index 0eee1df0796..3282bfc6736 100644 Binary files a/public/images/arenas/fairy_cave_bg.png and b/public/images/arenas/fairy_cave_bg.png differ diff --git a/public/images/arenas/forest_a.png b/public/images/arenas/forest_a.png index a19c6568caa..31cb7947951 100644 Binary files a/public/images/arenas/forest_a.png and b/public/images/arenas/forest_a.png differ diff --git a/public/images/arenas/forest_b.png b/public/images/arenas/forest_b.png index 0fc971d11b3..dcd1981a5e9 100644 Binary files a/public/images/arenas/forest_b.png and b/public/images/arenas/forest_b.png differ diff --git a/public/images/arenas/forest_bg.png b/public/images/arenas/forest_bg.png index 92219224dff..6d9eb8dbee5 100644 Binary files a/public/images/arenas/forest_bg.png and b/public/images/arenas/forest_bg.png differ diff --git a/public/images/arenas/grass_a.png b/public/images/arenas/grass_a.png index 90685819201..f3428ee9f30 100644 Binary files a/public/images/arenas/grass_a.png and b/public/images/arenas/grass_a.png differ diff --git a/public/images/arenas/grass_b.png b/public/images/arenas/grass_b.png index 88a31b5512a..e2056c9cac8 100644 Binary files a/public/images/arenas/grass_b.png and b/public/images/arenas/grass_b.png differ diff --git a/public/images/arenas/grass_bg.png b/public/images/arenas/grass_bg.png index 8ebfa5ae695..490198179d8 100644 Binary files a/public/images/arenas/grass_bg.png and b/public/images/arenas/grass_bg.png differ diff --git a/public/images/arenas/graveyard_a.png b/public/images/arenas/graveyard_a.png index c7ee580dddc..a77cda3f519 100644 Binary files a/public/images/arenas/graveyard_a.png and b/public/images/arenas/graveyard_a.png differ diff --git a/public/images/arenas/graveyard_b.png b/public/images/arenas/graveyard_b.png index e8980bd859c..77a7acd2dd7 100644 Binary files a/public/images/arenas/graveyard_b.png and b/public/images/arenas/graveyard_b.png differ diff --git a/public/images/arenas/graveyard_b_1.png b/public/images/arenas/graveyard_b_1.png index 1d693865691..2e4f524d5bc 100644 Binary files a/public/images/arenas/graveyard_b_1.png and b/public/images/arenas/graveyard_b_1.png differ diff --git a/public/images/arenas/graveyard_b_2.png b/public/images/arenas/graveyard_b_2.png index 7e99aa4a36d..04eec264773 100644 Binary files a/public/images/arenas/graveyard_b_2.png and b/public/images/arenas/graveyard_b_2.png differ diff --git a/public/images/arenas/graveyard_b_3.png b/public/images/arenas/graveyard_b_3.png index b7879e9df36..7e7e174552b 100644 Binary files a/public/images/arenas/graveyard_b_3.png and b/public/images/arenas/graveyard_b_3.png differ diff --git a/public/images/arenas/graveyard_bg.png b/public/images/arenas/graveyard_bg.png index 9beffdc817c..c49c05e0b6f 100644 Binary files a/public/images/arenas/graveyard_bg.png and b/public/images/arenas/graveyard_bg.png differ diff --git a/public/images/arenas/ice_cave_a.png b/public/images/arenas/ice_cave_a.png index 52f2e468e1b..30b1ccc675e 100644 Binary files a/public/images/arenas/ice_cave_a.png and b/public/images/arenas/ice_cave_a.png differ diff --git a/public/images/arenas/ice_cave_b.png b/public/images/arenas/ice_cave_b.png index 684c008b467..63878dbb4e9 100644 Binary files a/public/images/arenas/ice_cave_b.png and b/public/images/arenas/ice_cave_b.png differ diff --git a/public/images/arenas/ice_cave_b_1.png b/public/images/arenas/ice_cave_b_1.png index 8d287a2c526..a28dedb50a8 100644 Binary files a/public/images/arenas/ice_cave_b_1.png and b/public/images/arenas/ice_cave_b_1.png differ diff --git a/public/images/arenas/ice_cave_b_2.png b/public/images/arenas/ice_cave_b_2.png index 675d0e52b8d..d7e6fb1784e 100644 Binary files a/public/images/arenas/ice_cave_b_2.png and b/public/images/arenas/ice_cave_b_2.png differ diff --git a/public/images/arenas/ice_cave_b_3.png b/public/images/arenas/ice_cave_b_3.png index 44e4e25a8e6..f674ab8f796 100644 Binary files a/public/images/arenas/ice_cave_b_3.png and b/public/images/arenas/ice_cave_b_3.png differ diff --git a/public/images/arenas/ice_cave_bg.png b/public/images/arenas/ice_cave_bg.png index 3f3e809e5ed..a9675202932 100644 Binary files a/public/images/arenas/ice_cave_bg.png and b/public/images/arenas/ice_cave_bg.png differ diff --git a/public/images/arenas/island_a.png b/public/images/arenas/island_a.png index e48675aa59b..e57c28dfa82 100644 Binary files a/public/images/arenas/island_a.png and b/public/images/arenas/island_a.png differ diff --git a/public/images/arenas/island_b.png b/public/images/arenas/island_b.png index 53bd4f1fe4c..d2dbe8bf0b1 100644 Binary files a/public/images/arenas/island_b.png and b/public/images/arenas/island_b.png differ diff --git a/public/images/arenas/island_b_1.png b/public/images/arenas/island_b_1.png index 8619e406a3f..bf7f3cb32e1 100644 Binary files a/public/images/arenas/island_b_1.png and b/public/images/arenas/island_b_1.png differ diff --git a/public/images/arenas/island_b_2.png b/public/images/arenas/island_b_2.png index b6dfa077346..a414da194ee 100644 Binary files a/public/images/arenas/island_b_2.png and b/public/images/arenas/island_b_2.png differ diff --git a/public/images/arenas/island_b_3.png b/public/images/arenas/island_b_3.png index 192c06950ae..07595401d2a 100644 Binary files a/public/images/arenas/island_b_3.png and b/public/images/arenas/island_b_3.png differ diff --git a/public/images/arenas/island_bg.png b/public/images/arenas/island_bg.png index 5ecb6d8100d..e05c3afa775 100644 Binary files a/public/images/arenas/island_bg.png and b/public/images/arenas/island_bg.png differ diff --git a/public/images/arenas/jungle_a.png b/public/images/arenas/jungle_a.png index 5501593d9e1..48a801fb65f 100644 Binary files a/public/images/arenas/jungle_a.png and b/public/images/arenas/jungle_a.png differ diff --git a/public/images/arenas/jungle_b.png b/public/images/arenas/jungle_b.png index 29ec524298c..e6f239fda0a 100644 Binary files a/public/images/arenas/jungle_b.png and b/public/images/arenas/jungle_b.png differ diff --git a/public/images/arenas/jungle_b_1.png b/public/images/arenas/jungle_b_1.png index 462bd0df264..e1f45c38e85 100644 Binary files a/public/images/arenas/jungle_b_1.png and b/public/images/arenas/jungle_b_1.png differ diff --git a/public/images/arenas/jungle_b_2.png b/public/images/arenas/jungle_b_2.png index 1a395af55ae..dfcfa355960 100644 Binary files a/public/images/arenas/jungle_b_2.png and b/public/images/arenas/jungle_b_2.png differ diff --git a/public/images/arenas/jungle_b_3.png b/public/images/arenas/jungle_b_3.png index e579f4013ce..5bb08ec72e4 100644 Binary files a/public/images/arenas/jungle_b_3.png and b/public/images/arenas/jungle_b_3.png differ diff --git a/public/images/arenas/jungle_bg.png b/public/images/arenas/jungle_bg.png index ff2cda1c9da..e03de2a3223 100644 Binary files a/public/images/arenas/jungle_bg.png and b/public/images/arenas/jungle_bg.png differ diff --git a/public/images/arenas/laboratory_a.png b/public/images/arenas/laboratory_a.png index 628a6919ebb..56f080f49fb 100644 Binary files a/public/images/arenas/laboratory_a.png and b/public/images/arenas/laboratory_a.png differ diff --git a/public/images/arenas/laboratory_b.png b/public/images/arenas/laboratory_b.png index eabd398bada..7948b89f072 100644 Binary files a/public/images/arenas/laboratory_b.png and b/public/images/arenas/laboratory_b.png differ diff --git a/public/images/arenas/laboratory_b_1.png b/public/images/arenas/laboratory_b_1.png index b3ee7875943..57786e6b224 100644 Binary files a/public/images/arenas/laboratory_b_1.png and b/public/images/arenas/laboratory_b_1.png differ diff --git a/public/images/arenas/laboratory_b_2.png b/public/images/arenas/laboratory_b_2.png index 66ce17d947b..fcd945b8b86 100644 Binary files a/public/images/arenas/laboratory_b_2.png and b/public/images/arenas/laboratory_b_2.png differ diff --git a/public/images/arenas/laboratory_b_3.png b/public/images/arenas/laboratory_b_3.png index 99b23e95a1f..e2538fbef77 100644 Binary files a/public/images/arenas/laboratory_b_3.png and b/public/images/arenas/laboratory_b_3.png differ diff --git a/public/images/arenas/laboratory_bg.png b/public/images/arenas/laboratory_bg.png index 331e15f8db7..0e64877c0b6 100644 Binary files a/public/images/arenas/laboratory_bg.png and b/public/images/arenas/laboratory_bg.png differ diff --git a/public/images/arenas/lake_a.png b/public/images/arenas/lake_a.png index 6ca45fb4101..cce0a61a5f6 100644 Binary files a/public/images/arenas/lake_a.png and b/public/images/arenas/lake_a.png differ diff --git a/public/images/arenas/lake_b.png b/public/images/arenas/lake_b.png index c1c81f2b29c..c24893a1392 100644 Binary files a/public/images/arenas/lake_b.png and b/public/images/arenas/lake_b.png differ diff --git a/public/images/arenas/lake_b_1.png b/public/images/arenas/lake_b_1.png index be6db3451a8..5426dd1e8d9 100644 Binary files a/public/images/arenas/lake_b_1.png and b/public/images/arenas/lake_b_1.png differ diff --git a/public/images/arenas/lake_b_2.png b/public/images/arenas/lake_b_2.png index ee8af5049c3..b08ccd7b8e4 100644 Binary files a/public/images/arenas/lake_b_2.png and b/public/images/arenas/lake_b_2.png differ diff --git a/public/images/arenas/lake_b_3.png b/public/images/arenas/lake_b_3.png index f0cf92f5389..aff06718ecb 100644 Binary files a/public/images/arenas/lake_b_3.png and b/public/images/arenas/lake_b_3.png differ diff --git a/public/images/arenas/lake_bg.png b/public/images/arenas/lake_bg.png index 547d30782c2..15d8348e20c 100644 Binary files a/public/images/arenas/lake_bg.png and b/public/images/arenas/lake_bg.png differ diff --git a/public/images/arenas/loading_bg.png b/public/images/arenas/loading_bg.png index 79c249f6879..2ed3ca2333b 100644 Binary files a/public/images/arenas/loading_bg.png and b/public/images/arenas/loading_bg.png differ diff --git a/public/images/arenas/meadow_a.png b/public/images/arenas/meadow_a.png index 1069d0fab93..549ddadc549 100644 Binary files a/public/images/arenas/meadow_a.png and b/public/images/arenas/meadow_a.png differ diff --git a/public/images/arenas/meadow_b.png b/public/images/arenas/meadow_b.png index 50db0026271..42bbe50606f 100644 Binary files a/public/images/arenas/meadow_b.png and b/public/images/arenas/meadow_b.png differ diff --git a/public/images/arenas/meadow_b_1.png b/public/images/arenas/meadow_b_1.png index 82dbbdcda86..fcd599c9477 100644 Binary files a/public/images/arenas/meadow_b_1.png and b/public/images/arenas/meadow_b_1.png differ diff --git a/public/images/arenas/meadow_b_2.png b/public/images/arenas/meadow_b_2.png index 547e0a2b8a7..23a075e9215 100644 Binary files a/public/images/arenas/meadow_b_2.png and b/public/images/arenas/meadow_b_2.png differ diff --git a/public/images/arenas/meadow_b_3.png b/public/images/arenas/meadow_b_3.png index 5a763e19b0e..493ea6d0b78 100644 Binary files a/public/images/arenas/meadow_b_3.png and b/public/images/arenas/meadow_b_3.png differ diff --git a/public/images/arenas/meadow_bg.png b/public/images/arenas/meadow_bg.png index 8f4bbc5655c..7463051755e 100644 Binary files a/public/images/arenas/meadow_bg.png and b/public/images/arenas/meadow_bg.png differ diff --git a/public/images/arenas/metropolis_a.png b/public/images/arenas/metropolis_a.png index 5a51c500702..cbb1a17c7e9 100644 Binary files a/public/images/arenas/metropolis_a.png and b/public/images/arenas/metropolis_a.png differ diff --git a/public/images/arenas/metropolis_b.png b/public/images/arenas/metropolis_b.png index 638899f3e53..6ae764af398 100644 Binary files a/public/images/arenas/metropolis_b.png and b/public/images/arenas/metropolis_b.png differ diff --git a/public/images/arenas/metropolis_b_1.png b/public/images/arenas/metropolis_b_1.png index 6e543b4c55e..52a0df3a7f9 100644 Binary files a/public/images/arenas/metropolis_b_1.png and b/public/images/arenas/metropolis_b_1.png differ diff --git a/public/images/arenas/metropolis_b_2.png b/public/images/arenas/metropolis_b_2.png index bc609ddb300..8402a90a42d 100644 Binary files a/public/images/arenas/metropolis_b_2.png and b/public/images/arenas/metropolis_b_2.png differ diff --git a/public/images/arenas/metropolis_b_3.png b/public/images/arenas/metropolis_b_3.png index c29a3b7bb7c..7e8f9e7b825 100644 Binary files a/public/images/arenas/metropolis_b_3.png and b/public/images/arenas/metropolis_b_3.png differ diff --git a/public/images/arenas/metropolis_bg.png b/public/images/arenas/metropolis_bg.png index b84c5aa494d..374744f245e 100644 Binary files a/public/images/arenas/metropolis_bg.png and b/public/images/arenas/metropolis_bg.png differ diff --git a/public/images/arenas/mountain_a.png b/public/images/arenas/mountain_a.png index f3896fb409f..7f539ba0a7a 100644 Binary files a/public/images/arenas/mountain_a.png and b/public/images/arenas/mountain_a.png differ diff --git a/public/images/arenas/mountain_b.png b/public/images/arenas/mountain_b.png index 99b4399b1f3..9c970e74180 100644 Binary files a/public/images/arenas/mountain_b.png and b/public/images/arenas/mountain_b.png differ diff --git a/public/images/arenas/mountain_b_1.png b/public/images/arenas/mountain_b_1.png index aa7c1209f5a..1f895b64aec 100644 Binary files a/public/images/arenas/mountain_b_1.png and b/public/images/arenas/mountain_b_1.png differ diff --git a/public/images/arenas/mountain_b_2.png b/public/images/arenas/mountain_b_2.png index 377c3b16b23..9f60c9e15d7 100644 Binary files a/public/images/arenas/mountain_b_2.png and b/public/images/arenas/mountain_b_2.png differ diff --git a/public/images/arenas/mountain_b_3.png b/public/images/arenas/mountain_b_3.png index ba44117634a..55e892377cd 100644 Binary files a/public/images/arenas/mountain_b_3.png and b/public/images/arenas/mountain_b_3.png differ diff --git a/public/images/arenas/mountain_bg.png b/public/images/arenas/mountain_bg.png index 972a08a8695..102f331bcf9 100644 Binary files a/public/images/arenas/mountain_bg.png and b/public/images/arenas/mountain_bg.png differ diff --git a/public/images/arenas/plains_a.png b/public/images/arenas/plains_a.png index ada3c63ccd8..49a36b80844 100644 Binary files a/public/images/arenas/plains_a.png and b/public/images/arenas/plains_a.png differ diff --git a/public/images/arenas/plains_b.png b/public/images/arenas/plains_b.png index b75b9825b21..85e3439fb12 100644 Binary files a/public/images/arenas/plains_b.png and b/public/images/arenas/plains_b.png differ diff --git a/public/images/arenas/plains_b_1.png b/public/images/arenas/plains_b_1.png new file mode 100644 index 00000000000..4e4a0a46164 Binary files /dev/null and b/public/images/arenas/plains_b_1.png differ diff --git a/public/images/arenas/plains_b_2.png b/public/images/arenas/plains_b_2.png new file mode 100644 index 00000000000..a35dbec9917 Binary files /dev/null and b/public/images/arenas/plains_b_2.png differ diff --git a/public/images/arenas/plains_b_3.png b/public/images/arenas/plains_b_3.png new file mode 100644 index 00000000000..f61b9206a46 Binary files /dev/null and b/public/images/arenas/plains_b_3.png differ diff --git a/public/images/arenas/plains_bg.png b/public/images/arenas/plains_bg.png index 7815fd8843f..f2cbec9197c 100644 Binary files a/public/images/arenas/plains_bg.png and b/public/images/arenas/plains_bg.png differ diff --git a/public/images/arenas/power_plant_a.png b/public/images/arenas/power_plant_a.png index 15f7970d726..f5e99d62b3b 100644 Binary files a/public/images/arenas/power_plant_a.png and b/public/images/arenas/power_plant_a.png differ diff --git a/public/images/arenas/power_plant_b.png b/public/images/arenas/power_plant_b.png index 67fa01426c9..9f6647adf8d 100644 Binary files a/public/images/arenas/power_plant_b.png and b/public/images/arenas/power_plant_b.png differ diff --git a/public/images/arenas/power_plant_b_1.png b/public/images/arenas/power_plant_b_1.png index 43c4979214f..c97baf92450 100644 Binary files a/public/images/arenas/power_plant_b_1.png and b/public/images/arenas/power_plant_b_1.png differ diff --git a/public/images/arenas/power_plant_b_2.png b/public/images/arenas/power_plant_b_2.png index 1cecfa0e56a..cb8cdddc9cc 100644 Binary files a/public/images/arenas/power_plant_b_2.png and b/public/images/arenas/power_plant_b_2.png differ diff --git a/public/images/arenas/power_plant_b_3.png b/public/images/arenas/power_plant_b_3.png index 25d75ff53ed..228060e3a8d 100644 Binary files a/public/images/arenas/power_plant_b_3.png and b/public/images/arenas/power_plant_b_3.png differ diff --git a/public/images/arenas/power_plant_bg.png b/public/images/arenas/power_plant_bg.png index 578f2a141d4..f0a91431a04 100644 Binary files a/public/images/arenas/power_plant_bg.png and b/public/images/arenas/power_plant_bg.png differ diff --git a/public/images/arenas/ruins_a.png b/public/images/arenas/ruins_a.png index b264c82b452..e24bc129809 100644 Binary files a/public/images/arenas/ruins_a.png and b/public/images/arenas/ruins_a.png differ diff --git a/public/images/arenas/ruins_b.png b/public/images/arenas/ruins_b.png index 88a0c3f87d9..c019f4d0317 100644 Binary files a/public/images/arenas/ruins_b.png and b/public/images/arenas/ruins_b.png differ diff --git a/public/images/arenas/ruins_b_1.png b/public/images/arenas/ruins_b_1.png index 548b9266866..dd6643f5f36 100644 Binary files a/public/images/arenas/ruins_b_1.png and b/public/images/arenas/ruins_b_1.png differ diff --git a/public/images/arenas/ruins_b_2.png b/public/images/arenas/ruins_b_2.png index 4b2393cf886..f14eac400be 100644 Binary files a/public/images/arenas/ruins_b_2.png and b/public/images/arenas/ruins_b_2.png differ diff --git a/public/images/arenas/ruins_b_3.png b/public/images/arenas/ruins_b_3.png index b15755d0d81..bc34b12fe10 100644 Binary files a/public/images/arenas/ruins_b_3.png and b/public/images/arenas/ruins_b_3.png differ diff --git a/public/images/arenas/ruins_bg.png b/public/images/arenas/ruins_bg.png index 7e6448e14ef..616c586c8c6 100644 Binary files a/public/images/arenas/ruins_bg.png and b/public/images/arenas/ruins_bg.png differ diff --git a/public/images/arenas/sea_a.png b/public/images/arenas/sea_a.png index ef93c3159d5..05cc9c2880d 100644 Binary files a/public/images/arenas/sea_a.png and b/public/images/arenas/sea_a.png differ diff --git a/public/images/arenas/sea_b.png b/public/images/arenas/sea_b.png index 17081770fb6..31984c870ab 100644 Binary files a/public/images/arenas/sea_b.png and b/public/images/arenas/sea_b.png differ diff --git a/public/images/arenas/sea_bg.png b/public/images/arenas/sea_bg.png index 65c48634fc7..9ab7445681f 100644 Binary files a/public/images/arenas/sea_bg.png and b/public/images/arenas/sea_bg.png differ diff --git a/public/images/arenas/seabed_a.png b/public/images/arenas/seabed_a.png index b6a854e7807..f4f5408e218 100644 Binary files a/public/images/arenas/seabed_a.png and b/public/images/arenas/seabed_a.png differ diff --git a/public/images/arenas/seabed_b.png b/public/images/arenas/seabed_b.png index a9ded4f54a2..6743c67ea87 100644 Binary files a/public/images/arenas/seabed_b.png and b/public/images/arenas/seabed_b.png differ diff --git a/public/images/arenas/seabed_b_1.png b/public/images/arenas/seabed_b_1.png index e71de87d194..c913d219bc4 100644 Binary files a/public/images/arenas/seabed_b_1.png and b/public/images/arenas/seabed_b_1.png differ diff --git a/public/images/arenas/seabed_b_2.png b/public/images/arenas/seabed_b_2.png index e0a87d6a4b7..33eb117a70c 100644 Binary files a/public/images/arenas/seabed_b_2.png and b/public/images/arenas/seabed_b_2.png differ diff --git a/public/images/arenas/seabed_b_3.png b/public/images/arenas/seabed_b_3.png index 868c9951f2b..5389076edd9 100644 Binary files a/public/images/arenas/seabed_b_3.png and b/public/images/arenas/seabed_b_3.png differ diff --git a/public/images/arenas/seabed_bg.png b/public/images/arenas/seabed_bg.png index 9d3ea46a681..38b28453362 100644 Binary files a/public/images/arenas/seabed_bg.png and b/public/images/arenas/seabed_bg.png differ diff --git a/public/images/arenas/slum_a.png b/public/images/arenas/slum_a.png index 4756d7acfed..4230b89abd8 100644 Binary files a/public/images/arenas/slum_a.png and b/public/images/arenas/slum_a.png differ diff --git a/public/images/arenas/slum_b.png b/public/images/arenas/slum_b.png index 38bdadae526..82a36473ae4 100644 Binary files a/public/images/arenas/slum_b.png and b/public/images/arenas/slum_b.png differ diff --git a/public/images/arenas/slum_bg.png b/public/images/arenas/slum_bg.png index f3c39504204..ad2cf0e2951 100644 Binary files a/public/images/arenas/slum_bg.png and b/public/images/arenas/slum_bg.png differ diff --git a/public/images/arenas/snowy_forest_a.png b/public/images/arenas/snowy_forest_a.png index c44abbbce51..b1a049543ae 100644 Binary files a/public/images/arenas/snowy_forest_a.png and b/public/images/arenas/snowy_forest_a.png differ diff --git a/public/images/arenas/snowy_forest_b.png b/public/images/arenas/snowy_forest_b.png index e4ae9f4b180..e1675300279 100644 Binary files a/public/images/arenas/snowy_forest_b.png and b/public/images/arenas/snowy_forest_b.png differ diff --git a/public/images/arenas/snowy_forest_b_1.png b/public/images/arenas/snowy_forest_b_1.png index f47f4f91508..1631722b6e1 100644 Binary files a/public/images/arenas/snowy_forest_b_1.png and b/public/images/arenas/snowy_forest_b_1.png differ diff --git a/public/images/arenas/snowy_forest_b_2.png b/public/images/arenas/snowy_forest_b_2.png index 5bc27fc5161..aea120be719 100644 Binary files a/public/images/arenas/snowy_forest_b_2.png and b/public/images/arenas/snowy_forest_b_2.png differ diff --git a/public/images/arenas/snowy_forest_b_3.png b/public/images/arenas/snowy_forest_b_3.png index 521870232de..14c8f4c64aa 100644 Binary files a/public/images/arenas/snowy_forest_b_3.png and b/public/images/arenas/snowy_forest_b_3.png differ diff --git a/public/images/arenas/snowy_forest_bg.png b/public/images/arenas/snowy_forest_bg.png index c449ddb32ee..b0dcc3ddfc5 100644 Binary files a/public/images/arenas/snowy_forest_bg.png and b/public/images/arenas/snowy_forest_bg.png differ diff --git a/public/images/arenas/space_a.png b/public/images/arenas/space_a.png index 8176fd9217c..dbf5c18ecc3 100644 Binary files a/public/images/arenas/space_a.png and b/public/images/arenas/space_a.png differ diff --git a/public/images/arenas/space_b.png b/public/images/arenas/space_b.png index 1be1c0c5309..42cc73943d8 100644 Binary files a/public/images/arenas/space_b.png and b/public/images/arenas/space_b.png differ diff --git a/public/images/arenas/space_bg.png b/public/images/arenas/space_bg.png index a83db0fc6ff..4fdd53348c6 100644 Binary files a/public/images/arenas/space_bg.png and b/public/images/arenas/space_bg.png differ diff --git a/public/images/arenas/swamp_a.png b/public/images/arenas/swamp_a.png index ea037b85b9c..731092a2fe3 100644 Binary files a/public/images/arenas/swamp_a.png and b/public/images/arenas/swamp_a.png differ diff --git a/public/images/arenas/swamp_b.png b/public/images/arenas/swamp_b.png index 3e8f5f308e5..3a571027e3c 100644 Binary files a/public/images/arenas/swamp_b.png and b/public/images/arenas/swamp_b.png differ diff --git a/public/images/arenas/swamp_bg.png b/public/images/arenas/swamp_bg.png index 52cf79213e9..b48b72bed9f 100644 Binary files a/public/images/arenas/swamp_bg.png and b/public/images/arenas/swamp_bg.png differ diff --git a/public/images/arenas/tall_grass_a.png b/public/images/arenas/tall_grass_a.png index 5fa1421903d..8078351eaaa 100644 Binary files a/public/images/arenas/tall_grass_a.png and b/public/images/arenas/tall_grass_a.png differ diff --git a/public/images/arenas/tall_grass_b.png b/public/images/arenas/tall_grass_b.png index 39d23a2247f..a1b405fbf0c 100644 Binary files a/public/images/arenas/tall_grass_b.png and b/public/images/arenas/tall_grass_b.png differ diff --git a/public/images/arenas/tall_grass_bg.png b/public/images/arenas/tall_grass_bg.png index ea8e31d0e75..d76a0b4a4a6 100644 Binary files a/public/images/arenas/tall_grass_bg.png and b/public/images/arenas/tall_grass_bg.png differ diff --git a/public/images/arenas/temple_a.png b/public/images/arenas/temple_a.png index aa6b3b2eb55..245131d9ae1 100644 Binary files a/public/images/arenas/temple_a.png and b/public/images/arenas/temple_a.png differ diff --git a/public/images/arenas/temple_b.png b/public/images/arenas/temple_b.png index 07d4c2b86bb..cb910289119 100644 Binary files a/public/images/arenas/temple_b.png and b/public/images/arenas/temple_b.png differ diff --git a/public/images/arenas/temple_b_1.png b/public/images/arenas/temple_b_1.png index 971a890c8a3..ed7f6c9d3d6 100644 Binary files a/public/images/arenas/temple_b_1.png and b/public/images/arenas/temple_b_1.png differ diff --git a/public/images/arenas/temple_b_2.png b/public/images/arenas/temple_b_2.png index 30ab5653742..7e864271eaa 100644 Binary files a/public/images/arenas/temple_b_2.png and b/public/images/arenas/temple_b_2.png differ diff --git a/public/images/arenas/temple_b_3.png b/public/images/arenas/temple_b_3.png index 3ea8793526b..3d3c93b5d56 100644 Binary files a/public/images/arenas/temple_b_3.png and b/public/images/arenas/temple_b_3.png differ diff --git a/public/images/arenas/temple_bg.png b/public/images/arenas/temple_bg.png index 9296648d836..0510ff86bb0 100644 Binary files a/public/images/arenas/temple_bg.png and b/public/images/arenas/temple_bg.png differ diff --git a/public/images/arenas/town_a.png b/public/images/arenas/town_a.png index faeea0c4aee..0837806c678 100644 Binary files a/public/images/arenas/town_a.png and b/public/images/arenas/town_a.png differ diff --git a/public/images/arenas/town_b.png b/public/images/arenas/town_b.png index 10db2998a36..f1de28f625a 100644 Binary files a/public/images/arenas/town_b.png and b/public/images/arenas/town_b.png differ diff --git a/public/images/arenas/town_bg.png b/public/images/arenas/town_bg.png index e1dc5a9363e..b2f035135cc 100644 Binary files a/public/images/arenas/town_bg.png and b/public/images/arenas/town_bg.png differ diff --git a/public/images/arenas/volcano_a.png b/public/images/arenas/volcano_a.png index ab98acabda2..ecf086689cc 100644 Binary files a/public/images/arenas/volcano_a.png and b/public/images/arenas/volcano_a.png differ diff --git a/public/images/arenas/volcano_b.png b/public/images/arenas/volcano_b.png index 5a5b27d623c..f995e5b8c9b 100644 Binary files a/public/images/arenas/volcano_b.png and b/public/images/arenas/volcano_b.png differ diff --git a/public/images/arenas/volcano_b_1.png b/public/images/arenas/volcano_b_1.png index 0d6c291620d..68558800f9f 100644 Binary files a/public/images/arenas/volcano_b_1.png and b/public/images/arenas/volcano_b_1.png differ diff --git a/public/images/arenas/volcano_b_2.png b/public/images/arenas/volcano_b_2.png index 30677ca16af..3bef9ff5ae4 100644 Binary files a/public/images/arenas/volcano_b_2.png and b/public/images/arenas/volcano_b_2.png differ diff --git a/public/images/arenas/volcano_b_3.png b/public/images/arenas/volcano_b_3.png index 5b0401ebfde..ba4e493cd7e 100644 Binary files a/public/images/arenas/volcano_b_3.png and b/public/images/arenas/volcano_b_3.png differ diff --git a/public/images/arenas/volcano_bg.png b/public/images/arenas/volcano_bg.png index bb72170f70e..7c4d9d9e962 100644 Binary files a/public/images/arenas/volcano_bg.png and b/public/images/arenas/volcano_bg.png differ diff --git a/public/images/arenas/wasteland_a.png b/public/images/arenas/wasteland_a.png index 7a88f33feef..61e33b93c60 100644 Binary files a/public/images/arenas/wasteland_a.png and b/public/images/arenas/wasteland_a.png differ diff --git a/public/images/arenas/wasteland_b.png b/public/images/arenas/wasteland_b.png index 38234d4140a..6ac4a317b17 100644 Binary files a/public/images/arenas/wasteland_b.png and b/public/images/arenas/wasteland_b.png differ diff --git a/public/images/arenas/wasteland_b_1.png b/public/images/arenas/wasteland_b_1.png index 6cf27c532cd..d10a7f27699 100644 Binary files a/public/images/arenas/wasteland_b_1.png and b/public/images/arenas/wasteland_b_1.png differ diff --git a/public/images/arenas/wasteland_b_2.png b/public/images/arenas/wasteland_b_2.png index 1f5f23a86cd..e4102a19ce6 100644 Binary files a/public/images/arenas/wasteland_b_2.png and b/public/images/arenas/wasteland_b_2.png differ diff --git a/public/images/arenas/wasteland_b_3.png b/public/images/arenas/wasteland_b_3.png index b5329ada69b..cdc5a2bdd50 100644 Binary files a/public/images/arenas/wasteland_b_3.png and b/public/images/arenas/wasteland_b_3.png differ diff --git a/public/images/arenas/wasteland_bg.png b/public/images/arenas/wasteland_bg.png index 3c321a8568e..f1a94e1e22d 100644 Binary files a/public/images/arenas/wasteland_bg.png and b/public/images/arenas/wasteland_bg.png differ diff --git a/public/images/battle_anims/003-Attack01.png b/public/images/battle_anims/003-Attack01.png index 870fb592852..2b249874d6a 100644 Binary files a/public/images/battle_anims/003-Attack01.png and b/public/images/battle_anims/003-Attack01.png differ diff --git a/public/images/battle_anims/004-Attack02.png b/public/images/battle_anims/004-Attack02.png index e60f3cfc46f..061aa9dd706 100644 Binary files a/public/images/battle_anims/004-Attack02.png and b/public/images/battle_anims/004-Attack02.png differ diff --git a/public/images/battle_anims/007-Weapon02.png b/public/images/battle_anims/007-Weapon02.png index aab407081f7..e76da15bf4c 100644 Binary files a/public/images/battle_anims/007-Weapon02.png and b/public/images/battle_anims/007-Weapon02.png differ diff --git a/public/images/battle_anims/029-Emotion01.png b/public/images/battle_anims/029-Emotion01.png index 3fe970fb4ea..40d67887d00 100644 Binary files a/public/images/battle_anims/029-Emotion01.png and b/public/images/battle_anims/029-Emotion01.png differ diff --git a/public/images/battle_anims/Anima (2).png b/public/images/battle_anims/Anima (2).png index f4651241e03..c51c95c483e 100644 Binary files a/public/images/battle_anims/Anima (2).png and b/public/images/battle_anims/Anima (2).png differ diff --git a/public/images/battle_anims/GEN8- Aura Wheel Ally.png b/public/images/battle_anims/GEN8- Aura Wheel Ally.png index 97243d3f121..3c506b190b8 100644 Binary files a/public/images/battle_anims/GEN8- Aura Wheel Ally.png and b/public/images/battle_anims/GEN8- Aura Wheel Ally.png differ diff --git a/public/images/battle_anims/GEN8- Aura Wheel Opp.png b/public/images/battle_anims/GEN8- Aura Wheel Opp.png index 516b015f384..9849b68422e 100644 Binary files a/public/images/battle_anims/GEN8- Aura Wheel Opp.png and b/public/images/battle_anims/GEN8- Aura Wheel Opp.png differ diff --git a/public/images/battle_anims/GEN8- Behemoth Bash Sword.png b/public/images/battle_anims/GEN8- Behemoth Bash Sword.png index bfa2a645b5d..91677023868 100644 Binary files a/public/images/battle_anims/GEN8- Behemoth Bash Sword.png and b/public/images/battle_anims/GEN8- Behemoth Bash Sword.png differ diff --git a/public/images/battle_anims/GEN8- Fiery.png b/public/images/battle_anims/GEN8- Fiery.png index 329a0663c0e..51abe55cf88 100644 Binary files a/public/images/battle_anims/GEN8- Fiery.png and b/public/images/battle_anims/GEN8- Fiery.png differ diff --git a/public/images/battle_anims/GEN8- No Retreat.png b/public/images/battle_anims/GEN8- No Retreat.png index fa4f45c9bd8..42bf8eb6eda 100644 Binary files a/public/images/battle_anims/GEN8- No Retreat.png and b/public/images/battle_anims/GEN8- No Retreat.png differ diff --git a/public/images/battle_anims/GEN8- PrimalGroudon2.png b/public/images/battle_anims/GEN8- PrimalGroudon2.png index 781e38e77fc..dcb704c3f9a 100644 Binary files a/public/images/battle_anims/GEN8- PrimalGroudon2.png and b/public/images/battle_anims/GEN8- PrimalGroudon2.png differ diff --git a/public/images/battle_anims/GEN8- PrimalKyogre2.png b/public/images/battle_anims/GEN8- PrimalKyogre2.png index 120f9ecf67f..b4581bdeadb 100644 Binary files a/public/images/battle_anims/GEN8- PrimalKyogre2.png and b/public/images/battle_anims/GEN8- PrimalKyogre2.png differ diff --git a/public/images/battle_anims/GEN8- UltraBurst2.png b/public/images/battle_anims/GEN8- UltraBurst2.png index d0f33ea0d22..37a48d24a6c 100644 Binary files a/public/images/battle_anims/GEN8- UltraBurst2.png and b/public/images/battle_anims/GEN8- UltraBurst2.png differ diff --git a/public/images/battle_anims/Gen9- Bitter Blade.png b/public/images/battle_anims/Gen9- Bitter Blade.png index 763d4fcc063..7733e521b39 100644 Binary files a/public/images/battle_anims/Gen9- Bitter Blade.png and b/public/images/battle_anims/Gen9- Bitter Blade.png differ diff --git a/public/images/battle_anims/Light1.png b/public/images/battle_anims/Light1.png index 78e278fdcef..36af8bb5060 100644 Binary files a/public/images/battle_anims/Light1.png and b/public/images/battle_anims/Light1.png differ diff --git a/public/images/battle_anims/Majesty - Shed Tail.png b/public/images/battle_anims/Majesty - Shed Tail.png index 47969335b35..6cf1a8fd219 100644 Binary files a/public/images/battle_anims/Majesty - Shed Tail.png and b/public/images/battle_anims/Majesty - Shed Tail.png differ diff --git a/public/images/battle_anims/PRAS- All Out Pummeling.png b/public/images/battle_anims/PRAS- All Out Pummeling.png index f0528fe59ba..c54dfeb25aa 100644 Binary files a/public/images/battle_anims/PRAS- All Out Pummeling.png and b/public/images/battle_anims/PRAS- All Out Pummeling.png differ diff --git a/public/images/battle_anims/PRAS- Aqua Jet.png b/public/images/battle_anims/PRAS- Aqua Jet.png index 6079d67d384..284743c12e2 100644 Binary files a/public/images/battle_anims/PRAS- Aqua Jet.png and b/public/images/battle_anims/PRAS- Aqua Jet.png differ diff --git a/public/images/battle_anims/PRAS- Aurora Veil FG.png b/public/images/battle_anims/PRAS- Aurora Veil FG.png index 87061305e38..1ac8f7341c0 100644 Binary files a/public/images/battle_anims/PRAS- Aurora Veil FG.png and b/public/images/battle_anims/PRAS- Aurora Veil FG.png differ diff --git a/public/images/battle_anims/PRAS- Aurora Veil Opp FG.png b/public/images/battle_anims/PRAS- Aurora Veil Opp FG.png index 0a283cd59cb..186fa027eb2 100644 Binary files a/public/images/battle_anims/PRAS- Aurora Veil Opp FG.png and b/public/images/battle_anims/PRAS- Aurora Veil Opp FG.png differ diff --git a/public/images/battle_anims/PRAS- Barrier.png b/public/images/battle_anims/PRAS- Barrier.png index 2d0af4db9ba..afac47f8dbd 100644 Binary files a/public/images/battle_anims/PRAS- Barrier.png and b/public/images/battle_anims/PRAS- Barrier.png differ diff --git a/public/images/battle_anims/PRAS- Black Hole Eclipse.png b/public/images/battle_anims/PRAS- Black Hole Eclipse.png index 6963b4b2f3f..8f4c75237b3 100644 Binary files a/public/images/battle_anims/PRAS- Black Hole Eclipse.png and b/public/images/battle_anims/PRAS- Black Hole Eclipse.png differ diff --git a/public/images/battle_anims/PRAS- Blizzard BG.png b/public/images/battle_anims/PRAS- Blizzard BG.png index f83fde2e4f2..31c45ffa3a4 100644 Binary files a/public/images/battle_anims/PRAS- Blizzard BG.png and b/public/images/battle_anims/PRAS- Blizzard BG.png differ diff --git a/public/images/battle_anims/PRAS- Blizzard FG.png b/public/images/battle_anims/PRAS- Blizzard FG.png index d61f1e40f8b..b52ee422d66 100644 Binary files a/public/images/battle_anims/PRAS- Blizzard FG.png and b/public/images/battle_anims/PRAS- Blizzard FG.png differ diff --git a/public/images/battle_anims/PRAS- BoneMerang.png b/public/images/battle_anims/PRAS- BoneMerang.png index 8a548433ceb..40730f1c992 100644 Binary files a/public/images/battle_anims/PRAS- BoneMerang.png and b/public/images/battle_anims/PRAS- BoneMerang.png differ diff --git a/public/images/battle_anims/PRAS- Catastropika.png b/public/images/battle_anims/PRAS- Catastropika.png index b3b38200a23..5d69114429c 100644 Binary files a/public/images/battle_anims/PRAS- Catastropika.png and b/public/images/battle_anims/PRAS- Catastropika.png differ diff --git a/public/images/battle_anims/PRAS- Draining Kiss.png b/public/images/battle_anims/PRAS- Draining Kiss.png index 33f11acf9ae..8d5fe34a817 100644 Binary files a/public/images/battle_anims/PRAS- Draining Kiss.png and b/public/images/battle_anims/PRAS- Draining Kiss.png differ diff --git a/public/images/battle_anims/PRAS- Earthquake BG.png b/public/images/battle_anims/PRAS- Earthquake BG.png index 94895b238ff..c78f189188f 100644 Binary files a/public/images/battle_anims/PRAS- Earthquake BG.png and b/public/images/battle_anims/PRAS- Earthquake BG.png differ diff --git a/public/images/battle_anims/PRAS- Electric Terrain BG.png b/public/images/battle_anims/PRAS- Electric Terrain BG.png index 3ff1abf6318..934ed1067b1 100644 Binary files a/public/images/battle_anims/PRAS- Electric Terrain BG.png and b/public/images/battle_anims/PRAS- Electric Terrain BG.png differ diff --git a/public/images/battle_anims/PRAS- Elemental Fangs.png b/public/images/battle_anims/PRAS- Elemental Fangs.png index 5c631982488..da0900f6915 100644 Binary files a/public/images/battle_anims/PRAS- Elemental Fangs.png and b/public/images/battle_anims/PRAS- Elemental Fangs.png differ diff --git a/public/images/battle_anims/PRAS- False Swipe.png b/public/images/battle_anims/PRAS- False Swipe.png index 5e17c520d43..eca24570f26 100644 Binary files a/public/images/battle_anims/PRAS- False Swipe.png and b/public/images/battle_anims/PRAS- False Swipe.png differ diff --git a/public/images/battle_anims/PRAS- Frenzy Plant.png b/public/images/battle_anims/PRAS- Frenzy Plant.png index 756290186ff..65dd328e984 100644 Binary files a/public/images/battle_anims/PRAS- Frenzy Plant.png and b/public/images/battle_anims/PRAS- Frenzy Plant.png differ diff --git a/public/images/battle_anims/PRAS- Giga Impact Opp BG.png b/public/images/battle_anims/PRAS- Giga Impact Opp BG.png index 031483c4d4f..0b571c7bc18 100644 Binary files a/public/images/battle_anims/PRAS- Giga Impact Opp BG.png and b/public/images/battle_anims/PRAS- Giga Impact Opp BG.png differ diff --git a/public/images/battle_anims/PRAS- Glitch BG.png b/public/images/battle_anims/PRAS- Glitch BG.png index e8938f6d92b..f08383c48a6 100644 Binary files a/public/images/battle_anims/PRAS- Glitch BG.png and b/public/images/battle_anims/PRAS- Glitch BG.png differ diff --git a/public/images/battle_anims/PRAS- Gravity BG.png b/public/images/battle_anims/PRAS- Gravity BG.png index f5e7cb66a5a..f5ceb490677 100644 Binary files a/public/images/battle_anims/PRAS- Gravity BG.png and b/public/images/battle_anims/PRAS- Gravity BG.png differ diff --git a/public/images/battle_anims/PRAS- Heat Wave.png b/public/images/battle_anims/PRAS- Heat Wave.png index 6f1cba45fd0..8a88b7063aa 100644 Binary files a/public/images/battle_anims/PRAS- Heat Wave.png and b/public/images/battle_anims/PRAS- Heat Wave.png differ diff --git a/public/images/battle_anims/PRAS- Hyperspace Hole.png b/public/images/battle_anims/PRAS- Hyperspace Hole.png index 0f4d9016eee..ecf066c3207 100644 Binary files a/public/images/battle_anims/PRAS- Hyperspace Hole.png and b/public/images/battle_anims/PRAS- Hyperspace Hole.png differ diff --git a/public/images/battle_anims/PRAS- Leaf Tornado.png b/public/images/battle_anims/PRAS- Leaf Tornado.png index b3919b2dc9c..f1ade2553db 100644 Binary files a/public/images/battle_anims/PRAS- Leaf Tornado.png and b/public/images/battle_anims/PRAS- Leaf Tornado.png differ diff --git a/public/images/battle_anims/PRAS- Leech Life.png b/public/images/battle_anims/PRAS- Leech Life.png index cacb94faa93..dd3c64e86da 100644 Binary files a/public/images/battle_anims/PRAS- Leech Life.png and b/public/images/battle_anims/PRAS- Leech Life.png differ diff --git a/public/images/battle_anims/PRAS- Light Screen.png b/public/images/battle_anims/PRAS- Light Screen.png index 58a43861c80..830327f1739 100644 Binary files a/public/images/battle_anims/PRAS- Light Screen.png and b/public/images/battle_anims/PRAS- Light Screen.png differ diff --git a/public/images/battle_anims/PRAS- Luster Purge.png b/public/images/battle_anims/PRAS- Luster Purge.png index 1b1e7fea7b1..d165bc97ec3 100644 Binary files a/public/images/battle_anims/PRAS- Luster Purge.png and b/public/images/battle_anims/PRAS- Luster Purge.png differ diff --git a/public/images/battle_anims/PRAS- Magic Coat.png b/public/images/battle_anims/PRAS- Magic Coat.png index 769984806ad..fcaec4f6b07 100644 Binary files a/public/images/battle_anims/PRAS- Magic Coat.png and b/public/images/battle_anims/PRAS- Magic Coat.png differ diff --git a/public/images/battle_anims/PRAS- Magnet bomb.png b/public/images/battle_anims/PRAS- Magnet bomb.png index 17c58b03f97..2d9d7417f4a 100644 Binary files a/public/images/battle_anims/PRAS- Magnet bomb.png and b/public/images/battle_anims/PRAS- Magnet bomb.png differ diff --git a/public/images/battle_anims/PRAS- Mist FG.png b/public/images/battle_anims/PRAS- Mist FG.png index cee92715ba3..f75af146109 100644 Binary files a/public/images/battle_anims/PRAS- Mist FG.png and b/public/images/battle_anims/PRAS- Mist FG.png differ diff --git a/public/images/battle_anims/PRAS- Mist.png b/public/images/battle_anims/PRAS- Mist.png index 11a92964717..c9161afdf9a 100644 Binary files a/public/images/battle_anims/PRAS- Mist.png and b/public/images/battle_anims/PRAS- Mist.png differ diff --git a/public/images/battle_anims/PRAS- Odor Sleuth.png b/public/images/battle_anims/PRAS- Odor Sleuth.png index a0e76eef728..a3b832c24c6 100644 Binary files a/public/images/battle_anims/PRAS- Odor Sleuth.png and b/public/images/battle_anims/PRAS- Odor Sleuth.png differ diff --git a/public/images/battle_anims/PRAS- Ominous Wind BG.png b/public/images/battle_anims/PRAS- Ominous Wind BG.png index da7f1a85bef..a7cd026bef7 100644 Binary files a/public/images/battle_anims/PRAS- Ominous Wind BG.png and b/public/images/battle_anims/PRAS- Ominous Wind BG.png differ diff --git a/public/images/battle_anims/PRAS- Petal Blizzard FG.png b/public/images/battle_anims/PRAS- Petal Blizzard FG.png index 50730ac068a..d62cd4623ae 100644 Binary files a/public/images/battle_anims/PRAS- Petal Blizzard FG.png and b/public/images/battle_anims/PRAS- Petal Blizzard FG.png differ diff --git a/public/images/battle_anims/PRAS- Powder.png b/public/images/battle_anims/PRAS- Powder.png index 9656c31e6c9..e4283e53e73 100644 Binary files a/public/images/battle_anims/PRAS- Powder.png and b/public/images/battle_anims/PRAS- Powder.png differ diff --git a/public/images/battle_anims/PRAS- Psychic BG.png b/public/images/battle_anims/PRAS- Psychic BG.png index 67e4ea88af4..17ebbf41049 100644 Binary files a/public/images/battle_anims/PRAS- Psychic BG.png and b/public/images/battle_anims/PRAS- Psychic BG.png differ diff --git a/public/images/battle_anims/PRAS- Psychic Terrain BG.png b/public/images/battle_anims/PRAS- Psychic Terrain BG.png index eab6c8c5bf6..44cb39fc3d6 100644 Binary files a/public/images/battle_anims/PRAS- Psychic Terrain BG.png and b/public/images/battle_anims/PRAS- Psychic Terrain BG.png differ diff --git a/public/images/battle_anims/PRAS- Pulverizing Pancake BG.png b/public/images/battle_anims/PRAS- Pulverizing Pancake BG.png index a74d9c307a3..e235c7c2e68 100644 Binary files a/public/images/battle_anims/PRAS- Pulverizing Pancake BG.png and b/public/images/battle_anims/PRAS- Pulverizing Pancake BG.png differ diff --git a/public/images/battle_anims/PRAS- Pulverizing Pancake BG2.png b/public/images/battle_anims/PRAS- Pulverizing Pancake BG2.png index a2a0f9afed2..44b50a6d385 100644 Binary files a/public/images/battle_anims/PRAS- Pulverizing Pancake BG2.png and b/public/images/battle_anims/PRAS- Pulverizing Pancake BG2.png differ diff --git a/public/images/battle_anims/PRAS- Pulverizing Pancake.png b/public/images/battle_anims/PRAS- Pulverizing Pancake.png index 787015e0731..519a52c63c6 100644 Binary files a/public/images/battle_anims/PRAS- Pulverizing Pancake.png and b/public/images/battle_anims/PRAS- Pulverizing Pancake.png differ diff --git a/public/images/battle_anims/PRAS- Reflect.png b/public/images/battle_anims/PRAS- Reflect.png index d7db4a3561f..f82d2ce50d4 100644 Binary files a/public/images/battle_anims/PRAS- Reflect.png and b/public/images/battle_anims/PRAS- Reflect.png differ diff --git a/public/images/battle_anims/PRAS- Retaliate BG.png b/public/images/battle_anims/PRAS- Retaliate BG.png index 58ea9540ea8..82688e4bf88 100644 Binary files a/public/images/battle_anims/PRAS- Retaliate BG.png and b/public/images/battle_anims/PRAS- Retaliate BG.png differ diff --git a/public/images/battle_anims/PRAS- Roost.png b/public/images/battle_anims/PRAS- Roost.png index 5c9167ff393..6b9e70e0539 100644 Binary files a/public/images/battle_anims/PRAS- Roost.png and b/public/images/battle_anims/PRAS- Roost.png differ diff --git a/public/images/battle_anims/PRAS- Sky Uppercut BG.png b/public/images/battle_anims/PRAS- Sky Uppercut BG.png index e9780d3bb5a..5c6ae5e4484 100644 Binary files a/public/images/battle_anims/PRAS- Sky Uppercut BG.png and b/public/images/battle_anims/PRAS- Sky Uppercut BG.png differ diff --git a/public/images/battle_anims/PRAS- Space BG.png b/public/images/battle_anims/PRAS- Space BG.png index 6a72789df99..99aeded6f15 100644 Binary files a/public/images/battle_anims/PRAS- Space BG.png and b/public/images/battle_anims/PRAS- Space BG.png differ diff --git a/public/images/battle_anims/PRAS- Spectral thief BG.png b/public/images/battle_anims/PRAS- Spectral thief BG.png index 03d15aeee4a..35fc434fdca 100644 Binary files a/public/images/battle_anims/PRAS- Spectral thief BG.png and b/public/images/battle_anims/PRAS- Spectral thief BG.png differ diff --git a/public/images/battle_anims/PRAS- Speed BG.png b/public/images/battle_anims/PRAS- Speed BG.png index abb97f035ba..388065a2d49 100644 Binary files a/public/images/battle_anims/PRAS- Speed BG.png and b/public/images/battle_anims/PRAS- Speed BG.png differ diff --git a/public/images/battle_anims/PRAS- Spike Cannon.png b/public/images/battle_anims/PRAS- Spike Cannon.png index e2ee3ab8c3e..6d121870b3e 100644 Binary files a/public/images/battle_anims/PRAS- Spike Cannon.png and b/public/images/battle_anims/PRAS- Spike Cannon.png differ diff --git a/public/images/battle_anims/PRAS- Steam Eruption FG.png b/public/images/battle_anims/PRAS- Steam Eruption FG.png index 710d4d768f7..b3910fac9ff 100644 Binary files a/public/images/battle_anims/PRAS- Steam Eruption FG.png and b/public/images/battle_anims/PRAS- Steam Eruption FG.png differ diff --git a/public/images/battle_anims/PRAS- Underwater BG.png b/public/images/battle_anims/PRAS- Underwater BG.png index 9b8d1b255b2..8d5d8c83744 100644 Binary files a/public/images/battle_anims/PRAS- Underwater BG.png and b/public/images/battle_anims/PRAS- Underwater BG.png differ diff --git a/public/images/battle_anims/Rock Tomb.png b/public/images/battle_anims/Rock Tomb.png index d5d654a8dc8..02b7dbf403b 100644 Binary files a/public/images/battle_anims/Rock Tomb.png and b/public/images/battle_anims/Rock Tomb.png differ diff --git a/public/images/battle_anims/Sword6.png b/public/images/battle_anims/Sword6.png index 2a08c846b05..7f93457434c 100644 Binary files a/public/images/battle_anims/Sword6.png and b/public/images/battle_anims/Sword6.png differ diff --git a/public/images/battle_anims/Thunder2.png b/public/images/battle_anims/Thunder2.png index 97677830322..16284d300e8 100644 Binary files a/public/images/battle_anims/Thunder2.png and b/public/images/battle_anims/Thunder2.png differ diff --git a/public/images/battle_anims/Trovao.png b/public/images/battle_anims/Trovao.png index 14210e47551..7c3b67967d7 100644 Binary files a/public/images/battle_anims/Trovao.png and b/public/images/battle_anims/Trovao.png differ diff --git a/public/images/battle_anims/block.png b/public/images/battle_anims/block.png index ca4d8874df4..d2496d7390d 100644 Binary files a/public/images/battle_anims/block.png and b/public/images/battle_anims/block.png differ diff --git a/public/images/battle_anims/confused.png b/public/images/battle_anims/confused.png index 8e4823b79e1..267765e5701 100644 Binary files a/public/images/battle_anims/confused.png and b/public/images/battle_anims/confused.png differ diff --git a/public/images/battle_anims/finger.spoon.png b/public/images/battle_anims/finger.spoon.png index f8ea58fca81..268d3169ba0 100644 Binary files a/public/images/battle_anims/finger.spoon.png and b/public/images/battle_anims/finger.spoon.png differ diff --git a/public/images/battle_anims/fly copy.png b/public/images/battle_anims/fly copy.png index 78909303837..d3431d209e4 100644 Binary files a/public/images/battle_anims/fly copy.png and b/public/images/battle_anims/fly copy.png differ diff --git a/public/images/battle_anims/ghost2.png b/public/images/battle_anims/ghost2.png index eb58d716dc5..f2a29364257 100644 Binary files a/public/images/battle_anims/ghost2.png and b/public/images/battle_anims/ghost2.png differ diff --git a/public/images/battle_anims/mixed status.png b/public/images/battle_anims/mixed status.png index e95d3b457d2..c08f9f64dec 100644 Binary files a/public/images/battle_anims/mixed status.png and b/public/images/battle_anims/mixed status.png differ diff --git a/public/images/battle_anims/mixed.png b/public/images/battle_anims/mixed.png index 074dc10ae72..9b4da7d5626 100644 Binary files a/public/images/battle_anims/mixed.png and b/public/images/battle_anims/mixed.png differ diff --git a/public/images/battle_anims/terastallize.png b/public/images/battle_anims/terastallize.png index 78fbb7ec335..b322a8a89d0 100644 Binary files a/public/images/battle_anims/terastallize.png and b/public/images/battle_anims/terastallize.png differ diff --git a/public/images/categories.png b/public/images/categories.png index 0f683399495..56903fddd07 100644 Binary files a/public/images/categories.png and b/public/images/categories.png differ diff --git a/public/images/categories_legacy.png b/public/images/categories_legacy.png index 94ba1d4c4bc..54c90c36b18 100644 Binary files a/public/images/categories_legacy.png and b/public/images/categories_legacy.png differ diff --git a/public/images/cg/end_f.png b/public/images/cg/end_f.png index 84f94d7e05d..9fbb4514007 100644 Binary files a/public/images/cg/end_f.png and b/public/images/cg/end_f.png differ diff --git a/public/images/cg/end_m.png b/public/images/cg/end_m.png index abdcb49aff9..4ba892011b5 100644 Binary files a/public/images/cg/end_m.png and b/public/images/cg/end_m.png differ diff --git a/public/images/character/rival_f.png b/public/images/character/rival_f.png index b165cd8a760..2c78dd39fff 100644 Binary files a/public/images/character/rival_f.png and b/public/images/character/rival_f.png differ diff --git a/public/images/character/rival_m.png b/public/images/character/rival_m.png index b12e2787287..46fb12b53ba 100644 Binary files a/public/images/character/rival_m.png and b/public/images/character/rival_m.png differ diff --git a/public/images/effects/battle_stats.png b/public/images/effects/battle_stats.png index cc3bc279641..e1d4fd4eea7 100644 Binary files a/public/images/effects/battle_stats.png and b/public/images/effects/battle_stats.png differ diff --git a/public/images/effects/evo_sparkle.png b/public/images/effects/evo_sparkle.png index 46e1aebba81..b8e791f13e1 100644 Binary files a/public/images/effects/evo_sparkle.png and b/public/images/effects/evo_sparkle.png differ diff --git a/public/images/effects/pb_particles.png b/public/images/effects/pb_particles.png index 386ca9b29e7..a25b3cf7a09 100644 Binary files a/public/images/effects/pb_particles.png and b/public/images/effects/pb_particles.png differ diff --git a/public/images/effects/shiny.png b/public/images/effects/shiny.png index e508fcdf58a..fb05ab39eba 100644 Binary files a/public/images/effects/shiny.png and b/public/images/effects/shiny.png differ diff --git a/public/images/effects/shiny_2.png b/public/images/effects/shiny_2.png index 3f9e37c1643..717cf936685 100644 Binary files a/public/images/effects/shiny_2.png and b/public/images/effects/shiny_2.png differ diff --git a/public/images/effects/shiny_3.png b/public/images/effects/shiny_3.png index 53000bdb3d1..52cafa35259 100644 Binary files a/public/images/effects/shiny_3.png and b/public/images/effects/shiny_3.png differ diff --git a/public/images/effects/tera.png b/public/images/effects/tera.png index e378d1c051c..343565f0005 100644 Binary files a/public/images/effects/tera.png and b/public/images/effects/tera.png differ diff --git a/public/images/effects/tera_sparkle.png b/public/images/effects/tera_sparkle.png index 3385aaf23ad..2d6769a291b 100644 Binary files a/public/images/effects/tera_sparkle.png and b/public/images/effects/tera_sparkle.png differ diff --git a/public/images/egg/default.png b/public/images/egg/default.png index 160ac2542eb..94d6b34a4dc 100644 Binary files a/public/images/egg/default.png and b/public/images/egg/default.png differ diff --git a/public/images/egg/egg.png b/public/images/egg/egg.png index 2943e83b5ea..696b5a232cf 100644 Binary files a/public/images/egg/egg.png and b/public/images/egg/egg.png differ diff --git a/public/images/egg/egg_crack.png b/public/images/egg/egg_crack.png index b23b7703307..9d553ebf378 100644 Binary files a/public/images/egg/egg_crack.png and b/public/images/egg/egg_crack.png differ diff --git a/public/images/egg/egg_icons.png b/public/images/egg/egg_icons.png index c69187baa51..59891a9629e 100644 Binary files a/public/images/egg/egg_icons.png and b/public/images/egg/egg_icons.png differ diff --git a/public/images/egg/egg_lightrays.png b/public/images/egg/egg_lightrays.png index a457625454d..892134b8701 100644 Binary files a/public/images/egg/egg_lightrays.png and b/public/images/egg/egg_lightrays.png differ diff --git a/public/images/egg/egg_shard.png b/public/images/egg/egg_shard.png index a4084af17e1..774763be241 100644 Binary files a/public/images/egg/egg_shard.png and b/public/images/egg/egg_shard.png differ diff --git a/public/images/egg/gacha_eggs.png b/public/images/egg/gacha_eggs.png index 6e26addc450..8aa6420be1a 100644 Binary files a/public/images/egg/gacha_eggs.png and b/public/images/egg/gacha_eggs.png differ diff --git a/public/images/egg/gacha_glass.png b/public/images/egg/gacha_glass.png index b8c4a423454..ddeeb68f3a1 100644 Binary files a/public/images/egg/gacha_glass.png and b/public/images/egg/gacha_glass.png differ diff --git a/public/images/egg/gacha_hatch.png b/public/images/egg/gacha_hatch.png index 39fa7de58c1..0bdcae840e0 100644 Binary files a/public/images/egg/gacha_hatch.png and b/public/images/egg/gacha_hatch.png differ diff --git a/public/images/egg/gacha_knob.png b/public/images/egg/gacha_knob.png index 9b20c081cf2..10107ebd27f 100644 Binary files a/public/images/egg/gacha_knob.png and b/public/images/egg/gacha_knob.png differ diff --git a/public/images/egg/gacha_legendary.png b/public/images/egg/gacha_legendary.png index 6eb41e55099..f0ff27095b6 100644 Binary files a/public/images/egg/gacha_legendary.png and b/public/images/egg/gacha_legendary.png differ diff --git a/public/images/egg/gacha_move.png b/public/images/egg/gacha_move.png index 19b3668424a..f0559192a75 100644 Binary files a/public/images/egg/gacha_move.png and b/public/images/egg/gacha_move.png differ diff --git a/public/images/egg/gacha_shiny.png b/public/images/egg/gacha_shiny.png index ffc1314f597..a884fee5927 100644 Binary files a/public/images/egg/gacha_shiny.png and b/public/images/egg/gacha_shiny.png differ diff --git a/public/images/egg/gacha_underlay_legendary.png b/public/images/egg/gacha_underlay_legendary.png index 5d116d3e11f..0e7d29b1a79 100644 Binary files a/public/images/egg/gacha_underlay_legendary.png and b/public/images/egg/gacha_underlay_legendary.png differ diff --git a/public/images/egg/gacha_underlay_move.png b/public/images/egg/gacha_underlay_move.png index 437b2bca3ab..b3ce6b4a666 100644 Binary files a/public/images/egg/gacha_underlay_move.png and b/public/images/egg/gacha_underlay_move.png differ diff --git a/public/images/egg/gacha_underlay_shiny.png b/public/images/egg/gacha_underlay_shiny.png index a2b40fa2b0b..f9ea3733ca0 100644 Binary files a/public/images/egg/gacha_underlay_shiny.png and b/public/images/egg/gacha_underlay_shiny.png differ diff --git a/public/images/egg/open_hatch.png b/public/images/egg/open_hatch.png index fd91aca14d3..535f2fabff2 100644 Binary files a/public/images/egg/open_hatch.png and b/public/images/egg/open_hatch.png differ diff --git a/public/images/events/aprf25-de.png b/public/images/events/aprf25-de.png index d4bb7ebdc50..af0d2a63f70 100644 Binary files a/public/images/events/aprf25-de.png and b/public/images/events/aprf25-de.png differ diff --git a/public/images/events/aprf25-en.png b/public/images/events/aprf25-en.png index 8f7268b01b6..bb61b156a7b 100644 Binary files a/public/images/events/aprf25-en.png and b/public/images/events/aprf25-en.png differ diff --git a/public/images/events/aprf25-es-ES.png b/public/images/events/aprf25-es-ES.png index a6136a2c8de..c8f2e6a0d5a 100644 Binary files a/public/images/events/aprf25-es-ES.png and b/public/images/events/aprf25-es-ES.png differ diff --git a/public/images/events/aprf25-es-MX.png b/public/images/events/aprf25-es-MX.png index a6136a2c8de..c8f2e6a0d5a 100644 Binary files a/public/images/events/aprf25-es-MX.png and b/public/images/events/aprf25-es-MX.png differ diff --git a/public/images/events/aprf25-fr.png b/public/images/events/aprf25-fr.png index c68264c75dd..cad3045cf68 100644 Binary files a/public/images/events/aprf25-fr.png and b/public/images/events/aprf25-fr.png differ diff --git a/public/images/events/aprf25-it.png b/public/images/events/aprf25-it.png index 01bc0d2a1f0..70c57f92845 100644 Binary files a/public/images/events/aprf25-it.png and b/public/images/events/aprf25-it.png differ diff --git a/public/images/events/aprf25-ja.png b/public/images/events/aprf25-ja.png index c6b62a3672e..ae99dd72e52 100644 Binary files a/public/images/events/aprf25-ja.png and b/public/images/events/aprf25-ja.png differ diff --git a/public/images/events/aprf25-ko.png b/public/images/events/aprf25-ko.png index bcc87e33ac1..1c76f7ce6e9 100644 Binary files a/public/images/events/aprf25-ko.png and b/public/images/events/aprf25-ko.png differ diff --git a/public/images/events/aprf25-pt-BR.png b/public/images/events/aprf25-pt-BR.png index f56f5b5c1e9..bee4ed3f1e2 100644 Binary files a/public/images/events/aprf25-pt-BR.png and b/public/images/events/aprf25-pt-BR.png differ diff --git a/public/images/events/aprf25-zh-CN.png b/public/images/events/aprf25-zh-CN.png index 57b2c3ec5be..23322d12760 100644 Binary files a/public/images/events/aprf25-zh-CN.png and b/public/images/events/aprf25-zh-CN.png differ diff --git a/public/images/events/august-variant-update.png b/public/images/events/august-variant-update.png index 1c78aa2fe14..e2e429ae2e6 100644 Binary files a/public/images/events/august-variant-update.png and b/public/images/events/august-variant-update.png differ diff --git a/public/images/events/egg-update_de.png b/public/images/events/egg-update_de.png index 5de94877d5c..5b7c8e50881 100644 Binary files a/public/images/events/egg-update_de.png and b/public/images/events/egg-update_de.png differ diff --git a/public/images/events/egg-update_en.png b/public/images/events/egg-update_en.png index 7104d340ca0..5b407cf7c75 100644 Binary files a/public/images/events/egg-update_en.png and b/public/images/events/egg-update_en.png differ diff --git a/public/images/events/egg-update_es.png b/public/images/events/egg-update_es.png index ec5f5c46d17..4d1bfe7b2e8 100644 Binary files a/public/images/events/egg-update_es.png and b/public/images/events/egg-update_es.png differ diff --git a/public/images/events/egg-update_fr.png b/public/images/events/egg-update_fr.png index e0505fa96dd..e214ef46cbe 100644 Binary files a/public/images/events/egg-update_fr.png and b/public/images/events/egg-update_fr.png differ diff --git a/public/images/events/egg-update_it.png b/public/images/events/egg-update_it.png index fc347bce9cf..4665d7e9657 100644 Binary files a/public/images/events/egg-update_it.png and b/public/images/events/egg-update_it.png differ diff --git a/public/images/events/egg-update_ja.png b/public/images/events/egg-update_ja.png index 2259cbb4d9a..2a1403e752f 100644 Binary files a/public/images/events/egg-update_ja.png and b/public/images/events/egg-update_ja.png differ diff --git a/public/images/events/egg-update_ko.png b/public/images/events/egg-update_ko.png index 99dcc662402..5e22550cea8 100644 Binary files a/public/images/events/egg-update_ko.png and b/public/images/events/egg-update_ko.png differ diff --git a/public/images/events/egg-update_pt-BR.png b/public/images/events/egg-update_pt-BR.png index ee347d35654..68f3633f16a 100644 Binary files a/public/images/events/egg-update_pt-BR.png and b/public/images/events/egg-update_pt-BR.png differ diff --git a/public/images/events/egg-update_zh-CN.png b/public/images/events/egg-update_zh-CN.png index 02d780fab89..e646562f4cf 100644 Binary files a/public/images/events/egg-update_zh-CN.png and b/public/images/events/egg-update_zh-CN.png differ diff --git a/public/images/events/halloween2024-event-de.png b/public/images/events/halloween2024-event-de.png index a56053c73cc..8291991091e 100644 Binary files a/public/images/events/halloween2024-event-de.png and b/public/images/events/halloween2024-event-de.png differ diff --git a/public/images/events/halloween2024-event-en.png b/public/images/events/halloween2024-event-en.png index 3886fa796ae..dc2d241fb09 100644 Binary files a/public/images/events/halloween2024-event-en.png and b/public/images/events/halloween2024-event-en.png differ diff --git a/public/images/events/halloween2024-event-es-ES.png b/public/images/events/halloween2024-event-es-ES.png index dc9bac86cd0..5d3c4a1734f 100644 Binary files a/public/images/events/halloween2024-event-es-ES.png and b/public/images/events/halloween2024-event-es-ES.png differ diff --git a/public/images/events/halloween2024-event-fr.png b/public/images/events/halloween2024-event-fr.png index 21df18c7471..198e5d28de5 100644 Binary files a/public/images/events/halloween2024-event-fr.png and b/public/images/events/halloween2024-event-fr.png differ diff --git a/public/images/events/halloween2024-event-it.png b/public/images/events/halloween2024-event-it.png index ce2316b2ce5..461e9faf704 100644 Binary files a/public/images/events/halloween2024-event-it.png and b/public/images/events/halloween2024-event-it.png differ diff --git a/public/images/events/halloween2024-event-ja.png b/public/images/events/halloween2024-event-ja.png index 363f3b33b0d..4bd49b3d28a 100644 Binary files a/public/images/events/halloween2024-event-ja.png and b/public/images/events/halloween2024-event-ja.png differ diff --git a/public/images/events/halloween2024-event-ko.png b/public/images/events/halloween2024-event-ko.png index 3f52526a296..94b9859da97 100644 Binary files a/public/images/events/halloween2024-event-ko.png and b/public/images/events/halloween2024-event-ko.png differ diff --git a/public/images/events/halloween2024-event-pt-BR.png b/public/images/events/halloween2024-event-pt-BR.png index 764a9c1daa9..a89cfe5231f 100644 Binary files a/public/images/events/halloween2024-event-pt-BR.png and b/public/images/events/halloween2024-event-pt-BR.png differ diff --git a/public/images/events/halloween2024-event-zh-CN.png b/public/images/events/halloween2024-event-zh-CN.png index c2096a05d98..61c11b4ee95 100644 Binary files a/public/images/events/halloween2024-event-zh-CN.png and b/public/images/events/halloween2024-event-zh-CN.png differ diff --git a/public/images/events/pkmnday2025event-de.png b/public/images/events/pkmnday2025event-de.png index 4cc53546752..b3746a4623e 100644 Binary files a/public/images/events/pkmnday2025event-de.png and b/public/images/events/pkmnday2025event-de.png differ diff --git a/public/images/events/pkmnday2025event-en.png b/public/images/events/pkmnday2025event-en.png index e9caa9e19d6..54b6e7280ac 100644 Binary files a/public/images/events/pkmnday2025event-en.png and b/public/images/events/pkmnday2025event-en.png differ diff --git a/public/images/events/pkmnday2025event-es-ES.png b/public/images/events/pkmnday2025event-es-ES.png index e1ab096dffc..afdf051dc79 100644 Binary files a/public/images/events/pkmnday2025event-es-ES.png and b/public/images/events/pkmnday2025event-es-ES.png differ diff --git a/public/images/events/pkmnday2025event-fr.png b/public/images/events/pkmnday2025event-fr.png index 037d1e06e61..52ef02d474a 100644 Binary files a/public/images/events/pkmnday2025event-fr.png and b/public/images/events/pkmnday2025event-fr.png differ diff --git a/public/images/events/pkmnday2025event-it.png b/public/images/events/pkmnday2025event-it.png index f38a60330fa..6f3e8642e3d 100644 Binary files a/public/images/events/pkmnday2025event-it.png and b/public/images/events/pkmnday2025event-it.png differ diff --git a/public/images/events/pkmnday2025event-ja.png b/public/images/events/pkmnday2025event-ja.png index 94b02ad93a0..e7633edb5ed 100644 Binary files a/public/images/events/pkmnday2025event-ja.png and b/public/images/events/pkmnday2025event-ja.png differ diff --git a/public/images/events/pkmnday2025event-ko.png b/public/images/events/pkmnday2025event-ko.png index aed9ee3fb28..343687706ac 100644 Binary files a/public/images/events/pkmnday2025event-ko.png and b/public/images/events/pkmnday2025event-ko.png differ diff --git a/public/images/events/pkmnday2025event-pt-BR.png b/public/images/events/pkmnday2025event-pt-BR.png index 2190bbac535..67559a80068 100644 Binary files a/public/images/events/pkmnday2025event-pt-BR.png and b/public/images/events/pkmnday2025event-pt-BR.png differ diff --git a/public/images/events/pkmnday2025event-zh-CN.png b/public/images/events/pkmnday2025event-zh-CN.png index a3430482dd0..fc92405a149 100644 Binary files a/public/images/events/pkmnday2025event-zh-CN.png and b/public/images/events/pkmnday2025event-zh-CN.png differ diff --git a/public/images/events/pride-update.png b/public/images/events/pride-update.png index face6df1790..253101bd63a 100644 Binary files a/public/images/events/pride-update.png and b/public/images/events/pride-update.png differ diff --git a/public/images/events/pride2025-de.png b/public/images/events/pride2025-de.png index 8d205821b3c..06044f3c94e 100644 Binary files a/public/images/events/pride2025-de.png and b/public/images/events/pride2025-de.png differ diff --git a/public/images/events/pride2025-en.png b/public/images/events/pride2025-en.png index 5a81a32be5f..1dd3d3d97f1 100644 Binary files a/public/images/events/pride2025-en.png and b/public/images/events/pride2025-en.png differ diff --git a/public/images/events/pride2025-es-ES.png b/public/images/events/pride2025-es-ES.png index 52eba6ffe45..cd0f972266a 100644 Binary files a/public/images/events/pride2025-es-ES.png and b/public/images/events/pride2025-es-ES.png differ diff --git a/public/images/events/pride2025-es-MX.png b/public/images/events/pride2025-es-MX.png index cb2100cd601..4408bbcf9e1 100644 Binary files a/public/images/events/pride2025-es-MX.png and b/public/images/events/pride2025-es-MX.png differ diff --git a/public/images/events/pride2025-fr.png b/public/images/events/pride2025-fr.png index f583c83bbbc..78084fdbe89 100644 Binary files a/public/images/events/pride2025-fr.png and b/public/images/events/pride2025-fr.png differ diff --git a/public/images/events/pride2025-it.png b/public/images/events/pride2025-it.png index 293d1f92ad8..68d3910782e 100644 Binary files a/public/images/events/pride2025-it.png and b/public/images/events/pride2025-it.png differ diff --git a/public/images/events/pride2025-ja.png b/public/images/events/pride2025-ja.png index 562e43e7d8e..af4f837ab74 100644 Binary files a/public/images/events/pride2025-ja.png and b/public/images/events/pride2025-ja.png differ diff --git a/public/images/events/pride2025-ko.png b/public/images/events/pride2025-ko.png index 74be30ba4ef..fe8733dc2ae 100644 Binary files a/public/images/events/pride2025-ko.png and b/public/images/events/pride2025-ko.png differ diff --git a/public/images/events/pride2025-pt-BR.png b/public/images/events/pride2025-pt-BR.png index 99269bd1495..bc08dea5e6f 100644 Binary files a/public/images/events/pride2025-pt-BR.png and b/public/images/events/pride2025-pt-BR.png differ diff --git a/public/images/events/pride2025-zh-CN.png b/public/images/events/pride2025-zh-CN.png index 5be66a544cf..fbd9e9ff278 100644 Binary files a/public/images/events/pride2025-zh-CN.png and b/public/images/events/pride2025-zh-CN.png differ diff --git a/public/images/events/pride2025-zh-TW.png b/public/images/events/pride2025-zh-TW.png index aeffc354c7d..e64be2cd79c 100644 Binary files a/public/images/events/pride2025-zh-TW.png and b/public/images/events/pride2025-zh-TW.png differ diff --git a/public/images/events/september-update-de.png b/public/images/events/september-update-de.png index 1ecb46e408c..9947adaa222 100644 Binary files a/public/images/events/september-update-de.png and b/public/images/events/september-update-de.png differ diff --git a/public/images/events/september-update-en.png b/public/images/events/september-update-en.png index 57dd130b98d..1bcced18f68 100644 Binary files a/public/images/events/september-update-en.png and b/public/images/events/september-update-en.png differ diff --git a/public/images/events/september-update-es.png b/public/images/events/september-update-es.png index 8c294d21403..a43ae8d15fa 100644 Binary files a/public/images/events/september-update-es.png and b/public/images/events/september-update-es.png differ diff --git a/public/images/events/september-update-fr.png b/public/images/events/september-update-fr.png index 4be33c85e9a..7a6ae965226 100644 Binary files a/public/images/events/september-update-fr.png and b/public/images/events/september-update-fr.png differ diff --git a/public/images/events/september-update-it.png b/public/images/events/september-update-it.png index 62542f4eb9b..c97001c28d5 100644 Binary files a/public/images/events/september-update-it.png and b/public/images/events/september-update-it.png differ diff --git a/public/images/events/september-update-ja.png b/public/images/events/september-update-ja.png index 93e18c51223..11d1f34abdf 100644 Binary files a/public/images/events/september-update-ja.png and b/public/images/events/september-update-ja.png differ diff --git a/public/images/events/september-update-ko.png b/public/images/events/september-update-ko.png index 13585327fce..6e8adf31fcb 100644 Binary files a/public/images/events/september-update-ko.png and b/public/images/events/september-update-ko.png differ diff --git a/public/images/events/september-update-pt-BR.png b/public/images/events/september-update-pt-BR.png index 8dd8b8759e9..2960bb1c605 100644 Binary files a/public/images/events/september-update-pt-BR.png and b/public/images/events/september-update-pt-BR.png differ diff --git a/public/images/events/september-update-zh-CN.png b/public/images/events/september-update-zh-CN.png index ee56d644d24..31f660ceace 100644 Binary files a/public/images/events/september-update-zh-CN.png and b/public/images/events/september-update-zh-CN.png differ diff --git a/public/images/events/spr25event-de.png b/public/images/events/spr25event-de.png index 1ccd9557460..a91202d7334 100644 Binary files a/public/images/events/spr25event-de.png and b/public/images/events/spr25event-de.png differ diff --git a/public/images/events/spr25event-en.png b/public/images/events/spr25event-en.png index 0e73f9247e3..cb30dac4638 100644 Binary files a/public/images/events/spr25event-en.png and b/public/images/events/spr25event-en.png differ diff --git a/public/images/events/spr25event-es-ES.png b/public/images/events/spr25event-es-ES.png index 137f1c6e743..9d16d9ced6d 100644 Binary files a/public/images/events/spr25event-es-ES.png and b/public/images/events/spr25event-es-ES.png differ diff --git a/public/images/events/spr25event-es-MX.png b/public/images/events/spr25event-es-MX.png index 137f1c6e743..9d16d9ced6d 100644 Binary files a/public/images/events/spr25event-es-MX.png and b/public/images/events/spr25event-es-MX.png differ diff --git a/public/images/events/spr25event-fr.png b/public/images/events/spr25event-fr.png index 7730e16d4a3..f7b2618a3e3 100644 Binary files a/public/images/events/spr25event-fr.png and b/public/images/events/spr25event-fr.png differ diff --git a/public/images/events/spr25event-it.png b/public/images/events/spr25event-it.png index 2664b4367cc..384078c3e82 100644 Binary files a/public/images/events/spr25event-it.png and b/public/images/events/spr25event-it.png differ diff --git a/public/images/events/spr25event-ja.png b/public/images/events/spr25event-ja.png index 90b02af8050..523dc529539 100644 Binary files a/public/images/events/spr25event-ja.png and b/public/images/events/spr25event-ja.png differ diff --git a/public/images/events/spr25event-ko.png b/public/images/events/spr25event-ko.png index a8fe279617a..d8a470ffd7e 100644 Binary files a/public/images/events/spr25event-ko.png and b/public/images/events/spr25event-ko.png differ diff --git a/public/images/events/spr25event-pt-BR.png b/public/images/events/spr25event-pt-BR.png index ae195fecc97..42d4a404ca7 100644 Binary files a/public/images/events/spr25event-pt-BR.png and b/public/images/events/spr25event-pt-BR.png differ diff --git a/public/images/events/spr25event-zh-CN.png b/public/images/events/spr25event-zh-CN.png index 1d8ad35c166..88f9023170b 100644 Binary files a/public/images/events/spr25event-zh-CN.png and b/public/images/events/spr25event-zh-CN.png differ diff --git a/public/images/events/valentines2025event-de.png b/public/images/events/valentines2025event-de.png index 8dd41924a77..1c8696b1e37 100644 Binary files a/public/images/events/valentines2025event-de.png and b/public/images/events/valentines2025event-de.png differ diff --git a/public/images/events/valentines2025event-en.png b/public/images/events/valentines2025event-en.png index dc36dad3394..ab1d2c7fa19 100644 Binary files a/public/images/events/valentines2025event-en.png and b/public/images/events/valentines2025event-en.png differ diff --git a/public/images/events/valentines2025event-es-ES.png b/public/images/events/valentines2025event-es-ES.png index 0915299b7bd..905d7de92ff 100644 Binary files a/public/images/events/valentines2025event-es-ES.png and b/public/images/events/valentines2025event-es-ES.png differ diff --git a/public/images/events/valentines2025event-fr.png b/public/images/events/valentines2025event-fr.png index dbaf23101ed..f6300b01d28 100644 Binary files a/public/images/events/valentines2025event-fr.png and b/public/images/events/valentines2025event-fr.png differ diff --git a/public/images/events/valentines2025event-it.png b/public/images/events/valentines2025event-it.png index b10eb8083be..06927ff8d88 100644 Binary files a/public/images/events/valentines2025event-it.png and b/public/images/events/valentines2025event-it.png differ diff --git a/public/images/events/valentines2025event-ja.png b/public/images/events/valentines2025event-ja.png index 7e9fe5ad3d4..6c7cd449c76 100644 Binary files a/public/images/events/valentines2025event-ja.png and b/public/images/events/valentines2025event-ja.png differ diff --git a/public/images/events/valentines2025event-ko.png b/public/images/events/valentines2025event-ko.png index 558a402fc77..199a0538dd3 100644 Binary files a/public/images/events/valentines2025event-ko.png and b/public/images/events/valentines2025event-ko.png differ diff --git a/public/images/events/valentines2025event-pt-BR.png b/public/images/events/valentines2025event-pt-BR.png index 45fa40f30fc..bae78d11849 100644 Binary files a/public/images/events/valentines2025event-pt-BR.png and b/public/images/events/valentines2025event-pt-BR.png differ diff --git a/public/images/events/valentines2025event-zh-CN.png b/public/images/events/valentines2025event-zh-CN.png index 13256da720c..c8302d06cd6 100644 Binary files a/public/images/events/valentines2025event-zh-CN.png and b/public/images/events/valentines2025event-zh-CN.png differ diff --git a/public/images/events/winter_holidays2024-event-de.png b/public/images/events/winter_holidays2024-event-de.png index 1c2e10086f2..0d900058705 100644 Binary files a/public/images/events/winter_holidays2024-event-de.png and b/public/images/events/winter_holidays2024-event-de.png differ diff --git a/public/images/events/winter_holidays2024-event-en.png b/public/images/events/winter_holidays2024-event-en.png index 3a361e99bee..fa4e693f54c 100644 Binary files a/public/images/events/winter_holidays2024-event-en.png and b/public/images/events/winter_holidays2024-event-en.png differ diff --git a/public/images/events/winter_holidays2024-event-es-ES.png b/public/images/events/winter_holidays2024-event-es-ES.png index f7e64268ad5..6923e1e2c5f 100644 Binary files a/public/images/events/winter_holidays2024-event-es-ES.png and b/public/images/events/winter_holidays2024-event-es-ES.png differ diff --git a/public/images/events/winter_holidays2024-event-fr.png b/public/images/events/winter_holidays2024-event-fr.png index 278f5f2afd4..cf68c7221a8 100644 Binary files a/public/images/events/winter_holidays2024-event-fr.png and b/public/images/events/winter_holidays2024-event-fr.png differ diff --git a/public/images/events/winter_holidays2024-event-it.png b/public/images/events/winter_holidays2024-event-it.png index f3062f40d51..5c58c806dda 100644 Binary files a/public/images/events/winter_holidays2024-event-it.png and b/public/images/events/winter_holidays2024-event-it.png differ diff --git a/public/images/events/winter_holidays2024-event-ja.png b/public/images/events/winter_holidays2024-event-ja.png index 0a217c81d03..29cc129f7c2 100644 Binary files a/public/images/events/winter_holidays2024-event-ja.png and b/public/images/events/winter_holidays2024-event-ja.png differ diff --git a/public/images/events/winter_holidays2024-event-ko.png b/public/images/events/winter_holidays2024-event-ko.png index 83c9a8525f0..93033288093 100644 Binary files a/public/images/events/winter_holidays2024-event-ko.png and b/public/images/events/winter_holidays2024-event-ko.png differ diff --git a/public/images/events/winter_holidays2024-event-pt-BR.png b/public/images/events/winter_holidays2024-event-pt-BR.png index 1f003be5986..7a160f9efbd 100644 Binary files a/public/images/events/winter_holidays2024-event-pt-BR.png and b/public/images/events/winter_holidays2024-event-pt-BR.png differ diff --git a/public/images/events/winter_holidays2024-event-zh-CN.png b/public/images/events/winter_holidays2024-event-zh-CN.png index 03a9f57c6f2..2308ff99a38 100644 Binary files a/public/images/events/winter_holidays2024-event-zh-CN.png and b/public/images/events/winter_holidays2024-event-zh-CN.png differ diff --git a/public/images/events/yearofthesnakeevent-de.png b/public/images/events/yearofthesnakeevent-de.png index f5e684bbcd5..08cf799303d 100644 Binary files a/public/images/events/yearofthesnakeevent-de.png and b/public/images/events/yearofthesnakeevent-de.png differ diff --git a/public/images/events/yearofthesnakeevent-en.png b/public/images/events/yearofthesnakeevent-en.png index ddd34023b94..2b846528790 100644 Binary files a/public/images/events/yearofthesnakeevent-en.png and b/public/images/events/yearofthesnakeevent-en.png differ diff --git a/public/images/events/yearofthesnakeevent-es-ES.png b/public/images/events/yearofthesnakeevent-es-ES.png index 76474c475c5..b3d3330f05c 100644 Binary files a/public/images/events/yearofthesnakeevent-es-ES.png and b/public/images/events/yearofthesnakeevent-es-ES.png differ diff --git a/public/images/events/yearofthesnakeevent-fr.png b/public/images/events/yearofthesnakeevent-fr.png index 88ad3e770ca..edabe05527c 100644 Binary files a/public/images/events/yearofthesnakeevent-fr.png and b/public/images/events/yearofthesnakeevent-fr.png differ diff --git a/public/images/events/yearofthesnakeevent-it.png b/public/images/events/yearofthesnakeevent-it.png index a02e7048d2a..32c5d02ebb6 100644 Binary files a/public/images/events/yearofthesnakeevent-it.png and b/public/images/events/yearofthesnakeevent-it.png differ diff --git a/public/images/events/yearofthesnakeevent-ja.png b/public/images/events/yearofthesnakeevent-ja.png index ba13b5d281f..250efd2bd43 100644 Binary files a/public/images/events/yearofthesnakeevent-ja.png and b/public/images/events/yearofthesnakeevent-ja.png differ diff --git a/public/images/events/yearofthesnakeevent-ko.png b/public/images/events/yearofthesnakeevent-ko.png index dca6bcbbd15..072f310273b 100644 Binary files a/public/images/events/yearofthesnakeevent-ko.png and b/public/images/events/yearofthesnakeevent-ko.png differ diff --git a/public/images/events/yearofthesnakeevent-pt-BR.png b/public/images/events/yearofthesnakeevent-pt-BR.png index a535aec2aa5..9b192361373 100644 Binary files a/public/images/events/yearofthesnakeevent-pt-BR.png and b/public/images/events/yearofthesnakeevent-pt-BR.png differ diff --git a/public/images/events/yearofthesnakeevent-zh-CN.png b/public/images/events/yearofthesnakeevent-zh-CN.png index 3ab4fc565a7..49dc32e8141 100644 Binary files a/public/images/events/yearofthesnakeevent-zh-CN.png and b/public/images/events/yearofthesnakeevent-zh-CN.png differ diff --git a/public/images/inputs/dualshock.png b/public/images/inputs/dualshock.png index 264f03a298e..acdfd37aa79 100644 Binary files a/public/images/inputs/dualshock.png and b/public/images/inputs/dualshock.png differ diff --git a/public/images/inputs/keyboard.png b/public/images/inputs/keyboard.png index 0c33e579006..a1532bf667e 100644 Binary files a/public/images/inputs/keyboard.png and b/public/images/inputs/keyboard.png differ diff --git a/public/images/inputs/xbox.png b/public/images/inputs/xbox.png index 037fd8515ae..6f47d27fe5b 100644 Binary files a/public/images/inputs/xbox.png and b/public/images/inputs/xbox.png differ diff --git a/public/images/items.png b/public/images/items.png index 896bb46c7c2..f0f11e9443e 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/ability_capsule.png b/public/images/items/ability_capsule.png index ee8aec6b346..92171d5296a 100644 Binary files a/public/images/items/ability_capsule.png and b/public/images/items/ability_capsule.png differ diff --git a/public/images/items/ability_charm.png b/public/images/items/ability_charm.png index 2e9e0368667..c8a168e315d 100644 Binary files a/public/images/items/ability_charm.png and b/public/images/items/ability_charm.png differ diff --git a/public/images/items/abomasite.png b/public/images/items/abomasite.png index 0758786bb0f..eae8422bdaf 100644 Binary files a/public/images/items/abomasite.png and b/public/images/items/abomasite.png differ diff --git a/public/images/items/absolite.png b/public/images/items/absolite.png index f7fe8b7ac12..8043b2969bb 100644 Binary files a/public/images/items/absolite.png and b/public/images/items/absolite.png differ diff --git a/public/images/items/adamant_crystal.png b/public/images/items/adamant_crystal.png index eb35af1540e..f9aea1fda30 100644 Binary files a/public/images/items/adamant_crystal.png and b/public/images/items/adamant_crystal.png differ diff --git a/public/images/items/aerodactylite.png b/public/images/items/aerodactylite.png index 4feb04f3702..8065e19de5e 100644 Binary files a/public/images/items/aerodactylite.png and b/public/images/items/aerodactylite.png differ diff --git a/public/images/items/aggronite.png b/public/images/items/aggronite.png index 8feb64633ec..a7c1f990ffa 100644 Binary files a/public/images/items/aggronite.png and b/public/images/items/aggronite.png differ diff --git a/public/images/items/alakazite.png b/public/images/items/alakazite.png index ed6acab02ca..470987bc13b 100644 Binary files a/public/images/items/alakazite.png and b/public/images/items/alakazite.png differ diff --git a/public/images/items/altarianite.png b/public/images/items/altarianite.png index 0bb6be23819..03ef291faa5 100644 Binary files a/public/images/items/altarianite.png and b/public/images/items/altarianite.png differ diff --git a/public/images/items/ampharosite.png b/public/images/items/ampharosite.png index 3084c05c1a9..154f7ea5609 100644 Binary files a/public/images/items/ampharosite.png and b/public/images/items/ampharosite.png differ diff --git a/public/images/items/amulet_coin.png b/public/images/items/amulet_coin.png index 3cda2b2a53b..727562836c4 100644 Binary files a/public/images/items/amulet_coin.png and b/public/images/items/amulet_coin.png differ diff --git a/public/images/items/apicot_berry.png b/public/images/items/apicot_berry.png index 4719671eaf3..7681645c114 100644 Binary files a/public/images/items/apicot_berry.png and b/public/images/items/apicot_berry.png differ diff --git a/public/images/items/audinite.png b/public/images/items/audinite.png index f7c21bf8e3b..b73c11bfbf2 100644 Binary files a/public/images/items/audinite.png and b/public/images/items/audinite.png differ diff --git a/public/images/items/auspicious_armor.png b/public/images/items/auspicious_armor.png index 27c40ae0bd0..d484b01f8b8 100644 Binary files a/public/images/items/auspicious_armor.png and b/public/images/items/auspicious_armor.png differ diff --git a/public/images/items/banettite.png b/public/images/items/banettite.png index b6bcadd72fc..9361e0e3da5 100644 Binary files a/public/images/items/banettite.png and b/public/images/items/banettite.png differ diff --git a/public/images/items/baton.png b/public/images/items/baton.png index ece81f82b2f..f814d93728e 100644 Binary files a/public/images/items/baton.png and b/public/images/items/baton.png differ diff --git a/public/images/items/beedrillite.png b/public/images/items/beedrillite.png index 99e516446d7..f1eb43f5488 100644 Binary files a/public/images/items/beedrillite.png and b/public/images/items/beedrillite.png differ diff --git a/public/images/items/berry_juice_bad.png b/public/images/items/berry_juice_bad.png index 344822c09ea..3b0805fff81 100644 Binary files a/public/images/items/berry_juice_bad.png and b/public/images/items/berry_juice_bad.png differ diff --git a/public/images/items/berry_juice_good.png b/public/images/items/berry_juice_good.png index 2f6272eca7c..b4d9907576f 100644 Binary files a/public/images/items/berry_juice_good.png and b/public/images/items/berry_juice_good.png differ diff --git a/public/images/items/berry_pot.png b/public/images/items/berry_pot.png index 3cb9b90dc53..d80ac4a4cc0 100644 Binary files a/public/images/items/berry_pot.png and b/public/images/items/berry_pot.png differ diff --git a/public/images/items/berry_pouch.png b/public/images/items/berry_pouch.png index d14d71358a9..6fd84402bca 100644 Binary files a/public/images/items/berry_pouch.png and b/public/images/items/berry_pouch.png differ diff --git a/public/images/items/big_mushroom.png b/public/images/items/big_mushroom.png index eb203a7374c..37b53cdb6bb 100644 Binary files a/public/images/items/big_mushroom.png and b/public/images/items/big_mushroom.png differ diff --git a/public/images/items/big_nugget.png b/public/images/items/big_nugget.png index e8839daa0b6..21f83672a2e 100644 Binary files a/public/images/items/big_nugget.png and b/public/images/items/big_nugget.png differ diff --git a/public/images/items/big_root.png b/public/images/items/big_root.png index 24b863ee238..8f32b006495 100644 Binary files a/public/images/items/big_root.png and b/public/images/items/big_root.png differ diff --git a/public/images/items/binding_band.png b/public/images/items/binding_band.png index b33256b7b8c..ee91f14a36c 100644 Binary files a/public/images/items/binding_band.png and b/public/images/items/binding_band.png differ diff --git a/public/images/items/black_augurite.png b/public/images/items/black_augurite.png index b34127e2942..d448c7b888c 100644 Binary files a/public/images/items/black_augurite.png and b/public/images/items/black_augurite.png differ diff --git a/public/images/items/black_belt.png b/public/images/items/black_belt.png index 9dde3ff83cd..4d303e2f645 100644 Binary files a/public/images/items/black_belt.png and b/public/images/items/black_belt.png differ diff --git a/public/images/items/black_glasses.png b/public/images/items/black_glasses.png index 4b18d828964..fd512c9763d 100644 Binary files a/public/images/items/black_glasses.png and b/public/images/items/black_glasses.png differ diff --git a/public/images/items/black_sludge.png b/public/images/items/black_sludge.png index fe308586dd3..04a1cabd9f5 100644 Binary files a/public/images/items/black_sludge.png and b/public/images/items/black_sludge.png differ diff --git a/public/images/items/blank_plate.png b/public/images/items/blank_plate.png index c08d25aa3c3..aa881d228f2 100644 Binary files a/public/images/items/blank_plate.png and b/public/images/items/blank_plate.png differ diff --git a/public/images/items/blastoisinite.png b/public/images/items/blastoisinite.png index ea2ddef0640..9d4f29cce8f 100644 Binary files a/public/images/items/blastoisinite.png and b/public/images/items/blastoisinite.png differ diff --git a/public/images/items/blazikenite.png b/public/images/items/blazikenite.png index 9b6e9e59212..4269cb18710 100644 Binary files a/public/images/items/blazikenite.png and b/public/images/items/blazikenite.png differ diff --git a/public/images/items/blue_orb.png b/public/images/items/blue_orb.png index 34c19c8aea8..f523a868c30 100644 Binary files a/public/images/items/blue_orb.png and b/public/images/items/blue_orb.png differ diff --git a/public/images/items/blunder_policy.png b/public/images/items/blunder_policy.png index 8d5b11cb3f6..8104d00c40c 100644 Binary files a/public/images/items/blunder_policy.png and b/public/images/items/blunder_policy.png differ diff --git a/public/images/items/bronze_ribbon.png b/public/images/items/bronze_ribbon.png index cab218e09f5..13eeb7254ca 100644 Binary files a/public/images/items/bronze_ribbon.png and b/public/images/items/bronze_ribbon.png differ diff --git a/public/images/items/bug_memory.png b/public/images/items/bug_memory.png index 004b499ba7a..a71637ceb5a 100644 Binary files a/public/images/items/bug_memory.png and b/public/images/items/bug_memory.png differ diff --git a/public/images/items/bug_tera_shard.png b/public/images/items/bug_tera_shard.png index 5711fe193bd..bc722e4698f 100644 Binary files a/public/images/items/bug_tera_shard.png and b/public/images/items/bug_tera_shard.png differ diff --git a/public/images/items/burn_drive.png b/public/images/items/burn_drive.png index 02ee18c02bd..b45ffc76d7e 100644 Binary files a/public/images/items/burn_drive.png and b/public/images/items/burn_drive.png differ diff --git a/public/images/items/calcium.png b/public/images/items/calcium.png index 4c42228d724..0ec70b68fec 100644 Binary files a/public/images/items/calcium.png and b/public/images/items/calcium.png differ diff --git a/public/images/items/cameruptite.png b/public/images/items/cameruptite.png index 9eda37e14e1..1653ff8f33a 100644 Binary files a/public/images/items/cameruptite.png and b/public/images/items/cameruptite.png differ diff --git a/public/images/items/candy.png b/public/images/items/candy.png index 81cf5e19ee2..fcbdaa1b13d 100644 Binary files a/public/images/items/candy.png and b/public/images/items/candy.png differ diff --git a/public/images/items/candy_jar.png b/public/images/items/candy_jar.png index 0338b64a86d..ddd7922bdce 100644 Binary files a/public/images/items/candy_jar.png and b/public/images/items/candy_jar.png differ diff --git a/public/images/items/candy_overlay.png b/public/images/items/candy_overlay.png index a1cb428cdee..567df8b3606 100644 Binary files a/public/images/items/candy_overlay.png and b/public/images/items/candy_overlay.png differ diff --git a/public/images/items/carbos.png b/public/images/items/carbos.png index 7dd09f2ec12..c824ddd5b82 100644 Binary files a/public/images/items/carbos.png and b/public/images/items/carbos.png differ diff --git a/public/images/items/catching_charm.png b/public/images/items/catching_charm.png index 57545622131..4699b8c3d85 100644 Binary files a/public/images/items/catching_charm.png and b/public/images/items/catching_charm.png differ diff --git a/public/images/items/charcoal.png b/public/images/items/charcoal.png index e10f8f20fd6..ce456f7b1fc 100644 Binary files a/public/images/items/charcoal.png and b/public/images/items/charcoal.png differ diff --git a/public/images/items/charizardite_x.png b/public/images/items/charizardite_x.png index d238a77a9e2..37838c5919c 100644 Binary files a/public/images/items/charizardite_x.png and b/public/images/items/charizardite_x.png differ diff --git a/public/images/items/charizardite_y.png b/public/images/items/charizardite_y.png index 5a3ea59d091..ba4672dd3f3 100644 Binary files a/public/images/items/charizardite_y.png and b/public/images/items/charizardite_y.png differ diff --git a/public/images/items/chill_drive.png b/public/images/items/chill_drive.png index fbf7462479a..6126b295328 100644 Binary files a/public/images/items/chill_drive.png and b/public/images/items/chill_drive.png differ diff --git a/public/images/items/chipped_pot.png b/public/images/items/chipped_pot.png index 969c3dc3c16..c78d7581ea8 100644 Binary files a/public/images/items/chipped_pot.png and b/public/images/items/chipped_pot.png differ diff --git a/public/images/items/choice_scarf.png b/public/images/items/choice_scarf.png index 2ddf7d3be16..e4be436ca73 100644 Binary files a/public/images/items/choice_scarf.png and b/public/images/items/choice_scarf.png differ diff --git a/public/images/items/choice_specs.png b/public/images/items/choice_specs.png index 09b58f64381..24163f48bf9 100644 Binary files a/public/images/items/choice_specs.png and b/public/images/items/choice_specs.png differ diff --git a/public/images/items/clefairy_doll.png b/public/images/items/clefairy_doll.png index 3b54c83df47..cd618cd80ab 100644 Binary files a/public/images/items/clefairy_doll.png and b/public/images/items/clefairy_doll.png differ diff --git a/public/images/items/coin_case.png b/public/images/items/coin_case.png index 3c17c2b13f8..733a0c95e76 100644 Binary files a/public/images/items/coin_case.png and b/public/images/items/coin_case.png differ diff --git a/public/images/items/cornerstone_mask.png b/public/images/items/cornerstone_mask.png index 205bdef9805..e92be7ea813 100644 Binary files a/public/images/items/cornerstone_mask.png and b/public/images/items/cornerstone_mask.png differ diff --git a/public/images/items/coupon.png b/public/images/items/coupon.png index b08fa65fecc..81cfa676705 100644 Binary files a/public/images/items/coupon.png and b/public/images/items/coupon.png differ diff --git a/public/images/items/cracked_pot.png b/public/images/items/cracked_pot.png index 4afc2caf2c8..36a73cd0884 100644 Binary files a/public/images/items/cracked_pot.png and b/public/images/items/cracked_pot.png differ diff --git a/public/images/items/dark_memory.png b/public/images/items/dark_memory.png index e1e503bd036..0d0ccb42664 100644 Binary files a/public/images/items/dark_memory.png and b/public/images/items/dark_memory.png differ diff --git a/public/images/items/dark_stone.png b/public/images/items/dark_stone.png index c28a93ecabc..f97da5f3394 100644 Binary files a/public/images/items/dark_stone.png and b/public/images/items/dark_stone.png differ diff --git a/public/images/items/dark_tera_shard.png b/public/images/items/dark_tera_shard.png index ca24664b74e..2472fc812f9 100644 Binary files a/public/images/items/dark_tera_shard.png and b/public/images/items/dark_tera_shard.png differ diff --git a/public/images/items/dawn_stone.png b/public/images/items/dawn_stone.png index b29d2016a56..91b50dca7b2 100644 Binary files a/public/images/items/dawn_stone.png and b/public/images/items/dawn_stone.png differ diff --git a/public/images/items/deep_sea_scale.png b/public/images/items/deep_sea_scale.png index cf40e652319..6027c618afc 100644 Binary files a/public/images/items/deep_sea_scale.png and b/public/images/items/deep_sea_scale.png differ diff --git a/public/images/items/deep_sea_tooth.png b/public/images/items/deep_sea_tooth.png index 2cd1980aeb4..0a7a74f0c9a 100644 Binary files a/public/images/items/deep_sea_tooth.png and b/public/images/items/deep_sea_tooth.png differ diff --git a/public/images/items/diancite.png b/public/images/items/diancite.png index 293d327524e..fbb0267fb59 100644 Binary files a/public/images/items/diancite.png and b/public/images/items/diancite.png differ diff --git a/public/images/items/dire_hit.png b/public/images/items/dire_hit.png index 0c060710ff2..49011c7f86d 100644 Binary files a/public/images/items/dire_hit.png and b/public/images/items/dire_hit.png differ diff --git a/public/images/items/dna_splicers.png b/public/images/items/dna_splicers.png index 51c1524076e..918c156ba53 100644 Binary files a/public/images/items/dna_splicers.png and b/public/images/items/dna_splicers.png differ diff --git a/public/images/items/douse_drive.png b/public/images/items/douse_drive.png index fb8e7623184..6ecf6125fcf 100644 Binary files a/public/images/items/douse_drive.png and b/public/images/items/douse_drive.png differ diff --git a/public/images/items/draco_plate.png b/public/images/items/draco_plate.png index b4702aadba3..0dfae0ef0e1 100644 Binary files a/public/images/items/draco_plate.png and b/public/images/items/draco_plate.png differ diff --git a/public/images/items/dragon_fang.png b/public/images/items/dragon_fang.png index 4a9904e0ef3..b5c028d1e92 100644 Binary files a/public/images/items/dragon_fang.png and b/public/images/items/dragon_fang.png differ diff --git a/public/images/items/dragon_memory.png b/public/images/items/dragon_memory.png index 01a14cadf3e..9a383fc5f0a 100644 Binary files a/public/images/items/dragon_memory.png and b/public/images/items/dragon_memory.png differ diff --git a/public/images/items/dragon_scale.png b/public/images/items/dragon_scale.png index 9cec39b22f6..6b82ce88b01 100644 Binary files a/public/images/items/dragon_scale.png and b/public/images/items/dragon_scale.png differ diff --git a/public/images/items/dragon_tera_shard.png b/public/images/items/dragon_tera_shard.png index 51f20d9f5cb..c140671fbfc 100644 Binary files a/public/images/items/dragon_tera_shard.png and b/public/images/items/dragon_tera_shard.png differ diff --git a/public/images/items/dread_plate.png b/public/images/items/dread_plate.png index 6537320bc0a..ce40b216eea 100644 Binary files a/public/images/items/dread_plate.png and b/public/images/items/dread_plate.png differ diff --git a/public/images/items/dubious_disc.png b/public/images/items/dubious_disc.png index 122958f9550..eb907164f05 100644 Binary files a/public/images/items/dubious_disc.png and b/public/images/items/dubious_disc.png differ diff --git a/public/images/items/dusk_stone.png b/public/images/items/dusk_stone.png index e2cf73d04f3..fd4879d48fe 100644 Binary files a/public/images/items/dusk_stone.png and b/public/images/items/dusk_stone.png differ diff --git a/public/images/items/dynamax_band.png b/public/images/items/dynamax_band.png index 57b9a0caef5..df9f4460884 100644 Binary files a/public/images/items/dynamax_band.png and b/public/images/items/dynamax_band.png differ diff --git a/public/images/items/earth_plate.png b/public/images/items/earth_plate.png index 79fbbad5a84..8d298d92722 100644 Binary files a/public/images/items/earth_plate.png and b/public/images/items/earth_plate.png differ diff --git a/public/images/items/electirizer.png b/public/images/items/electirizer.png index a5589a27e42..2ef85308755 100644 Binary files a/public/images/items/electirizer.png and b/public/images/items/electirizer.png differ diff --git a/public/images/items/electric_memory.png b/public/images/items/electric_memory.png index d0595356482..2801bb7d03c 100644 Binary files a/public/images/items/electric_memory.png and b/public/images/items/electric_memory.png differ diff --git a/public/images/items/electric_tera_shard.png b/public/images/items/electric_tera_shard.png index 2195be32929..a836a5587f8 100644 Binary files a/public/images/items/electric_tera_shard.png and b/public/images/items/electric_tera_shard.png differ diff --git a/public/images/items/elixir.png b/public/images/items/elixir.png index b4bf7834e17..2d365d259af 100644 Binary files a/public/images/items/elixir.png and b/public/images/items/elixir.png differ diff --git a/public/images/items/enigma_berry.png b/public/images/items/enigma_berry.png index 1a1a20854ed..7a13e643d68 100644 Binary files a/public/images/items/enigma_berry.png and b/public/images/items/enigma_berry.png differ diff --git a/public/images/items/ether.png b/public/images/items/ether.png index 44a6e79de8e..76003bb7696 100644 Binary files a/public/images/items/ether.png and b/public/images/items/ether.png differ diff --git a/public/images/items/everstone.png b/public/images/items/everstone.png index 194f7b63baf..27c205f9132 100644 Binary files a/public/images/items/everstone.png and b/public/images/items/everstone.png differ diff --git a/public/images/items/eviolite.png b/public/images/items/eviolite.png index 8591791a5a1..30da75fd71d 100644 Binary files a/public/images/items/eviolite.png and b/public/images/items/eviolite.png differ diff --git a/public/images/items/exp_balance.png b/public/images/items/exp_balance.png index 6a03556a3a2..a00a5d599a4 100644 Binary files a/public/images/items/exp_balance.png and b/public/images/items/exp_balance.png differ diff --git a/public/images/items/exp_charm.png b/public/images/items/exp_charm.png index 2635e4d8020..1c3fe829993 100644 Binary files a/public/images/items/exp_charm.png and b/public/images/items/exp_charm.png differ diff --git a/public/images/items/exp_share.png b/public/images/items/exp_share.png index 6b866c63427..611056743e6 100644 Binary files a/public/images/items/exp_share.png and b/public/images/items/exp_share.png differ diff --git a/public/images/items/expert_belt.png b/public/images/items/expert_belt.png index 86cfd7170de..e4e903d7507 100644 Binary files a/public/images/items/expert_belt.png and b/public/images/items/expert_belt.png differ diff --git a/public/images/items/fairy_feather.png b/public/images/items/fairy_feather.png index 44923a1db94..7e087db48d5 100644 Binary files a/public/images/items/fairy_feather.png and b/public/images/items/fairy_feather.png differ diff --git a/public/images/items/fairy_memory.png b/public/images/items/fairy_memory.png index b5d0b32ff95..20d088762e6 100644 Binary files a/public/images/items/fairy_memory.png and b/public/images/items/fairy_memory.png differ diff --git a/public/images/items/fairy_tera_shard.png b/public/images/items/fairy_tera_shard.png index 36fb5e88f1c..1984581c74d 100644 Binary files a/public/images/items/fairy_tera_shard.png and b/public/images/items/fairy_tera_shard.png differ diff --git a/public/images/items/fighting_memory.png b/public/images/items/fighting_memory.png index 13789836880..58dd3ecf8a1 100644 Binary files a/public/images/items/fighting_memory.png and b/public/images/items/fighting_memory.png differ diff --git a/public/images/items/fighting_tera_shard.png b/public/images/items/fighting_tera_shard.png index 8423a41cbe8..c76f50b48e4 100644 Binary files a/public/images/items/fighting_tera_shard.png and b/public/images/items/fighting_tera_shard.png differ diff --git a/public/images/items/fire_memory.png b/public/images/items/fire_memory.png index 4f341417b6e..c066c1be42b 100644 Binary files a/public/images/items/fire_memory.png and b/public/images/items/fire_memory.png differ diff --git a/public/images/items/fire_stone.png b/public/images/items/fire_stone.png index 3db1942dfed..2f9cb737064 100644 Binary files a/public/images/items/fire_stone.png and b/public/images/items/fire_stone.png differ diff --git a/public/images/items/fire_tera_shard.png b/public/images/items/fire_tera_shard.png index 5783a5e9720..4a620eec220 100644 Binary files a/public/images/items/fire_tera_shard.png and b/public/images/items/fire_tera_shard.png differ diff --git a/public/images/items/fist_plate.png b/public/images/items/fist_plate.png index d992e4ab1c2..c3304c41e07 100644 Binary files a/public/images/items/fist_plate.png and b/public/images/items/fist_plate.png differ diff --git a/public/images/items/flame_orb.png b/public/images/items/flame_orb.png index 5132bbb6153..6c9d05fc8a0 100644 Binary files a/public/images/items/flame_orb.png and b/public/images/items/flame_orb.png differ diff --git a/public/images/items/flame_plate.png b/public/images/items/flame_plate.png index 7633773eee1..c7b7eb6bef1 100644 Binary files a/public/images/items/flame_plate.png and b/public/images/items/flame_plate.png differ diff --git a/public/images/items/flying_memory.png b/public/images/items/flying_memory.png index 8d3efbf1401..8b73abd8264 100644 Binary files a/public/images/items/flying_memory.png and b/public/images/items/flying_memory.png differ diff --git a/public/images/items/flying_tera_shard.png b/public/images/items/flying_tera_shard.png index 97d3013f70b..42e2b16c4d2 100644 Binary files a/public/images/items/flying_tera_shard.png and b/public/images/items/flying_tera_shard.png differ diff --git a/public/images/items/focus_band.png b/public/images/items/focus_band.png index 3a04ae17023..c49d74a5ae9 100644 Binary files a/public/images/items/focus_band.png and b/public/images/items/focus_band.png differ diff --git a/public/images/items/focus_sash.png b/public/images/items/focus_sash.png index 7700ceecf6b..17dc0fd8fe6 100644 Binary files a/public/images/items/focus_sash.png and b/public/images/items/focus_sash.png differ diff --git a/public/images/items/full_heal.png b/public/images/items/full_heal.png index 4e59dcf44fa..e378291efe0 100644 Binary files a/public/images/items/full_heal.png and b/public/images/items/full_heal.png differ diff --git a/public/images/items/full_restore.png b/public/images/items/full_restore.png index ba64f2edad8..d6e8c7f33e8 100644 Binary files a/public/images/items/full_restore.png and b/public/images/items/full_restore.png differ diff --git a/public/images/items/galarica_cuff.png b/public/images/items/galarica_cuff.png index 56523da5230..4706279c43d 100644 Binary files a/public/images/items/galarica_cuff.png and b/public/images/items/galarica_cuff.png differ diff --git a/public/images/items/galarica_wreath.png b/public/images/items/galarica_wreath.png index 20356bafd8a..6b1838c78dc 100644 Binary files a/public/images/items/galarica_wreath.png and b/public/images/items/galarica_wreath.png differ diff --git a/public/images/items/galladite.png b/public/images/items/galladite.png index 15c93cd9c7e..3fccc2d9b61 100644 Binary files a/public/images/items/galladite.png and b/public/images/items/galladite.png differ diff --git a/public/images/items/ganlon_berry.png b/public/images/items/ganlon_berry.png index f9b88fc563a..72dfb41c4a5 100644 Binary files a/public/images/items/ganlon_berry.png and b/public/images/items/ganlon_berry.png differ diff --git a/public/images/items/garchompite.png b/public/images/items/garchompite.png index 4276146a858..b1938a6979d 100644 Binary files a/public/images/items/garchompite.png and b/public/images/items/garchompite.png differ diff --git a/public/images/items/gardevoirite.png b/public/images/items/gardevoirite.png index 66a90b93bce..9180b369df4 100644 Binary files a/public/images/items/gardevoirite.png and b/public/images/items/gardevoirite.png differ diff --git a/public/images/items/gb.png b/public/images/items/gb.png index 4b437277849..bcc88593fad 100644 Binary files a/public/images/items/gb.png and b/public/images/items/gb.png differ diff --git a/public/images/items/gengarite.png b/public/images/items/gengarite.png index 4ccaae6ee8d..4a6a40d2f99 100644 Binary files a/public/images/items/gengarite.png and b/public/images/items/gengarite.png differ diff --git a/public/images/items/ghost_memory.png b/public/images/items/ghost_memory.png index cb3c31ea4de..cde6f45e735 100644 Binary files a/public/images/items/ghost_memory.png and b/public/images/items/ghost_memory.png differ diff --git a/public/images/items/ghost_tera_shard.png b/public/images/items/ghost_tera_shard.png index 8b9c6e750a9..859c0b9778f 100644 Binary files a/public/images/items/ghost_tera_shard.png and b/public/images/items/ghost_tera_shard.png differ diff --git a/public/images/items/glalitite.png b/public/images/items/glalitite.png index ed7858c631c..e3830e7b6e7 100644 Binary files a/public/images/items/glalitite.png and b/public/images/items/glalitite.png differ diff --git a/public/images/items/golden_egg.png b/public/images/items/golden_egg.png index 5727b4cb513..743a32729f3 100644 Binary files a/public/images/items/golden_egg.png and b/public/images/items/golden_egg.png differ diff --git a/public/images/items/golden_exp_charm.png b/public/images/items/golden_exp_charm.png index 1895bfaa6b9..75067eb0eea 100644 Binary files a/public/images/items/golden_exp_charm.png and b/public/images/items/golden_exp_charm.png differ diff --git a/public/images/items/golden_mystic_ticket.png b/public/images/items/golden_mystic_ticket.png index 57f5b9efca6..6886c815099 100644 Binary files a/public/images/items/golden_mystic_ticket.png and b/public/images/items/golden_mystic_ticket.png differ diff --git a/public/images/items/golden_net.png b/public/images/items/golden_net.png index 3205d545e27..95ac08c1132 100644 Binary files a/public/images/items/golden_net.png and b/public/images/items/golden_net.png differ diff --git a/public/images/items/golden_punch.png b/public/images/items/golden_punch.png index 291ff7e248f..80c4729a227 100644 Binary files a/public/images/items/golden_punch.png and b/public/images/items/golden_punch.png differ diff --git a/public/images/items/gracidea.png b/public/images/items/gracidea.png index 6e464390f17..3fca2378d87 100644 Binary files a/public/images/items/gracidea.png and b/public/images/items/gracidea.png differ diff --git a/public/images/items/grass_memory.png b/public/images/items/grass_memory.png index 9d7d27de770..aacb8e7e98a 100644 Binary files a/public/images/items/grass_memory.png and b/public/images/items/grass_memory.png differ diff --git a/public/images/items/grass_tera_shard.png b/public/images/items/grass_tera_shard.png index 30e8762b5b6..218474660c4 100644 Binary files a/public/images/items/grass_tera_shard.png and b/public/images/items/grass_tera_shard.png differ diff --git a/public/images/items/great_ribbon.png b/public/images/items/great_ribbon.png index e7d7e452122..e246d8db981 100644 Binary files a/public/images/items/great_ribbon.png and b/public/images/items/great_ribbon.png differ diff --git a/public/images/items/grip_claw.png b/public/images/items/grip_claw.png index 61cbb89e9b2..ccef5828f8d 100644 Binary files a/public/images/items/grip_claw.png and b/public/images/items/grip_claw.png differ diff --git a/public/images/items/griseous_core.png b/public/images/items/griseous_core.png index 7f3f683eda8..b067ffc7ef6 100644 Binary files a/public/images/items/griseous_core.png and b/public/images/items/griseous_core.png differ diff --git a/public/images/items/ground_memory.png b/public/images/items/ground_memory.png index 808a4e13eeb..66d31446dd9 100644 Binary files a/public/images/items/ground_memory.png and b/public/images/items/ground_memory.png differ diff --git a/public/images/items/ground_tera_shard.png b/public/images/items/ground_tera_shard.png index d7760f7dc1b..46a1cab5f4e 100644 Binary files a/public/images/items/ground_tera_shard.png and b/public/images/items/ground_tera_shard.png differ diff --git a/public/images/items/guard_spec.png b/public/images/items/guard_spec.png index 95a37d0d28e..d65f5a8c07f 100644 Binary files a/public/images/items/guard_spec.png and b/public/images/items/guard_spec.png differ diff --git a/public/images/items/gyaradosite.png b/public/images/items/gyaradosite.png index e4cae1366ab..7765f443dbd 100644 Binary files a/public/images/items/gyaradosite.png and b/public/images/items/gyaradosite.png differ diff --git a/public/images/items/hard_meteorite.png b/public/images/items/hard_meteorite.png index 8e8a2b5688b..5a38e06c9ac 100644 Binary files a/public/images/items/hard_meteorite.png and b/public/images/items/hard_meteorite.png differ diff --git a/public/images/items/hard_stone.png b/public/images/items/hard_stone.png index 571d96afaa8..98463a6a391 100644 Binary files a/public/images/items/hard_stone.png and b/public/images/items/hard_stone.png differ diff --git a/public/images/items/healing_charm.png b/public/images/items/healing_charm.png index 4601eeef593..42bcc0eab06 100644 Binary files a/public/images/items/healing_charm.png and b/public/images/items/healing_charm.png differ diff --git a/public/images/items/hearthflame_mask.png b/public/images/items/hearthflame_mask.png index deed3d0cde8..b76556c8baf 100644 Binary files a/public/images/items/hearthflame_mask.png and b/public/images/items/hearthflame_mask.png differ diff --git a/public/images/items/heracronite.png b/public/images/items/heracronite.png index ffcfc440c19..29c8e8285fb 100644 Binary files a/public/images/items/heracronite.png and b/public/images/items/heracronite.png differ diff --git a/public/images/items/houndoominite.png b/public/images/items/houndoominite.png index c9ea1954dfa..9ae4982694e 100644 Binary files a/public/images/items/houndoominite.png and b/public/images/items/houndoominite.png differ diff --git a/public/images/items/hp_up.png b/public/images/items/hp_up.png index 5c6baff0673..b9284383978 100644 Binary files a/public/images/items/hp_up.png and b/public/images/items/hp_up.png differ diff --git a/public/images/items/hyper_potion.png b/public/images/items/hyper_potion.png index 197aaac690c..140c74b638e 100644 Binary files a/public/images/items/hyper_potion.png and b/public/images/items/hyper_potion.png differ diff --git a/public/images/items/ice_memory.png b/public/images/items/ice_memory.png index 812548cf36c..e41e27c888b 100644 Binary files a/public/images/items/ice_memory.png and b/public/images/items/ice_memory.png differ diff --git a/public/images/items/ice_stone.png b/public/images/items/ice_stone.png index 945714b759c..6920d78ab37 100644 Binary files a/public/images/items/ice_stone.png and b/public/images/items/ice_stone.png differ diff --git a/public/images/items/ice_tera_shard.png b/public/images/items/ice_tera_shard.png index 5644d647c2b..946d5e2dd0c 100644 Binary files a/public/images/items/ice_tera_shard.png and b/public/images/items/ice_tera_shard.png differ diff --git a/public/images/items/icicle_plate.png b/public/images/items/icicle_plate.png index f9797d91f6a..dc4bb74c1d6 100644 Binary files a/public/images/items/icicle_plate.png and b/public/images/items/icicle_plate.png differ diff --git a/public/images/items/icy_reins_of_unity.png b/public/images/items/icy_reins_of_unity.png index b7af48d6a81..1b7d9c6399d 100644 Binary files a/public/images/items/icy_reins_of_unity.png and b/public/images/items/icy_reins_of_unity.png differ diff --git a/public/images/items/insect_plate.png b/public/images/items/insect_plate.png index 5bcc0eebaf5..23e8012d580 100644 Binary files a/public/images/items/insect_plate.png and b/public/images/items/insect_plate.png differ diff --git a/public/images/items/inverse.png b/public/images/items/inverse.png index 0d77ce77dde..059cb2f22ea 100644 Binary files a/public/images/items/inverse.png and b/public/images/items/inverse.png differ diff --git a/public/images/items/iron.png b/public/images/items/iron.png index 5cfff11b059..9c459388385 100644 Binary files a/public/images/items/iron.png and b/public/images/items/iron.png differ diff --git a/public/images/items/iron_plate.png b/public/images/items/iron_plate.png index 65d660e34eb..1a8365ac2af 100644 Binary files a/public/images/items/iron_plate.png and b/public/images/items/iron_plate.png differ diff --git a/public/images/items/kangaskhanite.png b/public/images/items/kangaskhanite.png index 3d65d2cc5ca..8e27c75332c 100644 Binary files a/public/images/items/kangaskhanite.png and b/public/images/items/kangaskhanite.png differ diff --git a/public/images/items/kings_rock.png b/public/images/items/kings_rock.png index bfda9d559d3..52dd6d04938 100644 Binary files a/public/images/items/kings_rock.png and b/public/images/items/kings_rock.png differ diff --git a/public/images/items/lansat_berry.png b/public/images/items/lansat_berry.png index 223bff3eb26..b9c244194b7 100644 Binary files a/public/images/items/lansat_berry.png and b/public/images/items/lansat_berry.png differ diff --git a/public/images/items/latiasite.png b/public/images/items/latiasite.png index 486a542576f..055e74d50bb 100644 Binary files a/public/images/items/latiasite.png and b/public/images/items/latiasite.png differ diff --git a/public/images/items/latiosite.png b/public/images/items/latiosite.png index 69708835c7b..60fdf81f708 100644 Binary files a/public/images/items/latiosite.png and b/public/images/items/latiosite.png differ diff --git a/public/images/items/leaders_crest.png b/public/images/items/leaders_crest.png index 86b71f1eb6d..3f9ddd4b89a 100644 Binary files a/public/images/items/leaders_crest.png and b/public/images/items/leaders_crest.png differ diff --git a/public/images/items/leaf_stone.png b/public/images/items/leaf_stone.png index dc68e916bcf..e4c85f2b0ba 100644 Binary files a/public/images/items/leaf_stone.png and b/public/images/items/leaf_stone.png differ diff --git a/public/images/items/leek.png b/public/images/items/leek.png index 1cb136aa78c..528392264c7 100644 Binary files a/public/images/items/leek.png and b/public/images/items/leek.png differ diff --git a/public/images/items/leftovers.png b/public/images/items/leftovers.png index 4732d149b64..c06eaf073d9 100644 Binary files a/public/images/items/leftovers.png and b/public/images/items/leftovers.png differ diff --git a/public/images/items/legend_plate.png b/public/images/items/legend_plate.png index e96f12b45f5..2304d587346 100644 Binary files a/public/images/items/legend_plate.png and b/public/images/items/legend_plate.png differ diff --git a/public/images/items/leppa_berry.png b/public/images/items/leppa_berry.png index 7a0f13b5199..611acba6a1a 100644 Binary files a/public/images/items/leppa_berry.png and b/public/images/items/leppa_berry.png differ diff --git a/public/images/items/liechi_berry.png b/public/images/items/liechi_berry.png index 192d8f001ef..8ce788a36aa 100644 Binary files a/public/images/items/liechi_berry.png and b/public/images/items/liechi_berry.png differ diff --git a/public/images/items/light_ball.png b/public/images/items/light_ball.png index 7748f735d37..a5fe2859e63 100644 Binary files a/public/images/items/light_ball.png and b/public/images/items/light_ball.png differ diff --git a/public/images/items/light_stone.png b/public/images/items/light_stone.png index 97258cf3970..f9f40130b48 100644 Binary files a/public/images/items/light_stone.png and b/public/images/items/light_stone.png differ diff --git a/public/images/items/linking_cord.png b/public/images/items/linking_cord.png index 4cde9da3f14..414378222f7 100644 Binary files a/public/images/items/linking_cord.png and b/public/images/items/linking_cord.png differ diff --git a/public/images/items/lock_capsule.png b/public/images/items/lock_capsule.png index 25d0cc14cff..be5a5e02c99 100644 Binary files a/public/images/items/lock_capsule.png and b/public/images/items/lock_capsule.png differ diff --git a/public/images/items/lopunnite.png b/public/images/items/lopunnite.png index bd67cf159ed..7f9364e3755 100644 Binary files a/public/images/items/lopunnite.png and b/public/images/items/lopunnite.png differ diff --git a/public/images/items/lucarionite.png b/public/images/items/lucarionite.png index b97161df68c..b964cb0b039 100644 Binary files a/public/images/items/lucarionite.png and b/public/images/items/lucarionite.png differ diff --git a/public/images/items/lucky_egg.png b/public/images/items/lucky_egg.png index fa9a1e4b390..8f99d3f37d0 100644 Binary files a/public/images/items/lucky_egg.png and b/public/images/items/lucky_egg.png differ diff --git a/public/images/items/lucky_punch.png b/public/images/items/lucky_punch.png index 97887631d9a..c70c084e3bc 100644 Binary files a/public/images/items/lucky_punch.png and b/public/images/items/lucky_punch.png differ diff --git a/public/images/items/lucky_punch_great.png b/public/images/items/lucky_punch_great.png index 77c77daf535..2b2c60d6f3a 100644 Binary files a/public/images/items/lucky_punch_great.png and b/public/images/items/lucky_punch_great.png differ diff --git a/public/images/items/lucky_punch_master.png b/public/images/items/lucky_punch_master.png index 89fc1b67cf4..97d5d22aea0 100644 Binary files a/public/images/items/lucky_punch_master.png and b/public/images/items/lucky_punch_master.png differ diff --git a/public/images/items/lucky_punch_ultra.png b/public/images/items/lucky_punch_ultra.png index a95c23666bb..fbe09c35cd1 100644 Binary files a/public/images/items/lucky_punch_ultra.png and b/public/images/items/lucky_punch_ultra.png differ diff --git a/public/images/items/lum_berry.png b/public/images/items/lum_berry.png index d19c4fba583..97d3167eec4 100644 Binary files a/public/images/items/lum_berry.png and b/public/images/items/lum_berry.png differ diff --git a/public/images/items/lure.png b/public/images/items/lure.png index 1c3ea6cc8e8..883181158e5 100644 Binary files a/public/images/items/lure.png and b/public/images/items/lure.png differ diff --git a/public/images/items/lustrous_globe.png b/public/images/items/lustrous_globe.png index 2a854db742b..0aee9500272 100644 Binary files a/public/images/items/lustrous_globe.png and b/public/images/items/lustrous_globe.png differ diff --git a/public/images/items/macho_brace.png b/public/images/items/macho_brace.png index 760139cf7f8..b5063258fc2 100644 Binary files a/public/images/items/macho_brace.png and b/public/images/items/macho_brace.png differ diff --git a/public/images/items/magmarizer.png b/public/images/items/magmarizer.png index 4f4d5f45851..785816b6ad5 100644 Binary files a/public/images/items/magmarizer.png and b/public/images/items/magmarizer.png differ diff --git a/public/images/items/magnet.png b/public/images/items/magnet.png index 9ce8b686e9f..f8668e72abd 100644 Binary files a/public/images/items/magnet.png and b/public/images/items/magnet.png differ diff --git a/public/images/items/malicious_armor.png b/public/images/items/malicious_armor.png index b7bfb55195b..62c93b3b817 100644 Binary files a/public/images/items/malicious_armor.png and b/public/images/items/malicious_armor.png differ diff --git a/public/images/items/manectite.png b/public/images/items/manectite.png index c9df61669bc..ca82d2cee9f 100644 Binary files a/public/images/items/manectite.png and b/public/images/items/manectite.png differ diff --git a/public/images/items/map.png b/public/images/items/map.png index dc2fc6b95d8..9fda9174744 100644 Binary files a/public/images/items/map.png and b/public/images/items/map.png differ diff --git a/public/images/items/master_ribbon.png b/public/images/items/master_ribbon.png index 0443215c1f9..a8a181a52a0 100644 Binary files a/public/images/items/master_ribbon.png and b/public/images/items/master_ribbon.png differ diff --git a/public/images/items/masterpiece_teacup.png b/public/images/items/masterpiece_teacup.png index ec2455c0763..71d8e5a8cf8 100644 Binary files a/public/images/items/masterpiece_teacup.png and b/public/images/items/masterpiece_teacup.png differ diff --git a/public/images/items/mawilite.png b/public/images/items/mawilite.png index 60ea4017f56..da9f74a43be 100644 Binary files a/public/images/items/mawilite.png and b/public/images/items/mawilite.png differ diff --git a/public/images/items/max_elixir.png b/public/images/items/max_elixir.png index 1f528c2bb61..7afaf6581ea 100644 Binary files a/public/images/items/max_elixir.png and b/public/images/items/max_elixir.png differ diff --git a/public/images/items/max_ether.png b/public/images/items/max_ether.png index 8cee7152a86..451e7fa302f 100644 Binary files a/public/images/items/max_ether.png and b/public/images/items/max_ether.png differ diff --git a/public/images/items/max_lure.png b/public/images/items/max_lure.png index 812229d140a..dfc86583dd3 100644 Binary files a/public/images/items/max_lure.png and b/public/images/items/max_lure.png differ diff --git a/public/images/items/max_mushrooms.png b/public/images/items/max_mushrooms.png index 8d5c015c963..10ff9f5a72f 100644 Binary files a/public/images/items/max_mushrooms.png and b/public/images/items/max_mushrooms.png differ diff --git a/public/images/items/max_potion.png b/public/images/items/max_potion.png index d8fadc9cb93..94f3828e7eb 100644 Binary files a/public/images/items/max_potion.png and b/public/images/items/max_potion.png differ diff --git a/public/images/items/max_repel.png b/public/images/items/max_repel.png index 4d88ae6d0b5..6e0621f5f0f 100644 Binary files a/public/images/items/max_repel.png and b/public/images/items/max_repel.png differ diff --git a/public/images/items/max_revive.png b/public/images/items/max_revive.png index 609fd17c3b9..e440b940dec 100644 Binary files a/public/images/items/max_revive.png and b/public/images/items/max_revive.png differ diff --git a/public/images/items/mb.png b/public/images/items/mb.png index d80b3b89108..2ba762c5853 100644 Binary files a/public/images/items/mb.png and b/public/images/items/mb.png differ diff --git a/public/images/items/meadow_plate.png b/public/images/items/meadow_plate.png index e2b991776ba..f3358e3df96 100644 Binary files a/public/images/items/meadow_plate.png and b/public/images/items/meadow_plate.png differ diff --git a/public/images/items/medichamite.png b/public/images/items/medichamite.png index 42f22ed6cd6..f99b8af2edd 100644 Binary files a/public/images/items/medichamite.png and b/public/images/items/medichamite.png differ diff --git a/public/images/items/mega_bracelet.png b/public/images/items/mega_bracelet.png index 5e8ff02be8c..674c59a8f5a 100644 Binary files a/public/images/items/mega_bracelet.png and b/public/images/items/mega_bracelet.png differ diff --git a/public/images/items/metagrossite.png b/public/images/items/metagrossite.png index c245368758d..1ec22fb09db 100644 Binary files a/public/images/items/metagrossite.png and b/public/images/items/metagrossite.png differ diff --git a/public/images/items/metal_alloy.png b/public/images/items/metal_alloy.png index 41f22df4254..33b0f556d70 100644 Binary files a/public/images/items/metal_alloy.png and b/public/images/items/metal_alloy.png differ diff --git a/public/images/items/metal_coat.png b/public/images/items/metal_coat.png index 88f055c3fb3..07344dfe724 100644 Binary files a/public/images/items/metal_coat.png and b/public/images/items/metal_coat.png differ diff --git a/public/images/items/metal_powder.png b/public/images/items/metal_powder.png index 64af0b144fe..a56b6aa1d70 100644 Binary files a/public/images/items/metal_powder.png and b/public/images/items/metal_powder.png differ diff --git a/public/images/items/metronome.png b/public/images/items/metronome.png index 837d75b4c03..2ae5ed6d1fa 100644 Binary files a/public/images/items/metronome.png and b/public/images/items/metronome.png differ diff --git a/public/images/items/mewtwonite_x.png b/public/images/items/mewtwonite_x.png index 507d17e54e8..0639c28e33e 100644 Binary files a/public/images/items/mewtwonite_x.png and b/public/images/items/mewtwonite_x.png differ diff --git a/public/images/items/mewtwonite_y.png b/public/images/items/mewtwonite_y.png index ff0c53396d2..f78e7d7e1fc 100644 Binary files a/public/images/items/mewtwonite_y.png and b/public/images/items/mewtwonite_y.png differ diff --git a/public/images/items/mind_plate.png b/public/images/items/mind_plate.png index ff6fcc4f3af..e8964d64816 100644 Binary files a/public/images/items/mind_plate.png and b/public/images/items/mind_plate.png differ diff --git a/public/images/items/mini_black_hole.png b/public/images/items/mini_black_hole.png index 6edcaad16e3..16589cad227 100644 Binary files a/public/images/items/mini_black_hole.png and b/public/images/items/mini_black_hole.png differ diff --git a/public/images/items/mint_atk.png b/public/images/items/mint_atk.png index 88315c0cd07..f42e0cccfc0 100644 Binary files a/public/images/items/mint_atk.png and b/public/images/items/mint_atk.png differ diff --git a/public/images/items/mint_def.png b/public/images/items/mint_def.png index 584c610ffd7..5e45103f199 100644 Binary files a/public/images/items/mint_def.png and b/public/images/items/mint_def.png differ diff --git a/public/images/items/mint_neutral.png b/public/images/items/mint_neutral.png index f5287539e78..ccf97113000 100644 Binary files a/public/images/items/mint_neutral.png and b/public/images/items/mint_neutral.png differ diff --git a/public/images/items/mint_spatk.png b/public/images/items/mint_spatk.png index 90a57c5608b..94b60ed1597 100644 Binary files a/public/images/items/mint_spatk.png and b/public/images/items/mint_spatk.png differ diff --git a/public/images/items/mint_spd.png b/public/images/items/mint_spd.png index 5420b0997b3..f3f1a1308a9 100644 Binary files a/public/images/items/mint_spd.png and b/public/images/items/mint_spd.png differ diff --git a/public/images/items/mint_spdef.png b/public/images/items/mint_spdef.png index 54a1b4ed21d..4b378953644 100644 Binary files a/public/images/items/mint_spdef.png and b/public/images/items/mint_spdef.png differ diff --git a/public/images/items/miracle_seed.png b/public/images/items/miracle_seed.png index 8be7ba72d33..fac8d792c85 100644 Binary files a/public/images/items/miracle_seed.png and b/public/images/items/miracle_seed.png differ diff --git a/public/images/items/moon_flute.png b/public/images/items/moon_flute.png index 5d3c0caf5f2..e22ea1e0c84 100644 Binary files a/public/images/items/moon_flute.png and b/public/images/items/moon_flute.png differ diff --git a/public/images/items/moon_stone.png b/public/images/items/moon_stone.png index f002fb18073..1f1644946f8 100644 Binary files a/public/images/items/moon_stone.png and b/public/images/items/moon_stone.png differ diff --git a/public/images/items/muscle_band.png b/public/images/items/muscle_band.png index 0be9d010767..0038fc4d65d 100644 Binary files a/public/images/items/muscle_band.png and b/public/images/items/muscle_band.png differ diff --git a/public/images/items/mystery_egg.png b/public/images/items/mystery_egg.png index ac631cec7c8..1630e9c69f3 100644 Binary files a/public/images/items/mystery_egg.png and b/public/images/items/mystery_egg.png differ diff --git a/public/images/items/mystic_ticket.png b/public/images/items/mystic_ticket.png index cab03fa5470..8a1e4ccd937 100644 Binary files a/public/images/items/mystic_ticket.png and b/public/images/items/mystic_ticket.png differ diff --git a/public/images/items/mystic_water.png b/public/images/items/mystic_water.png index 2128895b385..9ab0c0544dc 100644 Binary files a/public/images/items/mystic_water.png and b/public/images/items/mystic_water.png differ diff --git a/public/images/items/mystical_rock.png b/public/images/items/mystical_rock.png index 81a397e4c2d..39c5da781dd 100644 Binary files a/public/images/items/mystical_rock.png and b/public/images/items/mystical_rock.png differ diff --git a/public/images/items/n_lunarizer.png b/public/images/items/n_lunarizer.png index a03b48ad387..fc67271346c 100644 Binary files a/public/images/items/n_lunarizer.png and b/public/images/items/n_lunarizer.png differ diff --git a/public/images/items/n_solarizer.png b/public/images/items/n_solarizer.png index 69153fd38dd..787d2b49bc4 100644 Binary files a/public/images/items/n_solarizer.png and b/public/images/items/n_solarizer.png differ diff --git a/public/images/items/never_melt_ice.png b/public/images/items/never_melt_ice.png index 35b1ada771d..58bbb01788a 100644 Binary files a/public/images/items/never_melt_ice.png and b/public/images/items/never_melt_ice.png differ diff --git a/public/images/items/normal_memory.png b/public/images/items/normal_memory.png index e1ff89a9993..e7aa8336820 100644 Binary files a/public/images/items/normal_memory.png and b/public/images/items/normal_memory.png differ diff --git a/public/images/items/normal_tera_shard.png b/public/images/items/normal_tera_shard.png index 1c7a41ea0ec..b63640ca94a 100644 Binary files a/public/images/items/normal_tera_shard.png and b/public/images/items/normal_tera_shard.png differ diff --git a/public/images/items/nugget.png b/public/images/items/nugget.png index 0340f5d4000..ce70209b164 100644 Binary files a/public/images/items/nugget.png and b/public/images/items/nugget.png differ diff --git a/public/images/items/old_gateau.png b/public/images/items/old_gateau.png index dd5f0e05a94..52aaf5a3b73 100644 Binary files a/public/images/items/old_gateau.png and b/public/images/items/old_gateau.png differ diff --git a/public/images/items/oval_charm.png b/public/images/items/oval_charm.png index fcdb914ec22..5c47c169157 100644 Binary files a/public/images/items/oval_charm.png and b/public/images/items/oval_charm.png differ diff --git a/public/images/items/oval_stone.png b/public/images/items/oval_stone.png index d58ffde18e3..6437a6dd821 100644 Binary files a/public/images/items/oval_stone.png and b/public/images/items/oval_stone.png differ diff --git a/public/images/items/pair_of_tickets.png b/public/images/items/pair_of_tickets.png index b06c9a8727f..68274208196 100644 Binary files a/public/images/items/pair_of_tickets.png and b/public/images/items/pair_of_tickets.png differ diff --git a/public/images/items/pb.png b/public/images/items/pb.png index 37c37edb8c1..d54f6b02b5b 100644 Binary files a/public/images/items/pb.png and b/public/images/items/pb.png differ diff --git a/public/images/items/pb_gold.png b/public/images/items/pb_gold.png index 6dff6824158..86842760431 100644 Binary files a/public/images/items/pb_gold.png and b/public/images/items/pb_gold.png differ diff --git a/public/images/items/pb_silver.png b/public/images/items/pb_silver.png index 9528517a77a..674cf646fd3 100644 Binary files a/public/images/items/pb_silver.png and b/public/images/items/pb_silver.png differ diff --git a/public/images/items/peat_block.png b/public/images/items/peat_block.png index f3c65449b87..357a9496aa8 100644 Binary files a/public/images/items/peat_block.png and b/public/images/items/peat_block.png differ diff --git a/public/images/items/petaya_berry.png b/public/images/items/petaya_berry.png index 0fba884c2e2..434165e6e20 100644 Binary files a/public/images/items/petaya_berry.png and b/public/images/items/petaya_berry.png differ diff --git a/public/images/items/pidgeotite.png b/public/images/items/pidgeotite.png index 52cb40852d6..cd7c1d2d01c 100644 Binary files a/public/images/items/pidgeotite.png and b/public/images/items/pidgeotite.png differ diff --git a/public/images/items/pinsirite.png b/public/images/items/pinsirite.png index 88ecc8e9ea9..5a63465f882 100644 Binary files a/public/images/items/pinsirite.png and b/public/images/items/pinsirite.png differ diff --git a/public/images/items/pixie_plate.png b/public/images/items/pixie_plate.png index e123ae6a49a..7d29f030a76 100644 Binary files a/public/images/items/pixie_plate.png and b/public/images/items/pixie_plate.png differ diff --git a/public/images/items/poison_barb.png b/public/images/items/poison_barb.png index 3f9d714b08c..b85f7d3b777 100644 Binary files a/public/images/items/poison_barb.png and b/public/images/items/poison_barb.png differ diff --git a/public/images/items/poison_memory.png b/public/images/items/poison_memory.png index 6c2b0aea77b..4de0993adbf 100644 Binary files a/public/images/items/poison_memory.png and b/public/images/items/poison_memory.png differ diff --git a/public/images/items/poison_tera_shard.png b/public/images/items/poison_tera_shard.png index 4f21d158a41..bd213f1a91e 100644 Binary files a/public/images/items/poison_tera_shard.png and b/public/images/items/poison_tera_shard.png differ diff --git a/public/images/items/potion.png b/public/images/items/potion.png index f69c3210f03..e24a483970e 100644 Binary files a/public/images/items/potion.png and b/public/images/items/potion.png differ diff --git a/public/images/items/power_herb.png b/public/images/items/power_herb.png index ba156c62122..477e32e3271 100644 Binary files a/public/images/items/power_herb.png and b/public/images/items/power_herb.png differ diff --git a/public/images/items/pp_max.png b/public/images/items/pp_max.png index 787641e26ac..9c449b2e564 100644 Binary files a/public/images/items/pp_max.png and b/public/images/items/pp_max.png differ diff --git a/public/images/items/pp_up.png b/public/images/items/pp_up.png index 463c3a0578d..16f1c7558fd 100644 Binary files a/public/images/items/pp_up.png and b/public/images/items/pp_up.png differ diff --git a/public/images/items/prism_scale.png b/public/images/items/prism_scale.png index 2436e96bf73..807031bf268 100644 Binary files a/public/images/items/prism_scale.png and b/public/images/items/prism_scale.png differ diff --git a/public/images/items/prison_bottle.png b/public/images/items/prison_bottle.png index 06217988364..e8f24568da3 100644 Binary files a/public/images/items/prison_bottle.png and b/public/images/items/prison_bottle.png differ diff --git a/public/images/items/protector.png b/public/images/items/protector.png index 8f65be09b2f..028fd793988 100644 Binary files a/public/images/items/protector.png and b/public/images/items/protector.png differ diff --git a/public/images/items/protein.png b/public/images/items/protein.png index 54df13c6753..6165202f37d 100644 Binary files a/public/images/items/protein.png and b/public/images/items/protein.png differ diff --git a/public/images/items/psychic_memory.png b/public/images/items/psychic_memory.png index 21d62daa483..5ac912cfb10 100644 Binary files a/public/images/items/psychic_memory.png and b/public/images/items/psychic_memory.png differ diff --git a/public/images/items/psychic_tera_shard.png b/public/images/items/psychic_tera_shard.png index f4b1cf7b259..cb575d7bb69 100644 Binary files a/public/images/items/psychic_tera_shard.png and b/public/images/items/psychic_tera_shard.png differ diff --git a/public/images/items/quick_claw.png b/public/images/items/quick_claw.png index ff4f76d0576..94999fa3c09 100644 Binary files a/public/images/items/quick_claw.png and b/public/images/items/quick_claw.png differ diff --git a/public/images/items/quick_powder.png b/public/images/items/quick_powder.png index 58a8a1187a9..731d6fce025 100644 Binary files a/public/images/items/quick_powder.png and b/public/images/items/quick_powder.png differ diff --git a/public/images/items/rare_candy.png b/public/images/items/rare_candy.png index a860a116905..cd27e2002ba 100644 Binary files a/public/images/items/rare_candy.png and b/public/images/items/rare_candy.png differ diff --git a/public/images/items/rarer_candy.png b/public/images/items/rarer_candy.png index 4424caa659a..92af7fe43bf 100644 Binary files a/public/images/items/rarer_candy.png and b/public/images/items/rarer_candy.png differ diff --git a/public/images/items/rayquazite.png b/public/images/items/rayquazite.png index b39957b857d..6617924c434 100644 Binary files a/public/images/items/rayquazite.png and b/public/images/items/rayquazite.png differ diff --git a/public/images/items/razor_claw.png b/public/images/items/razor_claw.png index 0ba506e8706..48fc80d7f00 100644 Binary files a/public/images/items/razor_claw.png and b/public/images/items/razor_claw.png differ diff --git a/public/images/items/razor_fang.png b/public/images/items/razor_fang.png index 75306db5c4c..a55dbb3ee13 100644 Binary files a/public/images/items/razor_fang.png and b/public/images/items/razor_fang.png differ diff --git a/public/images/items/rb.png b/public/images/items/rb.png index 020f2ff878b..2dcccceb57e 100644 Binary files a/public/images/items/rb.png and b/public/images/items/rb.png differ diff --git a/public/images/items/reaper_cloth.png b/public/images/items/reaper_cloth.png index 9caf7665e95..8bb722c241d 100644 Binary files a/public/images/items/reaper_cloth.png and b/public/images/items/reaper_cloth.png differ diff --git a/public/images/items/red_orb.png b/public/images/items/red_orb.png index cee83740ca5..8e9a3bd4f74 100644 Binary files a/public/images/items/red_orb.png and b/public/images/items/red_orb.png differ diff --git a/public/images/items/relic_band.png b/public/images/items/relic_band.png index adbd73bc46b..7f783d26647 100644 Binary files a/public/images/items/relic_band.png and b/public/images/items/relic_band.png differ diff --git a/public/images/items/relic_crown.png b/public/images/items/relic_crown.png index de090041c1c..1f3c9c3a7df 100644 Binary files a/public/images/items/relic_crown.png and b/public/images/items/relic_crown.png differ diff --git a/public/images/items/relic_gold.png b/public/images/items/relic_gold.png index af5b1797938..650c610d4e2 100644 Binary files a/public/images/items/relic_gold.png and b/public/images/items/relic_gold.png differ diff --git a/public/images/items/repel.png b/public/images/items/repel.png index 80c7738e9ff..12c0111b794 100644 Binary files a/public/images/items/repel.png and b/public/images/items/repel.png differ diff --git a/public/images/items/reveal_glass.png b/public/images/items/reveal_glass.png index 469d20a2752..2f9d45a8932 100644 Binary files a/public/images/items/reveal_glass.png and b/public/images/items/reveal_glass.png differ diff --git a/public/images/items/revive.png b/public/images/items/revive.png index e84659867d8..2e2185088d5 100644 Binary files a/public/images/items/revive.png and b/public/images/items/revive.png differ diff --git a/public/images/items/reviver_seed.png b/public/images/items/reviver_seed.png index 10bc5c32451..2ba0919ea5a 100644 Binary files a/public/images/items/reviver_seed.png and b/public/images/items/reviver_seed.png differ diff --git a/public/images/items/ribbon_gen1.png b/public/images/items/ribbon_gen1.png index 1d731cf2e98..cb992589d36 100644 Binary files a/public/images/items/ribbon_gen1.png and b/public/images/items/ribbon_gen1.png differ diff --git a/public/images/items/ribbon_gen2.png b/public/images/items/ribbon_gen2.png index 2ff54112105..26268987fbe 100644 Binary files a/public/images/items/ribbon_gen2.png and b/public/images/items/ribbon_gen2.png differ diff --git a/public/images/items/ribbon_gen3.png b/public/images/items/ribbon_gen3.png index 14a5eb09f7d..501885bc952 100644 Binary files a/public/images/items/ribbon_gen3.png and b/public/images/items/ribbon_gen3.png differ diff --git a/public/images/items/ribbon_gen4.png b/public/images/items/ribbon_gen4.png index c482ac1d04a..ad4cb139a7e 100644 Binary files a/public/images/items/ribbon_gen4.png and b/public/images/items/ribbon_gen4.png differ diff --git a/public/images/items/ribbon_gen5.png b/public/images/items/ribbon_gen5.png index 52560cde636..a4f99ffb7f2 100644 Binary files a/public/images/items/ribbon_gen5.png and b/public/images/items/ribbon_gen5.png differ diff --git a/public/images/items/ribbon_gen6.png b/public/images/items/ribbon_gen6.png index 3dd04927acd..4c9281fa8a7 100644 Binary files a/public/images/items/ribbon_gen6.png and b/public/images/items/ribbon_gen6.png differ diff --git a/public/images/items/ribbon_gen7.png b/public/images/items/ribbon_gen7.png index 225b40da419..5d088392bd5 100644 Binary files a/public/images/items/ribbon_gen7.png and b/public/images/items/ribbon_gen7.png differ diff --git a/public/images/items/ribbon_gen8.png b/public/images/items/ribbon_gen8.png index 32aaa803699..537d64605b3 100644 Binary files a/public/images/items/ribbon_gen8.png and b/public/images/items/ribbon_gen8.png differ diff --git a/public/images/items/ribbon_gen9.png b/public/images/items/ribbon_gen9.png index ad489005e23..a702b6241c3 100644 Binary files a/public/images/items/ribbon_gen9.png and b/public/images/items/ribbon_gen9.png differ diff --git a/public/images/items/rock_memory.png b/public/images/items/rock_memory.png index cfa71c851c0..963ea849d8c 100644 Binary files a/public/images/items/rock_memory.png and b/public/images/items/rock_memory.png differ diff --git a/public/images/items/rock_tera_shard.png b/public/images/items/rock_tera_shard.png index a07ca7955a4..279722e455b 100644 Binary files a/public/images/items/rock_tera_shard.png and b/public/images/items/rock_tera_shard.png differ diff --git a/public/images/items/rogue_ribbon.png b/public/images/items/rogue_ribbon.png index c3cfdcd85f3..6864b6a1fb7 100644 Binary files a/public/images/items/rogue_ribbon.png and b/public/images/items/rogue_ribbon.png differ diff --git a/public/images/items/rusted_shield.png b/public/images/items/rusted_shield.png index 3748f13dc4b..065309fc1b7 100644 Binary files a/public/images/items/rusted_shield.png and b/public/images/items/rusted_shield.png differ diff --git a/public/images/items/rusted_sword.png b/public/images/items/rusted_sword.png index 249233374e0..ad7123dc56d 100644 Binary files a/public/images/items/rusted_sword.png and b/public/images/items/rusted_sword.png differ diff --git a/public/images/items/sablenite.png b/public/images/items/sablenite.png index 48eac2d5875..771480aa918 100644 Binary files a/public/images/items/sablenite.png and b/public/images/items/sablenite.png differ diff --git a/public/images/items/sachet.png b/public/images/items/sachet.png index 6d91fa210fc..3d9d6e6c7c7 100644 Binary files a/public/images/items/sachet.png and b/public/images/items/sachet.png differ diff --git a/public/images/items/sacred_ash.png b/public/images/items/sacred_ash.png index 4fab9dc0dc7..741afe59ef2 100644 Binary files a/public/images/items/sacred_ash.png and b/public/images/items/sacred_ash.png differ diff --git a/public/images/items/salac_berry.png b/public/images/items/salac_berry.png index 846dbb4f160..a01a824b4ba 100644 Binary files a/public/images/items/salac_berry.png and b/public/images/items/salac_berry.png differ diff --git a/public/images/items/salamencite.png b/public/images/items/salamencite.png index f175f39d351..f54a8d3dae9 100644 Binary files a/public/images/items/salamencite.png and b/public/images/items/salamencite.png differ diff --git a/public/images/items/scanner.png b/public/images/items/scanner.png index a291d3f43f8..f56f696638c 100644 Binary files a/public/images/items/scanner.png and b/public/images/items/scanner.png differ diff --git a/public/images/items/sceptilite.png b/public/images/items/sceptilite.png index ff81c4a55fe..4b255b1ff6d 100644 Binary files a/public/images/items/sceptilite.png and b/public/images/items/sceptilite.png differ diff --git a/public/images/items/scizorite.png b/public/images/items/scizorite.png index 8ffca143835..9d357bbd0b6 100644 Binary files a/public/images/items/scizorite.png and b/public/images/items/scizorite.png differ diff --git a/public/images/items/scope_lens.png b/public/images/items/scope_lens.png index d3b1f354313..2cf77cbde77 100644 Binary files a/public/images/items/scope_lens.png and b/public/images/items/scope_lens.png differ diff --git a/public/images/items/scroll_of_darkness.png b/public/images/items/scroll_of_darkness.png index ff6a6065e40..72044c62d8b 100644 Binary files a/public/images/items/scroll_of_darkness.png and b/public/images/items/scroll_of_darkness.png differ diff --git a/public/images/items/scroll_of_waters.png b/public/images/items/scroll_of_waters.png index e4a0cb725eb..9195a26abe1 100644 Binary files a/public/images/items/scroll_of_waters.png and b/public/images/items/scroll_of_waters.png differ diff --git a/public/images/items/shadow_reins_of_unity.png b/public/images/items/shadow_reins_of_unity.png index 85cbc446851..668033ff166 100644 Binary files a/public/images/items/shadow_reins_of_unity.png and b/public/images/items/shadow_reins_of_unity.png differ diff --git a/public/images/items/sharp_beak.png b/public/images/items/sharp_beak.png index f22019e658b..a19e77d2e6e 100644 Binary files a/public/images/items/sharp_beak.png and b/public/images/items/sharp_beak.png differ diff --git a/public/images/items/sharp_meteorite.png b/public/images/items/sharp_meteorite.png index 61a139fab05..97f89e5893b 100644 Binary files a/public/images/items/sharp_meteorite.png and b/public/images/items/sharp_meteorite.png differ diff --git a/public/images/items/sharpedonite.png b/public/images/items/sharpedonite.png index b3eabd5650f..c409b9afef7 100644 Binary files a/public/images/items/sharpedonite.png and b/public/images/items/sharpedonite.png differ diff --git a/public/images/items/shed_shell.png b/public/images/items/shed_shell.png index 17981864897..855b9034e49 100644 Binary files a/public/images/items/shed_shell.png and b/public/images/items/shed_shell.png differ diff --git a/public/images/items/shell_bell.png b/public/images/items/shell_bell.png index 6367d134672..9a99aeebae6 100644 Binary files a/public/images/items/shell_bell.png and b/public/images/items/shell_bell.png differ diff --git a/public/images/items/shiny_charm.png b/public/images/items/shiny_charm.png index 9f692828d04..de2ca39bf5b 100644 Binary files a/public/images/items/shiny_charm.png and b/public/images/items/shiny_charm.png differ diff --git a/public/images/items/shiny_stone.png b/public/images/items/shiny_stone.png index d2fabe6ec8b..01919d39107 100644 Binary files a/public/images/items/shiny_stone.png and b/public/images/items/shiny_stone.png differ diff --git a/public/images/items/shock_drive.png b/public/images/items/shock_drive.png index 592b0085a8f..6bf2602386f 100644 Binary files a/public/images/items/shock_drive.png and b/public/images/items/shock_drive.png differ diff --git a/public/images/items/silk_scarf.png b/public/images/items/silk_scarf.png index 83f056c8b41..993e9841dd7 100644 Binary files a/public/images/items/silk_scarf.png and b/public/images/items/silk_scarf.png differ diff --git a/public/images/items/silver_powder.png b/public/images/items/silver_powder.png index eb717fc6776..fee080a8612 100644 Binary files a/public/images/items/silver_powder.png and b/public/images/items/silver_powder.png differ diff --git a/public/images/items/sitrus_berry.png b/public/images/items/sitrus_berry.png index 703657ad8dd..d26f506e403 100644 Binary files a/public/images/items/sitrus_berry.png and b/public/images/items/sitrus_berry.png differ diff --git a/public/images/items/sky_plate.png b/public/images/items/sky_plate.png index 293bb8f5dc2..be463d5dbdf 100644 Binary files a/public/images/items/sky_plate.png and b/public/images/items/sky_plate.png differ diff --git a/public/images/items/slowbronite.png b/public/images/items/slowbronite.png index 3dc21ffb550..6e0ff2ad294 100644 Binary files a/public/images/items/slowbronite.png and b/public/images/items/slowbronite.png differ diff --git a/public/images/items/smooth_meteorite.png b/public/images/items/smooth_meteorite.png index 059e8e91a30..9e0361e8be2 100644 Binary files a/public/images/items/smooth_meteorite.png and b/public/images/items/smooth_meteorite.png differ diff --git a/public/images/items/soft_sand.png b/public/images/items/soft_sand.png index feda8cd3858..380be0052a5 100644 Binary files a/public/images/items/soft_sand.png and b/public/images/items/soft_sand.png differ diff --git a/public/images/items/soothe_bell.png b/public/images/items/soothe_bell.png index fbceb808c56..d21da03f663 100644 Binary files a/public/images/items/soothe_bell.png and b/public/images/items/soothe_bell.png differ diff --git a/public/images/items/soul_dew.png b/public/images/items/soul_dew.png index 56b9655714b..8458cb04cfd 100644 Binary files a/public/images/items/soul_dew.png and b/public/images/items/soul_dew.png differ diff --git a/public/images/items/spell_tag.png b/public/images/items/spell_tag.png index f9270c6e0a6..0dc730371d5 100644 Binary files a/public/images/items/spell_tag.png and b/public/images/items/spell_tag.png differ diff --git a/public/images/items/splash_plate.png b/public/images/items/splash_plate.png index d86ae5eab57..57a310c7d4f 100644 Binary files a/public/images/items/splash_plate.png and b/public/images/items/splash_plate.png differ diff --git a/public/images/items/spooky_plate.png b/public/images/items/spooky_plate.png index d7df7d25e32..0de26ac30ea 100644 Binary files a/public/images/items/spooky_plate.png and b/public/images/items/spooky_plate.png differ diff --git a/public/images/items/starf_berry.png b/public/images/items/starf_berry.png index cbf423e8343..6c1fb5fd0d4 100644 Binary files a/public/images/items/starf_berry.png and b/public/images/items/starf_berry.png differ diff --git a/public/images/items/steel_memory.png b/public/images/items/steel_memory.png index 8c45bc8b640..764ba8d6022 100644 Binary files a/public/images/items/steel_memory.png and b/public/images/items/steel_memory.png differ diff --git a/public/images/items/steel_tera_shard.png b/public/images/items/steel_tera_shard.png index c93f8c52f60..1cd37754648 100644 Binary files a/public/images/items/steel_tera_shard.png and b/public/images/items/steel_tera_shard.png differ diff --git a/public/images/items/steelixite.png b/public/images/items/steelixite.png index 429c668e656..92a73b854b7 100644 Binary files a/public/images/items/steelixite.png and b/public/images/items/steelixite.png differ diff --git a/public/images/items/stellar_tera_shard.png b/public/images/items/stellar_tera_shard.png index 1d5982f5b94..7d0644646a1 100644 Binary files a/public/images/items/stellar_tera_shard.png and b/public/images/items/stellar_tera_shard.png differ diff --git a/public/images/items/stone_plate.png b/public/images/items/stone_plate.png index dfc3a0cd132..782874f7ca7 100644 Binary files a/public/images/items/stone_plate.png and b/public/images/items/stone_plate.png differ diff --git a/public/images/items/strange_ball.png b/public/images/items/strange_ball.png index 2ddce33d7ac..3c8c7d71aa4 100644 Binary files a/public/images/items/strange_ball.png and b/public/images/items/strange_ball.png differ diff --git a/public/images/items/strawberry_sweet.png b/public/images/items/strawberry_sweet.png index 5df6e1cd8be..0089247b6b9 100644 Binary files a/public/images/items/strawberry_sweet.png and b/public/images/items/strawberry_sweet.png differ diff --git a/public/images/items/sun_flute.png b/public/images/items/sun_flute.png index f81d35fde9c..a792d42244c 100644 Binary files a/public/images/items/sun_flute.png and b/public/images/items/sun_flute.png differ diff --git a/public/images/items/sun_stone.png b/public/images/items/sun_stone.png index 33a7e8f8387..cc26cdf4a63 100644 Binary files a/public/images/items/sun_stone.png and b/public/images/items/sun_stone.png differ diff --git a/public/images/items/super_exp_charm.png b/public/images/items/super_exp_charm.png index ccd73f558cc..fd12fcdbc34 100644 Binary files a/public/images/items/super_exp_charm.png and b/public/images/items/super_exp_charm.png differ diff --git a/public/images/items/super_lure.png b/public/images/items/super_lure.png index 9c2213cd964..56c9abe59d2 100644 Binary files a/public/images/items/super_lure.png and b/public/images/items/super_lure.png differ diff --git a/public/images/items/super_potion.png b/public/images/items/super_potion.png index 16205cb0fff..def35f4d363 100644 Binary files a/public/images/items/super_potion.png and b/public/images/items/super_potion.png differ diff --git a/public/images/items/super_repel.png b/public/images/items/super_repel.png index 628cdbc5c1d..a8a0394832c 100644 Binary files a/public/images/items/super_repel.png and b/public/images/items/super_repel.png differ diff --git a/public/images/items/swampertite.png b/public/images/items/swampertite.png index d4d6415f6f4..5b4b422e034 100644 Binary files a/public/images/items/swampertite.png and b/public/images/items/swampertite.png differ diff --git a/public/images/items/sweet_apple.png b/public/images/items/sweet_apple.png index cfdf79a9eac..de183d1c644 100644 Binary files a/public/images/items/sweet_apple.png and b/public/images/items/sweet_apple.png differ diff --git a/public/images/items/syrupy_apple.png b/public/images/items/syrupy_apple.png index 9c9d05e2e0a..e6bebc8f3c8 100644 Binary files a/public/images/items/syrupy_apple.png and b/public/images/items/syrupy_apple.png differ diff --git a/public/images/items/tart_apple.png b/public/images/items/tart_apple.png index ad9a1728bb5..67f90802382 100644 Binary files a/public/images/items/tart_apple.png and b/public/images/items/tart_apple.png differ diff --git a/public/images/items/tera_orb.png b/public/images/items/tera_orb.png index d8720e41669..52348dc95fc 100644 Binary files a/public/images/items/tera_orb.png and b/public/images/items/tera_orb.png differ diff --git a/public/images/items/thick_club.png b/public/images/items/thick_club.png index f15885f0190..193540ff0b1 100644 Binary files a/public/images/items/thick_club.png and b/public/images/items/thick_club.png differ diff --git a/public/images/items/thunder_stone.png b/public/images/items/thunder_stone.png index 9e87909516b..dc54772c294 100644 Binary files a/public/images/items/thunder_stone.png and b/public/images/items/thunder_stone.png differ diff --git a/public/images/items/tm_bug.png b/public/images/items/tm_bug.png index 229230198c4..191f6b93c82 100644 Binary files a/public/images/items/tm_bug.png and b/public/images/items/tm_bug.png differ diff --git a/public/images/items/tm_dark.png b/public/images/items/tm_dark.png index 6856b1d5444..f2aab224ff9 100644 Binary files a/public/images/items/tm_dark.png and b/public/images/items/tm_dark.png differ diff --git a/public/images/items/tm_dragon.png b/public/images/items/tm_dragon.png index 62405519132..bf31cf2565e 100644 Binary files a/public/images/items/tm_dragon.png and b/public/images/items/tm_dragon.png differ diff --git a/public/images/items/tm_electric.png b/public/images/items/tm_electric.png index 34e4fe8de7b..96022151293 100644 Binary files a/public/images/items/tm_electric.png and b/public/images/items/tm_electric.png differ diff --git a/public/images/items/tm_fairy.png b/public/images/items/tm_fairy.png index 056783a8d63..f62104d0ba0 100644 Binary files a/public/images/items/tm_fairy.png and b/public/images/items/tm_fairy.png differ diff --git a/public/images/items/tm_fighting.png b/public/images/items/tm_fighting.png index 144d75826cd..0359997d820 100644 Binary files a/public/images/items/tm_fighting.png and b/public/images/items/tm_fighting.png differ diff --git a/public/images/items/tm_fire.png b/public/images/items/tm_fire.png index ae19e381873..f4880a6c888 100644 Binary files a/public/images/items/tm_fire.png and b/public/images/items/tm_fire.png differ diff --git a/public/images/items/tm_flying.png b/public/images/items/tm_flying.png index 3db06a69e68..ebadc39a88a 100644 Binary files a/public/images/items/tm_flying.png and b/public/images/items/tm_flying.png differ diff --git a/public/images/items/tm_ghost.png b/public/images/items/tm_ghost.png index a7e8928aa7e..ef0fd9f6927 100644 Binary files a/public/images/items/tm_ghost.png and b/public/images/items/tm_ghost.png differ diff --git a/public/images/items/tm_grass.png b/public/images/items/tm_grass.png index 42f11f590eb..f81d27b7ff0 100644 Binary files a/public/images/items/tm_grass.png and b/public/images/items/tm_grass.png differ diff --git a/public/images/items/tm_ground.png b/public/images/items/tm_ground.png index ff9dc7c7384..e8bf5d4da04 100644 Binary files a/public/images/items/tm_ground.png and b/public/images/items/tm_ground.png differ diff --git a/public/images/items/tm_ice.png b/public/images/items/tm_ice.png index 4edbb447a3e..eece8623654 100644 Binary files a/public/images/items/tm_ice.png and b/public/images/items/tm_ice.png differ diff --git a/public/images/items/tm_normal.png b/public/images/items/tm_normal.png index 19afe85d442..cede4cb96e2 100644 Binary files a/public/images/items/tm_normal.png and b/public/images/items/tm_normal.png differ diff --git a/public/images/items/tm_poison.png b/public/images/items/tm_poison.png index 83cb4488f33..5cea7211e95 100644 Binary files a/public/images/items/tm_poison.png and b/public/images/items/tm_poison.png differ diff --git a/public/images/items/tm_psychic.png b/public/images/items/tm_psychic.png index 4296914eda2..8767e879b21 100644 Binary files a/public/images/items/tm_psychic.png and b/public/images/items/tm_psychic.png differ diff --git a/public/images/items/tm_rock.png b/public/images/items/tm_rock.png index 6e13a1835e7..1a6be381a1a 100644 Binary files a/public/images/items/tm_rock.png and b/public/images/items/tm_rock.png differ diff --git a/public/images/items/tm_steel.png b/public/images/items/tm_steel.png index 32071b0843b..3fbb61b47df 100644 Binary files a/public/images/items/tm_steel.png and b/public/images/items/tm_steel.png differ diff --git a/public/images/items/tm_water.png b/public/images/items/tm_water.png index 85403f20be7..3f9122a3862 100644 Binary files a/public/images/items/tm_water.png and b/public/images/items/tm_water.png differ diff --git a/public/images/items/toxic_orb.png b/public/images/items/toxic_orb.png index 3483c13ba2b..8b8a1026f92 100644 Binary files a/public/images/items/toxic_orb.png and b/public/images/items/toxic_orb.png differ diff --git a/public/images/items/toxic_plate.png b/public/images/items/toxic_plate.png index efb2cff129c..721b275f7d7 100644 Binary files a/public/images/items/toxic_plate.png and b/public/images/items/toxic_plate.png differ diff --git a/public/images/items/twisted_spoon.png b/public/images/items/twisted_spoon.png index 9bb23b04386..07908d6cd0f 100644 Binary files a/public/images/items/twisted_spoon.png and b/public/images/items/twisted_spoon.png differ diff --git a/public/images/items/tyranitarite.png b/public/images/items/tyranitarite.png index 691f8c6123d..3873e7784b1 100644 Binary files a/public/images/items/tyranitarite.png and b/public/images/items/tyranitarite.png differ diff --git a/public/images/items/ub.png b/public/images/items/ub.png index 6ad0702223a..76fe1f28675 100644 Binary files a/public/images/items/ub.png and b/public/images/items/ub.png differ diff --git a/public/images/items/ultra_ribbon.png b/public/images/items/ultra_ribbon.png index a63ec63e394..f1342eb3bae 100644 Binary files a/public/images/items/ultra_ribbon.png and b/public/images/items/ultra_ribbon.png differ diff --git a/public/images/items/ultranecrozium_z.png b/public/images/items/ultranecrozium_z.png index cdcb29e6c26..f95d722873e 100644 Binary files a/public/images/items/ultranecrozium_z.png and b/public/images/items/ultranecrozium_z.png differ diff --git a/public/images/items/unknown.png b/public/images/items/unknown.png index 2d0637048ae..17697d0d640 100644 Binary files a/public/images/items/unknown.png and b/public/images/items/unknown.png differ diff --git a/public/images/items/unremarkable_teacup.png b/public/images/items/unremarkable_teacup.png index 340214b6a5c..154d8284e0d 100644 Binary files a/public/images/items/unremarkable_teacup.png and b/public/images/items/unremarkable_teacup.png differ diff --git a/public/images/items/upgrade.png b/public/images/items/upgrade.png index 11a7ade4d6a..3fe4f03d15a 100644 Binary files a/public/images/items/upgrade.png and b/public/images/items/upgrade.png differ diff --git a/public/images/items/venusaurite.png b/public/images/items/venusaurite.png index 845d1cef75a..853b37417e3 100644 Binary files a/public/images/items/venusaurite.png and b/public/images/items/venusaurite.png differ diff --git a/public/images/items/water_memory.png b/public/images/items/water_memory.png index a0cf8b3c5c9..fb3d33dfbce 100644 Binary files a/public/images/items/water_memory.png and b/public/images/items/water_memory.png differ diff --git a/public/images/items/water_stone.png b/public/images/items/water_stone.png index fa3d924960b..6972b36573c 100644 Binary files a/public/images/items/water_stone.png and b/public/images/items/water_stone.png differ diff --git a/public/images/items/water_tera_shard.png b/public/images/items/water_tera_shard.png index eec8caf1245..1cab0ad8f33 100644 Binary files a/public/images/items/water_tera_shard.png and b/public/images/items/water_tera_shard.png differ diff --git a/public/images/items/wellspring_mask.png b/public/images/items/wellspring_mask.png index 921c71e1493..bec005856e3 100644 Binary files a/public/images/items/wellspring_mask.png and b/public/images/items/wellspring_mask.png differ diff --git a/public/images/items/whipped_dream.png b/public/images/items/whipped_dream.png index 16090ccaac0..d02a3fb9807 100644 Binary files a/public/images/items/whipped_dream.png and b/public/images/items/whipped_dream.png differ diff --git a/public/images/items/white_herb.png b/public/images/items/white_herb.png index 829c64f188e..0729602fd15 100644 Binary files a/public/images/items/white_herb.png and b/public/images/items/white_herb.png differ diff --git a/public/images/items/wide_lens.png b/public/images/items/wide_lens.png index f7dbe9843fa..dcfb43378a0 100644 Binary files a/public/images/items/wide_lens.png and b/public/images/items/wide_lens.png differ diff --git a/public/images/items/wise_glasses.png b/public/images/items/wise_glasses.png index b48d2cb3ffd..765c88524d0 100644 Binary files a/public/images/items/wise_glasses.png and b/public/images/items/wise_glasses.png differ diff --git a/public/images/items/wl_ability_urge.png b/public/images/items/wl_ability_urge.png index b6b2c8bd398..7312de48a94 100644 Binary files a/public/images/items/wl_ability_urge.png and b/public/images/items/wl_ability_urge.png differ diff --git a/public/images/items/wl_antidote.png b/public/images/items/wl_antidote.png index 93e4757938b..18a74292dcf 100644 Binary files a/public/images/items/wl_antidote.png and b/public/images/items/wl_antidote.png differ diff --git a/public/images/items/wl_awakening.png b/public/images/items/wl_awakening.png index 57e83b30cda..4fa59e2d10d 100644 Binary files a/public/images/items/wl_awakening.png and b/public/images/items/wl_awakening.png differ diff --git a/public/images/items/wl_burn_heal.png b/public/images/items/wl_burn_heal.png index 3565af12d62..98fa6c11766 100644 Binary files a/public/images/items/wl_burn_heal.png and b/public/images/items/wl_burn_heal.png differ diff --git a/public/images/items/wl_custom_spliced.png b/public/images/items/wl_custom_spliced.png index 8aef30edb27..de344ae5704 100644 Binary files a/public/images/items/wl_custom_spliced.png and b/public/images/items/wl_custom_spliced.png differ diff --git a/public/images/items/wl_custom_thief.png b/public/images/items/wl_custom_thief.png index de6d62a48bc..aa6f9e0acc7 100644 Binary files a/public/images/items/wl_custom_thief.png and b/public/images/items/wl_custom_thief.png differ diff --git a/public/images/items/wl_elixir.png b/public/images/items/wl_elixir.png index 05eb590c484..e9b7b48ab87 100644 Binary files a/public/images/items/wl_elixir.png and b/public/images/items/wl_elixir.png differ diff --git a/public/images/items/wl_ether.png b/public/images/items/wl_ether.png index 114e8ffc941..457f2bf0649 100644 Binary files a/public/images/items/wl_ether.png and b/public/images/items/wl_ether.png differ diff --git a/public/images/items/wl_full_heal.png b/public/images/items/wl_full_heal.png index 215f9801d65..361d432781a 100644 Binary files a/public/images/items/wl_full_heal.png and b/public/images/items/wl_full_heal.png differ diff --git a/public/images/items/wl_full_restore.png b/public/images/items/wl_full_restore.png index d6d4ffe720f..0e9399f7c77 100644 Binary files a/public/images/items/wl_full_restore.png and b/public/images/items/wl_full_restore.png differ diff --git a/public/images/items/wl_guard_spec.png b/public/images/items/wl_guard_spec.png index 9d22029e927..4207e5094b9 100644 Binary files a/public/images/items/wl_guard_spec.png and b/public/images/items/wl_guard_spec.png differ diff --git a/public/images/items/wl_hyper_potion.png b/public/images/items/wl_hyper_potion.png index 1eb075445e4..016c257a1eb 100644 Binary files a/public/images/items/wl_hyper_potion.png and b/public/images/items/wl_hyper_potion.png differ diff --git a/public/images/items/wl_ice_heal.png b/public/images/items/wl_ice_heal.png index 9ac297c0e7c..619d30d9ca9 100644 Binary files a/public/images/items/wl_ice_heal.png and b/public/images/items/wl_ice_heal.png differ diff --git a/public/images/items/wl_item_drop.png b/public/images/items/wl_item_drop.png index 73425749670..66e81677917 100644 Binary files a/public/images/items/wl_item_drop.png and b/public/images/items/wl_item_drop.png differ diff --git a/public/images/items/wl_item_urge.png b/public/images/items/wl_item_urge.png index 17a6343058f..766751fa329 100644 Binary files a/public/images/items/wl_item_urge.png and b/public/images/items/wl_item_urge.png differ diff --git a/public/images/items/wl_max_elixir.png b/public/images/items/wl_max_elixir.png index 4a33dc853fd..4df3eaff10a 100644 Binary files a/public/images/items/wl_max_elixir.png and b/public/images/items/wl_max_elixir.png differ diff --git a/public/images/items/wl_max_ether.png b/public/images/items/wl_max_ether.png index d3f69ce053d..0e174f9eba4 100644 Binary files a/public/images/items/wl_max_ether.png and b/public/images/items/wl_max_ether.png differ diff --git a/public/images/items/wl_max_potion.png b/public/images/items/wl_max_potion.png index 6b58c07e86a..2f334795489 100644 Binary files a/public/images/items/wl_max_potion.png and b/public/images/items/wl_max_potion.png differ diff --git a/public/images/items/wl_max_revive.png b/public/images/items/wl_max_revive.png index f2eabaa8d5b..89528b0fe8a 100644 Binary files a/public/images/items/wl_max_revive.png and b/public/images/items/wl_max_revive.png differ diff --git a/public/images/items/wl_paralyze_heal.png b/public/images/items/wl_paralyze_heal.png index 8e89e54c156..ba9c172fa17 100644 Binary files a/public/images/items/wl_paralyze_heal.png and b/public/images/items/wl_paralyze_heal.png differ diff --git a/public/images/items/wl_potion.png b/public/images/items/wl_potion.png index 619c5d2b014..a70bba17b2f 100644 Binary files a/public/images/items/wl_potion.png and b/public/images/items/wl_potion.png differ diff --git a/public/images/items/wl_reset_urge.png b/public/images/items/wl_reset_urge.png index 0d2f94504f0..197bcc829fa 100644 Binary files a/public/images/items/wl_reset_urge.png and b/public/images/items/wl_reset_urge.png differ diff --git a/public/images/items/wl_revive.png b/public/images/items/wl_revive.png index c01b5f68853..36ac67d5a60 100644 Binary files a/public/images/items/wl_revive.png and b/public/images/items/wl_revive.png differ diff --git a/public/images/items/wl_super_potion.png b/public/images/items/wl_super_potion.png index eaf60d6c882..5bf5dd8fc89 100644 Binary files a/public/images/items/wl_super_potion.png and b/public/images/items/wl_super_potion.png differ diff --git a/public/images/items/x_accuracy.png b/public/images/items/x_accuracy.png index e7af52fc684..4e51324faef 100644 Binary files a/public/images/items/x_accuracy.png and b/public/images/items/x_accuracy.png differ diff --git a/public/images/items/x_attack.png b/public/images/items/x_attack.png index 711aca7269c..a66167121f6 100644 Binary files a/public/images/items/x_attack.png and b/public/images/items/x_attack.png differ diff --git a/public/images/items/x_defense.png b/public/images/items/x_defense.png index ee8d3fa5e2d..a4f9675fc82 100644 Binary files a/public/images/items/x_defense.png and b/public/images/items/x_defense.png differ diff --git a/public/images/items/x_sp_atk.png b/public/images/items/x_sp_atk.png index f0e674e4d45..853df12a909 100644 Binary files a/public/images/items/x_sp_atk.png and b/public/images/items/x_sp_atk.png differ diff --git a/public/images/items/x_sp_def.png b/public/images/items/x_sp_def.png index 2ab43574af9..04cb91cd73f 100644 Binary files a/public/images/items/x_sp_def.png and b/public/images/items/x_sp_def.png differ diff --git a/public/images/items/x_speed.png b/public/images/items/x_speed.png index daebb295d77..7d9541531d3 100644 Binary files a/public/images/items/x_speed.png and b/public/images/items/x_speed.png differ diff --git a/public/images/items/zap_plate.png b/public/images/items/zap_plate.png index a966fb76cd3..a291624b7a3 100644 Binary files a/public/images/items/zap_plate.png and b/public/images/items/zap_plate.png differ diff --git a/public/images/items/zinc.png b/public/images/items/zinc.png index c1dfd47a9fc..fccbc59e9e8 100644 Binary files a/public/images/items/zinc.png and b/public/images/items/zinc.png differ diff --git a/public/images/items/zoom_lens.png b/public/images/items/zoom_lens.png index 30b3ed55bdf..4f1e5cc9e4b 100644 Binary files a/public/images/items/zoom_lens.png and b/public/images/items/zoom_lens.png differ diff --git a/public/images/logo.png b/public/images/logo.png index 16e559d9c38..bf6c0b19ef2 100644 Binary files a/public/images/logo.png and b/public/images/logo.png differ diff --git a/public/images/mystery-encounters/berries_abound_bush.png b/public/images/mystery-encounters/berries_abound_bush.png index e9be20b4863..741191d71c9 100644 Binary files a/public/images/mystery-encounters/berries_abound_bush.png and b/public/images/mystery-encounters/berries_abound_bush.png differ diff --git a/public/images/mystery-encounters/dark_deal_porygon.png b/public/images/mystery-encounters/dark_deal_porygon.png index 168999fb0f4..97013af65a1 100644 Binary files a/public/images/mystery-encounters/dark_deal_porygon.png and b/public/images/mystery-encounters/dark_deal_porygon.png differ diff --git a/public/images/mystery-encounters/dark_deal_scientist.png b/public/images/mystery-encounters/dark_deal_scientist.png index 453cb767ec1..980f5109f30 100644 Binary files a/public/images/mystery-encounters/dark_deal_scientist.png and b/public/images/mystery-encounters/dark_deal_scientist.png differ diff --git a/public/images/mystery-encounters/department_store_sale_lady.png b/public/images/mystery-encounters/department_store_sale_lady.png index 9dcc1281c9e..b11034d3c99 100644 Binary files a/public/images/mystery-encounters/department_store_sale_lady.png and b/public/images/mystery-encounters/department_store_sale_lady.png differ diff --git a/public/images/mystery-encounters/encounter_exclaim.png b/public/images/mystery-encounters/encounter_exclaim.png index a7727f4da2e..25b288c9700 100644 Binary files a/public/images/mystery-encounters/encounter_exclaim.png and b/public/images/mystery-encounters/encounter_exclaim.png differ diff --git a/public/images/mystery-encounters/encounter_radar.png b/public/images/mystery-encounters/encounter_radar.png index deb9426c269..9af44cd452e 100644 Binary files a/public/images/mystery-encounters/encounter_radar.png and b/public/images/mystery-encounters/encounter_radar.png differ diff --git a/public/images/mystery-encounters/field_trip_teacher.png b/public/images/mystery-encounters/field_trip_teacher.png index b4332bc0032..22a6a316297 100644 Binary files a/public/images/mystery-encounters/field_trip_teacher.png and b/public/images/mystery-encounters/field_trip_teacher.png differ diff --git a/public/images/mystery-encounters/fun_and_games_game.png b/public/images/mystery-encounters/fun_and_games_game.png index 03a3b9c9cbc..8b087c7a31b 100644 Binary files a/public/images/mystery-encounters/fun_and_games_game.png and b/public/images/mystery-encounters/fun_and_games_game.png differ diff --git a/public/images/mystery-encounters/fun_and_games_man.png b/public/images/mystery-encounters/fun_and_games_man.png index 05f94dbd33d..42c3b4996fa 100644 Binary files a/public/images/mystery-encounters/fun_and_games_man.png and b/public/images/mystery-encounters/fun_and_games_man.png differ diff --git a/public/images/mystery-encounters/fun_and_games_wobbuffet.png b/public/images/mystery-encounters/fun_and_games_wobbuffet.png index 37e7220196a..71997be5692 100644 Binary files a/public/images/mystery-encounters/fun_and_games_wobbuffet.png and b/public/images/mystery-encounters/fun_and_games_wobbuffet.png differ diff --git a/public/images/mystery-encounters/global_trade_system.png b/public/images/mystery-encounters/global_trade_system.png index cb0ffb0ab20..fb6815c0240 100644 Binary files a/public/images/mystery-encounters/global_trade_system.png and b/public/images/mystery-encounters/global_trade_system.png differ diff --git a/public/images/mystery-encounters/lost_at_sea_buoy.png b/public/images/mystery-encounters/lost_at_sea_buoy.png index fb957ac29f0..0c7400b7760 100644 Binary files a/public/images/mystery-encounters/lost_at_sea_buoy.png and b/public/images/mystery-encounters/lost_at_sea_buoy.png differ diff --git a/public/images/mystery-encounters/mysterious_chest_blue.png b/public/images/mystery-encounters/mysterious_chest_blue.png index e67bdcafa04..f959db13aa7 100644 Binary files a/public/images/mystery-encounters/mysterious_chest_blue.png and b/public/images/mystery-encounters/mysterious_chest_blue.png differ diff --git a/public/images/mystery-encounters/mysterious_chest_red.png b/public/images/mystery-encounters/mysterious_chest_red.png index c20a8218be6..c312911040e 100644 Binary files a/public/images/mystery-encounters/mysterious_chest_red.png and b/public/images/mystery-encounters/mysterious_chest_red.png differ diff --git a/public/images/mystery-encounters/part_timer_crate.png b/public/images/mystery-encounters/part_timer_crate.png index fb70a6e534a..dd02c243613 100644 Binary files a/public/images/mystery-encounters/part_timer_crate.png and b/public/images/mystery-encounters/part_timer_crate.png differ diff --git a/public/images/mystery-encounters/pokemon_salesman.png b/public/images/mystery-encounters/pokemon_salesman.png index 1251dd8eda7..e5195cf6999 100644 Binary files a/public/images/mystery-encounters/pokemon_salesman.png and b/public/images/mystery-encounters/pokemon_salesman.png differ diff --git a/public/images/mystery-encounters/safari_zone.png b/public/images/mystery-encounters/safari_zone.png index 375d66ebbe9..54bf097656c 100644 Binary files a/public/images/mystery-encounters/safari_zone.png and b/public/images/mystery-encounters/safari_zone.png differ diff --git a/public/images/mystery-encounters/safari_zone_bait.png b/public/images/mystery-encounters/safari_zone_bait.png index 7de9169d187..2133aea6567 100644 Binary files a/public/images/mystery-encounters/safari_zone_bait.png and b/public/images/mystery-encounters/safari_zone_bait.png differ diff --git a/public/images/mystery-encounters/safari_zone_mud.png b/public/images/mystery-encounters/safari_zone_mud.png index 2ba7cb00047..750ff585353 100644 Binary files a/public/images/mystery-encounters/safari_zone_mud.png and b/public/images/mystery-encounters/safari_zone_mud.png differ diff --git a/public/images/mystery-encounters/shady_vitamin_dealer.png b/public/images/mystery-encounters/shady_vitamin_dealer.png index 967d82973e6..f63eadc6799 100644 Binary files a/public/images/mystery-encounters/shady_vitamin_dealer.png and b/public/images/mystery-encounters/shady_vitamin_dealer.png differ diff --git a/public/images/mystery-encounters/teleporting_hijinks_teleporter.png b/public/images/mystery-encounters/teleporting_hijinks_teleporter.png index 9a049c30ab1..178f1571194 100644 Binary files a/public/images/mystery-encounters/teleporting_hijinks_teleporter.png and b/public/images/mystery-encounters/teleporting_hijinks_teleporter.png differ diff --git a/public/images/mystery-encounters/training_session_gear.png b/public/images/mystery-encounters/training_session_gear.png index 42c3a9bb7d4..9ebc7530f64 100644 Binary files a/public/images/mystery-encounters/training_session_gear.png and b/public/images/mystery-encounters/training_session_gear.png differ diff --git a/public/images/mystery-encounters/weird_dream_woman.png b/public/images/mystery-encounters/weird_dream_woman.png index 50d04667152..65fe2f30841 100644 Binary files a/public/images/mystery-encounters/weird_dream_woman.png and b/public/images/mystery-encounters/weird_dream_woman.png differ diff --git a/public/images/pb.png b/public/images/pb.png index acb3a96f066..364d864f7fe 100644 Binary files a/public/images/pb.png and b/public/images/pb.png differ diff --git a/public/images/pokeball/gb.png b/public/images/pokeball/gb.png index 94f278c8ef1..54980d63766 100644 Binary files a/public/images/pokeball/gb.png and b/public/images/pokeball/gb.png differ diff --git a/public/images/pokeball/gb_open.png b/public/images/pokeball/gb_open.png index 26d8956fd27..c5a6e43e705 100644 Binary files a/public/images/pokeball/gb_open.png and b/public/images/pokeball/gb_open.png differ diff --git a/public/images/pokeball/gb_opening.png b/public/images/pokeball/gb_opening.png index 9947f7ceb37..075aafeb460 100644 Binary files a/public/images/pokeball/gb_opening.png and b/public/images/pokeball/gb_opening.png differ diff --git a/public/images/pokeball/lb.png b/public/images/pokeball/lb.png index 1a5639d48e9..2aedfafec3c 100644 Binary files a/public/images/pokeball/lb.png and b/public/images/pokeball/lb.png differ diff --git a/public/images/pokeball/lb_open.png b/public/images/pokeball/lb_open.png index fd2b9c71953..6ec104da2d8 100644 Binary files a/public/images/pokeball/lb_open.png and b/public/images/pokeball/lb_open.png differ diff --git a/public/images/pokeball/lb_opening.png b/public/images/pokeball/lb_opening.png index e62517bd67a..b5f0cffa55a 100644 Binary files a/public/images/pokeball/lb_opening.png and b/public/images/pokeball/lb_opening.png differ diff --git a/public/images/pokeball/mb.png b/public/images/pokeball/mb.png index de374e0fd7c..cc7b7d3164b 100644 Binary files a/public/images/pokeball/mb.png and b/public/images/pokeball/mb.png differ diff --git a/public/images/pokeball/mb_open.png b/public/images/pokeball/mb_open.png index f4e0145dcd4..b0d21c800c2 100644 Binary files a/public/images/pokeball/mb_open.png and b/public/images/pokeball/mb_open.png differ diff --git a/public/images/pokeball/mb_opening.png b/public/images/pokeball/mb_opening.png index 9c483fbbb9c..a13437ba70a 100644 Binary files a/public/images/pokeball/mb_opening.png and b/public/images/pokeball/mb_opening.png differ diff --git a/public/images/pokeball/pb.png b/public/images/pokeball/pb.png index 684ed6b0a5f..7404b3129b7 100644 Binary files a/public/images/pokeball/pb.png and b/public/images/pokeball/pb.png differ diff --git a/public/images/pokeball/pb_open.png b/public/images/pokeball/pb_open.png index 62db56cddde..0fdfa7b98fa 100644 Binary files a/public/images/pokeball/pb_open.png and b/public/images/pokeball/pb_open.png differ diff --git a/public/images/pokeball/pb_opening.png b/public/images/pokeball/pb_opening.png index 4f13a9b46cb..1a7136f186d 100644 Binary files a/public/images/pokeball/pb_opening.png and b/public/images/pokeball/pb_opening.png differ diff --git a/public/images/pokeball/rb.png b/public/images/pokeball/rb.png index e2e1f1b077e..5c4c616d72d 100644 Binary files a/public/images/pokeball/rb.png and b/public/images/pokeball/rb.png differ diff --git a/public/images/pokeball/rb_open.png b/public/images/pokeball/rb_open.png index 94d480b5828..3fe5f6e81c7 100644 Binary files a/public/images/pokeball/rb_open.png and b/public/images/pokeball/rb_open.png differ diff --git a/public/images/pokeball/rb_opening.png b/public/images/pokeball/rb_opening.png index 76aae3c1772..76f4989755d 100644 Binary files a/public/images/pokeball/rb_opening.png and b/public/images/pokeball/rb_opening.png differ diff --git a/public/images/pokeball/ub.png b/public/images/pokeball/ub.png index 306cb168428..92f11481dce 100644 Binary files a/public/images/pokeball/ub.png and b/public/images/pokeball/ub.png differ diff --git a/public/images/pokeball/ub_open.png b/public/images/pokeball/ub_open.png index 2ccf2ae366d..29e5ddac92f 100644 Binary files a/public/images/pokeball/ub_open.png and b/public/images/pokeball/ub_open.png differ diff --git a/public/images/pokeball/ub_opening.png b/public/images/pokeball/ub_opening.png index 6c8e7711201..0696c666d95 100644 Binary files a/public/images/pokeball/ub_opening.png and b/public/images/pokeball/ub_opening.png differ diff --git a/public/images/pokemon_icons_0.png b/public/images/pokemon_icons_0.png index 134fe8c1bee..dd91c8358a2 100644 Binary files a/public/images/pokemon_icons_0.png and b/public/images/pokemon_icons_0.png differ diff --git a/public/images/pokemon_icons_1.png b/public/images/pokemon_icons_1.png index 4091f15165f..de7342ad141 100644 Binary files a/public/images/pokemon_icons_1.png and b/public/images/pokemon_icons_1.png differ diff --git a/public/images/pokemon_icons_1v.png b/public/images/pokemon_icons_1v.png index 025c1ab025a..8e62eef7c76 100644 Binary files a/public/images/pokemon_icons_1v.png and b/public/images/pokemon_icons_1v.png differ diff --git a/public/images/pokemon_icons_2.png b/public/images/pokemon_icons_2.png index fed696d7154..218c4345069 100644 Binary files a/public/images/pokemon_icons_2.png and b/public/images/pokemon_icons_2.png differ diff --git a/public/images/pokemon_icons_2v.png b/public/images/pokemon_icons_2v.png index fea0fb339ce..e6b0a58fe96 100644 Binary files a/public/images/pokemon_icons_2v.png and b/public/images/pokemon_icons_2v.png differ diff --git a/public/images/pokemon_icons_3.png b/public/images/pokemon_icons_3.png index a0eec0a5290..cf0c1b2c3c9 100644 Binary files a/public/images/pokemon_icons_3.png and b/public/images/pokemon_icons_3.png differ diff --git a/public/images/pokemon_icons_3v.png b/public/images/pokemon_icons_3v.png index b151e36e72c..ba4bcfdeb57 100644 Binary files a/public/images/pokemon_icons_3v.png and b/public/images/pokemon_icons_3v.png differ diff --git a/public/images/pokemon_icons_4.png b/public/images/pokemon_icons_4.png index 5b271a3930c..38bb31617f9 100644 Binary files a/public/images/pokemon_icons_4.png and b/public/images/pokemon_icons_4.png differ diff --git a/public/images/pokemon_icons_4v.png b/public/images/pokemon_icons_4v.png index 972bff8b777..0b207777830 100644 Binary files a/public/images/pokemon_icons_4v.png and b/public/images/pokemon_icons_4v.png differ diff --git a/public/images/pokemon_icons_5.png b/public/images/pokemon_icons_5.png index 12fa2e99e24..5f80eaaff67 100644 Binary files a/public/images/pokemon_icons_5.png and b/public/images/pokemon_icons_5.png differ diff --git a/public/images/pokemon_icons_5v.png b/public/images/pokemon_icons_5v.png index 881f430447e..7ca76312c2b 100644 Binary files a/public/images/pokemon_icons_5v.png and b/public/images/pokemon_icons_5v.png differ diff --git a/public/images/pokemon_icons_6.png b/public/images/pokemon_icons_6.png index 272018b672b..47a5274c3d1 100644 Binary files a/public/images/pokemon_icons_6.png and b/public/images/pokemon_icons_6.png differ diff --git a/public/images/pokemon_icons_6v.png b/public/images/pokemon_icons_6v.png index d8bd10eaa71..be2bd1621fb 100644 Binary files a/public/images/pokemon_icons_6v.png and b/public/images/pokemon_icons_6v.png differ diff --git a/public/images/pokemon_icons_7.png b/public/images/pokemon_icons_7.png index e541af01c2d..c2ffe6ad9f3 100644 Binary files a/public/images/pokemon_icons_7.png and b/public/images/pokemon_icons_7.png differ diff --git a/public/images/pokemon_icons_7v.png b/public/images/pokemon_icons_7v.png index 732e67e5219..8164a6bb37b 100644 Binary files a/public/images/pokemon_icons_7v.png and b/public/images/pokemon_icons_7v.png differ diff --git a/public/images/pokemon_icons_8.png b/public/images/pokemon_icons_8.png index 3003f3b9e0e..4bcbb68ac35 100644 Binary files a/public/images/pokemon_icons_8.png and b/public/images/pokemon_icons_8.png differ diff --git a/public/images/pokemon_icons_8v.png b/public/images/pokemon_icons_8v.png index 4017b0945d6..183a87bbad4 100644 Binary files a/public/images/pokemon_icons_8v.png and b/public/images/pokemon_icons_8v.png differ diff --git a/public/images/pokemon_icons_9.png b/public/images/pokemon_icons_9.png index 2985fb800d6..2cfc7c6272d 100644 Binary files a/public/images/pokemon_icons_9.png and b/public/images/pokemon_icons_9.png differ diff --git a/public/images/pokemon_icons_9v.png b/public/images/pokemon_icons_9v.png index 3636c3059d8..cc93a28d120 100644 Binary files a/public/images/pokemon_icons_9v.png and b/public/images/pokemon_icons_9v.png differ diff --git a/public/images/statuses.png b/public/images/statuses.png index d372b989be9..f678b9cb700 100644 Binary files a/public/images/statuses.png and b/public/images/statuses.png differ diff --git a/public/images/statuses/burn.png b/public/images/statuses/burn.png deleted file mode 100644 index e77cd88af3b..00000000000 Binary files a/public/images/statuses/burn.png and /dev/null differ diff --git a/public/images/statuses/faint.png b/public/images/statuses/faint.png deleted file mode 100644 index 12297bdab22..00000000000 Binary files a/public/images/statuses/faint.png and /dev/null differ diff --git a/public/images/statuses/freeze.png b/public/images/statuses/freeze.png deleted file mode 100644 index 5f768a5cef4..00000000000 Binary files a/public/images/statuses/freeze.png and /dev/null differ diff --git a/public/images/statuses/paralysis.png b/public/images/statuses/paralysis.png deleted file mode 100644 index ceda9071708..00000000000 Binary files a/public/images/statuses/paralysis.png and /dev/null differ diff --git a/public/images/statuses/poison.png b/public/images/statuses/poison.png deleted file mode 100644 index b9ed12adcfc..00000000000 Binary files a/public/images/statuses/poison.png and /dev/null differ diff --git a/public/images/statuses/pokerus.png b/public/images/statuses/pokerus.png deleted file mode 100644 index 2963d0081f8..00000000000 Binary files a/public/images/statuses/pokerus.png and /dev/null differ diff --git a/public/images/statuses/sleep.png b/public/images/statuses/sleep.png deleted file mode 100644 index 8a54bbab717..00000000000 Binary files a/public/images/statuses/sleep.png and /dev/null differ diff --git a/public/images/statuses/toxic.png b/public/images/statuses/toxic.png deleted file mode 100644 index c34fcb71d85..00000000000 Binary files a/public/images/statuses/toxic.png and /dev/null differ diff --git a/public/images/statuses_ca.png b/public/images/statuses_ca.png index fe05e243f7a..d6fb8fd0415 100644 Binary files a/public/images/statuses_ca.png and b/public/images/statuses_ca.png differ diff --git a/public/images/statuses_da.png b/public/images/statuses_da.png index 02780bddd98..274e960a565 100644 Binary files a/public/images/statuses_da.png and b/public/images/statuses_da.png differ diff --git a/public/images/statuses_de.png b/public/images/statuses_de.png index ab85384d591..140ba6326ca 100644 Binary files a/public/images/statuses_de.png and b/public/images/statuses_de.png differ diff --git a/public/images/statuses_es-ES.png b/public/images/statuses_es-ES.png index dc845d6fb1f..fbe87996506 100644 Binary files a/public/images/statuses_es-ES.png and b/public/images/statuses_es-ES.png differ diff --git a/public/images/statuses_es-MX.png b/public/images/statuses_es-MX.png index dc845d6fb1f..fbe87996506 100644 Binary files a/public/images/statuses_es-MX.png and b/public/images/statuses_es-MX.png differ diff --git a/public/images/statuses_fr.png b/public/images/statuses_fr.png index 95989cd5d97..611e6226a17 100644 Binary files a/public/images/statuses_fr.png and b/public/images/statuses_fr.png differ diff --git a/public/images/statuses_it.png b/public/images/statuses_it.png index af3107018f8..4ca1e908d94 100644 Binary files a/public/images/statuses_it.png and b/public/images/statuses_it.png differ diff --git a/public/images/statuses_ja.png b/public/images/statuses_ja.png index 305fbe9168c..433c54f04bd 100644 Binary files a/public/images/statuses_ja.png and b/public/images/statuses_ja.png differ diff --git a/public/images/statuses_ko.png b/public/images/statuses_ko.png index d372b989be9..a600231df7b 100644 Binary files a/public/images/statuses_ko.png and b/public/images/statuses_ko.png differ diff --git a/public/images/statuses_pt-BR.png b/public/images/statuses_pt-BR.png index 3073540e8a2..0c5124f12d8 100644 Binary files a/public/images/statuses_pt-BR.png and b/public/images/statuses_pt-BR.png differ diff --git a/public/images/statuses_ro.png b/public/images/statuses_ro.png index 537b634c520..0eb8e1fc32c 100644 Binary files a/public/images/statuses_ro.png and b/public/images/statuses_ro.png differ diff --git a/public/images/statuses_ru.png b/public/images/statuses_ru.png index 1da8b66a4f8..c579e454c0f 100644 Binary files a/public/images/statuses_ru.png and b/public/images/statuses_ru.png differ diff --git a/public/images/statuses_tr.png b/public/images/statuses_tr.png index d372b989be9..f678b9cb700 100644 Binary files a/public/images/statuses_tr.png and b/public/images/statuses_tr.png differ diff --git a/public/images/statuses_zh-CN.png b/public/images/statuses_zh-CN.png index d372b989be9..f678b9cb700 100644 Binary files a/public/images/statuses_zh-CN.png and b/public/images/statuses_zh-CN.png differ diff --git a/public/images/statuses_zh-TW.png b/public/images/statuses_zh-TW.png index d372b989be9..f678b9cb700 100644 Binary files a/public/images/statuses_zh-TW.png and b/public/images/statuses_zh-TW.png differ diff --git a/public/images/trainer/aaron.png b/public/images/trainer/aaron.png index a63f49849a6..e392942b43b 100644 Binary files a/public/images/trainer/aaron.png and b/public/images/trainer/aaron.png differ diff --git a/public/images/trainer/ace_trainer_f.png b/public/images/trainer/ace_trainer_f.png index 8774ba08044..c4bd56a4e97 100644 Binary files a/public/images/trainer/ace_trainer_f.png and b/public/images/trainer/ace_trainer_f.png differ diff --git a/public/images/trainer/ace_trainer_m.png b/public/images/trainer/ace_trainer_m.png index a7922b1b2d1..4b8524bd83c 100644 Binary files a/public/images/trainer/ace_trainer_m.png and b/public/images/trainer/ace_trainer_m.png differ diff --git a/public/images/trainer/acerola.png b/public/images/trainer/acerola.png index 3804d2986a3..49215970f25 100644 Binary files a/public/images/trainer/acerola.png and b/public/images/trainer/acerola.png differ diff --git a/public/images/trainer/aether_grunt_f.png b/public/images/trainer/aether_grunt_f.png index a5088c9e1de..30e1adea75f 100644 Binary files a/public/images/trainer/aether_grunt_f.png and b/public/images/trainer/aether_grunt_f.png differ diff --git a/public/images/trainer/aether_grunt_m.png b/public/images/trainer/aether_grunt_m.png index 1b1e092a340..c61970f4c98 100644 Binary files a/public/images/trainer/aether_grunt_m.png and b/public/images/trainer/aether_grunt_m.png differ diff --git a/public/images/trainer/agatha.png b/public/images/trainer/agatha.png index 71eed676318..d342f258577 100644 Binary files a/public/images/trainer/agatha.png and b/public/images/trainer/agatha.png differ diff --git a/public/images/trainer/alder.png b/public/images/trainer/alder.png index 552fe694929..83f4025d90c 100644 Binary files a/public/images/trainer/alder.png and b/public/images/trainer/alder.png differ diff --git a/public/images/trainer/allister.png b/public/images/trainer/allister.png index 07c20c1b275..c29781660d1 100644 Binary files a/public/images/trainer/allister.png and b/public/images/trainer/allister.png differ diff --git a/public/images/trainer/amarys.png b/public/images/trainer/amarys.png index a342c909f69..e4b43a2c82b 100644 Binary files a/public/images/trainer/amarys.png and b/public/images/trainer/amarys.png differ diff --git a/public/images/trainer/aqua_grunt_f.png b/public/images/trainer/aqua_grunt_f.png index 4db237bf9e7..61d6fd258bc 100644 Binary files a/public/images/trainer/aqua_grunt_f.png and b/public/images/trainer/aqua_grunt_f.png differ diff --git a/public/images/trainer/aqua_grunt_m.png b/public/images/trainer/aqua_grunt_m.png index 4fe230ca119..bddb6e9fa3c 100644 Binary files a/public/images/trainer/aqua_grunt_m.png and b/public/images/trainer/aqua_grunt_m.png differ diff --git a/public/images/trainer/archie.png b/public/images/trainer/archie.png index d4c003fd348..7b047322bfb 100644 Binary files a/public/images/trainer/archie.png and b/public/images/trainer/archie.png differ diff --git a/public/images/trainer/artist.png b/public/images/trainer/artist.png index 3843508aa36..99e5264d250 100644 Binary files a/public/images/trainer/artist.png and b/public/images/trainer/artist.png differ diff --git a/public/images/trainer/atticus.png b/public/images/trainer/atticus.png index 75cd70b72d8..6ed82233976 100644 Binary files a/public/images/trainer/atticus.png and b/public/images/trainer/atticus.png differ diff --git a/public/images/trainer/backers_f.png b/public/images/trainer/backers_f.png index 2d9a08ea89a..ac39e36e80b 100644 Binary files a/public/images/trainer/backers_f.png and b/public/images/trainer/backers_f.png differ diff --git a/public/images/trainer/backers_m.png b/public/images/trainer/backers_m.png index 0b5fda670ca..26d2bf9c70a 100644 Binary files a/public/images/trainer/backers_m.png and b/public/images/trainer/backers_m.png differ diff --git a/public/images/trainer/backpacker_f.png b/public/images/trainer/backpacker_f.png index 11e471a4649..89d70dca204 100644 Binary files a/public/images/trainer/backpacker_f.png and b/public/images/trainer/backpacker_f.png differ diff --git a/public/images/trainer/backpacker_m.png b/public/images/trainer/backpacker_m.png index b7397aa2555..295046b42c1 100644 Binary files a/public/images/trainer/backpacker_m.png and b/public/images/trainer/backpacker_m.png differ diff --git a/public/images/trainer/baker.png b/public/images/trainer/baker.png index 1f97fea2323..16a3079d181 100644 Binary files a/public/images/trainer/baker.png and b/public/images/trainer/baker.png differ diff --git a/public/images/trainer/bea.png b/public/images/trainer/bea.png index 844abc3df9f..1054b16f590 100644 Binary files a/public/images/trainer/bea.png and b/public/images/trainer/bea.png differ diff --git a/public/images/trainer/beauty.png b/public/images/trainer/beauty.png index 881bbead794..c3e209e30f2 100644 Binary files a/public/images/trainer/beauty.png and b/public/images/trainer/beauty.png differ diff --git a/public/images/trainer/bede.png b/public/images/trainer/bede.png index 7db54c785d9..b48920e8098 100644 Binary files a/public/images/trainer/bede.png and b/public/images/trainer/bede.png differ diff --git a/public/images/trainer/benga.png b/public/images/trainer/benga.png index a3ad1a93c8c..e9a268a105b 100644 Binary files a/public/images/trainer/benga.png and b/public/images/trainer/benga.png differ diff --git a/public/images/trainer/bertha.png b/public/images/trainer/bertha.png index 6b8f0b3e3e5..83a9f23d3fa 100644 Binary files a/public/images/trainer/bertha.png and b/public/images/trainer/bertha.png differ diff --git a/public/images/trainer/biker.png b/public/images/trainer/biker.png index 79ec6d15ec9..9b067958d8d 100644 Binary files a/public/images/trainer/biker.png and b/public/images/trainer/biker.png differ diff --git a/public/images/trainer/black_belt_f.png b/public/images/trainer/black_belt_f.png index 8567cd35cf7..b4a333c9d41 100644 Binary files a/public/images/trainer/black_belt_f.png and b/public/images/trainer/black_belt_f.png differ diff --git a/public/images/trainer/black_belt_m.png b/public/images/trainer/black_belt_m.png index c620c2d0e77..3d84251773b 100644 Binary files a/public/images/trainer/black_belt_m.png and b/public/images/trainer/black_belt_m.png differ diff --git a/public/images/trainer/blaine.png b/public/images/trainer/blaine.png index 86b1e3fef2d..389f8fc331c 100644 Binary files a/public/images/trainer/blaine.png and b/public/images/trainer/blaine.png differ diff --git a/public/images/trainer/blue.png b/public/images/trainer/blue.png index ff5c0883e13..0a1b7296d69 100644 Binary files a/public/images/trainer/blue.png and b/public/images/trainer/blue.png differ diff --git a/public/images/trainer/brassius.png b/public/images/trainer/brassius.png index 9e736d32f45..0b1c928b47a 100644 Binary files a/public/images/trainer/brassius.png and b/public/images/trainer/brassius.png differ diff --git a/public/images/trainer/brawly.png b/public/images/trainer/brawly.png index 11b2f7807ca..1a31cfa4d06 100644 Binary files a/public/images/trainer/brawly.png and b/public/images/trainer/brawly.png differ diff --git a/public/images/trainer/breeder_f.png b/public/images/trainer/breeder_f.png index 9995c61c217..2fa7ebdd36c 100644 Binary files a/public/images/trainer/breeder_f.png and b/public/images/trainer/breeder_f.png differ diff --git a/public/images/trainer/breeder_m.png b/public/images/trainer/breeder_m.png index 0ae024e3767..16588225352 100644 Binary files a/public/images/trainer/breeder_m.png and b/public/images/trainer/breeder_m.png differ diff --git a/public/images/trainer/brock.png b/public/images/trainer/brock.png index e4e06a63c55..91790be27ad 100644 Binary files a/public/images/trainer/brock.png and b/public/images/trainer/brock.png differ diff --git a/public/images/trainer/bruno.png b/public/images/trainer/bruno.png index 5dc90107ec2..10c394fbd68 100644 Binary files a/public/images/trainer/bruno.png and b/public/images/trainer/bruno.png differ diff --git a/public/images/trainer/brycen.png b/public/images/trainer/brycen.png index 7b26705b0e7..3f8e2be9100 100644 Binary files a/public/images/trainer/brycen.png and b/public/images/trainer/brycen.png differ diff --git a/public/images/trainer/buck.png b/public/images/trainer/buck.png index 2384fb42a33..fcf66000b47 100644 Binary files a/public/images/trainer/buck.png and b/public/images/trainer/buck.png differ diff --git a/public/images/trainer/bug_type_superfan.png b/public/images/trainer/bug_type_superfan.png index 0d2fd7a68ae..db622948152 100644 Binary files a/public/images/trainer/bug_type_superfan.png and b/public/images/trainer/bug_type_superfan.png differ diff --git a/public/images/trainer/bugsy.png b/public/images/trainer/bugsy.png index 59316fe6ed8..091f8a1219c 100644 Binary files a/public/images/trainer/bugsy.png and b/public/images/trainer/bugsy.png differ diff --git a/public/images/trainer/burgh.png b/public/images/trainer/burgh.png index fc41dafa7e3..24fd8f7bb31 100644 Binary files a/public/images/trainer/burgh.png and b/public/images/trainer/burgh.png differ diff --git a/public/images/trainer/byron.png b/public/images/trainer/byron.png index 0d815c94eaf..52830777c00 100644 Binary files a/public/images/trainer/byron.png and b/public/images/trainer/byron.png differ diff --git a/public/images/trainer/caitlin.png b/public/images/trainer/caitlin.png index 78ed7cc94dd..ecf96cb8a68 100644 Binary files a/public/images/trainer/caitlin.png and b/public/images/trainer/caitlin.png differ diff --git a/public/images/trainer/candice.png b/public/images/trainer/candice.png index 32539cdea8c..c0337b94a71 100644 Binary files a/public/images/trainer/candice.png and b/public/images/trainer/candice.png differ diff --git a/public/images/trainer/cheren.png b/public/images/trainer/cheren.png index cb230d910c4..f56accbb01b 100644 Binary files a/public/images/trainer/cheren.png and b/public/images/trainer/cheren.png differ diff --git a/public/images/trainer/cheryl.png b/public/images/trainer/cheryl.png index c46505f6b25..390ae7d88af 100644 Binary files a/public/images/trainer/cheryl.png and b/public/images/trainer/cheryl.png differ diff --git a/public/images/trainer/chili.png b/public/images/trainer/chili.png index f66b5aa841d..20f26201c44 100644 Binary files a/public/images/trainer/chili.png and b/public/images/trainer/chili.png differ diff --git a/public/images/trainer/chuck.png b/public/images/trainer/chuck.png index 511283ff5f5..852bc80a69c 100644 Binary files a/public/images/trainer/chuck.png and b/public/images/trainer/chuck.png differ diff --git a/public/images/trainer/cilan.png b/public/images/trainer/cilan.png index b5249c30e47..cbcf6f14b5d 100644 Binary files a/public/images/trainer/cilan.png and b/public/images/trainer/cilan.png differ diff --git a/public/images/trainer/clair.png b/public/images/trainer/clair.png index 9299c73a2f7..6e70dfab397 100644 Binary files a/public/images/trainer/clair.png and b/public/images/trainer/clair.png differ diff --git a/public/images/trainer/clay.png b/public/images/trainer/clay.png index 1aa788d7d72..a6418f382e2 100644 Binary files a/public/images/trainer/clay.png and b/public/images/trainer/clay.png differ diff --git a/public/images/trainer/clemont.png b/public/images/trainer/clemont.png index a93aa428002..8cc7e3cf8fb 100644 Binary files a/public/images/trainer/clemont.png and b/public/images/trainer/clemont.png differ diff --git a/public/images/trainer/clerk_f.png b/public/images/trainer/clerk_f.png index 7d522ed31a2..431dac64d75 100644 Binary files a/public/images/trainer/clerk_f.png and b/public/images/trainer/clerk_f.png differ diff --git a/public/images/trainer/clerk_m.png b/public/images/trainer/clerk_m.png index 69531b2a0dd..765094fea95 100644 Binary files a/public/images/trainer/clerk_m.png and b/public/images/trainer/clerk_m.png differ diff --git a/public/images/trainer/clerk_m_2.png b/public/images/trainer/clerk_m_2.png index 13f2f76c7cd..4ee3e07e810 100644 Binary files a/public/images/trainer/clerk_m_2.png and b/public/images/trainer/clerk_m_2.png differ diff --git a/public/images/trainer/colress.png b/public/images/trainer/colress.png index 49a316c95d5..f9bc0ecb01b 100644 Binary files a/public/images/trainer/colress.png and b/public/images/trainer/colress.png differ diff --git a/public/images/trainer/courtney.png b/public/images/trainer/courtney.png index 3db5151e61c..5e24995ebee 100644 Binary files a/public/images/trainer/courtney.png and b/public/images/trainer/courtney.png differ diff --git a/public/images/trainer/crasher_wake.png b/public/images/trainer/crasher_wake.png index 42bbf3a69c6..41ef2bff7c4 100644 Binary files a/public/images/trainer/crasher_wake.png and b/public/images/trainer/crasher_wake.png differ diff --git a/public/images/trainer/cress.png b/public/images/trainer/cress.png index 97448e0c561..6183dafdc4d 100644 Binary files a/public/images/trainer/cress.png and b/public/images/trainer/cress.png differ diff --git a/public/images/trainer/crispin.png b/public/images/trainer/crispin.png index 865e1ac1990..d6b21a30edc 100644 Binary files a/public/images/trainer/crispin.png and b/public/images/trainer/crispin.png differ diff --git a/public/images/trainer/cyclist_f.png b/public/images/trainer/cyclist_f.png index 8a809efb985..c1fad64a8b6 100644 Binary files a/public/images/trainer/cyclist_f.png and b/public/images/trainer/cyclist_f.png differ diff --git a/public/images/trainer/cyclist_m.png b/public/images/trainer/cyclist_m.png index 002b880babf..78015bf74a6 100644 Binary files a/public/images/trainer/cyclist_m.png and b/public/images/trainer/cyclist_m.png differ diff --git a/public/images/trainer/cynthia.png b/public/images/trainer/cynthia.png index 078c4522abd..6dbef7cc81b 100644 Binary files a/public/images/trainer/cynthia.png and b/public/images/trainer/cynthia.png differ diff --git a/public/images/trainer/cyrus.png b/public/images/trainer/cyrus.png index f7351340568..fc087b3d428 100644 Binary files a/public/images/trainer/cyrus.png and b/public/images/trainer/cyrus.png differ diff --git a/public/images/trainer/dancer.png b/public/images/trainer/dancer.png index f43feed6972..ae22fc4926d 100644 Binary files a/public/images/trainer/dancer.png and b/public/images/trainer/dancer.png differ diff --git a/public/images/trainer/depot_agent.png b/public/images/trainer/depot_agent.png index 6a7ac6326e9..41670eeb681 100644 Binary files a/public/images/trainer/depot_agent.png and b/public/images/trainer/depot_agent.png differ diff --git a/public/images/trainer/diantha.png b/public/images/trainer/diantha.png index 663eb3613ba..25ccaa08347 100644 Binary files a/public/images/trainer/diantha.png and b/public/images/trainer/diantha.png differ diff --git a/public/images/trainer/doctor_f.png b/public/images/trainer/doctor_f.png index eb9730f17fc..c386059cf6a 100644 Binary files a/public/images/trainer/doctor_f.png and b/public/images/trainer/doctor_f.png differ diff --git a/public/images/trainer/doctor_m.png b/public/images/trainer/doctor_m.png index 6fd41266ab1..03dc3c1add0 100644 Binary files a/public/images/trainer/doctor_m.png and b/public/images/trainer/doctor_m.png differ diff --git a/public/images/trainer/drake.png b/public/images/trainer/drake.png index 80d663d1149..322e9e247e5 100644 Binary files a/public/images/trainer/drake.png and b/public/images/trainer/drake.png differ diff --git a/public/images/trainer/drasna.png b/public/images/trainer/drasna.png index a6e1824f3a8..799c77c7536 100644 Binary files a/public/images/trainer/drasna.png and b/public/images/trainer/drasna.png differ diff --git a/public/images/trainer/drayden.png b/public/images/trainer/drayden.png index 76845bb7a93..97c56b4e3c1 100644 Binary files a/public/images/trainer/drayden.png and b/public/images/trainer/drayden.png differ diff --git a/public/images/trainer/drayton.png b/public/images/trainer/drayton.png index bd575b25937..e4108f87744 100644 Binary files a/public/images/trainer/drayton.png and b/public/images/trainer/drayton.png differ diff --git a/public/images/trainer/elesa.png b/public/images/trainer/elesa.png index 84c3f31b687..c0ff42ea16d 100644 Binary files a/public/images/trainer/elesa.png and b/public/images/trainer/elesa.png differ diff --git a/public/images/trainer/emmet.png b/public/images/trainer/emmet.png index 15019e1b4c7..dd18339a28d 100644 Binary files a/public/images/trainer/emmet.png and b/public/images/trainer/emmet.png differ diff --git a/public/images/trainer/eri.png b/public/images/trainer/eri.png index cb38f96b030..1ad9c948ef9 100644 Binary files a/public/images/trainer/eri.png and b/public/images/trainer/eri.png differ diff --git a/public/images/trainer/erika.png b/public/images/trainer/erika.png index f3018cde454..408da0444cd 100644 Binary files a/public/images/trainer/erika.png and b/public/images/trainer/erika.png differ diff --git a/public/images/trainer/expert_pokemon_breeder.png b/public/images/trainer/expert_pokemon_breeder.png index 0625f5255c3..0c53da6f2dc 100644 Binary files a/public/images/trainer/expert_pokemon_breeder.png and b/public/images/trainer/expert_pokemon_breeder.png differ diff --git a/public/images/trainer/faba.png b/public/images/trainer/faba.png index 1c509da8a78..c5dc107fe99 100644 Binary files a/public/images/trainer/faba.png and b/public/images/trainer/faba.png differ diff --git a/public/images/trainer/falkner.png b/public/images/trainer/falkner.png index b5ca8944620..ab628366d2c 100644 Binary files a/public/images/trainer/falkner.png and b/public/images/trainer/falkner.png differ diff --git a/public/images/trainer/fantina.png b/public/images/trainer/fantina.png index a0bea745d6e..f0f53f8e042 100644 Binary files a/public/images/trainer/fantina.png and b/public/images/trainer/fantina.png differ diff --git a/public/images/trainer/firebreather.png b/public/images/trainer/firebreather.png index 829496bd56e..daf0d2d1c1f 100644 Binary files a/public/images/trainer/firebreather.png and b/public/images/trainer/firebreather.png differ diff --git a/public/images/trainer/fisherman.png b/public/images/trainer/fisherman.png index b2656dbf360..b7344ac611a 100644 Binary files a/public/images/trainer/fisherman.png and b/public/images/trainer/fisherman.png differ diff --git a/public/images/trainer/flannery.png b/public/images/trainer/flannery.png index d909ee145fe..f538797b539 100644 Binary files a/public/images/trainer/flannery.png and b/public/images/trainer/flannery.png differ diff --git a/public/images/trainer/flare_grunt_f.png b/public/images/trainer/flare_grunt_f.png index e2a4dd7fe92..c7a3177d45f 100644 Binary files a/public/images/trainer/flare_grunt_f.png and b/public/images/trainer/flare_grunt_f.png differ diff --git a/public/images/trainer/flare_grunt_m.png b/public/images/trainer/flare_grunt_m.png index eb14dbed0e2..88dd10d10c5 100644 Binary files a/public/images/trainer/flare_grunt_m.png and b/public/images/trainer/flare_grunt_m.png differ diff --git a/public/images/trainer/flint.png b/public/images/trainer/flint.png index 46fc32c5796..d3d775da7f6 100644 Binary files a/public/images/trainer/flint.png and b/public/images/trainer/flint.png differ diff --git a/public/images/trainer/future_self_f.png b/public/images/trainer/future_self_f.png index e75c5e5e65b..9493d712ce0 100644 Binary files a/public/images/trainer/future_self_f.png and b/public/images/trainer/future_self_f.png differ diff --git a/public/images/trainer/future_self_m.png b/public/images/trainer/future_self_m.png index edd15cb6ea3..f6e7be1c38d 100644 Binary files a/public/images/trainer/future_self_m.png and b/public/images/trainer/future_self_m.png differ diff --git a/public/images/trainer/galactic_grunt_f.png b/public/images/trainer/galactic_grunt_f.png index 209d8ae09ba..27fe101d0e7 100644 Binary files a/public/images/trainer/galactic_grunt_f.png and b/public/images/trainer/galactic_grunt_f.png differ diff --git a/public/images/trainer/galactic_grunt_m.png b/public/images/trainer/galactic_grunt_m.png index 1fff818266c..5ccbc2ff194 100644 Binary files a/public/images/trainer/galactic_grunt_m.png and b/public/images/trainer/galactic_grunt_m.png differ diff --git a/public/images/trainer/gardenia.png b/public/images/trainer/gardenia.png index 3d28f2257f8..13cbdfccc47 100644 Binary files a/public/images/trainer/gardenia.png and b/public/images/trainer/gardenia.png differ diff --git a/public/images/trainer/geeta.png b/public/images/trainer/geeta.png index c14ff9deb56..2319cb21ecd 100644 Binary files a/public/images/trainer/geeta.png and b/public/images/trainer/geeta.png differ diff --git a/public/images/trainer/ghetsis.png b/public/images/trainer/ghetsis.png index e17bd7d7b95..00597b74a1e 100644 Binary files a/public/images/trainer/ghetsis.png and b/public/images/trainer/ghetsis.png differ diff --git a/public/images/trainer/giacomo.png b/public/images/trainer/giacomo.png index 352acaddf95..2a756c804b1 100644 Binary files a/public/images/trainer/giacomo.png and b/public/images/trainer/giacomo.png differ diff --git a/public/images/trainer/giovanni.png b/public/images/trainer/giovanni.png index 360f444c409..d372fcc0db5 100644 Binary files a/public/images/trainer/giovanni.png and b/public/images/trainer/giovanni.png differ diff --git a/public/images/trainer/glacia.png b/public/images/trainer/glacia.png index c73b9b69bab..3a6203096d5 100644 Binary files a/public/images/trainer/glacia.png and b/public/images/trainer/glacia.png differ diff --git a/public/images/trainer/gordie.png b/public/images/trainer/gordie.png index a91f7dacaa7..c588c956209 100644 Binary files a/public/images/trainer/gordie.png and b/public/images/trainer/gordie.png differ diff --git a/public/images/trainer/grant.png b/public/images/trainer/grant.png index 60cf5b8d493..56092076792 100644 Binary files a/public/images/trainer/grant.png and b/public/images/trainer/grant.png differ diff --git a/public/images/trainer/grimsley.png b/public/images/trainer/grimsley.png index 02b04d486d4..e8abca3adc1 100644 Binary files a/public/images/trainer/grimsley.png and b/public/images/trainer/grimsley.png differ diff --git a/public/images/trainer/grusha.png b/public/images/trainer/grusha.png index 73d6a8708b3..80963763465 100644 Binary files a/public/images/trainer/grusha.png and b/public/images/trainer/grusha.png differ diff --git a/public/images/trainer/guitarist.png b/public/images/trainer/guitarist.png index 94fdeb0fafd..7b86da2d9de 100644 Binary files a/public/images/trainer/guitarist.png and b/public/images/trainer/guitarist.png differ diff --git a/public/images/trainer/guzma.png b/public/images/trainer/guzma.png index 1ae6d8eb8d1..ffb17930b47 100644 Binary files a/public/images/trainer/guzma.png and b/public/images/trainer/guzma.png differ diff --git a/public/images/trainer/hala.png b/public/images/trainer/hala.png index 4f26cbb8ff3..d0972fb43ae 100644 Binary files a/public/images/trainer/hala.png and b/public/images/trainer/hala.png differ diff --git a/public/images/trainer/harlequin.png b/public/images/trainer/harlequin.png index e810db5c849..bed24c10510 100644 Binary files a/public/images/trainer/harlequin.png and b/public/images/trainer/harlequin.png differ diff --git a/public/images/trainer/hassel.png b/public/images/trainer/hassel.png index d78bc4dd5db..3c3d42ef8f8 100644 Binary files a/public/images/trainer/hassel.png and b/public/images/trainer/hassel.png differ diff --git a/public/images/trainer/hau.png b/public/images/trainer/hau.png index 7aa673a6fe9..4f4696779ad 100644 Binary files a/public/images/trainer/hau.png and b/public/images/trainer/hau.png differ diff --git a/public/images/trainer/hex_maniac.png b/public/images/trainer/hex_maniac.png index 7557dbf7797..5ed9deeea92 100644 Binary files a/public/images/trainer/hex_maniac.png and b/public/images/trainer/hex_maniac.png differ diff --git a/public/images/trainer/hiker.png b/public/images/trainer/hiker.png index 4d151cdf6f7..44d87b45e32 100644 Binary files a/public/images/trainer/hiker.png and b/public/images/trainer/hiker.png differ diff --git a/public/images/trainer/hooligans.png b/public/images/trainer/hooligans.png index e639e46f3ed..4a216f17a63 100644 Binary files a/public/images/trainer/hooligans.png and b/public/images/trainer/hooligans.png differ diff --git a/public/images/trainer/hoopster.png b/public/images/trainer/hoopster.png index c9ab835029c..5576224d0aa 100644 Binary files a/public/images/trainer/hoopster.png and b/public/images/trainer/hoopster.png differ diff --git a/public/images/trainer/hugh.png b/public/images/trainer/hugh.png index 638c7d350d8..8fa09efef64 100644 Binary files a/public/images/trainer/hugh.png and b/public/images/trainer/hugh.png differ diff --git a/public/images/trainer/infielder.png b/public/images/trainer/infielder.png index 0a8e22ac10c..7ad913cd0bf 100644 Binary files a/public/images/trainer/infielder.png and b/public/images/trainer/infielder.png differ diff --git a/public/images/trainer/ingo.png b/public/images/trainer/ingo.png index 638833acba6..d4e31c4c344 100644 Binary files a/public/images/trainer/ingo.png and b/public/images/trainer/ingo.png differ diff --git a/public/images/trainer/iono.png b/public/images/trainer/iono.png index e2637beba08..5e78c70dea4 100644 Binary files a/public/images/trainer/iono.png and b/public/images/trainer/iono.png differ diff --git a/public/images/trainer/iris.png b/public/images/trainer/iris.png index 943f49846b0..49526059f30 100644 Binary files a/public/images/trainer/iris.png and b/public/images/trainer/iris.png differ diff --git a/public/images/trainer/janine.png b/public/images/trainer/janine.png index 7caa31d487b..79a728d2c96 100644 Binary files a/public/images/trainer/janine.png and b/public/images/trainer/janine.png differ diff --git a/public/images/trainer/janitor.png b/public/images/trainer/janitor.png index c95f2f2e97e..0cb2f399944 100644 Binary files a/public/images/trainer/janitor.png and b/public/images/trainer/janitor.png differ diff --git a/public/images/trainer/jasmine.png b/public/images/trainer/jasmine.png index bb14acd7bcf..2fd744fe3f4 100644 Binary files a/public/images/trainer/jasmine.png and b/public/images/trainer/jasmine.png differ diff --git a/public/images/trainer/juan.png b/public/images/trainer/juan.png index fb7a376693b..add2de7bf5a 100644 Binary files a/public/images/trainer/juan.png and b/public/images/trainer/juan.png differ diff --git a/public/images/trainer/kabu.png b/public/images/trainer/kabu.png index bffcec47e1e..c6de5929d2a 100644 Binary files a/public/images/trainer/kabu.png and b/public/images/trainer/kabu.png differ diff --git a/public/images/trainer/kahili.png b/public/images/trainer/kahili.png index 94dea140f4c..c60873d31be 100644 Binary files a/public/images/trainer/kahili.png and b/public/images/trainer/kahili.png differ diff --git a/public/images/trainer/karen.png b/public/images/trainer/karen.png index 3ed1ef2d8ad..a5d90c9fc94 100644 Binary files a/public/images/trainer/karen.png and b/public/images/trainer/karen.png differ diff --git a/public/images/trainer/katy.png b/public/images/trainer/katy.png index 74da023252b..534abca0397 100644 Binary files a/public/images/trainer/katy.png and b/public/images/trainer/katy.png differ diff --git a/public/images/trainer/kieran.png b/public/images/trainer/kieran.png index c857052e2eb..9c167c4b30f 100644 Binary files a/public/images/trainer/kieran.png and b/public/images/trainer/kieran.png differ diff --git a/public/images/trainer/kofu.png b/public/images/trainer/kofu.png index ae7f364f7f6..bfbc8898ede 100644 Binary files a/public/images/trainer/kofu.png and b/public/images/trainer/kofu.png differ diff --git a/public/images/trainer/koga.png b/public/images/trainer/koga.png index f763d7eff6d..4ed714d63c0 100644 Binary files a/public/images/trainer/koga.png and b/public/images/trainer/koga.png differ diff --git a/public/images/trainer/korrina.png b/public/images/trainer/korrina.png index 8994afdddb1..db7d5102ce6 100644 Binary files a/public/images/trainer/korrina.png and b/public/images/trainer/korrina.png differ diff --git a/public/images/trainer/kukui.png b/public/images/trainer/kukui.png index aacf1c197ee..e06972b1dbb 100644 Binary files a/public/images/trainer/kukui.png and b/public/images/trainer/kukui.png differ diff --git a/public/images/trainer/lacey.png b/public/images/trainer/lacey.png index 0e71e6976c9..b62b524fa86 100644 Binary files a/public/images/trainer/lacey.png and b/public/images/trainer/lacey.png differ diff --git a/public/images/trainer/lance.png b/public/images/trainer/lance.png index 464a8da55b2..091dd5f8790 100644 Binary files a/public/images/trainer/lance.png and b/public/images/trainer/lance.png differ diff --git a/public/images/trainer/larry.png b/public/images/trainer/larry.png index 08dfa0bdc4b..486acf68078 100644 Binary files a/public/images/trainer/larry.png and b/public/images/trainer/larry.png differ diff --git a/public/images/trainer/lenora.png b/public/images/trainer/lenora.png index 11a58822296..df01b993925 100644 Binary files a/public/images/trainer/lenora.png and b/public/images/trainer/lenora.png differ diff --git a/public/images/trainer/leon.png b/public/images/trainer/leon.png index c907f0dc87c..c16132a95c3 100644 Binary files a/public/images/trainer/leon.png and b/public/images/trainer/leon.png differ diff --git a/public/images/trainer/linebacker.png b/public/images/trainer/linebacker.png index e82dd76b25c..315ca22c8f1 100644 Binary files a/public/images/trainer/linebacker.png and b/public/images/trainer/linebacker.png differ diff --git a/public/images/trainer/liza.png b/public/images/trainer/liza.png index 525607739cc..9412f90dc1f 100644 Binary files a/public/images/trainer/liza.png and b/public/images/trainer/liza.png differ diff --git a/public/images/trainer/lorelei.png b/public/images/trainer/lorelei.png index 30b6643d834..9dc7852887d 100644 Binary files a/public/images/trainer/lorelei.png and b/public/images/trainer/lorelei.png differ diff --git a/public/images/trainer/lt_surge.png b/public/images/trainer/lt_surge.png index df207e92bdd..483ba989759 100644 Binary files a/public/images/trainer/lt_surge.png and b/public/images/trainer/lt_surge.png differ diff --git a/public/images/trainer/lucian.png b/public/images/trainer/lucian.png index fabf59aad08..d10db6ea578 100644 Binary files a/public/images/trainer/lucian.png and b/public/images/trainer/lucian.png differ diff --git a/public/images/trainer/lusamine.png b/public/images/trainer/lusamine.png index 1619dc11e2d..b1b35f1fbeb 100644 Binary files a/public/images/trainer/lusamine.png and b/public/images/trainer/lusamine.png differ diff --git a/public/images/trainer/lysandre.png b/public/images/trainer/lysandre.png index fe6dafb00f8..71ee7998de2 100644 Binary files a/public/images/trainer/lysandre.png and b/public/images/trainer/lysandre.png differ diff --git a/public/images/trainer/macro_grunt_f.png b/public/images/trainer/macro_grunt_f.png index 85586126da1..0a7e20b8ab5 100644 Binary files a/public/images/trainer/macro_grunt_f.png and b/public/images/trainer/macro_grunt_f.png differ diff --git a/public/images/trainer/macro_grunt_m.png b/public/images/trainer/macro_grunt_m.png index 464c735c75d..980db918ac6 100644 Binary files a/public/images/trainer/macro_grunt_m.png and b/public/images/trainer/macro_grunt_m.png differ diff --git a/public/images/trainer/magma_grunt_f.png b/public/images/trainer/magma_grunt_f.png index 5ea582ad067..fa3d74b4049 100644 Binary files a/public/images/trainer/magma_grunt_f.png and b/public/images/trainer/magma_grunt_f.png differ diff --git a/public/images/trainer/magma_grunt_m.png b/public/images/trainer/magma_grunt_m.png index b2432a79d28..c2477104fb8 100644 Binary files a/public/images/trainer/magma_grunt_m.png and b/public/images/trainer/magma_grunt_m.png differ diff --git a/public/images/trainer/maid.png b/public/images/trainer/maid.png index 824c2f1a46c..b17a90a2358 100644 Binary files a/public/images/trainer/maid.png and b/public/images/trainer/maid.png differ diff --git a/public/images/trainer/malva.png b/public/images/trainer/malva.png index 850818e761b..cdff3f0cf58 100644 Binary files a/public/images/trainer/malva.png and b/public/images/trainer/malva.png differ diff --git a/public/images/trainer/marley.png b/public/images/trainer/marley.png index 8e78e11e8ad..2fc9ce88a76 100644 Binary files a/public/images/trainer/marley.png and b/public/images/trainer/marley.png differ diff --git a/public/images/trainer/marlon.png b/public/images/trainer/marlon.png index 657ae5eef0e..edf735d8d1e 100644 Binary files a/public/images/trainer/marlon.png and b/public/images/trainer/marlon.png differ diff --git a/public/images/trainer/marnie.png b/public/images/trainer/marnie.png index 1cbac5f67a5..65b03c2a66c 100644 Binary files a/public/images/trainer/marnie.png and b/public/images/trainer/marnie.png differ diff --git a/public/images/trainer/marshal.png b/public/images/trainer/marshal.png index b705a547a28..5bfcdb032d0 100644 Binary files a/public/images/trainer/marshal.png and b/public/images/trainer/marshal.png differ diff --git a/public/images/trainer/maxie.png b/public/images/trainer/maxie.png index 232082f869f..741c439ff97 100644 Binary files a/public/images/trainer/maxie.png and b/public/images/trainer/maxie.png differ diff --git a/public/images/trainer/maylene.png b/public/images/trainer/maylene.png index 09fbbd72982..69ab563b79c 100644 Binary files a/public/images/trainer/maylene.png and b/public/images/trainer/maylene.png differ diff --git a/public/images/trainer/mela.png b/public/images/trainer/mela.png index a98547d6380..7e2eceef1a1 100644 Binary files a/public/images/trainer/mela.png and b/public/images/trainer/mela.png differ diff --git a/public/images/trainer/melony.png b/public/images/trainer/melony.png index 01a148396da..3a58cf1c431 100644 Binary files a/public/images/trainer/melony.png and b/public/images/trainer/melony.png differ diff --git a/public/images/trainer/milo.png b/public/images/trainer/milo.png index dbc7878185e..859500024da 100644 Binary files a/public/images/trainer/milo.png and b/public/images/trainer/milo.png differ diff --git a/public/images/trainer/mira.png b/public/images/trainer/mira.png index 5c1afe5d241..4e6b08d7c87 100644 Binary files a/public/images/trainer/mira.png and b/public/images/trainer/mira.png differ diff --git a/public/images/trainer/misty.png b/public/images/trainer/misty.png index 56b9beae28c..9c90330a4c3 100644 Binary files a/public/images/trainer/misty.png and b/public/images/trainer/misty.png differ diff --git a/public/images/trainer/molayne.png b/public/images/trainer/molayne.png index c400e5be33d..89ff5dd4678 100644 Binary files a/public/images/trainer/molayne.png and b/public/images/trainer/molayne.png differ diff --git a/public/images/trainer/morty.png b/public/images/trainer/morty.png index 5aad41ca1b6..15ec18c6822 100644 Binary files a/public/images/trainer/morty.png and b/public/images/trainer/morty.png differ diff --git a/public/images/trainer/musician.png b/public/images/trainer/musician.png index 72f5ec495c2..db9373c9764 100644 Binary files a/public/images/trainer/musician.png and b/public/images/trainer/musician.png differ diff --git a/public/images/trainer/mustard.png b/public/images/trainer/mustard.png index 0acba02db45..2a58de341dd 100644 Binary files a/public/images/trainer/mustard.png and b/public/images/trainer/mustard.png differ diff --git a/public/images/trainer/nate.png b/public/images/trainer/nate.png index aebbe7a2da9..6798b80efdd 100644 Binary files a/public/images/trainer/nate.png and b/public/images/trainer/nate.png differ diff --git a/public/images/trainer/nemona.png b/public/images/trainer/nemona.png index 83a9e803df4..c30b46602d3 100644 Binary files a/public/images/trainer/nemona.png and b/public/images/trainer/nemona.png differ diff --git a/public/images/trainer/nessa.png b/public/images/trainer/nessa.png index b645ff7159a..53f4f1edf94 100644 Binary files a/public/images/trainer/nessa.png and b/public/images/trainer/nessa.png differ diff --git a/public/images/trainer/norman.png b/public/images/trainer/norman.png index 16dd4d5b2ba..39ab24236bf 100644 Binary files a/public/images/trainer/norman.png and b/public/images/trainer/norman.png differ diff --git a/public/images/trainer/nursery_aide.png b/public/images/trainer/nursery_aide.png index a0cbb549864..a49b12c0729 100644 Binary files a/public/images/trainer/nursery_aide.png and b/public/images/trainer/nursery_aide.png differ diff --git a/public/images/trainer/officer.png b/public/images/trainer/officer.png index 6a6da4cdcc0..b2b2af2f0c3 100644 Binary files a/public/images/trainer/officer.png and b/public/images/trainer/officer.png differ diff --git a/public/images/trainer/oleana.png b/public/images/trainer/oleana.png index e74fb6ab2eb..811e5a81b15 100644 Binary files a/public/images/trainer/oleana.png and b/public/images/trainer/oleana.png differ diff --git a/public/images/trainer/olivia.png b/public/images/trainer/olivia.png index 60b4336efdb..d9e47ae3ca5 100644 Binary files a/public/images/trainer/olivia.png and b/public/images/trainer/olivia.png differ diff --git a/public/images/trainer/olympia.png b/public/images/trainer/olympia.png index 5faa566d31b..a84068a7148 100644 Binary files a/public/images/trainer/olympia.png and b/public/images/trainer/olympia.png differ diff --git a/public/images/trainer/opal.png b/public/images/trainer/opal.png index 8fbf608526f..f7eb342bdf8 100644 Binary files a/public/images/trainer/opal.png and b/public/images/trainer/opal.png differ diff --git a/public/images/trainer/ortega.png b/public/images/trainer/ortega.png index cede7b6c311..8b9b6ce7409 100644 Binary files a/public/images/trainer/ortega.png and b/public/images/trainer/ortega.png differ diff --git a/public/images/trainer/parasol_lady.png b/public/images/trainer/parasol_lady.png index 8610320dca4..53855f00100 100644 Binary files a/public/images/trainer/parasol_lady.png and b/public/images/trainer/parasol_lady.png differ diff --git a/public/images/trainer/penny.png b/public/images/trainer/penny.png index 67c90a41462..1fd8dd8aa4d 100644 Binary files a/public/images/trainer/penny.png and b/public/images/trainer/penny.png differ diff --git a/public/images/trainer/phoebe.png b/public/images/trainer/phoebe.png index eb0bf9f61bb..44506d6bc66 100644 Binary files a/public/images/trainer/phoebe.png and b/public/images/trainer/phoebe.png differ diff --git a/public/images/trainer/piers.png b/public/images/trainer/piers.png index 7730a2d54ca..155b39bcb09 100644 Binary files a/public/images/trainer/piers.png and b/public/images/trainer/piers.png differ diff --git a/public/images/trainer/pilot.png b/public/images/trainer/pilot.png index 0956c048ed9..393742c4941 100644 Binary files a/public/images/trainer/pilot.png and b/public/images/trainer/pilot.png differ diff --git a/public/images/trainer/plasma_grunt_f.png b/public/images/trainer/plasma_grunt_f.png index 7fa804cc39d..c2198d815ad 100644 Binary files a/public/images/trainer/plasma_grunt_f.png and b/public/images/trainer/plasma_grunt_f.png differ diff --git a/public/images/trainer/plasma_grunt_m.png b/public/images/trainer/plasma_grunt_m.png index 801e91b1d6d..040b602e272 100644 Binary files a/public/images/trainer/plasma_grunt_m.png and b/public/images/trainer/plasma_grunt_m.png differ diff --git a/public/images/trainer/player_alt_f.png b/public/images/trainer/player_alt_f.png index b244076da83..c03b7792be1 100644 Binary files a/public/images/trainer/player_alt_f.png and b/public/images/trainer/player_alt_f.png differ diff --git a/public/images/trainer/player_alt_m.png b/public/images/trainer/player_alt_m.png index 935c7b8ba1b..659f21aa530 100644 Binary files a/public/images/trainer/player_alt_m.png and b/public/images/trainer/player_alt_m.png differ diff --git a/public/images/trainer/player_f.png b/public/images/trainer/player_f.png index f2f9169d6aa..c775fdf84ea 100644 Binary files a/public/images/trainer/player_f.png and b/public/images/trainer/player_f.png differ diff --git a/public/images/trainer/player_m.png b/public/images/trainer/player_m.png index 7dd60695fb2..96e73e271f1 100644 Binary files a/public/images/trainer/player_m.png and b/public/images/trainer/player_m.png differ diff --git a/public/images/trainer/plumeria.png b/public/images/trainer/plumeria.png index 4528c3e2053..f1903a9ca8e 100644 Binary files a/public/images/trainer/plumeria.png and b/public/images/trainer/plumeria.png differ diff --git a/public/images/trainer/pokefan_f.png b/public/images/trainer/pokefan_f.png index 9464d4ee858..4818584f15f 100644 Binary files a/public/images/trainer/pokefan_f.png and b/public/images/trainer/pokefan_f.png differ diff --git a/public/images/trainer/pokefan_m.png b/public/images/trainer/pokefan_m.png index ffba222874d..8057f5417b2 100644 Binary files a/public/images/trainer/pokefan_m.png and b/public/images/trainer/pokefan_m.png differ diff --git a/public/images/trainer/poppy.png b/public/images/trainer/poppy.png index 750043084c0..8055562ed19 100644 Binary files a/public/images/trainer/poppy.png and b/public/images/trainer/poppy.png differ diff --git a/public/images/trainer/preschooler_f.png b/public/images/trainer/preschooler_f.png index 1d265ffc97f..0668e5a22a0 100644 Binary files a/public/images/trainer/preschooler_f.png and b/public/images/trainer/preschooler_f.png differ diff --git a/public/images/trainer/preschooler_m.png b/public/images/trainer/preschooler_m.png index bfbc6d8fb53..3b2376c7ae3 100644 Binary files a/public/images/trainer/preschooler_m.png and b/public/images/trainer/preschooler_m.png differ diff --git a/public/images/trainer/pryce.png b/public/images/trainer/pryce.png index 90d884085e5..0da1d3f13f8 100644 Binary files a/public/images/trainer/pryce.png and b/public/images/trainer/pryce.png differ diff --git a/public/images/trainer/psychic_f.png b/public/images/trainer/psychic_f.png index 45978bc4ee1..f3e8ea6c795 100644 Binary files a/public/images/trainer/psychic_f.png and b/public/images/trainer/psychic_f.png differ diff --git a/public/images/trainer/psychic_m.png b/public/images/trainer/psychic_m.png index af62c9ae440..a871f261ff6 100644 Binary files a/public/images/trainer/psychic_m.png and b/public/images/trainer/psychic_m.png differ diff --git a/public/images/trainer/raihan.png b/public/images/trainer/raihan.png index a23c2b61e14..651482ff439 100644 Binary files a/public/images/trainer/raihan.png and b/public/images/trainer/raihan.png differ diff --git a/public/images/trainer/ramos.png b/public/images/trainer/ramos.png index ad47c93cbe5..76855734a90 100644 Binary files a/public/images/trainer/ramos.png and b/public/images/trainer/ramos.png differ diff --git a/public/images/trainer/ranger_f.png b/public/images/trainer/ranger_f.png index 713d793e65e..82fe5bb82fd 100644 Binary files a/public/images/trainer/ranger_f.png and b/public/images/trainer/ranger_f.png differ diff --git a/public/images/trainer/ranger_m.png b/public/images/trainer/ranger_m.png index 785502a9326..1c03cc6800d 100644 Binary files a/public/images/trainer/ranger_m.png and b/public/images/trainer/ranger_m.png differ diff --git a/public/images/trainer/red.png b/public/images/trainer/red.png index fd0da367b25..8f2573dda89 100644 Binary files a/public/images/trainer/red.png and b/public/images/trainer/red.png differ diff --git a/public/images/trainer/rich_f.png b/public/images/trainer/rich_f.png index 05b4e4c0d87..2d781ec1982 100644 Binary files a/public/images/trainer/rich_f.png and b/public/images/trainer/rich_f.png differ diff --git a/public/images/trainer/rich_kid_f.png b/public/images/trainer/rich_kid_f.png index 9985a098e03..c172f40b969 100644 Binary files a/public/images/trainer/rich_kid_f.png and b/public/images/trainer/rich_kid_f.png differ diff --git a/public/images/trainer/rich_kid_m.png b/public/images/trainer/rich_kid_m.png index 86b5428ae99..0f1ba099691 100644 Binary files a/public/images/trainer/rich_kid_m.png and b/public/images/trainer/rich_kid_m.png differ diff --git a/public/images/trainer/rich_m.png b/public/images/trainer/rich_m.png index 56f674536eb..8718fdc669e 100644 Binary files a/public/images/trainer/rich_m.png and b/public/images/trainer/rich_m.png differ diff --git a/public/images/trainer/rika.png b/public/images/trainer/rika.png index f5848fda219..e7c0bea47f0 100644 Binary files a/public/images/trainer/rika.png and b/public/images/trainer/rika.png differ diff --git a/public/images/trainer/riley.png b/public/images/trainer/riley.png index a9f0e3b53a9..8f6088a3982 100644 Binary files a/public/images/trainer/riley.png and b/public/images/trainer/riley.png differ diff --git a/public/images/trainer/rival_f.png b/public/images/trainer/rival_f.png index 2495192d1fc..9b5519ac98c 100644 Binary files a/public/images/trainer/rival_f.png and b/public/images/trainer/rival_f.png differ diff --git a/public/images/trainer/rival_m.png b/public/images/trainer/rival_m.png index 86e4bfac879..243c9ca8534 100644 Binary files a/public/images/trainer/rival_m.png and b/public/images/trainer/rival_m.png differ diff --git a/public/images/trainer/roark.png b/public/images/trainer/roark.png index 37354c5afd7..c29d629f15f 100644 Binary files a/public/images/trainer/roark.png and b/public/images/trainer/roark.png differ diff --git a/public/images/trainer/rocket_grunt_f.png b/public/images/trainer/rocket_grunt_f.png index c4f6e96dec4..b69e4c95638 100644 Binary files a/public/images/trainer/rocket_grunt_f.png and b/public/images/trainer/rocket_grunt_f.png differ diff --git a/public/images/trainer/rocket_grunt_m.png b/public/images/trainer/rocket_grunt_m.png index 027da6cacb0..0dffe2aa7b4 100644 Binary files a/public/images/trainer/rocket_grunt_m.png and b/public/images/trainer/rocket_grunt_m.png differ diff --git a/public/images/trainer/rood.png b/public/images/trainer/rood.png index b2bc88aa1c4..198f32405ec 100644 Binary files a/public/images/trainer/rood.png and b/public/images/trainer/rood.png differ diff --git a/public/images/trainer/rosa.png b/public/images/trainer/rosa.png index 87d35510dda..7cba799b0c0 100644 Binary files a/public/images/trainer/rosa.png and b/public/images/trainer/rosa.png differ diff --git a/public/images/trainer/rose.png b/public/images/trainer/rose.png index 4c448e3302b..0365f1463ce 100644 Binary files a/public/images/trainer/rose.png and b/public/images/trainer/rose.png differ diff --git a/public/images/trainer/roughneck.png b/public/images/trainer/roughneck.png index 7ddff3373a0..5dee090991b 100644 Binary files a/public/images/trainer/roughneck.png and b/public/images/trainer/roughneck.png differ diff --git a/public/images/trainer/roxanne.png b/public/images/trainer/roxanne.png index ab0b88c6491..9bf9cad24be 100644 Binary files a/public/images/trainer/roxanne.png and b/public/images/trainer/roxanne.png differ diff --git a/public/images/trainer/roxie.png b/public/images/trainer/roxie.png index f0189c961b7..356377da04a 100644 Binary files a/public/images/trainer/roxie.png and b/public/images/trainer/roxie.png differ diff --git a/public/images/trainer/ryme.png b/public/images/trainer/ryme.png index f7756e94c94..efa70c27ad1 100644 Binary files a/public/images/trainer/ryme.png and b/public/images/trainer/ryme.png differ diff --git a/public/images/trainer/sabrina.png b/public/images/trainer/sabrina.png index da3e0550023..adaf8baf826 100644 Binary files a/public/images/trainer/sabrina.png and b/public/images/trainer/sabrina.png differ diff --git a/public/images/trainer/sailor.png b/public/images/trainer/sailor.png index ec61152bce3..80668a3e8fb 100644 Binary files a/public/images/trainer/sailor.png and b/public/images/trainer/sailor.png differ diff --git a/public/images/trainer/school_kid_f.png b/public/images/trainer/school_kid_f.png index 53814a045c3..4016ab433ea 100644 Binary files a/public/images/trainer/school_kid_f.png and b/public/images/trainer/school_kid_f.png differ diff --git a/public/images/trainer/school_kid_m.png b/public/images/trainer/school_kid_m.png index 3ae8eee89ae..8c80854078e 100644 Binary files a/public/images/trainer/school_kid_m.png and b/public/images/trainer/school_kid_m.png differ diff --git a/public/images/trainer/scientist_f.png b/public/images/trainer/scientist_f.png index b8d520f3e0c..e91b73fd5ce 100644 Binary files a/public/images/trainer/scientist_f.png and b/public/images/trainer/scientist_f.png differ diff --git a/public/images/trainer/scientist_m.png b/public/images/trainer/scientist_m.png index b4d200a0e27..184638085ac 100644 Binary files a/public/images/trainer/scientist_m.png and b/public/images/trainer/scientist_m.png differ diff --git a/public/images/trainer/shauntal.png b/public/images/trainer/shauntal.png index 9b64ff966f4..3bdad41bf68 100644 Binary files a/public/images/trainer/shauntal.png and b/public/images/trainer/shauntal.png differ diff --git a/public/images/trainer/shelly.png b/public/images/trainer/shelly.png index 95e6a07310d..4be79909123 100644 Binary files a/public/images/trainer/shelly.png and b/public/images/trainer/shelly.png differ diff --git a/public/images/trainer/sidney.png b/public/images/trainer/sidney.png index 72e6db5e4af..bc6226b58d1 100644 Binary files a/public/images/trainer/sidney.png and b/public/images/trainer/sidney.png differ diff --git a/public/images/trainer/siebold.png b/public/images/trainer/siebold.png index 0ac8038f87e..521a6fc911b 100644 Binary files a/public/images/trainer/siebold.png and b/public/images/trainer/siebold.png differ diff --git a/public/images/trainer/skull_grunt_f.png b/public/images/trainer/skull_grunt_f.png index c26e8d7f882..e92cdaf26ff 100644 Binary files a/public/images/trainer/skull_grunt_f.png and b/public/images/trainer/skull_grunt_f.png differ diff --git a/public/images/trainer/skull_grunt_m.png b/public/images/trainer/skull_grunt_m.png index 8babb09ec74..e1d3fc24713 100644 Binary files a/public/images/trainer/skull_grunt_m.png and b/public/images/trainer/skull_grunt_m.png differ diff --git a/public/images/trainer/skyla.png b/public/images/trainer/skyla.png index bdf9200eef3..209a672764c 100644 Binary files a/public/images/trainer/skyla.png and b/public/images/trainer/skyla.png differ diff --git a/public/images/trainer/smasher.png b/public/images/trainer/smasher.png index 7cda7f48365..74832f72bdb 100644 Binary files a/public/images/trainer/smasher.png and b/public/images/trainer/smasher.png differ diff --git a/public/images/trainer/snow_worker.png b/public/images/trainer/snow_worker.png index 0e39505cc8d..805d6e70e56 100644 Binary files a/public/images/trainer/snow_worker.png and b/public/images/trainer/snow_worker.png differ diff --git a/public/images/trainer/snow_worker_f.png b/public/images/trainer/snow_worker_f.png index e52dbf31514..02eab1ae027 100644 Binary files a/public/images/trainer/snow_worker_f.png and b/public/images/trainer/snow_worker_f.png differ diff --git a/public/images/trainer/snow_worker_m.png b/public/images/trainer/snow_worker_m.png index 0e39505cc8d..805d6e70e56 100644 Binary files a/public/images/trainer/snow_worker_m.png and b/public/images/trainer/snow_worker_m.png differ diff --git a/public/images/trainer/star_grunt_f.png b/public/images/trainer/star_grunt_f.png index ee0c25147cc..26f865a99f8 100644 Binary files a/public/images/trainer/star_grunt_f.png and b/public/images/trainer/star_grunt_f.png differ diff --git a/public/images/trainer/star_grunt_m.png b/public/images/trainer/star_grunt_m.png index 13fd4e88510..981d8af43e9 100644 Binary files a/public/images/trainer/star_grunt_m.png and b/public/images/trainer/star_grunt_m.png differ diff --git a/public/images/trainer/steven.png b/public/images/trainer/steven.png index 969d7b3d08c..ab18f202d3a 100644 Binary files a/public/images/trainer/steven.png and b/public/images/trainer/steven.png differ diff --git a/public/images/trainer/striker.png b/public/images/trainer/striker.png index 656a14833a1..2d9f87cf214 100644 Binary files a/public/images/trainer/striker.png and b/public/images/trainer/striker.png differ diff --git a/public/images/trainer/swimmer_f.png b/public/images/trainer/swimmer_f.png index 0a37d19172b..5514e1ac949 100644 Binary files a/public/images/trainer/swimmer_f.png and b/public/images/trainer/swimmer_f.png differ diff --git a/public/images/trainer/swimmer_m.png b/public/images/trainer/swimmer_m.png index 517ed5cfc65..ae028e93fe8 100644 Binary files a/public/images/trainer/swimmer_m.png and b/public/images/trainer/swimmer_m.png differ diff --git a/public/images/trainer/tate.png b/public/images/trainer/tate.png index 1702c2c7e7e..d1f66d77409 100644 Binary files a/public/images/trainer/tate.png and b/public/images/trainer/tate.png differ diff --git a/public/images/trainer/trainer_f_back.png b/public/images/trainer/trainer_f_back.png index 8c528ad5610..67f6c71b7d8 100644 Binary files a/public/images/trainer/trainer_f_back.png and b/public/images/trainer/trainer_f_back.png differ diff --git a/public/images/trainer/trainer_f_back_pb.png b/public/images/trainer/trainer_f_back_pb.png index e1c9b6d6ca4..f0497142d04 100644 Binary files a/public/images/trainer/trainer_f_back_pb.png and b/public/images/trainer/trainer_f_back_pb.png differ diff --git a/public/images/trainer/trainer_m_back.png b/public/images/trainer/trainer_m_back.png index 9e40d634ad7..5721107641e 100644 Binary files a/public/images/trainer/trainer_m_back.png and b/public/images/trainer/trainer_m_back.png differ diff --git a/public/images/trainer/trainer_m_back_pb.png b/public/images/trainer/trainer_m_back_pb.png index 8980a4e8249..06b1833e94a 100644 Binary files a/public/images/trainer/trainer_m_back_pb.png and b/public/images/trainer/trainer_m_back_pb.png differ diff --git a/public/images/trainer/tulip.png b/public/images/trainer/tulip.png index 87c9f3fd029..ed0fa56b494 100644 Binary files a/public/images/trainer/tulip.png and b/public/images/trainer/tulip.png differ diff --git a/public/images/trainer/twins.png b/public/images/trainer/twins.png index 9114c998285..8c3e3881458 100644 Binary files a/public/images/trainer/twins.png and b/public/images/trainer/twins.png differ diff --git a/public/images/trainer/unknown_f.png b/public/images/trainer/unknown_f.png index f7fb6d789a8..88cd0bb18c7 100644 Binary files a/public/images/trainer/unknown_f.png and b/public/images/trainer/unknown_f.png differ diff --git a/public/images/trainer/unknown_m.png b/public/images/trainer/unknown_m.png index a48f97af57a..df36d351b3d 100644 Binary files a/public/images/trainer/unknown_m.png and b/public/images/trainer/unknown_m.png differ diff --git a/public/images/trainer/valerie.png b/public/images/trainer/valerie.png index dc03beceb56..d8e652cdc82 100644 Binary files a/public/images/trainer/valerie.png and b/public/images/trainer/valerie.png differ diff --git a/public/images/trainer/veteran_f.png b/public/images/trainer/veteran_f.png index d6117581ff3..e49f49cb209 100644 Binary files a/public/images/trainer/veteran_f.png and b/public/images/trainer/veteran_f.png differ diff --git a/public/images/trainer/veteran_m.png b/public/images/trainer/veteran_m.png index 1f1d864859d..d30e3b18fed 100644 Binary files a/public/images/trainer/veteran_m.png and b/public/images/trainer/veteran_m.png differ diff --git a/public/images/trainer/vicky.png b/public/images/trainer/vicky.png index 3e2d6c13696..19020b9e204 100644 Binary files a/public/images/trainer/vicky.png and b/public/images/trainer/vicky.png differ diff --git a/public/images/trainer/victor.png b/public/images/trainer/victor.png index 3ffddea24bb..e7455126957 100644 Binary files a/public/images/trainer/victor.png and b/public/images/trainer/victor.png differ diff --git a/public/images/trainer/victoria.png b/public/images/trainer/victoria.png index e2874f266ad..8ee103e6376 100644 Binary files a/public/images/trainer/victoria.png and b/public/images/trainer/victoria.png differ diff --git a/public/images/trainer/viola.png b/public/images/trainer/viola.png index 0f6f19cadff..e9484ec0bca 100644 Binary files a/public/images/trainer/viola.png and b/public/images/trainer/viola.png differ diff --git a/public/images/trainer/vito.png b/public/images/trainer/vito.png index a7c6c0444f4..88fa724fc00 100644 Binary files a/public/images/trainer/vito.png and b/public/images/trainer/vito.png differ diff --git a/public/images/trainer/vivi.png b/public/images/trainer/vivi.png index cd97e676cfb..d4652590756 100644 Binary files a/public/images/trainer/vivi.png and b/public/images/trainer/vivi.png differ diff --git a/public/images/trainer/volkner.png b/public/images/trainer/volkner.png index d791513764a..b6fac546efa 100644 Binary files a/public/images/trainer/volkner.png and b/public/images/trainer/volkner.png differ diff --git a/public/images/trainer/waiter_f.png b/public/images/trainer/waiter_f.png index 2fbe15759e2..63aaa72f61e 100644 Binary files a/public/images/trainer/waiter_f.png and b/public/images/trainer/waiter_f.png differ diff --git a/public/images/trainer/waiter_m.png b/public/images/trainer/waiter_m.png index 2c9f01e9b49..24bf074d322 100644 Binary files a/public/images/trainer/waiter_m.png and b/public/images/trainer/waiter_m.png differ diff --git a/public/images/trainer/wallace.png b/public/images/trainer/wallace.png index c52997c700b..f5c366e07d9 100644 Binary files a/public/images/trainer/wallace.png and b/public/images/trainer/wallace.png differ diff --git a/public/images/trainer/wattson.png b/public/images/trainer/wattson.png index e31db579ac1..3a115e8e702 100644 Binary files a/public/images/trainer/wattson.png and b/public/images/trainer/wattson.png differ diff --git a/public/images/trainer/whitney.png b/public/images/trainer/whitney.png index 8177f4491ec..69a87bc1105 100644 Binary files a/public/images/trainer/whitney.png and b/public/images/trainer/whitney.png differ diff --git a/public/images/trainer/wikstrom.png b/public/images/trainer/wikstrom.png index c78630a3a11..bf0f5042eb9 100644 Binary files a/public/images/trainer/wikstrom.png and b/public/images/trainer/wikstrom.png differ diff --git a/public/images/trainer/will.png b/public/images/trainer/will.png index 918fe06431a..6095b21584e 100644 Binary files a/public/images/trainer/will.png and b/public/images/trainer/will.png differ diff --git a/public/images/trainer/winona.png b/public/images/trainer/winona.png index 362941ea5fa..4fa37c83799 100644 Binary files a/public/images/trainer/winona.png and b/public/images/trainer/winona.png differ diff --git a/public/images/trainer/worker_f.png b/public/images/trainer/worker_f.png index e52dbf31514..02eab1ae027 100644 Binary files a/public/images/trainer/worker_f.png and b/public/images/trainer/worker_f.png differ diff --git a/public/images/trainer/worker_m.png b/public/images/trainer/worker_m.png index 53bfd8047cd..0142c1053c8 100644 Binary files a/public/images/trainer/worker_m.png and b/public/images/trainer/worker_m.png differ diff --git a/public/images/trainer/wulfric.png b/public/images/trainer/wulfric.png index f379afa2260..6f146d502ac 100644 Binary files a/public/images/trainer/wulfric.png and b/public/images/trainer/wulfric.png differ diff --git a/public/images/trainer/youngster_f.png b/public/images/trainer/youngster_f.png index 40b5a947be8..886b1e90963 100644 Binary files a/public/images/trainer/youngster_f.png and b/public/images/trainer/youngster_f.png differ diff --git a/public/images/trainer/youngster_m.png b/public/images/trainer/youngster_m.png index 5f092f96ef1..543536c2412 100644 Binary files a/public/images/trainer/youngster_m.png and b/public/images/trainer/youngster_m.png differ diff --git a/public/images/trainer/zinzolin.png b/public/images/trainer/zinzolin.png index 6c866562989..a376a1cdd7d 100644 Binary files a/public/images/trainer/zinzolin.png and b/public/images/trainer/zinzolin.png differ diff --git a/public/images/types.png b/public/images/types.png index 8b644f1041c..26cb6111c8e 100644 Binary files a/public/images/types.png and b/public/images/types.png differ diff --git a/public/images/types_ca.png b/public/images/types_ca.png index a1c295d7b9b..363589b6421 100644 Binary files a/public/images/types_ca.png and b/public/images/types_ca.png differ diff --git a/public/images/types_da.png b/public/images/types_da.png index f2b7af8967a..c199e078376 100644 Binary files a/public/images/types_da.png and b/public/images/types_da.png differ diff --git a/public/images/types_de.png b/public/images/types_de.png index a033554029c..0e1d77e73b2 100755 Binary files a/public/images/types_de.png and b/public/images/types_de.png differ diff --git a/public/images/types_es-ES.png b/public/images/types_es-ES.png index 3596b7f6a0a..79797df11e0 100644 Binary files a/public/images/types_es-ES.png and b/public/images/types_es-ES.png differ diff --git a/public/images/types_es-MX.png b/public/images/types_es-MX.png index ad159a7c6bb..49c99bfaf35 100644 Binary files a/public/images/types_es-MX.png and b/public/images/types_es-MX.png differ diff --git a/public/images/types_fr.png b/public/images/types_fr.png index bf81bed1b22..4ee31a0fb36 100644 Binary files a/public/images/types_fr.png and b/public/images/types_fr.png differ diff --git a/public/images/types_it.png b/public/images/types_it.png index 3be03aeea68..61079be81c0 100644 Binary files a/public/images/types_it.png and b/public/images/types_it.png differ diff --git a/public/images/types_ja.png b/public/images/types_ja.png index a6f3b00607f..072e723f9a8 100644 Binary files a/public/images/types_ja.png and b/public/images/types_ja.png differ diff --git a/public/images/types_ko.png b/public/images/types_ko.png index 53342ddd3ec..d8f7b2a7761 100644 Binary files a/public/images/types_ko.png and b/public/images/types_ko.png differ diff --git a/public/images/types_pt-BR.png b/public/images/types_pt-BR.png index 71bb1471ff2..58b6b14bcf4 100644 Binary files a/public/images/types_pt-BR.png and b/public/images/types_pt-BR.png differ diff --git a/public/images/types_ro.png b/public/images/types_ro.png index 35b09a37035..4eaadd8877b 100644 Binary files a/public/images/types_ro.png and b/public/images/types_ro.png differ diff --git a/public/images/types_ru.png b/public/images/types_ru.png index 1e0615f721f..8ce9c06f905 100644 Binary files a/public/images/types_ru.png and b/public/images/types_ru.png differ diff --git a/public/images/types_tr.png b/public/images/types_tr.png index 93eae27caa0..828aeb0b741 100644 Binary files a/public/images/types_tr.png and b/public/images/types_tr.png differ diff --git a/public/images/types_zh-CN.png b/public/images/types_zh-CN.png index e1927ad9d3b..52403ed5892 100644 Binary files a/public/images/types_zh-CN.png and b/public/images/types_zh-CN.png differ diff --git a/public/images/types_zh-TW.png b/public/images/types_zh-TW.png index 8b644f1041c..9ebc29f0d4f 100644 Binary files a/public/images/types_zh-TW.png and b/public/images/types_zh-TW.png differ diff --git a/public/images/ui/ability_bar_left.png b/public/images/ui/ability_bar_left.png index 54abe4c5a94..de15f4910d6 100644 Binary files a/public/images/ui/ability_bar_left.png and b/public/images/ui/ability_bar_left.png differ diff --git a/public/images/ui/ability_bar_right.png b/public/images/ui/ability_bar_right.png index 282025bfc74..b8ab048c6b0 100644 Binary files a/public/images/ui/ability_bar_right.png and b/public/images/ui/ability_bar_right.png differ diff --git a/public/images/ui/achv_bar.png b/public/images/ui/achv_bar.png index c2ab2c5c63e..c5ba5fd2c4c 100644 Binary files a/public/images/ui/achv_bar.png and b/public/images/ui/achv_bar.png differ diff --git a/public/images/ui/achv_bar_2.png b/public/images/ui/achv_bar_2.png index 8505760d66e..b4d9af70614 100644 Binary files a/public/images/ui/achv_bar_2.png and b/public/images/ui/achv_bar_2.png differ diff --git a/public/images/ui/achv_bar_3.png b/public/images/ui/achv_bar_3.png index 723e533f741..2a3b26ebfb6 100644 Binary files a/public/images/ui/achv_bar_3.png and b/public/images/ui/achv_bar_3.png differ diff --git a/public/images/ui/achv_bar_4.png b/public/images/ui/achv_bar_4.png index f14026c7a34..2f079bb927c 100644 Binary files a/public/images/ui/achv_bar_4.png and b/public/images/ui/achv_bar_4.png differ diff --git a/public/images/ui/achv_bar_5.png b/public/images/ui/achv_bar_5.png index cc06af91620..0f27058fc7f 100644 Binary files a/public/images/ui/achv_bar_5.png and b/public/images/ui/achv_bar_5.png differ diff --git a/public/images/ui/bg.png b/public/images/ui/bg.png index 9c35e80ff8b..0f73a067181 100644 Binary files a/public/images/ui/bg.png and b/public/images/ui/bg.png differ diff --git a/public/images/ui/bgm_bar.png b/public/images/ui/bgm_bar.png index 54abe4c5a94..de15f4910d6 100644 Binary files a/public/images/ui/bgm_bar.png and b/public/images/ui/bgm_bar.png differ diff --git a/public/images/ui/bmenu_sel.png b/public/images/ui/bmenu_sel.png index c2e28ba2035..a77939dbac3 100644 Binary files a/public/images/ui/bmenu_sel.png and b/public/images/ui/bmenu_sel.png differ diff --git a/public/images/ui/boolean_sel.png b/public/images/ui/boolean_sel.png index d5b212a3088..7f1c86fbb4d 100644 Binary files a/public/images/ui/boolean_sel.png and b/public/images/ui/boolean_sel.png differ diff --git a/public/images/ui/button_tera.png b/public/images/ui/button_tera.png index c9672bafa39..61a65ed4813 100644 Binary files a/public/images/ui/button_tera.png and b/public/images/ui/button_tera.png differ diff --git a/public/images/ui/candy.png b/public/images/ui/candy.png index 6b633a19504..a37358a3f90 100644 Binary files a/public/images/ui/candy.png and b/public/images/ui/candy.png differ diff --git a/public/images/ui/candy_overlay.png b/public/images/ui/candy_overlay.png index 835cfccb05c..e8cadeabb73 100644 Binary files a/public/images/ui/candy_overlay.png and b/public/images/ui/candy_overlay.png differ diff --git a/public/images/ui/champion_ribbon.png b/public/images/ui/champion_ribbon.png index 96e36075d8f..533c20f6821 100644 Binary files a/public/images/ui/champion_ribbon.png and b/public/images/ui/champion_ribbon.png differ diff --git a/public/images/ui/cursor.png b/public/images/ui/cursor.png index 68283fcc22d..0e2f9d98a16 100644 Binary files a/public/images/ui/cursor.png and b/public/images/ui/cursor.png differ diff --git a/public/images/ui/cursor_reverse.png b/public/images/ui/cursor_reverse.png index 40c867e62a5..6048cdcdd86 100644 Binary files a/public/images/ui/cursor_reverse.png and b/public/images/ui/cursor_reverse.png differ diff --git a/public/images/ui/cursor_tera.png b/public/images/ui/cursor_tera.png index 34cbe095895..9d2be35cfac 100644 Binary files a/public/images/ui/cursor_tera.png and b/public/images/ui/cursor_tera.png differ diff --git a/public/images/ui/dawn_icon_bg.png b/public/images/ui/dawn_icon_bg.png index 2983c2744a3..7136582a3c8 100644 Binary files a/public/images/ui/dawn_icon_bg.png and b/public/images/ui/dawn_icon_bg.png differ diff --git a/public/images/ui/dawn_icon_fg.png b/public/images/ui/dawn_icon_fg.png index e6c195bd371..c64f0578073 100644 Binary files a/public/images/ui/dawn_icon_fg.png and b/public/images/ui/dawn_icon_fg.png differ diff --git a/public/images/ui/dawn_icon_mg.png b/public/images/ui/dawn_icon_mg.png index ff32b4418aa..63786fd68fe 100644 Binary files a/public/images/ui/dawn_icon_mg.png and b/public/images/ui/dawn_icon_mg.png differ diff --git a/public/images/ui/day_icon_bg.png b/public/images/ui/day_icon_bg.png index 9028e0309f7..34b812464af 100644 Binary files a/public/images/ui/day_icon_bg.png and b/public/images/ui/day_icon_bg.png differ diff --git a/public/images/ui/day_icon_fg.png b/public/images/ui/day_icon_fg.png index 523f7b1be7e..a480e4d274d 100644 Binary files a/public/images/ui/day_icon_fg.png and b/public/images/ui/day_icon_fg.png differ diff --git a/public/images/ui/day_icon_mg.png b/public/images/ui/day_icon_mg.png index 7a236fa48d3..43b5a011098 100644 Binary files a/public/images/ui/day_icon_mg.png and b/public/images/ui/day_icon_mg.png differ diff --git a/public/images/ui/discord.png b/public/images/ui/discord.png index 1cd833854b0..fd16df3646c 100644 Binary files a/public/images/ui/discord.png and b/public/images/ui/discord.png differ diff --git a/public/images/ui/dusk_icon_bg.png b/public/images/ui/dusk_icon_bg.png index 57d22ec2b21..31d637eb674 100644 Binary files a/public/images/ui/dusk_icon_bg.png and b/public/images/ui/dusk_icon_bg.png differ diff --git a/public/images/ui/dusk_icon_fg.png b/public/images/ui/dusk_icon_fg.png index e0ca1bce79b..b19cf6ae1f8 100644 Binary files a/public/images/ui/dusk_icon_fg.png and b/public/images/ui/dusk_icon_fg.png differ diff --git a/public/images/ui/dusk_icon_mg.png b/public/images/ui/dusk_icon_mg.png index 4e6a880b37f..298b9de6ff7 100644 Binary files a/public/images/ui/dusk_icon_mg.png and b/public/images/ui/dusk_icon_mg.png differ diff --git a/public/images/ui/egg_list_bg.png b/public/images/ui/egg_list_bg.png index 4ec09441866..3dd8ac7386a 100644 Binary files a/public/images/ui/egg_list_bg.png and b/public/images/ui/egg_list_bg.png differ diff --git a/public/images/ui/egg_summary_bg.png b/public/images/ui/egg_summary_bg.png index e81934b9d75..ed602d77bb6 100644 Binary files a/public/images/ui/egg_summary_bg.png and b/public/images/ui/egg_summary_bg.png differ diff --git a/public/images/ui/egg_summary_bg_blank.png b/public/images/ui/egg_summary_bg_blank.png index 09bcb63cfa3..77aed2cadc6 100644 Binary files a/public/images/ui/egg_summary_bg_blank.png and b/public/images/ui/egg_summary_bg_blank.png differ diff --git a/public/images/ui/favorite.png b/public/images/ui/favorite.png index d86dd58f5ab..3c0ea483b65 100644 Binary files a/public/images/ui/favorite.png and b/public/images/ui/favorite.png differ diff --git a/public/images/ui/friendship.png b/public/images/ui/friendship.png index 073adcadc76..16a50f93c79 100644 Binary files a/public/images/ui/friendship.png and b/public/images/ui/friendship.png differ diff --git a/public/images/ui/friendship_overlay.png b/public/images/ui/friendship_overlay.png index 4a4724fbdc9..b6957ded371 100644 Binary files a/public/images/ui/friendship_overlay.png and b/public/images/ui/friendship_overlay.png differ diff --git a/public/images/ui/google.png b/public/images/ui/google.png index 82760552886..3f5389086db 100644 Binary files a/public/images/ui/google.png and b/public/images/ui/google.png differ diff --git a/public/images/ui/ha_capsule.png b/public/images/ui/ha_capsule.png index cccc9cf51d3..a5b2a1e9d42 100644 Binary files a/public/images/ui/ha_capsule.png and b/public/images/ui/ha_capsule.png differ diff --git a/public/images/ui/hall_of_fame_blue.png b/public/images/ui/hall_of_fame_blue.png index 87fadf565fd..2b799070cb1 100644 Binary files a/public/images/ui/hall_of_fame_blue.png and b/public/images/ui/hall_of_fame_blue.png differ diff --git a/public/images/ui/hall_of_fame_red.png b/public/images/ui/hall_of_fame_red.png index 5d4d5e41e9c..df999ae631f 100644 Binary files a/public/images/ui/hall_of_fame_red.png and b/public/images/ui/hall_of_fame_red.png differ diff --git a/public/images/ui/icon_egg_move.png b/public/images/ui/icon_egg_move.png index a5b0bff4ace..3b79a6682d0 100644 Binary files a/public/images/ui/icon_egg_move.png and b/public/images/ui/icon_egg_move.png differ diff --git a/public/images/ui/icon_lock.png b/public/images/ui/icon_lock.png index 6a12efa15e8..6a09f41f182 100644 Binary files a/public/images/ui/icon_lock.png and b/public/images/ui/icon_lock.png differ diff --git a/public/images/ui/icon_owned.png b/public/images/ui/icon_owned.png index 37e2dfd08e6..f4592f33d0f 100644 Binary files a/public/images/ui/icon_owned.png and b/public/images/ui/icon_owned.png differ diff --git a/public/images/ui/icon_spliced.png b/public/images/ui/icon_spliced.png index 1db0d1136ba..edd3049a5c7 100644 Binary files a/public/images/ui/icon_spliced.png and b/public/images/ui/icon_spliced.png differ diff --git a/public/images/ui/icon_stop.png b/public/images/ui/icon_stop.png index 6d9c201695a..ff248e38c8e 100644 Binary files a/public/images/ui/icon_stop.png and b/public/images/ui/icon_stop.png differ diff --git a/public/images/ui/icon_tera.png b/public/images/ui/icon_tera.png index 97673434315..9d2be35cfac 100644 Binary files a/public/images/ui/icon_tera.png and b/public/images/ui/icon_tera.png differ diff --git a/public/images/ui/legacy/ability_bar_left.png b/public/images/ui/legacy/ability_bar_left.png index 7491a9ca527..18a3726eb28 100644 Binary files a/public/images/ui/legacy/ability_bar_left.png and b/public/images/ui/legacy/ability_bar_left.png differ diff --git a/public/images/ui/legacy/ability_bar_right.png b/public/images/ui/legacy/ability_bar_right.png index 3dcb845b3c9..8b5954d5624 100644 Binary files a/public/images/ui/legacy/ability_bar_right.png and b/public/images/ui/legacy/ability_bar_right.png differ diff --git a/public/images/ui/legacy/achv_bar.png b/public/images/ui/legacy/achv_bar.png index 442b43343cc..7e5f5d5f8c7 100644 Binary files a/public/images/ui/legacy/achv_bar.png and b/public/images/ui/legacy/achv_bar.png differ diff --git a/public/images/ui/legacy/achv_bar_2.png b/public/images/ui/legacy/achv_bar_2.png index 23ffca0a7d9..87d19379f01 100644 Binary files a/public/images/ui/legacy/achv_bar_2.png and b/public/images/ui/legacy/achv_bar_2.png differ diff --git a/public/images/ui/legacy/achv_bar_3.png b/public/images/ui/legacy/achv_bar_3.png index e2697234ecd..874e2384b1a 100644 Binary files a/public/images/ui/legacy/achv_bar_3.png and b/public/images/ui/legacy/achv_bar_3.png differ diff --git a/public/images/ui/legacy/achv_bar_4.png b/public/images/ui/legacy/achv_bar_4.png index d52fbfd055e..c0032288a00 100644 Binary files a/public/images/ui/legacy/achv_bar_4.png and b/public/images/ui/legacy/achv_bar_4.png differ diff --git a/public/images/ui/legacy/achv_bar_5.png b/public/images/ui/legacy/achv_bar_5.png index dae7a30dec0..ea6830b53ef 100644 Binary files a/public/images/ui/legacy/achv_bar_5.png and b/public/images/ui/legacy/achv_bar_5.png differ diff --git a/public/images/ui/legacy/bg.png b/public/images/ui/legacy/bg.png index 0b1ec4fac1a..d5b3f127ad8 100644 Binary files a/public/images/ui/legacy/bg.png and b/public/images/ui/legacy/bg.png differ diff --git a/public/images/ui/legacy/bgm_bar.png b/public/images/ui/legacy/bgm_bar.png index fedeb323fc2..bdcbf4cceee 100644 Binary files a/public/images/ui/legacy/bgm_bar.png and b/public/images/ui/legacy/bgm_bar.png differ diff --git a/public/images/ui/legacy/bmenu_sel.png b/public/images/ui/legacy/bmenu_sel.png index fe54fa918cf..8058a569e7d 100644 Binary files a/public/images/ui/legacy/bmenu_sel.png and b/public/images/ui/legacy/bmenu_sel.png differ diff --git a/public/images/ui/legacy/boolean_sel.png b/public/images/ui/legacy/boolean_sel.png index bd832fa1289..5ae1bba4bb2 100644 Binary files a/public/images/ui/legacy/boolean_sel.png and b/public/images/ui/legacy/boolean_sel.png differ diff --git a/public/images/ui/legacy/button_tera.png b/public/images/ui/legacy/button_tera.png index c9672bafa39..61a65ed4813 100644 Binary files a/public/images/ui/legacy/button_tera.png and b/public/images/ui/legacy/button_tera.png differ diff --git a/public/images/ui/legacy/candy.png b/public/images/ui/legacy/candy.png index 6b633a19504..a37358a3f90 100644 Binary files a/public/images/ui/legacy/candy.png and b/public/images/ui/legacy/candy.png differ diff --git a/public/images/ui/legacy/candy_overlay.png b/public/images/ui/legacy/candy_overlay.png index 835cfccb05c..e8cadeabb73 100644 Binary files a/public/images/ui/legacy/candy_overlay.png and b/public/images/ui/legacy/candy_overlay.png differ diff --git a/public/images/ui/legacy/champion_ribbon.png b/public/images/ui/legacy/champion_ribbon.png index 96e36075d8f..533c20f6821 100644 Binary files a/public/images/ui/legacy/champion_ribbon.png and b/public/images/ui/legacy/champion_ribbon.png differ diff --git a/public/images/ui/legacy/cursor.png b/public/images/ui/legacy/cursor.png index 39d7b7977ee..deadae321e3 100644 Binary files a/public/images/ui/legacy/cursor.png and b/public/images/ui/legacy/cursor.png differ diff --git a/public/images/ui/legacy/cursor_reverse.png b/public/images/ui/legacy/cursor_reverse.png index 57fb297747e..a13304f0956 100644 Binary files a/public/images/ui/legacy/cursor_reverse.png and b/public/images/ui/legacy/cursor_reverse.png differ diff --git a/public/images/ui/legacy/cursor_tera.png b/public/images/ui/legacy/cursor_tera.png index f2e77046137..cccdb7c68b1 100644 Binary files a/public/images/ui/legacy/cursor_tera.png and b/public/images/ui/legacy/cursor_tera.png differ diff --git a/public/images/ui/legacy/dawn_icon_bg.png b/public/images/ui/legacy/dawn_icon_bg.png index 87c4d75cd94..6521aa78765 100644 Binary files a/public/images/ui/legacy/dawn_icon_bg.png and b/public/images/ui/legacy/dawn_icon_bg.png differ diff --git a/public/images/ui/legacy/dawn_icon_fg.png b/public/images/ui/legacy/dawn_icon_fg.png index db985f953d3..1b82ad2dfcf 100644 Binary files a/public/images/ui/legacy/dawn_icon_fg.png and b/public/images/ui/legacy/dawn_icon_fg.png differ diff --git a/public/images/ui/legacy/dawn_icon_mg.png b/public/images/ui/legacy/dawn_icon_mg.png index 442cb1b674c..c259ea4e068 100644 Binary files a/public/images/ui/legacy/dawn_icon_mg.png and b/public/images/ui/legacy/dawn_icon_mg.png differ diff --git a/public/images/ui/legacy/day_icon_bg.png b/public/images/ui/legacy/day_icon_bg.png index 3db0dab4589..9c79cabfe26 100644 Binary files a/public/images/ui/legacy/day_icon_bg.png and b/public/images/ui/legacy/day_icon_bg.png differ diff --git a/public/images/ui/legacy/day_icon_fg.png b/public/images/ui/legacy/day_icon_fg.png index 657c82e5dbd..79872f95202 100644 Binary files a/public/images/ui/legacy/day_icon_fg.png and b/public/images/ui/legacy/day_icon_fg.png differ diff --git a/public/images/ui/legacy/day_icon_mg.png b/public/images/ui/legacy/day_icon_mg.png index 90fce4a761c..132d23bd8a3 100644 Binary files a/public/images/ui/legacy/day_icon_mg.png and b/public/images/ui/legacy/day_icon_mg.png differ diff --git a/public/images/ui/legacy/discord.png b/public/images/ui/legacy/discord.png index eac801cdd9d..1bb254b1594 100644 Binary files a/public/images/ui/legacy/discord.png and b/public/images/ui/legacy/discord.png differ diff --git a/public/images/ui/legacy/dusk_icon_bg.png b/public/images/ui/legacy/dusk_icon_bg.png index 7610a2e67f8..d5e29169fa8 100644 Binary files a/public/images/ui/legacy/dusk_icon_bg.png and b/public/images/ui/legacy/dusk_icon_bg.png differ diff --git a/public/images/ui/legacy/dusk_icon_fg.png b/public/images/ui/legacy/dusk_icon_fg.png index d4bbb98fdd1..f8adaf11a83 100644 Binary files a/public/images/ui/legacy/dusk_icon_fg.png and b/public/images/ui/legacy/dusk_icon_fg.png differ diff --git a/public/images/ui/legacy/dusk_icon_mg.png b/public/images/ui/legacy/dusk_icon_mg.png index dc603f8ca79..b889cab0e4f 100644 Binary files a/public/images/ui/legacy/dusk_icon_mg.png and b/public/images/ui/legacy/dusk_icon_mg.png differ diff --git a/public/images/ui/legacy/egg_list_bg.png b/public/images/ui/legacy/egg_list_bg.png index 932d01d335f..2d08756679e 100644 Binary files a/public/images/ui/legacy/egg_list_bg.png and b/public/images/ui/legacy/egg_list_bg.png differ diff --git a/public/images/ui/legacy/egg_summary_bg.png b/public/images/ui/legacy/egg_summary_bg.png index 658f5df0e96..8affc928028 100644 Binary files a/public/images/ui/legacy/egg_summary_bg.png and b/public/images/ui/legacy/egg_summary_bg.png differ diff --git a/public/images/ui/legacy/favorite.png b/public/images/ui/legacy/favorite.png index d86dd58f5ab..3c0ea483b65 100644 Binary files a/public/images/ui/legacy/favorite.png and b/public/images/ui/legacy/favorite.png differ diff --git a/public/images/ui/legacy/friendship.png b/public/images/ui/legacy/friendship.png index 073adcadc76..16a50f93c79 100644 Binary files a/public/images/ui/legacy/friendship.png and b/public/images/ui/legacy/friendship.png differ diff --git a/public/images/ui/legacy/friendship_overlay.png b/public/images/ui/legacy/friendship_overlay.png index 4a4724fbdc9..b6957ded371 100644 Binary files a/public/images/ui/legacy/friendship_overlay.png and b/public/images/ui/legacy/friendship_overlay.png differ diff --git a/public/images/ui/legacy/google.png b/public/images/ui/legacy/google.png index 82760552886..3f5389086db 100644 Binary files a/public/images/ui/legacy/google.png and b/public/images/ui/legacy/google.png differ diff --git a/public/images/ui/legacy/ha_capsule.png b/public/images/ui/legacy/ha_capsule.png index cccc9cf51d3..a5b2a1e9d42 100644 Binary files a/public/images/ui/legacy/ha_capsule.png and b/public/images/ui/legacy/ha_capsule.png differ diff --git a/public/images/ui/legacy/hall_of_fame_blue.png b/public/images/ui/legacy/hall_of_fame_blue.png index 87fadf565fd..2b799070cb1 100644 Binary files a/public/images/ui/legacy/hall_of_fame_blue.png and b/public/images/ui/legacy/hall_of_fame_blue.png differ diff --git a/public/images/ui/legacy/hall_of_fame_red.png b/public/images/ui/legacy/hall_of_fame_red.png index 5d4d5e41e9c..df999ae631f 100644 Binary files a/public/images/ui/legacy/hall_of_fame_red.png and b/public/images/ui/legacy/hall_of_fame_red.png differ diff --git a/public/images/ui/legacy/icon_egg_move.png b/public/images/ui/legacy/icon_egg_move.png index a5b0bff4ace..3b79a6682d0 100644 Binary files a/public/images/ui/legacy/icon_egg_move.png and b/public/images/ui/legacy/icon_egg_move.png differ diff --git a/public/images/ui/legacy/icon_lock.png b/public/images/ui/legacy/icon_lock.png index 6a12efa15e8..6a09f41f182 100644 Binary files a/public/images/ui/legacy/icon_lock.png and b/public/images/ui/legacy/icon_lock.png differ diff --git a/public/images/ui/legacy/icon_owned.png b/public/images/ui/legacy/icon_owned.png index 21e03afec60..6fe9dacd3e7 100644 Binary files a/public/images/ui/legacy/icon_owned.png and b/public/images/ui/legacy/icon_owned.png differ diff --git a/public/images/ui/legacy/icon_spliced.png b/public/images/ui/legacy/icon_spliced.png index 1db0d1136ba..edd3049a5c7 100644 Binary files a/public/images/ui/legacy/icon_spliced.png and b/public/images/ui/legacy/icon_spliced.png differ diff --git a/public/images/ui/legacy/icon_stop.png b/public/images/ui/legacy/icon_stop.png index 6d9c201695a..ff248e38c8e 100644 Binary files a/public/images/ui/legacy/icon_stop.png and b/public/images/ui/legacy/icon_stop.png differ diff --git a/public/images/ui/legacy/icon_tera.png b/public/images/ui/legacy/icon_tera.png index d178ca8fcb9..90d30ee9db6 100644 Binary files a/public/images/ui/legacy/icon_tera.png and b/public/images/ui/legacy/icon_tera.png differ diff --git a/public/images/ui/legacy/link_icon.png b/public/images/ui/legacy/link_icon.png index 56081261b9c..1e20ab56ec7 100644 Binary files a/public/images/ui/legacy/link_icon.png and b/public/images/ui/legacy/link_icon.png differ diff --git a/public/images/ui/legacy/mmenu_sel.png b/public/images/ui/legacy/mmenu_sel.png index 26952f7ece9..64b388876da 100644 Binary files a/public/images/ui/legacy/mmenu_sel.png and b/public/images/ui/legacy/mmenu_sel.png differ diff --git a/public/images/ui/legacy/mystery_egg.png b/public/images/ui/legacy/mystery_egg.png index bb117a137b0..83ad626da7e 100644 Binary files a/public/images/ui/legacy/mystery_egg.png and b/public/images/ui/legacy/mystery_egg.png differ diff --git a/public/images/ui/legacy/namebox.png b/public/images/ui/legacy/namebox.png index 25659f9dd40..5eea1504d77 100644 Binary files a/public/images/ui/legacy/namebox.png and b/public/images/ui/legacy/namebox.png differ diff --git a/public/images/ui/legacy/night_icon_bg.png b/public/images/ui/legacy/night_icon_bg.png index c32ee1ebd2a..ea2febb3cc1 100644 Binary files a/public/images/ui/legacy/night_icon_bg.png and b/public/images/ui/legacy/night_icon_bg.png differ diff --git a/public/images/ui/legacy/night_icon_fg.png b/public/images/ui/legacy/night_icon_fg.png index 737cca3305e..d8eceed3e37 100644 Binary files a/public/images/ui/legacy/night_icon_fg.png and b/public/images/ui/legacy/night_icon_fg.png differ diff --git a/public/images/ui/legacy/normal_memory.png b/public/images/ui/legacy/normal_memory.png index ddc22d1d4ab..604371dcc7c 100644 Binary files a/public/images/ui/legacy/normal_memory.png and b/public/images/ui/legacy/normal_memory.png differ diff --git a/public/images/ui/legacy/numbers.png b/public/images/ui/legacy/numbers.png index ba48453fa60..6157774d58e 100644 Binary files a/public/images/ui/legacy/numbers.png and b/public/images/ui/legacy/numbers.png differ diff --git a/public/images/ui/legacy/numbers_alt.png b/public/images/ui/legacy/numbers_alt.png index 1512ef435d0..fb510465471 100644 Binary files a/public/images/ui/legacy/numbers_alt.png and b/public/images/ui/legacy/numbers_alt.png differ diff --git a/public/images/ui/legacy/numbers_red.png b/public/images/ui/legacy/numbers_red.png index acafb20c98a..f0d885d304d 100644 Binary files a/public/images/ui/legacy/numbers_red.png and b/public/images/ui/legacy/numbers_red.png differ diff --git a/public/images/ui/legacy/numbers_red_alt.png b/public/images/ui/legacy/numbers_red_alt.png index 90b6f109289..d9edb0468d8 100644 Binary files a/public/images/ui/legacy/numbers_red_alt.png and b/public/images/ui/legacy/numbers_red_alt.png differ diff --git a/public/images/ui/legacy/overlay_exp.png b/public/images/ui/legacy/overlay_exp.png index 51166cd9e62..85d0cad7bfb 100644 Binary files a/public/images/ui/legacy/overlay_exp.png and b/public/images/ui/legacy/overlay_exp.png differ diff --git a/public/images/ui/legacy/overlay_hp.png b/public/images/ui/legacy/overlay_hp.png index 9855c6106f4..75607c199f5 100644 Binary files a/public/images/ui/legacy/overlay_hp.png and b/public/images/ui/legacy/overlay_hp.png differ diff --git a/public/images/ui/legacy/overlay_hp_boss.png b/public/images/ui/legacy/overlay_hp_boss.png index d7dc3b74e0f..8bfb4524007 100644 Binary files a/public/images/ui/legacy/overlay_hp_boss.png and b/public/images/ui/legacy/overlay_hp_boss.png differ diff --git a/public/images/ui/legacy/overlay_lv.png b/public/images/ui/legacy/overlay_lv.png index d79614f41eb..fdcbb1c7082 100644 Binary files a/public/images/ui/legacy/overlay_lv.png and b/public/images/ui/legacy/overlay_lv.png differ diff --git a/public/images/ui/legacy/overlay_lv_alt.png b/public/images/ui/legacy/overlay_lv_alt.png index 75b90a2ee4c..f7a76955e7b 100644 Binary files a/public/images/ui/legacy/overlay_lv_alt.png and b/public/images/ui/legacy/overlay_lv_alt.png differ diff --git a/public/images/ui/legacy/overlay_message.png b/public/images/ui/legacy/overlay_message.png index 9e58d86fc8b..769b2ae8144 100644 Binary files a/public/images/ui/legacy/overlay_message.png and b/public/images/ui/legacy/overlay_message.png differ diff --git a/public/images/ui/legacy/party_bg.png b/public/images/ui/legacy/party_bg.png index 323de1856c8..cdade735b4a 100644 Binary files a/public/images/ui/legacy/party_bg.png and b/public/images/ui/legacy/party_bg.png differ diff --git a/public/images/ui/legacy/party_bg_double.png b/public/images/ui/legacy/party_bg_double.png index 89beff1edf0..8e00bd6c293 100644 Binary files a/public/images/ui/legacy/party_bg_double.png and b/public/images/ui/legacy/party_bg_double.png differ diff --git a/public/images/ui/legacy/party_cancel.png b/public/images/ui/legacy/party_cancel.png index 4219c8d33c4..9836b9ced2d 100644 Binary files a/public/images/ui/legacy/party_cancel.png and b/public/images/ui/legacy/party_cancel.png differ diff --git a/public/images/ui/legacy/party_exp_bar.png b/public/images/ui/legacy/party_exp_bar.png index 0a514b43393..61757a97c2d 100644 Binary files a/public/images/ui/legacy/party_exp_bar.png and b/public/images/ui/legacy/party_exp_bar.png differ diff --git a/public/images/ui/legacy/party_pb.png b/public/images/ui/legacy/party_pb.png index a1e5f7a9bf7..cd8b9726155 100644 Binary files a/public/images/ui/legacy/party_pb.png and b/public/images/ui/legacy/party_pb.png differ diff --git a/public/images/ui/legacy/party_slot.png b/public/images/ui/legacy/party_slot.png index c7a2eb5c082..162f321ece5 100644 Binary files a/public/images/ui/legacy/party_slot.png and b/public/images/ui/legacy/party_slot.png differ diff --git a/public/images/ui/legacy/party_slot_hp_bar.png b/public/images/ui/legacy/party_slot_hp_bar.png index 13ac7436cc7..6a37002744c 100644 Binary files a/public/images/ui/legacy/party_slot_hp_bar.png and b/public/images/ui/legacy/party_slot_hp_bar.png differ diff --git a/public/images/ui/legacy/party_slot_hp_overlay.png b/public/images/ui/legacy/party_slot_hp_overlay.png index 360a3cd17fa..859adab148c 100644 Binary files a/public/images/ui/legacy/party_slot_hp_overlay.png and b/public/images/ui/legacy/party_slot_hp_overlay.png differ diff --git a/public/images/ui/legacy/party_slot_main.png b/public/images/ui/legacy/party_slot_main.png index 06eb9b03a7d..cb4af766597 100644 Binary files a/public/images/ui/legacy/party_slot_main.png and b/public/images/ui/legacy/party_slot_main.png differ diff --git a/public/images/ui/legacy/party_slot_overlay_hp.png b/public/images/ui/legacy/party_slot_overlay_hp.png index 8c15c63f31a..2eebb557cce 100644 Binary files a/public/images/ui/legacy/party_slot_overlay_hp.png and b/public/images/ui/legacy/party_slot_overlay_hp.png differ diff --git a/public/images/ui/legacy/party_slot_overlay_lv.png b/public/images/ui/legacy/party_slot_overlay_lv.png index 57d901a7d3d..11bb545c7af 100644 Binary files a/public/images/ui/legacy/party_slot_overlay_lv.png and b/public/images/ui/legacy/party_slot_overlay_lv.png differ diff --git a/public/images/ui/legacy/party_slot_overlay_lv_alt.png b/public/images/ui/legacy/party_slot_overlay_lv_alt.png index a52b9c2fa60..387dfec6b22 100644 Binary files a/public/images/ui/legacy/party_slot_overlay_lv_alt.png and b/public/images/ui/legacy/party_slot_overlay_lv_alt.png differ diff --git a/public/images/ui/legacy/passive_bg.png b/public/images/ui/legacy/passive_bg.png index 1e18a47b881..4a3fa1ec72b 100644 Binary files a/public/images/ui/legacy/passive_bg.png and b/public/images/ui/legacy/passive_bg.png differ diff --git a/public/images/ui/legacy/pb_tray_ball.png b/public/images/ui/legacy/pb_tray_ball.png index 112184f8593..671db0c0b15 100644 Binary files a/public/images/ui/legacy/pb_tray_ball.png and b/public/images/ui/legacy/pb_tray_ball.png differ diff --git a/public/images/ui/legacy/pb_tray_overlay_enemy.png b/public/images/ui/legacy/pb_tray_overlay_enemy.png index c557ac736fc..86ac85f946f 100644 Binary files a/public/images/ui/legacy/pb_tray_overlay_enemy.png and b/public/images/ui/legacy/pb_tray_overlay_enemy.png differ diff --git a/public/images/ui/legacy/pb_tray_overlay_player.png b/public/images/ui/legacy/pb_tray_overlay_player.png index 4a065de5d7d..de0b01502c0 100644 Binary files a/public/images/ui/legacy/pb_tray_overlay_player.png and b/public/images/ui/legacy/pb_tray_overlay_player.png differ diff --git a/public/images/ui/legacy/pbinfo_enemy_boss.png b/public/images/ui/legacy/pbinfo_enemy_boss.png index cffefd32396..98b2f09f941 100644 Binary files a/public/images/ui/legacy/pbinfo_enemy_boss.png and b/public/images/ui/legacy/pbinfo_enemy_boss.png differ diff --git a/public/images/ui/legacy/pbinfo_enemy_boss_stats.png b/public/images/ui/legacy/pbinfo_enemy_boss_stats.png index faca8887ff5..bf4b3d61d12 100644 Binary files a/public/images/ui/legacy/pbinfo_enemy_boss_stats.png and b/public/images/ui/legacy/pbinfo_enemy_boss_stats.png differ diff --git a/public/images/ui/legacy/pbinfo_enemy_mini.png b/public/images/ui/legacy/pbinfo_enemy_mini.png index 908ea10606f..c1c002a4b21 100644 Binary files a/public/images/ui/legacy/pbinfo_enemy_mini.png and b/public/images/ui/legacy/pbinfo_enemy_mini.png differ diff --git a/public/images/ui/legacy/pbinfo_enemy_mini_stats.png b/public/images/ui/legacy/pbinfo_enemy_mini_stats.png index eb32e694134..e6eaaa3be9e 100644 Binary files a/public/images/ui/legacy/pbinfo_enemy_mini_stats.png and b/public/images/ui/legacy/pbinfo_enemy_mini_stats.png differ diff --git a/public/images/ui/legacy/pbinfo_enemy_type.png b/public/images/ui/legacy/pbinfo_enemy_type.png index d89e360af86..27cb481e861 100644 Binary files a/public/images/ui/legacy/pbinfo_enemy_type.png and b/public/images/ui/legacy/pbinfo_enemy_type.png differ diff --git a/public/images/ui/legacy/pbinfo_enemy_type1.png b/public/images/ui/legacy/pbinfo_enemy_type1.png index f882e56ac88..df44b5bad5d 100644 Binary files a/public/images/ui/legacy/pbinfo_enemy_type1.png and b/public/images/ui/legacy/pbinfo_enemy_type1.png differ diff --git a/public/images/ui/legacy/pbinfo_enemy_type2.png b/public/images/ui/legacy/pbinfo_enemy_type2.png index f882e56ac88..df44b5bad5d 100644 Binary files a/public/images/ui/legacy/pbinfo_enemy_type2.png and b/public/images/ui/legacy/pbinfo_enemy_type2.png differ diff --git a/public/images/ui/legacy/pbinfo_player.png b/public/images/ui/legacy/pbinfo_player.png index 825a9eafec2..60c92f886aa 100644 Binary files a/public/images/ui/legacy/pbinfo_player.png and b/public/images/ui/legacy/pbinfo_player.png differ diff --git a/public/images/ui/legacy/pbinfo_player_mini.png b/public/images/ui/legacy/pbinfo_player_mini.png index 1ccaf4efd65..120e9592ab9 100644 Binary files a/public/images/ui/legacy/pbinfo_player_mini.png and b/public/images/ui/legacy/pbinfo_player_mini.png differ diff --git a/public/images/ui/legacy/pbinfo_player_mini_stats.png b/public/images/ui/legacy/pbinfo_player_mini_stats.png index dd2b7e65ba3..00bb687296c 100644 Binary files a/public/images/ui/legacy/pbinfo_player_mini_stats.png and b/public/images/ui/legacy/pbinfo_player_mini_stats.png differ diff --git a/public/images/ui/legacy/pbinfo_player_stats.png b/public/images/ui/legacy/pbinfo_player_stats.png index 078248624bc..6bf984a94dc 100644 Binary files a/public/images/ui/legacy/pbinfo_player_stats.png and b/public/images/ui/legacy/pbinfo_player_stats.png differ diff --git a/public/images/ui/legacy/pbinfo_player_type.png b/public/images/ui/legacy/pbinfo_player_type.png index 1a8b82855f6..5bfc5545067 100644 Binary files a/public/images/ui/legacy/pbinfo_player_type.png and b/public/images/ui/legacy/pbinfo_player_type.png differ diff --git a/public/images/ui/legacy/pbinfo_player_type1.png b/public/images/ui/legacy/pbinfo_player_type1.png index f882e56ac88..df44b5bad5d 100644 Binary files a/public/images/ui/legacy/pbinfo_player_type1.png and b/public/images/ui/legacy/pbinfo_player_type1.png differ diff --git a/public/images/ui/legacy/pbinfo_player_type2.png b/public/images/ui/legacy/pbinfo_player_type2.png index f882e56ac88..df44b5bad5d 100644 Binary files a/public/images/ui/legacy/pbinfo_player_type2.png and b/public/images/ui/legacy/pbinfo_player_type2.png differ diff --git a/public/images/ui/legacy/pbinfo_stat.png b/public/images/ui/legacy/pbinfo_stat.png index 18b0ca314de..25c94f9a807 100644 Binary files a/public/images/ui/legacy/pbinfo_stat.png and b/public/images/ui/legacy/pbinfo_stat.png differ diff --git a/public/images/ui/legacy/pbinfo_stat_numbers.png b/public/images/ui/legacy/pbinfo_stat_numbers.png index b02dfbec72f..5d27caa8efa 100644 Binary files a/public/images/ui/legacy/pbinfo_stat_numbers.png and b/public/images/ui/legacy/pbinfo_stat_numbers.png differ diff --git a/public/images/ui/legacy/pokedex_summary_bg.png b/public/images/ui/legacy/pokedex_summary_bg.png index 690df1547c0..7323f99a913 100644 Binary files a/public/images/ui/legacy/pokedex_summary_bg.png and b/public/images/ui/legacy/pokedex_summary_bg.png differ diff --git a/public/images/ui/legacy/prompt.png b/public/images/ui/legacy/prompt.png index ee74128ce56..d70362d1958 100644 Binary files a/public/images/ui/legacy/prompt.png and b/public/images/ui/legacy/prompt.png differ diff --git a/public/images/ui/legacy/saving_icon.png b/public/images/ui/legacy/saving_icon.png index fddff8c2d39..772fa91fb8c 100644 Binary files a/public/images/ui/legacy/saving_icon.png and b/public/images/ui/legacy/saving_icon.png differ diff --git a/public/images/ui/legacy/scroll_bar.png b/public/images/ui/legacy/scroll_bar.png index e4e5eb34dd2..1e8f53cd29e 100644 Binary files a/public/images/ui/legacy/scroll_bar.png and b/public/images/ui/legacy/scroll_bar.png differ diff --git a/public/images/ui/legacy/scroll_bar_handle.png b/public/images/ui/legacy/scroll_bar_handle.png index 95a1726b3ba..18532fb4dc1 100644 Binary files a/public/images/ui/legacy/scroll_bar_handle.png and b/public/images/ui/legacy/scroll_bar_handle.png differ diff --git a/public/images/ui/legacy/select_cursor_highlight_thick.png b/public/images/ui/legacy/select_cursor_highlight_thick.png index d9a1532862e..6b013b3747e 100644 Binary files a/public/images/ui/legacy/select_cursor_highlight_thick.png and b/public/images/ui/legacy/select_cursor_highlight_thick.png differ diff --git a/public/images/ui/legacy/settings_icon.png b/public/images/ui/legacy/settings_icon.png index 21680cce7fc..5963317affa 100644 Binary files a/public/images/ui/legacy/settings_icon.png and b/public/images/ui/legacy/settings_icon.png differ diff --git a/public/images/ui/legacy/shiny.png b/public/images/ui/legacy/shiny.png index 26d7814fb0b..362f8f48ff1 100644 Binary files a/public/images/ui/legacy/shiny.png and b/public/images/ui/legacy/shiny.png differ diff --git a/public/images/ui/legacy/shiny_1.png b/public/images/ui/legacy/shiny_1.png index 9c7a583a7f9..5154761124c 100644 Binary files a/public/images/ui/legacy/shiny_1.png and b/public/images/ui/legacy/shiny_1.png differ diff --git a/public/images/ui/legacy/shiny_icons.png b/public/images/ui/legacy/shiny_icons.png index f601d908d32..685f7b8af97 100644 Binary files a/public/images/ui/legacy/shiny_icons.png and b/public/images/ui/legacy/shiny_icons.png differ diff --git a/public/images/ui/legacy/shiny_small.png b/public/images/ui/legacy/shiny_small.png index e3d8e260573..66a8b12b876 100644 Binary files a/public/images/ui/legacy/shiny_small.png and b/public/images/ui/legacy/shiny_small.png differ diff --git a/public/images/ui/legacy/starter_container_bg.png b/public/images/ui/legacy/starter_container_bg.png index 5b60fcf551e..887616a8c87 100644 Binary files a/public/images/ui/legacy/starter_container_bg.png and b/public/images/ui/legacy/starter_container_bg.png differ diff --git a/public/images/ui/legacy/starter_select_bg.png b/public/images/ui/legacy/starter_select_bg.png index a94e470df0d..501e892969e 100644 Binary files a/public/images/ui/legacy/starter_select_bg.png and b/public/images/ui/legacy/starter_select_bg.png differ diff --git a/public/images/ui/legacy/summary_bg.png b/public/images/ui/legacy/summary_bg.png index c482b5a1bf1..261b4974fb7 100644 Binary files a/public/images/ui/legacy/summary_bg.png and b/public/images/ui/legacy/summary_bg.png differ diff --git a/public/images/ui/legacy/summary_moves.png b/public/images/ui/legacy/summary_moves.png index 54ddf0fb2c7..ab909588160 100644 Binary files a/public/images/ui/legacy/summary_moves.png and b/public/images/ui/legacy/summary_moves.png differ diff --git a/public/images/ui/legacy/summary_moves_cursor.png b/public/images/ui/legacy/summary_moves_cursor.png index 6b8314b66ca..7375cedcdf6 100644 Binary files a/public/images/ui/legacy/summary_moves_cursor.png and b/public/images/ui/legacy/summary_moves_cursor.png differ diff --git a/public/images/ui/legacy/summary_moves_effect.png b/public/images/ui/legacy/summary_moves_effect.png index 8d6ef024cf3..34d59970c99 100644 Binary files a/public/images/ui/legacy/summary_moves_effect.png and b/public/images/ui/legacy/summary_moves_effect.png differ diff --git a/public/images/ui/legacy/summary_moves_overlay_pp.png b/public/images/ui/legacy/summary_moves_overlay_pp.png index a42c86f28ea..9babffc0429 100644 Binary files a/public/images/ui/legacy/summary_moves_overlay_pp.png and b/public/images/ui/legacy/summary_moves_overlay_pp.png differ diff --git a/public/images/ui/legacy/summary_moves_overlay_row.png b/public/images/ui/legacy/summary_moves_overlay_row.png index 5b3e3d3e940..221a0f99a53 100644 Binary files a/public/images/ui/legacy/summary_moves_overlay_row.png and b/public/images/ui/legacy/summary_moves_overlay_row.png differ diff --git a/public/images/ui/legacy/summary_overlay_shiny.png b/public/images/ui/legacy/summary_overlay_shiny.png index e4ab820730a..bb2436738a8 100644 Binary files a/public/images/ui/legacy/summary_overlay_shiny.png and b/public/images/ui/legacy/summary_overlay_shiny.png differ diff --git a/public/images/ui/legacy/summary_profile.png b/public/images/ui/legacy/summary_profile.png index 77d59dac177..0b5b2ffec05 100644 Binary files a/public/images/ui/legacy/summary_profile.png and b/public/images/ui/legacy/summary_profile.png differ diff --git a/public/images/ui/legacy/summary_profile_ability.png b/public/images/ui/legacy/summary_profile_ability.png index 84c41556ab0..a803323564b 100644 Binary files a/public/images/ui/legacy/summary_profile_ability.png and b/public/images/ui/legacy/summary_profile_ability.png differ diff --git a/public/images/ui/legacy/summary_profile_passive.png b/public/images/ui/legacy/summary_profile_passive.png index 8d70a54b2a4..1ff9ad8e09a 100644 Binary files a/public/images/ui/legacy/summary_profile_passive.png and b/public/images/ui/legacy/summary_profile_passive.png differ diff --git a/public/images/ui/legacy/summary_profile_prompt_a.png b/public/images/ui/legacy/summary_profile_prompt_a.png index 146f1a862e5..f40127ec5ab 100644 Binary files a/public/images/ui/legacy/summary_profile_prompt_a.png and b/public/images/ui/legacy/summary_profile_prompt_a.png differ diff --git a/public/images/ui/legacy/summary_profile_prompt_z.png b/public/images/ui/legacy/summary_profile_prompt_z.png index ed842718914..eaa158eaddf 100644 Binary files a/public/images/ui/legacy/summary_profile_prompt_z.png and b/public/images/ui/legacy/summary_profile_prompt_z.png differ diff --git a/public/images/ui/legacy/summary_stats.png b/public/images/ui/legacy/summary_stats.png index de8baecc7d4..660fbee6df6 100644 Binary files a/public/images/ui/legacy/summary_stats.png and b/public/images/ui/legacy/summary_stats.png differ diff --git a/public/images/ui/legacy/summary_status.png b/public/images/ui/legacy/summary_status.png index 4a5b27e9e2b..95bd7533258 100644 Binary files a/public/images/ui/legacy/summary_status.png and b/public/images/ui/legacy/summary_status.png differ diff --git a/public/images/ui/legacy/summary_tabs_1.png b/public/images/ui/legacy/summary_tabs_1.png index ff38096fcd8..379768ea310 100644 Binary files a/public/images/ui/legacy/summary_tabs_1.png and b/public/images/ui/legacy/summary_tabs_1.png differ diff --git a/public/images/ui/legacy/summary_tabs_2.png b/public/images/ui/legacy/summary_tabs_2.png index f147d1b8385..2a04879b32b 100644 Binary files a/public/images/ui/legacy/summary_tabs_2.png and b/public/images/ui/legacy/summary_tabs_2.png differ diff --git a/public/images/ui/legacy/summary_tabs_3.png b/public/images/ui/legacy/summary_tabs_3.png index cf882988664..ef65774f744 100644 Binary files a/public/images/ui/legacy/summary_tabs_3.png and b/public/images/ui/legacy/summary_tabs_3.png differ diff --git a/public/images/ui/legacy/type_bgs.png b/public/images/ui/legacy/type_bgs.png index 6e682d9c327..c060ac46428 100644 Binary files a/public/images/ui/legacy/type_bgs.png and b/public/images/ui/legacy/type_bgs.png differ diff --git a/public/images/ui/legacy/type_tera.png b/public/images/ui/legacy/type_tera.png index 5c35966a6f4..f7f644cec5d 100644 Binary files a/public/images/ui/legacy/type_tera.png and b/public/images/ui/legacy/type_tera.png differ diff --git a/public/images/ui/legacy/unlink_icon.png b/public/images/ui/legacy/unlink_icon.png index f0da5f8e3ed..36723390363 100644 Binary files a/public/images/ui/legacy/unlink_icon.png and b/public/images/ui/legacy/unlink_icon.png differ diff --git a/public/images/ui/legacy/windows/window_1.png b/public/images/ui/legacy/windows/window_1.png index edfef03f924..355a25c17b3 100644 Binary files a/public/images/ui/legacy/windows/window_1.png and b/public/images/ui/legacy/windows/window_1.png differ diff --git a/public/images/ui/legacy/windows/window_1_thin.png b/public/images/ui/legacy/windows/window_1_thin.png index 4648d812f17..1e71eae928b 100644 Binary files a/public/images/ui/legacy/windows/window_1_thin.png and b/public/images/ui/legacy/windows/window_1_thin.png differ diff --git a/public/images/ui/legacy/windows/window_1_xthin.png b/public/images/ui/legacy/windows/window_1_xthin.png index 0ee6ffd00e1..d9ee533e223 100644 Binary files a/public/images/ui/legacy/windows/window_1_xthin.png and b/public/images/ui/legacy/windows/window_1_xthin.png differ diff --git a/public/images/ui/legacy/windows/window_2.png b/public/images/ui/legacy/windows/window_2.png index 7da47310d64..dda8f20c8ac 100644 Binary files a/public/images/ui/legacy/windows/window_2.png and b/public/images/ui/legacy/windows/window_2.png differ diff --git a/public/images/ui/legacy/windows/window_2_thin.png b/public/images/ui/legacy/windows/window_2_thin.png index 281d538b997..f75186c9c56 100644 Binary files a/public/images/ui/legacy/windows/window_2_thin.png and b/public/images/ui/legacy/windows/window_2_thin.png differ diff --git a/public/images/ui/legacy/windows/window_2_xthin.png b/public/images/ui/legacy/windows/window_2_xthin.png index 01e95113338..2f831870d74 100644 Binary files a/public/images/ui/legacy/windows/window_2_xthin.png and b/public/images/ui/legacy/windows/window_2_xthin.png differ diff --git a/public/images/ui/legacy/windows/window_3.png b/public/images/ui/legacy/windows/window_3.png index 0764ea2d6b0..6270a0c0f25 100644 Binary files a/public/images/ui/legacy/windows/window_3.png and b/public/images/ui/legacy/windows/window_3.png differ diff --git a/public/images/ui/legacy/windows/window_3_thin.png b/public/images/ui/legacy/windows/window_3_thin.png index 12cc6d60778..61d0ccbfe72 100644 Binary files a/public/images/ui/legacy/windows/window_3_thin.png and b/public/images/ui/legacy/windows/window_3_thin.png differ diff --git a/public/images/ui/legacy/windows/window_3_xthin.png b/public/images/ui/legacy/windows/window_3_xthin.png index 57ac6427b79..b510e667b46 100644 Binary files a/public/images/ui/legacy/windows/window_3_xthin.png and b/public/images/ui/legacy/windows/window_3_xthin.png differ diff --git a/public/images/ui/legacy/windows/window_4.png b/public/images/ui/legacy/windows/window_4.png index 69c5bce9dc9..0952c229cb9 100644 Binary files a/public/images/ui/legacy/windows/window_4.png and b/public/images/ui/legacy/windows/window_4.png differ diff --git a/public/images/ui/legacy/windows/window_4_thin.png b/public/images/ui/legacy/windows/window_4_thin.png index b61e7d7b22c..13f689ab884 100644 Binary files a/public/images/ui/legacy/windows/window_4_thin.png and b/public/images/ui/legacy/windows/window_4_thin.png differ diff --git a/public/images/ui/legacy/windows/window_4_xthin.png b/public/images/ui/legacy/windows/window_4_xthin.png index 45fec09adb0..e4d9163174e 100644 Binary files a/public/images/ui/legacy/windows/window_4_xthin.png and b/public/images/ui/legacy/windows/window_4_xthin.png differ diff --git a/public/images/ui/legacy/windows/window_5.png b/public/images/ui/legacy/windows/window_5.png index edfef03f924..355a25c17b3 100644 Binary files a/public/images/ui/legacy/windows/window_5.png and b/public/images/ui/legacy/windows/window_5.png differ diff --git a/public/images/ui/legacy/windows/window_5_thin.png b/public/images/ui/legacy/windows/window_5_thin.png index 4648d812f17..1e71eae928b 100644 Binary files a/public/images/ui/legacy/windows/window_5_thin.png and b/public/images/ui/legacy/windows/window_5_thin.png differ diff --git a/public/images/ui/legacy/windows/window_5_xthin.png b/public/images/ui/legacy/windows/window_5_xthin.png index 0ee6ffd00e1..d9ee533e223 100644 Binary files a/public/images/ui/legacy/windows/window_5_xthin.png and b/public/images/ui/legacy/windows/window_5_xthin.png differ diff --git a/public/images/ui/link_icon.png b/public/images/ui/link_icon.png index 56081261b9c..1e20ab56ec7 100644 Binary files a/public/images/ui/link_icon.png and b/public/images/ui/link_icon.png differ diff --git a/public/images/ui/mmenu_sel.png b/public/images/ui/mmenu_sel.png index 584403e5d74..4b957c7b905 100644 Binary files a/public/images/ui/mmenu_sel.png and b/public/images/ui/mmenu_sel.png differ diff --git a/public/images/ui/mystery_egg.png b/public/images/ui/mystery_egg.png index bb117a137b0..83ad626da7e 100644 Binary files a/public/images/ui/mystery_egg.png and b/public/images/ui/mystery_egg.png differ diff --git a/public/images/ui/namebox.png b/public/images/ui/namebox.png index 87e5a0875b9..70a0e5e4698 100644 Binary files a/public/images/ui/namebox.png and b/public/images/ui/namebox.png differ diff --git a/public/images/ui/night_icon_bg.png b/public/images/ui/night_icon_bg.png index 1ce4007d54c..233da1c80ee 100644 Binary files a/public/images/ui/night_icon_bg.png and b/public/images/ui/night_icon_bg.png differ diff --git a/public/images/ui/night_icon_fg.png b/public/images/ui/night_icon_fg.png index 78741584312..ef184e24435 100644 Binary files a/public/images/ui/night_icon_fg.png and b/public/images/ui/night_icon_fg.png differ diff --git a/public/images/ui/night_icon_mg.png b/public/images/ui/night_icon_mg.png index 5583c8f799d..f808e50b2c7 100644 Binary files a/public/images/ui/night_icon_mg.png and b/public/images/ui/night_icon_mg.png differ diff --git a/public/images/ui/normal_memory.png b/public/images/ui/normal_memory.png index ddc22d1d4ab..604371dcc7c 100644 Binary files a/public/images/ui/normal_memory.png and b/public/images/ui/normal_memory.png differ diff --git a/public/images/ui/numbers.png b/public/images/ui/numbers.png index bde4fe28202..fd281962047 100644 Binary files a/public/images/ui/numbers.png and b/public/images/ui/numbers.png differ diff --git a/public/images/ui/numbers_red.png b/public/images/ui/numbers_red.png index 37cae6b4d60..4b7eabcbde6 100644 Binary files a/public/images/ui/numbers_red.png and b/public/images/ui/numbers_red.png differ diff --git a/public/images/ui/overlay_exp.png b/public/images/ui/overlay_exp.png index 6b745bedcef..10181d01d4c 100644 Binary files a/public/images/ui/overlay_exp.png and b/public/images/ui/overlay_exp.png differ diff --git a/public/images/ui/overlay_hp.png b/public/images/ui/overlay_hp.png index 08674fdcdb7..9612ed8c4c2 100644 Binary files a/public/images/ui/overlay_hp.png and b/public/images/ui/overlay_hp.png differ diff --git a/public/images/ui/overlay_hp_boss.png b/public/images/ui/overlay_hp_boss.png index 5f7a02a4814..5a011709e0c 100644 Binary files a/public/images/ui/overlay_hp_boss.png and b/public/images/ui/overlay_hp_boss.png differ diff --git a/public/images/ui/overlay_lv.png b/public/images/ui/overlay_lv.png index bbd406d957a..ee3f439f7be 100644 Binary files a/public/images/ui/overlay_lv.png and b/public/images/ui/overlay_lv.png differ diff --git a/public/images/ui/overlay_message.png b/public/images/ui/overlay_message.png index 37eb577402b..7057d08ec71 100644 Binary files a/public/images/ui/overlay_message.png and b/public/images/ui/overlay_message.png differ diff --git a/public/images/ui/party_bg.png b/public/images/ui/party_bg.png index 378b1302cb7..f916cd1e1f8 100644 Binary files a/public/images/ui/party_bg.png and b/public/images/ui/party_bg.png differ diff --git a/public/images/ui/party_bg_double.png b/public/images/ui/party_bg_double.png index e0411c1199b..c4d381d828c 100644 Binary files a/public/images/ui/party_bg_double.png and b/public/images/ui/party_bg_double.png differ diff --git a/public/images/ui/party_cancel.png b/public/images/ui/party_cancel.png index 4ea4bc6d65e..5409a1463ce 100644 Binary files a/public/images/ui/party_cancel.png and b/public/images/ui/party_cancel.png differ diff --git a/public/images/ui/party_exp_bar.png b/public/images/ui/party_exp_bar.png index 7815c684b3a..4703876c129 100644 Binary files a/public/images/ui/party_exp_bar.png and b/public/images/ui/party_exp_bar.png differ diff --git a/public/images/ui/party_pb.png b/public/images/ui/party_pb.png index 4169e9c70dc..b635d5f66aa 100644 Binary files a/public/images/ui/party_pb.png and b/public/images/ui/party_pb.png differ diff --git a/public/images/ui/party_slot.png b/public/images/ui/party_slot.png index ad137cead64..9cdea6f61ca 100644 Binary files a/public/images/ui/party_slot.png and b/public/images/ui/party_slot.png differ diff --git a/public/images/ui/party_slot_hp_bar.png b/public/images/ui/party_slot_hp_bar.png index 1771123c141..5381fe0a0b6 100644 Binary files a/public/images/ui/party_slot_hp_bar.png and b/public/images/ui/party_slot_hp_bar.png differ diff --git a/public/images/ui/party_slot_hp_overlay.png b/public/images/ui/party_slot_hp_overlay.png index 09e8c974ca3..8c6935e5540 100644 Binary files a/public/images/ui/party_slot_hp_overlay.png and b/public/images/ui/party_slot_hp_overlay.png differ diff --git a/public/images/ui/party_slot_main.png b/public/images/ui/party_slot_main.png index ab1f70d8034..1ab1e8ee926 100644 Binary files a/public/images/ui/party_slot_main.png and b/public/images/ui/party_slot_main.png differ diff --git a/public/images/ui/party_slot_overlay_hp.png b/public/images/ui/party_slot_overlay_hp.png index 09e8c974ca3..8c6935e5540 100644 Binary files a/public/images/ui/party_slot_overlay_hp.png and b/public/images/ui/party_slot_overlay_hp.png differ diff --git a/public/images/ui/party_slot_overlay_lv.png b/public/images/ui/party_slot_overlay_lv.png index 7051b1d84c4..3d7dafd6737 100644 Binary files a/public/images/ui/party_slot_overlay_lv.png and b/public/images/ui/party_slot_overlay_lv.png differ diff --git a/public/images/ui/passive_bg.png b/public/images/ui/passive_bg.png index 1e18a47b881..4a3fa1ec72b 100644 Binary files a/public/images/ui/passive_bg.png and b/public/images/ui/passive_bg.png differ diff --git a/public/images/ui/pb_tray_ball.png b/public/images/ui/pb_tray_ball.png index 554f9079042..b8f9cb072ba 100644 Binary files a/public/images/ui/pb_tray_ball.png and b/public/images/ui/pb_tray_ball.png differ diff --git a/public/images/ui/pb_tray_overlay_enemy.png b/public/images/ui/pb_tray_overlay_enemy.png index b6fdbcd1753..06bb9ed2e78 100644 Binary files a/public/images/ui/pb_tray_overlay_enemy.png and b/public/images/ui/pb_tray_overlay_enemy.png differ diff --git a/public/images/ui/pb_tray_overlay_player.png b/public/images/ui/pb_tray_overlay_player.png index ddbacced3d3..b3517543fd7 100644 Binary files a/public/images/ui/pb_tray_overlay_player.png and b/public/images/ui/pb_tray_overlay_player.png differ diff --git a/public/images/ui/pbinfo_enemy_boss.png b/public/images/ui/pbinfo_enemy_boss.png index ff5ba661450..ce829bf4631 100644 Binary files a/public/images/ui/pbinfo_enemy_boss.png and b/public/images/ui/pbinfo_enemy_boss.png differ diff --git a/public/images/ui/pbinfo_enemy_boss_stats.png b/public/images/ui/pbinfo_enemy_boss_stats.png index 7148a7af475..f1478a04172 100644 Binary files a/public/images/ui/pbinfo_enemy_boss_stats.png and b/public/images/ui/pbinfo_enemy_boss_stats.png differ diff --git a/public/images/ui/pbinfo_enemy_mini.png b/public/images/ui/pbinfo_enemy_mini.png index a7ff3cb9b82..ddf10776778 100644 Binary files a/public/images/ui/pbinfo_enemy_mini.png and b/public/images/ui/pbinfo_enemy_mini.png differ diff --git a/public/images/ui/pbinfo_enemy_mini_stats.png b/public/images/ui/pbinfo_enemy_mini_stats.png index 69ac5d49411..9c31d64faa4 100644 Binary files a/public/images/ui/pbinfo_enemy_mini_stats.png and b/public/images/ui/pbinfo_enemy_mini_stats.png differ diff --git a/public/images/ui/pbinfo_enemy_type.png b/public/images/ui/pbinfo_enemy_type.png index 9bac63e5e72..f5199ab6d0e 100644 Binary files a/public/images/ui/pbinfo_enemy_type.png and b/public/images/ui/pbinfo_enemy_type.png differ diff --git a/public/images/ui/pbinfo_enemy_type1.png b/public/images/ui/pbinfo_enemy_type1.png index 6d94871e8da..be28e1d2c65 100644 Binary files a/public/images/ui/pbinfo_enemy_type1.png and b/public/images/ui/pbinfo_enemy_type1.png differ diff --git a/public/images/ui/pbinfo_enemy_type2.png b/public/images/ui/pbinfo_enemy_type2.png index 56a1989f2cd..a4616dc6e86 100644 Binary files a/public/images/ui/pbinfo_enemy_type2.png and b/public/images/ui/pbinfo_enemy_type2.png differ diff --git a/public/images/ui/pbinfo_player.png b/public/images/ui/pbinfo_player.png index fee08f71044..c7b2227e800 100644 Binary files a/public/images/ui/pbinfo_player.png and b/public/images/ui/pbinfo_player.png differ diff --git a/public/images/ui/pbinfo_player_mini.png b/public/images/ui/pbinfo_player_mini.png index f12d46bb4ff..90d5e03dae8 100644 Binary files a/public/images/ui/pbinfo_player_mini.png and b/public/images/ui/pbinfo_player_mini.png differ diff --git a/public/images/ui/pbinfo_player_mini_stats.png b/public/images/ui/pbinfo_player_mini_stats.png index 7ce3bd1af1e..52295492eb7 100644 Binary files a/public/images/ui/pbinfo_player_mini_stats.png and b/public/images/ui/pbinfo_player_mini_stats.png differ diff --git a/public/images/ui/pbinfo_player_stats.png b/public/images/ui/pbinfo_player_stats.png index cda978979aa..10192b7752e 100644 Binary files a/public/images/ui/pbinfo_player_stats.png and b/public/images/ui/pbinfo_player_stats.png differ diff --git a/public/images/ui/pbinfo_player_type.png b/public/images/ui/pbinfo_player_type.png index b78d078de95..864848f843b 100644 Binary files a/public/images/ui/pbinfo_player_type.png and b/public/images/ui/pbinfo_player_type.png differ diff --git a/public/images/ui/pbinfo_player_type1.png b/public/images/ui/pbinfo_player_type1.png index 56a1989f2cd..a4616dc6e86 100644 Binary files a/public/images/ui/pbinfo_player_type1.png and b/public/images/ui/pbinfo_player_type1.png differ diff --git a/public/images/ui/pbinfo_player_type2.png b/public/images/ui/pbinfo_player_type2.png index 6d94871e8da..be28e1d2c65 100644 Binary files a/public/images/ui/pbinfo_player_type2.png and b/public/images/ui/pbinfo_player_type2.png differ diff --git a/public/images/ui/pbinfo_stat.png b/public/images/ui/pbinfo_stat.png index 1c20ed70e82..1f86cc6a958 100644 Binary files a/public/images/ui/pbinfo_stat.png and b/public/images/ui/pbinfo_stat.png differ diff --git a/public/images/ui/pbinfo_stat_numbers.png b/public/images/ui/pbinfo_stat_numbers.png index 1465f8b7a64..af244d5ce26 100644 Binary files a/public/images/ui/pbinfo_stat_numbers.png and b/public/images/ui/pbinfo_stat_numbers.png differ diff --git a/public/images/ui/pokedex_summary_bg.png b/public/images/ui/pokedex_summary_bg.png index 92e70bbee27..bb55127edf2 100644 Binary files a/public/images/ui/pokedex_summary_bg.png and b/public/images/ui/pokedex_summary_bg.png differ diff --git a/public/images/ui/prompt.png b/public/images/ui/prompt.png index 4c5e4c7a96c..c045c5e91fe 100644 Binary files a/public/images/ui/prompt.png and b/public/images/ui/prompt.png differ diff --git a/public/images/ui/saving_icon.png b/public/images/ui/saving_icon.png index fddff8c2d39..772fa91fb8c 100644 Binary files a/public/images/ui/saving_icon.png and b/public/images/ui/saving_icon.png differ diff --git a/public/images/ui/scroll_bar.png b/public/images/ui/scroll_bar.png index e4e5eb34dd2..1e8f53cd29e 100644 Binary files a/public/images/ui/scroll_bar.png and b/public/images/ui/scroll_bar.png differ diff --git a/public/images/ui/scroll_bar_handle.png b/public/images/ui/scroll_bar_handle.png index 95a1726b3ba..18532fb4dc1 100644 Binary files a/public/images/ui/scroll_bar_handle.png and b/public/images/ui/scroll_bar_handle.png differ diff --git a/public/images/ui/select_cursor.png b/public/images/ui/select_cursor.png index 41e52ac0d60..002973f2c9d 100644 Binary files a/public/images/ui/select_cursor.png and b/public/images/ui/select_cursor.png differ diff --git a/public/images/ui/select_cursor_highlight.png b/public/images/ui/select_cursor_highlight.png index a0263740509..b8094eecfa8 100644 Binary files a/public/images/ui/select_cursor_highlight.png and b/public/images/ui/select_cursor_highlight.png differ diff --git a/public/images/ui/select_cursor_highlight_thick.png b/public/images/ui/select_cursor_highlight_thick.png index 4081361b211..7730e58387e 100644 Binary files a/public/images/ui/select_cursor_highlight_thick.png and b/public/images/ui/select_cursor_highlight_thick.png differ diff --git a/public/images/ui/select_cursor_pokerus.png b/public/images/ui/select_cursor_pokerus.png index b84340fdde4..506d6deb249 100644 Binary files a/public/images/ui/select_cursor_pokerus.png and b/public/images/ui/select_cursor_pokerus.png differ diff --git a/public/images/ui/select_gen_cursor.png b/public/images/ui/select_gen_cursor.png index e4ed90ecc77..7f1c86fbb4d 100644 Binary files a/public/images/ui/select_gen_cursor.png and b/public/images/ui/select_gen_cursor.png differ diff --git a/public/images/ui/select_gen_cursor_highlight.png b/public/images/ui/select_gen_cursor_highlight.png index 8019de6f3cd..cecc543ae56 100644 Binary files a/public/images/ui/select_gen_cursor_highlight.png and b/public/images/ui/select_gen_cursor_highlight.png differ diff --git a/public/images/ui/settings_icon.png b/public/images/ui/settings_icon.png index 21680cce7fc..5963317affa 100644 Binary files a/public/images/ui/settings_icon.png and b/public/images/ui/settings_icon.png differ diff --git a/public/images/ui/shiny.png b/public/images/ui/shiny.png index 26d7814fb0b..362f8f48ff1 100644 Binary files a/public/images/ui/shiny.png and b/public/images/ui/shiny.png differ diff --git a/public/images/ui/shiny_1.png b/public/images/ui/shiny_1.png index 9c7a583a7f9..5154761124c 100644 Binary files a/public/images/ui/shiny_1.png and b/public/images/ui/shiny_1.png differ diff --git a/public/images/ui/shiny_icons.png b/public/images/ui/shiny_icons.png index f601d908d32..685f7b8af97 100644 Binary files a/public/images/ui/shiny_icons.png and b/public/images/ui/shiny_icons.png differ diff --git a/public/images/ui/shiny_small.png b/public/images/ui/shiny_small.png index e3d8e260573..66a8b12b876 100644 Binary files a/public/images/ui/shiny_small.png and b/public/images/ui/shiny_small.png differ diff --git a/public/images/ui/starter_container_bg.png b/public/images/ui/starter_container_bg.png index 5b60fcf551e..887616a8c87 100644 Binary files a/public/images/ui/starter_container_bg.png and b/public/images/ui/starter_container_bg.png differ diff --git a/public/images/ui/starter_select_bg.png b/public/images/ui/starter_select_bg.png index 8b11f55a963..b11cd12a5e4 100644 Binary files a/public/images/ui/starter_select_bg.png and b/public/images/ui/starter_select_bg.png differ diff --git a/public/images/ui/summary_bg.png b/public/images/ui/summary_bg.png index a86a94dd56e..ebfe87b78b2 100644 Binary files a/public/images/ui/summary_bg.png and b/public/images/ui/summary_bg.png differ diff --git a/public/images/ui/summary_moves.png b/public/images/ui/summary_moves.png index 8f6b01137c1..618d91934f2 100644 Binary files a/public/images/ui/summary_moves.png and b/public/images/ui/summary_moves.png differ diff --git a/public/images/ui/summary_moves_cursor.png b/public/images/ui/summary_moves_cursor.png index 93ce1fc0dae..5472c55d0c0 100644 Binary files a/public/images/ui/summary_moves_cursor.png and b/public/images/ui/summary_moves_cursor.png differ diff --git a/public/images/ui/summary_moves_effect.png b/public/images/ui/summary_moves_effect.png index e1b0e066732..5b1cef9c02e 100644 Binary files a/public/images/ui/summary_moves_effect.png and b/public/images/ui/summary_moves_effect.png differ diff --git a/public/images/ui/summary_moves_overlay_pp.png b/public/images/ui/summary_moves_overlay_pp.png index 9dd0a080e3d..a2bcd0bd021 100644 Binary files a/public/images/ui/summary_moves_overlay_pp.png and b/public/images/ui/summary_moves_overlay_pp.png differ diff --git a/public/images/ui/summary_moves_overlay_row.png b/public/images/ui/summary_moves_overlay_row.png index 5c975b17472..1c2ed2d3a86 100644 Binary files a/public/images/ui/summary_moves_overlay_row.png and b/public/images/ui/summary_moves_overlay_row.png differ diff --git a/public/images/ui/summary_overlay_shiny.png b/public/images/ui/summary_overlay_shiny.png index 472728cc3a3..956f9fb93f3 100644 Binary files a/public/images/ui/summary_overlay_shiny.png and b/public/images/ui/summary_overlay_shiny.png differ diff --git a/public/images/ui/summary_profile.png b/public/images/ui/summary_profile.png index 55cc70dc4d0..2c0c93af6b4 100644 Binary files a/public/images/ui/summary_profile.png and b/public/images/ui/summary_profile.png differ diff --git a/public/images/ui/summary_profile_ability.png b/public/images/ui/summary_profile_ability.png index 84c41556ab0..a803323564b 100644 Binary files a/public/images/ui/summary_profile_ability.png and b/public/images/ui/summary_profile_ability.png differ diff --git a/public/images/ui/summary_profile_passive.png b/public/images/ui/summary_profile_passive.png index 8d70a54b2a4..1ff9ad8e09a 100644 Binary files a/public/images/ui/summary_profile_passive.png and b/public/images/ui/summary_profile_passive.png differ diff --git a/public/images/ui/summary_profile_prompt_a.png b/public/images/ui/summary_profile_prompt_a.png index 146f1a862e5..f40127ec5ab 100644 Binary files a/public/images/ui/summary_profile_prompt_a.png and b/public/images/ui/summary_profile_prompt_a.png differ diff --git a/public/images/ui/summary_profile_prompt_z.png b/public/images/ui/summary_profile_prompt_z.png index ed842718914..eaa158eaddf 100644 Binary files a/public/images/ui/summary_profile_prompt_z.png and b/public/images/ui/summary_profile_prompt_z.png differ diff --git a/public/images/ui/summary_stats.png b/public/images/ui/summary_stats.png index bcbc6809852..d808be92fd1 100644 Binary files a/public/images/ui/summary_stats.png and b/public/images/ui/summary_stats.png differ diff --git a/public/images/ui/summary_stats_overlay_exp.png b/public/images/ui/summary_stats_overlay_exp.png index a5ef5093ced..126f3c71a3d 100644 Binary files a/public/images/ui/summary_stats_overlay_exp.png and b/public/images/ui/summary_stats_overlay_exp.png differ diff --git a/public/images/ui/summary_status.png b/public/images/ui/summary_status.png index 981e4dafe05..fd518c6c015 100644 Binary files a/public/images/ui/summary_status.png and b/public/images/ui/summary_status.png differ diff --git a/public/images/ui/summary_tabs_1.png b/public/images/ui/summary_tabs_1.png index c4989a86514..750c407b075 100644 Binary files a/public/images/ui/summary_tabs_1.png and b/public/images/ui/summary_tabs_1.png differ diff --git a/public/images/ui/summary_tabs_2.png b/public/images/ui/summary_tabs_2.png index 16f7c35b278..250c3ce7960 100644 Binary files a/public/images/ui/summary_tabs_2.png and b/public/images/ui/summary_tabs_2.png differ diff --git a/public/images/ui/summary_tabs_3.png b/public/images/ui/summary_tabs_3.png index b766307aaca..1af80fa5c0d 100644 Binary files a/public/images/ui/summary_tabs_3.png and b/public/images/ui/summary_tabs_3.png differ diff --git a/public/images/ui/type_bgs.png b/public/images/ui/type_bgs.png index 91d75d622ba..820dc3f5a0e 100644 Binary files a/public/images/ui/type_bgs.png and b/public/images/ui/type_bgs.png differ diff --git a/public/images/ui/type_tera.png b/public/images/ui/type_tera.png index 5c35966a6f4..f7f644cec5d 100644 Binary files a/public/images/ui/type_tera.png and b/public/images/ui/type_tera.png differ diff --git a/public/images/ui/unlink_icon.png b/public/images/ui/unlink_icon.png index f0da5f8e3ed..36723390363 100644 Binary files a/public/images/ui/unlink_icon.png and b/public/images/ui/unlink_icon.png differ diff --git a/public/images/ui/windows/window_1.png b/public/images/ui/windows/window_1.png index 16a088108ee..8349452bd1a 100644 Binary files a/public/images/ui/windows/window_1.png and b/public/images/ui/windows/window_1.png differ diff --git a/public/images/ui/windows/window_1_thin.png b/public/images/ui/windows/window_1_thin.png index 96750d47c0f..8c915f239e8 100644 Binary files a/public/images/ui/windows/window_1_thin.png and b/public/images/ui/windows/window_1_thin.png differ diff --git a/public/images/ui/windows/window_1_xthin.png b/public/images/ui/windows/window_1_xthin.png index 0c11a595ca2..edcabf7b17a 100644 Binary files a/public/images/ui/windows/window_1_xthin.png and b/public/images/ui/windows/window_1_xthin.png differ diff --git a/public/images/ui/windows/window_2.png b/public/images/ui/windows/window_2.png index 98a6de12270..ca7767d1344 100644 Binary files a/public/images/ui/windows/window_2.png and b/public/images/ui/windows/window_2.png differ diff --git a/public/images/ui/windows/window_2_thin.png b/public/images/ui/windows/window_2_thin.png index d3940f62f76..17d180bbb7b 100644 Binary files a/public/images/ui/windows/window_2_thin.png and b/public/images/ui/windows/window_2_thin.png differ diff --git a/public/images/ui/windows/window_2_xthin.png b/public/images/ui/windows/window_2_xthin.png index bbb68216776..0f6450313e3 100644 Binary files a/public/images/ui/windows/window_2_xthin.png and b/public/images/ui/windows/window_2_xthin.png differ diff --git a/public/images/ui/windows/window_3.png b/public/images/ui/windows/window_3.png index d3810b06e0c..76234f0175c 100644 Binary files a/public/images/ui/windows/window_3.png and b/public/images/ui/windows/window_3.png differ diff --git a/public/images/ui/windows/window_3_thin.png b/public/images/ui/windows/window_3_thin.png index db5e0a91266..34c6a7d21cf 100644 Binary files a/public/images/ui/windows/window_3_thin.png and b/public/images/ui/windows/window_3_thin.png differ diff --git a/public/images/ui/windows/window_3_xthin.png b/public/images/ui/windows/window_3_xthin.png index bbf7f904a98..416433f5105 100644 Binary files a/public/images/ui/windows/window_3_xthin.png and b/public/images/ui/windows/window_3_xthin.png differ diff --git a/public/images/ui/windows/window_4.png b/public/images/ui/windows/window_4.png index 5be8161ca8b..dc6095b1663 100644 Binary files a/public/images/ui/windows/window_4.png and b/public/images/ui/windows/window_4.png differ diff --git a/public/images/ui/windows/window_4_thin.png b/public/images/ui/windows/window_4_thin.png index fb8c004921a..0e60510833d 100644 Binary files a/public/images/ui/windows/window_4_thin.png and b/public/images/ui/windows/window_4_thin.png differ diff --git a/public/images/ui/windows/window_4_xthin.png b/public/images/ui/windows/window_4_xthin.png index 15bf0f8c692..bb5323a7aad 100644 Binary files a/public/images/ui/windows/window_4_xthin.png and b/public/images/ui/windows/window_4_xthin.png differ diff --git a/public/images/ui/windows/window_5.png b/public/images/ui/windows/window_5.png index 35ad9c4f22c..9e64853d3ab 100644 Binary files a/public/images/ui/windows/window_5.png and b/public/images/ui/windows/window_5.png differ diff --git a/public/images/ui/windows/window_5_thin.png b/public/images/ui/windows/window_5_thin.png index 35ad9c4f22c..9e64853d3ab 100644 Binary files a/public/images/ui/windows/window_5_thin.png and b/public/images/ui/windows/window_5_thin.png differ diff --git a/public/images/ui/windows/window_5_xthin.png b/public/images/ui/windows/window_5_xthin.png index 8c3a4e12e57..47a23a6a5d7 100644 Binary files a/public/images/ui/windows/window_5_xthin.png and b/public/images/ui/windows/window_5_xthin.png differ diff --git a/public/locales b/public/locales index aa94b0b6826..362b2c4fcc2 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit aa94b0b68265c26f728d154998582bb629f2b850 +Subproject commit 362b2c4fcc20b31a7be6c2dab537055fbaeb247f diff --git a/public/logo128.png b/public/logo128.png index 40f2a93715f..e6acfb9bfe2 100644 Binary files a/public/logo128.png and b/public/logo128.png differ diff --git a/public/logo512.png b/public/logo512.png index 7fdde1f6b82..6e9854d98b9 100644 Binary files a/public/logo512.png and b/public/logo512.png differ diff --git a/scripts/create-test/create-test.js b/scripts/create-test/create-test.js index 3c667049658..f24aac548fc 100644 --- a/scripts/create-test/create-test.js +++ b/scripts/create-test/create-test.js @@ -1,14 +1,14 @@ -/** +/* * This script creates a test boilerplate file in the appropriate * directory based on the type selected. - * @example pnpm test:create + * Usage: `pnpm test:create` */ -import chalk from "chalk"; -import inquirer from "inquirer"; import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; +import chalk from "chalk"; +import inquirer from "inquirer"; //#region Constants diff --git a/scripts/create-test/test-boilerplate.ts b/scripts/create-test/test-boilerplate.ts index 1fbd3c8040a..759f3afaec0 100644 --- a/scripts/create-test/test-boilerplate.ts +++ b/scripts/create-test/test-boilerplate.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/scripts/decrypt-save.js b/scripts/decrypt-save.js index a7239a40df6..219cdb47bed 100644 --- a/scripts/decrypt-save.js +++ b/scripts/decrypt-save.js @@ -1,7 +1,8 @@ -import pkg from "crypto-js"; -const { AES, enc } = pkg; -// biome-ignore lint: This is how you import fs from node +// Usage: node decrypt-save.js [save-file] + +// biome-ignore lint/performance/noNamespaceImport: This is how you import fs from node import * as fs from "node:fs"; +import { AES, enc } from "crypto-js"; const SAVE_KEY = "x0i2O7WRiANTqPmZ"; diff --git a/src/@types/PokerogueAccountApi.ts b/src/@types/PokerogueAccountApi.ts index 68d0a5e7730..3b3e74ba41d 100644 --- a/src/@types/PokerogueAccountApi.ts +++ b/src/@types/PokerogueAccountApi.ts @@ -1,4 +1,4 @@ -import type { UserInfo } from "#app/@types/UserInfo"; +import type { UserInfo } from "#types/UserInfo"; export interface AccountInfoResponse extends UserInfo {} diff --git a/src/@types/PokerogueDailyApi.ts b/src/@types/PokerogueDailyApi.ts index 3f3d8eb61ca..838af2a2a34 100644 --- a/src/@types/PokerogueDailyApi.ts +++ b/src/@types/PokerogueDailyApi.ts @@ -1,4 +1,4 @@ -import type { ScoreboardCategory } from "#app/ui/daily-run-scoreboard"; +import type { ScoreboardCategory } from "#ui/daily-run-scoreboard"; export interface GetDailyRankingsRequest { category: ScoreboardCategory; diff --git a/src/@types/PokerogueSavedataApi.ts b/src/@types/PokerogueSavedataApi.ts index a313cd708c7..ebc80ac4ce0 100644 --- a/src/@types/PokerogueSavedataApi.ts +++ b/src/@types/PokerogueSavedataApi.ts @@ -1,4 +1,4 @@ -import type { SessionSaveData, SystemSaveData } from "#app/system/game-data"; +import type { SessionSaveData, SystemSaveData } from "#system/game-data"; export interface UpdateAllSavedataRequest { system: SystemSaveData; diff --git a/src/@types/PokerogueSystemSavedataApi.ts b/src/@types/PokerogueSystemSavedataApi.ts index 8ce160a5ec2..ded22c4c58c 100644 --- a/src/@types/PokerogueSystemSavedataApi.ts +++ b/src/@types/PokerogueSystemSavedataApi.ts @@ -1,4 +1,4 @@ -import type { SystemSaveData } from "#app/system/game-data"; +import type { SystemSaveData } from "#system/game-data"; export interface GetSystemSavedataRequest { clientSessionId: string; diff --git a/src/@types/SessionSaveMigrator.ts b/src/@types/SessionSaveMigrator.ts index c4b0ad8dda4..56518eaa8b7 100644 --- a/src/@types/SessionSaveMigrator.ts +++ b/src/@types/SessionSaveMigrator.ts @@ -1,4 +1,4 @@ -import type { SessionSaveData } from "#app/system/game-data"; +import type { SessionSaveData } from "#system/game-data"; export interface SessionSaveMigrator { version: string; diff --git a/src/@types/SystemSaveMigrator.ts b/src/@types/SystemSaveMigrator.ts index a22b5f6c93d..80fff9c7848 100644 --- a/src/@types/SystemSaveMigrator.ts +++ b/src/@types/SystemSaveMigrator.ts @@ -1,4 +1,4 @@ -import type { SystemSaveData } from "#app/system/game-data"; +import type { SystemSaveData } from "#system/game-data"; export interface SystemSaveMigrator { version: string; diff --git a/src/@types/ability-types.ts b/src/@types/ability-types.ts index 18516fadd40..8daca8a671d 100644 --- a/src/@types/ability-types.ts +++ b/src/@types/ability-types.ts @@ -1,13 +1,13 @@ -import type Move from "#app/data/moves/move"; -import type Pokemon from "#app/field/pokemon"; +import type { AbAttrConstructorMap } from "#abilities/ability"; import type { BattleStat } from "#enums/stat"; -import type { AbAttrConstructorMap } from "#app/data/abilities/ability"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; // intentionally re-export all types from abilities to have this be the centralized place to import ability types -export type * from "#app/data/abilities/ability"; +export type * from "#abilities/ability"; // biome-ignore lint/correctness/noUnusedImports: Used in a tsdoc comment -import type { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; +import type { applyAbAttrs } from "#abilities/apply-ab-attrs"; export type AbAttrCondition = (pokemon: Pokemon) => boolean; export type PokemonAttackCondition = (user: Pokemon | null, target: Pokemon | null, move: Move) => boolean; diff --git a/src/@types/attack-move-result.ts b/src/@types/attack-move-result.ts index c6aedf8096d..495bb1e88ff 100644 --- a/src/@types/attack-move-result.ts +++ b/src/@types/attack-move-result.ts @@ -1,6 +1,6 @@ import type { BattlerIndex } from "#enums/battler-index"; -import type { DamageResult } from "#app/@types/damage-result"; import type { MoveId } from "#enums/move-id"; +import type { DamageResult } from "#types/damage-result"; export interface AttackMoveResult { move: MoveId; diff --git a/src/@types/enum-types.ts b/src/@types/enum-types.ts new file mode 100644 index 00000000000..84df0a96505 --- /dev/null +++ b/src/@types/enum-types.ts @@ -0,0 +1,18 @@ +/** Union type accepting any TS Enum or `const object`, with or without reverse mapping. */ +export type EnumOrObject = Record; + +/** + * Utility type to extract the enum values from a `const object`, + * or convert an `enum` interface produced by `typeof Enum` into the union type representing its values. + */ +export type EnumValues = E[keyof E]; + +/** + * Generic type constraint representing a TS numeric enum with reverse mappings. + * @example + * TSNumericEnum + */ +export type TSNumericEnum = number extends EnumValues ? T : never; + +/** Generic type constraint representing a non reverse-mapped TS enum or `const object`. */ +export type NormalEnum = Exclude>; diff --git a/src/@types/held-modifier-config.ts b/src/@types/held-modifier-config.ts index 5617cf2446a..46ef67bf515 100644 --- a/src/@types/held-modifier-config.ts +++ b/src/@types/held-modifier-config.ts @@ -1,7 +1,7 @@ -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; +import type { PokemonHeldItemModifier } from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; -export default interface HeldModifierConfig { +export interface HeldModifierConfig { modifier: PokemonHeldItemModifierType | PokemonHeldItemModifier; stackCount?: number; isTransferable?: boolean; diff --git a/src/@types/illusion-data.ts b/src/@types/illusion-data.ts index 98e39af11f5..854c98c8cc9 100644 --- a/src/@types/illusion-data.ts +++ b/src/@types/illusion-data.ts @@ -1,8 +1,8 @@ -import type { Gender } from "#app/data/gender"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import type { Variant } from "#app/sprites/variant"; +import type { Gender } from "#data/gender"; +import type { PokemonSpecies } from "#data/pokemon-species"; import type { PokeballType } from "#enums/pokeball"; import type { SpeciesId } from "#enums/species-id"; +import type { Variant } from "#sprites/variant"; /** * Data pertaining to a Pokemon's Illusion. diff --git a/src/@types/modifier-types.ts b/src/@types/modifier-types.ts index 80b92c35622..28b39d1a151 100644 --- a/src/@types/modifier-types.ts +++ b/src/@types/modifier-types.ts @@ -1,14 +1,13 @@ -/** - * Re-exports of all the types defined in the modifier module. - */ +// Intentionally re-exports `ModifierConstructorMap` from `modifier.ts` + +import type { Pokemon } from "#field/pokemon"; +import type { ModifierConstructorMap } from "#modifiers/modifier"; +import type { ModifierType, WeightedModifierType } from "#modifiers/modifier-type"; -import type Pokemon from "#app/field/pokemon"; -import type { ModifierConstructorMap } from "#app/modifier/modifier"; -import type { ModifierType, WeightedModifierType } from "#app/modifier/modifier-type"; export type ModifierTypeFunc = () => ModifierType; export type WeightedModifierTypeWeightFunc = (party: Pokemon[], rerollCount?: number) => number; -export type { ModifierConstructorMap } from "#app/modifier/modifier"; +export type { ModifierConstructorMap } from "#modifiers/modifier"; /** * Map of modifier names to their respective instance types diff --git a/src/@types/move-types.ts b/src/@types/move-types.ts index d9a06fd20ee..5f8d7e8777e 100644 --- a/src/@types/move-types.ts +++ b/src/@types/move-types.ts @@ -1,16 +1,16 @@ import type { AttackMove, - StatusMove, - SelfStatusMove, ChargingAttackMove, ChargingSelfStatusMove, - MoveAttrConstructorMap, MoveAttr, -} from "#app/data/moves/move"; + MoveAttrConstructorMap, + SelfStatusMove, + StatusMove, +} from "#moves/move"; export type MoveAttrFilter = (attr: MoveAttr) => boolean; -export type * from "#app/data/moves/move"; +export type * from "#moves/move"; /** * Map of move subclass names to their respective classes. diff --git a/src/@types/trainer-funcs.ts b/src/@types/trainer-funcs.ts index 0546dd53024..aa839cbd158 100644 --- a/src/@types/trainer-funcs.ts +++ b/src/@types/trainer-funcs.ts @@ -1,9 +1,9 @@ -import type { EnemyPokemon } from "#app/field/pokemon"; -import type { PersistentModifier } from "#app/modifier/modifier"; import type { PartyMemberStrength } from "#enums/party-member-strength"; import type { SpeciesId } from "#enums/species-id"; -import type { TrainerConfig } from "../data/trainers/trainer-config"; -import type { TrainerPartyTemplate } from "../data/trainers/TrainerPartyTemplate"; +import type { EnemyPokemon } from "#field/pokemon"; +import type { PersistentModifier } from "#modifiers/modifier"; +import type { TrainerConfig } from "#trainers/trainer-config"; +import type { TrainerPartyTemplate } from "#trainers/trainer-party-template"; export type PartyTemplateFunc = () => TrainerPartyTemplate; export type PartyMemberFunc = (level: number, strength: PartyMemberStrength) => EnemyPokemon; diff --git a/src/@types/type-helpers.ts b/src/@types/type-helpers.ts index 2d00b1faf4a..077bef62f1f 100644 --- a/src/@types/type-helpers.ts +++ b/src/@types/type-helpers.ts @@ -2,8 +2,11 @@ * A collection of custom utility types that aid in type checking and ensuring strict type conformity */ -// biome-ignore lint/correctness/noUnusedImports: Used in a tsdoc comment -import type { AbAttr } from "./ability-types"; +// biome-ignore-start lint/correctness/noUnusedImports: Used in a tsdoc comment +import type { AbAttr } from "#abilities/ability"; +// biome-ignore-end lint/correctness/noUnusedImports: Used in a tsdoc comment + +import type { EnumValues } from "#types/enum-types"; /** * Exactly matches the type of the argument, preventing adding additional properties. @@ -11,7 +14,7 @@ import type { AbAttr } from "./ability-types"; * ⚠️ Should never be used with `extends`, as this will nullify the exactness of the type. * * As an example, used to ensure that the parameters of {@linkcode AbAttr.canApply} and {@linkcode AbAttr.getTriggerMessage} are compatible with - * the type of the apply method + * the type of its {@linkcode AbAttr.apply | apply} method. * * @typeParam T - The type to match exactly */ @@ -26,9 +29,18 @@ export type Exact = { export type Closed = X; /** - * Remove `readonly` from all properties of the provided type - * @typeParam T - The type to make mutable + * Remove `readonly` from all properties of the provided type. + * @typeParam T - The type to make mutable. */ export type Mutable = { -readonly [P in keyof T]: T[P]; }; + +/** + * Type helper to obtain the keys associated with a given value inside a `const object`. + * @typeParam O - The type of the object + * @typeParam V - The type of one of O's values + */ +export type InferKeys, V extends EnumValues> = { + [K in keyof O]: O[K] extends V ? K : never; +}[keyof O]; diff --git a/src/account.ts b/src/account.ts index 3416fa6ed5e..1bfb756b284 100644 --- a/src/account.ts +++ b/src/account.ts @@ -1,7 +1,7 @@ -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import type { UserInfo } from "#app/@types/UserInfo"; -import { bypassLogin } from "./global-vars/bypass-login"; -import { randomString } from "#app/utils/common"; +import { pokerogueApi } from "#api/pokerogue-api"; +import { bypassLogin } from "#app/global-vars/bypass-login"; +import type { UserInfo } from "#types/UserInfo"; +import { randomString } from "#utils/common"; export let loggedInUser: UserInfo | null = null; // This is a random string that is used to identify the client session - unique per session (tab or window) so that the game will only save on the one that the server is expecting diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 721b55020f9..ad0c9d84aba 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1,27 +1,84 @@ -import Phaser from "phaser"; -import UI from "#app/ui/ui"; -import type Pokemon from "#app/field/pokemon"; -import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import type { PokemonSpeciesFilter } from "#app/data/pokemon-species"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { allSpecies } from "#app/data/data-lists"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; +import type { FixedBattleConfig } from "#app/battle"; +import { Battle } from "#app/battle"; import { - fixedInt, - getIvsFromId, - randSeedInt, - getEnumValues, - randomString, - NumberHolder, - shiftCharCodes, - formatMoney, - isNullOrUndefined, - BooleanHolder, - type Constructor, - isBetween, -} from "#app/utils/common"; -import { deepMergeSpriteData } from "#app/utils/data"; -import type { Modifier, ModifierPredicate, TurnHeldItemTransferModifier } from "./modifier/modifier"; + ANTI_VARIANCE_WEIGHT_MODIFIER, + AVERAGE_ENCOUNTERS_PER_RUN_TARGET, + BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT, + MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT, +} from "#app/constants"; +import type { GameMode } from "#app/game-mode"; +import { getGameMode } from "#app/game-mode"; +import { timedEventManager } from "#app/global-event-manager"; +import { initGlobalScene } from "#app/global-scene"; +import { starterColors } from "#app/global-vars/starter-colors"; +import { InputsController } from "#app/inputs-controller"; +import { LoadingScene } from "#app/loading-scene"; +import Overrides from "#app/overrides"; +import type { Phase } from "#app/phase"; +import { PhaseManager } from "#app/phase-manager"; +import { FieldSpritePipeline } from "#app/pipelines/field-sprite"; +import { InvertPostFX } from "#app/pipelines/invert"; +import { SpritePipeline } from "#app/pipelines/sprite"; +import { SceneBase } from "#app/scene-base"; +import { startingWave } from "#app/starting-wave"; +import { TimedEventManager } from "#app/timed-event-manager"; +import { UiInputs } from "#app/ui-inputs"; +import { biomeDepths, getBiomeName } from "#balance/biomes"; +import { pokemonPrevolutions } from "#balance/pokemon-evolutions"; +import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#balance/starters"; +import { + initCommonAnims, + initMoveAnim, + loadCommonAnimAssets, + loadMoveAnimAssets, + populateAnims, +} from "#data/battle-anims"; +import { allAbilities, allMoves, allSpecies, modifierTypes } from "#data/data-lists"; +import { battleSpecDialogue } from "#data/dialogue"; +import type { SpeciesFormChangeTrigger } from "#data/form-change-triggers"; +import { SpeciesFormChangeManualTrigger, SpeciesFormChangeTimeOfDayTrigger } from "#data/form-change-triggers"; +import { Gender } from "#data/gender"; +import type { SpeciesFormChange } from "#data/pokemon-forms"; +import { pokemonFormChanges } from "#data/pokemon-forms"; +import type { PokemonSpecies, PokemonSpeciesFilter } from "#data/pokemon-species"; +import { getTypeRgb } from "#data/type"; +import { BattleSpec } from "#enums/battle-spec"; +import { BattleStyle } from "#enums/battle-style"; +import { BattleType } from "#enums/battle-type"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BiomeId } from "#enums/biome-id"; +import { EaseType } from "#enums/ease-type"; +import { ExpGainsSpeed } from "#enums/exp-gains-speed"; +import type { ExpNotification } from "#enums/exp-notification"; +import { FormChangeItem } from "#enums/form-change-item"; +import { GameModes } from "#enums/game-modes"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { MoneyFormat } from "#enums/money-format"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { PlayerGender } from "#enums/player-gender"; +import { PokeballType } from "#enums/pokeball"; +import type { PokemonAnimType } from "#enums/pokemon-anim-type"; +import { PokemonType } from "#enums/pokemon-type"; +import { ShopCursorTarget } from "#enums/shop-cursor-target"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import type { TrainerSlot } from "#enums/trainer-slot"; +import { TrainerType } from "#enums/trainer-type"; +import { TrainerVariant } from "#enums/trainer-variant"; +import { UiTheme } from "#enums/ui-theme"; +import { NewArenaEvent } from "#events/battle-scene"; +import { Arena, ArenaBase } from "#field/arena"; +import { DamageNumberHandler } from "#field/damage-number-handler"; +import type { Pokemon } from "#field/pokemon"; +import { EnemyPokemon, PlayerPokemon } from "#field/pokemon"; +import { PokemonSpriteSparkleHandler } from "#field/pokemon-sprite-sparkle-handler"; +import { Trainer } from "#field/trainer"; +import type { Modifier, ModifierPredicate, TurnHeldItemTransferModifier } from "#modifiers/modifier"; import { ConsumableModifier, ConsumablePokemonModifier, @@ -39,22 +96,7 @@ import { PokemonHpRestoreModifier, PokemonIncrementingStatModifier, RememberMoveModifier, -} from "./modifier/modifier"; -import { PokeballType } from "#enums/pokeball"; -import { - initCommonAnims, - initMoveAnim, - loadCommonAnimAssets, - loadMoveAnimAssets, - populateAnims, -} from "#app/data/battle-anims"; -import type { Phase } from "#app/phase"; -import { initGameSpeed } from "#app/system/game-speed"; -import { Arena, ArenaBase } from "#app/field/arena"; -import { GameData } from "#app/system/game-data"; -import { addTextObject, getTextColor, TextStyle } from "#app/ui/text"; -import { allMoves } from "./data/data-lists"; -import { MusicPreference } from "#app/system/settings/settings"; +} from "#modifiers/modifier"; import { getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, @@ -62,106 +104,58 @@ import { getLuckTextTint, getPartyLuckValue, PokemonHeldItemModifierType, -} from "#app/modifier/modifier-type"; -import { getModifierType } from "./utils/modifier-utils"; -import { modifierTypes } from "./data/data-lists"; -import { getModifierPoolForType } from "./utils/modifier-utils"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import AbilityBar from "#app/ui/ability-bar"; -import { applyAbAttrs } from "./data/abilities/apply-ab-attrs"; -import { allAbilities } from "./data/data-lists"; -import type { FixedBattleConfig } from "#app/battle"; -import Battle from "#app/battle"; -import { BattleType } from "#enums/battle-type"; -import type { GameMode } from "#app/game-mode"; -import { getGameMode } from "#app/game-mode"; -import { GameModes } from "#enums/game-modes"; -import FieldSpritePipeline from "#app/pipelines/field-sprite"; -import SpritePipeline from "#app/pipelines/sprite"; -import PartyExpBar from "#app/ui/party-exp-bar"; -import type { TrainerSlot } from "./enums/trainer-slot"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import Trainer from "#app/field/trainer"; -import { TrainerVariant } from "#enums/trainer-variant"; -import type TrainerData from "#app/system/trainer-data"; -import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; -import { pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; -import PokeballTray from "#app/ui/pokeball-tray"; -import InvertPostFX from "#app/pipelines/invert"; -import type { Achv } from "#app/system/achv"; -import { achvs, ModifierAchv, MoneyAchv } from "#app/system/achv"; -import type { Voucher } from "#app/system/voucher"; -import { vouchers } from "#app/system/voucher"; -import { Gender } from "#app/data/gender"; -import type UIPlugin from "phaser3-rex-plugins/templates/ui/ui-plugin"; -import { addUiThemeOverrides } from "#app/ui/ui-theme"; -import type PokemonData from "#app/system/pokemon-data"; -import { Nature } from "#enums/nature"; -import type { SpeciesFormChange } from "#app/data/pokemon-forms"; -import type { SpeciesFormChangeTrigger } from "./data/pokemon-forms/form-change-triggers"; -import { pokemonFormChanges } from "#app/data/pokemon-forms"; -import { SpeciesFormChangeTimeOfDayTrigger } from "./data/pokemon-forms/form-change-triggers"; -import { SpeciesFormChangeManualTrigger } from "./data/pokemon-forms/form-change-triggers"; -import { FormChangeItem } from "#enums/form-change-item"; -import { getTypeRgb } from "#app/data/type"; -import { PokemonType } from "#enums/pokemon-type"; -import PokemonSpriteSparkleHandler from "#app/field/pokemon-sprite-sparkle-handler"; -import CharSprite from "#app/ui/char-sprite"; -import DamageNumberHandler from "#app/field/damage-number-handler"; -import PokemonInfoContainer from "#app/ui/pokemon-info-container"; -import { biomeDepths, getBiomeName } from "#app/data/balance/biomes"; -import { SceneBase } from "#app/scene-base"; -import CandyBar from "#app/ui/candy-bar"; -import type { Variant } from "#app/sprites/variant"; -import { variantData, clearVariantData } from "#app/sprites/variant"; -import type { Localizable } from "#app/@types/locales"; -import Overrides from "#app/overrides"; -import { InputsController } from "#app/inputs-controller"; -import { UiInputs } from "#app/ui-inputs"; -import { NewArenaEvent } from "#app/events/battle-scene"; -import { ArenaFlyout } from "#app/ui/arena-flyout"; -import { EaseType } from "#enums/ease-type"; -import { BattleSpec } from "#enums/battle-spec"; -import { BattleStyle } from "#enums/battle-style"; -import { BiomeId } from "#enums/biome-id"; -import type { ExpNotification } from "#enums/exp-notification"; -import { MoneyFormat } from "#enums/money-format"; -import { MoveId } from "#enums/move-id"; -import { PlayerGender } from "#enums/player-gender"; -import { SpeciesId } from "#enums/species-id"; -import { UiTheme } from "#enums/ui-theme"; -import { TimedEventManager } from "#app/timed-event-manager"; -import type { PokemonAnimType } from "#enums/pokemon-anim-type"; -import i18next from "i18next"; -import { TrainerType } from "#enums/trainer-type"; -import { battleSpecDialogue } from "#app/data/dialogue"; -import { LoadingScene } from "#app/loading-scene"; -import type { MovePhase } from "#app/phases/move-phase"; -import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; -import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { allMysteryEncounters, mysteryEncountersByBiome } from "#app/data/mystery-encounters/mystery-encounters"; +} from "#modifiers/modifier-type"; +import { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterSaveData } from "#mystery-encounters/mystery-encounter-save-data"; +import { allMysteryEncounters, mysteryEncountersByBiome } from "#mystery-encounters/mystery-encounters"; +import type { MovePhase } from "#phases/move-phase"; +import { expSpriteKeys } from "#sprites/sprite-keys"; +import { hasExpSprite } from "#sprites/sprite-utils"; +import type { Variant } from "#sprites/variant"; +import { clearVariantData, variantData } from "#sprites/variant"; +import type { Achv } from "#system/achv"; +import { achvs, ModifierAchv, MoneyAchv } from "#system/achv"; +import { GameData } from "#system/game-data"; +import { initGameSpeed } from "#system/game-speed"; +import type { PokemonData } from "#system/pokemon-data"; +import { MusicPreference } from "#system/settings"; +import type { TrainerData } from "#system/trainer-data"; +import type { Voucher } from "#system/voucher"; +import { vouchers } from "#system/voucher"; +import { trainerConfigs } from "#trainers/trainer-config"; +import type { HeldModifierConfig } from "#types/held-modifier-config"; +import type { Localizable } from "#types/locales"; +import { AbilityBar } from "#ui/ability-bar"; +import { ArenaFlyout } from "#ui/arena-flyout"; +import { CandyBar } from "#ui/candy-bar"; +import { CharSprite } from "#ui/char-sprite"; +import { PartyExpBar } from "#ui/party-exp-bar"; +import { PokeballTray } from "#ui/pokeball-tray"; +import { PokemonInfoContainer } from "#ui/pokemon-info-container"; +import { addTextObject, getTextColor, TextStyle } from "#ui/text"; +import { UI } from "#ui/ui"; +import { addUiThemeOverrides } from "#ui/ui-theme"; import { - ANTI_VARIANCE_WEIGHT_MODIFIER, - AVERAGE_ENCOUNTERS_PER_RUN_TARGET, - BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT, - MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT, -} from "./constants"; -import { MysteryEncounterSaveData } from "#app/data/mystery-encounters/mystery-encounter-save-data"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import type HeldModifierConfig from "#app/@types/held-modifier-config"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import { ExpGainsSpeed } from "#enums/exp-gains-speed"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#app/data/balance/starters"; -import { StatusEffect } from "#enums/status-effect"; -import { initGlobalScene } from "#app/global-scene"; -import { expSpriteKeys } from "./sprites/sprite-keys"; -import { hasExpSprite } from "./sprites/sprite-utils"; -import { timedEventManager } from "./global-event-manager"; -import { starterColors } from "./global-vars/starter-colors"; -import { startingWave } from "./starting-wave"; -import { PhaseManager } from "./phase-manager"; + BooleanHolder, + type Constructor, + fixedInt, + formatMoney, + getIvsFromId, + isBetween, + isNullOrUndefined, + NumberHolder, + randomString, + randSeedInt, + shiftCharCodes, +} from "#utils/common"; +import { deepMergeSpriteData } from "#utils/data"; +import { getEnumValues } from "#utils/enums"; +import { getModifierPoolForType, getModifierType } from "#utils/modifier-utils"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; +import Phaser from "phaser"; +import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; +import type UIPlugin from "phaser3-rex-plugins/templates/ui/ui-plugin"; const DEBUG_RNG = false; @@ -176,7 +170,7 @@ export interface InfoToggle { isActive(): boolean; } -export default class BattleScene extends SceneBase { +export class BattleScene extends SceneBase { public rexUI: UIPlugin; public inputController: InputsController; public uiInputs: UiInputs; @@ -884,8 +878,8 @@ export default class BattleScene extends SceneBase { } // store info toggles to be accessible by the ui - addInfoToggle(infoToggle: InfoToggle): void { - this.infoToggles.push(infoToggle); + addInfoToggle(...infoToggles: InfoToggle[]): void { + this.infoToggles.push(...infoToggles); } // return the stored info toggles; used by ui-inputs @@ -2184,6 +2178,7 @@ export default class BattleScene extends SceneBase { ), ] : allSpecies.filter(s => s.isCatchable()); + // TODO: should this use `randSeedItem`? return filteredSpecies[randSeedInt(filteredSpecies.length)]; } @@ -2209,6 +2204,7 @@ export default class BattleScene extends SceneBase { } } + // TODO: should this use `randSeedItem`? return biomes[randSeedInt(biomes.length)]; } @@ -3732,6 +3728,7 @@ export default class BattleScene extends SceneBase { console.log("No Mystery Encounters found, falling back to Mysterious Challengers."); return allMysteryEncounters[MysteryEncounterType.MYSTERIOUS_CHALLENGERS]; } + // TODO: should this use `randSeedItem`? encounter = availableEncounters[randSeedInt(availableEncounters.length)]; // New encounter object to not dirty flags encounter = new MysteryEncounter(encounter); diff --git a/src/battle.ts b/src/battle.ts index 49f5c39e7dd..7b6a58cbaca 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -1,41 +1,37 @@ +import type { GameMode } from "#app/game-mode"; import { globalScene } from "#app/global-scene"; -import type { Command } from "#enums/command"; -import { - randomString, - getEnumValues, - NumberHolder, - randSeedInt, - shiftCharCodes, - randSeedItem, - randInt, - randSeedFloat, -} from "#app/utils/common"; -import Trainer from "./field/trainer"; -import { TrainerVariant } from "#enums/trainer-variant"; -import type { GameMode } from "./game-mode"; -import { MoneyMultiplierModifier, type PokemonHeldItemModifier } from "./modifier/modifier"; -import type { PokeballType } from "#enums/pokeball"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { SpeciesFormKey } from "#enums/species-form-key"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import type { TurnMove } from "./@types/turn-move"; -import type Pokemon from "#app/field/pokemon"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattleSpec } from "#enums/battle-spec"; +import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; +import type { Command } from "#enums/command"; import type { MoveId } from "#enums/move-id"; -import { PlayerGender } from "#enums/player-gender"; -import { MusicPreference } from "#app/system/settings/settings"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import type { PokeballType } from "#enums/pokeball"; +import { SpeciesFormKey } from "#enums/species-form-key"; import { SpeciesId } from "#enums/species-id"; import { TrainerType } from "#enums/trainer-type"; -import i18next from "#app/plugins/i18n"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import type { CustomModifierSettings } from "#app/modifier/modifier-type"; -import { ModifierTier } from "#enums/modifier-tier"; -import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { BattleType } from "#enums/battle-type"; -import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves"; -import { BattlerIndex } from "#enums/battler-index"; +import { TrainerVariant } from "#enums/trainer-variant"; +import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon"; +import { Trainer } from "#field/trainer"; +import { MoneyMultiplierModifier, type PokemonHeldItemModifier } from "#modifiers/modifier"; +import type { CustomModifierSettings } from "#modifiers/modifier-type"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import i18next from "#plugins/i18n"; +import { MusicPreference } from "#system/settings"; +import { trainerConfigs } from "#trainers/trainer-config"; +import type { TurnMove } from "#types/turn-move"; +import { + NumberHolder, + randInt, + randomString, + randSeedFloat, + randSeedInt, + randSeedItem, + shiftCharCodes, +} from "#utils/common"; +import { getEnumValues } from "#utils/enums"; export interface TurnCommand { command: Command; @@ -55,7 +51,7 @@ interface TurnCommands { [key: number]: TurnCommand | null; } -export default class Battle { +export class Battle { protected gameMode: GameMode; public waveIndex: number; public battleType: BattleType; @@ -578,369 +574,3 @@ export function getRandomTrainerFunc( return new Trainer(trainerTypes[rand], trainerGender); }; } - -export interface FixedBattleConfigs { - [key: number]: FixedBattleConfig; -} -/** - * Youngster/Lass on 5 - * Rival on 8, 55, 95, 145, 195 - * Evil team grunts on 35, 62, 64, and 112 - * Evil team admin on 66 and 114 - * Evil leader on 115, 165 - * E4 on 182, 184, 186, 188 - * Champion on 190 - */ -export const classicFixedBattles: FixedBattleConfigs = { - [ClassicFixedBossWaves.TOWN_YOUNGSTER]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - () => new Trainer(TrainerType.YOUNGSTER, randSeedInt(2) ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT), - ), - [ClassicFixedBossWaves.RIVAL_1]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - () => - new Trainer( - TrainerType.RIVAL, - globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, - ), - ), - [ClassicFixedBossWaves.RIVAL_2]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - () => - new Trainer( - TrainerType.RIVAL_2, - globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, - ), - ) - .setCustomModifierRewards({ - guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], - allowLuckUpgrades: false, - }), - [ClassicFixedBossWaves.EVIL_GRUNT_1]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - getRandomTrainerFunc( - [ - TrainerType.ROCKET_GRUNT, - TrainerType.MAGMA_GRUNT, - TrainerType.AQUA_GRUNT, - TrainerType.GALACTIC_GRUNT, - TrainerType.PLASMA_GRUNT, - TrainerType.FLARE_GRUNT, - TrainerType.AETHER_GRUNT, - TrainerType.SKULL_GRUNT, - TrainerType.MACRO_GRUNT, - TrainerType.STAR_GRUNT, - ], - true, - ), - ), - [ClassicFixedBossWaves.RIVAL_3]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - () => - new Trainer( - TrainerType.RIVAL_3, - globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, - ), - ) - .setCustomModifierRewards({ - guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], - allowLuckUpgrades: false, - }), - [ClassicFixedBossWaves.EVIL_GRUNT_2]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc( - getRandomTrainerFunc( - [ - TrainerType.ROCKET_GRUNT, - TrainerType.MAGMA_GRUNT, - TrainerType.AQUA_GRUNT, - TrainerType.GALACTIC_GRUNT, - TrainerType.PLASMA_GRUNT, - TrainerType.FLARE_GRUNT, - TrainerType.AETHER_GRUNT, - TrainerType.SKULL_GRUNT, - TrainerType.MACRO_GRUNT, - TrainerType.STAR_GRUNT, - ], - true, - ), - ), - [ClassicFixedBossWaves.EVIL_GRUNT_3]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc( - getRandomTrainerFunc( - [ - TrainerType.ROCKET_GRUNT, - TrainerType.MAGMA_GRUNT, - TrainerType.AQUA_GRUNT, - TrainerType.GALACTIC_GRUNT, - TrainerType.PLASMA_GRUNT, - TrainerType.FLARE_GRUNT, - TrainerType.AETHER_GRUNT, - TrainerType.SKULL_GRUNT, - TrainerType.MACRO_GRUNT, - TrainerType.STAR_GRUNT, - ], - true, - ), - ), - [ClassicFixedBossWaves.EVIL_ADMIN_1]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc( - getRandomTrainerFunc( - [ - [TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL], - [TrainerType.TABITHA, TrainerType.COURTNEY], - [TrainerType.MATT, TrainerType.SHELLY], - [TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN], - [TrainerType.ZINZOLIN, TrainerType.COLRESS], - [TrainerType.XEROSIC, TrainerType.BRYONY], - TrainerType.FABA, - TrainerType.PLUMERIA, - TrainerType.OLEANA, - [TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI], - ], - true, - ), - ), - [ClassicFixedBossWaves.RIVAL_4]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - () => - new Trainer( - TrainerType.RIVAL_4, - globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, - ), - ) - .setCustomModifierRewards({ - guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA], - allowLuckUpgrades: false, - }), - [ClassicFixedBossWaves.EVIL_GRUNT_4]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc( - getRandomTrainerFunc( - [ - TrainerType.ROCKET_GRUNT, - TrainerType.MAGMA_GRUNT, - TrainerType.AQUA_GRUNT, - TrainerType.GALACTIC_GRUNT, - TrainerType.PLASMA_GRUNT, - TrainerType.FLARE_GRUNT, - TrainerType.AETHER_GRUNT, - TrainerType.SKULL_GRUNT, - TrainerType.MACRO_GRUNT, - TrainerType.STAR_GRUNT, - ], - true, - ), - ), - [ClassicFixedBossWaves.EVIL_ADMIN_2]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc( - getRandomTrainerFunc( - [ - [TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL], - [TrainerType.TABITHA, TrainerType.COURTNEY], - [TrainerType.MATT, TrainerType.SHELLY], - [TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN], - [TrainerType.ZINZOLIN, TrainerType.COLRESS], - [TrainerType.XEROSIC, TrainerType.BRYONY], - TrainerType.FABA, - TrainerType.PLUMERIA, - TrainerType.OLEANA, - [TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI], - ], - true, - 1, - ), - ), - [ClassicFixedBossWaves.EVIL_BOSS_1]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc( - getRandomTrainerFunc([ - TrainerType.ROCKET_BOSS_GIOVANNI_1, - TrainerType.MAXIE, - TrainerType.ARCHIE, - TrainerType.CYRUS, - TrainerType.GHETSIS, - TrainerType.LYSANDRE, - TrainerType.LUSAMINE, - TrainerType.GUZMA, - TrainerType.ROSE, - TrainerType.PENNY, - ]), - ) - .setCustomModifierRewards({ - guaranteedModifierTiers: [ - ModifierTier.ROGUE, - ModifierTier.ROGUE, - ModifierTier.ULTRA, - ModifierTier.ULTRA, - ModifierTier.ULTRA, - ], - allowLuckUpgrades: false, - }), - [ClassicFixedBossWaves.RIVAL_5]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - () => - new Trainer( - TrainerType.RIVAL_5, - globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, - ), - ) - .setCustomModifierRewards({ - guaranteedModifierTiers: [ - ModifierTier.ROGUE, - ModifierTier.ROGUE, - ModifierTier.ROGUE, - ModifierTier.ULTRA, - ModifierTier.ULTRA, - ], - allowLuckUpgrades: false, - }), - [ClassicFixedBossWaves.EVIL_BOSS_2]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc( - getRandomTrainerFunc([ - TrainerType.ROCKET_BOSS_GIOVANNI_2, - TrainerType.MAXIE_2, - TrainerType.ARCHIE_2, - TrainerType.CYRUS_2, - TrainerType.GHETSIS_2, - TrainerType.LYSANDRE_2, - TrainerType.LUSAMINE_2, - TrainerType.GUZMA_2, - TrainerType.ROSE_2, - TrainerType.PENNY_2, - ]), - ) - .setCustomModifierRewards({ - guaranteedModifierTiers: [ - ModifierTier.ROGUE, - ModifierTier.ROGUE, - ModifierTier.ULTRA, - ModifierTier.ULTRA, - ModifierTier.ULTRA, - ModifierTier.ULTRA, - ], - allowLuckUpgrades: false, - }), - [ClassicFixedBossWaves.ELITE_FOUR_1]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - getRandomTrainerFunc([ - TrainerType.LORELEI, - TrainerType.WILL, - TrainerType.SIDNEY, - TrainerType.AARON, - TrainerType.SHAUNTAL, - TrainerType.MALVA, - [TrainerType.HALA, TrainerType.MOLAYNE], - TrainerType.MARNIE_ELITE, - TrainerType.RIKA, - TrainerType.CRISPIN, - ]), - ), - [ClassicFixedBossWaves.ELITE_FOUR_2]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) - .setGetTrainerFunc( - getRandomTrainerFunc([ - TrainerType.BRUNO, - TrainerType.KOGA, - TrainerType.PHOEBE, - TrainerType.BERTHA, - TrainerType.MARSHAL, - TrainerType.SIEBOLD, - TrainerType.OLIVIA, - TrainerType.NESSA_ELITE, - TrainerType.POPPY, - TrainerType.AMARYS, - ]), - ), - [ClassicFixedBossWaves.ELITE_FOUR_3]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) - .setGetTrainerFunc( - getRandomTrainerFunc([ - TrainerType.AGATHA, - TrainerType.BRUNO, - TrainerType.GLACIA, - TrainerType.FLINT, - TrainerType.GRIMSLEY, - TrainerType.WIKSTROM, - TrainerType.ACEROLA, - [TrainerType.BEA_ELITE, TrainerType.ALLISTER_ELITE], - TrainerType.LARRY_ELITE, - TrainerType.LACEY, - ]), - ), - [ClassicFixedBossWaves.ELITE_FOUR_4]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) - .setGetTrainerFunc( - getRandomTrainerFunc([ - TrainerType.LANCE, - TrainerType.KAREN, - TrainerType.DRAKE, - TrainerType.LUCIAN, - TrainerType.CAITLIN, - TrainerType.DRASNA, - TrainerType.KAHILI, - TrainerType.RAIHAN_ELITE, - TrainerType.HASSEL, - TrainerType.DRAYTON, - ]), - ), - [ClassicFixedBossWaves.CHAMPION]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) - .setGetTrainerFunc( - getRandomTrainerFunc([ - TrainerType.BLUE, - [TrainerType.RED, TrainerType.LANCE_CHAMPION], - [TrainerType.STEVEN, TrainerType.WALLACE], - TrainerType.CYNTHIA, - [TrainerType.ALDER, TrainerType.IRIS], - TrainerType.DIANTHA, - [TrainerType.KUKUI, TrainerType.HAU], - [TrainerType.LEON, TrainerType.MUSTARD], - [TrainerType.GEETA, TrainerType.NEMONA], - TrainerType.KIERAN, - ]), - ), - [ClassicFixedBossWaves.RIVAL_6]: new FixedBattleConfig() - .setBattleType(BattleType.TRAINER) - .setGetTrainerFunc( - () => - new Trainer( - TrainerType.RIVAL_6, - globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, - ), - ) - .setCustomModifierRewards({ - guaranteedModifierTiers: [ - ModifierTier.ROGUE, - ModifierTier.ROGUE, - ModifierTier.ULTRA, - ModifierTier.ULTRA, - ModifierTier.GREAT, - ModifierTier.GREAT, - ], - allowLuckUpgrades: false, - }), -}; diff --git a/src/configs/inputs/cfg_keyboard_qwerty.ts b/src/configs/inputs/cfg_keyboard_qwerty.ts index 4f0353971e0..bca4f828d34 100644 --- a/src/configs/inputs/cfg_keyboard_qwerty.ts +++ b/src/configs/inputs/cfg_keyboard_qwerty.ts @@ -1,5 +1,5 @@ import { Button } from "#enums/buttons"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; +import { SettingKeyboard } from "#system/settings-keyboard"; const cfg_keyboard_qwerty = { padID: "default", diff --git a/src/configs/inputs/pad_dualshock.ts b/src/configs/inputs/pad_dualshock.ts index 51af1b2defd..100baa5efad 100644 --- a/src/configs/inputs/pad_dualshock.ts +++ b/src/configs/inputs/pad_dualshock.ts @@ -1,5 +1,5 @@ -import { SettingGamepad } from "../../system/settings/settings-gamepad"; import { Button } from "#enums/buttons"; +import { SettingGamepad } from "#system/settings-gamepad"; /** * Dualshock mapping diff --git a/src/configs/inputs/pad_generic.ts b/src/configs/inputs/pad_generic.ts index e47b7ce1ace..fc70f55fc7a 100644 --- a/src/configs/inputs/pad_generic.ts +++ b/src/configs/inputs/pad_generic.ts @@ -1,5 +1,5 @@ -import { SettingGamepad } from "../../system/settings/settings-gamepad"; import { Button } from "#enums/buttons"; +import { SettingGamepad } from "#system/settings-gamepad"; /** * Generic pad mapping diff --git a/src/configs/inputs/pad_procon.ts b/src/configs/inputs/pad_procon.ts index 61558c7365e..5667db01a85 100644 --- a/src/configs/inputs/pad_procon.ts +++ b/src/configs/inputs/pad_procon.ts @@ -1,5 +1,5 @@ -import { SettingGamepad } from "#app/system/settings/settings-gamepad"; import { Button } from "#enums/buttons"; +import { SettingGamepad } from "#system/settings-gamepad"; /** * Nintendo Pro Controller mapping diff --git a/src/configs/inputs/pad_unlicensedSNES.ts b/src/configs/inputs/pad_unlicensedSNES.ts index d0c4f41c8f5..7d5dc055507 100644 --- a/src/configs/inputs/pad_unlicensedSNES.ts +++ b/src/configs/inputs/pad_unlicensedSNES.ts @@ -1,5 +1,5 @@ -import { SettingGamepad } from "../../system/settings/settings-gamepad"; import { Button } from "#enums/buttons"; +import { SettingGamepad } from "#system/settings-gamepad"; /** * 081f-e401 - UnlicensedSNES diff --git a/src/configs/inputs/pad_xbox360.ts b/src/configs/inputs/pad_xbox360.ts index 60cbd9ab181..7c719e77446 100644 --- a/src/configs/inputs/pad_xbox360.ts +++ b/src/configs/inputs/pad_xbox360.ts @@ -1,5 +1,5 @@ -import { SettingGamepad } from "../../system/settings/settings-gamepad"; import { Button } from "#enums/buttons"; +import { SettingGamepad } from "#system/settings-gamepad"; /** * Generic pad mapping diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index fa4ee2286ff..aec5f65525e 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -1,92 +1,80 @@ -import { MoveResult } from "#enums/move-result"; -import { HitResult } from "#enums/hit-result"; -import { - BooleanHolder, - NumberHolder, - toDmgValue, - isNullOrUndefined, - randSeedItem, - randSeedInt, - randSeedFloat, - coerceArray, -} from "#app/utils/common"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { GroundedTag } from "#app/data/battler-tags"; -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import { - getNonVolatileStatusEffects, - getStatusEffectDescriptor, - getStatusEffectHealText, -} from "#app/data/status-effect"; -import { Gender } from "#app/data/gender"; -import { applyMoveAttrs } from "../moves/apply-attrs"; -import { allMoves } from "../data-lists"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { BerryModifier, HitHealModifier, PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { TerrainType } from "#app/data/terrain"; -import { pokemonFormChanges } from "../pokemon-forms"; -import { - SpeciesFormChangeWeatherTrigger, - SpeciesFormChangeAbilityTrigger, -} from "../pokemon-forms/form-change-triggers"; -import i18next from "i18next"; -import { Command } from "#enums/command"; -import { BerryModifierType } from "#app/modifier/modifier-type"; -import { getPokeballName } from "#app/data/pokeball"; -import { BattleType } from "#enums/battle-type"; -import { globalScene } from "#app/global-scene"; -import { allAbilities } from "#app/data/data-lists"; +/* biome-ignore-start lint/correctness/noUnusedImports: tsdoc imports */ +import type { BattleScene } from "#app/battle-scene"; +import type { SpeciesFormChangeRevertWeatherFormTrigger } from "#data/form-change-triggers"; +/* biome-ignore-end lint/correctness/noUnusedImports: tsdoc imports */ -// Enum imports -import { Stat, BATTLE_STATS, EFFECTIVE_STATS, getStatKey } from "#enums/stat"; -import { PokemonType } from "#enums/pokemon-type"; -import { PokemonAnimType } from "#enums/pokemon-anim-type"; -import { StatusEffect } from "#enums/status-effect"; -import { WeatherType } from "#enums/weather-type"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import type { ArenaTrapTag, SuppressAbilitiesTag } from "#data/arena-tag"; +import type { BattlerTag } from "#data/battler-tags"; +import { GroundedTag } from "#data/battler-tags"; +import { getBerryEffectFunc } from "#data/berry"; +import { allAbilities, allMoves } from "#data/data-lists"; +import { SpeciesFormChangeAbilityTrigger, SpeciesFormChangeWeatherTrigger } from "#data/form-change-triggers"; +import { Gender } from "#data/gender"; +import { getPokeballName } from "#data/pokeball"; +import { pokemonFormChanges } from "#data/pokemon-forms"; +import { getNonVolatileStatusEffects, getStatusEffectDescriptor, getStatusEffectHealText } from "#data/status-effect"; +import { TerrainType } from "#data/terrain"; +import type { Weather } from "#data/weather"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { BattlerTagType } from "#enums/battler-tag-type"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { SwitchType } from "#enums/switch-type"; +import type { BerryType } from "#enums/berry-type"; +import { Command } from "#enums/command"; +import { HitResult } from "#enums/hit-result"; +import { MoveCategory } from "#enums/MoveCategory"; import { MoveFlags } from "#enums/MoveFlags"; import { MoveTarget } from "#enums/MoveTarget"; -import { MoveCategory } from "#enums/MoveCategory"; import { CommonAnim } from "#enums/move-anims-common"; -import { getBerryEffectFunc } from "#app/data/berry"; -import { BerryUsedEvent } from "#app/events/battle-scene"; -import { noAbilityTypeOverrideMoves } from "#app/data/moves/invalid-moves"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { MoveUseMode } from "#enums/move-use-mode"; - -// Type imports -import type { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; +import { PokemonAnimType } from "#enums/pokemon-anim-type"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; import type { BattleStat, EffectiveStat } from "#enums/stat"; -import type { BerryType } from "#enums/berry-type"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import type { PokemonMove } from "../moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; -import type { Weather } from "#app/data/weather"; -import type { BattlerTag } from "#app/data/battler-tags"; +import { BATTLE_STATS, EFFECTIVE_STATS, getStatKey, Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { SwitchType } from "#enums/switch-type"; +import { WeatherType } from "#enums/weather-type"; +import { BerryUsedEvent } from "#events/battle-scene"; +import type { EnemyPokemon, Pokemon } from "#field/pokemon"; +import { BerryModifier, HitHealModifier, PokemonHeldItemModifier } from "#modifiers/modifier"; +import { BerryModifierType } from "#modifiers/modifier-type"; +import { applyMoveAttrs } from "#moves/apply-attrs"; +import { noAbilityTypeOverrideMoves } from "#moves/invalid-moves"; +import type { Move } from "#moves/move"; +import type { PokemonMove } from "#moves/pokemon-move"; +import type { StatStageChangePhase } from "#phases/stat-stage-change-phase"; import type { AbAttrCondition, + AbAttrMap, + AbAttrString, + PokemonAttackCondition, PokemonDefendCondition, PokemonStatStageChangeCondition, - PokemonAttackCondition, - AbAttrString, - AbAttrMap, -} from "#app/@types/ability-types"; -import type { BattlerIndex } from "#enums/battler-index"; -import type Move from "#app/data/moves/move"; -import type { ArenaTrapTag, SuppressAbilitiesTag } from "#app/data/arena-tag"; -import type { Constructor } from "#app/utils/common"; -import type { Localizable } from "#app/@types/locales"; -import { applyAbAttrs } from "./apply-ab-attrs"; -import type { Closed, Exact } from "#app/@types/type-helpers"; +} from "#types/ability-types"; +import type { Localizable } from "#types/locales"; +import type { Closed, Exact } from "#types/type-helpers"; +import type { Constructor } from "#utils/common"; +import { + BooleanHolder, + coerceArray, + isNullOrUndefined, + NumberHolder, + randSeedFloat, + randSeedInt, + randSeedItem, + toDmgValue, +} from "#utils/common"; +import i18next from "i18next"; -// biome-ignore-start lint/correctness/noUnusedImports: Used in TSDoc -import type BattleScene from "#app/battle-scene"; -import type { SpeciesFormChangeRevertWeatherFormTrigger } from "../pokemon-forms/form-change-triggers"; -// biome-ignore-end lint/correctness/noUnusedImports: Used in TSDoc export class Ability implements Localizable { public id: AbilityId; @@ -1610,37 +1598,38 @@ export class MoveTypeChangeAbAttr extends PreAttackAbAttr { } } -/** Ability attribute for changing a pokemon's type before using a move */ +/** + * Attribute to change the user's type to that of the move currently being executed. + * Used by {@linkcode AbilityId.PROTEAN} and {@linkcode AbilityId.LIBERO}. + */ export class PokemonTypeChangeAbAttr extends PreAttackAbAttr { - private moveType: PokemonType; - + private moveType: PokemonType = PokemonType.UNKNOWN; constructor() { super(true); } override canApply({ move, pokemon }: AugmentMoveInteractionAbAttrParams): boolean { if ( - !pokemon.isTerastallized && - move.id !== MoveId.STRUGGLE && - /** + pokemon.isTerastallized || + move.id === MoveId.STRUGGLE || + /* * Skip moves that call other moves because these moves generate a following move that will trigger this ability attribute - * @see {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_call_other_moves} + * See: https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_call_other_moves */ - !move.findAttr( - attr => - attr.is("RandomMovesetMoveAttr") || - attr.is("RandomMoveAttr") || - attr.is("NaturePowerAttr") || - attr.is("CopyMoveAttr"), - ) + move.hasAttr("CallMoveAttr") || + move.hasAttr("NaturePowerAttr") // TODO: remove this line when nature power is made to extend from `CallMoveAttr` ) { - const moveType = pokemon.getMoveType(move); - if (pokemon.getTypes().some(t => t !== moveType)) { - this.moveType = moveType; - return true; - } + return false; } - return false; + + // Skip changing type if we're already of the given type as-is + const moveType = pokemon.getMoveType(move); + if (pokemon.getTypes().every(t => t === moveType)) { + return false; + } + + this.moveType = moveType; + return true; } override apply({ simulated, pokemon, move }: AugmentMoveInteractionAbAttrParams): void { @@ -3050,61 +3039,40 @@ export class PostSummonCopyAllyStatsAbAttr extends PostSummonAbAttr { * Attribute used by {@linkcode AbilityId.IMPOSTER} to transform into a random opposing pokemon on entry. */ export class PostSummonTransformAbAttr extends PostSummonAbAttr { + private targetIndex: BattlerIndex = BattlerIndex.ATTACKER; constructor() { super(true, false); } - private getTarget(targets: Pokemon[]): Pokemon { - let target: Pokemon = targets[0]; - if (targets.length > 1) { - globalScene.executeWithSeedOffset(() => { - // in a double battle, if one of the opposing pokemon is fused the other one will be chosen - // if both are fused, then Imposter will fail below - if (targets[0].fusionSpecies) { - target = targets[1]; - return; - } - if (targets[1].fusionSpecies) { - target = targets[0]; - return; - } - target = randSeedItem(targets); - }, globalScene.currentBattle.waveIndex); - } else { - target = targets[0]; + /** + * Return the correct opponent for Imposter to copy, barring enemies with fusions, substitutes and illusions. + * @param user - The {@linkcode Pokemon} with this ability. + * @returns The {@linkcode Pokemon} to transform into, or `undefined` if none are eligible. + * @remarks + * This sets the private `targetIndex` field to the target's {@linkcode BattlerIndex} on success. + */ + private getTarget(user: Pokemon): Pokemon | undefined { + // As opposed to the mainline behavior of "always copy the opposite slot", + // PKR Imposter instead attempts to copy a random eligible opposing Pokemon meeting Transform's criteria. + // If none are eligible to copy, it will not activate. + const targets = user.getOpponents().filter(opp => user.canTransformInto(opp)); + if (targets.length === 0) { + return undefined; } - target = target!; - - return target; + const mon = targets[user.randBattleSeedInt(targets.length)]; + this.targetIndex = mon.getBattlerIndex(); + return mon; } - override canApply({ pokemon, simulated }: AbAttrBaseParams): boolean { - const targets = pokemon.getOpponents(); - const target = this.getTarget(targets); + override canApply({ pokemon }: AbAttrBaseParams): boolean { + const target = this.getTarget(pokemon); - if (target.summonData.illusion) { - return false; - } - - // TODO: Consider moving the simulated check to the apply method - if (simulated || !targets.length) { - return !!simulated; - } - - // transforming from or into fusion pokemon causes various problems (including crashes and save corruption) - return !(this.getTarget(targets).fusionSpecies || pokemon.fusionSpecies); + return !!target; } override apply({ pokemon }: AbAttrBaseParams): void { - const target = this.getTarget(pokemon.getOpponents()); - - globalScene.phaseManager.unshiftNew( - "PokemonTransformPhase", - pokemon.getBattlerIndex(), - target.getBattlerIndex(), - true, - ); + globalScene.phaseManager.unshiftNew("PokemonTransformPhase", pokemon.getBattlerIndex(), this.targetIndex, true); } } @@ -3167,7 +3135,7 @@ export class PostSummonFormChangeByWeatherAbAttr extends PostSummonAbAttr { /** * Attribute implementing the effects of {@link https://bulbapedia.bulbagarden.net/wiki/Commander_(Ability) | Commander}. * When the source of an ability with this attribute detects a Dondozo as their active ally, the source "jumps - * into the Dondozo's mouth," sharply boosting the Dondozo's stats, cancelling the source's moves, and + * into the Dondozo's mouth", sharply boosting the Dondozo's stats, cancelling the source's moves, and * causing attacks that target the source to always miss. */ export class CommanderAbAttr extends AbAttr { @@ -5297,14 +5265,15 @@ export class PostBattleLootAbAttr extends PostBattleAbAttr { } /** - * Shared parameters for ability attributes that are triggered after the user faints. + * Shared parameters for ability attributes that trigger after the user faints. */ export interface PostFaintAbAttrParams extends AbAttrBaseParams { - /** The pokemon that caused the faint, or undefined if not caused by a pokemon */ + /** The pokemon that caused the user to faint, or `undefined` if not caused by a Pokemon */ readonly attacker?: Pokemon; - /** The move that caused the faint, or undefined if not caused by a move */ + /** The move that caused the user to faint, or `undefined` if not caused by a move */ readonly move?: Move; - /** The result of the hit that caused the faint */ + /** The result of the hit that caused the user to faint */ + // TODO: Do we need this? It's unused by all classes readonly hitResult?: HitResult; } @@ -5337,6 +5306,26 @@ export class PostFaintUnsuppressedWeatherFormChangeAbAttr extends PostFaintAbAtt } } +export class PostFaintFormChangeAbAttr extends PostFaintAbAttr { + private formFunc: (p: Pokemon) => number; + + constructor(formFunc: (p: Pokemon) => number) { + super(true); + + this.formFunc = formFunc; + } + + override canApply({ pokemon }: AbAttrBaseParams): boolean { + return this.formFunc(pokemon) !== pokemon.formIndex; + } + + override apply({ pokemon, simulated }: AbAttrBaseParams): void { + if (!simulated) { + globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeAbilityTrigger, false); + } + } +} + export class PostFaintContactDamageAbAttr extends PostFaintAbAttr { private damageRatio: number; @@ -5347,28 +5336,35 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr { } override canApply({ pokemon, attacker, move, simulated }: PostFaintAbAttrParams): boolean { - if (!move || !attacker) { + if ( + move === undefined || + attacker === undefined || + !move.doesFlagEffectApply({ flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon }) + ) { return false; } - const diedToDirectDamage = - attacker !== undefined && - move.doesFlagEffectApply({ flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon }); + const cancelled = new BooleanHolder(false); - for (const otherPokemon of globalScene.getField(true)) { - applyAbAttrs("FieldPreventExplosiveMovesAbAttr", { - pokemon: otherPokemon, - simulated, - cancelled, - }); + // TODO: This should be in speed order + globalScene + .getField(true) + .forEach(p => applyAbAttrs("FieldPreventExplosiveMovesAbAttr", { pokemon: p, cancelled, simulated })); + + if (cancelled.value) { + return false; } - return !(!diedToDirectDamage || cancelled.value || attacker.hasAbilityWithAttr("BlockNonDirectDamageAbAttr")); + + // Confirmed: Aftermath does not activate or show text vs Magic Guard killers + applyAbAttrs("BlockNonDirectDamageAbAttr", { pokemon: attacker, cancelled }); + return !cancelled.value; } override apply({ simulated, attacker }: PostFaintAbAttrParams): void { if (!attacker || simulated) { return; } - attacker.damageAndUpdate(toDmgValue(attacker!.getMaxHp() * (1 / this.damageRatio)), { + + attacker.damageAndUpdate(toDmgValue(attacker.getMaxHp() * (1 / this.damageRatio)), { result: HitResult.INDIRECT, }); attacker.turnData.damageTaken += toDmgValue(attacker.getMaxHp() * (1 / this.damageRatio)); @@ -5383,20 +5379,33 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr { } /** - * Attribute used for abilities (Innards Out) that damage the opponent based on how much HP the last attack used to knock out the owner of the ability. + * Attribute used for abilities that damage opponents causing the user to faint + * equal to the amount of damage the last attack inflicted. + * + * Used for {@linkcode Abilities.INNARDS_OUT}. * @sealed */ export class PostFaintHPDamageAbAttr extends PostFaintAbAttr { override apply({ simulated, pokemon, move, attacker }: PostFaintAbAttrParams): void { - //If the mon didn't die to indirect damage - if (move !== undefined && attacker !== undefined && !simulated) { - const damage = pokemon.turnData.attacksReceived[0].damage; - attacker.damageAndUpdate(damage, { result: HitResult.INDIRECT }); - attacker.turnData.damageTaken += damage; + // return early if the user died to indirect damage, target has magic guard or was KO'd by an ally + if (!move || !attacker || simulated || attacker.getAlly() === pokemon) { + return; } + + const cancelled = new BooleanHolder(false); + applyAbAttrs("BlockNonDirectDamageAbAttr", { pokemon: attacker, cancelled }); + if (cancelled.value) { + return; + } + + const damage = pokemon.turnData.attacksReceived[0].damage; + attacker.damageAndUpdate(damage, { result: HitResult.INDIRECT }); + attacker.turnData.damageTaken += damage; } - getTriggerMessage({ pokemon }: PostFaintAbAttrParams, abilityName: string): string { + // Oddly, Innards Out still shows a flyout if the effect was blocked due to Magic Guard... + // TODO: Verify on cart + override getTriggerMessage({ pokemon }: PostFaintAbAttrParams, abilityName: string): string { return i18next.t("abilityTriggers:postFaintHpDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName, @@ -7104,7 +7113,8 @@ export function initAbilities() { .bypassFaint(), new Ability(AbilityId.IMPOSTER, 5) .attr(PostSummonTransformAbAttr) - .uncopiable(), + .uncopiable() + .edgeCase(), // Should copy rage fist hit count, etc (see Transform edge case for full list) new Ability(AbilityId.INFILTRATOR, 5) .attr(InfiltratorAbAttr) .partial(), // does not bypass Mist @@ -7180,8 +7190,10 @@ export function initAbilities() { new Ability(AbilityId.CHEEK_POUCH, 6) .attr(HealFromBerryUseAbAttr, 1 / 3), new Ability(AbilityId.PROTEAN, 6) - .attr(PokemonTypeChangeAbAttr), - //.condition((p) => !p.summonData.abilitiesApplied.includes(AbilityId.PROTEAN)), //Gen 9 Implementation + .attr(PokemonTypeChangeAbAttr) + // .condition((p) => !p.summonData.abilitiesApplied.includes(Abilities.PROTEAN)) //Gen 9 Implementation + // TODO: needs testing on interaction with weather blockage + .edgeCase(), new Ability(AbilityId.FUR_COAT, 6) .attr(ReceivedMoveDamageMultiplierAbAttr, (_target, _user, move) => move.category === MoveCategory.PHYSICAL, 0.5) .ignorable(), @@ -7325,6 +7337,7 @@ export function initAbilities() { (pokemon, abilityName) => i18next.t("abilityTriggers:disguiseAvoidedDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName: abilityName }), (pokemon) => toDmgValue(pokemon.getMaxHp() / 8)) .attr(PostBattleInitFormChangeAbAttr, () => 0) + .attr(PostFaintFormChangeAbAttr, () => 0) .uncopiable() .unreplaceable() .unsuppressable() @@ -7333,6 +7346,7 @@ export function initAbilities() { new Ability(AbilityId.BATTLE_BOND, 7) .attr(PostVictoryFormChangeAbAttr, () => 2) .attr(PostBattleInitFormChangeAbAttr, () => 1) + .attr(PostFaintFormChangeAbAttr, () => 1) .attr(NoFusionAbilityAbAttr) .uncopiable() .unreplaceable() @@ -7344,6 +7358,7 @@ export function initAbilities() { .conditionalAttr(p => p.formIndex === 4 || p.formIndex === 5, PostBattleInitFormChangeAbAttr, p => p.formIndex - 2) .conditionalAttr(p => p.getHpRatio() <= 0.5 && (p.formIndex === 2 || p.formIndex === 3), PostSummonFormChangeAbAttr, p => p.formIndex + 2) .conditionalAttr(p => p.getHpRatio() <= 0.5 && (p.formIndex === 2 || p.formIndex === 3), PostTurnFormChangeAbAttr, p => p.formIndex + 2) + .conditionalAttr(p => p.formIndex === 4 || p.formIndex === 5, PostFaintFormChangeAbAttr, p => p.formIndex - 2) .attr(NoFusionAbilityAbAttr) .uncopiable() .unreplaceable() @@ -7434,8 +7449,10 @@ export function initAbilities() { new Ability(AbilityId.DAUNTLESS_SHIELD, 8) .attr(PostSummonStatStageChangeAbAttr, [ Stat.DEF ], 1, true), new Ability(AbilityId.LIBERO, 8) - .attr(PokemonTypeChangeAbAttr), - //.condition((p) => !p.summonData.abilitiesApplied.includes(AbilityId.LIBERO)), //Gen 9 Implementation + .attr(PokemonTypeChangeAbAttr) + //.condition((p) => !p.summonData.abilitiesApplied.includes(Abilities.LIBERO)), //Gen 9 Implementation + // TODO: needs testing on interaction with weather blockage + .edgeCase(), new Ability(AbilityId.BALL_FETCH, 8) .attr(FetchBallAbAttr) .condition(getOncePerBattleCondition(AbilityId.BALL_FETCH)), diff --git a/src/data/abilities/apply-ab-attrs.ts b/src/data/abilities/apply-ab-attrs.ts index 1571d64d170..e8f01a4bb36 100644 --- a/src/data/abilities/apply-ab-attrs.ts +++ b/src/data/abilities/apply-ab-attrs.ts @@ -1,6 +1,5 @@ -import type { AbAttrParamMap } from "#app/@types/ability-types"; -import type { AbAttrBaseParams, AbAttrString, CallableAbAttrString } from "#app/@types/ability-types"; import { globalScene } from "#app/global-scene"; +import type { AbAttrBaseParams, AbAttrParamMap, AbAttrString, CallableAbAttrString } from "#types/ability-types"; function applySingleAbAttrs( attrType: T, diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index 48fdebd745f..0c369f8b22d 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -1,26 +1,26 @@ +import { applyAbAttrs, applyOnGainAbAttrs, applyOnLoseAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import type { Arena } from "#app/field/arena"; -import { PokemonType } from "#enums/pokemon-type"; -import { BooleanHolder, NumberHolder, toDmgValue } from "#app/utils/common"; -import { allMoves } from "./data-lists"; -import { MoveTarget } from "#enums/MoveTarget"; -import { MoveCategory } from "#enums/MoveCategory"; import { getPokemonNameWithAffix } from "#app/messages"; -import type Pokemon from "#app/field/pokemon"; -import { HitResult } from "#enums/hit-result"; -import { StatusEffect } from "#enums/status-effect"; -import type { BattlerIndex } from "#enums/battler-index"; -import { applyAbAttrs, applyOnGainAbAttrs, applyOnLoseAbAttrs } from "./abilities/apply-ab-attrs"; -import { Stat } from "#enums/stat"; -import { CommonBattleAnim } from "#app/data/battle-anims"; -import { CommonAnim } from "#enums/move-anims-common"; -import i18next from "i18next"; +import { CommonBattleAnim } from "#data/battle-anims"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { ArenaTagType } from "#enums/arena-tag-type"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { MoveId } from "#enums/move-id"; import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import type { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { HitResult } from "#enums/hit-result"; +import { MoveCategory } from "#enums/MoveCategory"; +import { MoveTarget } from "#enums/MoveTarget"; +import { CommonAnim } from "#enums/move-anims-common"; +import { MoveId } from "#enums/move-id"; import { MoveUseMode } from "#enums/move-use-mode"; +import { PokemonType } from "#enums/pokemon-type"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import type { Arena } from "#field/arena"; +import type { Pokemon } from "#field/pokemon"; +import { BooleanHolder, NumberHolder, toDmgValue } from "#utils/common"; +import i18next from "i18next"; export abstract class ArenaTag { constructor( @@ -1117,7 +1117,6 @@ export class TrickRoomTag extends ArenaTag { globalScene.phaseManager.queueMessage( i18next.t("arenaTag:trickRoomOnAdd", { moveName: this.getMoveName(), - opponentDesc: source.getOpponentDescriptor(), }), ); } diff --git a/src/data/balance/biomes.ts b/src/data/balance/biomes.ts index f0dade48f92..32195b90e43 100644 --- a/src/data/balance/biomes.ts +++ b/src/data/balance/biomes.ts @@ -1,13 +1,13 @@ -import { PokemonType } from "#enums/pokemon-type"; -import { randSeedInt, getEnumValues } from "#app/utils/common"; -import type { SpeciesFormEvolution } from "#app/data/balance/pokemon-evolutions"; -import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; -import i18next from "i18next"; +import type { SpeciesFormEvolution } from "#balance/pokemon-evolutions"; +import { pokemonEvolutions } from "#balance/pokemon-evolutions"; import { BiomeId } from "#enums/biome-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; import { TimeOfDay } from "#enums/time-of-day"; import { TrainerType } from "#enums/trainer-type"; -// import beautify from "json-beautify"; +import { randSeedInt } from "#utils/common"; +import { getEnumValues } from "#utils/enums"; +import i18next from "i18next"; export function getBiomeName(biome: BiomeId | -1) { if (biome === -1) { @@ -490,7 +490,7 @@ export const biomePokemonPools: BiomePokemonPools = { [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.POLITOED, SpeciesId.GALAR_STUNFISK ] }, - [BiomePoolTier.ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.AZELF, SpeciesId.POIPOLE ] }, + [BiomePoolTier.ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.AZELF, { 1: [ SpeciesId.POIPOLE ], 60: [ SpeciesId.NAGANADEL ] } ] }, [BiomePoolTier.BOSS]: { [TimeOfDay.DAWN]: [ SpeciesId.QUAGSIRE, SpeciesId.LUDICOLO ], [TimeOfDay.DAY]: [ SpeciesId.QUAGSIRE, SpeciesId.LUDICOLO ], @@ -505,7 +505,7 @@ export const biomePokemonPools: BiomePokemonPools = { [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.FERALIGATR, SpeciesId.POLITOED, SpeciesId.SWAMPERT, SpeciesId.GALAR_STUNFISK ] }, - [BiomePoolTier.BOSS_SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.AZELF, SpeciesId.NAGANADEL ] }, + [BiomePoolTier.BOSS_SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.AZELF, { 1: [ SpeciesId.POIPOLE ], 60: [ SpeciesId.NAGANADEL ] } ] }, [BiomePoolTier.BOSS_ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [] } }, [BiomeId.BEACH]: { @@ -1118,7 +1118,7 @@ export const biomePokemonPools: BiomePokemonPools = { }, [BiomePoolTier.RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.HITMONLEE, SpeciesId.HITMONCHAN, SpeciesId.LUCARIO, SpeciesId.THROH, SpeciesId.SAWK, { 1: [ SpeciesId.PANCHAM ], 52: [ SpeciesId.PANGORO ] } ] }, [BiomePoolTier.SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.HITMONTOP, SpeciesId.GALLADE, SpeciesId.GALAR_FARFETCHD ] }, - [BiomePoolTier.ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.TERRAKION, SpeciesId.KUBFU, SpeciesId.GALAR_ZAPDOS ] }, + [BiomePoolTier.ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.TERRAKION, { 1: [ SpeciesId.KUBFU ], 60: [ SpeciesId.URSHIFU] }, SpeciesId.GALAR_ZAPDOS ] }, [BiomePoolTier.BOSS]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], @@ -1127,7 +1127,7 @@ export const biomePokemonPools: BiomePokemonPools = { [TimeOfDay.ALL]: [ SpeciesId.HITMONLEE, SpeciesId.HITMONCHAN, SpeciesId.HARIYAMA, SpeciesId.MEDICHAM, SpeciesId.LUCARIO, SpeciesId.TOXICROAK, SpeciesId.THROH, SpeciesId.SAWK, SpeciesId.SCRAFTY, SpeciesId.MIENSHAO, SpeciesId.BEWEAR, SpeciesId.GRAPPLOCT, SpeciesId.ANNIHILAPE ] }, [BiomePoolTier.BOSS_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.HITMONTOP, SpeciesId.GALLADE, SpeciesId.PANGORO, SpeciesId.SIRFETCHD, SpeciesId.HISUI_DECIDUEYE ] }, - [BiomePoolTier.BOSS_SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.TERRAKION, SpeciesId.URSHIFU ] }, + [BiomePoolTier.BOSS_SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.TERRAKION, { 1: [ SpeciesId.KUBFU ], 60: [ SpeciesId.URSHIFU] } ] }, [BiomePoolTier.BOSS_ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.ZAMAZENTA, SpeciesId.GALAR_ZAPDOS ] } }, [BiomeId.FACTORY]: { @@ -1418,8 +1418,8 @@ export const biomePokemonPools: BiomePokemonPools = { { 1: [ SpeciesId.HATENNA ], 32: [ SpeciesId.HATTREM ], 42: [ SpeciesId.HATTERENE ] } ] }, - [BiomePoolTier.RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.AUDINO, SpeciesId.ETERNAL_FLOETTE ] }, - [BiomePoolTier.SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [] }, + [BiomePoolTier.RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.AUDINO ] }, + [BiomePoolTier.SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.ETERNAL_FLOETTE ] }, [BiomePoolTier.ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.DIANCIE, SpeciesId.ENAMORUS ] }, [BiomePoolTier.BOSS]: { [TimeOfDay.DAWN]: [], @@ -1596,10 +1596,10 @@ export const biomePokemonPools: BiomePokemonPools = { [BiomePoolTier.UNCOMMON]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ { 1: [ SpeciesId.SOLOSIS ], 32: [ SpeciesId.DUOSION ], 41: [ SpeciesId.REUNICLUS ] } ] }, [BiomePoolTier.RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.DITTO, { 1: [ SpeciesId.PORYGON ], 30: [ SpeciesId.PORYGON2 ] } ] }, [BiomePoolTier.SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.ROTOM ] }, - [BiomePoolTier.ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.TYPE_NULL ] }, + [BiomePoolTier.ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ { 1: [SpeciesId.TYPE_NULL], 60: [ SpeciesId.SILVALLY ] } ] }, [BiomePoolTier.BOSS]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.MUK, SpeciesId.ELECTRODE, SpeciesId.BRONZONG, SpeciesId.MAGNEZONE, SpeciesId.PORYGON_Z, SpeciesId.REUNICLUS, SpeciesId.KLINKLANG ] }, [BiomePoolTier.BOSS_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [] }, - [BiomePoolTier.BOSS_SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.ROTOM, SpeciesId.ZYGARDE, SpeciesId.SILVALLY ] }, + [BiomePoolTier.BOSS_SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.ROTOM, SpeciesId.ZYGARDE, { 1: [SpeciesId.TYPE_NULL], 60: [ SpeciesId.SILVALLY ] } ] }, [BiomePoolTier.BOSS_ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [ SpeciesId.MEWTWO, SpeciesId.MIRAIDON ] } }, [BiomeId.END]: { @@ -6969,7 +6969,7 @@ export function initBiomes() { ] ], [ SpeciesId.ETERNAL_FLOETTE, PokemonType.FAIRY, -1, [ - [ BiomeId.FAIRY_CAVE, BiomePoolTier.RARE ], + [ BiomeId.FAIRY_CAVE, BiomePoolTier.SUPER_RARE ], [ BiomeId.FAIRY_CAVE, BiomePoolTier.BOSS_RARE ] ] ], @@ -7708,10 +7708,10 @@ export function initBiomes() { const traverseBiome = (biome: BiomeId, depth: number) => { if (biome === BiomeId.END) { - const biomeList = Object.keys(BiomeId).filter(key => !Number.isNaN(Number(key))); + const biomeList = getEnumValues(BiomeId) biomeList.pop(); // Removes BiomeId.END from the list const randIndex = randSeedInt(biomeList.length, 1); // Will never be BiomeId.TOWN - biome = BiomeId[biomeList[randIndex]]; + biome = biomeList[randIndex]; } const linkedBiomes: (BiomeId | [ BiomeId, number ])[] = Array.isArray(biomeLinks[biome]) ? biomeLinks[biome] as (BiomeId | [ BiomeId, number ])[] diff --git a/src/data/balance/egg-moves.ts b/src/data/balance/egg-moves.ts index fa89e558ba7..f5026abe2ef 100644 --- a/src/data/balance/egg-moves.ts +++ b/src/data/balance/egg-moves.ts @@ -1,8 +1,8 @@ -import { allMoves } from "../data-lists"; -import { getEnumKeys, getEnumValues } from "#app/utils/common"; +import { allMoves } from "#data/data-lists"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; - +import { toReadableString } from "#utils/common"; +import { getEnumKeys, getEnumValues } from "#utils/enums"; export const speciesEggMoves = { [SpeciesId.BULBASAUR]: [ MoveId.SAPPY_SEED, MoveId.MALIGNANT_CHAIN, MoveId.EARTH_POWER, MoveId.MATCHA_GOTCHA ], @@ -26,14 +26,14 @@ export const speciesEggMoves = { [SpeciesId.MEOWTH]: [ MoveId.HEART_STAMP, MoveId.SWORDS_DANCE, MoveId.SIZZLY_SLIDE, MoveId.TAIL_SLAP ], [SpeciesId.PSYDUCK]: [ MoveId.FROST_BREATH, MoveId.AQUA_STEP, MoveId.MYSTICAL_POWER, MoveId.BOUNCY_BUBBLE ], [SpeciesId.MANKEY]: [ MoveId.DRAIN_PUNCH, MoveId.SLACK_OFF, MoveId.METEOR_MASH, MoveId.NO_RETREAT ], - [SpeciesId.GROWLITHE]: [ MoveId.ZING_ZAP, MoveId.PARTING_SHOT, MoveId.MORNING_SUN, MoveId.SACRED_FIRE ], + [SpeciesId.GROWLITHE]: [ MoveId.ZING_ZAP, MoveId.DRAGON_DANCE, MoveId.MORNING_SUN, MoveId.SACRED_FIRE ], [SpeciesId.POLIWAG]: [ MoveId.SLACK_OFF, MoveId.WILDBOLT_STORM, MoveId.DRAIN_PUNCH, MoveId.SURGING_STRIKES ], [SpeciesId.ABRA]: [ MoveId.AURA_SPHERE, MoveId.BADDY_BAD, MoveId.ICE_BEAM, MoveId.PSYSTRIKE ], [SpeciesId.MACHOP]: [ MoveId.COMBAT_TORQUE, MoveId.METEOR_MASH, MoveId.MOUNTAIN_GALE, MoveId.FISSURE ], [SpeciesId.BELLSPROUT]: [ MoveId.SOLAR_BLADE, MoveId.STRENGTH_SAP, MoveId.FIRE_LASH, MoveId.VICTORY_DANCE ], [SpeciesId.TENTACOOL]: [ MoveId.BANEFUL_BUNKER, MoveId.MALIGNANT_CHAIN, MoveId.BOUNCY_BUBBLE, MoveId.STRENGTH_SAP ], [SpeciesId.GEODUDE]: [ MoveId.FLARE_BLITZ, MoveId.HEAD_SMASH, MoveId.SHORE_UP, MoveId.SHELL_SMASH ], - [SpeciesId.PONYTA]: [ MoveId.HEADLONG_RUSH, MoveId.FIRE_LASH, MoveId.SWORDS_DANCE, MoveId.VOLT_TACKLE ], + [SpeciesId.PONYTA]: [ MoveId.HEADLONG_RUSH, MoveId.HIGH_JUMP_KICK, MoveId.SWORDS_DANCE, MoveId.VOLT_TACKLE ], [SpeciesId.SLOWPOKE]: [ MoveId.SPLISHY_SPLASH, MoveId.FROST_BREATH, MoveId.SHED_TAIL, MoveId.MYSTICAL_POWER ], [SpeciesId.MAGNEMITE]: [ MoveId.PARABOLIC_CHARGE, MoveId.FLAMETHROWER, MoveId.ICE_BEAM, MoveId.THUNDERCLAP ], [SpeciesId.FARFETCHD]: [ MoveId.IVY_CUDGEL, MoveId.TRIPLE_ARROWS, MoveId.DRILL_RUN, MoveId.VICTORY_DANCE ], @@ -63,9 +63,9 @@ export const speciesEggMoves = { [SpeciesId.LAPRAS]: [ MoveId.RECOVER, MoveId.FREEZE_DRY, MoveId.SCALD, MoveId.SHELL_SMASH ], [SpeciesId.DITTO]: [ MoveId.MIMIC, MoveId.SKETCH, MoveId.METRONOME, MoveId.IMPRISON ], [SpeciesId.EEVEE]: [ MoveId.WISH, MoveId.NO_RETREAT, MoveId.ZIPPY_ZAP, MoveId.BOOMBURST ], - [SpeciesId.PORYGON]: [ MoveId.THUNDERCLAP, MoveId.AURA_SPHERE, MoveId.FLAMETHROWER, MoveId.TECHNO_BLAST ], + [SpeciesId.PORYGON]: [ MoveId.THUNDERCLAP, MoveId.DAZZLING_GLEAM, MoveId.FLAMETHROWER, MoveId.TECHNO_BLAST ], [SpeciesId.OMANYTE]: [ MoveId.FREEZE_DRY, MoveId.GIGA_DRAIN, MoveId.POWER_GEM, MoveId.STEAM_ERUPTION ], - [SpeciesId.KABUTO]: [ MoveId.CEASELESS_EDGE, MoveId.HIGH_HORSEPOWER, MoveId.CRABHAMMER, MoveId.MIGHTY_CLEAVE ], + [SpeciesId.KABUTO]: [ MoveId.CEASELESS_EDGE, MoveId.HIGH_HORSEPOWER, MoveId.MIGHTY_CLEAVE, MoveId.CRABHAMMER ], [SpeciesId.AERODACTYL]: [ MoveId.FLOATY_FALL, MoveId.HIGH_HORSEPOWER, MoveId.STONE_AXE, MoveId.SWORDS_DANCE ], [SpeciesId.ARTICUNO]: [ MoveId.EARTH_POWER, MoveId.CALM_MIND, MoveId.AURORA_VEIL, MoveId.AEROBLAST ], [SpeciesId.ZAPDOS]: [ MoveId.BLEAKWIND_STORM, MoveId.CALM_MIND, MoveId.SANDSEAR_STORM, MoveId.ELECTRO_SHOT ], @@ -75,8 +75,8 @@ export const speciesEggMoves = { [SpeciesId.MEW]: [ MoveId.PHOTON_GEYSER, MoveId.MOONBLAST, MoveId.ASTRAL_BARRAGE, MoveId.SHELL_SMASH ], [SpeciesId.CHIKORITA]: [ MoveId.SAPPY_SEED, MoveId.STONE_AXE, MoveId.DRAGON_DANCE, MoveId.SPORE ], - [SpeciesId.CYNDAQUIL]: [ MoveId.NASTY_PLOT, MoveId.EARTH_POWER, MoveId.FIERY_DANCE, MoveId.ELECTRO_DRIFT ], - [SpeciesId.TOTODILE]: [ MoveId.THUNDER_PUNCH, MoveId.DRAGON_DANCE, MoveId.PLAY_ROUGH, MoveId.SURGING_STRIKES ], + [SpeciesId.CYNDAQUIL]: [ MoveId.BURNING_BULWARK, MoveId.EARTH_POWER, MoveId.FIERY_DANCE, MoveId.ELECTRO_DRIFT ], + [SpeciesId.TOTODILE]: [ MoveId.THUNDER_FANG, MoveId.DRAGON_DANCE, MoveId.DRAIN_PUNCH, MoveId.SURGING_STRIKES ], [SpeciesId.SENTRET]: [ MoveId.TIDY_UP, MoveId.FAKE_OUT, MoveId.NUZZLE, MoveId.EXTREME_SPEED ], [SpeciesId.HOOTHOOT]: [ MoveId.TAKE_HEART, MoveId.ESPER_WING, MoveId.AEROBLAST, MoveId.BOOMBURST ], [SpeciesId.LEDYBA]: [ MoveId.POLLEN_PUFF, MoveId.MAT_BLOCK, MoveId.PARTING_SHOT, MoveId.SPORE ], @@ -97,7 +97,7 @@ export const speciesEggMoves = { [SpeciesId.MISDREAVUS]: [ MoveId.TAKE_HEART, MoveId.MOONBLAST, MoveId.AURA_SPHERE, MoveId.MOONGEIST_BEAM ], [SpeciesId.UNOWN]: [ MoveId.NATURE_POWER, MoveId.COSMIC_POWER, MoveId.ANCIENT_POWER, MoveId.MYSTICAL_POWER ], [SpeciesId.GIRAFARIG]: [ MoveId.MYSTICAL_POWER, MoveId.NIGHT_DAZE, MoveId.RECOVER, MoveId.BOOMBURST ], - [SpeciesId.PINECO]: [ MoveId.METAL_BURST, MoveId.SHORE_UP, MoveId.BODY_PRESS, MoveId.DIAMOND_STORM ], + [SpeciesId.PINECO]: [ MoveId.METAL_BURST, MoveId.RECOVER, MoveId.LEECH_LIFE, MoveId.SPIN_OUT ], [SpeciesId.DUNSPARCE]: [ MoveId.WICKED_TORQUE, MoveId.MAGICAL_TORQUE, MoveId.BLAZING_TORQUE, MoveId.EXTREME_SPEED ], [SpeciesId.GLIGAR]: [ MoveId.FLOATY_FALL, MoveId.THOUSAND_WAVES, MoveId.SPIKY_SHIELD, MoveId.MIGHTY_CLEAVE ], [SpeciesId.SNUBBULL]: [ MoveId.FACADE, MoveId.HIGH_HORSEPOWER, MoveId.SWORDS_DANCE, MoveId.EXTREME_SPEED ], @@ -111,12 +111,12 @@ export const speciesEggMoves = { [SpeciesId.CORSOLA]: [ MoveId.SCALD, MoveId.FREEZE_DRY, MoveId.STRENGTH_SAP, MoveId.SALT_CURE ], [SpeciesId.REMORAID]: [ MoveId.WATER_SHURIKEN, MoveId.TAKE_HEART, MoveId.SHELL_SIDE_ARM, MoveId.BOUNCY_BUBBLE ], [SpeciesId.DELIBIRD]: [ MoveId.BONEMERANG, MoveId.FLOATY_FALL, MoveId.VICTORY_DANCE, MoveId.GLACIAL_LANCE ], - [SpeciesId.SKARMORY]: [ MoveId.ROOST, MoveId.BODY_PRESS, MoveId.SPIKY_SHIELD, MoveId.BEAK_BLAST ], + [SpeciesId.SKARMORY]: [ MoveId.ROOST, MoveId.BODY_PRESS, MoveId.CEASELESS_EDGE, MoveId.BEAK_BLAST ], [SpeciesId.HOUNDOUR]: [ MoveId.FIERY_WRATH, MoveId.THUNDERBOLT, MoveId.MOONBLAST, MoveId.ARMOR_CANNON ], [SpeciesId.PHANPY]: [ MoveId.SHORE_UP, MoveId.SWORDS_DANCE, MoveId.MOUNTAIN_GALE, MoveId.COLLISION_COURSE ], [SpeciesId.STANTLER]: [ MoveId.THUNDEROUS_KICK, MoveId.PHOTON_GEYSER, MoveId.SWORDS_DANCE, MoveId.BOOMBURST ], [SpeciesId.SMEARGLE]: [ MoveId.CONVERSION, MoveId.BURNING_BULWARK, MoveId.SALT_CURE, MoveId.DARK_VOID ], - [SpeciesId.TYROGUE]: [ MoveId.VICTORY_DANCE, MoveId.THUNDEROUS_KICK, MoveId.METEOR_MASH, MoveId.WICKED_BLOW ], + [SpeciesId.TYROGUE]: [ MoveId.DARKEST_LARIAT, MoveId.THUNDEROUS_KICK, MoveId.METEOR_MASH, MoveId.VICTORY_DANCE ], [SpeciesId.SMOOCHUM]: [ MoveId.LUSTER_PURGE, MoveId.AURA_SPHERE, MoveId.FREEZE_DRY, MoveId.QUIVER_DANCE ], [SpeciesId.ELEKID]: [ MoveId.FIRE_LASH, MoveId.ZING_ZAP, MoveId.MOUNTAIN_GALE, MoveId.SHIFT_GEAR ], [SpeciesId.MAGBY]: [ MoveId.THUNDERCLAP, MoveId.EARTH_POWER, MoveId.ENERGY_BALL, MoveId.BLUE_FLARE ], @@ -142,7 +142,7 @@ export const speciesEggMoves = { [SpeciesId.RALTS]: [ MoveId.PSYBLADE, MoveId.BITTER_BLADE, MoveId.NO_RETREAT, MoveId.BOOMBURST ], [SpeciesId.SURSKIT]: [ MoveId.POLLEN_PUFF, MoveId.FIERY_DANCE, MoveId.BOUNCY_BUBBLE, MoveId.AEROBLAST ], [SpeciesId.SHROOMISH]: [ MoveId.ACCELEROCK, MoveId.TRAILBLAZE, MoveId.STORM_THROW, MoveId.SAPPY_SEED ], - [SpeciesId.SLAKOTH]: [ MoveId.FACADE, MoveId.DRAIN_PUNCH, MoveId.KNOCK_OFF, MoveId.SKILL_SWAP ], + [SpeciesId.SLAKOTH]: [ MoveId.CRUSH_GRIP, MoveId.DRAIN_PUNCH, MoveId.PARTING_SHOT, MoveId.SKILL_SWAP ], [SpeciesId.NINCADA]: [ MoveId.BULLDOZE, MoveId.STICKY_WEB, MoveId.SHADOW_BONE, MoveId.SHELL_SMASH ], [SpeciesId.WHISMUR]: [ MoveId.ALLURING_VOICE, MoveId.SHIFT_GEAR, MoveId.SPARKLING_ARIA, MoveId.TORCH_SONG ], [SpeciesId.MAKUHITA]: [ MoveId.COMBAT_TORQUE, MoveId.SLACK_OFF, MoveId.HEAT_CRASH, MoveId.DOUBLE_IRON_BASH ], @@ -167,7 +167,7 @@ export const speciesEggMoves = { [SpeciesId.SPINDA]: [ MoveId.SUPERPOWER, MoveId.SLACK_OFF, MoveId.FLEUR_CANNON, MoveId.V_CREATE ], [SpeciesId.TRAPINCH]: [ MoveId.FIRE_LASH, MoveId.DRAGON_DARTS, MoveId.THOUSAND_ARROWS, MoveId.DRAGON_ENERGY ], [SpeciesId.CACNEA]: [ MoveId.EARTH_POWER, MoveId.CEASELESS_EDGE, MoveId.NIGHT_DAZE, MoveId.IVY_CUDGEL ], - [SpeciesId.SWABLU]: [ MoveId.ROOST, MoveId.NASTY_PLOT, MoveId.FLOATY_FALL, MoveId.BOOMBURST ], + [SpeciesId.SWABLU]: [ MoveId.ROOST, MoveId.TAKE_HEART, MoveId.AEROBLAST, MoveId.BOOMBURST ], [SpeciesId.ZANGOOSE]: [ MoveId.FACADE, MoveId.HIGH_HORSEPOWER, MoveId.EXTREME_SPEED, MoveId.TIDY_UP ], [SpeciesId.SEVIPER]: [ MoveId.ICE_BEAM, MoveId.BITTER_BLADE, MoveId.SUCKER_PUNCH, MoveId.NO_RETREAT ], [SpeciesId.LUNATONE]: [ MoveId.REVELATION_DANCE, MoveId.MOONGEIST_BEAM, MoveId.SHELL_SMASH, MoveId.LUMINA_CRASH ], @@ -203,13 +203,13 @@ export const speciesEggMoves = { [SpeciesId.JIRACHI]: [ MoveId.TACHYON_CUTTER, MoveId.TRIPLE_ARROWS, MoveId.ROCK_SLIDE, MoveId.SHELL_SMASH ], [SpeciesId.DEOXYS]: [ MoveId.COLLISION_COURSE, MoveId.FUSION_FLARE, MoveId.PARTING_SHOT, MoveId.LUMINA_CRASH ], - [SpeciesId.TURTWIG]: [ MoveId.SHELL_SMASH, MoveId.MIGHTY_CLEAVE, MoveId.ICE_SPINNER, MoveId.SAPPY_SEED ], + [SpeciesId.TURTWIG]: [ MoveId.SHELL_SMASH, MoveId.STONE_AXE, MoveId.ICE_SPINNER, MoveId.SAPPY_SEED ], [SpeciesId.CHIMCHAR]: [ MoveId.THUNDERBOLT, MoveId.SECRET_SWORD, MoveId.TRIPLE_AXEL, MoveId.SACRED_FIRE ], [SpeciesId.PIPLUP]: [ MoveId.KINGS_SHIELD, MoveId.TACHYON_CUTTER, MoveId.FREEZE_DRY, MoveId.STEAM_ERUPTION ], [SpeciesId.STARLY]: [ MoveId.SWORDS_DANCE, MoveId.HEAD_CHARGE, MoveId.FLARE_BLITZ, MoveId.EXTREME_SPEED ], [SpeciesId.BIDOOF]: [ MoveId.EXTREME_SPEED, MoveId.COSMIC_POWER, MoveId.POWER_TRIP, MoveId.AQUA_STEP ], [SpeciesId.KRICKETOT]: [ MoveId.BONEMERANG, MoveId.VICTORY_DANCE, MoveId.STONE_AXE, MoveId.POPULATION_BOMB ], - [SpeciesId.SHINX]: [ MoveId.FIRE_LASH, MoveId.TRIPLE_AXEL, MoveId.ZIPPY_ZAP, MoveId.BOLT_STRIKE ], + [SpeciesId.SHINX]: [ MoveId.THUNDEROUS_KICK, MoveId.TRIPLE_AXEL, MoveId.ZIPPY_ZAP, MoveId.BOLT_STRIKE ], [SpeciesId.BUDEW]: [ MoveId.FIERY_DANCE, MoveId.ACID_SPRAY, MoveId.BOUNCY_BUBBLE, MoveId.QUIVER_DANCE ], [SpeciesId.CRANIDOS]: [ MoveId.VOLT_TACKLE, MoveId.ACCELEROCK, MoveId.FLARE_BLITZ, MoveId.SHIFT_GEAR ], [SpeciesId.SHIELDON]: [ MoveId.SHORE_UP, MoveId.BODY_PRESS, MoveId.KINGS_SHIELD, MoveId.DIAMOND_STORM ], @@ -253,14 +253,14 @@ export const speciesEggMoves = { [SpeciesId.PHIONE]: [ MoveId.BOUNCY_BUBBLE, MoveId.FREEZE_DRY, MoveId.STORED_POWER, MoveId.ORIGIN_PULSE ], [SpeciesId.MANAPHY]: [ MoveId.BOUNCY_BUBBLE, MoveId.FROST_BREATH, MoveId.WILDBOLT_STORM, MoveId.ORIGIN_PULSE ], [SpeciesId.DARKRAI]: [ MoveId.FIERY_WRATH, MoveId.MOONBLAST, MoveId.FIERY_DANCE, MoveId.MAKE_IT_RAIN ], - [SpeciesId.SHAYMIN]: [ MoveId.MATCHA_GOTCHA, MoveId.FIERY_DANCE, MoveId.AEROBLAST, MoveId.QUIVER_DANCE ], + [SpeciesId.SHAYMIN]: [ MoveId.MATCHA_GOTCHA, MoveId.HEAT_WAVE, MoveId.AEROBLAST, MoveId.QUIVER_DANCE ], [SpeciesId.ARCEUS]: [ MoveId.NO_RETREAT, MoveId.COLLISION_COURSE, MoveId.ASTRAL_BARRAGE, MoveId.MULTI_ATTACK ], [SpeciesId.VICTINI]: [ MoveId.BLUE_FLARE, MoveId.BOLT_STRIKE, MoveId.LUSTER_PURGE, MoveId.VICTORY_DANCE ], [SpeciesId.SNIVY]: [ MoveId.FLAMETHROWER, MoveId.CLANGING_SCALES, MoveId.MAKE_IT_RAIN, MoveId.FLEUR_CANNON ], [SpeciesId.TEPIG]: [ MoveId.WAVE_CRASH, MoveId.VOLT_TACKLE, MoveId.AXE_KICK, MoveId.VICTORY_DANCE ], [SpeciesId.OSHAWOTT]: [ MoveId.FREEZE_DRY, MoveId.SHELL_SIDE_ARM, MoveId.SACRED_SWORD, MoveId.SHELL_SMASH ], - [SpeciesId.PATRAT]: [ MoveId.FAKE_OUT, MoveId.SWORDS_DANCE, MoveId.DYNAMIC_PUNCH, MoveId.EXTREME_SPEED ], + [SpeciesId.PATRAT]: [ MoveId.FAKE_OUT, MoveId.INSTRUCT, MoveId.DYNAMIC_PUNCH, MoveId.EXTREME_SPEED ], [SpeciesId.LILLIPUP]: [ MoveId.CLOSE_COMBAT, MoveId.BODY_SLAM, MoveId.HIGH_HORSEPOWER, MoveId.LAST_RESPECTS ], [SpeciesId.PURRLOIN]: [ MoveId.ENCORE, MoveId.OBSTRUCT, MoveId.PARTING_SHOT, MoveId.WICKED_BLOW ], [SpeciesId.PANSAGE]: [ MoveId.SWORDS_DANCE, MoveId.FIRE_LASH, MoveId.EARTHQUAKE, MoveId.IVY_CUDGEL ], @@ -269,7 +269,7 @@ export const speciesEggMoves = { [SpeciesId.MUNNA]: [ MoveId.COSMIC_POWER, MoveId.AURA_SPHERE, MoveId.LUNAR_BLESSING, MoveId.MYSTICAL_POWER ], [SpeciesId.PIDOVE]: [ MoveId.SLASH, MoveId.TIDY_UP, MoveId.FLOATY_FALL, MoveId.TRIPLE_ARROWS ], [SpeciesId.BLITZLE]: [ MoveId.HORN_LEECH, MoveId.SWORDS_DANCE, MoveId.FLARE_BLITZ, MoveId.BOLT_STRIKE ], - [SpeciesId.ROGGENROLA]: [ MoveId.BODY_PRESS, MoveId.CURSE, MoveId.SHORE_UP, MoveId.DIAMOND_STORM ], + [SpeciesId.ROGGENROLA]: [ MoveId.BODY_PRESS, MoveId.SPIKY_SHIELD, MoveId.SHORE_UP, MoveId.DIAMOND_STORM ], [SpeciesId.WOOBAT]: [ MoveId.ESPER_WING, MoveId.STORED_POWER, MoveId.MYSTICAL_FIRE, MoveId.OBLIVION_WING ], [SpeciesId.DRILBUR]: [ MoveId.METEOR_MASH, MoveId.ICE_SPINNER, MoveId.SHIFT_GEAR, MoveId.THOUSAND_ARROWS ], [SpeciesId.AUDINO]: [ MoveId.TAKE_HEART, MoveId.MOONBLAST, MoveId.WISH, MoveId.MATCHA_GOTCHA ], @@ -298,7 +298,7 @@ export const speciesEggMoves = { [SpeciesId.SOLOSIS]: [ MoveId.MIST_BALL, MoveId.SPEED_SWAP, MoveId.FLAMETHROWER, MoveId.LIGHT_OF_RUIN ], [SpeciesId.DUCKLETT]: [ MoveId.SPLISHY_SPLASH, MoveId.SANDSEAR_STORM, MoveId.WILDBOLT_STORM, MoveId.QUIVER_DANCE ], [SpeciesId.VANILLITE]: [ MoveId.EARTH_POWER, MoveId.AURORA_VEIL, MoveId.CALM_MIND, MoveId.SPARKLY_SWIRL ], - [SpeciesId.DEERLING]: [ MoveId.TIDY_UP, MoveId.HEADBUTT, MoveId.COMBAT_TORQUE, MoveId.FLOWER_TRICK ], + [SpeciesId.DEERLING]: [ MoveId.TIDY_UP, MoveId.HEADBUTT, MoveId.AXE_KICK, MoveId.FLOWER_TRICK ], [SpeciesId.EMOLGA]: [ MoveId.ICICLE_CRASH, MoveId.ZING_ZAP, MoveId.FLOATY_FALL, MoveId.ELECTRIFY ], [SpeciesId.KARRABLAST]: [ MoveId.LEECH_LIFE, MoveId.BITTER_BLADE, MoveId.OBSTRUCT, MoveId.DOUBLE_IRON_BASH ], [SpeciesId.FOONGUS]: [ MoveId.POLLEN_PUFF, MoveId.PARTING_SHOT, MoveId.FOUL_PLAY, MoveId.SAPPY_SEED ], @@ -322,8 +322,8 @@ export const speciesEggMoves = { [SpeciesId.BOUFFALANT]: [ MoveId.HORN_LEECH, MoveId.HIGH_JUMP_KICK, MoveId.HEAD_SMASH, MoveId.FLARE_BLITZ ], [SpeciesId.RUFFLET]: [ MoveId.FLOATY_FALL, MoveId.AURA_SPHERE, MoveId.NO_RETREAT, MoveId.BOLT_BEAK ], [SpeciesId.VULLABY]: [ MoveId.FOUL_PLAY, MoveId.BODY_PRESS, MoveId.ROOST, MoveId.RUINATION ], - [SpeciesId.HEATMOR]: [ MoveId.EARTH_POWER, MoveId.OVERHEAT, MoveId.THUNDERBOLT, MoveId.V_CREATE ], - [SpeciesId.DURANT]: [ MoveId.HIGH_HORSEPOWER, MoveId.FIRST_IMPRESSION, MoveId.SWORDS_DANCE, MoveId.BEHEMOTH_BASH ], + [SpeciesId.HEATMOR]: [ MoveId.EARTH_POWER, MoveId.OVERHEAT, MoveId.SUPERCELL_SLAM, MoveId.V_CREATE ], + [SpeciesId.DURANT]: [ MoveId.HIGH_HORSEPOWER, MoveId.FIRST_IMPRESSION, MoveId.U_TURN, MoveId.BEHEMOTH_BASH ], [SpeciesId.DEINO]: [ MoveId.FIERY_WRATH, MoveId.ESPER_WING, MoveId.SLUDGE_BOMB, MoveId.FICKLE_BEAM ], [SpeciesId.LARVESTA]: [ MoveId.THUNDERBOLT, MoveId.DAZZLING_GLEAM, MoveId.EARTH_POWER, MoveId.HYDRO_STEAM ], [SpeciesId.COBALION]: [ MoveId.BEHEMOTH_BLADE, MoveId.MIGHTY_CLEAVE, MoveId.CEASELESS_EDGE, MoveId.VICTORY_DANCE ], @@ -381,8 +381,8 @@ export const speciesEggMoves = { [SpeciesId.ROWLET]: [ MoveId.THOUSAND_ARROWS, MoveId.SHADOW_BONE, MoveId.FIRST_IMPRESSION, MoveId.VICTORY_DANCE ], [SpeciesId.LITTEN]: [ MoveId.SUCKER_PUNCH, MoveId.PARTING_SHOT, MoveId.SLACK_OFF, MoveId.SACRED_FIRE ], [SpeciesId.POPPLIO]: [ MoveId.PSYCHIC_NOISE, MoveId.MOONLIGHT, MoveId.OVERDRIVE, MoveId.TORCH_SONG ], - [SpeciesId.PIKIPEK]: [ MoveId.DUAL_WINGBEAT, MoveId.BONE_RUSH, MoveId.BURNING_BULWARK, MoveId.POPULATION_BOMB ], - [SpeciesId.YUNGOOS]: [ MoveId.EXTREME_SPEED, MoveId.KNOCK_OFF, MoveId.TIDY_UP, MoveId.MULTI_ATTACK ], + [SpeciesId.PIKIPEK]: [ MoveId.TRAILBLAZE, MoveId.BONE_RUSH, MoveId.BURNING_BULWARK, MoveId.POPULATION_BOMB ], + [SpeciesId.YUNGOOS]: [ MoveId.FAKE_OUT, MoveId.HIGH_HORSEPOWER, MoveId.TIDY_UP, MoveId.EXTREME_SPEED ], [SpeciesId.GRUBBIN]: [ MoveId.ICE_BEAM, MoveId.EARTH_POWER, MoveId.CALM_MIND, MoveId.THUNDERCLAP ], [SpeciesId.CRABRAWLER]: [ MoveId.JET_PUNCH, MoveId.SHORE_UP, MoveId.MACH_PUNCH, MoveId.SURGING_STRIKES ], [SpeciesId.ORICORIO]: [ MoveId.QUIVER_DANCE, MoveId.FIERY_DANCE, MoveId.THUNDERCLAP, MoveId.OBLIVION_WING ], @@ -396,7 +396,7 @@ export const speciesEggMoves = { [SpeciesId.MORELULL]: [ MoveId.CALM_MIND, MoveId.SAPPY_SEED, MoveId.DRAINING_KISS, MoveId.MATCHA_GOTCHA ], [SpeciesId.SALANDIT]: [ MoveId.SCALD, MoveId.MALIGNANT_CHAIN, MoveId.CORE_ENFORCER, MoveId.ERUPTION ], [SpeciesId.STUFFUL]: [ MoveId.DRAIN_PUNCH, MoveId.METEOR_MASH, MoveId.TRIPLE_AXEL, MoveId.RAGE_FIST ], - [SpeciesId.BOUNSWEET]: [ MoveId.TRIPLE_AXEL, MoveId.AQUA_STEP, MoveId.THUNDEROUS_KICK, MoveId.SAPPY_SEED ], + [SpeciesId.BOUNSWEET]: [ MoveId.TRIPLE_AXEL, MoveId.AQUA_STEP, MoveId.THUNDEROUS_KICK, MoveId.FLOWER_TRICK ], [SpeciesId.COMFEY]: [ MoveId.REVIVAL_BLESSING, MoveId.TAKE_HEART, MoveId.STRENGTH_SAP, MoveId.MATCHA_GOTCHA ], [SpeciesId.ORANGURU]: [ MoveId.JUNGLE_HEALING, MoveId.YAWN, MoveId.FOLLOW_ME, MoveId.LUMINA_CRASH ], [SpeciesId.PASSIMIAN]: [ MoveId.PYRO_BALL, MoveId.SUCKER_PUNCH, MoveId.ZING_ZAP, MoveId.VICTORY_DANCE ], @@ -423,7 +423,7 @@ export const speciesEggMoves = { [SpeciesId.PHEROMOSA]: [ MoveId.SECRET_SWORD, MoveId.MAKE_IT_RAIN, MoveId.ATTACK_ORDER, MoveId.DIAMOND_STORM ], [SpeciesId.XURKITREE]: [ MoveId.FLAMETHROWER, MoveId.GIGA_DRAIN, MoveId.TAIL_GLOW, MoveId.THUNDERCLAP ], [SpeciesId.CELESTEELA]: [ MoveId.RECOVER, MoveId.BUZZY_BUZZ, MoveId.EARTH_POWER, MoveId.OBLIVION_WING ], - [SpeciesId.KARTANA]: [ MoveId.MIGHTY_CLEAVE, MoveId.DUAL_CHOP, MoveId.BITTER_BLADE, MoveId.BEHEMOTH_BLADE ], + [SpeciesId.KARTANA]: [ MoveId.MIGHTY_CLEAVE, MoveId.DUAL_CHOP, MoveId.BEHEMOTH_BLADE, MoveId.BITTER_BLADE ], [SpeciesId.GUZZLORD]: [ MoveId.SUCKER_PUNCH, MoveId.COMEUPPANCE, MoveId.SLACK_OFF, MoveId.SHED_TAIL ], [SpeciesId.NECROZMA]: [ MoveId.DYNAMAX_CANNON, MoveId.SACRED_FIRE, MoveId.ASTRAL_BARRAGE, MoveId.CLANGOROUS_SOUL ], [SpeciesId.MAGEARNA]: [ MoveId.STRENGTH_SAP, MoveId.EARTH_POWER, MoveId.MOONBLAST, MoveId.MAKE_IT_RAIN ], @@ -431,23 +431,23 @@ export const speciesEggMoves = { [SpeciesId.POIPOLE]: [ MoveId.MALIGNANT_CHAIN, MoveId.ICE_BEAM, MoveId.ARMOR_CANNON, MoveId.CLANGING_SCALES ], [SpeciesId.STAKATAKA]: [ MoveId.HEAVY_SLAM, MoveId.SHORE_UP, MoveId.CURSE, MoveId.SALT_CURE ], [SpeciesId.BLACEPHALON]: [ MoveId.STEEL_BEAM, MoveId.MOONBLAST, MoveId.CHLOROBLAST, MoveId.MOONGEIST_BEAM ], - [SpeciesId.ZERAORA]: [ MoveId.SWORDS_DANCE, MoveId.U_TURN, MoveId.COLLISION_COURSE, MoveId.TRIPLE_AXEL ], + [SpeciesId.ZERAORA]: [ MoveId.SWORDS_DANCE, MoveId.FIRE_LASH, MoveId.COLLISION_COURSE, MoveId.TRIPLE_AXEL ], [SpeciesId.MELTAN]: [ MoveId.BULLET_PUNCH, MoveId.DRAIN_PUNCH, MoveId.BULK_UP, MoveId.PLASMA_FISTS ], [SpeciesId.ALOLA_RATTATA]: [ MoveId.FALSE_SURRENDER, MoveId.PSYCHIC_FANGS, MoveId.COIL, MoveId.EXTREME_SPEED ], [SpeciesId.ALOLA_SANDSHREW]: [ MoveId.SPIKY_SHIELD, MoveId.LIQUIDATION, MoveId.SHIFT_GEAR, MoveId.GLACIAL_LANCE ], - [SpeciesId.ALOLA_VULPIX]: [ MoveId.MOONBLAST, MoveId.GLARE, MoveId.MYSTICAL_FIRE, MoveId.REVIVAL_BLESSING ], + [SpeciesId.ALOLA_VULPIX]: [ MoveId.MOONBLAST, MoveId.GLARE, MoveId.MYSTICAL_FIRE, MoveId.LUNAR_BLESSING ], [SpeciesId.ALOLA_DIGLETT]: [ MoveId.THOUSAND_WAVES, MoveId.SWORDS_DANCE, MoveId.TRIPLE_DIVE, MoveId.PYRO_BALL ], [SpeciesId.ALOLA_MEOWTH]: [ MoveId.BADDY_BAD, MoveId.BUZZY_BUZZ, MoveId.PARTING_SHOT, MoveId.MAKE_IT_RAIN ], - [SpeciesId.ALOLA_GEODUDE]: [ MoveId.THOUSAND_WAVES, MoveId.BULK_UP, MoveId.STONE_AXE, MoveId.EXTREME_SPEED ], + [SpeciesId.ALOLA_GEODUDE]: [ MoveId.LANDS_WRATH, MoveId.FUSION_BOLT, MoveId.STONE_AXE, MoveId.EXTREME_SPEED ], [SpeciesId.ALOLA_GRIMER]: [ MoveId.SUCKER_PUNCH, MoveId.BARB_BARRAGE, MoveId.RECOVER, MoveId.SURGING_STRIKES ], [SpeciesId.GROOKEY]: [ MoveId.ROCK_SLIDE, MoveId.PLAY_ROUGH, MoveId.GRASSY_GLIDE, MoveId.CLANGOROUS_SOUL ], - [SpeciesId.SCORBUNNY]: [ MoveId.EXTREME_SPEED, MoveId.HIGH_JUMP_KICK, MoveId.TRIPLE_AXEL, MoveId.BOLT_STRIKE ], + [SpeciesId.SCORBUNNY]: [ MoveId.EXTREME_SPEED, MoveId.HIGH_JUMP_KICK, MoveId.SUPERCELL_SLAM, MoveId.TRIPLE_AXEL ], [SpeciesId.SOBBLE]: [ MoveId.AEROBLAST, MoveId.FROST_BREATH, MoveId.ENERGY_BALL, MoveId.NASTY_PLOT ], [SpeciesId.SKWOVET]: [ MoveId.SUCKER_PUNCH, MoveId.SLACK_OFF, MoveId.COIL, MoveId.POPULATION_BOMB ], [SpeciesId.ROOKIDEE]: [ MoveId.ROOST, MoveId.BODY_PRESS, MoveId.KINGS_SHIELD, MoveId.BEHEMOTH_BASH ], [SpeciesId.BLIPBUG]: [ MoveId.HEAL_ORDER, MoveId.LUSTER_PURGE, MoveId.SLEEP_POWDER, MoveId.TAIL_GLOW ], - [SpeciesId.NICKIT]: [ MoveId.BADDY_BAD, MoveId.FLAMETHROWER, MoveId.SPARKLY_SWIRL, MoveId.MAKE_IT_RAIN ], + [SpeciesId.NICKIT]: [ MoveId.BADDY_BAD, MoveId.MYSTICAL_FIRE, MoveId.SPARKLY_SWIRL, MoveId.MAKE_IT_RAIN ], [SpeciesId.GOSSIFLEUR]: [ MoveId.PARTING_SHOT, MoveId.STRENGTH_SAP, MoveId.SAPPY_SEED, MoveId.SEED_FLARE ], [SpeciesId.WOOLOO]: [ MoveId.NUZZLE, MoveId.MILK_DRINK, MoveId.BODY_PRESS, MoveId.MULTI_ATTACK ], [SpeciesId.CHEWTLE]: [ MoveId.ICE_FANG, MoveId.PSYCHIC_FANGS, MoveId.SHELL_SMASH, MoveId.MIGHTY_CLEAVE ], @@ -467,7 +467,7 @@ export const speciesEggMoves = { [SpeciesId.FALINKS]: [ MoveId.BATON_PASS, MoveId.POWER_TRIP, MoveId.COMBAT_TORQUE, MoveId.HEAL_ORDER ], [SpeciesId.PINCURCHIN]: [ MoveId.TRICK_ROOM, MoveId.VOLT_SWITCH, MoveId.STRENGTH_SAP, MoveId.THUNDERCLAP ], [SpeciesId.SNOM]: [ MoveId.FROST_BREATH, MoveId.HEAL_ORDER, MoveId.EARTH_POWER, MoveId.SPORE ], - [SpeciesId.STONJOURNER]: [ MoveId.BODY_PRESS, MoveId.HELPING_HAND, MoveId.ACCELEROCK, MoveId.DIAMOND_STORM ], + [SpeciesId.STONJOURNER]: [ MoveId.AXE_KICK, MoveId.HELPING_HAND, MoveId.ACCELEROCK, MoveId.DIAMOND_STORM ], [SpeciesId.EISCUE]: [ MoveId.TRIPLE_AXEL, MoveId.AQUA_STEP, MoveId.AXE_KICK, MoveId.SHELL_SMASH ], [SpeciesId.INDEEDEE]: [ MoveId.MATCHA_GOTCHA, MoveId.EXPANDING_FORCE, MoveId.MOONBLAST, MoveId.REVIVAL_BLESSING ], [SpeciesId.MORPEKO]: [ MoveId.TRIPLE_AXEL, MoveId.OBSTRUCT, MoveId.SWORDS_DANCE, MoveId.COLLISION_COURSE ], @@ -478,8 +478,8 @@ export const speciesEggMoves = { [SpeciesId.ARCTOVISH]: [ MoveId.ICE_FANG, MoveId.THUNDER_FANG, MoveId.HIGH_HORSEPOWER, MoveId.SHIFT_GEAR ], [SpeciesId.DURALUDON]: [ MoveId.CORE_ENFORCER, MoveId.BODY_PRESS, MoveId.RECOVER, MoveId.TACHYON_CUTTER ], [SpeciesId.DREEPY]: [ MoveId.SHADOW_BONE, MoveId.POWER_UP_PUNCH, MoveId.FIRE_LASH, MoveId.DIRE_CLAW ], - [SpeciesId.ZACIAN]: [ MoveId.MAGICAL_TORQUE, MoveId.MIGHTY_CLEAVE, MoveId.BITTER_BLADE, MoveId.PRECIPICE_BLADES ], - [SpeciesId.ZAMAZENTA]: [ MoveId.BULK_UP, MoveId.BODY_PRESS, MoveId.SLACK_OFF, MoveId.DIAMOND_STORM ], + [SpeciesId.ZACIAN]: [ MoveId.MAGICAL_TORQUE, MoveId.MIGHTY_CLEAVE, MoveId.EARTHQUAKE, MoveId.BITTER_BLADE ], + [SpeciesId.ZAMAZENTA]: [ MoveId.BULK_UP, MoveId.BODY_PRESS, MoveId.POWER_TRIP, MoveId.SLACK_OFF ], [SpeciesId.ETERNATUS]: [ MoveId.BODY_PRESS, MoveId.NASTY_PLOT, MoveId.MALIGNANT_CHAIN, MoveId.DRAGON_ENERGY ], [SpeciesId.KUBFU]: [ MoveId.METEOR_MASH, MoveId.DRAIN_PUNCH, MoveId.JET_PUNCH, MoveId.DRAGON_DANCE ], [SpeciesId.ZARUDE]: [ MoveId.SAPPY_SEED, MoveId.MIGHTY_CLEAVE, MoveId.WICKED_BLOW, MoveId.VICTORY_DANCE ], @@ -511,18 +511,18 @@ export const speciesEggMoves = { [SpeciesId.FUECOCO]: [ MoveId.ALLURING_VOICE, MoveId.SLACK_OFF, MoveId.OVERDRIVE, MoveId.MOONGEIST_BEAM ], [SpeciesId.QUAXLY]: [ MoveId.DRAGON_DANCE, MoveId.TRIPLE_AXEL, MoveId.POWER_TRIP, MoveId.THUNDEROUS_KICK ], [SpeciesId.LECHONK]: [ MoveId.MILK_DRINK, MoveId.PSYSHIELD_BASH, MoveId.BLAZING_TORQUE, MoveId.FILLET_AWAY ], - [SpeciesId.TAROUNTULA]: [ MoveId.STONE_AXE, MoveId.LEECH_LIFE, MoveId.THIEF, MoveId.SPORE ], + [SpeciesId.TAROUNTULA]: [ MoveId.STONE_AXE, MoveId.LEECH_LIFE, MoveId.FAKE_OUT, MoveId.SPORE ], [SpeciesId.NYMBLE]: [ MoveId.KNOCK_OFF, MoveId.FELL_STINGER, MoveId.ATTACK_ORDER, MoveId.WICKED_BLOW ], [SpeciesId.PAWMI]: [ MoveId.DRAIN_PUNCH, MoveId.METEOR_MASH, MoveId.JET_PUNCH, MoveId.PLASMA_FISTS ], [SpeciesId.TANDEMAUS]: [ MoveId.BATON_PASS, MoveId.COVET, MoveId.SIZZLY_SLIDE, MoveId.REVIVAL_BLESSING ], [SpeciesId.FIDOUGH]: [ MoveId.SOFT_BOILED, MoveId.HIGH_HORSEPOWER, MoveId.SIZZLY_SLIDE, MoveId.TIDY_UP ], [SpeciesId.SMOLIV]: [ MoveId.STRENGTH_SAP, MoveId.EARTH_POWER, MoveId.CALM_MIND, MoveId.BOOMBURST ], [SpeciesId.SQUAWKABILLY]: [ MoveId.PARTING_SHOT, MoveId.EARTHQUAKE, MoveId.FLARE_BLITZ, MoveId.EXTREME_SPEED ], - [SpeciesId.NACLI]: [ MoveId.BODY_PRESS, MoveId.TOXIC, MoveId.CURSE, MoveId.DIAMOND_STORM ], + [SpeciesId.NACLI]: [ MoveId.KNOCK_OFF, MoveId.TOXIC, MoveId.SAND_TOMB, MoveId.DIAMOND_STORM ], [SpeciesId.CHARCADET]: [ MoveId.SACRED_SWORD, MoveId.PHOTON_GEYSER, MoveId.MOONBLAST, MoveId.SPECTRAL_THIEF ], [SpeciesId.TADBULB]: [ MoveId.PARABOLIC_CHARGE, MoveId.SCALD, MoveId.EARTH_POWER, MoveId.ELECTRO_SHOT ], [SpeciesId.WATTREL]: [ MoveId.NASTY_PLOT, MoveId.SPLISHY_SPLASH, MoveId.SANDSEAR_STORM, MoveId.WILDBOLT_STORM ], - [SpeciesId.MASCHIFF]: [ MoveId.PARTING_SHOT, MoveId.COMBAT_TORQUE, MoveId.PSYCHIC_FANGS, MoveId.NO_RETREAT ], + [SpeciesId.MASCHIFF]: [ MoveId.PARTING_SHOT, MoveId.LEECH_LIFE, MoveId.PSYCHIC_FANGS, MoveId.NO_RETREAT ], [SpeciesId.SHROODLE]: [ MoveId.GASTRO_ACID, MoveId.PARTING_SHOT, MoveId.TOXIC, MoveId.SKETCH ], [SpeciesId.BRAMBLIN]: [ MoveId.TAILWIND, MoveId.STRENGTH_SAP, MoveId.FLOWER_TRICK, MoveId.LAST_RESPECTS ], [SpeciesId.TOEDSCOOL]: [ MoveId.STRENGTH_SAP, MoveId.TOPSY_TURVY, MoveId.SAPPY_SEED, MoveId.TAIL_GLOW ], @@ -535,7 +535,7 @@ export const speciesEggMoves = { [SpeciesId.BOMBIRDIER]: [ MoveId.FLOATY_FALL, MoveId.SWORDS_DANCE, MoveId.SUCKER_PUNCH, MoveId.MIGHTY_CLEAVE ], [SpeciesId.FINIZEN]: [ MoveId.TRIPLE_AXEL, MoveId.DRAIN_PUNCH, MoveId.HEADLONG_RUSH, MoveId.SURGING_STRIKES ], [SpeciesId.VAROOM]: [ MoveId.COMBAT_TORQUE, MoveId.U_TURN, MoveId.BLAZING_TORQUE, MoveId.NOXIOUS_TORQUE ], - [SpeciesId.CYCLIZAR]: [ MoveId.PARTING_SHOT, MoveId.FIRE_LASH, MoveId.MAGICAL_TORQUE, MoveId.GLAIVE_RUSH ], + [SpeciesId.CYCLIZAR]: [ MoveId.PARTING_SHOT, MoveId.FIRE_LASH, MoveId.HIGH_HORSEPOWER, MoveId.MAGICAL_TORQUE ], [SpeciesId.ORTHWORM]: [ MoveId.SIZZLY_SLIDE, MoveId.COIL, MoveId.BODY_PRESS, MoveId.SHORE_UP ], [SpeciesId.GLIMMET]: [ MoveId.CALM_MIND, MoveId.GIGA_DRAIN, MoveId.FIERY_DANCE, MoveId.MALIGNANT_CHAIN ], [SpeciesId.GREAVARD]: [ MoveId.SHADOW_BONE, MoveId.SIZZLY_SLIDE, MoveId.SHORE_UP, MoveId.COLLISION_COURSE ], @@ -548,7 +548,7 @@ export const speciesEggMoves = { [SpeciesId.SCREAM_TAIL]: [ MoveId.TORCH_SONG, MoveId.GLITZY_GLOW, MoveId.MOONLIGHT, MoveId.SPARKLY_SWIRL ], [SpeciesId.BRUTE_BONNET]: [ MoveId.SAPPY_SEED, MoveId.STRENGTH_SAP, MoveId.EARTHQUAKE, MoveId.WICKED_BLOW ], [SpeciesId.FLUTTER_MANE]: [ MoveId.MOONLIGHT, MoveId.NASTY_PLOT, MoveId.EARTH_POWER, MoveId.MOONGEIST_BEAM ], - [SpeciesId.SLITHER_WING]: [ MoveId.MIGHTY_CLEAVE, MoveId.THUNDEROUS_KICK, MoveId.FIRE_LASH, MoveId.VICTORY_DANCE ], + [SpeciesId.SLITHER_WING]: [ MoveId.ROCK_SLIDE, MoveId.THUNDEROUS_KICK, MoveId.SUNSTEEL_STRIKE, MoveId.VICTORY_DANCE ], [SpeciesId.SANDY_SHOCKS]: [ MoveId.MORNING_SUN, MoveId.ICE_BEAM, MoveId.NASTY_PLOT, MoveId.THUNDERCLAP ], [SpeciesId.IRON_TREADS]: [ MoveId.FUSION_BOLT, MoveId.SHIFT_GEAR, MoveId.SHORE_UP, MoveId.SUNSTEEL_STRIKE ], [SpeciesId.IRON_BUNDLE]: [ MoveId.EARTH_POWER, MoveId.SPLISHY_SPLASH, MoveId.VOLT_SWITCH, MoveId.NASTY_PLOT ], @@ -563,7 +563,7 @@ export const speciesEggMoves = { [SpeciesId.TING_LU]: [ MoveId.SHORE_UP, MoveId.CEASELESS_EDGE, MoveId.SAPPY_SEED, MoveId.PRECIPICE_BLADES ], [SpeciesId.CHI_YU]: [ MoveId.FIERY_WRATH, MoveId.HYDRO_STEAM, MoveId.MORNING_SUN, MoveId.BLUE_FLARE ], [SpeciesId.ROARING_MOON]: [ MoveId.FIRE_LASH, MoveId.DRAGON_HAMMER, MoveId.METEOR_MASH, MoveId.DRAGON_ASCENT ], - [SpeciesId.IRON_VALIANT]: [ MoveId.PLASMA_FISTS, MoveId.NO_RETREAT, MoveId.SECRET_SWORD, MoveId.MAGICAL_TORQUE ], + [SpeciesId.IRON_VALIANT]: [ MoveId.PHOTON_GEYSER, MoveId.NO_RETREAT, MoveId.SECRET_SWORD, MoveId.MAGICAL_TORQUE ], [SpeciesId.KORAIDON]: [ MoveId.SUNSTEEL_STRIKE, MoveId.SOLAR_BLADE, MoveId.DRAGON_DARTS, MoveId.BITTER_BLADE ], [SpeciesId.MIRAIDON]: [ MoveId.FROST_BREATH, MoveId.WILDBOLT_STORM, MoveId.SPACIAL_REND, MoveId.RISING_VOLTAGE ], [SpeciesId.WALKING_WAKE]: [ MoveId.BOUNCY_BUBBLE, MoveId.FUSION_FLARE, MoveId.SLUDGE_WAVE, MoveId.CORE_ENFORCER ], @@ -573,7 +573,7 @@ export const speciesEggMoves = { [SpeciesId.MUNKIDORI]: [ MoveId.TWIN_BEAM, MoveId.HEAT_WAVE, MoveId.EARTH_POWER, MoveId.MALIGNANT_CHAIN ], [SpeciesId.FEZANDIPITI]: [ MoveId.BARB_BARRAGE, MoveId.BONEMERANG, MoveId.TRIPLE_AXEL, MoveId.VICTORY_DANCE ], [SpeciesId.OGERPON]: [ MoveId.SLEEP_POWDER, MoveId.BONEMERANG, MoveId.TRIPLE_AXEL, MoveId.FLOWER_TRICK ], - [SpeciesId.GOUGING_FIRE]: [ MoveId.EXTREME_SPEED, MoveId.BULK_UP, MoveId.SACRED_FIRE, MoveId.GLAIVE_RUSH ], + [SpeciesId.GOUGING_FIRE]: [ MoveId.EXTREME_SPEED, MoveId.DRAGON_DANCE, MoveId.ZING_ZAP, MoveId.SACRED_FIRE ], [SpeciesId.RAGING_BOLT]: [ MoveId.NASTY_PLOT, MoveId.FLAMETHROWER, MoveId.MORNING_SUN, MoveId.ELECTRO_DRIFT ], [SpeciesId.IRON_BOULDER]: [ MoveId.PSYBLADE, MoveId.KOWTOW_CLEAVE, MoveId.STONE_AXE, MoveId.BITTER_BLADE ], [SpeciesId.IRON_CROWN]: [ MoveId.NASTY_PLOT, MoveId.SECRET_SWORD, MoveId.PSYSTRIKE, MoveId.ELECTRO_DRIFT ], @@ -584,17 +584,24 @@ export const speciesEggMoves = { [SpeciesId.BLOODMOON_URSALUNA]: [ MoveId.NASTY_PLOT, MoveId.ROCK_POLISH, MoveId.SANDSEAR_STORM, MoveId.BOOMBURST ] }; +/** + * Parse a CSV-separated list of Egg Moves (such as one sourced from a Google Sheets) + * into code able to form the `speciesEggMoves` const object as above. + * @param content - The CSV-formatted string to convert into code. + */ +// TODO: Move this into the scripts folder and stop running it on initialization function parseEggMoves(content: string): void { let output = ""; const speciesNames = getEnumKeys(SpeciesId); const speciesValues = getEnumValues(SpeciesId); + const moveNames = allMoves.map(m => m.name.replace(/ \([A-Z]\)$/, "").toLowerCase()); const lines = content.split(/\n/g); for (const line of lines) { const cols = line.split(",").slice(0, 5); - const moveNames = allMoves.map(m => m.name.replace(/ \([A-Z]\)$/, "").toLowerCase()); - const enumSpeciesName = cols[0].toUpperCase().replace(/[ -]/g, "_"); + const enumSpeciesName = cols[0].toUpperCase().replace(/[ -]/g, "_") as keyof typeof SpeciesId; + // TODO: This should use reverse mapping instead of `indexOf` const species = speciesValues[speciesNames.indexOf(enumSpeciesName)]; const eggMoves: MoveId[] = []; @@ -602,14 +609,16 @@ function parseEggMoves(content: string): void { for (let m = 0; m < 4; m++) { const moveName = cols[m + 1].trim(); const moveIndex = moveName !== "N/A" ? moveNames.indexOf(moveName.toLowerCase()) : -1; - eggMoves.push(moveIndex > -1 ? moveIndex as MoveId : MoveId.NONE); - if (moveIndex === -1) { console.warn(moveName, "could not be parsed"); } + + eggMoves.push(moveIndex > -1 ? moveIndex as MoveId : MoveId.NONE); } - if (eggMoves.find(m => m !== MoveId.NONE)) { + if (eggMoves.every(m => m === MoveId.NONE)) { + console.warn(`Species ${toReadableString(SpeciesId[species])} could not be parsed, excluding from output...`) + } else { output += `[SpeciesId.${SpeciesId[species]}]: [ ${eggMoves.map(m => `MoveId.${MoveId[m]}`).join(", ")} ],\n`; } } diff --git a/src/data/balance/passives.ts b/src/data/balance/passives.ts index 80790b44735..0a76b3036b9 100644 --- a/src/data/balance/passives.ts +++ b/src/data/balance/passives.ts @@ -178,9 +178,9 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.QUILAVA]: { 0: AbilityId.DROUGHT }, [SpeciesId.TYPHLOSION]: { 0: AbilityId.DROUGHT }, [SpeciesId.HISUI_TYPHLOSION]: { 0: AbilityId.DROUGHT }, - [SpeciesId.TOTODILE]: { 0: AbilityId.TOUGH_CLAWS }, - [SpeciesId.CROCONAW]: { 0: AbilityId.TOUGH_CLAWS }, - [SpeciesId.FERALIGATR]: { 0: AbilityId.TOUGH_CLAWS }, + [SpeciesId.TOTODILE]: { 0: AbilityId.STRONG_JAW }, + [SpeciesId.CROCONAW]: { 0: AbilityId.STRONG_JAW }, + [SpeciesId.FERALIGATR]: { 0: AbilityId.STRONG_JAW }, [SpeciesId.SENTRET]: { 0: AbilityId.PICKUP }, [SpeciesId.FURRET]: { 0: AbilityId.PICKUP }, [SpeciesId.HOOTHOOT]: { 0: AbilityId.AERILATE }, @@ -252,7 +252,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.REMORAID]: { 0: AbilityId.SIMPLE }, [SpeciesId.OCTILLERY]: { 0: AbilityId.SIMPLE }, [SpeciesId.DELIBIRD]: { 0: AbilityId.HUGE_POWER }, - [SpeciesId.SKARMORY]: { 0: AbilityId.LIGHTNING_ROD }, + [SpeciesId.SKARMORY]: { 0: AbilityId.STAMINA }, [SpeciesId.HOUNDOUR]: { 0: AbilityId.BALL_FETCH }, [SpeciesId.HOUNDOOM]: { 0: AbilityId.LIGHTNING_ROD, 1: AbilityId.LIGHTNING_ROD }, [SpeciesId.PHANPY]: { 0: AbilityId.STURDY }, @@ -319,9 +319,9 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.MASQUERAIN]: { 0: AbilityId.WATER_BUBBLE }, [SpeciesId.SHROOMISH]: { 0: AbilityId.GUTS }, [SpeciesId.BRELOOM]: { 0: AbilityId.GUTS }, - [SpeciesId.SLAKOTH]: { 0: AbilityId.GUTS }, - [SpeciesId.VIGOROTH]: { 0: AbilityId.GUTS }, - [SpeciesId.SLAKING]: { 0: AbilityId.GUTS }, + [SpeciesId.SLAKOTH]: { 0: AbilityId.COMATOSE }, + [SpeciesId.VIGOROTH]: { 0: AbilityId.TOUGH_CLAWS }, + [SpeciesId.SLAKING]: { 0: AbilityId.COMATOSE }, [SpeciesId.NINCADA]: { 0: AbilityId.TECHNICIAN }, [SpeciesId.NINJASK]: { 0: AbilityId.TECHNICIAN }, [SpeciesId.SHEDINJA]: { 0: AbilityId.MAGIC_GUARD }, @@ -421,7 +421,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.KYOGRE]: { 0: AbilityId.MOLD_BREAKER, 1: AbilityId.TERAVOLT }, [SpeciesId.GROUDON]: { 0: AbilityId.MOLD_BREAKER, 1: AbilityId.TURBOBLAZE }, [SpeciesId.RAYQUAZA]: { 0: AbilityId.UNNERVE, 1: AbilityId.UNNERVE }, - [SpeciesId.JIRACHI]: { 0: AbilityId.COMATOSE }, + [SpeciesId.JIRACHI]: { 0: AbilityId.PURIFYING_SALT }, [SpeciesId.DEOXYS]: { 0: AbilityId.PROTEAN, 1: AbilityId.ADAPTABILITY, 2: AbilityId.REGENERATOR, 3: AbilityId.SHADOW_SHIELD }, [SpeciesId.TURTWIG]: { 0: AbilityId.SOLID_ROCK }, @@ -689,9 +689,9 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.FENNEKIN]: { 0: AbilityId.FLUFFY }, [SpeciesId.BRAIXEN]: { 0: AbilityId.PSYCHIC_SURGE }, [SpeciesId.DELPHOX]: { 0: AbilityId.PSYCHIC_SURGE }, - [SpeciesId.FROAKIE]: { 0: AbilityId.STAKEOUT, 1: AbilityId.STAKEOUT }, - [SpeciesId.FROGADIER]: { 0: AbilityId.STAKEOUT, 1: AbilityId.STAKEOUT }, - [SpeciesId.GRENINJA]: { 0: AbilityId.STAKEOUT, 1: AbilityId.STAKEOUT, 2: AbilityId.STAKEOUT }, + [SpeciesId.FROAKIE]: { 0: AbilityId.TECHNICIAN, 1: AbilityId.STAKEOUT }, + [SpeciesId.FROGADIER]: { 0: AbilityId.TECHNICIAN, 1: AbilityId.STAKEOUT }, + [SpeciesId.GRENINJA]: { 0: AbilityId.TECHNICIAN, 1: AbilityId.STAKEOUT, 2: AbilityId.SUPER_LUCK }, [SpeciesId.BUNNELBY]: { 0: AbilityId.INNER_FOCUS }, [SpeciesId.DIGGERSBY]: { 0: AbilityId.THICK_FAT }, [SpeciesId.FLETCHLING]: { 0: AbilityId.FLAME_BODY }, @@ -763,9 +763,9 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.DARTRIX]: { 0: AbilityId.WIND_RIDER }, [SpeciesId.DECIDUEYE]: { 0: AbilityId.SNIPER }, [SpeciesId.HISUI_DECIDUEYE]: { 0: AbilityId.SNIPER }, - [SpeciesId.LITTEN]: { 0: AbilityId.OPPORTUNIST }, - [SpeciesId.TORRACAT]: { 0: AbilityId.OPPORTUNIST }, - [SpeciesId.INCINEROAR]: { 0: AbilityId.OPPORTUNIST }, + [SpeciesId.LITTEN]: { 0: AbilityId.TOUGH_CLAWS }, + [SpeciesId.TORRACAT]: { 0: AbilityId.TOUGH_CLAWS }, + [SpeciesId.INCINEROAR]: { 0: AbilityId.TOUGH_CLAWS }, [SpeciesId.POPPLIO]: { 0: AbilityId.PUNK_ROCK }, [SpeciesId.BRIONNE]: { 0: AbilityId.PUNK_ROCK }, [SpeciesId.PRIMARINA]: { 0: AbilityId.PUNK_ROCK }, @@ -815,7 +815,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.MINIOR]: { 0: AbilityId.STURDY, 1: AbilityId.STURDY, 2: AbilityId.STURDY, 3: AbilityId.STURDY, 4: AbilityId.STURDY, 5: AbilityId.STURDY, 6: AbilityId.STURDY, 7: AbilityId.AERILATE, 8: AbilityId.AERILATE, 9: AbilityId.AERILATE, 10: AbilityId.AERILATE, 11: AbilityId.AERILATE, 12: AbilityId.AERILATE, 13: AbilityId.AERILATE }, [SpeciesId.KOMALA]: { 0: AbilityId.GUTS }, [SpeciesId.TURTONATOR]: { 0: AbilityId.DAUNTLESS_SHIELD }, - [SpeciesId.TOGEDEMARU]: { 0: AbilityId.ROUGH_SKIN }, + [SpeciesId.TOGEDEMARU]: { 0: AbilityId.CHEEK_POUCH }, [SpeciesId.MIMIKYU]: { 0: AbilityId.TOUGH_CLAWS, 1: AbilityId.TOUGH_CLAWS }, [SpeciesId.BRUXISH]: { 0: AbilityId.MULTISCALE }, [SpeciesId.DRAMPA]: { 0: AbilityId.THICK_FAT }, @@ -856,8 +856,8 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.ALOLA_NINETALES]: { 0: AbilityId.ICE_BODY }, [SpeciesId.ALOLA_DIGLETT]: { 0: AbilityId.STURDY }, [SpeciesId.ALOLA_DUGTRIO]: { 0: AbilityId.STURDY }, - [SpeciesId.ALOLA_MEOWTH]: { 0: AbilityId.DARK_AURA }, - [SpeciesId.ALOLA_PERSIAN]: { 0: AbilityId.DARK_AURA }, + [SpeciesId.ALOLA_MEOWTH]: { 0: AbilityId.DAZZLING }, + [SpeciesId.ALOLA_PERSIAN]: { 0: AbilityId.DAZZLING }, [SpeciesId.ALOLA_GEODUDE]: { 0: AbilityId.DRY_SKIN }, [SpeciesId.ALOLA_GRAVELER]: { 0: AbilityId.DRY_SKIN }, [SpeciesId.ALOLA_GOLEM]: { 0: AbilityId.DRY_SKIN }, @@ -867,9 +867,9 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.GROOKEY]: { 0: AbilityId.PICKPOCKET }, [SpeciesId.THWACKEY]: { 0: AbilityId.PICKPOCKET }, [SpeciesId.RILLABOOM]: { 0: AbilityId.GRASS_PELT, 1: AbilityId.GRASS_PELT }, - [SpeciesId.SCORBUNNY]: { 0: AbilityId.SHEER_FORCE }, - [SpeciesId.RABOOT]: { 0: AbilityId.SHEER_FORCE }, - [SpeciesId.CINDERACE]: { 0: AbilityId.NO_GUARD, 1: AbilityId.NO_GUARD }, + [SpeciesId.SCORBUNNY]: { 0: AbilityId.OPPORTUNIST }, + [SpeciesId.RABOOT]: { 0: AbilityId.OPPORTUNIST }, + [SpeciesId.CINDERACE]: { 0: AbilityId.OPPORTUNIST, 1: AbilityId.OPPORTUNIST }, [SpeciesId.SOBBLE]: { 0: AbilityId.SUPER_LUCK }, [SpeciesId.DRIZZILE]: { 0: AbilityId.SUPER_LUCK }, [SpeciesId.INTELEON]: { 0: AbilityId.SUPER_LUCK, 1: AbilityId.SUPER_LUCK }, @@ -1041,7 +1041,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = { [SpeciesId.WIGLETT]: { 0: AbilityId.STURDY }, [SpeciesId.WUGTRIO]: { 0: AbilityId.STURDY }, [SpeciesId.BOMBIRDIER]: { 0: AbilityId.UNBURDEN }, - [SpeciesId.FINIZEN]: { 0: AbilityId.SWIFT_SWIM }, + [SpeciesId.FINIZEN]: { 0: AbilityId.FRIEND_GUARD }, [SpeciesId.PALAFIN]: { 0: AbilityId.EMERGENCY_EXIT, 1: AbilityId.IRON_FIST }, [SpeciesId.VAROOM]: { 0: AbilityId.LEVITATE }, [SpeciesId.REVAVROOM]: { 0: AbilityId.LEVITATE, 1: AbilityId.DARK_AURA, 2: AbilityId.FLASH_FIRE, 3: AbilityId.MERCILESS, 4: AbilityId.FILTER, 5: AbilityId.SCRAPPY }, diff --git a/src/data/balance/pokemon-evolutions.ts b/src/data/balance/pokemon-evolutions.ts index 8714d6c0c9a..c632889326d 100644 --- a/src/data/balance/pokemon-evolutions.ts +++ b/src/data/balance/pokemon-evolutions.ts @@ -1,21 +1,21 @@ import { globalScene } from "#app/global-scene"; -import { Gender, getGenderSymbol } from "#app/data/gender"; -import { PokeballType } from "#enums/pokeball"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonType } from "#enums/pokemon-type"; -import { coerceArray, isNullOrUndefined, randSeedInt } from "#app/utils/common"; -import { WeatherType } from "#enums/weather-type"; -import { Nature } from "#enums/nature"; +import { speciesStarterCosts } from "#balance/starters"; +import { allMoves } from "#data/data-lists"; +import { Gender, getGenderSymbol } from "#data/gender"; import { BiomeId } from "#enums/biome-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; +import { Nature } from "#enums/nature"; +import { PokeballType } from "#enums/pokeball"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesFormKey } from "#enums/species-form-key"; +import { SpeciesId } from "#enums/species-id"; import { TimeOfDay } from "#enums/time-of-day"; -import type { SpeciesStatBoosterItem, SpeciesStatBoosterModifierType } from "#app/modifier/modifier-type"; -import { speciesStarterCosts } from "./starters"; +import { WeatherType } from "#enums/weather-type"; +import type { Pokemon } from "#field/pokemon"; +import type { SpeciesStatBoosterItem, SpeciesStatBoosterModifierType } from "#modifiers/modifier-type"; +import { coerceArray, isNullOrUndefined, randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { allMoves } from "#app/data/data-lists"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; export enum SpeciesWildEvolutionDelay { NONE, @@ -1630,7 +1630,7 @@ export const pokemonEvolutions: PokemonEvolutions = { new SpeciesEvolution(SpeciesId.TSAREENA, 28, null, {key: EvoCondKey.MOVE, move: MoveId.STOMP}, SpeciesWildEvolutionDelay.LONG) ], [SpeciesId.POIPOLE]: [ - new SpeciesEvolution(SpeciesId.NAGANADEL, 1, null, {key: EvoCondKey.MOVE, move: MoveId.DRAGON_PULSE}, SpeciesWildEvolutionDelay.LONG) + new SpeciesEvolution(SpeciesId.NAGANADEL, 1, null, {key: EvoCondKey.MOVE, move: MoveId.DRAGON_PULSE}, SpeciesWildEvolutionDelay.VERY_LONG) ], [SpeciesId.ALOLA_SANDSHREW]: [ new SpeciesEvolution(SpeciesId.ALOLA_SANDSLASH, 1, EvolutionItem.ICE_STONE, null, SpeciesWildEvolutionDelay.LONG) @@ -1845,7 +1845,7 @@ export const pokemonEvolutions: PokemonEvolutions = { new SpeciesEvolution(SpeciesId.LEAVANNY, 1, null, {key: EvoCondKey.FRIENDSHIP, value: 120}, SpeciesWildEvolutionDelay.LONG) ], [SpeciesId.TYPE_NULL]: [ - new SpeciesEvolution(SpeciesId.SILVALLY, 1, null, {key: EvoCondKey.FRIENDSHIP, value: 100}, SpeciesWildEvolutionDelay.LONG) + new SpeciesEvolution(SpeciesId.SILVALLY, 1, null, {key: EvoCondKey.FRIENDSHIP, value: 100}, SpeciesWildEvolutionDelay.VERY_LONG) ], [SpeciesId.ALOLA_MEOWTH]: [ new SpeciesEvolution(SpeciesId.ALOLA_PERSIAN, 1, null, {key: EvoCondKey.FRIENDSHIP, value: 120}, SpeciesWildEvolutionDelay.LONG) diff --git a/src/data/balance/species-egg-tiers.ts b/src/data/balance/species-egg-tiers.ts index 4d953921e92..4c125fb07fa 100644 --- a/src/data/balance/species-egg-tiers.ts +++ b/src/data/balance/species-egg-tiers.ts @@ -1,5 +1,5 @@ -import { SpeciesId } from "#enums/species-id"; import { EggTier } from "#enums/egg-type"; +import { SpeciesId } from "#enums/species-id"; /** * Map of all starters and their respective {@linkcode EggTier}, which determines the type of egg the starter hatches from. diff --git a/src/data/balance/starters.ts b/src/data/balance/starters.ts index 2db10f2e67a..8b91c12ae2d 100644 --- a/src/data/balance/starters.ts +++ b/src/data/balance/starters.ts @@ -234,7 +234,7 @@ export const speciesStarterCosts = { [SpeciesId.KYOGRE]: 9, [SpeciesId.GROUDON]: 9, [SpeciesId.RAYQUAZA]: 9, - [SpeciesId.JIRACHI]: 7, + [SpeciesId.JIRACHI]: 6, [SpeciesId.DEOXYS]: 7, [SpeciesId.TURTWIG]: 3, @@ -319,7 +319,7 @@ export const speciesStarterCosts = { [SpeciesId.SANDILE]: 4, [SpeciesId.DARUMAKA]: 4, [SpeciesId.MARACTUS]: 2, - [SpeciesId.DWEBBLE]: 2, + [SpeciesId.DWEBBLE]: 3, [SpeciesId.SCRAGGY]: 3, [SpeciesId.SIGILYPH]: 4, [SpeciesId.YAMASK]: 3, diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index bed17fb0ebc..d26f0700f7f 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -1,22 +1,15 @@ import { globalScene } from "#app/global-scene"; -import { allMoves } from "#app/data/data-lists"; -import { MoveFlags } from "#enums/MoveFlags"; -import type Pokemon from "#app/field/pokemon"; -import { - type nil, - getFrameMs, - getEnumKeys, - getEnumValues, - animationFileName, - coerceArray, - isNullOrUndefined, -} from "#app/utils/common"; +import { allMoves } from "#data/data-lists"; import type { BattlerIndex } from "#enums/battler-index"; -import { MoveId } from "#enums/move-id"; -import Phaser from "phaser"; -import { EncounterAnim } from "#enums/encounter-anims"; -import { AnimBlendType, AnimFrameTarget, AnimFocus, ChargeAnim, CommonAnim } from "#enums/move-anims-common"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { EncounterAnim } from "#enums/encounter-anims"; +import { MoveFlags } from "#enums/MoveFlags"; +import { AnimBlendType, AnimFocus, AnimFrameTarget, ChargeAnim, CommonAnim } from "#enums/move-anims-common"; +import { MoveId } from "#enums/move-id"; +import type { Pokemon } from "#field/pokemon"; +import { animationFileName, coerceArray, getFrameMs, isNullOrUndefined, type nil } from "#utils/common"; +import { getEnumKeys, getEnumValues } from "#utils/enums"; +import Phaser from "phaser"; export class AnimConfig { public id: number; @@ -880,6 +873,10 @@ export abstract class BattleAnim { targetSprite.pipelineData["tone"] = [0.0, 0.0, 0.0, 0.0]; targetSprite.setAngle(0); + // Remove animation event listeners to enable sprites to be freed. + userSprite.off("animationupdate"); + targetSprite.off("animationupdate"); + /** * This and `targetSpriteToShow` are used to restore context lost * from the `isOppAnim` swap. Using these references instead of `this.user` @@ -1402,10 +1399,10 @@ export class EncounterBattleAnim extends BattleAnim { export async function populateAnims() { const commonAnimNames = getEnumKeys(CommonAnim).map(k => k.toLowerCase()); const commonAnimMatchNames = commonAnimNames.map(k => k.replace(/_/g, "")); - const commonAnimIds = getEnumValues(CommonAnim) as CommonAnim[]; + const commonAnimIds = getEnumValues(CommonAnim); const chargeAnimNames = getEnumKeys(ChargeAnim).map(k => k.toLowerCase()); const chargeAnimMatchNames = chargeAnimNames.map(k => k.replace(/_/g, " ")); - const chargeAnimIds = getEnumValues(ChargeAnim) as ChargeAnim[]; + const chargeAnimIds = getEnumValues(ChargeAnim); const commonNamePattern = /name: (?:Common:)?(Opp )?(.*)/; const moveNameToId = {}; for (const move of getEnumValues(MoveId).slice(1)) { diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 0c6d1df7ad8..72fa6eaa64b 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1,39 +1,37 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import Overrides from "#app/overrides"; -import { applyAbAttrs } from "./abilities/apply-ab-attrs"; -import { allAbilities } from "./data-lists"; -import { CommonBattleAnim, MoveChargeAnim } from "#app/data/battle-anims"; -import { ChargeAnim, CommonAnim } from "#enums/move-anims-common"; -import type Move from "#app/data/moves/move"; -import { applyMoveAttrs } from "./moves/apply-attrs"; -import { allMoves } from "./data-lists"; -import { MoveFlags } from "#enums/MoveFlags"; -import { MoveCategory } from "#enums/MoveCategory"; -import { SpeciesFormChangeAbilityTrigger } from "./pokemon-forms/form-change-triggers"; -import { getStatusEffectHealText } from "#app/data/status-effect"; -import { TerrainType } from "#app/data/terrain"; -import { PokemonType } from "#enums/pokemon-type"; -import type Pokemon from "#app/field/pokemon"; -import { MoveResult } from "#enums/move-result"; -import { HitResult } from "#enums/hit-result"; import { getPokemonNameWithAffix } from "#app/messages"; -import type { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import type { MovePhase } from "#app/phases/move-phase"; -import type { StatStageChangeCallback } from "#app/phases/stat-stage-change-phase"; -import i18next from "#app/plugins/i18n"; -import { BooleanHolder, coerceArray, getFrameMs, NumberHolder, toDmgValue } from "#app/utils/common"; +import Overrides from "#app/overrides"; +import { CommonBattleAnim, MoveChargeAnim } from "#data/battle-anims"; +import { allAbilities, allMoves } from "#data/data-lists"; +import { SpeciesFormChangeAbilityTrigger } from "#data/form-change-triggers"; +import { getStatusEffectHealText } from "#data/status-effect"; +import { TerrainType } from "#data/terrain"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { HitResult } from "#enums/hit-result"; +import { MoveCategory } from "#enums/MoveCategory"; +import { MoveFlags } from "#enums/MoveFlags"; +import { ChargeAnim, CommonAnim } from "#enums/move-anims-common"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { MoveUseMode } from "#enums/move-use-mode"; import { PokemonAnimType } from "#enums/pokemon-anim-type"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import { EFFECTIVE_STATS, getStatKey, Stat, type BattleStat, type EffectiveStat } from "#enums/stat"; +import { type BattleStat, EFFECTIVE_STATS, type EffectiveStat, getStatKey, Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; import { WeatherType } from "#enums/weather-type"; -import { isNullOrUndefined } from "#app/utils/common"; -import { MoveUseMode } from "#enums/move-use-mode"; -import { invalidEncoreMoves } from "./moves/invalid-moves"; -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; +import type { Pokemon } from "#field/pokemon"; +import { applyMoveAttrs } from "#moves/apply-attrs"; +import { invalidEncoreMoves } from "#moves/invalid-moves"; +import type { Move } from "#moves/move"; +import type { MoveEffectPhase } from "#phases/move-effect-phase"; +import type { MovePhase } from "#phases/move-phase"; +import type { StatStageChangeCallback } from "#phases/stat-stage-change-phase"; +import i18next from "#plugins/i18n"; +import { BooleanHolder, coerceArray, getFrameMs, isNullOrUndefined, NumberHolder, toDmgValue } from "#utils/common"; /** * A {@linkcode BattlerTag} represents a semi-persistent effect that can be attached to a {@linkcode Pokemon}. diff --git a/src/data/berry.ts b/src/data/berry.ts index be6e5c28f84..61235b75e21 100644 --- a/src/data/berry.ts +++ b/src/data/berry.ts @@ -1,14 +1,14 @@ -import { getPokemonNameWithAffix } from "../messages"; -import type Pokemon from "../field/pokemon"; -import { HitResult } from "#enums/hit-result"; -import { getStatusEffectHealText } from "./status-effect"; -import { NumberHolder, toDmgValue, randSeedInt } from "#app/utils/common"; -import { applyAbAttrs } from "./abilities/apply-ab-attrs"; -import i18next from "i18next"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { getStatusEffectHealText } from "#data/status-effect"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; -import { Stat, type BattleStat } from "#app/enums/stat"; -import { globalScene } from "#app/global-scene"; +import { HitResult } from "#enums/hit-result"; +import { type BattleStat, Stat } from "#enums/stat"; +import type { Pokemon } from "#field/pokemon"; +import { NumberHolder, randSeedInt, toDmgValue } from "#utils/common"; +import i18next from "i18next"; export function getBerryName(berryType: BerryType): string { return i18next.t(`berry:${BerryType[berryType]}.name`); diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 3fdd83c185d..938ee482d01 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -1,33 +1,33 @@ -import { BooleanHolder, type NumberHolder, randSeedItem } from "#app/utils/common"; -import { deepCopy } from "#app/utils/data"; -import i18next from "i18next"; -import type { DexAttrProps, GameData } from "#app/system/game-data"; -import { defaultStarterSpecies } from "#app/constants"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpeciesForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "./moves/pokemon-move"; import type { FixedBattleConfig } from "#app/battle"; import { getRandomTrainerFunc } from "#app/battle"; -import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves"; +import { defaultStarterSpecies } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { pokemonEvolutions } from "#balance/pokemon-evolutions"; +import { speciesStarterCosts } from "#balance/starters"; +import { pokemonFormChanges } from "#data/pokemon-forms"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { getPokemonSpeciesForm } from "#data/pokemon-species"; import { BattleType } from "#enums/battle-type"; -import Trainer from "#app/field/trainer"; -import { TrainerVariant } from "#enums/trainer-variant"; -import { PokemonType } from "#enums/pokemon-type"; +import { ChallengeType } from "#enums/challenge-type"; import { Challenges } from "#enums/challenges"; +import { TypeColor, TypeShadow } from "#enums/color"; +import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves"; +import { ModifierTier } from "#enums/modifier-tier"; +import type { MoveId } from "#enums/move-id"; +import type { MoveSourceType } from "#enums/move-source-type"; +import { Nature } from "#enums/nature"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; import { TrainerType } from "#enums/trainer-type"; -import { Nature } from "#enums/nature"; -import type { MoveId } from "#enums/move-id"; -import { TypeColor, TypeShadow } from "#enums/color"; -import { ModifierTier } from "#enums/modifier-tier"; -import { globalScene } from "#app/global-scene"; -import { pokemonFormChanges } from "./pokemon-forms"; -import { pokemonEvolutions } from "./balance/pokemon-evolutions"; -import { ChallengeType } from "#enums/challenge-type"; -import type { MoveSourceType } from "#enums/move-source-type"; +import { TrainerVariant } from "#enums/trainer-variant"; +import type { Pokemon } from "#field/pokemon"; +import { Trainer } from "#field/trainer"; +import { PokemonMove } from "#moves/pokemon-move"; +import type { DexAttrProps, GameData } from "#system/game-data"; +import { BooleanHolder, type NumberHolder, randSeedItem } from "#utils/common"; +import { deepCopy } from "#utils/data"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; /** A constant for the default max cost of the starting party before a run */ const DEFAULT_PARTY_MAX_COST = 10; diff --git a/src/data/daily-run.ts b/src/data/daily-run.ts index e869ba7f28f..9a6f560933a 100644 --- a/src/data/daily-run.ts +++ b/src/data/daily-run.ts @@ -1,15 +1,16 @@ +import { pokerogueApi } from "#api/pokerogue-api"; +import { globalScene } from "#app/global-scene"; +import { speciesStarterCosts } from "#balance/starters"; +import type { PokemonSpeciesForm } from "#data/pokemon-species"; +import { getPokemonSpeciesForm, PokemonSpecies } from "#data/pokemon-species"; +import { BiomeId } from "#enums/biome-id"; import { PartyMemberStrength } from "#enums/party-member-strength"; import type { SpeciesId } from "#enums/species-id"; -import { globalScene } from "#app/global-scene"; -import { PlayerPokemon } from "#app/field/pokemon"; -import type { Starter } from "#app/ui/starter-select-ui-handler"; -import { randSeedGauss, randSeedInt, randSeedItem, getEnumValues } from "#app/utils/common"; -import type { PokemonSpeciesForm } from "#app/data/pokemon-species"; -import PokemonSpecies, { getPokemonSpeciesForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { BiomeId } from "#enums/biome-id"; +import { PlayerPokemon } from "#field/pokemon"; +import type { Starter } from "#ui/starter-select-ui-handler"; +import { randSeedGauss, randSeedInt, randSeedItem } from "#utils/common"; +import { getEnumValues } from "#utils/enums"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; export interface DailyRunConfig { seed: number; @@ -165,5 +166,6 @@ export function getDailyStartingBiome(): BiomeId { } // Fallback in case something went wrong + // TODO: should this use `randSeedItem`? return biomes[randSeedInt(biomes.length)]; } diff --git a/src/data/data-lists.ts b/src/data/data-lists.ts index ed172846fe1..ae3d0acc77f 100644 --- a/src/data/data-lists.ts +++ b/src/data/data-lists.ts @@ -1,7 +1,7 @@ -import type PokemonSpecies from "#app/data/pokemon-species"; -import type { ModifierTypes } from "#app/modifier/modifier-type"; -import type { Ability } from "./abilities/ability"; -import type Move from "./moves/move"; +import type { Ability } from "#abilities/ability"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import type { ModifierTypes } from "#modifiers/modifier-type"; +import type { Move } from "#moves/move"; export const allAbilities: Ability[] = []; export const allMoves: Move[] = []; diff --git a/src/data/dialogue.ts b/src/data/dialogue.ts index 6bb96f0efb2..406e72ee82b 100644 --- a/src/data/dialogue.ts +++ b/src/data/dialogue.ts @@ -1,6 +1,6 @@ import { BattleSpec } from "#enums/battle-spec"; import { TrainerType } from "#enums/trainer-type"; -import { trainerConfigs } from "./trainers/trainer-config"; +import { trainerConfigs } from "#trainers/trainer-config"; export interface TrainerTypeMessages { encounter?: string | string[]; @@ -1744,6 +1744,7 @@ export function getCharVariantFromDialogue(message: string): string { } export function initTrainerTypeDialogue(): void { + // TODO: this should not be using `Object.Keys` const trainerTypes = Object.keys(trainerTypeDialogue).map(t => Number.parseInt(t) as TrainerType); for (const trainerType of trainerTypes) { const messages = trainerTypeDialogue[trainerType]; diff --git a/src/data/egg-hatch-data.ts b/src/data/egg-hatch-data.ts index e81ae69515c..6aead19eb7f 100644 --- a/src/data/egg-hatch-data.ts +++ b/src/data/egg-hatch-data.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { StarterDataEntry } from "#app/system/game-data"; -import type { DexEntry } from "#app/@types/dex-data"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { StarterDataEntry } from "#system/game-data"; +import type { DexEntry } from "#types/dex-data"; /** * Stores data associated with a specific egg and the hatched pokemon diff --git a/src/data/egg.ts b/src/data/egg.ts index 4fd0bf27dbd..2c567686fc2 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -1,43 +1,43 @@ -import type BattleScene from "#app/battle-scene"; +import type { BattleScene } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { VariantTier } from "#enums/variant-tier"; -import { randInt, randomString, randSeedInt, getIvsFromId } from "#app/utils/common"; import Overrides from "#app/overrides"; -import { pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import i18next from "i18next"; -import { EggTier } from "#enums/egg-type"; -import { SpeciesId } from "#enums/species-id"; -import { EggSourceType } from "#enums/egg-source-types"; +import { pokemonPrevolutions } from "#balance/pokemon-evolutions"; import { - MANAPHY_EGG_MANAPHY_RATE, - SAME_SPECIES_EGG_HA_RATE, - GACHA_EGG_HA_RATE, - GACHA_DEFAULT_RARE_EGGMOVE_RATE, - SAME_SPECIES_EGG_RARE_EGGMOVE_RATE, - GACHA_MOVE_UP_RARE_EGGMOVE_RATE, - GACHA_DEFAULT_SHINY_RATE, - GACHA_SHINY_UP_SHINY_RATE, - SAME_SPECIES_EGG_SHINY_RATE, - EGG_PITY_LEGENDARY_THRESHOLD, EGG_PITY_EPIC_THRESHOLD, + EGG_PITY_LEGENDARY_THRESHOLD, EGG_PITY_RARE_THRESHOLD, - SHINY_VARIANT_CHANCE, - SHINY_EPIC_CHANCE, GACHA_DEFAULT_COMMON_EGG_THRESHOLD, - GACHA_DEFAULT_RARE_EGG_THRESHOLD, GACHA_DEFAULT_EPIC_EGG_THRESHOLD, + GACHA_DEFAULT_RARE_EGG_THRESHOLD, + GACHA_DEFAULT_RARE_EGGMOVE_RATE, + GACHA_DEFAULT_SHINY_RATE, + GACHA_EGG_HA_RATE, GACHA_LEGENDARY_UP_THRESHOLD_OFFSET, - HATCH_WAVES_MANAPHY_EGG, + GACHA_MOVE_UP_RARE_EGGMOVE_RATE, + GACHA_SHINY_UP_SHINY_RATE, HATCH_WAVES_COMMON_EGG, - HATCH_WAVES_RARE_EGG, HATCH_WAVES_EPIC_EGG, HATCH_WAVES_LEGENDARY_EGG, -} from "#app/data/balance/rates"; -import { speciesEggTiers } from "#app/data/balance/species-egg-tiers"; + HATCH_WAVES_MANAPHY_EGG, + HATCH_WAVES_RARE_EGG, + MANAPHY_EGG_MANAPHY_RATE, + SAME_SPECIES_EGG_HA_RATE, + SAME_SPECIES_EGG_RARE_EGGMOVE_RATE, + SAME_SPECIES_EGG_SHINY_RATE, + SHINY_EPIC_CHANCE, + SHINY_VARIANT_CHANCE, +} from "#balance/rates"; +import { speciesEggTiers } from "#balance/species-egg-tiers"; +import { speciesStarterCosts } from "#balance/starters"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { EggSourceType } from "#enums/egg-source-types"; +import { EggTier } from "#enums/egg-type"; +import { SpeciesId } from "#enums/species-id"; +import { VariantTier } from "#enums/variant-tier"; +import type { PlayerPokemon } from "#field/pokemon"; +import { getIvsFromId, randInt, randomString, randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; export const EGG_SEED = 1073741824; diff --git a/src/data/moves/apply-attrs.ts b/src/data/moves/apply-attrs.ts index 98e7b6d791f..3162ba02bde 100644 --- a/src/data/moves/apply-attrs.ts +++ b/src/data/moves/apply-attrs.ts @@ -1,11 +1,11 @@ -/** +/* * Module holding functions to apply move attributes. * Must not import anything that is not a type. */ -import type Pokemon from "#app/field/pokemon"; -import type { default as Move, MoveAttr } from "./move"; -import type { ChargingMove } from "#app/@types/move-types"; -import type { MoveAttrFilter, MoveAttrString } from "#app/@types/move-types"; + +import type { Pokemon } from "#field/pokemon"; +import type { Move, MoveAttr } from "#moves/move"; +import type { ChargingMove, MoveAttrFilter, MoveAttrString } from "#types/move-types"; function applyMoveAttrsInternal( attrFilter: MoveAttrFilter, diff --git a/src/data/moves/move-utils.ts b/src/data/moves/move-utils.ts index 20723ab0347..39891f595aa 100644 --- a/src/data/moves/move-utils.ts +++ b/src/data/moves/move-utils.ts @@ -1,14 +1,13 @@ -import type Pokemon from "#app/field/pokemon"; +import { allMoves } from "#data/data-lists"; import type { BattlerIndex } from "#enums/battler-index"; -import type { MoveId } from "#enums/move-id"; -import type { MoveTargetSet, UserMoveConditionFunc } from "./move"; -import type Move from "./move"; -import { NumberHolder, isNullOrUndefined } from "#app/utils/common"; -import { MoveTarget } from "#enums/MoveTarget"; -import { PokemonType } from "#enums/pokemon-type"; -import { allMoves } from "#app/data/data-lists"; -import { applyMoveAttrs } from "./apply-attrs"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveTarget } from "#enums/MoveTarget"; +import type { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; +import type { Pokemon } from "#field/pokemon"; +import { applyMoveAttrs } from "#moves/apply-attrs"; +import type { Move, MoveTargetSet, UserMoveConditionFunc } from "#moves/move"; +import { isNullOrUndefined, NumberHolder } from "#utils/common"; /** * Return whether the move targets the field diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index 0878ece2f01..c4b4b6e844e 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -1,5 +1,14 @@ -import { MoveChargeAnim } from "../battle-anims"; -import { ChargeAnim } from "#enums/move-anims-common"; +import { AbAttrParamsWithCancel, PreAttackModifyPowerAbAttrParams } from "#abilities/ability"; +import { + applyAbAttrs +} from "#abilities/apply-ab-attrs"; +import { loggedInUser } from "#app/account"; +import type { GameMode } from "#app/game-mode"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import type { ArenaTrapTag } from "#data/arena-tag"; +import { WeakenMoveTypeTag } from "#data/arena-tag"; +import { MoveChargeAnim } from "#data/battle-anims"; import { CommandedTag, EncoreTag, @@ -11,32 +20,53 @@ import { SubstituteTag, TrappedTag, TypeBoostTag, -} from "../battler-tags"; -import { getPokemonNameWithAffix } from "../../messages"; -import type { TurnMove } from "#app/@types/turn-move"; -import type { AttackMoveResult } from "#app/@types/attack-move-result"; -import type Pokemon from "../../field/pokemon"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "./pokemon-move"; -import { MoveResult } from "#enums/move-result"; -import { HitResult } from "#enums/hit-result"; -import { FieldPosition } from "#enums/field-position"; +} from "#data/battler-tags"; +import { getBerryEffectFunc } from "#data/berry"; +import { applyChallenges } from "#data/challenge"; +import { allAbilities, allMoves } from "#data/data-lists"; +import { SpeciesFormChangeRevertWeatherFormTrigger } from "#data/form-change-triggers"; import { getNonVolatileStatusEffects, getStatusEffectHealText, isNonVolatileStatusEffect, -} from "../status-effect"; -import { getTypeDamageMultiplier } from "../type"; -import { PokemonType } from "#enums/pokemon-type"; -import { BooleanHolder, NumberHolder, isNullOrUndefined, toDmgValue, randSeedItem, randSeedInt, getEnumValues, toReadableString, type Constructor, randSeedFloat } from "#app/utils/common"; -import { WeatherType } from "#enums/weather-type"; -import type { ArenaTrapTag } from "../arena-tag"; -import { WeakenMoveTypeTag } from "../arena-tag"; +} from "#data/status-effect"; +import { TerrainType } from "#data/terrain"; +import { getTypeDamageMultiplier } from "#data/type"; +import { AbilityId } from "#enums/ability-id"; import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattleType } from "#enums/battle-type"; +import type { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BiomeId } from "#enums/biome-id"; +import { ChallengeType } from "#enums/challenge-type"; +import { Command } from "#enums/command"; +import { FieldPosition } from "#enums/field-position"; +import { HitResult } from "#enums/hit-result"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { ChargeAnim } from "#enums/move-anims-common"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { isVirtual, MoveUseMode } from "#enums/move-use-mode"; +import { MoveCategory } from "#enums/MoveCategory"; +import { MoveEffectTrigger } from "#enums/MoveEffectTrigger"; +import { MoveFlags } from "#enums/MoveFlags"; +import { MoveTarget } from "#enums/MoveTarget"; +import { MultiHitType } from "#enums/MultiHitType"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; import { - applyAbAttrs -} from "../abilities/apply-ab-attrs"; -import { allAbilities, allMoves } from "../data-lists"; + BATTLE_STATS, + type BattleStat, + type EffectiveStat, + getStatKey, + Stat, +} from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { SwitchType } from "#enums/switch-type"; +import { WeatherType } from "#enums/weather-type"; +import { MoveUsedEvent } from "#events/battle-scene"; +import type { EnemyPokemon, Pokemon } from "#field/pokemon"; import { AttackTypeBoosterModifier, BerryModifier, @@ -44,52 +74,22 @@ import { PokemonMoveAccuracyBoosterModifier, PokemonMultiHitModifier, PreserveBerryModifier, -} from "../../modifier/modifier"; -import type { BattlerIndex } from "#enums/battler-index"; -import { BattleType } from "#enums/battle-type"; -import { TerrainType } from "../terrain"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { Command } from "#enums/command"; +} from "#modifiers/modifier"; +import { applyMoveAttrs } from "#moves/apply-attrs"; +import { invalidAssistMoves, invalidCopycatMoves, invalidMetronomeMoves, invalidMirrorMoveMoves, invalidSketchMoves, invalidSleepTalkMoves } from "#moves/invalid-moves"; +import { frenzyMissFunc, getMoveTargets } from "#moves/move-utils"; +import { PokemonMove } from "#moves/pokemon-move"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { MovePhase } from "#phases/move-phase"; +import { PokemonHealPhase } from "#phases/pokemon-heal-phase"; +import { SwitchSummonPhase } from "#phases/switch-summon-phase"; +import type { AttackMoveResult } from "#types/attack-move-result"; +import type { Localizable } from "#types/locales"; +import type { ChargingMove, MoveAttrMap, MoveAttrString, MoveClassMap, MoveKindString } from "#types/move-types"; +import type { TurnMove } from "#types/turn-move"; +import { BooleanHolder, type Constructor, isNullOrUndefined, NumberHolder, randSeedFloat, randSeedInt, randSeedItem, toDmgValue, toReadableString } from "#utils/common"; +import { getEnumValues } from "#utils/enums"; import i18next from "i18next"; -import type { Localizable } from "#app/@types/locales"; -import { getBerryEffectFunc } from "../berry"; -import { AbilityId } from "#enums/ability-id"; -import { ArenaTagType } from "#enums/arena-tag-type"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { BiomeId } from "#enums/biome-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { MoveUsedEvent } from "#app/events/battle-scene"; -import { - BATTLE_STATS, - type BattleStat, - type EffectiveStat, - getStatKey, - Stat, -} from "#app/enums/stat"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; -import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; -import { SpeciesFormChangeRevertWeatherFormTrigger } from "../pokemon-forms/form-change-triggers"; -import type { GameMode } from "#app/game-mode"; -import { applyChallenges } from "../challenge"; -import { ChallengeType } from "#enums/challenge-type"; -import { SwitchType } from "#enums/switch-type"; -import { StatusEffect } from "#enums/status-effect"; -import { globalScene } from "#app/global-scene"; -import { loggedInUser } from "#app/account"; -import { MoveCategory } from "#enums/MoveCategory"; -import { MoveTarget } from "#enums/MoveTarget"; -import { MoveFlags } from "#enums/MoveFlags"; -import { MoveEffectTrigger } from "#enums/MoveEffectTrigger"; -import { MultiHitType } from "#enums/MultiHitType"; -import { invalidAssistMoves, invalidCopycatMoves, invalidMetronomeMoves, invalidMirrorMoveMoves, invalidSleepTalkMoves, invalidSketchMoves } from "./invalid-moves"; -import { isVirtual, MoveUseMode } from "#enums/move-use-mode"; -import type { ChargingMove, MoveAttrMap, MoveAttrString, MoveKindString, MoveClassMap } from "#app/@types/move-types"; -import { applyMoveAttrs } from "./apply-attrs"; -import { frenzyMissFunc, getMoveTargets } from "./move-utils"; -import { AbAttrBaseParams, AbAttrParamsWithCancel, PreAttackModifyPowerAbAttrParams } from "../abilities/ability"; /** * A function used to conditionally determine execution of a given {@linkcode MoveAttr}. @@ -98,7 +98,7 @@ import { AbAttrBaseParams, AbAttrParamsWithCancel, PreAttackModifyPowerAbAttrPar type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean; export type UserMoveConditionFunc = (user: Pokemon, move: Move) => boolean; -export default abstract class Move implements Localizable { +export abstract class Move implements Localizable { public id: MoveId; public name: string; private _type: PokemonType; @@ -305,10 +305,11 @@ export default abstract class Move implements Localizable { /** * Checks if the move is immune to certain types. + * * Currently looks at cases of Grass types with powder moves and Dark types with moves affected by Prankster. - * @param {Pokemon} user the source of this move - * @param {Pokemon} target the target of this move - * @param {PokemonType} type the type of the move's target + * @param user - The source of this move + * @param target - The target of this move + * @param type - The type of the move's target * @returns boolean */ isTypeImmune(user: Pokemon, target: Pokemon, type: PokemonType): boolean { @@ -681,13 +682,7 @@ export default abstract class Move implements Localizable { * @returns boolean: false if any of the apply()'s return false, else true */ applyConditions(user: Pokemon, target: Pokemon, move: Move): boolean { - for (const condition of this.conditions) { - if (!condition.apply(user, target, move)) { - return false; - } - } - - return true; + return this.conditions.every(cond => cond.apply(user, target, move)); } /** @@ -4099,30 +4094,6 @@ export class OpponentHighHpPowerAttr extends VariablePowerAttr { } } -/** - * Attribute to double this move's power if the target hasn't acted yet in the current turn. - * Used by {@linkcode Moves.BOLT_BEAK} and {@linkcode Moves.FISHIOUS_REND} - */ -export class FirstAttackDoublePowerAttr extends VariablePowerAttr { - /** - * Double this move's power if the user is acting before the target. - * @param user - Unused - * @param target - The {@linkcode Pokemon} being targeted by this move - * @param move - Unused - * @param args `[0]` - A {@linkcode NumberHolder} containing move base power - * @returns Whether the attribute was successfully applied - */ - apply(_user: Pokemon, target: Pokemon, move: Move, args: [NumberHolder]): boolean { - if (target.turnData.acted) { - return false; - } - - args[0].value *= 2; - return true; - } -} - - export class TurnDamagedDoublePowerAttr extends VariablePowerAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { if (user.turnData.attacksReceived.find(r => r.damage && r.sourceId === target.id)) { @@ -7615,7 +7586,9 @@ export class SuppressAbilitiesIfActedAttr extends MoveEffectAttr { } /** - * Used by Transform + * Attribute used to transform into the target on move use. + * + * Used for {@linkcode MoveId.TRANSFORM}. */ export class TransformAttr extends MoveEffectAttr { override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { @@ -7624,11 +7597,12 @@ export class TransformAttr extends MoveEffectAttr { } globalScene.phaseManager.unshiftNew("PokemonTransformPhase", user.getBattlerIndex(), target.getBattlerIndex()); - - globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:transformedIntoTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) })); - return true; } + + getCondition(): MoveConditionFunc { + return (user, target) => user.canTransformInto(target) + } } /** @@ -8302,7 +8276,6 @@ const MoveAttrs = Object.freeze({ CompareWeightPowerAttr, HpPowerAttr, OpponentHighHpPowerAttr, - FirstAttackDoublePowerAttr, TurnDamagedDoublePowerAttr, MagnitudePowerAttr, AntiSunlightPowerDecreaseAttr, @@ -8850,12 +8823,12 @@ export function initMoves() { .makesContact(false), new StatusMove(MoveId.TRANSFORM, PokemonType.NORMAL, -1, 10, -1, 0, 1) .attr(TransformAttr) - .condition((user, target, move) => !target.getTag(BattlerTagType.SUBSTITUTE)) - .condition((user, target, move) => !target.summonData.illusion && !user.summonData.illusion) - // transforming from or into fusion pokemon causes various problems (such as crashes) - .condition((user, target, move) => !target.getTag(BattlerTagType.SUBSTITUTE) && !user.fusionSpecies && !target.fusionSpecies) .ignoresProtect() - // Transforming should copy the target's rage fist hit count + /* Transform: + * Does not copy the target's rage fist hit count + * Does not copy the target's volatile status conditions (ie BattlerTags) + * Renders user typeless when copying typeless opponent (should revert to original typing) + */ .edgeCase(), new AttackMove(MoveId.BUBBLE, PokemonType.WATER, MoveCategory.SPECIAL, 40, 100, 30, 10, 0, 1) .attr(StatStageChangeAttr, [ Stat.SPD ], -1) @@ -9605,7 +9578,8 @@ export function initMoves() { new AttackMove(MoveId.CLOSE_COMBAT, PokemonType.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 4) .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true), new AttackMove(MoveId.PAYBACK, PokemonType.DARK, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 4) - .attr(MovePowerMultiplierAttr, (user, target, move) => target.getLastXMoves(1).find(m => m.turn === globalScene.currentBattle.turn) || globalScene.currentBattle.turnCommands[target.getBattlerIndex()]?.command === Command.BALL ? 2 : 1), + // Payback boosts power on item use + .attr(MovePowerMultiplierAttr, (_user, target) => target.turnData.acted || globalScene.currentBattle.turnCommands[target.getBattlerIndex()]?.command === Command.BALL ? 2 : 1), new AttackMove(MoveId.ASSURANCE, PokemonType.DARK, MoveCategory.PHYSICAL, 60, 100, 10, -1, 0, 4) .attr(MovePowerMultiplierAttr, (user, target, move) => target.turnData.damageTaken > 0 ? 2 : 1), new StatusMove(MoveId.EMBARGO, PokemonType.DARK, 100, 15, -1, 0, 4) @@ -10817,9 +10791,9 @@ export function initMoves() { .condition(failIfGhostTypeCondition) .attr(AddBattlerTagAttr, BattlerTagType.OCTOLOCK, false, true, 1), new AttackMove(MoveId.BOLT_BEAK, PokemonType.ELECTRIC, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 8) - .attr(FirstAttackDoublePowerAttr), + .attr(MovePowerMultiplierAttr, (_user, target) => target.turnData.acted ? 1 : 2), new AttackMove(MoveId.FISHIOUS_REND, PokemonType.WATER, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 8) - .attr(FirstAttackDoublePowerAttr) + .attr(MovePowerMultiplierAttr, (_user, target) => target.turnData.acted ? 1 : 2) .bitingMove(), new StatusMove(MoveId.COURT_CHANGE, PokemonType.NORMAL, 100, 10, -1, 0, 8) .attr(SwapArenaTagsAttr, [ ArenaTagType.AURORA_VEIL, ArenaTagType.LIGHT_SCREEN, ArenaTagType.MIST, ArenaTagType.REFLECT, ArenaTagType.SPIKES, ArenaTagType.STEALTH_ROCK, ArenaTagType.STICKY_WEB, ArenaTagType.TAILWIND, ArenaTagType.TOXIC_SPIKES ]), diff --git a/src/data/moves/pokemon-move.ts b/src/data/moves/pokemon-move.ts index ab774c9fff9..ec5ae195bd6 100644 --- a/src/data/moves/pokemon-move.ts +++ b/src/data/moves/pokemon-move.ts @@ -1,8 +1,8 @@ -import type Pokemon from "#app/field/pokemon"; -import { toDmgValue } from "#app/utils/common"; +import { allMoves } from "#data/data-lists"; import type { MoveId } from "#enums/move-id"; -import { allMoves } from "../data-lists"; -import type Move from "./move"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { toDmgValue } from "#utils/common"; /** * Wrapper class for the {@linkcode Move} class for Pokemon to interact with. diff --git a/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts b/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts index 7a1c9821e89..5b2805f9310 100644 --- a/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts +++ b/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts @@ -1,27 +1,27 @@ +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; import { globalScene } from "#app/global-scene"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { modifierTypes } from "#data/data-lists"; +import type { IEggOptions } from "#data/egg"; +import { EggSourceType } from "#enums/egg-source-types"; +import { EggTier } from "#enums/egg-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { TrainerType } from "#enums/trainer-type"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterRewards, transitionMysteryEncounterIntroVisuals, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { TrainerType } from "#enums/trainer-type"; -import { SpeciesId } from "#enums/species-id"; -import { getSpriteKeysFromSpecies } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { randSeedInt } from "#app/utils/common"; +} from "#mystery-encounters/encounter-phase-utils"; +import { getSpriteKeysFromSpecies } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { trainerConfigs } from "#trainers/trainer-config"; +import { randSeedInt } from "#utils/common"; import i18next from "i18next"; -import type { IEggOptions } from "#app/data/egg"; -import { EggSourceType } from "#enums/egg-source-types"; -import { EggTier } from "#enums/egg-type"; -import { ModifierTier } from "#enums/modifier-tier"; -import { modifierTypes } from "#app/data/data-lists"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/aTrainersTest"; diff --git a/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts b/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts index bec75288837..d6058eb9eaf 100644 --- a/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts +++ b/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts @@ -1,44 +1,44 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import type { BerryType } from "#enums/berry-type"; +import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PokeballType } from "#enums/pokeball"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TrainerSlot } from "#enums/trainer-slot"; +import type { Pokemon } from "#field/pokemon"; +import { EnemyPokemon } from "#field/pokemon"; +import { BerryModifier, PokemonInstantReviveModifier } from "#modifiers/modifier"; +import type { BerryModifierType, PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { queueEncounterMessage } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterRewards, transitionMysteryEncounterIntroVisuals, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type Pokemon from "#app/field/pokemon"; -import { EnemyPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import type { BerryModifierType, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { PersistentModifierRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { BerryModifier, PokemonInstantReviveModifier } from "#app/modifier/modifier"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MoveId } from "#enums/move-id"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { randInt } from "#app/utils/common"; -import { BattlerIndex } from "#enums/battler-index"; +} from "#mystery-encounters/encounter-phase-utils"; import { applyModifierTypeToPlayerPokemon, catchPokemon, getHighestLevelPlayerPokemon, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { PokeballType } from "#enums/pokeball"; -import type HeldModifierConfig from "#app/@types/held-modifier-config"; -import type { BerryType } from "#enums/berry-type"; -import { Stat } from "#enums/stat"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { PersistentModifierRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import type { HeldModifierConfig } from "#types/held-modifier-config"; +import { randInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { MoveUseMode } from "#enums/move-use-mode"; /** the i18n namespace for this encounter */ const namespace = "mysteryEncounters/absoluteAvarice"; diff --git a/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts b/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts index f8a904cdb45..619acabe200 100644 --- a/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts +++ b/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts @@ -1,28 +1,28 @@ +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { speciesStarterCosts } from "#balance/starters"; +import { modifierTypes } from "#data/data-lists"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; import { generateModifierType, leaveEncounterWithoutBattle, setEncounterExp, updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { modifierTypes } from "#app/data/data-lists"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; +} from "#mystery-encounters/encounter-phase-utils"; +import { getHighestStatTotalPlayerPokemon } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; import { AbilityRequirement, CombinationPokemonRequirement, MoveRequirement, -} from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { getHighestStatTotalPlayerPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { EXTORTION_ABILITIES, EXTORTION_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +} from "#mystery-encounters/mystery-encounter-requirements"; +import { EXTORTION_ABILITIES, EXTORTION_MOVES } from "#mystery-encounters/requirement-groups"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; /** the i18n namespace for this encounter */ diff --git a/src/data/mystery-encounters/encounters/berries-abound-encounter.ts b/src/data/mystery-encounters/encounters/berries-abound-encounter.ts index d86a8439804..a827c3fcc0a 100644 --- a/src/data/mystery-encounters/encounters/berries-abound-encounter.ts +++ b/src/data/mystery-encounters/encounters/berries-abound-encounter.ts @@ -1,5 +1,20 @@ -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { modifierTypes } from "#data/data-lists"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BerryType } from "#enums/berry-type"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PERMANENT_STATS, Stat } from "#enums/stat"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { BerryModifier } from "#modifiers/modifier"; +import type { BerryModifierType, ModifierTypeOption } from "#modifiers/modifier-type"; +import { regenerateModifierPoolThresholds } from "#modifiers/modifier-type"; +import { queueEncounterMessage, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, generateModifierTypeOption, @@ -8,36 +23,21 @@ import { leaveEncounterWithoutBattle, setEncounterExp, setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import type { BerryModifierType, ModifierTypeOption } from "#app/modifier/modifier-type"; -import { regenerateModifierPoolThresholds } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { randSeedInt } from "#app/utils/common"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +} from "#mystery-encounters/encounter-phase-utils"; import { applyModifierTypeToPlayerPokemon, getEncounterPokemonLevelForWave, getHighestStatPlayerPokemon, getSpriteKeysFromPokemon, STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import PokemonData from "#app/system/pokemon-data"; -import { BerryModifier } from "#app/modifier/modifier"; -import i18next from "#app/plugins/i18n"; -import { BerryType } from "#enums/berry-type"; -import { PERMANENT_STATS, Stat } from "#enums/stat"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import i18next from "#plugins/i18n"; +import { PokemonData } from "#system/pokemon-data"; +import { randSeedItem } from "#utils/common"; +import { getEnumValues } from "#utils/enums"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/berriesAbound"; @@ -311,7 +311,7 @@ export const BerriesAboundEncounter: MysteryEncounter = MysteryEncounterBuilder. .build(); function tryGiveBerry(prioritizedPokemon?: PlayerPokemon) { - const berryType = randSeedInt(Object.keys(BerryType).filter(s => !Number.isNaN(Number(s))).length) as BerryType; + const berryType = randSeedItem(getEnumValues(BerryType)); const berry = generateModifierType(modifierTypes.BERRY, [berryType]) as BerryModifierType; const party = globalScene.getPlayerParty(); diff --git a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts index df06f40c159..d60ebe690ac 100644 --- a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts +++ b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts @@ -1,4 +1,29 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { allMoves, modifierTypes } from "#data/data-lists"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PartyMemberStrength } from "#enums/party-member-strength"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { TrainerType } from "#enums/trainer-type"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { PokemonHeldItemModifier } from "#modifiers/modifier"; +import { + AttackTypeBoosterModifier, + BypassSpeedChanceModifier, + ContactHeldItemTransferChanceModifier, + GigantamaxAccessModifier, + MegaEvolutionAccessModifier, +} from "#modifiers/modifier"; +import type { AttackTypeBoosterModifierType, ModifierTypeOption } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { getEncounterText, showEncounterDialogue } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, generateModifierTypeOption, @@ -8,51 +33,23 @@ import { selectPokemonForOption, setEncounterRewards, transitionMysteryEncounterIntroVisuals, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { getRandomPartyMemberFunc, trainerConfigs } from "#app/data/trainers/trainer-config"; -import { TrainerPartyCompoundTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerPartyTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { PartyMemberStrength } from "#enums/party-member-strength"; -import { globalScene } from "#app/global-scene"; -import { isNullOrUndefined, randSeedInt, randSeedShuffle } from "#app/utils/common"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { TrainerType } from "#enums/trainer-type"; -import { SpeciesId } from "#enums/species-id"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { getEncounterText, showEncounterDialogue } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { MoveId } from "#enums/move-id"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +} from "#mystery-encounters/encounter-phase-utils"; +import { getSpriteKeysFromSpecies } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; import { AttackTypeBoosterHeldItemTypeRequirement, CombinationPokemonRequirement, HeldItemRequirement, TypeRequirement, -} from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { PokemonType } from "#enums/pokemon-type"; -import type { AttackTypeBoosterModifierType, ModifierTypeOption } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { - AttackTypeBoosterModifier, - BypassSpeedChanceModifier, - ContactHeldItemTransferChanceModifier, - GigantamaxAccessModifier, - MegaEvolutionAccessModifier, -} from "#app/modifier/modifier"; +} from "#mystery-encounters/mystery-encounter-requirements"; +import { getRandomPartyMemberFunc, trainerConfigs } from "#trainers/trainer-config"; +import { TrainerPartyCompoundTemplate, TrainerPartyTemplate } from "#trainers/trainer-party-template"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { MoveInfoOverlay } from "#ui/move-info-overlay"; +import { isNullOrUndefined, randSeedInt, randSeedShuffle } from "#utils/common"; import i18next from "i18next"; -import MoveInfoOverlay from "#app/ui/move-info-overlay"; -import { allMoves } from "#app/data/data-lists"; -import { ModifierTier } from "#enums/modifier-tier"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { getSpriteKeysFromSpecies } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/bugTypeSuperfan"; @@ -292,6 +289,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde // Init the moves available for tutor const moveTutorOptions: PokemonMove[] = []; + // TODO: should this use `randSeedItem`? moveTutorOptions.push(new PokemonMove(PHYSICAL_TUTOR_MOVES[randSeedInt(PHYSICAL_TUTOR_MOVES.length)])); moveTutorOptions.push(new PokemonMove(SPECIAL_TUTOR_MOVES[randSeedInt(SPECIAL_TUTOR_MOVES.length)])); moveTutorOptions.push(new PokemonMove(STATUS_TUTOR_MOVES[randSeedInt(STATUS_TUTOR_MOVES.length)])); @@ -389,6 +387,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde specialOptions.push(rareFormChangeModifier); } if (specialOptions.length > 0) { + // TODO: should this use `randSeedItem`? modifierOptions.push(specialOptions[randSeedInt(specialOptions.length)]); } diff --git a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts index 553c4deb74e..1c3335b859f 100644 --- a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts +++ b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts @@ -1,4 +1,32 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { EncounterBattleAnim } from "#data/battle-anims"; +import { allAbilities, modifierTypes } from "#data/data-lists"; +import { CustomPokemonData } from "#data/pokemon-data"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BerryType } from "#enums/berry-type"; +import { Challenges } from "#enums/challenges"; +import { EncounterAnim } from "#enums/encounter-anims"; +import { MoveCategory } from "#enums/MoveCategory"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PartyMemberStrength } from "#enums/party-member-strength"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { TrainerType } from "#enums/trainer-type"; +import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon } from "#field/pokemon"; +import { BerryModifier } from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { showEncounterDialogue, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, initBattleWithEnemyConfig, @@ -7,49 +35,20 @@ import { selectPokemonForOption, setEncounterRewards, transitionMysteryEncounterIntroVisuals, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { TrainerPartyCompoundTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerPartyTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { ModifierTier } from "#enums/modifier-tier"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { PartyMemberStrength } from "#enums/party-member-strength"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { SpeciesId } from "#enums/species-id"; -import { TrainerType } from "#enums/trainer-type"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { AbilityId } from "#enums/ability-id"; +} from "#mystery-encounters/encounter-phase-utils"; import { applyAbilityOverrideToPokemon, applyModifierTypeToPlayerPokemon, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { PokemonType } from "#enums/pokemon-type"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { randSeedInt, randSeedShuffle } from "#app/utils/common"; -import { showEncounterDialogue, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { UiMode } from "#enums/ui-mode"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { trainerConfigs } from "#trainers/trainer-config"; +import { TrainerPartyCompoundTemplate, TrainerPartyTemplate } from "#trainers/trainer-party-template"; +import type { OptionSelectConfig } from "#ui/abstact-option-select-ui-handler"; +import { randSeedInt, randSeedShuffle } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import type { OptionSelectConfig } from "#app/ui/abstact-option-select-ui-handler"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { BerryModifier } from "#app/modifier/modifier"; -import { BerryType } from "#enums/berry-type"; -import { BattlerIndex } from "#enums/battler-index"; -import { MoveId } from "#enums/move-id"; -import { EncounterBattleAnim } from "#app/data/battle-anims"; -import { MoveCategory } from "#enums/MoveCategory"; -import { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { EncounterAnim } from "#enums/encounter-anims"; -import { Challenges } from "#enums/challenges"; -import { MoveUseMode } from "#enums/move-use-mode"; -import { allAbilities, modifierTypes } from "#app/data/data-lists"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/clowningAround"; @@ -139,6 +138,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder clownConfig.partyTemplateFunc = null; // Overrides party template func if it exists // Generate random ability for Blacephalon from pool + // TODO: should this use `randSeedItem`? const ability = RANDOM_ABILITY_POOL[randSeedInt(RANDOM_ABILITY_POOL.length)]; encounter.setDialogueToken("ability", allAbilities[ability].name); encounter.misc = { ability }; diff --git a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts index cf24d1dd7e0..94006a43837 100644 --- a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts +++ b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts @@ -1,46 +1,45 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { globalScene } from "#app/global-scene"; -import { EncounterBattleAnim } from "#app/data/battle-anims"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MoveRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { DANCING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups"; -import { getEncounterText, queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { - initBattleWithEnemyConfig, - leaveEncounterWithoutBattle, - selectPokemonForOption, - setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { - catchPokemon, - getEncounterPokemonLevelForWave, - STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { TrainerSlot } from "#enums/trainer-slot"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { EnemyPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { modifierTypes } from "#app/data/data-lists"; -import PokemonData from "#app/system/pokemon-data"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; +import { globalScene } from "#app/global-scene"; +import { EncounterBattleAnim } from "#data/battle-anims"; +import { modifierTypes } from "#data/data-lists"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BiomeId } from "#enums/biome-id"; import { EncounterAnim } from "#enums/encounter-anims"; import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PokeballType } from "#enums/pokeball"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; +import { TrainerSlot } from "#enums/trainer-slot"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { EnemyPokemon } from "#field/pokemon"; +import { PokemonMove } from "#moves/pokemon-move"; +import { getEncounterText, queueEncounterMessage } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; +import { + initBattleWithEnemyConfig, + leaveEncounterWithoutBattle, + selectPokemonForOption, + setEncounterRewards, +} from "#mystery-encounters/encounter-phase-utils"; +import { + catchPokemon, + getEncounterPokemonLevelForWave, + STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER, +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoveRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { DANCING_MOVES } from "#mystery-encounters/requirement-groups"; +import { PokemonData } from "#system/pokemon-data"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { MoveUseMode } from "#enums/move-use-mode"; /** the i18n namespace for this encounter */ const namespace = "mysteryEncounters/dancingLessons"; diff --git a/src/data/mystery-encounters/encounters/dark-deal-encounter.ts b/src/data/mystery-encounters/encounters/dark-deal-encounter.ts index 4056ba3532e..29517ac2531 100644 --- a/src/data/mystery-encounters/encounters/dark-deal-encounter.ts +++ b/src/data/mystery-encounters/encounters/dark-deal-encounter.ts @@ -1,25 +1,22 @@ -import type { PokemonType } from "#enums/pokemon-type"; -import { isNullOrUndefined, randSeedInt } from "#app/utils/common"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import { globalScene } from "#app/global-scene"; -import { modifierTypes } from "#app/data/data-lists"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import type { EnemyPartyConfig, EnemyPokemonConfig } from "../utils/encounter-phase-utils"; -import { initBattleWithEnemyConfig, leaveEncounterWithoutBattle } from "../utils/encounter-phase-utils"; -import { - getRandomPlayerPokemon, - getRandomSpeciesByStarterCost, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { PokemonFormChangeItemModifier } from "#app/modifier/modifier"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; import { Challenges } from "#enums/challenges"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import type { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import type { PokemonHeldItemModifier } from "#modifiers/modifier"; +import { PokemonFormChangeItemModifier } from "#modifiers/modifier"; +import type { EnemyPartyConfig, EnemyPokemonConfig } from "#mystery-encounters/encounter-phase-utils"; +import { initBattleWithEnemyConfig, leaveEncounterWithoutBattle } from "#mystery-encounters/encounter-phase-utils"; +import { getRandomPlayerPokemon, getRandomSpeciesByStarterCost } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { isNullOrUndefined, randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** i18n namespace for encounter */ const namespace = "mysteryEncounters/darkDeal"; diff --git a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts index 842fc9d73bd..66f50f134dd 100644 --- a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts +++ b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts @@ -1,42 +1,41 @@ -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { - CombinationPokemonRequirement, - HeldItemRequirement, - MoneyRequirement, -} from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { getEncounterText, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { - generateModifierType, - leaveEncounterWithoutBattle, - selectPokemonForOption, - updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { applyModifierTypeToPlayerPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import type { PokemonHeldItemModifier, PokemonInstantReviveModifier } from "#app/modifier/modifier"; +import { timedEventManager } from "#app/global-event-manager"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { PokemonHeldItemModifier, PokemonInstantReviveModifier } from "#modifiers/modifier"; import { BerryModifier, HealingBoosterModifier, LevelIncrementBoosterModifier, MoneyMultiplierModifier, PreserveBerryModifier, -} from "#app/modifier/modifier"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import i18next from "#app/plugins/i18n"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import { randSeedItem } from "#app/utils/common"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import { timedEventManager } from "#app/global-event-manager"; +} from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { getEncounterText, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import { + generateModifierType, + leaveEncounterWithoutBattle, + selectPokemonForOption, + updatePlayerMoney, +} from "#mystery-encounters/encounter-phase-utils"; +import { applyModifierTypeToPlayerPokemon } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { + CombinationPokemonRequirement, + HeldItemRequirement, + MoneyRequirement, +} from "#mystery-encounters/mystery-encounter-requirements"; +import i18next from "#plugins/i18n"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { randSeedItem } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** the i18n namespace for this encounter */ const namespace = "mysteryEncounters/delibirdy"; diff --git a/src/data/mystery-encounters/encounters/department-store-sale-encounter.ts b/src/data/mystery-encounters/encounters/department-store-sale-encounter.ts index 46152a7dc41..a45c5301a3e 100644 --- a/src/data/mystery-encounters/encounters/department-store-sale-encounter.ts +++ b/src/data/mystery-encounters/encounters/department-store-sale-encounter.ts @@ -1,16 +1,13 @@ -import { - leaveEncounterWithoutBattle, - setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { ModifierTypeFunc } from "#app/@types/modifier-types"; -import { modifierTypes } from "#app/data/data-lists"; -import { randSeedInt } from "#app/utils/common"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { modifierTypes } from "#data/data-lists"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { leaveEncounterWithoutBattle, setEncounterRewards } from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import type { ModifierTypeFunc } from "#types/modifier-types"; +import { randSeedInt } from "#utils/common"; /** i18n namespace for encounter */ const namespace = "mysteryEncounters/departmentStoreSale"; diff --git a/src/data/mystery-encounters/encounters/field-trip-encounter.ts b/src/data/mystery-encounters/encounters/field-trip-encounter.ts index 6ab0f8a6a4b..84374c87e58 100644 --- a/src/data/mystery-encounters/encounters/field-trip-encounter.ts +++ b/src/data/mystery-encounters/encounters/field-trip-encounter.ts @@ -1,25 +1,25 @@ +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; import { MoveCategory } from "#enums/MoveCategory"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Stat } from "#enums/stat"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { PokemonMove } from "#moves/pokemon-move"; import { generateModifierTypeOption, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterExp, setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import { modifierTypes } from "#app/data/data-lists"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { Stat } from "#enums/stat"; +} from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; import i18next from "i18next"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; /** i18n namespace for the encounter */ const namespace = "mysteryEncounters/fieldTrip"; diff --git a/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts b/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts index e8900f8def4..7d2583a00cb 100644 --- a/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts +++ b/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts @@ -1,52 +1,52 @@ -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { EncounterBattleAnim } from "#data/battle-anims"; +import { allAbilities, modifierTypes } from "#data/data-lists"; +import { Gender } from "#data/gender"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { EncounterAnim } from "#enums/encounter-anims"; +import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { WeatherType } from "#enums/weather-type"; +import type { Pokemon } from "#field/pokemon"; +import type { AttackTypeBoosterModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { queueEncounterMessage } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { + generateModifierType, initBattleWithEnemyConfig, - loadCustomMovesForEncounter, leaveEncounterWithoutBattle, + loadCustomMovesForEncounter, setEncounterExp, setEncounterRewards, transitionMysteryEncounterIntroVisuals, - generateModifierType, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { AttackTypeBoosterModifierType } from "#app/modifier/modifier-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { - AbilityRequirement, - CombinationPokemonRequirement, - TypeRequirement, -} from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { SpeciesId } from "#enums/species-id"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { Gender } from "#app/data/gender"; -import { PokemonType } from "#enums/pokemon-type"; -import { BattlerIndex } from "#enums/battler-index"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { MoveId } from "#enums/move-id"; -import { EncounterBattleAnim } from "#app/data/battle-anims"; -import { WeatherType } from "#enums/weather-type"; -import { isNullOrUndefined, randSeedInt } from "#app/utils/common"; -import { StatusEffect } from "#enums/status-effect"; -import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; +} from "#mystery-encounters/encounter-phase-utils"; import { applyAbilityOverrideToPokemon, applyDamageToPokemon, applyModifierTypeToPlayerPokemon, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { EncounterAnim } from "#enums/encounter-anims"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { Stat } from "#enums/stat"; -import { FIRE_RESISTANT_ABILITIES } from "#app/data/mystery-encounters/requirements/requirement-groups"; -import { MoveUseMode } from "#enums/move-use-mode"; -import { allAbilities, modifierTypes } from "#app/data/data-lists"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { + AbilityRequirement, + CombinationPokemonRequirement, + TypeRequirement, +} from "#mystery-encounters/mystery-encounter-requirements"; +import { FIRE_RESISTANT_ABILITIES } from "#mystery-encounters/requirement-groups"; +import { isNullOrUndefined, randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/fieryFallout"; diff --git a/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts b/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts index c53ff610c48..6ee2ebcdf67 100644 --- a/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts +++ b/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts @@ -1,35 +1,35 @@ -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import type { Pokemon } from "#field/pokemon"; +import type { ModifierTypeOption } from "#modifiers/modifier-type"; +import { getPlayerModifierTypeOptions, regenerateModifierPoolThresholds } from "#modifiers/modifier-type"; +import { queueEncounterMessage } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { getRandomEncounterSpecies, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterExp, setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { STEALING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups"; -import type Pokemon from "#app/field/pokemon"; -import { ModifierTier } from "#enums/modifier-tier"; -import type { ModifierTypeOption } from "#app/modifier/modifier-type"; -import { getPlayerModifierTypeOptions, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MoveRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +} from "#mystery-encounters/encounter-phase-utils"; import { getEncounterPokemonLevelForWave, getSpriteKeysFromPokemon, STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import PokemonData from "#app/system/pokemon-data"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { randSeedInt } from "#app/utils/common"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoveRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { STEALING_MOVES } from "#mystery-encounters/requirement-groups"; +import { PokemonData } from "#system/pokemon-data"; +import { randSeedInt } from "#utils/common"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/fightOrFlight"; diff --git a/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts b/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts index 9611560fe62..bf376c04843 100644 --- a/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts +++ b/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts @@ -1,35 +1,34 @@ +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { modifierTypes } from "#data/data-lists"; +import { SpeciesFormChangeActiveTrigger } from "#data/form-change-triggers"; +import { getPokeballAtlasKey, getPokeballTintColor } from "#data/pokeball"; +import { FieldPosition } from "#enums/field-position"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { PlayerGender } from "#enums/player-gender"; +import { SpeciesId } from "#enums/species-id"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { addPokeballOpenParticles } from "#field/anims"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { queueEncounterMessage, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; import { leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterRewards, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { TrainerSlot } from "#enums/trainer-slot"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { FieldPosition } from "#enums/field-position"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { SpeciesId } from "#enums/species-id"; +} from "#mystery-encounters/encounter-phase-utils"; +import { isPokemonValidForEncounterOptionSelection } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoneyRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { PlayerGender } from "#enums/player-gender"; -import { getPokeballAtlasKey, getPokeballTintColor } from "#app/data/pokeball"; -import { addPokeballOpenParticles } from "#app/field/anims"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { modifierTypes } from "#app/data/data-lists"; -import { Nature } from "#enums/nature"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { isPokemonValidForEncounterOptionSelection } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/funAndGames"; diff --git a/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts b/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts index 6bbc1a68772..b914927123a 100644 --- a/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts +++ b/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts @@ -1,58 +1,50 @@ -import { - leaveEncounterWithoutBattle, - selectPokemonForOption, - setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { ModifierTier } from "#enums/modifier-tier"; -import { MusicPreference } from "#app/system/settings/settings"; -import type { ModifierTypeOption } from "#app/modifier/modifier-type"; -import { getPlayerModifierTypeOptions, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { timedEventManager } from "#app/global-event-manager"; import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { SpeciesId } from "#enums/species-id"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { allSpecies } from "#app/data/data-lists"; -import { getTypeRgb } from "#app/data/type"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; +import { allSpecies } from "#data/data-lists"; +import { Gender, getGenderSymbol } from "#data/gender"; +import { getNatureName } from "#data/nature"; +import { getPokeballAtlasKey, getPokeballTintColor } from "#data/pokeball"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { getTypeRgb } from "#data/type"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { ModifierTier } from "#enums/modifier-tier"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { - NumberHolder, - isNullOrUndefined, - randInt, - randSeedInt, - randSeedShuffle, - randSeedItem, -} from "#app/utils/common"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { EnemyPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import type { PokeballType } from "#enums/pokeball"; +import { SpeciesId } from "#enums/species-id"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { TrainerType } from "#enums/trainer-type"; +import { doShinySparkleAnim } from "#field/anims"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { EnemyPokemon } from "#field/pokemon"; +import type { PokemonHeldItemModifier } from "#modifiers/modifier"; import { HiddenAbilityRateBoosterModifier, PokemonFormChangeItemModifier, ShinyRateBoosterModifier, SpeciesStatBoosterModifier, -} from "#app/modifier/modifier"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import PokemonData from "#app/system/pokemon-data"; +} from "#modifiers/modifier"; +import type { ModifierTypeOption } from "#modifiers/modifier-type"; +import { getPlayerModifierTypeOptions, regenerateModifierPoolThresholds } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { getEncounterText, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import { + leaveEncounterWithoutBattle, + selectPokemonForOption, + setEncounterRewards, +} from "#mystery-encounters/encounter-phase-utils"; +import { addPokemonDataToDexAndValidateAchievements } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { PokemonData } from "#system/pokemon-data"; +import { MusicPreference } from "#system/settings"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { isNullOrUndefined, NumberHolder, randInt, randSeedInt, randSeedItem, randSeedShuffle } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { Gender, getGenderSymbol } from "#app/data/gender"; -import { getNatureName } from "#app/data/nature"; -import { getPokeballAtlasKey, getPokeballTintColor } from "#app/data/pokeball"; -import { getEncounterText, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { addPokemonDataToDexAndValidateAchievements } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import type { PokeballType } from "#enums/pokeball"; -import { doShinySparkleAnim } from "#app/field/anims"; -import { TrainerType } from "#enums/trainer-type"; -import { timedEventManager } from "#app/global-event-manager"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/globalTradeSystem"; diff --git a/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts b/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts index 2b54b0a42f5..10f45c21b68 100644 --- a/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts +++ b/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts @@ -1,17 +1,17 @@ -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { leaveEncounterWithoutBattle, setEncounterExp } from "../utils/encounter-phase-utils"; -import { applyDamageToPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; +import { globalScene } from "#app/global-scene"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { PokemonMove } from "#moves/pokemon-move"; +import { leaveEncounterWithoutBattle, setEncounterExp } from "#mystery-encounters/encounter-phase-utils"; +import { applyDamageToPokemon } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; const OPTION_1_REQUIRED_MOVE = MoveId.SURF; const OPTION_2_REQUIRED_MOVE = MoveId.FLY; diff --git a/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts b/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts index ae3d905cf91..6f15f150d8b 100644 --- a/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts +++ b/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts @@ -1,22 +1,21 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { - initBattleWithEnemyConfig, - setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { trainerPartyTemplates } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerPartyCompoundTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerPartyTemplate } from "#app/data/trainers/TrainerPartyTemplate"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; import { ModifierTier } from "#enums/modifier-tier"; -import { modifierTypes } from "#app/data/data-lists"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PartyMemberStrength } from "#enums/party-member-strength"; -import { globalScene } from "#app/global-scene"; -import { randSeedInt } from "#app/utils/common"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; +import { initBattleWithEnemyConfig, setEncounterRewards } from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { trainerConfigs } from "#trainers/trainer-config"; +import { + TrainerPartyCompoundTemplate, + TrainerPartyTemplate, + trainerPartyTemplates, +} from "#trainers/trainer-party-template"; +import { randSeedInt } from "#utils/common"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/mysteriousChallengers"; diff --git a/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts b/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts index 321e65d7008..1bc2404dc27 100644 --- a/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts +++ b/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts @@ -1,28 +1,25 @@ -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { - initBattleWithEnemyConfig, - leaveEncounterWithoutBattle, - setEncounterRewards, - transitionMysteryEncounterIntroVisuals, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { - getHighestLevelPlayerPokemon, - koPlayerPokemon, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; import { ModifierTier } from "#enums/modifier-tier"; -import { randSeedInt } from "#app/utils/common"; import { MoveId } from "#enums/move-id"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; +import { queueEncounterMessage, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; +import { + initBattleWithEnemyConfig, + leaveEncounterWithoutBattle, + setEncounterRewards, + transitionMysteryEncounterIntroVisuals, +} from "#mystery-encounters/encounter-phase-utils"; +import { getHighestLevelPlayerPokemon, koPlayerPokemon } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** i18n namespace for encounter */ const namespace = "mysteryEncounters/mysteriousChest"; diff --git a/src/data/mystery-encounters/encounters/part-timer-encounter.ts b/src/data/mystery-encounters/encounters/part-timer-encounter.ts index 1074eaf8c81..a865de3b19d 100644 --- a/src/data/mystery-encounters/encounters/part-timer-encounter.ts +++ b/src/data/mystery-encounters/encounters/part-timer-encounter.ts @@ -1,4 +1,11 @@ -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Stat } from "#enums/stat"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { showEncounterDialogue, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; import { leaveEncounterWithoutBattle, selectPokemonForOption, @@ -6,22 +13,14 @@ import { setEncounterRewards, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MoveRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { Stat } from "#enums/stat"; -import { CHARMING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups"; -import { showEncounterDialogue, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; +} from "#mystery-encounters/encounter-phase-utils"; +import { isPokemonValidForEncounterOptionSelection } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoveRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { CHARMING_MOVES } from "#mystery-encounters/requirement-groups"; import i18next from "i18next"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { isPokemonValidForEncounterOptionSelection } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/partTimer"; diff --git a/src/data/mystery-encounters/encounters/safari-zone-encounter.ts b/src/data/mystery-encounters/encounters/safari-zone-encounter.ts index 207e6ca400d..c3400b41327 100644 --- a/src/data/mystery-encounters/encounters/safari-zone-encounter.ts +++ b/src/data/mystery-encounters/encounters/safari-zone-encounter.ts @@ -1,36 +1,36 @@ +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { NON_LEGEND_PARADOX_POKEMON } from "#balance/special-species-groups"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PlayerGender } from "#enums/player-gender"; +import { PokeballType } from "#enums/pokeball"; +import { TrainerSlot } from "#enums/trainer-slot"; +import type { EnemyPokemon } from "#field/pokemon"; +import { HiddenAbilityRateBoosterModifier, IvScannerModifier } from "#modifiers/modifier"; +import { getEncounterText, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; import { initSubsequentOptionSelect, leaveEncounterWithoutBattle, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import type MysteryEncounterOption from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { HiddenAbilityRateBoosterModifier, IvScannerModifier } from "#app/modifier/modifier"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { PokeballType } from "#enums/pokeball"; -import { PlayerGender } from "#enums/player-gender"; -import { NumberHolder, randSeedInt } from "#app/utils/common"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; +} from "#mystery-encounters/encounter-phase-utils"; import { doPlayerFlee, doPokemonFlee, getRandomSpeciesByStarterCost, trainerThrowPokeball, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { getEncounterText, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { NON_LEGEND_PARADOX_POKEMON } from "#app/data/balance/special-species-groups"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import type { MysteryEncounterOption } from "#mystery-encounters/mystery-encounter-option"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoneyRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { NumberHolder, randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/safariZone"; diff --git a/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts b/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts index 967c105c740..47317c12b50 100644 --- a/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts +++ b/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts @@ -1,32 +1,31 @@ +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { getNatureName } from "#data/nature"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import type { Nature } from "#enums/nature"; +import { SpeciesId } from "#enums/species-id"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { getEncounterText, queueEncounterMessage } from "#mystery-encounters/encounter-dialogue-utils"; import { generateModifierType, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterExp, updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { modifierTypes } from "#app/data/data-lists"; -import { randSeedInt } from "#app/utils/common"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { getEncounterText, queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; +} from "#mystery-encounters/encounter-phase-utils"; import { applyDamageToPokemon, applyModifierTypeToPlayerPokemon, isPokemonValidForEncounterOptionSelection, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import type { Nature } from "#enums/nature"; -import { getNatureName } from "#app/data/nature"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoneyRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { randSeedInt } from "#utils/common"; import i18next from "i18next"; /** the i18n namespace for this encounter */ diff --git a/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts b/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts index d6a85dee119..cddfef1ef76 100644 --- a/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts +++ b/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts @@ -1,15 +1,22 @@ -import { STEALING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { CustomPokemonData } from "#data/pokemon-data"; +import { AiType } from "#enums/ai-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BerryType } from "#enums/berry-type"; +import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MoveRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import type { EnemyPartyConfig, EnemyPokemonConfig } from "../utils/encounter-phase-utils"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { queueEncounterMessage } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig, EnemyPokemonConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, initBattleWithEnemyConfig, @@ -17,21 +24,14 @@ import { loadCustomMovesForEncounter, setEncounterExp, setEncounterRewards, -} from "../utils/encounter-phase-utils"; -import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { Nature } from "#enums/nature"; -import { MoveId } from "#enums/move-id"; -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { AiType } from "#enums/ai-type"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { BerryType } from "#enums/berry-type"; -import { Stat } from "#enums/stat"; -import { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; -import { randSeedInt } from "#app/utils/common"; -import { MoveUseMode } from "#enums/move-use-mode"; +} from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoveRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { STEALING_MOVES } from "#mystery-encounters/requirement-groups"; +import { randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** i18n namespace for the encounter */ const namespace = "mysteryEncounters/slumberingSnorlax"; diff --git a/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts b/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts index 9c9232612c6..b547064fd66 100644 --- a/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts +++ b/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts @@ -1,4 +1,21 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { modifierTypes } from "#data/data-lists"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BiomeId } from "#enums/biome-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PokemonType } from "#enums/pokemon-type"; +import { Stat } from "#enums/stat"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { getBiomeKey } from "#field/arena"; +import type { Pokemon } from "#field/pokemon"; +import { EnemyPokemon } from "#field/pokemon"; +import { getPartyLuckValue } from "#modifiers/modifier-type"; +import { queueEncounterMessage, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierTypeOption, initBattleWithEnemyConfig, @@ -6,34 +23,17 @@ import { setEncounterRewards, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { randSeedInt } from "#app/utils/common"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MoneyRequirement, WaveModulusRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import type Pokemon from "#app/field/pokemon"; -import { EnemyPokemon } from "#app/field/pokemon"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import PokemonData from "#app/system/pokemon-data"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { BiomeId } from "#enums/biome-id"; -import { getBiomeKey } from "#app/field/arena"; -import { PokemonType } from "#enums/pokemon-type"; -import { getPartyLuckValue } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { Stat } from "#enums/stat"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +} from "#mystery-encounters/encounter-phase-utils"; import { getEncounterPokemonLevelForWave, STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoneyRequirement, WaveModulusRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { PokemonData } from "#system/pokemon-data"; +import { randSeedInt } from "#utils/common"; /** the i18n namespace for this encounter */ const namespace = "mysteryEncounters/teleportingHijinks"; @@ -190,6 +190,7 @@ async function doBiomeTransitionDialogueAndBattleInit() { // Calculate new biome (cannot be current biome) const filteredBiomes = BIOME_CANDIDATES.filter(b => globalScene.arena.biomeType !== b); + // TODO: should this use `randSeedItem`? const newBiome = filteredBiomes[randSeedInt(filteredBiomes.length)]; // Show dialogue and transition biome diff --git a/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts index 03c09f6918e..235bd322ef8 100644 --- a/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts @@ -1,34 +1,34 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { globalScene } from "#app/global-scene"; +import { speciesStarterCosts } from "#balance/starters"; +import { modifierTypes } from "#data/data-lists"; +import type { IEggOptions } from "#data/egg"; +import { getPokeballTintColor } from "#data/pokeball"; +import { BiomeId } from "#enums/biome-id"; +import { EggSourceType } from "#enums/egg-source-types"; +import { EggTier } from "#enums/egg-type"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { TrainerType } from "#enums/trainer-type"; +import type { PlayerPokemon } from "#field/pokemon"; +import { getEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { handleMysteryEncounterBattleFailed, initBattleWithEnemyConfig, setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import { randSeedShuffle } from "#app/utils/common"; -import type MysteryEncounter from "../mystery-encounter"; -import { MysteryEncounterBuilder } from "../mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { BiomeId } from "#enums/biome-id"; -import { TrainerType } from "#enums/trainer-type"; +} from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { trainerConfigs } from "#trainers/trainer-config"; +import { randSeedShuffle } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { SpeciesId } from "#enums/species-id"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { Nature } from "#enums/nature"; -import { MoveId } from "#enums/move-id"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import { getEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import type { IEggOptions } from "#app/data/egg"; -import { EggSourceType } from "#enums/egg-source-types"; -import { EggTier } from "#enums/egg-type"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { modifierTypes } from "#app/data/data-lists"; -import { PokemonType } from "#enums/pokemon-type"; -import { getPokeballTintColor } from "#app/data/pokeball"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/theExpertPokemonBreeder"; diff --git a/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts b/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts index c3bcf9ceb24..91662993a51 100644 --- a/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts @@ -1,35 +1,35 @@ +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { timedEventManager } from "#app/global-event-manager"; +import { globalScene } from "#app/global-scene"; +import { NON_LEGEND_PARADOX_POKEMON, NON_LEGEND_ULTRA_BEASTS } from "#balance/special-species-groups"; +import { speciesStarterCosts } from "#balance/starters"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { AbilityId } from "#enums/ability-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PokeballType } from "#enums/pokeball"; +import { SpeciesId } from "#enums/species-id"; +import type { EnemyPokemon } from "#field/pokemon"; +import { PlayerPokemon } from "#field/pokemon"; +import { showEncounterDialogue } from "#mystery-encounters/encounter-dialogue-utils"; import { leaveEncounterWithoutBattle, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { isNullOrUndefined, randSeedInt, randSeedItem } from "#app/utils/common"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; +} from "#mystery-encounters/encounter-phase-utils"; import { catchPokemon, getRandomSpeciesByStarterCost, getSpriteKeysFromPokemon, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { SpeciesId } from "#enums/species-id"; -import { PokeballType } from "#enums/pokeball"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { PlayerPokemon } from "#app/field/pokemon"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { showEncounterDialogue } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import PokemonData from "#app/system/pokemon-data"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { AbilityId } from "#enums/ability-id"; -import { NON_LEGEND_PARADOX_POKEMON, NON_LEGEND_ULTRA_BEASTS } from "#app/data/balance/special-species-groups"; -import { timedEventManager } from "#app/global-event-manager"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoneyRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { PokemonData } from "#system/pokemon-data"; +import { isNullOrUndefined, randSeedInt, randSeedItem } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** the i18n namespace for this encounter */ const namespace = "mysteryEncounters/thePokemonSalesman"; diff --git a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts b/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts index f85206bcbc6..568dc5de8b1 100644 --- a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts @@ -1,34 +1,34 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { - initBattleWithEnemyConfig, - loadCustomMovesForEncounter, - leaveEncounterWithoutBattle, - setEncounterRewards, - transitionMysteryEncounterIntroVisuals, - generateModifierType, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { SpeciesId } from "#enums/species-id"; -import { Nature } from "#enums/nature"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { modifyPlayerPokemonBST } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { MoveId } from "#enums/move-id"; +import { modifierTypes } from "#data/data-lists"; +import { CustomPokemonData } from "#data/pokemon-data"; import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; -import { Stat } from "#enums/stat"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { MoveId } from "#enums/move-id"; import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import type { Pokemon } from "#field/pokemon"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { queueEncounterMessage, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; +import { + generateModifierType, + initBattleWithEnemyConfig, + leaveEncounterWithoutBattle, + loadCustomMovesForEncounter, + setEncounterRewards, + transitionMysteryEncounterIntroVisuals, +} from "#mystery-encounters/encounter-phase-utils"; +import { modifyPlayerPokemonBST } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/theStrongStuff"; diff --git a/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts b/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts index 6d28a710953..e17bf0575d7 100644 --- a/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts @@ -1,4 +1,24 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { SpeciesFormChangeAbilityTrigger } from "#data/form-change-triggers"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BerryType } from "#enums/berry-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TrainerType } from "#enums/trainer-type"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { showEncounterDialogue, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, generateModifierTypeOption, @@ -6,31 +26,11 @@ import { leaveEncounterWithoutBattle, setEncounterRewards, transitionMysteryEncounterIntroVisuals, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { TrainerType } from "#enums/trainer-type"; -import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MoveId } from "#enums/move-id"; -import { Nature } from "#enums/nature"; -import { PokemonType } from "#enums/pokemon-type"; -import { BerryType } from "#enums/berry-type"; -import { Stat } from "#enums/stat"; -import { SpeciesFormChangeAbilityTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { showEncounterDialogue, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +} from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { ModifierTier } from "#enums/modifier-tier"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { BattlerTagType } from "#enums/battler-tag-type"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/theWinstrateChallenge"; diff --git a/src/data/mystery-encounters/encounters/training-session-encounter.ts b/src/data/mystery-encounters/encounters/training-session-encounter.ts index f76bd66151f..393f8a24e51 100644 --- a/src/data/mystery-encounters/encounters/training-session-encounter.ts +++ b/src/data/mystery-encounters/encounters/training-session-encounter.ts @@ -1,36 +1,36 @@ -import type { Ability } from "#app/data/abilities/ability"; -import { allAbilities } from "#app/data/data-lists"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import type { Ability } from "#abilities/ability"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { speciesStarterCosts } from "#balance/starters"; +import { allAbilities } from "#data/data-lists"; +import { getNatureName } from "#data/nature"; +import { AbilityAttr } from "#enums/ability-attr"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { getStatKey } from "#enums/stat"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { PokemonHeldItemModifier } from "#modifiers/modifier"; +import { queueEncounterMessage, showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { initBattleWithEnemyConfig, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { getNatureName } from "#app/data/nature"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { AbilityAttr } from "#enums/ability-attr"; -import PokemonData from "#app/system/pokemon-data"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import { getEnumValues, isNullOrUndefined, randSeedShuffle } from "#app/utils/common"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import type HeldModifierConfig from "#app/@types/held-modifier-config"; +} from "#mystery-encounters/encounter-phase-utils"; +import { isPokemonValidForEncounterOptionSelection } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { PokemonData } from "#system/pokemon-data"; +import type { HeldModifierConfig } from "#types/held-modifier-config"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { isNullOrUndefined, randSeedShuffle } from "#utils/common"; +import { getEnumValues } from "#utils/enums"; import i18next from "i18next"; -import { getStatKey } from "#enums/stat"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { isPokemonValidForEncounterOptionSelection } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { Nature } from "#enums/nature"; /** The i18n namespace for the encounter */ const namespace = "mysteryEncounters/trainingSession"; diff --git a/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts b/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts index e2a740c4900..452a9a8bb4b 100644 --- a/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts +++ b/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts @@ -1,4 +1,19 @@ -import type { EnemyPartyConfig, EnemyPokemonConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { BattlerIndex } from "#enums/battler-index"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { HitHealModifier, PokemonHeldItemModifier, TurnHealModifier } from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig, EnemyPokemonConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, initBattleWithEnemyConfig, @@ -6,29 +21,14 @@ import { loadCustomMovesForEncounter, setEncounterRewards, transitionMysteryEncounterIntroVisuals, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { SpeciesId } from "#enums/species-id"; -import { HitHealModifier, PokemonHeldItemModifier, TurnHealModifier } from "#app/modifier/modifier"; -import { applyModifierTypeToPlayerPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import i18next from "#app/plugins/i18n"; -import { ModifierTier } from "#enums/modifier-tier"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MoveId } from "#enums/move-id"; -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { randSeedInt } from "#app/utils/common"; -import { MoveUseMode } from "#enums/move-use-mode"; +} from "#mystery-encounters/encounter-phase-utils"; +import { applyModifierTypeToPlayerPokemon } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import i18next from "#plugins/i18n"; +import { randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** the i18n namespace for this encounter */ const namespace = "mysteryEncounters/trashToTreasure"; diff --git a/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts b/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts index 44e578540dd..c9e2ffedeec 100644 --- a/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts +++ b/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts @@ -1,42 +1,38 @@ -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; +import { globalScene } from "#app/global-scene"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import type { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PokeballType } from "#enums/pokeball"; +import { Stat } from "#enums/stat"; +import type { EnemyPokemon, Pokemon } from "#field/pokemon"; +import { BerryModifier } from "#modifiers/modifier"; +import { PokemonMove } from "#moves/pokemon-move"; +import { queueEncounterMessage } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; import { getRandomEncounterSpecies, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterExp, setEncounterRewards, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { CHARMING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups"; -import type Pokemon from "#app/field/pokemon"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { - MoveRequirement, - PersistentModifierRequirement, -} from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +} from "#mystery-encounters/encounter-phase-utils"; import { catchPokemon, getHighestLevelPlayerPokemon, getSpriteKeysFromPokemon, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import PokemonData from "#app/system/pokemon-data"; -import { isNullOrUndefined, randSeedInt } from "#app/utils/common"; -import type { MoveId } from "#enums/move-id"; -import { BattlerIndex } from "#enums/battler-index"; -import { PokeballType } from "#enums/pokeball"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { BerryModifier } from "#app/modifier/modifier"; -import { Stat } from "#enums/stat"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; -import { MoveUseMode } from "#enums/move-use-mode"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import { MoveRequirement, PersistentModifierRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { CHARMING_MOVES } from "#mystery-encounters/requirement-groups"; +import { PokemonData } from "#system/pokemon-data"; +import { isNullOrUndefined, randSeedInt } from "#utils/common"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/uncommonBreed"; diff --git a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts index 9739f71cb0f..1164d2ca7ca 100644 --- a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts +++ b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts @@ -1,48 +1,46 @@ -import { PokemonType } from "#enums/pokemon-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; -import type { EnemyPartyConfig, EnemyPokemonConfig } from "../utils/encounter-phase-utils"; +import { allSpecies, modifierTypes } from "#data/data-lists"; +import { getLevelTotalExp } from "#data/exp"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { Challenges } from "#enums/challenges"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { PartyMemberStrength } from "#enums/party-member-strength"; +import { PlayerGender } from "#enums/player-gender"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { TrainerType } from "#enums/trainer-type"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { PokemonHeldItemModifier } from "#modifiers/modifier"; +import { HiddenAbilityRateBoosterModifier, PokemonFormChangeItemModifier } from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { EnemyPartyConfig, EnemyPokemonConfig } from "#mystery-encounters/encounter-phase-utils"; import { generateModifierType, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterRewards, -} from "../utils/encounter-phase-utils"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { NumberHolder, isNullOrUndefined, randSeedInt, randSeedShuffle } from "#app/utils/common"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { allSpecies } from "#app/data/data-lists"; -import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { HiddenAbilityRateBoosterModifier, PokemonFormChangeItemModifier } from "#app/modifier/modifier"; -import { achvs } from "#app/system/achv"; -import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import i18next from "#app/plugins/i18n"; +} from "#mystery-encounters/encounter-phase-utils"; import { doPokemonTransformationSequence, TransformationScreenPosition, -} from "#app/data/mystery-encounters/utils/encounter-transformation-sequence"; -import { getLevelTotalExp } from "#app/data/exp"; -import { Challenges } from "#enums/challenges"; -import { ModifierTier } from "#enums/modifier-tier"; -import { PlayerGender } from "#enums/player-gender"; -import { TrainerType } from "#enums/trainer-type"; -import PokemonData from "#app/system/pokemon-data"; -import { Nature } from "#enums/nature"; -import type HeldModifierConfig from "#app/@types/held-modifier-config"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { TrainerPartyTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { PartyMemberStrength } from "#enums/party-member-strength"; +} from "#mystery-encounters/encounter-transformation-sequence"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; +import i18next from "#plugins/i18n"; +import { achvs } from "#system/achv"; +import { PokemonData } from "#system/pokemon-data"; +import { trainerConfigs } from "#trainers/trainer-config"; +import { TrainerPartyTemplate } from "#trainers/trainer-party-template"; +import type { HeldModifierConfig } from "#types/held-modifier-config"; +import { isNullOrUndefined, NumberHolder, randSeedInt, randSeedShuffle } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** i18n namespace for encounter */ const namespace = "mysteryEncounters/weirdDream"; @@ -307,6 +305,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit // One random pokemon will get its passive unlocked const passiveDisabledPokemon = globalScene.getPlayerParty().filter(p => !p.passive); if (passiveDisabledPokemon?.length > 0) { + // TODO: should this use `randSeedItem`? const enablePassiveMon = passiveDisabledPokemon[randSeedInt(passiveDisabledPokemon.length)]; enablePassiveMon.passive = true; enablePassiveMon.updateInfo(true); @@ -468,6 +467,7 @@ async function doNewTeamPostProcess(transformations: PokemonTransformation[]) { // One random pokemon will get its passive unlocked const passiveDisabledPokemon = globalScene.getPlayerParty().filter(p => !p.passive); if (passiveDisabledPokemon?.length > 0) { + // TODO: should this use `randSeedItem`? const enablePassiveMon = passiveDisabledPokemon[randSeedInt(passiveDisabledPokemon.length)]; enablePassiveMon.passive = true; await enablePassiveMon.updateInfo(true); diff --git a/src/data/mystery-encounters/mystery-encounter-dialogue.ts b/src/data/mystery-encounters/mystery-encounter-dialogue.ts index 71e1b382f61..42383940755 100644 --- a/src/data/mystery-encounters/mystery-encounter-dialogue.ts +++ b/src/data/mystery-encounters/mystery-encounter-dialogue.ts @@ -1,4 +1,4 @@ -import type { TextStyle } from "#app/ui/text"; +import type { TextStyle } from "#ui/text"; export class TextDisplay { speaker?: string; @@ -67,7 +67,7 @@ export class EncounterOptionsDialogue { } * */ -export default class MysteryEncounterDialogue { +export class MysteryEncounterDialogue { intro?: TextDisplay[]; encounterOptionsDialogue?: EncounterOptionsDialogue; outro?: TextDisplay[]; diff --git a/src/data/mystery-encounters/mystery-encounter-option.ts b/src/data/mystery-encounters/mystery-encounter-option.ts index 53b53392bb8..504310eeabd 100644 --- a/src/data/mystery-encounters/mystery-encounter-option.ts +++ b/src/data/mystery-encounters/mystery-encounter-option.ts @@ -1,19 +1,18 @@ -import type { OptionTextDisplay } from "#app/data/mystery-encounters/mystery-encounter-dialogue"; -import type { MoveId } from "#enums/move-id"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; import { globalScene } from "#app/global-scene"; +import type { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import type { PokemonType } from "#enums/pokemon-type"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { CanLearnMoveRequirementOptions } from "#mystery-encounters/can-learn-move-requirement"; +import { CanLearnMoveRequirement } from "#mystery-encounters/can-learn-move-requirement"; +import type { OptionTextDisplay } from "#mystery-encounters/mystery-encounter-dialogue"; import { EncounterPokemonRequirement, EncounterSceneRequirement, MoneyRequirement, TypeRequirement, -} from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import type { CanLearnMoveRequirementOptions } from "./requirements/can-learn-move-requirement"; -import { CanLearnMoveRequirement } from "./requirements/can-learn-move-requirement"; -import { isNullOrUndefined, randSeedInt } from "#app/utils/common"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +} from "#mystery-encounters/mystery-encounter-requirements"; +import { isNullOrUndefined, randSeedInt } from "#utils/common"; // biome-ignore lint/suspicious/noConfusingVoidType: void unions in callbacks are OK export type OptionPhaseCallback = () => Promise; @@ -39,7 +38,7 @@ export interface IMysteryEncounterOption { onPostOptionPhase?: OptionPhaseCallback; } -export default class MysteryEncounterOption implements IMysteryEncounterOption { +export class MysteryEncounterOption implements IMysteryEncounterOption { optionMode: MysteryEncounterOptionMode; hasDexProgress: boolean; requirements: EncounterSceneRequirement[]; @@ -145,11 +144,13 @@ export default class MysteryEncounterOption implements IMysteryEncounterOption { } if (truePrimaryPool.length > 0) { // always choose from the non-overlapping pokemon first + // TODO: should this use `randSeedItem`? this.primaryPokemon = truePrimaryPool[randSeedInt(truePrimaryPool.length)]; return true; } // if there are multiple overlapping pokemon, we're okay - just choose one and take it out of the supporting pokemon pool if (overlap.length > 1 || this.secondaryPokemon.length - overlap.length >= 1) { + // TODO: should this use `randSeedItem`? this.primaryPokemon = overlap[randSeedInt(overlap.length)]; this.secondaryPokemon = this.secondaryPokemon.filter(supp => supp !== this.primaryPokemon); return true; diff --git a/src/data/mystery-encounters/mystery-encounter-requirements.ts b/src/data/mystery-encounters/mystery-encounter-requirements.ts index 07fd155b2b2..d71964db4b8 100644 --- a/src/data/mystery-encounters/mystery-encounter-requirements.ts +++ b/src/data/mystery-encounters/mystery-encounter-requirements.ts @@ -1,21 +1,21 @@ import { globalScene } from "#app/global-scene"; -import { allAbilities } from "../data-lists"; -import { Nature } from "#enums/nature"; -import { pokemonFormChanges } from "#app/data/pokemon-forms"; -import { SpeciesFormChangeItemTrigger } from "../pokemon-forms/form-change-triggers"; -import { FormChangeItem } from "#enums/form-change-item"; -import { StatusEffect } from "#enums/status-effect"; -import { PokemonType } from "#enums/pokemon-type"; -import { WeatherType } from "#enums/weather-type"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import { AttackTypeBoosterModifier } from "#app/modifier/modifier"; -import type { AttackTypeBoosterModifierType } from "#app/modifier/modifier-type"; -import { coerceArray, isNullOrUndefined } from "#app/utils/common"; +import { allAbilities } from "#data/data-lists"; +import { SpeciesFormChangeItemTrigger } from "#data/form-change-triggers"; +import { pokemonFormChanges } from "#data/pokemon-forms"; import type { AbilityId } from "#enums/ability-id"; +import { FormChangeItem } from "#enums/form-change-item"; import { MoveId } from "#enums/move-id"; import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; import { TimeOfDay } from "#enums/time-of-day"; +import { WeatherType } from "#enums/weather-type"; +import type { PlayerPokemon } from "#field/pokemon"; +import { AttackTypeBoosterModifier } from "#modifiers/modifier"; +import type { AttackTypeBoosterModifierType } from "#modifiers/modifier-type"; +import { coerceArray, isNullOrUndefined } from "#utils/common"; export interface EncounterRequirement { meetsRequirement(): boolean; // Boolean to see if a requirement is met diff --git a/src/data/mystery-encounters/mystery-encounter-save-data.ts b/src/data/mystery-encounters/mystery-encounter-save-data.ts index 20c10c7c5b9..f04abccba5f 100644 --- a/src/data/mystery-encounters/mystery-encounter-save-data.ts +++ b/src/data/mystery-encounters/mystery-encounter-save-data.ts @@ -1,7 +1,7 @@ -import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT } from "#app/constants"; -import { isNullOrUndefined } from "#app/utils/common"; import type { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { isNullOrUndefined } from "#utils/common"; export class SeenEncounterData { type: MysteryEncounterType; diff --git a/src/data/mystery-encounters/mystery-encounter.ts b/src/data/mystery-encounters/mystery-encounter.ts index fa97a7f4d40..a2ca2b20ce7 100644 --- a/src/data/mystery-encounters/mystery-encounter.ts +++ b/src/data/mystery-encounters/mystery-encounter.ts @@ -1,18 +1,22 @@ -import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { PokemonMove } from "../moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; -import { capitalizeFirstLetter, coerceArray, isNullOrUndefined } from "#app/utils/common"; +import { globalScene } from "#app/global-scene"; +import type { BattlerIndex } from "#enums/battler-index"; +import type { Challenges } from "#enums/challenges"; +import type { EncounterAnim } from "#enums/encounter-anims"; +import type { GameModes } from "#enums/game-modes"; +import type { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import type { MysteryEncounterSpriteConfig } from "#app/field/mystery-encounter-intro"; -import MysteryEncounterIntroVisuals from "#app/field/mystery-encounter-intro"; -import { randSeedInt } from "#app/utils/common"; import type { StatusEffect } from "#enums/status-effect"; -import type { OptionTextDisplay } from "./mystery-encounter-dialogue"; -import type MysteryEncounterDialogue from "./mystery-encounter-dialogue"; -import type { OptionPhaseCallback } from "./mystery-encounter-option"; -import type MysteryEncounterOption from "./mystery-encounter-option"; -import { MysteryEncounterOptionBuilder } from "./mystery-encounter-option"; +import type { MysteryEncounterSpriteConfig } from "#field/mystery-encounter-intro"; +import { MysteryEncounterIntroVisuals } from "#field/mystery-encounter-intro"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { PokemonMove } from "#moves/pokemon-move"; +import type { EnemyPartyConfig } from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounterDialogue, OptionTextDisplay } from "#mystery-encounters/mystery-encounter-dialogue"; +import type { MysteryEncounterOption, OptionPhaseCallback } from "#mystery-encounters/mystery-encounter-option"; +import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; import { EncounterPokemonRequirement, EncounterSceneRequirement, @@ -20,16 +24,8 @@ import { PartySizeRequirement, StatusEffectRequirement, WaveRangeRequirement, -} from "./mystery-encounter-requirements"; -import type { BattlerIndex } from "#enums/battler-index"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import type { GameModes } from "#enums/game-modes"; -import type { EncounterAnim } from "#enums/encounter-anims"; -import type { Challenges } from "#enums/challenges"; -import { globalScene } from "#app/global-scene"; -import type { MoveUseMode } from "#enums/move-use-mode"; +} from "#mystery-encounters/mystery-encounter-requirements"; +import { capitalizeFirstLetter, coerceArray, isNullOrUndefined, randSeedInt } from "#utils/common"; export interface EncounterStartOfBattleEffect { sourcePokemon?: Pokemon; @@ -91,7 +87,7 @@ export interface IMysteryEncounter { * These objects will be saved as part of session data any time the player is on a floor with an encounter * Unless you know what you're doing, you should use MysteryEncounterBuilder to create an instance for this class */ -export default class MysteryEncounter implements IMysteryEncounter { +export class MysteryEncounter implements IMysteryEncounter { // #region Required params encounterType: MysteryEncounterType; @@ -385,6 +381,7 @@ export default class MysteryEncounter implements IMysteryEncounter { // If there are multiple overlapping pokemon, we're okay - just choose one and take it out of the primary pokemon pool if (overlap.length > 1 || this.secondaryPokemon.length - overlap.length >= 1) { // is this working? + // TODO: should this use `randSeedItem`? this.primaryPokemon = overlap[randSeedInt(overlap.length, 0)]; this.secondaryPokemon = this.secondaryPokemon.filter(supp => supp !== this.primaryPokemon); return true; @@ -395,6 +392,7 @@ export default class MysteryEncounter implements IMysteryEncounter { return false; } // this means we CAN have the same pokemon be a primary and secondary pokemon, so just choose any qualifying one randomly. + // TODO: should this use `randSeedItem`? this.primaryPokemon = qualified[randSeedInt(qualified.length, 0)]; return true; } diff --git a/src/data/mystery-encounters/mystery-encounters.ts b/src/data/mystery-encounters/mystery-encounters.ts index 5ee289a6c56..34eac5cab94 100644 --- a/src/data/mystery-encounters/mystery-encounters.ts +++ b/src/data/mystery-encounters/mystery-encounters.ts @@ -1,38 +1,38 @@ +import { getBiomeName } from "#balance/biomes"; import { BiomeId } from "#enums/biome-id"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { DarkDealEncounter } from "./encounters/dark-deal-encounter"; -import { DepartmentStoreSaleEncounter } from "./encounters/department-store-sale-encounter"; -import { FieldTripEncounter } from "./encounters/field-trip-encounter"; -import { FightOrFlightEncounter } from "./encounters/fight-or-flight-encounter"; -import { LostAtSeaEncounter } from "./encounters/lost-at-sea-encounter"; -import { MysteriousChallengersEncounter } from "./encounters/mysterious-challengers-encounter"; -import { MysteriousChestEncounter } from "./encounters/mysterious-chest-encounter"; -import { ShadyVitaminDealerEncounter } from "./encounters/shady-vitamin-dealer-encounter"; -import { SlumberingSnorlaxEncounter } from "./encounters/slumbering-snorlax-encounter"; -import { TrainingSessionEncounter } from "./encounters/training-session-encounter"; -import type MysteryEncounter from "./mystery-encounter"; -import { SafariZoneEncounter } from "#app/data/mystery-encounters/encounters/safari-zone-encounter"; -import { FieryFalloutEncounter } from "#app/data/mystery-encounters/encounters/fiery-fallout-encounter"; -import { TheStrongStuffEncounter } from "#app/data/mystery-encounters/encounters/the-strong-stuff-encounter"; -import { ThePokemonSalesmanEncounter } from "#app/data/mystery-encounters/encounters/the-pokemon-salesman-encounter"; -import { AnOfferYouCantRefuseEncounter } from "#app/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter"; -import { DelibirdyEncounter } from "#app/data/mystery-encounters/encounters/delibirdy-encounter"; -import { AbsoluteAvariceEncounter } from "#app/data/mystery-encounters/encounters/absolute-avarice-encounter"; -import { ATrainersTestEncounter } from "#app/data/mystery-encounters/encounters/a-trainers-test-encounter"; -import { TrashToTreasureEncounter } from "#app/data/mystery-encounters/encounters/trash-to-treasure-encounter"; -import { BerriesAboundEncounter } from "#app/data/mystery-encounters/encounters/berries-abound-encounter"; -import { ClowningAroundEncounter } from "#app/data/mystery-encounters/encounters/clowning-around-encounter"; -import { PartTimerEncounter } from "#app/data/mystery-encounters/encounters/part-timer-encounter"; -import { DancingLessonsEncounter } from "#app/data/mystery-encounters/encounters/dancing-lessons-encounter"; -import { WeirdDreamEncounter } from "#app/data/mystery-encounters/encounters/weird-dream-encounter"; -import { TheWinstrateChallengeEncounter } from "#app/data/mystery-encounters/encounters/the-winstrate-challenge-encounter"; -import { TeleportingHijinksEncounter } from "#app/data/mystery-encounters/encounters/teleporting-hijinks-encounter"; -import { BugTypeSuperfanEncounter } from "#app/data/mystery-encounters/encounters/bug-type-superfan-encounter"; -import { FunAndGamesEncounter } from "#app/data/mystery-encounters/encounters/fun-and-games-encounter"; -import { UncommonBreedEncounter } from "#app/data/mystery-encounters/encounters/uncommon-breed-encounter"; -import { GlobalTradeSystemEncounter } from "#app/data/mystery-encounters/encounters/global-trade-system-encounter"; -import { TheExpertPokemonBreederEncounter } from "#app/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter"; -import { getBiomeName } from "#app/data/balance/biomes"; +import { ATrainersTestEncounter } from "#mystery-encounters/a-trainers-test-encounter"; +import { AbsoluteAvariceEncounter } from "#mystery-encounters/absolute-avarice-encounter"; +import { AnOfferYouCantRefuseEncounter } from "#mystery-encounters/an-offer-you-cant-refuse-encounter"; +import { BerriesAboundEncounter } from "#mystery-encounters/berries-abound-encounter"; +import { BugTypeSuperfanEncounter } from "#mystery-encounters/bug-type-superfan-encounter"; +import { ClowningAroundEncounter } from "#mystery-encounters/clowning-around-encounter"; +import { DancingLessonsEncounter } from "#mystery-encounters/dancing-lessons-encounter"; +import { DarkDealEncounter } from "#mystery-encounters/dark-deal-encounter"; +import { DelibirdyEncounter } from "#mystery-encounters/delibirdy-encounter"; +import { DepartmentStoreSaleEncounter } from "#mystery-encounters/department-store-sale-encounter"; +import { FieldTripEncounter } from "#mystery-encounters/field-trip-encounter"; +import { FieryFalloutEncounter } from "#mystery-encounters/fiery-fallout-encounter"; +import { FightOrFlightEncounter } from "#mystery-encounters/fight-or-flight-encounter"; +import { FunAndGamesEncounter } from "#mystery-encounters/fun-and-games-encounter"; +import { GlobalTradeSystemEncounter } from "#mystery-encounters/global-trade-system-encounter"; +import { LostAtSeaEncounter } from "#mystery-encounters/lost-at-sea-encounter"; +import { MysteriousChallengersEncounter } from "#mystery-encounters/mysterious-challengers-encounter"; +import { MysteriousChestEncounter } from "#mystery-encounters/mysterious-chest-encounter"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { PartTimerEncounter } from "#mystery-encounters/part-timer-encounter"; +import { SafariZoneEncounter } from "#mystery-encounters/safari-zone-encounter"; +import { ShadyVitaminDealerEncounter } from "#mystery-encounters/shady-vitamin-dealer-encounter"; +import { SlumberingSnorlaxEncounter } from "#mystery-encounters/slumbering-snorlax-encounter"; +import { TeleportingHijinksEncounter } from "#mystery-encounters/teleporting-hijinks-encounter"; +import { TheExpertPokemonBreederEncounter } from "#mystery-encounters/the-expert-pokemon-breeder-encounter"; +import { ThePokemonSalesmanEncounter } from "#mystery-encounters/the-pokemon-salesman-encounter"; +import { TheStrongStuffEncounter } from "#mystery-encounters/the-strong-stuff-encounter"; +import { TheWinstrateChallengeEncounter } from "#mystery-encounters/the-winstrate-challenge-encounter"; +import { TrainingSessionEncounter } from "#mystery-encounters/training-session-encounter"; +import { TrashToTreasureEncounter } from "#mystery-encounters/trash-to-treasure-encounter"; +import { UncommonBreedEncounter } from "#mystery-encounters/uncommon-breed-encounter"; +import { WeirdDreamEncounter } from "#mystery-encounters/weird-dream-encounter"; export const EXTREME_ENCOUNTER_BIOMES = [ BiomeId.SEA, diff --git a/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts b/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts index 0123ea7d6ba..26602b8ae31 100644 --- a/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts +++ b/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts @@ -1,9 +1,9 @@ -import type { MoveId } from "#enums/move-id"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { coerceArray, isNullOrUndefined } from "#app/utils/common"; -import { EncounterPokemonRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { globalScene } from "#app/global-scene"; +import type { MoveId } from "#enums/move-id"; +import type { PlayerPokemon } from "#field/pokemon"; +import { PokemonMove } from "#moves/pokemon-move"; +import { EncounterPokemonRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import { coerceArray, isNullOrUndefined } from "#utils/common"; /** * {@linkcode CanLearnMoveRequirement} options diff --git a/src/data/mystery-encounters/requirements/requirement-groups.ts b/src/data/mystery-encounters/requirements/requirement-groups.ts index 0140a5fe320..8981dfe173c 100644 --- a/src/data/mystery-encounters/requirements/requirement-groups.ts +++ b/src/data/mystery-encounters/requirements/requirement-groups.ts @@ -1,5 +1,5 @@ -import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; /** * Moves that "steal" things diff --git a/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts b/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts index e1055f57496..4f4af94a88d 100644 --- a/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts @@ -1,8 +1,8 @@ import { globalScene } from "#app/global-scene"; -import type { TextStyle } from "#app/ui/text"; -import { getTextWithColors } from "#app/ui/text"; import { UiTheme } from "#enums/ui-theme"; -import { isNullOrUndefined } from "#app/utils/common"; +import type { TextStyle } from "#ui/text"; +import { getTextWithColors } from "#ui/text"; +import { isNullOrUndefined } from "#utils/common"; import i18next from "i18next"; /** diff --git a/src/data/mystery-encounters/utils/encounter-phase-utils.ts b/src/data/mystery-encounters/utils/encounter-phase-utils.ts index bd2dfa998f4..6b085978b27 100644 --- a/src/data/mystery-encounters/utils/encounter-phase-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-phase-utils.ts @@ -1,58 +1,57 @@ -import type Battle from "#app/battle"; -import { BattleType } from "#enums/battle-type"; -import { biomeLinks, BiomePoolTier } from "#app/data/balance/biomes"; -import type MysteryEncounterOption from "#app/data/mystery-encounters/mystery-encounter-option"; +import type { Battle } from "#app/battle"; import { AVERAGE_ENCOUNTERS_PER_RUN_TARGET, WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/constants"; -import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import type { PlayerPokemon } from "#app/field/pokemon"; +import { timedEventManager } from "#app/global-event-manager"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { BiomePoolTier, biomeLinks } from "#balance/biomes"; +import { initMoveAnim, loadMoveAnimAssets } from "#data/battle-anims"; +import { modifierTypes } from "#data/data-lists"; +import type { IEggOptions } from "#data/egg"; +import { Egg } from "#data/egg"; +import type { Gender } from "#data/gender"; +import { getNatureName } from "#data/nature"; +import type { CustomPokemonData } from "#data/pokemon-data"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { Status } from "#data/status-effect"; import type { AiType } from "#enums/ai-type"; -import type Pokemon from "#app/field/pokemon"; -import { EnemyPokemon } from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; +import { BattleType } from "#enums/battle-type"; +import type { BattlerTagType } from "#enums/battler-tag-type"; +import { BiomeId } from "#enums/biome-id"; import { FieldPosition } from "#enums/field-position"; -import type { CustomModifierSettings, ModifierType } from "#app/modifier/modifier-type"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import type { MoveId } from "#enums/move-id"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import type { Nature } from "#enums/nature"; +import { PokemonType } from "#enums/pokemon-type"; +import { StatusEffect } from "#enums/status-effect"; +import { TrainerSlot } from "#enums/trainer-slot"; +import type { TrainerType } from "#enums/trainer-type"; +import { TrainerVariant } from "#enums/trainer-variant"; +import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { EnemyPokemon } from "#field/pokemon"; +import { Trainer } from "#field/trainer"; +import type { CustomModifierSettings, ModifierType } from "#modifiers/modifier-type"; import { getPartyLuckValue, ModifierTypeGenerator, ModifierTypeOption, regenerateModifierPoolThresholds, -} from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import type PokemonData from "#app/system/pokemon-data"; -import type { OptionSelectConfig, OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import type { PartyOption, PokemonSelectFilter } from "#app/ui/party-ui-handler"; -import { PartyUiMode } from "#app/ui/party-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { isNullOrUndefined, randSeedInt, randomString, randSeedItem, coerceArray } from "#app/utils/common"; -import type { BattlerTagType } from "#enums/battler-tag-type"; -import { BiomeId } from "#enums/biome-id"; -import type { TrainerType } from "#enums/trainer-type"; +} from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { showEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { MysteryEncounterOption } from "#mystery-encounters/mystery-encounter-option"; +import type { Variant } from "#sprites/variant"; +import type { PokemonData } from "#system/pokemon-data"; +import type { TrainerConfig } from "#trainers/trainer-config"; +import { trainerConfigs } from "#trainers/trainer-config"; +import type { HeldModifierConfig } from "#types/held-modifier-config"; +import type { OptionSelectConfig, OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import type { PartyOption, PokemonSelectFilter } from "#ui/party-ui-handler"; +import { PartyUiMode } from "#ui/party-ui-handler"; +import { coerceArray, isNullOrUndefined, randomString, randSeedInt, randSeedItem } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import Trainer from "#app/field/trainer"; -import { TrainerVariant } from "#enums/trainer-variant"; -import type { Gender } from "#app/data/gender"; -import type { Nature } from "#enums/nature"; -import type { MoveId } from "#enums/move-id"; -import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import { Status } from "#app/data/status-effect"; -import type { TrainerConfig } from "#app/data/trainers/trainer-config"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { TrainerSlot } from "#enums/trainer-slot"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import type { IEggOptions } from "#app/data/egg"; -import { Egg } from "#app/data/egg"; -import type { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; -import type HeldModifierConfig from "#app/@types/held-modifier-config"; -import type { Variant } from "#app/sprites/variant"; -import { StatusEffect } from "#enums/status-effect"; -import { globalScene } from "#app/global-scene"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { PokemonType } from "#enums/pokemon-type"; -import { getNatureName } from "#app/data/nature"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { timedEventManager } from "#app/global-event-manager"; /** * Animates exclamation sprite over trainer's head at start of encounter @@ -1099,8 +1098,10 @@ export function calculateMEAggregateStats(baseSpawnWeight: number) { if (biomes! && biomes.length > 0) { const specialBiomes = biomes.filter(b => alwaysPickTheseBiomes.includes(b)); if (specialBiomes.length > 0) { + // TODO: should this use `randSeedItem`? currentBiome = specialBiomes[randSeedInt(specialBiomes.length)]; } else { + // TODO: should this use `randSeedItem`? currentBiome = biomes[randSeedInt(biomes.length)]; } } diff --git a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts index 53088043777..e4211baa78a 100644 --- a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts @@ -1,42 +1,41 @@ import { globalScene } from "#app/global-scene"; -import i18next from "i18next"; -import { isNullOrUndefined, randSeedInt } from "#app/utils/common"; -import { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { speciesStarterCosts } from "#balance/starters"; +import { modifierTypes } from "#data/data-lists"; +import { Gender } from "#data/gender"; import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, -} from "#app/data/pokeball"; +} from "#data/pokeball"; +import { CustomPokemonData } from "#data/pokemon-data"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { getStatusEffectCatchRateMultiplier } from "#data/status-effect"; +import type { AbilityId } from "#enums/ability-id"; import { PlayerGender } from "#enums/player-gender"; -import { addPokeballCaptureStars, addPokeballOpenParticles } from "#app/field/anims"; -import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect"; -import { achvs } from "#app/system/achv"; -import { UiMode } from "#enums/ui-mode"; -import type { PartyOption } from "#app/ui/party-ui-handler"; -import { PartyUiMode } from "#app/ui/party-ui-handler"; -import { SpeciesId } from "#enums/species-id"; +import type { PokeballType } from "#enums/pokeball"; import type { PokemonType } from "#enums/pokemon-type"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; +import { SpeciesId } from "#enums/species-id"; +import type { PermanentStat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { UiMode } from "#enums/ui-mode"; +import { addPokeballCaptureStars, addPokeballOpenParticles } from "#field/anims"; +import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon"; +import { PokemonHeldItemModifier } from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; import { getEncounterText, queueEncounterMessage, showEncounterText, -} from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { getPokemonNameWithAffix } from "#app/messages"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { Gender } from "#app/data/gender"; -import type { PermanentStat } from "#enums/stat"; -import { SummaryUiMode } from "#app/ui/summary-ui-handler"; -import { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; -import type { AbilityId } from "#enums/ability-id"; -import type { PokeballType } from "#enums/pokeball"; -import { StatusEffect } from "#enums/status-effect"; +} from "#mystery-encounters/encounter-dialogue-utils"; +import { achvs } from "#system/achv"; +import type { PartyOption } from "#ui/party-ui-handler"; +import { PartyUiMode } from "#ui/party-ui-handler"; +import { SummaryUiMode } from "#ui/summary-ui-handler"; +import { isNullOrUndefined, randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; /** Will give +1 level every 10 waves */ export const STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER = 1; @@ -111,20 +110,24 @@ export function getRandomPlayerPokemon( // If there is only 1 legal/unfainted mon left, select from fainted legal mons const faintedLegalMons = party.filter(p => (!isAllowed || p.isAllowedInChallenge()) && p.isFainted()); if (faintedLegalMons.length > 0) { + // TODO: should this use `randSeedItem`? chosenIndex = randSeedInt(faintedLegalMons.length); chosenPokemon = faintedLegalMons[chosenIndex]; } } if (!chosenPokemon && fullyLegalMons.length > 0) { + // TODO: should this use `randSeedItem`? chosenIndex = randSeedInt(fullyLegalMons.length); chosenPokemon = fullyLegalMons[chosenIndex]; } if (!chosenPokemon && isAllowed && allowedOnlyMons.length > 0) { + // TODO: should this use `randSeedItem`? chosenIndex = randSeedInt(allowedOnlyMons.length); chosenPokemon = allowedOnlyMons[chosenIndex]; } if (!chosenPokemon) { // If no other options worked, returns fully random + // TODO: should this use `randSeedItem`? chosenIndex = randSeedInt(party.length); chosenPokemon = party[chosenIndex]; } @@ -518,7 +521,7 @@ export function trainerThrowPokeball( repeatDelay: 500, onUpdate: t => { if (shakeCount && shakeCount < 4) { - const value = t.getValue(); + const value = t.getValue() ?? 0; const directionMultiplier = shakeCount % 2 === 1 ? 1 : -1; pokeball.setX(pbX + value * 4 * directionMultiplier); pokeball.setAngle(value * 27.5 * directionMultiplier); diff --git a/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts b/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts index ebef47eac2d..718d97c0875 100644 --- a/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts +++ b/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts @@ -1,8 +1,8 @@ -import type { PlayerPokemon } from "#app/field/pokemon"; -import { getFrameMs } from "#app/utils/common"; -import { cos, sin } from "#app/field/anims"; -import { getTypeRgb } from "#app/data/type"; import { globalScene } from "#app/global-scene"; +import { getTypeRgb } from "#data/type"; +import { cos, sin } from "#field/anims"; +import type { PlayerPokemon } from "#field/pokemon"; +import { getFrameMs } from "#utils/common"; export enum TransformationScreenPosition { CENTER, @@ -127,7 +127,7 @@ export function doPokemonTransformationSequence( to: 1, duration: 1000, onUpdate: t => { - pokemonTintSprite.setAlpha(t.getValue()); + pokemonTintSprite.setAlpha(t.getValue() ?? 1); }, onComplete: () => { pokemonSprite.setVisible(false); diff --git a/src/data/nature.ts b/src/data/nature.ts index 83b3ee7538d..4f4e627daf3 100644 --- a/src/data/nature.ts +++ b/src/data/nature.ts @@ -1,9 +1,9 @@ -import { toReadableString } from "#app/utils/common"; -import { TextStyle, getBBCodeFrag } from "../ui/text"; import { Nature } from "#enums/nature"; +import { EFFECTIVE_STATS, getShortenedStatKey, Stat } from "#enums/stat"; import { UiTheme } from "#enums/ui-theme"; +import { getBBCodeFrag, TextStyle } from "#ui/text"; +import { toReadableString } from "#utils/common"; import i18next from "i18next"; -import { Stat, EFFECTIVE_STATS, getShortenedStatKey } from "#enums/stat"; export function getNatureName( nature: Nature, diff --git a/src/data/phase-priority-queue.ts b/src/data/phase-priority-queue.ts index b815a6ac34f..88361b0f4fa 100644 --- a/src/data/phase-priority-queue.ts +++ b/src/data/phase-priority-queue.ts @@ -1,12 +1,12 @@ import { globalScene } from "#app/global-scene"; import type { Phase } from "#app/phase"; -import { ActivatePriorityQueuePhase } from "#app/phases/activate-priority-queue-phase"; -import type { PostSummonPhase } from "#app/phases/post-summon-phase"; -import { PostSummonActivateAbilityPhase } from "#app/phases/post-summon-activate-ability-phase"; -import { Stat } from "#enums/stat"; -import { BooleanHolder } from "#app/utils/common"; -import { TrickRoomTag } from "#app/data/arena-tag"; +import { TrickRoomTag } from "#data/arena-tag"; import { DynamicPhaseType } from "#enums/dynamic-phase-type"; +import { Stat } from "#enums/stat"; +import { ActivatePriorityQueuePhase } from "#phases/activate-priority-queue-phase"; +import { PostSummonActivateAbilityPhase } from "#phases/post-summon-activate-ability-phase"; +import type { PostSummonPhase } from "#phases/post-summon-phase"; +import { BooleanHolder } from "#utils/common"; /** * Stores a list of {@linkcode Phase}s diff --git a/src/data/pokeball.ts b/src/data/pokeball.ts index a479fd8068a..50ea5076aee 100644 --- a/src/data/pokeball.ts +++ b/src/data/pokeball.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import { NumberHolder } from "#app/utils/common"; import { PokeballType } from "#enums/pokeball"; +import { NumberHolder } from "#utils/common"; import i18next from "i18next"; export const MAX_PER_TYPE_POKEBALLS: number = 99; diff --git a/src/data/pokemon-forms.ts b/src/data/pokemon-forms.ts index ea129454034..6d1db296e55 100644 --- a/src/data/pokemon-forms.ts +++ b/src/data/pokemon-forms.ts @@ -1,14 +1,5 @@ -import type Pokemon from "../field/pokemon"; -import { allMoves } from "./data-lists"; -import { MoveCategory } from "#enums/MoveCategory"; -import type { Constructor, nil } from "#app/utils/common"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { WeatherType } from "#enums/weather-type"; -import { SpeciesFormKey } from "#enums/species-form-key"; import { globalScene } from "#app/global-scene"; -import { FormChangeItem } from "#enums/form-change-item"; +import { allMoves } from "#data/data-lists"; import { MeloettaFormChangePostMoveTrigger, SpeciesDefaultFormMatchTrigger, @@ -24,7 +15,16 @@ import { SpeciesFormChangeTeraTrigger, type SpeciesFormChangeTrigger, SpeciesFormChangeWeatherTrigger, -} from "./pokemon-forms/form-change-triggers"; +} from "#data/form-change-triggers"; +import { AbilityId } from "#enums/ability-id"; +import { FormChangeItem } from "#enums/form-change-item"; +import { MoveCategory } from "#enums/MoveCategory"; +import { MoveId } from "#enums/move-id"; +import { SpeciesFormKey } from "#enums/species-form-key"; +import { SpeciesId } from "#enums/species-id"; +import { WeatherType } from "#enums/weather-type"; +import type { Pokemon } from "#field/pokemon"; +import type { Constructor, nil } from "#utils/common"; export type SpeciesFormChangeConditionPredicate = (p: Pokemon) => boolean; export type SpeciesFormChangeConditionEnforceFunc = (p: Pokemon) => void; diff --git a/src/data/pokemon-forms/form-change-triggers.ts b/src/data/pokemon-forms/form-change-triggers.ts index 3726781d9e3..75734bf085b 100644 --- a/src/data/pokemon-forms/form-change-triggers.ts +++ b/src/data/pokemon-forms/form-change-triggers.ts @@ -1,18 +1,18 @@ -import i18next from "i18next"; -import { coerceArray, type Constructor } from "#app/utils/common"; -import type { TimeOfDay } from "#enums/time-of-day"; -import type Pokemon from "#app/field/pokemon"; -import type { SpeciesFormChange } from "#app/data/pokemon-forms"; -import type { PokemonFormChangeItemModifier } from "#app/modifier/modifier"; -import { getPokemonNameWithAffix } from "#app/messages"; import { globalScene } from "#app/global-scene"; -import { FormChangeItem } from "#enums/form-change-item"; +import { getPokemonNameWithAffix } from "#app/messages"; +import type { SpeciesFormChange } from "#data/pokemon-forms"; import { AbilityId } from "#enums/ability-id"; import { Challenges } from "#enums/challenges"; +import { FormChangeItem } from "#enums/form-change-item"; import { MoveId } from "#enums/move-id"; import { SpeciesFormKey } from "#enums/species-form-key"; import { StatusEffect } from "#enums/status-effect"; +import type { TimeOfDay } from "#enums/time-of-day"; import { WeatherType } from "#enums/weather-type"; +import type { Pokemon } from "#field/pokemon"; +import type { PokemonFormChangeItemModifier } from "#modifiers/modifier"; +import { type Constructor, coerceArray } from "#utils/common"; +import i18next from "i18next"; export abstract class SpeciesFormChangeTrigger { public description = ""; diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index d2a48495195..140b03e6d4c 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -1,49 +1,45 @@ -import type { Localizable } from "#app/@types/locales"; -import { AbilityId } from "#enums/ability-id"; -import { PartyMemberStrength } from "#enums/party-member-strength"; -import { SpeciesId } from "#enums/species-id"; -import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-color-utilities"; -import i18next from "i18next"; import type { AnySound } from "#app/battle-scene"; -import { globalScene } from "#app/global-scene"; import type { GameMode } from "#app/game-mode"; -import type { StarterMoveset } from "#app/system/game-data"; -import { DexAttr } from "#enums/dex-attr"; -import { - isNullOrUndefined, - capitalizeString, - randSeedInt, - randSeedGauss, - randSeedItem, - randSeedFloat, -} from "#app/utils/common"; -import { uncatchableSpecies } from "#app/data/balance/biomes"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { GrowthRate } from "#app/data/exp"; -import type { EvolutionLevel } from "#app/data/balance/pokemon-evolutions"; -import { - SpeciesWildEvolutionDelay, - pokemonEvolutions, - pokemonPrevolutions, -} from "#app/data/balance/pokemon-evolutions"; -import { PokemonType } from "#enums/pokemon-type"; -import type { LevelMoves } from "#app/data/balance/pokemon-level-moves"; +import { globalScene } from "#app/global-scene"; +import { uncatchableSpecies } from "#balance/biomes"; +import { speciesEggMoves } from "#balance/egg-moves"; +import { starterPassiveAbilities } from "#balance/passives"; +import type { EvolutionLevel } from "#balance/pokemon-evolutions"; +import { pokemonEvolutions, pokemonPrevolutions, SpeciesWildEvolutionDelay } from "#balance/pokemon-evolutions"; +import type { LevelMoves } from "#balance/pokemon-level-moves"; import { pokemonFormLevelMoves, pokemonFormLevelMoves as pokemonSpeciesFormLevelMoves, pokemonSpeciesLevelMoves, -} from "#app/data/balance/pokemon-level-moves"; -import type { Stat } from "#enums/stat"; -import type { Variant, VariantSet } from "#app/sprites/variant"; -import { populateVariantColorCache, variantColorCache, variantData } from "#app/sprites/variant"; -import { speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters"; +} from "#balance/pokemon-level-moves"; +import { POKERUS_STARTER_COUNT, speciesStarterCosts } from "#balance/starters"; +import { allSpecies } from "#data/data-lists"; +import { GrowthRate } from "#data/exp"; +import { Gender } from "#data/gender"; +import { AbilityId } from "#enums/ability-id"; +import { DexAttr } from "#enums/dex-attr"; +import { PartyMemberStrength } from "#enums/party-member-strength"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesFormKey } from "#enums/species-form-key"; -import { starterPassiveAbilities } from "#app/data/balance/passives"; -import { loadPokemonVariantAssets } from "#app/sprites/pokemon-sprite"; -import { hasExpSprite } from "#app/sprites/sprite-utils"; -import { Gender } from "./gender"; -import { allSpecies } from "#app/data/data-lists"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; +import { SpeciesId } from "#enums/species-id"; +import type { Stat } from "#enums/stat"; +import { loadPokemonVariantAssets } from "#sprites/pokemon-sprite"; +import { hasExpSprite } from "#sprites/sprite-utils"; +import type { Variant, VariantSet } from "#sprites/variant"; +import { populateVariantColorCache, variantColorCache, variantData } from "#sprites/variant"; +import type { StarterMoveset } from "#system/game-data"; +import type { Localizable } from "#types/locales"; +import { + capitalizeString, + isNullOrUndefined, + randSeedFloat, + randSeedGauss, + randSeedInt, + randSeedItem, +} from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { argbFromRgba, QuantizerCelebi, rgbaFromArgb } from "@material/material-color-utilities"; +import i18next from "i18next"; export enum Region { NORMAL, @@ -759,7 +755,7 @@ export abstract class PokemonSpeciesForm { } } -export default class PokemonSpecies extends PokemonSpeciesForm implements Localizable { +export class PokemonSpecies extends PokemonSpeciesForm implements Localizable { public name: string; readonly subLegendary: boolean; readonly legendary: boolean; diff --git a/src/data/pokemon/pokemon-data.ts b/src/data/pokemon/pokemon-data.ts index db60b4ce1b4..6ae86bed5e7 100644 --- a/src/data/pokemon/pokemon-data.ts +++ b/src/data/pokemon/pokemon-data.ts @@ -1,17 +1,17 @@ -import { type BattlerTag, loadBattlerTag } from "#app/data/battler-tags"; -import type { Gender } from "#app/data/gender"; -import type { PokemonSpeciesForm } from "#app/data/pokemon-species"; -import type { TypeDamageMultiplier } from "#app/data/type"; -import { isNullOrUndefined } from "#app/utils/common"; +import { type BattlerTag, loadBattlerTag } from "#data/battler-tags"; +import type { Gender } from "#data/gender"; +import { PokemonMove } from "#data/moves/pokemon-move"; +import type { PokemonSpeciesForm } from "#data/pokemon-species"; +import type { TypeDamageMultiplier } from "#data/type"; import type { AbilityId } from "#enums/ability-id"; import type { BerryType } from "#enums/berry-type"; import type { MoveId } from "#enums/move-id"; -import type { PokemonType } from "#enums/pokemon-type"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import type { TurnMove } from "#app/@types/turn-move"; -import type { AttackMoveResult } from "#app/@types/attack-move-result"; import type { Nature } from "#enums/nature"; -import type { IllusionData } from "#app/@types/illusion-data"; +import type { PokemonType } from "#enums/pokemon-type"; +import type { AttackMoveResult } from "#types/attack-move-result"; +import type { IllusionData } from "#types/illusion-data"; +import type { TurnMove } from "#types/turn-move"; +import { isNullOrUndefined } from "#utils/common"; /** * Permanent data that can customize a Pokemon in non-standard ways from its Species. diff --git a/src/data/status-effect.ts b/src/data/status-effect.ts index a90304c9f7d..211e265ccf6 100644 --- a/src/data/status-effect.ts +++ b/src/data/status-effect.ts @@ -1,5 +1,5 @@ -import { randIntRange } from "#app/utils/common"; import { StatusEffect } from "#enums/status-effect"; +import { randIntRange } from "#utils/common"; import type { ParseKeys } from "i18next"; import i18next from "i18next"; diff --git a/src/data/terrain.ts b/src/data/terrain.ts index bcb28558de6..f44fd4f35e7 100644 --- a/src/data/terrain.ts +++ b/src/data/terrain.ts @@ -1,9 +1,9 @@ -import type Pokemon from "../field/pokemon"; -import type Move from "./moves/move"; -import { PokemonType } from "#enums/pokemon-type"; -import type { BattlerIndex } from "#enums/battler-index"; -import i18next from "i18next"; import { getPokemonNameWithAffix } from "#app/messages"; +import type { BattlerIndex } from "#enums/battler-index"; +import { PokemonType } from "#enums/pokemon-type"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import i18next from "i18next"; export enum TerrainType { NONE, diff --git a/src/data/trainer-names.ts b/src/data/trainer-names.ts index 8714dad0fc9..6b882d1ddc1 100644 --- a/src/data/trainer-names.ts +++ b/src/data/trainer-names.ts @@ -1,5 +1,5 @@ import { TrainerType } from "#enums/trainer-type"; -import { toReadableString } from "#app/utils/common"; +import { toReadableString } from "#utils/common"; class TrainerNameConfig { public urls: string[]; diff --git a/src/data/trainers/evil-admin-trainer-pools.ts b/src/data/trainers/evil-admin-trainer-pools.ts index 74ee3e8cb3d..ad08a17d29f 100644 --- a/src/data/trainers/evil-admin-trainer-pools.ts +++ b/src/data/trainers/evil-admin-trainer-pools.ts @@ -1,6 +1,6 @@ -import type { TrainerTierPools } from "#app/@types/trainer-funcs"; -import { TrainerPoolTier } from "#enums/trainer-pool-tier"; import { SpeciesId } from "#enums/species-id"; +import { TrainerPoolTier } from "#enums/trainer-pool-tier"; +import type { TrainerTierPools } from "#types/trainer-funcs"; /** Team Rocket's admin trainer pool. */ const ROCKET: TrainerTierPools = { diff --git a/src/data/trainers/fixed-battle-configs.ts b/src/data/trainers/fixed-battle-configs.ts new file mode 100644 index 00000000000..bb6d591654b --- /dev/null +++ b/src/data/trainers/fixed-battle-configs.ts @@ -0,0 +1,376 @@ +import { FixedBattleConfig, getRandomTrainerFunc } from "#app/battle"; +import { Trainer } from "#app/field/trainer"; +import { globalScene } from "#app/global-scene"; +import { randSeedInt } from "#app/utils/common"; +import { BattleType } from "#enums/battle-type"; +import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves"; +import { ModifierTier } from "#enums/modifier-tier"; +import { PlayerGender } from "#enums/player-gender"; +import { TrainerType } from "#enums/trainer-type"; +import { TrainerVariant } from "#enums/trainer-variant"; + +export interface FixedBattleConfigs { + [key: number]: FixedBattleConfig; +} +/** + * Youngster/Lass on 5 + * Rival on 8, 55, 95, 145, 195 + * Evil team grunts on 35, 62, 64, and 112 + * Evil team admin on 66 and 114 + * Evil leader on 115, 165 + * E4 on 182, 184, 186, 188 + * Champion on 190 + */ +export const classicFixedBattles: FixedBattleConfigs = { + [ClassicFixedBossWaves.TOWN_YOUNGSTER]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + () => new Trainer(TrainerType.YOUNGSTER, randSeedInt(2) ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT), + ), + [ClassicFixedBossWaves.RIVAL_1]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + () => + new Trainer( + TrainerType.RIVAL, + globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, + ), + ), + [ClassicFixedBossWaves.RIVAL_2]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + () => + new Trainer( + TrainerType.RIVAL_2, + globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, + ), + ) + .setCustomModifierRewards({ + guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], + allowLuckUpgrades: false, + }), + [ClassicFixedBossWaves.EVIL_GRUNT_1]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + getRandomTrainerFunc( + [ + TrainerType.ROCKET_GRUNT, + TrainerType.MAGMA_GRUNT, + TrainerType.AQUA_GRUNT, + TrainerType.GALACTIC_GRUNT, + TrainerType.PLASMA_GRUNT, + TrainerType.FLARE_GRUNT, + TrainerType.AETHER_GRUNT, + TrainerType.SKULL_GRUNT, + TrainerType.MACRO_GRUNT, + TrainerType.STAR_GRUNT, + ], + true, + ), + ), + [ClassicFixedBossWaves.RIVAL_3]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + () => + new Trainer( + TrainerType.RIVAL_3, + globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, + ), + ) + .setCustomModifierRewards({ + guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], + allowLuckUpgrades: false, + }), + [ClassicFixedBossWaves.EVIL_GRUNT_2]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) + .setGetTrainerFunc( + getRandomTrainerFunc( + [ + TrainerType.ROCKET_GRUNT, + TrainerType.MAGMA_GRUNT, + TrainerType.AQUA_GRUNT, + TrainerType.GALACTIC_GRUNT, + TrainerType.PLASMA_GRUNT, + TrainerType.FLARE_GRUNT, + TrainerType.AETHER_GRUNT, + TrainerType.SKULL_GRUNT, + TrainerType.MACRO_GRUNT, + TrainerType.STAR_GRUNT, + ], + true, + ), + ), + [ClassicFixedBossWaves.EVIL_GRUNT_3]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) + .setGetTrainerFunc( + getRandomTrainerFunc( + [ + TrainerType.ROCKET_GRUNT, + TrainerType.MAGMA_GRUNT, + TrainerType.AQUA_GRUNT, + TrainerType.GALACTIC_GRUNT, + TrainerType.PLASMA_GRUNT, + TrainerType.FLARE_GRUNT, + TrainerType.AETHER_GRUNT, + TrainerType.SKULL_GRUNT, + TrainerType.MACRO_GRUNT, + TrainerType.STAR_GRUNT, + ], + true, + ), + ), + [ClassicFixedBossWaves.EVIL_ADMIN_1]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) + .setGetTrainerFunc( + getRandomTrainerFunc( + [ + [TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL], + [TrainerType.TABITHA, TrainerType.COURTNEY], + [TrainerType.MATT, TrainerType.SHELLY], + [TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN], + [TrainerType.ZINZOLIN, TrainerType.COLRESS], + [TrainerType.XEROSIC, TrainerType.BRYONY], + TrainerType.FABA, + TrainerType.PLUMERIA, + TrainerType.OLEANA, + [TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI], + ], + true, + ), + ), + [ClassicFixedBossWaves.RIVAL_4]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + () => + new Trainer( + TrainerType.RIVAL_4, + globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, + ), + ) + .setCustomModifierRewards({ + guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA], + allowLuckUpgrades: false, + }), + [ClassicFixedBossWaves.EVIL_GRUNT_4]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) + .setGetTrainerFunc( + getRandomTrainerFunc( + [ + TrainerType.ROCKET_GRUNT, + TrainerType.MAGMA_GRUNT, + TrainerType.AQUA_GRUNT, + TrainerType.GALACTIC_GRUNT, + TrainerType.PLASMA_GRUNT, + TrainerType.FLARE_GRUNT, + TrainerType.AETHER_GRUNT, + TrainerType.SKULL_GRUNT, + TrainerType.MACRO_GRUNT, + TrainerType.STAR_GRUNT, + ], + true, + ), + ), + [ClassicFixedBossWaves.EVIL_ADMIN_2]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) + .setGetTrainerFunc( + getRandomTrainerFunc( + [ + [TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL], + [TrainerType.TABITHA, TrainerType.COURTNEY], + [TrainerType.MATT, TrainerType.SHELLY], + [TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN], + [TrainerType.ZINZOLIN, TrainerType.COLRESS], + [TrainerType.XEROSIC, TrainerType.BRYONY], + TrainerType.FABA, + TrainerType.PLUMERIA, + TrainerType.OLEANA, + [TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI], + ], + true, + 1, + ), + ), + [ClassicFixedBossWaves.EVIL_BOSS_1]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) + .setGetTrainerFunc( + getRandomTrainerFunc([ + TrainerType.ROCKET_BOSS_GIOVANNI_1, + TrainerType.MAXIE, + TrainerType.ARCHIE, + TrainerType.CYRUS, + TrainerType.GHETSIS, + TrainerType.LYSANDRE, + TrainerType.LUSAMINE, + TrainerType.GUZMA, + TrainerType.ROSE, + TrainerType.PENNY, + ]), + ) + .setCustomModifierRewards({ + guaranteedModifierTiers: [ + ModifierTier.ROGUE, + ModifierTier.ROGUE, + ModifierTier.ULTRA, + ModifierTier.ULTRA, + ModifierTier.ULTRA, + ], + allowLuckUpgrades: false, + }), + [ClassicFixedBossWaves.RIVAL_5]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + () => + new Trainer( + TrainerType.RIVAL_5, + globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, + ), + ) + .setCustomModifierRewards({ + guaranteedModifierTiers: [ + ModifierTier.ROGUE, + ModifierTier.ROGUE, + ModifierTier.ROGUE, + ModifierTier.ULTRA, + ModifierTier.ULTRA, + ], + allowLuckUpgrades: false, + }), + [ClassicFixedBossWaves.EVIL_BOSS_2]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) + .setGetTrainerFunc( + getRandomTrainerFunc([ + TrainerType.ROCKET_BOSS_GIOVANNI_2, + TrainerType.MAXIE_2, + TrainerType.ARCHIE_2, + TrainerType.CYRUS_2, + TrainerType.GHETSIS_2, + TrainerType.LYSANDRE_2, + TrainerType.LUSAMINE_2, + TrainerType.GUZMA_2, + TrainerType.ROSE_2, + TrainerType.PENNY_2, + ]), + ) + .setCustomModifierRewards({ + guaranteedModifierTiers: [ + ModifierTier.ROGUE, + ModifierTier.ROGUE, + ModifierTier.ULTRA, + ModifierTier.ULTRA, + ModifierTier.ULTRA, + ModifierTier.ULTRA, + ], + allowLuckUpgrades: false, + }), + [ClassicFixedBossWaves.ELITE_FOUR_1]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + getRandomTrainerFunc([ + TrainerType.LORELEI, + TrainerType.WILL, + TrainerType.SIDNEY, + TrainerType.AARON, + TrainerType.SHAUNTAL, + TrainerType.MALVA, + [TrainerType.HALA, TrainerType.MOLAYNE], + TrainerType.MARNIE_ELITE, + TrainerType.RIKA, + TrainerType.CRISPIN, + ]), + ), + [ClassicFixedBossWaves.ELITE_FOUR_2]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) + .setGetTrainerFunc( + getRandomTrainerFunc([ + TrainerType.BRUNO, + TrainerType.KOGA, + TrainerType.PHOEBE, + TrainerType.BERTHA, + TrainerType.MARSHAL, + TrainerType.SIEBOLD, + TrainerType.OLIVIA, + TrainerType.NESSA_ELITE, + TrainerType.POPPY, + TrainerType.AMARYS, + ]), + ), + [ClassicFixedBossWaves.ELITE_FOUR_3]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) + .setGetTrainerFunc( + getRandomTrainerFunc([ + TrainerType.AGATHA, + TrainerType.BRUNO, + TrainerType.GLACIA, + TrainerType.FLINT, + TrainerType.GRIMSLEY, + TrainerType.WIKSTROM, + TrainerType.ACEROLA, + [TrainerType.BEA_ELITE, TrainerType.ALLISTER_ELITE], + TrainerType.LARRY_ELITE, + TrainerType.LACEY, + ]), + ), + [ClassicFixedBossWaves.ELITE_FOUR_4]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) + .setGetTrainerFunc( + getRandomTrainerFunc([ + TrainerType.LANCE, + TrainerType.KAREN, + TrainerType.DRAKE, + TrainerType.LUCIAN, + TrainerType.CAITLIN, + TrainerType.DRASNA, + TrainerType.KAHILI, + TrainerType.RAIHAN_ELITE, + TrainerType.HASSEL, + TrainerType.DRAYTON, + ]), + ), + [ClassicFixedBossWaves.CHAMPION]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) + .setGetTrainerFunc( + getRandomTrainerFunc([ + TrainerType.BLUE, + [TrainerType.RED, TrainerType.LANCE_CHAMPION], + [TrainerType.STEVEN, TrainerType.WALLACE], + TrainerType.CYNTHIA, + [TrainerType.ALDER, TrainerType.IRIS], + TrainerType.DIANTHA, + [TrainerType.KUKUI, TrainerType.HAU], + [TrainerType.LEON, TrainerType.MUSTARD], + [TrainerType.GEETA, TrainerType.NEMONA], + TrainerType.KIERAN, + ]), + ), + [ClassicFixedBossWaves.RIVAL_6]: new FixedBattleConfig() + .setBattleType(BattleType.TRAINER) + .setGetTrainerFunc( + () => + new Trainer( + TrainerType.RIVAL_6, + globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT, + ), + ) + .setCustomModifierRewards({ + guaranteedModifierTiers: [ + ModifierTier.ROGUE, + ModifierTier.ROGUE, + ModifierTier.ULTRA, + ModifierTier.ULTRA, + ModifierTier.GREAT, + ModifierTier.GREAT, + ], + allowLuckUpgrades: false, + }), +}; diff --git a/src/data/trainers/trainer-config.ts b/src/data/trainers/trainer-config.ts index 7c8b5b29fcd..4e88399bec3 100644 --- a/src/data/trainers/trainer-config.ts +++ b/src/data/trainers/trainer-config.ts @@ -1,23 +1,28 @@ +import { timedEventManager } from "#app/global-event-manager"; import { globalScene } from "#app/global-scene"; -import { modifierTypes } from "../data-lists"; -import { PokemonMove } from "../moves/pokemon-move"; -import { - toReadableString, - isNullOrUndefined, - randSeedItem, - randSeedInt, - coerceArray, - randSeedIntRange, -} from "#app/utils/common"; -import { pokemonEvolutions, pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { tmSpecies } from "#app/data/balance/tms"; -import { doubleBattleDialogue } from "../double-battle-dialogue"; +import { pokemonEvolutions, pokemonPrevolutions } from "#balance/pokemon-evolutions"; +import { signatureSpecies } from "#balance/signature-species"; +import { tmSpecies } from "#balance/tms"; +import { modifierTypes } from "#data/data-lists"; +import { doubleBattleDialogue } from "#data/double-battle-dialogue"; +import { Gender } from "#data/gender"; +import type { PokemonSpecies, PokemonSpeciesFilter } from "#data/pokemon-species"; +import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; +import { PartyMemberStrength } from "#enums/party-member-strength"; +import { PokeballType } from "#enums/pokeball"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { TeraAIMode } from "#enums/tera-ai-mode"; +import { TrainerPoolTier } from "#enums/trainer-pool-tier"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { TrainerType } from "#enums/trainer-type"; import { TrainerVariant } from "#enums/trainer-variant"; -import { getIsInitialized, initI18n } from "#app/plugins/i18n"; -import i18next from "i18next"; -import { Gender } from "#app/data/gender"; -import { signatureSpecies } from "../balance/signature-species"; +import type { EnemyPokemon } from "#field/pokemon"; +import { PokemonMove } from "#moves/pokemon-move"; +import { getIsInitialized, initI18n } from "#plugins/i18n"; +import type { EvilTeam } from "#trainers/evil-admin-trainer-pools"; +import { evilAdminTrainerPools } from "#trainers/evil-admin-trainer-pools"; import { getEvilGruntPartyTemplate, getGymLeaderPartyTemplate, @@ -25,37 +30,27 @@ import { TrainerPartyCompoundTemplate, TrainerPartyTemplate, trainerPartyTemplates, -} from "./TrainerPartyTemplate"; -import { evilAdminTrainerPools } from "./evil-admin-trainer-pools"; - -// Enum imports -import { PartyMemberStrength } from "#enums/party-member-strength"; -import { SpeciesId } from "#enums/species-id"; -import { PokeballType } from "#enums/pokeball"; -import { PokemonType } from "#enums/pokemon-type"; -import { MoveId } from "#enums/move-id"; -import { AbilityId } from "#enums/ability-id"; -import { TeraAIMode } from "#enums/tera-ai-mode"; -import { TrainerPoolTier } from "#enums/trainer-pool-tier"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { TrainerType } from "#enums/trainer-type"; -import { timedEventManager } from "#app/global-event-manager"; - -// Type imports -import type { PokemonSpeciesFilter } from "#app/data/pokemon-species"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import type { ModifierTypeFunc } from "#app/@types/modifier-types"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import type { EvilTeam } from "./evil-admin-trainer-pools"; +} from "#trainers/trainer-party-template"; +import type { ModifierTypeFunc } from "#types/modifier-types"; import type { - PartyMemberFunc, - GenModifiersFunc, GenAIFunc, - PartyTemplateFunc, - TrainerTierPools, - TrainerConfigs, + GenModifiersFunc, + PartyMemberFunc, PartyMemberFuncs, -} from "../../@types/trainer-funcs"; + PartyTemplateFunc, + TrainerConfigs, + TrainerTierPools, +} from "#types/trainer-funcs"; +import { + coerceArray, + isNullOrUndefined, + randSeedInt, + randSeedIntRange, + randSeedItem, + toReadableString, +} from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; /** Minimum BST for Pokemon generated onto the Elite Four's teams */ const ELITE_FOUR_MINIMUM_BST = 460; diff --git a/src/data/trainers/TrainerPartyTemplate.ts b/src/data/trainers/trainer-party-template.ts similarity index 100% rename from src/data/trainers/TrainerPartyTemplate.ts rename to src/data/trainers/trainer-party-template.ts index 135fe669825..d4e7fe7a261 100644 --- a/src/data/trainers/TrainerPartyTemplate.ts +++ b/src/data/trainers/trainer-party-template.ts @@ -1,8 +1,8 @@ -import { startingWave } from "#app/starting-wave"; import { globalScene } from "#app/global-scene"; -import { PartyMemberStrength } from "#enums/party-member-strength"; -import { GameModes } from "#enums/game-modes"; +import { startingWave } from "#app/starting-wave"; import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves"; +import { GameModes } from "#enums/game-modes"; +import { PartyMemberStrength } from "#enums/party-member-strength"; export class TrainerPartyTemplate { public size: number; diff --git a/src/data/weather.ts b/src/data/weather.ts index 3fde932a1d7..62a03aa0832 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -1,15 +1,15 @@ -import { BiomeId } from "#enums/biome-id"; -import { WeatherType } from "#enums/weather-type"; -import { getPokemonNameWithAffix } from "../messages"; -import type Pokemon from "../field/pokemon"; -import { PokemonType } from "#enums/pokemon-type"; -import type Move from "./moves/move"; -import { randSeedInt } from "#app/utils/common"; -import i18next from "i18next"; -import { globalScene } from "#app/global-scene"; -import type { Arena } from "#app/field/arena"; +import type { SuppressWeatherEffectAbAttr } from "#abilities/ability"; import { timedEventManager } from "#app/global-event-manager"; -import type { SuppressWeatherEffectAbAttr } from "./abilities/ability"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { BiomeId } from "#enums/biome-id"; +import { PokemonType } from "#enums/pokemon-type"; +import { WeatherType } from "#enums/weather-type"; +import type { Arena } from "#field/arena"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { randSeedInt } from "#utils/common"; +import i18next from "i18next"; export class Weather { public weatherType: WeatherType; diff --git a/src/enums/move-use-mode.ts b/src/enums/move-use-mode.ts index 31694ad4081..1bb9d6374b7 100644 --- a/src/enums/move-use-mode.ts +++ b/src/enums/move-use-mode.ts @@ -1,4 +1,4 @@ -import type { PostDancingMoveAbAttr } from "#app/data/abilities/ability"; +import type { PostDancingMoveAbAttr } from "#abilities/ability"; import type { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; /** diff --git a/src/events/arena.ts b/src/events/arena.ts index 3b65506db98..5415b8eb026 100644 --- a/src/events/arena.ts +++ b/src/events/arena.ts @@ -1,6 +1,6 @@ +import type { TerrainType } from "#data/terrain"; import type { ArenaTagSide } from "#enums/arena-tag-side"; import type { ArenaTagType } from "#enums/arena-tag-type"; -import type { TerrainType } from "#app/data/terrain"; import type { WeatherType } from "#enums/weather-type"; /** Alias for all {@linkcode ArenaEvent} type strings */ diff --git a/src/events/battle-scene.ts b/src/events/battle-scene.ts index 83d260bd7d2..29aee1053cd 100644 --- a/src/events/battle-scene.ts +++ b/src/events/battle-scene.ts @@ -1,5 +1,5 @@ -import type Move from "../data/moves/move"; -import type { BerryModifier } from "../modifier/modifier"; +import type { BerryModifier } from "#modifiers/modifier"; +import type { Move } from "#moves/move"; /** Alias for all {@linkcode BattleScene} events */ export enum BattleSceneEventType { diff --git a/src/field/anims.ts b/src/field/anims.ts index f1ac87cd741..82aa7b7e894 100644 --- a/src/field/anims.ts +++ b/src/field/anims.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; import { PokeballType } from "#enums/pokeball"; -import type { Variant } from "#app/sprites/variant"; -import { getFrameMs, randGauss } from "#app/utils/common"; +import type { Variant } from "#sprites/variant"; +import { getFrameMs, randGauss } from "#utils/common"; export function addPokeballOpenParticles(x: number, y: number, pokeballType: PokeballType): void { switch (pokeballType) { diff --git a/src/field/arena.ts b/src/field/arena.ts index c5e7edae4d8..b28ebd0b46b 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -1,40 +1,37 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import type { BiomeTierTrainerPools, PokemonPools } from "#app/data/balance/biomes"; -import { biomePokemonPools, BiomePoolTier, biomeTrainerPools } from "#app/data/balance/biomes"; -import { randSeedInt, NumberHolder, isNullOrUndefined, type Constructor } from "#app/utils/common"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; +import Overrides from "#app/overrides"; +import type { BiomeTierTrainerPools, PokemonPools } from "#balance/biomes"; +import { BiomePoolTier, biomePokemonPools, biomeTrainerPools } from "#balance/biomes"; +import type { ArenaTag } from "#data/arena-tag"; +import { ArenaTrapTag, getArenaTag } from "#data/arena-tag"; +import { SpeciesFormChangeRevertWeatherFormTrigger, SpeciesFormChangeWeatherTrigger } from "#data/form-change-triggers"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { getTerrainClearMessage, getTerrainStartMessage, Terrain, TerrainType } from "#data/terrain"; import { + getLegendaryWeatherContinuesMessage, getWeatherClearMessage, getWeatherStartMessage, - getLegendaryWeatherContinuesMessage, Weather, -} from "#app/data/weather"; -import { CommonAnim } from "#enums/move-anims-common"; -import type { PokemonType } from "#enums/pokemon-type"; -import type Move from "#app/data/moves/move"; -import type { ArenaTag } from "#app/data/arena-tag"; -import { ArenaTrapTag, getArenaTag } from "#app/data/arena-tag"; +} from "#data/weather"; +import { AbilityId } from "#enums/ability-id"; import { ArenaTagSide } from "#enums/arena-tag-side"; -import type { BattlerIndex } from "#enums/battler-index"; -import { Terrain, TerrainType, getTerrainClearMessage, getTerrainStartMessage } from "#app/data/terrain"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import type Pokemon from "#app/field/pokemon"; -import Overrides from "#app/overrides"; -import { TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena"; import type { ArenaTagType } from "#enums/arena-tag-type"; +import type { BattlerIndex } from "#enums/battler-index"; import { BiomeId } from "#enums/biome-id"; +import { CommonAnim } from "#enums/move-anims-common"; import type { MoveId } from "#enums/move-id"; +import type { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; import { TimeOfDay } from "#enums/time-of-day"; import { TrainerType } from "#enums/trainer-type"; -import { AbilityId } from "#enums/ability-id"; -import { - SpeciesFormChangeRevertWeatherFormTrigger, - SpeciesFormChangeWeatherTrigger, -} from "#app/data/pokemon-forms/form-change-triggers"; import { WeatherType } from "#enums/weather-type"; -import { FieldEffectModifier } from "#app/modifier/modifier"; +import { TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#events/arena"; +import type { Pokemon } from "#field/pokemon"; +import { FieldEffectModifier } from "#modifiers/modifier"; +import type { Move } from "#moves/move"; +import { type Constructor, isNullOrUndefined, NumberHolder, randSeedInt } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; export class Arena { public biomeType: BiomeId; @@ -146,6 +143,7 @@ export class Arena { if (!tierPool.length) { ret = globalScene.randomSpecies(waveIndex, level); } else { + // TODO: should this use `randSeedItem`? const entry = tierPool[randSeedInt(tierPool.length)]; let species: SpeciesId; if (typeof entry === "number") { @@ -157,6 +155,7 @@ export class Arena { if (level >= levelThreshold) { const speciesIds = entry[levelThreshold]; if (speciesIds.length > 1) { + // TODO: should this use `randSeedItem`? species = speciesIds[randSeedInt(speciesIds.length)]; } else { species = speciesIds[0]; @@ -169,19 +168,11 @@ export class Arena { ret = getPokemonSpecies(species!); if (ret.subLegendary || ret.legendary || ret.mythical) { - switch (true) { - case ret.baseTotal >= 720: - regen = level < 90; - break; - case ret.baseTotal >= 670: - regen = level < 70; - break; - case ret.baseTotal >= 580: - regen = level < 50; - break; - default: - regen = level < 30; - break; + const waveDifficulty = globalScene.gameMode.getWaveForDifficulty(waveIndex); + if (ret.baseTotal >= 660) { + regen = waveDifficulty < 80; // Wave 50+ in daily (however, max Daily wave is 50 currently so not possible) + } else { + regen = waveDifficulty < 55; // Wave 25+ in daily } } } @@ -499,38 +490,37 @@ export class Arena { getTrainerChance(): number { switch (this.biomeType) { case BiomeId.METROPOLIS: - return 2; - case BiomeId.SLUM: - case BiomeId.BEACH: case BiomeId.DOJO: - case BiomeId.CONSTRUCTION_SITE: return 4; case BiomeId.PLAINS: case BiomeId.GRASS: + case BiomeId.BEACH: case BiomeId.LAKE: case BiomeId.CAVE: + case BiomeId.DESERT: + case BiomeId.CONSTRUCTION_SITE: + case BiomeId.SLUM: return 6; case BiomeId.TALL_GRASS: case BiomeId.FOREST: - case BiomeId.SEA: case BiomeId.SWAMP: case BiomeId.MOUNTAIN: case BiomeId.BADLANDS: - case BiomeId.DESERT: case BiomeId.MEADOW: case BiomeId.POWER_PLANT: - case BiomeId.GRAVEYARD: case BiomeId.FACTORY: case BiomeId.SNOWY_FOREST: return 8; + case BiomeId.SEA: case BiomeId.ICE_CAVE: case BiomeId.VOLCANO: + case BiomeId.GRAVEYARD: case BiomeId.RUINS: case BiomeId.WASTELAND: case BiomeId.JUNGLE: case BiomeId.FAIRY_CAVE: + case BiomeId.ISLAND: return 12; - case BiomeId.SEABED: case BiomeId.ABYSS: case BiomeId.SPACE: case BiomeId.TEMPLE: @@ -935,6 +925,7 @@ export function getBiomeKey(biome: BiomeId): string { export function getBiomeHasProps(biomeType: BiomeId): boolean { switch (biomeType) { + case BiomeId.PLAINS: case BiomeId.METROPOLIS: case BiomeId.BEACH: case BiomeId.LAKE: diff --git a/src/field/damage-number-handler.ts b/src/field/damage-number-handler.ts index 24c5e107d15..acb279a17a0 100644 --- a/src/field/damage-number-handler.ts +++ b/src/field/damage-number-handler.ts @@ -1,14 +1,14 @@ -import { TextStyle, addTextObject } from "../ui/text"; -import type { DamageResult } from "../@types/damage-result"; -import type Pokemon from "./pokemon"; -import { HitResult } from "#enums/hit-result"; -import { formatStat, fixedInt } from "#app/utils/common"; -import type { BattlerIndex } from "#enums/battler-index"; import { globalScene } from "#app/global-scene"; +import type { BattlerIndex } from "#enums/battler-index"; +import { HitResult } from "#enums/hit-result"; +import type { Pokemon } from "#field/pokemon"; +import type { DamageResult } from "#types/damage-result"; +import { addTextObject, TextStyle } from "#ui/text"; +import { fixedInt, formatStat } from "#utils/common"; type TextAndShadowArr = [string | null, string | null]; -export default class DamageNumberHandler { +export class DamageNumberHandler { private damageNumbers: Map; constructor() { diff --git a/src/field/mystery-encounter-intro.ts b/src/field/mystery-encounter-intro.ts index f6702c690bd..d3776f349e6 100644 --- a/src/field/mystery-encounter-intro.ts +++ b/src/field/mystery-encounter-intro.ts @@ -1,13 +1,14 @@ -import type { GameObjects } from "phaser"; import { globalScene } from "#app/global-scene"; -import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; import type { SpeciesId } from "#enums/species-id"; -import { isNullOrUndefined } from "#app/utils/common"; -import { getSpriteKeysFromSpecies } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import type { Variant } from "#app/sprites/variant"; -import { doShinySparkleAnim } from "#app/field/anims"; -import { loadPokemonVariantAssets } from "#app/sprites/pokemon-sprite"; -import PlayAnimationConfig = Phaser.Types.Animations.PlayAnimationConfig; +import { doShinySparkleAnim } from "#field/anims"; +import { getSpriteKeysFromSpecies } from "#mystery-encounters/encounter-pokemon-utils"; +import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { loadPokemonVariantAssets } from "#sprites/pokemon-sprite"; +import type { Variant } from "#sprites/variant"; +import { isNullOrUndefined } from "#utils/common"; +import type { GameObjects } from "phaser"; + +type PlayAnimationConfig = Phaser.Types.Animations.PlayAnimationConfig; type KnownFileRoot = | "arenas" @@ -77,7 +78,7 @@ export class MysteryEncounterSpriteConfig { * These slide in with the field as part of standard field change cycle, and will typically be hidden after the player has selected an option for the encounter * Note: intro visuals are not "Trainers" or any other specific game object, though they may contain trainer sprites */ -export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Container { +export class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Container { public encounter: MysteryEncounter; public spriteConfigs: MysteryEncounterSpriteConfig[]; public enterFromRight: boolean; diff --git a/src/field/pokemon-sprite-sparkle-handler.ts b/src/field/pokemon-sprite-sparkle-handler.ts index bda9414bb92..725229ce723 100644 --- a/src/field/pokemon-sprite-sparkle-handler.ts +++ b/src/field/pokemon-sprite-sparkle-handler.ts @@ -1,8 +1,8 @@ import { globalScene } from "#app/global-scene"; -import Pokemon from "./pokemon"; -import { fixedInt, coerceArray, randInt } from "#app/utils/common"; +import { Pokemon } from "#field/pokemon"; +import { coerceArray, fixedInt, randInt } from "#utils/common"; -export default class PokemonSpriteSparkleHandler { +export class PokemonSpriteSparkleHandler { private sprites: Set; setup(): void { diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 0a8e8469115..6ccccec7d91 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1,155 +1,56 @@ -import Phaser from "phaser"; -import type { AnySound } from "#app/battle-scene"; -import type BattleScene from "#app/battle-scene"; +import type { Ability, PreAttackModifyDamageAbAttrParams } from "#abilities/ability"; +import { applyAbAttrs, applyOnGainAbAttrs, applyOnLoseAbAttrs } from "#abilities/apply-ab-attrs"; +import type { AnySound, BattleScene } from "#app/battle-scene"; +import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; +import { timedEventManager } from "#app/global-event-manager"; import { globalScene } from "#app/global-scene"; -import type { Variant } from "#app/sprites/variant"; -import { populateVariantColors, variantColorCache } from "#app/sprites/variant"; -import { variantData } from "#app/sprites/variant"; -import BattleInfo from "#app/ui/battle-info/battle-info"; -import { EnemyBattleInfo } from "#app/ui/battle-info/enemy-battle-info"; -import { PlayerBattleInfo } from "#app/ui/battle-info/player-battle-info"; -import type Move from "#app/data/moves/move"; -import { getMoveTargets } from "#app/data/moves/move-utils"; -import { applyMoveAttrs } from "#app/data/moves/apply-attrs"; -import { allMoves } from "#app/data/data-lists"; -import { MoveTarget } from "#enums/MoveTarget"; -import { MoveCategory } from "#enums/MoveCategory"; -import type { PokemonSpeciesForm } from "#app/data/pokemon-species"; -import { default as PokemonSpecies, getFusedSpeciesName, getPokemonSpeciesForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; -import { - NumberHolder, - randSeedInt, - getIvsFromId, - BooleanHolder, - randSeedItem, - isNullOrUndefined, - getEnumValues, - toDmgValue, - fixedInt, - rgbaToInt, - rgbHexToRgba, - rgbToHsv, - deltaRgb, - isBetween, - randSeedFloat, - type Constructor, - randSeedIntRange, - coerceArray, -} from "#app/utils/common"; -import type { TypeDamageMultiplier } from "#app/data/type"; -import { getTypeDamageMultiplier, getTypeRgb } from "#app/data/type"; -import { PokemonType } from "#enums/pokemon-type"; -import { getLevelTotalExp } from "#app/data/exp"; -import { - Stat, - type PermanentStat, - type BattleStat, - type EffectiveStat, - PERMANENT_STATS, - BATTLE_STATS, - EFFECTIVE_STATS, -} from "#enums/stat"; -import { - EnemyDamageBoosterModifier, - EnemyDamageReducerModifier, - EnemyFusionChanceModifier, - HiddenAbilityRateBoosterModifier, - BaseStatModifier, - PokemonFriendshipBoosterModifier, - PokemonHeldItemModifier, - PokemonNatureWeightModifier, - ShinyRateBoosterModifier, - SurviveDamageModifier, - TempStatStageBoosterModifier, - TempCritBoosterModifier, - StatBoosterModifier, - CritBoosterModifier, - PokemonBaseStatFlatModifier, - PokemonBaseStatTotalModifier, - PokemonIncrementingStatModifier, - EvoTrackerModifier, - PokemonMultiHitModifier, -} from "#app/modifier/modifier"; -import { PokeballType } from "#enums/pokeball"; -import { Gender } from "#app/data/gender"; -import { Status, getRandomStatus } from "#app/data/status-effect"; -import type { SpeciesFormEvolution } from "#app/data/balance/pokemon-evolutions"; +import { getPokemonNameWithAffix } from "#app/messages"; +import Overrides from "#app/overrides"; +import { speciesEggMoves } from "#balance/egg-moves"; +import type { SpeciesFormEvolution } from "#balance/pokemon-evolutions"; import { + FusionSpeciesFormEvolution, pokemonEvolutions, pokemonPrevolutions, - FusionSpeciesFormEvolution, validateShedinjaEvo, -} from "#app/data/balance/pokemon-evolutions"; -import { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "#app/data/balance/tms"; +} from "#balance/pokemon-evolutions"; +import type { LevelMoves } from "#balance/pokemon-level-moves"; +import { EVOLVE_MOVE, RELEARN_MOVE } from "#balance/pokemon-level-moves"; +import { BASE_HIDDEN_ABILITY_CHANCE, BASE_SHINY_CHANCE, SHINY_EPIC_CHANCE, SHINY_VARIANT_CHANCE } from "#balance/rates"; +import { getStarterValueFriendshipCap, speciesStarterCosts } from "#balance/starters"; +import { reverseCompatibleTms, tmPoolTiers, tmSpecies } from "#balance/tms"; +import type { SuppressAbilitiesTag } from "#data/arena-tag"; +import { NoCritTag, WeakenMoveScreenTag } from "#data/arena-tag"; import { - BattlerTag, - EncoreTag, - GroundedTag, - HighestStatBoostTag, - SubstituteTag, - TypeImmuneTag, - getBattlerTag, - SemiInvulnerableTag, - MoveRestrictionBattlerTag, - ExposedTag, - DragonCheerTag, - CritBoostTag, - TrappedTag, - TarShotTag, AutotomizedTag, - PowerTrickTag, + BattlerTag, + CritBoostTag, + DragonCheerTag, + EncoreTag, + ExposedTag, + GroundedTag, type GrudgeTag, -} from "../data/battler-tags"; -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import { WeatherType } from "#enums/weather-type"; -import { NoCritTag, WeakenMoveScreenTag } from "#app/data/arena-tag"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import type { SuppressAbilitiesTag } from "#app/data/arena-tag"; -import type { Ability, PreAttackModifyDamageAbAttrParams } from "#app/data/abilities/ability"; -import { applyAbAttrs, applyOnGainAbAttrs, applyOnLoseAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { allAbilities } from "#app/data/data-lists"; -import type PokemonData from "#app/system/pokemon-data"; -import { BattlerIndex } from "#enums/battler-index"; -import { UiMode } from "#enums/ui-mode"; -import type { PartyOption } from "#app/ui/party-ui-handler"; -import PartyUiHandler, { PartyUiMode } from "#app/ui/party-ui-handler"; -import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; -import type { LevelMoves } from "#app/data/balance/pokemon-level-moves"; -import { EVOLVE_MOVE, RELEARN_MOVE } from "#app/data/balance/pokemon-level-moves"; -import { achvs } from "#app/system/achv"; -import type { StarterDataEntry, StarterMoveset } from "#app/system/game-data"; -import { DexAttr } from "#enums/dex-attr"; -import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-color-utilities"; -import { getNatureStatMultiplier } from "#app/data/nature"; -import type { SpeciesFormChange } from "#app/data/pokemon-forms"; + getBattlerTag, + HighestStatBoostTag, + MoveRestrictionBattlerTag, + PowerTrickTag, + SemiInvulnerableTag, + SubstituteTag, + TarShotTag, + TrappedTag, + TypeImmuneTag, +} from "#data/battler-tags"; +import { applyChallenges } from "#data/challenge"; +import { allAbilities, allMoves } from "#data/data-lists"; +import { getLevelTotalExp } from "#data/exp"; import { SpeciesFormChangeActiveTrigger, SpeciesFormChangeLapseTeraTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangePostMoveTrigger, -} from "#app/data/pokemon-forms/form-change-triggers"; -import { TerrainType } from "#app/data/terrain"; -import type { TrainerSlot } from "#enums/trainer-slot"; -import Overrides from "#app/overrides"; -import i18next from "i18next"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { ModifierTier } from "#enums/modifier-tier"; -import { applyChallenges } from "#app/data/challenge"; -import { ChallengeType } from "#enums/challenge-type"; -import { AbilityId } from "#enums/ability-id"; -import { ArenaTagType } from "#enums/arena-tag-type"; -import { BattleSpec } from "#enums/battle-spec"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import type { BerryType } from "#enums/berry-type"; -import { BiomeId } from "#enums/biome-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { Challenges } from "#enums/challenges"; -import { PokemonAnimType } from "#enums/pokemon-anim-type"; -import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; +} from "#data/form-change-triggers"; +import { Gender } from "#data/gender"; +import { getNatureStatMultiplier } from "#data/nature"; import { CustomPokemonData, PokemonBattleData, @@ -157,33 +58,122 @@ import { PokemonTempSummonData, PokemonTurnData, PokemonWaveData, -} from "#app/data/pokemon/pokemon-data"; -import { SwitchType } from "#enums/switch-type"; -import { SpeciesFormKey } from "#enums/species-form-key"; -import { getStatusEffectOverlapText } from "#app/data/status-effect"; -import { - BASE_HIDDEN_ABILITY_CHANCE, - BASE_SHINY_CHANCE, - SHINY_EPIC_CHANCE, - SHINY_VARIANT_CHANCE, -} from "#app/data/balance/rates"; -import { Nature } from "#enums/nature"; -import { StatusEffect } from "#enums/status-effect"; -import { doShinySparkleAnim } from "#app/field/anims"; -import { MoveFlags } from "#enums/MoveFlags"; -import { timedEventManager } from "#app/global-event-manager"; -import { loadMoveAnimations } from "#app/sprites/pokemon-asset-loader"; -import { isVirtual, isIgnorePP, MoveUseMode } from "#enums/move-use-mode"; +} from "#data/pokemon-data"; +import type { SpeciesFormChange } from "#data/pokemon-forms"; +import type { PokemonSpeciesForm } from "#data/pokemon-species"; +import { getFusedSpeciesName, getPokemonSpeciesForm, PokemonSpecies } from "#data/pokemon-species"; +import { getRandomStatus, getStatusEffectOverlapText, Status } from "#data/status-effect"; +import { getTerrainBlockMessage, TerrainType } from "#data/terrain"; +import type { TypeDamageMultiplier } from "#data/type"; +import { getTypeDamageMultiplier, getTypeRgb } from "#data/type"; +import { AbilityId } from "#enums/ability-id"; +import { AiType } from "#enums/ai-type"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattleSpec } from "#enums/battle-spec"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import type { BerryType } from "#enums/berry-type"; +import { BiomeId } from "#enums/biome-id"; +import { ChallengeType } from "#enums/challenge-type"; +import { Challenges } from "#enums/challenges"; +import { DexAttr } from "#enums/dex-attr"; import { FieldPosition } from "#enums/field-position"; import { HitResult } from "#enums/hit-result"; -import { AiType } from "#enums/ai-type"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import type { IllusionData } from "#app/@types/illusion-data"; -import type { TurnMove } from "#app/@types/turn-move"; -import type { DamageCalculationResult, DamageResult } from "#app/@types/damage-result"; -import type { AbAttrMap, AbAttrString, TypeMultiplierAbAttrParams } from "#app/@types/ability-types"; -import { getTerrainBlockMessage } from "#app/data/terrain"; import { LearnMoveSituation } from "#enums/learn-move-situation"; +import { MoveCategory } from "#enums/MoveCategory"; +import { MoveFlags } from "#enums/MoveFlags"; +import { MoveTarget } from "#enums/MoveTarget"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { isIgnorePP, isVirtual, MoveUseMode } from "#enums/move-use-mode"; +import { Nature } from "#enums/nature"; +import { PokeballType } from "#enums/pokeball"; +import { PokemonAnimType } from "#enums/pokemon-anim-type"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesFormKey } from "#enums/species-form-key"; +import { SpeciesId } from "#enums/species-id"; +import { + BATTLE_STATS, + type BattleStat, + EFFECTIVE_STATS, + type EffectiveStat, + PERMANENT_STATS, + type PermanentStat, + Stat, +} from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { SwitchType } from "#enums/switch-type"; +import type { TrainerSlot } from "#enums/trainer-slot"; +import { UiMode } from "#enums/ui-mode"; +import { WeatherType } from "#enums/weather-type"; +import { doShinySparkleAnim } from "#field/anims"; +import { + BaseStatModifier, + CritBoosterModifier, + EnemyDamageBoosterModifier, + EnemyDamageReducerModifier, + EnemyFusionChanceModifier, + EvoTrackerModifier, + HiddenAbilityRateBoosterModifier, + PokemonBaseStatFlatModifier, + PokemonBaseStatTotalModifier, + PokemonFriendshipBoosterModifier, + PokemonHeldItemModifier, + PokemonIncrementingStatModifier, + PokemonMultiHitModifier, + PokemonNatureWeightModifier, + ShinyRateBoosterModifier, + StatBoosterModifier, + SurviveDamageModifier, + TempCritBoosterModifier, + TempStatStageBoosterModifier, +} from "#modifiers/modifier"; +import { applyMoveAttrs } from "#moves/apply-attrs"; +import type { Move } from "#moves/move"; +import { getMoveTargets } from "#moves/move-utils"; +import { PokemonMove } from "#moves/pokemon-move"; +import { loadMoveAnimations } from "#sprites/pokemon-asset-loader"; +import type { Variant } from "#sprites/variant"; +import { populateVariantColors, variantColorCache, variantData } from "#sprites/variant"; +import { achvs } from "#system/achv"; +import type { StarterDataEntry, StarterMoveset } from "#system/game-data"; +import type { PokemonData } from "#system/pokemon-data"; +import type { AbAttrMap, AbAttrString, TypeMultiplierAbAttrParams } from "#types/ability-types"; +import type { DamageCalculationResult, DamageResult } from "#types/damage-result"; +import type { IllusionData } from "#types/illusion-data"; +import type { TurnMove } from "#types/turn-move"; +import { BattleInfo } from "#ui/battle-info"; +import { EnemyBattleInfo } from "#ui/enemy-battle-info"; +import type { PartyOption } from "#ui/party-ui-handler"; +import { PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler"; +import { PlayerBattleInfo } from "#ui/player-battle-info"; +import { + BooleanHolder, + type Constructor, + coerceArray, + deltaRgb, + fixedInt, + getIvsFromId, + isBetween, + isNullOrUndefined, + NumberHolder, + randSeedFloat, + randSeedInt, + randSeedIntRange, + randSeedItem, + rgbaToInt, + rgbHexToRgba, + rgbToHsv, + toDmgValue, +} from "#utils/common"; +import { getEnumValues } from "#utils/enums"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { argbFromRgba, QuantizerCelebi, rgbaFromArgb } from "@material/material-color-utilities"; +import i18next from "i18next"; +import Phaser from "phaser"; +import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; /** Base typeclass for damage parameter methods, used for DRY */ type damageParams = { @@ -215,7 +205,7 @@ type getBaseDamageParams = Omit; /** Type for the parameters of {@linkcode Pokemon#getAttackDamage | getAttackDamage} */ type getAttackDamageParams = Omit; -export default abstract class Pokemon extends Phaser.GameObjects.Container { +export abstract class Pokemon extends Phaser.GameObjects.Container { /** * This pokemon's {@link https://bulbapedia.bulbagarden.net/wiki/Personality_value | Personality value/PID}, * used to determine various parameters of this Pokemon. @@ -568,7 +558,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { getDexAttr(): bigint { let ret = 0n; - ret |= this.gender !== Gender.FEMALE ? DexAttr.MALE : DexAttr.FEMALE; + if (this.gender !== Gender.GENDERLESS) { + ret |= this.gender !== Gender.FEMALE ? DexAttr.MALE : DexAttr.FEMALE; + } ret |= !this.shiny ? DexAttr.NON_SHINY : DexAttr.SHINY; ret |= this.variant >= 2 ? DexAttr.VARIANT_3 : this.variant === 1 ? DexAttr.VARIANT_2 : DexAttr.DEFAULT_VARIANT; ret |= globalScene.gameData.getFormAttr(this.formIndex); @@ -1056,6 +1048,39 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return species; } + /** + * Getter function that returns whether this {@linkcode Pokemon} is currently transformed into another one + * (such as by the effects of {@linkcode MoveId.TRANSFORM} or {@linkcode AbilityId.IMPOSTER}. + * @returns Whether this Pokemon is currently transformed. + */ + isTransformed(): boolean { + return this.summonData.speciesForm !== null; + } + + /** + * Return whether this Pokemon can transform into an opposing Pokemon. + * @param target - The {@linkcode Pokemon} being transformed into + * @returns Whether this Pokemon can transform into `target`. + */ + canTransformInto(target: Pokemon): boolean { + return !( + // Neither pokemon can be already transformed + ( + this.isTransformed() || + target.isTransformed() || + // Neither pokemon can be behind an illusion + target.summonData.illusion || + this.summonData.illusion || + // The target cannot be behind a substitute + target.getTag(BattlerTagType.SUBSTITUTE) || + // Transforming to/from fusion pokemon causes various problems (crashes, etc.) + // TODO: Consider lifting restriction once bug is fixed + this.isFusion() || + target.isFusion() + ) + ); + } + /** * @param {boolean} useIllusion - Whether we want the fusionSpeciesForm of the illusion or not. */ @@ -1270,39 +1295,39 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { /** * Retrieves the entire set of stats of this {@linkcode Pokemon}. - * @param bypassSummonData - whether to use actual stats or in-battle overriden stats from Transform; default `true` - * @returns the numeric values of this {@linkcode Pokemon}'s stats + * @param bypassSummonData - Whether to prefer actual stats (`true`) or in-battle overridden stats (`false`); default `true` + * @returns The numeric values of this {@linkcode Pokemon}'s stats as an array. */ getStats(bypassSummonData = true): number[] { - if (!bypassSummonData && this.summonData.stats) { - return this.summonData.stats; + if (!bypassSummonData) { + // Only grab summon data stats if nonzero + return this.summonData.stats.map((s, i) => s || this.stats[i]); } 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} + * @param stat - The {@linkcode PermanentStat} to retrieve + * @param bypassSummonData - Whether to prefer actual stats (`true`) or in-battle overridden stats (`false`); default `true` + * @returns The numeric value of the desired {@linkcode Stat}. */ getStat(stat: PermanentStat, bypassSummonData = true): number { - if (!bypassSummonData && this.summonData.stats[stat] !== 0) { - return this.summonData.stats[stat]; + if (!bypassSummonData) { + // 0 = no override + return this.summonData.stats[stat] || this.stats[stat]; } return this.stats[stat]; } /** - * 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`) + * Change one of this {@linkcode Pokemon}'s {@linkcode PermanentStat}s to the specified value. + * @param stat - The {@linkcode PermanentStat} to be overwritten + * @param value - The stat value to set. Ignored if `<=0` + * @param bypassSummonData - Whether to write to actual stats (`true`) or in-battle overridden stats (`false`); default `true` */ setStat(stat: PermanentStat, value: number, bypassSummonData = true): void { - if (value < 0) { + if (value <= 0) { return; } @@ -1318,31 +1343,25 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @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]; + return this.summonData.statStages; } /** - * 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 + * Retrieve the value of the given stat stage for this {@linkcode Pokemon}. + * @param stat - The {@linkcode BattleStat} to retrieve the stat stage for + * @returns The value of the desired stat stage as a number within the range `[-6, +6]`. */ getStatStage(stat: BattleStat): number { - return this.summonData ? this.summonData.statStages[stat - 1] : 0; + return this.summonData.statStages[stat - 1]; } /** - * 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 + * Sets this {@linkcode Pokemon}'s in-battle stat stage to the corresponding value. + * @param stat - The {@linkcode BattleStat} whose stage is to be overwritten + * @param value - The value of the stat stage to set, forcibly clamped within the range `[-6, +6]`. */ setStatStage(stat: BattleStat, value: number): void { - if (value >= -6) { - this.summonData.statStages[stat - 1] = Math.min(value, 6); - } else { - this.summonData.statStages[stat - 1] = Math.max(value, -6); - } + this.summonData.statStages[stat - 1] = Phaser.Math.Clamp(value, -6, 6); } /** @@ -2501,41 +2520,50 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @returns A score value based on how favorable this Pokemon is when fighting the given Pokemon */ getMatchupScore(opponent: Pokemon): number { - const types = this.getTypes(true); - - const enemyTypes = opponent.getTypes(true, true, false, true); + const enemyTypes = opponent.getTypes(true, false, false, true); /** Is this Pokemon faster than the opponent? */ 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. - */ - let atkScore = - opponent.getAttackTypeEffectiveness(types[0], this, false, true, undefined, true) * (outspeed ? 1.25 : 1); + /** * Based on how effectively this Pokemon defends against the opponent's types. * This score cannot be higher than 4. */ let defScore = 1 / Math.max(this.getAttackTypeEffectiveness(enemyTypes[0], opponent), 0.25); - if (types.length > 1) { - atkScore *= opponent.getAttackTypeEffectiveness(types[1], this); - } if (enemyTypes.length > 1) { defScore *= 1 / Math.max(this.getAttackTypeEffectiveness(enemyTypes[1], opponent, false, false, undefined, true), 0.25); } - atkScore *= 1.25; //give more value for the pokemon's typing + const moveset = this.moveset; let moveAtkScoreLength = 0; + let atkScore = 0; + // TODO: this calculation needs to consider more factors; it's currently very simplistic for (const move of moveset) { - if (move.getMove().category === MoveCategory.SPECIAL || move.getMove().category === MoveCategory.PHYSICAL) { - atkScore += opponent.getAttackTypeEffectiveness(move.getMove().type, this, false, true, undefined, true); - moveAtkScoreLength++; + const resolvedMove = move.getMove(); + // NOTE: Counter and Mirror Coat are considered as attack moves here + if (resolvedMove.category === MoveCategory.STATUS || move.getPpRatio() <= 0) { + continue; } + const moveType = resolvedMove.type; + let thisScore = opponent.getAttackTypeEffectiveness(moveType, this, false, true, undefined, true); + + // Add STAB multiplier for attack type effectiveness. + // For now, simply don't apply STAB to moves that may change type + if (this.getTypes(true).includes(moveType) && !move.getMove().hasAttr("VariableMoveTypeAttr")) { + thisScore *= 1.5; + } + + atkScore += thisScore; + moveAtkScoreLength++; } - atkScore = atkScore / (moveAtkScoreLength + 1); //calculate the median for the attack score + // Get average attack score of all damaging moves (|| 1 prevents division by zero)) + // TODO: Averaging the attack score is excessively simplistic, and doesn't reflect the AI's move selection logic + // e.g. if the mon has one 4x effective move and three 0.5x effective moves, this score would be ~1.375 + // which does not seem fair, given that if the AI were to switch, in all likelihood it would use the 4x move. + // We could consider a weighted average... + atkScore /= moveAtkScoreLength || 1; /** * Based on this Pokemon's HP ratio compared to that of the opponent. * This ratio is multiplied by 1.5 if this Pokemon outspeeds the opponent; @@ -2543,6 +2571,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { */ const hpRatio = this.getHpRatio(); const oppHpRatio = opponent.getHpRatio(); + // TODO: use better logic for predicting whether the pokemon "is dying" + // E.g., perhaps check if it would faint if the opponent were to use the same move it just used + // (twice if the user is slower) const isDying = hpRatio <= 0.2; let hpDiffRatio = hpRatio + (1 - oppHpRatio); if (isDying && this.isActive(true)) { @@ -2552,15 +2583,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { //It might not be a worthy sacrifice if it doesn't outspeed or doesn't do enough damage hpDiffRatio *= 0.85; } else { - hpDiffRatio = Math.min(1 - hpRatio + (outspeed ? 0.2 : 0.1), 1); + hpDiffRatio = 1 - hpRatio + (outspeed ? 0.2 : 0.1); } } else if (outspeed) { - hpDiffRatio = Math.min(hpDiffRatio * 1.25, 1); + hpDiffRatio = hpDiffRatio * 1.25; } else if (hpRatio > 0.2 && hpRatio <= 0.4) { - //Might be considered to be switched because it's not in low enough health - hpDiffRatio = Math.min(hpDiffRatio * 0.5, 1); + // Might be considered to be switched because it's not in low enough health + hpDiffRatio = hpDiffRatio * 0.5; } - return (atkScore + defScore) * hpDiffRatio; + return (atkScore + defScore) * Math.min(hpDiffRatio, 1); } getEvolution(): SpeciesFormEvolution | null { @@ -3345,16 +3376,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @param onField - whether to also check if the pokemon is currently on the field (defaults to true) */ getOpponents(onField = true): Pokemon[] { - return ((this.isPlayer() ? globalScene.getEnemyField() : globalScene.getPlayerField()) as Pokemon[]).filter(p => + return (this.isPlayer() ? globalScene.getEnemyField() : globalScene.getPlayerField()).filter(p => p.isActive(onField), ); } getOpponentDescriptor(): string { - const opponents = this.getOpponents(); - if (opponents.length === 1) { - return opponents[0].name; - } return this.isPlayer() ? i18next.t("arenaTag:opposingTeam") : i18next.t("arenaTag:yourTeam"); } diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 8ac896e2717..7186cc4e928 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -1,29 +1,31 @@ import { globalScene } from "#app/global-scene"; -import { pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import type { TrainerConfig } from "#app/data/trainers/trainer-config"; -import type { TrainerPartyTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { trainerPartyTemplates } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerPartyCompoundTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { TrainerPoolTier } from "#enums/trainer-pool-tier"; -import { TeraAIMode } from "#enums/tera-ai-mode"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { randSeedWeightedItem, randSeedItem, randSeedInt } from "#app/utils/common"; -import type { PersistentModifier } from "#app/modifier/modifier"; -import { ArenaTrapTag } from "#app/data/arena-tag"; +import { pokemonPrevolutions } from "#balance/pokemon-evolutions"; +import { signatureSpecies } from "#balance/signature-species"; +import { ArenaTrapTag } from "#data/arena-tag"; +import type { PokemonSpecies } from "#data/pokemon-species"; import { ArenaTagSide } from "#enums/arena-tag-side"; -import { getIsInitialized, initI18n } from "#app/plugins/i18n"; -import i18next from "i18next"; import { PartyMemberStrength } from "#enums/party-member-strength"; import { SpeciesId } from "#enums/species-id"; +import { TeraAIMode } from "#enums/tera-ai-mode"; +import { TrainerPoolTier } from "#enums/trainer-pool-tier"; +import { TrainerSlot } from "#enums/trainer-slot"; import { TrainerType } from "#enums/trainer-type"; -import { signatureSpecies } from "#app/data/balance/signature-species"; import { TrainerVariant } from "#enums/trainer-variant"; +import type { EnemyPokemon } from "#field/pokemon"; +import type { PersistentModifier } from "#modifiers/modifier"; +import { getIsInitialized, initI18n } from "#plugins/i18n"; +import type { TrainerConfig } from "#trainers/trainer-config"; +import { trainerConfigs } from "#trainers/trainer-config"; +import { + TrainerPartyCompoundTemplate, + type TrainerPartyTemplate, + trainerPartyTemplates, +} from "#trainers/trainer-party-template"; +import { randSeedInt, randSeedItem, randSeedWeightedItem } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; -export default class Trainer extends Phaser.GameObjects.Container { +export class Trainer extends Phaser.GameObjects.Container { public config: TrainerConfig; public variant: TrainerVariant; public partyTemplateIndex: number; @@ -421,7 +423,8 @@ export default class Trainer extends Phaser.GameObjects.Container { // If useNewSpeciesPool is true, we need to generate a new species from the new species pool, otherwise we generate a random species let species = useNewSpeciesPool - ? getPokemonSpecies(newSpeciesPool[Math.floor(randSeedInt(newSpeciesPool.length))]) + ? // TODO: should this use `randSeedItem`? + getPokemonSpecies(newSpeciesPool[Math.floor(randSeedInt(newSpeciesPool.length))]) : template.isSameSpecies(index) && index > offset ? getPokemonSpecies( battle.enemyParty[offset].species.getTrainerSpeciesForLevel( @@ -619,6 +622,8 @@ export default class Trainer extends Phaser.GameObjects.Container { if (maxScorePartyMemberIndexes.length > 1) { let rand: number; + // TODO: should this use `randSeedItem`? + globalScene.executeWithSeedOffset( () => (rand = randSeedInt(maxScorePartyMemberIndexes.length)), globalScene.currentBattle.turn << 2, diff --git a/src/game-mode.ts b/src/game-mode.ts index da6ef62e33c..c5ab120e218 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -1,21 +1,21 @@ -import i18next from "i18next"; -import type { FixedBattleConfigs } from "./battle"; -import { classicFixedBattles, FixedBattleConfig } from "./battle"; -import type { Challenge } from "./data/challenge"; -import { allChallenges, applyChallenges, copyChallenge } from "./data/challenge"; -import { ChallengeType } from "#enums/challenge-type"; -import type PokemonSpecies from "./data/pokemon-species"; -import { allSpecies } from "#app/data/data-lists"; -import type { Arena } from "./field/arena"; -import Overrides from "#app/overrides"; -import { isNullOrUndefined, randSeedInt, randSeedItem } from "#app/utils/common"; -import { BiomeId } from "#enums/biome-id"; -import { SpeciesId } from "#enums/species-id"; -import { Challenges } from "./enums/challenges"; +import { FixedBattleConfig } from "#app/battle"; +import { CHALLENGE_MODE_MYSTERY_ENCOUNTER_WAVES, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; import { globalScene } from "#app/global-scene"; -import { getDailyStartingBiome } from "./data/daily-run"; -import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES, CHALLENGE_MODE_MYSTERY_ENCOUNTER_WAVES } from "./constants"; +import Overrides from "#app/overrides"; +import type { Challenge } from "#data/challenge"; +import { allChallenges, applyChallenges, copyChallenge } from "#data/challenge"; +import { getDailyStartingBiome } from "#data/daily-run"; +import { allSpecies } from "#data/data-lists"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { BiomeId } from "#enums/biome-id"; +import { ChallengeType } from "#enums/challenge-type"; +import { Challenges } from "#enums/challenges"; import { GameModes } from "#enums/game-modes"; +import { SpeciesId } from "#enums/species-id"; +import type { Arena } from "#field/arena"; +import { classicFixedBattles, type FixedBattleConfigs } from "#trainers/fixed-battle-configs"; +import { isNullOrUndefined, randSeedInt, randSeedItem } from "#utils/common"; +import i18next from "i18next"; interface GameModeConfig { isClassic?: boolean; @@ -164,14 +164,14 @@ export class GameMode implements GameModeConfig { if (waveIndex % 10 !== 1 && waveIndex % 10) { /** * Do not check X1 floors since there's a bug that stops trainer sprites from appearing - * after a X0 full party heal + * after a X0 full party heal, this also allows for a smoother biome transition for general gameplay feel */ const trainerChance = arena.getTrainerChance(); let allowTrainerBattle = true; if (trainerChance) { const waveBase = Math.floor(waveIndex / 10) * 10; - // Stop generic trainers from spawning in within 3 waves of a trainer battle - for (let w = Math.max(waveIndex - 3, waveBase + 2); w <= Math.min(waveIndex + 3, waveBase + 9); w++) { + // Stop generic trainers from spawning in within 2 waves of a fixed trainer battle + for (let w = Math.max(waveIndex - 2, waveBase + 2); w <= Math.min(waveIndex + 2, waveBase + 9); w++) { if (w === waveIndex) { continue; } diff --git a/src/global-event-manager.ts b/src/global-event-manager.ts index 3df3d17b5e9..5b67b4a6cc6 100644 --- a/src/global-event-manager.ts +++ b/src/global-event-manager.ts @@ -1,3 +1,3 @@ -import { TimedEventManager } from "./timed-event-manager"; +import { TimedEventManager } from "#app/timed-event-manager"; export const timedEventManager = new TimedEventManager(); diff --git a/src/global-scene.ts b/src/global-scene.ts index 76071bd7fac..3cc5a904db7 100644 --- a/src/global-scene.ts +++ b/src/global-scene.ts @@ -1,4 +1,4 @@ -import type BattleScene from "#app/battle-scene"; +import type { BattleScene } from "#app/battle-scene"; export let globalScene: BattleScene; diff --git a/src/inputs-controller.ts b/src/inputs-controller.ts index 388802f467e..1607e4ee74f 100644 --- a/src/inputs-controller.ts +++ b/src/inputs-controller.ts @@ -1,23 +1,23 @@ -import Phaser from "phaser"; -import { getEnumValues } from "#app/utils/common"; -import { deepCopy } from "#app/utils/data"; -import pad_generic from "./configs/inputs/pad_generic"; -import pad_unlicensedSNES from "./configs/inputs/pad_unlicensedSNES"; -import pad_xbox360 from "./configs/inputs/pad_xbox360"; -import pad_dualshock from "./configs/inputs/pad_dualshock"; -import pad_procon from "./configs/inputs/pad_procon"; -import { UiMode } from "#enums/ui-mode"; -import type SettingsGamepadUiHandler from "./ui/settings/settings-gamepad-ui-handler"; -import type SettingsKeyboardUiHandler from "./ui/settings/settings-keyboard-ui-handler"; -import cfg_keyboard_qwerty from "./configs/inputs/cfg_keyboard_qwerty"; -import { assign, getButtonWithKeycode, getIconForLatestInput, swap } from "#app/configs/inputs/configHandler"; import { globalScene } from "#app/global-scene"; -import type { SettingGamepad } from "#app/system/settings/settings-gamepad"; -import type { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import TouchControl from "#app/touch-controls"; +import { TouchControl } from "#app/touch-controls"; import { Button } from "#enums/buttons"; import { Device } from "#enums/devices"; -import MoveTouchControlsHandler from "./ui/settings/move-touch-controls-handler"; +import { UiMode } from "#enums/ui-mode"; +import cfg_keyboard_qwerty from "#inputs/cfg_keyboard_qwerty"; +import { assign, getButtonWithKeycode, getIconForLatestInput, swap } from "#inputs/configHandler"; +import pad_dualshock from "#inputs/pad_dualshock"; +import pad_generic from "#inputs/pad_generic"; +import pad_procon from "#inputs/pad_procon"; +import pad_unlicensedSNES from "#inputs/pad_unlicensedSNES"; +import pad_xbox360 from "#inputs/pad_xbox360"; +import type { SettingGamepad } from "#system/settings-gamepad"; +import type { SettingKeyboard } from "#system/settings-keyboard"; +import { MoveTouchControlsHandler } from "#ui/move-touch-controls-handler"; +import type { SettingsGamepadUiHandler } from "#ui/settings-gamepad-ui-handler"; +import type { SettingsKeyboardUiHandler } from "#ui/settings-keyboard-ui-handler"; +import { deepCopy } from "#utils/data"; +import { getEnumValues } from "#utils/enums"; +import Phaser from "phaser"; export interface DeviceMapping { [key: string]: number; diff --git a/src/loading-scene.ts b/src/loading-scene.ts index 5491930715c..eb6883e0c68 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -1,28 +1,29 @@ -import { GachaType } from "#enums/gacha-types"; -import { getBiomeHasProps } from "#app/field/arena"; -import CacheBustedLoaderPlugin from "#app/plugins/cache-busted-loader-plugin"; +import { initAbilities } from "#abilities/ability"; +import { timedEventManager } from "#app/global-event-manager"; import { SceneBase } from "#app/scene-base"; -import { WindowVariant, getWindowVariantSuffix } from "#app/ui/ui-theme"; import { isMobile } from "#app/touch-controls"; -import { localPing, getEnumValues, hasAllLocalizedSprites } from "#app/utils/common"; -import { initPokemonPrevolutions, initPokemonStarters } from "#app/data/balance/pokemon-evolutions"; -import { initBiomes } from "#app/data/balance/biomes"; -import { initEggMoves } from "#app/data/balance/egg-moves"; -import { initPokemonForms } from "#app/data/pokemon-forms"; -import { initSpecies } from "#app/data/pokemon-species"; -import { initMoves } from "#app/data/moves/move"; -import { initAbilities } from "#app/data/abilities/ability"; -import { initAchievements } from "#app/system/achv"; -import { initTrainerTypeDialogue } from "#app/data/dialogue"; -import { initChallenges } from "#app/data/challenge"; -import i18next from "i18next"; -import { initStatsKeys } from "#app/ui/game-stats-ui-handler"; -import { initVouchers } from "#app/system/voucher"; +import { initBiomes } from "#balance/biomes"; +import { initEggMoves } from "#balance/egg-moves"; +import { initPokemonPrevolutions, initPokemonStarters } from "#balance/pokemon-evolutions"; +import { initChallenges } from "#data/challenge"; +import { initTrainerTypeDialogue } from "#data/dialogue"; +import { initPokemonForms } from "#data/pokemon-forms"; +import { initSpecies } from "#data/pokemon-species"; import { BiomeId } from "#enums/biome-id"; -import { initMysteryEncounters } from "#app/data/mystery-encounters/mystery-encounters"; -import { timedEventManager } from "./global-event-manager"; -import { initModifierPools } from "./modifier/init-modifier-pools"; -import { initModifierTypes } from "./modifier/modifier-type"; +import { GachaType } from "#enums/gacha-types"; +import { getBiomeHasProps } from "#field/arena"; +import { initModifierPools } from "#modifiers/init-modifier-pools"; +import { initModifierTypes } from "#modifiers/modifier-type"; +import { initMoves } from "#moves/move"; +import { initMysteryEncounters } from "#mystery-encounters/mystery-encounters"; +import { CacheBustedLoaderPlugin } from "#plugins/cache-busted-loader-plugin"; +import { initAchievements } from "#system/achv"; +import { initVouchers } from "#system/voucher"; +import { initStatsKeys } from "#ui/game-stats-ui-handler"; +import { getWindowVariantSuffix, WindowVariant } from "#ui/ui-theme"; +import { hasAllLocalizedSprites, localPing } from "#utils/common"; +import { getEnumValues } from "#utils/enums"; +import i18next from "i18next"; export class LoadingScene extends SceneBase { public static readonly KEY = "loading"; diff --git a/src/main.ts b/src/main.ts index 38bfcbe5636..9063ac0ec5b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,14 @@ +import "#app/polyfills"; +// All polyfills MUST be loaded first for side effects + +import { InvertPostFX } from "#app/pipelines/invert"; +import { initI18n } from "#app/plugins/i18n"; +import { version } from "#package.json"; import Phaser from "phaser"; -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"; import TransitionImagePackPlugin from "phaser3-rex-plugins/templates/transitionimagepack/transitionimagepack-plugin"; -import { initI18n } from "./plugins/i18n"; +import UIPlugin from "phaser3-rex-plugins/templates/ui/ui-plugin"; // Catch global errors and display them in an alert so users can report the issue. window.onerror = (_message, _source, _lineno, _colno, error) => { @@ -46,7 +49,7 @@ let game; const startGame = async (manifest?: any) => { await initI18n(); const LoadingScene = (await import("./loading-scene")).LoadingScene; - const BattleScene = (await import("./battle-scene")).default; + const BattleScene = (await import("./battle-scene")).BattleScene; game = new Phaser.Game({ type: Phaser.WEBGL, parent: "app", diff --git a/src/messages.ts b/src/messages.ts index 21473eb8361..177b4cc9b05 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; import { BattleSpec } from "#enums/battle-spec"; -import type Pokemon from "./field/pokemon"; +import type { Pokemon } from "#field/pokemon"; import i18next from "i18next"; /** diff --git a/src/modifier/init-modifier-pools.ts b/src/modifier/init-modifier-pools.ts index 60697333600..316d4dae741 100644 --- a/src/modifier/init-modifier-pools.ts +++ b/src/modifier/init-modifier-pools.ts @@ -1,31 +1,37 @@ -import type Pokemon from "#app/field/pokemon"; +/* biome-ignore-start lint/correctness/noUnusedImports: tsdoc imports */ +import type { initModifierTypes } from "#modifiers/modifier-type"; +/* biome-ignore-end lint/correctness/noUnusedImports: tsdoc imports */ + +import { timedEventManager } from "#app/global-event-manager"; +import { globalScene } from "#app/global-scene"; +import { pokemonEvolutions } from "#balance/pokemon-evolutions"; +import { modifierTypes } from "#data/data-lists"; +import { MAX_PER_TYPE_POKEBALLS } from "#data/pokeball"; +import { AbilityId } from "#enums/ability-id"; +import { BerryType } from "#enums/berry-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { PokeballType } from "#enums/pokeball"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { Unlockables } from "#enums/unlockables"; +import type { Pokemon } from "#field/pokemon"; +import { + BerryModifier, + DoubleBattleChanceBoosterModifier, + SpeciesCritBoosterModifier, + TurnStatusEffectModifier, +} from "#modifiers/modifier"; import { dailyStarterModifierPool, enemyBuffModifierPool, modifierPool, trainerModifierPool, wildModifierPool, -} from "#app/modifier/modifier-pools"; -import { globalScene } from "#app/global-scene"; -import { DoubleBattleChanceBoosterModifier, SpeciesCritBoosterModifier, TurnStatusEffectModifier } from "./modifier"; -import { WeightedModifierType } from "./modifier-type"; -import { ModifierTier } from "../enums/modifier-tier"; -import type { WeightedModifierTypeWeightFunc } from "#app/@types/modifier-types"; -import { modifierTypes } from "#app/data/data-lists"; -import { PokeballType } from "#enums/pokeball"; -import { BerryModifier } from "./modifier"; -import { BerryType } from "#enums/berry-type"; -import { SpeciesId } from "#enums/species-id"; -import { timedEventManager } from "#app/global-event-manager"; -import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; -import { Unlockables } from "#enums/unlockables"; -import { isNullOrUndefined } from "#app/utils/common"; -import { MoveId } from "#enums/move-id"; -import { StatusEffect } from "#enums/status-effect"; -import { AbilityId } from "#enums/ability-id"; -import { MAX_PER_TYPE_POKEBALLS } from "#app/data/pokeball"; -// biome-ignore lint/correctness/noUnusedImports: This is used in a tsdoc comment -import type { initModifierTypes } from "./modifier-type"; +} from "#modifiers/modifier-pools"; +import { WeightedModifierType } from "#modifiers/modifier-type"; +import type { WeightedModifierTypeWeightFunc } from "#types/modifier-types"; +import { isNullOrUndefined } from "#utils/common"; /** * Initialize the wild modifier pool diff --git a/src/modifier/modifier-pools.ts b/src/modifier/modifier-pools.ts index 3396dca1f93..d66511e3239 100644 --- a/src/modifier/modifier-pools.ts +++ b/src/modifier/modifier-pools.ts @@ -1,9 +1,9 @@ -/** +/* * Contains modifier pools for different contexts in the game. * Can be safely imported without worrying about circular dependencies. */ -import type { ModifierPool } from "#app/@types/modifier-types"; +import type { ModifierPool } from "#types/modifier-types"; export const modifierPool: ModifierPool = {}; diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 96aea699eff..b359ec756e6 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1,19 +1,32 @@ +import { TYPE_BOOST_ITEM_BOOST_PERCENT } from "#app/constants"; +import { timedEventManager } from "#app/global-event-manager"; import { globalScene } from "#app/global-scene"; -import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; -import { tmPoolTiers, tmSpecies } from "#app/data/balance/tms"; -import { getBerryEffectDescription, getBerryName } from "#app/data/berry"; -import { allMoves, modifierTypes } from "#app/data/data-lists"; -import { getNatureName, getNatureStatMultiplier } from "#app/data/nature"; -import { getPokeballCatchMultiplier, getPokeballName } from "#app/data/pokeball"; -import { pokemonFormChanges, SpeciesFormChangeCondition } from "#app/data/pokemon-forms"; -import { SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { FormChangeItem } from "#enums/form-change-item"; -import { getStatusEffectDescriptor } from "#app/data/status-effect"; -import { PokemonType } from "#enums/pokemon-type"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; +import Overrides from "#app/overrides"; +import { EvolutionItem, pokemonEvolutions } from "#balance/pokemon-evolutions"; +import { tmPoolTiers, tmSpecies } from "#balance/tms"; +import { getBerryEffectDescription, getBerryName } from "#data/berry"; +import { allMoves, modifierTypes } from "#data/data-lists"; +import { SpeciesFormChangeItemTrigger } from "#data/form-change-triggers"; +import { getNatureName, getNatureStatMultiplier } from "#data/nature"; +import { getPokeballCatchMultiplier, getPokeballName } from "#data/pokeball"; +import { pokemonFormChanges, SpeciesFormChangeCondition } from "#data/pokemon-forms"; +import { getStatusEffectDescriptor } from "#data/status-effect"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BerryType } from "#enums/berry-type"; +import { FormChangeItem } from "#enums/form-change-item"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { Nature } from "#enums/nature"; +import { PokeballType } from "#enums/pokeball"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesFormKey } from "#enums/species-form-key"; +import { SpeciesId } from "#enums/species-id"; +import type { PermanentStat, TempBattleStat } from "#enums/stat"; +import { getStatKey, Stat, TEMP_BATTLE_STATS } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon"; import { AddPokeballModifier, AddVoucherModifier, @@ -24,6 +37,7 @@ import { BypassSpeedChanceModifier, ContactHeldItemTransferChanceModifier, CritBoosterModifier, + CriticalCatchChanceBoosterModifier, DamageMoneyRewardModifier, DoubleBattleChanceBoosterModifier, EnemyAttackStatusEffectChanceModifier, @@ -31,6 +45,7 @@ import { EnemyDamageReducerModifier, EnemyEndureChanceModifier, EnemyFusionChanceModifier, + type EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, EvolutionItemModifier, @@ -40,6 +55,7 @@ import { ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, + FieldEffectModifier, FlinchChanceModifier, FusePokemonModifier, GigantamaxAccessModifier, @@ -52,10 +68,12 @@ import { LockModifierTiersModifier, MapModifier, MegaEvolutionAccessModifier, + type Modifier, MoneyInterestModifier, MoneyMultiplierModifier, MoneyRewardModifier, MultipleParticipantExpBonusModifier, + type PersistentModifier, PokemonAllMovePpRestoreModifier, PokemonBaseStatFlatModifier, PokemonBaseStatTotalModifier, @@ -83,6 +101,7 @@ import { SurviveDamageModifier, SwitchEffectTransferModifier, TempCritBoosterModifier, + TempExtraModifierModifier, TempStatStageBoosterModifier, TerastallizeAccessModifier, TerrastalizeModifier, @@ -90,44 +109,17 @@ import { TurnHealModifier, TurnHeldItemTransferModifier, TurnStatusEffectModifier, - type EnemyPersistentModifier, - type Modifier, - type PersistentModifier, - TempExtraModifierModifier, - CriticalCatchChanceBoosterModifier, - FieldEffectModifier, -} from "#app/modifier/modifier"; -import { ModifierTier } from "#enums/modifier-tier"; -import Overrides from "#app/overrides"; -import { getVoucherTypeIcon, getVoucherTypeName, VoucherType } from "#app/system/voucher"; -import type { PokemonMoveSelectFilter, PokemonSelectFilter } from "#app/ui/party-ui-handler"; -import PartyUiHandler from "#app/ui/party-ui-handler"; -import { getModifierTierTextTint } from "#app/ui/text"; -import { - formatMoney, - getEnumKeys, - getEnumValues, - isNullOrUndefined, - NumberHolder, - padInt, - randSeedInt, -} from "#app/utils/common"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { BerryType } from "#enums/berry-type"; -import { MoveId } from "#enums/move-id"; -import { Nature } from "#enums/nature"; -import { PokeballType } from "#enums/pokeball"; -import { SpeciesId } from "#enums/species-id"; -import { SpeciesFormKey } from "#enums/species-form-key"; -import type { PermanentStat, TempBattleStat } from "#enums/stat"; -import { getStatKey, Stat, TEMP_BATTLE_STATS } from "#enums/stat"; -import { StatusEffect } from "#enums/status-effect"; +} from "#modifiers/modifier"; +import type { PokemonMove } from "#moves/pokemon-move"; +import { getVoucherTypeIcon, getVoucherTypeName, VoucherType } from "#system/voucher"; +import type { ModifierTypeFunc, WeightedModifierTypeWeightFunc } from "#types/modifier-types"; +import type { PokemonMoveSelectFilter, PokemonSelectFilter } from "#ui/party-ui-handler"; +import { PartyUiHandler } from "#ui/party-ui-handler"; +import { getModifierTierTextTint } from "#ui/text"; +import { formatMoney, isNullOrUndefined, NumberHolder, padInt, randSeedInt, randSeedItem } from "#utils/common"; +import { getEnumKeys, getEnumValues } from "#utils/enums"; +import { getModifierPoolForType, getModifierType } from "#utils/modifier-utils"; import i18next from "i18next"; -import { timedEventManager } from "#app/global-event-manager"; -import { TYPE_BOOST_ITEM_BOOST_PERCENT } from "#app/constants"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { getModifierPoolForType, getModifierType } from "#app/utils/modifier-utils"; -import type { ModifierTypeFunc, WeightedModifierTypeWeightFunc } from "#app/@types/modifier-types"; const outputModifierData = false; const useMaxWeightForOutput = false; @@ -1525,6 +1517,7 @@ class TmModifierTypeGenerator extends ModifierTypeGenerator { if (!tierUniqueCompatibleTms.length) { return null; } + // TODO: should this use `randSeedItem`? const randTmIndex = randSeedInt(tierUniqueCompatibleTms.length); return new TmModifierType(tierUniqueCompatibleTms[randTmIndex]); }); @@ -1578,6 +1571,7 @@ class EvolutionItemModifierTypeGenerator extends ModifierTypeGenerator { return null; } + // TODO: should this use `randSeedItem`? return new EvolutionItemModifierType(evolutionItemPool[randSeedInt(evolutionItemPool.length)]!); // TODO: is the bang correct? }); } @@ -1663,6 +1657,7 @@ export class FormChangeItemModifierTypeGenerator extends ModifierTypeGenerator { return null; } + // TODO: should this use `randSeedItem`? return new FormChangeItemModifierType(formChangeItemPool[randSeedInt(formChangeItemPool.length)]); }); } @@ -1933,7 +1928,7 @@ const modifierTypeInitObj = Object.freeze({ if (pregenArgs && pregenArgs.length === 1 && pregenArgs[0] in Nature) { return new PokemonNatureChangeModifierType(pregenArgs[0] as Nature); } - return new PokemonNatureChangeModifierType(randSeedInt(getEnumValues(Nature).length) as Nature); + return new PokemonNatureChangeModifierType(randSeedItem(getEnumValues(Nature))); }), MYSTICAL_ROCK: () => diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 93fb5f5b6f4..79bd849e5ba 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -1,30 +1,29 @@ -import { FusionSpeciesFormEvolution, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; -import { getBerryEffectFunc, getBerryPredicate } from "#app/data/berry"; -import { getLevelTotalExp } from "#app/data/exp"; -import { allMoves, modifierTypes } from "#app/data/data-lists"; -import { MAX_PER_TYPE_POKEBALLS } from "#app/data/pokeball"; -import { SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import type { FormChangeItem } from "#enums/form-change-item"; -import { getStatusEffectHealText } from "#app/data/status-effect"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; +import { globalScene } from "#app/global-scene"; import { getPokemonNameWithAffix } from "#app/messages"; import Overrides from "#app/overrides"; -import { LearnMoveType } from "#enums/learn-move-type"; -import type { VoucherType } from "#app/system/voucher"; -import { Command } from "#enums/command"; -import { addTextObject, TextStyle } from "#app/ui/text"; -import { BooleanHolder, hslToHex, isNullOrUndefined, NumberHolder, randSeedFloat, toDmgValue } from "#app/utils/common"; +import { FusionSpeciesFormEvolution, pokemonEvolutions } from "#balance/pokemon-evolutions"; +import { FRIENDSHIP_GAIN_FROM_RARE_CANDY } from "#balance/starters"; +import { getBerryEffectFunc, getBerryPredicate } from "#data/berry"; +import { allMoves, modifierTypes } from "#data/data-lists"; +import { getLevelTotalExp } from "#data/exp"; +import { SpeciesFormChangeItemTrigger } from "#data/form-change-triggers"; +import { MAX_PER_TYPE_POKEBALLS } from "#data/pokeball"; +import { getStatusEffectHealText } from "#data/status-effect"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; +import { Color, ShadowColor } from "#enums/color"; +import { Command } from "#enums/command"; +import type { FormChangeItem } from "#enums/form-change-item"; +import { LearnMoveType } from "#enums/learn-move-type"; import type { MoveId } from "#enums/move-id"; import type { Nature } from "#enums/nature"; import type { PokeballType } from "#enums/pokeball"; -import { SpeciesId } from "#enums/species-id"; -import { type PermanentStat, type TempBattleStat, BATTLE_STATS, Stat, TEMP_BATTLE_STATS } from "#enums/stat"; -import { StatusEffect } from "#enums/status-effect"; import type { PokemonType } from "#enums/pokemon-type"; -import i18next from "i18next"; +import { SpeciesId } from "#enums/species-id"; +import { BATTLE_STATS, type PermanentStat, Stat, TEMP_BATTLE_STATS, type TempBattleStat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; import type { DoubleBattleChanceBoosterModifierType, EvolutionItemModifierType, @@ -38,13 +37,13 @@ import type { PokemonMultiHitModifierType, TerastallizeModifierType, TmModifierType, -} from "./modifier-type"; -import { getModifierType } from "#app/utils/modifier-utils"; -import { Color, ShadowColor } from "#enums/color"; -import { FRIENDSHIP_GAIN_FROM_RARE_CANDY } from "#app/data/balance/starters"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { globalScene } from "#app/global-scene"; -import type { ModifierInstanceMap, ModifierString } from "#app/@types/modifier-types"; +} from "#modifiers/modifier-type"; +import type { VoucherType } from "#system/voucher"; +import type { ModifierInstanceMap, ModifierString } from "#types/modifier-types"; +import { addTextObject, TextStyle } from "#ui/text"; +import { BooleanHolder, hslToHex, isNullOrUndefined, NumberHolder, randSeedFloat, toDmgValue } from "#utils/common"; +import { getModifierType } from "#utils/modifier-utils"; +import i18next from "i18next"; export type ModifierPredicate = (modifier: Modifier) => boolean; diff --git a/src/overrides.ts b/src/overrides.ts index ea50e9b088c..de0d1d3f30a 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -1,8 +1,6 @@ import { type PokeballCounts } from "#app/battle-scene"; -import { EvolutionItem } from "#app/data/balance/pokemon-evolutions"; -import { Gender } from "#app/data/gender"; -import { type ModifierOverride } from "#app/modifier/modifier-type"; -import { Variant } from "#app/sprites/variant"; +import { EvolutionItem } from "#balance/pokemon-evolutions"; +import { Gender } from "#data/gender"; import { AbilityId } from "#enums/ability-id"; import { BattleType } from "#enums/battle-type"; import { BerryType } from "#enums/berry-type"; @@ -23,6 +21,8 @@ import { TrainerType } from "#enums/trainer-type"; import { Unlockables } from "#enums/unlockables"; import { VariantTier } from "#enums/variant-tier"; import { WeatherType } from "#enums/weather-type"; +import { type ModifierOverride } from "#modifiers/modifier-type"; +import { Variant } from "#sprites/variant"; /** * This comment block exists to prevent IDEs from automatically removing unused imports diff --git a/src/phase-manager.ts b/src/phase-manager.ts index a4256f110ef..7c1f2986593 100644 --- a/src/phase-manager.ts +++ b/src/phase-manager.ts @@ -1,104 +1,104 @@ -import type { Phase } from "#app/phase"; -import type { default as Pokemon } from "#app/field/pokemon"; -import type { PhaseMap, PhaseString } from "./@types/phase-types"; import { globalScene } from "#app/global-scene"; -import { ActivatePriorityQueuePhase } from "#app/phases/activate-priority-queue-phase"; -import { AddEnemyBuffModifierPhase } from "#app/phases/add-enemy-buff-modifier-phase"; -import { AttemptCapturePhase } from "#app/phases/attempt-capture-phase"; -import { AttemptRunPhase } from "#app/phases/attempt-run-phase"; -import { BattleEndPhase } from "#app/phases/battle-end-phase"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CheckStatusEffectPhase } from "#app/phases/check-status-effect-phase"; -import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { CommonAnimPhase } from "#app/phases/common-anim-phase"; -import { coerceArray, type Constructor } from "#app/utils/common"; -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; +import type { Phase } from "#app/phase"; +import { type PhasePriorityQueue, PostSummonPhasePriorityQueue } from "#data/phase-priority-queue"; import type { DynamicPhaseType } from "#enums/dynamic-phase-type"; -import { EggHatchPhase } from "#app/phases/egg-hatch-phase"; -import { EggLapsePhase } from "#app/phases/egg-lapse-phase"; -import { EggSummaryPhase } from "#app/phases/egg-summary-phase"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { EndCardPhase } from "#app/phases/end-card-phase"; -import { EndEvolutionPhase } from "#app/phases/end-evolution-phase"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { EvolutionPhase } from "#app/phases/evolution-phase"; -import { ExpPhase } from "#app/phases/exp-phase"; -import { FaintPhase } from "#app/phases/faint-phase"; -import { FormChangePhase } from "#app/phases/form-change-phase"; -import { GameOverModifierRewardPhase } from "#app/phases/game-over-modifier-reward-phase"; -import { GameOverPhase } from "#app/phases/game-over-phase"; -import { HideAbilityPhase } from "#app/phases/hide-ability-phase"; -import { HidePartyExpBarPhase } from "#app/phases/hide-party-exp-bar-phase"; -import { LearnMovePhase } from "#app/phases/learn-move-phase"; -import { LevelCapPhase } from "#app/phases/level-cap-phase"; -import { LevelUpPhase } from "#app/phases/level-up-phase"; -import { LoadMoveAnimPhase } from "#app/phases/load-move-anim-phase"; -import { LoginPhase } from "#app/phases/login-phase"; -import { MessagePhase } from "#app/phases/message-phase"; -import { ModifierRewardPhase } from "#app/phases/modifier-reward-phase"; -import { MoneyRewardPhase } from "#app/phases/money-reward-phase"; -import { MoveAnimPhase } from "#app/phases/move-anim-phase"; -import { MoveChargePhase } from "#app/phases/move-charge-phase"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { MoveHeaderPhase } from "#app/phases/move-header-phase"; -import { MovePhase } from "#app/phases/move-phase"; +import type { Pokemon } from "#field/pokemon"; +import { ActivatePriorityQueuePhase } from "#phases/activate-priority-queue-phase"; +import { AddEnemyBuffModifierPhase } from "#phases/add-enemy-buff-modifier-phase"; +import { AttemptCapturePhase } from "#phases/attempt-capture-phase"; +import { AttemptRunPhase } from "#phases/attempt-run-phase"; +import { BattleEndPhase } from "#phases/battle-end-phase"; +import { BerryPhase } from "#phases/berry-phase"; +import { CheckStatusEffectPhase } from "#phases/check-status-effect-phase"; +import { CheckSwitchPhase } from "#phases/check-switch-phase"; +import { CommandPhase } from "#phases/command-phase"; +import { CommonAnimPhase } from "#phases/common-anim-phase"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { EggHatchPhase } from "#phases/egg-hatch-phase"; +import { EggLapsePhase } from "#phases/egg-lapse-phase"; +import { EggSummaryPhase } from "#phases/egg-summary-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { EndCardPhase } from "#phases/end-card-phase"; +import { EndEvolutionPhase } from "#phases/end-evolution-phase"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { EvolutionPhase } from "#phases/evolution-phase"; +import { ExpPhase } from "#phases/exp-phase"; +import { FaintPhase } from "#phases/faint-phase"; +import { FormChangePhase } from "#phases/form-change-phase"; +import { GameOverModifierRewardPhase } from "#phases/game-over-modifier-reward-phase"; +import { GameOverPhase } from "#phases/game-over-phase"; +import { HideAbilityPhase } from "#phases/hide-ability-phase"; +import { HidePartyExpBarPhase } from "#phases/hide-party-exp-bar-phase"; +import { LearnMovePhase } from "#phases/learn-move-phase"; +import { LevelCapPhase } from "#phases/level-cap-phase"; +import { LevelUpPhase } from "#phases/level-up-phase"; +import { LoadMoveAnimPhase } from "#phases/load-move-anim-phase"; +import { LoginPhase } from "#phases/login-phase"; +import { MessagePhase } from "#phases/message-phase"; +import { ModifierRewardPhase } from "#phases/modifier-reward-phase"; +import { MoneyRewardPhase } from "#phases/money-reward-phase"; +import { MoveAnimPhase } from "#phases/move-anim-phase"; +import { MoveChargePhase } from "#phases/move-charge-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { MoveHeaderPhase } from "#phases/move-header-phase"; +import { MovePhase } from "#phases/move-phase"; import { - MysteryEncounterPhase, - MysteryEncounterOptionSelectedPhase, MysteryEncounterBattlePhase, + MysteryEncounterBattleStartCleanupPhase, + MysteryEncounterOptionSelectedPhase, + MysteryEncounterPhase, MysteryEncounterRewardsPhase, PostMysteryEncounterPhase, - MysteryEncounterBattleStartCleanupPhase, -} from "#app/phases/mystery-encounter-phases"; -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 { ObtainStatusEffectPhase } from "#app/phases/obtain-status-effect-phase"; -import { PartyExpPhase } from "#app/phases/party-exp-phase"; -import { PartyHealPhase } from "#app/phases/party-heal-phase"; -import { type PhasePriorityQueue, PostSummonPhasePriorityQueue } from "#app/data/phase-priority-queue"; -import { PokemonAnimPhase } from "#app/phases/pokemon-anim-phase"; -import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; -import { PokemonTransformPhase } from "#app/phases/pokemon-transform-phase"; -import { PostGameOverPhase } from "#app/phases/post-game-over-phase"; -import { PostSummonPhase } from "#app/phases/post-summon-phase"; -import { PostTurnStatusEffectPhase } from "#app/phases/post-turn-status-effect-phase"; -import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; -import { ReloadSessionPhase } from "#app/phases/reload-session-phase"; -import { ResetStatusPhase } from "#app/phases/reset-status-phase"; -import { ReturnPhase } from "#app/phases/return-phase"; -import { RevivalBlessingPhase } from "#app/phases/revival-blessing-phase"; -import { RibbonModifierRewardPhase } from "#app/phases/ribbon-modifier-reward-phase"; -import { ScanIvsPhase } from "#app/phases/scan-ivs-phase"; -import { SelectBiomePhase } from "#app/phases/select-biome-phase"; -import { SelectChallengePhase } from "#app/phases/select-challenge-phase"; -import { SelectGenderPhase } from "#app/phases/select-gender-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -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 { ShowPartyExpBarPhase } from "#app/phases/show-party-exp-bar-phase"; -import { ShowTrainerPhase } from "#app/phases/show-trainer-phase"; -import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; -import { SummonMissingPhase } from "#app/phases/summon-missing-phase"; -import { SummonPhase } from "#app/phases/summon-phase"; -import { SwitchBiomePhase } from "#app/phases/switch-biome-phase"; -import { SwitchPhase } from "#app/phases/switch-phase"; -import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; -import { TeraPhase } from "#app/phases/tera-phase"; -import { TitlePhase } from "#app/phases/title-phase"; -import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase"; -import { TrainerVictoryPhase } from "#app/phases/trainer-victory-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; -import { UnavailablePhase } from "#app/phases/unavailable-phase"; -import { UnlockPhase } from "#app/phases/unlock-phase"; -import { VictoryPhase } from "#app/phases/victory-phase"; -import { WeatherEffectPhase } from "#app/phases/weather-effect-phase"; +} from "#phases/mystery-encounter-phases"; +import { NewBattlePhase } from "#phases/new-battle-phase"; +import { NewBiomeEncounterPhase } from "#phases/new-biome-encounter-phase"; +import { NextEncounterPhase } from "#phases/next-encounter-phase"; +import { ObtainStatusEffectPhase } from "#phases/obtain-status-effect-phase"; +import { PartyExpPhase } from "#phases/party-exp-phase"; +import { PartyHealPhase } from "#phases/party-heal-phase"; +import { PokemonAnimPhase } from "#phases/pokemon-anim-phase"; +import { PokemonHealPhase } from "#phases/pokemon-heal-phase"; +import { PokemonTransformPhase } from "#phases/pokemon-transform-phase"; +import { PostGameOverPhase } from "#phases/post-game-over-phase"; +import { PostSummonPhase } from "#phases/post-summon-phase"; +import { PostTurnStatusEffectPhase } from "#phases/post-turn-status-effect-phase"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { ReloadSessionPhase } from "#phases/reload-session-phase"; +import { ResetStatusPhase } from "#phases/reset-status-phase"; +import { ReturnPhase } from "#phases/return-phase"; +import { RevivalBlessingPhase } from "#phases/revival-blessing-phase"; +import { RibbonModifierRewardPhase } from "#phases/ribbon-modifier-reward-phase"; +import { ScanIvsPhase } from "#phases/scan-ivs-phase"; +import { SelectBiomePhase } from "#phases/select-biome-phase"; +import { SelectChallengePhase } from "#phases/select-challenge-phase"; +import { SelectGenderPhase } from "#phases/select-gender-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { SelectStarterPhase } from "#phases/select-starter-phase"; +import { SelectTargetPhase } from "#phases/select-target-phase"; +import { ShinySparklePhase } from "#phases/shiny-sparkle-phase"; +import { ShowAbilityPhase } from "#phases/show-ability-phase"; +import { ShowPartyExpBarPhase } from "#phases/show-party-exp-bar-phase"; +import { ShowTrainerPhase } from "#phases/show-trainer-phase"; +import { StatStageChangePhase } from "#phases/stat-stage-change-phase"; +import { SummonMissingPhase } from "#phases/summon-missing-phase"; +import { SummonPhase } from "#phases/summon-phase"; +import { SwitchBiomePhase } from "#phases/switch-biome-phase"; +import { SwitchPhase } from "#phases/switch-phase"; +import { SwitchSummonPhase } from "#phases/switch-summon-phase"; +import { TeraPhase } from "#phases/tera-phase"; +import { TitlePhase } from "#phases/title-phase"; +import { ToggleDoublePositionPhase } from "#phases/toggle-double-position-phase"; +import { TrainerVictoryPhase } from "#phases/trainer-victory-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { UnavailablePhase } from "#phases/unavailable-phase"; +import { UnlockPhase } from "#phases/unlock-phase"; +import { VictoryPhase } from "#phases/victory-phase"; +import { WeatherEffectPhase } from "#phases/weather-effect-phase"; +import type { PhaseMap, PhaseString } from "#types/phase-types"; +import { type Constructor, coerceArray } from "#utils/common"; /* * Manager for phases used by battle scene. diff --git a/src/phase.ts b/src/phase.ts index 5e81679d29e..46a81dddb6f 100644 --- a/src/phase.ts +++ b/src/phase.ts @@ -1,5 +1,5 @@ import { globalScene } from "#app/global-scene"; -import type { PhaseMap, PhaseString } from "./@types/phase-types"; +import type { PhaseMap, PhaseString } from "#types/phase-types"; export abstract class Phase { start() {} diff --git a/src/phases/activate-priority-queue-phase.ts b/src/phases/activate-priority-queue-phase.ts index df42c491676..a31d3291a60 100644 --- a/src/phases/activate-priority-queue-phase.ts +++ b/src/phases/activate-priority-queue-phase.ts @@ -1,6 +1,6 @@ -import type { DynamicPhaseType } from "#enums/dynamic-phase-type"; import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; +import type { DynamicPhaseType } from "#enums/dynamic-phase-type"; export class ActivatePriorityQueuePhase extends Phase { public readonly phaseName = "ActivatePriorityQueuePhase"; diff --git a/src/phases/add-enemy-buff-modifier-phase.ts b/src/phases/add-enemy-buff-modifier-phase.ts index 218a3a653ff..5c9a56796d4 100644 --- a/src/phases/add-enemy-buff-modifier-phase.ts +++ b/src/phases/add-enemy-buff-modifier-phase.ts @@ -1,9 +1,9 @@ -import { ModifierTier } from "#enums/modifier-tier"; -import { regenerateModifierPoolThresholds, getEnemyBuffModifierForWave } from "#app/modifier/modifier-type"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { EnemyPersistentModifier } from "#app/modifier/modifier"; -import { Phase } from "#app/phase"; import { globalScene } from "#app/global-scene"; +import { Phase } from "#app/phase"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { EnemyPersistentModifier } from "#modifiers/modifier"; +import { getEnemyBuffModifierForWave, regenerateModifierPoolThresholds } from "#modifiers/modifier-type"; export class AddEnemyBuffModifierPhase extends Phase { public readonly phaseName = "AddEnemyBuffModifierPhase"; diff --git a/src/phases/attempt-capture-phase.ts b/src/phases/attempt-capture-phase.ts index f4e6725935a..604d4fd8384 100644 --- a/src/phases/attempt-capture-phase.ts +++ b/src/phases/attempt-capture-phase.ts @@ -1,30 +1,31 @@ -import { BattlerIndex } from "#enums/battler-index"; import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; -import { SubstituteTag } from "#app/data/battler-tags"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { SubstituteTag } from "#data/battler-tags"; +import { Gender } from "#data/gender"; import { doPokeballBounceAnim, + getCriticalCaptureChance, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, - getCriticalCaptureChance, -} from "#app/data/pokeball"; -import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect"; -import { addPokeballCaptureStars, addPokeballOpenParticles } from "#app/field/anims"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { PokemonPhase } from "#app/phases/pokemon-phase"; -import { achvs } from "#app/system/achv"; -import type { PartyOption } from "#app/ui/party-ui-handler"; -import { PartyUiMode } from "#app/ui/party-ui-handler"; -import { SummaryUiMode } from "#app/ui/summary-ui-handler"; -import { UiMode } from "#enums/ui-mode"; +} from "#data/pokeball"; +import { getStatusEffectCatchRateMultiplier } from "#data/status-effect"; +import { BattlerIndex } from "#enums/battler-index"; import type { PokeballType } from "#enums/pokeball"; import { StatusEffect } from "#enums/status-effect"; +import { UiMode } from "#enums/ui-mode"; +import { addPokeballCaptureStars, addPokeballOpenParticles } from "#field/anims"; +import type { EnemyPokemon } from "#field/pokemon"; +import { PokemonHeldItemModifier } from "#modifiers/modifier"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import { achvs } from "#system/achv"; +import type { PartyOption } from "#ui/party-ui-handler"; +import { PartyUiMode } from "#ui/party-ui-handler"; +import { SummaryUiMode } from "#ui/summary-ui-handler"; import i18next from "i18next"; -import { globalScene } from "#app/global-scene"; -import { Gender } from "#app/data/gender"; +// TODO: Refactor and split up to allow for overriding capture chance export class AttemptCapturePhase extends PokemonPhase { public readonly phaseName = "AttemptCapturePhase"; private pokeballType: PokeballType; @@ -119,7 +120,7 @@ export class AttemptCapturePhase extends PokemonPhase { repeatDelay: 500, onUpdate: t => { if (shakeCount && shakeCount < (isCritical ? 2 : 4)) { - const value = t.getValue(); + const value = t.getValue() ?? 0; const directionMultiplier = shakeCount % 2 === 1 ? 1 : -1; this.pokeball.setX(pbX + value * 4 * directionMultiplier); this.pokeball.setAngle(value * 27.5 * directionMultiplier); diff --git a/src/phases/attempt-run-phase.ts b/src/phases/attempt-run-phase.ts index 3709374287a..a59667bdd4e 100644 --- a/src/phases/attempt-run-phase.ts +++ b/src/phases/attempt-run-phase.ts @@ -1,10 +1,10 @@ -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; import Overrides from "#app/overrides"; -import { FieldPhase } from "#app/phases/field-phase"; -import { NumberHolder } from "#app/utils/common"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; +import { FieldPhase } from "#phases/field-phase"; +import { NumberHolder } from "#utils/common"; import i18next from "i18next"; export class AttemptRunPhase extends FieldPhase { diff --git a/src/phases/battle-end-phase.ts b/src/phases/battle-end-phase.ts index 297e20cb445..8d199915385 100644 --- a/src/phases/battle-end-phase.ts +++ b/src/phases/battle-end-phase.ts @@ -1,7 +1,7 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier"; -import { BattlePhase } from "./battle-phase"; +import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#modifiers/modifier"; +import { BattlePhase } from "#phases/battle-phase"; export class BattleEndPhase extends BattlePhase { public readonly phaseName = "BattleEndPhase"; diff --git a/src/phases/battle-phase.ts b/src/phases/battle-phase.ts index 7cefd0369d9..26794ed9bc5 100644 --- a/src/phases/battle-phase.ts +++ b/src/phases/battle-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import { TrainerSlot } from "#enums/trainer-slot"; import { Phase } from "#app/phase"; +import { TrainerSlot } from "#enums/trainer-slot"; export abstract class BattlePhase extends Phase { showEnemyTrainer(trainerSlot: TrainerSlot = TrainerSlot.NONE): void { diff --git a/src/phases/berry-phase.ts b/src/phases/berry-phase.ts index 61124a7cda8..941406d0b96 100644 --- a/src/phases/berry-phase.ts +++ b/src/phases/berry-phase.ts @@ -1,13 +1,13 @@ -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { CommonAnim } from "#enums/move-anims-common"; -import { BerryUsedEvent } from "#app/events/battle-scene"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { BerryModifier } from "#app/modifier/modifier"; -import i18next from "i18next"; -import { BooleanHolder } from "#app/utils/common"; -import { FieldPhase } from "./field-phase"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import type Pokemon from "#app/field/pokemon"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { CommonAnim } from "#enums/move-anims-common"; +import { BerryUsedEvent } from "#events/battle-scene"; +import type { Pokemon } from "#field/pokemon"; +import { BerryModifier } from "#modifiers/modifier"; +import { FieldPhase } from "#phases/field-phase"; +import { BooleanHolder } from "#utils/common"; +import i18next from "i18next"; /** * The phase after attacks where the pokemon eat berries. diff --git a/src/phases/check-status-effect-phase.ts b/src/phases/check-status-effect-phase.ts index 43495e038e9..bdaa536986a 100644 --- a/src/phases/check-status-effect-phase.ts +++ b/src/phases/check-status-effect-phase.ts @@ -1,6 +1,6 @@ +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import type { BattlerIndex } from "#enums/battler-index"; -import { globalScene } from "#app/global-scene"; export class CheckStatusEffectPhase extends Phase { public readonly phaseName = "CheckStatusEffectPhase"; diff --git a/src/phases/check-switch-phase.ts b/src/phases/check-switch-phase.ts index 97f4092096f..f4e8ee56c55 100644 --- a/src/phases/check-switch-phase.ts +++ b/src/phases/check-switch-phase.ts @@ -1,11 +1,11 @@ import { globalScene } from "#app/global-scene"; -import { BattleStyle } from "#app/enums/battle-style"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; import { getPokemonNameWithAffix } from "#app/messages"; -import { UiMode } from "#enums/ui-mode"; -import i18next from "i18next"; -import { BattlePhase } from "./battle-phase"; +import { BattleStyle } from "#enums/battle-style"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { SwitchType } from "#enums/switch-type"; +import { UiMode } from "#enums/ui-mode"; +import { BattlePhase } from "#phases/battle-phase"; +import i18next from "i18next"; export class CheckSwitchPhase extends BattlePhase { public readonly phaseName = "CheckSwitchPhase"; diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index 8281019b3c4..b90c5a6b00a 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -1,29 +1,29 @@ -import { globalScene } from "#app/global-scene"; import type { TurnCommand } from "#app/battle"; -import { BattleType } from "#enums/battle-type"; -import type { EncoreTag } from "#app/data/battler-tags"; -import { TrappedTag } from "#app/data/battler-tags"; -import type { MoveTargetSet } from "#app/data/moves/move"; -import { getMoveTargets } from "#app/data/moves/move-utils"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BiomeId } from "#enums/biome-id"; -import { MoveId } from "#enums/move-id"; -import { PokeballType } from "#enums/pokeball"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { TurnMove } from "#app/@types/turn-move"; -import { FieldPosition } from "#enums/field-position"; +import { globalScene } from "#app/global-scene"; import { getPokemonNameWithAffix } from "#app/messages"; -import { Command } from "#enums/command"; -import { UiMode } from "#enums/ui-mode"; -import i18next from "i18next"; -import { FieldPhase } from "./field-phase"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import { isNullOrUndefined } from "#app/utils/common"; +import { speciesStarterCosts } from "#balance/starters"; +import type { EncoreTag } from "#data/battler-tags"; +import { TrappedTag } from "#data/battler-tags"; +import { AbilityId } from "#enums/ability-id"; import { ArenaTagSide } from "#enums/arena-tag-side"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import { isVirtual, isIgnorePP, MoveUseMode } from "#enums/move-use-mode"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattleType } from "#enums/battle-type"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BiomeId } from "#enums/biome-id"; +import { Command } from "#enums/command"; +import { FieldPosition } from "#enums/field-position"; +import { MoveId } from "#enums/move-id"; +import { isIgnorePP, isVirtual, MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { PokeballType } from "#enums/pokeball"; +import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { MoveTargetSet } from "#moves/move"; +import { getMoveTargets } from "#moves/move-utils"; +import { FieldPhase } from "#phases/field-phase"; +import type { TurnMove } from "#types/turn-move"; +import { isNullOrUndefined } from "#utils/common"; +import i18next from "i18next"; export class CommandPhase extends FieldPhase { public readonly phaseName = "CommandPhase"; diff --git a/src/phases/common-anim-phase.ts b/src/phases/common-anim-phase.ts index abfe8ed99f0..78da1dcfa2f 100644 --- a/src/phases/common-anim-phase.ts +++ b/src/phases/common-anim-phase.ts @@ -1,8 +1,8 @@ -import type { BattlerIndex } from "#enums/battler-index"; import { globalScene } from "#app/global-scene"; +import { CommonBattleAnim } from "#data/battle-anims"; +import type { BattlerIndex } from "#enums/battler-index"; import type { CommonAnim } from "#enums/move-anims-common"; -import { CommonBattleAnim } from "#app/data/battle-anims"; -import { PokemonPhase } from "./pokemon-phase"; +import { PokemonPhase } from "#phases/pokemon-phase"; export class CommonAnimPhase extends PokemonPhase { // PokemonHealPhase extends CommonAnimPhase, and to make typescript happy, diff --git a/src/phases/damage-anim-phase.ts b/src/phases/damage-anim-phase.ts index 8dc377cdaf5..a651255baff 100644 --- a/src/phases/damage-anim-phase.ts +++ b/src/phases/damage-anim-phase.ts @@ -1,10 +1,10 @@ import { globalScene } from "#app/global-scene"; -import type { BattlerIndex } from "#enums/battler-index"; import { BattleSpec } from "#enums/battle-spec"; -import type { DamageResult } from "#app/@types/damage-result"; +import type { BattlerIndex } from "#enums/battler-index"; import { HitResult } from "#enums/hit-result"; -import { fixedInt } from "#app/utils/common"; -import { PokemonPhase } from "#app/phases/pokemon-phase"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import type { DamageResult } from "#types/damage-result"; +import { fixedInt } from "#utils/common"; export class DamageAnimPhase extends PokemonPhase { public readonly phaseName = "DamageAnimPhase"; diff --git a/src/phases/egg-hatch-phase.ts b/src/phases/egg-hatch-phase.ts index d6c40a1510e..94923ae8c1f 100644 --- a/src/phases/egg-hatch-phase.ts +++ b/src/phases/egg-hatch-phase.ts @@ -1,20 +1,20 @@ import type { AnySound } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; -import type { Egg } from "#app/data/egg"; -import { EggCountChangedEvent } from "#app/events/egg"; -import type { PlayerPokemon } from "#app/field/pokemon"; import { Phase } from "#app/phase"; -import { achvs } from "#app/system/achv"; -import EggCounterContainer from "#app/ui/egg-counter-container"; -import type EggHatchSceneHandler from "#app/ui/egg-hatch-scene-handler"; -import PokemonInfoContainer from "#app/ui/pokemon-info-container"; +import type { Egg } from "#data/egg"; +import type { EggHatchData } from "#data/egg-hatch-data"; import { UiMode } from "#enums/ui-mode"; +import { EggCountChangedEvent } from "#events/egg"; +import { doShinySparkleAnim } from "#field/anims"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { EggLapsePhase } from "#phases/egg-lapse-phase"; +import { achvs } from "#system/achv"; +import { EggCounterContainer } from "#ui/egg-counter-container"; +import type { EggHatchSceneHandler } from "#ui/egg-hatch-scene-handler"; +import { PokemonInfoContainer } from "#ui/pokemon-info-container"; +import { fixedInt, getFrameMs, randInt } from "#utils/common"; import i18next from "i18next"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; -import { fixedInt, getFrameMs, randInt } from "#app/utils/common"; -import type { EggLapsePhase } from "./egg-lapse-phase"; -import type { EggHatchData } from "#app/data/egg-hatch-data"; -import { doShinySparkleAnim } from "#app/field/anims"; /** * Class that represents egg hatching diff --git a/src/phases/egg-lapse-phase.ts b/src/phases/egg-lapse-phase.ts index 206bef1a33c..4f393bddd36 100644 --- a/src/phases/egg-lapse-phase.ts +++ b/src/phases/egg-lapse-phase.ts @@ -1,13 +1,13 @@ import { globalScene } from "#app/global-scene"; -import type { Egg } from "#app/data/egg"; -import { EGG_SEED } from "#app/data/egg"; -import { Phase } from "#app/phase"; -import i18next from "i18next"; import Overrides from "#app/overrides"; +import { Phase } from "#app/phase"; +import type { Egg } from "#data/egg"; +import { EGG_SEED } from "#data/egg"; +import { EggHatchData } from "#data/egg-hatch-data"; import { UiMode } from "#enums/ui-mode"; -import { achvs } from "#app/system/achv"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import { EggHatchData } from "#app/data/egg-hatch-data"; +import type { PlayerPokemon } from "#field/pokemon"; +import { achvs } from "#system/achv"; +import i18next from "i18next"; /** * Phase that handles updating eggs, and hatching any ready eggs diff --git a/src/phases/egg-summary-phase.ts b/src/phases/egg-summary-phase.ts index cc7857426bc..c236c5c3abc 100644 --- a/src/phases/egg-summary-phase.ts +++ b/src/phases/egg-summary-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; +import type { EggHatchData } from "#data/egg-hatch-data"; import { UiMode } from "#enums/ui-mode"; -import type { EggHatchData } from "#app/data/egg-hatch-data"; /** * Class that represents the egg summary phase diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 52c2b2e465d..79da7134e9a 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -1,37 +1,41 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { BattleType } from "#enums/battle-type"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; +import { PLAYER_PARTY_MAX_SIZE, WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/constants"; import { globalScene } from "#app/global-scene"; -import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { initEncounterAnims, loadEncounterAnimAssets } from "#app/data/battle-anims"; -import { getCharVariantFromDialogue } from "#app/data/dialogue"; -import { getEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { doTrainerExclamation } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { getGoldenBugNetSpecies } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { getRandomWeatherType } from "#app/data/weather"; -import { EncounterPhaseEvent } from "#app/events/battle-scene"; -import type Pokemon from "#app/field/pokemon"; -import { FieldPosition } from "#enums/field-position"; import { getPokemonNameWithAffix } from "#app/messages"; -import { BoostBugSpawnModifier, IvScannerModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier"; -import { regenerateModifierPoolThresholds } from "#app/modifier/modifier-type"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; import Overrides from "#app/overrides"; -import { BattlePhase } from "#app/phases/battle-phase"; -import { achvs } from "#app/system/achv"; import { handleTutorial, Tutorial } from "#app/tutorial"; -import { UiMode } from "#enums/ui-mode"; -import { randSeedInt, randSeedItem } from "#app/utils/common"; +import { initEncounterAnims, loadEncounterAnimAssets } from "#data/battle-anims"; +import { getCharVariantFromDialogue } from "#data/dialogue"; +import { getNatureName } from "#data/nature"; +import { getRandomWeatherType } from "#data/weather"; import { BattleSpec } from "#enums/battle-spec"; +import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BiomeId } from "#enums/biome-id"; +import { FieldPosition } from "#enums/field-position"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; import { PlayerGender } from "#enums/player-gender"; import { SpeciesId } from "#enums/species-id"; -import { overrideHeldItems, overrideModifiers } from "#app/modifier/modifier"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { UiMode } from "#enums/ui-mode"; +import { EncounterPhaseEvent } from "#events/battle-scene"; +import type { Pokemon } from "#field/pokemon"; +import { + BoostBugSpawnModifier, + IvScannerModifier, + overrideHeldItems, + overrideModifiers, + TurnHeldItemTransferModifier, +} from "#modifiers/modifier"; +import { regenerateModifierPoolThresholds } from "#modifiers/modifier-type"; +import { getEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import { doTrainerExclamation } from "#mystery-encounters/encounter-phase-utils"; +import { getGoldenBugNetSpecies } from "#mystery-encounters/encounter-pokemon-utils"; +import { BattlePhase } from "#phases/battle-phase"; +import { achvs } from "#system/achv"; +import { randSeedInt, randSeedItem } from "#utils/common"; import i18next from "i18next"; -import { WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/constants"; -import { getNatureName } from "#app/data/nature"; export class EncounterPhase extends BattlePhase { // Union type is necessary as this is subclassed, and typescript will otherwise complain diff --git a/src/phases/end-card-phase.ts b/src/phases/end-card-phase.ts index bb64969514f..5c3f6e1bf9b 100644 --- a/src/phases/end-card-phase.ts +++ b/src/phases/end-card-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import { PlayerGender } from "#app/enums/player-gender"; import { Phase } from "#app/phase"; -import { addTextObject, TextStyle } from "#app/ui/text"; +import { PlayerGender } from "#enums/player-gender"; +import { addTextObject, TextStyle } from "#ui/text"; import i18next from "i18next"; export class EndCardPhase extends Phase { diff --git a/src/phases/enemy-command-phase.ts b/src/phases/enemy-command-phase.ts index 0dc41a592e0..7e4dff37b0f 100644 --- a/src/phases/enemy-command-phase.ts +++ b/src/phases/enemy-command-phase.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import { BattlerIndex } from "#enums/battler-index"; -import { Command } from "#enums/command"; -import { FieldPhase } from "./field-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { Command } from "#enums/command"; +import { FieldPhase } from "#phases/field-phase"; /** * Phase for determining an enemy AI's action for the next turn. diff --git a/src/phases/enemy-party-member-pokemon-phase.ts b/src/phases/enemy-party-member-pokemon-phase.ts index 5c701f7d73a..2f0ace608ff 100644 --- a/src/phases/enemy-party-member-pokemon-phase.ts +++ b/src/phases/enemy-party-member-pokemon-phase.ts @@ -1,5 +1,5 @@ -import type { EnemyPokemon } from "#app/field/pokemon"; -import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; +import type { EnemyPokemon } from "#field/pokemon"; +import { PartyMemberPokemonPhase } from "#phases/party-member-pokemon-phase"; export abstract class EnemyPartyMemberPokemonPhase extends PartyMemberPokemonPhase { constructor(partyMemberIndex: number) { diff --git a/src/phases/evolution-phase.ts b/src/phases/evolution-phase.ts index 3093af40f75..f8bee8371f2 100644 --- a/src/phases/evolution-phase.ts +++ b/src/phases/evolution-phase.ts @@ -1,20 +1,19 @@ -import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; -import { Phase } from "#app/phase"; import type { AnySound } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; -import type { SpeciesFormEvolution } from "#app/data/balance/pokemon-evolutions"; -import { FusionSpeciesFormEvolution } from "#app/data/balance/pokemon-evolutions"; -import type EvolutionSceneHandler from "#app/ui/evolution-scene-handler"; -import { fixedInt, getFrameMs, randInt } from "#app/utils/common"; -import { UiMode } from "#enums/ui-mode"; -import { cos, sin } from "#app/field/anims"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { LearnMoveSituation } from "#enums/learn-move-situation"; -import { getTypeRgb } from "#app/data/type"; -import i18next from "i18next"; import { getPokemonNameWithAffix } from "#app/messages"; -import { EVOLVE_MOVE } from "#app/data/balance/pokemon-level-moves"; +import { Phase } from "#app/phase"; +import type { SpeciesFormEvolution } from "#balance/pokemon-evolutions"; +import { FusionSpeciesFormEvolution } from "#balance/pokemon-evolutions"; +import { EVOLVE_MOVE } from "#balance/pokemon-level-moves"; +import { getTypeRgb } from "#data/type"; +import { LearnMoveSituation } from "#enums/learn-move-situation"; +import { UiMode } from "#enums/ui-mode"; +import { cos, sin } from "#field/anims"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { EvolutionSceneHandler } from "#ui/evolution-scene-handler"; +import { fixedInt, getFrameMs, randInt } from "#utils/common"; +import i18next from "i18next"; +import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; export class EvolutionPhase extends Phase { // FormChangePhase inherits from this, but EvolutionPhase is not abstract. @@ -240,7 +239,7 @@ export class EvolutionPhase extends Phase { to: 1, duration: 2000, onUpdate: t => { - this.pokemonTintSprite.setAlpha(t.getValue()); + this.pokemonTintSprite.setAlpha(t.getValue() ?? 1); }, onComplete: () => { this.pokemonSprite.setVisible(false); diff --git a/src/phases/exp-phase.ts b/src/phases/exp-phase.ts index 74768e86186..7ab162c2ac6 100644 --- a/src/phases/exp-phase.ts +++ b/src/phases/exp-phase.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; import { getPokemonNameWithAffix } from "#app/messages"; -import { ExpBoosterModifier } from "#app/modifier/modifier"; +import { ExpBoosterModifier } from "#modifiers/modifier"; +import { PlayerPartyMemberPokemonPhase } from "#phases/player-party-member-pokemon-phase"; +import { NumberHolder } from "#utils/common"; import i18next from "i18next"; -import { NumberHolder } from "#app/utils/common"; -import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; export class ExpPhase extends PlayerPartyMemberPokemonPhase { public readonly phaseName = "ExpPhase"; diff --git a/src/phases/faint-phase.ts b/src/phases/faint-phase.ts index c2658b62b23..d1bd0ed0804 100644 --- a/src/phases/faint-phase.ts +++ b/src/phases/faint-phase.ts @@ -1,26 +1,24 @@ -import type { BattlerIndex } from "#enums/battler-index"; -import { BattleType } from "#enums/battle-type"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import { battleSpecDialogue } from "#app/data/dialogue"; -import { allMoves } from "#app/data/data-lists"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { BattleSpec } from "#app/enums/battle-spec"; -import { StatusEffect } from "#app/enums/status-effect"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { HitResult } from "#enums/hit-result"; -import type { PlayerPokemon } from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; -import { PokemonInstantReviveModifier } from "#app/modifier/modifier"; -import { SwitchType } from "#enums/switch-type"; -import i18next from "i18next"; -import { PokemonPhase } from "./pokemon-phase"; -import { isNullOrUndefined } from "#app/utils/common"; -import { FRIENDSHIP_LOSS_FROM_FAINT } from "#app/data/balance/starters"; +import { FRIENDSHIP_LOSS_FROM_FAINT } from "#balance/starters"; +import { allMoves } from "#data/data-lists"; +import { battleSpecDialogue } from "#data/dialogue"; +import { SpeciesFormChangeActiveTrigger } from "#data/form-change-triggers"; +import { BattleSpec } from "#enums/battle-spec"; +import { BattleType } from "#enums/battle-type"; +import type { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { HitResult } from "#enums/hit-result"; +import { StatusEffect } from "#enums/status-effect"; +import { SwitchType } from "#enums/switch-type"; +import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon"; +import { PokemonInstantReviveModifier } from "#modifiers/modifier"; +import { PokemonMove } from "#moves/pokemon-move"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import { isNullOrUndefined } from "#utils/common"; +import i18next from "i18next"; export class FaintPhase extends PokemonPhase { public readonly phaseName = "FaintPhase"; diff --git a/src/phases/field-phase.ts b/src/phases/field-phase.ts index c37f0e960e7..99de3d9fcf5 100644 --- a/src/phases/field-phase.ts +++ b/src/phases/field-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import type Pokemon from "#app/field/pokemon"; -import { BattlePhase } from "./battle-phase"; +import type { Pokemon } from "#field/pokemon"; +import { BattlePhase } from "#phases/battle-phase"; type PokemonFunc = (pokemon: Pokemon) => void; diff --git a/src/phases/form-change-phase.ts b/src/phases/form-change-phase.ts index 6d60cacd69d..7b7f5a6dac6 100644 --- a/src/phases/form-change-phase.ts +++ b/src/phases/form-change-phase.ts @@ -1,15 +1,15 @@ import { globalScene } from "#app/global-scene"; -import { fixedInt } from "#app/utils/common"; -import { achvs } from "../system/achv"; -import type { SpeciesFormChange } from "../data/pokemon-forms"; -import { getSpeciesFormChangeMessage } from "#app/data/pokemon-forms/form-change-triggers"; -import type { default as Pokemon, PlayerPokemon } from "../field/pokemon"; -import { UiMode } from "#enums/ui-mode"; -import type PartyUiHandler from "../ui/party-ui-handler"; -import { getPokemonNameWithAffix } from "../messages"; -import { EvolutionPhase } from "./evolution-phase"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { getSpeciesFormChangeMessage } from "#data/form-change-triggers"; +import type { SpeciesFormChange } from "#data/pokemon-forms"; import { BattlerTagType } from "#enums/battler-tag-type"; import { SpeciesFormKey } from "#enums/species-form-key"; +import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import { EvolutionPhase } from "#phases/evolution-phase"; +import { achvs } from "#system/achv"; +import type { PartyUiHandler } from "#ui/party-ui-handler"; +import { fixedInt } from "#utils/common"; export class FormChangePhase extends EvolutionPhase { public readonly phaseName = "FormChangePhase"; diff --git a/src/phases/game-over-modifier-reward-phase.ts b/src/phases/game-over-modifier-reward-phase.ts index 13c8f48abad..f07c7d2adba 100644 --- a/src/phases/game-over-modifier-reward-phase.ts +++ b/src/phases/game-over-modifier-reward-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; import { UiMode } from "#enums/ui-mode"; +import { ModifierRewardPhase } from "#phases/modifier-reward-phase"; import i18next from "i18next"; -import { ModifierRewardPhase } from "./modifier-reward-phase"; export class GameOverModifierRewardPhase extends ModifierRewardPhase { public readonly phaseName = "GameOverModifierRewardPhase"; diff --git a/src/phases/game-over-phase.ts b/src/phases/game-over-phase.ts index 3f92f26b9b9..d4562b5a237 100644 --- a/src/phases/game-over-phase.ts +++ b/src/phases/game-over-phase.ts @@ -1,29 +1,29 @@ +import { pokerogueApi } from "#api/pokerogue-api"; import { clientSessionId } from "#app/account"; -import { BattleType } from "#enums/battle-type"; import { globalScene } from "#app/global-scene"; -import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; -import { getCharVariantFromDialogue } from "#app/data/dialogue"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import type Pokemon from "#app/field/pokemon"; -import { modifierTypes } from "#app/data/data-lists"; -import { BattlePhase } from "#app/phases/battle-phase"; -import type { EndCardPhase } from "#app/phases/end-card-phase"; -import { achvs, ChallengeAchv } from "#app/system/achv"; -import { Unlockables } from "#enums/unlockables"; -import { UiMode } from "#enums/ui-mode"; -import { isLocal, isLocalServerConnected } from "#app/utils/common"; +import { pokemonEvolutions } from "#balance/pokemon-evolutions"; +import { modifierTypes } from "#data/data-lists"; +import { getCharVariantFromDialogue } from "#data/dialogue"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { BattleType } from "#enums/battle-type"; import { PlayerGender } from "#enums/player-gender"; import { TrainerType } from "#enums/trainer-type"; +import { UiMode } from "#enums/ui-mode"; +import { Unlockables } from "#enums/unlockables"; +import type { Pokemon } from "#field/pokemon"; +import { BattlePhase } from "#phases/battle-phase"; +import type { EndCardPhase } from "#phases/end-card-phase"; +import { achvs, ChallengeAchv } from "#system/achv"; +import { ArenaData } from "#system/arena-data"; +import { ChallengeData } from "#system/challenge-data"; +import type { SessionSaveData } from "#system/game-data"; +import { ModifierData as PersistentModifierData } from "#system/modifier-data"; +import { PokemonData } from "#system/pokemon-data"; +import { TrainerData } from "#system/trainer-data"; +import { trainerConfigs } from "#trainers/trainer-config"; +import { isLocal, isLocalServerConnected } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import type { SessionSaveData } from "#app/system/game-data"; -import PersistentModifierData from "#app/system/modifier-data"; -import PokemonData from "#app/system/pokemon-data"; -import ChallengeData from "#app/system/challenge-data"; -import TrainerData from "#app/system/trainer-data"; -import ArenaData from "#app/system/arena-data"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; export class GameOverPhase extends BattlePhase { public readonly phaseName = "GameOverPhase"; diff --git a/src/phases/hide-party-exp-bar-phase.ts b/src/phases/hide-party-exp-bar-phase.ts index 9ee08280cd4..e59bd02ce60 100644 --- a/src/phases/hide-party-exp-bar-phase.ts +++ b/src/phases/hide-party-exp-bar-phase.ts @@ -1,5 +1,5 @@ import { globalScene } from "#app/global-scene"; -import { BattlePhase } from "./battle-phase"; +import { BattlePhase } from "#phases/battle-phase"; export class HidePartyExpBarPhase extends BattlePhase { public readonly phaseName = "HidePartyExpBarPhase"; diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index e24efa63b5a..a714d247730 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -1,18 +1,18 @@ import { globalScene } from "#app/global-scene"; -import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; -import type Move from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; -import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { MoveId } from "#enums/move-id"; import { getPokemonNameWithAffix } from "#app/messages"; import Overrides from "#app/overrides"; -import EvolutionSceneHandler from "#app/ui/evolution-scene-handler"; -import { SummaryUiMode } from "#app/ui/summary-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import i18next from "i18next"; -import { PlayerPartyMemberPokemonPhase } from "#app/phases/player-party-member-pokemon-phase"; -import type Pokemon from "#app/field/pokemon"; +import { initMoveAnim, loadMoveAnimAssets } from "#data/battle-anims"; +import { allMoves } from "#data/data-lists"; +import { SpeciesFormChangeMoveLearnedTrigger } from "#data/form-change-triggers"; import { LearnMoveType } from "#enums/learn-move-type"; +import { MoveId } from "#enums/move-id"; +import { UiMode } from "#enums/ui-mode"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { PlayerPartyMemberPokemonPhase } from "#phases/player-party-member-pokemon-phase"; +import { EvolutionSceneHandler } from "#ui/evolution-scene-handler"; +import { SummaryUiMode } from "#ui/summary-ui-handler"; +import i18next from "i18next"; export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { public readonly phaseName = "LearnMovePhase"; diff --git a/src/phases/level-cap-phase.ts b/src/phases/level-cap-phase.ts index 12d4d64e8e2..a1f1e07f58d 100644 --- a/src/phases/level-cap-phase.ts +++ b/src/phases/level-cap-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; import { UiMode } from "#enums/ui-mode"; +import { FieldPhase } from "#phases/field-phase"; import i18next from "i18next"; -import { FieldPhase } from "./field-phase"; export class LevelCapPhase extends FieldPhase { public readonly phaseName = "LevelCapPhase"; diff --git a/src/phases/level-up-phase.ts b/src/phases/level-up-phase.ts index c78a1798304..07a87d73411 100644 --- a/src/phases/level-up-phase.ts +++ b/src/phases/level-up-phase.ts @@ -1,10 +1,10 @@ import { globalScene } from "#app/global-scene"; -import { ExpNotification } from "#app/enums/exp-notification"; -import type { PlayerPokemon } from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; -import { PlayerPartyMemberPokemonPhase } from "#app/phases/player-party-member-pokemon-phase"; -import { LevelAchv } from "#app/system/achv"; -import { NumberHolder } from "#app/utils/common"; +import { ExpNotification } from "#enums/exp-notification"; +import type { PlayerPokemon } from "#field/pokemon"; +import { PlayerPartyMemberPokemonPhase } from "#phases/player-party-member-pokemon-phase"; +import { LevelAchv } from "#system/achv"; +import { NumberHolder } from "#utils/common"; import i18next from "i18next"; export class LevelUpPhase extends PlayerPartyMemberPokemonPhase { diff --git a/src/phases/load-move-anim-phase.ts b/src/phases/load-move-anim-phase.ts index c9b78797407..3209e395399 100644 --- a/src/phases/load-move-anim-phase.ts +++ b/src/phases/load-move-anim-phase.ts @@ -1,6 +1,6 @@ -import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; -import type { MoveId } from "#enums/move-id"; import { Phase } from "#app/phase"; +import { initMoveAnim, loadMoveAnimAssets } from "#data/battle-anims"; +import type { MoveId } from "#enums/move-id"; /** * Phase for synchronous move animation loading. diff --git a/src/phases/login-phase.ts b/src/phases/login-phase.ts index de426866baa..f310c60b0d4 100644 --- a/src/phases/login-phase.ts +++ b/src/phases/login-phase.ts @@ -1,12 +1,12 @@ import { updateUserInfo } from "#app/account"; -import { bypassLogin } from "#app/global-vars/bypass-login"; import { globalScene } from "#app/global-scene"; +import { bypassLogin } from "#app/global-vars/bypass-login"; import { Phase } from "#app/phase"; import { handleTutorial, Tutorial } from "#app/tutorial"; import { UiMode } from "#enums/ui-mode"; +import { executeIf, sessionIdKey } from "#utils/common"; +import { getCookie, removeCookie } from "#utils/cookies"; import i18next, { t } from "i18next"; -import { sessionIdKey, executeIf } from "#app/utils/common"; -import { getCookie, removeCookie } from "#app/utils/cookies"; export class LoginPhase extends Phase { public readonly phaseName = "LoginPhase"; diff --git a/src/phases/modifier-reward-phase.ts b/src/phases/modifier-reward-phase.ts index 29bbe215fc0..b84985b7311 100644 --- a/src/phases/modifier-reward-phase.ts +++ b/src/phases/modifier-reward-phase.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import type { ModifierType } from "#app/modifier/modifier-type"; -import type { ModifierTypeFunc } from "#app/@types/modifier-types"; -import { getModifierType } from "#app/utils/modifier-utils"; +import type { ModifierType } from "#modifiers/modifier-type"; +import { BattlePhase } from "#phases/battle-phase"; +import type { ModifierTypeFunc } from "#types/modifier-types"; +import { getModifierType } from "#utils/modifier-utils"; import i18next from "i18next"; -import { BattlePhase } from "./battle-phase"; export class ModifierRewardPhase extends BattlePhase { // RibbonModifierRewardPhase extends ModifierRewardPhase and to make typescript happy diff --git a/src/phases/money-reward-phase.ts b/src/phases/money-reward-phase.ts index 52cb9ecb3ff..61153de8565 100644 --- a/src/phases/money-reward-phase.ts +++ b/src/phases/money-reward-phase.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import { MoneyMultiplierModifier } from "#app/modifier/modifier"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { MoneyMultiplierModifier } from "#modifiers/modifier"; +import { BattlePhase } from "#phases/battle-phase"; +import { NumberHolder } from "#utils/common"; import i18next from "i18next"; -import { NumberHolder } from "#app/utils/common"; -import { BattlePhase } from "./battle-phase"; export class MoneyRewardPhase extends BattlePhase { public readonly phaseName = "MoneyRewardPhase"; diff --git a/src/phases/move-anim-phase.ts b/src/phases/move-anim-phase.ts index 383841a0146..b8563fbb997 100644 --- a/src/phases/move-anim-phase.ts +++ b/src/phases/move-anim-phase.ts @@ -1,5 +1,5 @@ -import type { MoveAnim } from "#app/data/battle-anims"; import { Phase } from "#app/phase"; +import type { MoveAnim } from "#data/battle-anims"; /** * Plays the given {@linkcode MoveAnim} sequentially. diff --git a/src/phases/move-charge-phase.ts b/src/phases/move-charge-phase.ts index 51b8fe96ff6..0c83db10511 100644 --- a/src/phases/move-charge-phase.ts +++ b/src/phases/move-charge-phase.ts @@ -1,15 +1,15 @@ import { globalScene } from "#app/global-scene"; +import { MoveChargeAnim } from "#data/battle-anims"; import type { BattlerIndex } from "#enums/battler-index"; -import { MoveChargeAnim } from "#app/data/battle-anims"; -import { applyMoveChargeAttrs } from "#app/data/moves/apply-attrs"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; -import { MoveResult } from "#enums/move-result"; -import { BooleanHolder } from "#app/utils/common"; -import { PokemonPhase } from "#app/phases/pokemon-phase"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveResult } from "#enums/move-result"; import type { MoveUseMode } from "#enums/move-use-mode"; -import type { ChargingMove } from "#app/@types/move-types"; +import type { Pokemon } from "#field/pokemon"; +import { applyMoveChargeAttrs } from "#moves/apply-attrs"; +import type { PokemonMove } from "#moves/pokemon-move"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import type { ChargingMove } from "#types/move-types"; +import { BooleanHolder } from "#utils/common"; /** * Phase for the "charging turn" of two-turn moves (e.g. Dig). diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index fb421d7a25f..4446b2071d0 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -1,33 +1,27 @@ -import { BattlerIndex } from "#enums/battler-index"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { ConditionalProtectTag } from "#app/data/arena-tag"; +import { getPokemonNameWithAffix } from "#app/messages"; +import type { Phase } from "#app/phase"; +import { ConditionalProtectTag } from "#data/arena-tag"; +import { MoveAnim } from "#data/battle-anims"; +import { DamageProtectedTag, ProtectedTag, SemiInvulnerableTag, SubstituteTag, TypeBoostTag } from "#data/battler-tags"; +import { SpeciesFormChangePostMoveTrigger } from "#data/form-change-triggers"; +import type { TypeDamageMultiplier } from "#data/type"; import { ArenaTagSide } from "#enums/arena-tag-side"; -import { MoveAnim } from "#app/data/battle-anims"; -import { - DamageProtectedTag, - ProtectedTag, - SemiInvulnerableTag, - SubstituteTag, - TypeBoostTag, -} from "#app/data/battler-tags"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import type { MoveAttr } from "#app/data/moves/move"; -import { getMoveTargets } from "#app/data/moves/move-utils"; -import { applyFilteredMoveAttrs, applyMoveAttrs } from "#app/data/moves/apply-attrs"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { HitCheckResult } from "#enums/hit-check-result"; +import { HitResult } from "#enums/hit-result"; +import { MoveCategory } from "#enums/MoveCategory"; import { MoveEffectTrigger } from "#enums/MoveEffectTrigger"; import { MoveFlags } from "#enums/MoveFlags"; import { MoveTarget } from "#enums/MoveTarget"; -import { MoveCategory } from "#enums/MoveCategory"; -import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { PokemonType } from "#enums/pokemon-type"; -import type { DamageResult } from "#app/@types/damage-result"; -import type { TurnMove } from "#app/@types/turn-move"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; +import { MoveId } from "#enums/move-id"; import { MoveResult } from "#enums/move-result"; -import { HitResult } from "#enums/hit-result"; -import { getPokemonNameWithAffix } from "#app/messages"; +import { isReflected, isVirtual, MoveUseMode } from "#enums/move-use-mode"; +import { PokemonType } from "#enums/pokemon-type"; +import type { Pokemon } from "#field/pokemon"; import { ContactHeldItemTransferChanceModifier, DamageMoneyRewardModifier, @@ -36,20 +30,18 @@ import { FlinchChanceModifier, HitHealModifier, PokemonMultiHitModifier, -} from "#app/modifier/modifier"; -import { PokemonPhase } from "#app/phases/pokemon-phase"; -import { BooleanHolder, isNullOrUndefined, NumberHolder } from "#app/utils/common"; -import type { nil } from "#app/utils/common"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { MoveId } from "#enums/move-id"; +} from "#modifiers/modifier"; +import { applyFilteredMoveAttrs, applyMoveAttrs } from "#moves/apply-attrs"; +import type { Move, MoveAttr } from "#moves/move"; +import { getMoveTargets, isFieldTargeted } from "#moves/move-utils"; +import { PokemonMove } from "#moves/pokemon-move"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import { DamageAchv } from "#system/achv"; +import type { DamageResult } from "#types/damage-result"; +import type { TurnMove } from "#types/turn-move"; +import type { nil } from "#utils/common"; +import { BooleanHolder, isNullOrUndefined, NumberHolder } from "#utils/common"; import i18next from "i18next"; -import type { Phase } from "#app/phase"; -import type { TypeDamageMultiplier } from "#app/data/type"; -import { HitCheckResult } from "#enums/hit-check-result"; -import type Move from "#app/data/moves/move"; -import { isFieldTargeted } from "#app/data/moves/move-utils"; -import { DamageAchv } from "#app/system/achv"; -import { isVirtual, isReflected, MoveUseMode } from "#enums/move-use-mode"; export type HitCheckEntry = [HitCheckResult, TypeDamageMultiplier]; diff --git a/src/phases/move-end-phase.ts b/src/phases/move-end-phase.ts index 7e1006c74e8..fd893c445ff 100644 --- a/src/phases/move-end-phase.ts +++ b/src/phases/move-end-phase.ts @@ -1,9 +1,9 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import { PokemonPhase } from "./pokemon-phase"; import type { BattlerIndex } from "#enums/battler-index"; -import type Pokemon from "#app/field/pokemon"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; +import type { Pokemon } from "#field/pokemon"; +import { PokemonPhase } from "#phases/pokemon-phase"; export class MoveEndPhase extends PokemonPhase { public readonly phaseName = "MoveEndPhase"; diff --git a/src/phases/move-header-phase.ts b/src/phases/move-header-phase.ts index 8c2d184c3f5..5c69dcd1217 100644 --- a/src/phases/move-header-phase.ts +++ b/src/phases/move-header-phase.ts @@ -1,7 +1,7 @@ -import { applyMoveAttrs } from "#app/data/moves/apply-attrs"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; -import { BattlePhase } from "./battle-phase"; +import type { Pokemon } from "#field/pokemon"; +import { applyMoveAttrs } from "#moves/apply-attrs"; +import type { PokemonMove } from "#moves/pokemon-move"; +import { BattlePhase } from "#phases/battle-phase"; export class MoveHeaderPhase extends BattlePhase { public readonly phaseName = "MoveHeaderPhase"; diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 3bc46d3aea8..09a542861be 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -1,34 +1,34 @@ -import { BattlerIndex } from "#enums/battler-index"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import type { DelayedAttackTag } from "#app/data/arena-tag"; -import { CommonAnim } from "#enums/move-anims-common"; -import { CenterOfAttentionTag } from "#app/data/battler-tags"; -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import { applyMoveAttrs } from "#app/data/moves/apply-attrs"; -import { allMoves } from "#app/data/data-lists"; -import { MoveFlags } from "#enums/MoveFlags"; -import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect"; -import { PokemonType } from "#enums/pokemon-type"; -import { getWeatherBlockMessage } from "#app/data/weather"; -import { MoveUsedEvent } from "#app/events/battle-scene"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; -import { MoveResult } from "#enums/move-result"; import { getPokemonNameWithAffix } from "#app/messages"; import Overrides from "#app/overrides"; -import { BattlePhase } from "#app/phases/battle-phase"; -import { enumValueToKey, NumberHolder } from "#app/utils/common"; +import type { DelayedAttackTag } from "#data/arena-tag"; +import { CenterOfAttentionTag } from "#data/battler-tags"; +import { SpeciesFormChangePreMoveTrigger } from "#data/form-change-triggers"; +import { getStatusEffectActivationText, getStatusEffectHealText } from "#data/status-effect"; +import { getTerrainBlockMessage } from "#data/terrain"; +import { getWeatherBlockMessage } from "#data/weather"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveFlags } from "#enums/MoveFlags"; +import { CommonAnim } from "#enums/move-anims-common"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { isIgnorePP, isIgnoreStatus, isReflected, isVirtual, MoveUseMode } from "#enums/move-use-mode"; +import { PokemonType } from "#enums/pokemon-type"; import { StatusEffect } from "#enums/status-effect"; +import { MoveUsedEvent } from "#events/battle-scene"; +import type { Pokemon } from "#field/pokemon"; +import { applyMoveAttrs } from "#moves/apply-attrs"; +import { frenzyMissFunc } from "#moves/move-utils"; +import type { PokemonMove } from "#moves/pokemon-move"; +import { BattlePhase } from "#phases/battle-phase"; +import { NumberHolder } from "#utils/common"; +import { enumValueToKey } from "#utils/enums"; import i18next from "i18next"; -import { getTerrainBlockMessage } from "#app/data/terrain"; -import { isVirtual, isIgnorePP, isReflected, MoveUseMode, isIgnoreStatus } from "#enums/move-use-mode"; -import { frenzyMissFunc } from "#app/data/moves/move-utils"; export class MovePhase extends BattlePhase { public readonly phaseName = "MovePhase"; @@ -36,11 +36,11 @@ export class MovePhase extends BattlePhase { protected _move: PokemonMove; protected _targets: BattlerIndex[]; public readonly useMode: MoveUseMode; // Made public for quash + /** Whether the current move is forced last (used for Quash). */ protected forcedLast: boolean; - - /** Whether the current move should fail but still use PP */ + /** Whether the current move should fail but still use PP. */ protected failed = false; - /** Whether the current move should cancel and retain PP */ + /** Whether the current move should fail and retain PP. */ protected cancelled = false; public get pokemon(): Pokemon { @@ -165,6 +165,7 @@ export class MovePhase extends BattlePhase { this.resolveFinalPreMoveCancellationChecks(); } + // Cancel, charge or use the move as applicable. if (this.cancelled || this.failed) { this.handlePreMoveFailures(); } else if (this.move.getMove().isChargingMove() && !this.pokemon.getTag(BattlerTagType.CHARGING)) { @@ -282,8 +283,7 @@ export class MovePhase extends BattlePhase { protected lapsePreMoveAndMoveTags(): void { this.pokemon.lapseTags(BattlerTagLapseType.PRE_MOVE); - // TODO: does this intentionally happen before the no targets/MoveId.NONE on queue cancellation case is checked? - // (In other words, check if truant can proc on a move w/o targets) + // This intentionally happens before moves without targets are cancelled (Truant takes priority over lack of targets) if (!isIgnoreStatus(this.useMode) && this.canMove() && !this.cancelled) { this.pokemon.lapseTags(BattlerTagLapseType.MOVE); } @@ -297,44 +297,27 @@ export class MovePhase extends BattlePhase { // form changes happen even before we know that the move wll execute. globalScene.triggerPokemonFormChange(this.pokemon, SpeciesFormChangePreMoveTrigger); - const isDelayedAttack = move.hasAttr("DelayedAttackAttr"); - if (isDelayedAttack) { - // Check the player side arena if future sight is active - const futureSightTags = globalScene.arena.findTags(t => t.tagType === ArenaTagType.FUTURE_SIGHT); - const doomDesireTags = globalScene.arena.findTags(t => t.tagType === ArenaTagType.DOOM_DESIRE); - let fail = false; + // Check the player side arena if another delayed attack is active and hitting the same slot. + if (move.hasAttr("DelayedAttackAttr")) { const currentTargetIndex = targets[0].getBattlerIndex(); - for (const tag of futureSightTags) { - if ((tag as DelayedAttackTag).targetIndex === currentTargetIndex) { - fail = true; - break; - } - } - for (const tag of doomDesireTags) { - if ((tag as DelayedAttackTag).targetIndex === currentTargetIndex) { - fail = true; - break; - } - } - if (fail) { - this.showMoveText(); - this.showFailedText(); - this.end(); + const delayedAttackHittingSameSlot = globalScene.arena.tags.some( + tag => + (tag.tagType === ArenaTagType.FUTURE_SIGHT || tag.tagType === ArenaTagType.DOOM_DESIRE) && + (tag as DelayedAttackTag).targetIndex === currentTargetIndex, + ); + + if (delayedAttackHittingSameSlot) { + this.failMove(true); return; } } - let success = true; - // Check if there are any attributes that can interrupt the move, overriding the fail message. - for (const move of this.move.getMove().getAttrs("PreUseInterruptAttr")) { - if (move.apply(this.pokemon, targets[0], this.move.getMove())) { - success = false; - break; - } - } - - if (success) { - this.showMoveText(); + // Check if the move has any attributes that can interrupt its own use **before** displaying text. + // TODO: This should not rely on direct return values + let failed = move.getAttrs("PreUseInterruptAttr").some(attr => attr.apply(this.pokemon, targets[0], move)); + if (failed) { + this.failMove(false); + return; } // Clear out any two turn moves once they've been used. @@ -342,6 +325,7 @@ export class MovePhase extends BattlePhase { // Move queues should be handled by the calling `CommandPhase` or a manager for it // @ts-expect-error - useMode is readonly and shouldn't normally be assigned to this.useMode = moveQueue.shift()?.useMode ?? this.useMode; + if (this.pokemon.getTag(BattlerTagType.CHARGING)?.sourceMove === this.move.moveId) { this.pokemon.lapseTag(BattlerTagType.CHARGING); } @@ -349,136 +333,145 @@ export class MovePhase extends BattlePhase { if (!isIgnorePP(this.useMode)) { // "commit" to using the move, deducting PP. const ppUsed = 1 + this.getPpIncreaseFromPressure(targets); - this.move.usePp(ppUsed); - globalScene.eventTarget.dispatchEvent(new MoveUsedEvent(this.pokemon?.id, move, this.move.ppUsed)); + globalScene.eventTarget.dispatchEvent(new MoveUsedEvent(this.pokemon.id, move, this.move.ppUsed)); } /** * Determine if the move is successful (meaning that its damage/effects can be attempted) * by checking that all of the following are true: * - Conditional attributes of the move are all met - * - The target's `ForceSwitchOutImmunityAbAttr` is not triggered (see {@linkcode Move.prototype.applyConditions}) * - Weather does not block the move * - Terrain does not block the move - * - * TODO: These steps are straightforward, but the implementation below is extremely convoluted. */ /** * Move conditions assume the move has a single target * TODO: is this sustainable? */ - let failedDueToTerrain = false; - let failedDueToWeather = false; - if (success) { - const passesConditions = move.applyConditions(this.pokemon, targets[0], move); - failedDueToWeather = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move); - failedDueToTerrain = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move); - success = passesConditions && !failedDueToWeather && !failedDueToTerrain; + const failsConditions = !move.applyConditions(this.pokemon, targets[0], move); + const failedDueToWeather = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move); + const failedDueToTerrain = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move); + failed ||= failsConditions || failedDueToWeather || failedDueToTerrain; + + if (failed) { + this.failMove(true, failedDueToWeather, failedDueToTerrain); + return; } - // Update the battle's "last move" pointer, unless we're currently mimicking a move. - if (!allMoves[this.move.moveId].hasAttr("CopyMoveAttr")) { - // The last move used is unaffected by moves that fail - if (success) { - globalScene.currentBattle.lastMove = this.move.moveId; - } + this.executeMove(); + } + + /** Execute the current move and apply its effects. */ + private executeMove() { + const move = this.move.getMove(); + const targets = this.getActiveTargetPokemon(); + + // Update the battle's "last move" pointer unless we're currently mimicking a move or triggering Dancer. + if (!move.hasAttr("CopyMoveAttr") && !isReflected(this.useMode)) { + globalScene.currentBattle.lastMove = move.id; } - /** - * If the move has not failed, trigger ability-based user type changes and then execute it. - * - * Notably, Roar, Whirlwind, Trick-or-Treat, and Forest's Curse will trigger these type changes even - * if the move fails. - */ - if (success) { - const move = this.move.getMove(); - // TODO: Investigate whether PokemonTypeChangeAbAttr can drop the "opponent" parameter - applyAbAttrs("PokemonTypeChangeAbAttr", { pokemon: this.pokemon, move, opponent: targets[0] }); - globalScene.phaseManager.unshiftNew( - "MoveEffectPhase", - this.pokemon.getBattlerIndex(), - this.targets, - move, - this.useMode, - ); - } else { - if ([MoveId.ROAR, MoveId.WHIRLWIND, MoveId.TRICK_OR_TREAT, MoveId.FORESTS_CURSE].includes(this.move.moveId)) { - applyAbAttrs("PokemonTypeChangeAbAttr", { - pokemon: this.pokemon, - move: this.move.getMove(), - opponent: targets[0], - }); - } - - this.pokemon.pushMoveHistory({ - move: this.move.moveId, - targets: this.targets, - result: MoveResult.FAIL, - useMode: this.useMode, - }); - - const failureMessage = move.getFailedText(this.pokemon, targets[0], move); - let failedText: string | undefined; - if (failureMessage) { - failedText = failureMessage; - } else if (failedDueToTerrain) { - failedText = getTerrainBlockMessage(targets[0], globalScene.arena.getTerrainType()); - } else if (failedDueToWeather) { - failedText = getWeatherBlockMessage(globalScene.arena.getWeatherType()); - } - - this.showFailedText(failedText); - - // Remove the user from its semi-invulnerable state (if applicable) - this.pokemon.lapseTags(BattlerTagLapseType.MOVE_EFFECT); - } + // Trigger ability-based user type changes, display move text and then execute move effects. + // TODO: Investigate whether PokemonTypeChangeAbAttr can drop the "opponent" parameter + applyAbAttrs("PokemonTypeChangeAbAttr", { pokemon: this.pokemon, move, opponent: targets[0] }); + this.showMoveText(); + globalScene.phaseManager.unshiftNew( + "MoveEffectPhase", + this.pokemon.getBattlerIndex(), + this.targets, + move, + this.useMode, + ); // Handle Dancer, which triggers immediately after a move is used (rather than waiting on `this.end()`). // Note the MoveUseMode check here prevents an infinite Dancer loop. + // TODO: This needs to go at the end of `MoveEffectPhase` to check move results const dancerModes: MoveUseMode[] = [MoveUseMode.INDIRECT, MoveUseMode.REFLECTED] as const; if (this.move.getMove().hasFlag(MoveFlags.DANCE_MOVE) && !dancerModes.includes(this.useMode)) { - // TODO: Fix in dancer PR to move to MEP for hit checks globalScene.getField(true).forEach(pokemon => { applyAbAttrs("PostMoveUsedAbAttr", { pokemon, move: this.move, source: this.pokemon, targets: this.targets }); }); } } - /** Queues a {@linkcode MoveChargePhase} for this phase's invoked move. */ + /** + * Fail the move currently being used. + * Handles failure messages, pushing to move history, etc. + * @param showText - Whether to show move text when failing the move. + * @param failedDueToWeather - Whether the move failed due to weather (default `false`) + * @param failedDueToTerrain - Whether the move failed due to terrain (default `false`) + */ + protected failMove(showText: boolean, failedDueToWeather = false, failedDueToTerrain = false) { + const move = this.move.getMove(); + const targets = this.getActiveTargetPokemon(); + + // DO NOT CHANGE THE ORDER OF OPERATIONS HERE! + // Protean is supposed to trigger its effects first, _then_ move text is displayed, + // _then_ any blockage messages are shown. + + // Roar, Whirlwind, Trick-or-Treat, and Forest's Curse will trigger Protean/Libero + // even on failure, as will all moves blocked by terrain. + // TODO: Verify if this also applies to primal weather failures + if ( + failedDueToTerrain || + [MoveId.ROAR, MoveId.WHIRLWIND, MoveId.TRICK_OR_TREAT, MoveId.FORESTS_CURSE].includes(this.move.moveId) + ) { + applyAbAttrs("PokemonTypeChangeAbAttr", { + pokemon: this.pokemon, + move, + opponent: targets[0], + }); + } + + if (showText) { + this.showMoveText(); + } + + this.pokemon.pushMoveHistory({ + move: this.move.moveId, + targets: this.targets, + result: MoveResult.FAIL, + useMode: this.useMode, + }); + + // Use move-specific failure messages if present before checking terrain/weather blockage + // and falling back to the classic "But it failed!". + const failureMessage = + move.getFailedText(this.pokemon, targets[0], move) || + (failedDueToTerrain + ? getTerrainBlockMessage(targets[0], globalScene.arena.getTerrainType()) + : failedDueToWeather + ? getWeatherBlockMessage(globalScene.arena.getWeatherType()) + : i18next.t("battle:attackFailed")); + + this.showFailedText(failureMessage); + + // Remove the user from its semi-invulnerable state (if applicable) + this.pokemon.lapseTags(BattlerTagLapseType.MOVE_EFFECT); + } + + /** + * Queue a {@linkcode MoveChargePhase} for this phase's invoked move. + * Does NOT consume PP (occurs on the 2nd strike of the move) + */ protected chargeMove() { const move = this.move.getMove(); const targets = this.getActiveTargetPokemon(); - this.showMoveText(); - - // Conditions currently assume single target - // TODO: Is this sustainable? if (!move.applyConditions(this.pokemon, targets[0], move)) { - this.pokemon.pushMoveHistory({ - move: this.move.moveId, - targets: this.targets, - result: MoveResult.FAIL, - useMode: this.useMode, - }); - - const failureMessage = move.getFailedText(this.pokemon, targets[0], move); - this.showMoveText(); - this.showFailedText(failureMessage ?? undefined); - - // Remove the user from its semi-invulnerable state (if applicable) - this.pokemon.lapseTags(BattlerTagLapseType.MOVE_EFFECT); + this.failMove(true); return; } - // Protean and Libero apply on the charging turn of charge moves + // Protean and Libero apply on the charging turn of charge moves, even before showing usage text applyAbAttrs("PokemonTypeChangeAbAttr", { pokemon: this.pokemon, - move: this.move.getMove(), + move, opponent: targets[0], }); + this.showMoveText(); globalScene.phaseManager.unshiftNew( "MoveChargePhase", this.pokemon.getBattlerIndex(), @@ -489,7 +482,7 @@ export class MovePhase extends BattlePhase { } /** - * Queues a {@linkcode MoveEndPhase} and then ends the phase + * Queue a {@linkcode MoveEndPhase} and then end this phase. */ public end(): void { globalScene.phaseManager.unshiftNew( @@ -503,15 +496,15 @@ export class MovePhase extends BattlePhase { } /** - * Applies PP increasing abilities (currently only {@link AbilityId.PRESSURE Pressure}) if they exist on the target pokemon. + * Applies PP increasing abilities (currently only {@linkcode AbilityId.PRESSURE | Pressure}) if they exist on the target pokemon. * Note that targets must include only active pokemon. * * TODO: This hardcodes the PP increase at 1 per opponent, rather than deferring to the ability. */ public getPpIncreaseFromPressure(targets: Pokemon[]): number { const foesWithPressure = this.pokemon - .getOpponents() - .filter(o => targets.includes(o) && o.isActive(true) && o.hasAbilityWithAttr("IncreasePpAbAttr")); + .getOpponents(true) + .filter(o => targets.includes(o) && o.hasAbilityWithAttr("IncreasePpAbAttr")); return foesWithPressure.length; } @@ -521,105 +514,113 @@ export class MovePhase extends BattlePhase { * - Counterattacks, which pass a special value into the `targets` constructor param (`[`{@linkcode BattlerIndex.ATTACKER}`]`). */ protected resolveRedirectTarget(): void { - if (this.targets.length === 1) { - const currentTarget = this.targets[0]; - const redirectTarget = new NumberHolder(currentTarget); + if (this.targets.length !== 1) { + // Spread moves cannot be redirected + return; + } - // check move redirection abilities of every pokemon *except* the user. - globalScene - .getField(true) - .filter(p => p !== this.pokemon) - .forEach(p => - applyAbAttrs("RedirectMoveAbAttr", { - pokemon: p, - moveId: this.move.moveId, - targetIndex: redirectTarget, - sourcePokemon: this.pokemon, - }), - ); + const currentTarget = this.targets[0]; + const redirectTarget = new NumberHolder(currentTarget); - /** `true` if an Ability is responsible for redirecting the move to another target; `false` otherwise */ - let redirectedByAbility = currentTarget !== redirectTarget.value; + // check move redirection abilities of every pokemon *except* the user. + globalScene + .getField(true) + .filter(p => p !== this.pokemon) + .forEach(pokemon => { + applyAbAttrs("RedirectMoveAbAttr", { + pokemon, + moveId: this.move.moveId, + targetIndex: redirectTarget, + sourcePokemon: this.pokemon, + }); + }); - // check for center-of-attention tags (note that this will override redirect abilities) - this.pokemon.getOpponents().forEach(p => { - const redirectTag = p.getTag(CenterOfAttentionTag); + /** `true` if an Ability is responsible for redirecting the move to another target; `false` otherwise */ + let redirectedByAbility = currentTarget !== redirectTarget.value; - // TODO: don't hardcode this interaction. - // Handle interaction between the rage powder center-of-attention tag and moves used by grass types/overcoat-havers (which are immune to RP's redirect) - if ( - redirectTag && - (!redirectTag.powder || - (!this.pokemon.isOfType(PokemonType.GRASS) && !this.pokemon.hasAbility(AbilityId.OVERCOAT))) - ) { - redirectTarget.value = p.getBattlerIndex(); - redirectedByAbility = false; + // check for center-of-attention tags (note that this will override redirect abilities) + this.pokemon.getOpponents(true).forEach(p => { + const redirectTag = p.getTag(CenterOfAttentionTag); + + // TODO: don't hardcode this interaction. + // Handle interaction between the rage powder center-of-attention tag and moves used by grass types/overcoat-havers (which are immune to RP's redirect) + if ( + redirectTag && + (!redirectTag.powder || + (!this.pokemon.isOfType(PokemonType.GRASS) && !this.pokemon.hasAbility(AbilityId.OVERCOAT))) + ) { + redirectTarget.value = p.getBattlerIndex(); + redirectedByAbility = false; + } + }); + + // TODO: Don't hardcode these ability interactions + if (currentTarget !== redirectTarget.value) { + const bypassRedirectAttrs = this.move.getMove().getAttrs("BypassRedirectAttr"); + bypassRedirectAttrs.forEach(attr => { + if (!attr.abilitiesOnly || redirectedByAbility) { + redirectTarget.value = currentTarget; } }); - if (currentTarget !== redirectTarget.value) { - const bypassRedirectAttrs = this.move.getMove().getAttrs("BypassRedirectAttr"); - bypassRedirectAttrs.forEach(attr => { - if (!attr.abilitiesOnly || redirectedByAbility) { - redirectTarget.value = currentTarget; - } - }); - - if (this.pokemon.hasAbilityWithAttr("BlockRedirectAbAttr")) { - redirectTarget.value = currentTarget; - // TODO: Ability displays should be handled by the ability - globalScene.phaseManager.queueAbilityDisplay( - this.pokemon, - this.pokemon.getPassiveAbility().hasAttr("BlockRedirectAbAttr"), - true, - ); - globalScene.phaseManager.queueAbilityDisplay( - this.pokemon, - this.pokemon.getPassiveAbility().hasAttr("BlockRedirectAbAttr"), - false, - ); - } - - this.targets[0] = redirectTarget.value; + if (this.pokemon.hasAbilityWithAttr("BlockRedirectAbAttr")) { + redirectTarget.value = currentTarget; + // TODO: Ability displays should be handled by the ability + globalScene.phaseManager.queueAbilityDisplay( + this.pokemon, + this.pokemon.getPassiveAbility().hasAttr("BlockRedirectAbAttr"), + true, + ); + globalScene.phaseManager.queueAbilityDisplay( + this.pokemon, + this.pokemon.getPassiveAbility().hasAttr("BlockRedirectAbAttr"), + false, + ); } + + this.targets[0] = redirectTarget.value; } } /** - * Counter-attacking moves pass in `[`{@linkcode BattlerIndex.ATTACKER}`]` into the constructor's `targets` param. - * This function modifies `this.targets` to reflect the actual battler index of the user's last - * attacker. + * Update the targets of any counter-attacking moves with `[`{@linkcode BattlerIndex.ATTACKER}`]` set + * to reflect the actual battler index of the user's last attacker. * - * If there is no last attacker, or they are no longer on the field, a message is displayed and the + * If there is no last attacker or they are no longer on the field, a message is displayed and the * move is marked for failure. + * @todo Make this a feature of the move rather than basing logic on {@linkcode BattlerIndex.ATTACKER} */ protected resolveCounterAttackTarget(): void { - if (this.targets.length === 1 && this.targets[0] === BattlerIndex.ATTACKER) { - if (this.pokemon.turnData.attacksReceived.length) { - this.targets[0] = this.pokemon.turnData.attacksReceived[0].sourceBattlerIndex; + if (this.targets.length !== 1 || this.targets[0] !== BattlerIndex.ATTACKER) { + return; + } - // account for metal burst and comeuppance hitting remaining targets in double battles - // counterattack will redirect to remaining ally if original attacker faints - if (globalScene.currentBattle.double && this.move.getMove().hasFlag(MoveFlags.REDIRECT_COUNTER)) { - if (globalScene.getField()[this.targets[0]].hp === 0) { - const opposingField = this.pokemon.isPlayer() ? globalScene.getEnemyField() : globalScene.getPlayerField(); - this.targets[0] = opposingField.find(p => p.hp > 0)?.getBattlerIndex() ?? BattlerIndex.ATTACKER; - } - } - } + // TODO: This should be covered in move conditions + if (this.pokemon.turnData.attacksReceived.length === 0) { + this.fail(); + this.showMoveText(); + this.showFailedText(); + return; + } - if (this.targets[0] === BattlerIndex.ATTACKER) { - this.fail(); - this.showMoveText(); - this.showFailedText(); - } + this.targets[0] = this.pokemon.turnData.attacksReceived[0].sourceBattlerIndex; + + // account for metal burst and comeuppance hitting remaining targets in double battles + // counterattack will redirect to remaining ally if original attacker faints + if ( + globalScene.currentBattle.double && + this.move.getMove().hasFlag(MoveFlags.REDIRECT_COUNTER) && + globalScene.getField()[this.targets[0]].hp === 0 + ) { + const opposingField = this.pokemon.isPlayer() ? globalScene.getEnemyField() : globalScene.getPlayerField(); + this.targets[0] = opposingField.find(p => p.hp > 0)?.getBattlerIndex() ?? BattlerIndex.ATTACKER; } } /** * Handles the case where the move was cancelled or failed: - * - Uses PP if the move failed (not cancelled) and should use PP (failed moves are not affected by {@link AbilityId.PRESSURE Pressure}) - * - Records a cancelled OR failed move in move history, so abilities like {@link AbilityId.TRUANT Truant} don't trigger on the + * - Uses PP if the move failed (not cancelled) and should use PP (failed moves are not affected by {@linkcode AbilityId.PRESSURE | Pressure}) + * - Records a cancelled OR failed move in move history, so abilities like {@linkcode AbilityId.TRUANT | Truant} don't trigger on the * next turn and soft-lock. * - Lapses `MOVE_EFFECT` tags: * - Semi-invulnerable battler tags (Fly/Dive/etc.) are intended to lapse on move effects, but also need @@ -627,52 +628,55 @@ export class MovePhase extends BattlePhase { * * TODO: ...this seems weird. * - Lapses `AFTER_MOVE` tags: - * - This handles the effects of {@link MoveId.SUBSTITUTE Substitute} + * - This handles the effects of {@linkcode MoveId.SUBSTITUTE | Substitute} * - Removes the second turn of charge moves */ protected handlePreMoveFailures(): void { - if (this.cancelled || this.failed) { - if (this.failed) { - const ppUsed = isIgnorePP(this.useMode) ? 0 : 1; - - if (ppUsed) { - this.move.usePp(); - } - - globalScene.eventTarget.dispatchEvent(new MoveUsedEvent(this.pokemon?.id, this.move.getMove(), ppUsed)); - } - - if (this.cancelled && this.pokemon.summonData.tags?.find(t => t.tagType === BattlerTagType.FRENZY)) { - frenzyMissFunc(this.pokemon, this.move.getMove()); - } - - this.pokemon.pushMoveHistory({ - move: MoveId.NONE, - result: MoveResult.FAIL, - targets: this.targets, - useMode: this.useMode, - }); - - this.pokemon.lapseTags(BattlerTagLapseType.MOVE_EFFECT); - this.pokemon.lapseTags(BattlerTagLapseType.AFTER_MOVE); - - this.pokemon.getMoveQueue().shift(); + if (!this.cancelled && !this.failed) { + return; } + + if (this.failed) { + // TODO: should this consider struggle? + const ppUsed = isIgnorePP(this.useMode) ? 0 : 1; + this.move.usePp(ppUsed); + globalScene.eventTarget.dispatchEvent(new MoveUsedEvent(this.pokemon?.id, this.move.getMove(), ppUsed)); + } + + if (this.cancelled && this.pokemon.summonData.tags.some(t => t.tagType === BattlerTagType.FRENZY)) { + frenzyMissFunc(this.pokemon, this.move.getMove()); + } + + this.pokemon.pushMoveHistory({ + move: MoveId.NONE, + result: MoveResult.FAIL, + targets: this.targets, + useMode: this.useMode, + }); + + this.pokemon.lapseTags(BattlerTagLapseType.MOVE_EFFECT); + this.pokemon.lapseTags(BattlerTagLapseType.AFTER_MOVE); + + // This clears out 2 turn moves after they've been used + // TODO: Remove post move queue refactor + this.pokemon.getMoveQueue().shift(); } /** - * Displays the move's usage text to the player, unless it's a charge turn (ie: {@link MoveId.SOLAR_BEAM Solar Beam}), - * the pokemon is on a recharge turn (ie: {@link MoveId.HYPER_BEAM Hyper Beam}), or a 2-turn move was interrupted (ie: {@link MoveId.FLY Fly}). + * Displays the move's usage text to the player as applicable for the move being used. */ public showMoveText(): void { - if (this.move.moveId === MoveId.NONE) { - return; - } - - if (this.pokemon.getTag(BattlerTagType.RECHARGING) || this.pokemon.getTag(BattlerTagType.INTERRUPTED)) { + // No text for Moves.NONE, recharging/2-turn moves or interrupted moves + if ( + this.move.moveId === MoveId.NONE || + this.pokemon.getTag(BattlerTagType.RECHARGING) || + this.pokemon.getTag(BattlerTagType.INTERRUPTED) + ) { return; } + // Play message for magic coat reflection + // TODO: This should be done by the move... globalScene.phaseManager.queueMessage( i18next.t(isReflected(this.useMode) ? "battle:magicCoatActivated" : "battle:useMove", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), @@ -686,7 +690,12 @@ export class MovePhase extends BattlePhase { applyMoveAttrs("PreMoveMessageAttr", this.pokemon, this.pokemon.getOpponents(false)[0], this.move.getMove()); } - public showFailedText(failedText: string = i18next.t("battle:attackFailed")): void { + /** + * Display the text for a move failing to execute. + * @param failedText - The failure text to display; defaults to `"battle:attackFailed"` locale key + * ("But it failed!" in english) + */ + public showFailedText(failedText = i18next.t("battle:attackFailed")): void { globalScene.phaseManager.queueMessage(failedText); } } diff --git a/src/phases/mystery-encounter-phases.ts b/src/phases/mystery-encounter-phases.ts index 9aae796211f..9363efcb460 100644 --- a/src/phases/mystery-encounter-phases.ts +++ b/src/phases/mystery-encounter-phases.ts @@ -1,22 +1,21 @@ -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import type { OptionPhaseCallback } from "#app/data/mystery-encounters/mystery-encounter-option"; -import type MysteryEncounterOption from "#app/data/mystery-encounters/mystery-encounter-option"; -import { SeenEncounterData } from "#app/data/mystery-encounters/mystery-encounter-save-data"; -import { getEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; +import { globalScene } from "#app/global-scene"; +import { Phase } from "#app/phase"; +import { getCharVariantFromDialogue } from "#data/dialogue"; import { BattleSpec } from "#enums/battle-spec"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; import { SwitchType } from "#enums/switch-type"; -import i18next from "i18next"; -import { globalScene } from "#app/global-scene"; -import { getCharVariantFromDialogue } from "../data/dialogue"; -import type { OptionSelectSettings } from "../data/mystery-encounters/utils/encounter-phase-utils"; -import { transitionMysteryEncounterIntroVisuals } from "../data/mystery-encounters/utils/encounter-phase-utils"; import { TrainerSlot } from "#enums/trainer-slot"; -import { IvScannerModifier } from "../modifier/modifier"; -import { Phase } from "../phase"; import { UiMode } from "#enums/ui-mode"; -import { isNullOrUndefined, randSeedItem } from "#app/utils/common"; +import { IvScannerModifier } from "#modifiers/modifier"; +import { getEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { OptionSelectSettings } from "#mystery-encounters/encounter-phase-utils"; +import { transitionMysteryEncounterIntroVisuals } from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounterOption, OptionPhaseCallback } from "#mystery-encounters/mystery-encounter-option"; +import { SeenEncounterData } from "#mystery-encounters/mystery-encounter-save-data"; +import { isNullOrUndefined, randSeedItem } from "#utils/common"; +import i18next from "i18next"; /** * Will handle (in order): diff --git a/src/phases/new-battle-phase.ts b/src/phases/new-battle-phase.ts index 65ecc81df2d..b9a57161bd0 100644 --- a/src/phases/new-battle-phase.ts +++ b/src/phases/new-battle-phase.ts @@ -1,5 +1,5 @@ import { globalScene } from "#app/global-scene"; -import { BattlePhase } from "./battle-phase"; +import { BattlePhase } from "#phases/battle-phase"; export class NewBattlePhase extends BattlePhase { public readonly phaseName = "NewBattlePhase"; diff --git a/src/phases/new-biome-encounter-phase.ts b/src/phases/new-biome-encounter-phase.ts index 74476412401..db57671c4e3 100644 --- a/src/phases/new-biome-encounter-phase.ts +++ b/src/phases/new-biome-encounter-phase.ts @@ -1,7 +1,7 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { getRandomWeatherType } from "#app/data/weather"; -import { NextEncounterPhase } from "./next-encounter-phase"; +import { getRandomWeatherType } from "#data/weather"; +import { NextEncounterPhase } from "#phases/next-encounter-phase"; export class NewBiomeEncounterPhase extends NextEncounterPhase { public readonly phaseName = "NewBiomeEncounterPhase"; diff --git a/src/phases/next-encounter-phase.ts b/src/phases/next-encounter-phase.ts index c31b4b5bbc3..02b9dd7ed69 100644 --- a/src/phases/next-encounter-phase.ts +++ b/src/phases/next-encounter-phase.ts @@ -1,5 +1,5 @@ import { globalScene } from "#app/global-scene"; -import { EncounterPhase } from "./encounter-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; /** * The phase between defeating an encounter and starting another wild wave. diff --git a/src/phases/obtain-status-effect-phase.ts b/src/phases/obtain-status-effect-phase.ts index 78db8ae0a99..fbadbed205b 100644 --- a/src/phases/obtain-status-effect-phase.ts +++ b/src/phases/obtain-status-effect-phase.ts @@ -1,15 +1,15 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import type { BattlerIndex } from "#enums/battler-index"; -import { CommonBattleAnim } from "#app/data/battle-anims"; -import { CommonAnim } from "#enums/move-anims-common"; -import { getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect"; -import { StatusEffect } from "#app/enums/status-effect"; -import type Pokemon from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; -import { PokemonPhase } from "./pokemon-phase"; -import { SpeciesFormChangeStatusEffectTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { isNullOrUndefined } from "#app/utils/common"; +import { CommonBattleAnim } from "#data/battle-anims"; +import { SpeciesFormChangeStatusEffectTrigger } from "#data/form-change-triggers"; +import { getStatusEffectObtainText, getStatusEffectOverlapText } from "#data/status-effect"; +import type { BattlerIndex } from "#enums/battler-index"; +import { CommonAnim } from "#enums/move-anims-common"; +import { StatusEffect } from "#enums/status-effect"; +import type { Pokemon } from "#field/pokemon"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import { isNullOrUndefined } from "#utils/common"; export class ObtainStatusEffectPhase extends PokemonPhase { public readonly phaseName = "ObtainStatusEffectPhase"; diff --git a/src/phases/party-heal-phase.ts b/src/phases/party-heal-phase.ts index 765c7dbad8e..80d8b315102 100644 --- a/src/phases/party-heal-phase.ts +++ b/src/phases/party-heal-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import { fixedInt } from "#app/utils/common"; -import { BattlePhase } from "./battle-phase"; +import { BattlePhase } from "#phases/battle-phase"; +import { fixedInt } from "#utils/common"; export class PartyHealPhase extends BattlePhase { public readonly phaseName = "PartyHealPhase"; diff --git a/src/phases/party-member-pokemon-phase.ts b/src/phases/party-member-pokemon-phase.ts index a782eabda38..9536dafda60 100644 --- a/src/phases/party-member-pokemon-phase.ts +++ b/src/phases/party-member-pokemon-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import type Pokemon from "#app/field/pokemon"; -import { FieldPhase } from "./field-phase"; +import type { Pokemon } from "#field/pokemon"; +import { FieldPhase } from "#phases/field-phase"; export abstract class PartyMemberPokemonPhase extends FieldPhase { protected partyMemberIndex: number; diff --git a/src/phases/player-party-member-pokemon-phase.ts b/src/phases/player-party-member-pokemon-phase.ts index d97376a8614..4538bb42325 100644 --- a/src/phases/player-party-member-pokemon-phase.ts +++ b/src/phases/player-party-member-pokemon-phase.ts @@ -1,5 +1,5 @@ -import type { PlayerPokemon } from "#app/field/pokemon"; -import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; +import type { PlayerPokemon } from "#field/pokemon"; +import { PartyMemberPokemonPhase } from "#phases/party-member-pokemon-phase"; export abstract class PlayerPartyMemberPokemonPhase extends PartyMemberPokemonPhase { constructor(partyMemberIndex: number) { diff --git a/src/phases/pokemon-anim-phase.ts b/src/phases/pokemon-anim-phase.ts index 314bddb981d..39e9c609aec 100644 --- a/src/phases/pokemon-anim-phase.ts +++ b/src/phases/pokemon-anim-phase.ts @@ -1,10 +1,10 @@ import { globalScene } from "#app/global-scene"; -import { SubstituteTag } from "#app/data/battler-tags"; -import type Pokemon from "#app/field/pokemon"; -import { BattlePhase } from "#app/phases/battle-phase"; -import { isNullOrUndefined } from "#app/utils/common"; +import { SubstituteTag } from "#data/battler-tags"; import { PokemonAnimType } from "#enums/pokemon-anim-type"; import { SpeciesId } from "#enums/species-id"; +import type { Pokemon } from "#field/pokemon"; +import { BattlePhase } from "#phases/battle-phase"; +import { isNullOrUndefined } from "#utils/common"; export class PokemonAnimPhase extends BattlePhase { public readonly phaseName = "PokemonAnimPhase"; diff --git a/src/phases/pokemon-heal-phase.ts b/src/phases/pokemon-heal-phase.ts index cf6cf40a923..fa6a3222466 100644 --- a/src/phases/pokemon-heal-phase.ts +++ b/src/phases/pokemon-heal-phase.ts @@ -1,17 +1,17 @@ import { globalScene } from "#app/global-scene"; -import type { BattlerIndex } from "#enums/battler-index"; -import { CommonAnim } from "#enums/move-anims-common"; -import { getStatusEffectHealText } from "#app/data/status-effect"; -import { StatusEffect } from "#app/enums/status-effect"; -import { HitResult } from "#enums/hit-result"; import { getPokemonNameWithAffix } from "#app/messages"; -import { HealingBoosterModifier } from "#app/modifier/modifier"; -import { HealAchv } from "#app/system/achv"; +import type { HealBlockTag } from "#data/battler-tags"; +import { getStatusEffectHealText } from "#data/status-effect"; +import type { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { HitResult } from "#enums/hit-result"; +import { CommonAnim } from "#enums/move-anims-common"; +import { StatusEffect } from "#enums/status-effect"; +import { HealingBoosterModifier } from "#modifiers/modifier"; +import { CommonAnimPhase } from "#phases/common-anim-phase"; +import { HealAchv } from "#system/achv"; +import { NumberHolder } from "#utils/common"; import i18next from "i18next"; -import { NumberHolder } from "#app/utils/common"; -import { CommonAnimPhase } from "./common-anim-phase"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import type { HealBlockTag } from "#app/data/battler-tags"; export class PokemonHealPhase extends CommonAnimPhase { public readonly phaseName = "PokemonHealPhase"; diff --git a/src/phases/pokemon-phase.ts b/src/phases/pokemon-phase.ts index cfa30f0d06e..9739c58d667 100644 --- a/src/phases/pokemon-phase.ts +++ b/src/phases/pokemon-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#enums/battler-index"; -import type Pokemon from "#app/field/pokemon"; -import { FieldPhase } from "./field-phase"; +import type { Pokemon } from "#field/pokemon"; +import { FieldPhase } from "#phases/field-phase"; export abstract class PokemonPhase extends FieldPhase { /** diff --git a/src/phases/pokemon-transform-phase.ts b/src/phases/pokemon-transform-phase.ts index 938915309d9..143c47886b6 100644 --- a/src/phases/pokemon-transform-phase.ts +++ b/src/phases/pokemon-transform-phase.ts @@ -1,11 +1,11 @@ +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; import type { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; -import { EFFECTIVE_STATS, BATTLE_STATS } from "#enums/stat"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { globalScene } from "#app/global-scene"; -import { PokemonPhase } from "./pokemon-phase"; -import { getPokemonNameWithAffix } from "#app/messages"; +import { BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; +import { PokemonMove } from "#moves/pokemon-move"; +import { PokemonPhase } from "#phases/pokemon-phase"; import i18next from "i18next"; /** @@ -26,7 +26,7 @@ export class PokemonTransformPhase extends PokemonPhase { public override start(): void { const user = this.getPokemon(); - const target = globalScene.getField(true).find(p => p.getBattlerIndex() === this.targetIndex); + const target = globalScene.getField()[this.targetIndex]; if (!target) { this.end(); @@ -58,6 +58,8 @@ export class PokemonTransformPhase extends PokemonPhase { console.warn(`Transform: somehow iterating over a ${m} value when copying moveset!`); return new PokemonMove(MoveId.NONE); }); + + // TODO: This should fallback to the target's original typing if none are left (from Burn Up, etc.) user.summonData.types = target.getTypes(); const promises = [user.updateInfo()]; diff --git a/src/phases/post-game-over-phase.ts b/src/phases/post-game-over-phase.ts index 8e19dcd5498..3ac112a8a8b 100644 --- a/src/phases/post-game-over-phase.ts +++ b/src/phases/post-game-over-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; -import type { EndCardPhase } from "./end-card-phase"; +import type { EndCardPhase } from "#phases/end-card-phase"; export class PostGameOverPhase extends Phase { public readonly phaseName = "PostGameOverPhase"; diff --git a/src/phases/post-summon-activate-ability-phase.ts b/src/phases/post-summon-activate-ability-phase.ts index b1079a9b3e5..5f790c01ad1 100644 --- a/src/phases/post-summon-activate-ability-phase.ts +++ b/src/phases/post-summon-activate-ability-phase.ts @@ -1,6 +1,6 @@ -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { PostSummonPhase } from "#app/phases/post-summon-phase"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import type { BattlerIndex } from "#enums/battler-index"; +import { PostSummonPhase } from "#phases/post-summon-phase"; /** * Helper to {@linkcode PostSummonPhase} which applies abilities diff --git a/src/phases/post-summon-phase.ts b/src/phases/post-summon-phase.ts index 7f22148fdcf..e0811d0ab93 100644 --- a/src/phases/post-summon-phase.ts +++ b/src/phases/post-summon-phase.ts @@ -1,10 +1,10 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { ArenaTrapTag } from "#app/data/arena-tag"; -import { StatusEffect } from "#app/enums/status-effect"; -import { PokemonPhase } from "./pokemon-phase"; -import { MysteryEncounterPostSummonTag } from "#app/data/battler-tags"; +import { ArenaTrapTag } from "#data/arena-tag"; +import { MysteryEncounterPostSummonTag } from "#data/battler-tags"; import { BattlerTagType } from "#enums/battler-tag-type"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; +import { StatusEffect } from "#enums/status-effect"; +import { PokemonPhase } from "#phases/pokemon-phase"; export class PostSummonPhase extends PokemonPhase { public readonly phaseName = "PostSummonPhase"; diff --git a/src/phases/post-turn-status-effect-phase.ts b/src/phases/post-turn-status-effect-phase.ts index fd7dd6ed419..9d5172180b8 100644 --- a/src/phases/post-turn-status-effect-phase.ts +++ b/src/phases/post-turn-status-effect-phase.ts @@ -1,14 +1,14 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import type { BattlerIndex } from "#enums/battler-index"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { CommonBattleAnim } from "#app/data/battle-anims"; -import { CommonAnim } from "#enums/move-anims-common"; -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 { BooleanHolder, NumberHolder } from "#app/utils/common"; -import { PokemonPhase } from "./pokemon-phase"; +import { CommonBattleAnim } from "#data/battle-anims"; +import { getStatusEffectActivationText } from "#data/status-effect"; +import { BattleSpec } from "#enums/battle-spec"; +import type { BattlerIndex } from "#enums/battler-index"; +import { CommonAnim } from "#enums/move-anims-common"; +import { StatusEffect } from "#enums/status-effect"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import { BooleanHolder, NumberHolder } from "#utils/common"; export class PostTurnStatusEffectPhase extends PokemonPhase { public readonly phaseName = "PostTurnStatusEffectPhase"; diff --git a/src/phases/quiet-form-change-phase.ts b/src/phases/quiet-form-change-phase.ts index 9c4a0638b54..ef53b16cc56 100644 --- a/src/phases/quiet-form-change-phase.ts +++ b/src/phases/quiet-form-change-phase.ts @@ -1,18 +1,15 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { SemiInvulnerableTag } from "#app/data/battler-tags"; -import type { SpeciesFormChange } from "#app/data/pokemon-forms"; -import { - getSpeciesFormChangeMessage, - SpeciesFormChangeTeraTrigger, -} from "#app/data/pokemon-forms/form-change-triggers"; -import { getTypeRgb } from "#app/data/type"; -import { BattleSpec } from "#app/enums/battle-spec"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import type Pokemon from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; -import { BattlePhase } from "./battle-phase"; -import type { MovePhase } from "./move-phase"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; +import { SemiInvulnerableTag } from "#data/battler-tags"; +import { getSpeciesFormChangeMessage, SpeciesFormChangeTeraTrigger } from "#data/form-change-triggers"; +import type { SpeciesFormChange } from "#data/pokemon-forms"; +import { getTypeRgb } from "#data/type"; +import { BattleSpec } from "#enums/battle-spec"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import type { Pokemon } from "#field/pokemon"; +import { BattlePhase } from "#phases/battle-phase"; +import type { MovePhase } from "#phases/move-phase"; export class QuietFormChangePhase extends BattlePhase { public readonly phaseName = "QuietFormChangePhase"; diff --git a/src/phases/reload-session-phase.ts b/src/phases/reload-session-phase.ts index ac9337753c4..ac8a6bc2799 100644 --- a/src/phases/reload-session-phase.ts +++ b/src/phases/reload-session-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { UiMode } from "#enums/ui-mode"; -import { fixedInt } from "#app/utils/common"; +import { fixedInt } from "#utils/common"; export class ReloadSessionPhase extends Phase { public readonly phaseName = "ReloadSessionPhase"; diff --git a/src/phases/reset-status-phase.ts b/src/phases/reset-status-phase.ts index 779f375d7e2..e15fb7fee85 100644 --- a/src/phases/reset-status-phase.ts +++ b/src/phases/reset-status-phase.ts @@ -1,5 +1,5 @@ -import type Pokemon from "#app/field/pokemon"; -import { BattlePhase } from "#app/phases/battle-phase"; +import type { Pokemon } from "#field/pokemon"; +import { BattlePhase } from "#phases/battle-phase"; /** * Phase which handles resetting a Pokemon's status to none diff --git a/src/phases/return-phase.ts b/src/phases/return-phase.ts index a8233f98bd1..a8cce72810e 100644 --- a/src/phases/return-phase.ts +++ b/src/phases/return-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; +import { SpeciesFormChangeActiveTrigger } from "#data/form-change-triggers"; import { SwitchType } from "#enums/switch-type"; -import { SwitchSummonPhase } from "./switch-summon-phase"; +import { SwitchSummonPhase } from "#phases/switch-summon-phase"; export class ReturnPhase extends SwitchSummonPhase { public readonly phaseName = "ReturnPhase"; diff --git a/src/phases/revival-blessing-phase.ts b/src/phases/revival-blessing-phase.ts index e3e69f7ef25..0235fb51da3 100644 --- a/src/phases/revival-blessing-phase.ts +++ b/src/phases/revival-blessing-phase.ts @@ -1,12 +1,12 @@ -import { SwitchType } from "#enums/switch-type"; import { globalScene } from "#app/global-scene"; -import type { PartyOption } from "#app/ui/party-ui-handler"; -import PartyUiHandler, { PartyUiMode } from "#app/ui/party-ui-handler"; +import { SwitchType } from "#enums/switch-type"; import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon } from "#field/pokemon"; +import { BattlePhase } from "#phases/battle-phase"; +import type { PartyOption } from "#ui/party-ui-handler"; +import { PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler"; +import { isNullOrUndefined, toDmgValue } from "#utils/common"; import i18next from "i18next"; -import { toDmgValue, isNullOrUndefined } from "#app/utils/common"; -import { BattlePhase } from "#app/phases/battle-phase"; -import type { PlayerPokemon } from "#app/field/pokemon"; /** * Sets the Party UI and handles the effect of Revival Blessing diff --git a/src/phases/ribbon-modifier-reward-phase.ts b/src/phases/ribbon-modifier-reward-phase.ts index 10d63ba707f..7cf3f7a8071 100644 --- a/src/phases/ribbon-modifier-reward-phase.ts +++ b/src/phases/ribbon-modifier-reward-phase.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import type { ModifierTypeFunc } from "#app/@types/modifier-types"; +import type { PokemonSpecies } from "#data/pokemon-species"; import { UiMode } from "#enums/ui-mode"; +import { ModifierRewardPhase } from "#phases/modifier-reward-phase"; +import type { ModifierTypeFunc } from "#types/modifier-types"; import i18next from "i18next"; -import { ModifierRewardPhase } from "./modifier-reward-phase"; export class RibbonModifierRewardPhase extends ModifierRewardPhase { public readonly phaseName = "RibbonModifierRewardPhase"; diff --git a/src/phases/scan-ivs-phase.ts b/src/phases/scan-ivs-phase.ts index d296d87ca88..e0865feb7ca 100644 --- a/src/phases/scan-ivs-phase.ts +++ b/src/phases/scan-ivs-phase.ts @@ -1,11 +1,11 @@ import { globalScene } from "#app/global-scene"; -import type { BattlerIndex } from "#enums/battler-index"; -import { PERMANENT_STATS, Stat } from "#app/enums/stat"; import { getPokemonNameWithAffix } from "#app/messages"; -import { getTextColor, TextStyle } from "#app/ui/text"; +import type { BattlerIndex } from "#enums/battler-index"; +import { PERMANENT_STATS, Stat } from "#enums/stat"; import { UiMode } from "#enums/ui-mode"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import { getTextColor, TextStyle } from "#ui/text"; import i18next from "i18next"; -import { PokemonPhase } from "./pokemon-phase"; export class ScanIvsPhase extends PokemonPhase { public readonly phaseName = "ScanIvsPhase"; diff --git a/src/phases/select-biome-phase.ts b/src/phases/select-biome-phase.ts index e8b4946b6d1..ab96bf5c45e 100644 --- a/src/phases/select-biome-phase.ts +++ b/src/phases/select-biome-phase.ts @@ -1,11 +1,11 @@ import { globalScene } from "#app/global-scene"; -import { biomeLinks, getBiomeName } from "#app/data/balance/biomes"; +import { biomeLinks, getBiomeName } from "#balance/biomes"; import { BiomeId } from "#enums/biome-id"; -import { MoneyInterestModifier, MapModifier } from "#app/modifier/modifier"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; import { UiMode } from "#enums/ui-mode"; -import { BattlePhase } from "./battle-phase"; -import { randSeedInt } from "#app/utils/common"; +import { MapModifier, MoneyInterestModifier } from "#modifiers/modifier"; +import { BattlePhase } from "#phases/battle-phase"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { randSeedInt } from "#utils/common"; export class SelectBiomePhase extends BattlePhase { public readonly phaseName = "SelectBiomePhase"; @@ -56,6 +56,7 @@ export class SelectBiomePhase extends BattlePhase { delay: 1000, }); } else { + // TODO: should this use `randSeedItem`? setNextBiome(biomes[randSeedInt(biomes.length)]); } } else if (biomeLinks.hasOwnProperty(currentBiome)) { diff --git a/src/phases/select-gender-phase.ts b/src/phases/select-gender-phase.ts index ad8515e312e..d44c308d08c 100644 --- a/src/phases/select-gender-phase.ts +++ b/src/phases/select-gender-phase.ts @@ -1,8 +1,8 @@ import { globalScene } from "#app/global-scene"; -import { PlayerGender } from "#app/enums/player-gender"; import { Phase } from "#app/phase"; -import { SettingKeys } from "#app/system/settings/settings"; +import { PlayerGender } from "#enums/player-gender"; import { UiMode } from "#enums/ui-mode"; +import { SettingKeys } from "#system/settings"; 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 53e1f5bc282..05c890136ee 100644 --- a/src/phases/select-modifier-phase.ts +++ b/src/phases/select-modifier-phase.ts @@ -1,35 +1,34 @@ import { globalScene } from "#app/global-scene"; -import type { ModifierTier } from "#enums/modifier-tier"; -import type { ModifierTypeOption, ModifierType } from "#app/modifier/modifier-type"; -import { - regenerateModifierPoolThresholds, - getPlayerShopModifierTypeOptionsForWave, - PokemonModifierType, - FusePokemonModifierType, - PokemonMoveModifierType, - TmModifierType, - RememberMoveModifierType, - PokemonPpRestoreModifierType, - PokemonPpUpModifierType, - getPlayerModifierTypeOptions, -} from "#app/modifier/modifier-type"; +import Overrides from "#app/overrides"; import { ModifierPoolType } from "#enums/modifier-pool-type"; -import type { Modifier } from "#app/modifier/modifier"; +import type { ModifierTier } from "#enums/modifier-tier"; +import { UiMode } from "#enums/ui-mode"; +import type { Modifier } from "#modifiers/modifier"; import { ExtraModifierModifier, HealShopCostModifier, PokemonHeldItemModifier, TempExtraModifierModifier, -} from "#app/modifier/modifier"; -import type ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { SHOP_OPTIONS_ROW_LIMIT } from "#app/ui/modifier-select-ui-handler"; -import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler"; -import { UiMode } from "#enums/ui-mode"; +} from "#modifiers/modifier"; +import type { CustomModifierSettings, ModifierType, ModifierTypeOption } from "#modifiers/modifier-type"; +import { + FusePokemonModifierType, + getPlayerModifierTypeOptions, + getPlayerShopModifierTypeOptionsForWave, + PokemonModifierType, + PokemonMoveModifierType, + PokemonPpRestoreModifierType, + PokemonPpUpModifierType, + RememberMoveModifierType, + regenerateModifierPoolThresholds, + TmModifierType, +} from "#modifiers/modifier-type"; +import { BattlePhase } from "#phases/battle-phase"; +import type { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { SHOP_OPTIONS_ROW_LIMIT } from "#ui/modifier-select-ui-handler"; +import { PartyOption, PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler"; +import { isNullOrUndefined, NumberHolder } from "#utils/common"; import i18next from "i18next"; -import { BattlePhase } from "./battle-phase"; -import Overrides from "#app/overrides"; -import type { CustomModifierSettings } from "#app/modifier/modifier-type"; -import { isNullOrUndefined, NumberHolder } from "#app/utils/common"; export type ModifierSelectCallback = (rowCursor: number, cursor: number) => boolean; @@ -180,7 +179,7 @@ export class SelectModifierPhase extends BattlePhase { } else { this.applyModifier(modifierType.newModifier()!); } - return !cost; + return cost === -1; } // Reroll rewards diff --git a/src/phases/select-starter-phase.ts b/src/phases/select-starter-phase.ts index 76247c14ce0..f8f4eeee4d2 100644 --- a/src/phases/select-starter-phase.ts +++ b/src/phases/select-starter-phase.ts @@ -1,18 +1,18 @@ import { globalScene } from "#app/global-scene"; -import { applyChallenges } from "#app/data/challenge"; -import { ChallengeType } from "#enums/challenge-type"; -import { Gender } from "#app/data/gender"; -import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { overrideHeldItems, overrideModifiers } from "#app/modifier/modifier"; import Overrides from "#app/overrides"; import { Phase } from "#app/phase"; -import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler"; -import type { Starter } from "#app/ui/starter-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; +import { applyChallenges } from "#data/challenge"; +import { SpeciesFormChangeMoveLearnedTrigger } from "#data/form-change-triggers"; +import { Gender } from "#data/gender"; +import { ChallengeType } from "#enums/challenge-type"; import type { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import { overrideHeldItems, overrideModifiers } from "#modifiers/modifier"; +import { SaveSlotUiMode } from "#ui/save-slot-select-ui-handler"; +import type { Starter } from "#ui/starter-select-ui-handler"; +import { isNullOrUndefined } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; -import { isNullOrUndefined } from "#app/utils/common"; export class SelectStarterPhase extends Phase { public readonly phaseName = "SelectStarterPhase"; diff --git a/src/phases/select-target-phase.ts b/src/phases/select-target-phase.ts index 6d47ac18021..3805cb919b2 100644 --- a/src/phases/select-target-phase.ts +++ b/src/phases/select-target-phase.ts @@ -1,10 +1,10 @@ import { globalScene } from "#app/global-scene"; +import { allMoves } from "#data/data-lists"; import type { BattlerIndex } from "#enums/battler-index"; import { Command } from "#enums/command"; import { UiMode } from "#enums/ui-mode"; -import { PokemonPhase } from "./pokemon-phase"; -import i18next from "#app/plugins/i18n"; -import { allMoves } from "#app/data/data-lists"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import i18next from "#plugins/i18n"; export class SelectTargetPhase extends PokemonPhase { public readonly phaseName = "SelectTargetPhase"; diff --git a/src/phases/shiny-sparkle-phase.ts b/src/phases/shiny-sparkle-phase.ts index 53866af89e6..0930d536267 100644 --- a/src/phases/shiny-sparkle-phase.ts +++ b/src/phases/shiny-sparkle-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; import type { BattlerIndex } from "#enums/battler-index"; -import { PokemonPhase } from "./pokemon-phase"; +import { PokemonPhase } from "#phases/pokemon-phase"; export class ShinySparklePhase extends PokemonPhase { public readonly phaseName = "ShinySparklePhase"; diff --git a/src/phases/show-ability-phase.ts b/src/phases/show-ability-phase.ts index 0f568819cde..21c3e7341a7 100644 --- a/src/phases/show-ability-phase.ts +++ b/src/phases/show-ability-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import type { BattlerIndex } from "#enums/battler-index"; -import { PokemonPhase } from "./pokemon-phase"; import { getPokemonNameWithAffix } from "#app/messages"; +import type { BattlerIndex } from "#enums/battler-index"; +import { PokemonPhase } from "#phases/pokemon-phase"; export class ShowAbilityPhase extends PokemonPhase { public readonly phaseName = "ShowAbilityPhase"; diff --git a/src/phases/show-party-exp-bar-phase.ts b/src/phases/show-party-exp-bar-phase.ts index 4849526b639..f22be5f63e3 100644 --- a/src/phases/show-party-exp-bar-phase.ts +++ b/src/phases/show-party-exp-bar-phase.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import { ExpGainsSpeed } from "#app/enums/exp-gains-speed"; -import { ExpNotification } from "#app/enums/exp-notification"; -import { ExpBoosterModifier } from "#app/modifier/modifier"; -import { NumberHolder } from "#app/utils/common"; -import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; +import { ExpGainsSpeed } from "#enums/exp-gains-speed"; +import { ExpNotification } from "#enums/exp-notification"; +import { ExpBoosterModifier } from "#modifiers/modifier"; +import { PlayerPartyMemberPokemonPhase } from "#phases/player-party-member-pokemon-phase"; +import { NumberHolder } from "#utils/common"; export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase { public readonly phaseName = "ShowPartyExpBarPhase"; diff --git a/src/phases/show-trainer-phase.ts b/src/phases/show-trainer-phase.ts index bae6ecd839c..e012c22116a 100644 --- a/src/phases/show-trainer-phase.ts +++ b/src/phases/show-trainer-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import { PlayerGender } from "#app/enums/player-gender"; -import { BattlePhase } from "./battle-phase"; +import { PlayerGender } from "#enums/player-gender"; +import { BattlePhase } from "#phases/battle-phase"; export class ShowTrainerPhase extends BattlePhase { public readonly phaseName = "ShowTrainerPhase"; diff --git a/src/phases/stat-stage-change-phase.ts b/src/phases/stat-stage-change-phase.ts index 77fb7b38600..140ef841929 100644 --- a/src/phases/stat-stage-change-phase.ts +++ b/src/phases/stat-stage-change-phase.ts @@ -1,23 +1,20 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import type { BattlerIndex } from "#enums/battler-index"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { MistTag } from "#app/data/arena-tag"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import type { ArenaTag } from "#app/data/arena-tag"; -import type Pokemon from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; -import { ResetNegativeStatStageModifier } from "#app/modifier/modifier"; import { handleTutorial, Tutorial } from "#app/tutorial"; -import { NumberHolder, BooleanHolder, isNullOrUndefined } from "#app/utils/common"; +import type { ArenaTag } from "#data/arena-tag"; +import { MistTag } from "#data/arena-tag"; +import { OctolockTag } from "#data/battler-tags"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import type { BattlerIndex } from "#enums/battler-index"; +import { type BattleStat, getStatKey, getStatStageChangeDescriptionKey, Stat } from "#enums/stat"; +import type { Pokemon } from "#field/pokemon"; +import { ResetNegativeStatStageModifier } from "#modifiers/modifier"; +import { PokemonPhase } from "#phases/pokemon-phase"; +import type { ConditionalUserFieldProtectStatAbAttrParams, PreStatStageChangeAbAttrParams } from "#types/ability-types"; +import { BooleanHolder, isNullOrUndefined, NumberHolder } from "#utils/common"; import i18next from "i18next"; -import { PokemonPhase } from "./pokemon-phase"; -import { Stat, type BattleStat, getStatKey, getStatStageChangeDescriptionKey } from "#enums/stat"; -import { OctolockTag } from "#app/data/battler-tags"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import type { - ConditionalUserFieldProtectStatAbAttrParams, - PreStatStageChangeAbAttrParams, -} from "#app/@types/ability-types"; export type StatStageChangeCallback = ( target: Pokemon | null, diff --git a/src/phases/summon-missing-phase.ts b/src/phases/summon-missing-phase.ts index ce3e982055e..89d36b13597 100644 --- a/src/phases/summon-missing-phase.ts +++ b/src/phases/summon-missing-phase.ts @@ -1,7 +1,7 @@ -import { getPokemonNameWithAffix } from "#app/messages"; -import i18next from "i18next"; -import { SummonPhase } from "./summon-phase"; import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { SummonPhase } from "#phases/summon-phase"; +import i18next from "i18next"; export class SummonMissingPhase extends SummonPhase { public readonly phaseName = "SummonMissingPhase"; diff --git a/src/phases/summon-phase.ts b/src/phases/summon-phase.ts index 95e4367d8df..e4c8aa9af7a 100644 --- a/src/phases/summon-phase.ts +++ b/src/phases/summon-phase.ts @@ -1,17 +1,17 @@ -import { BattleType } from "#enums/battle-type"; -import { getPokeballAtlasKey, getPokeballTintColor } from "#app/data/pokeball"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { PlayerGender } from "#app/enums/player-gender"; -import { addPokeballOpenParticles } from "#app/field/anims"; -import type Pokemon from "#app/field/pokemon"; -import { FieldPosition } from "#enums/field-position"; -import { getPokemonNameWithAffix } from "#app/messages"; -import i18next from "i18next"; -import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { SpeciesFormChangeActiveTrigger } from "#data/form-change-triggers"; +import { getPokeballAtlasKey, getPokeballTintColor } from "#data/pokeball"; +import { BattleType } from "#enums/battle-type"; +import { FieldPosition } from "#enums/field-position"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { PlayerGender } from "#enums/player-gender"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { addPokeballOpenParticles } from "#field/anims"; +import type { Pokemon } from "#field/pokemon"; +import { PartyMemberPokemonPhase } from "#phases/party-member-pokemon-phase"; +import i18next from "i18next"; export class SummonPhase extends PartyMemberPokemonPhase { // The union type is needed to keep typescript happy as these phases extend from SummonPhase diff --git a/src/phases/switch-biome-phase.ts b/src/phases/switch-biome-phase.ts index f84f1d517b4..dc2e0fa64d4 100644 --- a/src/phases/switch-biome-phase.ts +++ b/src/phases/switch-biome-phase.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; import type { BiomeId } from "#enums/biome-id"; -import { getBiomeKey } from "#app/field/arena"; -import { BattlePhase } from "./battle-phase"; +import { getBiomeKey } from "#field/arena"; +import { BattlePhase } from "#phases/battle-phase"; export class SwitchBiomePhase extends BattlePhase { public readonly phaseName = "SwitchBiomePhase"; diff --git a/src/phases/switch-phase.ts b/src/phases/switch-phase.ts index 8d18e29e6a6..a431d973a02 100644 --- a/src/phases/switch-phase.ts +++ b/src/phases/switch-phase.ts @@ -1,8 +1,8 @@ import { globalScene } from "#app/global-scene"; -import PartyUiHandler, { PartyOption, PartyUiMode } from "#app/ui/party-ui-handler"; -import { UiMode } from "#enums/ui-mode"; import { SwitchType } from "#enums/switch-type"; -import { BattlePhase } from "./battle-phase"; +import { UiMode } from "#enums/ui-mode"; +import { BattlePhase } from "#phases/battle-phase"; +import { PartyOption, PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler"; /** * Opens the party selector UI and transitions into a {@linkcode SwitchSummonPhase} diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index ccd0681c068..b7460e77569 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -1,17 +1,17 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { allMoves } from "#app/data/data-lists"; -import { getPokeballTintColor } from "#app/data/pokeball"; -import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { TrainerSlot } from "#enums/trainer-slot"; -import type Pokemon from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; -import { SwitchEffectTransferModifier } from "#app/modifier/modifier"; +import { SubstituteTag } from "#data/battler-tags"; +import { allMoves } from "#data/data-lists"; +import { SpeciesFormChangeActiveTrigger } from "#data/form-change-triggers"; +import { getPokeballTintColor } from "#data/pokeball"; import { Command } from "#enums/command"; -import i18next from "i18next"; -import { SummonPhase } from "./summon-phase"; -import { SubstituteTag } from "#app/data/battler-tags"; import { SwitchType } from "#enums/switch-type"; +import { TrainerSlot } from "#enums/trainer-slot"; +import type { Pokemon } from "#field/pokemon"; +import { SwitchEffectTransferModifier } from "#modifiers/modifier"; +import { SummonPhase } from "#phases/summon-phase"; +import i18next from "i18next"; export class SwitchSummonPhase extends SummonPhase { public readonly phaseName: "SwitchSummonPhase" | "ReturnPhase" = "SwitchSummonPhase"; diff --git a/src/phases/tera-phase.ts b/src/phases/tera-phase.ts index a6025e20488..84b05d88abe 100644 --- a/src/phases/tera-phase.ts +++ b/src/phases/tera-phase.ts @@ -1,13 +1,13 @@ -import type Pokemon from "#app/field/pokemon"; -import { getPokemonNameWithAffix } from "#app/messages"; -import { BattlePhase } from "./battle-phase"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; -import { PokemonType } from "#enums/pokemon-type"; -import { achvs } from "#app/system/achv"; -import { SpeciesFormChangeTeraTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { CommonBattleAnim } from "#app/data/battle-anims"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { CommonBattleAnim } from "#data/battle-anims"; +import { SpeciesFormChangeTeraTrigger } from "#data/form-change-triggers"; import { CommonAnim } from "#enums/move-anims-common"; +import { PokemonType } from "#enums/pokemon-type"; +import type { Pokemon } from "#field/pokemon"; +import { BattlePhase } from "#phases/battle-phase"; +import { achvs } from "#system/achv"; +import i18next from "i18next"; export class TeraPhase extends BattlePhase { public readonly phaseName = "TeraPhase"; diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 5e36081b899..42dd761de27 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -1,25 +1,25 @@ import { loggedInUser } from "#app/account"; -import { BattleType } from "#enums/battle-type"; -import { fetchDailyRunSeed, getDailyRunStarters } from "#app/data/daily-run"; -import { Gender } from "#app/data/gender"; -import { getBiomeKey } from "#app/field/arena"; import { GameMode, getGameMode } from "#app/game-mode"; -import { GameModes } from "#enums/game-modes"; -import type { Modifier } from "#app/modifier/modifier"; -import { getDailyRunStarterModifiers, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { ModifierPoolType } from "#enums/modifier-pool-type"; -import { Phase } from "#app/phase"; -import type { SessionSaveData } from "#app/system/game-data"; -import { Unlockables } from "#enums/unlockables"; -import { vouchers } from "#app/system/voucher"; -import type { OptionSelectConfig, OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { isLocal, isLocalServerConnected, isNullOrUndefined } from "#app/utils/common"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; import Overrides from "#app/overrides"; +import { Phase } from "#app/phase"; +import { fetchDailyRunSeed, getDailyRunStarters } from "#data/daily-run"; +import { modifierTypes } from "#data/data-lists"; +import { Gender } from "#data/gender"; +import { BattleType } from "#enums/battle-type"; +import { GameModes } from "#enums/game-modes"; +import { ModifierPoolType } from "#enums/modifier-pool-type"; +import { UiMode } from "#enums/ui-mode"; +import { Unlockables } from "#enums/unlockables"; +import { getBiomeKey } from "#field/arena"; +import type { Modifier } from "#modifiers/modifier"; +import { getDailyRunStarterModifiers, regenerateModifierPoolThresholds } from "#modifiers/modifier-type"; +import type { SessionSaveData } from "#system/game-data"; +import { vouchers } from "#system/voucher"; +import type { OptionSelectConfig, OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { SaveSlotUiMode } from "#ui/save-slot-select-ui-handler"; +import { isLocal, isLocalServerConnected, isNullOrUndefined } from "#utils/common"; +import i18next from "i18next"; export class TitlePhase extends Phase { public readonly phaseName = "TitlePhase"; diff --git a/src/phases/toggle-double-position-phase.ts b/src/phases/toggle-double-position-phase.ts index 596bf87eb5b..2dcaac52d2f 100644 --- a/src/phases/toggle-double-position-phase.ts +++ b/src/phases/toggle-double-position-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; import { FieldPosition } from "#enums/field-position"; -import { BattlePhase } from "./battle-phase"; +import { BattlePhase } from "#phases/battle-phase"; export class ToggleDoublePositionPhase extends BattlePhase { public readonly phaseName = "ToggleDoublePositionPhase"; diff --git a/src/phases/trainer-victory-phase.ts b/src/phases/trainer-victory-phase.ts index 554b8109f02..6f92dbe496d 100644 --- a/src/phases/trainer-victory-phase.ts +++ b/src/phases/trainer-victory-phase.ts @@ -1,15 +1,15 @@ -import { getCharVariantFromDialogue } from "#app/data/dialogue"; -import { TrainerType } from "#app/enums/trainer-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { vouchers } from "#app/system/voucher"; -import i18next from "i18next"; -import { randSeedItem } from "#app/utils/common"; -import { BattlePhase } from "./battle-phase"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { globalScene } from "#app/global-scene"; -import { BiomeId } from "#enums/biome-id"; -import { achvs } from "#app/system/achv"; import { timedEventManager } from "#app/global-event-manager"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { getCharVariantFromDialogue } from "#data/dialogue"; +import { BiomeId } from "#enums/biome-id"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { TrainerType } from "#enums/trainer-type"; +import { BattlePhase } from "#phases/battle-phase"; +import { achvs } from "#system/achv"; +import { vouchers } from "#system/voucher"; +import { randSeedItem } from "#utils/common"; +import i18next from "i18next"; export class TrainerVictoryPhase extends BattlePhase { public readonly phaseName = "TrainerVictoryPhase"; diff --git a/src/phases/turn-end-phase.ts b/src/phases/turn-end-phase.ts index b5e56f6d63f..ce3b2958c23 100644 --- a/src/phases/turn-end-phase.ts +++ b/src/phases/turn-end-phase.ts @@ -1,20 +1,20 @@ -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import { TerrainType } from "#app/data/terrain"; -import { WeatherType } from "#app/enums/weather-type"; -import { TurnEndEvent } from "#app/events/battle-scene"; -import type 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 { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { TerrainType } from "#data/terrain"; +import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; +import { WeatherType } from "#enums/weather-type"; +import { TurnEndEvent } from "#events/battle-scene"; +import type { Pokemon } from "#field/pokemon"; +import { + EnemyStatusEffectHealChanceModifier, + EnemyTurnHealModifier, + TurnHealModifier, + TurnHeldItemTransferModifier, + TurnStatusEffectModifier, +} from "#modifiers/modifier"; +import { FieldPhase } from "#phases/field-phase"; +import i18next from "i18next"; export class TurnEndPhase extends FieldPhase { public readonly phaseName = "TurnEndPhase"; diff --git a/src/phases/turn-init-phase.ts b/src/phases/turn-init-phase.ts index 8d0508c5ebb..b2ab096102c 100644 --- a/src/phases/turn-init-phase.ts +++ b/src/phases/turn-init-phase.ts @@ -1,13 +1,13 @@ +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#enums/battler-index"; +import { TurnInitEvent } from "#events/battle-scene"; +import type { PlayerPokemon } from "#field/pokemon"; import { handleMysteryEncounterBattleStartEffects, handleMysteryEncounterTurnStartEffects, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { TurnInitEvent } from "#app/events/battle-scene"; -import type { PlayerPokemon } from "#app/field/pokemon"; +} from "#mystery-encounters/encounter-phase-utils"; +import { FieldPhase } from "#phases/field-phase"; import i18next from "i18next"; -import { FieldPhase } from "./field-phase"; -import { globalScene } from "#app/global-scene"; export class TurnInitPhase extends FieldPhase { public readonly phaseName = "TurnInitPhase"; diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index bfae2f06de4..0fc126801ec 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -1,16 +1,16 @@ -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { allMoves } from "#app/data/data-lists"; -import { Stat } from "#app/enums/stat"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { BypassSpeedChanceModifier } from "#app/modifier/modifier"; -import { Command } from "#enums/command"; -import { randSeedShuffle, BooleanHolder } from "#app/utils/common"; -import { FieldPhase } from "./field-phase"; -import { BattlerIndex } from "#enums/battler-index"; -import { TrickRoomTag } from "#app/data/arena-tag"; -import { SwitchType } from "#enums/switch-type"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; +import { TrickRoomTag } from "#data/arena-tag"; +import { allMoves } from "#data/data-lists"; +import { BattlerIndex } from "#enums/battler-index"; +import { Command } from "#enums/command"; +import { Stat } from "#enums/stat"; +import { SwitchType } from "#enums/switch-type"; +import type { Pokemon } from "#field/pokemon"; +import { BypassSpeedChanceModifier } from "#modifiers/modifier"; +import { PokemonMove } from "#moves/pokemon-move"; +import { FieldPhase } from "#phases/field-phase"; +import { BooleanHolder, randSeedShuffle } from "#utils/common"; export class TurnStartPhase extends FieldPhase { public readonly phaseName = "TurnStartPhase"; diff --git a/src/phases/unlock-phase.ts b/src/phases/unlock-phase.ts index 76719847f92..ec3be88d4a5 100644 --- a/src/phases/unlock-phase.ts +++ b/src/phases/unlock-phase.ts @@ -1,8 +1,8 @@ import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; -import type { Unlockables } from "#enums/unlockables"; -import { getUnlockableName } from "#app/system/unlockables"; import { UiMode } from "#enums/ui-mode"; +import type { Unlockables } from "#enums/unlockables"; +import { getUnlockableName } from "#system/unlockables"; import i18next from "i18next"; export class UnlockPhase extends Phase { diff --git a/src/phases/victory-phase.ts b/src/phases/victory-phase.ts index ae5b727c2a6..4b1a79d7443 100644 --- a/src/phases/victory-phase.ts +++ b/src/phases/victory-phase.ts @@ -1,12 +1,12 @@ +import { timedEventManager } from "#app/global-event-manager"; +import { globalScene } from "#app/global-scene"; +import { modifierTypes } from "#data/data-lists"; +import { BattleType } from "#enums/battle-type"; import type { BattlerIndex } from "#enums/battler-index"; import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves"; -import { BattleType } from "#enums/battle-type"; -import type { CustomModifierSettings } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { PokemonPhase } from "./pokemon-phase"; -import { handleMysteryEncounterVictory } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { globalScene } from "#app/global-scene"; -import { timedEventManager } from "#app/global-event-manager"; +import type { CustomModifierSettings } from "#modifiers/modifier-type"; +import { handleMysteryEncounterVictory } from "#mystery-encounters/encounter-phase-utils"; +import { PokemonPhase } from "#phases/pokemon-phase"; export class VictoryPhase extends PokemonPhase { public readonly phaseName = "VictoryPhase"; diff --git a/src/phases/weather-effect-phase.ts b/src/phases/weather-effect-phase.ts index 5476ac67672..81db543001b 100644 --- a/src/phases/weather-effect-phase.ts +++ b/src/phases/weather-effect-phase.ts @@ -1,14 +1,14 @@ +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { CommonAnim } from "#enums/move-anims-common"; -import type { Weather } from "#app/data/weather"; -import { getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weather"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { WeatherType } from "#app/enums/weather-type"; -import type Pokemon from "#app/field/pokemon"; +import type { Weather } from "#data/weather"; +import { getWeatherDamageMessage, getWeatherLapseMessage } from "#data/weather"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { HitResult } from "#enums/hit-result"; -import { BooleanHolder, toDmgValue } from "#app/utils/common"; -import { CommonAnimPhase } from "./common-anim-phase"; +import { CommonAnim } from "#enums/move-anims-common"; +import { WeatherType } from "#enums/weather-type"; +import type { Pokemon } from "#field/pokemon"; +import { CommonAnimPhase } from "#phases/common-anim-phase"; +import { BooleanHolder, toDmgValue } from "#utils/common"; export class WeatherEffectPhase extends CommonAnimPhase { public readonly phaseName = "WeatherEffectPhase"; diff --git a/src/pipelines/field-sprite.ts b/src/pipelines/field-sprite.ts index a6e248c9998..647483d1524 100644 --- a/src/pipelines/field-sprite.ts +++ b/src/pipelines/field-sprite.ts @@ -1,10 +1,11 @@ import { globalScene } from "#app/global-scene"; -import { TerrainType, getTerrainColor } from "../data/terrain"; -import { getCurrentTime } from "#app/utils/common"; +import { getTerrainColor, TerrainType } from "#data/terrain"; +import { getCurrentTime } from "#utils/common"; +import Phaser from "phaser"; import fieldSpriteFragShader from "./glsl/fieldSpriteFragShader.frag?raw"; import spriteVertShader from "./glsl/spriteShader.vert?raw"; -export default class FieldSpritePipeline extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline { +export class FieldSpritePipeline extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline { constructor(game: Phaser.Game, config?: Phaser.Types.Renderer.WebGL.WebGLPipelineConfig) { super( config || { diff --git a/src/pipelines/invert.ts b/src/pipelines/invert.ts index 0ebc3ad865f..2414f2cf6b3 100644 --- a/src/pipelines/invert.ts +++ b/src/pipelines/invert.ts @@ -1,7 +1,8 @@ import type { Game } from "phaser"; +import Phaser from "phaser"; import fragShader from "./glsl/invert.frag?raw"; -export default class InvertPostFX extends Phaser.Renderer.WebGL.Pipelines.PostFXPipeline { +export class InvertPostFX extends Phaser.Renderer.WebGL.Pipelines.PostFXPipeline { constructor(game: Game) { super({ game, diff --git a/src/pipelines/sprite.ts b/src/pipelines/sprite.ts index 307c2cee4cc..596a761b05f 100644 --- a/src/pipelines/sprite.ts +++ b/src/pipelines/sprite.ts @@ -1,14 +1,14 @@ -import { variantColorCache } from "#app/sprites/variant"; -import MysteryEncounterIntroVisuals from "#app/field/mystery-encounter-intro"; -import Pokemon from "#app/field/pokemon"; -import Trainer from "#app/field/trainer"; import { globalScene } from "#app/global-scene"; -import { rgbHexToRgba } from "#app/utils/common"; -import FieldSpritePipeline from "./field-sprite"; +import { FieldSpritePipeline } from "#app/pipelines/field-sprite"; +import { MysteryEncounterIntroVisuals } from "#field/mystery-encounter-intro"; +import { Pokemon } from "#field/pokemon"; +import { Trainer } from "#field/trainer"; +import { variantColorCache } from "#sprites/variant"; +import { rgbHexToRgba } from "#utils/common"; import spriteFragShader from "./glsl/spriteFragShader.frag?raw"; import spriteVertShader from "./glsl/spriteShader.vert?raw"; -export default class SpritePipeline extends FieldSpritePipeline { +export class SpritePipeline extends FieldSpritePipeline { private _tone: number[]; constructor(game: Phaser.Game) { diff --git a/src/plugins/api/api-base.ts b/src/plugins/api/api-base.ts index c7ff4619187..63f56c129f3 100644 --- a/src/plugins/api/api-base.ts +++ b/src/plugins/api/api-base.ts @@ -1,5 +1,5 @@ import { SESSION_ID_COOKIE_NAME } from "#app/constants"; -import { getCookie } from "#app/utils/cookies"; +import { getCookie } from "#utils/cookies"; type DataType = "json" | "form-urlencoded"; diff --git a/src/plugins/api/pokerogue-account-api.ts b/src/plugins/api/pokerogue-account-api.ts index 9cd82c24430..56bdc92b9b9 100644 --- a/src/plugins/api/pokerogue-account-api.ts +++ b/src/plugins/api/pokerogue-account-api.ts @@ -1,12 +1,12 @@ +import { ApiBase } from "#api/api-base"; +import { SESSION_ID_COOKIE_NAME } from "#app/constants"; import type { AccountInfoResponse, AccountLoginRequest, AccountLoginResponse, AccountRegisterRequest, -} from "#app/@types/PokerogueAccountApi"; -import { SESSION_ID_COOKIE_NAME } from "#app/constants"; -import { ApiBase } from "#app/plugins/api/api-base"; -import { removeCookie, setCookie } from "#app/utils/cookies"; +} from "#types/PokerogueAccountApi"; +import { removeCookie, setCookie } from "#utils/cookies"; /** * A wrapper for PokéRogue account API requests. diff --git a/src/plugins/api/pokerogue-admin-api.ts b/src/plugins/api/pokerogue-admin-api.ts index 5923f286430..4e549c7ff53 100644 --- a/src/plugins/api/pokerogue-admin-api.ts +++ b/src/plugins/api/pokerogue-admin-api.ts @@ -1,3 +1,4 @@ +import { ApiBase } from "#api/api-base"; import type { LinkAccountToDiscordIdRequest, LinkAccountToGoogledIdRequest, @@ -5,8 +6,7 @@ import type { SearchAccountResponse, UnlinkAccountFromDiscordIdRequest, UnlinkAccountFromGoogledIdRequest, -} from "#app/@types/PokerogueAdminApi"; -import { ApiBase } from "#app/plugins/api/api-base"; +} from "#types/PokerogueAdminApi"; export class PokerogueAdminApi extends ApiBase { public readonly ERR_USERNAME_NOT_FOUND: string = "Username not found!"; diff --git a/src/plugins/api/pokerogue-api.ts b/src/plugins/api/pokerogue-api.ts index c6dfae019a5..99600a359a2 100644 --- a/src/plugins/api/pokerogue-api.ts +++ b/src/plugins/api/pokerogue-api.ts @@ -1,9 +1,9 @@ -import type { TitleStatsResponse } from "#app/@types/PokerogueApi"; -import { ApiBase } from "#app/plugins/api/api-base"; -import { PokerogueAccountApi } from "#app/plugins/api/pokerogue-account-api"; -import { PokerogueAdminApi } from "#app/plugins/api/pokerogue-admin-api"; -import { PokerogueDailyApi } from "#app/plugins/api/pokerogue-daily-api"; -import { PokerogueSavedataApi } from "#app/plugins/api/pokerogue-savedata-api"; +import { ApiBase } from "#api/api-base"; +import { PokerogueAccountApi } from "#api/pokerogue-account-api"; +import { PokerogueAdminApi } from "#api/pokerogue-admin-api"; +import { PokerogueDailyApi } from "#api/pokerogue-daily-api"; +import { PokerogueSavedataApi } from "#api/pokerogue-savedata-api"; +import type { TitleStatsResponse } from "#types/PokerogueApi"; /** * A wrapper for PokéRogue API requests. diff --git a/src/plugins/api/pokerogue-daily-api.ts b/src/plugins/api/pokerogue-daily-api.ts index c9319ae7fdc..2913c7bd4f2 100644 --- a/src/plugins/api/pokerogue-daily-api.ts +++ b/src/plugins/api/pokerogue-daily-api.ts @@ -1,6 +1,6 @@ -import type { GetDailyRankingsPageCountRequest, GetDailyRankingsRequest } from "#app/@types/PokerogueDailyApi"; -import { ApiBase } from "#app/plugins/api/api-base"; -import type { RankingEntry } from "#app/ui/daily-run-scoreboard"; +import { ApiBase } from "#api/api-base"; +import type { GetDailyRankingsPageCountRequest, GetDailyRankingsRequest } from "#types/PokerogueDailyApi"; +import type { RankingEntry } from "#ui/daily-run-scoreboard"; /** * A wrapper for daily-run PokéRogue API requests. diff --git a/src/plugins/api/pokerogue-savedata-api.ts b/src/plugins/api/pokerogue-savedata-api.ts index b8531e82d4f..bc77de8060b 100644 --- a/src/plugins/api/pokerogue-savedata-api.ts +++ b/src/plugins/api/pokerogue-savedata-api.ts @@ -1,8 +1,8 @@ -import type { UpdateAllSavedataRequest } from "#app/@types/PokerogueSavedataApi"; +import { ApiBase } from "#api/api-base"; +import { PokerogueSessionSavedataApi } from "#api/pokerogue-session-savedata-api"; +import { PokerogueSystemSavedataApi } from "#api/pokerogue-system-savedata-api"; import { MAX_INT_ATTR_VALUE } from "#app/constants"; -import { ApiBase } from "#app/plugins/api/api-base"; -import { PokerogueSessionSavedataApi } from "#app/plugins/api/pokerogue-session-savedata-api"; -import { PokerogueSystemSavedataApi } from "#app/plugins/api/pokerogue-system-savedata-api"; +import type { UpdateAllSavedataRequest } from "#types/PokerogueSavedataApi"; /** * A wrapper for PokéRogue savedata API requests. diff --git a/src/plugins/api/pokerogue-session-savedata-api.ts b/src/plugins/api/pokerogue-session-savedata-api.ts index aac8b9b93ad..a807d4b712c 100644 --- a/src/plugins/api/pokerogue-session-savedata-api.ts +++ b/src/plugins/api/pokerogue-session-savedata-api.ts @@ -1,3 +1,5 @@ +import { ApiBase } from "#api/api-base"; +import type { SessionSaveData } from "#system/game-data"; import type { ClearSessionSavedataRequest, ClearSessionSavedataResponse, @@ -5,9 +7,7 @@ import type { GetSessionSavedataRequest, NewClearSessionSavedataRequest, UpdateSessionSavedataRequest, -} from "#app/@types/PokerogueSessionSavedataApi"; -import { ApiBase } from "#app/plugins/api/api-base"; -import type { SessionSaveData } from "#app/system/game-data"; +} from "#types/PokerogueSessionSavedataApi"; /** * A wrapper for PokéRogue session savedata API requests. diff --git a/src/plugins/api/pokerogue-system-savedata-api.ts b/src/plugins/api/pokerogue-system-savedata-api.ts index d6fbb39ae0a..f87aba81ee9 100644 --- a/src/plugins/api/pokerogue-system-savedata-api.ts +++ b/src/plugins/api/pokerogue-system-savedata-api.ts @@ -1,10 +1,10 @@ +import { ApiBase } from "#api/api-base"; import type { GetSystemSavedataRequest, UpdateSystemSavedataRequest, VerifySystemSavedataRequest, VerifySystemSavedataResponse, -} from "#app/@types/PokerogueSystemSavedataApi"; -import { ApiBase } from "#app/plugins/api/api-base"; +} from "#types/PokerogueSystemSavedataApi"; /** * A wrapper for PokéRogue system savedata API requests. diff --git a/src/plugins/cache-busted-loader-plugin.ts b/src/plugins/cache-busted-loader-plugin.ts index 4ae9b352ae3..4853265ec65 100644 --- a/src/plugins/cache-busted-loader-plugin.ts +++ b/src/plugins/cache-busted-loader-plugin.ts @@ -1,8 +1,8 @@ -import { coerceArray } from "#app/utils/common"; +import { coerceArray } from "#utils/common"; let manifest: object; -export default class CacheBustedLoaderPlugin extends Phaser.Loader.LoaderPlugin { +export class CacheBustedLoaderPlugin extends Phaser.Loader.LoaderPlugin { get manifest() { return manifest; } diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index d73f803d203..d501f58a51f 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -1,9 +1,9 @@ -import { camelCaseToKebabCase } from "#app/utils/common"; +import pkg from "#package.json"; +import { camelCaseToKebabCase } from "#utils/common"; import i18next from "i18next"; import LanguageDetector from "i18next-browser-languagedetector"; import HttpBackend from "i18next-http-backend"; import processor, { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor"; -import pkg from "../../package.json"; //#region Interfaces/Types diff --git a/src/plugins/vite/vite-minify-json-plugin.ts b/src/plugins/vite/vite-minify-json-plugin.ts index 38f299eea50..50f5f87fe7c 100644 --- a/src/plugins/vite/vite-minify-json-plugin.ts +++ b/src/plugins/vite/vite-minify-json-plugin.ts @@ -1,5 +1,5 @@ -import path from "path"; import fs from "fs"; +import path from "path"; import type { Plugin as VitePlugin } from "vite"; /** diff --git a/src/polyfills.ts b/src/polyfills.ts new file mode 100644 index 00000000000..8666629fceb --- /dev/null +++ b/src/polyfills.ts @@ -0,0 +1,21 @@ +/* +Manual rolling of polyfills desired by the project. + +IMPORTANT: When adding / removing polyfills, ensure that typescript becomes +aware of their existence, either by creating `src/typings/polyfills.d.ts` +and defining them there, or or by adding the appropriate field polyfill to the +`lib` property in `tsconfig.json`. +*/ + +if (typeof Promise.withResolvers === "undefined") { + Promise.withResolvers = () => { + // Bangs are OK here; they are guaranteed to be defined when the promise is invoked. + let resolve!: (value: T | PromiseLike) => void; + let reject!: (reason?: unknown) => void; + const promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + return { promise, resolve, reject }; + }; +} diff --git a/src/scene-base.ts b/src/scene-base.ts index ccea373fca0..3f2e4409794 100644 --- a/src/scene-base.ts +++ b/src/scene-base.ts @@ -1,4 +1,4 @@ -import { coerceArray } from "#app/utils/common"; +import { coerceArray } from "#utils/common"; export const legacyCompatibleImages: string[] = []; diff --git a/src/sprites/pokemon-asset-loader.ts b/src/sprites/pokemon-asset-loader.ts index 980d242a880..9deb68b7443 100644 --- a/src/sprites/pokemon-asset-loader.ts +++ b/src/sprites/pokemon-asset-loader.ts @@ -1,5 +1,5 @@ +import { initMoveAnim, loadMoveAnimAssets } from "#data/battle-anims"; import type { MoveId } from "#enums/move-id"; -import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; /** * Asynchronously load the animations and assets for the provided moves. diff --git a/src/sprites/pokemon-sprite.ts b/src/sprites/pokemon-sprite.ts index cdf9e3acfa6..5a8d7d53f0c 100644 --- a/src/sprites/pokemon-sprite.ts +++ b/src/sprites/pokemon-sprite.ts @@ -1,10 +1,10 @@ +import type { BattleScene } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; -import { variantColorCache, variantData } from "#app/sprites/variant"; -import { Gender } from "#app/data/gender"; -import { hasExpSprite } from "./sprite-utils"; -import type { Variant, VariantSet } from "#app/sprites/variant"; -import type Pokemon from "#app/field/pokemon"; -import type BattleScene from "#app/battle-scene"; +import { Gender } from "#data/gender"; +import type { Pokemon } from "#field/pokemon"; +import { hasExpSprite } from "#sprites/sprite-utils"; +import type { Variant, VariantSet } from "#sprites/variant"; +import { variantColorCache, variantData } from "#sprites/variant"; // Regex patterns diff --git a/src/sprites/sprite-utils.ts b/src/sprites/sprite-utils.ts index 563bb1235b5..e5c00d4c914 100644 --- a/src/sprites/sprite-utils.ts +++ b/src/sprites/sprite-utils.ts @@ -1,4 +1,4 @@ -import { expSpriteKeys } from "#app/sprites/sprite-keys"; +import { expSpriteKeys } from "#sprites/sprite-keys"; const expKeyRegex = /^pkmn__?(back__)?(shiny__)?(female__)?(\d+)(-.*?)?(?:_[1-3])?$/; diff --git a/src/sprites/variant.ts b/src/sprites/variant.ts index 985068015c6..28d7ed13839 100644 --- a/src/sprites/variant.ts +++ b/src/sprites/variant.ts @@ -1,8 +1,8 @@ -import { VariantTier } from "#app/enums/variant-tier"; -import { hasExpSprite } from "#app/sprites/sprite-utils"; import { globalScene } from "#app/global-scene"; -import type Pokemon from "#app/field/pokemon"; -import { isNullOrUndefined } from "#app/utils/common"; +import { VariantTier } from "#enums/variant-tier"; +import type { Pokemon } from "#field/pokemon"; +import { hasExpSprite } from "#sprites/sprite-utils"; +import { isNullOrUndefined } from "#utils/common"; export type Variant = 0 | 1 | 2; diff --git a/src/starting-wave.ts b/src/starting-wave.ts index 3d36dabe652..7dbcffebbfe 100644 --- a/src/starting-wave.ts +++ b/src/starting-wave.ts @@ -1,3 +1,3 @@ -import Overrides from "./overrides"; +import Overrides from "#app/overrides"; export const startingWave = Overrides.STARTING_WAVE_OVERRIDE || 1; diff --git a/src/system/achv.ts b/src/system/achv.ts index 90816ff65c3..abe6f264d20 100644 --- a/src/system/achv.ts +++ b/src/system/achv.ts @@ -1,21 +1,21 @@ -import type { Modifier } from "typescript"; -import { TurnHeldItemTransferModifier } from "../modifier/modifier"; -import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; -import i18next from "i18next"; -import { NumberHolder } from "#app/utils/common"; -import { PlayerGender } from "#enums/player-gender"; -import type { Challenge } from "#app/data/challenge"; +import { globalScene } from "#app/global-scene"; +import { pokemonEvolutions } from "#balance/pokemon-evolutions"; +import type { Challenge } from "#data/challenge"; import { FlipStatChallenge, FreshStartChallenge, + InverseBattleChallenge, SingleGenerationChallenge, SingleTypeChallenge, - InverseBattleChallenge, -} from "#app/data/challenge"; -import type { ConditionFn } from "#app/@types/common"; -import { Stat, getShortenedStatKey } from "#app/enums/stat"; -import { Challenges } from "#app/enums/challenges"; -import { globalScene } from "#app/global-scene"; +} from "#data/challenge"; +import { Challenges } from "#enums/challenges"; +import { PlayerGender } from "#enums/player-gender"; +import { getShortenedStatKey, Stat } from "#enums/stat"; +import { TurnHeldItemTransferModifier } from "#modifiers/modifier"; +import type { ConditionFn } from "#types/common"; +import { NumberHolder } from "#utils/common"; +import i18next from "i18next"; +import type { Modifier } from "typescript"; export enum AchvTier { COMMON, diff --git a/src/system/arena-data.ts b/src/system/arena-data.ts index 29423d10207..9d15ab50fcc 100644 --- a/src/system/arena-data.ts +++ b/src/system/arena-data.ts @@ -1,11 +1,11 @@ -import { Arena } from "../field/arena"; -import type { ArenaTag } from "../data/arena-tag"; -import { loadArenaTag } from "../data/arena-tag"; +import type { ArenaTag } from "#data/arena-tag"; +import { loadArenaTag } from "#data/arena-tag"; +import { Terrain } from "#data/terrain"; +import { Weather } from "#data/weather"; import type { BiomeId } from "#enums/biome-id"; -import { Weather } from "../data/weather"; -import { Terrain } from "#app/data/terrain"; +import { Arena } from "#field/arena"; -export default class ArenaData { +export class ArenaData { public biome: BiomeId; public weather: Weather | null; public terrain: Terrain | null; diff --git a/src/system/challenge-data.ts b/src/system/challenge-data.ts index 87299ae653a..1d4ab23f523 100644 --- a/src/system/challenge-data.ts +++ b/src/system/challenge-data.ts @@ -1,7 +1,7 @@ -import type { Challenge } from "#app/data/challenge"; -import { copyChallenge } from "#app/data/challenge"; +import type { Challenge } from "#data/challenge"; +import { copyChallenge } from "#data/challenge"; -export default class ChallengeData { +export class ChallengeData { public id: number; public value: number; public severity: number; diff --git a/src/system/egg-data.ts b/src/system/egg-data.ts index 63f9e17d7be..4910d01d5a8 100644 --- a/src/system/egg-data.ts +++ b/src/system/egg-data.ts @@ -1,10 +1,10 @@ +import { EGG_SEED, Egg } from "#data/egg"; +import type { EggSourceType } from "#enums/egg-source-types"; import type { EggTier } from "#enums/egg-type"; import type { SpeciesId } from "#enums/species-id"; import type { VariantTier } from "#enums/variant-tier"; -import { EGG_SEED, Egg } from "../data/egg"; -import type { EggSourceType } from "#app/enums/egg-source-types"; -export default class EggData { +export class EggData { public id: number; public tier: EggTier; public sourceType: EggSourceType; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index d5d4256f7d0..6abb5518d1c 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1,74 +1,73 @@ -import i18next from "i18next"; -import type { PokeballCounts } from "#app/battle-scene"; -import { bypassLogin } from "#app/global-vars/bypass-login"; -import { globalScene } from "#app/global-scene"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import type Pokemon from "#app/field/pokemon"; -import { pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { allSpecies } from "#app/data/data-lists"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { randInt, getEnumKeys, isLocal, executeIf, fixedInt, randSeedItem, NumberHolder } from "#app/utils/common"; -import Overrides from "#app/overrides"; -import PokemonData from "#app/system/pokemon-data"; -import PersistentModifierData from "#app/system/modifier-data"; -import ArenaData from "#app/system/arena-data"; -import { Unlockables } from "#enums/unlockables"; -import { getGameMode } from "#app/game-mode"; -import { GameModes } from "#enums/game-modes"; -import { BattleType } from "#enums/battle-type"; -import TrainerData from "#app/system/trainer-data"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; -import { resetSettings, setSetting, SettingKeys } from "#app/system/settings/settings"; -import { achvs } from "#app/system/achv"; -import EggData from "#app/system/egg-data"; -import type { Egg } from "#app/data/egg"; -import { vouchers, VoucherType } from "#app/system/voucher"; -import { AES, enc } from "crypto-js"; -import { UiMode } from "#enums/ui-mode"; +import { pokerogueApi } from "#api/pokerogue-api"; import { clientSessionId, loggedInUser, updateUserInfo } from "#app/account"; -import { Nature } from "#enums/nature"; -import { GameStats } from "#app/system/game-stats"; +import type { PokeballCounts } from "#app/battle-scene"; +import { defaultStarterSpecies, saveKey } from "#app/constants"; +import { getGameMode } from "#app/game-mode"; +import { globalScene } from "#app/global-scene"; +import { bypassLogin } from "#app/global-vars/bypass-login"; +import Overrides from "#app/overrides"; import { Tutorial } from "#app/tutorial"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { allMoves } from "#app/data/data-lists"; -import { TrainerVariant } from "#enums/trainer-variant"; -import type { Variant } from "#app/sprites/variant"; -import { setSettingGamepad, SettingGamepad, settingGamepadDefaults } from "#app/system/settings/settings-gamepad"; -import type { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { setSettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { TagAddedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena"; -// biome-ignore lint/performance/noNamespaceImport: Something weird is going on here and I don't want to touch it -import * as Modifier from "#app/modifier/modifier"; -import { StatusEffect } from "#enums/status-effect"; -import ChallengeData from "#app/system/challenge-data"; -import { Device } from "#enums/devices"; -import { GameDataType } from "#enums/game-data-type"; -import type { MoveId } from "#enums/move-id"; -import { PlayerGender } from "#enums/player-gender"; -import { SpeciesId } from "#enums/species-id"; -import { applyChallenges } from "#app/data/challenge"; +import { speciesEggMoves } from "#balance/egg-moves"; +import { pokemonPrevolutions } from "#balance/pokemon-evolutions"; +import { speciesStarterCosts } from "#balance/starters"; +import { ArenaTrapTag } from "#data/arena-tag"; +import { applyChallenges } from "#data/challenge"; +import { allMoves, allSpecies } from "#data/data-lists"; +import type { Egg } from "#data/egg"; +import { pokemonFormChanges } from "#data/pokemon-forms"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { TerrainType } from "#data/terrain"; +import { AbilityAttr } from "#enums/ability-attr"; +import { BattleType } from "#enums/battle-type"; import { ChallengeType } from "#enums/challenge-type"; +import { Device } from "#enums/devices"; +import { DexAttr } from "#enums/dex-attr"; +import { GameDataType } from "#enums/game-data-type"; +import { GameModes } from "#enums/game-modes"; +import type { MoveId } from "#enums/move-id"; +import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; +import { PlayerGender } from "#enums/player-gender"; +import type { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { TrainerVariant } from "#enums/trainer-variant"; +import { UiMode } from "#enums/ui-mode"; +import { Unlockables } from "#enums/unlockables"; import { WeatherType } from "#enums/weather-type"; -import { TerrainType } from "#app/data/terrain"; -import { RUN_HISTORY_LIMIT } from "#app/ui/run-history-ui-handler"; +import { TagAddedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#events/arena"; +import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon"; +// biome-ignore lint/performance/noNamespaceImport: Something weird is going on here and I don't want to touch it +import * as Modifier from "#modifiers/modifier"; +import { MysteryEncounterSaveData } from "#mystery-encounters/mystery-encounter-save-data"; +import type { Variant } from "#sprites/variant"; +import { achvs } from "#system/achv"; +import { ArenaData } from "#system/arena-data"; +import { ChallengeData } from "#system/challenge-data"; +import { EggData } from "#system/egg-data"; +import { GameStats } from "#system/game-stats"; +import { ModifierData as PersistentModifierData } from "#system/modifier-data"; +import { PokemonData } from "#system/pokemon-data"; +import { resetSettings, SettingKeys, setSetting } from "#system/settings"; +import { SettingGamepad, setSettingGamepad, settingGamepadDefaults } from "#system/settings-gamepad"; +import type { SettingKeyboard } from "#system/settings-keyboard"; +import { setSettingKeyboard } from "#system/settings-keyboard"; +import { TrainerData } from "#system/trainer-data"; import { applySessionVersionMigration, - applySystemVersionMigration, applySettingsVersionMigration, -} from "./version_migration/version_converter"; -import { MysteryEncounterSaveData } from "#app/data/mystery-encounters/mystery-encounter-save-data"; -import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { ArenaTrapTag } from "#app/data/arena-tag"; -import { pokemonFormChanges } from "#app/data/pokemon-forms"; -import type { PokemonType } from "#enums/pokemon-type"; -import type { DexData, DexEntry } from "../@types/dex-data"; -import { DexAttr } from "#enums/dex-attr"; -import { AbilityAttr } from "#enums/ability-attr"; -import { defaultStarterSpecies, saveKey } from "#app/constants"; -import { encrypt, decrypt } from "#app/utils/data"; + applySystemVersionMigration, +} from "#system/version_converter"; +import { VoucherType, vouchers } from "#system/voucher"; +import { trainerConfigs } from "#trainers/trainer-config"; +import type { DexData, DexEntry } from "#types/dex-data"; +import { RUN_HISTORY_LIMIT } from "#ui/run-history-ui-handler"; +import { executeIf, fixedInt, isLocal, NumberHolder, randInt, randSeedItem } from "#utils/common"; +import { decrypt, encrypt } from "#utils/data"; +import { getEnumKeys } from "#utils/enums"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { AES, enc } from "crypto-js"; +import i18next from "i18next"; function getDataTypeKey(dataType: GameDataType, slotId = 0): string { switch (dataType) { diff --git a/src/system/game-speed.ts b/src/system/game-speed.ts index 207a4fb44a1..283e6461e55 100644 --- a/src/system/game-speed.ts +++ b/src/system/game-speed.ts @@ -1,9 +1,9 @@ -import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; +import type { BattleScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; +import { FixedInt } from "#utils/common"; import type FadeIn from "phaser3-rex-plugins/plugins/audio/fade/FadeIn"; import type FadeOut from "phaser3-rex-plugins/plugins/audio/fade/FadeOut"; -import type BattleScene from "#app/battle-scene"; -import { globalScene } from "#app/global-scene"; -import { FixedInt } from "#app/utils/common"; +import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; type TweenManager = typeof Phaser.Tweens.TweenManager.prototype; diff --git a/src/system/modifier-data.ts b/src/system/modifier-data.ts index cbda45572ac..135d1907e08 100644 --- a/src/system/modifier-data.ts +++ b/src/system/modifier-data.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import { PersistentModifier } from "#app/modifier/modifier"; -import type { GeneratedPersistentModifierType, ModifierType } from "#app/modifier/modifier-type"; -import { ModifierTypeGenerator, getModifierTypeFuncById } from "#app/modifier/modifier-type"; +import { PersistentModifier } from "#modifiers/modifier"; +import type { GeneratedPersistentModifierType, ModifierType } from "#modifiers/modifier-type"; +import { getModifierTypeFuncById, ModifierTypeGenerator } from "#modifiers/modifier-type"; -export default class ModifierData { +export class ModifierData { public player: boolean; public typeId: string; public typePregenArgs: any[]; diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 28763fe970a..9cea08bfb13 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -1,22 +1,22 @@ -import { BattleType } from "#enums/battle-type"; import { globalScene } from "#app/global-scene"; -import type { Gender } from "../data/gender"; -import { Nature } from "#enums/nature"; -import { PokeballType } from "#enums/pokeball"; -import { getPokemonSpeciesForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { Status } from "../data/status-effect"; -import Pokemon, { EnemyPokemon } from "../field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { TrainerSlot } from "#enums/trainer-slot"; -import type { Variant } from "#app/sprites/variant"; +import type { Gender } from "#data/gender"; +import { CustomPokemonData, PokemonBattleData, PokemonSummonData } from "#data/pokemon-data"; +import { getPokemonSpeciesForm } from "#data/pokemon-species"; +import { Status } from "#data/status-effect"; +import { BattleType } from "#enums/battle-type"; import type { BiomeId } from "#enums/biome-id"; import type { MoveId } from "#enums/move-id"; -import type { SpeciesId } from "#enums/species-id"; -import { CustomPokemonData, PokemonBattleData, PokemonSummonData } from "#app/data/pokemon/pokemon-data"; +import { Nature } from "#enums/nature"; +import { PokeballType } from "#enums/pokeball"; import type { PokemonType } from "#enums/pokemon-type"; +import type { SpeciesId } from "#enums/species-id"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { EnemyPokemon, Pokemon } from "#field/pokemon"; +import { PokemonMove } from "#moves/pokemon-move"; +import type { Variant } from "#sprites/variant"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; -export default class PokemonData { +export class PokemonData { public id: number; public player: boolean; public species: SpeciesId; diff --git a/src/system/settings/settings-gamepad.ts b/src/system/settings/settings-gamepad.ts index 8a28e9fbf14..2e25eda7300 100644 --- a/src/system/settings/settings-gamepad.ts +++ b/src/system/settings/settings-gamepad.ts @@ -1,9 +1,9 @@ -import type SettingsGamepadUiHandler from "../../ui/settings/settings-gamepad-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { truncateString } from "../../utils/common"; -import { Button } from "#enums/buttons"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import { SettingKeyboard } from "#system/settings-keyboard"; +import type { SettingsGamepadUiHandler } from "#ui/settings-gamepad-ui-handler"; +import { truncateString } from "#utils/common"; import i18next from "i18next"; export enum SettingGamepad { diff --git a/src/system/settings/settings-keyboard.ts b/src/system/settings/settings-keyboard.ts index ec5c9ad6b0e..07f4f86bdb0 100644 --- a/src/system/settings/settings-keyboard.ts +++ b/src/system/settings/settings-keyboard.ts @@ -1,8 +1,8 @@ +import { globalScene } from "#app/global-scene"; import { Button } from "#enums/buttons"; import { UiMode } from "#enums/ui-mode"; -import type SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler"; +import type { SettingsKeyboardUiHandler } from "#ui/settings-keyboard-ui-handler"; import i18next from "i18next"; -import { globalScene } from "#app/global-scene"; export enum SettingKeyboard { // Default_Layout = "DEFAULT_LAYOUT", diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index ce14ffe0ea6..2919fd174a1 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -1,15 +1,15 @@ -import { UiMode } from "#enums/ui-mode"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; import { hasTouchscreen } from "#app/touch-controls"; -import { updateWindowType } from "#app/ui/ui-theme"; -import { CandyUpgradeNotificationChangedEvent } from "#app/events/battle-scene"; -import type 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 { ShopCursorTarget } from "#enums/shop-cursor-target"; -import { isLocal } from "#app/utils/common"; +import { UiMode } from "#enums/ui-mode"; +import { CandyUpgradeNotificationChangedEvent } from "#events/battle-scene"; +import type { SettingsUiHandler } from "#ui/settings-ui-handler"; +import { updateWindowType } from "#ui/ui-theme"; +import { isLocal } from "#utils/common"; +import i18next from "i18next"; const VOLUME_OPTIONS: SettingOption[] = [ { diff --git a/src/system/trainer-data.ts b/src/system/trainer-data.ts index 7c9bffd99ee..ce402ff23bf 100644 --- a/src/system/trainer-data.ts +++ b/src/system/trainer-data.ts @@ -1,8 +1,8 @@ import type { TrainerType } from "#enums/trainer-type"; -import Trainer from "../field/trainer"; import { TrainerVariant } from "#enums/trainer-variant"; +import { Trainer } from "#field/trainer"; -export default class TrainerData { +export class TrainerData { public trainerType: TrainerType; public variant: TrainerVariant; public partyTemplateIndex: number; diff --git a/src/system/unlockables.ts b/src/system/unlockables.ts index 72588858eae..647aad9bcdb 100644 --- a/src/system/unlockables.ts +++ b/src/system/unlockables.ts @@ -1,7 +1,7 @@ -import i18next from "i18next"; -import { GameMode } from "../game-mode"; +import { GameMode } from "#app/game-mode"; import { GameModes } from "#enums/game-modes"; import { Unlockables } from "#enums/unlockables"; +import i18next from "i18next"; export function getUnlockableName(unlockable: Unlockables) { switch (unlockable) { diff --git a/src/system/version_migration/version_converter.ts b/src/system/version_migration/version_converter.ts index 789fa96958c..c49490da756 100644 --- a/src/system/version_migration/version_converter.ts +++ b/src/system/version_migration/version_converter.ts @@ -1,11 +1,11 @@ /** biome-ignore-all lint/performance/noNamespaceImport: Convenience */ -import type { SessionSaveMigrator } from "#app/@types/SessionSaveMigrator"; -import type { SettingsSaveMigrator } from "#app/@types/SettingsSaveMigrator"; -import type { SystemSaveMigrator } from "#app/@types/SystemSaveMigrator"; -import type { SessionSaveData, SystemSaveData } from "#app/system/game-data"; +import { version } from "#package.json"; +import type { SessionSaveData, SystemSaveData } from "#system/game-data"; +import type { SessionSaveMigrator } from "#types/SessionSaveMigrator"; +import type { SettingsSaveMigrator } from "#types/SettingsSaveMigrator"; +import type { SystemSaveMigrator } from "#types/SystemSaveMigrator"; import { compareVersions } from "compare-versions"; -import { version } from "../../../package.json"; /* // template for save migrator creation @@ -24,7 +24,7 @@ const systemMigratorA: SystemSaveMigrator = { }, }; -export const systemMigrators: Readonly = [systemMigratorA] as const; +export const systemMigrators: readonly SystemSaveMigrator[] = [systemMigratorA] as const; const sessionMigratorA: SessionSaveMigrator = { version: "A.B.C", @@ -33,7 +33,7 @@ const sessionMigratorA: SessionSaveMigrator = { }, }; -export const sessionMigrators: Readonly = [sessionMigratorA] as const; +export const sessionMigrators: readonly SessionSaveMigrator[] = [sessionMigratorA] as const; const settingsMigratorA: SettingsSaveMigrator = { version: "A.B.C", @@ -43,26 +43,17 @@ const settingsMigratorA: SettingsSaveMigrator = { }, }; -export const settingsMigrators: Readonly = [settingsMigratorA] as const; +export const settingsMigrators: readonly SettingsSaveMigrator[] = [settingsMigratorA] as const; */ -// --- vA.B.C PATCHES --- // -// import * as vA_B_C from "./versions/vA_B_C"; +// Add migrator imports below: +// Example: import * as vA_B_C from "#system/vA_B_C"; -// --- v1.0.4 (and below) PATCHES --- // -import * as v1_0_4 from "./versions/v1_0_4"; - -// --- v1.7.0 PATCHES --- // -import * as v1_7_0 from "./versions/v1_7_0"; - -// --- v1.8.3 PATCHES --- // -import * as v1_8_3 from "./versions/v1_8_3"; - -// --- v1.9.0 PATCHES --- // -import * as v1_9_0 from "./versions/v1_9_0"; - -// --- v1.10.0 PATCHES --- // -import * as v1_10_0 from "./versions/v1_10_0"; +import * as v1_0_4 from "#system/v1_0_4"; +import * as v1_7_0 from "#system/v1_7_0"; +import * as v1_8_3 from "#system/v1_8_3"; +import * as v1_9_0 from "#system/v1_9_0"; +import * as v1_10_0 from "#system/v1_10_0"; /** Current game version */ const LATEST_VERSION = version; diff --git a/src/system/version_migration/versions/v1_0_4.ts b/src/system/version_migration/versions/v1_0_4.ts index eacb4f7da1a..3523a5b8826 100644 --- a/src/system/version_migration/versions/v1_0_4.ts +++ b/src/system/version_migration/versions/v1_0_4.ts @@ -1,14 +1,14 @@ -import { SettingKeys } from "#app/system/settings/settings"; -import type { SystemSaveData, SessionSaveData } from "#app/system/game-data"; import { defaultStarterSpecies } from "#app/constants"; +import { allSpecies } from "#data/data-lists"; +import { CustomPokemonData } from "#data/pokemon-data"; import { AbilityAttr } from "#enums/ability-attr"; import { DexAttr } from "#enums/dex-attr"; -import { allSpecies } from "#app/data/data-lists"; -import { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; -import { isNullOrUndefined } from "#app/utils/common"; -import type { SystemSaveMigrator } from "#app/@types/SystemSaveMigrator"; -import type { SettingsSaveMigrator } from "#app/@types/SettingsSaveMigrator"; -import type { SessionSaveMigrator } from "#app/@types/SessionSaveMigrator"; +import type { SessionSaveData, SystemSaveData } from "#system/game-data"; +import { SettingKeys } from "#system/settings"; +import type { SessionSaveMigrator } from "#types/SessionSaveMigrator"; +import type { SettingsSaveMigrator } from "#types/SettingsSaveMigrator"; +import type { SystemSaveMigrator } from "#types/SystemSaveMigrator"; +import { isNullOrUndefined } from "#utils/common"; /** * Migrate ability starter data if empty for caught species. @@ -95,7 +95,7 @@ const fixStarterData: SystemSaveMigrator = { }, }; -export const systemMigrators: Readonly = [ +export const systemMigrators: readonly SystemSaveMigrator[] = [ migrateAbilityData, fixLegendaryStats, fixStarterData, @@ -118,7 +118,7 @@ const fixRerollTarget: SettingsSaveMigrator = { }, }; -export const settingsMigrators: Readonly = [fixRerollTarget] as const; +export const settingsMigrators: readonly SettingsSaveMigrator[] = [fixRerollTarget] as const; /** * Converts old lapsing modifiers (battle items, lures, and Dire Hit) and @@ -206,4 +206,4 @@ const migrateCustomPokemonData: SessionSaveMigrator = { }, }; -export const sessionMigrators: Readonly = [migrateModifiers, migrateCustomPokemonData] as const; +export const sessionMigrators: readonly SessionSaveMigrator[] = [migrateModifiers, migrateCustomPokemonData] as const; diff --git a/src/system/version_migration/versions/v1_10_0.ts b/src/system/version_migration/versions/v1_10_0.ts index 6ed3253a0c9..66436717639 100644 --- a/src/system/version_migration/versions/v1_10_0.ts +++ b/src/system/version_migration/versions/v1_10_0.ts @@ -1,10 +1,10 @@ -import type { SessionSaveMigrator } from "#app/@types/SessionSaveMigrator"; import type { BattlerIndex } from "#enums/battler-index"; -import type { TurnMove } from "#app/@types/turn-move"; -import type { MoveResult } from "#enums/move-result"; -import type { SessionSaveData } from "#app/system/game-data"; -import { MoveUseMode } from "#enums/move-use-mode"; import type { MoveId } from "#enums/move-id"; +import type { MoveResult } from "#enums/move-result"; +import { MoveUseMode } from "#enums/move-use-mode"; +import type { SessionSaveData } from "#system/game-data"; +import type { SessionSaveMigrator } from "#types/SessionSaveMigrator"; +import type { TurnMove } from "#types/turn-move"; /** Prior signature of `TurnMove`; used to ensure parity */ interface OldTurnMove { @@ -45,4 +45,4 @@ const fixMoveHistory: SessionSaveMigrator = { }, }; -export const sessionMigrators: Readonly = [fixMoveHistory] as const; +export const sessionMigrators: readonly SessionSaveMigrator[] = [fixMoveHistory] as const; diff --git a/src/system/version_migration/versions/v1_7_0.ts b/src/system/version_migration/versions/v1_7_0.ts index e3c599bf77b..8f757456d0a 100644 --- a/src/system/version_migration/versions/v1_7_0.ts +++ b/src/system/version_migration/versions/v1_7_0.ts @@ -1,11 +1,11 @@ -import type { SessionSaveMigrator } from "#app/@types/SessionSaveMigrator"; -import type { SystemSaveMigrator } from "#app/@types/SystemSaveMigrator"; -import { getPokemonSpeciesForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; import { globalScene } from "#app/global-scene"; -import type { SessionSaveData, SystemSaveData } from "#app/system/game-data"; +import { getPokemonSpeciesForm } from "#data/pokemon-species"; import { DexAttr } from "#enums/dex-attr"; -import { isNullOrUndefined } from "#app/utils/common"; +import type { SessionSaveData, SystemSaveData } from "#system/game-data"; +import type { SessionSaveMigrator } from "#types/SessionSaveMigrator"; +import type { SystemSaveMigrator } from "#types/SystemSaveMigrator"; +import { isNullOrUndefined } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** * If a starter is caught, but the only forms registered as caught are not starterSelectable, @@ -37,7 +37,7 @@ const migrateUnselectableForms: SystemSaveMigrator = { }, }; -export const systemMigrators: Readonly = [migrateUnselectableForms] as const; +export const systemMigrators: readonly SystemSaveMigrator[] = [migrateUnselectableForms] as const; const migrateTera: SessionSaveMigrator = { version: "1.7.0", @@ -82,4 +82,4 @@ const migrateTera: SessionSaveMigrator = { }, }; -export const sessionMigrators: Readonly = [migrateTera] as const; +export const sessionMigrators: readonly SessionSaveMigrator[] = [migrateTera] as const; diff --git a/src/system/version_migration/versions/v1_8_3.ts b/src/system/version_migration/versions/v1_8_3.ts index 81430659e0b..e6b5129d9d5 100644 --- a/src/system/version_migration/versions/v1_8_3.ts +++ b/src/system/version_migration/versions/v1_8_3.ts @@ -1,8 +1,8 @@ -import type { SystemSaveMigrator } from "#app/@types/SystemSaveMigrator"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import type { SystemSaveData } from "#app/system/game-data"; import { DexAttr } from "#enums/dex-attr"; import { SpeciesId } from "#enums/species-id"; +import type { SystemSaveData } from "#system/game-data"; +import type { SystemSaveMigrator } from "#types/SystemSaveMigrator"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** * If a starter is caught, but the only forms registered as caught are not starterSelectable, @@ -28,4 +28,4 @@ const migratePichuForms: SystemSaveMigrator = { }, }; -export const systemMigrators: Readonly = [migratePichuForms] as const; +export const systemMigrators: readonly SystemSaveMigrator[] = [migratePichuForms] as const; diff --git a/src/system/version_migration/versions/v1_9_0.ts b/src/system/version_migration/versions/v1_9_0.ts index 0bd5a422ffb..80da5f2996b 100644 --- a/src/system/version_migration/versions/v1_9_0.ts +++ b/src/system/version_migration/versions/v1_9_0.ts @@ -1,8 +1,8 @@ -import type { SessionSaveMigrator } from "#app/@types/SessionSaveMigrator"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import type { SessionSaveData } from "#app/system/game-data"; -import type PokemonData from "#app/system/pokemon-data"; import { MoveId } from "#enums/move-id"; +import { PokemonMove } from "#moves/pokemon-move"; +import type { SessionSaveData } from "#system/game-data"; +import type { PokemonData } from "#system/pokemon-data"; +import type { SessionSaveMigrator } from "#types/SessionSaveMigrator"; /** * Migrate all lingering rage fist data inside `CustomPokemonData`, @@ -38,4 +38,4 @@ const migratePartyData: SessionSaveMigrator = { }, }; -export const sessionMigrators: Readonly = [migratePartyData] as const; +export const sessionMigrators: readonly SessionSaveMigrator[] = [migratePartyData] as const; diff --git a/src/system/voucher.ts b/src/system/voucher.ts index ce10560c3e2..79e95f0b07b 100644 --- a/src/system/voucher.ts +++ b/src/system/voucher.ts @@ -1,9 +1,9 @@ -import i18next from "i18next"; -import { AchvTier, achvs, getAchievementDescription } from "./achv"; import type { PlayerGender } from "#enums/player-gender"; import { TrainerType } from "#enums/trainer-type"; -import type { ConditionFn } from "#app/@types/common"; -import { trainerConfigs } from "#app/data/trainers/trainer-config"; +import { AchvTier, achvs, getAchievementDescription } from "#system/achv"; +import { trainerConfigs } from "#trainers/trainer-config"; +import type { ConditionFn } from "#types/common"; +import i18next from "i18next"; export enum VoucherType { REGULAR, diff --git a/src/timed-event-manager.ts b/src/timed-event-manager.ts index f73c6dab1b2..02cb7fe8e0d 100644 --- a/src/timed-event-manager.ts +++ b/src/timed-event-manager.ts @@ -1,15 +1,15 @@ import { globalScene } from "#app/global-scene"; -import { TextStyle, addTextObject } from "#app/ui/text"; -import type { nil } from "#app/utils/common"; -import { isNullOrUndefined } from "#app/utils/common"; -import i18next from "i18next"; -import { SpeciesId } from "#enums/species-id"; -import type { WeatherPoolEntry } from "#app/data/weather"; -import { WeatherType } from "#enums/weather-type"; -import { CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER } from "./data/balance/starters"; -import { MysteryEncounterType } from "./enums/mystery-encounter-type"; -import { MysteryEncounterTier } from "./enums/mystery-encounter-tier"; +import { CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER } from "#balance/starters"; +import type { WeatherPoolEntry } from "#data/weather"; import { Challenges } from "#enums/challenges"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { WeatherType } from "#enums/weather-type"; +import { addTextObject, TextStyle } from "#ui/text"; +import type { nil } from "#utils/common"; +import { isNullOrUndefined } from "#utils/common"; +import i18next from "i18next"; export enum EventType { SHINY, diff --git a/src/touch-controls.ts b/src/touch-controls.ts index 5319976648f..faee9ea232e 100644 --- a/src/touch-controls.ts +++ b/src/touch-controls.ts @@ -1,11 +1,11 @@ import { globalScene } from "#app/global-scene"; import { Button } from "#enums/buttons"; -import EventEmitter = Phaser.Events.EventEmitter; +import type Phaser from "phaser"; const repeatInputDelayMillis = 250; -export default class TouchControl { - events: EventEmitter; +export class TouchControl { + events: Phaser.Events.EventEmitter; private buttonLock: string[] = []; private inputInterval: NodeJS.Timeout[] = []; /** Whether touch controls are disabled */ diff --git a/src/tutorial.ts b/src/tutorial.ts index d9ae3a03290..018d0927da0 100644 --- a/src/tutorial.ts +++ b/src/tutorial.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import AwaitableUiHandler from "./ui/awaitable-ui-handler"; -import type UiHandler from "./ui/ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import i18next from "i18next"; import Overrides from "#app/overrides"; +import { UiMode } from "#enums/ui-mode"; +import { AwaitableUiHandler } from "#ui/awaitable-ui-handler"; +import type { UiHandler } from "#ui/ui-handler"; +import i18next from "i18next"; export enum Tutorial { Intro = "INTRO", diff --git a/src/ui-inputs.ts b/src/ui-inputs.ts index f7a97ec673c..71c5ac1049e 100644 --- a/src/ui-inputs.ts +++ b/src/ui-inputs.ts @@ -1,19 +1,19 @@ -import type Phaser from "phaser"; -import { UiMode } from "#enums/ui-mode"; -import type { InputsController } from "./inputs-controller"; -import type MessageUiHandler from "./ui/message-ui-handler"; -import StarterSelectUiHandler from "./ui/starter-select-ui-handler"; -import { Setting, SettingKeys, settingIndex } from "./system/settings/settings"; -import SettingsUiHandler from "./ui/settings/settings-ui-handler"; -import { Button } from "#enums/buttons"; -import SettingsGamepadUiHandler from "./ui/settings/settings-gamepad-ui-handler"; -import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler"; import { globalScene } from "#app/global-scene"; -import SettingsDisplayUiHandler from "./ui/settings/settings-display-ui-handler"; -import SettingsAudioUiHandler from "./ui/settings/settings-audio-ui-handler"; -import RunInfoUiHandler from "./ui/run-info-ui-handler"; -import PokedexUiHandler from "./ui/pokedex-ui-handler"; -import PokedexPageUiHandler from "./ui/pokedex-page-ui-handler"; +import type { InputsController } from "#app/inputs-controller"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import { Setting, SettingKeys, settingIndex } from "#system/settings"; +import type { MessageUiHandler } from "#ui/message-ui-handler"; +import { PokedexPageUiHandler } from "#ui/pokedex-page-ui-handler"; +import { PokedexUiHandler } from "#ui/pokedex-ui-handler"; +import { RunInfoUiHandler } from "#ui/run-info-ui-handler"; +import { SettingsAudioUiHandler } from "#ui/settings-audio-ui-handler"; +import { SettingsDisplayUiHandler } from "#ui/settings-display-ui-handler"; +import { SettingsGamepadUiHandler } from "#ui/settings-gamepad-ui-handler"; +import { SettingsKeyboardUiHandler } from "#ui/settings-keyboard-ui-handler"; +import { SettingsUiHandler } from "#ui/settings-ui-handler"; +import { StarterSelectUiHandler } from "#ui/starter-select-ui-handler"; +import type Phaser from "phaser"; type ActionKeys = Record void>; diff --git a/src/ui/ability-bar.ts b/src/ui/ability-bar.ts index 5481791de64..79a68e9dce7 100644 --- a/src/ui/ability-bar.ts +++ b/src/ui/ability-bar.ts @@ -1,12 +1,12 @@ import { globalScene } from "#app/global-scene"; -import { TextStyle, addTextObject } from "./text"; +import { addTextObject, TextStyle } from "#ui/text"; import i18next from "i18next"; const barWidth = 118; const screenLeft = 0; const baseY = -116; -export default class AbilityBar extends Phaser.GameObjects.Container { +export class AbilityBar extends Phaser.GameObjects.Container { private abilityBars: Phaser.GameObjects.Image[]; private abilityBarText: Phaser.GameObjects.Text; private player: boolean; diff --git a/src/ui/abstact-option-select-ui-handler.ts b/src/ui/abstact-option-select-ui-handler.ts index e1263bc088c..d93ad8b7665 100644 --- a/src/ui/abstact-option-select-ui-handler.ts +++ b/src/ui/abstact-option-select-ui-handler.ts @@ -1,11 +1,11 @@ import { globalScene } from "#app/global-scene"; -import { TextStyle, addBBCodeTextObject, getTextColor, getTextStyleOptions } from "./text"; -import { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { addWindow } from "./ui-theme"; -import { rgbHexToRgba, fixedInt } from "#app/utils/common"; -import { argbFromRgba } from "@material/material-color-utilities"; import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import { addBBCodeTextObject, getTextColor, getTextStyleOptions, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt, rgbHexToRgba } from "#utils/common"; +import { argbFromRgba } from "@material/material-color-utilities"; import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; export interface OptionSelectConfig { @@ -33,7 +33,7 @@ export interface OptionSelectItem { const scrollUpLabel = "↑"; const scrollDownLabel = "↓"; -export default abstract class AbstractOptionSelectUiHandler extends UiHandler { +export abstract class AbstractOptionSelectUiHandler extends UiHandler { protected optionSelectContainer: Phaser.GameObjects.Container; protected optionSelectTextContainer: Phaser.GameObjects.Container; protected optionSelectBg: Phaser.GameObjects.NineSlice; diff --git a/src/ui/achv-bar.ts b/src/ui/achv-bar.ts index 1e068157afa..8e0f2a9404b 100644 --- a/src/ui/achv-bar.ts +++ b/src/ui/achv-bar.ts @@ -1,10 +1,10 @@ import { globalScene } from "#app/global-scene"; -import { Achv, getAchievementDescription } from "../system/achv"; -import { Voucher } from "../system/voucher"; -import { TextStyle, addTextObject } from "./text"; import type { PlayerGender } from "#enums/player-gender"; +import { Achv, getAchievementDescription } from "#system/achv"; +import { Voucher } from "#system/voucher"; +import { addTextObject, TextStyle } from "#ui/text"; -export default class AchvBar extends Phaser.GameObjects.Container { +export class AchvBar extends Phaser.GameObjects.Container { private defaultWidth: number; private defaultHeight: number; diff --git a/src/ui/achvs-ui-handler.ts b/src/ui/achvs-ui-handler.ts index 76c462e9b71..6b247f6da96 100644 --- a/src/ui/achvs-ui-handler.ts +++ b/src/ui/achvs-ui-handler.ts @@ -1,17 +1,17 @@ -import { Button } from "#enums/buttons"; -import i18next from "i18next"; -import type { Achv } from "#app/system/achv"; -import { achvs, getAchievementDescription } from "#app/system/achv"; -import type { Voucher } from "#app/system/voucher"; -import { getVoucherTypeIcon, getVoucherTypeName, vouchers } from "#app/system/voucher"; -import MessageUiHandler from "#app/ui/message-ui-handler"; -import { addTextObject, TextStyle } from "#app/ui/text"; -import type { UiMode } from "#enums/ui-mode"; -import { addWindow } from "#app/ui/ui-theme"; -import { ScrollBar } from "#app/ui/scroll-bar"; -import { PlayerGender } from "#enums/player-gender"; import { globalScene } from "#app/global-scene"; -import type { AchvUnlocks, VoucherUnlocks } from "#app/system/game-data"; +import { Button } from "#enums/buttons"; +import { PlayerGender } from "#enums/player-gender"; +import type { UiMode } from "#enums/ui-mode"; +import type { Achv } from "#system/achv"; +import { achvs, getAchievementDescription } from "#system/achv"; +import type { AchvUnlocks, VoucherUnlocks } from "#system/game-data"; +import type { Voucher } from "#system/voucher"; +import { getVoucherTypeIcon, getVoucherTypeName, vouchers } from "#system/voucher"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { ScrollBar } from "#ui/scroll-bar"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import i18next from "i18next"; const Page = { ACHIEVEMENTS: 0, @@ -27,7 +27,7 @@ const languageSettings: { [key: string]: LanguageSetting } = { de: { TextSize: "80px" }, }; -export default class AchvsUiHandler extends MessageUiHandler { +export class AchvsUiHandler extends MessageUiHandler { private readonly ROWS = 4; private readonly COLS = 17; diff --git a/src/ui/admin-ui-handler.ts b/src/ui/admin-ui-handler.ts index c8c8e43802b..3d0a1153127 100644 --- a/src/ui/admin-ui-handler.ts +++ b/src/ui/admin-ui-handler.ts @@ -1,17 +1,17 @@ -import { Button } from "#app/enums/buttons"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { formatText } from "#app/utils/common"; -import type { InputFieldConfig } from "./form-modal-ui-handler"; -import { FormModalUiHandler } from "./form-modal-ui-handler"; -import type { ModalConfig } from "./modal-ui-handler"; -import { TextStyle } from "./text"; -import { UiMode } from "#enums/ui-mode"; +import { pokerogueApi } from "#api/pokerogue-api"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import type { InputFieldConfig } from "#ui/form-modal-ui-handler"; +import { FormModalUiHandler } from "#ui/form-modal-ui-handler"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { TextStyle } from "#ui/text"; +import { formatText } from "#utils/common"; type AdminUiHandlerService = "discord" | "google"; type AdminUiHandlerServiceMode = "Link" | "Unlink"; -export default class AdminUiHandler extends FormModalUiHandler { +export class AdminUiHandler extends FormModalUiHandler { private adminMode: AdminMode; private adminResult: AdminSearchInfo; private config: ModalConfig; diff --git a/src/ui/arena-flyout.ts b/src/ui/arena-flyout.ts index fec02ffb660..43cc553d936 100644 --- a/src/ui/arena-flyout.ts +++ b/src/ui/arena-flyout.ts @@ -1,23 +1,23 @@ -import { addTextObject, TextStyle } from "./text"; import { globalScene } from "#app/global-scene"; -import { ArenaTrapTag } from "#app/data/arena-tag"; +import { ArenaTrapTag } from "#data/arena-tag"; +import { TerrainType } from "#data/terrain"; import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { WeatherType } from "#enums/weather-type"; -import { TerrainType } from "#app/data/terrain"; -import { addWindow, WindowVariant } from "./ui-theme"; -import type { ArenaEvent } from "#app/events/arena"; +import type { ArenaEvent } from "#events/arena"; import { ArenaEventType, TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent, -} from "#app/events/arena"; -import type { TurnEndEvent } from "../events/battle-scene"; -import { BattleSceneEventType } from "../events/battle-scene"; -import { ArenaTagType } from "#enums/arena-tag-type"; -import TimeOfDayWidget from "./time-of-day-widget"; -import { toCamelCaseString, formatText, fixedInt } from "#app/utils/common"; +} from "#events/arena"; +import type { TurnEndEvent } from "#events/battle-scene"; +import { BattleSceneEventType } from "#events/battle-scene"; +import { addTextObject, TextStyle } from "#ui/text"; +import { TimeOfDayWidget } from "#ui/time-of-day-widget"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; +import { fixedInt, formatText, toCamelCaseString } from "#utils/common"; import type { ParseKeys } from "i18next"; import i18next from "i18next"; diff --git a/src/ui/autocomplete-ui-handler.ts b/src/ui/autocomplete-ui-handler.ts index ba1802c8582..6016245c38d 100644 --- a/src/ui/autocomplete-ui-handler.ts +++ b/src/ui/autocomplete-ui-handler.ts @@ -1,8 +1,8 @@ import { Button } from "#enums/buttons"; -import AbstractOptionSelectUiHandler from "./abstact-option-select-ui-handler"; import { UiMode } from "#enums/ui-mode"; +import { AbstractOptionSelectUiHandler } from "#ui/abstact-option-select-ui-handler"; -export default class AutoCompleteUiHandler extends AbstractOptionSelectUiHandler { +export class AutoCompleteUiHandler extends AbstractOptionSelectUiHandler { modalContainer: Phaser.GameObjects.Container; constructor(mode: UiMode = UiMode.OPTION_SELECT) { super(mode); diff --git a/src/ui/awaitable-ui-handler.ts b/src/ui/awaitable-ui-handler.ts index 3c577fd4411..e8513b4acc1 100644 --- a/src/ui/awaitable-ui-handler.ts +++ b/src/ui/awaitable-ui-handler.ts @@ -1,9 +1,9 @@ -import type { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { Button } from "#enums/buttons"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import type { UiMode } from "#enums/ui-mode"; +import { UiHandler } from "#ui/ui-handler"; -export default abstract class AwaitableUiHandler extends UiHandler { +export abstract class AwaitableUiHandler extends UiHandler { protected awaitingActionInput: boolean; protected onActionInput: Function | null; public tutorialActive = false; diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index 30bf68df328..bde340e3cf7 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -1,15 +1,15 @@ -import { getPokeballName } from "../data/pokeball"; -import { addTextObject, getTextStyleOptions, TextStyle } from "./text"; +import { globalScene } from "#app/global-scene"; +import { getPokeballName } from "#data/pokeball"; +import { Button } from "#enums/buttons"; import { Command } from "#enums/command"; import { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { addWindow } from "./ui-theme"; -import { Button } from "#enums/buttons"; -import type { CommandPhase } from "#app/phases/command-phase"; -import { globalScene } from "#app/global-scene"; +import type { CommandPhase } from "#phases/command-phase"; +import { addTextObject, getTextStyleOptions, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; import i18next from "i18next"; -export default class BallUiHandler extends UiHandler { +export class BallUiHandler extends UiHandler { private pokeballSelectContainer: Phaser.GameObjects.Container; private pokeballSelectBg: Phaser.GameObjects.NineSlice; private countsText: Phaser.GameObjects.Text; diff --git a/src/ui/base-stats-overlay.ts b/src/ui/base-stats-overlay.ts index 0541ae766e5..888b87a8d11 100644 --- a/src/ui/base-stats-overlay.ts +++ b/src/ui/base-stats-overlay.ts @@ -1,9 +1,9 @@ -import type { InfoToggle } from "../battle-scene"; -import { TextStyle, addTextObject } from "./text"; -import { addWindow } from "./ui-theme"; -import { fixedInt } from "#app/utils/common"; -import i18next from "i18next"; +import type { InfoToggle } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt } from "#utils/common"; +import i18next from "i18next"; interface BaseStatsOverlaySettings { scale?: number; // scale the box? A scale of 0.5 is recommended diff --git a/src/ui/battle-flyout.ts b/src/ui/battle-flyout.ts index 6f8f6a76b34..083dc7bbf19 100644 --- a/src/ui/battle-flyout.ts +++ b/src/ui/battle-flyout.ts @@ -1,14 +1,14 @@ -import type { EnemyPokemon, default as Pokemon } from "../field/pokemon"; -import { addTextObject, TextStyle } from "./text"; -import { fixedInt } from "#app/utils/common"; import { globalScene } from "#app/global-scene"; -import type Move from "#app/data/moves/move"; -import type { BerryUsedEvent, MoveUsedEvent } from "../events/battle-scene"; -import { BattleSceneEventType } from "../events/battle-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; import { BerryType } from "#enums/berry-type"; import { MoveId } from "#enums/move-id"; import { UiTheme } from "#enums/ui-theme"; -import { getPokemonNameWithAffix } from "#app/messages"; +import type { BerryUsedEvent, MoveUsedEvent } from "#events/battle-scene"; +import { BattleSceneEventType } from "#events/battle-scene"; +import type { EnemyPokemon, Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { addTextObject, TextStyle } from "#ui/text"; +import { fixedInt } from "#utils/common"; /** Container for info about a {@linkcode Move} */ interface MoveInfo { @@ -22,7 +22,7 @@ interface MoveInfo { } /** A Flyout Menu attached to each {@linkcode BattleInfo} object on the field UI */ -export default class BattleFlyout extends Phaser.GameObjects.Container { +export class BattleFlyout extends Phaser.GameObjects.Container { /** Is this object linked to a player's Pokemon? */ private player: boolean; diff --git a/src/ui/battle-info/battle-info.ts b/src/ui/battle-info/battle-info.ts index e67000bb243..4a2a6d1804d 100644 --- a/src/ui/battle-info/battle-info.ts +++ b/src/ui/battle-info/battle-info.ts @@ -1,13 +1,13 @@ -import type { default as Pokemon } from "../../field/pokemon"; -import { getLocalizedSpriteKey, fixedInt, getShinyDescriptor } from "#app/utils/common"; -import { addTextObject, TextStyle } from "../text"; -import { getGenderSymbol, getGenderColor, Gender } from "../../data/gender"; -import { StatusEffect } from "#enums/status-effect"; import { globalScene } from "#app/global-scene"; -import { getTypeRgb } from "#app/data/type"; +import { Gender, getGenderColor, getGenderSymbol } from "#data/gender"; +import { getTypeRgb } from "#data/type"; import { PokemonType } from "#enums/pokemon-type"; -import { getVariantTint } from "#app/sprites/variant"; import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import type { Pokemon } from "#field/pokemon"; +import { getVariantTint } from "#sprites/variant"; +import { addTextObject, TextStyle } from "#ui/text"; +import { fixedInt, getLocalizedSpriteKey, getShinyDescriptor } from "#utils/common"; import i18next from "i18next"; /** @@ -37,7 +37,7 @@ export type BattleInfoParamList = { }; }; -export default abstract class BattleInfo extends Phaser.GameObjects.Container { +export abstract class BattleInfo extends Phaser.GameObjects.Container { public static readonly EXP_GAINS_DURATION_BASE = 1650; protected baseY: number; diff --git a/src/ui/battle-info/enemy-battle-info.ts b/src/ui/battle-info/enemy-battle-info.ts index 7c16f01ac38..5799fb476ef 100644 --- a/src/ui/battle-info/enemy-battle-info.ts +++ b/src/ui/battle-info/enemy-battle-info.ts @@ -1,13 +1,13 @@ import { globalScene } from "#app/global-scene"; -import BattleFlyout from "../battle-flyout"; -import { addTextObject, TextStyle } from "#app/ui/text"; -import { addWindow, WindowVariant } from "#app/ui/ui-theme"; import { Stat } from "#enums/stat"; +import type { EnemyPokemon } from "#field/pokemon"; +import { BattleFlyout } from "#ui/battle-flyout"; +import type { BattleInfoParamList } from "#ui/battle-info"; +import { BattleInfo } from "#ui/battle-info"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; import i18next from "i18next"; -import type { EnemyPokemon } from "#app/field/pokemon"; import type { GameObjects } from "phaser"; -import BattleInfo from "./battle-info"; -import type { BattleInfoParamList } from "./battle-info"; export class EnemyBattleInfo extends BattleInfo { protected player: false = false; diff --git a/src/ui/battle-info/player-battle-info.ts b/src/ui/battle-info/player-battle-info.ts index 634f89b7922..62a2eddecb9 100644 --- a/src/ui/battle-info/player-battle-info.ts +++ b/src/ui/battle-info/player-battle-info.ts @@ -1,10 +1,10 @@ -import { getLevelRelExp, getLevelTotalExp } from "#app/data/exp"; -import type { PlayerPokemon } from "#app/field/pokemon"; import { globalScene } from "#app/global-scene"; +import { getLevelRelExp, getLevelTotalExp } from "#data/exp"; import { ExpGainsSpeed } from "#enums/exp-gains-speed"; import { Stat } from "#enums/stat"; -import BattleInfo from "./battle-info"; -import type { BattleInfoParamList } from "./battle-info"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { BattleInfoParamList } from "#ui/battle-info"; +import { BattleInfo } from "#ui/battle-info"; export class PlayerBattleInfo extends BattleInfo { protected player: true = true; diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index 67443087f22..bd524f0bb43 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -1,14 +1,14 @@ import { globalScene } from "#app/global-scene"; -import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "./text"; -import { UiMode } from "#enums/ui-mode"; -import MessageUiHandler from "./message-ui-handler"; -import { addWindow } from "./ui-theme"; -import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import { Button } from "#enums/buttons"; +import { getStatKey, PERMANENT_STATS } from "#enums/stat"; +import { UiMode } from "#enums/ui-mode"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; import i18next from "i18next"; -import { PERMANENT_STATS, getStatKey } from "#app/enums/stat"; +import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -export default class BattleMessageUiHandler extends MessageUiHandler { +export class BattleMessageUiHandler extends MessageUiHandler { private levelUpStatsContainer: Phaser.GameObjects.Container; private levelUpStatsIncrContent: Phaser.GameObjects.Text; private levelUpStatsValuesContent: BBCodeText; diff --git a/src/ui/bgm-bar.ts b/src/ui/bgm-bar.ts index e331d82f6d9..d8b6bbe8b8a 100644 --- a/src/ui/bgm-bar.ts +++ b/src/ui/bgm-bar.ts @@ -1,13 +1,13 @@ -import { addTextObject, TextStyle } from "./text"; -import i18next from "i18next"; -import { formatText } from "#app/utils/common"; import { globalScene } from "#app/global-scene"; +import { addTextObject, TextStyle } from "#ui/text"; +import { formatText } from "#utils/common"; +import i18next from "i18next"; const hiddenX = -150; const shownX = 0; const baseY = 0; -export default class BgmBar extends Phaser.GameObjects.Container { +export class BgmBar extends Phaser.GameObjects.Container { private defaultWidth: number; private defaultHeight: number; diff --git a/src/ui/candy-bar.ts b/src/ui/candy-bar.ts index 189a418eec8..ea3500d6c4c 100644 --- a/src/ui/candy-bar.ts +++ b/src/ui/candy-bar.ts @@ -1,11 +1,11 @@ -import { starterColors } from "#app/global-vars/starter-colors"; import { globalScene } from "#app/global-scene"; -import { TextStyle, addTextObject } from "./text"; -import { argbFromRgba } from "@material/material-color-utilities"; -import { rgbHexToRgba } from "#app/utils/common"; +import { starterColors } from "#app/global-vars/starter-colors"; import type { SpeciesId } from "#enums/species-id"; +import { addTextObject, TextStyle } from "#ui/text"; +import { rgbHexToRgba } from "#utils/common"; +import { argbFromRgba } from "@material/material-color-utilities"; -export default class CandyBar extends Phaser.GameObjects.Container { +export class CandyBar extends Phaser.GameObjects.Container { private bg: Phaser.GameObjects.NineSlice; private candyIcon: Phaser.GameObjects.Sprite; private candyOverlayIcon: Phaser.GameObjects.Sprite; diff --git a/src/ui/challenges-select-ui-handler.ts b/src/ui/challenges-select-ui-handler.ts index fa053efd84a..a827cddc9a7 100644 --- a/src/ui/challenges-select-ui-handler.ts +++ b/src/ui/challenges-select-ui-handler.ts @@ -1,20 +1,20 @@ -import { TextStyle, addTextObject } from "./text"; -import type { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { addWindow } from "./ui-theme"; -import { Button } from "#enums/buttons"; -import i18next from "i18next"; -import type { Challenge } from "#app/data/challenge"; -import { getLocalizedSpriteKey } from "#app/utils/common"; -import { Challenges } from "#app/enums/challenges"; -import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import { Color, ShadowColor } from "#app/enums/color"; import { globalScene } from "#app/global-scene"; +import type { Challenge } from "#data/challenge"; +import { Button } from "#enums/buttons"; +import { Challenges } from "#enums/challenges"; +import { Color, ShadowColor } from "#enums/color"; +import type { UiMode } from "#enums/ui-mode"; +import { addTextObject, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; +import { getLocalizedSpriteKey } from "#utils/common"; +import i18next from "i18next"; +import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; /** * Handles all the UI for choosing optional challenges. */ -export default class GameChallengesUiHandler extends UiHandler { +export class GameChallengesUiHandler extends UiHandler { private challengesContainer: Phaser.GameObjects.Container; private valuesContainer: Phaser.GameObjects.Container; diff --git a/src/ui/char-sprite.ts b/src/ui/char-sprite.ts index a8451f4bb9c..381421086ff 100644 --- a/src/ui/char-sprite.ts +++ b/src/ui/char-sprite.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import { MissingTextureKey } from "#app/utils/common"; +import { MissingTextureKey } from "#utils/common"; -export default class CharSprite extends Phaser.GameObjects.Container { +export class CharSprite extends Phaser.GameObjects.Container { private sprite: Phaser.GameObjects.Sprite; private transitionSprite: Phaser.GameObjects.Sprite; diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index c28fed4f726..2e4acfb7c42 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -1,19 +1,19 @@ -import { addTextObject, TextStyle } from "./text"; -import PartyUiHandler, { PartyUiMode } from "./party-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import i18next from "i18next"; -import { Button } from "#enums/buttons"; -import { getPokemonNameWithAffix } from "#app/messages"; -import type { CommandPhase } from "#app/phases/command-phase"; import { globalScene } from "#app/global-scene"; -import { TerastallizeAccessModifier } from "#app/modifier/modifier"; -import { PokemonType } from "#enums/pokemon-type"; -import { getTypeRgb } from "#app/data/type"; -import { SpeciesId } from "#enums/species-id"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { getTypeRgb } from "#data/type"; +import { Button } from "#enums/buttons"; import { Command } from "#enums/command"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import { TerastallizeAccessModifier } from "#modifiers/modifier"; +import type { CommandPhase } from "#phases/command-phase"; +import { PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import i18next from "i18next"; -export default class CommandUiHandler extends UiHandler { +export class CommandUiHandler extends UiHandler { private commandsContainer: Phaser.GameObjects.Container; private cursorObj: Phaser.GameObjects.Image | null; diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts index 7b5ca3d7e63..b2f35931278 100644 --- a/src/ui/confirm-ui-handler.ts +++ b/src/ui/confirm-ui-handler.ts @@ -1,11 +1,11 @@ -import type { OptionSelectConfig } from "./abstact-option-select-ui-handler"; -import AbstractOptionSelectUiHandler from "./abstact-option-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import i18next from "i18next"; -import { Button } from "#enums/buttons"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import type { OptionSelectConfig } from "#ui/abstact-option-select-ui-handler"; +import { AbstractOptionSelectUiHandler } from "#ui/abstact-option-select-ui-handler"; +import i18next from "i18next"; -export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { +export class ConfirmUiHandler extends AbstractOptionSelectUiHandler { public static readonly windowWidth: number = 48; private switchCheck: boolean; diff --git a/src/ui/daily-run-scoreboard.ts b/src/ui/daily-run-scoreboard.ts index c069c6fffd7..dcd45b40390 100644 --- a/src/ui/daily-run-scoreboard.ts +++ b/src/ui/daily-run-scoreboard.ts @@ -1,9 +1,10 @@ -import i18next from "i18next"; +import { pokerogueApi } from "#api/pokerogue-api"; import { globalScene } from "#app/global-scene"; -import { getEnumKeys, executeIf } from "#app/utils/common"; -import { TextStyle, addTextObject } from "./text"; -import { WindowVariant, addWindow } from "./ui-theme"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; +import { executeIf } from "#utils/common"; +import { getEnumKeys } from "#utils/enums"; +import i18next from "i18next"; export interface RankingEntry { rank: number; diff --git a/src/ui/dropdown.ts b/src/ui/dropdown.ts index 2cbd1f0dfa9..2a100ddbe59 100644 --- a/src/ui/dropdown.ts +++ b/src/ui/dropdown.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import { addTextObject, TextStyle } from "./text"; -import { addWindow, WindowVariant } from "./ui-theme"; -import { ScrollBar } from "#app/ui/scroll-bar"; +import { ScrollBar } from "#ui/scroll-bar"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; import i18next from "i18next"; export enum DropDownState { diff --git a/src/ui/egg-counter-container.ts b/src/ui/egg-counter-container.ts index 7bb32189681..ff536228fde 100644 --- a/src/ui/egg-counter-container.ts +++ b/src/ui/egg-counter-container.ts @@ -1,15 +1,15 @@ import { globalScene } from "#app/global-scene"; -import { addWindow } from "./ui-theme"; -import { addTextObject, TextStyle } from "./text"; -import type { EggCountChangedEvent } from "#app/events/egg"; -import { EggEventType } from "#app/events/egg"; -import type EggHatchSceneHandler from "./egg-hatch-scene-handler"; +import type { EggCountChangedEvent } from "#events/egg"; +import { EggEventType } from "#events/egg"; +import type { EggHatchSceneHandler } from "#ui/egg-hatch-scene-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; /** * A container that displays the count of hatching eggs. * @extends Phaser.GameObjects.Container */ -export default class EggCounterContainer extends Phaser.GameObjects.Container { +export class EggCounterContainer extends Phaser.GameObjects.Container { private readonly WINDOW_DEFAULT_WIDTH = 37; private readonly WINDOW_MEDIUM_WIDTH = 42; private readonly WINDOW_HEIGHT = 26; diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index 30fe0fd7f7e..19d1efa75dd 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -1,21 +1,22 @@ -import { UiMode } from "#enums/ui-mode"; -import { TextStyle, addTextObject, getEggTierTextTint, getTextStyleOptions } from "./text"; -import MessageUiHandler from "./message-ui-handler"; -import { fixedInt, randSeedShuffle, getEnumValues } from "#app/utils/common"; -import type { IEggOptions } from "../data/egg"; -import { Egg, getLegendaryGachaSpeciesForTimestamp } from "../data/egg"; -import { VoucherType, getVoucherTypeIcon } from "../system/voucher"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { addWindow } from "./ui-theme"; -import { Tutorial, handleTutorial } from "../tutorial"; -import { Button } from "#enums/buttons"; -import Overrides from "#app/overrides"; -import { GachaType } from "#app/enums/gacha-types"; -import i18next from "i18next"; -import { EggTier } from "#enums/egg-type"; import { globalScene } from "#app/global-scene"; +import Overrides from "#app/overrides"; +import { handleTutorial, Tutorial } from "#app/tutorial"; +import type { IEggOptions } from "#data/egg"; +import { Egg, getLegendaryGachaSpeciesForTimestamp } from "#data/egg"; +import { Button } from "#enums/buttons"; +import { EggTier } from "#enums/egg-type"; +import { GachaType } from "#enums/gacha-types"; +import { UiMode } from "#enums/ui-mode"; +import { getVoucherTypeIcon, VoucherType } from "#system/voucher"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { addTextObject, getEggTierTextTint, getTextStyleOptions, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt, randSeedShuffle } from "#utils/common"; +import { getEnumValues } from "#utils/enums"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; -export default class EggGachaUiHandler extends MessageUiHandler { +export class EggGachaUiHandler extends MessageUiHandler { private eggGachaContainer: Phaser.GameObjects.Container; private eggGachaMessageBox: Phaser.GameObjects.NineSlice; private eggGachaOptionsContainer: Phaser.GameObjects.Container; diff --git a/src/ui/egg-hatch-scene-handler.ts b/src/ui/egg-hatch-scene-handler.ts index 85c4199ff1d..5b2c9d40cfa 100644 --- a/src/ui/egg-hatch-scene-handler.ts +++ b/src/ui/egg-hatch-scene-handler.ts @@ -1,9 +1,9 @@ -import { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { Button } from "#enums/buttons"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import { UiHandler } from "#ui/ui-handler"; -export default class EggHatchSceneHandler extends UiHandler { +export class EggHatchSceneHandler extends UiHandler { public eggHatchContainer: Phaser.GameObjects.Container; /** diff --git a/src/ui/egg-list-ui-handler.ts b/src/ui/egg-list-ui-handler.ts index 3d4c7c5c72f..94d6889ed48 100644 --- a/src/ui/egg-list-ui-handler.ts +++ b/src/ui/egg-list-ui-handler.ts @@ -1,15 +1,15 @@ -import { UiMode } from "#enums/ui-mode"; -import PokemonIconAnimHandler, { PokemonIconAnimMode } from "#app/ui/pokemon-icon-anim-handler"; -import { TextStyle, addTextObject } from "#app/ui/text"; -import MessageUiHandler from "#app/ui/message-ui-handler"; -import { addWindow } from "#app/ui/ui-theme"; -import { Button } from "#enums/buttons"; -import i18next from "i18next"; -import ScrollableGridUiHandler from "#app/ui/scrollable-grid-handler"; -import { ScrollBar } from "#app/ui/scroll-bar"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler"; +import { ScrollBar } from "#ui/scroll-bar"; +import { ScrollableGridUiHandler } from "#ui/scrollable-grid-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import i18next from "i18next"; -export default class EggListUiHandler extends MessageUiHandler { +export class EggListUiHandler extends MessageUiHandler { private readonly ROWS = 9; private readonly COLUMNS = 11; diff --git a/src/ui/egg-summary-ui-handler.ts b/src/ui/egg-summary-ui-handler.ts index 90dc60e16b7..aa4e8974318 100644 --- a/src/ui/egg-summary-ui-handler.ts +++ b/src/ui/egg-summary-ui-handler.ts @@ -1,14 +1,14 @@ -import { UiMode } from "#enums/ui-mode"; -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 PokemonHatchInfoContainer from "./pokemon-hatch-info-container"; -import type { EggHatchData } from "#app/data/egg-hatch-data"; -import ScrollableGridUiHandler from "./scrollable-grid-handler"; -import { HatchedPokemonContainer } from "./hatched-pokemon-container"; -import { ScrollBar } from "#app/ui/scroll-bar"; import { globalScene } from "#app/global-scene"; +import { getEggTierForSpecies } from "#data/egg"; +import type { EggHatchData } from "#data/egg-hatch-data"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import { HatchedPokemonContainer } from "#ui/hatched-pokemon-container"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { PokemonHatchInfoContainer } from "#ui/pokemon-hatch-info-container"; +import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler"; +import { ScrollBar } from "#ui/scroll-bar"; +import { ScrollableGridUiHandler } from "#ui/scrollable-grid-handler"; const iconContainerX = 112; const iconContainerY = 9; @@ -21,7 +21,7 @@ const iconSize = 18; * 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 { +export class EggSummaryUiHandler extends MessageUiHandler { /** holds all elements in the scene */ private eggHatchContainer: Phaser.GameObjects.Container; /** holds the icon containers and info container */ diff --git a/src/ui/evolution-scene-handler.ts b/src/ui/evolution-scene-handler.ts index 7372fc6f2b5..5ad4fc6fdf5 100644 --- a/src/ui/evolution-scene-handler.ts +++ b/src/ui/evolution-scene-handler.ts @@ -1,10 +1,10 @@ -import MessageUiHandler from "./message-ui-handler"; -import { TextStyle, addTextObject } from "./text"; -import { UiMode } from "#enums/ui-mode"; -import { Button } from "#enums/buttons"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; -export default class EvolutionSceneHandler extends MessageUiHandler { +export class EvolutionSceneHandler extends MessageUiHandler { public evolutionContainer: Phaser.GameObjects.Container; public messageBg: Phaser.GameObjects.Image; public messageContainer: Phaser.GameObjects.Container; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 14cd10d0d6f..9c08991e063 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -1,24 +1,23 @@ import type { InfoToggle } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; -import { addTextObject, TextStyle } from "./text"; -import { getTypeDamageMultiplierColor } from "#app/data/type"; -import { PokemonType } from "#enums/pokemon-type"; -import { Command } from "#enums/command"; -import { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { getLocalizedSpriteKey, fixedInt, padInt } from "#app/utils/common"; -import { MoveCategory } from "#enums/MoveCategory"; -import i18next from "i18next"; -import { Button } from "#enums/buttons"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; -import type { CommandPhase } from "#app/phases/command-phase"; -import MoveInfoOverlay from "./move-info-overlay"; +import { getTypeDamageMultiplierColor } from "#data/type"; import { BattleType } from "#enums/battle-type"; +import { Button } from "#enums/buttons"; +import { Command } from "#enums/command"; +import { MoveCategory } from "#enums/MoveCategory"; import { MoveUseMode } from "#enums/move-use-mode"; +import { PokemonType } from "#enums/pokemon-type"; +import { UiMode } from "#enums/ui-mode"; +import type { EnemyPokemon, Pokemon } from "#field/pokemon"; +import type { PokemonMove } from "#moves/pokemon-move"; +import type { CommandPhase } from "#phases/command-phase"; +import { MoveInfoOverlay } from "#ui/move-info-overlay"; +import { addTextObject, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { fixedInt, getLocalizedSpriteKey, padInt } from "#utils/common"; +import i18next from "i18next"; -export default class FightUiHandler extends UiHandler implements InfoToggle { +export class FightUiHandler extends UiHandler implements InfoToggle { public static readonly MOVES_CONTAINER_NAME = "moves"; private movesContainer: Phaser.GameObjects.Container; @@ -42,62 +41,67 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { super(UiMode.FIGHT); } + /** + * Set the visibility of the objects in the move info container. + */ + private setInfoVis(visibility: boolean): void { + this.moveInfoContainer.iterate((o: Phaser.GameObjects.Components.Visible) => o.setVisible(visibility)); + } + setup() { const ui = this.getUi(); - this.movesContainer = globalScene.add.container(18, -38.7); - this.movesContainer.setName(FightUiHandler.MOVES_CONTAINER_NAME); + this.movesContainer = globalScene.add.container(18, -38.7).setName(FightUiHandler.MOVES_CONTAINER_NAME); ui.add(this.movesContainer); - this.moveInfoContainer = globalScene.add.container(1, 0); - this.moveInfoContainer.setName("move-info"); + this.moveInfoContainer = globalScene.add.container(1, 0).setName("move-info"); ui.add(this.moveInfoContainer); - this.typeIcon = globalScene.add.sprite( - globalScene.scaledCanvas.width - 57, - -36, - getLocalizedSpriteKey("types"), - "unknown", - ); - this.typeIcon.setVisible(false); - this.moveInfoContainer.add(this.typeIcon); + this.typeIcon = globalScene.add + .sprite(globalScene.scaledCanvas.width - 57, -36, getLocalizedSpriteKey("types"), "unknown") + .setVisible(false); - this.moveCategoryIcon = globalScene.add.sprite(globalScene.scaledCanvas.width - 25, -36, "categories", "physical"); - this.moveCategoryIcon.setVisible(false); - this.moveInfoContainer.add(this.moveCategoryIcon); + this.moveCategoryIcon = globalScene.add + .sprite(globalScene.scaledCanvas.width - 25, -36, "categories", "physical") + .setVisible(false); - this.ppLabel = addTextObject(globalScene.scaledCanvas.width - 70, -26, "PP", TextStyle.MOVE_INFO_CONTENT); - this.ppLabel.setOrigin(0.0, 0.5); - this.ppLabel.setVisible(false); - this.ppLabel.setText(i18next.t("fightUiHandler:pp")); - this.moveInfoContainer.add(this.ppLabel); + this.ppLabel = addTextObject(globalScene.scaledCanvas.width - 70, -26, "PP", TextStyle.MOVE_INFO_CONTENT) + .setOrigin(0.0, 0.5) + .setVisible(false) + .setText(i18next.t("fightUiHandler:pp")); - this.ppText = addTextObject(globalScene.scaledCanvas.width - 12, -26, "--/--", TextStyle.MOVE_INFO_CONTENT); - this.ppText.setOrigin(1, 0.5); - this.ppText.setVisible(false); - this.moveInfoContainer.add(this.ppText); + this.ppText = addTextObject(globalScene.scaledCanvas.width - 12, -26, "--/--", TextStyle.MOVE_INFO_CONTENT) + .setOrigin(1, 0.5) + .setVisible(false); - this.powerLabel = addTextObject(globalScene.scaledCanvas.width - 70, -18, "POWER", TextStyle.MOVE_INFO_CONTENT); - this.powerLabel.setOrigin(0.0, 0.5); - this.powerLabel.setVisible(false); - this.powerLabel.setText(i18next.t("fightUiHandler:power")); - this.moveInfoContainer.add(this.powerLabel); + this.powerLabel = addTextObject(globalScene.scaledCanvas.width - 70, -18, "POWER", TextStyle.MOVE_INFO_CONTENT) + .setOrigin(0.0, 0.5) + .setVisible(false) + .setText(i18next.t("fightUiHandler:power")); - this.powerText = addTextObject(globalScene.scaledCanvas.width - 12, -18, "---", TextStyle.MOVE_INFO_CONTENT); - this.powerText.setOrigin(1, 0.5); - this.powerText.setVisible(false); - this.moveInfoContainer.add(this.powerText); + this.powerText = addTextObject(globalScene.scaledCanvas.width - 12, -18, "---", TextStyle.MOVE_INFO_CONTENT) + .setOrigin(1, 0.5) + .setVisible(false); - this.accuracyLabel = addTextObject(globalScene.scaledCanvas.width - 70, -10, "ACC", TextStyle.MOVE_INFO_CONTENT); - this.accuracyLabel.setOrigin(0.0, 0.5); - this.accuracyLabel.setVisible(false); - this.accuracyLabel.setText(i18next.t("fightUiHandler:accuracy")); - this.moveInfoContainer.add(this.accuracyLabel); + this.accuracyLabel = addTextObject(globalScene.scaledCanvas.width - 70, -10, "ACC", TextStyle.MOVE_INFO_CONTENT) + .setOrigin(0.0, 0.5) + .setVisible(false) + .setText(i18next.t("fightUiHandler:accuracy")); - this.accuracyText = addTextObject(globalScene.scaledCanvas.width - 12, -10, "---", TextStyle.MOVE_INFO_CONTENT); - this.accuracyText.setOrigin(1, 0.5); - this.accuracyText.setVisible(false); - this.moveInfoContainer.add(this.accuracyText); + this.accuracyText = addTextObject(globalScene.scaledCanvas.width - 12, -10, "---", TextStyle.MOVE_INFO_CONTENT) + .setOrigin(1, 0.5) + .setVisible(false); + + this.moveInfoContainer.add([ + this.typeIcon, + this.moveCategoryIcon, + this.ppLabel, + this.ppText, + this.powerLabel, + this.powerText, + this.accuracyLabel, + this.accuracyText, + ]); // prepare move overlay const overlayScale = 1; @@ -114,15 +118,14 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { }); ui.add(this.moveInfoOverlay); // register the overlay to receive toggle events - globalScene.addInfoToggle(this.moveInfoOverlay); - globalScene.addInfoToggle(this); + globalScene.addInfoToggle(this.moveInfoOverlay, this); } - show(args: any[]): boolean { + override show(args: [number?, Command?]): boolean { super.show(args); - this.fieldIndex = args.length ? (args[0] as number) : 0; - this.fromCommand = args.length > 1 ? (args[1] as Command) : Command.FIGHT; + this.fieldIndex = args[0] ?? 0; + this.fromCommand = args[1] ?? Command.FIGHT; const messageHandler = this.getUi().getMessageHandler(); messageHandler.bg.setVisible(false); @@ -132,7 +135,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { if (pokemon.tempSummonData.turnCount <= 1) { this.setCursor(0); } else { - this.setCursor(this.getCursor()); + this.setCursor(this.fieldIndex ? this.cursor2 : this.cursor); } this.displayMoves(); this.toggleInfo(false); // in case cancel was pressed while info toggle is active @@ -147,21 +150,10 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { */ processInput(button: Button): boolean { const ui = this.getUi(); - const cursor = this.getCursor(); let success = false; + const cursor = this.getCursor(); switch (button) { - case Button.CANCEL: - { - // Attempts to back out of the move selection pane are blocked in certain MEs - // TODO: Should we allow showing the summary menu at least? - const { battleType, mysteryEncounter } = globalScene.currentBattle; - if (battleType !== BattleType.MYSTERY_ENCOUNTER || !mysteryEncounter?.skipToFightInput) { - ui.setMode(UiMode.COMMAND, this.fieldIndex); - success = true; - } - } - break; case Button.ACTION: if ( (globalScene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand( @@ -175,6 +167,15 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { ui.playError(); } break; + case Button.CANCEL: { + // Cannot back out of fight menu if skipToFightInput is enabled + const { battleType, mysteryEncounter } = globalScene.currentBattle; + if (battleType !== BattleType.MYSTERY_ENCOUNTER || !mysteryEncounter?.skipToFightInput) { + ui.setMode(UiMode.COMMAND, this.fieldIndex); + success = true; + } + break; + } case Button.UP: if (cursor >= 2) { success = this.setCursor(cursor - 2); @@ -195,8 +196,6 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { success = this.setCursor(cursor + 1); } break; - default: - // other inputs do nothing while in fight menu } if (success) { @@ -206,21 +205,26 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { return success; } + /** + * Adjust the visibility of move names and the cursor icon when the info overlay is toggled + * @param visible - The visibility of the info overlay; the move names and cursor's visibility will be set to the opposite + */ toggleInfo(visible: boolean): void { + // The info overlay will already fade in, so we should hide the move name text and cursor immediately + // rather than adjusting alpha via a tween. if (visible) { - this.movesContainer.setVisible(false); - this.cursorObj?.setVisible(false); + this.movesContainer.setVisible(false).setAlpha(0); + this.cursorObj?.setVisible(false).setAlpha(0); + return; } globalScene.tweens.add({ targets: [this.movesContainer, this.cursorObj], duration: fixedInt(125), ease: "Sine.easeInOut", - alpha: visible ? 0 : 1, + alpha: 1, }); - if (!visible) { - this.movesContainer.setVisible(true); - this.cursorObj?.setVisible(true); - } + this.movesContainer.setVisible(true); + this.cursorObj?.setVisible(true); } isActive(): boolean { @@ -231,6 +235,64 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { return !this.fieldIndex ? this.cursor : this.cursor2; } + /** @returns TextStyle according to percentage of PP remaining */ + private static ppRatioToColor(ppRatio: number): TextStyle { + if (ppRatio > 0.25 && ppRatio <= 0.5) { + return TextStyle.MOVE_PP_HALF_FULL; + } + if (ppRatio > 0 && ppRatio <= 0.25) { + return TextStyle.MOVE_PP_NEAR_EMPTY; + } + if (ppRatio === 0) { + return TextStyle.MOVE_PP_EMPTY; + } + return TextStyle.MOVE_PP_FULL; // default to full if ppRatio is invalid + } + + /** + * Populate the move info overlay with the information of the move at the given cursor index + * @param cursor - The cursor position to set the move info for + */ + private setMoveInfo(cursor: number): void { + const pokemon = (globalScene.phaseManager.getCurrentPhase() as CommandPhase).getPokemon(); + const moveset = pokemon.getMoveset(); + + const hasMove = cursor < moveset.length; + this.setInfoVis(hasMove); + + if (!hasMove) { + return; + } + + const pokemonMove = moveset[cursor]; + const moveType = pokemon.getMoveType(pokemonMove.getMove()); + const textureKey = getLocalizedSpriteKey("types"); + this.typeIcon.setTexture(textureKey, PokemonType[moveType].toLowerCase()).setScale(0.8); + + const moveCategory = pokemonMove.getMove().category; + this.moveCategoryIcon.setTexture("categories", MoveCategory[moveCategory].toLowerCase()).setScale(1.0); + const power = pokemonMove.getMove().power; + const accuracy = pokemonMove.getMove().accuracy; + const maxPP = pokemonMove.getMovePp(); + const pp = maxPP - pokemonMove.ppUsed; + + const ppLeftStr = padInt(pp, 2, " "); + const ppMaxStr = padInt(maxPP, 2, " "); + this.ppText.setText(`${ppLeftStr}/${ppMaxStr}`); + this.powerText.setText(`${power >= 0 ? power : "---"}`); + this.accuracyText.setText(`${accuracy >= 0 ? accuracy : "---"}`); + + const ppColorStyle = FightUiHandler.ppRatioToColor(pp / maxPP); + + //** Changes the text color and shadow according to the determined TextStyle */ + this.ppText.setColor(this.getTextColor(ppColorStyle, false)).setShadowColor(this.getTextColor(ppColorStyle, true)); + this.moveInfoOverlay.show(pokemonMove.getMove()); + + pokemon.getOpponents().forEach(opponent => { + (opponent as EnemyPokemon).updateEffectiveness(this.getEffectivenessText(pokemon, opponent, pokemonMove)); + }); + } + setCursor(cursor: number): boolean { const ui = this.getUi(); @@ -244,6 +306,8 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { } } + this.setMoveInfo(cursor); + if (!this.cursorObj) { const isTera = this.fromCommand === Command.TERA; this.cursorObj = globalScene.add.image(0, 0, isTera ? "cursor_tera" : "cursor"); @@ -251,61 +315,6 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { ui.add(this.cursorObj); } - const pokemon = (globalScene.phaseManager.getCurrentPhase() as CommandPhase).getPokemon(); - const moveset = pokemon.getMoveset(); - - const hasMove = cursor < moveset.length; - - if (hasMove) { - const pokemonMove = moveset[cursor]; - const moveType = pokemon.getMoveType(pokemonMove.getMove()); - const textureKey = getLocalizedSpriteKey("types"); - this.typeIcon.setTexture(textureKey, PokemonType[moveType].toLowerCase()).setScale(0.8); - - const moveCategory = pokemonMove.getMove().category; - this.moveCategoryIcon.setTexture("categories", MoveCategory[moveCategory].toLowerCase()).setScale(1.0); - const power = pokemonMove.getMove().power; - const accuracy = pokemonMove.getMove().accuracy; - const maxPP = pokemonMove.getMovePp(); - const pp = maxPP - pokemonMove.ppUsed; - - const ppLeftStr = padInt(pp, 2, " "); - const ppMaxStr = padInt(maxPP, 2, " "); - this.ppText.setText(`${ppLeftStr}/${ppMaxStr}`); - this.powerText.setText(`${power >= 0 ? power : "---"}`); - this.accuracyText.setText(`${accuracy >= 0 ? accuracy : "---"}`); - - const ppPercentLeft = pp / maxPP; - - //** Determines TextStyle according to percentage of PP remaining */ - let ppColorStyle = TextStyle.MOVE_PP_FULL; - if (ppPercentLeft > 0.25 && ppPercentLeft <= 0.5) { - ppColorStyle = TextStyle.MOVE_PP_HALF_FULL; - } else if (ppPercentLeft > 0 && ppPercentLeft <= 0.25) { - ppColorStyle = TextStyle.MOVE_PP_NEAR_EMPTY; - } else if (ppPercentLeft === 0) { - ppColorStyle = TextStyle.MOVE_PP_EMPTY; - } - - //** Changes the text color and shadow according to the determined TextStyle */ - this.ppText.setColor(this.getTextColor(ppColorStyle, false)); - this.ppText.setShadowColor(this.getTextColor(ppColorStyle, true)); - this.moveInfoOverlay.show(pokemonMove.getMove()); - - pokemon.getOpponents().forEach(opponent => { - (opponent as EnemyPokemon).updateEffectiveness(this.getEffectivenessText(pokemon, opponent, pokemonMove)); - }); - } - - this.typeIcon.setVisible(hasMove); - this.ppLabel.setVisible(hasMove); - this.ppText.setVisible(hasMove); - this.powerLabel.setVisible(hasMove); - this.powerText.setVisible(hasMove); - this.accuracyLabel.setVisible(hasMove); - this.accuracyText.setVisible(hasMove); - this.moveCategoryIcon.setVisible(hasMove); - this.cursorObj.setPosition(13 + (cursor % 2 === 1 ? 114 : 0), -31 + (cursor >= 2 ? 15 : 0)); return changed; @@ -313,7 +322,6 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { /** * Gets multiplier text for a pokemon's move against a specific opponent - * Returns undefined if it's a status move */ private getEffectivenessText(pokemon: Pokemon, opponent: Pokemon, pokemonMove: PokemonMove): string | undefined { const effectiveness = opponent.getMoveEffectiveness( @@ -324,8 +332,11 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { undefined, true, ); - if (effectiveness === undefined) { - return undefined; + if (pokemonMove.getMove().category === MoveCategory.STATUS) { + if (effectiveness === 0) { + return "0x"; + } + return "1x"; } return `${effectiveness}x`; @@ -336,14 +347,19 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { const moveset = pokemon.getMoveset(); for (let moveIndex = 0; moveIndex < 4; moveIndex++) { - const moveText = addTextObject(moveIndex % 2 === 0 ? 0 : 114, moveIndex < 2 ? 0 : 16, "-", TextStyle.WINDOW); - moveText.setName("text-empty-move"); + const moveText = addTextObject( + moveIndex % 2 === 0 ? 0 : 114, + moveIndex < 2 ? 0 : 16, + "-", + TextStyle.WINDOW, + ).setName("text-empty-move"); if (moveIndex < moveset.length) { const pokemonMove = moveset[moveIndex]!; // TODO is the bang correct? - moveText.setText(pokemonMove.getName()); - moveText.setName(pokemonMove.getName()); - moveText.setColor(this.getMoveColor(pokemon, pokemonMove) ?? moveText.style.color); + moveText + .setText(pokemonMove.getName()) + .setName(pokemonMove.getName()) + .setColor(this.getMoveColor(pokemon, pokemonMove) ?? moveText.style.color); } this.movesContainer.add(moveText); @@ -377,7 +393,12 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { ), ) .sort((a, b) => b - a) - .map(effectiveness => getTypeDamageMultiplierColor(effectiveness ?? 0, "offense")); + .map(effectiveness => { + if (pokemonMove.getMove().category === MoveCategory.STATUS && effectiveness !== 0) { + return undefined; + } + return getTypeDamageMultiplierColor(effectiveness ?? 0, "offense"); + }); return moveColors[0]; } @@ -386,14 +407,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { super.clear(); const messageHandler = this.getUi().getMessageHandler(); this.clearMoves(); - this.typeIcon.setVisible(false); - this.ppLabel.setVisible(false); - this.ppText.setVisible(false); - this.powerLabel.setVisible(false); - this.powerText.setVisible(false); - this.accuracyLabel.setVisible(false); - this.accuracyText.setVisible(false); - this.moveCategoryIcon.setVisible(false); + this.setInfoVis(false); this.moveInfoOverlay.clear(); messageHandler.bg.setVisible(true); this.eraseCursor(); diff --git a/src/ui/filter-bar.ts b/src/ui/filter-bar.ts index 32e400102bd..3961ae3415c 100644 --- a/src/ui/filter-bar.ts +++ b/src/ui/filter-bar.ts @@ -1,11 +1,11 @@ -import type { DropDown } from "./dropdown"; -import { DropDownType } from "./dropdown"; -import type { StarterContainer } from "./starter-container"; -import { addTextObject, getTextColor, TextStyle } from "./text"; -import type { UiTheme } from "#enums/ui-theme"; -import { addWindow, WindowVariant } from "./ui-theme"; import { globalScene } from "#app/global-scene"; import type { DropDownColumn } from "#enums/drop-down-column"; +import type { UiTheme } from "#enums/ui-theme"; +import type { DropDown } from "#ui/dropdown"; +import { DropDownType } from "#ui/dropdown"; +import type { StarterContainer } from "#ui/starter-container"; +import { addTextObject, getTextColor, TextStyle } from "#ui/text"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; export class FilterBar extends Phaser.GameObjects.Container { private window: Phaser.GameObjects.NineSlice; diff --git a/src/ui/filter-text.ts b/src/ui/filter-text.ts index 7e27a806478..4a9012e44fc 100644 --- a/src/ui/filter-text.ts +++ b/src/ui/filter-text.ts @@ -1,12 +1,12 @@ -import type { StarterContainer } from "./starter-container"; -import { addTextObject, getTextColor, TextStyle } from "./text"; -import type { UiTheme } from "#enums/ui-theme"; -import { addWindow, WindowVariant } from "./ui-theme"; -import i18next from "i18next"; -import type AwaitableUiHandler from "./awaitable-ui-handler"; -import type UI from "./ui"; -import { UiMode } from "#enums/ui-mode"; import { globalScene } from "#app/global-scene"; +import { UiMode } from "#enums/ui-mode"; +import type { UiTheme } from "#enums/ui-theme"; +import type { AwaitableUiHandler } from "#ui/awaitable-ui-handler"; +import type { StarterContainer } from "#ui/starter-container"; +import { addTextObject, getTextColor, TextStyle } from "#ui/text"; +import type { UI } from "#ui/ui"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; +import i18next from "i18next"; export enum FilterTextRow { NAME, diff --git a/src/ui/form-modal-ui-handler.ts b/src/ui/form-modal-ui-handler.ts index 8c30b4e0bc4..35965b09b80 100644 --- a/src/ui/form-modal-ui-handler.ts +++ b/src/ui/form-modal-ui-handler.ts @@ -1,12 +1,12 @@ -import type { ModalConfig } from "./modal-ui-handler"; -import { ModalUiHandler } from "./modal-ui-handler"; -import type { UiMode } from "#enums/ui-mode"; -import { TextStyle, addTextInputObject, addTextObject } from "./text"; -import { WindowVariant, addWindow } from "./ui-theme"; -import type InputText from "phaser3-rex-plugins/plugins/inputtext"; -import { fixedInt } from "#app/utils/common"; -import { Button } from "#enums/buttons"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import type { UiMode } from "#enums/ui-mode"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { ModalUiHandler } from "#ui/modal-ui-handler"; +import { addTextInputObject, addTextObject, TextStyle } from "#ui/text"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; +import { fixedInt } from "#utils/common"; +import type InputText from "phaser3-rex-plugins/plugins/inputtext"; export interface FormModalConfig extends ModalConfig { errorMessage?: string; diff --git a/src/ui/game-stats-ui-handler.ts b/src/ui/game-stats-ui-handler.ts index 7e5a856aa0b..f9087ba7dfa 100644 --- a/src/ui/game-stats-ui-handler.ts +++ b/src/ui/game-stats-ui-handler.ts @@ -1,16 +1,16 @@ -import Phaser from "phaser"; -import { TextStyle, addTextObject } from "#app/ui/text"; -import type { UiMode } from "#enums/ui-mode"; -import UiHandler from "#app/ui/ui-handler"; -import { addWindow } from "#app/ui/ui-theme"; -import { getPlayTimeString, formatFancyLargeNumber, toReadableString } from "#app/utils/common"; -import type { GameData } from "#app/system/game-data"; -import { DexAttr } from "#enums/dex-attr"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import { Button } from "#enums/buttons"; -import i18next from "i18next"; -import { UiTheme } from "#enums/ui-theme"; import { globalScene } from "#app/global-scene"; +import { speciesStarterCosts } from "#balance/starters"; +import { Button } from "#enums/buttons"; +import { DexAttr } from "#enums/dex-attr"; +import type { UiMode } from "#enums/ui-mode"; +import { UiTheme } from "#enums/ui-theme"; +import type { GameData } from "#system/game-data"; +import { addTextObject, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; +import { formatFancyLargeNumber, getPlayTimeString, toReadableString } from "#utils/common"; +import i18next from "i18next"; +import Phaser from "phaser"; interface DisplayStat { label_key?: string; @@ -213,7 +213,7 @@ const displayStats: DisplayStats = { }, }; -export default class GameStatsUiHandler extends UiHandler { +export class GameStatsUiHandler extends UiHandler { private gameStatsContainer: Phaser.GameObjects.Container; private statsContainer: Phaser.GameObjects.Container; diff --git a/src/ui/hatched-pokemon-container.ts b/src/ui/hatched-pokemon-container.ts index 8b9a5309a9c..a5919348a94 100644 --- a/src/ui/hatched-pokemon-container.ts +++ b/src/ui/hatched-pokemon-container.ts @@ -1,11 +1,11 @@ -import type { EggHatchData } from "#app/data/egg-hatch-data"; -import { Gender } from "#app/data/gender"; -import { getVariantTint } from "#app/sprites/variant"; -import { DexAttr } from "#enums/dex-attr"; import { globalScene } from "#app/global-scene"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import type PokemonIconAnimHandler from "./pokemon-icon-anim-handler"; -import { PokemonIconAnimMode } from "./pokemon-icon-anim-handler"; +import type { EggHatchData } from "#data/egg-hatch-data"; +import { Gender } from "#data/gender"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { DexAttr } from "#enums/dex-attr"; +import { getVariantTint } from "#sprites/variant"; +import type { PokemonIconAnimHandler } from "#ui/pokemon-icon-anim-handler"; +import { PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler"; /** * A container for a Pokemon's sprite and icons to get displayed in the egg summary screen diff --git a/src/ui/loading-modal-ui-handler.ts b/src/ui/loading-modal-ui-handler.ts index 13dffe5614c..585d70d51db 100644 --- a/src/ui/loading-modal-ui-handler.ts +++ b/src/ui/loading-modal-ui-handler.ts @@ -1,9 +1,9 @@ -import i18next from "i18next"; -import { ModalUiHandler } from "./modal-ui-handler"; -import { addTextObject, TextStyle } from "./text"; import type { UiMode } from "#enums/ui-mode"; +import { ModalUiHandler } from "#ui/modal-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import i18next from "i18next"; -export default class LoadingModalUiHandler extends ModalUiHandler { +export class LoadingModalUiHandler extends ModalUiHandler { constructor(mode: UiMode | null = null) { super(mode); } diff --git a/src/ui/login-form-ui-handler.ts b/src/ui/login-form-ui-handler.ts index 5c48cf55753..417a9031bf7 100644 --- a/src/ui/login-form-ui-handler.ts +++ b/src/ui/login-form-ui-handler.ts @@ -1,14 +1,14 @@ -import type { InputFieldConfig } from "./form-modal-ui-handler"; -import { FormModalUiHandler } from "./form-modal-ui-handler"; -import type { ModalConfig } from "./modal-ui-handler"; -import { fixedInt } from "#app/utils/common"; -import { UiMode } from "#enums/ui-mode"; -import i18next from "i18next"; -import { addTextObject, TextStyle } from "./text"; -import { addWindow } from "./ui-theme"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; +import { pokerogueApi } from "#api/pokerogue-api"; import { globalScene } from "#app/global-scene"; +import { UiMode } from "#enums/ui-mode"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import type { InputFieldConfig } from "#ui/form-modal-ui-handler"; +import { FormModalUiHandler } from "#ui/form-modal-ui-handler"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt } from "#utils/common"; +import i18next from "i18next"; import JSZip from "jszip"; interface BuildInteractableImageOpts { @@ -18,7 +18,7 @@ interface BuildInteractableImageOpts { origin?: { x: number; y: number }; } -export default class LoginFormUiHandler extends FormModalUiHandler { +export 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"; diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 5ab1d4f9e96..4e45dfedcb3 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -1,22 +1,23 @@ -import { bypassLogin } from "#app/global-vars/bypass-login"; +import { pokerogueApi } from "#api/pokerogue-api"; +import { loggedInUser, updateUserInfo } from "#app/account"; import { globalScene } from "#app/global-scene"; -import { TextStyle, addTextObject, getTextStyleOptions } from "./text"; -import { UiMode } from "#enums/ui-mode"; -import { getEnumKeys, isLocal, fixedInt, sessionIdKey } from "#app/utils/common"; -import { isBeta } from "#app/utils/utility-vars"; -import { getCookie } from "#app/utils/cookies"; -import { addWindow, WindowVariant } from "./ui-theme"; -import MessageUiHandler from "./message-ui-handler"; -import type { OptionSelectConfig, OptionSelectItem } from "./abstact-option-select-ui-handler"; -import { Tutorial, handleTutorial } from "../tutorial"; -import { loggedInUser, updateUserInfo } from "../account"; -import i18next from "i18next"; +import { bypassLogin } from "#app/global-vars/bypass-login"; +import { handleTutorial, Tutorial } from "#app/tutorial"; import { Button } from "#enums/buttons"; import { GameDataType } from "#enums/game-data-type"; -import BgmBar from "#app/ui/bgm-bar"; -import type AwaitableUiHandler from "./awaitable-ui-handler"; -import { AdminMode, getAdminModeName } from "./admin-ui-handler"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; +import { UiMode } from "#enums/ui-mode"; +import type { OptionSelectConfig, OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { AdminMode, getAdminModeName } from "#ui/admin-ui-handler"; +import type { AwaitableUiHandler } from "#ui/awaitable-ui-handler"; +import { BgmBar } from "#ui/bgm-bar"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { addTextObject, getTextStyleOptions, TextStyle } from "#ui/text"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; +import { fixedInt, isLocal, sessionIdKey } from "#utils/common"; +import { getCookie } from "#utils/cookies"; +import { getEnumValues } from "#utils/enums"; +import { isBeta } from "#utils/utility-vars"; +import i18next from "i18next"; enum MenuOptions { GAME_SETTINGS, @@ -37,7 +38,7 @@ const githubUrl = "https://github.com/pagefaultgames/pokerogue"; const redditUrl = "https://www.reddit.com/r/pokerogue"; const donateUrl = "https://github.com/sponsors/pagefaultgames"; -export default class MenuUiHandler extends MessageUiHandler { +export class MenuUiHandler extends MessageUiHandler { private readonly textPadding = 8; private readonly defaultMessageBoxWidth = 220; private readonly defaultWordWrapWidth = 1224; @@ -76,11 +77,9 @@ export default class MenuUiHandler extends MessageUiHandler { { condition: bypassLogin, options: [MenuOptions.LOG_OUT] }, ]; - this.menuOptions = getEnumKeys(MenuOptions) - .map(m => Number.parseInt(MenuOptions[m]) as MenuOptions) - .filter(m => { - return !this.excludedMenus().some(exclusion => exclusion.condition && exclusion.options.includes(m)); - }); + this.menuOptions = getEnumValues(MenuOptions).filter(m => { + return !this.excludedMenus().some(exclusion => exclusion.condition && exclusion.options.includes(m)); + }); } setup(): void { @@ -131,11 +130,9 @@ export default class MenuUiHandler extends MessageUiHandler { { condition: bypassLogin, options: [MenuOptions.LOG_OUT] }, ]; - this.menuOptions = getEnumKeys(MenuOptions) - .map(m => Number.parseInt(MenuOptions[m]) as MenuOptions) - .filter(m => { - return !this.excludedMenus().some(exclusion => exclusion.condition && exclusion.options.includes(m)); - }); + this.menuOptions = getEnumValues(MenuOptions).filter(m => { + return !this.excludedMenus().some(exclusion => exclusion.condition && exclusion.options.includes(m)); + }); this.optionSelectText = addTextObject( 0, @@ -511,11 +508,9 @@ export default class MenuUiHandler extends MessageUiHandler { this.render(); super.show(args); - this.menuOptions = getEnumKeys(MenuOptions) - .map(m => Number.parseInt(MenuOptions[m]) as MenuOptions) - .filter(m => { - return !this.excludedMenus().some(exclusion => exclusion.condition && exclusion.options.includes(m)); - }); + this.menuOptions = getEnumValues(MenuOptions).filter(m => { + return !this.excludedMenus().some(exclusion => exclusion.condition && exclusion.options.includes(m)); + }); this.menuContainer.setVisible(true); this.setCursor(0); diff --git a/src/ui/message-ui-handler.ts b/src/ui/message-ui-handler.ts index efa53b63808..57f054c9bf9 100644 --- a/src/ui/message-ui-handler.ts +++ b/src/ui/message-ui-handler.ts @@ -1,9 +1,9 @@ -import AwaitableUiHandler from "./awaitable-ui-handler"; -import type { UiMode } from "#enums/ui-mode"; -import { getFrameMs } from "#app/utils/common"; import { globalScene } from "#app/global-scene"; +import type { UiMode } from "#enums/ui-mode"; +import { AwaitableUiHandler } from "#ui/awaitable-ui-handler"; +import { getFrameMs } from "#utils/common"; -export default abstract class MessageUiHandler extends AwaitableUiHandler { +export abstract class MessageUiHandler extends AwaitableUiHandler { protected textTimer: Phaser.Time.TimerEvent | null; protected textCallbackTimer: Phaser.Time.TimerEvent | null; public pendingPrompt: boolean; diff --git a/src/ui/modal-ui-handler.ts b/src/ui/modal-ui-handler.ts index 56c1c2c3fcf..844f7f43930 100644 --- a/src/ui/modal-ui-handler.ts +++ b/src/ui/modal-ui-handler.ts @@ -1,9 +1,9 @@ -import { TextStyle, addTextObject } from "./text"; -import type { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { WindowVariant, addWindow } from "./ui-theme"; -import type { Button } from "#enums/buttons"; import { globalScene } from "#app/global-scene"; +import type { Button } from "#enums/buttons"; +import type { UiMode } from "#enums/ui-mode"; +import { addTextObject, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; export interface ModalConfig { buttonActions: Function[]; diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index 7f5bf997f88..264804eb627 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -1,28 +1,28 @@ import { globalScene } from "#app/global-scene"; -import type { ModifierTypeOption } from "../modifier/modifier-type"; -import { getPlayerShopModifierTypeOptionsForWave, TmModifierType } from "../modifier/modifier-type"; -import { getPokeballAtlasKey } from "#app/data/pokeball"; -import { addTextObject, getTextStyleOptions, getModifierTierTextTint, getTextColor, TextStyle } from "./text"; -import AwaitableUiHandler from "./awaitable-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { LockModifierTiersModifier, PokemonHeldItemModifier, HealShopCostModifier } from "../modifier/modifier"; -import { handleTutorial, Tutorial } from "../tutorial"; -import { Button } from "#enums/buttons"; -import MoveInfoOverlay from "./move-info-overlay"; -import { allMoves } from "#app/data/data-lists"; -import { formatMoney, NumberHolder } from "#app/utils/common"; import Overrides from "#app/overrides"; -import i18next from "i18next"; -import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; -import Phaser from "phaser"; +import { handleTutorial, Tutorial } from "#app/tutorial"; +import { allMoves } from "#data/data-lists"; +import { getPokeballAtlasKey } from "#data/pokeball"; +import { Button } from "#enums/buttons"; import type { PokeballType } from "#enums/pokeball"; +import { ShopCursorTarget } from "#enums/shop-cursor-target"; +import { UiMode } from "#enums/ui-mode"; +import { HealShopCostModifier, LockModifierTiersModifier, PokemonHeldItemModifier } from "#modifiers/modifier"; +import type { ModifierTypeOption } from "#modifiers/modifier-type"; +import { getPlayerShopModifierTypeOptionsForWave, TmModifierType } from "#modifiers/modifier-type"; +import { AwaitableUiHandler } from "#ui/awaitable-ui-handler"; +import { MoveInfoOverlay } from "#ui/move-info-overlay"; +import { addTextObject, getModifierTierTextTint, getTextColor, getTextStyleOptions, TextStyle } from "#ui/text"; +import { formatMoney, NumberHolder } from "#utils/common"; +import i18next from "i18next"; +import Phaser from "phaser"; export const SHOP_OPTIONS_ROW_LIMIT = 7; const SINGLE_SHOP_ROW_YOFFSET = 12; const DOUBLE_SHOP_ROW_YOFFSET = 24; const OPTION_BUTTON_YPOSITION = -62; -export default class ModifierSelectUiHandler extends AwaitableUiHandler { +export class ModifierSelectUiHandler extends AwaitableUiHandler { private modifierContainer: Phaser.GameObjects.Container; private rerollButtonContainer: Phaser.GameObjects.Container; private lockRarityButtonContainer: Phaser.GameObjects.Container; @@ -269,13 +269,22 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { globalScene.updateBiomeWaveText(); globalScene.updateMoneyText(); + // DO NOT REMOVE: Fixes bug which allows action input to be processed before the UI is shown, + // causing errors if reroll is selected + this.awaitingActionInput = false; + + // TODO: Replace with `Promise.withResolvers` when possible. + let tweenResolve: () => void; + const tweenPromise = new Promise(resolve => (tweenResolve = resolve)); let i = 0; + // TODO: Rework this bespoke logic for animating the modifier options. globalScene.tweens.addCounter({ ease: "Sine.easeIn", duration: 1250, onUpdate: t => { - const value = t.getValue(); + // The bang here is safe, as `getValue()` only returns null if the tween has been destroyed (which obviously isn't the case inside onUpdate) + const value = t.getValue()!; const index = Math.floor(value * typeOptions.length); if (index > i && index <= typeOptions.length) { const option = this.options[i]; @@ -286,67 +295,77 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { i++; } }, + onComplete: () => { + tweenResolve(); + }, }); - globalScene.time.delayedCall(1000 + maxUpgradeCount * 2000, () => { - for (const shopOption of this.shopOptionsRows.flat()) { - shopOption.show(0, 0); - } + let shopResolve: () => void; + const shopPromise = new Promise(resolve => (shopResolve = resolve)); + tweenPromise.then(() => { + globalScene.time.delayedCall(1000, () => { + for (const shopOption of this.shopOptionsRows.flat()) { + shopOption.show(0, 0); + } + shopResolve(); + }); }); - globalScene.time.delayedCall(4000 + maxUpgradeCount * 2000, () => { - if (partyHasHeldItem) { - this.transferButtonContainer.setAlpha(0); - this.transferButtonContainer.setVisible(true); + shopPromise.then(() => { + globalScene.time.delayedCall(500, () => { + if (partyHasHeldItem) { + this.transferButtonContainer.setAlpha(0); + this.transferButtonContainer.setVisible(true); + globalScene.tweens.add({ + targets: this.transferButtonContainer, + alpha: 1, + duration: 250, + }); + } + + this.rerollButtonContainer.setAlpha(0); + this.checkButtonContainer.setAlpha(0); + this.lockRarityButtonContainer.setAlpha(0); + this.continueButtonContainer.setAlpha(0); + this.rerollButtonContainer.setVisible(true); + this.checkButtonContainer.setVisible(true); + this.continueButtonContainer.setVisible(this.rerollCost < 0); + this.lockRarityButtonContainer.setVisible(canLockRarities); + globalScene.tweens.add({ - targets: this.transferButtonContainer, + targets: [this.checkButtonContainer, this.continueButtonContainer], alpha: 1, duration: 250, }); - } - this.rerollButtonContainer.setAlpha(0); - this.checkButtonContainer.setAlpha(0); - this.lockRarityButtonContainer.setAlpha(0); - this.continueButtonContainer.setAlpha(0); - this.rerollButtonContainer.setVisible(true); - this.checkButtonContainer.setVisible(true); - this.continueButtonContainer.setVisible(this.rerollCost < 0); - this.lockRarityButtonContainer.setVisible(canLockRarities); + globalScene.tweens.add({ + targets: [this.rerollButtonContainer, this.lockRarityButtonContainer], + alpha: this.rerollCost < 0 ? 0.5 : 1, + duration: 250, + }); - globalScene.tweens.add({ - targets: [this.checkButtonContainer, this.continueButtonContainer], - alpha: 1, - duration: 250, - }); + const updateCursorTarget = () => { + if (globalScene.shopCursorTarget === ShopCursorTarget.CHECK_TEAM) { + this.setRowCursor(0); + this.setCursor(2); + } else if (globalScene.shopCursorTarget === ShopCursorTarget.SHOP && globalScene.gameMode.hasNoShop) { + this.setRowCursor(ShopCursorTarget.REWARDS); + this.setCursor(0); + } else { + this.setRowCursor(globalScene.shopCursorTarget); + this.setCursor(0); + } + }; - globalScene.tweens.add({ - targets: [this.rerollButtonContainer, this.lockRarityButtonContainer], - alpha: this.rerollCost < 0 ? 0.5 : 1, - duration: 250, - }); + updateCursorTarget(); - const updateCursorTarget = () => { - if (globalScene.shopCursorTarget === ShopCursorTarget.CHECK_TEAM) { - this.setRowCursor(0); - this.setCursor(2); - } else if (globalScene.shopCursorTarget === ShopCursorTarget.SHOP && globalScene.gameMode.hasNoShop) { - this.setRowCursor(ShopCursorTarget.REWARDS); - this.setCursor(0); - } else { - this.setRowCursor(globalScene.shopCursorTarget); - this.setCursor(0); - } - }; - - updateCursorTarget(); - - handleTutorial(Tutorial.Select_Item).then(res => { - if (res) { - updateCursorTarget(); - } - this.awaitingActionInput = true; - this.onActionInput = args[2]; + handleTutorial(Tutorial.Select_Item).then(res => { + if (res) { + updateCursorTarget(); + } + this.awaitingActionInput = true; + this.onActionInput = args[2]; + }); }); }); @@ -687,7 +706,11 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { scale: 0.01, duration: 250, ease: "Cubic.easeIn", - onComplete: () => options.forEach(o => o.destroy()), + onComplete: () => { + options.forEach(o => { + o.destroy(); + }); + }, }); [ @@ -819,7 +842,7 @@ class ModifierOption extends Phaser.GameObjects.Container { if (!globalScene) { return; } - const value = t.getValue(); + const value = t.getValue()!; if (!bounce && value > lastValue) { globalScene.playSound("se/pb_bounce_1", { volume: 1 / ++bounceCount, @@ -832,41 +855,38 @@ class ModifierOption extends Phaser.GameObjects.Container { }, }); + // TODO: Figure out proper delay between chains and then convert this into a single tween chain + // rather than starting multiple tween chains. for (let u = 0; u < this.modifierTypeOption.upgradeCount; u++) { - const upgradeIndex = u; - globalScene.time.delayedCall( - remainingDuration - 2000 * (this.modifierTypeOption.upgradeCount - (upgradeIndex + 1 + upgradeCountOffset)), - () => { - globalScene.playSound("se/upgrade", { - rate: 1 + 0.25 * upgradeIndex, - }); - this.pbTint.setPosition(this.pb.x, this.pb.y); - this.pbTint.setTintFill(0xffffff); - this.pbTint.setAlpha(0); - this.pbTint.setVisible(true); - globalScene.tweens.add({ + globalScene.tweens.chain({ + tweens: [ + { + delay: remainingDuration - 2000 * (this.modifierTypeOption.upgradeCount - (u + 1 + upgradeCountOffset)), + onStart: () => { + globalScene.playSound("se/upgrade", { + rate: 1 + 0.25 * u, + }); + this.pbTint.setPosition(this.pb.x, this.pb.y).setTintFill(0xffffff).setVisible(true).setAlpha(0); + }, targets: this.pbTint, alpha: 1, duration: 1000, ease: "Sine.easeIn", onComplete: () => { - this.pb.setTexture( - "pb", - this.getPbAtlasKey(-this.modifierTypeOption.upgradeCount + (upgradeIndex + 1)), - ); - globalScene.tweens.add({ - targets: this.pbTint, - alpha: 0, - duration: 750, - ease: "Sine.easeOut", - onComplete: () => { - this.pbTint.setVisible(false); - }, - }); + this.pb.setTexture("pb", this.getPbAtlasKey(-this.modifierTypeOption.upgradeCount + (u + 1))); }, - }); - }, - ); + }, + { + targets: this.pbTint, + alpha: 0, + duration: 750, + ease: "Sine.easeOut", + onComplete: () => { + this.pbTint.setVisible(false); + }, + }, + ], + }); } } diff --git a/src/ui/move-info-overlay.ts b/src/ui/move-info-overlay.ts index 63c49d32463..1747021b7ec 100644 --- a/src/ui/move-info-overlay.ts +++ b/src/ui/move-info-overlay.ts @@ -1,11 +1,11 @@ import type { InfoToggle } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; -import { TextStyle, addTextObject } from "./text"; -import { addWindow } from "./ui-theme"; -import { getLocalizedSpriteKey, fixedInt } from "#app/utils/common"; -import type Move from "../data/moves/move"; import { MoveCategory } from "#enums/MoveCategory"; import { PokemonType } from "#enums/pokemon-type"; +import type { Move } from "#moves/move"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt, getLocalizedSpriteKey } from "#utils/common"; import i18next from "i18next"; export interface MoveInfoOverlaySettings { @@ -30,7 +30,7 @@ const DESC_HEIGHT = 48; const BORDER = 8; const GLOBAL_SCALE = 6; -export default class MoveInfoOverlay extends Phaser.GameObjects.Container implements InfoToggle { +export class MoveInfoOverlay extends Phaser.GameObjects.Container implements InfoToggle { public active = false; private move: Move; diff --git a/src/ui/mystery-encounter-ui-handler.ts b/src/ui/mystery-encounter-ui-handler.ts index 58f204a8721..37f0efb50e4 100644 --- a/src/ui/mystery-encounter-ui-handler.ts +++ b/src/ui/mystery-encounter-ui-handler.ts @@ -1,22 +1,22 @@ -import { addBBCodeTextObject, getBBCodeFrag, TextStyle } from "./text"; -import { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; +import { globalScene } from "#app/global-scene"; +import { getPokeballAtlasKey } from "#data/pokeball"; import { Button } from "#enums/buttons"; -import { addWindow, WindowVariant } from "./ui-theme"; -import type { MysteryEncounterPhase } from "../phases/mystery-encounter-phases"; -import { PartyUiMode } from "./party-ui-handler"; -import type MysteryEncounterOption from "#app/data/mystery-encounters/mystery-encounter-option"; -import { fixedInt, isNullOrUndefined } from "#app/utils/common"; -import { getPokeballAtlasKey } from "../data/pokeball"; -import type { OptionSelectSettings } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { getEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import i18next from "i18next"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { UiMode } from "#enums/ui-mode"; +import { getEncounterText } from "#mystery-encounters/encounter-dialogue-utils"; +import type { OptionSelectSettings } from "#mystery-encounters/encounter-phase-utils"; +import type { MysteryEncounterOption } from "#mystery-encounters/mystery-encounter-option"; +import type { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { PartyUiMode } from "#ui/party-ui-handler"; +import { addBBCodeTextObject, getBBCodeFrag, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow, WindowVariant } from "#ui/ui-theme"; +import { fixedInt, isNullOrUndefined } from "#utils/common"; +import i18next from "i18next"; import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import { globalScene } from "#app/global-scene"; -export default class MysteryEncounterUiHandler extends UiHandler { +export class MysteryEncounterUiHandler extends UiHandler { private cursorContainer: Phaser.GameObjects.Container; private cursorObj?: Phaser.GameObjects.Image; diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index 7b7f5277ca1..0d6ec936a92 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import type Pokemon from "../field/pokemon"; -import { TextStyle, addTextObject } from "./text"; +import type { Pokemon } from "#field/pokemon"; +import { addTextObject, TextStyle } from "#ui/text"; import i18next from "i18next"; -export default class PartyExpBar extends Phaser.GameObjects.Container { +export class PartyExpBar extends Phaser.GameObjects.Container { private bg: Phaser.GameObjects.NineSlice; private pokemonIcon: Phaser.GameObjects.Container; private expText: Phaser.GameObjects.Text; diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index c8b6460112b..ce5f60813c7 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -1,34 +1,33 @@ -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { TurnMove } from "#app/@types/turn-move"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import type Pokemon from "#app/field/pokemon"; -import { MoveResult } from "#enums/move-result"; -import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#app/ui/text"; -import { Command } from "#enums/command"; -import MessageUiHandler from "#app/ui/message-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { BooleanHolder, toReadableString, randInt, getLocalizedSpriteKey } from "#app/utils/common"; -import type { PokemonFormChangeItemModifier, PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { allMoves } from "#app/data/data-lists"; -import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender"; -import { StatusEffect } from "#enums/status-effect"; -import PokemonIconAnimHandler, { PokemonIconAnimMode } from "#app/ui/pokemon-icon-anim-handler"; -import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; -import { addWindow } from "#app/ui/ui-theme"; -import { SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms/form-change-triggers"; -import { FormChangeItem } from "#enums/form-change-item"; -import { getVariantTint } from "#app/sprites/variant"; +import { globalScene } from "#app/global-scene"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { pokemonEvolutions } from "#balance/pokemon-evolutions"; +import { applyChallenges } from "#data/challenge"; +import { allMoves } from "#data/data-lists"; +import { SpeciesFormChangeItemTrigger } from "#data/form-change-triggers"; +import { Gender, getGenderColor, getGenderSymbol } from "#data/gender"; import { Button } from "#enums/buttons"; -import { applyChallenges } from "#app/data/challenge"; import { ChallengeType } from "#enums/challenge-type"; -import MoveInfoOverlay from "#app/ui/move-info-overlay"; +import { Command } from "#enums/command"; +import { FormChangeItem } from "#enums/form-change-item"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon, Pokemon } from "#field/pokemon"; +import type { PokemonFormChangeItemModifier, PokemonHeldItemModifier } from "#modifiers/modifier"; +import type { PokemonMove } from "#moves/pokemon-move"; +import type { CommandPhase } from "#phases/command-phase"; +import { getVariantTint } from "#sprites/variant"; +import type { TurnMove } from "#types/turn-move"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { MoveInfoOverlay } from "#ui/move-info-overlay"; +import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler"; +import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { BooleanHolder, getLocalizedSpriteKey, randInt, toReadableString } from "#utils/common"; import i18next from "i18next"; import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { getPokemonNameWithAffix } from "#app/messages"; -import type { CommandPhase } from "#app/phases/command-phase"; -import { globalScene } from "#app/global-scene"; const defaultMessage = i18next.t("partyUiHandler:choosePokemon"); @@ -145,7 +144,7 @@ export type PokemonModifierTransferSelectFilter = ( ) => string | null; export type PokemonMoveSelectFilter = (pokemonMove: PokemonMove) => string | null; -export default class PartyUiHandler extends MessageUiHandler { +export class PartyUiHandler extends MessageUiHandler { private partyUiMode: PartyUiMode; private fieldIndex: number; @@ -1285,17 +1284,18 @@ export default class PartyUiHandler extends MessageUiHandler { const allowBatonModifierSwitch = this.allowBatonModifierSwitch(); const isBatonPassMove = this.isBatonPassMove(); + if (allowBatonModifierSwitch && !isBatonPassMove) { + // the BATON modifier gives an extra switch option for + // pokemon-command switches, allowing buffs to be optionally passed + this.options.push(PartyOption.PASS_BATON); + } + // isBatonPassMove and allowBatonModifierSwitch shouldn't ever be true // at the same time, because they both explicitly check for a mutually // exclusive partyUiMode. But better safe than sorry. this.options.push( isBatonPassMove && !allowBatonModifierSwitch ? PartyOption.PASS_BATON : PartyOption.SEND_OUT, ); - if (allowBatonModifierSwitch && !isBatonPassMove) { - // the BATON modifier gives an extra switch option for - // pokemon-command switches, allowing buffs to be optionally passed - this.options.push(PartyOption.PASS_BATON); - } } this.addCommonOptions(pokemon); if (this.partyUiMode === PartyUiMode.SWITCH) { @@ -1335,13 +1335,13 @@ export default class PartyUiHandler extends MessageUiHandler { this.addCommonOptions(pokemon); break; case PartyUiMode.CHECK: + this.addCommonOptions(pokemon); if (globalScene.phaseManager.getCurrentPhase()?.is("SelectModifierPhase")) { const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon); for (let i = 0; i < formChangeItemModifiers.length; i++) { this.options.push(PartyOption.FORM_CHANGE_ITEM + i); } } - this.addCommonOptions(pokemon); break; case PartyUiMode.SELECT: this.options.push(PartyOption.SELECT); diff --git a/src/ui/pokeball-tray.ts b/src/ui/pokeball-tray.ts index 0bf47699cdb..9720aa42090 100644 --- a/src/ui/pokeball-tray.ts +++ b/src/ui/pokeball-tray.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import type Pokemon from "../field/pokemon"; +import type { Pokemon } from "#field/pokemon"; -export default class PokeballTray extends Phaser.GameObjects.Container { +export class PokeballTray extends Phaser.GameObjects.Container { private player: boolean; private bg: Phaser.GameObjects.NineSlice; diff --git a/src/ui/pokedex-info-overlay.ts b/src/ui/pokedex-info-overlay.ts index dca5f9b7b31..6d3b8f1009f 100644 --- a/src/ui/pokedex-info-overlay.ts +++ b/src/ui/pokedex-info-overlay.ts @@ -1,8 +1,8 @@ -import type { InfoToggle } from "../battle-scene"; -import { TextStyle, addTextObject } from "./text"; -import { addWindow } from "./ui-theme"; -import { fixedInt } from "#app/utils/common"; +import type { InfoToggle } from "#app/battle-scene"; import { globalScene } from "#app/global-scene"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt } from "#utils/common"; export interface PokedexInfoOverlaySettings { delayVisibility?: boolean; // if true, showing the overlay will only set it to active and populate the fields and the handler using this field has to manually call setVisible later. @@ -21,7 +21,7 @@ const DESC_HEIGHT = 48; const BORDER = 8; const GLOBAL_SCALE = 6; -export default class PokedexInfoOverlay extends Phaser.GameObjects.Container implements InfoToggle { +export class PokedexInfoOverlay extends Phaser.GameObjects.Container implements InfoToggle { public active = false; private desc: Phaser.GameObjects.Text; diff --git a/src/ui/pokedex-mon-container.ts b/src/ui/pokedex-mon-container.ts index da79320850d..73799870e6b 100644 --- a/src/ui/pokedex-mon-container.ts +++ b/src/ui/pokedex-mon-container.ts @@ -1,8 +1,8 @@ -import type { Variant } from "#app/sprites/variant"; import { globalScene } from "#app/global-scene"; -import { isNullOrUndefined } from "#app/utils/common"; -import type PokemonSpecies from "../data/pokemon-species"; -import { addTextObject, TextStyle } from "./text"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import type { Variant } from "#sprites/variant"; +import { addTextObject, TextStyle } from "#ui/text"; +import { isNullOrUndefined } from "#utils/common"; interface SpeciesDetails { shiny?: boolean; diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index aceddb6995a..ff96aa55772 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -1,54 +1,58 @@ -import type { SpeciesFormEvolution } from "#app/data/balance/pokemon-evolutions"; -import { pokemonEvolutions, pokemonPrevolutions, pokemonStarters } from "#app/data/balance/pokemon-evolutions"; -import type { Variant } from "#app/sprites/variant"; -import { getVariantTint, getVariantIcon } from "#app/sprites/variant"; -import { argbFromRgba } from "@material/material-color-utilities"; -import i18next from "i18next"; +import { globalScene } from "#app/global-scene"; import { starterColors } from "#app/global-vars/starter-colors"; -import { allAbilities } from "#app/data/data-lists"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { GrowthRate, getGrowthRateColor } from "#app/data/exp"; -import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender"; -import { allMoves } from "#app/data/data-lists"; -import { getNatureName } from "#app/data/nature"; -import type { SpeciesFormChange } from "#app/data/pokemon-forms"; -import { pokemonFormChanges } from "#app/data/pokemon-forms"; -import type { LevelMoves } from "#app/data/balance/pokemon-level-moves"; -import { pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "#app/data/balance/pokemon-level-moves"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpeciesForm, normalForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { allSpecies } from "#app/data/data-lists"; -import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; -import { starterPassiveAbilities } from "#app/data/balance/passives"; -import { PokemonType } from "#enums/pokemon-type"; -import type { StarterAttributes } from "#app/system/game-data"; -import type { DexEntry } from "#app/@types/dex-data"; -import { AbilityAttr } from "#enums/ability-attr"; -import { DexAttr } from "#enums/dex-attr"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import MessageUiHandler from "#app/ui/message-ui-handler"; -import { StatsContainer } from "#app/ui/stats-container"; -import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor, getTextStyleOptions } from "#app/ui/text"; -import { UiMode } from "#enums/ui-mode"; -import { addWindow } from "#app/ui/ui-theme"; -import { Egg } from "#app/data/egg"; import Overrides from "#app/overrides"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { Passive as PassiveAttr } from "#enums/passive"; -import MoveInfoOverlay from "#app/ui/move-info-overlay"; -import PokedexInfoOverlay from "#app/ui/pokedex-info-overlay"; -import { getEggTierForSpecies } from "#app/data/egg"; -import { Device } from "#enums/devices"; -import type { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { Button } from "#enums/buttons"; -import { EggSourceType } from "#enums/egg-source-types"; +import type { BiomeTierTod } from "#balance/biomes"; +import { BiomePoolTier, catchableSpecies } from "#balance/biomes"; +import { speciesEggMoves } from "#balance/egg-moves"; +import { starterPassiveAbilities } from "#balance/passives"; +import type { SpeciesFormEvolution } from "#balance/pokemon-evolutions"; +import { pokemonEvolutions, pokemonPrevolutions, pokemonStarters } from "#balance/pokemon-evolutions"; +import type { LevelMoves } from "#balance/pokemon-level-moves"; +import { pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "#balance/pokemon-level-moves"; import { getPassiveCandyCount, - getValueReductionCandyCounts, getSameSpeciesEggCandyCounts, -} from "#app/data/balance/starters"; + getStarterValueFriendshipCap, + getValueReductionCandyCounts, + speciesStarterCosts, +} from "#balance/starters"; +import { speciesTmMoves } from "#balance/tms"; +import { allAbilities, allMoves, allSpecies } from "#data/data-lists"; +import { Egg, getEggTierForSpecies } from "#data/egg"; +import { GrowthRate, getGrowthRateColor } from "#data/exp"; +import { Gender, getGenderColor, getGenderSymbol } from "#data/gender"; +import { getNatureName } from "#data/nature"; +import type { SpeciesFormChange } from "#data/pokemon-forms"; +import { pokemonFormChanges } from "#data/pokemon-forms"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { getPokemonSpeciesForm, normalForm } from "#data/pokemon-species"; +import { AbilityAttr } from "#enums/ability-attr"; +import type { AbilityId } from "#enums/ability-id"; +import { BiomeId } from "#enums/biome-id"; +import { Button } from "#enums/buttons"; +import { Device } from "#enums/devices"; +import { DexAttr } from "#enums/dex-attr"; +import { EggSourceType } from "#enums/egg-source-types"; +import type { MoveId } from "#enums/move-id"; +import type { Nature } from "#enums/nature"; +import { Passive as PassiveAttr } from "#enums/passive"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { TimeOfDay } from "#enums/time-of-day"; +import { UiMode } from "#enums/ui-mode"; +import type { Variant } from "#sprites/variant"; +import { getVariantIcon, getVariantTint } from "#sprites/variant"; +import type { StarterAttributes } from "#system/game-data"; +import { SettingKeyboard } from "#system/settings-keyboard"; +import type { DexEntry } from "#types/dex-data"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { BaseStatsOverlay } from "#ui/base-stats-overlay"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { MoveInfoOverlay } from "#ui/move-info-overlay"; +import { PokedexInfoOverlay } from "#ui/pokedex-info-overlay"; +import { StatsContainer } from "#ui/stats-container"; +import { addBBCodeTextObject, addTextObject, getTextColor, getTextStyleOptions, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; import { BooleanHolder, getLocalizedSpriteKey, @@ -56,17 +60,11 @@ import { padInt, rgbHexToRgba, toReadableString, -} from "#app/utils/common"; -import type { Nature } from "#enums/nature"; -import { getEnumKeys } from "#app/utils/common"; -import { speciesTmMoves } from "#app/data/balance/tms"; -import type { BiomeTierTod } from "#app/data/balance/biomes"; -import { BiomePoolTier, catchableSpecies } from "#app/data/balance/biomes"; -import { BiomeId } from "#enums/biome-id"; -import { TimeOfDay } from "#app/enums/time-of-day"; -import type { AbilityId } from "#enums/ability-id"; -import { BaseStatsOverlay } from "#app/ui/base-stats-overlay"; -import { globalScene } from "#app/global-scene"; +} from "#utils/common"; +import { getEnumValues } from "#utils/enums"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { argbFromRgba } from "@material/material-color-utilities"; +import i18next from "i18next"; import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; interface LanguageSetting { @@ -179,7 +177,7 @@ enum MenuOptions { EVOLUTIONS, } -export default class PokedexPageUiHandler extends MessageUiHandler { +export class PokedexPageUiHandler extends MessageUiHandler { private starterSelectContainer: Phaser.GameObjects.Container; private shinyOverlay: Phaser.GameObjects.Image; private pokemonNumberText: Phaser.GameObjects.Text; @@ -642,7 +640,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.menuContainer.setVisible(false); - this.menuOptions = getEnumKeys(MenuOptions).map(m => Number.parseInt(MenuOptions[m]) as MenuOptions); + this.menuOptions = getEnumValues(MenuOptions); this.optionSelectText = addBBCodeTextObject( 0, @@ -746,7 +744,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.starterAttributes = this.initStarterPrefs(); - this.menuOptions = getEnumKeys(MenuOptions).map(m => Number.parseInt(MenuOptions[m]) as MenuOptions); + this.menuOptions = getEnumValues(MenuOptions); this.menuContainer.setVisible(true); diff --git a/src/ui/pokedex-scan-ui-handler.ts b/src/ui/pokedex-scan-ui-handler.ts index 2bffc464793..bcf869f6f39 100644 --- a/src/ui/pokedex-scan-ui-handler.ts +++ b/src/ui/pokedex-scan-ui-handler.ts @@ -1,17 +1,15 @@ -import type { InputFieldConfig } from "./form-modal-ui-handler"; -import { FormModalUiHandler } from "./form-modal-ui-handler"; -import type { ModalConfig } from "./modal-ui-handler"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { OptionSelectItem } from "./abstact-option-select-ui-handler"; -import { isNullOrUndefined } from "#app/utils/common"; +import { allAbilities, allMoves, allSpecies } from "#data/data-lists"; import { UiMode } from "#enums/ui-mode"; -import { FilterTextRow } from "./filter-text"; -import { allAbilities } from "#app/data/data-lists"; -import { allMoves } from "#app/data/data-lists"; -import { allSpecies } from "#app/data/data-lists"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { FilterTextRow } from "#ui/filter-text"; +import type { InputFieldConfig } from "#ui/form-modal-ui-handler"; +import { FormModalUiHandler } from "#ui/form-modal-ui-handler"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { isNullOrUndefined } from "#utils/common"; import i18next from "i18next"; -export default class PokedexScanUiHandler extends FormModalUiHandler { +export class PokedexScanUiHandler extends FormModalUiHandler { keys: string[]; reducedKeys: string[]; parallelKeys: string[]; diff --git a/src/ui/pokedex-ui-handler.ts b/src/ui/pokedex-ui-handler.ts index 17bc6070b9d..c2f595cb190 100644 --- a/src/ui/pokedex-ui-handler.ts +++ b/src/ui/pokedex-ui-handler.ts @@ -1,53 +1,52 @@ -import type { Variant } from "#app/sprites/variant"; -import { getVariantTint, getVariantIcon } from "#app/sprites/variant"; -import { argbFromRgba } from "@material/material-color-utilities"; -import i18next from "i18next"; +import { globalScene } from "#app/global-scene"; import { starterColors } from "#app/global-vars/starter-colors"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "#app/data/balance/pokemon-level-moves"; -import type { PokemonForm } from "#app/data/pokemon-species"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpeciesForm, getPokerusStarters, normalForm } from "#app/data/pokemon-species"; -import { allSpecies } from "#app/data/data-lists"; -import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters"; -import { catchableSpecies } from "#app/data/balance/biomes"; -import { PokemonType } from "#enums/pokemon-type"; -import type { DexAttrProps, StarterAttributes } from "#app/system/game-data"; -import type { StarterPreferences } from "#app/utils/data"; -import type { DexEntry } from "#app/@types/dex-data"; -import { loadStarterPreferences } from "#app/utils/data"; -import { AbilityAttr } from "#enums/ability-attr"; -import { DexAttr } from "#enums/dex-attr"; -import MessageUiHandler from "#app/ui/message-ui-handler"; -import PokemonIconAnimHandler, { PokemonIconAnimMode } from "#app/ui/pokemon-icon-anim-handler"; -import { TextStyle, addTextObject } from "#app/ui/text"; -import { UiMode } from "#enums/ui-mode"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { Passive as PassiveAttr } from "#enums/passive"; -import type { SpeciesId } from "#enums/species-id"; -import { Button } from "#enums/buttons"; -import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown"; -import { PokedexMonContainer } from "#app/ui/pokedex-mon-container"; -import { FilterBar } from "#app/ui/filter-bar"; -import { DropDownColumn } from "#enums/drop-down-column"; -import { ScrollBar } from "#app/ui/scroll-bar"; -import { AbilityId } from "#enums/ability-id"; +import { catchableSpecies } from "#balance/biomes"; +import { speciesEggMoves } from "#balance/egg-moves"; +import { pokemonStarters } from "#balance/pokemon-evolutions"; +import { pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "#balance/pokemon-level-moves"; import { getPassiveCandyCount, - getValueReductionCandyCounts, getSameSpeciesEggCandyCounts, -} from "#app/data/balance/starters"; -import { BooleanHolder, fixedInt, getLocalizedSpriteKey, padInt, randIntRange, rgbHexToRgba } from "#app/utils/common"; -import type { Nature } from "#enums/nature"; -import { addWindow } from "./ui-theme"; -import type { OptionSelectConfig } from "./abstact-option-select-ui-handler"; -import { FilterText, FilterTextRow } from "./filter-text"; -import { allAbilities } from "#app/data/data-lists"; -import { allMoves } from "#app/data/data-lists"; -import { speciesTmMoves } from "#app/data/balance/tms"; -import { pokemonStarters } from "#app/data/balance/pokemon-evolutions"; + getStarterValueFriendshipCap, + getValueReductionCandyCounts, + POKERUS_STARTER_COUNT, + speciesStarterCosts, +} from "#balance/starters"; +import { speciesTmMoves } from "#balance/tms"; +import { allAbilities, allMoves, allSpecies } from "#data/data-lists"; +import type { PokemonForm, PokemonSpecies } from "#data/pokemon-species"; +import { getPokemonSpeciesForm, getPokerusStarters, normalForm } from "#data/pokemon-species"; +import { AbilityAttr } from "#enums/ability-attr"; +import { AbilityId } from "#enums/ability-id"; import { BiomeId } from "#enums/biome-id"; -import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { DexAttr } from "#enums/dex-attr"; +import { DropDownColumn } from "#enums/drop-down-column"; +import type { Nature } from "#enums/nature"; +import { Passive as PassiveAttr } from "#enums/passive"; +import { PokemonType } from "#enums/pokemon-type"; +import type { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import type { Variant } from "#sprites/variant"; +import { getVariantIcon, getVariantTint } from "#sprites/variant"; +import type { DexAttrProps, StarterAttributes } from "#system/game-data"; +import { SettingKeyboard } from "#system/settings-keyboard"; +import type { DexEntry } from "#types/dex-data"; +import type { OptionSelectConfig } from "#ui/abstact-option-select-ui-handler"; +import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#ui/dropdown"; +import { FilterBar } from "#ui/filter-bar"; +import { FilterText, FilterTextRow } from "#ui/filter-text"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { PokedexMonContainer } from "#ui/pokedex-mon-container"; +import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler"; +import { ScrollBar } from "#ui/scroll-bar"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { BooleanHolder, fixedInt, getLocalizedSpriteKey, padInt, randIntRange, rgbHexToRgba } from "#utils/common"; +import type { StarterPreferences } from "#utils/data"; +import { loadStarterPreferences } from "#utils/data"; +import { argbFromRgba } from "@material/material-color-utilities"; +import i18next from "i18next"; interface LanguageSetting { starterInfoTextSize: string; @@ -157,7 +156,7 @@ interface SpeciesDetails { natureIndex?: number; } -export default class PokedexUiHandler extends MessageUiHandler { +export class PokedexUiHandler extends MessageUiHandler { private starterSelectContainer: Phaser.GameObjects.Container; private starterSelectScrollBar: ScrollBar; private filterBarContainer: Phaser.GameObjects.Container; diff --git a/src/ui/pokemon-hatch-info-container.ts b/src/ui/pokemon-hatch-info-container.ts index d2da3dceab9..8bcd62316cd 100644 --- a/src/ui/pokemon-hatch-info-container.ts +++ b/src/ui/pokemon-hatch-info-container.ts @@ -1,24 +1,24 @@ -import PokemonInfoContainer from "#app/ui/pokemon-info-container"; -import { Gender } from "#app/data/gender"; -import { PokemonType } from "#enums/pokemon-type"; -import { rgbHexToRgba, padInt } from "#app/utils/common"; -import { TextStyle, addTextObject } from "#app/ui/text"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { allMoves } from "#app/data/data-lists"; -import { SpeciesId } from "#enums/species-id"; -import { getEggTierForSpecies } from "#app/data/egg"; -import { starterColors } from "#app/global-vars/starter-colors"; import { globalScene } from "#app/global-scene"; +import { starterColors } from "#app/global-vars/starter-colors"; +import { speciesEggMoves } from "#balance/egg-moves"; +import { allMoves } from "#data/data-lists"; +import { getEggTierForSpecies } from "#data/egg"; +import type { EggHatchData } from "#data/egg-hatch-data"; +import { Gender } from "#data/gender"; +import { getPokemonSpeciesForm } from "#data/pokemon-species"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import type { PlayerPokemon } from "#field/pokemon"; +import { PokemonInfoContainer } from "#ui/pokemon-info-container"; +import { addTextObject, TextStyle } from "#ui/text"; +import { padInt, rgbHexToRgba } from "#utils/common"; import { argbFromRgba } from "@material/material-color-utilities"; -import type { EggHatchData } from "#app/data/egg-hatch-data"; -import type { 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 { +export class PokemonHatchInfoContainer extends PokemonInfoContainer { private currentPokemonSprite: Phaser.GameObjects.Sprite; private pokemonNumberText: Phaser.GameObjects.Text; private pokemonNameText: Phaser.GameObjects.Text; diff --git a/src/ui/pokemon-icon-anim-handler.ts b/src/ui/pokemon-icon-anim-handler.ts index 8a206167a94..408e0ebc9d3 100644 --- a/src/ui/pokemon-icon-anim-handler.ts +++ b/src/ui/pokemon-icon-anim-handler.ts @@ -1,5 +1,5 @@ import { globalScene } from "#app/global-scene"; -import { fixedInt, coerceArray } from "#app/utils/common"; +import { coerceArray, fixedInt } from "#utils/common"; export enum PokemonIconAnimMode { NONE, @@ -9,7 +9,7 @@ export enum PokemonIconAnimMode { type PokemonIcon = Phaser.GameObjects.Container | Phaser.GameObjects.Sprite; -export default class PokemonIconAnimHandler { +export class PokemonIconAnimHandler { private icons: Map; private toggled: boolean; diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index c44eca431f2..c95f412c834 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -1,19 +1,19 @@ -import { getVariantTint } from "#app/sprites/variant"; -import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import { globalScene } from "#app/global-scene"; -import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; -import { getNatureName } from "../data/nature"; -import { PokemonType } from "#enums/pokemon-type"; -import type Pokemon from "../field/pokemon"; -import i18next from "i18next"; -import type { StarterDataEntry } from "../system/game-data"; -import type { DexEntry } from "#app/@types/dex-data"; +import { Gender, getGenderColor, getGenderSymbol } from "#data/gender"; +import { getNatureName } from "#data/nature"; import { DexAttr } from "#enums/dex-attr"; -import { fixedInt, getShinyDescriptor } from "#app/utils/common"; -import ConfirmUiHandler from "./confirm-ui-handler"; -import { StatsContainer } from "./stats-container"; -import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; -import { addWindow } from "./ui-theme"; +import { PokemonType } from "#enums/pokemon-type"; +import type { Pokemon } from "#field/pokemon"; +import { getVariantTint } from "#sprites/variant"; +import type { StarterDataEntry } from "#system/game-data"; +import type { DexEntry } from "#types/dex-data"; +import { ConfirmUiHandler } from "#ui/confirm-ui-handler"; +import { StatsContainer } from "#ui/stats-container"; +import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt, getShinyDescriptor } from "#utils/common"; +import i18next from "i18next"; +import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; interface LanguageSetting { infoContainerTextSize: string; @@ -39,7 +39,7 @@ const languageSettings: { [key: string]: LanguageSetting } = { }, }; -export default class PokemonInfoContainer extends Phaser.GameObjects.Container { +export class PokemonInfoContainer extends Phaser.GameObjects.Container { private readonly infoWindowWidth = 104; private pokemonFormLabelText: Phaser.GameObjects.Text; diff --git a/src/ui/registration-form-ui-handler.ts b/src/ui/registration-form-ui-handler.ts index a60a53a8e7a..2466603af71 100644 --- a/src/ui/registration-form-ui-handler.ts +++ b/src/ui/registration-form-ui-handler.ts @@ -1,11 +1,11 @@ -import type { InputFieldConfig } from "./form-modal-ui-handler"; -import { FormModalUiHandler } from "./form-modal-ui-handler"; -import type { ModalConfig } from "./modal-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { TextStyle, addTextObject } from "./text"; -import i18next from "i18next"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; +import { pokerogueApi } from "#api/pokerogue-api"; import { globalScene } from "#app/global-scene"; +import { UiMode } from "#enums/ui-mode"; +import type { InputFieldConfig } from "#ui/form-modal-ui-handler"; +import { FormModalUiHandler } from "#ui/form-modal-ui-handler"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import i18next from "i18next"; interface LanguageSetting { inputFieldFontSize?: string; @@ -20,7 +20,7 @@ const languageSettings: { [key: string]: LanguageSetting } = { }, }; -export default class RegistrationFormUiHandler extends FormModalUiHandler { +export class RegistrationFormUiHandler extends FormModalUiHandler { getModalTitle(_config?: ModalConfig): string { return i18next.t("menu:register"); } diff --git a/src/ui/rename-form-ui-handler.ts b/src/ui/rename-form-ui-handler.ts index 7083f83865b..9da5b0e8554 100644 --- a/src/ui/rename-form-ui-handler.ts +++ b/src/ui/rename-form-ui-handler.ts @@ -1,10 +1,10 @@ -import type { InputFieldConfig } from "./form-modal-ui-handler"; -import { FormModalUiHandler } from "./form-modal-ui-handler"; -import type { ModalConfig } from "./modal-ui-handler"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { InputFieldConfig } from "#ui/form-modal-ui-handler"; +import { FormModalUiHandler } from "#ui/form-modal-ui-handler"; +import type { ModalConfig } from "#ui/modal-ui-handler"; import i18next from "i18next"; -import type { PlayerPokemon } from "#app/field/pokemon"; -export default class RenameFormUiHandler extends FormModalUiHandler { +export class RenameFormUiHandler extends FormModalUiHandler { getModalTitle(_config?: ModalConfig): string { return i18next.t("menu:renamePokemon"); } diff --git a/src/ui/run-history-ui-handler.ts b/src/ui/run-history-ui-handler.ts index 06ef590c1e8..f810468aea1 100644 --- a/src/ui/run-history-ui-handler.ts +++ b/src/ui/run-history-ui-handler.ts @@ -1,18 +1,18 @@ import { globalScene } from "#app/global-scene"; -import { GameModes } from "#enums/game-modes"; -import { TextStyle, addTextObject } from "./text"; -import { UiMode } from "#enums/ui-mode"; -import { addWindow } from "./ui-theme"; -import { fixedInt, formatLargeNumber } from "#app/utils/common"; -import type PokemonData from "../system/pokemon-data"; -import MessageUiHandler from "./message-ui-handler"; -import i18next from "i18next"; -import { Button } from "../enums/buttons"; import { BattleType } from "#enums/battle-type"; -import type { RunEntry } from "../system/game-data"; +import { Button } from "#enums/buttons"; +import { GameModes } from "#enums/game-modes"; import { PlayerGender } from "#enums/player-gender"; import { TrainerVariant } from "#enums/trainer-variant"; -import { RunDisplayMode } from "#app/ui/run-info-ui-handler"; +import { UiMode } from "#enums/ui-mode"; +import type { RunEntry } from "#system/game-data"; +import type { PokemonData } from "#system/pokemon-data"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { RunDisplayMode } from "#ui/run-info-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt, formatLargeNumber } from "#utils/common"; +import i18next from "i18next"; export type RunSelectCallback = (cursor: number) => void; @@ -24,7 +24,7 @@ export const RUN_HISTORY_LIMIT: number = 25; * It navigates similarly to the UI of the save slot select menu. * The only valid input buttons are Button.ACTION and Button.CANCEL. */ -export default class RunHistoryUiHandler extends MessageUiHandler { +export class RunHistoryUiHandler extends MessageUiHandler { private readonly maxRows = 3; private runSelectContainer: Phaser.GameObjects.Container; diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index f281947c7df..29f95c4e4c8 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -1,32 +1,32 @@ -import { GameModes } from "#enums/game-modes"; -import UiHandler from "./ui-handler"; -import type { SessionSaveData } from "../system/game-data"; -import { TextStyle, addTextObject, addBBCodeTextObject, getTextColor } from "./text"; -import { UiMode } from "#enums/ui-mode"; -import { addWindow } from "./ui-theme"; -import { getPokeballAtlasKey } from "#app/data/pokeball"; -import { formatLargeNumber, getPlayTimeString, formatMoney, formatFancyLargeNumber } from "#app/utils/common"; -import type PokemonData from "../system/pokemon-data"; -import i18next from "i18next"; -import { Button } from "../enums/buttons"; -import { BattleType } from "#enums/battle-type"; -import { TrainerVariant } from "#enums/trainer-variant"; -import { Challenges } from "#enums/challenges"; -import { getLuckString, getLuckTextTint } from "../modifier/modifier-type"; -import RoundRectangle from "phaser3-rex-plugins/plugins/roundrectangle"; -import { getTypeRgb } from "#app/data/type"; -import { PokemonType } from "#enums/pokemon-type"; -import { TypeColor, TypeShadow } from "#app/enums/color"; -import { getNatureStatMultiplier, getNatureName } from "../data/nature"; -import { getVariantTint } from "#app/sprites/variant"; -// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts` -import * as Modifier from "#app/modifier/modifier"; -import type { SpeciesId } from "#enums/species-id"; -import { PlayerGender } from "#enums/player-gender"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { getBiomeName } from "#app/data/balance/biomes"; -import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { globalScene } from "#app/global-scene"; +import { getBiomeName } from "#balance/biomes"; +import { getNatureName, getNatureStatMultiplier } from "#data/nature"; +import { getPokeballAtlasKey } from "#data/pokeball"; +import { getTypeRgb } from "#data/type"; +import { BattleType } from "#enums/battle-type"; +import { Button } from "#enums/buttons"; +import { Challenges } from "#enums/challenges"; +import { TypeColor, TypeShadow } from "#enums/color"; +import { GameModes } from "#enums/game-modes"; +import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PlayerGender } from "#enums/player-gender"; +import { PokemonType } from "#enums/pokemon-type"; +import type { SpeciesId } from "#enums/species-id"; +import { TrainerVariant } from "#enums/trainer-variant"; +import { UiMode } from "#enums/ui-mode"; +// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts` +import * as Modifier from "#modifiers/modifier"; +import { getLuckString, getLuckTextTint } from "#modifiers/modifier-type"; +import { getVariantTint } from "#sprites/variant"; +import type { SessionSaveData } from "#system/game-data"; +import type { PokemonData } from "#system/pokemon-data"; +import { SettingKeyboard } from "#system/settings-keyboard"; +import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; +import { formatFancyLargeNumber, formatLargeNumber, formatMoney, getPlayTimeString } from "#utils/common"; +import i18next from "i18next"; +import RoundRectangle from "phaser3-rex-plugins/plugins/roundrectangle"; /** * RunInfoUiMode indicates possible overlays of RunInfoUiHandler. @@ -50,7 +50,7 @@ export enum RunDisplayMode { * I believe that it is possible that the contents/methods of the first page will be placed in their own class that is an extension of RunInfoUiHandler as more pages are added. * For now, I leave as is. */ -export default class RunInfoUiHandler extends UiHandler { +export class RunInfoUiHandler extends UiHandler { protected runDisplayMode: RunDisplayMode; protected runInfo: SessionSaveData; protected isVictory: boolean; diff --git a/src/ui/save-slot-select-ui-handler.ts b/src/ui/save-slot-select-ui-handler.ts index 7dee041fa63..bcbe60265cd 100644 --- a/src/ui/save-slot-select-ui-handler.ts +++ b/src/ui/save-slot-select-ui-handler.ts @@ -1,17 +1,17 @@ -import i18next from "i18next"; +import { GameMode } from "#app/game-mode"; import { globalScene } from "#app/global-scene"; import { Button } from "#enums/buttons"; -import { GameMode } from "../game-mode"; -// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts` -import * as Modifier from "#app/modifier/modifier"; -import type { SessionSaveData } from "../system/game-data"; -import type PokemonData from "../system/pokemon-data"; -import { isNullOrUndefined, fixedInt, getPlayTimeString, formatLargeNumber } from "#app/utils/common"; -import MessageUiHandler from "./message-ui-handler"; -import { TextStyle, addTextObject } from "./text"; import { UiMode } from "#enums/ui-mode"; -import { addWindow } from "./ui-theme"; -import { RunDisplayMode } from "#app/ui/run-info-ui-handler"; +// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts` +import * as Modifier from "#modifiers/modifier"; +import type { SessionSaveData } from "#system/game-data"; +import type { PokemonData } from "#system/pokemon-data"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { RunDisplayMode } from "#ui/run-info-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import { fixedInt, formatLargeNumber, getPlayTimeString, isNullOrUndefined } from "#utils/common"; +import i18next from "i18next"; const SESSION_SLOTS_COUNT = 5; const SLOTS_ON_SCREEN = 3; @@ -23,7 +23,7 @@ export enum SaveSlotUiMode { export type SaveSlotSelectCallback = (cursor: number) => void; -export default class SaveSlotSelectUiHandler extends MessageUiHandler { +export class SaveSlotSelectUiHandler extends MessageUiHandler { private saveSlotSelectContainer: Phaser.GameObjects.Container; private sessionSlotsContainer: Phaser.GameObjects.Container; private saveSlotSelectMessageBox: Phaser.GameObjects.NineSlice; diff --git a/src/ui/saving-icon-handler.ts b/src/ui/saving-icon-handler.ts index 3b7db549a4a..6923017218f 100644 --- a/src/ui/saving-icon-handler.ts +++ b/src/ui/saving-icon-handler.ts @@ -1,7 +1,7 @@ import { globalScene } from "#app/global-scene"; -import { fixedInt } from "#app/utils/common"; +import { fixedInt } from "#utils/common"; -export default class SavingIconHandler extends Phaser.GameObjects.Container { +export class SavingIconHandler extends Phaser.GameObjects.Container { private icon: Phaser.GameObjects.Sprite; private animActive: boolean; diff --git a/src/ui/scrollable-grid-handler.ts b/src/ui/scrollable-grid-handler.ts index 54f07d69fb7..3c6458f5083 100644 --- a/src/ui/scrollable-grid-handler.ts +++ b/src/ui/scrollable-grid-handler.ts @@ -1,6 +1,6 @@ import { Button } from "#enums/buttons"; -import type UiHandler from "#app/ui/ui-handler"; -import type { ScrollBar } from "#app/ui/scroll-bar"; +import type { ScrollBar } from "#ui/scroll-bar"; +import type { UiHandler } from "#ui/ui-handler"; type UpdateGridCallbackFunction = () => void; type UpdateDetailsCallbackFunction = (index: number) => void; @@ -16,7 +16,7 @@ type UpdateDetailsCallbackFunction = (index: number) => void; * - in `UiHandler.processInput`: call `processNavigationInput` to have it handle the cursor updates while calling the defined callbacks * - in `UiHandler.clear`: call `reset` */ -export default class ScrollableGridUiHandler { +export class ScrollableGridUiHandler { private readonly ROWS: number; private readonly COLUMNS: number; private handler: UiHandler; diff --git a/src/ui/session-reload-modal-ui-handler.ts b/src/ui/session-reload-modal-ui-handler.ts index f866783afe8..ab1197324a6 100644 --- a/src/ui/session-reload-modal-ui-handler.ts +++ b/src/ui/session-reload-modal-ui-handler.ts @@ -1,9 +1,9 @@ -import type { ModalConfig } from "./modal-ui-handler"; -import { ModalUiHandler } from "./modal-ui-handler"; -import { addTextObject, TextStyle } from "./text"; import type { UiMode } from "#enums/ui-mode"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { ModalUiHandler } from "#ui/modal-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; -export default class SessionReloadModalUiHandler extends ModalUiHandler { +export class SessionReloadModalUiHandler extends ModalUiHandler { constructor(mode: UiMode | null = null) { super(mode); } diff --git a/src/ui/settings/abstract-binding-ui-handler.ts b/src/ui/settings/abstract-binding-ui-handler.ts index a4707418b7c..aaf3572b489 100644 --- a/src/ui/settings/abstract-binding-ui-handler.ts +++ b/src/ui/settings/abstract-binding-ui-handler.ts @@ -1,18 +1,18 @@ -import UiHandler from "../ui-handler"; -import type { UiMode } from "#enums/ui-mode"; -import { addWindow } from "../ui-theme"; -import { addTextObject, TextStyle } from "../text"; -import { Button } from "#enums/buttons"; -import { NavigationManager } from "#app/ui/settings/navigationMenu"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import type { UiMode } from "#enums/ui-mode"; +import { NavigationManager } from "#ui/navigationMenu"; +import { addTextObject, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; +import i18next from "i18next"; type CancelFn = (succes?: boolean) => boolean; /** * Abstract class for handling UI elements related to button bindings. */ -export default abstract class AbstractBindingUiHandler extends UiHandler { +export abstract class AbstractBindingUiHandler extends UiHandler { // Containers for different segments of the UI. protected optionSelectContainer: Phaser.GameObjects.Container; protected actionsContainer: Phaser.GameObjects.Container; diff --git a/src/ui/settings/abstract-control-settings-ui-handler.ts b/src/ui/settings/abstract-control-settings-ui-handler.ts index 769de7993ce..67cc3ad7c03 100644 --- a/src/ui/settings/abstract-control-settings-ui-handler.ts +++ b/src/ui/settings/abstract-control-settings-ui-handler.ts @@ -1,15 +1,15 @@ -import UiHandler from "#app/ui/ui-handler"; -import type { UiMode } from "#enums/ui-mode"; -import type { InterfaceConfig } from "#app/inputs-controller"; -import { addWindow } from "#app/ui/ui-theme"; -import { addTextObject, TextStyle } from "#app/ui/text"; -import { ScrollBar } from "#app/ui/scroll-bar"; -import { getIconWithSettingName } from "#app/configs/inputs/configHandler"; -import NavigationMenu, { NavigationManager } from "#app/ui/settings/navigationMenu"; -import type { Device } from "#enums/devices"; -import { Button } from "#enums/buttons"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; +import type { InterfaceConfig } from "#app/inputs-controller"; +import { Button } from "#enums/buttons"; +import type { Device } from "#enums/devices"; +import type { UiMode } from "#enums/ui-mode"; +import { getIconWithSettingName } from "#inputs/configHandler"; +import { NavigationManager, NavigationMenu } from "#ui/navigationMenu"; +import { ScrollBar } from "#ui/scroll-bar"; +import { addTextObject, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; +import i18next from "i18next"; export interface InputsIcons { [key: string]: Phaser.GameObjects.Sprite; @@ -27,7 +27,7 @@ export interface LayoutConfig { /** * Abstract class for handling UI elements related to control settings. */ -export default abstract class AbstractControlSettingsUiHandler extends UiHandler { +export abstract class AbstractControlSettingsUiHandler extends UiHandler { protected settingsContainer: Phaser.GameObjects.Container; protected optionsContainer: Phaser.GameObjects.Container; protected navigationContainer: NavigationMenu; diff --git a/src/ui/settings/abstract-settings-ui-handler.ts b/src/ui/settings/abstract-settings-ui-handler.ts index 6db9840a818..303ad229ea6 100644 --- a/src/ui/settings/abstract-settings-ui-handler.ts +++ b/src/ui/settings/abstract-settings-ui-handler.ts @@ -1,20 +1,20 @@ -import { TextStyle, addTextObject } from "#app/ui/text"; -import { UiMode } from "#enums/ui-mode"; -import MessageUiHandler from "#app/ui/message-ui-handler"; -import { addWindow } from "#app/ui/ui-theme"; -import { ScrollBar } from "#app/ui/scroll-bar"; -import { Button } from "#enums/buttons"; -import type { InputsIcons } from "#app/ui/settings/abstract-control-settings-ui-handler"; -import NavigationMenu, { NavigationManager } from "#app/ui/settings/navigationMenu"; -import type { SettingType } from "#app/system/settings/settings"; -import { Setting, SettingKeys } from "#app/system/settings/settings"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; +import { Button } from "#enums/buttons"; +import { UiMode } from "#enums/ui-mode"; +import type { SettingType } from "#system/settings"; +import { Setting, SettingKeys } from "#system/settings"; +import type { InputsIcons } from "#ui/abstract-control-settings-ui-handler"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { NavigationManager, NavigationMenu } from "#ui/navigationMenu"; +import { ScrollBar } from "#ui/scroll-bar"; +import { addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; +import i18next from "i18next"; /** * Abstract class for handling UI elements related to settings. */ -export default class AbstractSettingsUiHandler extends MessageUiHandler { +export class AbstractSettingsUiHandler extends MessageUiHandler { private settingsContainer: Phaser.GameObjects.Container; private optionsContainer: Phaser.GameObjects.Container; private messageBoxContainer: Phaser.GameObjects.Container; diff --git a/src/ui/settings/gamepad-binding-ui-handler.ts b/src/ui/settings/gamepad-binding-ui-handler.ts index 9ddb54131d5..c514e93ec51 100644 --- a/src/ui/settings/gamepad-binding-ui-handler.ts +++ b/src/ui/settings/gamepad-binding-ui-handler.ts @@ -1,12 +1,12 @@ -import AbstractBindingUiHandler from "./abstract-binding-ui-handler"; -import type { UiMode } from "#enums/ui-mode"; -import { Device } from "#enums/devices"; -import { getIconWithSettingName, getKeyWithKeycode } from "#app/configs/inputs/configHandler"; -import { addTextObject, TextStyle } from "#app/ui/text"; import { globalScene } from "#app/global-scene"; +import { Device } from "#enums/devices"; +import type { UiMode } from "#enums/ui-mode"; +import { getIconWithSettingName, getKeyWithKeycode } from "#inputs/configHandler"; +import { AbstractBindingUiHandler } from "#ui/abstract-binding-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; import i18next from "i18next"; -export default class GamepadBindingUiHandler extends AbstractBindingUiHandler { +export class GamepadBindingUiHandler extends AbstractBindingUiHandler { constructor(mode: UiMode | null = null) { super(mode); globalScene.input.gamepad?.on("down", this.gamepadButtonDown, this); diff --git a/src/ui/settings/keyboard-binding-ui-handler.ts b/src/ui/settings/keyboard-binding-ui-handler.ts index 183b8269e78..a789225a8ef 100644 --- a/src/ui/settings/keyboard-binding-ui-handler.ts +++ b/src/ui/settings/keyboard-binding-ui-handler.ts @@ -1,12 +1,12 @@ -import AbstractBindingUiHandler from "./abstract-binding-ui-handler"; -import type { UiMode } from "#enums/ui-mode"; -import { getKeyWithKeycode } from "#app/configs/inputs/configHandler"; -import { Device } from "#enums/devices"; -import { addTextObject, TextStyle } from "#app/ui/text"; import { globalScene } from "#app/global-scene"; +import { Device } from "#enums/devices"; +import type { UiMode } from "#enums/ui-mode"; +import { getKeyWithKeycode } from "#inputs/configHandler"; +import { AbstractBindingUiHandler } from "#ui/abstract-binding-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; import i18next from "i18next"; -export default class KeyboardBindingUiHandler extends AbstractBindingUiHandler { +export class KeyboardBindingUiHandler extends AbstractBindingUiHandler { constructor(mode: UiMode | null = null) { super(mode); // Listen to gamepad button down events to initiate binding. diff --git a/src/ui/settings/move-touch-controls-handler.ts b/src/ui/settings/move-touch-controls-handler.ts index f684d27f748..60572529c89 100644 --- a/src/ui/settings/move-touch-controls-handler.ts +++ b/src/ui/settings/move-touch-controls-handler.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import type TouchControl from "#app/touch-controls"; -import type UI from "#app/ui/ui"; +import type { TouchControl } from "#app/touch-controls"; +import type { UI } from "#ui/ui"; import i18next from "i18next"; export const TOUCH_CONTROL_POSITIONS_LANDSCAPE = "touchControlPositionsLandscape"; @@ -24,7 +24,7 @@ type ToolbarRefs = { /** * Handles the dragging of touch controls around the screen. */ -export default class MoveTouchControlsHandler { +export class MoveTouchControlsHandler { /** The element that is currently being dragged */ private draggingElement: HTMLElement | null = null; diff --git a/src/ui/settings/navigationMenu.ts b/src/ui/settings/navigationMenu.ts index 73df7e32240..1303c32d3a5 100644 --- a/src/ui/settings/navigationMenu.ts +++ b/src/ui/settings/navigationMenu.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import { UiMode } from "#enums/ui-mode"; -import type { 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"; +import { UiMode } from "#enums/ui-mode"; +import type { InputsIcons } from "#ui/abstract-control-settings-ui-handler"; +import { addTextObject, setTextStyle, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; import i18next from "i18next"; const LEFT = "LEFT"; @@ -103,7 +103,7 @@ export class NavigationManager { } } -export default class NavigationMenu extends Phaser.GameObjects.Container { +export class NavigationMenu extends Phaser.GameObjects.Container { private navigationIcons: InputsIcons; protected headerTitles: Phaser.GameObjects.Text[] = []; diff --git a/src/ui/settings/option-select-ui-handler.ts b/src/ui/settings/option-select-ui-handler.ts index af9760814ac..d7b699e6e50 100644 --- a/src/ui/settings/option-select-ui-handler.ts +++ b/src/ui/settings/option-select-ui-handler.ts @@ -1,7 +1,7 @@ -import AbstractOptionSelectUiHandler from "../abstact-option-select-ui-handler"; import { UiMode } from "#enums/ui-mode"; +import { AbstractOptionSelectUiHandler } from "#ui/abstact-option-select-ui-handler"; -export default class OptionSelectUiHandler extends AbstractOptionSelectUiHandler { +export class OptionSelectUiHandler extends AbstractOptionSelectUiHandler { constructor(mode: UiMode = UiMode.OPTION_SELECT) { super(mode); } diff --git a/src/ui/settings/settings-audio-ui-handler.ts b/src/ui/settings/settings-audio-ui-handler.ts index 019d66d7428..aa55f5489cc 100644 --- a/src/ui/settings/settings-audio-ui-handler.ts +++ b/src/ui/settings/settings-audio-ui-handler.ts @@ -1,9 +1,8 @@ import type { UiMode } from "#enums/ui-mode"; -import AbstractSettingsUiHandler from "./abstract-settings-ui-handler"; -import { SettingType } from "#app/system/settings/settings"; -("#app/inputs-controller"); +import { SettingType } from "#system/settings"; +import { AbstractSettingsUiHandler } from "#ui/abstract-settings-ui-handler"; -export default class SettingsAudioUiHandler extends AbstractSettingsUiHandler { +export class SettingsAudioUiHandler extends AbstractSettingsUiHandler { /** * Creates an instance of SettingsAudioUiHandler. * diff --git a/src/ui/settings/settings-display-ui-handler.ts b/src/ui/settings/settings-display-ui-handler.ts index 0c62646ebf4..1f8852e43bd 100644 --- a/src/ui/settings/settings-display-ui-handler.ts +++ b/src/ui/settings/settings-display-ui-handler.ts @@ -1,9 +1,8 @@ import type { UiMode } from "#enums/ui-mode"; -import AbstractSettingsUiHandler from "./abstract-settings-ui-handler"; -import { SettingKeys, SettingType } from "#app/system/settings/settings"; -("#app/inputs-controller"); +import { SettingKeys, SettingType } from "#system/settings"; +import { AbstractSettingsUiHandler } from "#ui/abstract-settings-ui-handler"; -export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler { +export class SettingsDisplayUiHandler extends AbstractSettingsUiHandler { /** * Creates an instance of SettingsGamepadUiHandler. * diff --git a/src/ui/settings/settings-gamepad-ui-handler.ts b/src/ui/settings/settings-gamepad-ui-handler.ts index 7d269deab14..63dd4c74618 100644 --- a/src/ui/settings/settings-gamepad-ui-handler.ts +++ b/src/ui/settings/settings-gamepad-ui-handler.ts @@ -1,21 +1,21 @@ -import { addTextObject, TextStyle } from "../text"; +import { globalScene } from "#app/global-scene"; +import type { InterfaceConfig } from "#app/inputs-controller"; +import { Device } from "#enums/devices"; import type { UiMode } from "#enums/ui-mode"; +import pad_dualshock from "#inputs/pad_dualshock"; +import pad_unlicensedSNES from "#inputs/pad_unlicensedSNES"; +import pad_xbox360 from "#inputs/pad_xbox360"; import { - setSettingGamepad, SettingGamepad, + setSettingGamepad, settingGamepadBlackList, settingGamepadDefaults, settingGamepadOptions, -} from "../../system/settings/settings-gamepad"; -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 type { InterfaceConfig } from "#app/inputs-controller"; -import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler"; -import { Device } from "#enums/devices"; -import { truncateString } from "#app/utils/common"; +} from "#system/settings-gamepad"; +import { AbstractControlSettingsUiHandler } from "#ui/abstract-control-settings-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { truncateString } from "#utils/common"; import i18next from "i18next"; -import { globalScene } from "#app/global-scene"; /** * Class representing the settings UI handler for gamepads. @@ -23,7 +23,7 @@ import { globalScene } from "#app/global-scene"; * @extends AbstractControlSettingsUiHandler */ -export default class SettingsGamepadUiHandler extends AbstractControlSettingsUiHandler { +export class SettingsGamepadUiHandler extends AbstractControlSettingsUiHandler { /** * Creates an instance of SettingsGamepadUiHandler. * diff --git a/src/ui/settings/settings-keyboard-ui-handler.ts b/src/ui/settings/settings-keyboard-ui-handler.ts index c334ee8f1fc..581e3e938be 100644 --- a/src/ui/settings/settings-keyboard-ui-handler.ts +++ b/src/ui/settings/settings-keyboard-ui-handler.ts @@ -1,28 +1,28 @@ +import { globalScene } from "#app/global-scene"; +import type { InterfaceConfig } from "#app/inputs-controller"; +import { Device } from "#enums/devices"; import { UiMode } from "#enums/ui-mode"; -import cfg_keyboard_qwerty from "#app/configs/inputs/cfg_keyboard_qwerty"; +import cfg_keyboard_qwerty from "#inputs/cfg_keyboard_qwerty"; +import { deleteBind } from "#inputs/configHandler"; import { - setSettingKeyboard, SettingKeyboard, + setSettingKeyboard, settingKeyboardBlackList, settingKeyboardDefaults, settingKeyboardOptions, -} from "#app/system/settings/settings-keyboard"; -import { reverseValueToKeySetting, truncateString } from "#app/utils/common"; -import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler"; -import type { InterfaceConfig } from "#app/inputs-controller"; -import { addTextObject, TextStyle } from "#app/ui/text"; -import { deleteBind } from "#app/configs/inputs/configHandler"; -import { Device } from "#enums/devices"; -import { NavigationManager } from "#app/ui/settings/navigationMenu"; +} from "#system/settings-keyboard"; +import { AbstractControlSettingsUiHandler } from "#ui/abstract-control-settings-ui-handler"; +import { NavigationManager } from "#ui/navigationMenu"; +import { addTextObject, TextStyle } from "#ui/text"; +import { reverseValueToKeySetting, truncateString } from "#utils/common"; import i18next from "i18next"; -import { globalScene } from "#app/global-scene"; /** * Class representing the settings UI handler for keyboards. * * @extends AbstractControlSettingsUiHandler */ -export default class SettingsKeyboardUiHandler extends AbstractControlSettingsUiHandler { +export class SettingsKeyboardUiHandler extends AbstractControlSettingsUiHandler { /** * Creates an instance of SettingsKeyboardUiHandler. * diff --git a/src/ui/settings/settings-ui-handler.ts b/src/ui/settings/settings-ui-handler.ts index 8d61044ff91..9461e987864 100644 --- a/src/ui/settings/settings-ui-handler.ts +++ b/src/ui/settings/settings-ui-handler.ts @@ -1,8 +1,8 @@ -import { SettingType } from "../../system/settings/settings"; import type { UiMode } from "#enums/ui-mode"; -import AbstractSettingsUiHandler from "./abstract-settings-ui-handler"; +import { SettingType } from "#system/settings"; +import { AbstractSettingsUiHandler } from "#ui/abstract-settings-ui-handler"; -export default class SettingsUiHandler extends AbstractSettingsUiHandler { +export class SettingsUiHandler extends AbstractSettingsUiHandler { /** * Creates an instance of SettingsGamepadUiHandler. * diff --git a/src/ui/starter-container.ts b/src/ui/starter-container.ts index 71e40844f38..4c174dc5955 100644 --- a/src/ui/starter-container.ts +++ b/src/ui/starter-container.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; -import type PokemonSpecies from "../data/pokemon-species"; -import { addTextObject, TextStyle } from "./text"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { addTextObject, TextStyle } from "#ui/text"; export class StarterContainer extends Phaser.GameObjects.Container { public species: PokemonSpecies; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index a39250d644c..4c0715cfa69 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1,67 +1,64 @@ -import type { CandyUpgradeNotificationChangedEvent } from "#app/events/battle-scene"; -import { BattleSceneEventType } from "#app/events/battle-scene"; -import { pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; -import type { Variant } from "#app/sprites/variant"; -import { getVariantTint, getVariantIcon } from "#app/sprites/variant"; -import { argbFromRgba } from "@material/material-color-utilities"; -import i18next from "i18next"; -import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import { starterColors } from "#app/global-vars/starter-colors"; +import type { Ability } from "#abilities/ability"; +import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; import { globalScene } from "#app/global-scene"; -import type { Ability } from "#app/data/abilities/ability"; -import { allAbilities } from "#app/data/data-lists"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { GrowthRate, getGrowthRateColor } from "#app/data/exp"; -import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender"; -import { allMoves } from "#app/data/data-lists"; -import { getNatureName } from "#app/data/nature"; -import { pokemonFormChanges } from "#app/data/pokemon-forms"; -import type { LevelMoves } from "#app/data/balance/pokemon-level-moves"; -import { pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "#app/data/balance/pokemon-level-moves"; -import type PokemonSpecies from "#app/data/pokemon-species"; -import { getPokemonSpeciesForm, getPokerusStarters } from "#app/data/pokemon-species"; -import { allSpecies } from "#app/data/data-lists"; -import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters"; -import { PokemonType } from "#enums/pokemon-type"; -import { GameModes } from "#enums/game-modes"; -import type { DexAttrProps, StarterMoveset, StarterAttributes } from "#app/system/game-data"; -import type { StarterPreferences } from "#app/utils/data"; -import type { DexEntry } from "#app/@types/dex-data"; -import { loadStarterPreferences, saveStarterPreferences } from "#app/utils/data"; -import { AbilityAttr } from "#enums/ability-attr"; -import { DexAttr } from "#enums/dex-attr"; -import { Tutorial, handleTutorial } from "#app/tutorial"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import MessageUiHandler from "#app/ui/message-ui-handler"; -import PokemonIconAnimHandler, { PokemonIconAnimMode } from "#app/ui/pokemon-icon-anim-handler"; -import { StatsContainer } from "#app/ui/stats-container"; -import { TextStyle, addBBCodeTextObject, addTextObject } from "#app/ui/text"; -import { UiMode } from "#enums/ui-mode"; -import { addWindow } from "#app/ui/ui-theme"; -import { Egg } from "#app/data/egg"; +import { starterColors } from "#app/global-vars/starter-colors"; import Overrides from "#app/overrides"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { Passive as PassiveAttr } from "#enums/passive"; -import { applyChallenges } from "#app/data/challenge"; -import { ChallengeType } from "#enums/challenge-type"; -import MoveInfoOverlay from "#app/ui/move-info-overlay"; -import { getEggTierForSpecies } from "#app/data/egg"; -import { Device } from "#enums/devices"; -import type { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { Button } from "#enums/buttons"; -import { EggSourceType } from "#enums/egg-source-types"; -import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown"; -import { StarterContainer } from "#app/ui/starter-container"; -import { FilterBar } from "#app/ui/filter-bar"; -import { DropDownColumn } from "#enums/drop-down-column"; -import { ScrollBar } from "#app/ui/scroll-bar"; -import { AbilityId } from "#enums/ability-id"; +import { handleTutorial, Tutorial } from "#app/tutorial"; +import { speciesEggMoves } from "#balance/egg-moves"; +import { pokemonPrevolutions } from "#balance/pokemon-evolutions"; +import type { LevelMoves } from "#balance/pokemon-level-moves"; +import { pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "#balance/pokemon-level-moves"; import { getPassiveCandyCount, - getValueReductionCandyCounts, getSameSpeciesEggCandyCounts, -} from "#app/data/balance/starters"; + getStarterValueFriendshipCap, + getValueReductionCandyCounts, + POKERUS_STARTER_COUNT, + speciesStarterCosts, +} from "#balance/starters"; +import { applyChallenges, checkStarterValidForChallenge } from "#data/challenge"; +import { allAbilities, allMoves, allSpecies } from "#data/data-lists"; +import { Egg, getEggTierForSpecies } from "#data/egg"; +import { GrowthRate, getGrowthRateColor } from "#data/exp"; +import { Gender, getGenderColor, getGenderSymbol } from "#data/gender"; +import { getNatureName } from "#data/nature"; +import { pokemonFormChanges } from "#data/pokemon-forms"; +import type { PokemonSpecies } from "#data/pokemon-species"; +import { getPokemonSpeciesForm, getPokerusStarters } from "#data/pokemon-species"; +import { AbilityAttr } from "#enums/ability-attr"; +import { AbilityId } from "#enums/ability-id"; +import { Button } from "#enums/buttons"; +import { ChallengeType } from "#enums/challenge-type"; +import { Device } from "#enums/devices"; +import { DexAttr } from "#enums/dex-attr"; +import { DropDownColumn } from "#enums/drop-down-column"; +import { EggSourceType } from "#enums/egg-source-types"; +import { GameModes } from "#enums/game-modes"; +import type { MoveId } from "#enums/move-id"; +import type { Nature } from "#enums/nature"; +import { Passive as PassiveAttr } from "#enums/passive"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import type { CandyUpgradeNotificationChangedEvent } from "#events/battle-scene"; +import { BattleSceneEventType } from "#events/battle-scene"; +import type { Variant } from "#sprites/variant"; +import { getVariantIcon, getVariantTint } from "#sprites/variant"; +import { achvs } from "#system/achv"; +import type { DexAttrProps, StarterAttributes, StarterMoveset } from "#system/game-data"; +import { SettingKeyboard } from "#system/settings-keyboard"; +import type { DexEntry } from "#types/dex-data"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#ui/dropdown"; +import { FilterBar } from "#ui/filter-bar"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { MoveInfoOverlay } from "#ui/move-info-overlay"; +import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler"; +import { ScrollBar } from "#ui/scroll-bar"; +import { StarterContainer } from "#ui/starter-container"; +import { StatsContainer } from "#ui/stats-container"; +import { addBBCodeTextObject, addTextObject, TextStyle } from "#ui/text"; +import { addWindow } from "#ui/ui-theme"; import { BooleanHolder, fixedInt, @@ -72,12 +69,13 @@ import { randIntRange, rgbHexToRgba, toReadableString, -} from "#app/utils/common"; -import type { Nature } from "#enums/nature"; -import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; -import { achvs } from "#app/system/achv"; +} from "#utils/common"; +import type { StarterPreferences } from "#utils/data"; +import { loadStarterPreferences, saveStarterPreferences } from "#utils/data"; +import { argbFromRgba } from "@material/material-color-utilities"; +import i18next from "i18next"; import type { GameObjects } from "phaser"; -import { checkStarterValidForChallenge } from "#app/data/challenge"; +import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; export type StarterSelectCallback = (starters: Starter[]) => void; @@ -269,7 +267,7 @@ interface SpeciesDetails { teraType?: PokemonType; } -export default class StarterSelectUiHandler extends MessageUiHandler { +export class StarterSelectUiHandler extends MessageUiHandler { private starterSelectContainer: Phaser.GameObjects.Container; private starterSelectScrollBar: ScrollBar; private filterBarContainer: Phaser.GameObjects.Container; diff --git a/src/ui/stats-container.ts b/src/ui/stats-container.ts index c2e5f202b43..6b89e80b80a 100644 --- a/src/ui/stats-container.ts +++ b/src/ui/stats-container.ts @@ -1,8 +1,8 @@ -import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; -import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; -import { PERMANENT_STATS, getStatKey } from "#app/enums/stat"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; +import { getStatKey, PERMANENT_STATS } from "#enums/stat"; +import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text"; +import i18next from "i18next"; +import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; const ivChartSize = 24; const ivChartStatCoordMultipliers = [ @@ -147,7 +147,7 @@ export class StatsContainer extends Phaser.GameObjects.Container { duration: 1000, ease: "Cubic.easeOut", onUpdate: (tween: Phaser.Tweens.Tween) => { - const progress = tween.getValue(); + const progress = tween.getValue() ?? 1; const interpolatedData = ivChartData.map( (v: number, i: number) => v * progress + lastIvChartData[i] * (1 - progress), ); diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index d4a0a9934ce..da0a7f9a40f 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -1,45 +1,44 @@ -import { starterColors } from "#app/global-vars/starter-colors"; -import { globalScene } from "#app/global-scene"; -import { UiMode } from "#enums/ui-mode"; -import UiHandler from "#app/ui/ui-handler"; -import { - getLocalizedSpriteKey, - rgbHexToRgba, - padInt, - getEnumValues, - fixedInt, - isNullOrUndefined, - toReadableString, - formatStat, - getShinyDescriptor, -} from "#app/utils/common"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { PokemonMove } from "#app/data/moves/pokemon-move"; -import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; -import { argbFromRgba } from "@material/material-color-utilities"; -import { getTypeRgb } from "#app/data/type"; -import { PokemonType } from "#enums/pokemon-type"; -import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag } from "#app/ui/text"; -import type Move from "#app/data/moves/move"; -import { MoveCategory } from "#enums/MoveCategory"; -import { getPokeballAtlasKey } from "#app/data/pokeball"; -import { getGenderColor, getGenderSymbol } from "#app/data/gender"; -import { getLevelRelExp, getLevelTotalExp } from "#app/data/exp"; -import { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { StatusEffect } from "#enums/status-effect"; -import { getBiomeName } from "#app/data/balance/biomes"; -import { getNatureName, getNatureStatMultiplier } from "#app/data/nature"; +import type { Ability } from "#abilities/ability"; import { loggedInUser } from "#app/account"; -import type { Variant } from "#app/sprites/variant"; -import { getVariantTint } from "#app/sprites/variant"; +import { globalScene } from "#app/global-scene"; +import { starterColors } from "#app/global-vars/starter-colors"; +import { getBiomeName } from "#balance/biomes"; +import { getStarterValueFriendshipCap, speciesStarterCosts } from "#balance/starters"; +import { getLevelRelExp, getLevelTotalExp } from "#data/exp"; +import { getGenderColor, getGenderSymbol } from "#data/gender"; +import { getNatureName, getNatureStatMultiplier } from "#data/nature"; +import { getPokeballAtlasKey } from "#data/pokeball"; +import { getTypeRgb } from "#data/type"; import { Button } from "#enums/buttons"; -import type { Ability } from "#app/data/abilities/ability"; -import i18next from "i18next"; -import { modifierSortFunc } from "#app/modifier/modifier"; -import { PlayerGender } from "#enums/player-gender"; -import { Stat, PERMANENT_STATS, getStatKey } from "#enums/stat"; +import { MoveCategory } from "#enums/MoveCategory"; import { Nature } from "#enums/nature"; -import { achvs } from "#app/system/achv"; +import { PlayerGender } from "#enums/player-gender"; +import { PokemonType } from "#enums/pokemon-type"; +import { getStatKey, PERMANENT_STATS, Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon } from "#field/pokemon"; +import { modifierSortFunc, PokemonHeldItemModifier } from "#modifiers/modifier"; +import type { Move } from "#moves/move"; +import type { PokemonMove } from "#moves/pokemon-move"; +import type { Variant } from "#sprites/variant"; +import { getVariantTint } from "#sprites/variant"; +import { achvs } from "#system/achv"; +import { addBBCodeTextObject, addTextObject, getBBCodeFrag, TextStyle } from "#ui/text"; +import { UiHandler } from "#ui/ui-handler"; +import { + fixedInt, + formatStat, + getLocalizedSpriteKey, + getShinyDescriptor, + isNullOrUndefined, + padInt, + rgbHexToRgba, + toReadableString, +} from "#utils/common"; +import { getEnumValues } from "#utils/enums"; +import { argbFromRgba } from "@material/material-color-utilities"; +import i18next from "i18next"; enum Page { PROFILE, @@ -64,7 +63,7 @@ interface abilityContainer { descriptionText: Phaser.GameObjects.Text | null; } -export default class SummaryUiHandler extends UiHandler { +export class SummaryUiHandler extends UiHandler { private summaryUiMode: SummaryUiMode; private summaryContainer: Phaser.GameObjects.Container; diff --git a/src/ui/target-select-ui-handler.ts b/src/ui/target-select-ui-handler.ts index 8106e4de2da..5ea89929cda 100644 --- a/src/ui/target-select-ui-handler.ts +++ b/src/ui/target-select-ui-handler.ts @@ -1,18 +1,18 @@ +import { globalScene } from "#app/global-scene"; +import { SubstituteTag } from "#data/battler-tags"; import { BattlerIndex } from "#enums/battler-index"; -import { UiMode } from "#enums/ui-mode"; -import UiHandler from "./ui-handler"; -import { isNullOrUndefined, fixedInt } from "#app/utils/common"; -import { getMoveTargets } from "#app/data/moves/move-utils"; import { Button } from "#enums/buttons"; import type { MoveId } from "#enums/move-id"; -import type Pokemon from "#app/field/pokemon"; -import type { ModifierBar } from "#app/modifier/modifier"; -import { SubstituteTag } from "#app/data/battler-tags"; -import { globalScene } from "#app/global-scene"; +import { UiMode } from "#enums/ui-mode"; +import type { Pokemon } from "#field/pokemon"; +import type { ModifierBar } from "#modifiers/modifier"; +import { getMoveTargets } from "#moves/move-utils"; +import { UiHandler } from "#ui/ui-handler"; +import { fixedInt, isNullOrUndefined } from "#utils/common"; export type TargetSelectCallback = (targets: BattlerIndex[]) => void; -export default class TargetSelectUiHandler extends UiHandler { +export class TargetSelectUiHandler extends UiHandler { private fieldIndex: number; private move: MoveId; private targetSelectCallback: TargetSelectCallback; @@ -157,8 +157,8 @@ export default class TargetSelectUiHandler extends UiHandler { yoyo: true, onUpdate: t => { for (const target of this.targetsHighlighted) { - target.setAlpha(t.getValue()); - this.highlightItems(target.id, t.getValue()); + target.setAlpha(t.getValue() ?? 1); + this.highlightItems(target.id, t.getValue() ?? 1); } }, }); diff --git a/src/ui/test-dialogue-ui-handler.ts b/src/ui/test-dialogue-ui-handler.ts index b1e5047955a..c57c73ca777 100644 --- a/src/ui/test-dialogue-ui-handler.ts +++ b/src/ui/test-dialogue-ui-handler.ts @@ -1,13 +1,13 @@ -import type { InputFieldConfig } from "./form-modal-ui-handler"; -import { FormModalUiHandler } from "./form-modal-ui-handler"; -import type { ModalConfig } from "./modal-ui-handler"; -import i18next from "i18next"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import type { OptionSelectItem } from "./abstact-option-select-ui-handler"; -import { isNullOrUndefined } from "#app/utils/common"; import { UiMode } from "#enums/ui-mode"; +import type { PlayerPokemon } from "#field/pokemon"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import type { InputFieldConfig } from "#ui/form-modal-ui-handler"; +import { FormModalUiHandler } from "#ui/form-modal-ui-handler"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { isNullOrUndefined } from "#utils/common"; +import i18next from "i18next"; -export default class TestDialogueUiHandler extends FormModalUiHandler { +export class TestDialogueUiHandler extends FormModalUiHandler { keys: string[]; setup() { diff --git a/src/ui/text.ts b/src/ui/text.ts index 6d5dcb70fb5..b2a1894c85c 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -1,11 +1,11 @@ +import { globalScene } from "#app/global-scene"; import { EggTier } from "#enums/egg-type"; +import { ModifierTier } from "#enums/modifier-tier"; import { UiTheme } from "#enums/ui-theme"; +import i18next from "#plugins/i18n"; import type Phaser from "phaser"; import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; -import InputText from "phaser3-rex-plugins/plugins/inputtext"; -import { globalScene } from "#app/global-scene"; -import { ModifierTier } from "../enums/modifier-tier"; -import i18next from "#app/plugins/i18n"; +import type InputText from "phaser3-rex-plugins/plugins/inputtext"; export enum TextStyle { MESSAGE, @@ -152,8 +152,7 @@ export function addTextInputObject( ): InputText { const { scale, styleOptions } = getTextStyleOptions(style, globalScene.uiTheme, extraStyleOptions); - const ret = new InputText(globalScene, x, y, width, height, styleOptions as InputText.IConfig); - globalScene.add.existing(ret); + const ret = globalScene.add.rexInputText(x, y, width, height, styleOptions as InputText.IConfig); ret.setScale(scale); return ret; @@ -319,10 +318,14 @@ export function getTextStyleOptions( case TextStyle.MESSAGE: styleOptions.fontSize = defaultFontSize; break; - case TextStyle.HEADER_LABEL: - styleOptions.fontSize = defaultFontSize; - styleOptions.padding = { top: 6 }; + case TextStyle.HEADER_LABEL: { + switch (lang) { + case "ja": + styleOptions.padding = { top: 6 }; + break; + } break; + } case TextStyle.SETTINGS_VALUE: case TextStyle.SETTINGS_LABEL: { shadowXpos = 3; diff --git a/src/ui/time-of-day-widget.ts b/src/ui/time-of-day-widget.ts index 5f5116a2da0..6deaf1405d7 100644 --- a/src/ui/time-of-day-widget.ts +++ b/src/ui/time-of-day-widget.ts @@ -1,11 +1,11 @@ -import { fixedInt } from "#app/utils/common"; import { globalScene } from "#app/global-scene"; -import { BattleSceneEventType } from "../events/battle-scene"; import { EaseType } from "#enums/ease-type"; import { TimeOfDay } from "#enums/time-of-day"; +import { BattleSceneEventType } from "#events/battle-scene"; +import { fixedInt } from "#utils/common"; /** A small self contained UI element that displays the time of day as an icon */ -export default class TimeOfDayWidget extends Phaser.GameObjects.Container { +export class TimeOfDayWidget extends Phaser.GameObjects.Container { /** The {@linkcode Phaser.GameObjects.Sprite} that represents the foreground of the current time of day */ private readonly timeOfDayIconFgs: Phaser.GameObjects.Sprite[] = new Array(2); /** The {@linkcode Phaser.GameObjects.Sprite} that represents the middle-ground of the current time of day */ diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index 50e77bbdd14..b7c37538a3e 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -1,19 +1,19 @@ -import OptionSelectUiHandler from "./settings/option-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { fixedInt, randInt, randItem } from "#app/utils/common"; -import { TextStyle, addTextObject } from "./text"; -import { getSplashMessages } from "../data/splash-messages"; -import i18next from "i18next"; -import { TimedEventDisplay } from "#app/timed-event-manager"; -import { version } from "../../package.json"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { globalScene } from "#app/global-scene"; -import type { SpeciesId } from "#enums/species-id"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { PlayerGender } from "#enums/player-gender"; +import { pokerogueApi } from "#api/pokerogue-api"; import { timedEventManager } from "#app/global-event-manager"; +import { globalScene } from "#app/global-scene"; +import { TimedEventDisplay } from "#app/timed-event-manager"; +import { getSplashMessages } from "#data/splash-messages"; +import { PlayerGender } from "#enums/player-gender"; +import type { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import { version } from "#package.json"; +import { OptionSelectUiHandler } from "#ui/option-select-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { fixedInt, randInt, randItem } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import i18next from "i18next"; -export default class TitleUiHandler extends OptionSelectUiHandler { +export class TitleUiHandler extends OptionSelectUiHandler { /** If the stats can not be retrieved, use this fallback value */ private static readonly BATTLES_WON_FALLBACK: number = -1; diff --git a/src/ui/ui-handler.ts b/src/ui/ui-handler.ts index d3784c1225c..c7b25c90205 100644 --- a/src/ui/ui-handler.ts +++ b/src/ui/ui-handler.ts @@ -1,13 +1,13 @@ import { globalScene } from "#app/global-scene"; -import type { TextStyle } from "./text"; -import { getTextColor } from "./text"; -import type { UiMode } from "#enums/ui-mode"; import type { Button } from "#enums/buttons"; +import type { UiMode } from "#enums/ui-mode"; +import type { TextStyle } from "#ui/text"; +import { getTextColor } from "#ui/text"; /** * A basic abstract class to act as a holder and processor for UI elements. */ -export default abstract class UiHandler { +export abstract class UiHandler { protected mode: number | null; protected cursor = 0; public active = false; diff --git a/src/ui/ui-theme.ts b/src/ui/ui-theme.ts index c3931aea23b..f2d434c024a 100644 --- a/src/ui/ui-theme.ts +++ b/src/ui/ui-theme.ts @@ -1,6 +1,6 @@ -import { UiTheme } from "#enums/ui-theme"; -import { legacyCompatibleImages } from "#app/scene-base"; import { globalScene } from "#app/global-scene"; +import { legacyCompatibleImages } from "#app/scene-base"; +import { UiTheme } from "#enums/ui-theme"; export enum WindowVariant { NORMAL, diff --git a/src/ui/ui.ts b/src/ui/ui.ts index ad496df6382..394409bcb9d 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -1,63 +1,63 @@ import { globalScene } from "#app/global-scene"; -import type UiHandler from "./ui-handler"; -import BattleMessageUiHandler from "./battle-message-ui-handler"; -import CommandUiHandler from "./command-ui-handler"; -import PartyUiHandler from "./party-ui-handler"; -import FightUiHandler from "./fight-ui-handler"; -import MessageUiHandler from "./message-ui-handler"; -import ConfirmUiHandler from "./confirm-ui-handler"; -import ModifierSelectUiHandler from "./modifier-select-ui-handler"; -import BallUiHandler from "./ball-ui-handler"; -import SummaryUiHandler from "./summary-ui-handler"; -import StarterSelectUiHandler from "./starter-select-ui-handler"; -import EvolutionSceneHandler from "./evolution-scene-handler"; -import TargetSelectUiHandler from "./target-select-ui-handler"; -import SettingsUiHandler from "./settings/settings-ui-handler"; -import SettingsGamepadUiHandler from "./settings/settings-gamepad-ui-handler"; -import GameChallengesUiHandler from "./challenges-select-ui-handler"; -import { TextStyle, addTextObject } from "./text"; -import AchvBar from "./achv-bar"; -import MenuUiHandler from "./menu-ui-handler"; -import AchvsUiHandler from "./achvs-ui-handler"; -import OptionSelectUiHandler from "./settings/option-select-ui-handler"; -import EggHatchSceneHandler from "./egg-hatch-scene-handler"; -import EggListUiHandler from "./egg-list-ui-handler"; -import EggGachaUiHandler from "./egg-gacha-ui-handler"; -import PokedexUiHandler from "./pokedex-ui-handler"; -import { addWindow } from "./ui-theme"; -import LoginFormUiHandler from "./login-form-ui-handler"; -import RegistrationFormUiHandler from "./registration-form-ui-handler"; -import LoadingModalUiHandler from "./loading-modal-ui-handler"; -import { executeIf } from "#app/utils/common"; -import GameStatsUiHandler from "./game-stats-ui-handler"; -import AwaitableUiHandler from "./awaitable-ui-handler"; -import SaveSlotSelectUiHandler from "./save-slot-select-ui-handler"; -import TitleUiHandler from "./title-ui-handler"; -import SavingIconHandler from "./saving-icon-handler"; -import UnavailableModalUiHandler from "./unavailable-modal-ui-handler"; -import SessionReloadModalUiHandler from "./session-reload-modal-ui-handler"; import type { Button } from "#enums/buttons"; -import i18next from "i18next"; -import GamepadBindingUiHandler from "./settings/gamepad-binding-ui-handler"; -import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler"; -import KeyboardBindingUiHandler from "#app/ui/settings/keyboard-binding-ui-handler"; -import SettingsDisplayUiHandler from "./settings/settings-display-ui-handler"; -import SettingsAudioUiHandler from "./settings/settings-audio-ui-handler"; -import { PlayerGender } from "#enums/player-gender"; -import type BgmBar from "#app/ui/bgm-bar"; -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"; import { Device } from "#enums/devices"; -import MysteryEncounterUiHandler from "./mystery-encounter-ui-handler"; -import PokedexScanUiHandler from "./pokedex-scan-ui-handler"; -import PokedexPageUiHandler from "./pokedex-page-ui-handler"; -import { NavigationManager } from "./settings/navigationMenu"; +import { PlayerGender } from "#enums/player-gender"; import { UiMode } from "#enums/ui-mode"; +import { AchvBar } from "#ui/achv-bar"; +import { AchvsUiHandler } from "#ui/achvs-ui-handler"; +import { AdminUiHandler } from "#ui/admin-ui-handler"; +import { AutoCompleteUiHandler } from "#ui/autocomplete-ui-handler"; +import { AwaitableUiHandler } from "#ui/awaitable-ui-handler"; +import { BallUiHandler } from "#ui/ball-ui-handler"; +import { BattleMessageUiHandler } from "#ui/battle-message-ui-handler"; +import type { BgmBar } from "#ui/bgm-bar"; +import { GameChallengesUiHandler } from "#ui/challenges-select-ui-handler"; +import { CommandUiHandler } from "#ui/command-ui-handler"; +import { ConfirmUiHandler } from "#ui/confirm-ui-handler"; +import { EggGachaUiHandler } from "#ui/egg-gacha-ui-handler"; +import { EggHatchSceneHandler } from "#ui/egg-hatch-scene-handler"; +import { EggListUiHandler } from "#ui/egg-list-ui-handler"; +import { EggSummaryUiHandler } from "#ui/egg-summary-ui-handler"; +import { EvolutionSceneHandler } from "#ui/evolution-scene-handler"; +import { FightUiHandler } from "#ui/fight-ui-handler"; +import { GameStatsUiHandler } from "#ui/game-stats-ui-handler"; +import { GamepadBindingUiHandler } from "#ui/gamepad-binding-ui-handler"; +import { KeyboardBindingUiHandler } from "#ui/keyboard-binding-ui-handler"; +import { LoadingModalUiHandler } from "#ui/loading-modal-ui-handler"; +import { LoginFormUiHandler } from "#ui/login-form-ui-handler"; +import { MenuUiHandler } from "#ui/menu-ui-handler"; +import { MessageUiHandler } from "#ui/message-ui-handler"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { MysteryEncounterUiHandler } from "#ui/mystery-encounter-ui-handler"; +import { NavigationManager } from "#ui/navigationMenu"; +import { OptionSelectUiHandler } from "#ui/option-select-ui-handler"; +import { PartyUiHandler } from "#ui/party-ui-handler"; +import { PokedexPageUiHandler } from "#ui/pokedex-page-ui-handler"; +import { PokedexScanUiHandler } from "#ui/pokedex-scan-ui-handler"; +import { PokedexUiHandler } from "#ui/pokedex-ui-handler"; +import { RegistrationFormUiHandler } from "#ui/registration-form-ui-handler"; +import { RenameFormUiHandler } from "#ui/rename-form-ui-handler"; +import { RunHistoryUiHandler } from "#ui/run-history-ui-handler"; +import { RunInfoUiHandler } from "#ui/run-info-ui-handler"; +import { SaveSlotSelectUiHandler } from "#ui/save-slot-select-ui-handler"; +import { SavingIconHandler } from "#ui/saving-icon-handler"; +import { SessionReloadModalUiHandler } from "#ui/session-reload-modal-ui-handler"; +import { SettingsAudioUiHandler } from "#ui/settings-audio-ui-handler"; +import { SettingsDisplayUiHandler } from "#ui/settings-display-ui-handler"; +import { SettingsGamepadUiHandler } from "#ui/settings-gamepad-ui-handler"; +import { SettingsKeyboardUiHandler } from "#ui/settings-keyboard-ui-handler"; +import { SettingsUiHandler } from "#ui/settings-ui-handler"; +import { StarterSelectUiHandler } from "#ui/starter-select-ui-handler"; +import { SummaryUiHandler } from "#ui/summary-ui-handler"; +import { TargetSelectUiHandler } from "#ui/target-select-ui-handler"; +import { TestDialogueUiHandler } from "#ui/test-dialogue-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { TitleUiHandler } from "#ui/title-ui-handler"; +import type { UiHandler } from "#ui/ui-handler"; +import { addWindow } from "#ui/ui-theme"; +import { UnavailableModalUiHandler } from "#ui/unavailable-modal-ui-handler"; +import { executeIf } from "#utils/common"; +import i18next from "i18next"; const transitionModes = [ UiMode.SAVE_SLOT, @@ -103,7 +103,7 @@ const noTransitionModes = [ UiMode.RUN_INFO, ]; -export default class UI extends Phaser.GameObjects.Container { +export class UI extends Phaser.GameObjects.Container { private mode: UiMode; private modeChain: UiMode[]; public handlers: UiHandler[]; diff --git a/src/ui/unavailable-modal-ui-handler.ts b/src/ui/unavailable-modal-ui-handler.ts index 5bed55ec24a..420a47664a7 100644 --- a/src/ui/unavailable-modal-ui-handler.ts +++ b/src/ui/unavailable-modal-ui-handler.ts @@ -1,14 +1,14 @@ -import type { ModalConfig } from "./modal-ui-handler"; -import { ModalUiHandler } from "./modal-ui-handler"; -import { addTextObject, TextStyle } from "./text"; -import type { UiMode } from "#enums/ui-mode"; import { updateUserInfo } from "#app/account"; -import { sessionIdKey } from "#app/utils/common"; -import { removeCookie } from "#app/utils/cookies"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; +import type { UiMode } from "#enums/ui-mode"; +import type { ModalConfig } from "#ui/modal-ui-handler"; +import { ModalUiHandler } from "#ui/modal-ui-handler"; +import { addTextObject, TextStyle } from "#ui/text"; +import { sessionIdKey } from "#utils/common"; +import { removeCookie } from "#utils/cookies"; +import i18next from "i18next"; -export default class UnavailableModalUiHandler extends ModalUiHandler { +export class UnavailableModalUiHandler extends ModalUiHandler { private reconnectTimer: NodeJS.Timeout | null; private reconnectDuration: number; private reconnectCallback: () => void; diff --git a/src/utils/common.ts b/src/utils/common.ts index 2c160001d5f..1c3b2f58957 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -1,18 +1,26 @@ +import { pokerogueApi } from "#api/pokerogue-api"; import { MoneyFormat } from "#enums/money-format"; import { MoveId } from "#enums/move-id"; +import type { Variant } from "#sprites/variant"; import i18next from "i18next"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import type { Variant } from "#app/sprites/variant"; export type nil = null | undefined; export const MissingTextureKey = "__MISSING"; +// TODO: Draft tests for these utility functions +// TODO: Break up this file +/** + * Convert a `snake_case` string in any capitalization (such as one from an enum reverse mapping) + * into a readable `Title Case` version. + * @param str - The snake case string to be converted. + * @returns The result of converting `str` into title case. + */ export function toReadableString(str: string): string { return str .replace(/_/g, " ") .split(" ") - .map(s => `${s.slice(0, 1)}${s.slice(1).toLowerCase()}`) + .map(s => capitalizeFirstLetter(s.toLowerCase())) .join(" "); } @@ -273,18 +281,6 @@ export function formatStat(stat: number, forHp = false): string { return formatLargeNumber(stat, forHp ? 100000 : 1000000); } -export function getEnumKeys(enumType: any): string[] { - return Object.values(enumType) - .filter(v => Number.isNaN(Number.parseInt(v!.toString()))) - .map(v => v!.toString()); -} - -export function getEnumValues(enumType: any): number[] { - return Object.values(enumType) - .filter(v => !Number.isNaN(Number.parseInt(v!.toString()))) - .map(v => Number.parseInt(v!.toString())); -} - export function executeIf(condition: boolean, promiseFunc: () => Promise): Promise { return condition ? promiseFunc() : new Promise(resolve => resolve(null)); } @@ -645,25 +641,3 @@ export function coerceArray(input: T): T extends any[] ? T : [T]; export function coerceArray(input: T): T | [T] { return Array.isArray(input) ? input : [input]; } - -/** - * Returns the name of the key that matches the enum [object] value. - * @param input - The enum [object] to check - * @param val - The value to get the key of - * @returns The name of the key with the specified value - * @example - * const thing = { - * one: 1, - * two: 2, - * } as const; - * console.log(enumValueToKey(thing, thing.two)); // output: "two" - * @throws An `Error` if an invalid enum value is passed to the function - */ -export function enumValueToKey>(input: T, val: T[keyof T]): keyof T { - for (const [key, value] of Object.entries(input)) { - if (val === value) { - return key as keyof T; - } - } - throw new Error(`Invalid value passed to \`enumValueToKey\`! Value: ${val}`); -} diff --git a/src/utils/cookies.ts b/src/utils/cookies.ts index b38e941b59a..06391e6f4c7 100644 --- a/src/utils/cookies.ts +++ b/src/utils/cookies.ts @@ -1,4 +1,4 @@ -import { isBeta } from "./utility-vars"; +import { isBeta } from "#utils/utility-vars"; export function setCookie(cName: string, cValue: string): void { const expiration = new Date(); diff --git a/src/utils/data.ts b/src/utils/data.ts index 5a28657d034..932ea38d504 100644 --- a/src/utils/data.ts +++ b/src/utils/data.ts @@ -1,7 +1,7 @@ import { loggedInUser } from "#app/account"; -import type { StarterAttributes } from "#app/system/game-data"; -import { AES, enc } from "crypto-js"; import { saveKey } from "#app/constants"; +import type { StarterAttributes } from "#system/game-data"; +import { AES, enc } from "crypto-js"; /** * Perform a deep copy of an object. diff --git a/src/utils/enums.ts b/src/utils/enums.ts new file mode 100644 index 00000000000..98cb4272ee9 --- /dev/null +++ b/src/utils/enums.ts @@ -0,0 +1,74 @@ +import type { EnumOrObject, EnumValues, NormalEnum, TSNumericEnum } from "#app/@types/enum-types"; +import type { InferKeys } from "#app/@types/type-helpers"; + +/** + * Return the string keys of an Enum object, excluding reverse-mapped numbers. + * @param enumType - The numeric enum to retrieve keys for + * @returns An ordered array of all of `enumType`'s string keys + * @example + * enum fruit { + * apple = 1, + * banana = 2, + * cherry = 3, + * orange = 12, + * }; + * + * console.log(getEnumKeys(fruit)); // output: ["apple", "banana", "cherry", "orange"] + * @remarks + * To retrieve the keys of a {@linkcode NormalEnum}, use {@linkcode Object.keys} instead. + */ +export function getEnumKeys(enumType: TSNumericEnum): (keyof E)[] { + // All enum values are either normal numbers or reverse mapped strings, so we can retrieve the keys by filtering out numbers. + return Object.values(enumType).filter(v => typeof v === "string"); +} + +/** + * Return the numeric values of a numeric Enum object, excluding reverse-mapped strings. + * @param enumType - The enum object to retrieve keys for + * @returns An ordered array of all of `enumType`'s number values + * @example + * enum fruit { + * apple = 1, + * banana = 2, + * cherry = 3, + * orange = 12, + * }; + * + * console.log(getEnumValues(fruit)); // output: [1, 2, 3, 12] + * + * @remarks + * To retrieve the keys of a {@linkcode NormalEnum}, use {@linkcode Object.values} instead. + */ +// NB: This intentionally does not use `EnumValues` as using `E[keyof E]` leads to improved variable highlighting in IDEs. +export function getEnumValues(enumType: TSNumericEnum): E[keyof E][] { + return Object.values(enumType).filter(v => typeof v !== "string") as E[keyof E][]; +} + +/** + * Return the name of the key that matches the given Enum value. + * Can be used to emulate Typescript reverse mapping for `const object`s or string enums. + * @param object - The {@linkcode NormalEnum} to check + * @param val - The value to get the key of + * @returns The name of the key with the specified value + * @example + * const thing = { + * one: 1, + * two: 2, + * } as const; + * console.log(enumValueToKey(thing, 2)); // output: "two" + * @throws Error if an invalid enum value is passed to the function + * @remarks + * If multiple keys map to the same value, the first one (in insertion order) will be retrieved, + * but the return type will be the union of ALL their corresponding keys. + */ +export function enumValueToKey>( + object: NormalEnum, + val: V, +): InferKeys { + for (const [key, value] of Object.entries(object)) { + if (val === value) { + return key as InferKeys; + } + } + throw new Error(`Invalid value passed to \`enumValueToKey\`! Value: ${val}`); +} diff --git a/src/utils/modifier-utils.ts b/src/utils/modifier-utils.ts index 3be4af3730c..58108e7a599 100644 --- a/src/utils/modifier-utils.ts +++ b/src/utils/modifier-utils.ts @@ -1,3 +1,4 @@ +import { modifierTypes } from "#data/data-lists"; import { ModifierPoolType } from "#enums/modifier-pool-type"; import { dailyStarterModifierPool, @@ -5,10 +6,9 @@ import { modifierPool, trainerModifierPool, wildModifierPool, -} from "#app/modifier/modifier-pools"; -import type { ModifierPool, ModifierTypeFunc } from "#app/@types/modifier-types"; -import { modifierTypes } from "#app/data/data-lists"; -import type { ModifierType } from "#app/modifier/modifier-type"; +} from "#modifiers/modifier-pools"; +import type { ModifierType } from "#modifiers/modifier-type"; +import type { ModifierPool, ModifierTypeFunc } from "#types/modifier-types"; export function getModifierPoolForType(poolType: ModifierPoolType): ModifierPool { switch (poolType) { diff --git a/src/utils/pokemon-utils.ts b/src/utils/pokemon-utils.ts index 9f87c36b050..da39cfe11ad 100644 --- a/src/utils/pokemon-utils.ts +++ b/src/utils/pokemon-utils.ts @@ -1,5 +1,5 @@ -import { allSpecies } from "#app/data/data-lists"; -import type PokemonSpecies from "#app/data/pokemon-species"; +import { allSpecies } from "#data/data-lists"; +import type { PokemonSpecies } from "#data/pokemon-species"; import type { SpeciesId } from "#enums/species-id"; /** diff --git a/test/abilities/ability_activation_order.test.ts b/test/abilities/ability_activation_order.test.ts index 0b8e354cc7d..8344ba6be11 100644 --- a/test/abilities/ability_activation_order.test.ts +++ b/test/abilities/ability_activation_order.test.ts @@ -3,7 +3,7 @@ import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/ability_duplication.test.ts b/test/abilities/ability_duplication.test.ts index d392b7043e4..0c88b65a00e 100644 --- a/test/abilities/ability_duplication.test.ts +++ b/test/abilities/ability_duplication.test.ts @@ -1,10 +1,10 @@ -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Ability Duplication", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/ability_timing.test.ts b/test/abilities/ability_timing.test.ts index 124591597be..c3e841d8216 100644 --- a/test/abilities/ability_timing.test.ts +++ b/test/abilities/ability_timing.test.ts @@ -1,11 +1,11 @@ -import { BattleStyle } from "#app/enums/battle-style"; -import { CommandPhase } from "#app/phases/command-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; -import i18next from "#app/plugins/i18n"; -import { UiMode } from "#enums/ui-mode"; import { AbilityId } from "#enums/ability-id"; +import { BattleStyle } from "#enums/battle-style"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { UiMode } from "#enums/ui-mode"; +import { CommandPhase } from "#phases/command-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import i18next from "#plugins/i18n"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/analytic.test.ts b/test/abilities/analytic.test.ts index 5dbf4365186..0bacfe6775b 100644 --- a/test/abilities/analytic.test.ts +++ b/test/abilities/analytic.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { isBetween, toDmgValue } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { isBetween, toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/anger-point.test.ts b/test/abilities/anger-point.test.ts index e6f3a94d12f..576062eadeb 100644 --- a/test/abilities/anger-point.test.ts +++ b/test/abilities/anger-point.test.ts @@ -1,9 +1,9 @@ -import { PostReceiveCritStatStageChangeAbAttr } from "#app/data/abilities/ability"; +import { PostReceiveCritStatStageChangeAbAttr } from "#abilities/ability"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/arena_trap.test.ts b/test/abilities/arena_trap.test.ts index cc6888be102..c47cf3cd327 100644 --- a/test/abilities/arena_trap.test.ts +++ b/test/abilities/arena_trap.test.ts @@ -1,10 +1,10 @@ -import { allAbilities } from "#app/data/data-lists"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - Arena Trap", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/aroma_veil.test.ts b/test/abilities/aroma_veil.test.ts index 56cce749b9f..fb08d60c24f 100644 --- a/test/abilities/aroma_veil.test.ts +++ b/test/abilities/aroma_veil.test.ts @@ -1,13 +1,13 @@ -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { BattlerTagType } from "#enums/battler-tag-type"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerIndex } from "#enums/battler-index"; -import type { PlayerPokemon } from "#app/field/pokemon"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import type { PlayerPokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Aroma Veil", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/aura_break.test.ts b/test/abilities/aura_break.test.ts index 657d363bd97..6f33e3f047f 100644 --- a/test/abilities/aura_break.test.ts +++ b/test/abilities/aura_break.test.ts @@ -1,8 +1,8 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/battery.test.ts b/test/abilities/battery.test.ts index db129e72b0b..13ebd52367a 100644 --- a/test/abilities/battery.test.ts +++ b/test/abilities/battery.test.ts @@ -1,10 +1,10 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/battle_bond.test.ts b/test/abilities/battle_bond.test.ts index adb4a9c6e7a..ef8c2ffed75 100644 --- a/test/abilities/battle_bond.test.ts +++ b/test/abilities/battle_bond.test.ts @@ -1,11 +1,11 @@ -import { allMoves } from "#app/data/data-lists"; -import { MultiHitType } from "#enums/MultiHitType"; -import { Status } from "#app/data/status-effect"; +import { allMoves } from "#data/data-lists"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; +import { MultiHitType } from "#enums/MultiHitType"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - BATTLE BOND", () => { diff --git a/test/abilities/beast_boost.test.ts b/test/abilities/beast_boost.test.ts index 8be9156ce07..0a49728698b 100644 --- a/test/abilities/beast_boost.test.ts +++ b/test/abilities/beast_boost.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/commander.test.ts b/test/abilities/commander.test.ts index 99512d7a733..8c19ee083c5 100644 --- a/test/abilities/commander.test.ts +++ b/test/abilities/commander.test.ts @@ -1,15 +1,15 @@ +import { AbilityId } from "#enums/ability-id"; import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { PokemonAnimType } from "#enums/pokemon-anim-type"; +import { SpeciesId } from "#enums/species-id"; import type { EffectiveStat } from "#enums/stat"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; import { WeatherType } from "#enums/weather-type"; -import { MoveResult } from "#enums/move-result"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -200,8 +200,6 @@ describe("Abilities - Commander", () => { game.move.select(MoveId.DIVE, 0, BattlerIndex.ENEMY); game.move.select(MoveId.SPLASH, 1); - - await game.phaseInterceptor.to("CommandPhase"); await game.toNextTurn(); expect(tatsugiri.getTag(BattlerTagType.UNDERWATER)).toBeDefined(); diff --git a/test/abilities/competitive.test.ts b/test/abilities/competitive.test.ts index f12b06837dc..7dcc677a74e 100644 --- a/test/abilities/competitive.test.ts +++ b/test/abilities/competitive.test.ts @@ -1,9 +1,9 @@ -import { Stat } from "#enums/stat"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/contrary.test.ts b/test/abilities/contrary.test.ts index 6962abb0fec..7db48dedbfd 100644 --- a/test/abilities/contrary.test.ts +++ b/test/abilities/contrary.test.ts @@ -1,8 +1,8 @@ -import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/corrosion.test.ts b/test/abilities/corrosion.test.ts index 2a0464d1146..22abc158fc7 100644 --- a/test/abilities/corrosion.test.ts +++ b/test/abilities/corrosion.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/costar.test.ts b/test/abilities/costar.test.ts index a40d84e72f5..c8c0ffd3184 100644 --- a/test/abilities/costar.test.ts +++ b/test/abilities/costar.test.ts @@ -1,10 +1,9 @@ -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MessagePhase } from "#app/phases/message-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { MessagePhase } from "#phases/message-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; @@ -39,7 +38,6 @@ describe("Abilities - COSTAR", () => { let [leftPokemon, rightPokemon] = game.scene.getPlayerField(); game.move.select(MoveId.NASTY_PLOT); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -47,7 +45,6 @@ describe("Abilities - COSTAR", () => { expect(rightPokemon.getStatStage(Stat.SPATK)).toBe(0); game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(CommandPhase); game.doSwitchPokemon(2); await game.phaseInterceptor.to(MessagePhase); @@ -67,7 +64,6 @@ describe("Abilities - COSTAR", () => { expect(leftPokemon.getStatStage(Stat.ATK)).toBe(-2); game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(CommandPhase); game.doSwitchPokemon(2); await game.phaseInterceptor.to(MessagePhase); diff --git a/test/abilities/cud_chew.test.ts b/test/abilities/cud_chew.test.ts index e563e7537dd..8fc62b38528 100644 --- a/test/abilities/cud_chew.test.ts +++ b/test/abilities/cud_chew.test.ts @@ -1,5 +1,4 @@ -import { CudChewConsumeBerryAbAttr } from "#app/data/abilities/ability"; -import Pokemon from "#app/field/pokemon"; +import { CudChewConsumeBerryAbAttr } from "#abilities/ability"; import { globalScene } from "#app/global-scene"; import { getPokemonNameWithAffix } from "#app/messages"; import { AbilityId } from "#enums/ability-id"; @@ -7,7 +6,8 @@ import { BerryType } from "#enums/berry-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { Pokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; import i18next from "i18next"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/dancer.test.ts b/test/abilities/dancer.test.ts index 2a4a3c36bcc..86b5b68e901 100644 --- a/test/abilities/dancer.test.ts +++ b/test/abilities/dancer.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; -import type { MovePhase } from "#app/phases/move-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import type { MovePhase } from "#phases/move-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/defiant.test.ts b/test/abilities/defiant.test.ts index ef26b5bfca3..44187429e2b 100644 --- a/test/abilities/defiant.test.ts +++ b/test/abilities/defiant.test.ts @@ -1,9 +1,9 @@ -import { Stat } from "#enums/stat"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/desolate-land.test.ts b/test/abilities/desolate-land.test.ts index eee44b3d818..fc066fa8955 100644 --- a/test/abilities/desolate-land.test.ts +++ b/test/abilities/desolate-land.test.ts @@ -1,14 +1,14 @@ -import { PokeballType } from "#app/enums/pokeball"; -import { WeatherType } from "#app/enums/weather-type"; -import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#enums/command"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; import { globalScene } from "#app/global-scene"; +import { AbilityId } from "#enums/ability-id"; +import { Command } from "#enums/command"; +import { MoveId } from "#enums/move-id"; +import { PokeballType } from "#enums/pokeball"; +import { SpeciesId } from "#enums/species-id"; +import { WeatherType } from "#enums/weather-type"; +import type { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - Desolate Land", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/disguise.test.ts b/test/abilities/disguise.test.ts index 4ccd825e574..9bd36def8d7 100644 --- a/test/abilities/disguise.test.ts +++ b/test/abilities/disguise.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { toDmgValue } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Abilities - Disguise", () => { @@ -165,7 +165,7 @@ describe("Abilities - Disguise", () => { expect(mimikyu.formIndex).toBe(disguisedForm); }); - it("reverts to Disguised form on biome change when fainted", async () => { + it("reverts to Disguised form when fainted", async () => { game.override .startingWave(10) .starterSpecies(0) @@ -181,10 +181,6 @@ describe("Abilities - Disguise", () => { game.move.select(MoveId.SPLASH); await game.killPokemon(mimikyu1); - game.doSelectPartyPokemon(1); - await game.toNextTurn(); - game.move.select(MoveId.SPLASH); - await game.doKillOpponents(); await game.phaseInterceptor.to("QuietFormChangePhase"); expect(mimikyu1.formIndex).toBe(disguisedForm); diff --git a/test/abilities/dry_skin.test.ts b/test/abilities/dry_skin.test.ts index 31620beb9bd..712d3295e6f 100644 --- a/test/abilities/dry_skin.test.ts +++ b/test/abilities/dry_skin.test.ts @@ -1,7 +1,7 @@ -import { SpeciesId } from "#enums/species-id"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/early_bird.test.ts b/test/abilities/early_bird.test.ts index dcdfd8e4956..be4a2c802af 100644 --- a/test/abilities/early_bird.test.ts +++ b/test/abilities/early_bird.test.ts @@ -1,10 +1,10 @@ -import { Status } from "#app/data/status-effect"; -import { MoveResult } from "#enums/move-result"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/flash_fire.test.ts b/test/abilities/flash_fire.test.ts index 3be156a1578..d6085c4e591 100644 --- a/test/abilities/flash_fire.test.ts +++ b/test/abilities/flash_fire.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { SpeciesId } from "#enums/species-id"; -import { MovePhase } from "#app/phases/move-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { MovePhase } from "#phases/move-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/flower_gift.test.ts b/test/abilities/flower_gift.test.ts index f072afe7f34..b283729d951 100644 --- a/test/abilities/flower_gift.test.ts +++ b/test/abilities/flower_gift.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allAbilities } from "#app/data/data-lists"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { Stat } from "#app/enums/stat"; -import { WeatherType } from "#app/enums/weather-type"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { WeatherType } from "#enums/weather-type"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/flower_veil.test.ts b/test/abilities/flower_veil.test.ts index 7cabfa23e96..e890ea24fad 100644 --- a/test/abilities/flower_veil.test.ts +++ b/test/abilities/flower_veil.test.ts @@ -1,15 +1,14 @@ -import { BattlerIndex } from "#enums/battler-index"; +import { allAbilities, allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { allMoves } from "#app/data/data-lists"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { allAbilities } from "#app/data/data-lists"; describe("Abilities - Flower Veil", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/forecast.test.ts b/test/abilities/forecast.test.ts index 9111766ebdf..372e32a27fa 100644 --- a/test/abilities/forecast.test.ts +++ b/test/abilities/forecast.test.ts @@ -1,15 +1,15 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allAbilities } from "#app/data/data-lists"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { WeatherType } from "#app/enums/weather-type"; -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { PostSummonPhase } from "#app/phases/post-summon-phase"; -import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { WeatherType } from "#enums/weather-type"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { MovePhase } from "#phases/move-phase"; +import { PostSummonPhase } from "#phases/post-summon-phase"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/friend_guard.test.ts b/test/abilities/friend_guard.test.ts index c5809e18e96..e26fd5b5f1f 100644 --- a/test/abilities/friend_guard.test.ts +++ b/test/abilities/friend_guard.test.ts @@ -1,13 +1,12 @@ +import { allAbilities, allMoves } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveCategory } from "#enums/MoveCategory"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { BattlerIndex } from "#enums/battler-index"; -import { allAbilities } from "#app/data/data-lists"; -import { allMoves } from "#app/data/data-lists"; -import { MoveCategory } from "#enums/MoveCategory"; describe("Moves - Friend Guard", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/good_as_gold.test.ts b/test/abilities/good_as_gold.test.ts index 2490cd43fea..956553a96d9 100644 --- a/test/abilities/good_as_gold.test.ts +++ b/test/abilities/good_as_gold.test.ts @@ -1,15 +1,15 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allAbilities } from "#app/data/data-lists"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { Stat } from "#app/enums/stat"; -import { StatusEffect } from "#app/enums/status-effect"; -import { WeatherType } from "#app/enums/weather-type"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/gorilla_tactics.test.ts b/test/abilities/gorilla_tactics.test.ts index 7a563f5b37f..05714fe77ea 100644 --- a/test/abilities/gorilla_tactics.test.ts +++ b/test/abilities/gorilla_tactics.test.ts @@ -1,14 +1,14 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { RandomMoveAttr } from "#app/data/moves/move"; -import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; -import { SpeciesId } from "#enums/species-id"; -import { Stat } from "#app/enums/stat"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; import { MoveResult } from "#enums/move-result"; import { MoveUseMode } from "#enums/move-use-mode"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { RandomMoveAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - Gorilla Tactics", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/guard-dog.test.ts b/test/abilities/guard-dog.test.ts new file mode 100644 index 00000000000..aef8f081975 --- /dev/null +++ b/test/abilities/guard-dog.test.ts @@ -0,0 +1,39 @@ +import { AbilityId } from "#enums/ability-id"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Ability - Guard Dog", () => { + 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 + .ability(AbilityId.GUARD_DOG) + .battleStyle("single") + .enemySpecies(SpeciesId.MAGIKARP) + .enemyAbility(AbilityId.INTIMIDATE); + }); + + it("should raise attack by 1 stage when Intimidated instead of being lowered", async () => { + await game.classicMode.startBattle([SpeciesId.MABOSSTIFF]); + + const mabostiff = game.field.getPlayerPokemon(); + expect(mabostiff.getStatStage(Stat.ATK)).toBe(1); + expect(mabostiff.waveData.abilitiesApplied.has(AbilityId.GUARD_DOG)).toBe(true); + expect(game.phaseInterceptor.log.filter(l => l === "StatStageChangePhase")).toHaveLength(1); + }); +}); diff --git a/test/abilities/gulp_missile.test.ts b/test/abilities/gulp_missile.test.ts index e47b22f0c06..69ed6c51ac9 100644 --- a/test/abilities/gulp_missile.test.ts +++ b/test/abilities/gulp_missile.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import type Pokemon from "#app/field/pokemon"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/harvest.test.ts b/test/abilities/harvest.test.ts index 42c9772bd10..244de383b44 100644 --- a/test/abilities/harvest.test.ts +++ b/test/abilities/harvest.test.ts @@ -1,16 +1,16 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PostTurnRestoreBerryAbAttr } from "#app/data/abilities/ability"; -import type Pokemon from "#app/field/pokemon"; -import { BerryModifier, PreserveBerryModifier } from "#app/modifier/modifier"; -import type { ModifierOverride } from "#app/modifier/modifier-type"; -import type { BooleanHolder } from "#app/utils/common"; +import { PostTurnRestoreBerryAbAttr } from "#abilities/ability"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BerryType } from "#enums/berry-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import { BerryModifier, PreserveBerryModifier } from "#modifiers/modifier"; +import type { ModifierOverride } from "#modifiers/modifier-type"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { BooleanHolder } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/healer.test.ts b/test/abilities/healer.test.ts index b21b04531ec..8ce8b5bada0 100644 --- a/test/abilities/healer.test.ts +++ b/test/abilities/healer.test.ts @@ -1,14 +1,14 @@ +import { PostTurnResetStatusAbAttr } from "#abilities/ability"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; +import { isNullOrUndefined } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { isNullOrUndefined } from "#app/utils/common"; -import { allAbilities } from "#app/data/data-lists"; -import type Pokemon from "#app/field/pokemon"; -import { PostTurnResetStatusAbAttr } from "#app/data/abilities/ability"; describe("Abilities - Healer", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/heatproof.test.ts b/test/abilities/heatproof.test.ts index 39c9dff8289..0d76c1ad40b 100644 --- a/test/abilities/heatproof.test.ts +++ b/test/abilities/heatproof.test.ts @@ -1,10 +1,10 @@ -import { SpeciesId } from "#enums/species-id"; -import { StatusEffect } from "#app/enums/status-effect"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { toDmgValue } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/honey_gather.test.ts b/test/abilities/honey_gather.test.ts index 5bc7b3a0776..65c590083f5 100644 --- a/test/abilities/honey_gather.test.ts +++ b/test/abilities/honey_gather.test.ts @@ -1,12 +1,12 @@ -import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#enums/command"; +import Overrides from "#app/overrides"; import { AbilityId } from "#enums/ability-id"; +import { Command } from "#enums/command"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import Overrides from "#app/overrides"; describe("Abilities - Honey Gather", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/hustle.test.ts b/test/abilities/hustle.test.ts index 57a1a2e1d86..94045d231d1 100644 --- a/test/abilities/hustle.test.ts +++ b/test/abilities/hustle.test.ts @@ -1,9 +1,9 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { Stat } from "#app/enums/stat"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/hyper_cutter.test.ts b/test/abilities/hyper_cutter.test.ts index 211be9a0533..212083b62b6 100644 --- a/test/abilities/hyper_cutter.test.ts +++ b/test/abilities/hyper_cutter.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/ice_face.test.ts b/test/abilities/ice_face.test.ts index 6e261eb00e2..a0e2a949672 100644 --- a/test/abilities/ice_face.test.ts +++ b/test/abilities/ice_face.test.ts @@ -1,14 +1,14 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/illuminate.test.ts b/test/abilities/illuminate.test.ts index ec4f6436041..0fb31379542 100644 --- a/test/abilities/illuminate.test.ts +++ b/test/abilities/illuminate.test.ts @@ -1,9 +1,9 @@ -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Abilities - Illuminate", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/illusion.test.ts b/test/abilities/illusion.test.ts index 1c2809ad813..0624c5e19f4 100644 --- a/test/abilities/illusion.test.ts +++ b/test/abilities/illusion.test.ts @@ -1,9 +1,9 @@ -import { Gender } from "#app/data/gender"; -import { PokeballType } from "#app/enums/pokeball"; +import { Gender } from "#data/gender"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { PokeballType } from "#enums/pokeball"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/immunity.test.ts b/test/abilities/immunity.test.ts index 063ab57f11a..6f6fac10bf9 100644 --- a/test/abilities/immunity.test.ts +++ b/test/abilities/immunity.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/imposter.test.ts b/test/abilities/imposter.test.ts deleted file mode 100644 index eac4e8d070b..00000000000 --- a/test/abilities/imposter.test.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; -import { AbilityId } from "#enums/ability-id"; - -// 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 - .battleStyle("single") - .enemySpecies(SpeciesId.MEW) - .enemyLevel(200) - .enemyAbility(AbilityId.BEAST_BOOST) - .enemyPassiveAbility(AbilityId.BALL_FETCH) - .enemyMoveset(MoveId.SPLASH) - .ability(AbilityId.IMPOSTER) - .moveset(MoveId.SPLASH); - }); - - it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => { - await game.classicMode.startBattle([SpeciesId.DITTO]); - - game.move.select(MoveId.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(); - - expect(playerMoveset.length).toBe(enemyMoveset.length); - for (let i = 0; i < playerMoveset.length && i < enemyMoveset.length; i++) { - expect(playerMoveset[i]?.moveId).toBe(enemyMoveset[i]?.moveId); - } - - const playerTypes = player.getTypes(); - const enemyTypes = enemy.getTypes(); - - expect(playerTypes.length).toBe(enemyTypes.length); - for (let i = 0; i < playerTypes.length && i < enemyTypes.length; i++) { - expect(playerTypes[i]).toBe(enemyTypes[i]); - } - }); - - // TODO: this doesn't actually test imposter - transforming happens before poewr split - it("should copy in-battle overridden stats", async () => { - await game.classicMode.startBattle([SpeciesId.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.use(MoveId.SPLASH); - await game.move.forceEnemyMove(MoveId.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); - }); - - it("should set each move's pp to a maximum of 5", async () => { - game.override.enemyMoveset([MoveId.SWORDS_DANCE, MoveId.GROWL, MoveId.SKETCH, MoveId.RECOVER]); - - await game.classicMode.startBattle([SpeciesId.DITTO]); - const player = game.scene.getPlayerPokemon()!; - - player.getMoveset().forEach(move => { - // Should set correct maximum PP without touching `ppUp` - if (move) { - if (move.moveId === MoveId.SKETCH) { - expect(move.getMovePp()).toBe(1); - } else { - expect(move.getMovePp()).toBe(5); - } - expect(move.ppUp).toBe(0); - } - }); - }); - - it("should activate its ability if it copies one that activates on summon", async () => { - game.override.enemyAbility(AbilityId.INTIMIDATE); - - await game.classicMode.startBattle([SpeciesId.DITTO]); - - expect(game.scene.getEnemyPokemon()?.getStatStage(Stat.ATK)).toBe(-1); - }); - - it("should persist transformed attributes across reloads", async () => { - await game.classicMode.startBattle([SpeciesId.DITTO]); - - const player = game.scene.getPlayerPokemon()!; - const enemy = game.scene.getEnemyPokemon()!; - - game.move.select(MoveId.SPLASH); - await game.doKillOpponents(); - await game.toNextWave(); - - expect(game.scene.phaseManager.getCurrentPhase()?.constructor.name).toBe("CommandPhase"); - expect(game.scene.currentBattle.waveIndex).toBe(2); - - await game.reload.reloadSession(); - - const playerReloaded = game.scene.getPlayerPokemon()!; - const playerMoveset = player.getMoveset(); - - expect(playerReloaded.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); - expect(playerReloaded.getAbility()).toBe(enemy.getAbility()); - expect(playerReloaded.getGender()).toBe(enemy.getGender()); - - expect(playerReloaded.getStat(Stat.HP, false)).not.toBe(enemy.getStat(Stat.HP)); - for (const s of EFFECTIVE_STATS) { - expect(playerReloaded.getStat(s, false)).toBe(enemy.getStat(s, false)); - } - - expect(playerMoveset.length).toEqual(1); - expect(playerMoveset[0]?.moveId).toEqual(MoveId.SPLASH); - }); - - it("should stay transformed with the correct form after reload", async () => { - game.override.enemySpecies(SpeciesId.UNOWN); - await game.classicMode.startBattle([SpeciesId.DITTO]); - - const enemy = game.scene.getEnemyPokemon()!; - - // change form - enemy.species.forms[5]; - enemy.species.formIndex = 5; - - game.move.select(MoveId.SPLASH); - await game.doKillOpponents(); - await game.toNextWave(); - - expect(game.scene.phaseManager.getCurrentPhase()?.constructor.name).toBe("CommandPhase"); - expect(game.scene.currentBattle.waveIndex).toBe(2); - - await game.reload.reloadSession(); - - const playerReloaded = game.scene.getPlayerPokemon()!; - - expect(playerReloaded.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); - expect(playerReloaded.getSpeciesForm().formIndex).toBe(enemy.getSpeciesForm().formIndex); - }); -}); diff --git a/test/abilities/infiltrator.test.ts b/test/abilities/infiltrator.test.ts index a5de035a136..9f1eed466b9 100644 --- a/test/abilities/infiltrator.test.ts +++ b/test/abilities/infiltrator.test.ts @@ -1,13 +1,13 @@ +import { allMoves } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allMoves } from "#app/data/data-lists"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type"; -import { Stat } from "#enums/stat"; -import { StatusEffect } from "#enums/status-effect"; -import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/innards-out.test.ts b/test/abilities/innards-out.test.ts new file mode 100644 index 00000000000..a10465ce1cb --- /dev/null +++ b/test/abilities/innards-out.test.ts @@ -0,0 +1,62 @@ +import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Abilities - Innards Out", () => { + 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 + .ability(AbilityId.BALL_FETCH) + .battleStyle("single") + .criticalHits(false) + .enemySpecies(SpeciesId.MAGIKARP) + .enemyAbility(AbilityId.INNARDS_OUT) + .enemyMoveset(MoveId.SPLASH) + .startingLevel(100); + }); + + it("should damage opppnents that faint the ability holder for equal damage", async () => { + await game.classicMode.startBattle([SpeciesId.FEEBAS]); + + const magikarp = game.field.getEnemyPokemon(); + magikarp.hp = 20; + game.move.use(MoveId.X_SCISSOR); + await game.toEndOfTurn(); + + expect(magikarp.isFainted()).toBe(true); + const feebas = game.field.getPlayerPokemon(); + expect(feebas.getInverseHp()).toBe(20); + }); + + it("should not damage an ally in Double Battles", async () => { + game.override.battleStyle("double"); + await game.classicMode.startBattle([SpeciesId.FEEBAS]); + + const [magikarp1, magikarp2] = game.scene.getEnemyField(); + magikarp1.hp = 1; + + game.move.use(MoveId.PROTECT); + await game.move.forceEnemyMove(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.SURF); + await game.toEndOfTurn(); + + expect(magikarp1.isFainted()).toBe(true); + expect(magikarp2.getInverseHp()).toBe(0); + }); +}); diff --git a/test/abilities/insomnia.test.ts b/test/abilities/insomnia.test.ts index 800663823c3..2f683b516eb 100644 --- a/test/abilities/insomnia.test.ts +++ b/test/abilities/insomnia.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/intimidate.test.ts b/test/abilities/intimidate.test.ts index 6790e2b98d3..9ff408aaeb5 100644 --- a/test/abilities/intimidate.test.ts +++ b/test/abilities/intimidate.test.ts @@ -1,11 +1,10 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { UiMode } from "#enums/ui-mode"; -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Abilities - Intimidate", () => { let phaserGame: Phaser.Game; @@ -24,109 +23,68 @@ describe("Abilities - Intimidate", () => { beforeEach(() => { game = new GameManager(phaserGame); game.override + .criticalHits(false) .battleStyle("single") .enemySpecies(SpeciesId.RATTATA) .enemyAbility(AbilityId.INTIMIDATE) - .enemyPassiveAbility(AbilityId.HYDRATION) .ability(AbilityId.INTIMIDATE) - .startingWave(3) + .passiveAbility(AbilityId.NO_GUARD) .enemyMoveset(MoveId.SPLASH); }); - it("should lower ATK stat stage by 1 of enemy Pokemon on entry and player switch", async () => { - await game.classicMode.runToSummon([SpeciesId.MIGHTYENA, SpeciesId.POOCHYENA]); - game.onNextPrompt( - "CheckSwitchPhase", - UiMode.CONFIRM, - () => { - game.setMode(UiMode.MESSAGE); - game.endPhase(); - }, - () => game.isCurrentPhase("CommandPhase") || game.isCurrentPhase("TurnInitPhase"), - ); - await game.phaseInterceptor.to("CommandPhase", false); + it("should lower all opponents' ATK by 1 stage on entry and switch", async () => { + await game.classicMode.startBattle([SpeciesId.MIGHTYENA, SpeciesId.POOCHYENA]); - let playerPokemon = game.scene.getPlayerPokemon()!; - const enemyPokemon = game.scene.getEnemyPokemon()!; - - expect(playerPokemon.species.speciesId).toBe(SpeciesId.MIGHTYENA); - expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); - expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); + const enemy = game.field.getEnemyPokemon(); + expect(enemy.getStatStage(Stat.ATK)).toBe(-1); game.doSwitchPokemon(1); - await game.phaseInterceptor.run("CommandPhase"); - await game.phaseInterceptor.to("CommandPhase"); - - playerPokemon = game.scene.getPlayerPokemon()!; - expect(playerPokemon.species.speciesId).toBe(SpeciesId.POOCHYENA); - expect(playerPokemon.getStatStage(Stat.ATK)).toBe(0); - expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-2); - }); - - it("should lower ATK stat stage by 1 for every enemy Pokemon in a double battle on entry", async () => { - game.override.battleStyle("double").startingWave(3); - await game.classicMode.runToSummon([SpeciesId.MIGHTYENA, SpeciesId.POOCHYENA]); - game.onNextPrompt( - "CheckSwitchPhase", - UiMode.CONFIRM, - () => { - game.setMode(UiMode.MESSAGE); - game.endPhase(); - }, - () => game.isCurrentPhase("CommandPhase") || game.isCurrentPhase("TurnInitPhase"), - ); - await game.phaseInterceptor.to("CommandPhase", false); - - const playerField = game.scene.getPlayerField()!; - const enemyField = game.scene.getEnemyField()!; - - 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); - }); - - it("should not activate again if there is no switch or new entry", async () => { - game.override.startingWave(2).moveset([MoveId.SPLASH]); - await game.classicMode.startBattle([SpeciesId.MIGHTYENA, SpeciesId.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(MoveId.SPLASH); await game.toNextTurn(); - expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); - expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); + expect(enemy.getStatStage(Stat.ATK)).toBe(-2); }); - it("should lower ATK stat stage by 1 for every switch", async () => { - game.override.moveset([MoveId.SPLASH]).enemyMoveset([MoveId.VOLT_SWITCH]).startingWave(5); - await game.classicMode.startBattle([SpeciesId.MIGHTYENA, SpeciesId.POOCHYENA]); + it("should lower ATK of all opponents in a double battle", async () => { + game.override.battleStyle("double"); + await game.classicMode.startBattle([SpeciesId.MIGHTYENA]); - const playerPokemon = game.scene.getPlayerPokemon()!; - let enemyPokemon = game.scene.getEnemyPokemon()!; + const [enemy1, enemy2] = game.scene.getEnemyField(); - expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); - expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1); + expect(enemy1.getStatStage(Stat.ATK)).toBe(-1); + expect(enemy2.getStatStage(Stat.ATK)).toBe(-1); + }); - game.move.select(MoveId.SPLASH); + it("should not trigger on switching moves used by wild Pokemon", async () => { + game.override.enemyMoveset(MoveId.VOLT_SWITCH); + await game.classicMode.startBattle([SpeciesId.VENUSAUR]); + + const player = game.field.getPlayerPokemon(); + expect(player.getStatStage(Stat.ATK)).toBe(-1); + + game.move.use(MoveId.SPLASH); await game.toNextTurn(); - enemyPokemon = game.scene.getEnemyPokemon()!; + // doesn't lower attack due to not actually switching out + expect(player.getStatStage(Stat.ATK)).toBe(-1); + }); - expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-2); - expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + it("should trigger on moves that switch user/target out during trainer battles", async () => { + game.override.startingWave(5).enemyLevel(100); + await game.classicMode.startBattle([SpeciesId.MIGHTYENA]); - game.move.select(MoveId.SPLASH); + const player = game.field.getPlayerPokemon(); + expect(player.getStatStage(Stat.ATK)).toBe(-1); + + game.move.use(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.TELEPORT); await game.toNextTurn(); - enemyPokemon = game.scene.getEnemyPokemon()!; + expect(player.getStatStage(Stat.ATK)).toBe(-2); - expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-3); - expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0); + game.move.use(MoveId.DRAGON_TAIL); + await game.move.forceEnemyMove(MoveId.SPLASH); + await game.toNextTurn(); + + expect(player.getStatStage(Stat.ATK)).toBe(-3); }); }); diff --git a/test/abilities/intrepid_sword.test.ts b/test/abilities/intrepid_sword.test.ts index d9b81e9552e..7465b331791 100644 --- a/test/abilities/intrepid_sword.test.ts +++ b/test/abilities/intrepid_sword.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; -import { CommandPhase } from "#app/phases/command-phase"; import { AbilityId } from "#enums/ability-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/libero.test.ts b/test/abilities/libero.test.ts deleted file mode 100644 index eaa2630e90d..00000000000 --- a/test/abilities/libero.test.ts +++ /dev/null @@ -1,297 +0,0 @@ -import { allMoves } from "#app/data/data-lists"; -import { PokemonType } from "#enums/pokemon-type"; -import { Weather } from "#app/data/weather"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { BiomeId } from "#enums/biome-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; - -describe("Abilities - Libero", () => { - 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 - .battleStyle("single") - .ability(AbilityId.LIBERO) - .startingLevel(100) - .enemySpecies(SpeciesId.RATTATA) - .enemyMoveset(MoveId.ENDURE); - }); - - test("ability applies and changes a pokemon's type", async () => { - game.override.moveset([MoveId.SPLASH]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.SPLASH); - }); - - // Test for Gen9+ functionality, we are using previous funcionality - test.skip("ability applies only once per switch in", async () => { - game.override.moveset([MoveId.SPLASH, MoveId.AGILITY]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.BULBASAUR]); - - let leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.SPLASH); - - game.move.select(MoveId.AGILITY); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).toContain(AbilityId.LIBERO); - const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]]; - const moveType = PokemonType[allMoves[MoveId.AGILITY].type]; - expect(leadPokemonType).not.toBe(moveType); - - await game.toNextTurn(); - game.doSwitchPokemon(1); - await game.toNextTurn(); - game.doSwitchPokemon(1); - await game.toNextTurn(); - - leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.SPLASH); - }); - - test("ability applies correctly even if the pokemon's move has a variable type", async () => { - game.override.moveset([MoveId.WEATHER_BALL]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.scene.arena.weather = new Weather(WeatherType.SUNNY); - game.move.select(MoveId.WEATHER_BALL); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).toContain(AbilityId.LIBERO); - expect(leadPokemon.getTypes()).toHaveLength(1); - const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]], - moveType = PokemonType[PokemonType.FIRE]; - expect(leadPokemonType).toBe(moveType); - }); - - test("ability applies correctly even if the type has changed by another ability", async () => { - game.override.moveset([MoveId.TACKLE]).passiveAbility(AbilityId.REFRIGERATE); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).toContain(AbilityId.LIBERO); - expect(leadPokemon.getTypes()).toHaveLength(1); - const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]], - moveType = PokemonType[PokemonType.ICE]; - expect(leadPokemonType).toBe(moveType); - }); - - test("ability applies correctly even if the pokemon's move calls another move", async () => { - game.override.moveset([MoveId.NATURE_POWER]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.scene.arena.biomeType = BiomeId.MOUNTAIN; - game.move.select(MoveId.NATURE_POWER); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.AIR_SLASH); - }); - - test("ability applies correctly even if the pokemon's move is delayed / charging", async () => { - game.override.moveset([MoveId.DIG]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.DIG); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.DIG); - }); - - test("ability applies correctly even if the pokemon's move misses", async () => { - game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.SPLASH); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.move.forceMiss(); - await game.phaseInterceptor.to(TurnEndPhase); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon.isFullHp()).toBe(true); - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TACKLE); - }); - - test("ability applies correctly even if the pokemon's move is protected against", async () => { - game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.PROTECT); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TACKLE); - }); - - test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => { - game.override.moveset([MoveId.TACKLE]).enemySpecies(SpeciesId.GASTLY); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TACKLE); - }); - - test("ability is not applied if pokemon's type is the same as the move's type", async () => { - game.override.moveset([MoveId.SPLASH]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - leadPokemon.summonData.types = [allMoves[MoveId.SPLASH].type]; - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.LIBERO); - }); - - test("ability is not applied if pokemon is terastallized", async () => { - game.override.moveset([MoveId.SPLASH]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - leadPokemon.isTerastallized = true; - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.LIBERO); - }); - - test("ability is not applied if pokemon uses struggle", async () => { - game.override.moveset([MoveId.STRUGGLE]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.STRUGGLE); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.LIBERO); - }); - - test("ability is not applied if the pokemon's move fails", async () => { - game.override.moveset([MoveId.BURN_UP]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.BURN_UP); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.LIBERO); - }); - - test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => { - game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(SpeciesId.GASTLY); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TRICK_OR_TREAT); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TRICK_OR_TREAT); - }); - - test("ability applies correctly and the pokemon curses itself", async () => { - game.override.moveset([MoveId.CURSE]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.CURSE); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.CURSE); - expect(leadPokemon.getTag(BattlerTagType.CURSED)).not.toBe(undefined); - }); -}); - -function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: MoveId) { - expect(pokemon.waveData.abilitiesApplied).toContain(AbilityId.LIBERO); - expect(pokemon.getTypes()).toHaveLength(1); - const pokemonType = PokemonType[pokemon.getTypes()[0]], - moveType = PokemonType[allMoves[move].type]; - expect(pokemonType).toBe(moveType); -} diff --git a/test/abilities/lightningrod.test.ts b/test/abilities/lightningrod.test.ts index 678aa2431ac..2d5b6881869 100644 --- a/test/abilities/lightningrod.test.ts +++ b/test/abilities/lightningrod.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/limber.test.ts b/test/abilities/limber.test.ts index 77acd8b3dab..ed140c09fb1 100644 --- a/test/abilities/limber.test.ts +++ b/test/abilities/limber.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/magic_bounce.test.ts b/test/abilities/magic_bounce.test.ts index 04bfcbbfe8f..84b4cea8376 100644 --- a/test/abilities/magic_bounce.test.ts +++ b/test/abilities/magic_bounce.test.ts @@ -1,15 +1,14 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allAbilities } from "#app/data/data-lists"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allMoves } from "#app/data/data-lists"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { Stat } from "#app/enums/stat"; -import { StatusEffect } from "#app/enums/status-effect"; +import { allAbilities, allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - Magic Bounce", () => { @@ -160,7 +159,8 @@ describe("Abilities - Magic Bounce", () => { expect(game.scene.getEnemyPokemon()!.getTag(BattlerTagType.CURSED)).toBeDefined(); }); - it("should not cause encore to be interrupted after bouncing", async () => { + // TODO: enable when Magic Bounce is fixed to properly reset the hit count + it.todo("should not cause encore to be interrupted after bouncing", async () => { game.override.moveset([MoveId.SPLASH, MoveId.GROWL, MoveId.ENCORE]).enemyMoveset([MoveId.TACKLE, MoveId.GROWL]); // game.override.ability(AbilityId.MOLD_BREAKER); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -168,7 +168,7 @@ describe("Abilities - Magic Bounce", () => { const enemyPokemon = game.scene.getEnemyPokemon()!; // Give the player MOLD_BREAKER for this turn to bypass Magic Bounce. - vi.spyOn(playerPokemon, "getAbility").mockReturnValue(allAbilities[AbilityId.MOLD_BREAKER]); + const playerAbilitySpy = game.field.mockAbility(playerPokemon, AbilityId.MOLD_BREAKER); // turn 1 game.move.select(MoveId.ENCORE); @@ -178,7 +178,7 @@ describe("Abilities - Magic Bounce", () => { expect(enemyPokemon.getTag(BattlerTagType.ENCORE)!["moveId"]).toBe(MoveId.TACKLE); // turn 2 - vi.spyOn(playerPokemon, "getAbility").mockRestore(); + playerAbilitySpy.mockRestore(); game.move.select(MoveId.GROWL); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("BerryPhase"); diff --git a/test/abilities/magic_guard.test.ts b/test/abilities/magic_guard.test.ts index f135a761bba..63b22f347fb 100644 --- a/test/abilities/magic_guard.test.ts +++ b/test/abilities/magic_guard.test.ts @@ -1,19 +1,17 @@ -import { getArenaTag } from "#app/data/arena-tag"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { getStatusEffectCatchRateMultiplier } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagType } from "#enums/arena-tag-type"; -import { BattlerTagType } from "#enums/battler-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -describe("Abilities - Magic Guard", () => { +describe("AbilityId - Magic Guard", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -29,404 +27,142 @@ describe("Abilities - Magic Guard", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override - /** Player Pokemon overrides */ .ability(AbilityId.MAGIC_GUARD) - .moveset([MoveId.SPLASH]) + .enemySpecies(SpeciesId.BLISSEY) + .enemyAbility(AbilityId.NO_GUARD) .startingLevel(100) - /** Enemy Pokemon overrides */ - .enemySpecies(SpeciesId.SNORLAX) - .enemyAbility(AbilityId.INSOMNIA) - .enemyMoveset(MoveId.SPLASH) .enemyLevel(100); }); //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Magic_Guard_(Ability) - it("ability should prevent damage caused by weather", async () => { - game.override.weather(WeatherType.SANDSTORM); - + it.each<{ name: string; move?: MoveId; enemyMove?: MoveId }>([ + { name: "Non-Volatile Status Conditions", enemyMove: MoveId.TOXIC }, + { name: "Volatile Status Conditions", enemyMove: MoveId.LEECH_SEED }, + { name: "Crash Damage", move: MoveId.HIGH_JUMP_KICK, enemyMove: MoveId.PROTECT }, // Protect triggers crash damage + { name: "Variable Recoil Moves", move: MoveId.DOUBLE_EDGE }, + { name: "HP% Recoil Moves", move: MoveId.CHLOROBLAST }, + ])("should prevent damage from $name", async ({ move = MoveId.SPLASH, enemyMove = MoveId.SPLASH }) => { await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - const leadPokemon = game.scene.getPlayerPokemon()!; + game.move.use(move); + await game.move.forceEnemyMove(enemyMove); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toEndOfTurn(); - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon).toBeDefined(); - - game.move.select(MoveId.SPLASH); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) has not taken damage from weather - * - The enemy Pokemon (without Magic Guard) has taken damage from weather - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); + const magikarp = game.field.getPlayerPokemon(); + expect(magikarp.hp).toBe(magikarp.getMaxHp()); }); - it("ability should prevent damage caused by status effects but other non-damage effects still apply", async () => { - //Toxic keeps track of the turn counters -> important that Magic Guard keeps track of post-Toxic turns - game.override.statusEffect(StatusEffect.POISON); + it.each<{ abName: string; move?: MoveId; enemyMove?: MoveId; passive?: AbilityId; enemyAbility?: AbilityId }>([ + { abName: "Bad Dreams", enemyMove: MoveId.SPORE, enemyAbility: AbilityId.BAD_DREAMS }, + { abName: "Aftermath", move: MoveId.PSYCHIC_FANGS, enemyAbility: AbilityId.AFTERMATH }, + { abName: "Innards Out", move: MoveId.PSYCHIC_FANGS, enemyAbility: AbilityId.INNARDS_OUT }, + { abName: "Rough Skin", move: MoveId.PSYCHIC_FANGS, enemyAbility: AbilityId.ROUGH_SKIN }, + { abName: "Dry Skin", move: MoveId.SUNNY_DAY, passive: AbilityId.DRY_SKIN }, + { abName: "Liquid Ooze", move: MoveId.DRAIN_PUNCH, enemyAbility: AbilityId.LIQUID_OOZE }, + ])( + "should prevent damage from $abName", + async ({ + move = MoveId.SPLASH, + enemyMove = MoveId.SPLASH, + passive = AbilityId.BALL_FETCH, + enemyAbility = AbilityId.BALL_FETCH, + }) => { + game.override.enemyLevel(1).passiveAbility(passive).enemyAbility(enemyAbility); + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + game.move.use(move); + await game.move.forceEnemyMove(enemyMove); + await game.toEndOfTurn(); + + const magikarp = game.field.getPlayerPokemon(); + expect(magikarp.hp).toBe(magikarp.getMaxHp()); + }, + ); + + it.each<{ name: string; move?: MoveId; enemyMove?: MoveId }>([ + { name: "Struggle recoil", move: MoveId.STRUGGLE }, + { name: "Self-induced HP cutting", move: MoveId.BELLY_DRUM }, + { name: "Confusion self-damage", enemyMove: MoveId.CONFUSE_RAY }, + ])("should not prevent damage from $name", async ({ move = MoveId.SPLASH, enemyMove = MoveId.SPLASH }) => { + game.override.confusionActivation(true); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - const leadPokemon = game.scene.getPlayerPokemon()!; + game.move.use(move); + await game.move.forceEnemyMove(enemyMove); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); // Ensure confuse ray goes first + await game.toEndOfTurn(); - game.move.select(MoveId.SPLASH); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) has not taken damage from poison - * - The Pokemon's CatchRateMultiplier should be 1.5 - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(getStatusEffectCatchRateMultiplier(leadPokemon.status!.effect)).toBe(1.5); + const magikarp = game.field.getPlayerPokemon(); + expect(magikarp.hp).toBeLessThan(magikarp.getMaxHp()); }); - it("ability effect should not persist when the ability is replaced", async () => { - game.override.enemyMoveset(MoveId.WORRY_SEED).statusEffect(StatusEffect.POISON); - + it("should preserve toxic turn count and deal appropriate damage when disabled", async () => { + game.override.statusEffect(StatusEffect.TOXIC); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - const leadPokemon = game.scene.getPlayerPokemon()!; + game.move.use(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.SPLASH); + await game.toNextTurn(); - game.move.select(MoveId.SPLASH); + const magikarp = game.field.getPlayerPokemon(); + expect(magikarp.hp).toBe(magikarp.getMaxHp()); + expect(magikarp.status?.toxicTurnCount).toBe(1); - await game.phaseInterceptor.to(TurnEndPhase); + // have a few turns pass + game.move.use(MoveId.SPLASH); + await game.toNextTurn(); + game.move.use(MoveId.SPLASH); + await game.toNextTurn(); + game.move.use(MoveId.SPLASH); + await game.toNextTurn(); - /** - * Expect: - * - The player Pokemon (that just lost its Magic Guard ability) has taken damage from poison - */ - expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp()); + expect(magikarp.status?.toxicTurnCount).toBe(4); + + game.move.use(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.GASTRO_ACID); + await game.toNextTurn(); + + expect(magikarp.status?.toxicTurnCount).toBe(5); + expect(magikarp.getHpRatio(true)).toBeCloseTo(11 / 16, 1); }); - it("Magic Guard prevents damage caused by burn but other non-damaging effects are still applied", async () => { - game.override.enemyStatusEffect(StatusEffect.BURN).enemyAbility(AbilityId.MAGIC_GUARD); - + it("should preserve burn physical damage halving & status catch boost", async () => { await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - game.move.select(MoveId.SPLASH); + // NB: Burn applies directly to the physical dmg formula, so we can't just check attack here + game.move.use(MoveId.TACKLE); + await game.move.forceEnemyMove(MoveId.WILL_O_WISP); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toNextTurn(); - const enemyPokemon = game.scene.getEnemyPokemon()!; + const magikarp = game.field.getPlayerPokemon(); + expect(magikarp.hp).toBe(magikarp.getMaxHp()); + expect(magikarp.status?.effect).toBe(StatusEffect.BURN); + expect(getStatusEffectCatchRateMultiplier(magikarp.status!.effect)).toBe(1.5); - await game.phaseInterceptor.to(TurnEndPhase); + // Heal blissey to full & use tackle again + const blissey = game.field.getEnemyPokemon(); + const prevDmg = blissey.getInverseHp(); + blissey.hp = blissey.getMaxHp(); - /** - * Expect: - * - The enemy Pokemon (with Magic Guard) has not taken damage from burn - * - The enemy Pokemon's physical attack damage is halved (TBD) - * - The enemy Pokemon's hypothetical CatchRateMultiplier should be 1.5 - */ - expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); - expect(getStatusEffectCatchRateMultiplier(enemyPokemon.status!.effect)).toBe(1.5); + game.move.use(MoveId.TACKLE); + await game.toNextTurn(); + + const burntDmg = blissey.getInverseHp(); + expect(burntDmg).toBeCloseTo(toDmgValue(prevDmg / 2), 0); }); - it("Magic Guard prevents damage caused by toxic but other non-damaging effects are still applied", async () => { - game.override.enemyStatusEffect(StatusEffect.TOXIC).enemyAbility(AbilityId.MAGIC_GUARD); - + it("should prevent damage from entry hazards, but not Toxic Spikes poison", async () => { + game.scene.arena.addTag(ArenaTagType.SPIKES, -1, MoveId.SPIKES, 0, ArenaTagSide.PLAYER); + game.scene.arena.addTag(ArenaTagType.TOXIC_SPIKES, -1, MoveId.TOXIC_SPIKES, 0, ArenaTagSide.PLAYER); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - game.move.select(MoveId.SPLASH); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - - const toxicStartCounter = enemyPokemon.status!.toxicTurnCount; - //should be 0 - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The enemy Pokemon (with Magic Guard) has not taken damage from toxic - * - The enemy Pokemon's status effect duration should be incremented - * - The enemy Pokemon's hypothetical CatchRateMultiplier should be 1.5 - */ - expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); - expect(enemyPokemon.status!.toxicTurnCount).toBeGreaterThan(toxicStartCounter); - expect(getStatusEffectCatchRateMultiplier(enemyPokemon.status!.effect)).toBe(1.5); - }); - - it("Magic Guard prevents damage caused by entry hazards", async () => { - //Adds and applies Spikes to both sides of the arena - const newTag = getArenaTag(ArenaTagType.SPIKES, 5, MoveId.SPIKES, 0, 0, ArenaTagSide.BOTH)!; - game.scene.arena.tags.push(newTag); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.SPLASH); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) has not taken damage from spikes - * - The enemy Pokemon (without Magic Guard) has taken damage from spikes - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); - }); - - it("Magic Guard does not prevent poison from Toxic Spikes", async () => { - //Adds and applies Spikes to both sides of the arena - const playerTag = getArenaTag(ArenaTagType.TOXIC_SPIKES, 5, MoveId.TOXIC_SPIKES, 0, 0, ArenaTagSide.PLAYER)!; - const enemyTag = getArenaTag(ArenaTagType.TOXIC_SPIKES, 5, MoveId.TOXIC_SPIKES, 0, 0, ArenaTagSide.ENEMY)!; - game.scene.arena.tags.push(playerTag); - game.scene.arena.tags.push(enemyTag); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.SPLASH); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - Both Pokemon gain the poison status effect - * - The player Pokemon (with Magic Guard) has not taken damage from poison - * - The enemy Pokemon (without Magic Guard) has taken damage from poison - */ - expect(leadPokemon.status!.effect).toBe(StatusEffect.POISON); - expect(enemyPokemon.status!.effect).toBe(StatusEffect.POISON); - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); - }); - - it("Magic Guard prevents against damage from volatile status effects", async () => { - await game.classicMode.startBattle([SpeciesId.DUSKULL]); - game.override.moveset([MoveId.CURSE]).enemyAbility(AbilityId.MAGIC_GUARD); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.CURSE); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) has cut its HP to inflict curse - * - The enemy Pokemon (with Magic Guard) is cursed - * - The enemy Pokemon (with Magic Guard) does not lose HP from being cursed - */ - expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp()); - expect(enemyPokemon.getTag(BattlerTagType.CURSED)).not.toBe(undefined); - expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); - }); - - it("Magic Guard prevents crash damage", async () => { - game.override.moveset([MoveId.HIGH_JUMP_KICK]); - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.HIGH_JUMP_KICK); - await game.move.forceMiss(); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) misses High Jump Kick but does not lose HP as a result - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - }); - - it("Magic Guard prevents damage from recoil", async () => { - game.override.moveset([MoveId.TAKE_DOWN]); - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.TAKE_DOWN); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) uses a recoil move but does not lose HP from recoil - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - }); - - it("Magic Guard does not prevent damage from Struggle's recoil", async () => { - game.override.moveset([MoveId.STRUGGLE]); - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.STRUGGLE); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) uses Struggle but does lose HP from Struggle's recoil - */ - expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp()); - }); - - //This tests different move attributes than the recoil tests above - it("Magic Guard prevents self-damage from attacking moves", async () => { - game.override.moveset([MoveId.STEEL_BEAM]); - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.STEEL_BEAM); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) uses a move with an HP cost but does not lose HP from using it - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - }); - - /* - it("Magic Guard does not prevent self-damage from confusion", async () => { - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - game.move.select(MoveId.CHARM); - - await game.phaseInterceptor.to(TurnEndPhase); - }); -*/ - - it("Magic Guard does not prevent self-damage from non-attacking moves", async () => { - game.override.moveset([MoveId.BELLY_DRUM]); - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.BELLY_DRUM); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) uses a non-attacking move with an HP cost and thus loses HP from using it - */ - expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp()); - }); - - it("Magic Guard prevents damage from abilities with PostTurnHurtIfSleepingAbAttr", async () => { - //Tests the ability Bad Dreams - game.override.statusEffect(StatusEffect.SLEEP); - //enemy pokemon is given Spore just in case player pokemon somehow awakens during test - game.override - .enemyMoveset([MoveId.SPORE, MoveId.SPORE, MoveId.SPORE, MoveId.SPORE]) - .enemyAbility(AbilityId.BAD_DREAMS); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.SPLASH); - - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) should not lose HP due to this ability attribute - * - The player Pokemon is asleep - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - expect(leadPokemon.status!.effect).toBe(StatusEffect.SLEEP); - }); - - it("Magic Guard prevents damage from abilities with PostFaintContactDamageAbAttr", async () => { - //Tests the abilities Innards Out/Aftermath - game.override.moveset([MoveId.TACKLE]).enemyAbility(AbilityId.AFTERMATH); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - const enemyPokemon = game.scene.getEnemyPokemon()!; - enemyPokemon.hp = 1; - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) should not lose HP due to this ability attribute - * - The enemy Pokemon has fainted - */ - expect(enemyPokemon.hp).toBe(0); - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - }); - - it("Magic Guard prevents damage from abilities with PostDefendContactDamageAbAttr", async () => { - //Tests the abilities Iron Barbs/Rough Skin - game.override.moveset([MoveId.TACKLE]).enemyAbility(AbilityId.IRON_BARBS); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - const enemyPokemon = game.scene.getEnemyPokemon()!; - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) should not lose HP due to this ability attribute - * - The player Pokemon's move should have connected - */ - expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - }); - - it("Magic Guard prevents damage from abilities with ReverseDrainAbAttr", async () => { - //Tests the ability Liquid Ooze - game.override.moveset([MoveId.ABSORB]).enemyAbility(AbilityId.LIQUID_OOZE); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - - const enemyPokemon = game.scene.getEnemyPokemon()!; - - game.move.select(MoveId.ABSORB); - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) should not lose HP due to this ability attribute - * - The player Pokemon's move should have connected - */ - expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); - }); - - it("Magic Guard prevents HP loss from abilities with PostWeatherLapseDamageAbAttr", async () => { - game.override.passiveAbility(AbilityId.SOLAR_POWER).weather(WeatherType.SUNNY); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - const leadPokemon = game.scene.getPlayerPokemon()!; - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - /** - * Expect: - * - The player Pokemon (with Magic Guard) should not lose HP due to this ability attribute - */ - expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp()); + // Magic guard prevented damage but not poison + const player = game.field.getPlayerPokemon(); + expect(player.hp).toBe(player.getMaxHp()); + expect(player.status?.effect).toBe(StatusEffect.POISON); }); }); diff --git a/test/abilities/magma_armor.test.ts b/test/abilities/magma_armor.test.ts index 0a8f3024291..cc40ea9f679 100644 --- a/test/abilities/magma_armor.test.ts +++ b/test/abilities/magma_armor.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/mimicry.test.ts b/test/abilities/mimicry.test.ts index 7ac7aeb599f..f377ab89ffe 100644 --- a/test/abilities/mimicry.test.ts +++ b/test/abilities/mimicry.test.ts @@ -1,8 +1,8 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { PokemonType } from "#enums/pokemon-type"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/mirror_armor.test.ts b/test/abilities/mirror_armor.test.ts index 71b072c7d06..4d4ee973527 100644 --- a/test/abilities/mirror_armor.test.ts +++ b/test/abilities/mirror_armor.test.ts @@ -1,11 +1,11 @@ -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { BattlerIndex } from "#enums/battler-index"; // TODO: When Magic Bounce is implemented, make a test for its interaction with mirror guard, use screech diff --git a/test/abilities/mold_breaker.test.ts b/test/abilities/mold_breaker.test.ts index 3fac3448f4d..c3214cdc224 100644 --- a/test/abilities/mold_breaker.test.ts +++ b/test/abilities/mold_breaker.test.ts @@ -1,7 +1,7 @@ +import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/moody.test.ts b/test/abilities/moody.test.ts index bca3d57a70a..150456bc0f7 100644 --- a/test/abilities/moody.test.ts +++ b/test/abilities/moody.test.ts @@ -1,8 +1,8 @@ -import { BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/moxie.test.ts b/test/abilities/moxie.test.ts index 1c4acf139e4..882b4b0df2f 100644 --- a/test/abilities/moxie.test.ts +++ b/test/abilities/moxie.test.ts @@ -1,14 +1,14 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { VictoryPhase } from "#phases/victory-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { BattlerIndex } from "#enums/battler-index"; -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; diff --git a/test/abilities/mummy.test.ts b/test/abilities/mummy.test.ts index d6c40541d25..6c94fea407b 100644 --- a/test/abilities/mummy.test.ts +++ b/test/abilities/mummy.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/mycelium_might.test.ts b/test/abilities/mycelium_might.test.ts index 56af51c00f7..fa3ab8e5301 100644 --- a/test/abilities/mycelium_might.test.ts +++ b/test/abilities/mycelium_might.test.ts @@ -1,10 +1,10 @@ -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; -import { Stat } from "#enums/stat"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/neutralizing_gas.test.ts b/test/abilities/neutralizing_gas.test.ts index ec1197c30ca..bcc00e4249a 100644 --- a/test/abilities/neutralizing_gas.test.ts +++ b/test/abilities/neutralizing_gas.test.ts @@ -1,16 +1,16 @@ -import { BattlerIndex } from "#enums/battler-index"; -import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#enums/command"; +import { globalScene } from "#app/global-scene"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { Command } from "#enums/command"; import { MoveId } from "#enums/move-id"; import { PokeballType } from "#enums/pokeball"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import type { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { globalScene } from "#app/global-scene"; describe("Abilities - Neutralizing Gas", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/no_guard.test.ts b/test/abilities/no_guard.test.ts index dc35e0e1b9a..f6f55ce3b80 100644 --- a/test/abilities/no_guard.test.ts +++ b/test/abilities/no_guard.test.ts @@ -1,13 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { HitCheckResult } from "#enums/hit-check-result"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { HitCheckResult } from "#enums/hit-check-result"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - No Guard", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/normal-move-type-change.test.ts b/test/abilities/normal-move-type-change.test.ts index d9e39b32a7c..aa673ddde29 100644 --- a/test/abilities/normal-move-type-change.test.ts +++ b/test/abilities/normal-move-type-change.test.ts @@ -1,15 +1,14 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import { PokemonType } from "#enums/pokemon-type"; +import { TYPE_BOOST_ITEM_BOOST_PERCENT } from "#app/constants"; +import { allAbilities, allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { TYPE_BOOST_ITEM_BOOST_PERCENT } from "#app/constants"; -import { allAbilities } from "#app/data/data-lists"; -import { toDmgValue } from "#app/utils/common"; /** * Tests for abilities that change the type of normal moves to diff --git a/test/abilities/normalize.test.ts b/test/abilities/normalize.test.ts index 1a4b93f3f32..1128dd1a562 100644 --- a/test/abilities/normalize.test.ts +++ b/test/abilities/normalize.test.ts @@ -1,11 +1,11 @@ import { TYPE_BOOST_ITEM_BOOST_PERCENT } from "#app/constants"; -import { allMoves } from "#app/data/data-lists"; -import { toDmgValue } from "#app/utils/common"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/oblivious.test.ts b/test/abilities/oblivious.test.ts index dab8394edd0..8b18fe65455 100644 --- a/test/abilities/oblivious.test.ts +++ b/test/abilities/oblivious.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/own_tempo.test.ts b/test/abilities/own_tempo.test.ts index 869953b4e93..bdb247c4987 100644 --- a/test/abilities/own_tempo.test.ts +++ b/test/abilities/own_tempo.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/parental_bond.test.ts b/test/abilities/parental_bond.test.ts index 9a5ab17da37..4937857c8e1 100644 --- a/test/abilities/parental_bond.test.ts +++ b/test/abilities/parental_bond.test.ts @@ -1,12 +1,12 @@ -import { PokemonType } from "#enums/pokemon-type"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { toDmgValue } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/pastel_veil.test.ts b/test/abilities/pastel_veil.test.ts index b8e8873ed36..88f5415524f 100644 --- a/test/abilities/pastel_veil.test.ts +++ b/test/abilities/pastel_veil.test.ts @@ -1,11 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { CommandPhase } from "#app/phases/command-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -63,7 +62,6 @@ describe("Abilities - Pastel Veil", () => { await game.phaseInterceptor.to(TurnEndPhase); expect(magikarp.status?.effect).toBe(StatusEffect.POISON); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH); game.doSwitchPokemon(2); await game.phaseInterceptor.to(TurnEndPhase); diff --git a/test/abilities/perish_body.test.ts b/test/abilities/perish_body.test.ts index 4852533816b..83a862164a1 100644 --- a/test/abilities/perish_body.test.ts +++ b/test/abilities/perish_body.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/power_construct.test.ts b/test/abilities/power_construct.test.ts index 2ea14597ef9..0917082d7bd 100644 --- a/test/abilities/power_construct.test.ts +++ b/test/abilities/power_construct.test.ts @@ -1,11 +1,11 @@ -import { Status } from "#app/data/status-effect"; -import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; describe("Abilities - POWER CONSTRUCT", () => { diff --git a/test/abilities/power_spot.test.ts b/test/abilities/power_spot.test.ts index 11f75588386..f07ece17245 100644 --- a/test/abilities/power_spot.test.ts +++ b/test/abilities/power_spot.test.ts @@ -1,10 +1,10 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/protean-libero.test.ts b/test/abilities/protean-libero.test.ts new file mode 100644 index 00000000000..35be3fcf63d --- /dev/null +++ b/test/abilities/protean-libero.test.ts @@ -0,0 +1,272 @@ +import { allMoves } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; +import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import type { PlayerPokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Abilities - Protean/Libero", () => { + 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 + .battleStyle("single") + .ability(AbilityId.PROTEAN) + .startingLevel(100) + .moveset([MoveId.CURSE, MoveId.DIG, MoveId.SPLASH]) + .enemySpecies(SpeciesId.RATTATA) + .enemyMoveset(MoveId.SPLASH); + }); + + /** + * Assert that the protean/libero ability triggered to change the user's type to + * the type of its most recently used move. + * Takes into account type overrides from effects. + * @param pokemon - The {@linkcode PlayerPokemon} being checked. + * @remarks + * This will clear the given Pokemon's `abilitiesApplied` set after being called to allow for easier multi-turn testing. + */ + function expectTypeChange(pokemon: PlayerPokemon) { + expect(pokemon.waveData.abilitiesApplied).toContainEqual(expect.toBeOneOf([AbilityId.PROTEAN, AbilityId.LIBERO])); + const lastMove = allMoves[pokemon.getLastXMoves()[0].move]!; + + const pokemonTypes = pokemon.getTypes().map(pt => PokemonType[pt]); + const moveType = PokemonType[pokemon.getMoveType(lastMove)]; + expect(pokemonTypes).toEqual([moveType]); + pokemon.waveData.abilitiesApplied.clear(); + } + + /** + * Assert that the protean/libero ability did NOT trigger to change the user's type to + * the type of its most recently used move. + * Takes into account type overrides from effects. + * @param pokemon - The {@linkcode PlayerPokemon} being checked. + * @remarks + * This will clear the given Pokemon's `abilitiesApplied` set after being called to allow for easier multi-turn testing. + */ + function expectNoTypeChange(pokemon: PlayerPokemon) { + expect(pokemon.waveData.abilitiesApplied).not.toContainEqual( + expect.toBeOneOf([AbilityId.PROTEAN, AbilityId.LIBERO]), + ); + const lastMove = allMoves[pokemon.getLastXMoves()[0].move]!; + + const pokemonTypes = pokemon.getTypes().map(pt => PokemonType[pt]); + const moveType = PokemonType[pokemon.getMoveType(lastMove, true)]; + expect(pokemonTypes).not.toEqual([moveType]); + pokemon.waveData.abilitiesApplied.clear(); + } + + it.each([ + { name: "Protean", ability: AbilityId.PROTEAN }, + { name: "Libero", ability: AbilityId.PROTEAN }, + ])("$name should change the user's type to the type of the move being used", async ({ ability }) => { + game.override.ability(ability); + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + + const leadPokemon = game.field.getPlayerPokemon(); + + game.move.use(MoveId.SPLASH); + await game.toEndOfTurn(); + + expectTypeChange(leadPokemon); + }); + + // Test for Gen9+ functionality, we are using previous funcionality + it.skip("should apply only once per switch in", async () => { + game.override.moveset([MoveId.SPLASH, MoveId.AGILITY]); + await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.BULBASAUR]); + + const bulbasaur = game.field.getPlayerPokemon(); + + game.move.select(MoveId.SPLASH); + await game.toEndOfTurn(); + + expectTypeChange(bulbasaur); + + game.move.select(MoveId.AGILITY); + await game.toEndOfTurn(); + + expectNoTypeChange(bulbasaur); + + // switch out and back in + game.doSwitchPokemon(1); + await game.toNextTurn(); + game.doSwitchPokemon(1); + await game.toNextTurn(); + + expect(bulbasaur.isOnField()).toBe(true); + + game.move.select(MoveId.SPLASH); + await game.toEndOfTurn(); + + expectTypeChange(bulbasaur); + }); + + it.each<{ category: string; move?: MoveId; passive?: AbilityId; enemyMove?: MoveId }>([ + { category: "Variable type Moves'", move: MoveId.WEATHER_BALL, passive: AbilityId.DROUGHT }, + { category: "Type Change Abilities'", passive: AbilityId.REFRIGERATE }, + { category: "Move-calling Moves'", move: MoveId.NATURE_POWER, passive: AbilityId.PSYCHIC_SURGE }, + { category: "Ion Deluge's", enemyMove: MoveId.ION_DELUGE }, + { category: "Electrify's", enemyMove: MoveId.ELECTRIFY }, + ])( + "should respect $category final type", + async ({ move = MoveId.TACKLE, passive = AbilityId.NONE, enemyMove = MoveId.SPLASH }) => { + game.override.passiveAbility(passive); + await game.classicMode.startBattle([SpeciesId.LINOONE]); // Pure normal type for move overrides + + const linoone = game.field.getPlayerPokemon(); + + game.move.use(move); + await game.move.forceEnemyMove(enemyMove); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + // We stop before running `TurnEndPhase` so that the effects of `BattlerTag`s (such as from Electrify) + // are still active when checking the move's type + await game.phaseInterceptor.to("TurnEndPhase", false); + + expectTypeChange(linoone); + }, + ); + + it.each<{ cause: string; move?: MoveId; passive?: AbilityId; enemyMove?: MoveId }>([ + { cause: "misses", move: MoveId.FOCUS_BLAST }, + { cause: "is protected against", enemyMove: MoveId.PROTECT }, + { cause: "is ineffective", move: MoveId.EARTHQUAKE }, + { cause: "matches only one of its types", move: MoveId.NIGHT_SLASH }, + { cause: "is blocked by terrain", move: MoveId.SHADOW_SNEAK, passive: AbilityId.PSYCHIC_SURGE }, + ])( + "should still trigger if the user's move $cause", + async ({ move = MoveId.TACKLE, passive = AbilityId.NONE, enemyMove = MoveId.SPLASH }) => { + game.override.passiveAbility(passive).enemySpecies(SpeciesId.SKARMORY); + await game.classicMode.startBattle([SpeciesId.MEOWSCARADA]); + + vi.spyOn(allMoves[MoveId.FOCUS_BLAST], "accuracy", "get").mockReturnValue(0); + + const meow = game.field.getPlayerPokemon(); + + game.move.use(move); + await game.move.forceEnemyMove(enemyMove); + await game.toEndOfTurn(); + + expectTypeChange(meow); + }, + ); + + it.each<{ cause: string; move?: MoveId; tera?: boolean; passive?: AbilityId }>([ + { cause: "user is terastallized to any type", tera: true }, + { cause: "user uses Struggle", move: MoveId.STRUGGLE }, + { cause: "the user's move is blocked by weather", move: MoveId.FIRE_BLAST, passive: AbilityId.PRIMORDIAL_SEA }, + { cause: "the user's move fails", move: MoveId.BURN_UP }, + ])("should not apply if $cause", async ({ move = MoveId.TACKLE, tera = false, passive = AbilityId.NONE }) => { + game.override.enemyPassiveAbility(passive); + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + + const karp = game.field.getPlayerPokemon(); + + karp.teraType = PokemonType.STEEL; + + game.move.use(move, BattlerIndex.PLAYER, undefined, tera); + await game.toEndOfTurn(); + + expectNoTypeChange(karp); + }); + + it("should not apply if user is already the move's type", async () => { + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + + const karp = game.field.getPlayerPokemon(); + + game.move.use(MoveId.WATERFALL); + await game.toEndOfTurn(); + + expect(karp.waveData.abilitiesApplied.size).toBe(0); + expect(karp.getTypes()).toEqual([allMoves[MoveId.WATERFALL].type]); + }); + + it.each<{ moveName: string; move: MoveId }>([ + { moveName: "Roar", move: MoveId.ROAR }, + { moveName: "Whirlwind", move: MoveId.WHIRLWIND }, + { moveName: "Forest's Curse", move: MoveId.FORESTS_CURSE }, + { moveName: "Trick-or-Treat", move: MoveId.TRICK_OR_TREAT }, + ])("should still apply if the user's $moveName fails", async ({ move }) => { + game.override.battleType(BattleType.TRAINER).enemySpecies(SpeciesId.TREVENANT); // ghost/grass makes both moves fail + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + + const leadPokemon = game.field.getPlayerPokemon(); + + game.move.use(move); + // KO all off-field opponents for Whirlwind and co. + for (const enemyMon of game.scene.getEnemyParty()) { + if (!enemyMon.isActive()) { + enemyMon.hp = 0; + } + } + await game.toEndOfTurn(); + + expectTypeChange(leadPokemon); + }); + + it("should trigger on the first turn of charging moves", async () => { + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + + const karp = game.field.getPlayerPokemon(); + + game.move.select(MoveId.DIG); + await game.toEndOfTurn(); + + expectTypeChange(karp); + + await game.toEndOfTurn(); + expect(karp.waveData.abilitiesApplied).not.toContain(AbilityId.PROTEAN); + }); + + it("should cause the user to cast Ghost-type Curse on itself", async () => { + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + + const karp = game.field.getPlayerPokemon(); + expect(karp.isOfType(PokemonType.GHOST)).toBe(false); + + game.move.select(MoveId.CURSE); + await game.toEndOfTurn(); + + expectTypeChange(karp); + expect(karp.getHpRatio(true)).toBeCloseTo(0.25); + expect(karp.getTag(BattlerTagType.CURSED)).toBeDefined(); + }); + + it("should not trigger during Focus Punch's start-of-turn message or being interrupted", async () => { + game.override.moveset(MoveId.FOCUS_PUNCH).enemyMoveset(MoveId.ABSORB); + await game.classicMode.startBattle([SpeciesId.MAGIKARP]); + + const karp = game.field.getPlayerPokemon(); + expect(karp.isOfType(PokemonType.FIGHTING)).toBe(false); + + game.move.select(MoveId.FOCUS_PUNCH); + + await game.phaseInterceptor.to("MessagePhase"); + expect(karp.isOfType(PokemonType.FIGHTING)).toBe(false); + + await game.toEndOfTurn(); + + expectNoTypeChange(karp); + expect(karp.getLastXMoves()[0].result).toBe(MoveResult.FAIL); + }); +}); diff --git a/test/abilities/protean.test.ts b/test/abilities/protean.test.ts deleted file mode 100644 index 09c9addbc35..00000000000 --- a/test/abilities/protean.test.ts +++ /dev/null @@ -1,297 +0,0 @@ -import { allMoves } from "#app/data/data-lists"; -import { PokemonType } from "#enums/pokemon-type"; -import { Weather } from "#app/data/weather"; -import type { PlayerPokemon } from "#app/field/pokemon"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { BiomeId } from "#enums/biome-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; - -describe("Abilities - Protean", () => { - 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 - .battleStyle("single") - .ability(AbilityId.PROTEAN) - .startingLevel(100) - .enemySpecies(SpeciesId.RATTATA) - .enemyMoveset(MoveId.ENDURE); - }); - - test("ability applies and changes a pokemon's type", async () => { - game.override.moveset([MoveId.SPLASH]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.SPLASH); - }); - - // Test for Gen9+ functionality, we are using previous funcionality - test.skip("ability applies only once per switch in", async () => { - game.override.moveset([MoveId.SPLASH, MoveId.AGILITY]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.BULBASAUR]); - - let leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.SPLASH); - - game.move.select(MoveId.AGILITY); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).toContain(AbilityId.PROTEAN); - const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]]; - const moveType = PokemonType[allMoves[MoveId.AGILITY].type]; - expect(leadPokemonType).not.toBe(moveType); - - await game.toNextTurn(); - game.doSwitchPokemon(1); - await game.toNextTurn(); - game.doSwitchPokemon(1); - await game.toNextTurn(); - - leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.SPLASH); - }); - - test("ability applies correctly even if the pokemon's move has a variable type", async () => { - game.override.moveset([MoveId.WEATHER_BALL]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.scene.arena.weather = new Weather(WeatherType.SUNNY); - game.move.select(MoveId.WEATHER_BALL); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).toContain(AbilityId.PROTEAN); - expect(leadPokemon.getTypes()).toHaveLength(1); - const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]], - moveType = PokemonType[PokemonType.FIRE]; - expect(leadPokemonType).toBe(moveType); - }); - - test("ability applies correctly even if the type has changed by another ability", async () => { - game.override.moveset([MoveId.TACKLE]).passiveAbility(AbilityId.REFRIGERATE); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).toContain(AbilityId.PROTEAN); - expect(leadPokemon.getTypes()).toHaveLength(1); - const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]], - moveType = PokemonType[PokemonType.ICE]; - expect(leadPokemonType).toBe(moveType); - }); - - test("ability applies correctly even if the pokemon's move calls another move", async () => { - game.override.moveset([MoveId.NATURE_POWER]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.scene.arena.biomeType = BiomeId.MOUNTAIN; - game.move.select(MoveId.NATURE_POWER); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.AIR_SLASH); - }); - - test("ability applies correctly even if the pokemon's move is delayed / charging", async () => { - game.override.moveset([MoveId.DIG]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.DIG); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.DIG); - }); - - test("ability applies correctly even if the pokemon's move misses", async () => { - game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.SPLASH); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.move.forceMiss(); - await game.phaseInterceptor.to(TurnEndPhase); - - const enemyPokemon = game.scene.getEnemyPokemon()!; - expect(enemyPokemon.isFullHp()).toBe(true); - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TACKLE); - }); - - test("ability applies correctly even if the pokemon's move is protected against", async () => { - game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.PROTECT); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TACKLE); - }); - - test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => { - game.override.moveset([MoveId.TACKLE]).enemySpecies(SpeciesId.GASTLY); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TACKLE); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TACKLE); - }); - - test("ability is not applied if pokemon's type is the same as the move's type", async () => { - game.override.moveset([MoveId.SPLASH]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - leadPokemon.summonData.types = [allMoves[MoveId.SPLASH].type]; - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.PROTEAN); - }); - - test("ability is not applied if pokemon is terastallized", async () => { - game.override.moveset([MoveId.SPLASH]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - leadPokemon.isTerastallized = true; - - game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.PROTEAN); - }); - - test("ability is not applied if pokemon uses struggle", async () => { - game.override.moveset([MoveId.STRUGGLE]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.STRUGGLE); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.PROTEAN); - }); - - test("ability is not applied if the pokemon's move fails", async () => { - game.override.moveset([MoveId.BURN_UP]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.BURN_UP); - await game.phaseInterceptor.to(TurnEndPhase); - - expect(leadPokemon.waveData.abilitiesApplied).not.toContain(AbilityId.PROTEAN); - }); - - test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => { - game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(SpeciesId.GASTLY); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.TRICK_OR_TREAT); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.TRICK_OR_TREAT); - }); - - test("ability applies correctly and the pokemon curses itself", async () => { - game.override.moveset([MoveId.CURSE]); - - await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - - const leadPokemon = game.scene.getPlayerPokemon()!; - expect(leadPokemon).not.toBe(undefined); - - game.move.select(MoveId.CURSE); - await game.phaseInterceptor.to(TurnEndPhase); - - testPokemonTypeMatchesDefaultMoveType(leadPokemon, MoveId.CURSE); - expect(leadPokemon.getTag(BattlerTagType.CURSED)).not.toBe(undefined); - }); -}); - -function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: MoveId) { - expect(pokemon.waveData.abilitiesApplied).toContain(AbilityId.PROTEAN); - expect(pokemon.getTypes()).toHaveLength(1); - const pokemonType = PokemonType[pokemon.getTypes()[0]], - moveType = PokemonType[allMoves[move].type]; - expect(pokemonType).toBe(moveType); -} diff --git a/test/abilities/protosynthesis.test.ts b/test/abilities/protosynthesis.test.ts index ef860fc0cd5..5629ea503d7 100644 --- a/test/abilities/protosynthesis.test.ts +++ b/test/abilities/protosynthesis.test.ts @@ -1,11 +1,11 @@ import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { Nature } from "#enums/nature"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { BattlerIndex } from "#enums/battler-index"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Abilities - Protosynthesis", () => { diff --git a/test/abilities/quick_draw.test.ts b/test/abilities/quick_draw.test.ts index 11418f31375..f881adce5ed 100644 --- a/test/abilities/quick_draw.test.ts +++ b/test/abilities/quick_draw.test.ts @@ -1,9 +1,9 @@ -import { allAbilities } from "#app/data/data-lists"; -import { FaintPhase } from "#app/phases/faint-phase"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { FaintPhase } from "#phases/faint-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; diff --git a/test/abilities/sand_spit.test.ts b/test/abilities/sand_spit.test.ts index 2b519745649..dfd8a342ccc 100644 --- a/test/abilities/sand_spit.test.ts +++ b/test/abilities/sand_spit.test.ts @@ -1,8 +1,8 @@ -import { WeatherType } from "#app/enums/weather-type"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/sand_veil.test.ts b/test/abilities/sand_veil.test.ts index 035b37d85a8..2ad9ef7eaa1 100644 --- a/test/abilities/sand_veil.test.ts +++ b/test/abilities/sand_veil.test.ts @@ -1,14 +1,13 @@ -import type { StatMultiplierAbAttrParams } from "#app/@types/ability-types"; -import { allAbilities } from "#app/data/data-lists"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { StatMultiplierAbAttrParams } from "#types/ability-types"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; @@ -59,9 +58,6 @@ describe("Abilities - Sand Veil", () => { expect(leadPokemon[1].hasAbility(AbilityId.SAND_VEIL)).toBe(false); game.move.select(MoveId.SPLASH); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(MoveEffectPhase, false); diff --git a/test/abilities/sap_sipper.test.ts b/test/abilities/sap_sipper.test.ts index c70730f0711..a8fe10d7fc5 100644 --- a/test/abilities/sap_sipper.test.ts +++ b/test/abilities/sap_sipper.test.ts @@ -1,16 +1,16 @@ -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"; +import { allMoves } from "#data/data-lists"; +import { TerrainType } from "#data/terrain"; import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { RandomMoveAttr } from "#moves/move"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { RandomMoveAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; // See also: TypeImmunityAbAttr describe("Abilities - Sap Sipper", () => { diff --git a/test/abilities/schooling.test.ts b/test/abilities/schooling.test.ts index 646beafb80f..94bb4cb80f9 100644 --- a/test/abilities/schooling.test.ts +++ b/test/abilities/schooling.test.ts @@ -1,11 +1,11 @@ -import { Status } from "#app/data/status-effect"; -import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; describe("Abilities - SCHOOLING", () => { diff --git a/test/abilities/screen_cleaner.test.ts b/test/abilities/screen_cleaner.test.ts index 790ffcdc462..8b53ab30d49 100644 --- a/test/abilities/screen_cleaner.test.ts +++ b/test/abilities/screen_cleaner.test.ts @@ -1,10 +1,10 @@ -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import { PostSummonPhase } from "#app/phases/post-summon-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { PostSummonPhase } from "#phases/post-summon-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/seed_sower.test.ts b/test/abilities/seed_sower.test.ts index 7a898f5bcf9..8573f0242ea 100644 --- a/test/abilities/seed_sower.test.ts +++ b/test/abilities/seed_sower.test.ts @@ -1,8 +1,8 @@ -import { TerrainType } from "#app/data/terrain"; +import { TerrainType } from "#data/terrain"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/serene_grace.test.ts b/test/abilities/serene_grace.test.ts index 2acf2981537..aaa0f26f78b 100644 --- a/test/abilities/serene_grace.test.ts +++ b/test/abilities/serene_grace.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { allMoves } from "#app/data/data-lists"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - Serene Grace", () => { diff --git a/test/abilities/sheer_force.test.ts b/test/abilities/sheer_force.test.ts index e90b8d08611..0b0c0c10ccf 100644 --- a/test/abilities/sheer_force.test.ts +++ b/test/abilities/sheer_force.test.ts @@ -1,13 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { allMoves } from "#app/data/data-lists"; describe("Abilities - Sheer Force", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/shell-armor.test.ts b/test/abilities/shell-armor.test.ts index ea0ed4a95dd..e10c3a90444 100644 --- a/test/abilities/shell-armor.test.ts +++ b/test/abilities/shell-armor.test.ts @@ -1,12 +1,12 @@ -import type Move from "#app/data/moves/move"; -import Pokemon from "#app/field/pokemon"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi, type MockInstance } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, type MockInstance, vi } from "vitest"; describe("Abilities - Shell Armor", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/shield_dust.test.ts b/test/abilities/shield_dust.test.ts index a7896b9eeb8..371c7d9cf29 100644 --- a/test/abilities/shield_dust.test.ts +++ b/test/abilities/shield_dust.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { NumberHolder } from "#app/utils/common"; +import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/shields_down.test.ts b/test/abilities/shields_down.test.ts index 7b4803915f1..7678c7d8dac 100644 --- a/test/abilities/shields_down.test.ts +++ b/test/abilities/shields_down.test.ts @@ -1,12 +1,12 @@ -import { Status } from "#app/data/status-effect"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; describe("Abilities - SHIELDS DOWN", () => { diff --git a/test/abilities/simple.test.ts b/test/abilities/simple.test.ts index 703f8fcffac..a709c8696d3 100644 --- a/test/abilities/simple.test.ts +++ b/test/abilities/simple.test.ts @@ -1,8 +1,8 @@ -import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/speed_boost.test.ts b/test/abilities/speed_boost.test.ts index 1e731c7d6b6..975fc8ebecf 100644 --- a/test/abilities/speed_boost.test.ts +++ b/test/abilities/speed_boost.test.ts @@ -1,14 +1,14 @@ -import { Stat } from "#enums/stat"; +import Overrides from "#app/overrides"; import { AbilityId } from "#enums/ability-id"; +import { Command } from "#enums/command"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { AttemptRunPhase } from "#phases/attempt-run-phase"; +import type { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#enums/command"; -import { AttemptRunPhase } from "#app/phases/attempt-run-phase"; -import Overrides from "#app/overrides"; describe("Abilities - Speed Boost", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/stakeout.test.ts b/test/abilities/stakeout.test.ts index b3844bf17ca..85838a52abe 100644 --- a/test/abilities/stakeout.test.ts +++ b/test/abilities/stakeout.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { isBetween } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { isBetween } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/stall.test.ts b/test/abilities/stall.test.ts index 04a29a4f284..c012586eea5 100644 --- a/test/abilities/stall.test.ts +++ b/test/abilities/stall.test.ts @@ -1,10 +1,10 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; describe("Abilities - Stall", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/steely_spirit.test.ts b/test/abilities/steely_spirit.test.ts index 7a2bd98b6b1..0ca7bebe17a 100644 --- a/test/abilities/steely_spirit.test.ts +++ b/test/abilities/steely_spirit.test.ts @@ -1,9 +1,8 @@ -import { allAbilities } from "#app/data/data-lists"; -import { allMoves } from "#app/data/data-lists"; +import { allAbilities, allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/storm_drain.test.ts b/test/abilities/storm_drain.test.ts index 44a615ba364..59626546578 100644 --- a/test/abilities/storm_drain.test.ts +++ b/test/abilities/storm_drain.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/sturdy.test.ts b/test/abilities/sturdy.test.ts index e7b2c05040d..0cde40a91da 100644 --- a/test/abilities/sturdy.test.ts +++ b/test/abilities/sturdy.test.ts @@ -1,10 +1,10 @@ -import type { EnemyPokemon } from "#app/field/pokemon"; -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { EnemyPokemon } from "#field/pokemon"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/test/abilities/super_luck.test.ts b/test/abilities/super_luck.test.ts index 60ed2534fe9..954251583f8 100644 --- a/test/abilities/super_luck.test.ts +++ b/test/abilities/super_luck.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/supreme_overlord.test.ts b/test/abilities/supreme_overlord.test.ts index 7143b590f68..b68153a2cc8 100644 --- a/test/abilities/supreme_overlord.test.ts +++ b/test/abilities/supreme_overlord.test.ts @@ -1,13 +1,13 @@ -import { MoveId } from "#enums/move-id"; -import type Move from "#app/data/moves/move"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { SpeciesId } from "#enums/species-id"; import { BattlerIndex } from "#enums/battler-index"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import type { Move } from "#moves/move"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { allMoves } from "#app/data/data-lists"; describe("Abilities - Supreme Overlord", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/sweet_veil.test.ts b/test/abilities/sweet_veil.test.ts index ed9cb20afcc..ca98e827c4f 100644 --- a/test/abilities/sweet_veil.test.ts +++ b/test/abilities/sweet_veil.test.ts @@ -1,11 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { CommandPhase } from "#app/phases/command-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -80,7 +79,6 @@ describe("Abilities - Sweet Veil", () => { expect(game.scene.getPlayerField().some(p => !!p.getTag(BattlerTagType.DROWSY))).toBe(true); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH); game.doSwitchPokemon(2); diff --git a/test/abilities/synchronize.test.ts b/test/abilities/synchronize.test.ts index 030509ac4e6..1874560a166 100644 --- a/test/abilities/synchronize.test.ts +++ b/test/abilities/synchronize.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/tera_shell.test.ts b/test/abilities/tera_shell.test.ts index a52a01862ff..bd461e3aeba 100644 --- a/test/abilities/tera_shell.test.ts +++ b/test/abilities/tera_shell.test.ts @@ -1,8 +1,8 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/thermal_exchange.test.ts b/test/abilities/thermal_exchange.test.ts index 70af864d413..5e684b982e7 100644 --- a/test/abilities/thermal_exchange.test.ts +++ b/test/abilities/thermal_exchange.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/trace.test.ts b/test/abilities/trace.test.ts index f17bec159ab..7b87b3669b6 100644 --- a/test/abilities/trace.test.ts +++ b/test/abilities/trace.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/unburden.test.ts b/test/abilities/unburden.test.ts index fff37daff7b..8d738db9076 100644 --- a/test/abilities/unburden.test.ts +++ b/test/abilities/unburden.test.ts @@ -1,15 +1,15 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { StealHeldItemChanceAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; -import type Pokemon from "#app/field/pokemon"; -import type { ContactHeldItemTransferChanceModifier } from "#app/modifier/modifier"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import type { ContactHeldItemTransferChanceModifier } from "#modifiers/modifier"; +import { StealHeldItemChanceAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/unseen_fist.test.ts b/test/abilities/unseen_fist.test.ts index 26de77d4643..c986a112517 100644 --- a/test/abilities/unseen_fist.test.ts +++ b/test/abilities/unseen_fist.test.ts @@ -1,12 +1,12 @@ -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BerryPhase } from "#phases/berry-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BerryPhase } from "#app/phases/berry-phase"; describe("Abilities - Unseen Fist", () => { let phaserGame: Phaser.Game; diff --git a/test/abilities/victory_star.test.ts b/test/abilities/victory_star.test.ts index 4742dd96aa6..aff91a7702b 100644 --- a/test/abilities/victory_star.test.ts +++ b/test/abilities/victory_star.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/vital_spirit.test.ts b/test/abilities/vital_spirit.test.ts index 18764f94a6b..7530b2c6c04 100644 --- a/test/abilities/vital_spirit.test.ts +++ b/test/abilities/vital_spirit.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/volt_absorb.test.ts b/test/abilities/volt_absorb.test.ts index 6bea70ee2a4..12de6ceff87 100644 --- a/test/abilities/volt_absorb.test.ts +++ b/test/abilities/volt_absorb.test.ts @@ -1,13 +1,13 @@ -import { Stat } from "#enums/stat"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { BattlerIndex } from "#enums/battler-index"; -import { SpeciesId } from "#enums/species-id"; // See also: TypeImmunityAbAttr describe("Abilities - Volt Absorb", () => { diff --git a/test/abilities/wandering_spirit.test.ts b/test/abilities/wandering_spirit.test.ts index 950cec6d27c..3d26238e970 100644 --- a/test/abilities/wandering_spirit.test.ts +++ b/test/abilities/wandering_spirit.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/water_bubble.test.ts b/test/abilities/water_bubble.test.ts index 455a2e368c4..c8d01eb2800 100644 --- a/test/abilities/water_bubble.test.ts +++ b/test/abilities/water_bubble.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/water_veil.test.ts b/test/abilities/water_veil.test.ts index 2df06ec1a21..dcfe5b60fe9 100644 --- a/test/abilities/water_veil.test.ts +++ b/test/abilities/water_veil.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/wimp_out.test.ts b/test/abilities/wimp_out.test.ts index 8e97618d46f..d6e6908e19b 100644 --- a/test/abilities/wimp_out.test.ts +++ b/test/abilities/wimp_out.test.ts @@ -1,16 +1,16 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allMoves } from "#app/data/data-lists"; -import GameManager from "#test/testUtils/gameManager"; -import { toDmgValue } from "#app/utils/common"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/wind_power.test.ts b/test/abilities/wind_power.test.ts index 8e657997008..255e8fa69be 100644 --- a/test/abilities/wind_power.test.ts +++ b/test/abilities/wind_power.test.ts @@ -1,9 +1,9 @@ -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/wind_rider.test.ts b/test/abilities/wind_rider.test.ts index ea1747fcae9..e7b55d2ef65 100644 --- a/test/abilities/wind_rider.test.ts +++ b/test/abilities/wind_rider.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/wonder_skin.test.ts b/test/abilities/wonder_skin.test.ts index 177b97ae3b7..f55c303c9e3 100644 --- a/test/abilities/wonder_skin.test.ts +++ b/test/abilities/wonder_skin.test.ts @@ -1,9 +1,9 @@ -import { allMoves } from "#app/data/data-lists"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/abilities/zen_mode.test.ts b/test/abilities/zen_mode.test.ts index 5df2b3a6bc7..89dc0690ead 100644 --- a/test/abilities/zen_mode.test.ts +++ b/test/abilities/zen_mode.test.ts @@ -1,9 +1,9 @@ -import { Status } from "#app/data/status-effect"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/abilities/zero_to_hero.test.ts b/test/abilities/zero_to_hero.test.ts index 7d0128a4dbc..84b3ddab60c 100644 --- a/test/abilities/zero_to_hero.test.ts +++ b/test/abilities/zero_to_hero.test.ts @@ -1,11 +1,11 @@ -import { Status } from "#app/data/status-effect"; -import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Abilities - ZERO TO HERO", () => { diff --git a/test/account.test.ts b/test/account.test.ts index 77368b0b64c..52d52778dad 100644 --- a/test/account.test.ts +++ b/test/account.test.ts @@ -1,7 +1,7 @@ -import * as bypassLogin from "#app/global-vars/bypass-login"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { describe, expect, it, vi } from "vitest"; +import { pokerogueApi } from "#api/pokerogue-api"; import { initLoggedInUser, loggedInUser, updateUserInfo } from "#app/account"; +import * as bypassLogin from "#app/global-vars/bypass-login"; +import { describe, expect, it, vi } from "vitest"; describe("account", () => { describe("initLoggedInUser", () => { diff --git a/test/achievements/achievement.test.ts b/test/achievements/achievement.test.ts index 5a74c77fe6a..d736485b25f 100644 --- a/test/achievements/achievement.test.ts +++ b/test/achievements/achievement.test.ts @@ -1,20 +1,20 @@ -import { TurnHeldItemTransferModifier } from "#app/modifier/modifier"; +import type { BattleScene } from "#app/battle-scene"; +import { TurnHeldItemTransferModifier } from "#modifiers/modifier"; import { Achv, AchvTier, + achvs, DamageAchv, HealAchv, LevelAchv, ModifierAchv, MoneyAchv, RibbonAchv, - achvs, -} from "#app/system/achv"; -import { NumberHolder } from "#app/utils/common"; -import GameManager from "#test/testUtils/gameManager"; +} from "#system/achv"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import type BattleScene from "#app/battle-scene"; describe("check some Achievement related stuff", () => { it("should check Achievement creation", () => { diff --git a/test/arena/arena_gravity.test.ts b/test/arena/arena_gravity.test.ts index 36fe0b58308..d1cee1655a1 100644 --- a/test/arena/arena_gravity.test.ts +++ b/test/arena/arena_gravity.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/arena/grassy_terrain.test.ts b/test/arena/grassy_terrain.test.ts index 5f78d8f801d..541402123c4 100644 --- a/test/arena/grassy_terrain.test.ts +++ b/test/arena/grassy_terrain.test.ts @@ -1,8 +1,8 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/arena/weather_fog.test.ts b/test/arena/weather_fog.test.ts index e6984e13bd0..f55a12e3e0f 100644 --- a/test/arena/weather_fog.test.ts +++ b/test/arena/weather_fog.test.ts @@ -1,10 +1,10 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/arena/weather_hail.test.ts b/test/arena/weather_hail.test.ts index 27cf46fa9f2..c6f27f647fe 100644 --- a/test/arena/weather_hail.test.ts +++ b/test/arena/weather_hail.test.ts @@ -2,7 +2,7 @@ import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/arena/weather_sandstorm.test.ts b/test/arena/weather_sandstorm.test.ts index 61001abe1f4..a600aeed000 100644 --- a/test/arena/weather_sandstorm.test.ts +++ b/test/arena/weather_sandstorm.test.ts @@ -1,9 +1,9 @@ import { AbilityId } from "#enums/ability-id"; -import { Stat } from "#app/enums/stat"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/arena/weather_strong_winds.test.ts b/test/arena/weather_strong_winds.test.ts index d98ba96fd85..b0b1bca8c4c 100644 --- a/test/arena/weather_strong_winds.test.ts +++ b/test/arena/weather_strong_winds.test.ts @@ -1,10 +1,10 @@ -import { allMoves } from "#app/data/data-lists"; -import { StatusEffect } from "#app/enums/status-effect"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/battle-scene.test.ts b/test/battle-scene.test.ts index 44f1364441b..a920c48ea75 100644 --- a/test/battle-scene.test.ts +++ b/test/battle-scene.test.ts @@ -1,6 +1,6 @@ import { LoadingScene } from "#app/loading-scene"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; describe("BattleScene", () => { let phaserGame: Phaser.Game; diff --git a/test/battle/ability_swap.test.ts b/test/battle/ability_swap.test.ts index 3dd92576e3b..525c038d011 100644 --- a/test/battle/ability_swap.test.ts +++ b/test/battle/ability_swap.test.ts @@ -1,9 +1,9 @@ -import { allAbilities } from "#app/data/data-lists"; -import { Stat } from "#app/enums/stat"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/battle/battle-order.test.ts b/test/battle/battle-order.test.ts index 114592c8c8e..a47da66c4d7 100644 --- a/test/battle/battle-order.test.ts +++ b/test/battle/battle-order.test.ts @@ -1,10 +1,10 @@ -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { SelectTargetPhase } from "#app/phases/select-target-phase"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { SelectTargetPhase } from "#phases/select-target-phase"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/battle/battle.test.ts b/test/battle/battle.test.ts index bf2c3968aa6..7a2365fb6d8 100644 --- a/test/battle/battle.test.ts +++ b/test/battle/battle.test.ts @@ -1,32 +1,32 @@ -import { allSpecies } from "#app/data/data-lists"; -import { Stat } from "#enums/stat"; import { getGameMode } from "#app/game-mode"; -import { GameModes } from "#enums/game-modes"; -import { BattleEndPhase } from "#app/phases/battle-end-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { LoginPhase } from "#app/phases/login-phase"; -import { NextEncounterPhase } from "#app/phases/next-encounter-phase"; -import { SelectGenderPhase } from "#app/phases/select-gender-phase"; -import { SelectStarterPhase } from "#app/phases/select-starter-phase"; -import { SummonPhase } from "#app/phases/summon-phase"; -import { SwitchPhase } from "#app/phases/switch-phase"; -import { TitlePhase } from "#app/phases/title-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; -import GameManager from "#test/testUtils/gameManager"; -import { generateStarter } from "#test/testUtils/gameManagerUtils"; -import { UiMode } from "#enums/ui-mode"; +import { allSpecies } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BiomeId } from "#enums/biome-id"; +import { GameModes } from "#enums/game-modes"; import { MoveId } from "#enums/move-id"; import { PlayerGender } from "#enums/player-gender"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { UiMode } from "#enums/ui-mode"; +import { BattleEndPhase } from "#phases/battle-end-phase"; +import { CommandPhase } from "#phases/command-phase"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { LoginPhase } from "#phases/login-phase"; +import { NextEncounterPhase } from "#phases/next-encounter-phase"; +import { SelectGenderPhase } from "#phases/select-gender-phase"; +import { SelectStarterPhase } from "#phases/select-starter-phase"; +import { SummonPhase } from "#phases/summon-phase"; +import { SwitchPhase } from "#phases/switch-phase"; +import { TitlePhase } from "#phases/title-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { generateStarter } from "#test/testUtils/gameManagerUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { BiomeId } from "#enums/biome-id"; -describe("Test Battle Phase", () => { +describe("Phase - Battle Phase", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -197,47 +197,25 @@ describe("Test Battle Phase", () => { await game.phaseInterceptor.runFrom(SelectGenderPhase).to(SummonPhase); }); - it("2vs1", async () => { - game.override.battleStyle("single"); - game.override.enemySpecies(SpeciesId.MIGHTYENA); - game.override.enemyAbility(AbilityId.HYDRATION); - game.override.ability(AbilityId.HYDRATION); - await game.classicMode.startBattle([SpeciesId.BLASTOISE, SpeciesId.CHARIZARD]); - expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); - expect(game.scene.phaseManager.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); - }, 20000); + it.each([ + { name: "1v1", double: false, qty: 1 }, + { name: "2v1", double: false, qty: 2 }, + { name: "2v2", double: true, qty: 2 }, + { name: "4v2", double: true, qty: 4 }, + ])("should not crash when starting $name battle", async ({ double, qty }) => { + game.override + .battleStyle(double ? "double" : "single") + .enemySpecies(SpeciesId.MIGHTYENA) + .enemyAbility(AbilityId.HYDRATION) + .ability(AbilityId.HYDRATION); - it("1vs1", async () => { - game.override.battleStyle("single"); - game.override.enemySpecies(SpeciesId.MIGHTYENA); - game.override.enemyAbility(AbilityId.HYDRATION); - game.override.ability(AbilityId.HYDRATION); - await game.classicMode.startBattle([SpeciesId.BLASTOISE]); - expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); - expect(game.scene.phaseManager.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); - }, 20000); + await game.classicMode.startBattle( + [SpeciesId.BLASTOISE, SpeciesId.CHARIZARD, SpeciesId.DARKRAI, SpeciesId.GABITE].slice(0, qty), + ); - it("2vs2", async () => { - game.override.battleStyle("double"); - game.override.enemySpecies(SpeciesId.MIGHTYENA); - game.override.enemyAbility(AbilityId.HYDRATION); - game.override.ability(AbilityId.HYDRATION); - game.override.startingWave(3); - await game.classicMode.startBattle([SpeciesId.BLASTOISE, SpeciesId.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); - expect(game.scene.phaseManager.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); - }, 20000); - - it("4vs2", async () => { - game.override.battleStyle("double"); - game.override.enemySpecies(SpeciesId.MIGHTYENA); - game.override.enemyAbility(AbilityId.HYDRATION); - game.override.ability(AbilityId.HYDRATION); - game.override.startingWave(3); - await game.classicMode.startBattle([SpeciesId.BLASTOISE, SpeciesId.CHARIZARD, SpeciesId.DARKRAI, SpeciesId.GABITE]); - expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); - expect(game.scene.phaseManager.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); - }, 20000); + expect(game.scene.phaseManager.getCurrentPhase()).toBeInstanceOf(CommandPhase); + }); it("kill opponent pokemon", async () => { const moveToUse = MoveId.SPLASH; diff --git a/test/battle/damage_calculation.test.ts b/test/battle/damage_calculation.test.ts index 19cdf6b9237..fbcefcb0693 100644 --- a/test/battle/damage_calculation.test.ts +++ b/test/battle/damage_calculation.test.ts @@ -1,11 +1,10 @@ -import { allMoves } from "#app/data/data-lists"; -import type { EnemyPersistentModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/data/data-lists"; +import { allMoves, modifierTypes } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { EnemyPersistentModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/battle/double_battle.test.ts b/test/battle/double_battle.test.ts index 8e606a99ae0..7e0aa0f6c69 100644 --- a/test/battle/double_battle.test.ts +++ b/test/battle/double_battle.test.ts @@ -1,13 +1,13 @@ -import { Status } from "#app/data/status-effect"; -import { AbilityId } from "#enums/ability-id"; import { getGameMode } from "#app/game-mode"; +import { Status } from "#data/status-effect"; +import { AbilityId } from "#enums/ability-id"; import { GameModes } from "#enums/game-modes"; -import { BattleEndPhase } from "#app/phases/battle-end-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { BattleEndPhase } from "#phases/battle-end-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/battle/inverse_battle.test.ts b/test/battle/inverse_battle.test.ts index 66cab3e2d84..f9fd8f80a37 100644 --- a/test/battle/inverse_battle.test.ts +++ b/test/battle/inverse_battle.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { Challenges } from "#enums/challenges"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/battle/special_battle.test.ts b/test/battle/special_battle.test.ts index 4988e526b1e..36b543b0666 100644 --- a/test/battle/special_battle.test.ts +++ b/test/battle/special_battle.test.ts @@ -1,8 +1,8 @@ -import { UiMode } from "#enums/ui-mode"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { UiMode } from "#enums/ui-mode"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/battlerTags/octolock.test.ts b/test/battlerTags/octolock.test.ts index d0214f495fc..5b395a180a2 100644 --- a/test/battlerTags/octolock.test.ts +++ b/test/battlerTags/octolock.test.ts @@ -1,10 +1,10 @@ -import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; -import type Pokemon from "#app/field/pokemon"; -import { OctolockTag, TrappedTag } from "#app/data/battler-tags"; +import { OctolockTag, TrappedTag } from "#data/battler-tags"; import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import { StatStageChangePhase } from "#phases/stat-stage-change-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; describe("BattlerTag - OctolockTag", () => { describe("lapse behavior", () => { diff --git a/test/battlerTags/stockpiling.test.ts b/test/battlerTags/stockpiling.test.ts index 8f524ae7a4d..9024b3edb3c 100644 --- a/test/battlerTags/stockpiling.test.ts +++ b/test/battlerTags/stockpiling.test.ts @@ -1,10 +1,10 @@ -import { StockpilingTag } from "#app/data/battler-tags"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonSummonData } from "#app/data/pokemon/pokemon-data"; import * as messages from "#app/messages"; -import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; +import { StockpilingTag } from "#data/battler-tags"; +import { PokemonSummonData } from "#data/pokemon-data"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import { StatStageChangePhase } from "#phases/stat-stage-change-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; beforeEach(() => { @@ -101,7 +101,8 @@ describe("BattlerTag - StockpilingTag", () => { }); describe("stack limit, stat tracking, and removal", () => { - it("can be added up to three times, even when one stat does not change", async () => { + // TODO: do we even want this file at all? regardless, this test is broken and is also likely unimportant + it.todo("can be added up to three times, even when one stat does not change", async () => { const mockPokemon = { summonData: new PokemonSummonData(), getBattlerIndex: () => 0, @@ -150,7 +151,7 @@ describe("BattlerTag - StockpilingTag", () => { expect(subject.stockpiledCount).toBe(3); vi.spyOn(game.scene.phaseManager, "unshiftPhase").mockImplementationOnce(_phase => { - throw new Error("Should not be called a fourth time"); + expect.fail("Should not be called a fourth time"); }); // fourth stack should not be applied diff --git a/test/battlerTags/substitute.test.ts b/test/battlerTags/substitute.test.ts index 55c620bbb40..825bebf1a1e 100644 --- a/test/battlerTags/substitute.test.ts +++ b/test/battlerTags/substitute.test.ts @@ -1,17 +1,17 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import type { TurnMove } from "#app/@types/turn-move"; -import type { PokemonTurnData } from "#app/data/pokemon/pokemon-data"; -import type Pokemon from "#app/field/pokemon"; -import { MoveResult } from "#enums/move-result"; -import type BattleScene from "#app/battle-scene"; -import { BindTag, SubstituteTag } from "#app/data/battler-tags"; +import type { BattleScene } from "#app/battle-scene"; +import * as messages from "#app/messages"; +import { BindTag, SubstituteTag } from "#data/battler-tags"; +import { allMoves } from "#data/data-lists"; +import type { PokemonTurnData } from "#data/pokemon-data"; import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { MoveId } from "#enums/move-id"; -import { PokemonAnimType } from "#app/enums/pokemon-anim-type"; -import * as messages from "#app/messages"; -import { allMoves } from "#app/data/data-lists"; -import type { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveResult } from "#enums/move-result"; +import { PokemonAnimType } from "#enums/pokemon-anim-type"; +import type { Pokemon } from "#field/pokemon"; +import type { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { TurnMove } from "#types/turn-move"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("BattlerTag - SubstituteTag", () => { let phaserGame: Phaser.Game; diff --git a/test/boss-pokemon.test.ts b/test/boss-pokemon.test.ts index 6eb6d262c56..06a2f313016 100644 --- a/test/boss-pokemon.test.ts +++ b/test/boss-pokemon.test.ts @@ -1,12 +1,12 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { EFFECTIVE_STATS } from "#app/enums/stat"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { toDmgValue } from "#app/utils/common"; +import { SpeciesId } from "#enums/species-id"; +import { EFFECTIVE_STATS } from "#enums/stat"; +import type { EnemyPokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Boss Pokemon / Shields", () => { let phaserGame: Phaser.Game; diff --git a/test/daily_mode.test.ts b/test/daily_mode.test.ts index 41dcf51ccf6..0fa7c0dc846 100644 --- a/test/daily_mode.test.ts +++ b/test/daily_mode.test.ts @@ -1,14 +1,12 @@ +import { pokerogueApi } from "#api/pokerogue-api"; import { BiomeId } from "#enums/biome-id"; import { MoveId } from "#enums/move-id"; -import { MapModifier } from "#app/modifier/modifier"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; import { SpeciesId } from "#enums/species-id"; import { UiMode } from "#enums/ui-mode"; +import { MapModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; - -//const TIMEOUT = 20 * 1000; describe("Daily Mode", () => { let phaserGame: Phaser.Game; diff --git a/test/data/splash_messages.test.ts b/test/data/splash_messages.test.ts index 773b2715825..9763d85a583 100644 --- a/test/data/splash_messages.test.ts +++ b/test/data/splash_messages.test.ts @@ -1,6 +1,6 @@ -import { getSplashMessages } from "#app/data/splash-messages"; -import { describe, expect, it, vi, afterEach, beforeEach } from "vitest"; import * as Constants from "#app/constants"; +import { getSplashMessages } from "#data/splash-messages"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; describe("Data - Splash Messages", () => { it("should contain at least 15 splash messages", () => { diff --git a/test/data/status_effect.test.ts b/test/data/status_effect.test.ts index e697ee3f1c7..2ea4dce4147 100644 --- a/test/data/status_effect.test.ts +++ b/test/data/status_effect.test.ts @@ -1,17 +1,17 @@ import { - Status, getStatusEffectActivationText, getStatusEffectDescriptor, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText, -} from "#app/data/status-effect"; -import { MoveResult } from "#enums/move-result"; + Status, +} from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import { mockI18next } from "#test/testUtils/testUtils"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/eggs/egg.test.ts b/test/eggs/egg.test.ts index 0d5d09c5179..b27124bd786 100644 --- a/test/eggs/egg.test.ts +++ b/test/eggs/egg.test.ts @@ -1,13 +1,13 @@ -import { speciesEggTiers } from "#app/data/balance/species-egg-tiers"; -import { Egg, getLegendaryGachaSpeciesForTimestamp, getValidLegendaryGachaSpecies } from "#app/data/egg"; -import { allSpecies } from "#app/data/data-lists"; -import { EggSourceType } from "#app/enums/egg-source-types"; -import { EggTier } from "#app/enums/egg-type"; -import { VariantTier } from "#app/enums/variant-tier"; -import EggData from "#app/system/egg-data"; -import * as Utils from "#app/utils/common"; +import { speciesEggTiers } from "#balance/species-egg-tiers"; +import { allSpecies } from "#data/data-lists"; +import { Egg, getLegendaryGachaSpeciesForTimestamp, getValidLegendaryGachaSpecies } from "#data/egg"; +import { EggSourceType } from "#enums/egg-source-types"; +import { EggTier } from "#enums/egg-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { VariantTier } from "#enums/variant-tier"; +import { EggData } from "#system/egg-data"; +import { GameManager } from "#test/testUtils/gameManager"; +import * as Utils from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/eggs/manaphy-egg.test.ts b/test/eggs/manaphy-egg.test.ts index a58dfa9beba..319b5a15d7b 100644 --- a/test/eggs/manaphy-egg.test.ts +++ b/test/eggs/manaphy-egg.test.ts @@ -1,8 +1,8 @@ -import { Egg } from "#app/data/egg"; -import { EggSourceType } from "#app/enums/egg-source-types"; -import { EggTier } from "#app/enums/egg-type"; +import { Egg } from "#data/egg"; +import { EggSourceType } from "#enums/egg-source-types"; +import { EggTier } from "#enums/egg-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/endless_boss.test.ts b/test/endless_boss.test.ts index d219cacf317..99c179ceeb6 100644 --- a/test/endless_boss.test.ts +++ b/test/endless_boss.test.ts @@ -1,8 +1,8 @@ import { BiomeId } from "#enums/biome-id"; -import { SpeciesId } from "#enums/species-id"; import { GameModes } from "#enums/game-modes"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; const EndlessBossWave = { Minor: 250, diff --git a/test/enemy_command.test.ts b/test/enemy_command.test.ts index fabb1f1fdb0..249c819a107 100644 --- a/test/enemy_command.test.ts +++ b/test/enemy_command.test.ts @@ -1,13 +1,13 @@ -import type BattleScene from "#app/battle-scene"; -import { allMoves } from "#app/data/data-lists"; -import { MoveCategory } from "#enums/MoveCategory"; +import type { BattleScene } from "#app/battle-scene"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { AiType } from "#enums/ai-type"; +import { MoveCategory } from "#enums/MoveCategory"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import type { EnemyPokemon } from "#app/field/pokemon"; -import { AiType } from "#enums/ai-type"; -import { randSeedInt } from "#app/utils/common"; -import GameManager from "#test/testUtils/gameManager"; +import type { EnemyPokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; +import { randSeedInt } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/escape-calculations.test.ts b/test/escape-calculations.test.ts index a4ff52302ed..338d2a1dcfc 100644 --- a/test/escape-calculations.test.ts +++ b/test/escape-calculations.test.ts @@ -1,9 +1,9 @@ -import { AttemptRunPhase } from "#app/phases/attempt-run-phase"; -import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#enums/command"; import { AbilityId } from "#enums/ability-id"; +import { Command } from "#enums/command"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { AttemptRunPhase } from "#phases/attempt-run-phase"; +import type { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/evolution.test.ts b/test/evolution.test.ts index c4bcca785c1..ffede4d09d6 100644 --- a/test/evolution.test.ts +++ b/test/evolution.test.ts @@ -1,13 +1,9 @@ -import { - pokemonEvolutions, - SpeciesFormEvolution, - SpeciesWildEvolutionDelay, -} from "#app/data/balance/pokemon-evolutions"; +import { pokemonEvolutions, SpeciesFormEvolution, SpeciesWildEvolutionDelay } from "#balance/pokemon-evolutions"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import * as Utils from "#app/utils/common"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import * as Utils from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/field/pokemon-id-checks.test.ts b/test/field/pokemon-id-checks.test.ts index 4023b8d73ad..065a1ffeb7e 100644 --- a/test/field/pokemon-id-checks.test.ts +++ b/test/field/pokemon-id-checks.test.ts @@ -1,13 +1,13 @@ -import type Pokemon from "#app/field/pokemon"; -import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; -import { SpeciesId } from "#enums/species-id"; import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import type { Pokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { BattlerIndex } from "#enums/battler-index"; describe("Field - Pokemon ID Checks", () => { let phaserGame: Phaser.Game; diff --git a/test/field/pokemon.test.ts b/test/field/pokemon.test.ts index 2c32f704e4e..8c04dc61b32 100644 --- a/test/field/pokemon.test.ts +++ b/test/field/pokemon.test.ts @@ -1,11 +1,11 @@ -import { SpeciesId } from "#enums/species-id"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { PokeballType } from "#enums/pokeball"; -import type BattleScene from "#app/battle-scene"; +import type { BattleScene } from "#app/battle-scene"; +import { CustomPokemonData } from "#data/pokemon-data"; import { MoveId } from "#enums/move-id"; +import { PokeballType } from "#enums/pokeball"; import { PokemonType } from "#enums/pokemon-type"; -import { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Spec - Pokemon", () => { let phaserGame: Phaser.Game; diff --git a/test/final_boss.test.ts b/test/final_boss.test.ts index 071f83285e7..9dc54490330 100644 --- a/test/final_boss.test.ts +++ b/test/final_boss.test.ts @@ -1,11 +1,11 @@ -import { GameModes } from "#enums/game-modes"; -import { TurnHeldItemTransferModifier } from "#app/modifier/modifier"; import { AbilityId } from "#enums/ability-id"; import { BiomeId } from "#enums/biome-id"; +import { GameModes } from "#enums/game-modes"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnHeldItemTransferModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; const FinalWave = { @@ -29,7 +29,6 @@ describe("Final Boss", () => { .startingBiome(BiomeId.END) .criticalHits(false) .enemyMoveset(MoveId.SPLASH) - .moveset([MoveId.SPLASH, MoveId.WILL_O_WISP, MoveId.DRAGON_PULSE]) .startingLevel(10000); }); @@ -63,33 +62,31 @@ describe("Final Boss", () => { expect(game.scene.getEnemyPokemon()!.species.speciesId).not.toBe(SpeciesId.ETERNATUS); }); - it("should not have passive enabled on Eternatus", async () => { + it("should initially spawn in regular form without passive & 4 boss segments", async () => { await game.runToFinalBossEncounter([SpeciesId.BIDOOF], GameModes.CLASSIC); const eternatus = game.scene.getEnemyPokemon()!; + expect(eternatus.formIndex).toBe(0); + expect(eternatus.bossSegments).toBe(4); + expect(eternatus.bossSegmentIndex).toBe(3); expect(eternatus.species.speciesId).toBe(SpeciesId.ETERNATUS); expect(eternatus.hasPassive()).toBe(false); }); it("should change form on direct hit down to last boss fragment", async () => { await game.runToFinalBossEncounter([SpeciesId.KYUREM], GameModes.CLASSIC); - await game.phaseInterceptor.to("CommandPhase"); - // Eternatus phase 1 + // phase 1 const eternatus = game.scene.getEnemyPokemon()!; const phase1Hp = eternatus.getMaxHp(); - expect(eternatus.species.speciesId).toBe(SpeciesId.ETERNATUS); - expect(eternatus.formIndex).toBe(0); - expect(eternatus.bossSegments).toBe(4); - expect(eternatus.bossSegmentIndex).toBe(3); - game.move.select(MoveId.DRAGON_PULSE); + game.move.use(MoveId.DRAGON_PULSE); await game.toNextTurn(); - // Eternatus phase 2: changed form, healed and restored its shields + // Eternatus phase 2: changed form, healed fully and restored its shields expect(eternatus.species.speciesId).toBe(SpeciesId.ETERNATUS); - expect(eternatus.hp).toBeGreaterThan(phase1Hp); expect(eternatus.hp).toBe(eternatus.getMaxHp()); + expect(eternatus.getMaxHp()).toBeGreaterThan(phase1Hp); expect(eternatus.formIndex).toBe(1); expect(eternatus.bossSegments).toBe(5); expect(eternatus.bossSegmentIndex).toBe(4); @@ -100,19 +97,13 @@ describe("Final Boss", () => { it("should change form on status damage down to last boss fragment", async () => { game.override.ability(AbilityId.NO_GUARD); - - await game.runToFinalBossEncounter([SpeciesId.BIDOOF], GameModes.CLASSIC); - await game.phaseInterceptor.to("CommandPhase"); + await game.runToFinalBossEncounter([SpeciesId.SALAZZLE], GameModes.CLASSIC); // Eternatus phase 1 const eternatus = game.scene.getEnemyPokemon()!; const phase1Hp = eternatus.getMaxHp(); - expect(eternatus.species.speciesId).toBe(SpeciesId.ETERNATUS); - expect(eternatus.formIndex).toBe(0); - expect(eternatus.bossSegments).toBe(4); - expect(eternatus.bossSegmentIndex).toBe(3); - game.move.select(MoveId.WILL_O_WISP); + game.move.use(MoveId.WILL_O_WISP); await game.toNextTurn(); expect(eternatus.status?.effect).toBe(StatusEffect.BURN); @@ -120,19 +111,19 @@ describe("Final Boss", () => { const lastShieldHp = Math.ceil(phase1Hp / eternatus.bossSegments); // Stall until the burn is one hit away from breaking the last shield while (eternatus.hp - tickDamage > lastShieldHp) { - game.move.select(MoveId.SPLASH); + game.move.use(MoveId.SPLASH); await game.toNextTurn(); } expect(eternatus.bossSegmentIndex).toBe(1); - game.move.select(MoveId.SPLASH); + game.move.use(MoveId.SPLASH); await game.toNextTurn(); // Eternatus phase 2: changed form, healed and restored its shields expect(eternatus.hp).toBeGreaterThan(phase1Hp); expect(eternatus.hp).toBe(eternatus.getMaxHp()); - expect(eternatus.status).toBeFalsy(); + expect(eternatus.status?.effect).toBeUndefined(); expect(eternatus.formIndex).toBe(1); expect(eternatus.bossSegments).toBe(5); expect(eternatus.bossSegmentIndex).toBe(4); diff --git a/test/game-mode.test.ts b/test/game-mode.test.ts index c5ce1e02852..52de7e6a705 100644 --- a/test/game-mode.test.ts +++ b/test/game-mode.test.ts @@ -1,9 +1,9 @@ import type { GameMode } from "#app/game-mode"; import { getGameMode } from "#app/game-mode"; import { GameModes } from "#enums/game-modes"; +import { GameManager } from "#test/testUtils/gameManager"; +import * as Utils from "#utils/common"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as Utils from "#app/utils/common"; -import GameManager from "#test/testUtils/gameManager"; describe("game-mode", () => { let phaserGame: Phaser.Game; diff --git a/test/imports.test.ts b/test/imports.test.ts index 8a5c735e950..04e9462d8d0 100644 --- a/test/imports.test.ts +++ b/test/imports.test.ts @@ -1,4 +1,4 @@ -import { initStatsKeys } from "#app/ui/game-stats-ui-handler"; +import { initStatsKeys } from "#ui/game-stats-ui-handler"; import { describe, expect, it } from "vitest"; async function importModule() { diff --git a/test/inputs/inputs.test.ts b/test/inputs/inputs.test.ts index 1f566672f00..ce208d6ce6d 100644 --- a/test/inputs/inputs.test.ts +++ b/test/inputs/inputs.test.ts @@ -1,7 +1,7 @@ -import cfg_keyboard_qwerty from "#app/configs/inputs/cfg_keyboard_qwerty"; -import pad_xbox360 from "#app/configs/inputs/pad_xbox360"; -import GameManager from "#test/testUtils/gameManager"; -import InputsHandler from "#test/testUtils/inputsHandler"; +import cfg_keyboard_qwerty from "#inputs/cfg_keyboard_qwerty"; +import pad_xbox360 from "#inputs/pad_xbox360"; +import { GameManager } from "#test/testUtils/gameManager"; +import { InputsHandler } from "#test/testUtils/inputsHandler"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/internals.test.ts b/test/internals.test.ts index bd603ec22fc..bb3cd89565c 100644 --- a/test/internals.test.ts +++ b/test/internals.test.ts @@ -1,6 +1,6 @@ import { AbilityId } from "#enums/ability-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/items/dire_hit.test.ts b/test/items/dire_hit.test.ts index a484a0ad302..2473dd0038e 100644 --- a/test/items/dire_hit.test.ts +++ b/test/items/dire_hit.test.ts @@ -1,25 +1,25 @@ -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { Button } from "#enums/buttons"; import { MoveId } from "#enums/move-id"; +import { ShopCursorTarget } from "#enums/shop-cursor-target"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { BattleEndPhase } from "#app/phases/battle-end-phase"; -import { TempCritBoosterModifier } from "#app/modifier/modifier"; import { UiMode } from "#enums/ui-mode"; -import type 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"; -import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; +import { TempCritBoosterModifier } from "#modifiers/modifier"; +import { BattleEndPhase } from "#phases/battle-end-phase"; +import { CommandPhase } from "#phases/command-phase"; +import { NewBattlePhase } from "#phases/new-battle-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Dire Hit", () => { let phaserGame: Phaser.Game; let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/double_battle_chance_booster.test.ts b/test/items/double_battle_chance_booster.test.ts index d1a9e826cda..df6a3c6d7de 100644 --- a/test/items/double_battle_chance_booster.test.ts +++ b/test/items/double_battle_chance_booster.test.ts @@ -1,13 +1,13 @@ +import { Button } from "#enums/buttons"; import { MoveId } from "#enums/move-id"; +import { ShopCursorTarget } from "#enums/shop-cursor-target"; import { SpeciesId } from "#enums/species-id"; -import { DoubleBattleChanceBoosterModifier } from "#app/modifier/modifier"; -import GameManager from "#test/testUtils/gameManager"; +import { UiMode } from "#enums/ui-mode"; +import { DoubleBattleChanceBoosterModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; -import { UiMode } from "#enums/ui-mode"; -import type 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/test/items/eviolite.test.ts b/test/items/eviolite.test.ts index 353cdbf91b4..74aff03616c 100644 --- a/test/items/eviolite.test.ts +++ b/test/items/eviolite.test.ts @@ -1,16 +1,16 @@ -import { StatBoosterModifier } from "#app/modifier/modifier"; -import { NumberHolder, randItem } from "#app/utils/common"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { StatBoosterModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder, randItem } from "#utils/common"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Eviolite", () => { let phaserGame: Phaser.Game; let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/exp_booster.test.ts b/test/items/exp_booster.test.ts index 44d7721aba2..6c8c16d08f4 100644 --- a/test/items/exp_booster.test.ts +++ b/test/items/exp_booster.test.ts @@ -1,8 +1,8 @@ import { AbilityId } from "#enums/ability-id"; -import { PokemonExpBoosterModifier } from "#app/modifier/modifier"; -import { NumberHolder } from "#app/utils/common"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { PokemonExpBoosterModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("EXP Modifier Items", () => { @@ -10,7 +10,7 @@ describe("EXP Modifier Items", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/grip_claw.test.ts b/test/items/grip_claw.test.ts index 9c3e6548140..6e25cdf6c08 100644 --- a/test/items/grip_claw.test.ts +++ b/test/items/grip_claw.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import type Pokemon from "#app/field/pokemon"; -import type { ContactHeldItemTransferChanceModifier } from "#app/modifier/modifier"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BerryType } from "#enums/berry-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import type { Pokemon } from "#field/pokemon"; +import type { ContactHeldItemTransferChanceModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Grip Claw", () => { @@ -14,7 +14,7 @@ describe("Items - Grip Claw", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/leek.test.ts b/test/items/leek.test.ts index eedb6667b9b..7ee3dff23d6 100644 --- a/test/items/leek.test.ts +++ b/test/items/leek.test.ts @@ -1,9 +1,9 @@ -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { randInt } from "#app/utils/common"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { randInt } from "#utils/common"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Leek", () => { @@ -11,7 +11,7 @@ describe("Items - Leek", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/leftovers.test.ts b/test/items/leftovers.test.ts index 21319d2c9d7..9f2c532ef8b 100644 --- a/test/items/leftovers.test.ts +++ b/test/items/leftovers.test.ts @@ -1,9 +1,9 @@ -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/items/light_ball.test.ts b/test/items/light_ball.test.ts index 6dfed3389b9..eebcc81c224 100644 --- a/test/items/light_ball.test.ts +++ b/test/items/light_ball.test.ts @@ -1,11 +1,11 @@ -import { Stat } from "#enums/stat"; -import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/data/data-lists"; -import i18next from "#app/plugins/i18n"; -import { NumberHolder } from "#app/utils/common"; +import { modifierTypes } from "#data/data-lists"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { Stat } from "#enums/stat"; +import { SpeciesStatBoosterModifier } from "#modifiers/modifier"; +import i18next from "#plugins/i18n"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Light Ball", () => { @@ -13,7 +13,7 @@ describe("Items - Light Ball", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/lock_capsule.test.ts b/test/items/lock_capsule.test.ts index beacc3a3907..e98e6880eb1 100644 --- a/test/items/lock_capsule.test.ts +++ b/test/items/lock_capsule.test.ts @@ -1,10 +1,10 @@ import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; import { ModifierTier } from "#enums/modifier-tier"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { MoveId } from "#enums/move-id"; import { UiMode } from "#enums/ui-mode"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Items - Lock Capsule", () => { @@ -12,7 +12,7 @@ describe("Items - Lock Capsule", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/metal_powder.test.ts b/test/items/metal_powder.test.ts index e731f6e7295..17baa057fd5 100644 --- a/test/items/metal_powder.test.ts +++ b/test/items/metal_powder.test.ts @@ -1,11 +1,11 @@ -import { Stat } from "#enums/stat"; -import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/data/data-lists"; -import i18next from "#app/plugins/i18n"; -import { NumberHolder } from "#app/utils/common"; +import { modifierTypes } from "#data/data-lists"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { Stat } from "#enums/stat"; +import { SpeciesStatBoosterModifier } from "#modifiers/modifier"; +import i18next from "#plugins/i18n"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Metal Powder", () => { @@ -13,7 +13,7 @@ describe("Items - Metal Powder", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/multi_lens.test.ts b/test/items/multi_lens.test.ts index 5d4732a8bcd..56d452df9d2 100644 --- a/test/items/multi_lens.test.ts +++ b/test/items/multi_lens.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/items/mystical_rock.test.ts b/test/items/mystical_rock.test.ts index 091815aa604..f1e9bb91ecf 100644 --- a/test/items/mystical_rock.test.ts +++ b/test/items/mystical_rock.test.ts @@ -1,9 +1,9 @@ import { globalScene } from "#app/global-scene"; -import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Items - Mystical Rock", () => { @@ -11,7 +11,7 @@ describe("Items - Mystical Rock", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/quick_powder.test.ts b/test/items/quick_powder.test.ts index af99f51273d..6c8cb0751c3 100644 --- a/test/items/quick_powder.test.ts +++ b/test/items/quick_powder.test.ts @@ -1,11 +1,11 @@ -import { Stat } from "#enums/stat"; -import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/data/data-lists"; -import i18next from "#app/plugins/i18n"; -import { NumberHolder } from "#app/utils/common"; +import { modifierTypes } from "#data/data-lists"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { Stat } from "#enums/stat"; +import { SpeciesStatBoosterModifier } from "#modifiers/modifier"; +import i18next from "#plugins/i18n"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Quick Powder", () => { @@ -13,7 +13,7 @@ describe("Items - Quick Powder", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/reviver_seed.test.ts b/test/items/reviver_seed.test.ts index f444a6eac66..f0929ee0993 100644 --- a/test/items/reviver_seed.test.ts +++ b/test/items/reviver_seed.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import type { PokemonInstantReviveModifier } from "#app/modifier/modifier"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { PokemonInstantReviveModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/items/scope_lens.test.ts b/test/items/scope_lens.test.ts index 16be8aab930..866164629f8 100644 --- a/test/items/scope_lens.test.ts +++ b/test/items/scope_lens.test.ts @@ -1,8 +1,8 @@ -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Scope Lens", () => { @@ -10,7 +10,7 @@ describe("Items - Scope Lens", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/temp_stat_stage_booster.test.ts b/test/items/temp_stat_stage_booster.test.ts index b8cd0cde4eb..454a469700a 100644 --- a/test/items/temp_stat_stage_booster.test.ts +++ b/test/items/temp_stat_stage_booster.test.ts @@ -1,23 +1,23 @@ -import { BATTLE_STATS, Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import Phase from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { MoveId } from "#enums/move-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; -import { TempStatStageBoosterModifier } from "#app/modifier/modifier"; +import { Button } from "#enums/buttons"; +import { MoveId } from "#enums/move-id"; +import { ShopCursorTarget } from "#enums/shop-cursor-target"; +import { SpeciesId } from "#enums/species-id"; +import { BATTLE_STATS, Stat } from "#enums/stat"; import { UiMode } from "#enums/ui-mode"; -import { Button } from "#app/enums/buttons"; -import type ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; +import { TempStatStageBoosterModifier } from "#modifiers/modifier"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Temporary Stat Stage Boosters", () => { let phaserGame: Phaser.Game; let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/thick_club.test.ts b/test/items/thick_club.test.ts index bc019ee99f8..3a993d64a0c 100644 --- a/test/items/thick_club.test.ts +++ b/test/items/thick_club.test.ts @@ -1,11 +1,11 @@ -import { Stat } from "#enums/stat"; -import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/data/data-lists"; -import i18next from "#app/plugins/i18n"; -import { NumberHolder, randInt } from "#app/utils/common"; +import { modifierTypes } from "#data/data-lists"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phase from "phaser"; +import { Stat } from "#enums/stat"; +import { SpeciesStatBoosterModifier } from "#modifiers/modifier"; +import i18next from "#plugins/i18n"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder, randInt } from "#utils/common"; +import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Items - Thick Club", () => { @@ -13,7 +13,7 @@ describe("Items - Thick Club", () => { let game: GameManager; beforeAll(() => { - phaserGame = new Phase.Game({ + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, }); }); diff --git a/test/items/toxic_orb.test.ts b/test/items/toxic_orb.test.ts index e0d86655028..0f4acedbfb5 100644 --- a/test/items/toxic_orb.test.ts +++ b/test/items/toxic_orb.test.ts @@ -1,9 +1,9 @@ -import i18next from "#app/plugins/i18n"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import i18next from "#plugins/i18n"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/misc.test.ts b/test/misc.test.ts index 12ed165d9d9..5afd8f898c6 100644 --- a/test/misc.test.ts +++ b/test/misc.test.ts @@ -1,5 +1,4 @@ -// import { apiFetch } from "#app/utils"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import { waitUntil } from "#test/testUtils/gameManagerUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/ability-ignore-moves.test.ts b/test/moves/ability-ignore-moves.test.ts new file mode 100644 index 00000000000..99c5b8f8efe --- /dev/null +++ b/test/moves/ability-ignore-moves.test.ts @@ -0,0 +1,108 @@ +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Moves - Ability-Ignoring Moves", () => { + 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 + .moveset([MoveId.MOONGEIST_BEAM, MoveId.SUNSTEEL_STRIKE, MoveId.PHOTON_GEYSER, MoveId.METRONOME]) + .ability(AbilityId.BALL_FETCH) + .startingLevel(200) + .battleStyle("single") + .criticalHits(false) + .enemySpecies(SpeciesId.MAGIKARP) + .enemyAbility(AbilityId.STURDY) + .enemyMoveset(MoveId.SPLASH); + }); + + it.each<{ name: string; move: MoveId }>([ + { name: "Sunsteel Strike", move: MoveId.SUNSTEEL_STRIKE }, + { name: "Moongeist Beam", move: MoveId.MOONGEIST_BEAM }, + { name: "Photon Geyser", move: MoveId.PHOTON_GEYSER }, + ])("$name should ignore enemy abilities during move use", async ({ move }) => { + await game.classicMode.startBattle([SpeciesId.NECROZMA]); + + const player = game.field.getPlayerPokemon(); + const enemy = game.field.getEnemyPokemon(); + + game.move.select(move); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(game.scene.arena.ignoreAbilities).toBe(true); + expect(game.scene.arena.ignoringEffectSource).toBe(player.getBattlerIndex()); + + await game.toEndOfTurn(); + expect(game.scene.arena.ignoreAbilities).toBe(false); + expect(enemy.isFainted()).toBe(true); + }); + + it("should not ignore enemy abilities when called by Metronome", async () => { + await game.classicMode.startBattle([SpeciesId.MILOTIC]); + game.move.forceMetronomeMove(MoveId.PHOTON_GEYSER, true); + + const enemy = game.field.getEnemyPokemon(); + game.move.select(MoveId.METRONOME); + await game.toEndOfTurn(); + + expect(enemy.isFainted()).toBe(false); + expect(game.field.getPlayerPokemon().getLastXMoves()[0].move).toBe(MoveId.PHOTON_GEYSER); + }); + + it("should not ignore enemy abilities when called by Mirror Move", async () => { + game.override.moveset(MoveId.MIRROR_MOVE).enemyMoveset(MoveId.SUNSTEEL_STRIKE); + + await game.classicMode.startBattle([SpeciesId.MILOTIC]); + + const enemy = game.field.getEnemyPokemon(); + game.move.select(MoveId.MIRROR_MOVE); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toEndOfTurn(); + + expect(enemy.isFainted()).toBe(false); + expect(game.scene.getPlayerPokemon()?.getLastXMoves()[0].move).toBe(MoveId.SUNSTEEL_STRIKE); + }); + + // TODO: Verify this behavior on cart + it("should ignore enemy abilities when called by Instruct", async () => { + game.override.moveset([MoveId.SUNSTEEL_STRIKE, MoveId.INSTRUCT]).battleStyle("double"); + await game.classicMode.startBattle([SpeciesId.SOLGALEO, SpeciesId.LUNALA]); + + const solgaleo = game.field.getPlayerPokemon(); + + game.move.select(MoveId.SUNSTEEL_STRIKE, BattlerIndex.PLAYER, BattlerIndex.ENEMY); + game.move.select(MoveId.INSTRUCT, BattlerIndex.PLAYER_2, BattlerIndex.PLAYER); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); + + await game.phaseInterceptor.to("MoveEffectPhase"); // initial attack + await game.phaseInterceptor.to("MoveEffectPhase"); // instruct + await game.phaseInterceptor.to("MoveEffectPhase"); // instructed move use + + expect(game.scene.arena.ignoreAbilities).toBe(true); + expect(game.scene.arena.ignoringEffectSource).toBe(solgaleo.getBattlerIndex()); + + await game.toEndOfTurn(); + + // Both the initial and redirected instruct use ignored sturdy + const [enemy1, enemy2] = game.scene.getEnemyField(); + expect(enemy1.isFainted()).toBe(true); + expect(enemy2.isFainted()).toBe(true); + }); +}); diff --git a/test/moves/after_you.test.ts b/test/moves/after_you.test.ts index 37186dcc7a5..e961342dc36 100644 --- a/test/moves/after_you.test.ts +++ b/test/moves/after_you.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { MoveResult } from "#enums/move-result"; -import { MovePhase } from "#app/phases/move-phase"; -import { MoveUseMode } from "#enums/move-use-mode"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { MoveUseMode } from "#enums/move-use-mode"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { MovePhase } from "#phases/move-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/alluring_voice.test.ts b/test/moves/alluring_voice.test.ts index ba096391f1b..d72d7b4f906 100644 --- a/test/moves/alluring_voice.test.ts +++ b/test/moves/alluring_voice.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BerryPhase } from "#app/phases/berry-phase"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BerryPhase } from "#phases/berry-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/aromatherapy.test.ts b/test/moves/aromatherapy.test.ts index bfe315a1390..39850c4f841 100644 --- a/test/moves/aromatherapy.test.ts +++ b/test/moves/aromatherapy.test.ts @@ -1,11 +1,10 @@ -import { StatusEffect } from "#app/enums/status-effect"; -import { CommandPhase } from "#app/phases/command-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Aromatherapy", () => { let phaserGame: Phaser.Game; @@ -40,7 +39,6 @@ describe("Moves - Aromatherapy", () => { vi.spyOn(partyPokemon, "resetStatus"); game.move.select(MoveId.AROMATHERAPY, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -62,7 +60,6 @@ describe("Moves - Aromatherapy", () => { vi.spyOn(rightOpp, "resetStatus"); game.move.select(MoveId.AROMATHERAPY, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -86,7 +83,6 @@ describe("Moves - Aromatherapy", () => { vi.spyOn(partyPokemon, "resetStatus"); game.move.select(MoveId.AROMATHERAPY, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); diff --git a/test/moves/assist.test.ts b/test/moves/assist.test.ts index 27aa5528f17..eff153534dd 100644 --- a/test/moves/assist.test.ts +++ b/test/moves/assist.test.ts @@ -1,11 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { Stat } from "#app/enums/stat"; -import { MoveResult } from "#enums/move-result"; -import { CommandPhase } from "#app/phases/command-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -80,7 +79,6 @@ describe("Moves - Assist", () => { // Player uses Sketch to copy Swords Dance, Player_2 stalls a turn. Player will attempt Assist and should have no usable moves await game.toNextTurn(); game.move.select(MoveId.ASSIST, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.PROTECT, 1); await game.toNextTurn(); @@ -96,7 +94,6 @@ describe("Moves - Assist", () => { game.move.changeMoveset(shuckle, [MoveId.ASSIST, MoveId.SKETCH, MoveId.PROTECT, MoveId.DRAGON_TAIL]); game.move.select(MoveId.ASSIST, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.ASSIST, 1); await game.toNextTurn(); diff --git a/test/moves/astonish.test.ts b/test/moves/astonish.test.ts index 48deadf7a01..7db149c9975 100644 --- a/test/moves/astonish.test.ts +++ b/test/moves/astonish.test.ts @@ -1,13 +1,13 @@ -import { allMoves } from "#app/data/data-lists"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BerryPhase } from "#phases/berry-phase"; +import { CommandPhase } from "#phases/command-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; diff --git a/test/moves/aurora_veil.test.ts b/test/moves/aurora_veil.test.ts index 8faf3654401..24e7b1857cc 100644 --- a/test/moves/aurora_veil.test.ts +++ b/test/moves/aurora_veil.test.ts @@ -1,15 +1,15 @@ -import type BattleScene from "#app/battle-scene"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import type Move from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import type Pokemon from "#app/field/pokemon"; -import { NumberHolder } from "#app/utils/common"; +import type { BattleScene } from "#app/battle-scene"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/autotomize.test.ts b/test/moves/autotomize.test.ts index 000dd19b8f5..01021870b88 100644 --- a/test/moves/autotomize.test.ts +++ b/test/moves/autotomize.test.ts @@ -1,9 +1,9 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Autotomize", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/baddy_bad.test.ts b/test/moves/baddy_bad.test.ts index 8709b6d3eac..0af04f0c0c7 100644 --- a/test/moves/baddy_bad.test.ts +++ b/test/moves/baddy_bad.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/baneful_bunker.test.ts b/test/moves/baneful_bunker.test.ts index c9cc2025a58..09050dcbb44 100644 --- a/test/moves/baneful_bunker.test.ts +++ b/test/moves/baneful_bunker.test.ts @@ -1,11 +1,11 @@ +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { BattlerIndex } from "#enums/battler-index"; -import { StatusEffect } from "#app/enums/status-effect"; describe("Moves - Baneful Bunker", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/baton_pass.test.ts b/test/moves/baton_pass.test.ts index 1b1b0620133..af49ac0db9f 100644 --- a/test/moves/baton_pass.test.ts +++ b/test/moves/baton_pass.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/beak_blast.test.ts b/test/moves/beak_blast.test.ts index 2cb9f9bdd6f..60a6bb75066 100644 --- a/test/moves/beak_blast.test.ts +++ b/test/moves/beak_blast.test.ts @@ -1,12 +1,12 @@ -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { StatusEffect } from "#app/enums/status-effect"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { BerryPhase } from "#phases/berry-phase"; +import { MovePhase } from "#phases/move-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/beat_up.test.ts b/test/moves/beat_up.test.ts index 7c4686ab4fa..8387b6f671b 100644 --- a/test/moves/beat_up.test.ts +++ b/test/moves/beat_up.test.ts @@ -1,9 +1,9 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { StatusEffect } from "#app/enums/status-effect"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/belly_drum.test.ts b/test/moves/belly_drum.test.ts index 239b3c3d794..9044e10589f 100644 --- a/test/moves/belly_drum.test.ts +++ b/test/moves/belly_drum.test.ts @@ -1,12 +1,12 @@ -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { toDmgValue } from "#app/utils/common"; +import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import { AbilityId } from "#enums/ability-id"; // RATIO : HP Cost of Move const RATIO = 2; diff --git a/test/moves/burning_jealousy.test.ts b/test/moves/burning_jealousy.test.ts index ce0a1ce57c9..9f8dfc29ee4 100644 --- a/test/moves/burning_jealousy.test.ts +++ b/test/moves/burning_jealousy.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { StatusEffect } from "#app/enums/status-effect"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/camouflage.test.ts b/test/moves/camouflage.test.ts index 6f28493b1e5..39bf8f6d5b5 100644 --- a/test/moves/camouflage.test.ts +++ b/test/moves/camouflage.test.ts @@ -1,10 +1,10 @@ +import { TerrainType } from "#data/terrain"; import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { TerrainType } from "#app/data/terrain"; -import { PokemonType } from "#enums/pokemon-type"; import { BattlerIndex } from "#enums/battler-index"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/ceaseless_edge.test.ts b/test/moves/ceaseless_edge.test.ts index 1dec98fe3a8..2d28f4b1a1b 100644 --- a/test/moves/ceaseless_edge.test.ts +++ b/test/moves/ceaseless_edge.test.ts @@ -1,13 +1,13 @@ -import { ArenaTrapTag } from "#app/data/arena-tag"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allMoves } from "#app/data/data-lists"; +import { ArenaTrapTag } from "#data/arena-tag"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; diff --git a/test/moves/chilly_reception.test.ts b/test/moves/chilly_reception.test.ts index 4d15bfff284..f34e61873cc 100644 --- a/test/moves/chilly_reception.test.ts +++ b/test/moves/chilly_reception.test.ts @@ -1,11 +1,11 @@ -import { RandomMoveAttr } from "#app/data/moves/move"; -import { MoveResult } from "#enums/move-result"; import { getPokemonNameWithAffix } from "#app/messages"; +import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#app/enums/ability-id"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/testUtils/gameManager"; +import { RandomMoveAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import i18next from "i18next"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/chloroblast.test.ts b/test/moves/chloroblast.test.ts index 6c790bac150..c87f79c440a 100644 --- a/test/moves/chloroblast.test.ts +++ b/test/moves/chloroblast.test.ts @@ -1,8 +1,8 @@ -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/clangorous_soul.test.ts b/test/moves/clangorous_soul.test.ts index f08503acdc6..dc208087bb8 100644 --- a/test/moves/clangorous_soul.test.ts +++ b/test/moves/clangorous_soul.test.ts @@ -1,10 +1,10 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; /** HP Cost of Move */ const RATIO = 3; diff --git a/test/moves/copycat.test.ts b/test/moves/copycat.test.ts index 8d135d5e2c7..e6a81cb5627 100644 --- a/test/moves/copycat.test.ts +++ b/test/moves/copycat.test.ts @@ -1,14 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { RandomMoveAttr } from "#app/data/moves/move"; -import { Stat } from "#app/enums/stat"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; -import { MoveUseMode } from "#enums/move-use-mode"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { MoveUseMode } from "#enums/move-use-mode"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Copycat", () => { let phaserGame: Phaser.Game; @@ -65,7 +64,7 @@ describe("Moves - Copycat", () => { it("should copy the called move when the last move successfully calls another", async () => { game.override.moveset([MoveId.SPLASH, MoveId.METRONOME]).enemyMoveset(MoveId.COPYCAT); await game.classicMode.startBattle([SpeciesId.DRAMPA]); - vi.spyOn(RandomMoveAttr.prototype, "getMoveOverride").mockReturnValue(MoveId.SWORDS_DANCE); + game.move.forceMetronomeMove(MoveId.SWORDS_DANCE, true); game.move.select(MoveId.METRONOME); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); // Player moves first so enemy can copy Swords Dance diff --git a/test/moves/crafty_shield.test.ts b/test/moves/crafty_shield.test.ts index 12a607a2a1b..98c0dfd7c9a 100644 --- a/test/moves/crafty_shield.test.ts +++ b/test/moves/crafty_shield.test.ts @@ -1,13 +1,12 @@ +import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { BerryPhase } from "#phases/berry-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -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"; describe("Moves - Crafty Shield", () => { let phaserGame: Phaser.Game; @@ -42,9 +41,6 @@ describe("Moves - Crafty Shield", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.CRAFTY_SHIELD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -60,9 +56,6 @@ describe("Moves - Crafty Shield", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.CRAFTY_SHIELD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -78,9 +71,6 @@ describe("Moves - Crafty Shield", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.CRAFTY_SHIELD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -94,9 +84,6 @@ describe("Moves - Crafty Shield", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.CRAFTY_SHIELD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SWORDS_DANCE, 1); await game.phaseInterceptor.to(BerryPhase, false); diff --git a/test/moves/defog.test.ts b/test/moves/defog.test.ts index 17dc0613e9b..253eac4f22c 100644 --- a/test/moves/defog.test.ts +++ b/test/moves/defog.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/destiny_bond.test.ts b/test/moves/destiny_bond.test.ts index a78d46b464b..29bbfabb09f 100644 --- a/test/moves/destiny_bond.test.ts +++ b/test/moves/destiny_bond.test.ts @@ -1,16 +1,16 @@ -import type { ArenaTrapTag } from "#app/data/arena-tag"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allMoves } from "#app/data/data-lists"; +import type { ArenaTrapTag } from "#data/arena-tag"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { PokemonInstantReviveModifier } from "#modifiers/modifier"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { BattlerIndex } from "#enums/battler-index"; -import { StatusEffect } from "#enums/status-effect"; -import { PokemonInstantReviveModifier } from "#app/modifier/modifier"; describe("Moves - Destiny Bond", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/diamond_storm.test.ts b/test/moves/diamond_storm.test.ts index 20067b3a0f3..1eb86f94b76 100644 --- a/test/moves/diamond_storm.test.ts +++ b/test/moves/diamond_storm.test.ts @@ -1,9 +1,9 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/dig.test.ts b/test/moves/dig.test.ts index a80ac0405fe..9d431b78838 100644 --- a/test/moves/dig.test.ts +++ b/test/moves/dig.test.ts @@ -1,13 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import { MoveResult } from "#enums/move-result"; -import { describe, beforeAll, afterEach, beforeEach, it, expect } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Dig", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/disable.test.ts b/test/moves/disable.test.ts index b113acb9525..f6b1c24ac7d 100644 --- a/test/moves/disable.test.ts +++ b/test/moves/disable.test.ts @@ -1,13 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; -import { MoveUseMode } from "#enums/move-use-mode"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { MoveUseMode } from "#enums/move-use-mode"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { RandomMoveAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { RandomMoveAttr } from "#app/data/moves/move"; describe("Moves - Disable", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/dive.test.ts b/test/moves/dive.test.ts index 9c467976775..c7e4f99f6cb 100644 --- a/test/moves/dive.test.ts +++ b/test/moves/dive.test.ts @@ -1,13 +1,13 @@ -import { BattlerTagType } from "#enums/battler-tag-type"; -import { StatusEffect } from "#enums/status-effect"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { StatusEffect } from "#enums/status-effect"; import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Dive", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/doodle.test.ts b/test/moves/doodle.test.ts index 2dbd5c08c8f..5f4b8ab9b39 100644 --- a/test/moves/doodle.test.ts +++ b/test/moves/doodle.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/double_team.test.ts b/test/moves/double_team.test.ts index d1f6c5be3e4..9cdae33af41 100644 --- a/test/moves/double_team.test.ts +++ b/test/moves/double_team.test.ts @@ -1,9 +1,9 @@ -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/dragon_cheer.test.ts b/test/moves/dragon_cheer.test.ts index 56feac513a1..7d1f35fe2d4 100644 --- a/test/moves/dragon_cheer.test.ts +++ b/test/moves/dragon_cheer.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/dragon_rage.test.ts b/test/moves/dragon_rage.test.ts index c5bed3377fa..46e7dfa5a21 100644 --- a/test/moves/dragon_rage.test.ts +++ b/test/moves/dragon_rage.test.ts @@ -1,14 +1,14 @@ -import { Stat } from "#enums/stat"; -import { PokemonType } from "#enums/pokemon-type"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import type { EnemyPokemon, PlayerPokemon } from "#field/pokemon"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SpeciesId } from "#enums/species-id"; describe("Moves - Dragon Rage", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/dragon_tail.test.ts b/test/moves/dragon_tail.test.ts index 8c456f27853..c5a77716c56 100644 --- a/test/moves/dragon_tail.test.ts +++ b/test/moves/dragon_tail.test.ts @@ -1,13 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import { Status } from "#app/data/status-effect"; -import { Challenges } from "#enums/challenges"; -import { StatusEffect } from "#enums/status-effect"; -import { PokemonType } from "#enums/pokemon-type"; +import { allMoves } from "#data/data-lists"; +import { Status } from "#data/status-effect"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { Challenges } from "#enums/challenges"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/dynamax_cannon.test.ts b/test/moves/dynamax_cannon.test.ts index 3febf918de8..fcbbccd5123 100644 --- a/test/moves/dynamax_cannon.test.ts +++ b/test/moves/dynamax_cannon.test.ts @@ -1,11 +1,11 @@ +import { allMoves } from "#data/data-lists"; import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { MoveId } from "#enums/move-id"; -import type Move from "#app/data/moves/move"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { Move } from "#moves/move"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/effectiveness.test.ts b/test/moves/effectiveness.test.ts index 58b2d07b1b6..58e041fb5c5 100644 --- a/test/moves/effectiveness.test.ts +++ b/test/moves/effectiveness.test.ts @@ -1,12 +1,12 @@ -import { allMoves } from "#app/data/data-lists"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { TrainerSlot } from "#enums/trainer-slot"; -import { PokemonType } from "#enums/pokemon-type"; +import * as Messages from "#app/messages"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import * as Messages from "#app/messages"; -import GameManager from "#test/testUtils/gameManager"; +import { TrainerSlot } from "#enums/trainer-slot"; +import { GameManager } from "#test/testUtils/gameManager"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import Phaser from "phaser"; import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/electrify.test.ts b/test/moves/electrify.test.ts index b6a3cac9fff..c3aa925a331 100644 --- a/test/moves/electrify.test.ts +++ b/test/moves/electrify.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Electrify", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/electro_shot.test.ts b/test/moves/electro_shot.test.ts index 1d69e9c2fa7..cb696b162d5 100644 --- a/test/moves/electro_shot.test.ts +++ b/test/moves/electro_shot.test.ts @@ -1,13 +1,13 @@ +import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { WeatherType } from "#enums/weather-type"; -import { MoveResult } from "#enums/move-result"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Electro Shot", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/encore.test.ts b/test/moves/encore.test.ts index 772b7c96060..c20dc194ead 100644 --- a/test/moves/encore.test.ts +++ b/test/moves/encore.test.ts @@ -1,10 +1,10 @@ -import { BattlerTagType } from "#enums/battler-tag-type"; -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/endure.test.ts b/test/moves/endure.test.ts index 7738f7426fe..717c9d58211 100644 --- a/test/moves/endure.test.ts +++ b/test/moves/endure.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/entrainment.test.ts b/test/moves/entrainment.test.ts index 65586149492..9d7da455525 100644 --- a/test/moves/entrainment.test.ts +++ b/test/moves/entrainment.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/fairy_lock.test.ts b/test/moves/fairy_lock.test.ts index b9f854cdc93..5f20c39c6f8 100644 --- a/test/moves/fairy_lock.test.ts +++ b/test/moves/fairy_lock.test.ts @@ -1,9 +1,9 @@ -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/fake_out.test.ts b/test/moves/fake_out.test.ts index 4fc83e5aa07..815de9b9225 100644 --- a/test/moves/fake_out.test.ts +++ b/test/moves/fake_out.test.ts @@ -1,6 +1,6 @@ -import GameManager from "#test/testUtils/gameManager"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/false_swipe.test.ts b/test/moves/false_swipe.test.ts index bf9c8307c22..0aa16ff43e1 100644 --- a/test/moves/false_swipe.test.ts +++ b/test/moves/false_swipe.test.ts @@ -1,8 +1,8 @@ -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/fell_stinger.test.ts b/test/moves/fell_stinger.test.ts index 0737db9105f..c3ea17904af 100644 --- a/test/moves/fell_stinger.test.ts +++ b/test/moves/fell_stinger.test.ts @@ -1,13 +1,13 @@ -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import { StatusEffect } from "#app/enums/status-effect"; -import { WeatherType } from "#app/enums/weather-type"; -import { allMoves } from "#app/data/data-lists"; +import { StatusEffect } from "#enums/status-effect"; +import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Fell Stinger", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/fillet_away.test.ts b/test/moves/fillet_away.test.ts index 1e00f2ee02d..3ba4f5740eb 100644 --- a/test/moves/fillet_away.test.ts +++ b/test/moves/fillet_away.test.ts @@ -1,9 +1,9 @@ -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { toDmgValue } from "#app/utils/common"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/test/moves/first-attack-double-power.test.ts b/test/moves/first-attack-double-power.test.ts new file mode 100644 index 00000000000..7d1d9c4d762 --- /dev/null +++ b/test/moves/first-attack-double-power.test.ts @@ -0,0 +1,121 @@ +import { allMoves } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Moves - Fishious Rend & Bolt Beak", () => { + 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 + .ability(AbilityId.STURDY) + .battleStyle("single") + .startingWave(5) + .criticalHits(false) + .enemyLevel(100) + .enemySpecies(SpeciesId.DRACOVISH) + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH); + }); + + it.each<{ name: string; move: MoveId }>([ + { name: "Bolt Beak", move: MoveId.BOLT_BEAK }, + { name: "Fishious Rend", move: MoveId.FISHIOUS_REND }, + ])("$name should double power if the user moves before the target", async ({ move }) => { + const powerSpy = vi.spyOn(allMoves[move], "calculateBattlePower"); + await game.classicMode.startBattle([SpeciesId.FEEBAS]); + + // turn 1: enemy, then player (no boost) + game.move.use(move); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toNextTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[move].power); + + // turn 2: player, then enemy (boost) + game.move.use(move); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toEndOfTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[move].power * 2); + }); + + it("should only consider the selected target in Double Battles", async () => { + game.override.battleStyle("double"); + const powerSpy = vi.spyOn(allMoves[MoveId.BOLT_BEAK], "calculateBattlePower"); + await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.MILOTIC]); + + // Use move after everyone but P1 and enemy 1 have already moved + game.move.use(MoveId.BOLT_BEAK, BattlerIndex.PLAYER, BattlerIndex.ENEMY); + game.move.use(MoveId.SPLASH, BattlerIndex.PLAYER_2); + await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toEndOfTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[MoveId.BOLT_BEAK].power * 2); + }); + + it("should double power on the turn the target switches in", async () => { + await game.classicMode.startBattle([SpeciesId.FEEBAS]); + const powerSpy = vi.spyOn(allMoves[MoveId.BOLT_BEAK], "calculateBattlePower"); + + game.move.use(MoveId.BOLT_BEAK); + game.forceEnemyToSwitch(); + await game.toEndOfTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[MoveId.BOLT_BEAK].power * 2); + }); + + it("should double power on forced switch-induced sendouts", async () => { + await game.classicMode.startBattle([SpeciesId.FEEBAS]); + const powerSpy = vi.spyOn(allMoves[MoveId.BOLT_BEAK], "calculateBattlePower"); + + game.move.use(MoveId.BOLT_BEAK); + await game.move.forceEnemyMove(MoveId.U_TURN); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toEndOfTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[MoveId.BOLT_BEAK].power * 2); + }); + + it.each<{ type: string; allyMove: MoveId }>([ + { type: "a Dancer-induced", allyMove: MoveId.FIERY_DANCE }, + { type: "an Instructed", allyMove: MoveId.INSTRUCT }, + ])("should double power if $type move is used as the target's first action that turn", async ({ allyMove }) => { + game.override.battleStyle("double").enemyAbility(AbilityId.DANCER); + const powerSpy = vi.spyOn(allMoves[MoveId.FISHIOUS_REND], "calculateBattlePower"); + await game.classicMode.startBattle([SpeciesId.DRACOVISH, SpeciesId.ARCTOZOLT]); + + // Simulate enemy having used splash last turn to allow Instruct to copy it + const enemy = game.field.getEnemyPokemon(); + enemy.pushMoveHistory({ + move: MoveId.SPLASH, + targets: [BattlerIndex.ENEMY], + turn: game.scene.currentBattle.turn - 1, + useMode: MoveUseMode.NORMAL, + }); + + game.move.use(MoveId.FISHIOUS_REND, BattlerIndex.PLAYER, BattlerIndex.ENEMY); + game.move.use(allyMove, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY); + await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); + await game.toEndOfTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[MoveId.FISHIOUS_REND].power); + }); +}); diff --git a/test/moves/fissure.test.ts b/test/moves/fissure.test.ts index 27031a7736d..6fadf867e8a 100644 --- a/test/moves/fissure.test.ts +++ b/test/moves/fissure.test.ts @@ -1,13 +1,13 @@ -import { Stat } from "#enums/stat"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import type { EnemyPokemon, PlayerPokemon } from "#field/pokemon"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SpeciesId } from "#enums/species-id"; describe("Moves - Fissure", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/flame_burst.test.ts b/test/moves/flame_burst.test.ts index 0a378df1077..76d9a100e37 100644 --- a/test/moves/flame_burst.test.ts +++ b/test/moves/flame_burst.test.ts @@ -1,10 +1,10 @@ -import { allAbilities } from "#app/data/data-lists"; +import { allAbilities } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import type Pokemon from "#app/field/pokemon"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/flower_shield.test.ts b/test/moves/flower_shield.test.ts index c3c5e5cf870..16a1efacf35 100644 --- a/test/moves/flower_shield.test.ts +++ b/test/moves/flower_shield.test.ts @@ -1,12 +1,12 @@ -import { Stat } from "#enums/stat"; -import { SemiInvulnerableTag } from "#app/data/battler-tags"; -import { PokemonType } from "#enums/pokemon-type"; -import { BiomeId } from "#enums/biome-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { SemiInvulnerableTag } from "#data/battler-tags"; import { AbilityId } from "#enums/ability-id"; +import { BiomeId } from "#enums/biome-id"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/fly.test.ts b/test/moves/fly.test.ts index 7d8a6ee659e..c27db3686b4 100644 --- a/test/moves/fly.test.ts +++ b/test/moves/fly.test.ts @@ -1,14 +1,14 @@ -import { BattlerTagType } from "#enums/battler-tag-type"; -import { StatusEffect } from "#enums/status-effect"; -import { MoveResult } from "#enums/move-result"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Fly", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/focus_punch.test.ts b/test/moves/focus_punch.test.ts index 38b57b201c0..5123e99c6ff 100644 --- a/test/moves/focus_punch.test.ts +++ b/test/moves/focus_punch.test.ts @@ -1,12 +1,12 @@ -import { BerryPhase } from "#app/phases/berry-phase"; -import { MessagePhase } from "#app/phases/message-phase"; -import { MoveHeaderPhase } from "#app/phases/move-header-phase"; -import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BerryPhase } from "#phases/berry-phase"; +import { MessagePhase } from "#phases/message-phase"; +import { MoveHeaderPhase } from "#phases/move-header-phase"; +import { SwitchSummonPhase } from "#phases/switch-summon-phase"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import i18next from "i18next"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/follow_me.test.ts b/test/moves/follow_me.test.ts index a99ac0b6c00..891b1844512 100644 --- a/test/moves/follow_me.test.ts +++ b/test/moves/follow_me.test.ts @@ -1,10 +1,10 @@ -import { Stat } from "#enums/stat"; -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/test/moves/foresight.test.ts b/test/moves/foresight.test.ts index 96a341582f9..3163f65dd79 100644 --- a/test/moves/foresight.test.ts +++ b/test/moves/foresight.test.ts @@ -1,7 +1,7 @@ import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/forests_curse.test.ts b/test/moves/forests_curse.test.ts index 81ced674a33..812d3c57217 100644 --- a/test/moves/forests_curse.test.ts +++ b/test/moves/forests_curse.test.ts @@ -1,8 +1,8 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { PokemonType } from "#enums/pokemon-type"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/freeze_dry.test.ts b/test/moves/freeze_dry.test.ts index f1577d3d6c5..5639330db1b 100644 --- a/test/moves/freeze_dry.test.ts +++ b/test/moves/freeze_dry.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { PokemonType } from "#enums/pokemon-type"; +import { BattlerIndex } from "#enums/battler-index"; import { Challenges } from "#enums/challenges"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/freezy_frost.test.ts b/test/moves/freezy_frost.test.ts index 55f67de085f..9cf2f38b286 100644 --- a/test/moves/freezy_frost.test.ts +++ b/test/moves/freezy_frost.test.ts @@ -1,12 +1,11 @@ -import { Stat } from "#enums/stat"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { allMoves } from "#app/data/data-lists"; -import { CommandPhase } from "#app/phases/command-phase"; describe("Moves - Freezy Frost", () => { let phaserGame: Phaser.Game; @@ -77,7 +76,6 @@ describe("Moves - Freezy Frost", () => { const [leftOpp, rightOpp] = game.scene.getEnemyField(); game.move.select(MoveId.HOWL, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -87,7 +85,6 @@ describe("Moves - Freezy Frost", () => { expect(rightOpp.getStatStage(Stat.ATK)).toBe(2); game.move.select(MoveId.FREEZY_FROST, 0, leftOpp.getBattlerIndex()); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); diff --git a/test/moves/fusion_bolt.test.ts b/test/moves/fusion_bolt.test.ts index c92a483a497..ad6810cb412 100644 --- a/test/moves/fusion_bolt.test.ts +++ b/test/moves/fusion_bolt.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/fusion_flare.test.ts b/test/moves/fusion_flare.test.ts index c0df347fcce..d86f784bce4 100644 --- a/test/moves/fusion_flare.test.ts +++ b/test/moves/fusion_flare.test.ts @@ -1,8 +1,8 @@ -import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/fusion_flare_bolt.test.ts b/test/moves/fusion_flare_bolt.test.ts index 1967e9f12d1..1777eb5e07e 100644 --- a/test/moves/fusion_flare_bolt.test.ts +++ b/test/moves/fusion_flare_bolt.test.ts @@ -1,14 +1,14 @@ -import { Stat } from "#enums/stat"; +import { allMoves } from "#data/data-lists"; import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import type Move from "#app/data/moves/move"; -import { DamageAnimPhase } from "#app/phases/damage-anim-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 { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import type { Move } from "#moves/move"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { MovePhase } from "#phases/move-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/future_sight.test.ts b/test/moves/future_sight.test.ts index 7de70a88d10..96b71b8b0f1 100644 --- a/test/moves/future_sight.test.ts +++ b/test/moves/future_sight.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/gastro_acid.test.ts b/test/moves/gastro_acid.test.ts index 15a63561f94..9b8e8f33250 100644 --- a/test/moves/gastro_acid.test.ts +++ b/test/moves/gastro_acid.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { MoveResult } from "#enums/move-result"; import { BattleType } from "#enums/battle-type"; -import GameManager from "#test/testUtils/gameManager"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Gastro Acid", () => { diff --git a/test/moves/geomancy.test.ts b/test/moves/geomancy.test.ts index 452022b4cf1..100c4d85637 100644 --- a/test/moves/geomancy.test.ts +++ b/test/moves/geomancy.test.ts @@ -1,12 +1,12 @@ -import type { EffectiveStat } from "#enums/stat"; -import { Stat } from "#enums/stat"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { EffectiveStat } from "#enums/stat"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Geomancy", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/gigaton_hammer.test.ts b/test/moves/gigaton_hammer.test.ts index d80743f4ed0..69186886f40 100644 --- a/test/moves/gigaton_hammer.test.ts +++ b/test/moves/gigaton_hammer.test.ts @@ -1,7 +1,7 @@ import { BattlerIndex } from "#enums/battler-index"; -import GameManager from "#test/testUtils/gameManager"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/glaive_rush.test.ts b/test/moves/glaive_rush.test.ts index 0b6f30da71a..a09c35604b9 100644 --- a/test/moves/glaive_rush.test.ts +++ b/test/moves/glaive_rush.test.ts @@ -1,8 +1,8 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/growth.test.ts b/test/moves/growth.test.ts index 6eec30be49f..94df21271a1 100644 --- a/test/moves/growth.test.ts +++ b/test/moves/growth.test.ts @@ -1,12 +1,12 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Growth", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/grudge.test.ts b/test/moves/grudge.test.ts index 36030c88bad..ff18cd5d6a4 100644 --- a/test/moves/grudge.test.ts +++ b/test/moves/grudge.test.ts @@ -1,8 +1,8 @@ import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { BattlerIndex } from "#enums/battler-index"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/guard_split.test.ts b/test/moves/guard_split.test.ts index 878bb80f251..7972296f6ae 100644 --- a/test/moves/guard_split.test.ts +++ b/test/moves/guard_split.test.ts @@ -1,11 +1,11 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Guard Split", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/guard_swap.test.ts b/test/moves/guard_swap.test.ts index d2c33e45df0..eda4349b9f8 100644 --- a/test/moves/guard_swap.test.ts +++ b/test/moves/guard_swap.test.ts @@ -1,12 +1,12 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { Stat, BATTLE_STATS } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { BATTLE_STATS, Stat } from "#enums/stat"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Guard Swap", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/hard_press.test.ts b/test/moves/hard_press.test.ts index e57c9af981f..f61f5084752 100644 --- a/test/moves/hard_press.test.ts +++ b/test/moves/hard_press.test.ts @@ -1,12 +1,12 @@ -import { allMoves } from "#app/data/data-lists"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { Move } from "#moves/move"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import type Move from "#app/data/moves/move"; describe("Moves - Hard Press", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/haze.test.ts b/test/moves/haze.test.ts index f3e3dafae0a..990bbc62ae8 100644 --- a/test/moves/haze.test.ts +++ b/test/moves/haze.test.ts @@ -1,11 +1,11 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Haze", () => { describe("integration tests", () => { diff --git a/test/moves/heal_bell.test.ts b/test/moves/heal_bell.test.ts index 914307b4795..e7f6548713a 100644 --- a/test/moves/heal_bell.test.ts +++ b/test/moves/heal_bell.test.ts @@ -1,11 +1,10 @@ -import { StatusEffect } from "#app/enums/status-effect"; -import { CommandPhase } from "#app/phases/command-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Heal Bell", () => { let phaserGame: Phaser.Game; @@ -40,7 +39,6 @@ describe("Moves - Heal Bell", () => { vi.spyOn(partyPokemon, "resetStatus"); game.move.select(MoveId.HEAL_BELL, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -62,7 +60,6 @@ describe("Moves - Heal Bell", () => { vi.spyOn(rightOpp, "resetStatus"); game.move.select(MoveId.HEAL_BELL, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -86,7 +83,6 @@ describe("Moves - Heal Bell", () => { vi.spyOn(partyPokemon, "resetStatus"); game.move.select(MoveId.HEAL_BELL, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); diff --git a/test/moves/heal_block.test.ts b/test/moves/heal_block.test.ts index dc69b5c2974..0f3ff0df683 100644 --- a/test/moves/heal_block.test.ts +++ b/test/moves/heal_block.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/heart_swap.test.ts b/test/moves/heart_swap.test.ts index e9e407b6b30..c90b13b88ef 100644 --- a/test/moves/heart_swap.test.ts +++ b/test/moves/heart_swap.test.ts @@ -1,12 +1,12 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { BATTLE_STATS } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { BATTLE_STATS } from "#enums/stat"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Heart Swap", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/hyper_beam.test.ts b/test/moves/hyper_beam.test.ts index bca7cba4e9a..aa3ecfe910b 100644 --- a/test/moves/hyper_beam.test.ts +++ b/test/moves/hyper_beam.test.ts @@ -1,11 +1,11 @@ -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { BerryPhase } from "#phases/berry-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/imprison.test.ts b/test/moves/imprison.test.ts index 26eadb685f9..0007c07985c 100644 --- a/test/moves/imprison.test.ts +++ b/test/moves/imprison.test.ts @@ -1,11 +1,11 @@ +import { AbilityId } from "#enums/ability-id"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { ArenaTagType } from "#enums/arena-tag-type"; describe("Moves - Imprison", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/instruct.test.ts b/test/moves/instruct.test.ts index 6b06fa04dff..c73091a0eea 100644 --- a/test/moves/instruct.test.ts +++ b/test/moves/instruct.test.ts @@ -1,8 +1,4 @@ -import type { TurnMove } from "#app/@types/turn-move"; -import { allMoves } from "#app/data/data-lists"; -import { RandomMoveAttr } from "#app/data/moves/move"; -import type Pokemon from "#app/field/pokemon"; -import type { MovePhase } from "#app/phases/move-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; @@ -10,7 +6,11 @@ import { MoveResult } from "#enums/move-result"; import { MoveUseMode } from "#enums/move-use-mode"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import { RandomMoveAttr } from "#moves/move"; +import type { MovePhase } from "#phases/move-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { TurnMove } from "#types/turn-move"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/jaw_lock.test.ts b/test/moves/jaw_lock.test.ts index 4e103c14f98..b5e98fbf6d8 100644 --- a/test/moves/jaw_lock.test.ts +++ b/test/moves/jaw_lock.test.ts @@ -1,13 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BerryPhase } from "#app/phases/berry-phase"; -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 "#test/testUtils/gameManager"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { BerryPhase } from "#phases/berry-phase"; +import { FaintPhase } from "#phases/faint-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/lash_out.test.ts b/test/moves/lash_out.test.ts index 33a58914978..b529351e01f 100644 --- a/test/moves/lash_out.test.ts +++ b/test/moves/lash_out.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/last-resort.test.ts b/test/moves/last-resort.test.ts index 3cb98a0cd92..4eaf1ee7f5d 100644 --- a/test/moves/last-resort.test.ts +++ b/test/moves/last-resort.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; -import { MoveUseMode } from "#enums/move-use-mode"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { MoveUseMode } from "#enums/move-use-mode"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/last_respects.test.ts b/test/moves/last_respects.test.ts index 14aa5ad3309..e438971125a 100644 --- a/test/moves/last_respects.test.ts +++ b/test/moves/last_respects.test.ts @@ -1,11 +1,11 @@ -import { MoveId } from "#enums/move-id"; -import { BattlerIndex } from "#enums/battler-index"; -import { SpeciesId } from "#enums/species-id"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; -import { allMoves } from "#app/data/data-lists"; -import type Move from "#app/data/moves/move"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import type { Move } from "#moves/move"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/light_screen.test.ts b/test/moves/light_screen.test.ts index 8c436aacf6a..5dcdc3c271c 100644 --- a/test/moves/light_screen.test.ts +++ b/test/moves/light_screen.test.ts @@ -1,15 +1,15 @@ -import type BattleScene from "#app/battle-scene"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import type Move from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; +import type { BattleScene } from "#app/battle-scene"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import type Pokemon from "#app/field/pokemon"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { NumberHolder } from "#app/utils/common"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/lucky_chant.test.ts b/test/moves/lucky_chant.test.ts index a57d231134b..afcdd901382 100644 --- a/test/moves/lucky_chant.test.ts +++ b/test/moves/lucky_chant.test.ts @@ -1,10 +1,10 @@ import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { BattlerIndex } from "#enums/battler-index"; describe("Moves - Lucky Chant", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/lunar_blessing.test.ts b/test/moves/lunar_blessing.test.ts index 2709ccbacf3..481156748e3 100644 --- a/test/moves/lunar_blessing.test.ts +++ b/test/moves/lunar_blessing.test.ts @@ -1,9 +1,8 @@ -import { StatusEffect } from "#app/enums/status-effect"; -import { CommandPhase } from "#app/phases/command-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -47,7 +46,6 @@ describe("Moves - Lunar Blessing", () => { vi.spyOn(rightPlayer, "heal"); game.move.select(MoveId.LUNAR_BLESSING, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -67,7 +65,6 @@ describe("Moves - Lunar Blessing", () => { vi.spyOn(rightPlayer, "resetStatus"); game.move.select(MoveId.LUNAR_BLESSING, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); diff --git a/test/moves/lunar_dance.test.ts b/test/moves/lunar_dance.test.ts index aea1e31b616..3fcf953a37c 100644 --- a/test/moves/lunar_dance.test.ts +++ b/test/moves/lunar_dance.test.ts @@ -1,11 +1,10 @@ -import { StatusEffect } from "#app/enums/status-effect"; -import { CommandPhase } from "#app/phases/command-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Lunar Dance", () => { let phaserGame: Phaser.Game; @@ -40,7 +39,6 @@ describe("Moves - Lunar Dance", () => { game.move.select(MoveId.SPLASH, 0); game.move.select(MoveId.SPLASH, 1); - await game.phaseInterceptor.to(CommandPhase); await game.toNextTurn(); // Bulbasaur should still be burned and have used a PP for splash and not at max hp @@ -51,7 +49,6 @@ describe("Moves - Lunar Dance", () => { // Switch out Bulbasaur for Rattata so we can swtich bulbasaur back in with lunar dance game.doSwitchPokemon(2); game.move.select(MoveId.SPLASH, 1); - await game.phaseInterceptor.to(CommandPhase); await game.toNextTurn(); game.move.select(MoveId.SPLASH, 0); @@ -67,7 +64,6 @@ describe("Moves - Lunar Dance", () => { game.move.select(MoveId.SPLASH, 0); game.move.select(MoveId.LUNAR_DANCE); - await game.phaseInterceptor.to(CommandPhase); await game.toNextTurn(); // Using Lunar dance again should fail because nothing in party and rattata should be alive diff --git a/test/moves/magic_coat.test.ts b/test/moves/magic_coat.test.ts index 566c206f1ba..4a026ceb84e 100644 --- a/test/moves/magic_coat.test.ts +++ b/test/moves/magic_coat.test.ts @@ -1,15 +1,15 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allMoves } from "#app/data/data-lists"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { Stat } from "#app/enums/stat"; -import { StatusEffect } from "#app/enums/status-effect"; -import { MoveResult } from "#enums/move-result"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Magic Coat", () => { diff --git a/test/moves/magnet_rise.test.ts b/test/moves/magnet_rise.test.ts index d8fc6a74225..da76c178be8 100644 --- a/test/moves/magnet_rise.test.ts +++ b/test/moves/magnet_rise.test.ts @@ -1,15 +1,12 @@ -import { CommandPhase } from "#app/phases/command-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Magnet Rise", () => { let phaserGame: Phaser.Game; let game: GameManager; - const moveToUse = MoveId.MAGNET_RISE; beforeAll(() => { phaserGame = new Phaser.Game({ @@ -25,38 +22,36 @@ describe("Moves - Magnet Rise", () => { game = new GameManager(phaserGame); game.override .battleStyle("single") - .starterSpecies(SpeciesId.MAGNEZONE) .enemySpecies(SpeciesId.RATTATA) - .enemyMoveset(MoveId.DRILL_RUN) + .enemyMoveset(MoveId.EARTHQUAKE) .criticalHits(false) - .enemyLevel(1) - .moveset([moveToUse, MoveId.SPLASH, MoveId.GRAVITY, MoveId.BATON_PASS]); + .enemyLevel(1); }); - it("MAGNET RISE", async () => { - await game.classicMode.startBattle(); + it("should make the user immune to ground-type moves", async () => { + await game.classicMode.startBattle([SpeciesId.MAGNEZONE]); - const startingHp = game.scene.getPlayerParty()[0].hp; - game.move.select(moveToUse); - await game.phaseInterceptor.to(TurnEndPhase); - const finalHp = game.scene.getPlayerParty()[0].hp; - const hpLost = finalHp - startingHp; - expect(hpLost).toBe(0); + game.move.use(MoveId.MAGNET_RISE); + await game.toEndOfTurn(); + + const magnezone = game.field.getPlayerPokemon(); + expect(magnezone.hp).toBe(magnezone.getMaxHp()); + expect(magnezone.isGrounded()).toBe(false); }); - it("MAGNET RISE - Gravity", async () => { - await game.classicMode.startBattle(); + it("should be removed by gravity", async () => { + await game.classicMode.startBattle([SpeciesId.MAGNEZONE]); - const startingHp = game.scene.getPlayerParty()[0].hp; - game.move.select(moveToUse); - await game.phaseInterceptor.to(CommandPhase); - let finalHp = game.scene.getPlayerParty()[0].hp; - let hpLost = finalHp - startingHp; - expect(hpLost).toBe(0); - game.move.select(MoveId.GRAVITY); - await game.phaseInterceptor.to(TurnEndPhase); - finalHp = game.scene.getPlayerParty()[0].hp; - hpLost = finalHp - startingHp; - expect(hpLost).not.toBe(0); + game.move.use(MoveId.MAGNET_RISE); + await game.toNextTurn(); + + const magnezone = game.field.getPlayerPokemon(); + expect(magnezone.hp).toBe(magnezone.getMaxHp()); + + game.move.use(MoveId.GRAVITY); + await game.toEndOfTurn(); + + expect(magnezone.hp).toBeLessThan(magnezone.getMaxHp()); + expect(magnezone.isGrounded()).toBe(true); }); }); diff --git a/test/moves/make_it_rain.test.ts b/test/moves/make_it_rain.test.ts index 13b8e8f1853..47f1bc89fc1 100644 --- a/test/moves/make_it_rain.test.ts +++ b/test/moves/make_it_rain.test.ts @@ -1,12 +1,12 @@ -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { StatStageChangePhase } from "#phases/stat-stage-change-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; describe("Moves - Make It Rain", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/mat_block.test.ts b/test/moves/mat_block.test.ts index d77f538a973..954e2a8135d 100644 --- a/test/moves/mat_block.test.ts +++ b/test/moves/mat_block.test.ts @@ -1,13 +1,13 @@ -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; 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"; +import { BerryPhase } from "#phases/berry-phase"; +import { CommandPhase } from "#phases/command-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; describe("Moves - Mat Block", () => { let phaserGame: Phaser.Game; @@ -42,9 +42,6 @@ describe("Moves - Mat Block", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.MAT_BLOCK); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -60,9 +57,6 @@ describe("Moves - Mat Block", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.MAT_BLOCK); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -76,7 +70,6 @@ describe("Moves - Mat Block", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.SPLASH); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(TurnEndPhase); @@ -85,7 +78,6 @@ describe("Moves - Mat Block", () => { await game.phaseInterceptor.to(CommandPhase, false); game.move.select(MoveId.MAT_BLOCK); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.MAT_BLOCK, 1); await game.phaseInterceptor.to(BerryPhase, false); diff --git a/test/moves/metal_burst.test.ts b/test/moves/metal_burst.test.ts index 4d07d59c16d..c99b4324878 100644 --- a/test/moves/metal_burst.test.ts +++ b/test/moves/metal_burst.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/metronome.test.ts b/test/moves/metronome.test.ts index 670f7bb9b88..8ca9e63582e 100644 --- a/test/moves/metronome.test.ts +++ b/test/moves/metronome.test.ts @@ -1,18 +1,17 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { RechargingTag, SemiInvulnerableTag } from "#app/data/battler-tags"; -import type { RandomMoveAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; +import { RechargingTag, SemiInvulnerableTag } from "#data/battler-tags"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { Stat } from "#app/enums/stat"; -import { MoveResult } from "#enums/move-result"; -import { CommandPhase } from "#app/phases/command-phase"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; -import { MoveUseMode } from "#enums/move-use-mode"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { MoveUseMode } from "#enums/move-use-mode"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import type { RandomMoveAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Metronome", () => { let phaserGame: Phaser.Game; @@ -125,7 +124,6 @@ describe("Moves - Metronome", () => { vi.spyOn(randomMoveAttr, "getMoveOverride").mockReturnValue(MoveId.AROMATIC_MIST); game.move.select(MoveId.METRONOME, 0); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -148,6 +146,6 @@ describe("Moves - Metronome", () => { const hasFled = enemyPokemon.switchOutStatus; expect(!isVisible && hasFled).toBe(true); - await game.phaseInterceptor.to("CommandPhase"); + await game.toNextTurn(); }); }); diff --git a/test/moves/miracle_eye.test.ts b/test/moves/miracle_eye.test.ts index 9281931621f..d77da857068 100644 --- a/test/moves/miracle_eye.test.ts +++ b/test/moves/miracle_eye.test.ts @@ -1,8 +1,8 @@ import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/mirror_move.test.ts b/test/moves/mirror_move.test.ts index 03de93c56dc..7f833c08bf5 100644 --- a/test/moves/mirror_move.test.ts +++ b/test/moves/mirror_move.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { Stat } from "#app/enums/stat"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/mist.test.ts b/test/moves/mist.test.ts index 4191aae0a46..b420b234e15 100644 --- a/test/moves/mist.test.ts +++ b/test/moves/mist.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/moongeist_beam.test.ts b/test/moves/moongeist_beam.test.ts deleted file mode 100644 index 367fe67cff5..00000000000 --- a/test/moves/moongeist_beam.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { allMoves } from "#app/data/data-lists"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; - -describe("Moves - Moongeist Beam", () => { - 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 - .moveset([MoveId.MOONGEIST_BEAM, MoveId.METRONOME]) - .ability(AbilityId.BALL_FETCH) - .startingLevel(200) - .battleStyle("single") - .criticalHits(false) - .enemySpecies(SpeciesId.MAGIKARP) - .enemyAbility(AbilityId.STURDY) - .enemyMoveset(MoveId.SPLASH); - }); - - // Also covers Photon Geyser and Sunsteel Strike - it("should ignore enemy abilities", async () => { - await game.classicMode.startBattle([SpeciesId.MILOTIC]); - - const enemy = game.scene.getEnemyPokemon()!; - - game.move.select(MoveId.MOONGEIST_BEAM); - await game.phaseInterceptor.to("BerryPhase"); - - expect(enemy.isFainted()).toBe(true); - }); - - // Also covers Photon Geyser and Sunsteel Strike - it("should not ignore enemy abilities when called by another move, such as metronome", async () => { - await game.classicMode.startBattle([SpeciesId.MILOTIC]); - vi.spyOn(allMoves[MoveId.METRONOME].getAttrs("RandomMoveAttr")[0], "getMoveOverride").mockReturnValue( - MoveId.MOONGEIST_BEAM, - ); - - game.move.select(MoveId.METRONOME); - await game.phaseInterceptor.to("BerryPhase"); - - expect(game.scene.getEnemyPokemon()!.isFainted()).toBe(false); - expect(game.scene.getPlayerPokemon()!.getLastXMoves()[0].move).toBe(MoveId.MOONGEIST_BEAM); - }); -}); diff --git a/test/moves/multi_target.test.ts b/test/moves/multi_target.test.ts index bc6b24c474d..a58fb8d3a6b 100644 --- a/test/moves/multi_target.test.ts +++ b/test/moves/multi_target.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; -import { SpeciesId } from "#enums/species-id"; -import { toDmgValue } from "#app/utils/common"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/nightmare.test.ts b/test/moves/nightmare.test.ts index e005def85ad..07579a6790c 100644 --- a/test/moves/nightmare.test.ts +++ b/test/moves/nightmare.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/obstruct.test.ts b/test/moves/obstruct.test.ts index fc534180bef..ef589213c74 100644 --- a/test/moves/obstruct.test.ts +++ b/test/moves/obstruct.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/octolock.test.ts b/test/moves/octolock.test.ts index 2a2f8743ad2..bf2f8dc5865 100644 --- a/test/moves/octolock.test.ts +++ b/test/moves/octolock.test.ts @@ -1,9 +1,9 @@ -import { TrappedTag } from "#app/data/battler-tags"; +import { TrappedTag } from "#data/battler-tags"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/order_up.test.ts b/test/moves/order_up.test.ts index fc505809fe6..2c9702fd6cb 100644 --- a/test/moves/order_up.test.ts +++ b/test/moves/order_up.test.ts @@ -1,12 +1,12 @@ +import { AbilityId } from "#enums/ability-id"; import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; import { PokemonAnimType } from "#enums/pokemon-anim-type"; +import { SpeciesId } from "#enums/species-id"; import type { EffectiveStat } from "#enums/stat"; import { Stat } from "#enums/stat"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/parting_shot.test.ts b/test/moves/parting_shot.test.ts index fdeab6bfc7c..86a14330a3e 100644 --- a/test/moves/parting_shot.test.ts +++ b/test/moves/parting_shot.test.ts @@ -1,14 +1,14 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { BerryPhase } from "#phases/berry-phase"; +import { FaintPhase } from "#phases/faint-phase"; +import { MessagePhase } from "#phases/message-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, test } from "vitest"; -import GameManager from "#test/testUtils/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"; describe("Moves - Parting Shot", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/payback.test.ts b/test/moves/payback.test.ts new file mode 100644 index 00000000000..20e832288a3 --- /dev/null +++ b/test/moves/payback.test.ts @@ -0,0 +1,69 @@ +import { allMoves } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { PokeballType } from "#enums/pokeball"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, type MockInstance, vi } from "vitest"; + +describe("Move - Payback", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + let powerSpy: MockInstance; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .ability(AbilityId.BALL_FETCH) + .battleStyle("single") + .criticalHits(false) + .enemyLevel(100) + .enemySpecies(SpeciesId.DRACOVISH) + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH) + .startingModifier([{ name: "POKEBALL", count: 5 }]); + + powerSpy = vi.spyOn(allMoves[MoveId.PAYBACK], "calculateBattlePower"); + }); + + it("should double power if the user moves after the target", async () => { + await game.classicMode.startBattle([SpeciesId.FEEBAS]); + + // turn 1: enemy, then player (boost) + game.move.use(MoveId.PAYBACK); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toNextTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[MoveId.PAYBACK].power * 2); + + // turn 2: player, then enemy (no boost) + game.move.use(MoveId.PAYBACK); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toEndOfTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[MoveId.PAYBACK].power); + }); + + // TODO: Enable test once ability to force catch failure is added + it.todo("should trigger for enemies on player failed ball catch", async () => { + await game.classicMode.startBattle([SpeciesId.FEEBAS]); + + game.doThrowPokeball(PokeballType.POKEBALL); + await game.move.forceEnemyMove(MoveId.PAYBACK); + await game.toEndOfTurn(); + + expect(powerSpy).toHaveLastReturnedWith(allMoves[MoveId.PAYBACK].power * 2); + }); +}); diff --git a/test/moves/plasma_fists.test.ts b/test/moves/plasma_fists.test.ts index 7d1985be13e..7a5ba77b62d 100644 --- a/test/moves/plasma_fists.test.ts +++ b/test/moves/plasma_fists.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Plasma Fists", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/pledge_moves.test.ts b/test/moves/pledge_moves.test.ts index f653e245f6f..bd0c981517c 100644 --- a/test/moves/pledge_moves.test.ts +++ b/test/moves/pledge_moves.test.ts @@ -1,17 +1,16 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allAbilities } from "#app/data/data-lists"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allMoves } from "#app/data/data-lists"; -import { PokemonType } from "#enums/pokemon-type"; -import { ArenaTagType } from "#enums/arena-tag-type"; -import { Stat } from "#enums/stat"; -import { toDmgValue } from "#app/utils/common"; +import { allAbilities, allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Pledge Moves", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/pollen_puff.test.ts b/test/moves/pollen_puff.test.ts index cd0a138e96c..d372f72a390 100644 --- a/test/moves/pollen_puff.test.ts +++ b/test/moves/pollen_puff.test.ts @@ -1,8 +1,8 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/powder.test.ts b/test/moves/powder.test.ts index 8f47f2ff428..3e60c0d9fec 100644 --- a/test/moves/powder.test.ts +++ b/test/moves/powder.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; -import { BerryPhase } from "#app/phases/berry-phase"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; +import { MoveResult } from "#enums/move-result"; import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { BerryPhase } from "#phases/berry-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/power_shift.test.ts b/test/moves/power_shift.test.ts index cd5252c3f2f..069d793a794 100644 --- a/test/moves/power_shift.test.ts +++ b/test/moves/power_shift.test.ts @@ -1,8 +1,8 @@ +import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { Stat } from "#app/enums/stat"; -import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/power_split.test.ts b/test/moves/power_split.test.ts index c0fcd317182..ef6fda419ca 100644 --- a/test/moves/power_split.test.ts +++ b/test/moves/power_split.test.ts @@ -1,11 +1,11 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Power Split", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/power_swap.test.ts b/test/moves/power_swap.test.ts index 82662850c77..cdd52fbc524 100644 --- a/test/moves/power_swap.test.ts +++ b/test/moves/power_swap.test.ts @@ -1,12 +1,12 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { Stat, BATTLE_STATS } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { BATTLE_STATS, Stat } from "#enums/stat"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Power Swap", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/power_trick.test.ts b/test/moves/power_trick.test.ts index af90525d263..29a8107d891 100644 --- a/test/moves/power_trick.test.ts +++ b/test/moves/power_trick.test.ts @@ -1,12 +1,12 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { MoveId } from "#enums/move-id"; -import { Stat } from "#enums/stat"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Power Trick", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/protect.test.ts b/test/moves/protect.test.ts index 601afb43ec3..9fd54d44891 100644 --- a/test/moves/protect.test.ts +++ b/test/moves/protect.test.ts @@ -1,15 +1,15 @@ -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; +import { ArenaTrapTag } from "#data/arena-tag"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { Stat } from "#enums/stat"; -import { allMoves } from "#app/data/data-lists"; -import { ArenaTrapTag } from "#app/data/arena-tag"; import { ArenaTagSide } from "#enums/arena-tag-side"; import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; describe("Moves - Protect", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/psycho_shift.test.ts b/test/moves/psycho_shift.test.ts index e4eb2bd8ef6..6414a91543b 100644 --- a/test/moves/psycho_shift.test.ts +++ b/test/moves/psycho_shift.test.ts @@ -1,8 +1,8 @@ -import { StatusEffect } from "#app/enums/status-effect"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/purify.test.ts b/test/moves/purify.test.ts index 2e8e312f23c..a5d7d86851b 100644 --- a/test/moves/purify.test.ts +++ b/test/moves/purify.test.ts @@ -1,11 +1,11 @@ +import { Status } from "#data/status-effect"; import { BattlerIndex } from "#enums/battler-index"; -import { Status } from "#app/data/status-effect"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import type { EnemyPokemon, PlayerPokemon } from "#field/pokemon"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/test/moves/quash.test.ts b/test/moves/quash.test.ts index 158c409cf05..632d37a4e13 100644 --- a/test/moves/quash.test.ts +++ b/test/moves/quash.test.ts @@ -1,13 +1,13 @@ -import { SpeciesId } from "#enums/species-id"; -import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; import { BattlerIndex } from "#enums/battler-index"; -import { WeatherType } from "#enums/weather-type"; +import { MoveId } from "#enums/move-id"; import { MoveResult } from "#enums/move-result"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { describe, beforeAll, afterEach, beforeEach, it, expect } from "vitest"; import { MoveUseMode } from "#enums/move-use-mode"; +import { SpeciesId } from "#enums/species-id"; +import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Quash", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/quick_guard.test.ts b/test/moves/quick_guard.test.ts index 7146b804ffa..5e2e1ae1f24 100644 --- a/test/moves/quick_guard.test.ts +++ b/test/moves/quick_guard.test.ts @@ -1,12 +1,12 @@ +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { Stat } from "#enums/stat"; -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; describe("Moves - Quick Guard", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/rage_fist.test.ts b/test/moves/rage_fist.test.ts index 31dd987cb87..d7928ddd310 100644 --- a/test/moves/rage_fist.test.ts +++ b/test/moves/rage_fist.test.ts @@ -1,13 +1,13 @@ -import { BattlerIndex } from "#enums/battler-index"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { allMoves } from "#app/data/data-lists"; -import type Move from "#app/data/moves/move"; -import GameManager from "#test/testUtils/gameManager"; +import type { Move } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { BattleType } from "#enums/battle-type"; describe("Moves - Rage Fist", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/rage_powder.test.ts b/test/moves/rage_powder.test.ts index 845bff33d04..a0b836f0917 100644 --- a/test/moves/rage_powder.test.ts +++ b/test/moves/rage_powder.test.ts @@ -1,8 +1,8 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/test/moves/reflect.test.ts b/test/moves/reflect.test.ts index ef8c80070bf..47c49ea4d36 100644 --- a/test/moves/reflect.test.ts +++ b/test/moves/reflect.test.ts @@ -1,15 +1,15 @@ -import type BattleScene from "#app/battle-scene"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import type Move from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; +import type { BattleScene } from "#app/battle-scene"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; -import type Pokemon from "#app/field/pokemon"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { NumberHolder } from "#app/utils/common"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { Pokemon } from "#field/pokemon"; +import type { Move } from "#moves/move"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { NumberHolder } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/reflect_type.test.ts b/test/moves/reflect_type.test.ts index e07c7b43ca4..499c167bee0 100644 --- a/test/moves/reflect_type.test.ts +++ b/test/moves/reflect_type.test.ts @@ -1,8 +1,8 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { PokemonType } from "#enums/pokemon-type"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/relic_song.test.ts b/test/moves/relic_song.test.ts index b3dd400a202..36c46769515 100644 --- a/test/moves/relic_song.test.ts +++ b/test/moves/relic_song.test.ts @@ -1,9 +1,9 @@ -import { PokemonType } from "#enums/pokemon-type"; -import { Challenges } from "#app/enums/challenges"; import { AbilityId } from "#enums/ability-id"; +import { Challenges } from "#enums/challenges"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/retaliate.test.ts b/test/moves/retaliate.test.ts index dd5029a7c83..3eefbe3ceb6 100644 --- a/test/moves/retaliate.test.ts +++ b/test/moves/retaliate.test.ts @@ -1,10 +1,10 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; +import { allMoves } from "#data/data-lists"; import { MoveId } from "#enums/move-id"; -import { allMoves } from "#app/data/data-lists"; -import type Move from "#app/data/moves/move"; +import { SpeciesId } from "#enums/species-id"; +import type { Move } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Retaliate", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/revival_blessing.test.ts b/test/moves/revival_blessing.test.ts index 1f2ba869e4f..a9a6bd0fd7d 100644 --- a/test/moves/revival_blessing.test.ts +++ b/test/moves/revival_blessing.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; -import { toDmgValue } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { toDmgValue } from "#utils/common"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/role_play.test.ts b/test/moves/role_play.test.ts index cfa38ed38b7..dda7f319cd5 100644 --- a/test/moves/role_play.test.ts +++ b/test/moves/role_play.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/rollout.test.ts b/test/moves/rollout.test.ts index 9639a2e5408..eed61f82ab4 100644 --- a/test/moves/rollout.test.ts +++ b/test/moves/rollout.test.ts @@ -1,9 +1,8 @@ -import { allMoves } from "#app/data/data-lists"; -import { CommandPhase } from "#app/phases/command-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -57,8 +56,7 @@ describe("Moves - Rollout", () => { for (let i = 0; i < turns; i++) { game.move.select(MoveId.ROLLOUT); - await game.phaseInterceptor.to(CommandPhase); - + await game.toNextTurn(); dmgHistory.push(previousHp - enemyPkm.hp); previousHp = enemyPkm.hp; } diff --git a/test/moves/roost.test.ts b/test/moves/roost.test.ts index 3707e0ead45..30a71721d03 100644 --- a/test/moves/roost.test.ts +++ b/test/moves/roost.test.ts @@ -1,11 +1,11 @@ import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/test/moves/round.test.ts b/test/moves/round.test.ts index 8e07a819131..a706fd15e9b 100644 --- a/test/moves/round.test.ts +++ b/test/moves/round.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import type { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/safeguard.test.ts b/test/moves/safeguard.test.ts index 91aa298a8ca..2651d8473be 100644 --- a/test/moves/safeguard.test.ts +++ b/test/moves/safeguard.test.ts @@ -1,12 +1,12 @@ +import { allAbilities } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; import { BattlerIndex } from "#enums/battler-index"; -import { allAbilities } from "#app/data/data-lists"; -import { StatusEffect } from "#app/enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { AbilityId } from "#enums/ability-id"; describe("Moves - Safeguard", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/scale_shot.test.ts b/test/moves/scale_shot.test.ts index e2c86091378..4e420f6b3ef 100644 --- a/test/moves/scale_shot.test.ts +++ b/test/moves/scale_shot.test.ts @@ -1,16 +1,16 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import { DamageAnimPhase } from "#app/phases/damage-anim-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 { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Scale Shot", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/secret_power.test.ts b/test/moves/secret_power.test.ts index adb91162ae8..8ec69fb276a 100644 --- a/test/moves/secret_power.test.ts +++ b/test/moves/secret_power.test.ts @@ -1,17 +1,16 @@ +import { allAbilities, allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BiomeId } from "#enums/biome-id"; import { MoveId } from "#enums/move-id"; -import { Stat } from "#enums/stat"; -import { allMoves } from "#app/data/data-lists"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { StatusEffect } from "#enums/status-effect"; -import { BattlerIndex } from "#enums/battler-index"; -import { ArenaTagType } from "#enums/arena-tag-type"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { allAbilities } from "#app/data/data-lists"; describe("Moves - Secret Power", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/shed_tail.test.ts b/test/moves/shed_tail.test.ts index 81ab9215bc9..8a837a642c9 100644 --- a/test/moves/shed_tail.test.ts +++ b/test/moves/shed_tail.test.ts @@ -1,11 +1,11 @@ -import { SubstituteTag } from "#app/data/battler-tags"; -import { MoveResult } from "#enums/move-result"; +import { SubstituteTag } from "#data/battler-tags"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Shed Tail", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/shell_side_arm.test.ts b/test/moves/shell_side_arm.test.ts index 35246e10e3f..685cebce4cf 100644 --- a/test/moves/shell_side_arm.test.ts +++ b/test/moves/shell_side_arm.test.ts @@ -1,11 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import type { ShellSideArmCategoryAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; -import type Move from "#app/data/moves/move"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { Move, ShellSideArmCategoryAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/shell_trap.test.ts b/test/moves/shell_trap.test.ts index a3f55cef10f..c484d1195aa 100644 --- a/test/moves/shell_trap.test.ts +++ b/test/moves/shell_trap.test.ts @@ -1,12 +1,12 @@ +import { allMoves } from "#data/data-lists"; import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { MoveResult } from "#enums/move-result"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { BerryPhase } from "#phases/berry-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { MovePhase } from "#phases/move-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/simple_beam.test.ts b/test/moves/simple_beam.test.ts index f8549944ed9..106977aea84 100644 --- a/test/moves/simple_beam.test.ts +++ b/test/moves/simple_beam.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/sketch.test.ts b/test/moves/sketch.test.ts index 5e9ce9a9e84..10ad31c35eb 100644 --- a/test/moves/sketch.test.ts +++ b/test/moves/sketch.test.ts @@ -1,15 +1,15 @@ +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; import { MoveResult } from "#enums/move-result"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; +import { RandomMoveAttr } from "#moves/move"; +import { PokemonMove } from "#moves/pokemon-move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { StatusEffect } from "#app/enums/status-effect"; -import { BattlerIndex } from "#enums/battler-index"; -import { RandomMoveAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; describe("Moves - Sketch", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/skill_swap.test.ts b/test/moves/skill_swap.test.ts index 7c2e6f5fd0a..d5ba509b0df 100644 --- a/test/moves/skill_swap.test.ts +++ b/test/moves/skill_swap.test.ts @@ -1,8 +1,8 @@ -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/sleep_talk.test.ts b/test/moves/sleep_talk.test.ts index 84e9d509a03..972c54463e2 100644 --- a/test/moves/sleep_talk.test.ts +++ b/test/moves/sleep_talk.test.ts @@ -1,10 +1,10 @@ -import { Stat } from "#app/enums/stat"; -import { StatusEffect } from "#app/enums/status-effect"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/solar_beam.test.ts b/test/moves/solar_beam.test.ts index 55d2ee5d13c..32400abfc0f 100644 --- a/test/moves/solar_beam.test.ts +++ b/test/moves/solar_beam.test.ts @@ -1,13 +1,13 @@ -import { allMoves } from "#app/data/data-lists"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { WeatherType } from "#enums/weather-type"; -import { MoveResult } from "#enums/move-result"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { WeatherType } from "#enums/weather-type"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Solar Beam", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/sparkly_swirl.test.ts b/test/moves/sparkly_swirl.test.ts index d1cbdd70107..d58b6efe990 100644 --- a/test/moves/sparkly_swirl.test.ts +++ b/test/moves/sparkly_swirl.test.ts @@ -1,10 +1,9 @@ -import { allMoves } from "#app/data/data-lists"; -import { StatusEffect } from "#app/enums/status-effect"; -import { CommandPhase } from "#app/phases/command-phase"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -44,7 +43,6 @@ describe("Moves - Sparkly Swirl", () => { vi.spyOn(partyPokemon, "resetStatus"); game.move.select(MoveId.SPARKLY_SWIRL, 0, leftOpp.getBattlerIndex()); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); @@ -66,7 +64,6 @@ describe("Moves - Sparkly Swirl", () => { vi.spyOn(rightOpp, "resetStatus"); game.move.select(MoveId.SPARKLY_SWIRL, 0, leftOpp.getBattlerIndex()); - await game.phaseInterceptor.to(CommandPhase); game.move.select(MoveId.SPLASH, 1); await game.toNextTurn(); diff --git a/test/moves/spectral_thief.test.ts b/test/moves/spectral_thief.test.ts index e7b19eda506..acb3e22cf6c 100644 --- a/test/moves/spectral_thief.test.ts +++ b/test/moves/spectral_thief.test.ts @@ -1,11 +1,11 @@ +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { BattlerIndex } from "#enums/battler-index"; -import { Stat } from "#enums/stat"; -import { allMoves } from "#app/data/data-lists"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/speed_swap.test.ts b/test/moves/speed_swap.test.ts index 3723e7db740..e0c06bfb0f7 100644 --- a/test/moves/speed_swap.test.ts +++ b/test/moves/speed_swap.test.ts @@ -1,11 +1,11 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { Stat } from "#enums/stat"; import { AbilityId } from "#enums/ability-id"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Speed Swap", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/spikes.test.ts b/test/moves/spikes.test.ts index a82581b6ed5..424aecb5c3c 100644 --- a/test/moves/spikes.test.ts +++ b/test/moves/spikes.test.ts @@ -1,12 +1,12 @@ +import { ArenaTrapTag } from "#data/arena-tag"; import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { ArenaTrapTag } from "#app/data/arena-tag"; import { ArenaTagSide } from "#enums/arena-tag-side"; import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Spikes", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/spit_up.test.ts b/test/moves/spit_up.test.ts index 00cbe2fd0ad..03e0cee1e4b 100644 --- a/test/moves/spit_up.test.ts +++ b/test/moves/spit_up.test.ts @@ -1,17 +1,17 @@ -import { Stat } from "#enums/stat"; -import { StockpilingTag } from "#app/data/battler-tags"; -import { allMoves } from "#app/data/data-lists"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { MoveResult } from "#enums/move-result"; -import GameManager from "#test/testUtils/gameManager"; +import { StockpilingTag } from "#data/battler-tags"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; -import type Move from "#app/data/moves/move"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import type { Move } from "#moves/move"; +import { MovePhase } from "#phases/move-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { MovePhase } from "#app/phases/move-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Spit Up", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/spotlight.test.ts b/test/moves/spotlight.test.ts index a9e8cd7e2b6..4feff5eb719 100644 --- a/test/moves/spotlight.test.ts +++ b/test/moves/spotlight.test.ts @@ -1,8 +1,8 @@ import { BattlerIndex } from "#enums/battler-index"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/test/moves/steamroller.test.ts b/test/moves/steamroller.test.ts index 67c63ff32e4..a9da98c1429 100644 --- a/test/moves/steamroller.test.ts +++ b/test/moves/steamroller.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import type { DamageCalculationResult } from "#app/@types/damage-result"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { DamageCalculationResult } from "#types/damage-result"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/stockpile.test.ts b/test/moves/stockpile.test.ts index 3ad47d8d85e..efc1757738a 100644 --- a/test/moves/stockpile.test.ts +++ b/test/moves/stockpile.test.ts @@ -1,12 +1,11 @@ -import { Stat } from "#enums/stat"; -import { StockpilingTag } from "#app/data/battler-tags"; -import { MoveResult } from "#enums/move-result"; -import { CommandPhase } from "#app/phases/command-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { StockpilingTag } from "#data/battler-tags"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -50,12 +49,8 @@ describe("Moves - Stockpile", () => { // use Stockpile four times for (let i = 0; i < 4; i++) { - if (i !== 0) { - await game.phaseInterceptor.to(CommandPhase); - } - game.move.select(MoveId.STOCKPILE); - await game.phaseInterceptor.to(TurnInitPhase); + await game.toNextTurn(); const stockpilingTag = user.getTag(StockpilingTag)!; @@ -101,9 +96,6 @@ describe("Moves - Stockpile", () => { 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); - game.move.select(MoveId.STOCKPILE); await game.phaseInterceptor.to(TurnInitPhase); diff --git a/test/moves/struggle.test.ts b/test/moves/struggle.test.ts index e1373b29d33..2d624f6d338 100644 --- a/test/moves/struggle.test.ts +++ b/test/moves/struggle.test.ts @@ -1,7 +1,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/substitute.test.ts b/test/moves/substitute.test.ts index 182fefb74d7..39418fb5b99 100644 --- a/test/moves/substitute.test.ts +++ b/test/moves/substitute.test.ts @@ -1,21 +1,21 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { SubstituteTag, TrappedTag } from "#app/data/battler-tags"; -import { StealHeldItemChanceAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; -import { MoveResult } from "#enums/move-result"; -import type { CommandPhase } from "#app/phases/command-phase"; -import GameManager from "#test/testUtils/gameManager"; -import { Command } from "#enums/command"; -import { UiMode } from "#enums/ui-mode"; +import { SubstituteTag, TrappedTag } from "#data/battler-tags"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagType } from "#enums/arena-tag-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; +import { Command } from "#enums/command"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; +import { UiMode } from "#enums/ui-mode"; +import { StealHeldItemChanceAttr } from "#moves/move"; +import type { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/swallow.test.ts b/test/moves/swallow.test.ts index c511682011f..176b00b030c 100644 --- a/test/moves/swallow.test.ts +++ b/test/moves/swallow.test.ts @@ -1,13 +1,13 @@ -import { Stat } from "#enums/stat"; -import { StockpilingTag } from "#app/data/battler-tags"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { MoveResult } from "#enums/move-result"; -import { MovePhase } from "#app/phases/move-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { StockpilingTag } from "#data/battler-tags"; import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { MovePhase } from "#phases/move-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/synchronoise.test.ts b/test/moves/synchronoise.test.ts index 9068a40693b..fe4a316a32a 100644 --- a/test/moves/synchronoise.test.ts +++ b/test/moves/synchronoise.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/syrup_bomb.test.ts b/test/moves/syrup_bomb.test.ts index 4b2821b439c..f45070d81a5 100644 --- a/test/moves/syrup_bomb.test.ts +++ b/test/moves/syrup_bomb.test.ts @@ -1,11 +1,11 @@ +import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#enums/battler-tag-type"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { BattlerIndex } from "#enums/battler-index"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - SYRUP BOMB", () => { diff --git a/test/moves/tackle.test.ts b/test/moves/tackle.test.ts index f3c0db85a39..998afd23f9d 100644 --- a/test/moves/tackle.test.ts +++ b/test/moves/tackle.test.ts @@ -1,9 +1,9 @@ -import { Stat } from "#enums/stat"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/tail_whip.test.ts b/test/moves/tail_whip.test.ts index e98194b52dd..272816a88a6 100644 --- a/test/moves/tail_whip.test.ts +++ b/test/moves/tail_whip.test.ts @@ -1,12 +1,12 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; describe("Moves - Tail whip", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/tailwind.test.ts b/test/moves/tailwind.test.ts index 874934fc8f3..1c8701de5bc 100644 --- a/test/moves/tailwind.test.ts +++ b/test/moves/tailwind.test.ts @@ -1,10 +1,10 @@ -import { ArenaTagSide } from "#enums/arena-tag-side"; -import { ArenaTagType } from "#app/enums/arena-tag-type"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/tar_shot.test.ts b/test/moves/tar_shot.test.ts index 8d5ea4b3582..c2ae397e43a 100644 --- a/test/moves/tar_shot.test.ts +++ b/test/moves/tar_shot.test.ts @@ -1,10 +1,10 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { Stat } from "#app/enums/stat"; import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BattlerIndex } from "#enums/battler-index"; +import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/taunt.test.ts b/test/moves/taunt.test.ts index fabb95f98b2..ba76551708b 100644 --- a/test/moves/taunt.test.ts +++ b/test/moves/taunt.test.ts @@ -1,11 +1,11 @@ -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { MoveResult } from "#enums/move-result"; -import { BattlerTagType } from "#enums/battler-tag-type"; describe("Moves - Taunt", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/telekinesis.test.ts b/test/moves/telekinesis.test.ts index 5c9f1e22395..92d7f8cc885 100644 --- a/test/moves/telekinesis.test.ts +++ b/test/moves/telekinesis.test.ts @@ -1,13 +1,13 @@ -import { BattlerTagType } from "#enums/battler-tag-type"; -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; -import { MoveResult } from "#enums/move-result"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Telekinesis", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/tera_blast.test.ts b/test/moves/tera_blast.test.ts index fbebd428cfd..d6c16c31544 100644 --- a/test/moves/tera_blast.test.ts +++ b/test/moves/tera_blast.test.ts @@ -1,13 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { Stat } from "#enums/stat"; -import type { TeraMoveCategoryAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; -import type Move from "#app/data/moves/move"; -import { PokemonType } from "#enums/pokemon-type"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import type { Move, TeraMoveCategoryAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/tera_starstorm.test.ts b/test/moves/tera_starstorm.test.ts index 2eaf2ec0372..a63573b360d 100644 --- a/test/moves/tera_starstorm.test.ts +++ b/test/moves/tera_starstorm.test.ts @@ -1,11 +1,11 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { PokemonType } from "#enums/pokemon-type"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Tera Starstorm", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/thousand_arrows.test.ts b/test/moves/thousand_arrows.test.ts index 9ecdd94a94f..3c7bacfbb2b 100644 --- a/test/moves/thousand_arrows.test.ts +++ b/test/moves/thousand_arrows.test.ts @@ -1,10 +1,10 @@ import { AbilityId } from "#enums/ability-id"; -import { BattlerTagType } from "#app/enums/battler-tag-type"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BerryPhase } from "#phases/berry-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/throat_chop.test.ts b/test/moves/throat_chop.test.ts index aa92f657c86..1a17cb1fba2 100644 --- a/test/moves/throat_chop.test.ts +++ b/test/moves/throat_chop.test.ts @@ -1,11 +1,11 @@ +import { AbilityId } from "#enums/ability-id"; import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { Stat } from "#app/enums/stat"; -import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Stat } from "#enums/stat"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Throat Chop", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/thunder_wave.test.ts b/test/moves/thunder_wave.test.ts index 7d2692fdfa3..06a24e454fa 100644 --- a/test/moves/thunder_wave.test.ts +++ b/test/moves/thunder_wave.test.ts @@ -1,9 +1,9 @@ -import type { EnemyPokemon } from "#app/field/pokemon"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import type { EnemyPokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/tidy_up.test.ts b/test/moves/tidy_up.test.ts index 69c9df42b36..c96718e2332 100644 --- a/test/moves/tidy_up.test.ts +++ b/test/moves/tidy_up.test.ts @@ -1,14 +1,14 @@ -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"; +import { SubstituteTag } from "#data/battler-tags"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { SubstituteTag } from "#app/data/battler-tags"; -import { SpeciesId } from "#enums/species-id"; describe("Moves - Tidy Up", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/torment.test.ts b/test/moves/torment.test.ts index e4d926d9601..71a4f3cb504 100644 --- a/test/moves/torment.test.ts +++ b/test/moves/torment.test.ts @@ -1,12 +1,12 @@ -import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { AbilityId } from "#enums/ability-id"; -import GameManager from "#test/testUtils/gameManager"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { SpeciesId } from "#enums/species-id"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { MoveResult } from "#enums/move-result"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; describe("Moves - Torment", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/toxic.test.ts b/test/moves/toxic.test.ts index a7ba52eb963..5aaa4e3e85d 100644 --- a/test/moves/toxic.test.ts +++ b/test/moves/toxic.test.ts @@ -1,11 +1,11 @@ +import { allMoves } from "#data/data-lists"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { StatusEffect } from "#enums/status-effect"; -import { BattlerIndex } from "#enums/battler-index"; -import { allMoves } from "#app/data/data-lists"; describe("Moves - Toxic", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/toxic_spikes.test.ts b/test/moves/toxic_spikes.test.ts index bf1f5acc1cb..69f09ce966a 100644 --- a/test/moves/toxic_spikes.test.ts +++ b/test/moves/toxic_spikes.test.ts @@ -1,14 +1,14 @@ -import type { ArenaTrapTag } from "#app/data/arena-tag"; -import { ArenaTagSide } from "#enums/arena-tag-side"; -import type { SessionSaveData } from "#app/system/game-data"; -import { GameData } from "#app/system/game-data"; -import { decrypt, encrypt } from "#app/utils/data"; +import type { ArenaTrapTag } from "#data/arena-tag"; import { AbilityId } from "#enums/ability-id"; +import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagType } from "#enums/arena-tag-type"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import type { SessionSaveData } from "#system/game-data"; +import { GameData } from "#system/game-data"; +import { GameManager } from "#test/testUtils/gameManager"; +import { decrypt, encrypt } from "#utils/data"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/transform-imposter.test.ts b/test/moves/transform-imposter.test.ts new file mode 100644 index 00000000000..c12542e64e9 --- /dev/null +++ b/test/moves/transform-imposter.test.ts @@ -0,0 +1,379 @@ +import { Status } from "#data/status-effect"; +import { AbilityId } from "#enums/ability-id"; +import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BerryType } from "#enums/berry-type"; +import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { Stat } from "#enums/stat"; +import { StatusEffect } from "#enums/status-effect"; +import type { EnemyPokemon } from "#field/pokemon"; +import { Pokemon } from "#field/pokemon"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, type MockInstance, vi } from "vitest"; + +// TODO: Add more tests once Transform/Imposter are fully implemented +describe("Transforming Effects", () => { + 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 + .battleStyle("single") + .enemySpecies(SpeciesId.MEW) + .enemyLevel(200) + .enemyAbility(AbilityId.BEAST_BOOST) + .enemyPassiveAbility(AbilityId.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH) + .ability(AbilityId.STURDY); + }); + + // Contains logic shared by both Transform and Impostor (for brevity) + describe("Phases - PokemonTransformPhase", async () => { + it("should copy target's species, ability, gender, all stats except HP, all stat stages, moveset and types", async () => { + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const ditto = game.field.getPlayerPokemon(); + const mew = game.field.getEnemyPokemon(); + + mew.setStatStage(Stat.ATK, 4); + + game.move.use(MoveId.SPLASH); + game.scene.phaseManager.unshiftNew("PokemonTransformPhase", ditto.getBattlerIndex(), mew.getBattlerIndex()); + await game.toEndOfTurn(); + + expect(ditto.isTransformed()).toBe(true); + expect(ditto.getSpeciesForm().speciesId).toBe(mew.getSpeciesForm().speciesId); + expect(ditto.getAbility()).toBe(mew.getAbility()); + expect(ditto.getGender()).toBe(mew.getGender()); + + const playerStats = ditto.getStats(false); + const enemyStats = mew.getStats(false); + // HP stays the same; all other stats should carry over + expect(playerStats[0]).not.toBe(enemyStats[0]); + expect(playerStats.slice(1)).toEqual(enemyStats.slice(1)); + + // Stat stages/moveset IDs + expect(ditto.getStatStages()).toEqual(mew.getStatStages()); + + expect(ditto.getMoveset().map(m => m.moveId)).toEqual(ditto.getMoveset().map(m => m.moveId)); + + expect(ditto.getTypes()).toEqual(mew.getTypes()); + }); + + // TODO: This is not implemented + it.todo("should copy the target's original typing if target is typeless", async () => { + game.override.enemySpecies(SpeciesId.MAGMAR); + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const ditto = game.field.getPlayerPokemon(); + const magmar = game.field.getEnemyPokemon(); + + game.move.use(MoveId.TRANSFORM); + await game.move.forceEnemyMove(MoveId.BURN_UP); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toEndOfTurn(); + + expect(magmar.getTypes()).toEqual([PokemonType.UNKNOWN]); + expect(ditto.getTypes()).toEqual([PokemonType.FIRE]); + }); + + it("should not consider the target's Tera Type when copying types", async () => { + game.override.enemySpecies(SpeciesId.MAGMAR); + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const ditto = game.field.getPlayerPokemon(); + const magmar = game.field.getEnemyPokemon(); + magmar.isTerastallized = true; + magmar.teraType = PokemonType.DARK; + + game.move.use(MoveId.TRANSFORM); + await game.toEndOfTurn(); + + expect(ditto.getTypes(true)).toEqual([PokemonType.FIRE]); + }); + + // TODO: This is not currently implemented + it.todo("should copy volatile status effects", async () => { + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const ditto = game.field.getPlayerPokemon(); + const mew = game.field.getEnemyPokemon(); + mew.addTag(BattlerTagType.SEEDED, 0, MoveId.LEECH_SEED, ditto.id); + mew.addTag(BattlerTagType.CONFUSED, 4, MoveId.AXE_KICK, ditto.id); + + game.move.use(MoveId.TRANSFORM); + await game.toEndOfTurn(); + + expect(ditto.getTag(BattlerTagType.SEEDED)).toBeDefined(); + expect(ditto.getTag(BattlerTagType.CONFUSED)).toBeDefined(); + }); + + // TODO: This is not implemented + it.todo("should copy the target's rage fist hit count"); + + it("should not copy friendship, held items, nickname, level or non-volatile status effects", async () => { + game.override.enemyHeldItems([{ name: "BERRY", count: 1, type: BerryType.SITRUS }]); + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const ditto = game.field.getPlayerPokemon(); + const mew = game.field.getEnemyPokemon(); + + mew.status = new Status(StatusEffect.POISON); + mew.friendship = 255; + mew.nickname = btoa(unescape(encodeURIComponent("Pink Furry Cat Thing"))); + + game.move.use(MoveId.TRANSFORM); + await game.toEndOfTurn(); + + expect(ditto.status?.effect).toBeUndefined(); + expect(ditto.getNameToRender()).not.toBe(mew.getNameToRender()); + expect(ditto.level).not.toBe(mew.level); + expect(ditto.friendship).not.toBe(mew.friendship); + expect(ditto.getHeldItems()).not.toEqual(mew.getHeldItems()); + }); + + it("should copy in-battle overridden stats", async () => { + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const player = game.field.getPlayerPokemon(); + const enemy = game.field.getEnemyPokemon(); + + const oldAtk = player.getStat(Stat.ATK); + const avgAtk = Math.floor((player.getStat(Stat.ATK, false) + enemy.getStat(Stat.ATK, false)) / 2); + + game.move.use(MoveId.TRANSFORM); + await game.move.forceEnemyMove(MoveId.POWER_SPLIT); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.toEndOfTurn(); + + expect(player.getStat(Stat.ATK, false)).toBe(avgAtk); + expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk); + expect(avgAtk).not.toBe(oldAtk); + }); + + it("should set each move's pp to a maximum of 5 without affecting PP ups", async () => { + game.override.enemyMoveset([MoveId.SWORDS_DANCE, MoveId.GROWL, MoveId.SKETCH, MoveId.RECOVER]); + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const player = game.field.getPlayerPokemon(); + + game.move.use(MoveId.TRANSFORM); + await game.toEndOfTurn(); + + player.getMoveset().forEach(move => { + // Should set correct maximum PP without touching `ppUp` + if (move) { + if (move.moveId === MoveId.SKETCH) { + expect(move.getMovePp()).toBe(1); + } else { + expect(move.getMovePp()).toBe(5); + } + expect(move.ppUp).toBe(0); + } + }); + }); + + it("should activate its ability if it copies one that activates on summon", async () => { + game.override.enemyAbility(AbilityId.INTIMIDATE); + await game.classicMode.startBattle([SpeciesId.DITTO]); + + game.move.use(MoveId.TRANSFORM); + game.phaseInterceptor.clearLogs(); + await game.toEndOfTurn(); + + expect(game.field.getEnemyPokemon().getStatStage(Stat.ATK)).toBe(-1); + expect(game.phaseInterceptor.log).toContain("StatStageChangePhase"); + }); + + it("should persist transformed attributes across reloads", async () => { + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const player = game.field.getPlayerPokemon(); + const enemy = game.field.getEnemyPokemon(); + + game.move.use(MoveId.TRANSFORM); + await game.move.forceEnemyMove(MoveId.MEMENTO); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toNextWave(); + + expect(game.scene.phaseManager.getCurrentPhase()?.phaseName).toBe("CommandPhase"); + expect(game.scene.currentBattle.waveIndex).toBe(2); + + await game.reload.reloadSession(); + + const playerReloaded = game.field.getPlayerPokemon(); + const playerMoveset = player.getMoveset(); + + expect(playerReloaded.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); + expect(playerReloaded.getAbility()).toBe(enemy.getAbility()); + expect(playerReloaded.getGender()).toBe(enemy.getGender()); + + expect(playerMoveset.map(m => m.moveId)).toEqual([MoveId.MEMENTO]); + }); + + it("should stay transformed with the correct form after reload", async () => { + game.override.enemySpecies(SpeciesId.DARMANITAN); + await game.classicMode.startBattle([SpeciesId.DITTO]); + + const player = game.field.getPlayerPokemon(); + const enemy = game.field.getEnemyPokemon(); + + // change form + enemy.species.formIndex = 1; + + game.move.use(MoveId.TRANSFORM); + await game.move.forceEnemyMove(MoveId.MEMENTO); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.toNextWave(); + + expect(game.scene.phaseManager.getCurrentPhase()?.phaseName).toBe("CommandPhase"); + expect(game.scene.currentBattle.waveIndex).toBe(2); + + expect(player.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); + expect(player.getSpeciesForm().formIndex).toBe(enemy.getSpeciesForm().formIndex); + + await game.reload.reloadSession(); + + const playerReloaded = game.field.getPlayerPokemon(); + expect(playerReloaded.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); + expect(playerReloaded.getSpeciesForm().formIndex).toBe(enemy.getSpeciesForm().formIndex); + }); + }); + + describe("Moves - Transform", () => { + it.each<{ cause: string; callback: (p: Pokemon) => void; player?: boolean }>([ + { + cause: "user is fused", + callback: p => vi.spyOn(p, "isFusion").mockReturnValue(true), + }, + { + cause: "target is fused", + callback: p => vi.spyOn(p, "isFusion").mockReturnValue(true), + player: false, + }, + { + cause: "user is transformed", + callback: p => vi.spyOn(p, "isTransformed").mockReturnValue(true), + }, + { + cause: "target is transformed", + callback: p => vi.spyOn(p, "isTransformed").mockReturnValue(true), + player: false, + }, + { + cause: "user has illusion", + callback: p => p.setIllusion(game.scene.getEnemyParty()[1]), + }, + { + cause: "target has illusion", + callback: p => p.setIllusion(game.scene.getEnemyParty()[1]), + player: false, + }, + { + cause: "target is behind a substitute", + callback: p => p.addTag(BattlerTagType.SUBSTITUTE, 1, MoveId.SUBSTITUTE, p.id), + player: false, + }, + ])("should fail if $cause", async ({ callback, player = true }) => { + game.override.battleType(BattleType.TRAINER); // ensures 2 enemy pokemon for illusion + await game.classicMode.startBattle([SpeciesId.DITTO, SpeciesId.ABOMASNOW]); + + callback(player ? game.field.getPlayerPokemon() : game.field.getEnemyPokemon()); + + game.move.use(MoveId.TRANSFORM); + await game.toEndOfTurn(); + + const ditto = game.field.getPlayerPokemon(); + expect(ditto.getLastXMoves()[0].result).toBe(MoveResult.FAIL); + expect(game.phaseInterceptor.log).not.toContain("PokemonTransformPhase"); + }); + }); + + describe("Abilities - Imposter", () => { + beforeEach(async () => { + game.override.ability(AbilityId.NONE); + // Mock ability index to always be HA (ensuring Ditto has Imposter and nobody else). + ( + vi.spyOn(Pokemon.prototype as any, "generateAbilityIndex") as MockInstance< + (typeof Pokemon.prototype)["generateAbilityIndex"] + > + ).mockReturnValue(3); + }); + + it.each<{ name: string; callback: (p: EnemyPokemon) => void }>([ + { + name: "opponents with substitutes", + callback: p => p.addTag(BattlerTagType.SUBSTITUTE, 1, MoveId.SUBSTITUTE, p.id), + }, + { name: "fused opponents", callback: p => vi.spyOn(p, "isFusion").mockReturnValue(true) }, + { + name: "opponents with illusions", + callback: p => p.setIllusion(game.scene.getEnemyParty()[1]), // doesn't really matter what the illusion is, merely that it exists + }, + ])("should ignore $name during target selection", async ({ callback }) => { + game.override.battleStyle("double"); + await game.classicMode.startBattle([SpeciesId.GYARADOS, SpeciesId.MILOTIC, SpeciesId.DITTO]); + + const ditto = game.scene.getPlayerParty()[2]; + + const [enemy1, enemy2] = game.scene.getEnemyField(); + // Override enemy 1 to be a fusion/illusion + callback(enemy1); + + expect(ditto.canTransformInto(enemy1)).toBe(false); + expect(ditto.canTransformInto(enemy2)).toBe(true); + + // Switch out to Ditto + game.doSwitchPokemon(2); + game.move.use(MoveId.SPLASH, BattlerIndex.PLAYER_2); + await game.toEndOfTurn(); + + expect(ditto.isActive()).toBe(true); + expect(ditto.isTransformed()).toBe(true); + expect(ditto.getSpeciesForm().speciesId).toBe(enemy2.getSpeciesForm().speciesId); + expect(game.phaseInterceptor.log).toContain("ShowAbilityPhase"); + expect(game.phaseInterceptor.log).toContain("PokemonTransformPhase"); + }); + + it("should not activate if both opponents are fused or have illusions", async () => { + game.override.battleStyle("double"); + await game.classicMode.startBattle([SpeciesId.GYARADOS, SpeciesId.MILOTIC, SpeciesId.DITTO]); + + const [gyarados, , ditto] = game.scene.getPlayerParty(); + const [enemy1, enemy2] = game.scene.getEnemyParty(); + // Override enemy 1 to be a fusion & enemy 2 to have illusion + vi.spyOn(enemy1, "isFusion").mockReturnValue(true); + enemy2.setIllusion(gyarados); + + expect(ditto.canTransformInto(enemy1)).toBe(false); + expect(ditto.canTransformInto(enemy2)).toBe(false); + + // Switch out to Ditto + game.doSwitchPokemon(2); + game.move.use(MoveId.SPLASH, BattlerIndex.PLAYER_2); + await game.toEndOfTurn(); + + expect(ditto.isActive()).toBe(true); + expect(ditto.isTransformed()).toBe(false); + expect(ditto.getSpeciesForm().speciesId).toBe(SpeciesId.DITTO); + expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase"); + expect(game.phaseInterceptor.log).not.toContain("PokemonTransformPhase"); + }); + }); +}); diff --git a/test/moves/transform.test.ts b/test/moves/transform.test.ts deleted file mode 100644 index 4fbaf0136ab..00000000000 --- a/test/moves/transform.test.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { MoveId } from "#enums/move-id"; -import { Stat, EFFECTIVE_STATS } from "#enums/stat"; -import { AbilityId } from "#enums/ability-id"; -import { BattlerIndex } from "#enums/battler-index"; - -// 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 - .battleStyle("single") - .enemySpecies(SpeciesId.MEW) - .enemyLevel(200) - .enemyAbility(AbilityId.BEAST_BOOST) - .enemyPassiveAbility(AbilityId.BALL_FETCH) - .enemyMoveset(MoveId.SPLASH) - .ability(AbilityId.INTIMIDATE) - .moveset([MoveId.TRANSFORM]); - }); - - it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => { - await game.classicMode.startBattle([SpeciesId.DITTO]); - - game.move.select(MoveId.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()); - - // copies all stats except hp - 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)); - } - - expect(player.getStatStages()).toEqual(enemy.getStatStages()); - - // move IDs are equal - expect(player.getMoveset().map(m => m.moveId)).toEqual(enemy.getMoveset().map(m => m.moveId)); - - expect(player.getTypes()).toEqual(enemy.getTypes()); - }); - - it("should copy in-battle overridden stats", async () => { - game.override.enemyMoveset([MoveId.POWER_SPLIT]); - - await game.classicMode.startBattle([SpeciesId.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(MoveId.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); - }); - - it("should set each move's pp to a maximum of 5", async () => { - game.override.enemyMoveset([MoveId.SWORDS_DANCE, MoveId.GROWL, MoveId.SKETCH, MoveId.RECOVER]); - - await game.classicMode.startBattle([SpeciesId.DITTO]); - const player = game.scene.getPlayerPokemon()!; - - game.move.select(MoveId.TRANSFORM); - await game.phaseInterceptor.to(TurnEndPhase); - - player.getMoveset().forEach(move => { - // Should set correct maximum PP without touching `ppUp` - if (move) { - if (move.moveId === MoveId.SKETCH) { - expect(move.getMovePp()).toBe(1); - } else { - expect(move.getMovePp()).toBe(5); - } - expect(move.ppUp).toBe(0); - } - }); - }); - - it("should activate its ability if it copies one that activates on summon", async () => { - game.override.enemyAbility(AbilityId.INTIMIDATE).ability(AbilityId.BALL_FETCH); - - await game.classicMode.startBattle([SpeciesId.DITTO]); - game.move.select(MoveId.TRANSFORM); - - await game.phaseInterceptor.to("BerryPhase"); - - expect(game.scene.getEnemyPokemon()?.getStatStage(Stat.ATK)).toBe(-1); - }); - - it("should persist transformed attributes across reloads", async () => { - game.override.enemyMoveset([]).moveset([]); - - await game.classicMode.startBattle([SpeciesId.DITTO]); - - const player = game.scene.getPlayerPokemon()!; - const enemy = game.scene.getEnemyPokemon()!; - - game.move.changeMoveset(player, MoveId.TRANSFORM); - game.move.changeMoveset(enemy, MoveId.MEMENTO); - - game.move.select(MoveId.TRANSFORM); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); - await game.toNextWave(); - - expect(game.scene.phaseManager.getCurrentPhase()?.constructor.name).toBe("CommandPhase"); - expect(game.scene.currentBattle.waveIndex).toBe(2); - - await game.reload.reloadSession(); - - const playerReloaded = game.scene.getPlayerPokemon()!; - const playerMoveset = player.getMoveset(); - - expect(playerReloaded.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); - expect(playerReloaded.getAbility()).toBe(enemy.getAbility()); - expect(playerReloaded.getGender()).toBe(enemy.getGender()); - - expect(playerReloaded.getStat(Stat.HP, false)).not.toBe(enemy.getStat(Stat.HP)); - for (const s of EFFECTIVE_STATS) { - expect(playerReloaded.getStat(s, false)).toBe(enemy.getStat(s, false)); - } - - expect(playerMoveset.length).toEqual(1); - expect(playerMoveset[0]?.moveId).toEqual(MoveId.MEMENTO); - }); - - it("should stay transformed with the correct form after reload", async () => { - game.override.enemyMoveset([]).moveset([]).enemySpecies(SpeciesId.DARMANITAN); - - await game.classicMode.startBattle([SpeciesId.DITTO]); - - const player = game.scene.getPlayerPokemon()!; - const enemy = game.scene.getEnemyPokemon()!; - - // change form - enemy.species.forms[1]; - enemy.species.formIndex = 1; - - game.move.changeMoveset(player, MoveId.TRANSFORM); - game.move.changeMoveset(enemy, MoveId.MEMENTO); - - game.move.select(MoveId.TRANSFORM); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); - await game.toNextWave(); - - expect(game.scene.phaseManager.getCurrentPhase()?.constructor.name).toBe("CommandPhase"); - expect(game.scene.currentBattle.waveIndex).toBe(2); - - await game.reload.reloadSession(); - - const playerReloaded = game.scene.getPlayerPokemon()!; - - expect(playerReloaded.getSpeciesForm().speciesId).toBe(enemy.getSpeciesForm().speciesId); - expect(playerReloaded.getSpeciesForm().formIndex).toBe(enemy.getSpeciesForm().formIndex); - }); -}); diff --git a/test/moves/trick_or_treat.test.ts b/test/moves/trick_or_treat.test.ts index 861115e2503..4e563c97ddc 100644 --- a/test/moves/trick_or_treat.test.ts +++ b/test/moves/trick_or_treat.test.ts @@ -1,8 +1,8 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { PokemonType } from "#enums/pokemon-type"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/triple_arrows.test.ts b/test/moves/triple_arrows.test.ts index 89ccb4e5b04..a60c7106a21 100644 --- a/test/moves/triple_arrows.test.ts +++ b/test/moves/triple_arrows.test.ts @@ -1,10 +1,9 @@ -import type { FlinchAttr, StatStageChangeAttr } from "#app/data/moves/move"; -import { allMoves } from "#app/data/data-lists"; +import { allMoves } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import type Move from "#app/data/moves/move"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { FlinchAttr, Move, StatStageChangeAttr } from "#moves/move"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/u_turn.test.ts b/test/moves/u_turn.test.ts index a2e29899ad8..cf8b91511ca 100644 --- a/test/moves/u_turn.test.ts +++ b/test/moves/u_turn.test.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/moves/upper_hand.test.ts b/test/moves/upper_hand.test.ts index fe38e75cf9a..f03a84397f2 100644 --- a/test/moves/upper_hand.test.ts +++ b/test/moves/upper_hand.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/moves/whirlwind.test.ts b/test/moves/whirlwind.test.ts index 00d7c16561c..9def19c4668 100644 --- a/test/moves/whirlwind.test.ts +++ b/test/moves/whirlwind.test.ts @@ -1,19 +1,19 @@ +import { globalScene } from "#app/global-scene"; +import { Status } from "#data/status-effect"; +import { AbilityId } from "#enums/ability-id"; +import { BattleType } from "#enums/battle-type"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Challenges } from "#enums/challenges"; -import { PokemonType } from "#enums/pokemon-type"; -import { MoveResult } from "#enums/move-result"; -import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { MoveResult } from "#enums/move-result"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { TrainerType } from "#enums/trainer-type"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { Status } from "#app/data/status-effect"; -import { StatusEffect } from "#enums/status-effect"; -import { globalScene } from "#app/global-scene"; -import { BattlerIndex } from "#enums/battler-index"; -import { BattleType } from "#enums/battle-type"; -import { TrainerType } from "#enums/trainer-type"; describe("Moves - Whirlwind", () => { let phaserGame: Phaser.Game; diff --git a/test/moves/wide_guard.test.ts b/test/moves/wide_guard.test.ts index 07c02158e94..7de1faea900 100644 --- a/test/moves/wide_guard.test.ts +++ b/test/moves/wide_guard.test.ts @@ -1,12 +1,11 @@ -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { SpeciesId } from "#enums/species-id"; import { Stat } from "#enums/stat"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { CommandPhase } from "#app/phases/command-phase"; +import { BerryPhase } from "#phases/berry-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; describe("Moves - Wide Guard", () => { let phaserGame: Phaser.Game; @@ -41,9 +40,6 @@ describe("Moves - Wide Guard", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.WIDE_GUARD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -59,9 +55,6 @@ describe("Moves - Wide Guard", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.WIDE_GUARD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -77,9 +70,6 @@ describe("Moves - Wide Guard", () => { const leadPokemon = game.scene.getPlayerField(); game.move.select(MoveId.WIDE_GUARD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SPLASH, 1); await game.phaseInterceptor.to(BerryPhase, false); @@ -96,9 +86,6 @@ describe("Moves - Wide Guard", () => { const enemyPokemon = game.scene.getEnemyField(); game.move.select(MoveId.WIDE_GUARD); - - await game.phaseInterceptor.to(CommandPhase); - game.move.select(MoveId.SURF, 1); await game.phaseInterceptor.to(BerryPhase, false); diff --git a/test/moves/will_o_wisp.test.ts b/test/moves/will_o_wisp.test.ts index 336e84129c5..6f878e1198c 100644 --- a/test/moves/will_o_wisp.test.ts +++ b/test/moves/will_o_wisp.test.ts @@ -1,9 +1,9 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/mystery-encounter/encounter-test-utils.ts b/test/mystery-encounter/encounter-test-utils.ts index 6293a49cf63..6b6a570d318 100644 --- a/test/mystery-encounter/encounter-test-utils.ts +++ b/test/mystery-encounter/encounter-test-utils.ts @@ -1,24 +1,24 @@ +import { Status } from "#data/status-effect"; +import { Button } from "#enums/buttons"; +import { StatusEffect } from "#enums/status-effect"; +import { UiMode } from "#enums/ui-mode"; // biome-ignore lint/performance/noNamespaceImport: Necessary for mocks -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { Status } from "#app/data/status-effect"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MessagePhase } from "#app/phases/message-phase"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { CommandPhase } from "#phases/command-phase"; +import { MessagePhase } from "#phases/message-phase"; import { MysteryEncounterBattlePhase, MysteryEncounterOptionSelectedPhase, MysteryEncounterPhase, MysteryEncounterRewardsPhase, -} from "#app/phases/mystery-encounter-phases"; -import { VictoryPhase } from "#app/phases/victory-phase"; -import type MessageUiHandler from "#app/ui/message-ui-handler"; -import type MysteryEncounterUiHandler from "#app/ui/mystery-encounter-ui-handler"; -import type PartyUiHandler from "#app/ui/party-ui-handler"; -import type OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { isNullOrUndefined } from "#app/utils/common"; -import { Button } from "#enums/buttons"; -import { StatusEffect } from "#enums/status-effect"; -import type GameManager from "#test/testUtils/gameManager"; +} from "#phases/mystery-encounter-phases"; +import { VictoryPhase } from "#phases/victory-phase"; +import type { GameManager } from "#test/testUtils/gameManager"; +import type { MessageUiHandler } from "#ui/message-ui-handler"; +import type { MysteryEncounterUiHandler } from "#ui/mystery-encounter-ui-handler"; +import type { OptionSelectUiHandler } from "#ui/option-select-ui-handler"; +import type { PartyUiHandler } from "#ui/party-ui-handler"; +import { isNullOrUndefined } from "#utils/common"; import { expect, vi } from "vitest"; /** diff --git a/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts b/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts index 82cac197fe9..a2832052611 100644 --- a/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts +++ b/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts @@ -1,25 +1,25 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { EggTier } from "#enums/egg-type"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { ATrainersTestEncounter } from "#mystery-encounters/a-trainers-test-encounter"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { PartyHealPhase } from "#phases/party-heal-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { ATrainersTestEncounter } from "#app/data/mystery-encounters/encounters/a-trainers-test-encounter"; -import { EggTier } from "#enums/egg-type"; -import { CommandPhase } from "#app/phases/command-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { PartyHealPhase } from "#app/phases/party-heal-phase"; import i18next from "i18next"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/aTrainersTest"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts b/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts index b6c4e4d85fb..969ac812907 100644 --- a/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts +++ b/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts @@ -1,25 +1,25 @@ +import type { BattleScene } from "#app/battle-scene"; +import { BerryType } from "#enums/berry-type"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { BerryModifier, PokemonHeldItemModifier } from "#modifiers/modifier"; +import { AbsoluteAvariceEncounter } from "#mystery-encounters/absolute-avarice-encounter"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { MovePhase } from "#phases/move-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { BerryModifier, PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { BerryType } from "#enums/berry-type"; -import { AbsoluteAvariceEncounter } from "#app/data/mystery-encounters/encounters/absolute-avarice-encounter"; -import { MoveId } from "#enums/move-id"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import i18next from "i18next"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/absoluteAvarice"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts b/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts index 4f986f58b88..97326e89a83 100644 --- a/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts +++ b/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts @@ -1,24 +1,24 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import { AbilityId } from "#enums/ability-id"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { AnOfferYouCantRefuseEncounter } from "#app/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter"; +import { MoveId } from "#enums/move-id"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { ShinyRateBoosterModifier } from "#modifiers/modifier"; +import { PokemonMove } from "#moves/pokemon-move"; +import { AnOfferYouCantRefuseEncounter } from "#mystery-encounters/an-offer-you-cant-refuse-encounter"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { MoveId } from "#enums/move-id"; -import { ShinyRateBoosterModifier } from "#app/modifier/modifier"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { AbilityId } from "#enums/ability-id"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/anOfferYouCantRefuse"; /** Gyarados for Indimidate */ diff --git a/test/mystery-encounter/encounters/berries-abound-encounter.test.ts b/test/mystery-encounter/encounters/berries-abound-encounter.test.ts index 8c2c6c608cd..5af89ebc02c 100644 --- a/test/mystery-encounter/encounters/berries-abound-encounter.test.ts +++ b/test/mystery-encounter/encounters/berries-abound-encounter.test.ts @@ -1,26 +1,26 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import { AbilityId } from "#enums/ability-id"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { UiMode } from "#enums/ui-mode"; +import { BerryModifier } from "#modifiers/modifier"; +import { BerriesAboundEncounter } from "#mystery-encounters/berries-abound-encounter"; +import * as EncounterDialogueUtils from "#mystery-encounters/encounter-dialogue-utils"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { BerryModifier } from "#app/modifier/modifier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { BerriesAboundEncounter } from "#app/data/mystery-encounters/encounters/berries-abound-encounter"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import * as EncounterDialogueUtils from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { CommandPhase } from "#app/phases/command-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { AbilityId } from "#enums/ability-id"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/berriesAbound"; const defaultParty = [SpeciesId.PYUKUMUKU, SpeciesId.MAGIKARP, SpeciesId.PIKACHU]; diff --git a/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts b/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts index 4da8ff7f643..80f4c00c2a6 100644 --- a/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts +++ b/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts @@ -1,29 +1,29 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { TrainerType } from "#enums/trainer-type"; +import { UiMode } from "#enums/ui-mode"; +import { ContactHeldItemTransferChanceModifier } from "#modifiers/modifier"; +import { PokemonMove } from "#moves/pokemon-move"; +import { BugTypeSuperfanEncounter } from "#mystery-encounters/bug-type-superfan-encounter"; +import * as encounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { MysteryEncounterPhase, MysteryEncounterRewardsPhase } from "#phases/mystery-encounter-phases"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import { MoveId } from "#enums/move-id"; -import type BattleScene from "#app/battle-scene"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { UiMode } from "#enums/ui-mode"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { TrainerType } from "#enums/trainer-type"; -import { MysteryEncounterPhase, MysteryEncounterRewardsPhase } from "#app/phases/mystery-encounter-phases"; -import { ContactHeldItemTransferChanceModifier } from "#app/modifier/modifier"; -import { CommandPhase } from "#app/phases/command-phase"; -import { BugTypeSuperfanEncounter } from "#app/data/mystery-encounters/encounters/bug-type-superfan-encounter"; -import * as encounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/bugTypeSuperfan"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.WEEDLE]; diff --git a/test/mystery-encounter/encounters/clowning-around-encounter.test.ts b/test/mystery-encounter/encounters/clowning-around-encounter.test.ts index 85193d1ec72..af99834d082 100644 --- a/test/mystery-encounter/encounters/clowning-around-encounter.test.ts +++ b/test/mystery-encounter/encounters/clowning-around-encounter.test.ts @@ -1,42 +1,42 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import * as BattleAnims from "#data/battle-anims"; +import { modifierTypes } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; +import { BerryType } from "#enums/berry-type"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { Button } from "#enums/buttons"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import * as BattleAnims from "#app/data/battle-anims"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { TrainerType } from "#enums/trainer-type"; +import { UiMode } from "#enums/ui-mode"; +import type { Pokemon } from "#field/pokemon"; +import type { PokemonHeldItemModifier } from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import { ClowningAroundEncounter } from "#mystery-encounters/clowning-around-encounter"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { generateModifierType } from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { MovePhase } from "#phases/move-phase"; +import { PostMysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { NewBattlePhase } from "#phases/new-battle-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import { MoveId } from "#enums/move-id"; -import type BattleScene from "#app/battle-scene"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { UiMode } from "#enums/ui-mode"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { ModifierTier } from "#enums/modifier-tier"; -import { ClowningAroundEncounter } from "#app/data/mystery-encounters/encounters/clowning-around-encounter"; -import { TrainerType } from "#enums/trainer-type"; -import { AbilityId } from "#enums/ability-id"; -import { PostMysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { Button } from "#enums/buttons"; -import type PartyUiHandler from "#app/ui/party-ui-handler"; -import type OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { BerryType } from "#enums/berry-type"; -import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { PokemonType } from "#enums/pokemon-type"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { NewBattlePhase } from "#app/phases/new-battle-phase"; +import type { OptionSelectUiHandler } from "#ui/option-select-ui-handler"; +import type { PartyUiHandler } from "#ui/party-ui-handler"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/clowningAround"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts b/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts index e47c7cc1a42..8ef499fe7f4 100644 --- a/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts +++ b/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts @@ -1,28 +1,28 @@ +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { UiMode } from "#enums/ui-mode"; +import { PokemonMove } from "#moves/pokemon-move"; +import { DancingLessonsEncounter } from "#mystery-encounters/dancing-lessons-encounter"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { LearnMovePhase } from "#phases/learn-move-phase"; +import { MovePhase } from "#phases/move-phase"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { MoveId } from "#enums/move-id"; -import { DancingLessonsEncounter } from "#app/data/mystery-encounters/encounters/dancing-lessons-encounter"; -import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { LearnMovePhase } from "#app/phases/learn-move-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/dancingLessons"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/delibirdy-encounter.test.ts b/test/mystery-encounter/encounters/delibirdy-encounter.test.ts index 3ef8431cc2c..0fb6d2d09b8 100644 --- a/test/mystery-encounter/encounters/delibirdy-encounter.test.ts +++ b/test/mystery-encounter/encounters/delibirdy-encounter.test.ts @@ -1,19 +1,11 @@ +import type { BattleScene } from "#app/battle-scene"; +import { modifierTypes } from "#data/data-lists"; +import { BerryType } from "#enums/berry-type"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { - runMysteryEncounterToEnd, - runSelectMysteryEncounterOption, -} from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { DelibirdyEncounter } from "#app/data/mystery-encounters/encounters/delibirdy-encounter"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import type { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; import { BerryModifier, HealingBoosterModifier, @@ -23,11 +15,19 @@ import { PokemonInstantReviveModifier, PokemonNatureWeightModifier, PreserveBerryModifier, -} from "#app/modifier/modifier"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { modifierTypes } from "#app/data/data-lists"; -import { BerryType } from "#enums/berry-type"; +} from "#modifiers/modifier"; +import { DelibirdyEncounter } from "#mystery-encounters/delibirdy-encounter"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { generateModifierType } from "#mystery-encounters/encounter-phase-utils"; +import type { MoneyRequirement } from "#mystery-encounters/mystery-encounter-requirements"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { + runMysteryEncounterToEnd, + runSelectMysteryEncounterOption, +} from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/delibirdy"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts b/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts index a82734d0c03..807526d2683 100644 --- a/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts +++ b/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts @@ -1,19 +1,19 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { DepartmentStoreSaleEncounter } from "#app/data/mystery-encounters/encounters/department-store-sale-encounter"; -import { CIVILIZATION_ENCOUNTER_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import { DepartmentStoreSaleEncounter } from "#mystery-encounters/department-store-sale-encounter"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CIVILIZATION_ENCOUNTER_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/departmentStoreSale"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/field-trip-encounter.test.ts b/test/mystery-encounter/encounters/field-trip-encounter.test.ts index f4b3c52eb65..4390c80d255 100644 --- a/test/mystery-encounter/encounters/field-trip-encounter.test.ts +++ b/test/mystery-encounter/encounters/field-trip-encounter.test.ts @@ -1,20 +1,20 @@ +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; +import { MoveId } from "#enums/move-id"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { FieldTripEncounter } from "#app/data/mystery-encounters/encounters/field-trip-encounter"; -import { MoveId } from "#enums/move-id"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { FieldTripEncounter } from "#mystery-encounters/field-trip-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; import i18next from "i18next"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/fieldTrip"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts b/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts index 16adc47ff11..1fb1cbfdbc8 100644 --- a/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts +++ b/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts @@ -1,35 +1,35 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import * as BattleAnims from "#data/battle-anims"; +import { Gender } from "#data/gender"; +import { Status } from "#data/status-effect"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; import { BiomeId } from "#enums/biome-id"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { FieryFalloutEncounter } from "#app/data/mystery-encounters/encounters/fiery-fallout-encounter"; -import { Gender } from "#app/data/gender"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import * as BattleAnims from "#app/data/battle-anims"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { StatusEffect } from "#enums/status-effect"; +import { AttackTypeBoosterModifier, PokemonHeldItemModifier } from "#modifiers/modifier"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { FieryFalloutEncounter } from "#mystery-encounters/fiery-fallout-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { MovePhase } from "#phases/move-phase"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import { MoveId } from "#enums/move-id"; -import type BattleScene from "#app/battle-scene"; -import { AttackTypeBoosterModifier, PokemonHeldItemModifier } from "#app/modifier/modifier"; -import { PokemonType } from "#enums/pokemon-type"; -import { Status } from "#app/data/status-effect"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { AbilityId } from "#enums/ability-id"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; -import { StatusEffect } from "#enums/status-effect"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/fieryFallout"; /** Arcanine and Ninetails for 2 Fire types. Lapras, Gengar, Abra for burnable mon. */ diff --git a/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts b/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts index 28db869004c..588c126852f 100644 --- a/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts +++ b/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts @@ -1,27 +1,27 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { UiMode } from "#enums/ui-mode"; +import { PokemonMove } from "#moves/pokemon-move"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { FightOrFlightEncounter } from "#mystery-encounters/fight-or-flight-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import { MoveId } from "#enums/move-id"; -import type BattleScene from "#app/battle-scene"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { FightOrFlightEncounter } from "#app/data/mystery-encounters/encounters/fight-or-flight-encounter"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { CommandPhase } from "#app/phases/command-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/fightOrFlight"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts b/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts index ae7e269ea00..43102cbc80d 100644 --- a/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts +++ b/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts @@ -1,30 +1,30 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { Command } from "#enums/command"; +import { MoveId } from "#enums/move-id"; +import { MoveUseMode } from "#enums/move-use-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { UiMode } from "#enums/ui-mode"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { FunAndGamesEncounter } from "#mystery-encounters/fun-and-games-encounter"; +import { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { UiMode } from "#enums/ui-mode"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { Nature } from "#enums/nature"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { CommandPhase } from "#app/phases/command-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { FunAndGamesEncounter } from "#app/data/mystery-encounters/encounters/fun-and-games-encounter"; -import { MoveId } from "#enums/move-id"; -import { Command } from "#enums/command"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { MoveUseMode } from "#enums/move-use-mode"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/funAndGames"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; @@ -154,11 +154,11 @@ describe("Fun And Games! - Mystery Encounter", () => { // Turn 1 (game.scene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, 0, MoveUseMode.NORMAL); - await game.phaseInterceptor.to(CommandPhase); + await game.toNextTurn(); // Turn 2 (game.scene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, 0, MoveUseMode.NORMAL); - await game.phaseInterceptor.to(CommandPhase); + await game.toNextTurn(); // Turn 3 (game.scene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, 0, MoveUseMode.NORMAL); diff --git a/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts b/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts index bb598f4ae6e..2a959df76f2 100644 --- a/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts +++ b/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts @@ -1,24 +1,24 @@ +import type { BattleScene } from "#app/battle-scene"; +import { modifierTypes } from "#data/data-lists"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; +import { ModifierTier } from "#enums/modifier-tier"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { PokemonNatureWeightModifier } from "#app/modifier/modifier"; -import { generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { modifierTypes } from "#app/data/data-lists"; -import { GlobalTradeSystemEncounter } from "#app/data/mystery-encounters/encounters/global-trade-system-encounter"; -import { CIVILIZATION_ENCOUNTER_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { ModifierTier } from "#enums/modifier-tier"; -import * as Utils from "#app/utils/common"; +import { PokemonNatureWeightModifier } from "#modifiers/modifier"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { generateModifierType } from "#mystery-encounters/encounter-phase-utils"; +import { GlobalTradeSystemEncounter } from "#mystery-encounters/global-trade-system-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CIVILIZATION_ENCOUNTER_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import * as Utils from "#utils/common"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/globalTradeSystem"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts b/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts index a55806e5f48..2186fe43e23 100644 --- a/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts +++ b/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts @@ -1,20 +1,23 @@ -import { LostAtSeaEncounter } from "#app/data/mystery-encounters/encounters/lost-at-sea-encounter"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption } from "../encounter-test-utils"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { LostAtSeaEncounter } from "#mystery-encounters/lost-at-sea-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { PartyExpPhase } from "#phases/party-exp-phase"; +import { + runMysteryEncounterToEnd, + runSelectMysteryEncounterOption, +} from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import type BattleScene from "#app/battle-scene"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { PartyExpPhase } from "#app/phases/party-exp-phase"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import i18next from "i18next"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/lostAtSea"; /** Blastoise for surf. Pidgeot for fly. Abra for none. */ diff --git a/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts b/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts index 478648d88a7..ee952f3809e 100644 --- a/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts +++ b/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts @@ -1,30 +1,29 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { PartyMemberStrength } from "#enums/party-member-strength"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { UiMode } from "#enums/ui-mode"; +import { MysteriousChallengersEncounter } from "#mystery-encounters/mysterious-challengers-encounter"; +import { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { CommandPhase } from "#phases/command-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { UiMode } from "#enums/ui-mode"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { ModifierTier } from "#enums/modifier-tier"; -import { MysteriousChallengersEncounter } from "#app/data/mystery-encounters/encounters/mysterious-challengers-encounter"; -import { TrainerConfig } from "#app/data/trainers/trainer-config"; -import { TrainerPartyCompoundTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { TrainerPartyTemplate } from "#app/data/trainers/TrainerPartyTemplate"; -import { PartyMemberStrength } from "#enums/party-member-strength"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { CommandPhase } from "#app/phases/command-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { TrainerConfig } from "#trainers/trainer-config"; +import { TrainerPartyCompoundTemplate, TrainerPartyTemplate } from "#trainers/trainer-party-template"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/mysteriousChallengers"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/part-timer-encounter.test.ts b/test/mystery-encounter/encounters/part-timer-encounter.test.ts index d36b387cae1..1bbda8b77e0 100644 --- a/test/mystery-encounter/encounters/part-timer-encounter.test.ts +++ b/test/mystery-encounter/encounters/part-timer-encounter.test.ts @@ -1,22 +1,22 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { PokemonMove } from "#moves/pokemon-move"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { CIVILIZATION_ENCOUNTER_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { PartTimerEncounter } from "#mystery-encounters/part-timer-encounter"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { CIVILIZATION_ENCOUNTER_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { PartTimerEncounter } from "#app/data/mystery-encounters/encounters/part-timer-encounter"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { MoveId } from "#enums/move-id"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; +import { GameManager } from "#test/testUtils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/partTimer"; // Pyukumuku for lowest speed, Regieleki for highest speed, Feebas for lowest "bulk", Melmetal for highest "bulk" diff --git a/test/mystery-encounter/encounters/safari-zone.test.ts b/test/mystery-encounter/encounters/safari-zone.test.ts index 7ac26f48e59..252198139df 100644 --- a/test/mystery-encounter/encounters/safari-zone.test.ts +++ b/test/mystery-encounter/encounters/safari-zone.test.ts @@ -1,25 +1,22 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import { NON_LEGEND_PARADOX_POKEMON } from "#balance/special-species-groups"; import { BiomeId } from "#enums/biome-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { getSafariSpeciesSpawn, SafariZoneEncounter } from "#mystery-encounters/safari-zone-encounter"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { - getSafariSpeciesSpawn, - SafariZoneEncounter, -} from "#app/data/mystery-encounters/encounters/safari-zone-encounter"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { NON_LEGEND_PARADOX_POKEMON } from "#app/data/balance/special-species-groups"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/safariZone"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts b/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts index 2138298ee2b..6ecf3162607 100644 --- a/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts +++ b/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts @@ -1,24 +1,24 @@ -import type BattleScene from "#app/battle-scene"; -import { TeleportingHijinksEncounter } from "#app/data/mystery-encounters/encounters/teleporting-hijinks-encounter"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { AbilityId } from "#enums/ability-id"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import GameManager from "#test/testUtils/gameManager"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { TeleportingHijinksEncounter } from "#mystery-encounters/teleporting-hijinks-encounter"; +import { CommandPhase } from "#phases/command-phase"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; import i18next from "i18next"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts b/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts index c9d6f540191..471a26aa532 100644 --- a/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts @@ -1,27 +1,27 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#balance/starters"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { EggTier } from "#enums/egg-type"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { TrainerType } from "#enums/trainer-type"; +import { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { TheExpertPokemonBreederEncounter } from "#mystery-encounters/the-expert-pokemon-breeder-encounter"; +import { CommandPhase } from "#phases/command-phase"; +import { PostMysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { CommandPhase } from "#app/phases/command-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { TheExpertPokemonBreederEncounter } from "#app/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter"; -import { TrainerType } from "#enums/trainer-type"; -import { EggTier } from "#enums/egg-type"; -import { PostMysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#app/data/balance/starters"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/theExpertPokemonBreeder"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts b/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts index 990e39014e2..81329c5552f 100644 --- a/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts @@ -1,25 +1,25 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import { NON_LEGEND_PARADOX_POKEMON } from "#balance/special-species-groups"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { + getSalesmanSpeciesOffer, + ThePokemonSalesmanEncounter, +} from "#mystery-encounters/the-pokemon-salesman-encounter"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; -import { - getSalesmanSpeciesOffer, - ThePokemonSalesmanEncounter, -} from "#app/data/mystery-encounters/encounters/the-pokemon-salesman-encounter"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { NON_LEGEND_PARADOX_POKEMON } from "#app/data/balance/special-species-groups"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/thePokemonSalesman"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts b/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts index c1f13d61817..9a78cd99f93 100644 --- a/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts @@ -1,34 +1,34 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import * as BattleAnims from "#data/battle-anims"; +import { CustomPokemonData } from "#data/pokemon-data"; +import { AbilityId } from "#enums/ability-id"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { BerryType } from "#enums/berry-type"; import { BiomeId } from "#enums/biome-id"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { Nature } from "#enums/nature"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import * as BattleAnims from "#app/data/battle-anims"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { UiMode } from "#enums/ui-mode"; +import { BerryModifier, PokemonBaseStatTotalModifier } from "#modifiers/modifier"; +import { PokemonMove } from "#moves/pokemon-move"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { TheStrongStuffEncounter } from "#mystery-encounters/the-strong-stuff-encounter"; +import { CommandPhase } from "#phases/command-phase"; +import { MovePhase } from "#phases/move-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import { MoveId } from "#enums/move-id"; -import type BattleScene from "#app/battle-scene"; -import { TheStrongStuffEncounter } from "#app/data/mystery-encounters/encounters/the-strong-stuff-encounter"; -import { Nature } from "#enums/nature"; -import { BerryType } from "#enums/berry-type"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { BerryModifier, PokemonBaseStatTotalModifier } from "#app/modifier/modifier"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { CustomPokemonData } from "#app/data/pokemon/pokemon-data"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { AbilityId } from "#enums/ability-id"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/theStrongStuff"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts b/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts index 012b88bcd73..0541826e569 100644 --- a/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts @@ -1,31 +1,31 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import { Status } from "#data/status-effect"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { UiMode } from "#enums/ui-mode"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { TrainerType } from "#enums/trainer-type"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Nature } from "#enums/nature"; -import { MoveId } from "#enums/move-id"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { TheWinstrateChallengeEncounter } from "#app/data/mystery-encounters/encounters/the-winstrate-challenge-encounter"; -import { Status } from "#app/data/status-effect"; -import { MysteryEncounterRewardsPhase } from "#app/phases/mystery-encounter-phases"; -import { CommandPhase } from "#app/phases/command-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { PartyHealPhase } from "#app/phases/party-heal-phase"; -import { VictoryPhase } from "#app/phases/victory-phase"; +import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; +import { TrainerType } from "#enums/trainer-type"; +import { UiMode } from "#enums/ui-mode"; +import { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#mystery-encounters/mystery-encounters"; +import { TheWinstrateChallengeEncounter } from "#mystery-encounters/the-winstrate-challenge-encounter"; +import { CommandPhase } from "#phases/command-phase"; +import { MysteryEncounterRewardsPhase } from "#phases/mystery-encounter-phases"; +import { PartyHealPhase } from "#phases/party-heal-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { VictoryPhase } from "#phases/victory-phase"; +import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; +import { GameManager } from "#test/testUtils/gameManager"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/theWinstrateChallenge"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; @@ -372,6 +372,6 @@ async function skipBattleToNextBattle(game: GameManager, isFinalBattle = false) if (isFinalBattle) { await game.phaseInterceptor.to(MysteryEncounterRewardsPhase); } else { - await game.phaseInterceptor.to(CommandPhase); + await game.toNextTurn(); } } diff --git a/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts b/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts index 9ab5f16d1b9..48b6ce79488 100644 --- a/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts +++ b/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts @@ -1,37 +1,37 @@ -import type BattleScene from "#app/battle-scene"; -import * as BattleAnims from "#app/data/battle-anims"; -import { TrashToTreasureEncounter } from "#app/data/mystery-encounters/encounters/trash-to-treasure-encounter"; -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import type { BattleScene } from "#app/battle-scene"; +import * as BattleAnims from "#data/battle-anims"; +import { modifierTypes } from "#data/data-lists"; +import { BiomeId } from "#enums/biome-id"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import { HealShopCostModifier, HitHealModifier, TurnHealModifier } from "#modifiers/modifier"; +import type { PokemonHeldItemModifierType } from "#modifiers/modifier-type"; +import { PokemonMove } from "#moves/pokemon-move"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; import { type EnemyPartyConfig, type EnemyPokemonConfig, generateModifierType, -} from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; -import { SpeciesId } from "#enums/species-id"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { HealShopCostModifier, HitHealModifier, TurnHealModifier } from "#app/modifier/modifier"; -import { ModifierTier } from "#enums/modifier-tier"; -import type { PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { CommandPhase } from "#app/phases/command-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import * as Utils from "#app/utils/common"; -import { MoveId } from "#enums/move-id"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +} from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { TrashToTreasureEncounter } from "#mystery-encounters/trash-to-treasure-encounter"; +import { CommandPhase } from "#phases/command-phase"; +import { MovePhase } from "#phases/move-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import * as Utils from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/trashToTreasure"; diff --git a/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts b/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts index ec64a17d291..a9ebfda496a 100644 --- a/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts +++ b/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts @@ -1,33 +1,33 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; +import { speciesEggMoves } from "#balance/egg-moves"; +import { modifierTypes } from "#data/data-lists"; +import { AbilityId } from "#enums/ability-id"; +import { BerryType } from "#enums/berry-type"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { MoveId } from "#enums/move-id"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { Stat } from "#enums/stat"; +import type { BerryModifier } from "#modifiers/modifier"; +import { PokemonMove } from "#moves/pokemon-move"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import { generateModifierType } from "#mystery-encounters/encounter-phase-utils"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { UncommonBreedEncounter } from "#mystery-encounters/uncommon-breed-encounter"; +import { CommandPhase } from "#phases/command-phase"; +import { MovePhase } from "#phases/move-phase"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { StatStageChangePhase } from "#phases/stat-stage-change-phase"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, } from "#test/mystery-encounter/encounter-test-utils"; -import { MoveId } from "#enums/move-id"; -import type BattleScene from "#app/battle-scene"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { CommandPhase } from "#app/phases/command-phase"; -import { UncommonBreedEncounter } from "#app/data/mystery-encounters/encounters/uncommon-breed-encounter"; -import { MovePhase } from "#app/phases/move-phase"; -import { speciesEggMoves } from "#app/data/balance/egg-moves"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { BerryType } from "#enums/berry-type"; -import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; -import { Stat } from "#enums/stat"; -import type { BerryModifier } from "#app/modifier/modifier"; -import { modifierTypes } from "#app/data/data-lists"; -import { AbilityId } from "#enums/ability-id"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/uncommonBreed"; const defaultParty = [SpeciesId.LAPRAS, SpeciesId.GENGAR, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/encounters/weird-dream-encounter.test.ts b/test/mystery-encounter/encounters/weird-dream-encounter.test.ts index 475d5cc3c6e..f68818bbfe4 100644 --- a/test/mystery-encounter/encounters/weird-dream-encounter.test.ts +++ b/test/mystery-encounter/encounters/weird-dream-encounter.test.ts @@ -1,25 +1,25 @@ -import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import type { BattleScene } from "#app/battle-scene"; import { BiomeId } from "#enums/biome-id"; -import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { ModifierTier } from "#enums/modifier-tier"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { UiMode } from "#enums/ui-mode"; +import * as EncounterPhaseUtils from "#mystery-encounters/encounter-phase-utils"; +import * as EncounterTransformationSequence from "#mystery-encounters/encounter-transformation-sequence"; +import * as MysteryEncounters from "#mystery-encounters/mystery-encounters"; +import { WeirdDreamEncounter } from "#mystery-encounters/weird-dream-encounter"; +import { CommandPhase } from "#phases/command-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase, } from "#test/mystery-encounter/encounter-test-utils"; -import type BattleScene from "#app/battle-scene"; -import { UiMode } from "#enums/ui-mode"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; -import { WeirdDreamEncounter } from "#app/data/mystery-encounters/encounters/weird-dream-encounter"; -import * as EncounterTransformationSequence from "#app/data/mystery-encounters/utils/encounter-transformation-sequence"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { ModifierTier } from "#enums/modifier-tier"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const namespace = "mysteryEncounters/weirdDream"; const defaultParty = [SpeciesId.MAGBY, SpeciesId.HAUNTER, SpeciesId.ABRA]; diff --git a/test/mystery-encounter/mystery-encounter-utils.test.ts b/test/mystery-encounter/mystery-encounter-utils.test.ts index b775ce8df60..745b11b7e73 100644 --- a/test/mystery-encounter/mystery-encounter-utils.test.ts +++ b/test/mystery-encounter/mystery-encounter-utils.test.ts @@ -1,26 +1,26 @@ -import type BattleScene from "#app/battle-scene"; -import { speciesStarterCosts } from "#app/data/balance/starters"; -import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; +import type { BattleScene } from "#app/battle-scene"; +import { speciesStarterCosts } from "#balance/starters"; +import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; +import { StatusEffect } from "#enums/status-effect"; import { getEncounterText, queueEncounterMessage, showEncounterDialogue, showEncounterText, -} from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; +} from "#mystery-encounters/encounter-dialogue-utils"; import { getHighestLevelPlayerPokemon, getLowestLevelPlayerPokemon, getRandomPlayerPokemon, getRandomSpeciesByStarterCost, koPlayerPokemon, -} from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { PokemonType } from "#enums/pokemon-type"; -import { MessagePhase } from "#app/phases/message-phase"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; -import { StatusEffect } from "#enums/status-effect"; +} from "#mystery-encounters/encounter-pokemon-utils"; +import { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; +import { MessagePhase } from "#phases/message-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/mystery-encounter/mystery-encounter.test.ts b/test/mystery-encounter/mystery-encounter.test.ts index be1f153f8b1..c8ac7078788 100644 --- a/test/mystery-encounter/mystery-encounter.test.ts +++ b/test/mystery-encounter/mystery-encounter.test.ts @@ -1,10 +1,10 @@ -import { afterEach, beforeAll, beforeEach, expect, describe, it } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { SpeciesId } from "#enums/species-id"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; +import type { BattleScene } from "#app/battle-scene"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import type BattleScene from "#app/battle-scene"; +import { SpeciesId } from "#enums/species-id"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Mystery Encounters", () => { let phaserGame: Phaser.Game; diff --git a/test/phases/form-change-phase.test.ts b/test/phases/form-change-phase.test.ts index b025f72f5e4..4d3af280043 100644 --- a/test/phases/form-change-phase.test.ts +++ b/test/phases/form-change-phase.test.ts @@ -1,12 +1,12 @@ +import { modifierTypes } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; +import { PokemonType } from "#enums/pokemon-type"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { generateModifierType } from "#mystery-encounters/encounter-phase-utils"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { PokemonType } from "#enums/pokemon-type"; -import { generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { modifierTypes } from "#app/data/data-lists"; describe("Form Change Phase", () => { let phaserGame: Phaser.Game; diff --git a/test/phases/frenzy-move-reset.test.ts b/test/phases/frenzy-move-reset.test.ts index 9c59e1da968..c922a121526 100644 --- a/test/phases/frenzy-move-reset.test.ts +++ b/test/phases/frenzy-move-reset.test.ts @@ -1,12 +1,12 @@ -import { BattlerIndex } from "#enums/battler-index"; import { AbilityId } from "#enums/ability-id"; +import { BattlerIndex } from "#enums/battler-index"; import { BattlerTagType } from "#enums/battler-tag-type"; -import { StatusEffect } from "#enums/status-effect"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { StatusEffect } from "#enums/status-effect"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Frenzy Move Reset", () => { let phaserGame: Phaser.Game; diff --git a/test/phases/game-over-phase.test.ts b/test/phases/game-over-phase.test.ts index 008f9fb68e8..d679b812fc0 100644 --- a/test/phases/game-over-phase.test.ts +++ b/test/phases/game-over-phase.test.ts @@ -1,12 +1,12 @@ -import { BiomeId } from "#enums/biome-id"; import { AbilityId } from "#enums/ability-id"; +import { BiomeId } from "#enums/biome-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { Unlockables } from "#enums/unlockables"; +import { achvs } from "#system/achv"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { achvs } from "#app/system/achv"; -import { Unlockables } from "#enums/unlockables"; describe("Game Over Phase", () => { let phaserGame: Phaser.Game; diff --git a/test/phases/learn-move-phase.test.ts b/test/phases/learn-move-phase.test.ts index 88b8187069b..b7e7175a46c 100644 --- a/test/phases/learn-move-phase.test.ts +++ b/test/phases/learn-move-phase.test.ts @@ -1,11 +1,11 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; -import { SpeciesId } from "#enums/species-id"; +import { Button } from "#enums/buttons"; import { MoveId } from "#enums/move-id"; -import { LearnMovePhase } from "#app/phases/learn-move-phase"; +import { SpeciesId } from "#enums/species-id"; import { UiMode } from "#enums/ui-mode"; -import { Button } from "#app/enums/buttons"; +import { LearnMovePhase } from "#phases/learn-move-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Learn Move Phase", () => { let phaserGame: Phaser.Game; diff --git a/test/phases/mystery-encounter-phase.test.ts b/test/phases/mystery-encounter-phase.test.ts index b17682d6c74..3c41028e4b7 100644 --- a/test/phases/mystery-encounter-phase.test.ts +++ b/test/phases/mystery-encounter-phase.test.ts @@ -1,15 +1,15 @@ -import { afterEach, beforeAll, beforeEach, expect, describe, it, vi } from "vitest"; -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { SpeciesId } from "#enums/species-id"; -import { MysteryEncounterOptionSelectedPhase, MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { UiMode } from "#enums/ui-mode"; import { Button } from "#enums/buttons"; -import type MysteryEncounterUiHandler from "#app/ui/mystery-encounter-ui-handler"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import type MessageUiHandler from "#app/ui/message-ui-handler"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import { MysteryEncounterOptionSelectedPhase, MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { MessageUiHandler } from "#ui/message-ui-handler"; +import type { MysteryEncounterUiHandler } from "#ui/mystery-encounter-ui-handler"; import i18next from "i18next"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Mystery Encounter Phases", () => { let phaserGame: Phaser.Game; diff --git a/test/phases/phases.test.ts b/test/phases/phases.test.ts index 9d1c1804615..daa63fe2adc 100644 --- a/test/phases/phases.test.ts +++ b/test/phases/phases.test.ts @@ -1,9 +1,9 @@ -import type BattleScene from "#app/battle-scene"; -import { LoginPhase } from "#app/phases/login-phase"; -import { TitlePhase } from "#app/phases/title-phase"; -import { UnavailablePhase } from "#app/phases/unavailable-phase"; +import type { BattleScene } from "#app/battle-scene"; import { UiMode } from "#enums/ui-mode"; -import GameManager from "#test/testUtils/gameManager"; +import { LoginPhase } from "#phases/login-phase"; +import { TitlePhase } from "#phases/title-phase"; +import { UnavailablePhase } from "#phases/unavailable-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/phases/select-modifier-phase.test.ts b/test/phases/select-modifier-phase.test.ts index b6c3089e236..565fbe8e439 100644 --- a/test/phases/select-modifier-phase.test.ts +++ b/test/phases/select-modifier-phase.test.ts @@ -1,20 +1,20 @@ -import type BattleScene from "#app/battle-scene"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { PlayerPokemon } from "#app/field/pokemon"; -import { ModifierTier } from "#enums/modifier-tier"; -import type { CustomModifierSettings } from "#app/modifier/modifier-type"; -import { ModifierTypeOption } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; -import { shiftCharCodes } from "#app/utils/common"; +import type { BattleScene } from "#app/battle-scene"; +import { modifierTypes } from "#data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { Button } from "#enums/buttons"; +import { ModifierTier } from "#enums/modifier-tier"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { UiMode } from "#enums/ui-mode"; +import { PlayerPokemon } from "#field/pokemon"; +import type { CustomModifierSettings } from "#modifiers/modifier-type"; +import { ModifierTypeOption } from "#modifiers/modifier-type"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { shiftCharCodes } from "#utils/common"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/plugins/api/pokerogue-account-api.test.ts b/test/plugins/api/pokerogue-account-api.test.ts index 3c37451960a..578b6ba041a 100644 --- a/test/plugins/api/pokerogue-account-api.test.ts +++ b/test/plugins/api/pokerogue-account-api.test.ts @@ -1,13 +1,13 @@ -import type { AccountInfoResponse } from "#app/@types/PokerogueAccountApi"; +import { PokerogueAccountApi } from "#api/pokerogue-account-api"; import { SESSION_ID_COOKIE_NAME } from "#app/constants"; -import { PokerogueAccountApi } from "#app/plugins/api/pokerogue-account-api"; -import { getApiBaseUrl } from "#test/testUtils/testUtils"; -import * as CookieUtils from "#app/utils/cookies"; -import * as cookies from "#app/utils/cookies"; -import { http, HttpResponse } from "msw"; -import { beforeAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; +import type { AccountInfoResponse } from "#types/PokerogueAccountApi"; +import * as CookieUtils from "#utils/cookies"; +import * as cookies from "#utils/cookies"; +import { HttpResponse, http } from "msw"; import type { SetupServerApi } from "msw/node"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const apiBase = getApiBaseUrl(); const accountApi = new PokerogueAccountApi(apiBase); diff --git a/test/plugins/api/pokerogue-admin-api.test.ts b/test/plugins/api/pokerogue-admin-api.test.ts index 08c4cf0dc45..e36f45801b6 100644 --- a/test/plugins/api/pokerogue-admin-api.test.ts +++ b/test/plugins/api/pokerogue-admin-api.test.ts @@ -1,3 +1,6 @@ +import { PokerogueAdminApi } from "#api/pokerogue-admin-api"; +import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import type { LinkAccountToDiscordIdRequest, LinkAccountToGoogledIdRequest, @@ -5,13 +8,10 @@ import type { SearchAccountResponse, UnlinkAccountFromDiscordIdRequest, UnlinkAccountFromGoogledIdRequest, -} from "#app/@types/PokerogueAdminApi"; -import { PokerogueAdminApi } from "#app/plugins/api/pokerogue-admin-api"; -import { getApiBaseUrl } from "#test/testUtils/testUtils"; -import { http, HttpResponse } from "msw"; -import { beforeAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +} from "#types/PokerogueAdminApi"; +import { HttpResponse, http } from "msw"; import type { SetupServerApi } from "msw/node"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const apiBase = getApiBaseUrl(); const adminApi = new PokerogueAdminApi(apiBase); diff --git a/test/plugins/api/pokerogue-api.test.ts b/test/plugins/api/pokerogue-api.test.ts index c53a38e23ab..b9ebbe0f685 100644 --- a/test/plugins/api/pokerogue-api.test.ts +++ b/test/plugins/api/pokerogue-api.test.ts @@ -1,10 +1,10 @@ -import type { TitleStatsResponse } from "#app/@types/PokerogueApi"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { getApiBaseUrl } from "#test/testUtils/testUtils"; -import { http, HttpResponse } from "msw"; -import { beforeAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { pokerogueApi } from "#api/pokerogue-api"; import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; +import type { TitleStatsResponse } from "#types/PokerogueApi"; +import { HttpResponse, http } from "msw"; import type { SetupServerApi } from "msw/node"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const apiBase = getApiBaseUrl(); let server: SetupServerApi; diff --git a/test/plugins/api/pokerogue-daily-api.test.ts b/test/plugins/api/pokerogue-daily-api.test.ts index 563e6d09009..6399c80781e 100644 --- a/test/plugins/api/pokerogue-daily-api.test.ts +++ b/test/plugins/api/pokerogue-daily-api.test.ts @@ -1,11 +1,11 @@ -import type { GetDailyRankingsPageCountRequest, GetDailyRankingsRequest } from "#app/@types/PokerogueDailyApi"; -import { PokerogueDailyApi } from "#app/plugins/api/pokerogue-daily-api"; -import { getApiBaseUrl } from "#test/testUtils/testUtils"; -import { ScoreboardCategory, type RankingEntry } from "#app/ui/daily-run-scoreboard"; -import { http, HttpResponse } from "msw"; -import { beforeAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { PokerogueDailyApi } from "#api/pokerogue-daily-api"; import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; +import type { GetDailyRankingsPageCountRequest, GetDailyRankingsRequest } from "#types/PokerogueDailyApi"; +import { type RankingEntry, ScoreboardCategory } from "#ui/daily-run-scoreboard"; +import { HttpResponse, http } from "msw"; import type { SetupServerApi } from "msw/node"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const apiBase = getApiBaseUrl(); const dailyApi = new PokerogueDailyApi(apiBase); diff --git a/test/plugins/api/pokerogue-savedata-api.test.ts b/test/plugins/api/pokerogue-savedata-api.test.ts index 481ba62c19d..d465759bdfc 100644 --- a/test/plugins/api/pokerogue-savedata-api.test.ts +++ b/test/plugins/api/pokerogue-savedata-api.test.ts @@ -1,10 +1,10 @@ -import type { UpdateAllSavedataRequest } from "#app/@types/PokerogueSavedataApi"; -import { PokerogueSavedataApi } from "#app/plugins/api/pokerogue-savedata-api"; -import { getApiBaseUrl } from "#test/testUtils/testUtils"; -import { http, HttpResponse } from "msw"; -import { beforeAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { PokerogueSavedataApi } from "#api/pokerogue-savedata-api"; import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; +import type { UpdateAllSavedataRequest } from "#types/PokerogueSavedataApi"; +import { HttpResponse, http } from "msw"; import type { SetupServerApi } from "msw/node"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const apiBase = getApiBaseUrl(); const savedataApi = new PokerogueSavedataApi(apiBase); diff --git a/test/plugins/api/pokerogue-session-savedata-api.test.ts b/test/plugins/api/pokerogue-session-savedata-api.test.ts index 4d4774f2283..e95697ab72e 100644 --- a/test/plugins/api/pokerogue-session-savedata-api.test.ts +++ b/test/plugins/api/pokerogue-session-savedata-api.test.ts @@ -1,3 +1,7 @@ +import { PokerogueSessionSavedataApi } from "#api/pokerogue-session-savedata-api"; +import type { SessionSaveData } from "#system/game-data"; +import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import type { ClearSessionSavedataRequest, ClearSessionSavedataResponse, @@ -5,14 +9,10 @@ import type { GetSessionSavedataRequest, NewClearSessionSavedataRequest, UpdateSessionSavedataRequest, -} from "#app/@types/PokerogueSessionSavedataApi"; -import { PokerogueSessionSavedataApi } from "#app/plugins/api/pokerogue-session-savedata-api"; -import type { SessionSaveData } from "#app/system/game-data"; -import { getApiBaseUrl } from "#test/testUtils/testUtils"; -import { http, HttpResponse } from "msw"; -import { beforeAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +} from "#types/PokerogueSessionSavedataApi"; +import { HttpResponse, http } from "msw"; import type { SetupServerApi } from "msw/node"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const apiBase = getApiBaseUrl(); const sessionSavedataApi = new PokerogueSessionSavedataApi(apiBase); diff --git a/test/plugins/api/pokerogue-system-savedata-api.test.ts b/test/plugins/api/pokerogue-system-savedata-api.test.ts index 0c69ab8f922..0bec6dae16b 100644 --- a/test/plugins/api/pokerogue-system-savedata-api.test.ts +++ b/test/plugins/api/pokerogue-system-savedata-api.test.ts @@ -1,16 +1,16 @@ +import { PokerogueSystemSavedataApi } from "#api/pokerogue-system-savedata-api"; +import type { SystemSaveData } from "#system/game-data"; +import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import type { GetSystemSavedataRequest, UpdateSystemSavedataRequest, VerifySystemSavedataRequest, VerifySystemSavedataResponse, -} from "#app/@types/PokerogueSystemSavedataApi"; -import { PokerogueSystemSavedataApi } from "#app/plugins/api/pokerogue-system-savedata-api"; -import type { SystemSaveData } from "#app/system/game-data"; -import { initServerForApiTests } from "#test/testUtils/testFileInitialization"; -import { getApiBaseUrl } from "#test/testUtils/testUtils"; -import { http, HttpResponse } from "msw"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +} from "#types/PokerogueSystemSavedataApi"; +import { HttpResponse, http } from "msw"; import type { SetupServerApi } from "msw/node"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const apiBase = getApiBaseUrl(); const systemSavedataApi = new PokerogueSystemSavedataApi(getApiBaseUrl()); diff --git a/test/reload.test.ts b/test/reload.test.ts index 8e39df23f47..a1cdfcb392a 100644 --- a/test/reload.test.ts +++ b/test/reload.test.ts @@ -1,13 +1,13 @@ -import { GameModes } from "#enums/game-modes"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import type OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; +import { pokerogueApi } from "#api/pokerogue-api"; import { BiomeId } from "#enums/biome-id"; import { Button } from "#enums/buttons"; +import { GameModes } from "#enums/game-modes"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { UiMode } from "#enums/ui-mode"; +import { GameManager } from "#test/testUtils/gameManager"; import type { MockClock } from "#test/testUtils/mocks/mockClock"; +import type { OptionSelectUiHandler } from "#ui/option-select-ui-handler"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Reload", () => { diff --git a/test/settingMenu/helpers/inGameManip.ts b/test/settingMenu/helpers/inGameManip.ts index ca1fac3bc65..c19c6745300 100644 --- a/test/settingMenu/helpers/inGameManip.ts +++ b/test/settingMenu/helpers/inGameManip.ts @@ -1,5 +1,5 @@ -import { getIconForLatestInput, getSettingNameWithKeycode } from "#app/configs/inputs/configHandler"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; +import { getIconForLatestInput, getSettingNameWithKeycode } from "#inputs/configHandler"; +import { SettingKeyboard } from "#system/settings-keyboard"; import { expect } from "vitest"; export class InGameManip { diff --git a/test/settingMenu/helpers/menuManip.ts b/test/settingMenu/helpers/menuManip.ts index 1ddd842c864..37c0f823559 100644 --- a/test/settingMenu/helpers/menuManip.ts +++ b/test/settingMenu/helpers/menuManip.ts @@ -9,8 +9,8 @@ import { getKeyWithKeycode, getKeyWithSettingName, getSettingNameWithKeycode, -} from "#app/configs/inputs/configHandler"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; +} from "#inputs/configHandler"; +import { SettingKeyboard } from "#system/settings-keyboard"; import { expect } from "vitest"; export class MenuManip { diff --git a/test/settingMenu/rebinding_setting.test.ts b/test/settingMenu/rebinding_setting.test.ts index 20a1fe51484..b738861c1ee 100644 --- a/test/settingMenu/rebinding_setting.test.ts +++ b/test/settingMenu/rebinding_setting.test.ts @@ -1,12 +1,12 @@ -import cfg_keyboard_qwerty from "#app/configs/inputs/cfg_keyboard_qwerty"; -import { getKeyWithKeycode, getKeyWithSettingName } from "#app/configs/inputs/configHandler"; import type { InterfaceConfig } from "#app/inputs-controller"; -import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { deepCopy } from "#app/utils/data"; import { Button } from "#enums/buttons"; import { Device } from "#enums/devices"; +import cfg_keyboard_qwerty from "#inputs/cfg_keyboard_qwerty"; +import { getKeyWithKeycode, getKeyWithSettingName } from "#inputs/configHandler"; +import { SettingKeyboard } from "#system/settings-keyboard"; import { InGameManip } from "#test/settingMenu/helpers/inGameManip"; import { MenuManip } from "#test/settingMenu/helpers/menuManip"; +import { deepCopy } from "#utils/data"; import { beforeEach, describe, expect, it } from "vitest"; describe("Test Rebinding", () => { diff --git a/test/sprites/pokemonSprite.test.ts b/test/sprites/pokemonSprite.test.ts index be188503b1e..019dc51a8e2 100644 --- a/test/sprites/pokemonSprite.test.ts +++ b/test/sprites/pokemonSprite.test.ts @@ -2,8 +2,8 @@ import { getAppRootDir } from "#test/sprites/spritesUtils"; import fs from "fs"; import path from "path"; import { beforeAll, describe, expect, it } from "vitest"; -import _masterlist from "../../public/images/pokemon/variant/_masterlist.json"; import _exp_masterlist from "../../public/images/pokemon/variant/_exp_masterlist.json"; +import _masterlist from "../../public/images/pokemon/variant/_masterlist.json"; type PokemonVariantMasterlist = typeof _masterlist; type PokemonExpVariantMasterlist = typeof _exp_masterlist; diff --git a/test/system/game_data.test.ts b/test/system/game_data.test.ts index b9011cd934f..5daed0b2f1b 100644 --- a/test/system/game_data.test.ts +++ b/test/system/game_data.test.ts @@ -1,12 +1,12 @@ +import { pokerogueApi } from "#api/pokerogue-api"; +import * as account from "#app/account"; import * as bypassLoginModule from "#app/global-vars/bypass-login"; -import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import type { SessionSaveData } from "#app/system/game-data"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import type { SessionSaveData } from "#system/game-data"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as account from "#app/account"; describe("System - Game Data", () => { let phaserGame: Phaser.Game; diff --git a/test/testUtils/TextInterceptor.ts b/test/testUtils/TextInterceptor.ts index 4aaed458e44..36a5db4c78d 100644 --- a/test/testUtils/TextInterceptor.ts +++ b/test/testUtils/TextInterceptor.ts @@ -1,7 +1,7 @@ /** * Class will intercept any text or dialogue message calls and log them for test purposes */ -export default class TextInterceptor { +export class TextInterceptor { private scene; public logs: string[] = []; constructor(scene) { diff --git a/test/testUtils/errorInterceptor.ts b/test/testUtils/errorInterceptor.ts index a8fb3284b78..c253561a71c 100644 --- a/test/testUtils/errorInterceptor.ts +++ b/test/testUtils/errorInterceptor.ts @@ -1,4 +1,4 @@ -export default class ErrorInterceptor { +export class ErrorInterceptor { private static instance: ErrorInterceptor; public running; diff --git a/test/testUtils/gameManager.ts b/test/testUtils/gameManager.ts index 91f9096f3d4..b6d0da49902 100644 --- a/test/testUtils/gameManager.ts +++ b/test/testUtils/gameManager.ts @@ -1,45 +1,38 @@ import { updateUserInfo } from "#app/account"; -import { BattlerIndex } from "#enums/battler-index"; -import BattleScene from "#app/battle-scene"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; -import Trainer from "#app/field/trainer"; +import { BattleScene } from "#app/battle-scene"; import { getGameMode } from "#app/game-mode"; -import { GameModes } from "#enums/game-modes"; import { globalScene } from "#app/global-scene"; -import { ModifierTypeOption } from "#app/modifier/modifier-type"; -import { modifierTypes } from "#app/data/data-lists"; import overrides from "#app/overrides"; -import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; -import { CommandPhase } from "#app/phases/command-phase"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { LoginPhase } from "#app/phases/login-phase"; -import { MovePhase } from "#app/phases/move-phase"; -import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; -import { NewBattlePhase } from "#app/phases/new-battle-phase"; -import { SelectStarterPhase } from "#app/phases/select-starter-phase"; -import type { SelectTargetPhase } from "#app/phases/select-target-phase"; -import { TitlePhase } from "#app/phases/title-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; -import type BallUiHandler from "#app/ui/ball-ui-handler"; -import type BattleMessageUiHandler from "#app/ui/battle-message-ui-handler"; -import type CommandUiHandler from "#app/ui/command-ui-handler"; -import type ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import type PartyUiHandler from "#app/ui/party-ui-handler"; -import type StarterSelectUiHandler from "#app/ui/starter-select-ui-handler"; -import type TargetSelectUiHandler from "#app/ui/target-select-ui-handler"; -import { isNullOrUndefined } from "#app/utils/common"; +import { modifierTypes } from "#data/data-lists"; +import { BattlerIndex } from "#enums/battler-index"; import { Button } from "#enums/buttons"; import { ExpGainsSpeed } from "#enums/exp-gains-speed"; import { ExpNotification } from "#enums/exp-notification"; +import { GameModes } from "#enums/game-modes"; import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PlayerGender } from "#enums/player-gender"; +import type { PokeballType } from "#enums/pokeball"; import type { SpeciesId } from "#enums/species-id"; import { UiMode } from "#enums/ui-mode"; -import ErrorInterceptor from "#test/testUtils/errorInterceptor"; +import type { EnemyPokemon, PlayerPokemon } from "#field/pokemon"; +import { Trainer } from "#field/trainer"; +import { ModifierTypeOption } from "#modifiers/modifier-type"; +import { CheckSwitchPhase } from "#phases/check-switch-phase"; +import { CommandPhase } from "#phases/command-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { LoginPhase } from "#phases/login-phase"; +import { MovePhase } from "#phases/move-phase"; +import { MysteryEncounterPhase } from "#phases/mystery-encounter-phases"; +import { NewBattlePhase } from "#phases/new-battle-phase"; +import { SelectStarterPhase } from "#phases/select-starter-phase"; +import type { SelectTargetPhase } from "#phases/select-target-phase"; +import { TitlePhase } from "#phases/title-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { ErrorInterceptor } from "#test/testUtils/errorInterceptor"; import { generateStarter, waitUntil } from "#test/testUtils/gameManagerUtils"; -import GameWrapper from "#test/testUtils/gameWrapper"; +import { GameWrapper } from "#test/testUtils/gameWrapper"; import { ChallengeModeHelper } from "#test/testUtils/helpers/challengeModeHelper"; import { ClassicModeHelper } from "#test/testUtils/helpers/classicModeHelper"; import { DailyModeHelper } from "#test/testUtils/helpers/dailyModeHelper"; @@ -49,18 +42,26 @@ import { MoveHelper } from "#test/testUtils/helpers/moveHelper"; import { OverridesHelper } from "#test/testUtils/helpers/overridesHelper"; import { ReloadHelper } from "#test/testUtils/helpers/reloadHelper"; import { SettingsHelper } from "#test/testUtils/helpers/settingsHelper"; -import type InputsHandler from "#test/testUtils/inputsHandler"; +import type { InputsHandler } from "#test/testUtils/inputsHandler"; import { MockFetch } from "#test/testUtils/mocks/mockFetch"; -import PhaseInterceptor from "#test/testUtils/phaseInterceptor"; -import TextInterceptor from "#test/testUtils/TextInterceptor"; -import { AES, enc } from "crypto-js"; +import { PhaseInterceptor } from "#test/testUtils/phaseInterceptor"; +import { TextInterceptor } from "#test/testUtils/TextInterceptor"; +import type { BallUiHandler } from "#ui/ball-ui-handler"; +import type { BattleMessageUiHandler } from "#ui/battle-message-ui-handler"; +import type { CommandUiHandler } from "#ui/command-ui-handler"; +import type { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import type { PartyUiHandler } from "#ui/party-ui-handler"; +import type { StarterSelectUiHandler } from "#ui/starter-select-ui-handler"; +import type { TargetSelectUiHandler } from "#ui/target-select-ui-handler"; +import { isNullOrUndefined } from "#utils/common"; import fs from "node:fs"; +import { AES, enc } from "crypto-js"; import { expect, vi } from "vitest"; /** * Class to manage the game state and transitions between phases. */ -export default class GameManager { +export class GameManager { public gameWrapper: GameWrapper; public scene: BattleScene; public phaseInterceptor: PhaseInterceptor; @@ -204,7 +205,6 @@ export default class GameManager { * @param mode - The {@linkcode GameModes} to spawn the final boss encounter in. */ async runToFinalBossEncounter(species: SpeciesId[], mode: GameModes) { - console.log("===to final boss encounter==="); await this.runToTitle(); this.onNextPrompt("TitlePhase", UiMode.TITLE, () => { @@ -222,8 +222,8 @@ export default class GameManager { this.removeEnemyHeldItems(); } - await this.phaseInterceptor.to(EncounterPhase); - console.log("===finished run to final boss encounter==="); + await this.phaseInterceptor.to("CommandPhase", false); + console.log("==================[Final Boss Encounter]=================="); } /** @@ -507,9 +507,9 @@ export default class GameManager { /** * Select the BALL option from the command menu, then press Action; in the BALL * menu, select a pokéball type and press Action again to throw it. - * @param ballIndex - The index of the pokeball to throw + * @param ballIndex - The {@linkcode PokeballType} to throw */ - public doThrowPokeball(ballIndex: number) { + public doThrowPokeball(ballIndex: PokeballType) { this.onNextPrompt("CommandPhase", UiMode.COMMAND, () => { (this.scene.ui.getHandler() as CommandUiHandler).setCursor(1); (this.scene.ui.getHandler() as CommandUiHandler).processInput(Button.ACTION); diff --git a/test/testUtils/gameManagerUtils.ts b/test/testUtils/gameManagerUtils.ts index 2e1714c90ad..db758cfe64d 100644 --- a/test/testUtils/gameManagerUtils.ts +++ b/test/testUtils/gameManagerUtils.ts @@ -1,17 +1,17 @@ -import Battle from "#app/battle"; -import { BattleType } from "#enums/battle-type"; -import type BattleScene from "#app/battle-scene"; -import { getDailyRunStarters } from "#app/data/daily-run"; -import { Gender } from "#app/data/gender"; -import { getPokemonSpeciesForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { PlayerPokemon } from "#app/field/pokemon"; +import { Battle } from "#app/battle"; +import type { BattleScene } from "#app/battle-scene"; import { getGameMode } from "#app/game-mode"; +import { getDailyRunStarters } from "#data/daily-run"; +import { Gender } from "#data/gender"; +import { getPokemonSpeciesForm } from "#data/pokemon-species"; +import { BattleType } from "#enums/battle-type"; import { GameModes } from "#enums/game-modes"; -import type { StarterMoveset } from "#app/system/game-data"; -import type { Starter } from "#app/ui/starter-select-ui-handler"; import type { MoveId } from "#enums/move-id"; import type { SpeciesId } from "#enums/species-id"; +import { PlayerPokemon } from "#field/pokemon"; +import type { StarterMoveset } from "#system/game-data"; +import type { Starter } from "#ui/starter-select-ui-handler"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; /** Function to convert Blob to string */ export function blobToString(blob) { diff --git a/test/testUtils/gameWrapper.ts b/test/testUtils/gameWrapper.ts index 7b5d564de2e..b9665ffe071 100644 --- a/test/testUtils/gameWrapper.ts +++ b/test/testUtils/gameWrapper.ts @@ -1,30 +1,32 @@ // @ts-nocheck - TODO: remove this -import BattleScene from "#app/battle-scene"; -import { MoveAnim } from "#app/data/battle-anims"; -import Pokemon from "#app/field/pokemon"; -import { sessionIdKey } from "#app/utils/common"; -import { setCookie } from "#app/utils/cookies"; + +import { BattleScene } from "#app/battle-scene"; +// biome-ignore lint/performance/noNamespaceImport: Necessary in order to mock the var +import * as bypassLoginModule from "#app/global-vars/bypass-login"; +import { MoveAnim } from "#data/battle-anims"; +import { Pokemon } from "#field/pokemon"; +import { version } from "#package.json"; import { blobToString } from "#test/testUtils/gameManagerUtils"; import { MockClock } from "#test/testUtils/mocks/mockClock"; import { MockFetch } from "#test/testUtils/mocks/mockFetch"; -import MockLoader from "#test/testUtils/mocks/mockLoader"; -import MockTextureManager from "#test/testUtils/mocks/mockTextureManager"; +import { MockGameObjectCreator } from "#test/testUtils/mocks/mockGameObjectCreator"; +import { MockLoader } from "#test/testUtils/mocks/mockLoader"; +import { MockContainer } from "#test/testUtils/mocks/mocksContainer/mockContainer"; +import { MockTextureManager } from "#test/testUtils/mocks/mockTextureManager"; +import { MockTimedEventManager } from "#test/testUtils/mocks/mockTimedEventManager"; +import { PokedexMonContainer } from "#ui/pokedex-mon-container"; +import { sessionIdKey } from "#utils/common"; +import { setCookie } from "#utils/cookies"; import fs from "node:fs"; import Phaser from "phaser"; import { vi } from "vitest"; -import { version } from "../../package.json"; -import { MockGameObjectCreator } from "./mocks/mockGameObjectCreator"; -import { MockTimedEventManager } from "./mocks/mockTimedEventManager"; -import { PokedexMonContainer } from "#app/ui/pokedex-mon-container"; -import MockContainer from "./mocks/mocksContainer/mockContainer"; -import InputManager = Phaser.Input.InputManager; -import KeyboardManager = Phaser.Input.Keyboard.KeyboardManager; -import KeyboardPlugin = Phaser.Input.Keyboard.KeyboardPlugin; -import GamepadPlugin = Phaser.Input.Gamepad.GamepadPlugin; -import EventEmitter = Phaser.Events.EventEmitter; -import UpdateList = Phaser.GameObjects.UpdateList; -// biome-ignore lint/performance/noNamespaceImport: Necessary in order to mock the var -import * as bypassLoginModule from "#app/global-vars/bypass-login"; + +const InputManager = Phaser.Input.InputManager; +const KeyboardManager = Phaser.Input.Keyboard.KeyboardManager; +const KeyboardPlugin = Phaser.Input.Keyboard.KeyboardPlugin; +const GamepadPlugin = Phaser.Input.Gamepad.GamepadPlugin; +const EventEmitter = Phaser.Events.EventEmitter; +const UpdateList = Phaser.GameObjects.UpdateList; window.URL.createObjectURL = (blob: Blob) => { blobToString(blob).then((data: string) => { @@ -40,7 +42,7 @@ window.matchMedia = () => ({ matches: false, }); -export default class GameWrapper { +export class GameWrapper { public game: Phaser.Game; public scene: BattleScene; diff --git a/test/testUtils/helpers/challengeModeHelper.ts b/test/testUtils/helpers/challengeModeHelper.ts index f0b4b151d22..31b7c062d99 100644 --- a/test/testUtils/helpers/challengeModeHelper.ts +++ b/test/testUtils/helpers/challengeModeHelper.ts @@ -1,15 +1,15 @@ -import { BattleStyle } from "#app/enums/battle-style"; -import type { SpeciesId } from "#enums/species-id"; import overrides from "#app/overrides"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { SelectStarterPhase } from "#app/phases/select-starter-phase"; -import { UiMode } from "#enums/ui-mode"; -import { generateStarter } from "../gameManagerUtils"; -import { GameManagerHelper } from "./gameManagerHelper"; -import type { Challenge } from "#app/data/challenge"; -import { CommandPhase } from "#app/phases/command-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import type { Challenge } from "#data/challenge"; +import { BattleStyle } from "#enums/battle-style"; import type { Challenges } from "#enums/challenges"; +import type { SpeciesId } from "#enums/species-id"; +import { UiMode } from "#enums/ui-mode"; +import { CommandPhase } from "#phases/command-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { SelectStarterPhase } from "#phases/select-starter-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { generateStarter } from "#test/testUtils/gameManagerUtils"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; import { copyChallenge } from "data/challenge"; /** diff --git a/test/testUtils/helpers/classicModeHelper.ts b/test/testUtils/helpers/classicModeHelper.ts index 24c4a97e9bf..55b25623b5a 100644 --- a/test/testUtils/helpers/classicModeHelper.ts +++ b/test/testUtils/helpers/classicModeHelper.ts @@ -1,14 +1,14 @@ -import { BattleStyle } from "#app/enums/battle-style"; import { getGameMode } from "#app/game-mode"; import overrides from "#app/overrides"; -import { CommandPhase } from "#app/phases/command-phase"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { SelectStarterPhase } from "#app/phases/select-starter-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; +import { BattleStyle } from "#enums/battle-style"; import { GameModes } from "#enums/game-modes"; import { Nature } from "#enums/nature"; import type { SpeciesId } from "#enums/species-id"; import { UiMode } from "#enums/ui-mode"; +import { CommandPhase } from "#phases/command-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { SelectStarterPhase } from "#phases/select-starter-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; import { generateStarter } from "#test/testUtils/gameManagerUtils"; import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; diff --git a/test/testUtils/helpers/dailyModeHelper.ts b/test/testUtils/helpers/dailyModeHelper.ts index 4672d4dc787..214b6e4c5a4 100644 --- a/test/testUtils/helpers/dailyModeHelper.ts +++ b/test/testUtils/helpers/dailyModeHelper.ts @@ -1,13 +1,13 @@ -import { BattleStyle } from "#app/enums/battle-style"; -import { Button } from "#app/enums/buttons"; import overrides from "#app/overrides"; -import { CommandPhase } from "#app/phases/command-phase"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { TitlePhase } from "#app/phases/title-phase"; -import { TurnInitPhase } from "#app/phases/turn-init-phase"; -import type SaveSlotSelectUiHandler from "#app/ui/save-slot-select-ui-handler"; +import { BattleStyle } from "#enums/battle-style"; +import { Button } from "#enums/buttons"; import { UiMode } from "#enums/ui-mode"; -import { GameManagerHelper } from "./gameManagerHelper"; +import { CommandPhase } from "#phases/command-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { TitlePhase } from "#phases/title-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; +import type { SaveSlotSelectUiHandler } from "#ui/save-slot-select-ui-handler"; /** * Helper to handle daily mode specifics diff --git a/test/testUtils/helpers/field-helper.ts b/test/testUtils/helpers/field-helper.ts index 25cdde08dbe..ca106804b85 100644 --- a/test/testUtils/helpers/field-helper.ts +++ b/test/testUtils/helpers/field-helper.ts @@ -1,16 +1,14 @@ -// -- start tsdoc imports -- -// biome-ignore lint/correctness/noUnusedImports: TSDoc import +/* biome-ignore-start lint/correctness/noUnusedImports: tsdoc imports */ import type { globalScene } from "#app/global-scene"; -// -- end tsdoc imports -- +/* biome-ignore-end lint/correctness/noUnusedImports: tsdoc imports */ -import type { BattlerIndex } from "#enums/battler-index"; -import type { Ability } from "#app/data/abilities/ability"; -import { allAbilities } from "#app/data/data-lists"; -import type Pokemon from "#app/field/pokemon"; -import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; +import type { Ability } from "#abilities/ability"; +import { allAbilities } from "#data/data-lists"; import type { AbilityId } from "#enums/ability-id"; +import type { BattlerIndex } from "#enums/battler-index"; import type { PokemonType } from "#enums/pokemon-type"; import { Stat } from "#enums/stat"; +import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon"; import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; import { expect, type MockInstance, vi } from "vitest"; diff --git a/test/testUtils/helpers/gameManagerHelper.ts b/test/testUtils/helpers/gameManagerHelper.ts index 85d7bc0df97..6db3819a5cb 100644 --- a/test/testUtils/helpers/gameManagerHelper.ts +++ b/test/testUtils/helpers/gameManagerHelper.ts @@ -1,4 +1,4 @@ -import type GameManager from "../gameManager"; +import type { GameManager } from "#test/testUtils/gameManager"; /** * Base class for defining all game helpers. diff --git a/test/testUtils/helpers/modifiersHelper.ts b/test/testUtils/helpers/modifiersHelper.ts index 22500c87906..ff6e78c8a2f 100644 --- a/test/testUtils/helpers/modifiersHelper.ts +++ b/test/testUtils/helpers/modifiersHelper.ts @@ -1,7 +1,7 @@ +import type { ModifierTypeKeys } from "#modifiers/modifier-type"; +import { itemPoolChecks } from "#modifiers/modifier-type"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; import { expect } from "vitest"; -import { GameManagerHelper } from "./gameManagerHelper"; -import type { ModifierTypeKeys } from "#app/modifier/modifier-type"; -import { itemPoolChecks } from "#app/modifier/modifier-type"; export class ModifierHelper extends GameManagerHelper { /** diff --git a/test/testUtils/helpers/moveHelper.ts b/test/testUtils/helpers/moveHelper.ts index 5ac5877a54a..98a1c1664b4 100644 --- a/test/testUtils/helpers/moveHelper.ts +++ b/test/testUtils/helpers/moveHelper.ts @@ -1,18 +1,20 @@ -import { BattlerIndex } from "#enums/battler-index"; -import { getMoveTargets } from "#app/data/moves/move-utils"; -import type Pokemon from "#app/field/pokemon"; -import { PokemonMove } from "#app/data/moves/pokemon-move"; import Overrides from "#app/overrides"; -import type { CommandPhase } from "#app/phases/command-phase"; -import type { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { allMoves } from "#data/data-lists"; +import { BattlerIndex } from "#enums/battler-index"; import { Command } from "#enums/command"; import { MoveId } from "#enums/move-id"; -import { UiMode } from "#enums/ui-mode"; -import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; -import { expect, vi } from "vitest"; -import { coerceArray, toReadableString } from "#app/utils/common"; import { MoveUseMode } from "#enums/move-use-mode"; +import { UiMode } from "#enums/ui-mode"; +import type { Pokemon } from "#field/pokemon"; +import { getMoveTargets } from "#moves/move-utils"; +import { PokemonMove } from "#moves/pokemon-move"; +import type { CommandPhase } from "#phases/command-phase"; +import type { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; +import { coerceArray, toReadableString } from "#utils/common"; +import type { MockInstance } from "vitest"; +import { expect, vi } from "vitest"; /** * Helper to handle using a Pokemon's moves. @@ -305,4 +307,20 @@ export class MoveHelper extends GameManagerHelper { */ await this.game.phaseInterceptor.to("EnemyCommandPhase"); } + + /** + * Force the move used by Metronome to be a specific move. + * @param move - The move to force metronome to use + * @param once - If `true`, uses {@linkcode MockInstance#mockReturnValueOnce} when mocking, else uses {@linkcode MockInstance#mockReturnValue}. + * @returns The spy that for Metronome that was mocked (Usually unneeded). + */ + public forceMetronomeMove(move: MoveId, once = false): MockInstance { + const spy = vi.spyOn(allMoves[MoveId.METRONOME].getAttrs("RandomMoveAttr")[0], "getMoveOverride"); + if (once) { + spy.mockReturnValueOnce(move); + } else { + spy.mockReturnValue(move); + } + return spy; + } } diff --git a/test/testUtils/helpers/overridesHelper.ts b/test/testUtils/helpers/overridesHelper.ts index 8bf68489479..13e3dcc2f09 100644 --- a/test/testUtils/helpers/overridesHelper.ts +++ b/test/testUtils/helpers/overridesHelper.ts @@ -1,12 +1,9 @@ /** biome-ignore-start lint/correctness/noUnusedImports: tsdoc imports */ -import type { NewArenaEvent } from "#app/events/battle-scene"; +import type { NewArenaEvent } from "#events/battle-scene"; /** biome-ignore-end lint/correctness/noUnusedImports: tsdoc imports */ -import type { ModifierOverride } from "#app/modifier/modifier-type"; import type { BattleStyle, RandomTrainerOverride } from "#app/overrides"; import Overrides, { defaultOverrides } from "#app/overrides"; -import type { Variant } from "#app/sprites/variant"; -import { coerceArray, shiftCharCodes } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; import type { BattleType } from "#enums/battle-type"; import { BiomeId } from "#enums/biome-id"; @@ -18,7 +15,10 @@ import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; import type { Unlockables } from "#enums/unlockables"; import { WeatherType } from "#enums/weather-type"; +import type { ModifierOverride } from "#modifiers/modifier-type"; +import type { Variant } from "#sprites/variant"; import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; +import { coerceArray, shiftCharCodes } from "#utils/common"; import { expect, vi } from "vitest"; /** @@ -228,9 +228,9 @@ export class OverridesHelper extends GameManagerHelper { } /** - * Override the player pokemon's {@linkcode StatusEffect | status-effect} + * Override the player pokemon's initial {@linkcode StatusEffect | status-effect}, * @param statusEffect - The {@linkcode StatusEffect | status-effect} to set - * @returns + * @returns `this` */ public statusEffect(statusEffect: StatusEffect): this { vi.spyOn(Overrides, "STATUS_OVERRIDE", "get").mockReturnValue(statusEffect); @@ -494,9 +494,9 @@ export class OverridesHelper extends GameManagerHelper { } /** - * Override the enemy {@linkcode StatusEffect | status-effect} for enemy pokemon + * Override the enemy pokemon's initial {@linkcode StatusEffect | status-effect}. * @param statusEffect - The {@linkcode StatusEffect | status-effect} to set - * @returns + * @returns `this` */ public enemyStatusEffect(statusEffect: StatusEffect): this { vi.spyOn(Overrides, "OPP_STATUS_OVERRIDE", "get").mockReturnValue(statusEffect); diff --git a/test/testUtils/helpers/reloadHelper.ts b/test/testUtils/helpers/reloadHelper.ts index 4f9d6c810f8..bc8adae6f28 100644 --- a/test/testUtils/helpers/reloadHelper.ts +++ b/test/testUtils/helpers/reloadHelper.ts @@ -1,12 +1,12 @@ -import { GameManagerHelper } from "./gameManagerHelper"; -import { TitlePhase } from "#app/phases/title-phase"; +import { BattleStyle } from "#enums/battle-style"; import { UiMode } from "#enums/ui-mode"; +import { CommandPhase } from "#phases/command-phase"; +import { TitlePhase } from "#phases/title-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import type { SessionSaveData } from "#system/game-data"; +import type { GameManager } from "#test/testUtils/gameManager"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; 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"; -import type { SessionSaveData } from "#app/system/game-data"; -import type GameManager from "../gameManager"; /** * Helper to allow reloading sessions in unit tests. diff --git a/test/testUtils/helpers/settingsHelper.ts b/test/testUtils/helpers/settingsHelper.ts index d5a60e6496a..76db93c7de5 100644 --- a/test/testUtils/helpers/settingsHelper.ts +++ b/test/testUtils/helpers/settingsHelper.ts @@ -1,7 +1,7 @@ -import { PlayerGender } from "#app/enums/player-gender"; -import { BattleStyle } from "#app/enums/battle-style"; -import { GameManagerHelper } from "./gameManagerHelper"; -import { ExpGainsSpeed } from "#app/enums/exp-gains-speed"; +import { BattleStyle } from "#enums/battle-style"; +import { ExpGainsSpeed } from "#enums/exp-gains-speed"; +import { PlayerGender } from "#enums/player-gender"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; /** * Helper to handle settings for tests diff --git a/test/testUtils/inputsHandler.ts b/test/testUtils/inputsHandler.ts index 0d8c43e7616..6a0db37c9b6 100644 --- a/test/testUtils/inputsHandler.ts +++ b/test/testUtils/inputsHandler.ts @@ -1,7 +1,7 @@ -import type BattleScene from "#app/battle-scene"; -import pad_xbox360 from "#app/configs/inputs/pad_xbox360"; +import type { BattleScene } from "#app/battle-scene"; import type { InputsController } from "#app/inputs-controller"; -import TouchControl from "#app/touch-controls"; +import { TouchControl } from "#app/touch-controls"; +import pad_xbox360 from "#inputs/pad_xbox360"; import { holdOn } from "#test/testUtils/gameManagerUtils"; import fs from "node:fs"; import { JSDOM } from "jsdom"; @@ -12,7 +12,7 @@ interface LogEntry { button: any; } -export default class InputsHandler { +export class InputsHandler { private scene: BattleScene; private events: Phaser.Events.EventEmitter; private inputController: InputsController; diff --git a/test/testUtils/mocks/mockClock.ts b/test/testUtils/mocks/mockClock.ts index 67f399ae41d..0d94a62824c 100644 --- a/test/testUtils/mocks/mockClock.ts +++ b/test/testUtils/mocks/mockClock.ts @@ -1,4 +1,6 @@ -import Clock = Phaser.Time.Clock; +import Phaser from "phaser"; + +const Clock = Phaser.Time.Clock; export class MockClock extends Clock { public overrideDelay: number | null = 1; diff --git a/test/testUtils/mocks/mockGameObjectCreator.ts b/test/testUtils/mocks/mockGameObjectCreator.ts index caf98b79a9f..cfb1051ec2f 100644 --- a/test/testUtils/mocks/mockGameObjectCreator.ts +++ b/test/testUtils/mocks/mockGameObjectCreator.ts @@ -1,5 +1,5 @@ -import MockGraphics from "./mocksContainer/mockGraphics"; -import type MockTextureManager from "./mockTextureManager"; +import { MockGraphics } from "#test/testUtils/mocks/mocksContainer/mockGraphics"; +import type { MockTextureManager } from "#test/testUtils/mocks/mockTextureManager"; export class MockGameObjectCreator { private readonly textureManager: MockTextureManager; diff --git a/test/testUtils/mocks/mockLoader.ts b/test/testUtils/mocks/mockLoader.ts index 7452f85a317..7bb3ffe7147 100644 --- a/test/testUtils/mocks/mockLoader.ts +++ b/test/testUtils/mocks/mockLoader.ts @@ -1,6 +1,8 @@ -import CacheManager = Phaser.Cache.CacheManager; +import Phaser from "phaser"; -export default class MockLoader { +const CacheManager = Phaser.Cache.CacheManager; + +export class MockLoader { public cacheManager; constructor(scene) { this.cacheManager = new CacheManager(scene); diff --git a/test/testUtils/mocks/mockTextureManager.ts b/test/testUtils/mocks/mockTextureManager.ts index 585ee0a674a..b61a804bf55 100644 --- a/test/testUtils/mocks/mockTextureManager.ts +++ b/test/testUtils/mocks/mockTextureManager.ts @@ -1,18 +1,20 @@ -import MockContainer from "#test/testUtils/mocks/mocksContainer/mockContainer"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; +import { MockBBCodeText } from "#test/testUtils/mocks/mocksContainer/mock-bbcode-text"; +import { MockInputText } from "#test/testUtils/mocks/mocksContainer/mock-input-text"; +import { MockContainer } from "#test/testUtils/mocks/mocksContainer/mockContainer"; import { MockImage } from "#test/testUtils/mocks/mocksContainer/mockImage"; -import MockNineslice from "#test/testUtils/mocks/mocksContainer/mockNineslice"; -import MockPolygon from "#test/testUtils/mocks/mocksContainer/mockPolygon"; -import MockRectangle from "#test/testUtils/mocks/mocksContainer/mockRectangle"; -import MockSprite from "#test/testUtils/mocks/mocksContainer/mockSprite"; -import MockText from "#test/testUtils/mocks/mocksContainer/mockText"; -import MockTexture from "#test/testUtils/mocks/mocksContainer/mockTexture"; -import type { MockGameObject } from "./mockGameObject"; -import { MockVideoGameObject } from "./mockVideoGameObject"; +import { MockNineslice } from "#test/testUtils/mocks/mocksContainer/mockNineslice"; +import { MockPolygon } from "#test/testUtils/mocks/mocksContainer/mockPolygon"; +import { MockRectangle } from "#test/testUtils/mocks/mocksContainer/mockRectangle"; +import { MockSprite } from "#test/testUtils/mocks/mocksContainer/mockSprite"; +import { MockText } from "#test/testUtils/mocks/mocksContainer/mockText"; +import { MockTexture } from "#test/testUtils/mocks/mocksContainer/mockTexture"; +import { MockVideoGameObject } from "#test/testUtils/mocks/mockVideoGameObject"; /** * Stub class for Phaser.Textures.TextureManager */ -export default class MockTextureManager { +export class MockTextureManager { private textures: Map; private scene; public add; @@ -33,6 +35,8 @@ export default class MockTextureManager { image: this.image.bind(this), polygon: this.polygon.bind(this), text: this.text.bind(this), + rexBBCodeText: this.rexBBCodeText.bind(this), + rexInputText: this.rexInputText.bind(this), bitmapText: this.text.bind(this), displayList: this.displayList, video: () => new MockVideoGameObject(), @@ -103,9 +107,25 @@ export default class MockTextureManager { return text; } + rexBBCodeText(x, y, content, styleOptions) { + const text = new MockBBCodeText(this, x, y, content, styleOptions); + this.list.push(text); + return text; + } + + rexInputText(x, y, w, h, content, styleOptions) { + const text = new MockInputText(this, x, y, w, h, content, styleOptions); + this.list.push(text); + return text; + } + polygon(x, y, content, fillColor, fillAlpha) { const polygon = new MockPolygon(this, x, y, content, fillColor, fillAlpha); this.list.push(polygon); return polygon; } + + exists(key: string): boolean { + return this.textures.has(key); + } } diff --git a/test/testUtils/mocks/mockTimedEventManager.ts b/test/testUtils/mocks/mockTimedEventManager.ts index 10f32fd4c8b..b6c84876783 100644 --- a/test/testUtils/mocks/mockTimedEventManager.ts +++ b/test/testUtils/mocks/mockTimedEventManager.ts @@ -1,5 +1,5 @@ -import { CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER } from "#app/data/balance/starters"; import { TimedEventManager } from "#app/timed-event-manager"; +import { CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER } from "#balance/starters"; /** Mock TimedEventManager so that ongoing events don't impact tests */ export class MockTimedEventManager extends TimedEventManager { diff --git a/test/testUtils/mocks/mockVideoGameObject.ts b/test/testUtils/mocks/mockVideoGameObject.ts index 9b25877c80c..40413f6f622 100644 --- a/test/testUtils/mocks/mockVideoGameObject.ts +++ b/test/testUtils/mocks/mockVideoGameObject.ts @@ -1,4 +1,4 @@ -import type { MockGameObject } from "./mockGameObject"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; /** Mocks video-related stuff */ export class MockVideoGameObject implements MockGameObject { diff --git a/test/testUtils/mocks/mocksContainer/mock-bbcode-text.ts b/test/testUtils/mocks/mocksContainer/mock-bbcode-text.ts new file mode 100644 index 00000000000..8df0e01a43e --- /dev/null +++ b/test/testUtils/mocks/mocksContainer/mock-bbcode-text.ts @@ -0,0 +1,6 @@ +import { MockText } from "#test/testUtils/mocks/mocksContainer/mockText"; + +export class MockBBCodeText extends MockText { + setMaxLines(_lines: number) {} + setWrapMode(_mode: 0 | 1 | 2 | 3 | "none" | "word" | "char" | "character" | "mix") {} +} diff --git a/test/testUtils/mocks/mocksContainer/mock-input-text.ts b/test/testUtils/mocks/mocksContainer/mock-input-text.ts new file mode 100644 index 00000000000..6826278aa1e --- /dev/null +++ b/test/testUtils/mocks/mocksContainer/mock-input-text.ts @@ -0,0 +1,24 @@ +import { MockText } from "#test/testUtils/mocks/mocksContainer/mockText"; + +export class MockInputText extends MockText { + public inputType: string; + public selectionStart: number; + public selectionEnd: number; + public selectedText: string; + + constructor(textureManager, x, y, _w, _h, content, styleOptions) { + super(textureManager, x, y, content, styleOptions); + } + + selectText(_selectionStart?: number, _selectionEnd?: number) {} + + selectAll() {} + + setCursorPosition(_value: number) {} + + scrollToBottom() {} + + resize(_width: number, _height: number) {} + + setElement(_element, _style, _innerText) {} +} diff --git a/test/testUtils/mocks/mocksContainer/mockContainer.ts b/test/testUtils/mocks/mocksContainer/mockContainer.ts index d31165bb847..df9aaab5888 100644 --- a/test/testUtils/mocks/mocksContainer/mockContainer.ts +++ b/test/testUtils/mocks/mocksContainer/mockContainer.ts @@ -1,8 +1,8 @@ -import { coerceArray } from "#app/utils/common"; -import type MockTextureManager from "#test/testUtils/mocks/mockTextureManager"; -import type { MockGameObject } from "../mockGameObject"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; +import type { MockTextureManager } from "#test/testUtils/mocks/mockTextureManager"; +import { coerceArray } from "#utils/common"; -export default class MockContainer implements MockGameObject { +export class MockContainer implements MockGameObject { protected x: number; protected y: number; protected scene; diff --git a/test/testUtils/mocks/mocksContainer/mockGraphics.ts b/test/testUtils/mocks/mocksContainer/mockGraphics.ts index cd43bb3a877..6558cdf9fb1 100644 --- a/test/testUtils/mocks/mocksContainer/mockGraphics.ts +++ b/test/testUtils/mocks/mocksContainer/mockGraphics.ts @@ -1,6 +1,6 @@ -import type { MockGameObject } from "../mockGameObject"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; -export default class MockGraphics implements MockGameObject { +export class MockGraphics implements MockGameObject { private scene; public list: MockGameObject[] = []; public name: string; diff --git a/test/testUtils/mocks/mocksContainer/mockImage.ts b/test/testUtils/mocks/mocksContainer/mockImage.ts index f8990985e54..830a22a369c 100644 --- a/test/testUtils/mocks/mocksContainer/mockImage.ts +++ b/test/testUtils/mocks/mocksContainer/mockImage.ts @@ -1,4 +1,4 @@ -import MockContainer from "#test/testUtils/mocks/mocksContainer/mockContainer"; +import { MockContainer } from "#test/testUtils/mocks/mocksContainer/mockContainer"; export class MockImage extends MockContainer { // biome-ignore lint/correctness/noUnusedPrivateClassMembers: this is intentional (?) diff --git a/test/testUtils/mocks/mocksContainer/mockNineslice.ts b/test/testUtils/mocks/mocksContainer/mockNineslice.ts index 90c0e13e725..11983075cf7 100644 --- a/test/testUtils/mocks/mocksContainer/mockNineslice.ts +++ b/test/testUtils/mocks/mocksContainer/mockNineslice.ts @@ -1,6 +1,6 @@ -import MockContainer from "#test/testUtils/mocks/mocksContainer/mockContainer"; +import { MockContainer } from "#test/testUtils/mocks/mocksContainer/mockContainer"; -export default class MockNineslice extends MockContainer { +export class MockNineslice extends MockContainer { private texture; private leftWidth; private rightWidth; diff --git a/test/testUtils/mocks/mocksContainer/mockPolygon.ts b/test/testUtils/mocks/mocksContainer/mockPolygon.ts index 4a7f3baec78..2426231193a 100644 --- a/test/testUtils/mocks/mocksContainer/mockPolygon.ts +++ b/test/testUtils/mocks/mocksContainer/mockPolygon.ts @@ -1,6 +1,6 @@ -import MockContainer from "#test/testUtils/mocks/mocksContainer/mockContainer"; +import { MockContainer } from "#test/testUtils/mocks/mocksContainer/mockContainer"; -export default class MockPolygon extends MockContainer { +export class MockPolygon extends MockContainer { constructor(textureManager, x, y, _content, _fillColor, _fillAlpha) { super(textureManager, x, y); } diff --git a/test/testUtils/mocks/mocksContainer/mockRectangle.ts b/test/testUtils/mocks/mocksContainer/mockRectangle.ts index a8eeb370115..1e38cd3af44 100644 --- a/test/testUtils/mocks/mocksContainer/mockRectangle.ts +++ b/test/testUtils/mocks/mocksContainer/mockRectangle.ts @@ -1,7 +1,7 @@ -import { coerceArray } from "#app/utils/common"; -import type { MockGameObject } from "../mockGameObject"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; +import { coerceArray } from "#utils/common"; -export default class MockRectangle implements MockGameObject { +export class MockRectangle implements MockGameObject { private fillColor; private scene; public list: MockGameObject[] = []; diff --git a/test/testUtils/mocks/mocksContainer/mockSprite.ts b/test/testUtils/mocks/mocksContainer/mockSprite.ts index bbcd421e1a7..bea1db21629 100644 --- a/test/testUtils/mocks/mocksContainer/mockSprite.ts +++ b/test/testUtils/mocks/mocksContainer/mockSprite.ts @@ -1,10 +1,10 @@ -import { coerceArray } from "#app/utils/common"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; +import { coerceArray } from "#utils/common"; import Phaser from "phaser"; -import type { MockGameObject } from "../mockGameObject"; type Frame = Phaser.Textures.Frame; -export default class MockSprite implements MockGameObject { +export class MockSprite implements MockGameObject { private phaserSprite; public pipelineData; public texture; diff --git a/test/testUtils/mocks/mocksContainer/mockText.ts b/test/testUtils/mocks/mocksContainer/mockText.ts index 2345ff70c0d..58ae3650411 100644 --- a/test/testUtils/mocks/mocksContainer/mockText.ts +++ b/test/testUtils/mocks/mocksContainer/mockText.ts @@ -1,7 +1,7 @@ -import UI from "#app/ui/ui"; -import type { MockGameObject } from "../mockGameObject"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; +import { UI } from "#ui/ui"; -export default class MockText implements MockGameObject { +export class MockText implements MockGameObject { private phaserText; private wordWrapWidth; private splitRegExp; diff --git a/test/testUtils/mocks/mocksContainer/mockTexture.ts b/test/testUtils/mocks/mocksContainer/mockTexture.ts index 3b01f9ab4ea..af25941094b 100644 --- a/test/testUtils/mocks/mocksContainer/mockTexture.ts +++ b/test/testUtils/mocks/mocksContainer/mockTexture.ts @@ -1,11 +1,11 @@ -import type MockTextureManager from "#test/testUtils/mocks/mockTextureManager"; -import type { MockGameObject } from "../mockGameObject"; +import type { MockGameObject } from "#test/testUtils/mocks/mockGameObject"; +import type { MockTextureManager } from "#test/testUtils/mocks/mockTextureManager"; /** * Stub for Phaser.Textures.Texture object * Just mocks the function calls and data required for use in tests */ -export default class MockTexture implements MockGameObject { +export class MockTexture implements MockGameObject { public manager: MockTextureManager; public key: string; public source; diff --git a/test/testUtils/phaseInterceptor.ts b/test/testUtils/phaseInterceptor.ts index 9d046fc85ba..cdf151c01af 100644 --- a/test/testUtils/phaseInterceptor.ts +++ b/test/testUtils/phaseInterceptor.ts @@ -1,69 +1,69 @@ import { Phase } from "#app/phase"; -import ErrorInterceptor from "#test/testUtils/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"; -import { CommandPhase } from "#app/phases/command-phase"; -import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; -import { EggLapsePhase } from "#app/phases/egg-lapse-phase"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -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 { FormChangePhase } from "#app/phases/form-change-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"; -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"; -import { SelectGenderPhase } from "#app/phases/select-gender-phase"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -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 { 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"; -import { TitlePhase } from "#app/phases/title-phase"; -import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; -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 { PartyHealPhase } from "#app/phases/party-heal-phase"; -import UI from "#app/ui/ui"; import { UiMode } from "#enums/ui-mode"; -import { SelectBiomePhase } from "#app/phases/select-biome-phase"; +import { AttemptRunPhase } from "#phases/attempt-run-phase"; +import { BattleEndPhase } from "#phases/battle-end-phase"; +import { BerryPhase } from "#phases/berry-phase"; +import { CheckSwitchPhase } from "#phases/check-switch-phase"; +import { CommandPhase } from "#phases/command-phase"; +import { DamageAnimPhase } from "#phases/damage-anim-phase"; +import { EggLapsePhase } from "#phases/egg-lapse-phase"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { EndEvolutionPhase } from "#phases/end-evolution-phase"; +import { EnemyCommandPhase } from "#phases/enemy-command-phase"; +import { EvolutionPhase } from "#phases/evolution-phase"; +import { ExpPhase } from "#phases/exp-phase"; +import { FaintPhase } from "#phases/faint-phase"; +import { FormChangePhase } from "#phases/form-change-phase"; +import { GameOverModifierRewardPhase } from "#phases/game-over-modifier-reward-phase"; +import { GameOverPhase } from "#phases/game-over-phase"; +import { LearnMovePhase } from "#phases/learn-move-phase"; +import { LevelCapPhase } from "#phases/level-cap-phase"; +import { LoginPhase } from "#phases/login-phase"; +import { MessagePhase } from "#phases/message-phase"; +import { ModifierRewardPhase } from "#phases/modifier-reward-phase"; +import { MoveEffectPhase } from "#phases/move-effect-phase"; +import { MoveEndPhase } from "#phases/move-end-phase"; +import { MovePhase } from "#phases/move-phase"; import { MysteryEncounterBattlePhase, MysteryEncounterOptionSelectedPhase, MysteryEncounterPhase, MysteryEncounterRewardsPhase, PostMysteryEncounterPhase, -} from "#app/phases/mystery-encounter-phases"; -import { ModifierRewardPhase } from "#app/phases/modifier-reward-phase"; -import { PartyExpPhase } from "#app/phases/party-exp-phase"; -import { ExpPhase } from "#app/phases/exp-phase"; -import { GameOverPhase } from "#app/phases/game-over-phase"; -import { RibbonModifierRewardPhase } from "#app/phases/ribbon-modifier-reward-phase"; -import { GameOverModifierRewardPhase } from "#app/phases/game-over-modifier-reward-phase"; -import { UnlockPhase } from "#app/phases/unlock-phase"; -import { PostGameOverPhase } from "#app/phases/post-game-over-phase"; -import { RevivalBlessingPhase } from "#app/phases/revival-blessing-phase"; - -import type { PhaseClass, PhaseString } from "#app/@types/phase-types"; +} from "#phases/mystery-encounter-phases"; +import { NewBattlePhase } from "#phases/new-battle-phase"; +import { NewBiomeEncounterPhase } from "#phases/new-biome-encounter-phase"; +import { NextEncounterPhase } from "#phases/next-encounter-phase"; +import { PartyExpPhase } from "#phases/party-exp-phase"; +import { PartyHealPhase } from "#phases/party-heal-phase"; +import { PokemonTransformPhase } from "#phases/pokemon-transform-phase"; +import { PostGameOverPhase } from "#phases/post-game-over-phase"; +import { PostSummonPhase } from "#phases/post-summon-phase"; +import { QuietFormChangePhase } from "#phases/quiet-form-change-phase"; +import { RevivalBlessingPhase } from "#phases/revival-blessing-phase"; +import { RibbonModifierRewardPhase } from "#phases/ribbon-modifier-reward-phase"; +import { SelectBiomePhase } from "#phases/select-biome-phase"; +import { SelectGenderPhase } from "#phases/select-gender-phase"; +import { SelectModifierPhase } from "#phases/select-modifier-phase"; +import { SelectStarterPhase } from "#phases/select-starter-phase"; +import { SelectTargetPhase } from "#phases/select-target-phase"; +import { ShinySparklePhase } from "#phases/shiny-sparkle-phase"; +import { ShowAbilityPhase } from "#phases/show-ability-phase"; +import { StatStageChangePhase } from "#phases/stat-stage-change-phase"; +import { SummonPhase } from "#phases/summon-phase"; +import { SwitchPhase } from "#phases/switch-phase"; +import { SwitchSummonPhase } from "#phases/switch-summon-phase"; +import { TitlePhase } from "#phases/title-phase"; +import { ToggleDoublePositionPhase } from "#phases/toggle-double-position-phase"; +import { TurnEndPhase } from "#phases/turn-end-phase"; +import { TurnInitPhase } from "#phases/turn-init-phase"; +import { TurnStartPhase } from "#phases/turn-start-phase"; +import { UnavailablePhase } from "#phases/unavailable-phase"; +import { UnlockPhase } from "#phases/unlock-phase"; +import { VictoryPhase } from "#phases/victory-phase"; +import { ErrorInterceptor } from "#test/testUtils/errorInterceptor"; +import type { PhaseClass, PhaseString } from "#types/phase-types"; +import { UI } from "#ui/ui"; export interface PromptHandler { phaseTarget?: string; @@ -75,7 +75,7 @@ export interface PromptHandler { type PhaseInterceptorPhase = PhaseClass | PhaseString; -export default class PhaseInterceptor { +export class PhaseInterceptor { public scene; public phases = {}; public log: string[]; @@ -142,6 +142,7 @@ export default class PhaseInterceptor { [LevelCapPhase, this.startPhase], [AttemptRunPhase, this.startPhase], [SelectBiomePhase, this.startPhase], + [PokemonTransformPhase, this.startPhase], [MysteryEncounterPhase, this.startPhase], [MysteryEncounterOptionSelectedPhase, this.startPhase], [MysteryEncounterBattlePhase, this.startPhase], diff --git a/test/testUtils/testFileInitialization.ts b/test/testUtils/testFileInitialization.ts index 578747b0529..98b49159d98 100644 --- a/test/testUtils/testFileInitialization.ts +++ b/test/testUtils/testFileInitialization.ts @@ -1,29 +1,29 @@ -import { SESSION_ID_COOKIE_NAME } from "#app/constants"; +import { initAbilities } from "#abilities/ability"; import { initLoggedInUser } from "#app/account"; -import { initAbilities } from "#app/data/abilities/ability"; -import { initBiomes } from "#app/data/balance/biomes"; -import { initEggMoves } from "#app/data/balance/egg-moves"; -import { initPokemonPrevolutions, initPokemonStarters } from "#app/data/balance/pokemon-evolutions"; -import { initMoves } from "#app/data/moves/move"; -import { initModifierPools } from "#app/modifier/init-modifier-pools"; -import { initMysteryEncounters } from "#app/data/mystery-encounters/mystery-encounters"; -import { initPokemonForms } from "#app/data/pokemon-forms"; -import { initSpecies } from "#app/data/pokemon-species"; -import { initAchievements } from "#app/system/achv"; -import { initVouchers } from "#app/system/voucher"; -import { initStatsKeys } from "#app/ui/game-stats-ui-handler"; -import { setCookie } from "#app/utils/cookies"; +import { SESSION_ID_COOKIE_NAME } from "#app/constants"; +import { initBiomes } from "#balance/biomes"; +import { initEggMoves } from "#balance/egg-moves"; +import { initPokemonPrevolutions, initPokemonStarters } from "#balance/pokemon-evolutions"; +import { initPokemonForms } from "#data/pokemon-forms"; +import { initSpecies } from "#data/pokemon-species"; +import { initModifierPools } from "#modifiers/init-modifier-pools"; +import { initModifierTypes } from "#modifiers/modifier-type"; +import { initMoves } from "#moves/move"; +import { initMysteryEncounters } from "#mystery-encounters/mystery-encounters"; +import { initI18n } from "#plugins/i18n"; +import { initAchievements } from "#system/achv"; +import { initVouchers } from "#system/voucher"; import { blobToString } from "#test/testUtils/gameManagerUtils"; +import { manageListeners } from "#test/testUtils/listenersManager"; import { MockConsoleLog } from "#test/testUtils/mocks/mockConsoleLog"; import { mockContext } from "#test/testUtils/mocks/mockContextCanvas"; import { mockLocalStorage } from "#test/testUtils/mocks/mockLocalStorage"; import { MockImage } from "#test/testUtils/mocks/mocksContainer/mockImage"; +import { initStatsKeys } from "#ui/game-stats-ui-handler"; +import { setCookie } from "#utils/cookies"; import Phaser from "phaser"; -import InputText from "phaser3-rex-plugins/plugins/inputtext"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import { manageListeners } from "./listenersManager"; -import { initI18n } from "#app/plugins/i18n"; -import { initModifierTypes } from "#app/modifier/modifier-type"; +import InputText from "phaser3-rex-plugins/plugins/inputtext"; let wasInitialized = false; /** diff --git a/test/types/enum-types.test-d.ts b/test/types/enum-types.test-d.ts new file mode 100644 index 00000000000..396c479e85a --- /dev/null +++ b/test/types/enum-types.test-d.ts @@ -0,0 +1,104 @@ +import type { EnumOrObject, EnumValues, NormalEnum, TSNumericEnum } from "#app/@types/enum-types"; +import type { enumValueToKey, getEnumKeys, getEnumValues } from "#app/utils/enums"; +import { describe, expectTypeOf, it } from "vitest"; + +enum testEnumNum { + testN1 = 1, + testN2 = 2, +} + +enum testEnumString { + testS1 = "apple", + testS2 = "banana", +} + +const testObjNum = { testON1: 1, testON2: 2 } as const; + +const testObjString = { testOS1: "apple", testOS2: "banana" } as const; + +describe("Enum Type Helpers", () => { + describe("EnumValues", () => { + it("should go from enum object type to value type", () => { + expectTypeOf>().toEqualTypeOf(); + expectTypeOf>().branded.toEqualTypeOf<1 | 2>(); + + expectTypeOf>().toEqualTypeOf(); + expectTypeOf>().toEqualTypeOf(); + expectTypeOf>().toMatchTypeOf<"apple" | "banana">(); + }); + + it("should produce union of const object values as type", () => { + expectTypeOf>().toEqualTypeOf<1 | 2>(); + + expectTypeOf>().toEqualTypeOf<"apple" | "banana">(); + }); + }); + + describe("TSNumericEnum", () => { + it("should match numeric enums", () => { + expectTypeOf>().toEqualTypeOf(); + }); + + it("should not match string enums or const objects", () => { + expectTypeOf>().toBeNever(); + expectTypeOf>().toBeNever(); + expectTypeOf>().toBeNever(); + }); + }); + + describe("NormalEnum", () => { + it("should match string enums or const objects", () => { + expectTypeOf>().toEqualTypeOf(); + expectTypeOf>().toEqualTypeOf(); + expectTypeOf>().toEqualTypeOf(); + }); + it("should not match numeric enums", () => { + expectTypeOf>().toBeNever(); + }); + }); + + describe("EnumOrObject", () => { + it("should match any enum or const object", () => { + expectTypeOf().toMatchTypeOf(); + expectTypeOf().toMatchTypeOf(); + expectTypeOf().toMatchTypeOf(); + expectTypeOf().toMatchTypeOf(); + }); + + it("should not match an enum value union w/o typeof", () => { + expectTypeOf().not.toMatchTypeOf(); + expectTypeOf().not.toMatchTypeOf(); + }); + + it("should be equivalent to `TSNumericEnum | NormalEnum`", () => { + expectTypeOf().branded.toEqualTypeOf | NormalEnum>(); + }); + }); +}); + +describe("Enum Functions", () => { + describe("getEnumKeys", () => { + it("should retrieve keys of numeric enum", () => { + expectTypeOf>().returns.toEqualTypeOf<("testN1" | "testN2")[]>(); + }); + }); + + describe("getEnumValues", () => { + it("should retrieve values of numeric enum", () => { + expectTypeOf>().returns.branded.toEqualTypeOf<(1 | 2)[]>(); + }); + }); + + describe("enumValueToKey", () => { + it("should retrieve values for a given key", () => { + expectTypeOf< + typeof enumValueToKey + >().returns.toEqualTypeOf<"testS1">(); + expectTypeOf>().returns.toEqualTypeOf< + "testS1" | "testS2" + >(); + expectTypeOf>().returns.toEqualTypeOf<"testON1">(); + expectTypeOf>().returns.toEqualTypeOf<"testON1" | "testON2">(); + }); + }); +}); diff --git a/test/ui/battle_info.test.ts b/test/ui/battle_info.test.ts index 3049424e3d2..afc456c6430 100644 --- a/test/ui/battle_info.test.ts +++ b/test/ui/battle_info.test.ts @@ -1,9 +1,9 @@ -import { ExpGainsSpeed } from "#app/enums/exp-gains-speed"; -import { SpeciesId } from "#enums/species-id"; -import { ExpPhase } from "#app/phases/exp-phase"; import { AbilityId } from "#enums/ability-id"; +import { ExpGainsSpeed } from "#enums/exp-gains-speed"; import { MoveId } from "#enums/move-id"; -import GameManager from "#test/testUtils/gameManager"; +import { SpeciesId } from "#enums/species-id"; +import { ExpPhase } from "#phases/exp-phase"; +import { GameManager } from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/test/ui/pokedex.test.ts b/test/ui/pokedex.test.ts index 13f595e0c60..1d81f19052c 100644 --- a/test/ui/pokedex.test.ts +++ b/test/ui/pokedex.test.ts @@ -1,21 +1,19 @@ -import GameManager from "#test/testUtils/gameManager"; -import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import PokedexUiHandler from "#app/ui/pokedex-ui-handler"; -import { FilterTextRow } from "#app/ui/filter-text"; -import { allAbilities } from "#app/data/data-lists"; +import { allAbilities, allSpecies } from "#data/data-lists"; +import type { PokemonForm, PokemonSpecies } from "#data/pokemon-species"; import { AbilityId } from "#enums/ability-id"; -import { SpeciesId } from "#enums/species-id"; -import type { PokemonForm } from "#app/data/pokemon-species"; -import { getPokemonSpecies } from "#app/utils/pokemon-utils"; -import { allSpecies } from "#app/data/data-lists"; import { Button } from "#enums/buttons"; import { DropDownColumn } from "#enums/drop-down-column"; -import type PokemonSpecies from "#app/data/pokemon-species"; import { PokemonType } from "#enums/pokemon-type"; +import { SpeciesId } from "#enums/species-id"; import { UiMode } from "#enums/ui-mode"; -import PokedexPageUiHandler from "#app/ui/pokedex-page-ui-handler"; -import type { StarterAttributes } from "#app/system/game-data"; +import type { StarterAttributes } from "#system/game-data"; +import { GameManager } from "#test/testUtils/gameManager"; +import { FilterTextRow } from "#ui/filter-text"; +import { PokedexPageUiHandler } from "#ui/pokedex-page-ui-handler"; +import { PokedexUiHandler } from "#ui/pokedex-ui-handler"; +import { getPokemonSpecies } from "#utils/pokemon-utils"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; /* Information for the `data_pokedex_tests.psrv`: diff --git a/test/ui/starter-select.test.ts b/test/ui/starter-select.test.ts index 8167ab17957..63abc99174e 100644 --- a/test/ui/starter-select.test.ts +++ b/test/ui/starter-select.test.ts @@ -1,19 +1,19 @@ -import { Gender } from "#app/data/gender"; -import { Nature } from "#enums/nature"; -import { allSpecies } from "#app/data/data-lists"; -import { GameModes } from "#enums/game-modes"; -import { EncounterPhase } from "#app/phases/encounter-phase"; -import { SelectStarterPhase } from "#app/phases/select-starter-phase"; -import type { TitlePhase } from "#app/phases/title-phase"; -import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; -import type SaveSlotSelectUiHandler from "#app/ui/save-slot-select-ui-handler"; -import type OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler"; -import type StarterSelectUiHandler from "#app/ui/starter-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; +import { allSpecies } from "#data/data-lists"; +import { Gender } from "#data/gender"; import { AbilityId } from "#enums/ability-id"; import { Button } from "#enums/buttons"; +import { GameModes } from "#enums/game-modes"; +import { Nature } from "#enums/nature"; import { SpeciesId } from "#enums/species-id"; -import GameManager from "#test/testUtils/gameManager"; +import { UiMode } from "#enums/ui-mode"; +import { EncounterPhase } from "#phases/encounter-phase"; +import { SelectStarterPhase } from "#phases/select-starter-phase"; +import type { TitlePhase } from "#phases/title-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; +import type { OptionSelectUiHandler } from "#ui/option-select-ui-handler"; +import type { SaveSlotSelectUiHandler } from "#ui/save-slot-select-ui-handler"; +import type { StarterSelectUiHandler } from "#ui/starter-select-ui-handler"; import i18next from "i18next"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/ui/transfer-item.test.ts b/test/ui/transfer-item.test.ts index 572d56c5903..f2b0a4f7d35 100644 --- a/test/ui/transfer-item.test.ts +++ b/test/ui/transfer-item.test.ts @@ -1,11 +1,11 @@ -import { BerryType } from "#app/enums/berry-type"; -import { Button } from "#app/enums/buttons"; +import { BerryType } from "#enums/berry-type"; +import { Button } from "#enums/buttons"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; -import PartyUiHandler, { PartyUiMode } from "#app/ui/party-ui-handler"; import { UiMode } from "#enums/ui-mode"; -import GameManager from "#test/testUtils/gameManager"; +import { GameManager } from "#test/testUtils/gameManager"; +import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; +import { PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler"; import Phaser from "phaser"; import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/test/ui/type-hints.test.ts b/test/ui/type-hints.test.ts index 6b0bc6e5ea5..8359c50c35d 100644 --- a/test/ui/type-hints.test.ts +++ b/test/ui/type-hints.test.ts @@ -1,14 +1,14 @@ -import { Button } from "#app/enums/buttons"; +import { Button } from "#enums/buttons"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; -import { CommandPhase } from "#app/phases/command-phase"; -import FightUiHandler from "#app/ui/fight-ui-handler"; import { UiMode } from "#enums/ui-mode"; -import GameManager from "#test/testUtils/gameManager"; +import { CommandPhase } from "#phases/command-phase"; +import { GameManager } from "#test/testUtils/gameManager"; +import type { MockText } from "#test/testUtils/mocks/mocksContainer/mockText"; +import { FightUiHandler } from "#ui/fight-ui-handler"; +import i18next from "i18next"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import type MockText from "#test/testUtils/mocks/mocksContainer/mockText"; -import i18next from "i18next"; describe("UI - Type Hints", () => { let phaserGame: Phaser.Game; diff --git a/test/utils.test.ts b/test/utils.test.ts index fe93bdd6970..aacd590a023 100644 --- a/test/utils.test.ts +++ b/test/utils.test.ts @@ -1,8 +1,7 @@ -import { expect, describe, it, beforeAll } from "vitest"; -import { randomString, padInt } from "#app/utils/common"; -import { deepMergeSpriteData } from "#app/utils/data"; - +import { padInt, randomString } from "#utils/common"; +import { deepMergeSpriteData } from "#utils/data"; import Phaser from "phaser"; +import { beforeAll, describe, expect, it } from "vitest"; describe("utils", () => { beforeAll(() => { diff --git a/test/vitest.setup.ts b/test/vitest.setup.ts index 93b439e540f..6cf20219408 100644 --- a/test/vitest.setup.ts +++ b/test/vitest.setup.ts @@ -1,8 +1,7 @@ import "vitest-canvas-mock"; +import { initTestFile } from "#test/testUtils/testFileInitialization"; import { afterAll, beforeAll, vi } from "vitest"; -import { initTestFile } from "./testUtils/testFileInitialization"; - /** Set the timezone to UTC for tests. */ /** Mock the override import to always return default values, ignoring any custom overrides. */ diff --git a/tsconfig.json b/tsconfig.json index 6af3e9ce650..b7ef84869e5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,17 @@ "compilerOptions": { "target": "ES2020", "module": "ES2020", + // Modifying this option requires all values to be set manually because the defaults get overridden + // Values other than "ES2024.Promise" taken from https://github.com/microsoft/TypeScript/blob/main/src/lib/es2020.full.d.ts + "lib": [ + "ES2020", + "ES2024.Promise", + "DOM", + "DOM.AsyncIterable", + "DOM.Iterable", + "ScriptHost", + "WebWorker.ImportScripts" + ], "moduleResolution": "bundler", "resolveJsonModule": true, "esModuleInterop": true, @@ -11,18 +22,41 @@ "rootDir": ".", "baseUrl": "./src", "paths": { + "#abilities/*": ["./data/abilities/*.ts"], + "#api/*": ["./plugins/api/*.ts"], + "#balance/*": ["./data/balance/*.ts"], "#enums/*": ["./enums/*.ts"], - "#app/*": ["*.ts"], - "#test/*": ["../test/*.ts"] + "#events/*": ["./events/*.ts"], + "#field/*": ["./field/*.ts"], + "#inputs/*": ["./configs/inputs/*.ts"], + "#modifiers/*": ["./modifier/*.ts"], + "#moves/*": ["./data/moves/*.ts"], + "#mystery-encounters/*": [ + "./data/mystery-encounters/utils/*.ts", + "./data/mystery-encounters/encounters/*.ts", + "./data/mystery-encounters/requirements/*.ts", + "./data/mystery-encounters/*.ts" + ], + "#package.json": ["../package.json"], + "#phases/*": ["./phases/*.ts"], + "#plugins/*": ["./plugins/vite/*.ts", "./plugins/*.ts"], + "#sprites/*": ["./sprites/*.ts"], + "#system/*": [ + "./system/settings/*.ts", + "./system/version_migration/versions/*.ts", + "./system/version_migration/*.ts", + "./system/*.ts" + ], + "#trainers/*": ["./data/trainers/*.ts"], + "#types/*": ["./@types/*.ts", "./typings/phaser/*.ts"], + "#ui/*": ["./ui/battle-info/*.ts", "./ui/settings/*.ts", "./ui/*.ts"], + "#utils/*": ["./utils/*.ts"], + "#data/*": ["./data/pokemon-forms/*.ts", "./data/pokemon/*.ts", "./data/*.ts"], + "#test/*": ["../test/*.ts"], + "#app/*": ["*.ts"] }, "outDir": "./build", "noEmit": true }, - "typedocOptions": { - "entryPoints": ["./src"], - "entryPointStrategy": "expand", - "exclude": "**/*+.test.ts", - "out": "typedoc" - }, "exclude": ["node_modules", "dist", "vite.config.ts", "vitest.config.ts", "vitest.workspace.ts"] } diff --git a/tsdoc.json b/tsdoc.json new file mode 100644 index 00000000000..b4cbc9a62a5 --- /dev/null +++ b/tsdoc.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://developer.microsoft.com/en-us/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": false, + "tagDefinitions": [ + { + "tagName": "@todo", + "syntaxKind": "block" + }, + { + "tagName": "@linkcode", + "syntaxKind": "inline" + } + ] +} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 00000000000..c34e6190c1a --- /dev/null +++ b/typedoc.json @@ -0,0 +1,7 @@ +{ + "entryPoints": ["./src"], + "entryPointStrategy": "expand", + "exclude": ["**/*+.test.ts"], + "out": "typedoc", + "highlightLanguages": ["javascript", "json", "jsonc", "json5", "tsx", "typescript", "markdown"] +} diff --git a/vitest.config.ts b/vitest.config.ts index c781bde97ed..3900bc7b047 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,16 +1,6 @@ import { defineProject } from "vitest/config"; -import { defaultConfig } from "./vite.config"; import { BaseSequencer, type TestSpecification } from "vitest/node"; - -function getTestOrder(testName: string): number { - if (testName.includes("battle-scene.test.ts")) { - return 1; - } - if (testName.includes("inputs.test.ts")) { - return 2; - } - return 3; -} +import { defaultConfig } from "./vite.config"; export default defineProject(({ mode }) => ({ ...defaultConfig, @@ -18,15 +8,7 @@ export default defineProject(({ mode }) => ({ testTimeout: 20000, setupFiles: ["./test/fontFace.setup.ts", "./test/vitest.setup.ts"], sequence: { - sequencer: class CustomSequencer extends BaseSequencer { - async sort(files: TestSpecification[]) { - // use default sorting at first. - files = await super.sort(files); - // Except, forcibly reorder - - return files.sort((a, b) => getTestOrder(a.moduleId) - getTestOrder(b.moduleId)); - } - }, + sequencer: MySequencer, }, environment: "jsdom" as const, environmentOptions: { @@ -34,6 +16,10 @@ export default defineProject(({ mode }) => ({ resources: "usable", }, }, + typecheck: { + tsconfig: "tsconfig.json", + include: ["./test/types/**/*.{test,spec}{-|.}d.ts"], + }, threads: false, trace: true, restoreMocks: true, @@ -51,3 +37,38 @@ export default defineProject(({ mode }) => ({ keepNames: true, }, })); + +//#region Helpers + +/** + * Class for sorting test files in the desired order. + */ +class MySequencer extends BaseSequencer { + async sort(files: TestSpecification[]) { + files = await super.sort(files); + + return files.sort((a, b) => { + const aTestOrder = getTestOrder(a.moduleId); + const bTestOrder = getTestOrder(b.moduleId); + return aTestOrder - bTestOrder; + }); + } +} + +/** + * A helper function for sorting test files in a desired order. + * + * A lower number means that a test file must be run earlier, + * or else it breaks due to running tests with `--no-isolate.` + */ +function getTestOrder(testName: string): number { + if (testName.includes("battle-scene.test.ts")) { + return 1; + } + if (testName.includes("inputs.test.ts")) { + return 2; + } + return 3; +} + +//#endregion diff --git a/vitest.workspace.ts b/vitest.workspace.ts deleted file mode 100644 index 2f5d1f1e2c8..00000000000 --- a/vitest.workspace.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineWorkspace } from "vitest/config"; -import { defaultConfig } from "./vite.config"; - -export default defineWorkspace([ - { - ...defaultConfig, - test: { - name: "pre", - include: ["./test/pre.test.ts"], - environment: "jsdom", - }, - }, - "./vitest.config.ts", -]);