diff --git a/.dependency-cruiser.cjs b/.dependency-cruiser.cjs index 25f7b64ce85..8c6dff55c8c 100644 --- a/.dependency-cruiser.cjs +++ b/.dependency-cruiser.cjs @@ -156,7 +156,7 @@ module.exports = { path: '^(src)', pathNot: [ '[.](?:spec|test|setup|script)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$', - 'src/test' + './test' ] }, to: { diff --git a/create-test-boilerplate.js b/create-test-boilerplate.js index a365999c623..1ea61e0dc48 100644 --- a/create-test-boilerplate.js +++ b/create-test-boilerplate.js @@ -84,19 +84,19 @@ async function runInteractive() { let description; switch (type) { case "move": - dir = path.join(__dirname, "src", "test", "moves"); + dir = path.join(__dirname, "test", "moves"); description = `Moves - ${formattedName}`; break; case "ability": - dir = path.join(__dirname, "src", "test", "abilities"); + dir = path.join(__dirname, "test", "abilities"); description = `Abilities - ${formattedName}`; break; case "item": - dir = path.join(__dirname, "src", "test", "items"); + dir = path.join(__dirname, "test", "items"); description = `Items - ${formattedName}`; break; case "mystery encounter": - dir = path.join(__dirname, "src", "test", "mystery-encounter", "encounters"); + dir = path.join(__dirname, "test", "mystery-encounter", "encounters"); description = `Mystery Encounter - ${formattedName}`; break; default: @@ -108,7 +108,7 @@ async function runInteractive() { const content = `import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/eslint.config.js b/eslint.config.js index 0da9cc604bf..e79395e1900 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -6,7 +6,7 @@ import importX from 'eslint-plugin-import-x'; export default [ { name: "eslint-config", - files: ["src/**/*.{ts,tsx,js,jsx}"], + files: ["src/**/*.{ts,tsx,js,jsx}", "test/**/*.{ts,tsx,js,jsx}"], ignores: ["dist/*", "build/*", "coverage/*", "public/*", ".github/*", "node_modules/*", ".vscode/*"], languageOptions: { parser: parser @@ -52,7 +52,7 @@ export default [ }, { name: "eslint-tests", - files: ["src/test/**/**.test.ts"], + files: ["test/**/**.test.ts"], languageOptions: { parser: parser, parserOptions: { diff --git a/index.css b/index.css index d32d9da9bb1..9226f968e3e 100644 --- a/index.css +++ b/index.css @@ -170,7 +170,7 @@ input:-internal-autofill-selected { #touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT']) #apadCycleNature, #touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT'], [data-ui-mode='POKEDEX_PAGE'], [data-ui-mode='RUN_INFO']) #apadCycleAbility, #touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT'], [data-ui-mode='POKEDEX_PAGE']) #apadCycleGender, -#touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT'], [data-ui-mode='POKEDEX']) #apadCycleVariant { +#touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT'], [data-ui-mode='POKEDEX']) #apadCycleTera { display: none; } diff --git a/index.html b/index.html index 390a29fb365..91367cf73ec 100644 --- a/index.html +++ b/index.html @@ -129,7 +129,7 @@
N
-
+
V
diff --git a/public/exp-sprites.json b/public/exp-sprites.json index a340d02a65a..c3b79d0cb38 100644 --- a/public/exp-sprites.json +++ b/public/exp-sprites.json @@ -261,10 +261,10 @@ "666-fancy", "666-garden", "666-garden", - "666-high", - "666-high", - "666-icy", - "666-icy", + "666-high-plains", + "666-high-plains", + "666-icy-snow", + "666-icy-snow", "666-jungle", "666-jungle", "666-marine", @@ -277,8 +277,8 @@ "666-monsoon", "666-ocean", "666-ocean", - "666-poke", - "666-poke", + "666-poke-ball", + "666-poke-ball", "666-polar", "666-polar", "666-river", @@ -1379,10 +1379,10 @@ "666b-fancy", "666b-garden", "666b-garden", - "666b-high", - "666b-high", - "666b-icy", - "666b-icy", + "666b-high-plains", + "666b-high-plains", + "666b-icy-snow", + "666b-icy-snow", "666b-jungle", "666b-jungle", "666b-marine", @@ -1395,8 +1395,8 @@ "666b-monsoon", "666b-ocean", "666b-ocean", - "666b-poke", - "666b-poke", + "666b-poke-ball", + "666b-poke-ball", "666b-polar", "666b-polar", "666b-river", @@ -2499,10 +2499,10 @@ "666sb-fancy", "666sb-garden", "666sb-garden", - "666sb-high", - "666sb-high", - "666sb-icy", - "666sb-icy", + "666sb-high-plains", + "666sb-high-plains", + "666sb-icy-snow", + "666sb-icy-snow", "666sb-jungle", "666sb-jungle", "666sb-marine", @@ -2515,8 +2515,8 @@ "666sb-monsoon", "666sb-ocean", "666sb-ocean", - "666sb-poke", - "666sb-poke", + "666sb-poke-ball", + "666sb-poke-ball", "666sb-polar", "666sb-polar", "666sb-river", @@ -3624,10 +3624,10 @@ "666s-fancy", "666s-garden", "666s-garden", - "666s-high", - "666s-high", - "666s-icy", - "666s-icy", + "666s-high-plains", + "666s-high-plains", + "666s-icy-snow", + "666s-icy-snow", "666s-jungle", "666s-jungle", "666s-marine", @@ -3640,8 +3640,8 @@ "666s-monsoon", "666s-ocean", "666s-ocean", - "666s-poke", - "666s-poke", + "666s-poke-ball", + "666s-poke-ball", "666s-polar", "666s-polar", "666s-river", @@ -4551,7 +4551,7 @@ "666-fancy_3", "666-garden", "666-high", - "666-icy", + "666-icy-snow", "666-jungle", "666-marine", "666-meadow_2", @@ -4841,10 +4841,10 @@ "666b-high", "666b-high", "666b-high", - "666b-icy", - "666b-icy", - "666b-icy", - "666b-icy", + "666b-icy-snow", + "666b-icy-snow", + "666b-icy-snow", + "666b-icy-snow", "666b-jungle_2", "666b-jungle_2", "666b-jungle_3", diff --git a/public/images/pokemon/666-continental.png b/public/images/pokemon/666-continental.png index 1bd15dbb70d..b45f5c4e76d 100644 Binary files a/public/images/pokemon/666-continental.png and b/public/images/pokemon/666-continental.png differ diff --git a/public/images/pokemon/666-fancy.png b/public/images/pokemon/666-fancy.png index ec5e8a5f6e8..9e40deb3568 100644 Binary files a/public/images/pokemon/666-fancy.png and b/public/images/pokemon/666-fancy.png differ diff --git a/public/images/pokemon/666-river.png b/public/images/pokemon/666-river.png index eeabeecb069..ca93fd612b7 100644 Binary files a/public/images/pokemon/666-river.png and b/public/images/pokemon/666-river.png differ diff --git a/public/images/pokemon/back/666-fancy.png b/public/images/pokemon/back/666-fancy.png index 35ed4317d8e..b56daf08a52 100644 Binary files a/public/images/pokemon/back/666-fancy.png and b/public/images/pokemon/back/666-fancy.png differ diff --git a/public/images/pokemon/back/666-river.png b/public/images/pokemon/back/666-river.png index 0d7d7a65d1e..effabe7fa2d 100644 Binary files a/public/images/pokemon/back/666-river.png and b/public/images/pokemon/back/666-river.png differ diff --git a/public/images/pokemon/exp/666-fancy.png b/public/images/pokemon/exp/666-fancy.png index 6c23274c5e0..92da507a61f 100644 Binary files a/public/images/pokemon/exp/666-fancy.png and b/public/images/pokemon/exp/666-fancy.png differ diff --git a/public/images/pokemon/exp/666-meadow.json b/public/images/pokemon/exp/666-meadow.json index ee4f6d31bc0..77158992e59 100644 --- a/public/images/pokemon/exp/666-meadow.json +++ b/public/images/pokemon/exp/666-meadow.json @@ -1,314 +1,551 @@ -{ - "textures": [ - { - "image": "666-meadow.png", - "format": "RGBA8888", - "size": { - "w": 243, - "h": 243 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 0, - "y": 5, - "w": 84, - "h": 88 - }, - "frame": { - "x": 0, - "y": 0, - "w": 84, - "h": 88 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 77, - "h": 89 - }, - "frame": { - "x": 0, - "y": 88, - "w": 77, - "h": 89 - } - }, - { - "filename": "0014.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 77, - "h": 89 - }, - "frame": { - "x": 0, - "y": 88, - "w": 77, - "h": 89 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 69, - "h": 89 - }, - "frame": { - "x": 77, - "y": 88, - "w": 69, - "h": 89 - } - }, - { - "filename": "0013.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 69, - "h": 89 - }, - "frame": { - "x": 77, - "y": 88, - "w": 69, - "h": 89 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 10, - "y": 3, - "w": 62, - "h": 87 - }, - "frame": { - "x": 84, - "y": 0, - "w": 62, - "h": 87 - } - }, - { - "filename": "0012.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 10, - "y": 3, - "w": 62, - "h": 87 - }, - "frame": { - "x": 84, - "y": 0, - "w": 62, - "h": 87 - } - }, - { - "filename": "0005.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 13, - "y": 2, - "w": 56, - "h": 86 - }, - "frame": { - "x": 146, - "y": 0, - "w": 56, - "h": 86 - } - }, - { - "filename": "0011.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 13, - "y": 2, - "w": 56, - "h": 86 - }, - "frame": { - "x": 146, - "y": 0, - "w": 56, - "h": 86 - } - }, - { - "filename": "0008.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 19, - "y": 0, - "w": 41, - "h": 85 - }, - "frame": { - "x": 202, - "y": 0, - "w": 41, - "h": 85 - } - }, - { - "filename": "0006.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 51, - "h": 86 - }, - "frame": { - "x": 146, - "y": 86, - "w": 51, - "h": 86 - } - }, - { - "filename": "0010.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 51, - "h": 86 - }, - "frame": { - "x": 146, - "y": 86, - "w": 51, - "h": 86 - } - }, - { - "filename": "0007.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 46, - "h": 86 - }, - "frame": { - "x": 197, - "y": 86, - "w": 46, - "h": 86 - } - }, - { - "filename": "0009.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 93 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 46, - "h": 86 - }, - "frame": { - "x": 197, - "y": 86, - "w": 46, - "h": 86 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:223ce33721ef8da9ff40286099c20de4:b82acd304c2a8b8cebeda2043a3e1f96:f8ac4807b4d6eef2256fa1b93e0f89ba$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 14, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 347, "y": 2, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 347, "y": 71, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 347, "y": 140, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 20, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 209, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 21, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 347, "y": 140, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 20, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 347, "y": 71, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 347, "y": 2, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0013.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 14, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0014.png", + "frame": { "x": 347, "y": 2, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0015.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0016.png", + "frame": { "x": 347, "y": 71, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0017.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0018.png", + "frame": { "x": 347, "y": 140, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 20, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0019.png", + "frame": { "x": 209, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 21, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0020.png", + "frame": { "x": 347, "y": 140, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 20, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0021.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0022.png", + "frame": { "x": 347, "y": 71, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0023.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0024.png", + "frame": { "x": 347, "y": 2, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0025.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 14, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0026.png", + "frame": { "x": 347, "y": 2, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0027.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0028.png", + "frame": { "x": 347, "y": 71, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0029.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0030.png", + "frame": { "x": 347, "y": 140, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 20, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0031.png", + "frame": { "x": 209, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 21, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0032.png", + "frame": { "x": 347, "y": 140, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 20, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0033.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0034.png", + "frame": { "x": 347, "y": 71, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0035.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0036.png", + "frame": { "x": 347, "y": 2, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0037.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 14, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0038.png", + "frame": { "x": 2, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0039.png", + "frame": { "x": 278, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0040.png", + "frame": { "x": 53, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0041.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0042.png", + "frame": { "x": 104, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 19, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0043.png", + "frame": { "x": 71, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 20, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0044.png", + "frame": { "x": 155, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 19, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0045.png", + "frame": { "x": 140, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0046.png", + "frame": { "x": 206, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0047.png", + "frame": { "x": 209, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0048.png", + "frame": { "x": 257, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0049.png", + "frame": { "x": 278, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 14, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0050.png", + "frame": { "x": 308, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0051.png", + "frame": { "x": 2, "y": 140, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0052.png", + "frame": { "x": 53, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0053.png", + "frame": { "x": 71, "y": 140, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0054.png", + "frame": { "x": 104, "y": 209, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 19, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0055.png", + "frame": { "x": 140, "y": 140, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 20, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0056.png", + "frame": { "x": 2, "y": 278, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 19, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0057.png", + "frame": { "x": 209, "y": 140, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 18, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0058.png", + "frame": { "x": 53, "y": 278, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 17, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0059.png", + "frame": { "x": 278, "y": 140, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 14, "y": 16, "w": 67, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + }, + { + "filename": "0060.png", + "frame": { "x": 104, "y": 278, "w": 49, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 22, "y": 15, "w": 49, "h": 67 }, + "sourceSize": { "w": 96, "h": 96 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-meadow.png", + "format": "I8", + "size": { "w": 398, "h": 347 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/666-meadow.png b/public/images/pokemon/exp/666-meadow.png index 3f9f758ad1f..6912a8d8174 100644 Binary files a/public/images/pokemon/exp/666-meadow.png and b/public/images/pokemon/exp/666-meadow.png differ diff --git a/public/images/pokemon/exp/666-poke-ball.png b/public/images/pokemon/exp/666-poke-ball.png index e33fe6e8c5a..58cae8e2aaa 100644 Binary files a/public/images/pokemon/exp/666-poke-ball.png and b/public/images/pokemon/exp/666-poke-ball.png differ diff --git a/public/images/pokemon/exp/666-river.png b/public/images/pokemon/exp/666-river.png index 1e908ff89b6..433b2c39254 100644 Binary files a/public/images/pokemon/exp/666-river.png and b/public/images/pokemon/exp/666-river.png differ diff --git a/public/images/pokemon/exp/back/666-archipelago.json b/public/images/pokemon/exp/back/666-archipelago.json index bc4abf95a6d..817696f70a1 100644 --- a/public/images/pokemon/exp/back/666-archipelago.json +++ b/public/images/pokemon/exp/back/666-archipelago.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-archipelago.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:223e2a75aa192f3fb67e18f7f0d6c4c7:ba854fe0d08f005e9aa52e55cdc7eb4e:80cdb6dd219378a41ccf5c2acc7e7786$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-archipelago.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-archipelago.png b/public/images/pokemon/exp/back/666-archipelago.png index 83622bd976f..f83b645e0fe 100644 Binary files a/public/images/pokemon/exp/back/666-archipelago.png and b/public/images/pokemon/exp/back/666-archipelago.png differ diff --git a/public/images/pokemon/exp/back/666-continental.json b/public/images/pokemon/exp/back/666-continental.json index d0cd7359c88..fc21deb6978 100644 --- a/public/images/pokemon/exp/back/666-continental.json +++ b/public/images/pokemon/exp/back/666-continental.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-continental.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 46, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 46, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 46, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 46, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:89725e18f2e4d97217076ac82b40230b:c83c3d03ad1200fc71d95ecafb54bc03:23aaac2256d564b9d8a58d7de70397c3$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-continental.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-continental.png b/public/images/pokemon/exp/back/666-continental.png index 21447191338..f1a4cf5a2a4 100644 Binary files a/public/images/pokemon/exp/back/666-continental.png and b/public/images/pokemon/exp/back/666-continental.png differ diff --git a/public/images/pokemon/exp/back/666-elegant.json b/public/images/pokemon/exp/back/666-elegant.json index c44ea10f7dd..35c20315153 100644 --- a/public/images/pokemon/exp/back/666-elegant.json +++ b/public/images/pokemon/exp/back/666-elegant.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-elegant.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 44, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 44, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 44, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 44, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 44, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 44, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:bbba66d69955866664e782205a4af88d:66e99814147be780756a4d4ccd8b31dc:d6b035048c66474f6236a3bc923faa7b$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-elegant.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-elegant.png b/public/images/pokemon/exp/back/666-elegant.png index 3187d681140..2a75c09b505 100644 Binary files a/public/images/pokemon/exp/back/666-elegant.png and b/public/images/pokemon/exp/back/666-elegant.png differ diff --git a/public/images/pokemon/exp/back/666-fancy.json b/public/images/pokemon/exp/back/666-fancy.json index 657c29e99ee..54113df4b51 100644 --- a/public/images/pokemon/exp/back/666-fancy.json +++ b/public/images/pokemon/exp/back/666-fancy.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-fancy.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:570d1bf9b987c1bf5ebfe39e485464dd:a3c8bebd39c1c84b1bf0fdf600026ea5:6d5edff9a806f43feff031c9919c9aca$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-fancy.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-fancy.png b/public/images/pokemon/exp/back/666-fancy.png index 9f9f9c42e80..f7da62d0637 100644 Binary files a/public/images/pokemon/exp/back/666-fancy.png and b/public/images/pokemon/exp/back/666-fancy.png differ diff --git a/public/images/pokemon/exp/back/666-garden.json b/public/images/pokemon/exp/back/666-garden.json index 763dd125a5c..4fcc5ab0ad1 100644 --- a/public/images/pokemon/exp/back/666-garden.json +++ b/public/images/pokemon/exp/back/666-garden.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-garden.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:4b2ac69ef7a99f6cef35d3fd38c74d01:8a4c29615f3bf20e9c5d0bb372a5b210:f13a1a8fa0a411aa91fccb833ac8719c$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-garden.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-garden.png b/public/images/pokemon/exp/back/666-garden.png index 47a9a27e790..35e0dd02087 100644 Binary files a/public/images/pokemon/exp/back/666-garden.png and b/public/images/pokemon/exp/back/666-garden.png differ diff --git a/public/images/pokemon/exp/back/666-high-plains.json b/public/images/pokemon/exp/back/666-high-plains.json index 90101dd98ba..56a90a01899 100644 --- a/public/images/pokemon/exp/back/666-high-plains.json +++ b/public/images/pokemon/exp/back/666-high-plains.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-high-plains.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:410c759185f779797422e8f2ce55db4f:6afd0d04b6138fdd57d12681e967b48c:2abdb5d19b2754e3daa24b6ff3ed2c2c$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-high-plains.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-high-plains.png b/public/images/pokemon/exp/back/666-high-plains.png index 7b06fcc8040..7b84c4ebac3 100644 Binary files a/public/images/pokemon/exp/back/666-high-plains.png and b/public/images/pokemon/exp/back/666-high-plains.png differ diff --git a/public/images/pokemon/exp/back/666-icy-snow.json b/public/images/pokemon/exp/back/666-icy-snow.json index 17e6e3be8ef..b44f33bb07f 100644 --- a/public/images/pokemon/exp/back/666-icy-snow.json +++ b/public/images/pokemon/exp/back/666-icy-snow.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-icy-snow.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:9f47e6de00b727163c2ffb6870af9c6b:16bfd68007c3798294c7d690e075f679:fb1e8b97806dc5c60ac6adf0ae48199b$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-icy-snow.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-icy-snow.png b/public/images/pokemon/exp/back/666-icy-snow.png index b34659ded51..332e96a6d61 100644 Binary files a/public/images/pokemon/exp/back/666-icy-snow.png and b/public/images/pokemon/exp/back/666-icy-snow.png differ diff --git a/public/images/pokemon/exp/back/666-jungle.json b/public/images/pokemon/exp/back/666-jungle.json index b2ffdb768e6..51876d649da 100644 --- a/public/images/pokemon/exp/back/666-jungle.json +++ b/public/images/pokemon/exp/back/666-jungle.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-jungle.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:4d8913bd65ce0b63c5354717532a7d60:39392afb8d9fb30f37b8d68b6cd368ad:c8686bcc5493911384853d54c85bfea1$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-jungle.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-jungle.png b/public/images/pokemon/exp/back/666-jungle.png index 8e72fdd3af6..291c6bce18c 100644 Binary files a/public/images/pokemon/exp/back/666-jungle.png and b/public/images/pokemon/exp/back/666-jungle.png differ diff --git a/public/images/pokemon/exp/back/666-marine.json b/public/images/pokemon/exp/back/666-marine.json index 6f4be700dfc..18edbc78ec0 100644 --- a/public/images/pokemon/exp/back/666-marine.json +++ b/public/images/pokemon/exp/back/666-marine.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-marine.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:b061fec5d665439da49159647e0a7d71:7cac8aa51d4531fbcf0f9ea9bf644452:dc240f0acbf3d56fe8729dd1f703009f$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-marine.png", + "format": "RGBA8888", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-marine.png b/public/images/pokemon/exp/back/666-marine.png index 91c5b1be983..9e644f0cdaa 100644 Binary files a/public/images/pokemon/exp/back/666-marine.png and b/public/images/pokemon/exp/back/666-marine.png differ diff --git a/public/images/pokemon/exp/back/666-meadow.json b/public/images/pokemon/exp/back/666-meadow.json index 737ccd7c848..0f24040bd0d 100644 --- a/public/images/pokemon/exp/back/666-meadow.json +++ b/public/images/pokemon/exp/back/666-meadow.json @@ -1,524 +1,118 @@ -{ - "textures": [ - { - "image": "666-meadow.png", - "format": "RGBA8888", - "size": { - "w": 234, - "h": 234 - }, - "scale": 1, - "frames": [ - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0023.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0024.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0005.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0006.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0021.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0022.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0007.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0008.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0019.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0020.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0009.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0010.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0017.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0018.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 0, - "y": 5, - "w": 84, - "h": 86 - }, - "frame": { - "x": 135, - "y": 0, - "w": 84, - "h": 86 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 0, - "y": 5, - "w": 84, - "h": 86 - }, - "frame": { - "x": 135, - "y": 0, - "w": 84, - "h": 86 - } - }, - { - "filename": "0011.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0012.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0015.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0016.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0013.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 20, - "y": 0, - "w": 47, - "h": 85 - }, - "frame": { - "x": 187, - "y": 86, - "w": 47, - "h": 85 - } - }, - { - "filename": "0014.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 20, - "y": 0, - "w": 47, - "h": 85 - }, - "frame": { - "x": 187, - "y": 86, - "w": 47, - "h": 85 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:49698fe6f96ff24d2fe1c7a365f79f1b:f15ccef05dfd7ebb03ac6c66ae05dcef:f8ac4807b4d6eef2256fa1b93e0f89ba$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-meadow.png b/public/images/pokemon/exp/back/666-meadow.png index d7d63b3098f..fabeb9730db 100644 Binary files a/public/images/pokemon/exp/back/666-meadow.png and b/public/images/pokemon/exp/back/666-meadow.png differ diff --git a/public/images/pokemon/exp/back/666-modern.json b/public/images/pokemon/exp/back/666-modern.json index a57b695d10b..e0a00da6d81 100644 --- a/public/images/pokemon/exp/back/666-modern.json +++ b/public/images/pokemon/exp/back/666-modern.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-modern.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:deb5b8b4295c15b4c8718bf2ed9791d1:bbe309a34a59a4e2f74eeba5769476f4:5fc0e8f9a0750c2f3cfb5d6e7eca0d45$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-modern.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-modern.png b/public/images/pokemon/exp/back/666-modern.png index 689876c3d6d..01a3981dd97 100644 Binary files a/public/images/pokemon/exp/back/666-modern.png and b/public/images/pokemon/exp/back/666-modern.png differ diff --git a/public/images/pokemon/exp/back/666-monsoon.json b/public/images/pokemon/exp/back/666-monsoon.json index 3afda85f798..117fad03b83 100644 --- a/public/images/pokemon/exp/back/666-monsoon.json +++ b/public/images/pokemon/exp/back/666-monsoon.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-monsoon.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 42, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:71a24b11bc54be921b67b4376d798e05:f5358aac113e1f7af7eddf984d9692b3:637bea52b465abfb8e5a576310b4dacc$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-monsoon.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-monsoon.png b/public/images/pokemon/exp/back/666-monsoon.png index e3cb4d2dca7..32cf2331411 100644 Binary files a/public/images/pokemon/exp/back/666-monsoon.png and b/public/images/pokemon/exp/back/666-monsoon.png differ diff --git a/public/images/pokemon/exp/back/666-ocean.json b/public/images/pokemon/exp/back/666-ocean.json index f0785703906..8d23d70cd31 100644 --- a/public/images/pokemon/exp/back/666-ocean.json +++ b/public/images/pokemon/exp/back/666-ocean.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-ocean.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:a1a0079c64e9d91336d227b1380cd9d2:cf159e4653ad9208c0f4633a498a6cd1:e7a0e68eab89c2013a3eb7f3b6fc0b33$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-ocean.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-ocean.png b/public/images/pokemon/exp/back/666-ocean.png index f60844a9b87..65665ea56c3 100644 Binary files a/public/images/pokemon/exp/back/666-ocean.png and b/public/images/pokemon/exp/back/666-ocean.png differ diff --git a/public/images/pokemon/exp/back/666-poke-ball.json b/public/images/pokemon/exp/back/666-poke-ball.json index ed04a06e7ab..45564e59a32 100644 --- a/public/images/pokemon/exp/back/666-poke-ball.json +++ b/public/images/pokemon/exp/back/666-poke-ball.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-poke-ball.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:e744396a3b647429d050d678017c05ce:ec812f719dffcd362f0481d7d83c3476:8ec14f129d1691b8da504a13b661abed$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-poke-ball.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-poke-ball.png b/public/images/pokemon/exp/back/666-poke-ball.png index eb3053e9434..895a2bf680f 100644 Binary files a/public/images/pokemon/exp/back/666-poke-ball.png and b/public/images/pokemon/exp/back/666-poke-ball.png differ diff --git a/public/images/pokemon/exp/back/666-polar.json b/public/images/pokemon/exp/back/666-polar.json index 4618d891d3f..abb6d0286f4 100644 --- a/public/images/pokemon/exp/back/666-polar.json +++ b/public/images/pokemon/exp/back/666-polar.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-polar.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 45, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 45, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 45, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 45, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 45, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 45, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:a3b0453f2d03b9c62472f57a438298a4:81a5a3455ae0c378bdb1dbe3c3323463:eb7086e98f867c6592e4b161835da18b$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-polar.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-polar.png b/public/images/pokemon/exp/back/666-polar.png index 5d09b57833c..c7ec3ec550a 100644 Binary files a/public/images/pokemon/exp/back/666-polar.png and b/public/images/pokemon/exp/back/666-polar.png differ diff --git a/public/images/pokemon/exp/back/666-river.json b/public/images/pokemon/exp/back/666-river.json index c4e5274ab6d..28912532d76 100644 --- a/public/images/pokemon/exp/back/666-river.json +++ b/public/images/pokemon/exp/back/666-river.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-river.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:2bb6d375761e6690eba12cf4d2bc99c9:9db30ec1cf68fe8c1026c243086573f3:fa23dc87fc53ba2cfa532cf440553cf5$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-river.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-river.png b/public/images/pokemon/exp/back/666-river.png index 2910340b676..4e0493b8de5 100644 Binary files a/public/images/pokemon/exp/back/666-river.png and b/public/images/pokemon/exp/back/666-river.png differ diff --git a/public/images/pokemon/exp/back/666-sandstorm.json b/public/images/pokemon/exp/back/666-sandstorm.json index cc96c2a2805..99df25242ff 100644 --- a/public/images/pokemon/exp/back/666-sandstorm.json +++ b/public/images/pokemon/exp/back/666-sandstorm.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-sandstorm.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 68, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 17, - "y": 2, - "w": 40, - "h": 68 - }, - "frame": { - "x": 67, - "y": 0, - "w": 40, - "h": 68 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 17, - "y": 2, - "w": 40, - "h": 68 - }, - "frame": { - "x": 67, - "y": 68, - "w": 40, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:e35abed8cd9d0bbf1556fa684995d930:8d765a06a769bbf3d1639f361548cd6f:12f47e779927411662912d6094a9782d$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-sandstorm.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-sandstorm.png b/public/images/pokemon/exp/back/666-sandstorm.png index 96d7084eb30..d95ab4413a5 100644 Binary files a/public/images/pokemon/exp/back/666-sandstorm.png and b/public/images/pokemon/exp/back/666-sandstorm.png differ diff --git a/public/images/pokemon/exp/back/666-savanna.json b/public/images/pokemon/exp/back/666-savanna.json index 8f85dfdeb13..8fa326da1b4 100644 --- a/public/images/pokemon/exp/back/666-savanna.json +++ b/public/images/pokemon/exp/back/666-savanna.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-savanna.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:1ad0c7c841409c3fd4cb50b399d6e13c:b9406b41d37bc72c57260f9a01a352c8:625a4f0dc001069326a75c6a381f93e6$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-savanna.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-savanna.png b/public/images/pokemon/exp/back/666-savanna.png index 7254d0f1f61..4169b1325a6 100644 Binary files a/public/images/pokemon/exp/back/666-savanna.png and b/public/images/pokemon/exp/back/666-savanna.png differ diff --git a/public/images/pokemon/exp/back/666-sun.json b/public/images/pokemon/exp/back/666-sun.json index df795f0ef0c..d41f22f541c 100644 --- a/public/images/pokemon/exp/back/666-sun.json +++ b/public/images/pokemon/exp/back/666-sun.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-sun.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:1d3a140bac5951725915aa0b64d1fdc6:e322510cf8386dcc7834a05d57e5368e:8f5fdd0a698701f5391c5a3f67e303d6$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-sun.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-sun.png b/public/images/pokemon/exp/back/666-sun.png index 84b9d76ef88..5cc814e82d7 100644 Binary files a/public/images/pokemon/exp/back/666-sun.png and b/public/images/pokemon/exp/back/666-sun.png differ diff --git a/public/images/pokemon/exp/back/666-tundra.json b/public/images/pokemon/exp/back/666-tundra.json index 92e5cf92e07..afa574f9e07 100644 --- a/public/images/pokemon/exp/back/666-tundra.json +++ b/public/images/pokemon/exp/back/666-tundra.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-tundra.png", - "format": "RGBA8888", - "size": { - "w": 136, - "h": 136 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 46, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 0, - "y": 0, - "w": 46, - "h": 69 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 46, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 46, - "y": 68, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:40f74f8757cb0f5a2ab7b5f68ea979a0:d062f67571674668b47f6fab68361105:9779ed3adebc298af537dd64dc25fe00$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-tundra.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/666-tundra.png b/public/images/pokemon/exp/back/666-tundra.png index 393ea113766..01657b339fd 100644 Binary files a/public/images/pokemon/exp/back/666-tundra.png and b/public/images/pokemon/exp/back/666-tundra.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-archipelago.json b/public/images/pokemon/exp/back/shiny/666-archipelago.json index 5207ba45af5..817696f70a1 100644 --- a/public/images/pokemon/exp/back/shiny/666-archipelago.json +++ b/public/images/pokemon/exp/back/shiny/666-archipelago.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-archipelago.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 42, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:d3b3934e858033f670ae2a24ec4d347a:f014942f9212da6fadbc8a0c94f2dc11:80cdb6dd219378a41ccf5c2acc7e7786$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-archipelago.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-archipelago.png b/public/images/pokemon/exp/back/shiny/666-archipelago.png index cfc3f0012b6..ada5bd02bdb 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-archipelago.png and b/public/images/pokemon/exp/back/shiny/666-archipelago.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-continental.json b/public/images/pokemon/exp/back/shiny/666-continental.json index a20a1baa32b..fc21deb6978 100644 --- a/public/images/pokemon/exp/back/shiny/666-continental.json +++ b/public/images/pokemon/exp/back/shiny/666-continental.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-continental.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 46, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 46, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 46, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:06c65586a6c76ae16868407b3530cc3e:c9740628cc5f7aa0301821f74d9d2e17:23aaac2256d564b9d8a58d7de70397c3$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-continental.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-continental.png b/public/images/pokemon/exp/back/shiny/666-continental.png index 80fdfbd42fe..a70b86e6f4e 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-continental.png and b/public/images/pokemon/exp/back/shiny/666-continental.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-elegant.json b/public/images/pokemon/exp/back/shiny/666-elegant.json index e4372fe6e79..35c20315153 100644 --- a/public/images/pokemon/exp/back/shiny/666-elegant.json +++ b/public/images/pokemon/exp/back/shiny/666-elegant.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-elegant.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 44, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 44, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 44, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 44, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 44, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:2f5780697c633c5f2db2d90012b0bfaa:3df5d06e71f1f48664b1d3f70b589ce5:d6b035048c66474f6236a3bc923faa7b$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-elegant.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-elegant.png b/public/images/pokemon/exp/back/shiny/666-elegant.png index a63ccd8a4fd..f1493354831 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-elegant.png and b/public/images/pokemon/exp/back/shiny/666-elegant.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-fancy.json b/public/images/pokemon/exp/back/shiny/666-fancy.json index da0238946be..54113df4b51 100644 --- a/public/images/pokemon/exp/back/shiny/666-fancy.json +++ b/public/images/pokemon/exp/back/shiny/666-fancy.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-fancy.png", - "format": "RGBA8888", - "size": { - "w": 133, - "h": 133 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 65, - "h": 66 - }, - "frame": { - "x": 0, - "y": 0, - "w": 65, - "h": 66 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 41, - "h": 67 - }, - "frame": { - "x": 65, - "y": 0, - "w": 41, - "h": 67 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 41, - "h": 67 - }, - "frame": { - "x": 0, - "y": 66, - "w": 41, - "h": 67 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 65, - "h": 66 - }, - "frame": { - "x": 41, - "y": 67, - "w": 65, - "h": 66 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:f6d28d4fec94007c70d1812b69e8c9a4:cff02079419826e1cb2148e331588d89:6d5edff9a806f43feff031c9919c9aca$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-fancy.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-fancy.png b/public/images/pokemon/exp/back/shiny/666-fancy.png index c84443bbe4e..6a50c5817a8 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-fancy.png and b/public/images/pokemon/exp/back/shiny/666-fancy.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-garden.json b/public/images/pokemon/exp/back/shiny/666-garden.json index 1a44f773e4f..4fcc5ab0ad1 100644 --- a/public/images/pokemon/exp/back/shiny/666-garden.json +++ b/public/images/pokemon/exp/back/shiny/666-garden.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-garden.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 42, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:b8e1d103e0e6ac306d2c8f447067ec3c:8483540406726b13fa42ad566b4f6991:f13a1a8fa0a411aa91fccb833ac8719c$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-garden.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-garden.png b/public/images/pokemon/exp/back/shiny/666-garden.png index b37c6f8c84e..92214cc4d75 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-garden.png and b/public/images/pokemon/exp/back/shiny/666-garden.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-high-plains.json b/public/images/pokemon/exp/back/shiny/666-high-plains.json index 898cbf94515..56a90a01899 100644 --- a/public/images/pokemon/exp/back/shiny/666-high-plains.json +++ b/public/images/pokemon/exp/back/shiny/666-high-plains.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-high-plains.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:6a10c59dc5b4abef78a2379364bae874:239b86e13316e6d8fc74b42cc7f657d9:2abdb5d19b2754e3daa24b6ff3ed2c2c$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-high-plains.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-high-plains.png b/public/images/pokemon/exp/back/shiny/666-high-plains.png index e23f879af0c..3f8840b8bf0 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-high-plains.png and b/public/images/pokemon/exp/back/shiny/666-high-plains.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-icy-snow.json b/public/images/pokemon/exp/back/shiny/666-icy-snow.json index 4922c7c1fb6..b44f33bb07f 100644 --- a/public/images/pokemon/exp/back/shiny/666-icy-snow.json +++ b/public/images/pokemon/exp/back/shiny/666-icy-snow.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-icy-snow.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:a19b20c8ff121729b5b9dfb470e1e166:abf786c03cda88b39336d9172fd788ec:fb1e8b97806dc5c60ac6adf0ae48199b$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-icy-snow.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-icy-snow.png b/public/images/pokemon/exp/back/shiny/666-icy-snow.png index 2ba96cc9ac3..1fe8305f068 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-icy-snow.png and b/public/images/pokemon/exp/back/shiny/666-icy-snow.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-jungle.json b/public/images/pokemon/exp/back/shiny/666-jungle.json index 17254038662..51876d649da 100644 --- a/public/images/pokemon/exp/back/shiny/666-jungle.json +++ b/public/images/pokemon/exp/back/shiny/666-jungle.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-jungle.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:4318d523b7ff0df47aa749ed39d81402:f7d5cbe7029fecd1e518aa0501a8c8ba:c8686bcc5493911384853d54c85bfea1$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-jungle.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-jungle.png b/public/images/pokemon/exp/back/shiny/666-jungle.png index 3f1127f0265..1dbe65c02f2 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-jungle.png and b/public/images/pokemon/exp/back/shiny/666-jungle.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-marine.json b/public/images/pokemon/exp/back/shiny/666-marine.json index 5e89662d52f..a77fd76f1dd 100644 --- a/public/images/pokemon/exp/back/shiny/666-marine.json +++ b/public/images/pokemon/exp/back/shiny/666-marine.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-marine.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 42, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:df888a902e99f6aa55c8d9a1696f30ef:5e5db402df59c188bf1aaf4cc0b516d5:dc240f0acbf3d56fe8729dd1f703009f$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-marine.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-marine.png b/public/images/pokemon/exp/back/shiny/666-marine.png index 7e1a47124b9..1a69d6587da 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-marine.png and b/public/images/pokemon/exp/back/shiny/666-marine.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-meadow.json b/public/images/pokemon/exp/back/shiny/666-meadow.json index 54e872aee05..2c4a73b80cf 100644 --- a/public/images/pokemon/exp/back/shiny/666-meadow.json +++ b/public/images/pokemon/exp/back/shiny/666-meadow.json @@ -1,524 +1,119 @@ -{ - "textures": [ - { - "image": "666-meadow.png", - "format": "RGBA8888", - "size": { - "w": 234, - "h": 234 - }, - "scale": 1, - "frames": [ - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0023.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0024.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 3, - "y": 4, - "w": 78, - "h": 87 - }, - "frame": { - "x": 0, - "y": 0, - "w": 78, - "h": 87 - } - }, - { - "filename": "0005.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0006.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0021.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0022.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 7, - "y": 3, - "w": 70, - "h": 87 - }, - "frame": { - "x": 0, - "y": 87, - "w": 70, - "h": 87 - } - }, - { - "filename": "0007.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0008.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0019.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0020.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 11, - "y": 2, - "w": 63, - "h": 87 - }, - "frame": { - "x": 70, - "y": 87, - "w": 63, - "h": 87 - } - }, - { - "filename": "0009.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0010.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0017.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0018.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 57, - "h": 87 - }, - "frame": { - "x": 78, - "y": 0, - "w": 57, - "h": 87 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 0, - "y": 5, - "w": 84, - "h": 86 - }, - "frame": { - "x": 135, - "y": 0, - "w": 84, - "h": 86 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 0, - "y": 5, - "w": 84, - "h": 86 - }, - "frame": { - "x": 135, - "y": 0, - "w": 84, - "h": 86 - } - }, - { - "filename": "0011.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0012.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0015.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0016.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 17, - "y": 0, - "w": 52, - "h": 87 - }, - "frame": { - "x": 135, - "y": 86, - "w": 52, - "h": 87 - } - }, - { - "filename": "0013.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 20, - "y": 0, - "w": 47, - "h": 85 - }, - "frame": { - "x": 187, - "y": 86, - "w": 47, - "h": 85 - } - }, - { - "filename": "0014.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 84, - "h": 91 - }, - "spriteSourceSize": { - "x": 20, - "y": 0, - "w": 47, - "h": 85 - }, - "frame": { - "x": 187, - "y": 86, - "w": 47, - "h": 85 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:217e1d90eca71c8b95407de1c156a5e6:e2b23be3d14960d78059a46f5b83304a:f8ac4807b4d6eef2256fa1b93e0f89ba$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-meadow.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-meadow.png b/public/images/pokemon/exp/back/shiny/666-meadow.png index 2e8a64be5d4..1148fa5a620 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-meadow.png and b/public/images/pokemon/exp/back/shiny/666-meadow.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-modern.json b/public/images/pokemon/exp/back/shiny/666-modern.json index c60078bd8ce..e0a00da6d81 100644 --- a/public/images/pokemon/exp/back/shiny/666-modern.json +++ b/public/images/pokemon/exp/back/shiny/666-modern.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-modern.png", - "format": "RGBA8888", - "size": { - "w": 132, - "h": 132 - }, - "scale": 1, - "frames": [ - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 40, - "h": 67 - }, - "frame": { - "x": 0, - "y": 0, - "w": 40, - "h": 67 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 40, - "h": 67 - }, - "frame": { - "x": 0, - "y": 0, - "w": 40, - "h": 67 - } - }, - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 65, - "h": 66 - }, - "frame": { - "x": 40, - "y": 0, - "w": 65, - "h": 66 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 69 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 65, - "h": 66 - }, - "frame": { - "x": 40, - "y": 66, - "w": 65, - "h": 66 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:854759536c0175b34e9ed7b2513e55dd:9fbbae33832e3b62152c5bae85714a7a:5fc0e8f9a0750c2f3cfb5d6e7eca0d45$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-modern.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-modern.png b/public/images/pokemon/exp/back/shiny/666-modern.png index f9654fbeb02..d9f109c8ef9 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-modern.png and b/public/images/pokemon/exp/back/shiny/666-modern.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-monsoon.json b/public/images/pokemon/exp/back/shiny/666-monsoon.json index 78130a47159..117fad03b83 100644 --- a/public/images/pokemon/exp/back/shiny/666-monsoon.json +++ b/public/images/pokemon/exp/back/shiny/666-monsoon.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-monsoon.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 42, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 42, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 42, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 42, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:dcde8c849851ea64b2ceed92a82153e1:5a97106b9193dc2cda01b0448d9f2637:637bea52b465abfb8e5a576310b4dacc$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-monsoon.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-monsoon.png b/public/images/pokemon/exp/back/shiny/666-monsoon.png index 5d87fc101a8..cc5279545d5 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-monsoon.png and b/public/images/pokemon/exp/back/shiny/666-monsoon.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-ocean.json b/public/images/pokemon/exp/back/shiny/666-ocean.json index 1bf44996eef..8d23d70cd31 100644 --- a/public/images/pokemon/exp/back/shiny/666-ocean.json +++ b/public/images/pokemon/exp/back/shiny/666-ocean.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-ocean.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:dc3f54a39a4afa0ea28913252050d7c1:d856dfe44678a2ee4dc3d367a6658ad3:e7a0e68eab89c2013a3eb7f3b6fc0b33$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-ocean.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-ocean.png b/public/images/pokemon/exp/back/shiny/666-ocean.png index 8c6aeca189a..caabd9302ea 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-ocean.png and b/public/images/pokemon/exp/back/shiny/666-ocean.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-poke-ball.json b/public/images/pokemon/exp/back/shiny/666-poke-ball.json index 5c8715a8a1e..45564e59a32 100644 --- a/public/images/pokemon/exp/back/shiny/666-poke-ball.json +++ b/public/images/pokemon/exp/back/shiny/666-poke-ball.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-poke-ball.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:9df25dba5036e3cd48218e8de3a98074:4357b8b161f5f87776f4d39fcb3723f5:8ec14f129d1691b8da504a13b661abed$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-poke-ball.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-poke-ball.png b/public/images/pokemon/exp/back/shiny/666-poke-ball.png index 24907a5ef9f..30e2cbf8615 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-poke-ball.png and b/public/images/pokemon/exp/back/shiny/666-poke-ball.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-polar.json b/public/images/pokemon/exp/back/shiny/666-polar.json index ef69f49e390..abb6d0286f4 100644 --- a/public/images/pokemon/exp/back/shiny/666-polar.json +++ b/public/images/pokemon/exp/back/shiny/666-polar.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-polar.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 45, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 45, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 14, - "y": 1, - "w": 45, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 45, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 45, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:aab22d39518ad2f1b1621a5954e95674:958cacbba11b25f5b1e7fe9a9a40465d:eb7086e98f867c6592e4b161835da18b$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-polar.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-polar.png b/public/images/pokemon/exp/back/shiny/666-polar.png index b2f00a2a6df..c9f4fe642ee 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-polar.png and b/public/images/pokemon/exp/back/shiny/666-polar.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-savanna.json b/public/images/pokemon/exp/back/shiny/666-savanna.json index 24638119724..8fa326da1b4 100644 --- a/public/images/pokemon/exp/back/shiny/666-savanna.json +++ b/public/images/pokemon/exp/back/shiny/666-savanna.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-savanna.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 43, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 16, - "y": 1, - "w": 43, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 43, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 43, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:0c7fd4a8c1137a2566fabe2f53dac4c4:295a7bdde494b6106f9c73b649be6098:625a4f0dc001069326a75c6a381f93e6$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-savanna.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-savanna.png b/public/images/pokemon/exp/back/shiny/666-savanna.png index 5fcf8bc6d28..a69c0c18ae1 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-savanna.png and b/public/images/pokemon/exp/back/shiny/666-savanna.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-sun.json b/public/images/pokemon/exp/back/shiny/666-sun.json index a2ccb3c82d8..d41f22f541c 100644 --- a/public/images/pokemon/exp/back/shiny/666-sun.json +++ b/public/images/pokemon/exp/back/shiny/666-sun.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-sun.png", - "format": "RGBA8888", - "size": { - "w": 135, - "h": 135 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 70 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 65, - "h": 67 - }, - "frame": { - "x": 0, - "y": 0, - "w": 65, - "h": 67 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 70 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 41, - "h": 68 - }, - "frame": { - "x": 65, - "y": 0, - "w": 41, - "h": 68 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 70 - }, - "spriteSourceSize": { - "x": 15, - "y": 1, - "w": 41, - "h": 68 - }, - "frame": { - "x": 0, - "y": 67, - "w": 41, - "h": 68 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 65, - "h": 70 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 65, - "h": 67 - }, - "frame": { - "x": 41, - "y": 68, - "w": 65, - "h": 67 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:d1400564456ce432aab0ca4f263c336a:fba76efed9d6341c0b46301efd8cd8f5:8f5fdd0a698701f5391c5a3f67e303d6$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-sun.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-sun.png b/public/images/pokemon/exp/back/shiny/666-sun.png index 28918f2b59a..3914a0fe350 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-sun.png and b/public/images/pokemon/exp/back/shiny/666-sun.png differ diff --git a/public/images/pokemon/exp/back/shiny/666-tundra.json b/public/images/pokemon/exp/back/shiny/666-tundra.json index 8361b7ca139..afa574f9e07 100644 --- a/public/images/pokemon/exp/back/shiny/666-tundra.json +++ b/public/images/pokemon/exp/back/shiny/666-tundra.json @@ -1,104 +1,119 @@ -{ - "textures": [ - { - "image": "666-tundra.png", - "format": "RGBA8888", - "size": { - "w": 137, - "h": 137 - }, - "scale": 1, - "frames": [ - { - "filename": "0001.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - }, - "frame": { - "x": 0, - "y": 0, - "w": 67, - "h": 68 - } - }, - { - "filename": "0002.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 67, - "y": 0, - "w": 46, - "h": 69 - } - }, - { - "filename": "0004.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 13, - "y": 1, - "w": 46, - "h": 69 - }, - "frame": { - "x": 0, - "y": 68, - "w": 46, - "h": 69 - } - }, - { - "filename": "0003.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 67, - "h": 71 - }, - "spriteSourceSize": { - "x": 0, - "y": 3, - "w": 67, - "h": 68 - }, - "frame": { - "x": 46, - "y": 69, - "w": 67, - "h": 68 - } - } - ] - } - ], - "meta": { - "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:b87511ba7b272729aecbf5eb18fe65cc:383836b7b2902a470e150b17bdd9bcfc:9779ed3adebc298af537dd64dc25fe00$" - } +{ "frames": [ + { + "filename": "0001.png", + "frame": { "x": 2, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0002.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0003.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0004.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0005.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0006.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0007.png", + "frame": { "x": 2, "y": 71, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 6, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0008.png", + "frame": { "x": 124, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 5, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0009.png", + "frame": { "x": 140, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 4, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0010.png", + "frame": { "x": 71, "y": 71, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 3, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0011.png", + "frame": { "x": 71, "y": 2, "w": 67, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 2, "w": 67, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + }, + { + "filename": "0012.png", + "frame": { "x": 209, "y": 2, "w": 51, "h": 67 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 8, "y": 1, "w": 51, "h": 67 }, + "sourceSize": { "w": 67, "h": 73 }, + "duration": 110 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.12-x64", + "image": "666-tundra.png", + "format": "I8", + "size": { "w": 262, "h": 140 }, + "scale": "1" + } } diff --git a/public/images/pokemon/exp/back/shiny/666-tundra.png b/public/images/pokemon/exp/back/shiny/666-tundra.png index c33fbf1fc65..78316df8a8f 100644 Binary files a/public/images/pokemon/exp/back/shiny/666-tundra.png and b/public/images/pokemon/exp/back/shiny/666-tundra.png differ diff --git a/public/images/ui/legacy/summary_bg.png b/public/images/ui/legacy/summary_bg.png index e4da2dd5da2..c482b5a1bf1 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_profile.png b/public/images/ui/legacy/summary_profile.png index 1d184023ca8..77d59dac177 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/summary_bg.png b/public/images/ui/summary_bg.png index b77cdadd2ac..a86a94dd56e 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_profile.png b/public/images/ui/summary_profile.png index 38bb5e84dfd..55cc70dc4d0 100644 Binary files a/public/images/ui/summary_profile.png and b/public/images/ui/summary_profile.png differ diff --git a/public/locales b/public/locales index 58dda14ee83..ef43efffe5f 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 58dda14ee834204c4bd5ece47694a3c068df4b0e +Subproject commit ef43efffe5fe454862c350f1b9393c3ad755bcc2 diff --git a/src/battle-scene.ts b/src/battle-scene.ts index e6649d0999a..962b9c8ca91 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -8,10 +8,37 @@ import { allSpecies, getPokemonSpecies } from "#app/data/pokemon-species"; import type { Constructor } from "#app/utils"; import { isNullOrUndefined, randSeedInt } from "#app/utils"; import * as Utils from "#app/utils"; -import type { Modifier, ModifierPredicate, TurnHeldItemTransferModifier } from "./modifier/modifier"; -import { ConsumableModifier, ConsumablePokemonModifier, DoubleBattleChanceBoosterModifier, ExpBalanceModifier, ExpShareModifier, FusePokemonModifier, HealingBoosterModifier, ModifierBar, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonFormChangeItemModifier, PokemonHeldItemModifier, PokemonHpRestoreModifier, PokemonIncrementingStatModifier, RememberMoveModifier } from "./modifier/modifier"; +import type { + Modifier, + ModifierPredicate, + TurnHeldItemTransferModifier, +} from "./modifier/modifier"; +import { + ConsumableModifier, + ConsumablePokemonModifier, + DoubleBattleChanceBoosterModifier, + ExpBalanceModifier, + ExpShareModifier, + FusePokemonModifier, + HealingBoosterModifier, + ModifierBar, + MultipleParticipantExpBonusModifier, + PersistentModifier, + PokemonExpBoosterModifier, + PokemonFormChangeItemModifier, + PokemonHeldItemModifier, + PokemonHpRestoreModifier, + PokemonIncrementingStatModifier, + RememberMoveModifier, +} from "./modifier/modifier"; import { PokeballType } from "#enums/pokeball"; -import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets, populateAnims } from "#app/data/battle-anims"; +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"; @@ -19,9 +46,29 @@ import { GameData } from "#app/system/game-data"; import { addTextObject, getTextColor, TextStyle } from "#app/ui/text"; import { allMoves } from "#app/data/move"; import { MusicPreference } from "#app/system/settings/settings"; -import { getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getModifierType, getPartyLuckValue, ModifierPoolType, modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; +import { + getDefaultModifierTypeForTier, + getEnemyModifierTypesForWave, + getLuckString, + getLuckTextTint, + getModifierPoolForType, + getModifierType, + getPartyLuckValue, + ModifierPoolType, + modifierTypes, + PokemonHeldItemModifierType, +} from "#app/modifier/modifier-type"; import AbilityBar from "#app/ui/ability-bar"; -import { allAbilities, applyAbAttrs, applyPostBattleInitAbAttrs, applyPostItemLostAbAttrs, BlockItemTheftAbAttr, DoubleBattleChanceAbAttr, PostBattleInitAbAttr, PostItemLostAbAttr } from "#app/data/ability"; +import { + allAbilities, + applyAbAttrs, + applyPostBattleInitAbAttrs, + applyPostItemLostAbAttrs, + BlockItemTheftAbAttr, + DoubleBattleChanceAbAttr, + PostBattleInitAbAttr, + PostItemLostAbAttr, +} from "#app/data/ability"; import type { FixedBattleConfig } from "#app/battle"; import Battle, { BattleType } from "#app/battle"; import type { GameMode } from "#app/game-mode"; @@ -46,8 +93,16 @@ 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, SpeciesFormChangeTrigger } from "#app/data/pokemon-forms"; -import { FormChangeItem, pokemonFormChanges, SpeciesFormChangeManualTrigger, SpeciesFormChangeTimeOfDayTrigger } from "#app/data/pokemon-forms"; +import type { + SpeciesFormChange, + SpeciesFormChangeTrigger, +} from "#app/data/pokemon-forms"; +import { + FormChangeItem, + pokemonFormChanges, + SpeciesFormChangeManualTrigger, + SpeciesFormChangeTimeOfDayTrigger, +} from "#app/data/pokemon-forms"; import { FormChangePhase } from "#app/phases/form-change-phase"; import { getTypeRgb } from "#app/data/type"; import { Type } from "#enums/type"; @@ -100,7 +155,14 @@ import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-ph import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; -import { allMysteryEncounters, ANTI_VARIANCE_WEIGHT_MODIFIER, AVERAGE_ENCOUNTERS_PER_RUN_TARGET, BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT, MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT, mysteryEncountersByBiome } from "#app/data/mystery-encounters/mystery-encounters"; +import { + allMysteryEncounters, + ANTI_VARIANCE_WEIGHT_MODIFIER, + AVERAGE_ENCOUNTERS_PER_RUN_TARGET, + BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT, + MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT, + mysteryEncountersByBiome, +} from "#app/data/mystery-encounters/mystery-encounters"; 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"; @@ -118,11 +180,11 @@ export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; const DEBUG_RNG = false; -const OPP_IVS_OVERRIDE_VALIDATED : number[] = ( - Array.isArray(Overrides.OPP_IVS_OVERRIDE) ? - Overrides.OPP_IVS_OVERRIDE : - new Array(6).fill(Overrides.OPP_IVS_OVERRIDE) -).map(iv => isNaN(iv) || iv === null || iv > 31 ? -1 : iv); +const OPP_IVS_OVERRIDE_VALIDATED: number[] = ( + Array.isArray(Overrides.OPP_IVS_OVERRIDE) + ? Overrides.OPP_IVS_OVERRIDE + : new Array(6).fill(Overrides.OPP_IVS_OVERRIDE) +).map((iv) => (isNaN(iv) || iv === null || iv > 31 ? -1 : iv)); export const startingWave = Overrides.STARTING_WAVE_OVERRIDE || 1; @@ -130,18 +192,21 @@ const expSpriteKeys: string[] = []; export let starterColors: StarterColors; interface StarterColors { - [key: string]: [string, string] + [key: string]: [string, string]; } export interface PokeballCounts { - [pb: string]: number; + [pb: string]: number; } -export type AnySound = Phaser.Sound.WebAudioSound | Phaser.Sound.HTML5AudioSound | Phaser.Sound.NoAudioSound; +export type AnySound = + | Phaser.Sound.WebAudioSound + | Phaser.Sound.HTML5AudioSound + | Phaser.Sound.NoAudioSound; export interface InfoToggle { - toggleInfo(force?: boolean): void; - isActive(): boolean; + toggleInfo(force?: boolean): void; + isActive(): boolean; } export default class BattleScene extends SceneBase { @@ -167,7 +232,8 @@ export default class BattleScene extends SceneBase { public showTimeOfDayWidget: boolean = true; public timeOfDayAnimation: EaseType = EaseType.NONE; public showLevelUpStats: boolean = true; - public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1"; + public enableTutorials: boolean = + import.meta.env.VITE_BYPASS_TUTORIAL === "1"; public enableMoveInfo: boolean = true; public enableRetries: boolean = false; public hideIvs: boolean = false; @@ -201,17 +267,17 @@ export default class BattleScene extends SceneBase { public eggSkipPreference: number = 0; /** - * Defines the experience gain display mode. - * - * @remarks - * The `expParty` can have several modes: - * - `0` - Default: The normal experience gain display, nothing changed. - * - `1` - Level Up Notification: Displays the level up in the small frame instead of a message. - * - `2` - Skip: No level up frame nor message. - * - * Modes `1` and `2` are still compatible with stats display, level up, new move, etc. - * @default 0 - Uses the default normal experience gain display. - */ + * Defines the experience gain display mode. + * + * @remarks + * The `expParty` can have several modes: + * - `0` - Default: The normal experience gain display, nothing changed. + * - `1` - Level Up Notification: Displays the level up in the small frame instead of a message. + * - `2` - Skip: No level up frame nor message. + * + * Modes `1` and `2` are still compatible with stats display, level up, new move, etc. + * @default 0 - Uses the default normal experience gain display. + */ public expParty: ExpNotification = 0; public hpBarSpeed: number = 0; public fusionPaletteSwaps: boolean = true; @@ -227,9 +293,9 @@ export default class BattleScene extends SceneBase { public battleStyle: number = BattleStyle.SWITCH; /** - * Defines whether or not to show type effectiveness hints - * - true: No hints - * - false: Show hints for moves + * Defines whether or not to show type effectiveness hints + * - true: No hints + * - false: Show hints for moves */ public typeHints: boolean = false; @@ -276,7 +342,8 @@ export default class BattleScene extends SceneBase { public pokemonInfoContainer: PokemonInfoContainer; private party: PlayerPokemon[]; /** Session save data that pertains to Mystery Encounters */ - public mysteryEncounterSaveData: MysteryEncounterSaveData = new MysteryEncounterSaveData(); + public mysteryEncounterSaveData: MysteryEncounterSaveData = + new MysteryEncounterSaveData(); /** If the previous wave was a MysteryEncounter, tracks the object with this variable. Mostly used for visual object cleanup */ public lastMysteryEncounter?: MysteryEncounter; /** Combined Biome and Wave count text */ @@ -292,7 +359,7 @@ export default class BattleScene extends SceneBase { private fieldOverlay: Phaser.GameObjects.Rectangle; private shopOverlay: Phaser.GameObjects.Rectangle; private shopOverlayShown: boolean = false; - private shopOverlayOpacity: number = .8; + private shopOverlayOpacity: number = 0.8; public modifiers: PersistentModifier[]; private enemyModifiers: PersistentModifier[]; @@ -358,19 +425,30 @@ export default class BattleScene extends SceneBase { if (variant) { atlasPath = atlasPath.replace("variant/", ""); } - this.load.atlas(key, `images/pokemon/${variant ? "variant/" : ""}${experimental ? "exp/" : ""}${atlasPath}.png`, `images/pokemon/${variant ? "variant/" : ""}${experimental ? "exp/" : ""}${atlasPath}.json`); + this.load.atlas( + key, + `images/pokemon/${variant ? "variant/" : ""}${experimental ? "exp/" : ""}${atlasPath}.png`, + `images/pokemon/${variant ? "variant/" : ""}${experimental ? "exp/" : ""}${atlasPath}.json`, + ); } /** * Load the variant assets for the given sprite and stores them in {@linkcode variantColorCache} */ - public async loadPokemonVariantAssets(spriteKey: string, fileRoot: string, variant?: Variant): Promise { - const useExpSprite = this.experimentalSprites && this.hasExpSprite(spriteKey); + public async loadPokemonVariantAssets( + spriteKey: string, + fileRoot: string, + variant?: Variant, + ): Promise { + const useExpSprite = + this.experimentalSprites && this.hasExpSprite(spriteKey); if (useExpSprite) { fileRoot = `exp/${fileRoot}`; } let variantConfig = variantData; - fileRoot.split("/").map((p) => (variantConfig ? (variantConfig = variantConfig[p]) : null)); + fileRoot + .split("/") + .map((p) => (variantConfig ? (variantConfig = variantConfig[p]) : null)); const variantSet = variantConfig as VariantSet; return new Promise((resolve) => { @@ -393,10 +471,20 @@ export default class BattleScene extends SceneBase { async preload() { if (DEBUG_RNG) { const originalRealInRange = Phaser.Math.RND.realInRange; - Phaser.Math.RND.realInRange = function (min: number, max: number): number { + Phaser.Math.RND.realInRange = function ( + min: number, + max: number, + ): number { const ret = originalRealInRange.apply(this, [ min, max ]); - const args = [ "RNG", ++this.rngCounter, ret / (max - min), `min: ${min} / max: ${max}` ]; - args.push(`seed: ${this.rngSeedOverride || this.waveSeed || this.seed}`); + const args = [ + "RNG", + ++this.rngCounter, + ret / (max - min), + `min: ${min} / max: ${max}`, + ]; + args.push( + `seed: ${this.rngSeedOverride || this.waveSeed || this.seed}`, + ); if (this.rngOffset) { args.push(`offset: ${this.rngOffset}`); } @@ -423,10 +511,16 @@ export default class BattleScene extends SceneBase { this.load.setBaseURL(); this.spritePipeline = new SpritePipeline(this.game); - (this.renderer as Phaser.Renderer.WebGL.WebGLRenderer).pipelines.add("Sprite", this.spritePipeline); + (this.renderer as Phaser.Renderer.WebGL.WebGLRenderer).pipelines.add( + "Sprite", + this.spritePipeline, + ); this.fieldSpritePipeline = new FieldSpritePipeline(this.game); - (this.renderer as Phaser.Renderer.WebGL.WebGLRenderer).pipelines.add("FieldSprite", this.fieldSpritePipeline); + (this.renderer as Phaser.Renderer.WebGL.WebGLRenderer).pipelines.add( + "FieldSprite", + this.fieldSpritePipeline, + ); this.launchBattle(); } @@ -441,7 +535,7 @@ export default class BattleScene extends SceneBase { this.arenaBgTransition = this.add.sprite(0, 0, "plains_bg"); this.arenaBgTransition.setName("sprite-arena-bg-transition"); - [ this.arenaBgTransition, this.arenaBg ].forEach(a => { + [ this.arenaBgTransition, this.arenaBg ].forEach((a) => { a.setPipeline(this.fieldSpritePipeline); a.setScale(6); a.setOrigin(0); @@ -461,13 +555,16 @@ export default class BattleScene extends SceneBase { this.fieldUI = fieldUI; - const transition = this.make.rexTransitionImagePack({ - x: 0, - y: 0, - scale: 6, - key: "loading_bg", - origin: { x: 0, y: 0 } - }, true); + const transition = this.make.rexTransitionImagePack( + { + x: 0, + y: 0, + scale: 6, + key: "loading_bg", + origin: { x: 0, y: 0 }, + }, + true, + ); //@ts-ignore (the defined types in the package are incromplete...) transition.transit({ @@ -489,14 +586,26 @@ export default class BattleScene extends SceneBase { this.uiContainer = uiContainer; const overlayWidth = this.game.canvas.width / 6; - const overlayHeight = (this.game.canvas.height / 6) - 48; - this.fieldOverlay = this.add.rectangle(0, overlayHeight * -1 - 48, overlayWidth, overlayHeight, 0x424242); + const overlayHeight = this.game.canvas.height / 6 - 48; + this.fieldOverlay = this.add.rectangle( + 0, + overlayHeight * -1 - 48, + overlayWidth, + overlayHeight, + 0x424242, + ); this.fieldOverlay.setName("rect-field-overlay"); this.fieldOverlay.setOrigin(0, 0); this.fieldOverlay.setAlpha(0); this.fieldUI.add(this.fieldOverlay); - this.shopOverlay = this.add.rectangle(0, overlayHeight * -1 - 48, overlayWidth, overlayHeight, 0x070707); + this.shopOverlay = this.add.rectangle( + 0, + overlayHeight * -1 - 48, + overlayWidth, + overlayHeight, + 0x070707, + ); this.shopOverlay.setName("rect-shop-overlay"); this.shopOverlay.setOrigin(0, 0); this.shopOverlay.setAlpha(0); @@ -547,28 +656,56 @@ export default class BattleScene extends SceneBase { this.candyBar.setup(); this.fieldUI.add(this.candyBar); - this.biomeWaveText = addTextObject((this.game.canvas.width / 6) - 2, 0, startingWave.toString(), TextStyle.BATTLE_INFO); + this.biomeWaveText = addTextObject( + this.game.canvas.width / 6 - 2, + 0, + startingWave.toString(), + TextStyle.BATTLE_INFO, + ); this.biomeWaveText.setName("text-biome-wave"); this.biomeWaveText.setOrigin(1, 0.5); this.fieldUI.add(this.biomeWaveText); - this.moneyText = addTextObject((this.game.canvas.width / 6) - 2, 0, "", TextStyle.MONEY); + this.moneyText = addTextObject( + this.game.canvas.width / 6 - 2, + 0, + "", + TextStyle.MONEY, + ); this.moneyText.setName("text-money"); this.moneyText.setOrigin(1, 0.5); this.fieldUI.add(this.moneyText); - this.scoreText = addTextObject((this.game.canvas.width / 6) - 2, 0, "", TextStyle.PARTY, { fontSize: "54px" }); + this.scoreText = addTextObject( + this.game.canvas.width / 6 - 2, + 0, + "", + TextStyle.PARTY, + { fontSize: "54px" }, + ); this.scoreText.setName("text-score"); this.scoreText.setOrigin(1, 0.5); this.fieldUI.add(this.scoreText); - this.luckText = addTextObject((this.game.canvas.width / 6) - 2, 0, "", TextStyle.PARTY, { fontSize: "54px" }); + this.luckText = addTextObject( + this.game.canvas.width / 6 - 2, + 0, + "", + TextStyle.PARTY, + { fontSize: "54px" }, + ); this.luckText.setName("text-luck"); this.luckText.setOrigin(1, 0.5); this.luckText.setVisible(false); this.fieldUI.add(this.luckText); - this.luckLabelText = addTextObject((this.game.canvas.width / 6) - 2, 0, i18next.t("common:luckIndicator"), TextStyle.PARTY, { fontSize: "54px" }); + this.luckLabelText = addTextObject( + this.game.canvas.width / 6 - 2, + 0, + i18next.t("common:luckIndicator"), + TextStyle.PARTY, + { fontSize: "54px" }, + ); this.luckLabelText.setName("text-luck-label"); this.luckLabelText.setOrigin(1, 0.5); this.luckLabelText.setVisible(false); @@ -576,7 +713,10 @@ export default class BattleScene extends SceneBase { this.arenaFlyout = new ArenaFlyout(); this.fieldUI.add(this.arenaFlyout); - this.fieldUI.moveBelow(this.arenaFlyout, this.fieldOverlay); + this.fieldUI.moveBelow( + this.arenaFlyout, + this.fieldOverlay, + ); this.updateUIPositions(); @@ -585,7 +725,10 @@ export default class BattleScene extends SceneBase { this.spriteSparkleHandler = new PokemonSpriteSparkleHandler(); this.spriteSparkleHandler.setup(); - this.pokemonInfoContainer = new PokemonInfoContainer((this.game.canvas.width / 6) + 52, -(this.game.canvas.height / 6) + 66); + this.pokemonInfoContainer = new PokemonInfoContainer( + this.game.canvas.width / 6 + 52, + -(this.game.canvas.height / 6) + 66, + ); this.pokemonInfoContainer.setup(); this.fieldUI.add(this.pokemonInfoContainer); @@ -607,14 +750,23 @@ export default class BattleScene extends SceneBase { this.arenaPlayerTransition.setVisible(false); this.arenaNextEnemy.setVisible(false); - [ this.arenaPlayer, this.arenaPlayerTransition, this.arenaEnemy, this.arenaNextEnemy ].forEach(a => { + [ + this.arenaPlayer, + this.arenaPlayerTransition, + this.arenaEnemy, + this.arenaNextEnemy, + ].forEach((a) => { if (a instanceof Phaser.GameObjects.Sprite) { a.setOrigin(0, 0); } field.add(a); }); - const trainer = this.addFieldSprite(0, 0, `trainer_${this.gameData.gender === PlayerGender.FEMALE ? "f" : "m"}_back`); + const trainer = this.addFieldSprite( + 0, + 0, + `trainer_${this.gameData.gender === PlayerGender.FEMALE ? "f" : "m"}_back`, + ); trainer.setOrigin(0.5, 1); trainer.setName("sprite-trainer"); @@ -627,16 +779,19 @@ export default class BattleScene extends SceneBase { frames: this.anims.generateFrameNumbers("prompt", { start: 1, end: 4 }), frameRate: 6, repeat: -1, - showOnStart: true + showOnStart: true, }); this.anims.create({ key: "tera_sparkle", - frames: this.anims.generateFrameNumbers("tera_sparkle", { start: 0, end: 12 }), + frames: this.anims.generateFrameNumbers("tera_sparkle", { + start: 0, + end: 12, + }), frameRate: 18, repeat: 0, showOnStart: true, - hideOnComplete: true + hideOnComplete: true, }); this.reset(false, false, true); @@ -648,13 +803,22 @@ export default class BattleScene extends SceneBase { ui.setup(); - const defaultMoves = [ Moves.TACKLE, Moves.TAIL_WHIP, Moves.FOCUS_ENERGY, Moves.STRUGGLE ]; + const defaultMoves = [ + Moves.TACKLE, + Moves.TAIL_WHIP, + Moves.FOCUS_ENERGY, + Moves.STRUGGLE, + ]; Promise.all([ Promise.all(loadPokemonAssets), initCommonAnims().then(() => loadCommonAnimAssets(true)), - Promise.all([ Moves.TACKLE, Moves.TAIL_WHIP, Moves.FOCUS_ENERGY, Moves.STRUGGLE ].map(m => initMoveAnim(m))).then(() => loadMoveAnimAssets(defaultMoves, true)), - this.initStarterColors() + Promise.all( + [ Moves.TACKLE, Moves.TAIL_WHIP, Moves.FOCUS_ENERGY, Moves.STRUGGLE ].map( + (m) => initMoveAnim(m), + ), + ).then(() => loadMoveAnimAssets(defaultMoves, true)), + this.initStarterColors(), ]).then(() => { this.pushPhase(new LoginPhase()); this.pushPhase(new TitlePhase()); @@ -688,7 +852,7 @@ export default class BattleScene extends SceneBase { if (this.lastSavePlayTime !== null) { this.lastSavePlayTime++; } - } + }, }); this.updateBiomeWaveText(); @@ -700,19 +864,22 @@ export default class BattleScene extends SceneBase { if (expSpriteKeys.length) { return; } - this.cachedFetch("./exp-sprites.json").then(res => res.json()).then(keys => { - if (Array.isArray(keys)) { - expSpriteKeys.push(...keys); - } - Promise.resolve(); - }); + this.cachedFetch("./exp-sprites.json") + .then((res) => res.json()) + .then((keys) => { + if (Array.isArray(keys)) { + expSpriteKeys.push(...keys); + } + Promise.resolve(); + }); } async initVariantData(): Promise { - Object.keys(variantData).forEach(key => delete variantData[key]); - await this.cachedFetch("./images/pokemon/variant/_masterlist.json").then(res => res.json()) - .then(v => { - Object.keys(v).forEach(k => variantData[k] = v[k]); + Object.keys(variantData).forEach((key) => delete variantData[key]); + await this.cachedFetch("./images/pokemon/variant/_masterlist.json") + .then((res) => res.json()) + .then((v) => { + Object.keys(v).forEach((k) => (variantData[k] = v[k])); if (this.experimentalSprites) { const expVariantData = variantData["exp"]; const traverseVariantData = (keys: string[]) => { @@ -722,7 +889,10 @@ export default class BattleScene extends SceneBase { if (i < keys.length - 1) { variantTree = variantTree[k]; expTree = expTree[k]; - } else if (variantTree.hasOwnProperty(k) && expTree.hasOwnProperty(k)) { + } else if ( + variantTree.hasOwnProperty(k) && + expTree.hasOwnProperty(k) + ) { if ([ "back", "female" ].includes(k)) { traverseVariantData(keys.concat(k)); } else { @@ -731,7 +901,9 @@ export default class BattleScene extends SceneBase { } }); }; - Object.keys(expVariantData).forEach(ek => traverseVariantData([ ek ])); + Object.keys(expVariantData).forEach((ek) => + traverseVariantData([ ek ]), + ); } Promise.resolve(); }); @@ -749,18 +921,20 @@ export default class BattleScene extends SceneBase { } initStarterColors(): Promise { - return new Promise(resolve => { + return new Promise((resolve) => { if (starterColors) { return resolve(); } - this.cachedFetch("./starter-colors.json").then(res => res.json()).then(sc => { - starterColors = {}; - Object.keys(sc).forEach(key => { - starterColors[key] = sc[key]; - }); + this.cachedFetch("./starter-colors.json") + .then((res) => res.json()) + .then((sc) => { + starterColors = {}; + Object.keys(sc).forEach((key) => { + starterColors[key] = sc[key]; + }); - /*const loadPokemonAssets: Promise[] = []; + /*const loadPokemonAssets: Promise[] = []; for (let s of Object.keys(speciesStarters)) { const species = getPokemonSpecies(parseInt(s)); @@ -782,13 +956,16 @@ export default class BattleScene extends SceneBase { resolve(); });*/ - resolve(); - }); + resolve(); + }); }); } hasExpSprite(key: string): boolean { - const keyMatch = /^pkmn__?(back__)?(shiny__)?(female__)?(\d+)(\-.*?)?(?:_[1-3])?$/g.exec(key); + const keyMatch = + /^pkmn__?(back__)?(shiny__)?(female__)?(\d+)(\-.*?)?(?:_[1-3])?$/g.exec( + key, + ); if (!keyMatch) { return false; } @@ -821,7 +998,7 @@ export default class BattleScene extends SceneBase { * that are {@linkcode Pokemon.isAllowedInBattle | allowed in battle}. */ public getPokemonAllowedInBattle(): PlayerPokemon[] { - return this.getPlayerParty().filter(p => p.isAllowedInBattle()); + return this.getPlayerParty().filter((p) => p.isAllowedInBattle()); } /** @@ -831,8 +1008,12 @@ export default class BattleScene extends SceneBase { * or `undefined` if there are no valid pokemon * @param includeSwitching Whether a pokemon that is currently switching out is valid, default `true` */ - public getPlayerPokemon(includeSwitching: boolean = true): PlayerPokemon | undefined { - return this.getPlayerField().find(p => p.isActive() && (includeSwitching || p.switchOutStatus === false)); + public getPlayerPokemon( + includeSwitching: boolean = true, + ): PlayerPokemon | undefined { + return this.getPlayerField().find( + (p) => p.isActive() && (includeSwitching || p.switchOutStatus === false), + ); } /** @@ -842,7 +1023,10 @@ export default class BattleScene extends SceneBase { */ public getPlayerField(): PlayerPokemon[] { const party = this.getPlayerParty(); - return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1)); + return party.slice( + 0, + Math.min(party.length, this.currentBattle?.double ? 2 : 1), + ); } public getEnemyParty(): EnemyPokemon[] { @@ -856,8 +1040,12 @@ export default class BattleScene extends SceneBase { * or `undefined` if there are no valid pokemon * @param includeSwitching Whether a pokemon that is currently switching out is valid, default `true` */ - public getEnemyPokemon(includeSwitching: boolean = true): EnemyPokemon | undefined { - return this.getEnemyField().find(p => p.isActive() && (includeSwitching || p.switchOutStatus === false)); + public getEnemyPokemon( + includeSwitching: boolean = true, + ): EnemyPokemon | undefined { + return this.getEnemyField().find( + (p) => p.isActive() && (includeSwitching || p.switchOutStatus === false), + ); } /** @@ -867,7 +1055,10 @@ export default class BattleScene extends SceneBase { */ public getEnemyField(): EnemyPokemon[] { const party = this.getEnemyParty(); - return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1)); + return party.slice( + 0, + Math.min(party.length, this.currentBattle?.double ? 2 : 1), + ); } /** @@ -882,9 +1073,7 @@ export default class BattleScene extends SceneBase { const enemyField = this.getEnemyField(); ret.splice(0, playerField.length, ...playerField); ret.splice(2, enemyField.length, ...enemyField); - return activeOnly - ? ret.filter(p => p?.isActive()) - : ret; + return activeOnly ? ret.filter((p) => p?.isActive()) : ret; } /** @@ -900,8 +1089,17 @@ export default class BattleScene extends SceneBase { if (allyPokemon?.isActive(true)) { let targetingMovePhase: MovePhase; do { - targetingMovePhase = this.findPhase(mp => mp instanceof MovePhase && mp.targets.length === 1 && mp.targets[0] === removedPokemon.getBattlerIndex() && mp.pokemon.isPlayer() !== allyPokemon.isPlayer()) as MovePhase; - if (targetingMovePhase && targetingMovePhase.targets[0] !== allyPokemon.getBattlerIndex()) { + targetingMovePhase = this.findPhase( + (mp) => + mp instanceof MovePhase && + mp.targets.length === 1 && + mp.targets[0] === removedPokemon.getBattlerIndex() && + mp.pokemon.isPlayer() !== allyPokemon.isPlayer(), + ) as MovePhase; + if ( + targetingMovePhase && + targetingMovePhase.targets[0] !== allyPokemon.getBattlerIndex() + ) { targetingMovePhase.targets[0] = allyPokemon.getBattlerIndex(); } } while (targetingMovePhase); @@ -924,16 +1122,46 @@ export default class BattleScene extends SceneBase { // return the stored info toggles; used by ui-inputs getInfoToggles(activeOnly: boolean = false): InfoToggle[] { - return activeOnly ? this.infoToggles.filter(t => t?.isActive()) : this.infoToggles; + return activeOnly + ? this.infoToggles.filter((t) => t?.isActive()) + : this.infoToggles; } getPokemonById(pokemonId: number): Pokemon | null { - const findInParty = (party: Pokemon[]) => party.find(p => p.id === pokemonId); - return (findInParty(this.getPlayerParty()) || findInParty(this.getEnemyParty())) ?? null; + const findInParty = (party: Pokemon[]) => + party.find((p) => p.id === pokemonId); + return ( + (findInParty(this.getPlayerParty()) || + findInParty(this.getEnemyParty())) ?? + null + ); } - addPlayerPokemon(species: PokemonSpecies, level: number, abilityIndex?: number, formIndex?: number, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: number[], nature?: Nature, dataSource?: Pokemon | PokemonData, postProcess?: (playerPokemon: PlayerPokemon) => void): PlayerPokemon { - const pokemon = new PlayerPokemon(species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource); + addPlayerPokemon( + species: PokemonSpecies, + level: number, + abilityIndex?: number, + formIndex?: number, + gender?: Gender, + shiny?: boolean, + variant?: Variant, + ivs?: number[], + nature?: Nature, + dataSource?: Pokemon | PokemonData, + postProcess?: (playerPokemon: PlayerPokemon) => void, + ): PlayerPokemon { + const pokemon = new PlayerPokemon( + species, + level, + abilityIndex, + formIndex, + gender, + shiny, + variant, + ivs, + nature, + dataSource, + ); if (postProcess) { postProcess(pokemon); } @@ -941,17 +1169,37 @@ export default class BattleScene extends SceneBase { return pokemon; } - addEnemyPokemon(species: PokemonSpecies, level: number, trainerSlot: TrainerSlot, boss: boolean = false, shinyLock: boolean = false, dataSource?: PokemonData, postProcess?: (enemyPokemon: EnemyPokemon) => void): EnemyPokemon { + addEnemyPokemon( + species: PokemonSpecies, + level: number, + trainerSlot: TrainerSlot, + boss: boolean = false, + shinyLock: boolean = false, + dataSource?: PokemonData, + postProcess?: (enemyPokemon: EnemyPokemon) => void, + ): EnemyPokemon { if (Overrides.OPP_LEVEL_OVERRIDE > 0) { level = Overrides.OPP_LEVEL_OVERRIDE; } if (Overrides.OPP_SPECIES_OVERRIDE) { species = getPokemonSpecies(Overrides.OPP_SPECIES_OVERRIDE); // The fact that a Pokemon is a boss or not can change based on its Species and level - boss = this.getEncounterBossSegments(this.currentBattle.waveIndex, level, species) > 1; + boss = + this.getEncounterBossSegments( + this.currentBattle.waveIndex, + level, + species, + ) > 1; } - const pokemon = new EnemyPokemon(species, level, trainerSlot, boss, shinyLock, dataSource); + const pokemon = new EnemyPokemon( + species, + level, + trainerSlot, + boss, + shinyLock, + dataSource, + ); if (Overrides.OPP_FUSION_OVERRIDE) { pokemon.generateFusionSpecies(); } @@ -960,7 +1208,13 @@ export default class BattleScene extends SceneBase { const secondaryIvs = Utils.getIvsFromId(Utils.randSeedInt(4294967296)); for (let s = 0; s < pokemon.ivs.length; s++) { - pokemon.ivs[s] = Math.round(Phaser.Math.Linear(Math.min(pokemon.ivs[s], secondaryIvs[s]), Math.max(pokemon.ivs[s], secondaryIvs[s]), 0.75)); + pokemon.ivs[s] = Math.round( + Phaser.Math.Linear( + Math.min(pokemon.ivs[s], secondaryIvs[s]), + Math.max(pokemon.ivs[s], secondaryIvs[s]), + 0.75, + ), + ); } } if (postProcess) { @@ -983,7 +1237,10 @@ export default class BattleScene extends SceneBase { * @param pokemon * @param destroy Default true. If true, will destroy the {@linkcode PlayerPokemon} after removing */ - removePokemonFromPlayerParty(pokemon: PlayerPokemon, destroy: boolean = true) { + removePokemonFromPlayerParty( + pokemon: PlayerPokemon, + destroy: boolean = true, + ) { if (!pokemon) { return; } @@ -997,7 +1254,14 @@ export default class BattleScene extends SceneBase { this.updateModifiers(true); } - addPokemonIcon(pokemon: Pokemon, x: number, y: number, originX: number = 0.5, originY: number = 0.5, ignoreOverride: boolean = false): Phaser.GameObjects.Container { + addPokemonIcon( + pokemon: Pokemon, + x: number, + y: number, + originX: number = 0.5, + originY: number = 0.5, + ignoreOverride: boolean = false, + ): Phaser.GameObjects.Container { const container = this.add.container(x, y); container.setName(`${pokemon.name}-icon`); @@ -1006,7 +1270,9 @@ export default class BattleScene extends SceneBase { icon.setFrame(pokemon.getIconId(true)); // Temporary fix to show pokemon's default icon if variant icon doesn't exist if (icon.frame.name !== pokemon.getIconId(true)) { - console.log(`${pokemon.name}'s variant icon does not exist. Replacing with default.`); + console.log( + `${pokemon.name}'s variant icon does not exist. Replacing with default.`, + ); const temp = pokemon.shiny; pokemon.shiny = false; icon.setTexture(pokemon.getIconAtlasKey(ignoreOverride)); @@ -1018,7 +1284,11 @@ export default class BattleScene extends SceneBase { container.add(icon); if (pokemon.isFusion()) { - const fusionIcon = this.add.sprite(0, 0, pokemon.getFusionIconAtlasKey(ignoreOverride)); + const fusionIcon = this.add.sprite( + 0, + 0, + pokemon.getFusionIconAtlasKey(ignoreOverride), + ); fusionIcon.setName("sprite-fusion-icon"); fusionIcon.setOrigin(0.5, 0); fusionIcon.setFrame(pokemon.getFusionIconId(true)); @@ -1027,13 +1297,24 @@ export default class BattleScene extends SceneBase { const originalHeight = icon.height; const originalFrame = icon.frame; - const iconHeight = (icon.frame.cutHeight <= fusionIcon.frame.cutHeight ? Math.ceil : Math.floor)((icon.frame.cutHeight + fusionIcon.frame.cutHeight) / 4); + const iconHeight = ( + icon.frame.cutHeight <= fusionIcon.frame.cutHeight + ? Math.ceil + : Math.floor + )((icon.frame.cutHeight + fusionIcon.frame.cutHeight) / 4); // Inefficient, but for some reason didn't work with only the unique properties as part of the name const iconFrameId = `${icon.frame.name}f${fusionIcon.frame.name}`; if (!icon.frame.texture.has(iconFrameId)) { - icon.frame.texture.add(iconFrameId, icon.frame.sourceIndex, icon.frame.cutX, icon.frame.cutY, icon.frame.cutWidth, iconHeight); + icon.frame.texture.add( + iconFrameId, + icon.frame.sourceIndex, + icon.frame.cutX, + icon.frame.cutY, + icon.frame.cutWidth, + iconHeight, + ); } icon.setFrame(iconFrameId); @@ -1043,13 +1324,21 @@ export default class BattleScene extends SceneBase { const originalFusionFrame = fusionIcon.frame; const fusionIconY = fusionIcon.frame.cutY + icon.frame.cutHeight; - const fusionIconHeight = fusionIcon.frame.cutHeight - icon.frame.cutHeight; + const fusionIconHeight = + fusionIcon.frame.cutHeight - icon.frame.cutHeight; // Inefficient, but for some reason didn't work with only the unique properties as part of the name const fusionIconFrameId = `${fusionIcon.frame.name}f${icon.frame.name}`; if (!fusionIcon.frame.texture.has(fusionIconFrameId)) { - fusionIcon.frame.texture.add(fusionIconFrameId, fusionIcon.frame.sourceIndex, fusionIcon.frame.cutX, fusionIconY, fusionIcon.frame.cutWidth, fusionIconHeight); + fusionIcon.frame.texture.add( + fusionIconFrameId, + fusionIcon.frame.sourceIndex, + fusionIcon.frame.cutX, + fusionIconY, + fusionIcon.frame.cutWidth, + fusionIconHeight, + ); } fusionIcon.setFrame(fusionIconFrameId); @@ -1062,7 +1351,7 @@ export default class BattleScene extends SceneBase { container.x -= originalWidth * (originX - 0.5); } if (originY !== 0) { - container.y -= (originalHeight) * originY; + container.y -= originalHeight * originY; } } else { if (originX !== 0.5) { @@ -1097,7 +1386,11 @@ export default class BattleScene extends SceneBase { return this.currentBattle?.randSeedInt(range, min); } - reset(clearScene: boolean = false, clearData: boolean = false, reloadI18n: boolean = false): void { + reset( + clearScene: boolean = false, + clearData: boolean = false, + reloadI18n: boolean = false, + ): void { if (clearData) { this.gameData = new GameData(); } @@ -1111,7 +1404,11 @@ export default class BattleScene extends SceneBase { this.lockModifierTiers = false; - this.pokeballCounts = Object.fromEntries(Utils.getEnumValues(PokeballType).filter(p => p <= PokeballType.MASTER_BALL).map(t => [ t, 0 ])); + this.pokeballCounts = Object.fromEntries( + Utils.getEnumValues(PokeballType) + .filter((p) => p <= PokeballType.MASTER_BALL) + .map((t) => [ t, 0 ]), + ); this.pokeballCounts[PokeballType.POKEBALL] += 5; if (Overrides.POKEBALL_OVERRIDE.active) { this.pokeballCounts = Overrides.POKEBALL_OVERRIDE.pokeballs; @@ -1132,7 +1429,10 @@ export default class BattleScene extends SceneBase { // If this is a ME, clear any residual visual sprites before reloading if (this.currentBattle?.mysteryEncounter?.introVisuals) { - this.field.remove(this.currentBattle.mysteryEncounter?.introVisuals, true); + this.field.remove( + this.currentBattle.mysteryEncounter?.introVisuals, + true, + ); } //@ts-ignore - allowing `null` for currentBattle causes a lot of trouble @@ -1153,7 +1453,7 @@ export default class BattleScene extends SceneBase { this.updateScoreText(); this.scoreText.setVisible(false); - [ this.luckLabelText, this.luckText ].map(t => t.setVisible(false)); + [ this.luckLabelText, this.luckText ].map((t) => t.setVisible(false)); this.newArena(Overrides.STARTING_BIOME_OVERRIDE || Biome.TOWN); @@ -1162,12 +1462,16 @@ export default class BattleScene extends SceneBase { this.arenaBgTransition.setPosition(0, 0); this.arenaPlayer.setPosition(300, 0); this.arenaPlayerTransition.setPosition(0, 0); - [ this.arenaEnemy, this.arenaNextEnemy ].forEach(a => a.setPosition(-280, 0)); + [ this.arenaEnemy, this.arenaNextEnemy ].forEach((a) => + a.setPosition(-280, 0), + ); this.arenaNextEnemy.setVisible(false); this.arena.init(); - this.trainer.setTexture(`trainer_${this.gameData.gender === PlayerGender.FEMALE ? "f" : "m"}_back`); + this.trainer.setTexture( + `trainer_${this.gameData.gender === PlayerGender.FEMALE ? "f" : "m"}_back`, + ); this.trainer.setPosition(406, 186); this.trainer.setVisible(true); @@ -1180,7 +1484,16 @@ export default class BattleScene extends SceneBase { ...allSpecies, ...allMoves, ...allAbilities, - ...Utils.getEnumValues(ModifierPoolType).map(mpt => getModifierPoolForType(mpt)).map(mp => Object.values(mp).flat().map(mt => mt.modifierType).filter(mt => "localize" in mt).map(lpb => lpb as unknown as Localizable)).flat() + ...Utils.getEnumValues(ModifierPoolType) + .map((mpt) => getModifierPoolForType(mpt)) + .map((mp) => + Object.values(mp) + .flat() + .map((mt) => mt.modifierType) + .filter((mt) => "localize" in mt) + .map((lpb) => lpb as unknown as Localizable), + ) + .flat(), ]; for (const item of localizable) { item.localize(); @@ -1206,21 +1519,32 @@ export default class BattleScene extends SceneBase { this.children.removeAll(true); this.game.domContainer.innerHTML = ""; this.launchBattle(); - } + }, }); } } getDoubleBattleChance(newWaveIndex: number, playerField: PlayerPokemon[]) { - const doubleChance = new Utils.NumberHolder(newWaveIndex % 10 === 0 ? 32 : 8); + const doubleChance = new Utils.NumberHolder( + newWaveIndex % 10 === 0 ? 32 : 8, + ); this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance); - playerField.forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, false, doubleChance)); + playerField.forEach((p) => + applyAbAttrs(DoubleBattleChanceAbAttr, p, null, false, doubleChance), + ); return Math.max(doubleChance.value, 1); } - newBattle(waveIndex?: number, battleType?: BattleType, trainerData?: TrainerData, double?: boolean, mysteryEncounterType?: MysteryEncounterType): Battle | null { + newBattle( + waveIndex?: number, + battleType?: BattleType, + trainerData?: TrainerData, + double?: boolean, + mysteryEncounterType?: MysteryEncounterType, + ): Battle | null { const _startingWave = Overrides.STARTING_WAVE_OVERRIDE || startingWave; - const newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (_startingWave - 1)) + 1); + const newWaveIndex = + waveIndex || (this.currentBattle?.waveIndex || _startingWave - 1) + 1; let newDouble: boolean | undefined; let newBattleType: BattleType; let newTrainer: Trainer | undefined; @@ -1231,11 +1555,17 @@ export default class BattleScene extends SceneBase { const playerField = this.getPlayerField(); - if (this.gameMode.isFixedBattle(newWaveIndex) && trainerData === undefined) { + if ( + this.gameMode.isFixedBattle(newWaveIndex) && + trainerData === undefined + ) { battleConfig = this.gameMode.getFixedBattle(newWaveIndex); newDouble = battleConfig.double; newBattleType = battleConfig.battleType; - this.executeWithSeedOffset(() => newTrainer = battleConfig?.getTrainer(), (battleConfig.seedOffsetWaveIndex || newWaveIndex) << 8); + this.executeWithSeedOffset( + () => (newTrainer = battleConfig?.getTrainer()), + (battleConfig.seedOffsetWaveIndex || newWaveIndex) << 8, + ); if (newTrainer) { this.field.add(newTrainer); } @@ -1243,7 +1573,9 @@ export default class BattleScene extends SceneBase { if (!this.gameMode.hasTrainers) { newBattleType = BattleType.WILD; } else if (battleType === undefined) { - newBattleType = this.gameMode.isWaveTrainer(newWaveIndex, this.arena) ? BattleType.TRAINER : BattleType.WILD; + newBattleType = this.gameMode.isWaveTrainer(newWaveIndex, this.arena) + ? BattleType.TRAINER + : BattleType.WILD; } else { newBattleType = battleType; } @@ -1254,29 +1586,50 @@ export default class BattleScene extends SceneBase { if (trainerConfigs[trainerType].doubleOnly) { doubleTrainer = true; } else if (trainerConfigs[trainerType].hasDouble) { - doubleTrainer = !Utils.randSeedInt(this.getDoubleBattleChance(newWaveIndex, playerField)); + doubleTrainer = !Utils.randSeedInt( + this.getDoubleBattleChance(newWaveIndex, playerField), + ); // Add a check that special trainers can't be double except for tate and liza - they should use the normal double chance - if (trainerConfigs[trainerType].trainerTypeDouble && ![ TrainerType.TATE, TrainerType.LIZA ].includes(trainerType)) { + if ( + trainerConfigs[trainerType].trainerTypeDouble && + ![ TrainerType.TATE, TrainerType.LIZA ].includes(trainerType) + ) { doubleTrainer = false; } } - const variant = doubleTrainer ? TrainerVariant.DOUBLE : (Utils.randSeedInt(2) ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT); - newTrainer = trainerData !== undefined ? trainerData.toTrainer() : new Trainer(trainerType, variant); + const variant = doubleTrainer + ? TrainerVariant.DOUBLE + : Utils.randSeedInt(2) + ? TrainerVariant.FEMALE + : TrainerVariant.DEFAULT; + newTrainer = + trainerData !== undefined + ? trainerData.toTrainer() + : new Trainer(trainerType, variant); this.field.add(newTrainer); } // Check for mystery encounter // Can only occur in place of a standard (non-boss) wild battle, waves 10-180 - if (this.isWaveMysteryEncounter(newBattleType, newWaveIndex) || newBattleType === BattleType.MYSTERY_ENCOUNTER) { + if ( + this.isWaveMysteryEncounter(newBattleType, newWaveIndex) || + newBattleType === BattleType.MYSTERY_ENCOUNTER + ) { newBattleType = BattleType.MYSTERY_ENCOUNTER; // Reset to base spawn weight - this.mysteryEncounterSaveData.encounterSpawnChance = BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT; + this.mysteryEncounterSaveData.encounterSpawnChance = + BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT; } } if (double === undefined && newWaveIndex > 1) { - if (newBattleType === BattleType.WILD && !this.gameMode.isWaveFinal(newWaveIndex)) { - newDouble = !Utils.randSeedInt(this.getDoubleBattleChance(newWaveIndex, playerField)); + if ( + newBattleType === BattleType.WILD && + !this.gameMode.isWaveFinal(newWaveIndex) + ) { + newDouble = !Utils.randSeedInt( + this.getDoubleBattleChance(newWaveIndex, playerField), + ); } else if (newBattleType === BattleType.TRAINER) { newDouble = newTrainer?.variant === TrainerVariant.DOUBLE; } @@ -1300,10 +1653,10 @@ export default class BattleScene extends SceneBase { doubleOverrideForWave = "single"; break; case "even-doubles": - doubleOverrideForWave = (newWaveIndex % 2) ? "single" : "double"; + doubleOverrideForWave = newWaveIndex % 2 ? "single" : "double"; break; case "odd-doubles": - doubleOverrideForWave = (newWaveIndex % 2) ? "double" : "single"; + doubleOverrideForWave = newWaveIndex % 2 ? "double" : "single"; break; } @@ -1314,7 +1667,10 @@ export default class BattleScene extends SceneBase { * Override battles into single only if not fighting with trainers. * @see {@link https://github.com/pagefaultgames/pokerogue/issues/1948 | GitHub Issue #1948} */ - if (newBattleType !== BattleType.TRAINER && doubleOverrideForWave === "single") { + if ( + newBattleType !== BattleType.TRAINER && + doubleOverrideForWave === "single" + ) { newDouble = false; } } @@ -1332,13 +1688,25 @@ export default class BattleScene extends SceneBase { } if (lastBattle?.double && !newDouble) { - this.tryRemovePhase(p => p instanceof SwitchPhase); - this.getPlayerField().forEach(p => p.lapseTag(BattlerTagType.COMMANDED)); + this.tryRemovePhase((p) => p instanceof SwitchPhase); + this.getPlayerField().forEach((p) => + p.lapseTag(BattlerTagType.COMMANDED), + ); } - this.executeWithSeedOffset(() => { - this.currentBattle = new Battle(this.gameMode, newWaveIndex, newBattleType, newTrainer, newDouble); - }, newWaveIndex << 3, this.waveSeed); + this.executeWithSeedOffset( + () => { + this.currentBattle = new Battle( + this.gameMode, + newWaveIndex, + newBattleType, + newTrainer, + newDouble, + ); + }, + newWaveIndex << 3, + this.waveSeed, + ); this.currentBattle.incrementTurn(); if (newBattleType === BattleType.MYSTERY_ENCOUNTER) { @@ -1350,20 +1718,33 @@ export default class BattleScene extends SceneBase { if (!waveIndex && lastBattle) { const isWaveIndexMultipleOfTen = !(lastBattle.waveIndex % 10); - const isEndlessOrDaily = this.gameMode.hasShortBiomes || this.gameMode.isDaily; - const isEndlessFifthWave = this.gameMode.hasShortBiomes && (lastBattle.waveIndex % 5) === 0; - const isWaveIndexMultipleOfFiftyMinusOne = (lastBattle.waveIndex % 50) === 49; - const isNewBiome = isWaveIndexMultipleOfTen || isEndlessFifthWave || (isEndlessOrDaily && isWaveIndexMultipleOfFiftyMinusOne); - const resetArenaState = isNewBiome || [ BattleType.TRAINER, BattleType.MYSTERY_ENCOUNTER ].includes(this.currentBattle.battleType) || this.currentBattle.battleSpec === BattleSpec.FINAL_BOSS; - this.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy()); + const isEndlessOrDaily = + this.gameMode.hasShortBiomes || this.gameMode.isDaily; + const isEndlessFifthWave = + this.gameMode.hasShortBiomes && lastBattle.waveIndex % 5 === 0; + const isWaveIndexMultipleOfFiftyMinusOne = + lastBattle.waveIndex % 50 === 49; + const isNewBiome = + isWaveIndexMultipleOfTen || + isEndlessFifthWave || + (isEndlessOrDaily && isWaveIndexMultipleOfFiftyMinusOne); + const resetArenaState = + isNewBiome || + [ BattleType.TRAINER, BattleType.MYSTERY_ENCOUNTER ].includes( + this.currentBattle.battleType, + ) || + this.currentBattle.battleSpec === BattleSpec.FINAL_BOSS; + this.getEnemyParty().forEach((enemyPokemon) => enemyPokemon.destroy()); this.trySpreadPokerus(); - if (!isNewBiome && (newWaveIndex % 10) === 5) { + if (!isNewBiome && newWaveIndex % 10 === 5) { this.arena.updatePoolsForTimeOfDay(); } if (resetArenaState) { this.arena.resetArenaEffects(); - playerField.forEach((pokemon) => pokemon.lapseTag(BattlerTagType.COMMANDED)); + playerField.forEach((pokemon) => + pokemon.lapseTag(BattlerTagType.COMMANDED), + ); playerField.forEach((pokemon, p) => { if (pokemon.isOnField()) { @@ -1375,7 +1756,12 @@ export default class BattleScene extends SceneBase { pokemon.resetBattleData(); pokemon.resetTera(); applyPostBattleInitAbAttrs(PostBattleInitAbAttr, pokemon); - if (pokemon.hasSpecies(Species.TERAPAGOS) || (this.gameMode.isClassic && this.currentBattle.waveIndex > 180 && this.currentBattle.waveIndex <= 190)) { + if ( + pokemon.hasSpecies(Species.TERAPAGOS) || + (this.gameMode.isClassic && + this.currentBattle.waveIndex > 180 && + this.currentBattle.waveIndex <= 190) + ) { this.arena.playerTerasUsed = 0; } } @@ -1386,7 +1772,10 @@ export default class BattleScene extends SceneBase { } for (const pokemon of this.getPlayerParty()) { - this.triggerPokemonFormChange(pokemon, SpeciesFormChangeTimeOfDayTrigger); + this.triggerPokemonFormChange( + pokemon, + SpeciesFormChangeTimeOfDayTrigger, + ); } if (!this.gameMode.hasRandomBiomes && !isNewBiome) { @@ -1409,23 +1798,35 @@ export default class BattleScene extends SceneBase { this.arena = new Arena(biome, Biome[biome].toLowerCase(), playerFaints); this.eventTarget.dispatchEvent(new NewArenaEvent()); - this.arenaBg.pipelineData = { terrainColorRatio: this.arena.getBgTerrainColorRatioForBiome() }; + this.arenaBg.pipelineData = { + terrainColorRatio: this.arena.getBgTerrainColorRatioForBiome(), + }; return this.arena; } updateFieldScale(): Promise { - return new Promise(resolve => { - const fieldScale = Math.floor(Math.pow(1 / this.getField(true) - .map(p => p.getSpriteScale()) - .reduce((highestScale: number, scale: number) => highestScale = Math.max(scale, highestScale), 0), 0.7) * 40 - ) / 40; + return new Promise((resolve) => { + const fieldScale = + Math.floor( + Math.pow( + 1 / + this.getField(true) + .map((p) => p.getSpriteScale()) + .reduce( + (highestScale: number, scale: number) => + (highestScale = Math.max(scale, highestScale)), + 0, + ), + 0.7, + ) * 40, + ) / 40; this.setFieldScale(fieldScale).then(() => resolve()); }); } setFieldScale(scale: number, instant: boolean = false): Promise { - return new Promise(resolve => { + return new Promise((resolve) => { scale *= 6; if (this.field.scale === scale) { return resolve(); @@ -1441,19 +1842,28 @@ export default class BattleScene extends SceneBase { scale: scale, x: (defaultWidth - scaledWidth) / 2, y: defaultHeight - scaledHeight, - duration: !instant ? Utils.fixedInt(Math.abs(this.field.scale - scale) * 200) : 0, + duration: !instant + ? Utils.fixedInt(Math.abs(this.field.scale - scale) * 200) + : 0, ease: "Sine.easeInOut", - onComplete: () => resolve() + onComplete: () => resolve(), }); }); } - getSpeciesFormIndex(species: PokemonSpecies, gender?: Gender, nature?: Nature, ignoreArena?: boolean): number { + getSpeciesFormIndex( + species: PokemonSpecies, + gender?: Gender, + nature?: Nature, + ignoreArena?: boolean, + ): number { if (!species.forms?.length) { return 0; } - const isEggPhase: boolean = [ "EggLapsePhase", "EggHatchPhase" ].includes(this.getCurrentPhase()?.constructor.name ?? ""); + const isEggPhase: boolean = [ "EggLapsePhase", "EggHatchPhase" ].includes( + this.getCurrentPhase()?.constructor.name ?? "", + ); switch (species.speciesId) { case Species.UNOWN: @@ -1481,12 +1891,19 @@ export default class BattleScene extends SceneBase { case Species.PALDEA_TAUROS: return Utils.randSeedInt(species.forms.length); case Species.PIKACHU: - if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30) { + if ( + this.currentBattle?.battleType === BattleType.TRAINER && + this.currentBattle?.waveIndex < 30 + ) { return 0; // Ban Cosplay and Partner Pika from Trainers before wave 30 } return Utils.randSeedInt(8); case Species.EEVEE: - if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30 && !isEggPhase) { + if ( + this.currentBattle?.battleType === BattleType.TRAINER && + this.currentBattle?.waveIndex < 30 && + !isEggPhase + ) { return 0; // No Partner Eevee for Wave 12 Preschoolers } return Utils.randSeedInt(2); @@ -1509,13 +1926,26 @@ export default class BattleScene extends SceneBase { case Species.OINKOLOGNE: return gender === Gender.FEMALE ? 1 : 0; case Species.TOXTRICITY: - const lowkeyNatures = [ Nature.LONELY, Nature.BOLD, Nature.RELAXED, Nature.TIMID, Nature.SERIOUS, Nature.MODEST, Nature.MILD, Nature.QUIET, Nature.BASHFUL, Nature.CALM, Nature.GENTLE, Nature.CAREFUL ]; + const lowkeyNatures = [ + Nature.LONELY, + Nature.BOLD, + Nature.RELAXED, + Nature.TIMID, + Nature.SERIOUS, + Nature.MODEST, + Nature.MILD, + Nature.QUIET, + Nature.BASHFUL, + Nature.CALM, + Nature.GENTLE, + Nature.CAREFUL, + ]; if (nature !== undefined && lowkeyNatures.indexOf(nature) > -1) { return 1; } return 0; case Species.GIMMIGHOUL: - // Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs + // Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs if (this.gameMode.hasMysteryEncounters && !isEggPhase) { return 1; // Wandering form } else { @@ -1539,21 +1969,34 @@ export default class BattleScene extends SceneBase { private getGeneratedOffsetGym(): boolean { let ret = false; - this.executeWithSeedOffset(() => { - ret = !Utils.randSeedInt(2); - }, 0, this.seed.toString()); + this.executeWithSeedOffset( + () => { + ret = !Utils.randSeedInt(2); + }, + 0, + this.seed.toString(), + ); return ret; } private getGeneratedWaveCycleOffset(): number { let ret = 0; - this.executeWithSeedOffset(() => { - ret = Utils.randSeedInt(8) * 5; - }, 0, this.seed.toString()); + this.executeWithSeedOffset( + () => { + ret = Utils.randSeedInt(8) * 5; + }, + 0, + this.seed.toString(), + ); return ret; } - getEncounterBossSegments(waveIndex: number, level: number, species?: PokemonSpecies, forceBoss: boolean = false): number { + getEncounterBossSegments( + waveIndex: number, + level: number, + species?: PokemonSpecies, + forceBoss: boolean = false, + ): number { if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE > 1) { return Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE; } else if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE === 1) { @@ -1566,11 +2009,19 @@ export default class BattleScene extends SceneBase { } let isBoss: boolean | undefined; - if (forceBoss || (species && (species.subLegendary || species.legendary || species.mythical))) { + if ( + forceBoss || + (species && + (species.subLegendary || species.legendary || species.mythical)) + ) { isBoss = true; } else { this.executeWithSeedOffset(() => { - isBoss = waveIndex % 10 === 0 || (this.gameMode.hasRandomBosses && Utils.randSeedInt(100) < Math.min(Math.max(Math.ceil((waveIndex - 250) / 50), 0) * 2, 30)); + isBoss = + waveIndex % 10 === 0 || + (this.gameMode.hasRandomBosses && + Utils.randSeedInt(100) < + Math.min(Math.max(Math.ceil((waveIndex - 250) / 50), 0) * 2, 30)); }, waveIndex << 2); } if (!isBoss) { @@ -1607,14 +2058,17 @@ export default class BattleScene extends SceneBase { return; } - this.executeWithSeedOffset(() => { - if (p) { - spread(p, -1); - } - if (p < party.length - 1) { - spread(p, 1); - } - }, this.currentBattle.waveIndex + (p << 8)); + this.executeWithSeedOffset( + () => { + if (p) { + spread(p, -1); + } + if (p < party.length - 1) { + spread(p, 1); + } + }, + this.currentBattle.waveIndex + (p << 8), + ); }); } @@ -1626,7 +2080,11 @@ export default class BattleScene extends SceneBase { this.rngCounter = 0; } - executeWithSeedOffset(func: Function, offset: number, seedOverride?: string): void { + executeWithSeedOffset( + func: Function, + offset: number, + seedOverride?: string, + ): void { if (!func) { return; } @@ -1634,7 +2092,9 @@ export default class BattleScene extends SceneBase { const tempRngOffset = this.rngOffset; const tempRngSeedOverride = this.rngSeedOverride; const state = Phaser.Math.RND.state(); - Phaser.Math.RND.sow([ Utils.shiftCharCodes(seedOverride || this.seed, offset) ]); + Phaser.Math.RND.sow([ + Utils.shiftCharCodes(seedOverride || this.seed, offset), + ]); this.rngCounter = 0; this.rngOffset = offset; this.rngSeedOverride = seedOverride || ""; @@ -1645,7 +2105,13 @@ export default class BattleScene extends SceneBase { this.rngSeedOverride = tempRngSeedOverride; } - addFieldSprite(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, terrainColorRatio: number = 0): Phaser.GameObjects.Sprite { + addFieldSprite( + x: number, + y: number, + texture: string | Phaser.Textures.Texture, + frame?: string | number, + terrainColorRatio: number = 0, + ): Phaser.GameObjects.Sprite { const ret = this.add.sprite(x, y, texture, frame); ret.setPipeline(this.fieldSpritePipeline); if (terrainColorRatio) { @@ -1655,14 +2121,33 @@ export default class BattleScene extends SceneBase { return ret; } - addPokemonSprite(pokemon: Pokemon, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, hasShadow: boolean = false, ignoreOverride: boolean = false): Phaser.GameObjects.Sprite { + addPokemonSprite( + pokemon: Pokemon, + x: number, + y: number, + texture: string | Phaser.Textures.Texture, + frame?: string | number, + hasShadow: boolean = false, + ignoreOverride: boolean = false, + ): Phaser.GameObjects.Sprite { const ret = this.addFieldSprite(x, y, texture, frame); this.initPokemonSprite(ret, pokemon, hasShadow, ignoreOverride); return ret; } - initPokemonSprite(sprite: Phaser.GameObjects.Sprite, pokemon?: Pokemon, hasShadow: boolean = false, ignoreOverride: boolean = false): Phaser.GameObjects.Sprite { - sprite.setPipeline(this.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], hasShadow: hasShadow, ignoreOverride: ignoreOverride, teraColor: pokemon ? getTypeRgb(pokemon.getTeraType()) : undefined, isTerastallized: pokemon ? pokemon.isTerastallized : false }); + initPokemonSprite( + sprite: Phaser.GameObjects.Sprite, + pokemon?: Pokemon, + hasShadow: boolean = false, + ignoreOverride: boolean = false, + ): Phaser.GameObjects.Sprite { + sprite.setPipeline(this.spritePipeline, { + tone: [ 0.0, 0.0, 0.0, 0.0 ], + hasShadow: hasShadow, + ignoreOverride: ignoreOverride, + teraColor: pokemon ? getTypeRgb(pokemon.getTeraType()) : undefined, + isTerastallized: pokemon ? pokemon.isTerastallized : false, + }); this.spriteSparkleHandler.add(sprite); return sprite; } @@ -1675,25 +2160,25 @@ export default class BattleScene extends SceneBase { } showFieldOverlay(duration: number): Promise { - return new Promise(resolve => { + return new Promise((resolve) => { this.tweens.add({ targets: this.fieldOverlay, alpha: 0.5, ease: "Sine.easeOut", duration: duration, - onComplete: () => resolve() + onComplete: () => resolve(), }); }); } hideFieldOverlay(duration: number): Promise { - return new Promise(resolve => { + return new Promise((resolve) => { this.tweens.add({ targets: this.fieldOverlay, alpha: 0, duration: duration, ease: "Cubic.easeIn", - onComplete: () => resolve() + onComplete: () => resolve(), }); }); } @@ -1708,26 +2193,26 @@ export default class BattleScene extends SceneBase { showShopOverlay(duration: number): Promise { this.shopOverlayShown = true; - return new Promise(resolve => { + return new Promise((resolve) => { this.tweens.add({ targets: this.shopOverlay, alpha: this.shopOverlayOpacity, ease: "Sine.easeOut", duration, - onComplete: () => resolve() + onComplete: () => resolve(), }); }); } hideShopOverlay(duration: number): Promise { this.shopOverlayShown = false; - return new Promise(resolve => { + return new Promise((resolve) => { this.tweens.add({ targets: this.shopOverlay, alpha: 0, duration: duration, ease: "Cubic.easeIn", - onComplete: () => resolve() + onComplete: () => resolve(), }); }); } @@ -1744,7 +2229,9 @@ export default class BattleScene extends SceneBase { const isBoss = !(this.currentBattle.waveIndex % 10); const biomeString: string = getBiomeName(this.arena.biomeType); this.fieldUI.moveAbove(this.biomeWaveText, this.luckText); - this.biomeWaveText.setText( biomeString + " - " + this.currentBattle.waveIndex.toString()); + this.biomeWaveText.setText( + biomeString + " - " + this.currentBattle.waveIndex.toString(), + ); this.biomeWaveText.setColor(!isBoss ? "#ffffff" : "#f89890"); this.biomeWaveText.setShadowColor(!isBoss ? "#636363" : "#984038"); this.biomeWaveText.setVisible(true); @@ -1755,7 +2242,9 @@ export default class BattleScene extends SceneBase { return; } const formattedMoney = Utils.formatMoney(this.moneyFormat, this.money); - this.moneyText.setText(i18next.t("battleScene:moneyOwned", { formattedMoney })); + this.moneyText.setText( + i18next.t("battleScene:moneyOwned", { formattedMoney }), + ); this.fieldUI.moveAbove(this.moneyText, this.luckText); if (forceVisible) { this.moneyText.setVisible(true); @@ -1774,7 +2263,8 @@ export default class BattleScene extends SceneBase { scale: this.moneyText.scale + deltaScale, loop: 0, yoyo: true, - onComplete: (_) => this.moneyText.setShadowColor(getTextColor(TextStyle.MONEY, true)), + onComplete: (_) => + this.moneyText.setShadowColor(getTextColor(TextStyle.MONEY, true)), }); } @@ -1789,7 +2279,7 @@ export default class BattleScene extends SceneBase { */ updateAndShowText(duration: number): void { const labels = [ this.luckLabelText, this.luckText ]; - labels.forEach(t => t.setAlpha(0)); + labels.forEach((t) => t.setAlpha(0)); const luckValue = getPartyLuckValue(this.getPlayerParty()); this.luckText.setText(getLuckString(luckValue)); if (luckValue < 14) { @@ -1797,14 +2287,16 @@ export default class BattleScene extends SceneBase { } else { this.luckText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969); } - this.luckLabelText.setX((this.game.canvas.width / 6) - 2 - (this.luckText.displayWidth + 2)); + this.luckLabelText.setX( + this.game.canvas.width / 6 - 2 - (this.luckText.displayWidth + 2), + ); this.tweens.add({ targets: labels, duration: duration, alpha: 1, onComplete: () => { - labels.forEach(t => t.setVisible(true)); - } + labels.forEach((t) => t.setVisible(true)); + }, }); } @@ -1818,21 +2310,29 @@ export default class BattleScene extends SceneBase { duration: duration, alpha: 0, onComplete: () => { - labels.forEach(l => l.setVisible(false)); - } + labels.forEach((l) => l.setVisible(false)); + }, }); } updateUIPositions(): void { - const enemyModifierCount = this.enemyModifiers.filter(m => m.isIconVisible()).length; - const biomeWaveTextHeight = this.biomeWaveText.getBottomLeft().y - this.biomeWaveText.getTopLeft().y; + const enemyModifierCount = this.enemyModifiers.filter((m) => + m.isIconVisible(), + ).length; + const biomeWaveTextHeight = + this.biomeWaveText.getBottomLeft().y - this.biomeWaveText.getTopLeft().y; this.biomeWaveText.setY( - -(this.game.canvas.height / 6) + (enemyModifierCount ? enemyModifierCount <= 12 ? 15 : 24 : 0) + (biomeWaveTextHeight / 2) + -(this.game.canvas.height / 6) + + (enemyModifierCount ? (enemyModifierCount <= 12 ? 15 : 24) : 0) + + biomeWaveTextHeight / 2, ); this.moneyText.setY(this.biomeWaveText.y + 10); this.scoreText.setY(this.moneyText.y + 10); - [ this.luckLabelText, this.luckText ].map(l => l.setY((this.scoreText.visible ? this.scoreText : this.moneyText).y + 10)); - const offsetY = (this.scoreText.visible ? this.scoreText : this.moneyText).y + 15; + [ this.luckLabelText, this.luckText ].map((l) => + l.setY((this.scoreText.visible ? this.scoreText : this.moneyText).y + 10), + ); + const offsetY = + (this.scoreText.visible ? this.scoreText : this.moneyText).y + 15; this.partyExpBar.setY(offsetY); this.candyBar.setY(offsetY + 15); this.ui?.achvBar.setY(this.game.canvas.height / 6 + offsetY); @@ -1848,8 +2348,20 @@ export default class BattleScene extends SceneBase { } addFaintedEnemyScore(enemy: EnemyPokemon): void { - let scoreIncrease = enemy.getSpeciesForm().getBaseExp() * (enemy.level / this.getMaxExpLevel()) * ((enemy.ivs.reduce((iv: number, total: number) => total += iv, 0) / 93) * 0.2 + 0.8); - this.findModifiers(m => m instanceof PokemonHeldItemModifier && m.pokemonId === enemy.id, false).map(m => scoreIncrease *= (m as PokemonHeldItemModifier).getScoreMultiplier()); + let scoreIncrease = + enemy.getSpeciesForm().getBaseExp() * + (enemy.level / this.getMaxExpLevel()) * + ((enemy.ivs.reduce((iv: number, total: number) => (total += iv), 0) / + 93) * + 0.2 + + 0.8); + this.findModifiers( + (m) => m instanceof PokemonHeldItemModifier && m.pokemonId === enemy.id, + false, + ).map( + (m) => + (scoreIncrease *= (m as PokemonHeldItemModifier).getScoreMultiplier()), + ); if (enemy.isBoss()) { scoreIncrease *= Math.sqrt(enemy.bossSegments); } @@ -1864,35 +2376,68 @@ export default class BattleScene extends SceneBase { } const waveIndex = Math.ceil((this.currentBattle?.waveIndex || 1) / 10) * 10; const difficultyWaveIndex = this.gameMode.getWaveForDifficulty(waveIndex); - const baseLevel = (1 + difficultyWaveIndex / 2 + Math.pow(difficultyWaveIndex / 25, 2)) * 1.2; + const baseLevel = + (1 + difficultyWaveIndex / 2 + Math.pow(difficultyWaveIndex / 25, 2)) * + 1.2; return Math.ceil(baseLevel / 2) * 2 + 2; } - randomSpecies(waveIndex: number, level: number, fromArenaPool?: boolean, speciesFilter?: PokemonSpeciesFilter, filterAllEvolutions?: boolean): PokemonSpecies { + randomSpecies( + waveIndex: number, + level: number, + fromArenaPool?: boolean, + speciesFilter?: PokemonSpeciesFilter, + filterAllEvolutions?: boolean, + ): PokemonSpecies { if (fromArenaPool) { - return this.arena.randomSpecies(waveIndex, level, undefined, getPartyLuckValue(this.party)); + return this.arena.randomSpecies( + waveIndex, + level, + undefined, + getPartyLuckValue(this.party), + ); } - const filteredSpecies = speciesFilter ? [ ...new Set(allSpecies.filter(s => s.isCatchable()).filter(speciesFilter).map(s => { - if (!filterAllEvolutions) { - while (pokemonPrevolutions.hasOwnProperty(s.speciesId)) { - s = getPokemonSpecies(pokemonPrevolutions[s.speciesId]); - } - } - return s; - })) ] : allSpecies.filter(s => s.isCatchable()); + const filteredSpecies = speciesFilter + ? [ + ...new Set( + allSpecies + .filter((s) => s.isCatchable()) + .filter(speciesFilter) + .map((s) => { + if (!filterAllEvolutions) { + while (pokemonPrevolutions.hasOwnProperty(s.speciesId)) { + s = getPokemonSpecies(pokemonPrevolutions[s.speciesId]); + } + } + return s; + }), + ), + ] + : allSpecies.filter((s) => s.isCatchable()); return filteredSpecies[Utils.randSeedInt(filteredSpecies.length)]; } generateRandomBiome(waveIndex: number): Biome { const relWave = waveIndex % 250; - const biomes = Utils.getEnumValues(Biome).filter(b => b !== Biome.TOWN && b !== Biome.END); + const biomes = Utils.getEnumValues(Biome).filter( + (b) => b !== Biome.TOWN && b !== Biome.END, + ); const maxDepth = biomeDepths[Biome.END][0] - 2; - const depthWeights = new Array(maxDepth + 1).fill(null) - .map((_, i: number) => ((1 - Math.min(Math.abs((i / (maxDepth - 1)) - (relWave / 250)) + 0.25, 1)) / 0.75) * 250); + const depthWeights = new Array(maxDepth + 1) + .fill(null) + .map( + (_, i: number) => + ((1 - + Math.min(Math.abs(i / (maxDepth - 1) - relWave / 250) + 0.25, 1)) / + 0.75) * + 250, + ); const biomeThresholds: number[] = []; let totalWeight = 0; for (const biome of biomes) { - totalWeight += Math.ceil(depthWeights[biomeDepths[biome][0] - 1] / biomeDepths[biome][1]); + totalWeight += Math.ceil( + depthWeights[biomeDepths[biome][0] - 1] / biomeDepths[biome][1], + ); biomeThresholds.push(totalWeight); } @@ -1918,7 +2463,7 @@ export default class BattleScene extends SceneBase { if (this.bgm && bgmName === this.bgm.key) { if (!this.bgm.isPlaying) { this.bgm.play({ - volume: this.masterVolume * this.bgmVolume + volume: this.masterVolume * this.bgmVolume, }); } return; @@ -1929,15 +2474,16 @@ export default class BattleScene extends SceneBase { this.bgmCache.add(bgmName); this.loadBgm(bgmName); let loopPoint = 0; - loopPoint = bgmName === this.arena.bgm - ? this.arena.getBgmLoopPoint() - : this.getBgmLoopPoint(bgmName); + loopPoint = + bgmName === this.arena.bgm + ? this.arena.getBgmLoopPoint() + : this.getBgmLoopPoint(bgmName); let loaded = false; const playNewBgm = () => { this.ui.bgmBar.setBgmToBgmBar(bgmName); if (bgmName === null && this.bgm && !this.bgm.pendingRemove) { this.bgm.play({ - volume: this.masterVolume * this.bgmVolume + volume: this.masterVolume * this.bgmVolume, }); return; } @@ -1946,7 +2492,7 @@ export default class BattleScene extends SceneBase { } this.bgm = this.sound.add(bgmName, { loop: true }); this.bgm.play({ - volume: this.masterVolume * this.bgmVolume + volume: this.masterVolume * this.bgmVolume, }); if (loopPoint) { this.bgm.on("looped", () => this.bgm.play({ seek: loopPoint })); @@ -1995,7 +2541,6 @@ export default class BattleScene extends SceneBase { } else { const soundDetails = sound.key.split("/"); switch (soundDetails[0]) { - case "battle_anims": case "cry": if (soundDetails[1].startsWith("PRSFX- ")) { @@ -2017,7 +2562,9 @@ export default class BattleScene extends SceneBase { if (!this.bgm) { return false; } - const bgm = this.sound.getAllPlaying().find(bgm => bgm.key === this.bgm.key); + const bgm = this.sound + .getAllPlaying() + .find((bgm) => bgm.key === this.bgm.key); if (bgm) { SoundFade.fadeOut(this, this.bgm, duration, destroy); return true; @@ -2032,7 +2579,11 @@ export default class BattleScene extends SceneBase { * @param destroy * @param delay */ - fadeAndSwitchBgm(newBgmKey: string, destroy: boolean = false, delay: number = 2000) { + fadeAndSwitchBgm( + newBgmKey: string, + destroy: boolean = false, + delay: number = 2000, + ) { this.fadeOutBgm(delay, destroy); this.time.delayedCall(delay, () => { this.playBgm(newBgmKey); @@ -2052,24 +2603,24 @@ export default class BattleScene extends SceneBase { case "heal": case "evolution": case "evolution_fanfare": - // These sounds are loaded in as BGM, but played as sound effects - // When these sounds are updated in updateVolume(), they are treated as BGM however because they are placed in the BGM Cache through being called by playSoundWithoutBGM() - config["volume"] *= (this.masterVolume * this.bgmVolume); + // These sounds are loaded in as BGM, but played as sound effects + // When these sounds are updated in updateVolume(), they are treated as BGM however because they are placed in the BGM Cache through being called by playSoundWithoutBGM() + config["volume"] *= this.masterVolume * this.bgmVolume; break; case "battle_anims": case "cry": - config["volume"] *= (this.masterVolume * this.fieldVolume); + config["volume"] *= this.masterVolume * this.fieldVolume; //PRSFX sound files are unusually loud if (keyDetails[1].startsWith("PRSFX- ")) { config["volume"] *= 0.5; } break; case "ui": - //As of, right now this applies to the "select", "menu_open", "error" sound effects - config["volume"] *= (this.masterVolume * this.uiVolume); + //As of, right now this applies to the "select", "menu_open", "error" sound effects + config["volume"] *= this.masterVolume * this.uiVolume; break; case "se": - config["volume"] *= (this.masterVolume * this.seVolume); + config["volume"] *= this.masterVolume * this.seVolume; break; } this.sound.play(key, config); @@ -2089,10 +2640,13 @@ export default class BattleScene extends SceneBase { this.bgmResumeTimer.destroy(); } if (resumeBgm) { - this.bgmResumeTimer = this.time.delayedCall((pauseDuration || Utils.fixedInt(sound.totalDuration * 1000)), () => { - this.resumeBgm(); - this.bgmResumeTimer = null; - }); + this.bgmResumeTimer = this.time.delayedCall( + pauseDuration || Utils.fixedInt(sound.totalDuration * 1000), + () => { + this.resumeBgm(); + this.bgmResumeTimer = null; + }, + ); } return sound; } @@ -2101,9 +2655,9 @@ export default class BattleScene extends SceneBase { getBgmLoopPoint(bgmName: string): number { switch (bgmName) { case "title": //Firel PokéRogue Title - return 46.500; + return 46.5; case "battle_kanto_champion": //B2W2 Kanto Champion Battle - return 13.950; + return 13.95; case "battle_johto_champion": //B2W2 Johto Champion Battle return 23.498; case "battle_hoenn_champion_g5": //B2W2 Hoenn Champion Battle @@ -2117,7 +2671,7 @@ export default class BattleScene extends SceneBase { case "battle_champion_iris": //B2W2 Unova Champion Battle return 10.145; case "battle_kalos_champion": //XY Kalos Champion Battle - return 10.380; + return 10.38; case "battle_champion_kukui": //SM Kukui Battle return 15.784; case "battle_alola_champion": //USUM Alola Champion Battle @@ -2133,17 +2687,17 @@ export default class BattleScene extends SceneBase { case "battle_champion_kieran": //SV Champion Kieran Battle return 7.206; case "battle_hoenn_elite": //ORAS Elite Four Battle - return 11.350; + return 11.35; case "battle_unova_elite": //BW Elite Four Battle - return 17.730; + return 17.73; case "battle_kalos_elite": //XY Elite Four Battle - return 12.340; + return 12.34; case "battle_alola_elite": //SM Elite Four Battle return 19.212; case "battle_galar_elite": //SWSH League Tournament Battle return 164.069; case "battle_paldea_elite": //SV Elite Four Battle - return 12.770; + return 12.77; case "battle_bb_elite": //SV BB League Elite Four Battle return 19.434; case "battle_final_encounter": //PMD RTDX Rayquaza's Domain @@ -2161,7 +2715,7 @@ export default class BattleScene extends SceneBase { case "battle_unova_gym": //BW Unova Gym Battle return 19.145; case "battle_kalos_gym": //XY Kalos Gym Battle - return 44.810; + return 44.81; case "battle_galar_gym": //SWSH Galar Gym Battle return 171.262; case "battle_paldea_gym": //SV Paldea Gym Battle @@ -2175,13 +2729,13 @@ export default class BattleScene extends SceneBase { case "battle_legendary_suicune": //HGSS Suicune Battle return 12.636; case "battle_legendary_lugia": //HGSS Lugia Battle - return 19.770; + return 19.77; case "battle_legendary_ho_oh": //HGSS Ho-oh Battle return 17.668; case "battle_legendary_regis_g5": //B2W2 Legendary Titan Battle - return 49.500; + return 49.5; case "battle_legendary_regis_g6": //ORAS Legendary Titan Battle - return 21.130; + return 21.13; case "battle_legendary_gro_kyo": //ORAS Groudon & Kyogre Battle return 10.547; case "battle_legendary_rayquaza": //ORAS Rayquaza Battle @@ -2191,7 +2745,7 @@ export default class BattleScene extends SceneBase { case "battle_legendary_lake_trio": //ORAS Lake Guardians Battle return 16.887; case "battle_legendary_sinnoh": //ORAS Sinnoh Legendary Battle - return 22.770; + return 22.77; case "battle_legendary_dia_pal": //ORAS Dialga & Palkia Battle return 16.009; case "battle_legendary_origin_forme": //LA Origin Dialga & Palkia Battle @@ -2209,7 +2763,7 @@ export default class BattleScene extends SceneBase { case "battle_legendary_xern_yvel": //XY Xerneas & Yveltal Battle return 26.468; case "battle_legendary_tapu": //SM Tapu Battle - return 0.000; + return 0.0; case "battle_legendary_sol_lun": //SM Solgaleo & Lunala Battle return 6.525; case "battle_legendary_ub": //SM Ultra Beast Battle @@ -2233,7 +2787,7 @@ export default class BattleScene extends SceneBase { case "battle_legendary_kor_mir": //SV Depths of Area Zero Battle return 6.442; case "battle_legendary_loyal_three": //SV Loyal Three Battle - return 6.500; + return 6.5; case "battle_legendary_ogerpon": //SV Ogerpon Battle return 14.335; case "battle_legendary_terapagos": //SV Terapagos Battle @@ -2241,7 +2795,7 @@ export default class BattleScene extends SceneBase { case "battle_legendary_pecharunt": //SV Pecharunt Battle return 6.508; case "battle_rival": //BW Rival Battle - return 14.110; + return 14.11; case "battle_rival_2": //BW N Battle return 17.714; case "battle_rival_3": //BW Final N Battle @@ -2251,7 +2805,7 @@ export default class BattleScene extends SceneBase { case "battle_wild": //BW Wild Battle return 12.703; case "battle_wild_strong": //BW Strong Wild Battle - return 13.940; + return 13.94; case "end_summit": //PMD RTDX Sky Tower Summit return 30.025; case "battle_rocket_grunt": //HGSS Team Rocket Battle @@ -2265,7 +2819,7 @@ export default class BattleScene extends SceneBase { case "battle_flare_grunt": //XY Team Flare Battle return 4.228; case "battle_aether_grunt": // SM Aether Foundation Battle - return 16.00; + return 16.0; case "battle_skull_grunt": // SM Team Skull Battle return 20.87; case "battle_macro_grunt": // SWSH Trainer Battle @@ -2279,7 +2833,7 @@ export default class BattleScene extends SceneBase { case "battle_skull_admin": //SM Team Skull Admin Battle return 15.463; case "battle_oleana": //SWSH Oleana Battle - return 14.110; + return 14.11; case "battle_star_admin": //SV Team Star Boss Battle return 9.493; case "battle_rocket_boss": //USUM Giovanni Battle @@ -2332,7 +2886,6 @@ export default class BattleScene extends SceneBase { return this.standbyPhase; } - /** * Adds a phase to the conditional queue and ensures it is executed only when the specified condition is met. * @@ -2364,7 +2917,11 @@ export default class BattleScene extends SceneBase { if (this.phaseQueuePrependSpliceIndex === -1) { this.phaseQueuePrepend.push(...phases); } else { - this.phaseQueuePrepend.splice(this.phaseQueuePrependSpliceIndex, 0, ...phases); + this.phaseQueuePrepend.splice( + this.phaseQueuePrependSpliceIndex, + 0, + ...phases, + ); } } @@ -2437,7 +2994,10 @@ export default class BattleScene extends SceneBase { } if (this.currentPhase) { - console.log(`%cStart Phase ${this.currentPhase.constructor.name}`, "color:green;"); + console.log( + `%cStart Phase ${this.currentPhase.constructor.name}`, + "color:green;", + ); this.currentPhase.start(); } } @@ -2461,11 +3021,16 @@ export default class BattleScene extends SceneBase { * @param phaseFilter filter function to use to find the wanted phase * @returns the found phase or undefined if none found */ - findPhase

(phaseFilter: (phase: P) => boolean): P | undefined { + findPhase

( + phaseFilter: (phase: P) => boolean, + ): P | undefined { return this.phaseQueue.find(phaseFilter) as P; } - tryReplacePhase(phaseFilter: (phase: Phase) => boolean, phase: Phase): boolean { + tryReplacePhase( + phaseFilter: (phase: Phase) => boolean, + phase: Phase, + ): boolean { const phaseIndex = this.phaseQueue.findIndex(phaseFilter); if (phaseIndex > -1) { this.phaseQueue[phaseIndex] = phase; @@ -2502,11 +3067,16 @@ export default class BattleScene extends SceneBase { * @param targetPhase {@linkcode Phase} the type of phase to search for in phaseQueue * @returns boolean if a targetPhase was found and added */ - prependToPhase(phase: Phase | Phase [], targetPhase: Constructor): boolean { + prependToPhase( + phase: Phase | Phase[], + targetPhase: Constructor, + ): boolean { if (!Array.isArray(phase)) { phase = [ phase ]; } - const targetIndex = this.phaseQueue.findIndex(ph => ph instanceof targetPhase); + const targetIndex = this.phaseQueue.findIndex( + (ph) => ph instanceof targetPhase, + ); if (targetIndex !== -1) { this.phaseQueue.splice(targetIndex, 0, ...phase); @@ -2523,11 +3093,16 @@ export default class BattleScene extends SceneBase { * @param targetPhase {@linkcode Phase} the type of phase to search for in {@linkcode phaseQueue} * @returns `true` if a `targetPhase` was found to append to */ - appendToPhase(phase: Phase | Phase[], targetPhase: Constructor): boolean { + appendToPhase( + phase: Phase | Phase[], + targetPhase: Constructor, + ): boolean { if (!Array.isArray(phase)) { phase = [ phase ]; } - const targetIndex = this.phaseQueue.findIndex(ph => ph instanceof targetPhase); + const targetIndex = this.phaseQueue.findIndex( + (ph) => ph instanceof targetPhase, + ); if (targetIndex !== -1 && this.phaseQueue.length > targetIndex) { this.phaseQueue.splice(targetIndex + 1, 0, ...phase); @@ -2546,7 +3121,13 @@ export default class BattleScene extends SceneBase { * @param promptDelay optional param for MessagePhase constructor * @param defer boolean for which queue to add it to, false -> add to PhaseQueuePrepend, true -> nextCommandPhaseQueue */ - queueMessage(message: string, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null, defer?: boolean | null) { + queueMessage( + message: string, + callbackDelay?: number | null, + prompt?: boolean | null, + promptDelay?: number | null, + defer?: boolean | null, + ) { const phase = new MessagePhase(message, callbackDelay, prompt, promptDelay); if (!defer) { // adds to the end of PhaseQueuePrepend @@ -2578,98 +3159,126 @@ export default class BattleScene extends SceneBase { getWaveMoneyAmount(moneyMultiplier: number): number { const waveIndex = this.currentBattle.waveIndex; const waveSetIndex = Math.ceil(waveIndex / 10) - 1; - const moneyValue = Math.pow((waveSetIndex + 1 + (0.75 + (((waveIndex - 1) % 10) + 1) / 10)) * 100, 1 + 0.005 * waveSetIndex) * moneyMultiplier; + const moneyValue = + Math.pow( + (waveSetIndex + 1 + (0.75 + (((waveIndex - 1) % 10) + 1) / 10)) * 100, + 1 + 0.005 * waveSetIndex, + ) * moneyMultiplier; return Math.floor(moneyValue / 10) * 10; } - addModifier(modifier: Modifier | null, ignoreUpdate?: boolean, playSound?: boolean, virtual?: boolean, instant?: boolean, cost?: number): Promise { + addModifier( + modifier: Modifier | null, + ignoreUpdate?: boolean, + playSound?: boolean, + virtual?: boolean, + instant?: boolean, + cost?: number, + ): boolean { if (!modifier) { - return Promise.resolve(false); + return false; } - return new Promise(resolve => { - let success = false; - const soundName = modifier.type.soundName; - this.validateAchvs(ModifierAchv, modifier); - const modifiersToRemove: PersistentModifier[] = []; - const modifierPromises: Promise[] = []; - if (modifier instanceof PersistentModifier) { - if ((modifier as PersistentModifier).add(this.modifiers, !!virtual)) { - if (modifier instanceof PokemonFormChangeItemModifier) { - const pokemon = this.getPokemonById(modifier.pokemonId); - if (pokemon) { - success = modifier.apply(pokemon, true); - } + let success = false; + const soundName = modifier.type.soundName; + this.validateAchvs(ModifierAchv, modifier); + const modifiersToRemove: PersistentModifier[] = []; + if (modifier instanceof PersistentModifier) { + if ((modifier as PersistentModifier).add(this.modifiers, !!virtual)) { + if (modifier instanceof PokemonFormChangeItemModifier) { + const pokemon = this.getPokemonById(modifier.pokemonId); + if (pokemon) { + success = modifier.apply(pokemon, true); } - if (playSound && !this.sound.get(soundName)) { - this.playSound(soundName); - } - } else if (!virtual) { - const defaultModifierType = getDefaultModifierTypeForTier(modifier.type.tier); - this.queueMessage(i18next.t("battle:itemStackFull", { fullItemName: modifier.type.name, itemName: defaultModifierType.name }), undefined, false, 3000); - return this.addModifier(defaultModifierType.newModifier(), ignoreUpdate, playSound, false, instant).then(success => resolve(success)); } - - for (const rm of modifiersToRemove) { - this.removeModifier(rm); - } - - if (!ignoreUpdate && !virtual) { - return this.updateModifiers(true, instant).then(() => resolve(success)); - } - } else if (modifier instanceof ConsumableModifier) { if (playSound && !this.sound.get(soundName)) { this.playSound(soundName); } - - if (modifier instanceof ConsumablePokemonModifier) { - for (const p in this.party) { - const pokemon = this.party[p]; - - const args: unknown[] = []; - if (modifier instanceof PokemonHpRestoreModifier) { - if (!(modifier as PokemonHpRestoreModifier).fainted) { - const hpRestoreMultiplier = new Utils.NumberHolder(1); - this.applyModifiers(HealingBoosterModifier, true, hpRestoreMultiplier); - args.push(hpRestoreMultiplier.value); - } else { - args.push(1); - } - } else if (modifier instanceof FusePokemonModifier) { - args.push(this.getPokemonById(modifier.fusePokemonId) as PlayerPokemon); - } else if (modifier instanceof RememberMoveModifier && !Utils.isNullOrUndefined(cost)) { - args.push(cost); - } - - if (modifier.shouldApply(pokemon, ...args)) { - const result = modifier.apply(pokemon, ...args); - if (result instanceof Promise) { - modifierPromises.push(result.then(s => success ||= s)); - } else { - success ||= result; - } - } - } - - return Promise.allSettled([ this.party.map(p => p.updateInfo(instant)), ...modifierPromises ]).then(() => resolve(success)); - } else { - const args = [ this ]; - if (modifier.shouldApply(...args)) { - const result = modifier.apply(...args); - if (result instanceof Promise) { - return result.then(success => resolve(success)); - } else { - success ||= result; - } - } - } + } else if (!virtual) { + const defaultModifierType = getDefaultModifierTypeForTier( + modifier.type.tier, + ); + this.queueMessage( + i18next.t("battle:itemStackFull", { + fullItemName: modifier.type.name, + itemName: defaultModifierType.name, + }), + undefined, + false, + 3000, + ); + return this.addModifier( + defaultModifierType.newModifier(), + ignoreUpdate, + playSound, + false, + instant, + ); } - resolve(success); - }); + for (const rm of modifiersToRemove) { + this.removeModifier(rm); + } + + if (!ignoreUpdate && !virtual) { + this.updateModifiers(true, instant); + } + } else if (modifier instanceof ConsumableModifier) { + if (playSound && !this.sound.get(soundName)) { + this.playSound(soundName); + } + + if (modifier instanceof ConsumablePokemonModifier) { + for (const p in this.party) { + const pokemon = this.party[p]; + + const args: unknown[] = []; + if (modifier instanceof PokemonHpRestoreModifier) { + if (!(modifier as PokemonHpRestoreModifier).fainted) { + const hpRestoreMultiplier = new Utils.NumberHolder(1); + this.applyModifiers( + HealingBoosterModifier, + true, + hpRestoreMultiplier, + ); + args.push(hpRestoreMultiplier.value); + } else { + args.push(1); + } + } else if (modifier instanceof FusePokemonModifier) { + args.push( + this.getPokemonById(modifier.fusePokemonId) as PlayerPokemon, + ); + } else if ( + modifier instanceof RememberMoveModifier && + !Utils.isNullOrUndefined(cost) + ) { + args.push(cost); + } + + if (modifier.shouldApply(pokemon, ...args)) { + const result = modifier.apply(pokemon, ...args); + success ||= result; + } + } + + this.party.map((p) => p.updateInfo(instant)); + } else { + const args = [ this ]; + if (modifier.shouldApply(...args)) { + const result = modifier.apply(...args); + success ||= result; + } + } + } + return success; } - addEnemyModifier(modifier: PersistentModifier, ignoreUpdate?: boolean, instant?: boolean): Promise { - return new Promise(resolve => { + addEnemyModifier( + modifier: PersistentModifier, + ignoreUpdate?: boolean, + instant?: boolean, + ): Promise { + return new Promise((resolve) => { const modifiersToRemove: PersistentModifier[] = []; if ((modifier as PersistentModifier).add(this.enemyModifiers, false)) { if (modifier instanceof PokemonFormChangeItemModifier) { @@ -2683,7 +3292,8 @@ export default class BattleScene extends SceneBase { } } if (!ignoreUpdate) { - this.updateModifiers(false, instant).then(() => resolve()); + this.updateModifiers(false, instant); + resolve(); } else { resolve(); } @@ -2704,86 +3314,128 @@ export default class BattleScene extends SceneBase { * @param itemLost If `true`, treat the item's current holder as losing the item (for now, this simply enables Unburden). Default is `true`. * @returns `true` if the transfer was successful */ - tryTransferHeldItemModifier(itemModifier: PokemonHeldItemModifier, target: Pokemon, playSound: boolean, transferQuantity: number = 1, instant?: boolean, ignoreUpdate?: boolean, itemLost: boolean = true): Promise { - return new Promise(resolve => { - const source = itemModifier.pokemonId ? itemModifier.getPokemon() : null; - const cancelled = new Utils.BooleanHolder(false); - Utils.executeIf(!!source && source.isPlayer() !== target.isPlayer(), () => applyAbAttrs(BlockItemTheftAbAttr, source! /* checked in condition*/, cancelled)).then(() => { - if (cancelled.value) { - return resolve(false); - } - const newItemModifier = itemModifier.clone() as PokemonHeldItemModifier; - newItemModifier.pokemonId = target.id; - const matchingModifier = this.findModifier(m => m instanceof PokemonHeldItemModifier - && (m as PokemonHeldItemModifier).matchType(itemModifier) && m.pokemonId === target.id, target.isPlayer()) as PokemonHeldItemModifier; - let removeOld = true; - if (matchingModifier) { - const maxStackCount = matchingModifier.getMaxStackCount(); - if (matchingModifier.stackCount >= maxStackCount) { - return resolve(false); - } - const countTaken = Math.min(transferQuantity, itemModifier.stackCount, maxStackCount - matchingModifier.stackCount); - itemModifier.stackCount -= countTaken; - newItemModifier.stackCount = matchingModifier.stackCount + countTaken; - removeOld = !itemModifier.stackCount; - } else { - const countTaken = Math.min(transferQuantity, itemModifier.stackCount); - itemModifier.stackCount -= countTaken; - newItemModifier.stackCount = countTaken; - } - removeOld = !itemModifier.stackCount; - if (!removeOld || !source || this.removeModifier(itemModifier, !source.isPlayer())) { - const addModifier = () => { - if (!matchingModifier || this.removeModifier(matchingModifier, !target.isPlayer())) { - if (target.isPlayer()) { - this.addModifier(newItemModifier, ignoreUpdate, playSound, false, instant).then(() => { - if (source && itemLost) { - applyPostItemLostAbAttrs(PostItemLostAbAttr, source, false); - } - resolve(true); - }); - } else { - this.addEnemyModifier(newItemModifier, ignoreUpdate, instant).then(() => { - if (source && itemLost) { - applyPostItemLostAbAttrs(PostItemLostAbAttr, source, false); - } - resolve(true); - }); - } - } else { - resolve(false); + tryTransferHeldItemModifier( + itemModifier: PokemonHeldItemModifier, + target: Pokemon, + playSound: boolean, + transferQuantity: number = 1, + instant?: boolean, + ignoreUpdate?: boolean, + itemLost: boolean = true, + ): boolean { + const source = itemModifier.pokemonId ? itemModifier.getPokemon() : null; + const cancelled = new Utils.BooleanHolder(false); + + if (source && source.isPlayer() !== target.isPlayer()) { + applyAbAttrs(BlockItemTheftAbAttr, source, cancelled); + } + + if (cancelled.value) { + return false; + } + + const newItemModifier = itemModifier.clone() as PokemonHeldItemModifier; + newItemModifier.pokemonId = target.id; + const matchingModifier = this.findModifier( + (m) => + m instanceof PokemonHeldItemModifier && + m.matchType(itemModifier) && + m.pokemonId === target.id, + target.isPlayer(), + ) as PokemonHeldItemModifier; + + if (matchingModifier) { + const maxStackCount = matchingModifier.getMaxStackCount(); + if (matchingModifier.stackCount >= maxStackCount) { + return false; + } + const countTaken = Math.min( + transferQuantity, + itemModifier.stackCount, + maxStackCount - matchingModifier.stackCount, + ); + itemModifier.stackCount -= countTaken; + newItemModifier.stackCount = matchingModifier.stackCount + countTaken; + } else { + const countTaken = Math.min(transferQuantity, itemModifier.stackCount); + itemModifier.stackCount -= countTaken; + newItemModifier.stackCount = countTaken; + } + + const removeOld = itemModifier.stackCount === 0; + + if ( + !removeOld || + !source || + this.removeModifier(itemModifier, !source.isPlayer()) + ) { + const addModifier = () => { + if ( + !matchingModifier || + this.removeModifier(matchingModifier, !target.isPlayer()) + ) { + if (target.isPlayer()) { + this.addModifier( + newItemModifier, + ignoreUpdate, + playSound, + false, + instant, + ); + if (source && itemLost) { + applyPostItemLostAbAttrs(PostItemLostAbAttr, source, false); } - }; - if (source && source.isPlayer() !== target.isPlayer() && !ignoreUpdate) { - this.updateModifiers(source.isPlayer(), instant).then(() => addModifier()); + return true; } else { - addModifier(); + this.addEnemyModifier(newItemModifier, ignoreUpdate, instant); + if (source && itemLost) { + applyPostItemLostAbAttrs(PostItemLostAbAttr, source, false); + } + return true; } - return; } - resolve(false); - }); - }); + return false; + }; + if (source && source.isPlayer() !== target.isPlayer() && !ignoreUpdate) { + this.updateModifiers(source.isPlayer(), instant); + addModifier(); + } else { + addModifier(); + } + return true; + } + return false; } removePartyMemberModifiers(partyMemberIndex: number): Promise { - return new Promise(resolve => { + return new Promise((resolve) => { const pokemonId = this.getPlayerParty()[partyMemberIndex].id; - const modifiersToRemove = this.modifiers.filter(m => m instanceof PokemonHeldItemModifier && (m as PokemonHeldItemModifier).pokemonId === pokemonId); + const modifiersToRemove = this.modifiers.filter( + (m) => + m instanceof PokemonHeldItemModifier && + (m as PokemonHeldItemModifier).pokemonId === pokemonId, + ); for (const m of modifiersToRemove) { this.modifiers.splice(this.modifiers.indexOf(m), 1); } - this.updateModifiers().then(() => resolve()); + this.updateModifiers(); + resolve(); }); } - generateEnemyModifiers(heldModifiersConfigs?: HeldModifierConfig[][]): Promise { - return new Promise(resolve => { + generateEnemyModifiers( + heldModifiersConfigs?: HeldModifierConfig[][], + ): Promise { + return new Promise((resolve) => { if (this.currentBattle.battleSpec === BattleSpec.FINAL_BOSS) { return resolve(); } - const difficultyWaveIndex = this.gameMode.getWaveForDifficulty(this.currentBattle.waveIndex); - const isFinalBoss = this.gameMode.isWaveFinal(this.currentBattle.waveIndex); + const difficultyWaveIndex = this.gameMode.getWaveForDifficulty( + this.currentBattle.waveIndex, + ); + const isFinalBoss = this.gameMode.isWaveFinal( + this.currentBattle.waveIndex, + ); let chances = Math.ceil(difficultyWaveIndex / 10); if (isFinalBoss) { chances = Math.ceil(chances * 2.5); @@ -2801,8 +3453,12 @@ export default class BattleScene extends SceneBase { } party.forEach((enemyPokemon: EnemyPokemon, i: number) => { - if (heldModifiersConfigs && i < heldModifiersConfigs.length && heldModifiersConfigs[i]) { - heldModifiersConfigs[i].forEach(mt => { + if ( + heldModifiersConfigs && + i < heldModifiersConfigs.length && + heldModifiersConfigs[i] + ) { + heldModifiersConfigs[i].forEach((mt) => { let modifier: PokemonHeldItemModifier; if (mt.modifier instanceof PokemonHeldItemModifierType) { modifier = mt.modifier.newModifier(enemyPokemon); @@ -2811,11 +3467,15 @@ export default class BattleScene extends SceneBase { modifier.pokemonId = enemyPokemon.id; } modifier.stackCount = mt.stackCount ?? 1; - modifier.isTransferable = mt.isTransferable ?? modifier.isTransferable; + modifier.isTransferable = + mt.isTransferable ?? modifier.isTransferable; this.addEnemyModifier(modifier, true); }); } else { - const isBoss = enemyPokemon.isBoss() || (this.currentBattle.battleType === BattleType.TRAINER && !!this.currentBattle.trainer?.config.isBoss); + const isBoss = + enemyPokemon.isBoss() || + (this.currentBattle.battleType === BattleType.TRAINER && + !!this.currentBattle.trainer?.config.isBoss); let upgradeChance = 32; if (isBoss) { upgradeChance /= 2; @@ -2823,96 +3483,115 @@ export default class BattleScene extends SceneBase { if (isFinalBoss) { upgradeChance /= 8; } - const modifierChance = this.gameMode.getEnemyModifierChance(isBoss); - let pokemonModifierChance = modifierChance; - if (this.currentBattle.battleType === BattleType.TRAINER && this.currentBattle.trainer) - pokemonModifierChance = Math.ceil(pokemonModifierChance * this.currentBattle.trainer.getPartyMemberModifierChanceMultiplier(i)); // eslint-disable-line let count = 0; for (let c = 0; c < chances; c++) { - if (!Utils.randSeedInt(modifierChance)) { + if (!Utils.randSeedInt(this.gameMode.getEnemyModifierChance(isBoss))) { count++; } } if (isBoss) { count = Math.max(count, Math.floor(chances / 2)); } - getEnemyModifierTypesForWave(difficultyWaveIndex, count, [ enemyPokemon ], this.currentBattle.battleType === BattleType.TRAINER ? ModifierPoolType.TRAINER : ModifierPoolType.WILD, upgradeChance) - .map(mt => mt.newModifier(enemyPokemon).add(this.enemyModifiers, false)); + getEnemyModifierTypesForWave( + difficultyWaveIndex, + count, + [ enemyPokemon ], + this.currentBattle.battleType === BattleType.TRAINER + ? ModifierPoolType.TRAINER + : ModifierPoolType.WILD, + upgradeChance, + ).map((mt) => + mt.newModifier(enemyPokemon).add(this.enemyModifiers, false), + ); } return true; }); - this.updateModifiers(false).then(() => resolve()); + this.updateModifiers(false); + resolve(); }); } /** - * Removes all modifiers from enemy pokemon of {@linkcode PersistentModifier} type - */ + * Removes all modifiers from enemy pokemon of {@linkcode PersistentModifier} type + */ clearEnemyModifiers(): void { - const modifiersToRemove = this.enemyModifiers.filter(m => m instanceof PersistentModifier); + const modifiersToRemove = this.enemyModifiers.filter( + (m) => m instanceof PersistentModifier, + ); for (const m of modifiersToRemove) { this.enemyModifiers.splice(this.enemyModifiers.indexOf(m), 1); } - this.updateModifiers(false).then(() => this.updateUIPositions()); + this.updateModifiers(false); + this.updateUIPositions(); } /** - * Removes all modifiers from enemy pokemon of {@linkcode PokemonHeldItemModifier} type - * @param pokemon - If specified, only removes held items from that {@linkcode Pokemon} - */ + * Removes all modifiers from enemy pokemon of {@linkcode PokemonHeldItemModifier} type + * @param pokemon - If specified, only removes held items from that {@linkcode Pokemon} + */ clearEnemyHeldItemModifiers(pokemon?: Pokemon): void { - const modifiersToRemove = this.enemyModifiers.filter(m => m instanceof PokemonHeldItemModifier && (!pokemon || m.getPokemon() === pokemon)); + const modifiersToRemove = this.enemyModifiers.filter( + (m) => + m instanceof PokemonHeldItemModifier && + (!pokemon || m.getPokemon() === pokemon), + ); for (const m of modifiersToRemove) { this.enemyModifiers.splice(this.enemyModifiers.indexOf(m), 1); } - this.updateModifiers(false).then(() => this.updateUIPositions()); + this.updateModifiers(false); + this.updateUIPositions(); } setModifiersVisible(visible: boolean) { - [ this.modifierBar, this.enemyModifierBar ].map(m => m.setVisible(visible)); + [ this.modifierBar, this.enemyModifierBar ].map((m) => m.setVisible(visible)); } - updateModifiers(player?: boolean, instant?: boolean): Promise { - if (player === undefined) { - player = true; + updateModifiers(player: boolean = true, instant?: boolean): void { + const modifiers = player + ? this.modifiers + : (this.enemyModifiers as PersistentModifier[]); + for (let m = 0; m < modifiers.length; m++) { + const modifier = modifiers[m]; + if ( + modifier instanceof PokemonHeldItemModifier && + !this.getPokemonById((modifier as PokemonHeldItemModifier).pokemonId) + ) { + modifiers.splice(m--, 1); + } } - return new Promise(resolve => { - const modifiers = player ? this.modifiers : this.enemyModifiers as PersistentModifier[]; - for (let m = 0; m < modifiers.length; m++) { - const modifier = modifiers[m]; - if (modifier instanceof PokemonHeldItemModifier && !this.getPokemonById((modifier as PokemonHeldItemModifier).pokemonId)) { - modifiers.splice(m--, 1); - } - } - for (const modifier of modifiers) { - if (modifier instanceof PersistentModifier) { - (modifier as PersistentModifier).virtualStackCount = 0; - } + for (const modifier of modifiers) { + if (modifier instanceof PersistentModifier) { + (modifier as PersistentModifier).virtualStackCount = 0; } + } - const modifiersClone = modifiers.slice(0); - for (const modifier of modifiersClone) { - if (!modifier.getStackCount()) { - modifiers.splice(modifiers.indexOf(modifier), 1); - } + const modifiersClone = modifiers.slice(0); + for (const modifier of modifiersClone) { + if (!modifier.getStackCount()) { + modifiers.splice(modifiers.indexOf(modifier), 1); } + } - this.updatePartyForModifiers(player ? this.getPlayerParty() : this.getEnemyParty(), instant).then(() => { - (player ? this.modifierBar : this.enemyModifierBar).updateModifiers(modifiers); - if (!player) { - this.updateUIPositions(); - } - resolve(); - }); - }); + this.updatePartyForModifiers( + player ? this.getPlayerParty() : this.getEnemyParty(), + instant, + ); + (player ? this.modifierBar : this.enemyModifierBar).updateModifiers( + modifiers, + ); + if (!player) { + this.updateUIPositions(); + } } updatePartyForModifiers(party: Pokemon[], instant?: boolean): Promise { - return new Promise(resolve => { - Promise.allSettled(party.map(p => { - p.calculateStats(); - return p.updateInfo(instant); - })).then(() => resolve()); + return new Promise((resolve) => { + Promise.allSettled( + party.map((p) => { + p.calculateStats(); + return p.updateInfo(instant); + }), + ).then(() => resolve()); }); } @@ -2924,7 +3603,10 @@ export default class BattleScene extends SceneBase { * @param enemy If `true`, remove an item owned by the enemy. If `false`, remove an item owned by the player. Default is `false`. * @returns `true` if the item exists and was successfully removed, `false` otherwise. */ - removeModifier(modifier: PersistentModifier, enemy: boolean = false): boolean { + removeModifier( + modifier: PersistentModifier, + enemy: boolean = false, + ): boolean { const modifiers = !enemy ? this.modifiers : this.enemyModifiers; const modifierIndex = modifiers.indexOf(modifier); if (modifierIndex > -1) { @@ -2947,8 +3629,13 @@ export default class BattleScene extends SceneBase { * @param player Whether to search the player (`true`) or the enemy (`false`); Defaults to `true` * @returns the list of all modifiers that matched `modifierType`. */ - getModifiers(modifierType: Constructor, player: boolean = true): T[] { - return (player ? this.modifiers : this.enemyModifiers).filter((m): m is T => m instanceof modifierType); + getModifiers( + modifierType: Constructor, + player: boolean = true, + ): T[] { + return (player ? this.modifiers : this.enemyModifiers).filter( + (m): m is T => m instanceof modifierType, + ); } /** @@ -2957,8 +3644,13 @@ export default class BattleScene extends SceneBase { * @param isPlayer Whether to search the player (`true`) or the enemy (`false`); Defaults to `true` * @returns the list of all modifiers that passed the `modifierFilter` function */ - findModifiers(modifierFilter: ModifierPredicate, isPlayer: boolean = true): PersistentModifier[] { - return (isPlayer ? this.modifiers : this.enemyModifiers).filter(modifierFilter); + findModifiers( + modifierFilter: ModifierPredicate, + isPlayer: boolean = true, + ): PersistentModifier[] { + return (isPlayer ? this.modifiers : this.enemyModifiers).filter( + modifierFilter, + ); } /** @@ -2967,7 +3659,10 @@ export default class BattleScene extends SceneBase { * @param player Whether to search the player (`true`) or the enemy (`false`); Defaults to `true` * @returns the first modifier that passed the `modifierFilter` function; `undefined` if none passed */ - findModifier(modifierFilter: ModifierPredicate, player: boolean = true): PersistentModifier | undefined { + findModifier( + modifierFilter: ModifierPredicate, + player: boolean = true, + ): PersistentModifier | undefined { return (player ? this.modifiers : this.enemyModifiers).find(modifierFilter); } @@ -2978,18 +3673,31 @@ export default class BattleScene extends SceneBase { * @param ...args The list of arguments needed to invoke `modifierType.apply` * @returns the list of all modifiers that matched `modifierType` and were applied. */ - applyShuffledModifiers(modifierType: Constructor, player: boolean = true, ...args: Parameters): T[] { - let modifiers = (player ? this.modifiers : this.enemyModifiers).filter((m): m is T => m instanceof modifierType && m.shouldApply(...args)); - this.executeWithSeedOffset(() => { - const shuffleModifiers = mods => { - if (mods.length < 1) { - return mods; - } - const rand = Utils.randSeedInt(mods.length); - return [ mods[rand], ...shuffleModifiers(mods.filter((_, i) => i !== rand)) ]; - }; - modifiers = shuffleModifiers(modifiers); - }, this.currentBattle.turn << 4, this.waveSeed); + applyShuffledModifiers( + modifierType: Constructor, + player: boolean = true, + ...args: Parameters + ): T[] { + let modifiers = (player ? this.modifiers : this.enemyModifiers).filter( + (m): m is T => m instanceof modifierType && m.shouldApply(...args), + ); + this.executeWithSeedOffset( + () => { + const shuffleModifiers = (mods) => { + if (mods.length < 1) { + return mods; + } + const rand = Utils.randSeedInt(mods.length); + return [ + mods[rand], + ...shuffleModifiers(mods.filter((_, i) => i !== rand)), + ]; + }; + modifiers = shuffleModifiers(modifiers); + }, + this.currentBattle.turn << 4, + this.waveSeed, + ); return this.applyModifiersInternal(modifiers, player, args); } @@ -3000,13 +3708,23 @@ export default class BattleScene extends SceneBase { * @param ...args The list of arguments needed to invoke `modifierType.apply` * @returns the list of all modifiers that matched `modifierType` and were applied. */ - applyModifiers(modifierType: Constructor, player: boolean = true, ...args: Parameters): T[] { - const modifiers = (player ? this.modifiers : this.enemyModifiers).filter((m): m is T => m instanceof modifierType && m.shouldApply(...args)); + applyModifiers( + modifierType: Constructor, + player: boolean = true, + ...args: Parameters + ): T[] { + const modifiers = (player ? this.modifiers : this.enemyModifiers).filter( + (m): m is T => m instanceof modifierType && m.shouldApply(...args), + ); return this.applyModifiersInternal(modifiers, player, args); } /** Helper function to apply all passed modifiers */ - applyModifiersInternal(modifiers: T[], player: boolean, args: Parameters): T[] { + applyModifiersInternal( + modifiers: T[], + player: boolean, + args: Parameters, + ): T[] { const appliedModifiers: T[] = []; for (const modifier of modifiers) { if (modifier.apply(...args)) { @@ -3025,8 +3743,14 @@ export default class BattleScene extends SceneBase { * @param ...args The list of arguments needed to invoke `modifierType.apply` * @returns the first modifier that matches `modifierType` and was applied; return `null` if none matched */ - applyModifier(modifierType: Constructor, player: boolean = true, ...args: Parameters): T | null { - const modifiers = (player ? this.modifiers : this.enemyModifiers).filter((m): m is T => m instanceof modifierType && m.shouldApply(...args)); + applyModifier( + modifierType: Constructor, + player: boolean = true, + ...args: Parameters + ): T | null { + const modifiers = (player ? this.modifiers : this.enemyModifiers).filter( + (m): m is T => m instanceof modifierType && m.shouldApply(...args), + ); for (const modifier of modifiers) { if (modifier.apply(...args)) { console.log("Applied", modifier.type.name, !player ? "(enemy)" : ""); @@ -3037,22 +3761,42 @@ export default class BattleScene extends SceneBase { return null; } - triggerPokemonFormChange(pokemon: Pokemon, formChangeTriggerType: Constructor, delayed: boolean = false, modal: boolean = false): boolean { + triggerPokemonFormChange( + pokemon: Pokemon, + formChangeTriggerType: Constructor, + delayed: boolean = false, + modal: boolean = false, + ): boolean { if (pokemonFormChanges.hasOwnProperty(pokemon.species.speciesId)) { - // in case this is NECROZMA, determine which forms this - const matchingFormChangeOpts = pokemonFormChanges[pokemon.species.speciesId].filter(fc => fc.findTrigger(formChangeTriggerType) && fc.canChange(pokemon)); + const matchingFormChangeOpts = pokemonFormChanges[ + pokemon.species.speciesId + ].filter( + (fc) => fc.findTrigger(formChangeTriggerType) && fc.canChange(pokemon), + ); let matchingFormChange: SpeciesFormChange | null; - if (pokemon.species.speciesId === Species.NECROZMA && matchingFormChangeOpts.length > 1) { + if ( + pokemon.species.speciesId === Species.NECROZMA && + matchingFormChangeOpts.length > 1 + ) { // Ultra Necrozma is changing its form back, so we need to figure out into which form it devolves. - const formChangeItemModifiers = (this.findModifiers(m => m instanceof PokemonFormChangeItemModifier && m.pokemonId === pokemon.id) as PokemonFormChangeItemModifier[]).filter(m => m.active).map(m => m.formChangeItem); + const formChangeItemModifiers = ( + this.findModifiers( + (m) => + m instanceof PokemonFormChangeItemModifier && + m.pokemonId === pokemon.id, + ) as PokemonFormChangeItemModifier[] + ) + .filter((m) => m.active) + .map((m) => m.formChangeItem); - - matchingFormChange = formChangeItemModifiers.includes(FormChangeItem.N_LUNARIZER) ? - matchingFormChangeOpts[0] : - formChangeItemModifiers.includes(FormChangeItem.N_SOLARIZER) ? - matchingFormChangeOpts[1] : - null; + matchingFormChange = formChangeItemModifiers.includes( + FormChangeItem.N_LUNARIZER, + ) + ? matchingFormChangeOpts[0] + : formChangeItemModifiers.includes(FormChangeItem.N_SOLARIZER) + ? matchingFormChangeOpts[1] + : null; } else { matchingFormChange = matchingFormChangeOpts[0]; } @@ -3063,7 +3807,11 @@ export default class BattleScene extends SceneBase { } else { phase = new QuietFormChangePhase(pokemon, matchingFormChange); } - if (pokemon instanceof PlayerPokemon && !matchingFormChange.quiet && modal) { + if ( + pokemon instanceof PlayerPokemon && + !matchingFormChange.quiet && + modal + ) { this.overridePhase(phase); } else if (delayed) { this.pushPhase(phase); @@ -3077,8 +3825,17 @@ export default class BattleScene extends SceneBase { return false; } - triggerPokemonBattleAnim(pokemon: Pokemon, battleAnimType: PokemonAnimType, fieldAssets?: Phaser.GameObjects.Sprite[], delayed: boolean = false): boolean { - const phase: Phase = new PokemonAnimPhase(battleAnimType, pokemon, fieldAssets); + triggerPokemonBattleAnim( + pokemon: Pokemon, + battleAnimType: PokemonAnimType, + fieldAssets?: Phaser.GameObjects.Sprite[], + delayed: boolean = false, + ): boolean { + const phase: Phase = new PokemonAnimPhase( + battleAnimType, + pokemon, + fieldAssets, + ); if (delayed) { this.pushPhase(phase); } else { @@ -3088,15 +3845,20 @@ export default class BattleScene extends SceneBase { } validateAchvs(achvType: Constructor, ...args: unknown[]): void { - const filteredAchvs = Object.values(achvs).filter(a => a instanceof achvType); + const filteredAchvs = Object.values(achvs).filter( + (a) => a instanceof achvType, + ); for (const achv of filteredAchvs) { this.validateAchv(achv, args); } } validateAchv(achv: Achv, args?: unknown[]): boolean { - if ((!this.gameData.achvUnlocks.hasOwnProperty(achv.id) || Overrides.ACHIEVEMENTS_REUNLOCK_OVERRIDE) - && achv.validate(args)) { + if ( + (!this.gameData.achvUnlocks.hasOwnProperty(achv.id) || + Overrides.ACHIEVEMENTS_REUNLOCK_OVERRIDE) && + achv.validate(args) + ) { this.gameData.achvUnlocks[achv.id] = new Date().getTime(); this.ui.achvBar.showAchv(achv); if (vouchers.hasOwnProperty(achv.id)) { @@ -3109,7 +3871,10 @@ export default class BattleScene extends SceneBase { } validateVoucher(voucher: Voucher, args?: unknown[]): boolean { - if (!this.gameData.voucherUnlocks.hasOwnProperty(voucher.id) && voucher.validate(args)) { + if ( + !this.gameData.voucherUnlocks.hasOwnProperty(voucher.id) && + voucher.validate(args) + ) { this.gameData.voucherUnlocks[voucher.id] = new Date().getTime(); this.ui.achvBar.showAchv(voucher); this.gameData.voucherCounts[voucher.voucherType]++; @@ -3125,19 +3890,21 @@ export default class BattleScene extends SceneBase { gameMode: this.currentBattle ? this.gameMode.getName() : "Title", biome: this.currentBattle ? getBiomeName(this.arena.biomeType) : "", wave: this.currentBattle?.waveIndex ?? 0, - party: this.party ? this.party.map((p) => { - return { - name: p.name, - form: p.getFormKey(), - types: p.getTypes().map((type) => Type[type]), - teraType: Type[p.getTeraType()], - isTerastallized: p.isTerastallized, - level: p.level, - currentHP: p.hp, - maxHP: p.getMaxHp(), - status: p.status?.effect ? StatusEffect[p.status.effect] : "" - }; - }) : [], + party: this.party + ? this.party.map((p) => { + return { + name: p.name, + form: p.getFormKey(), + types: p.getTypes().map((type) => Type[type]), + teraType: Type[p.getTeraType()], + isTerastallized: p.isTerastallized, + level: p.level, + currentHP: p.hp, + maxHP: p.getMaxHp(), + status: p.status?.effect ? StatusEffect[p.status.effect] : "", + }; + }) + : [], modeChain: this.ui?.getModeChain() ?? [], }; (window as any).gameInfo = gameInfo; @@ -3171,26 +3938,44 @@ export default class BattleScene extends SceneBase { * @param pokemon The (enemy) pokemon */ initFinalBossPhaseTwo(pokemon: Pokemon): void { - if (pokemon instanceof EnemyPokemon && pokemon.isBoss() && !pokemon.formIndex && pokemon.bossSegmentIndex < 1) { + if ( + pokemon instanceof EnemyPokemon && + pokemon.isBoss() && + !pokemon.formIndex && + pokemon.bossSegmentIndex < 1 + ) { this.fadeOutBgm(Utils.fixedInt(2000), false); - this.ui.showDialogue(battleSpecDialogue[BattleSpec.FINAL_BOSS].firstStageWin, pokemon.species.name, undefined, () => { - const finalBossMBH = getModifierType(modifierTypes.MINI_BLACK_HOLE).newModifier(pokemon) as TurnHeldItemTransferModifier; - finalBossMBH.setTransferrableFalse(); - this.addEnemyModifier(finalBossMBH, false, true); - pokemon.generateAndPopulateMoveset(1); - this.setFieldScale(0.75); - this.triggerPokemonFormChange(pokemon, SpeciesFormChangeManualTrigger, false); - this.currentBattle.double = true; - const availablePartyMembers = this.getPlayerParty().filter((p) => p.isAllowedInBattle()); - if (availablePartyMembers.length > 1) { - this.pushPhase(new ToggleDoublePositionPhase(true)); - if (!availablePartyMembers[1].isOnField()) { - this.pushPhase(new SummonPhase(1)); + this.ui.showDialogue( + battleSpecDialogue[BattleSpec.FINAL_BOSS].firstStageWin, + pokemon.species.name, + undefined, + () => { + const finalBossMBH = getModifierType( + modifierTypes.MINI_BLACK_HOLE, + ).newModifier(pokemon) as TurnHeldItemTransferModifier; + finalBossMBH.setTransferrableFalse(); + this.addEnemyModifier(finalBossMBH, false, true); + pokemon.generateAndPopulateMoveset(1); + this.setFieldScale(0.75); + this.triggerPokemonFormChange( + pokemon, + SpeciesFormChangeManualTrigger, + false, + ); + this.currentBattle.double = true; + const availablePartyMembers = this.getPlayerParty().filter((p) => + p.isAllowedInBattle(), + ); + if (availablePartyMembers.length > 1) { + this.pushPhase(new ToggleDoublePositionPhase(true)); + if (!availablePartyMembers[1].isOnField()) { + this.pushPhase(new SummonPhase(1)); + } } - } - this.shiftPhase(); - }); + this.shiftPhase(); + }, + ); return; } @@ -3204,33 +3989,62 @@ export default class BattleScene extends SceneBase { * @param useWaveIndexMultiplier Default false. If true, will multiply expValue by a scaling waveIndex multiplier. Not needed if expValue is already scaled by level/wave * @param pokemonParticipantIds Participants. If none are defined, no exp will be given. To spread evenly among the party, should pass all ids of party members. */ - applyPartyExp(expValue: number, pokemonDefeated: boolean, useWaveIndexMultiplier?: boolean, pokemonParticipantIds?: Set): void { - const participantIds = pokemonParticipantIds ?? this.currentBattle.playerParticipantIds; + applyPartyExp( + expValue: number, + pokemonDefeated: boolean, + useWaveIndexMultiplier?: boolean, + pokemonParticipantIds?: Set, + ): void { + const participantIds = + pokemonParticipantIds ?? this.currentBattle.playerParticipantIds; const party = this.getPlayerParty(); - const expShareModifier = this.findModifier(m => m instanceof ExpShareModifier) as ExpShareModifier; - const expBalanceModifier = this.findModifier(m => m instanceof ExpBalanceModifier) as ExpBalanceModifier; - const multipleParticipantExpBonusModifier = this.findModifier(m => m instanceof MultipleParticipantExpBonusModifier) as MultipleParticipantExpBonusModifier; - const nonFaintedPartyMembers = party.filter(p => p.hp); - const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < this.getMaxExpLevel()); + const expShareModifier = this.findModifier( + (m) => m instanceof ExpShareModifier, + ) as ExpShareModifier; + const expBalanceModifier = this.findModifier( + (m) => m instanceof ExpBalanceModifier, + ) as ExpBalanceModifier; + const multipleParticipantExpBonusModifier = this.findModifier( + (m) => m instanceof MultipleParticipantExpBonusModifier, + ) as MultipleParticipantExpBonusModifier; + const nonFaintedPartyMembers = party.filter((p) => p.hp); + const expPartyMembers = nonFaintedPartyMembers.filter( + (p) => p.level < this.getMaxExpLevel(), + ); const partyMemberExp: number[] = []; // EXP value calculation is based off Pokemon.getExpValue if (useWaveIndexMultiplier) { - expValue = Math.floor(expValue * this.currentBattle.waveIndex / 5 + 1); + expValue = Math.floor((expValue * this.currentBattle.waveIndex) / 5 + 1); } if (participantIds.size > 0) { - if (this.currentBattle.battleType === BattleType.TRAINER || this.currentBattle.mysteryEncounter?.encounterMode === MysteryEncounterMode.TRAINER_BATTLE) { + if ( + this.currentBattle.battleType === BattleType.TRAINER || + this.currentBattle.mysteryEncounter?.encounterMode === + MysteryEncounterMode.TRAINER_BATTLE + ) { expValue = Math.floor(expValue * 1.5); - } else if (this.currentBattle.isBattleMysteryEncounter() && this.currentBattle.mysteryEncounter) { - expValue = Math.floor(expValue * this.currentBattle.mysteryEncounter.expMultiplier); + } else if ( + this.currentBattle.isBattleMysteryEncounter() && + this.currentBattle.mysteryEncounter + ) { + expValue = Math.floor( + expValue * this.currentBattle.mysteryEncounter.expMultiplier, + ); } for (const partyMember of nonFaintedPartyMembers) { const pId = partyMember.id; const participated = participantIds.has(pId); if (participated && pokemonDefeated) { partyMember.addFriendship(FRIENDSHIP_GAIN_FROM_BATTLE); - const machoBraceModifier = partyMember.getHeldItems().find(m => m instanceof PokemonIncrementingStatModifier); - if (machoBraceModifier && machoBraceModifier.stackCount < machoBraceModifier.getMaxStackCount()) { + const machoBraceModifier = partyMember + .getHeldItems() + .find((m) => m instanceof PokemonIncrementingStatModifier); + if ( + machoBraceModifier && + machoBraceModifier.stackCount < + machoBraceModifier.getMaxStackCount() + ) { machoBraceModifier.stackCount++; this.updateModifiers(true, true); partyMember.updateInfo(); @@ -3245,12 +4059,14 @@ export default class BattleScene extends SceneBase { } let expMultiplier = 0; if (participated) { - expMultiplier += (1 / participantIds.size); + expMultiplier += 1 / participantIds.size; if (participantIds.size > 1 && multipleParticipantExpBonusModifier) { - expMultiplier += multipleParticipantExpBonusModifier.getStackCount() * 0.2; + expMultiplier += + multipleParticipantExpBonusModifier.getStackCount() * 0.2; } } else if (expShareModifier) { - expMultiplier += (expShareModifier.getStackCount() * 0.2) / participantIds.size; + expMultiplier += + (expShareModifier.getStackCount() * 0.2) / participantIds.size; } if (partyMember.pokerus) { expMultiplier *= 1.5; @@ -3259,7 +4075,12 @@ export default class BattleScene extends SceneBase { expMultiplier = Overrides.XP_MULTIPLIER_OVERRIDE; } const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier); - this.applyModifiers(PokemonExpBoosterModifier, true, partyMember, pokemonExp); + this.applyModifiers( + PokemonExpBoosterModifier, + true, + partyMember, + pokemonExp, + ); partyMemberExp.push(Math.floor(pokemonExp.value)); } @@ -3280,10 +4101,16 @@ export default class BattleScene extends SceneBase { } }); - const splitExp = Math.floor(totalExp / recipientExpPartyMemberIndexes.length); + const splitExp = Math.floor( + totalExp / recipientExpPartyMemberIndexes.length, + ); expPartyMembers.forEach((_partyMember, pm) => { - partyMemberExp[pm] = Phaser.Math.Linear(partyMemberExp[pm], recipientExpPartyMemberIndexes.indexOf(pm) > -1 ? splitExp : 0, 0.2 * expBalanceModifier.getStackCount()); + partyMemberExp[pm] = Phaser.Math.Linear( + partyMemberExp[pm], + recipientExpPartyMemberIndexes.indexOf(pm) > -1 ? splitExp : 0, + 0.2 * expBalanceModifier.getStackCount(), + ); }); } @@ -3292,7 +4119,11 @@ export default class BattleScene extends SceneBase { if (exp) { const partyMemberIndex = party.indexOf(expPartyMembers[pm]); - this.unshiftPhase(expPartyMembers[pm].isOnField() ? new ExpPhase(partyMemberIndex, exp) : new ShowPartyExpBarPhase(partyMemberIndex, exp)); + this.unshiftPhase( + expPartyMembers[pm].isOnField() + ? new ExpPhase(partyMemberIndex, exp) + : new ShowPartyExpBarPhase(partyMemberIndex, exp), + ); } } } @@ -3303,9 +4134,19 @@ export default class BattleScene extends SceneBase { * Even if returns `true`, does not guarantee that a wave will actually be a ME. * That check is made in {@linkcode BattleScene.isWaveMysteryEncounter} instead. */ - isMysteryEncounterValidForWave(battleType: BattleType, waveIndex: number): boolean { - const [ lowestMysteryEncounterWave, highestMysteryEncounterWave ] = this.gameMode.getMysteryEncounterLegalWaves(); - return this.gameMode.hasMysteryEncounters && battleType === BattleType.WILD && !this.gameMode.isBoss(waveIndex) && waveIndex < highestMysteryEncounterWave && waveIndex > lowestMysteryEncounterWave; + isMysteryEncounterValidForWave( + battleType: BattleType, + waveIndex: number, + ): boolean { + const [ lowestMysteryEncounterWave, highestMysteryEncounterWave ] = + this.gameMode.getMysteryEncounterLegalWaves(); + return ( + this.gameMode.hasMysteryEncounters && + battleType === BattleType.WILD && + !this.gameMode.isBoss(waveIndex) && + waveIndex < highestMysteryEncounterWave && + waveIndex > lowestMysteryEncounterWave + ); } /** @@ -3315,31 +4156,56 @@ export default class BattleScene extends SceneBase { * @param newBattleType * @param waveIndex */ - private isWaveMysteryEncounter(newBattleType: BattleType, waveIndex: number): boolean { - const [ lowestMysteryEncounterWave, highestMysteryEncounterWave ] = this.gameMode.getMysteryEncounterLegalWaves(); + private isWaveMysteryEncounter( + newBattleType: BattleType, + waveIndex: number, + ): boolean { + const [ lowestMysteryEncounterWave, highestMysteryEncounterWave ] = + this.gameMode.getMysteryEncounterLegalWaves(); if (this.isMysteryEncounterValidForWave(newBattleType, waveIndex)) { // Base spawn weight is BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT/256, and increases by WEIGHT_INCREMENT_ON_SPAWN_MISS/256 for each missed attempt at spawning an encounter on a valid floor - const sessionEncounterRate = this.mysteryEncounterSaveData.encounterSpawnChance; + const sessionEncounterRate = + this.mysteryEncounterSaveData.encounterSpawnChance; const encounteredEvents = this.mysteryEncounterSaveData.encounteredEvents; // If total number of encounters is lower than expected for the run, slightly favor a new encounter spawn (reverse as well) // Reduces occurrence of runs with total encounters significantly different from AVERAGE_ENCOUNTERS_PER_RUN_TARGET // Favored rate changes can never exceed 50%. So if base rate is 15/256 and favored rate would add 200/256, result will be (15 + 128)/256 - const expectedEncountersByFloor = AVERAGE_ENCOUNTERS_PER_RUN_TARGET / (highestMysteryEncounterWave - lowestMysteryEncounterWave) * (waveIndex - lowestMysteryEncounterWave); - const currentRunDiffFromAvg = expectedEncountersByFloor - encounteredEvents.length; - const favoredEncounterRate = sessionEncounterRate + Math.min(currentRunDiffFromAvg * ANTI_VARIANCE_WEIGHT_MODIFIER, MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT / 2); + const expectedEncountersByFloor = + (AVERAGE_ENCOUNTERS_PER_RUN_TARGET / + (highestMysteryEncounterWave - lowestMysteryEncounterWave)) * + (waveIndex - lowestMysteryEncounterWave); + const currentRunDiffFromAvg = + expectedEncountersByFloor - encounteredEvents.length; + const favoredEncounterRate = + sessionEncounterRate + + Math.min( + currentRunDiffFromAvg * ANTI_VARIANCE_WEIGHT_MODIFIER, + MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT / 2, + ); - const successRate = isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_RATE_OVERRIDE) ? favoredEncounterRate : Overrides.MYSTERY_ENCOUNTER_RATE_OVERRIDE!; + const successRate = isNullOrUndefined( + Overrides.MYSTERY_ENCOUNTER_RATE_OVERRIDE, + ) + ? favoredEncounterRate + : Overrides.MYSTERY_ENCOUNTER_RATE_OVERRIDE!; // If the most recent ME was 3 or fewer waves ago, can never spawn a ME - const canSpawn = encounteredEvents.length === 0 || (waveIndex - encounteredEvents[encounteredEvents.length - 1].waveIndex) > 3 || !isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_RATE_OVERRIDE); + const canSpawn = + encounteredEvents.length === 0 || + waveIndex - encounteredEvents[encounteredEvents.length - 1].waveIndex > + 3 || + !isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_RATE_OVERRIDE); if (canSpawn) { let roll = MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT; // Always rolls the check on the same offset to ensure no RNG changes from reloading session - this.executeWithSeedOffset(() => { - roll = randSeedInt(MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT); - }, waveIndex * 3 * 1000); + this.executeWithSeedOffset( + () => { + roll = randSeedInt(MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT); + }, + waveIndex * 3 * 1000, + ); return roll < successRate; } } @@ -3353,10 +4219,16 @@ export default class BattleScene extends SceneBase { * @param canBypass optional boolean to indicate that the request is coming from a function that needs to access a Mystery Encounter outside of gameplay requirements * @returns */ - getMysteryEncounter(encounterType?: MysteryEncounterType, canBypass?: boolean): MysteryEncounter { + getMysteryEncounter( + encounterType?: MysteryEncounterType, + canBypass?: boolean, + ): MysteryEncounter { // Loading override or session encounter let encounter: MysteryEncounter | null; - if (!isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_OVERRIDE) && allMysteryEncounters.hasOwnProperty(Overrides.MYSTERY_ENCOUNTER_OVERRIDE)) { + if ( + !isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_OVERRIDE) && + allMysteryEncounters.hasOwnProperty(Overrides.MYSTERY_ENCOUNTER_OVERRIDE) + ) { encounter = allMysteryEncounters[Overrides.MYSTERY_ENCOUNTER_OVERRIDE]; if (canBypass) { return encounter; @@ -3365,13 +4237,22 @@ export default class BattleScene extends SceneBase { encounter = allMysteryEncounters[encounterType ?? -1]; return encounter; } else { - encounter = !isNullOrUndefined(encounterType) ? allMysteryEncounters[encounterType] : null; + encounter = !isNullOrUndefined(encounterType) + ? allMysteryEncounters[encounterType] + : null; } // Check for queued encounters first - if (!encounter && this.mysteryEncounterSaveData?.queuedEncounters && this.mysteryEncounterSaveData.queuedEncounters.length > 0) { + if ( + !encounter && + this.mysteryEncounterSaveData?.queuedEncounters && + this.mysteryEncounterSaveData.queuedEncounters.length > 0 + ) { let i = 0; - while (i < this.mysteryEncounterSaveData.queuedEncounters.length && !!encounter) { + while ( + i < this.mysteryEncounterSaveData.queuedEncounters.length && + !!encounter + ) { const candidate = this.mysteryEncounterSaveData.queuedEncounters[i]; const forcedChance = candidate.spawnPercent; if (Utils.randSeedInt(100) < forcedChance) { @@ -3389,34 +4270,56 @@ export default class BattleScene extends SceneBase { } // See Enum values for base tier weights - const tierWeights = [ MysteryEncounterTier.COMMON, MysteryEncounterTier.GREAT, MysteryEncounterTier.ULTRA, MysteryEncounterTier.ROGUE ]; + const tierWeights = [ + MysteryEncounterTier.COMMON, + MysteryEncounterTier.GREAT, + MysteryEncounterTier.ULTRA, + MysteryEncounterTier.ROGUE, + ]; // Adjust tier weights by previously encountered events to lower odds of only Common/Great in run - this.mysteryEncounterSaveData.encounteredEvents.forEach(seenEncounterData => { - if (seenEncounterData.tier === MysteryEncounterTier.COMMON) { - tierWeights[0] = tierWeights[0] - 6; - } else if (seenEncounterData.tier === MysteryEncounterTier.GREAT) { - tierWeights[1] = tierWeights[1] - 4; - } - }); + this.mysteryEncounterSaveData.encounteredEvents.forEach( + (seenEncounterData) => { + if (seenEncounterData.tier === MysteryEncounterTier.COMMON) { + tierWeights[0] = tierWeights[0] - 6; + } else if (seenEncounterData.tier === MysteryEncounterTier.GREAT) { + tierWeights[1] = tierWeights[1] - 4; + } + }, + ); const totalWeight = tierWeights.reduce((a, b) => a + b); const tierValue = Utils.randSeedInt(totalWeight); const commonThreshold = totalWeight - tierWeights[0]; const greatThreshold = totalWeight - tierWeights[0] - tierWeights[1]; - const ultraThreshold = totalWeight - tierWeights[0] - tierWeights[1] - tierWeights[2]; - let tier: MysteryEncounterTier | null = tierValue > commonThreshold ? MysteryEncounterTier.COMMON : tierValue > greatThreshold ? MysteryEncounterTier.GREAT : tierValue > ultraThreshold ? MysteryEncounterTier.ULTRA : MysteryEncounterTier.ROGUE; + const ultraThreshold = + totalWeight - tierWeights[0] - tierWeights[1] - tierWeights[2]; + let tier: MysteryEncounterTier | null = + tierValue > commonThreshold + ? MysteryEncounterTier.COMMON + : tierValue > greatThreshold + ? MysteryEncounterTier.GREAT + : tierValue > ultraThreshold + ? MysteryEncounterTier.ULTRA + : MysteryEncounterTier.ROGUE; if (!isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_TIER_OVERRIDE)) { tier = Overrides.MYSTERY_ENCOUNTER_TIER_OVERRIDE; } let availableEncounters: MysteryEncounter[] = []; - const previousEncounter = this.mysteryEncounterSaveData.encounteredEvents.length > 0 ? - this.mysteryEncounterSaveData.encounteredEvents[this.mysteryEncounterSaveData.encounteredEvents.length - 1].type - : null; - const disabledEncounters = this.eventManager.getEventMysteryEncountersDisabled(); - const biomeMysteryEncounters = mysteryEncountersByBiome.get(this.arena.biomeType)?.filter(enc => !disabledEncounters.includes(enc)) ?? []; + const previousEncounter = + this.mysteryEncounterSaveData.encounteredEvents.length > 0 + ? this.mysteryEncounterSaveData.encounteredEvents[ + this.mysteryEncounterSaveData.encounteredEvents.length - 1 + ].type + : null; + const disabledEncounters = + this.eventManager.getEventMysteryEncountersDisabled(); + const biomeMysteryEncounters = + mysteryEncountersByBiome + .get(this.arena.biomeType) + ?.filter((enc) => !disabledEncounters.includes(enc)) ?? []; // If no valid encounters exist at tier, checks next tier down, continuing until there are some encounters available while (availableEncounters.length === 0 && tier !== null) { availableEncounters = biomeMysteryEncounters @@ -3425,34 +4328,57 @@ export default class BattleScene extends SceneBase { if (!encounterCandidate) { return false; } - if (this.eventManager.getMysteryEncounterTierForEvent(encounterType, encounterCandidate.encounterTier) !== tier) { + if ( + this.eventManager.getMysteryEncounterTierForEvent( + encounterType, + encounterCandidate.encounterTier, + ) !== tier + ) { return false; } const disallowedGameModes = encounterCandidate.disallowedGameModes; - if (disallowedGameModes && disallowedGameModes.length > 0 - && disallowedGameModes.includes(this.gameMode.modeId)) { + if ( + disallowedGameModes && + disallowedGameModes.length > 0 && + disallowedGameModes.includes(this.gameMode.modeId) + ) { return false; } if (this.gameMode.modeId === GameModes.CHALLENGE) { - const disallowedChallenges = encounterCandidate.disallowedChallenges; - if (disallowedChallenges && disallowedChallenges.length > 0 && this.gameMode.challenges.some(challenge => disallowedChallenges.includes(challenge.id))) { + const disallowedChallenges = + encounterCandidate.disallowedChallenges; + if ( + disallowedChallenges && + disallowedChallenges.length > 0 && + this.gameMode.challenges.some((challenge) => + disallowedChallenges.includes(challenge.id), + ) + ) { return false; } } if (!encounterCandidate.meetsRequirements()) { return false; } - if (previousEncounter !== null && encounterType === previousEncounter) { + if ( + previousEncounter !== null && + encounterType === previousEncounter + ) { return false; } - if (this.mysteryEncounterSaveData.encounteredEvents.length > 0 && - (encounterCandidate.maxAllowedEncounters && encounterCandidate.maxAllowedEncounters > 0) - && this.mysteryEncounterSaveData.encounteredEvents.filter(e => e.type === encounterType).length >= encounterCandidate.maxAllowedEncounters) { + if ( + this.mysteryEncounterSaveData.encounteredEvents.length > 0 && + encounterCandidate.maxAllowedEncounters && + encounterCandidate.maxAllowedEncounters > 0 && + this.mysteryEncounterSaveData.encounteredEvents.filter( + (e) => e.type === encounterType, + ).length >= encounterCandidate.maxAllowedEncounters + ) { return false; } return true; }) - .map((m) => (allMysteryEncounters[m])); + .map((m) => allMysteryEncounters[m]); // Decrement tier if (tier === MysteryEncounterTier.ROGUE) { tier = MysteryEncounterTier.ULTRA; @@ -3467,10 +4393,13 @@ export default class BattleScene extends SceneBase { // If absolutely no encounters are available, spawn 0th encounter if (availableEncounters.length === 0) { - console.log("No Mystery Encounters found, falling back to Mysterious Challengers."); + console.log( + "No Mystery Encounters found, falling back to Mysterious Challengers.", + ); return allMysteryEncounters[MysteryEncounterType.MYSTERIOUS_CHALLENGERS]; } - encounter = availableEncounters[Utils.randSeedInt(availableEncounters.length)]; + encounter = + availableEncounters[Utils.randSeedInt(availableEncounters.length)]; // New encounter object to not dirty flags encounter = new MysteryEncounter(encounter); encounter.populateDialogueTokensFromRequirements(); diff --git a/src/configs/inputs/cfg_keyboard_qwerty.ts b/src/configs/inputs/cfg_keyboard_qwerty.ts index 5ddc12e8784..c1b00a833c0 100644 --- a/src/configs/inputs/cfg_keyboard_qwerty.ts +++ b/src/configs/inputs/cfg_keyboard_qwerty.ts @@ -180,9 +180,9 @@ const cfg_keyboard_qwerty = { [SettingKeyboard.Button_Cycle_Gender]: Button.CYCLE_GENDER, [SettingKeyboard.Button_Cycle_Ability]: Button.CYCLE_ABILITY, [SettingKeyboard.Button_Cycle_Nature]: Button.CYCLE_NATURE, - [SettingKeyboard.Button_Cycle_Variant]: Button.V, [SettingKeyboard.Button_Speed_Up]: Button.SPEED_UP, [SettingKeyboard.Button_Slow_Down]: Button.SLOW_DOWN, + [SettingKeyboard.Button_Cycle_Tera]: Button.CYCLE_TERA, [SettingKeyboard.Alt_Button_Up]: Button.UP, [SettingKeyboard.Alt_Button_Down]: Button.DOWN, [SettingKeyboard.Alt_Button_Left]: Button.LEFT, @@ -197,9 +197,9 @@ const cfg_keyboard_qwerty = { [SettingKeyboard.Alt_Button_Cycle_Gender]: Button.CYCLE_GENDER, [SettingKeyboard.Alt_Button_Cycle_Ability]: Button.CYCLE_ABILITY, [SettingKeyboard.Alt_Button_Cycle_Nature]: Button.CYCLE_NATURE, - [SettingKeyboard.Alt_Button_Cycle_Variant]: Button.V, [SettingKeyboard.Alt_Button_Speed_Up]: Button.SPEED_UP, [SettingKeyboard.Alt_Button_Slow_Down]: Button.SLOW_DOWN, + [SettingKeyboard.Alt_Button_Cycle_Tera]: Button.CYCLE_TERA, }, default: { KEY_ARROW_UP: SettingKeyboard.Button_Up, @@ -216,7 +216,7 @@ const cfg_keyboard_qwerty = { KEY_G: SettingKeyboard.Button_Cycle_Gender, KEY_E: SettingKeyboard.Button_Cycle_Ability, KEY_N: SettingKeyboard.Button_Cycle_Nature, - KEY_V: SettingKeyboard.Button_Cycle_Variant, + KEY_V: SettingKeyboard.Button_Cycle_Tera, KEY_PLUS: -1, KEY_MINUS: -1, KEY_A: SettingKeyboard.Alt_Button_Left, diff --git a/src/configs/inputs/pad_dualshock.ts b/src/configs/inputs/pad_dualshock.ts index 2fbdd0ddfaa..265b39fdad5 100644 --- a/src/configs/inputs/pad_dualshock.ts +++ b/src/configs/inputs/pad_dualshock.ts @@ -53,7 +53,7 @@ const pad_dualshock = { [SettingGamepad.Button_Action]: Button.ACTION, [SettingGamepad.Button_Cancel]: Button.CANCEL, [SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE, - [SettingGamepad.Button_Cycle_Variant]: Button.V, + [SettingGamepad.Button_Cycle_Tera]: Button.CYCLE_TERA, [SettingGamepad.Button_Menu]: Button.MENU, [SettingGamepad.Button_Stats]: Button.STATS, [SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM, @@ -72,7 +72,7 @@ const pad_dualshock = { RC_S: SettingGamepad.Button_Action, RC_E: SettingGamepad.Button_Cancel, RC_W: SettingGamepad.Button_Cycle_Nature, - RC_N: SettingGamepad.Button_Cycle_Variant, + RC_N: SettingGamepad.Button_Cycle_Tera, START: SettingGamepad.Button_Menu, SELECT: SettingGamepad.Button_Stats, LB: SettingGamepad.Button_Cycle_Form, diff --git a/src/configs/inputs/pad_generic.ts b/src/configs/inputs/pad_generic.ts index 256af8f0fe3..cd91fcd8b17 100644 --- a/src/configs/inputs/pad_generic.ts +++ b/src/configs/inputs/pad_generic.ts @@ -51,7 +51,7 @@ const pad_generic = { [SettingGamepad.Button_Action]: Button.ACTION, [SettingGamepad.Button_Cancel]: Button.CANCEL, [SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE, - [SettingGamepad.Button_Cycle_Variant]: Button.V, + [SettingGamepad.Button_Cycle_Tera]: Button.CYCLE_TERA, [SettingGamepad.Button_Menu]: Button.MENU, [SettingGamepad.Button_Stats]: Button.STATS, [SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM, @@ -69,7 +69,7 @@ const pad_generic = { RC_S: SettingGamepad.Button_Action, RC_E: SettingGamepad.Button_Cancel, RC_W: SettingGamepad.Button_Cycle_Nature, - RC_N: SettingGamepad.Button_Cycle_Variant, + RC_N: SettingGamepad.Button_Cycle_Tera, START: SettingGamepad.Button_Menu, SELECT: SettingGamepad.Button_Stats, LB: SettingGamepad.Button_Cycle_Form, diff --git a/src/configs/inputs/pad_procon.ts b/src/configs/inputs/pad_procon.ts index 98d17c4ef57..a7ae5383fbe 100644 --- a/src/configs/inputs/pad_procon.ts +++ b/src/configs/inputs/pad_procon.ts @@ -52,7 +52,7 @@ const pad_procon = { [SettingGamepad.Button_Action]: Button.ACTION, [SettingGamepad.Button_Cancel]: Button.CANCEL, [SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE, - [SettingGamepad.Button_Cycle_Variant]: Button.V, + [SettingGamepad.Button_Cycle_Tera]: Button.CYCLE_TERA, [SettingGamepad.Button_Menu]: Button.MENU, [SettingGamepad.Button_Stats]: Button.STATS, [SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM, @@ -70,7 +70,7 @@ const pad_procon = { RC_S: SettingGamepad.Button_Action, RC_E: SettingGamepad.Button_Cancel, RC_W: SettingGamepad.Button_Cycle_Nature, - RC_N: SettingGamepad.Button_Cycle_Variant, + RC_N: SettingGamepad.Button_Cycle_Tera, START: SettingGamepad.Button_Menu, SELECT: SettingGamepad.Button_Stats, LB: SettingGamepad.Button_Cycle_Form, diff --git a/src/configs/inputs/pad_unlicensedSNES.ts b/src/configs/inputs/pad_unlicensedSNES.ts index 77e68e6a644..fbde98b3fa2 100644 --- a/src/configs/inputs/pad_unlicensedSNES.ts +++ b/src/configs/inputs/pad_unlicensedSNES.ts @@ -43,7 +43,7 @@ const pad_unlicensedSNES = { [SettingGamepad.Button_Action]: Button.ACTION, [SettingGamepad.Button_Cancel]: Button.CANCEL, [SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE, - [SettingGamepad.Button_Cycle_Variant]: Button.V, + [SettingGamepad.Button_Cycle_Tera]: Button.CYCLE_TERA, [SettingGamepad.Button_Menu]: Button.MENU, [SettingGamepad.Button_Stats]: Button.STATS, [SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM, @@ -61,7 +61,7 @@ const pad_unlicensedSNES = { RC_S: SettingGamepad.Button_Action, RC_E: SettingGamepad.Button_Cancel, RC_W: SettingGamepad.Button_Cycle_Nature, - RC_N: SettingGamepad.Button_Cycle_Variant, + RC_N: SettingGamepad.Button_Cycle_Tera, START: SettingGamepad.Button_Menu, SELECT: SettingGamepad.Button_Stats, LB: SettingGamepad.Button_Cycle_Form, diff --git a/src/configs/inputs/pad_xbox360.ts b/src/configs/inputs/pad_xbox360.ts index 6afc452f50b..88fee731d1d 100644 --- a/src/configs/inputs/pad_xbox360.ts +++ b/src/configs/inputs/pad_xbox360.ts @@ -51,7 +51,7 @@ const pad_xbox360 = { [SettingGamepad.Button_Action]: Button.ACTION, [SettingGamepad.Button_Cancel]: Button.CANCEL, [SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE, - [SettingGamepad.Button_Cycle_Variant]: Button.V, + [SettingGamepad.Button_Cycle_Tera]: Button.CYCLE_TERA, [SettingGamepad.Button_Menu]: Button.MENU, [SettingGamepad.Button_Stats]: Button.STATS, [SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM, @@ -69,7 +69,7 @@ const pad_xbox360 = { RC_S: SettingGamepad.Button_Action, RC_E: SettingGamepad.Button_Cancel, RC_W: SettingGamepad.Button_Cycle_Nature, - RC_N: SettingGamepad.Button_Cycle_Variant, + RC_N: SettingGamepad.Button_Cycle_Tera, START: SettingGamepad.Button_Menu, SELECT: SettingGamepad.Button_Stats, LB: SettingGamepad.Button_Cycle_Form, diff --git a/src/data/ability.ts b/src/data/ability.ts index 9be52bf8e33..d4a916c68be 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1,6 +1,6 @@ -import type { EnemyPokemon } from "../field/pokemon"; +import type { EnemyPokemon, PokemonMove } from "../field/pokemon"; import type Pokemon from "../field/pokemon"; -import { HitResult, MoveResult, PlayerPokemon, PokemonMove } from "../field/pokemon"; +import { HitResult, MoveResult, PlayerPokemon } from "../field/pokemon"; import { Type } from "#enums/type"; import type { Constructor } from "#app/utils"; import * as Utils from "../utils"; @@ -44,6 +44,7 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { PokemonAnimType } from "#enums/pokemon-anim-type"; import { StatusEffect } from "#enums/status-effect"; import { WeatherType } from "#enums/weather-type"; +import { PokemonTransformPhase } from "#app/phases/pokemon-transform-phase"; export class Ability implements Localizable { public id: Abilities; @@ -143,7 +144,7 @@ export class Ability implements Localizable { } } -type AbAttrApplyFunc = (attr: TAttr, passive: boolean) => boolean | Promise; +type AbAttrApplyFunc = (attr: TAttr, passive: boolean) => boolean; type AbAttrCondition = (pokemon: Pokemon) => boolean; // TODO: Can this be improved? @@ -159,7 +160,7 @@ export abstract class AbAttr { this.showAbility = showAbility; } - apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder | null, args: any[]): boolean | Promise { + apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder | null, args: any[]): boolean { return false; } @@ -215,7 +216,7 @@ export class DoubleBattleChanceAbAttr extends AbAttr { } export class PostBattleInitAbAttr extends AbAttr { - applyPostBattleInit(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPostBattleInit(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { return false; } } @@ -250,7 +251,7 @@ export class PostTeraFormChangeStatChangeAbAttr extends AbAttr { this.stages = stages; } - apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder | null, args: any[]): boolean | Promise { + apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder | null, args: any[]): boolean { const statStageChangePhases: StatStageChangePhase[] = []; if (!simulated) { @@ -265,10 +266,64 @@ export class PostTeraFormChangeStatChangeAbAttr extends AbAttr { } } +/** + * Clears a specified weather whenever this attribute is called. + */ +export class ClearWeatherAbAttr extends AbAttr { + private weather: WeatherType[]; + + /** + * @param weather {@linkcode WeatherType[]} - the weather to be removed + */ + constructor(weather: WeatherType[]) { + super(true); + + this.weather = weather; + } + + apply(pokemon: Pokemon, passive: boolean, simulated:boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { + if (!simulated) { + globalScene.arena.trySetWeather(WeatherType.NONE, true); + } + return true; + } +} + +/** + * Clears a specified terrain whenever this attribute is called. + */ +export class ClearTerrainAbAttr extends AbAttr { + private terrain: TerrainType[]; + + /** + * @param terrain {@linkcode TerrainType[]} - the terrain to be removed + */ + constructor(terrain: TerrainType[]) { + super(true); + + this.terrain = terrain; + } + + apply(pokemon: Pokemon, passive: boolean, simulated:boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { + if (!simulated) { + globalScene.arena.trySetTerrain(TerrainType.NONE, true, true); + } + return true; + } +} + type PreDefendAbAttrCondition = (pokemon: Pokemon, attacker: Pokemon, move: Move) => boolean; export class PreDefendAbAttr extends AbAttr { - applyPreDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move | null, cancelled: Utils.BooleanHolder | null, args: any[]): boolean | Promise { + applyPreDefend( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + attacker: Pokemon, + move: Move | null, + cancelled: Utils.BooleanHolder | null, + args: any[], + ): boolean { return false; } } @@ -546,7 +601,15 @@ export class FullHpResistTypeAbAttr extends PreDefendAbAttr { * @param args `[0]` a container for the move's current type effectiveness multiplier * @returns `true` if the move's effectiveness is reduced; `false` otherwise */ - applyPreDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move | null, cancelled: Utils.BooleanHolder | null, args: any[]): boolean | Promise { + override applyPreDefend( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + attacker: Pokemon, + move: Move | null, + cancelled: Utils.BooleanHolder | null, + args: any[], + ): boolean { const typeMultiplier = args[0]; if (!(typeMultiplier && typeMultiplier instanceof Utils.NumberHolder)) { return false; @@ -572,7 +635,15 @@ export class FullHpResistTypeAbAttr extends PreDefendAbAttr { } export class PostDefendAbAttr extends AbAttr { - applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean | Promise { + applyPostDefend( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + attacker: Pokemon, + move: Move, + hitResult: HitResult | null, + args: any[], + ): boolean { return false; } } @@ -593,7 +664,14 @@ export class FieldPriorityMoveImmunityAbAttr extends PreDefendAbAttr { } export class PostStatStageChangeAbAttr extends AbAttr { - applyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: number, selfTarget: boolean, args: any[]): boolean | Promise { + applyPostStatStageChange( + pokemon: Pokemon, + simulated: boolean, + statsChanged: BattleStat[], + stagesChanged: integer, + selfTarget: boolean, + args: any[], + ): boolean { return false; } } @@ -1142,7 +1220,14 @@ export class PostStatStageChangeStatStageChangeAbAttr extends PostStatStageChang } export class PreAttackAbAttr extends AbAttr { - applyPreAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon | null, move: Move, args: any[]): boolean | Promise { + applyPreAttack( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + defender: Pokemon | null, + move: Move, + args: any[], + ): boolean { return false; } } @@ -1208,7 +1293,13 @@ export class VariableMovePowerAbAttr extends PreAttackAbAttr { } export class FieldPreventExplosiveMovesAbAttr extends AbAttr { - apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { + override apply( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + cancelled: Utils.BooleanHolder, + args: any[], + ): boolean { cancelled.value = true; return true; } @@ -1404,7 +1495,7 @@ export class DamageBoostAbAttr extends PreAttackAbAttr { applyPreAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, args: any[]): boolean { if (this.condition(pokemon, defender, move)) { const power = args[0] as Utils.NumberHolder; - power.value = Math.floor(power.value * this.damageMultiplier); + power.value = Utils.toDmgValue(power.value * this.damageMultiplier); return true; } @@ -1562,8 +1653,15 @@ export class StatMultiplierAbAttr extends AbAttr { this.condition = condition ?? null; } - applyStatStage(pokemon: Pokemon, _passive: boolean, simulated: boolean, stat: BattleStat, statValue: Utils.NumberHolder, args: any[]): boolean | Promise { - const move = (args[0] as Move); + applyStatStage( + pokemon: Pokemon, + _passive: boolean, + simulated: boolean, + stat: BattleStat, + statValue: Utils.NumberHolder, + args: any[], + ): boolean { + const move = args[0] as Move; if (stat === this.stat && (!this.condition || this.condition(pokemon, null, move))) { statValue.value *= this.multiplier; return true; @@ -1588,7 +1686,15 @@ export class PostAttackAbAttr extends AbAttr { * applying the effect of any inherited class. This can be changed by providing a different {@link attackCondition} to the constructor. See {@link ConfusionOnStatusEffectAbAttr} * for an example of an effect that does not require a damaging move. */ - applyPostAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean | Promise { + applyPostAttack( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + defender: Pokemon, + move: Move, + hitResult: HitResult | null, + args: any[], + ): boolean { // When attackRequired is true, we require the move to be an attack move and to deal damage before checking secondary requirements. // If attackRequired is false, we always defer to the secondary requirements. if (this.attackCondition(pokemon, defender, move)) { @@ -1601,7 +1707,15 @@ export class PostAttackAbAttr extends AbAttr { /** * This method is only called after {@link applyPostAttack} has already been applied. Use this for handling checks specific to the ability in question. */ - applyPostAttackAfterMoveTypeCheck(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean | Promise { + applyPostAttackAfterMoveTypeCheck( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + defender: Pokemon, + move: Move, + hitResult: HitResult | null, + args: any[], + ): boolean { return false; } } @@ -1626,7 +1740,15 @@ export class GorillaTacticsAbAttr extends PostAttackAbAttr { * @param args n/a * @returns `true` if the ability is applied */ - applyPostAttackAfterMoveTypeCheck(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean | Promise { + override applyPostAttackAfterMoveTypeCheck( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + defender: Pokemon, + move: Move, + hitResult: HitResult | null, + args: any[], + ): boolean { if (simulated) { return simulated; } @@ -1649,23 +1771,36 @@ export class PostAttackStealHeldItemAbAttr extends PostAttackAbAttr { this.stealCondition = stealCondition ?? null; } - applyPostAttackAfterMoveTypeCheck(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, hitResult: HitResult, args: any[]): Promise { - return new Promise(resolve => { - if (!simulated && hitResult < HitResult.NO_EFFECT && (!this.stealCondition || this.stealCondition(pokemon, defender, move))) { - const heldItems = this.getTargetHeldItems(defender).filter(i => i.isTransferable); - if (heldItems.length) { - const stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)]; - globalScene.tryTransferHeldItemModifier(stolenItem, pokemon, false).then(success => { - if (success) { - globalScene.queueMessage(i18next.t("abilityTriggers:postAttackStealHeldItem", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), defenderName: defender.name, stolenItemType: stolenItem.type.name })); - } - resolve(success); - }); - return; + override applyPostAttackAfterMoveTypeCheck( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + defender: Pokemon, + move: Move, + hitResult: HitResult, + args: any[], + ): boolean { + if ( + !simulated && + hitResult < HitResult.NO_EFFECT && + (!this.stealCondition || this.stealCondition(pokemon, defender, move)) + ) { + const heldItems = this.getTargetHeldItems(defender).filter((i) => i.isTransferable); + if (heldItems.length) { + const stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)]; + if (globalScene.tryTransferHeldItemModifier(stolenItem, pokemon, false)) { + globalScene.queueMessage( + i18next.t("abilityTriggers:postAttackStealHeldItem", { + pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), + defenderName: defender.name, + stolenItemType: stolenItem.type.name, + }), + ); + return true; } } - resolve(simulated); - }); + } + return false; } getTargetHeldItems(target: Pokemon): PokemonHeldItemModifier[] { @@ -1742,23 +1877,37 @@ export class PostDefendStealHeldItemAbAttr extends PostDefendAbAttr { this.condition = condition; } - override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, _args: any[]): Promise { - return new Promise(resolve => { - if (!simulated && hitResult < HitResult.NO_EFFECT && (!this.condition || this.condition(pokemon, attacker, move)) && !move.hitsSubstitute(attacker, pokemon)) { - const heldItems = this.getTargetHeldItems(attacker).filter(i => i.isTransferable); - if (heldItems.length) { - const stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)]; - globalScene.tryTransferHeldItemModifier(stolenItem, pokemon, false).then(success => { - if (success) { - globalScene.queueMessage(i18next.t("abilityTriggers:postDefendStealHeldItem", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), attackerName: attacker.name, stolenItemType: stolenItem.type.name })); - } - resolve(success); - }); - return; + override applyPostDefend( + pokemon: Pokemon, + _passive: boolean, + simulated: boolean, + attacker: Pokemon, + move: Move, + hitResult: HitResult, + _args: any[], + ): boolean { + if ( + !simulated && + hitResult < HitResult.NO_EFFECT && + (!this.condition || this.condition(pokemon, attacker, move)) && + !move.hitsSubstitute(attacker, pokemon) + ) { + const heldItems = this.getTargetHeldItems(attacker).filter((i) => i.isTransferable); + if (heldItems.length) { + const stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)]; + if (globalScene.tryTransferHeldItemModifier(stolenItem, pokemon, false)) { + globalScene.queueMessage( + i18next.t("abilityTriggers:postDefendStealHeldItem", { + pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), + attackerName: attacker.name, + stolenItemType: stolenItem.type.name, + }), + ); + return true; } } - resolve(simulated); - }); + } + return false; } getTargetHeldItems(target: Pokemon): PokemonHeldItemModifier[] { @@ -1781,7 +1930,14 @@ export class PostSetStatusAbAttr extends AbAttr { * @param args Set of unique arguments needed by this attribute. * @returns `true` if application of the ability succeeds. */ - applyPostSetStatus(pokemon: Pokemon, sourcePokemon: Pokemon | null = null, passive: boolean, effect: StatusEffect, simulated: boolean, args: any[]) : boolean | Promise { + applyPostSetStatus( + pokemon: Pokemon, + sourcePokemon: Pokemon | null = null, + passive: boolean, + effect: StatusEffect, + simulated: boolean, + args: any[], + ): boolean { return false; } } @@ -1823,7 +1979,7 @@ export class SynchronizeStatusAbAttr extends PostSetStatusAbAttr { } export class PostVictoryAbAttr extends AbAttr { - applyPostVictory(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPostVictory(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { return false; } } @@ -1839,10 +1995,8 @@ class PostVictoryStatStageChangeAbAttr extends PostVictoryAbAttr { this.stages = stages; } - applyPostVictory(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { - const stat = typeof this.stat === "function" - ? this.stat(pokemon) - : this.stat; + applyPostVictory(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { + const stat = typeof this.stat === "function" ? this.stat(pokemon) : this.stat; if (!simulated) { globalScene.unshiftPhase(new StatStageChangePhase(pokemon.getBattlerIndex(), true, [ stat ], this.stages)); } @@ -1859,7 +2013,7 @@ export class PostVictoryFormChangeAbAttr extends PostVictoryAbAttr { this.formFunc = formFunc; } - applyPostVictory(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPostVictory(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { const formIndex = this.formFunc(pokemon); if (formIndex !== pokemon.formIndex) { if (!simulated) { @@ -1873,7 +2027,7 @@ export class PostVictoryFormChangeAbAttr extends PostVictoryAbAttr { } export class PostKnockOutAbAttr extends AbAttr { - applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean | Promise { + applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean { return false; } } @@ -1889,10 +2043,8 @@ export class PostKnockOutStatStageChangeAbAttr extends PostKnockOutAbAttr { this.stages = stages; } - applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean | Promise { - const stat = typeof this.stat === "function" - ? this.stat(pokemon) - : this.stat; + applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean { + const stat = typeof this.stat === "function" ? this.stat(pokemon) : this.stat; if (!simulated) { globalScene.unshiftPhase(new StatStageChangePhase(pokemon.getBattlerIndex(), true, [ stat ], this.stages)); } @@ -1905,7 +2057,7 @@ export class CopyFaintedAllyAbilityAbAttr extends PostKnockOutAbAttr { super(); } - applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean | Promise { + applyPostKnockOut(pokemon: Pokemon, passive: boolean, simulated: boolean, knockedOut: Pokemon, args: any[]): boolean { if (pokemon.isPlayer() === knockedOut.isPlayer() && !knockedOut.getAbility().hasAttr(UncopiableAbilityAbAttr)) { if (!simulated) { globalScene.queueMessage(i18next.t("abilityTriggers:copyFaintedAllyAbility", { pokemonNameWithAffix: getPokemonNameWithAffix(knockedOut), abilityName: allAbilities[knockedOut.getAbility().id].name })); @@ -2015,7 +2167,7 @@ export class PostSummonAbAttr extends AbAttr { * @param args Set of unique arguments needed by this attribute * @returns true if application of the ability succeeds */ - applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { return false; } } @@ -2035,7 +2187,7 @@ export class PostSummonRemoveArenaTagAbAttr extends PostSummonAbAttr { this.arenaTags = arenaTags; } - applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { if (!simulated) { for (const arenaTag of this.arenaTags) { globalScene.arena.removeTag(arenaTag); @@ -2411,9 +2563,9 @@ export class PostSummonUserFieldRemoveStatusEffectAbAttr extends PostSummonAbAtt * @param pokemon - The Pokémon that triggered the ability. * @param passive - n/a * @param args - n/a - * @returns A boolean or a promise that resolves to a boolean indicating the result of the ability application. + * @returns A boolean that resolves to a boolean indicating the result of the ability application. */ - applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { const party = pokemon instanceof PlayerPokemon ? globalScene.getPlayerField() : globalScene.getEnemyField(); const allowedParty = party.filter(p => p.isAllowedInBattle()); @@ -2473,12 +2625,11 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr { super(true, false); } - async applyPostSummon(pokemon: Pokemon, _passive: boolean, simulated: boolean, _args: any[]): Promise { + override applyPostSummon(pokemon: Pokemon, _passive: boolean, simulated: boolean, _args: any[]): boolean { const targets = pokemon.getOpponents(); if (simulated || !targets.length) { return simulated; } - const promises: Promise[] = []; let target: Pokemon; if (targets.length > 1) { @@ -2504,41 +2655,14 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr { return false; } - pokemon.summonData.speciesForm = target.getSpeciesForm(); - pokemon.summonData.gender = target.getGender(); + globalScene.unshiftPhase(new PokemonTransformPhase(pokemon.getBattlerIndex(), target.getBattlerIndex(), true)); - // Copy all stats (except HP) - for (const s of EFFECTIVE_STATS) { - pokemon.setStat(s, target.getStat(s, false), false); - } - - // Copy all stat stages - for (const s of BATTLE_STATS) { - pokemon.setStatStage(s, target.getStatStage(s)); - } - - pokemon.summonData.moveset = target.getMoveset().map((m) => { - if (m) { - // If PP value is less than 5, do nothing. If greater, we need to reduce the value to 5. - return new PokemonMove(m.moveId, 0, 0, false, Math.min(m.getMove().pp, 5)); - } else { - console.warn(`Imposter: somehow iterating over a ${m} value when copying moveset!`); - return new PokemonMove(Moves.NONE); - } - }); - pokemon.summonData.types = target.getTypes(); - promises.push(pokemon.updateInfo()); - - globalScene.queueMessage(i18next.t("abilityTriggers:postSummonTransform", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), targetName: target.name, })); - globalScene.playSound("battle_anims/PRSFX- Transform"); - promises.push(pokemon.loadAssets(false).then(() => { - pokemon.playAnim(); - pokemon.updateInfo(); - // If the new ability activates immediately, it needs to happen after all the transform animations - pokemon.setTempAbility(target.getAbility()); - })); - - await Promise.all(promises); + globalScene.queueMessage( + i18next.t("abilityTriggers:postSummonTransform", { + pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), + targetName: target.name, + }), + ); return true; } @@ -2655,13 +2779,13 @@ export class PreSwitchOutAbAttr extends AbAttr { super(true); } - applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { return false; } } export class PreSwitchOutResetStatusAbAttr extends PreSwitchOutAbAttr { - applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { if (pokemon.status) { if (!simulated) { pokemon.resetStatus(); @@ -2675,9 +2799,72 @@ export class PreSwitchOutResetStatusAbAttr extends PreSwitchOutAbAttr { } } +/** + * Clears Desolate Land/Primordial Sea/Delta Stream upon the Pokemon switching out. + */ +export class PreSwitchOutClearWeatherAbAttr extends PreSwitchOutAbAttr { + /** + * @param pokemon The {@linkcode Pokemon} with the ability + * @param passive N/A + * @param args N/A + * @returns {boolean} Returns true if the weather clears, otherwise false. + */ + override applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { + const weatherType = globalScene.arena.weather?.weatherType; + let turnOffWeather = false; + + // Clear weather only if user's ability matches the weather and no other pokemon has the ability. + switch (weatherType) { + case WeatherType.HARSH_SUN: + if ( + pokemon.hasAbility(Abilities.DESOLATE_LAND) && + globalScene + .getField(true) + .filter((p) => p !== pokemon) + .filter((p) => p.hasAbility(Abilities.DESOLATE_LAND)).length === 0 + ) { + turnOffWeather = true; + } + break; + case WeatherType.HEAVY_RAIN: + if ( + pokemon.hasAbility(Abilities.PRIMORDIAL_SEA) && + globalScene + .getField(true) + .filter((p) => p !== pokemon) + .filter((p) => p.hasAbility(Abilities.PRIMORDIAL_SEA)).length === 0 + ) { + turnOffWeather = true; + } + break; + case WeatherType.STRONG_WINDS: + if ( + pokemon.hasAbility(Abilities.DELTA_STREAM) && + globalScene + .getField(true) + .filter((p) => p !== pokemon) + .filter((p) => p.hasAbility(Abilities.DELTA_STREAM)).length === 0 + ) { + turnOffWeather = true; + } + break; + } + + if (simulated) { + return turnOffWeather; + } + + if (turnOffWeather) { + globalScene.arena.trySetWeather(WeatherType.NONE, false); + return true; + } + + return false; + } +} export class PreSwitchOutHealAbAttr extends PreSwitchOutAbAttr { - applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { if (!pokemon.isFullHp()) { if (!simulated) { const healAmount = Utils.toDmgValue(pokemon.getMaxHp() * 0.33); @@ -2713,7 +2900,7 @@ export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr { * @param args N/A * @returns true if the form change was successful */ - applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPreSwitchOut(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { const formIndex = this.formFunc(pokemon); if (formIndex !== pokemon.formIndex) { if (!simulated) { @@ -2728,7 +2915,7 @@ export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr { } export class PreLeaveFieldAbAttr extends AbAttr { - applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { return false; } } @@ -2743,7 +2930,7 @@ export class PreLeaveFieldClearWeatherAbAttr extends PreLeaveFieldAbAttr { * @param args N/A * @returns Returns `true` if the weather clears, otherwise `false`. */ - applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { const weatherType = globalScene.arena.weather?.weatherType; let turnOffWeather = false; @@ -2803,7 +2990,14 @@ export class PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr extends PreLeaveFi } export class PreStatStageChangeAbAttr extends AbAttr { - applyPreStatStageChange(pokemon: Pokemon | null, passive: boolean, simulated: boolean, stat: BattleStat, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { + applyPreStatStageChange( + pokemon: Pokemon | null, + passive: boolean, + simulated: boolean, + stat: BattleStat, + cancelled: Utils.BooleanHolder, + args: any[], + ): boolean { return false; } } @@ -2926,7 +3120,14 @@ export class ConfusionOnStatusEffectAbAttr extends PostAttackAbAttr { } export class PreSetStatusAbAttr extends AbAttr { - applyPreSetStatus(pokemon: Pokemon, passive: boolean, simulated: boolean, effect: StatusEffect | undefined, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { + applyPreSetStatus( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + effect: StatusEffect | undefined, + cancelled: Utils.BooleanHolder, + args: any[], + ): boolean { return false; } } @@ -2992,7 +3193,14 @@ export class StatusEffectImmunityAbAttr extends PreSetStatusEffectImmunityAbAttr export class UserFieldStatusEffectImmunityAbAttr extends PreSetStatusEffectImmunityAbAttr { } export class PreApplyBattlerTagAbAttr extends AbAttr { - applyPreApplyBattlerTag(pokemon: Pokemon, passive: boolean, simulated: boolean, tag: BattlerTag, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { + applyPreApplyBattlerTag( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + tag: BattlerTag, + cancelled: Utils.BooleanHolder, + args: any[], + ): boolean { return false; } } @@ -3187,7 +3395,14 @@ export class ChangeMovePriorityAbAttr extends AbAttr { export class IgnoreContactAbAttr extends AbAttr { } export class PreWeatherEffectAbAttr extends AbAttr { - applyPreWeatherEffect(pokemon: Pokemon, passive: Boolean, simulated: boolean, weather: Weather | null, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { + applyPreWeatherEffect( + pokemon: Pokemon, + passive: Boolean, + simulated: boolean, + weather: Weather | null, + cancelled: Utils.BooleanHolder, + args: any[], + ): boolean { return false; } } @@ -3468,7 +3683,13 @@ export class PostWeatherLapseAbAttr extends AbAttr { this.weatherTypes = weatherTypes; } - applyPostWeatherLapse(pokemon: Pokemon, passive: boolean, simulated: boolean, weather: Weather | null, args: any[]): boolean | Promise { + applyPostWeatherLapse( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + weather: Weather | null, + args: any[], + ): boolean { return false; } @@ -3564,7 +3785,7 @@ function getTerrainCondition(...terrainTypes: TerrainType[]): AbAttrCondition { } export class PostTurnAbAttr extends AbAttr { - applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { return false; } } @@ -3590,7 +3811,7 @@ export class PostTurnStatusHealAbAttr extends PostTurnAbAttr { * @param {any[]} args N/A * @returns Returns true if healed from status, false if not */ - applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { if (pokemon.status && this.effects.includes(pokemon.status.effect)) { if (!pokemon.isFullHp()) { if (!simulated) { @@ -3824,7 +4045,7 @@ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr { * @param args N/A * @returns `true` if any opponents are sleeping */ - applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { let hadEffect: boolean = false; for (const opp of pokemon.getOpponents()) { if ((opp.status?.effect === StatusEffect.SLEEP || opp.hasAbility(Abilities.COMATOSE)) && !opp.hasAbilityWithAttr(BlockNonDirectDamageAbAttr) && !opp.switchOutStatus) { @@ -3918,7 +4139,14 @@ export class PostBiomeChangeTerrainChangeAbAttr extends PostBiomeChangeAbAttr { * @extends AbAttr */ export class PostMoveUsedAbAttr extends AbAttr { - applyPostMoveUsed(pokemon: Pokemon, move: PokemonMove, source: Pokemon, targets: BattlerIndex[], simulated: boolean, args: any[]): boolean | Promise { + applyPostMoveUsed( + pokemon: Pokemon, + move: PokemonMove, + source: Pokemon, + targets: BattlerIndex[], + simulated: boolean, + args: any[], + ): boolean { return false; } } @@ -3939,7 +4167,14 @@ export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr { * * @return true if the Dancer ability was resolved */ - applyPostMoveUsed(dancer: Pokemon, move: PokemonMove, source: Pokemon, targets: BattlerIndex[], simulated: boolean, args: any[]): boolean | Promise { + override applyPostMoveUsed( + dancer: Pokemon, + move: PokemonMove, + source: Pokemon, + targets: BattlerIndex[], + simulated: boolean, + args: any[], + ): boolean { // List of tags that prevent the Dancer from replicating the move const forbiddenTags = [ BattlerTagType.FLYING, BattlerTagType.UNDERWATER, BattlerTagType.UNDERGROUND, BattlerTagType.HIDDEN ]; @@ -3981,7 +4216,7 @@ export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr { * @extends AbAttr */ export class PostItemLostAbAttr extends AbAttr { - applyPostItemLost(pokemon: Pokemon, simulated: boolean, args: any[]): boolean | Promise { + applyPostItemLost(pokemon: Pokemon, simulated: boolean, args: any[]): boolean { return false; } } @@ -4002,7 +4237,7 @@ export class PostItemLostApplyBattlerTagAbAttr extends PostItemLostAbAttr { * @param args N/A * @returns true if BattlerTag was applied */ - applyPostItemLost(pokemon: Pokemon, simulated: boolean, args: any[]): boolean | Promise { + override applyPostItemLost(pokemon: Pokemon, simulated: boolean, args: any[]): boolean { if (!pokemon.getTag(this.tagType) && !simulated) { pokemon.addTag(this.tagType); return true; @@ -4028,7 +4263,13 @@ export class StatStageChangeMultiplierAbAttr extends AbAttr { } export class StatStageChangeCopyAbAttr extends AbAttr { - apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { + override apply( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + cancelled: Utils.BooleanHolder, + args: any[], + ): boolean { if (!simulated) { globalScene.unshiftPhase(new StatStageChangePhase(pokemon.getBattlerIndex(), true, (args[0] as BattleStat[]), (args[1] as number), true, false, false)); } @@ -4144,7 +4385,14 @@ export class CheckTrappedAbAttr extends AbAttr { this.arenaTrapCondition = condition; } - applyCheckTrapped(pokemon: Pokemon, passive: boolean, simulated: boolean, trapped: Utils.BooleanHolder, otherPokemon: Pokemon, args: any[]): boolean | Promise { + applyCheckTrapped( + pokemon: Pokemon, + passive: boolean, + simulated: boolean, + trapped: Utils.BooleanHolder, + otherPokemon: Pokemon, + args: any[], + ): boolean { return false; } } @@ -4218,7 +4466,7 @@ export class PostBattleLootAbAttr extends PostBattleAbAttr { if (!simulated && postBattleLoot.length && args[0]) { const randItem = Utils.randSeedItem(postBattleLoot); //@ts-ignore - TODO see below - if (globalScene.tryTransferHeldItemModifier(randItem, pokemon, true, 1, true, undefined, false)) { // TODO: fix. This is a promise!? + if (globalScene.tryTransferHeldItemModifier(randItem, pokemon, true, 1, true, undefined, false)) { postBattleLoot.splice(postBattleLoot.indexOf(randItem), 1); globalScene.queueMessage(i18next.t("abilityTriggers:postBattleLoot", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), itemName: randItem.type.name })); return true; @@ -4874,7 +5122,7 @@ export class TerrainEventTypeChangeAbAttr extends PostSummonAbAttr { * Checks if the Pokemon should change types if summoned into an active terrain * @returns `true` if there is an active terrain requiring a type change | `false` if not */ - override applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise { + override applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { if (globalScene.arena.getTerrainType() !== TerrainType.NONE) { return this.apply(pokemon, passive, simulated, new Utils.BooleanHolder(false), []); } @@ -4893,27 +5141,7 @@ export class TerrainEventTypeChangeAbAttr extends PostSummonAbAttr { } } -async function applyAbAttrsInternal( - attrType: Constructor, - pokemon: Pokemon | null, - applyFunc: AbAttrApplyFunc, - args: any[], - showAbilityInstant: boolean = false, - simulated: boolean = false, - messages: string[] = [], - gainedMidTurn: boolean = false -) { - for (const passive of [ false, true ]) { - if (!pokemon?.canApplyAbility(passive) || (passive && (pokemon.getPassiveAbility().id === pokemon.getAbility().id))) { - continue; - } - - applySingleAbAttrs(pokemon, passive, attrType, applyFunc, args, gainedMidTurn, simulated, showAbilityInstant, messages); - globalScene.clearPhaseQueueSplice(); - } -} - -async function applySingleAbAttrs( +function applySingleAbAttrs( pokemon: Pokemon, passive: boolean, attrType: Constructor, @@ -4936,13 +5164,7 @@ async function applySingleAbAttrs( } globalScene.setPhaseQueueSplice(); - - let result = applyFunc(attr, passive); - // TODO Remove this when promises get reworked - if (result instanceof Promise) { - result = await result; - } - if (result) { + if (applyFunc(attr, passive)) { if (pokemon.summonData && !pokemon.summonData.abilitiesApplied.includes(ability.id)) { pokemon.summonData.abilitiesApplied.push(ability.id); } @@ -5107,7 +5329,14 @@ function calculateShellBellRecovery(pokemon: Pokemon): number { * @extends AbAttr */ export class PostDamageAbAttr extends AbAttr { - public applyPostDamage(pokemon: Pokemon, damage: number, passive: boolean, simulated: boolean, args: any[], source?: Pokemon): boolean | Promise { + public applyPostDamage( + pokemon: Pokemon, + damage: number, + passive: boolean, + simulated: boolean, + args: any[], + source?: Pokemon, + ): boolean { return false; } } @@ -5144,7 +5373,14 @@ export class PostDamageForceSwitchAbAttr extends PostDamageAbAttr { * @param source The Pokemon that dealt damage * @returns `true` if the switch-out logic was successfully applied */ - public override applyPostDamage(pokemon: Pokemon, damage: number, passive: boolean, simulated: boolean, args: any[], source?: Pokemon): boolean | Promise { + public override applyPostDamage( + pokemon: Pokemon, + damage: number, + passive: boolean, + simulated: boolean, + args: any[], + source?: Pokemon, + ): boolean { const moveHistory = pokemon.getMoveHistory(); // Will not activate when the Pokémon's HP is lowered by cutting its own HP const fordbiddenAttackingMoves = [ Moves.BELLY_DRUM, Moves.SUBSTITUTE, Moves.CURSE, Moves.PAIN_SPLIT ]; @@ -5198,44 +5434,164 @@ export class PostDamageForceSwitchAbAttr extends PostDamageAbAttr { return this.helper.getFailedText(target); } } +function applyAbAttrsInternal( + attrType: Constructor, + pokemon: Pokemon | null, + applyFunc: AbAttrApplyFunc, + args: any[], + showAbilityInstant: boolean = false, + simulated: boolean = false, + messages: string[] = [], + gainedMidTurn: boolean = false +) { + for (const passive of [ false, true ]) { + if (!pokemon?.canApplyAbility(passive) || (passive && (pokemon.getPassiveAbility().id === pokemon.getAbility().id))) { + continue; + } - -export function applyAbAttrs(attrType: Constructor, pokemon: Pokemon, cancelled: Utils.BooleanHolder | null, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.apply(pokemon, passive, simulated, cancelled, args), args, false, simulated); + applySingleAbAttrs(pokemon, passive, attrType, applyFunc, args, gainedMidTurn, simulated, showAbilityInstant, messages); + globalScene.clearPhaseQueueSplice(); + } } -export function applyPostBattleInitAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostBattleInit(pokemon, passive, simulated, args), args, false, simulated); +export function applyAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + cancelled: Utils.BooleanHolder | null, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.apply(pokemon, passive, simulated, cancelled, args), + args, + false, + simulated, + ); } -export function applyPreDefendAbAttrs(attrType: Constructor, - pokemon: Pokemon, attacker: Pokemon, move: Move | null, cancelled: Utils.BooleanHolder | null, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreDefend(pokemon, passive, simulated, attacker, move, cancelled, args), args, false, simulated); +export function applyPostBattleInitAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostBattleInit(pokemon, passive, simulated, args), + args, + false, + simulated, + ); } -export function applyPostDefendAbAttrs(attrType: Constructor, - pokemon: Pokemon, attacker: Pokemon, move: Move, hitResult: HitResult | null, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostDefend(pokemon, passive, simulated, attacker, move, hitResult, args), args, false, simulated); +export function applyPreDefendAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + attacker: Pokemon, + move: Move | null, + cancelled: Utils.BooleanHolder | null, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPreDefend(pokemon, passive, simulated, attacker, move, cancelled, args), + args, + false, + simulated, + ); } -export function applyPostMoveUsedAbAttrs(attrType: Constructor, - pokemon: Pokemon, move: PokemonMove, source: Pokemon, targets: BattlerIndex[], simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostMoveUsed(pokemon, move, source, targets, simulated, args), args, false, simulated); +export function applyPostDefendAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + attacker: Pokemon, + move: Move, + hitResult: HitResult | null, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostDefend(pokemon, passive, simulated, attacker, move, hitResult, args), + args, + false, + simulated, + ); } -export function applyStatMultiplierAbAttrs(attrType: Constructor, - pokemon: Pokemon, stat: BattleStat, statValue: Utils.NumberHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyStatStage(pokemon, passive, simulated, stat, statValue, args), args); -} -export function applyPostSetStatusAbAttrs(attrType: Constructor, - pokemon: Pokemon, effect: StatusEffect, sourcePokemon?: Pokemon | null, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostSetStatus(pokemon, sourcePokemon, passive, effect, simulated, args), args, false, simulated); +export function applyPostMoveUsedAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + move: PokemonMove, + source: Pokemon, + targets: BattlerIndex[], + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostMoveUsed(pokemon, move, source, targets, simulated, args), + args, + false, + simulated, + ); } -export function applyPostDamageAbAttrs(attrType: Constructor, - pokemon: Pokemon, damage: number, passive: boolean, simulated: boolean = false, args: any[], source?: Pokemon): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostDamage(pokemon, damage, passive, simulated, args, source), args); +export function applyStatMultiplierAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + stat: BattleStat, + statValue: Utils.NumberHolder, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyStatStage(pokemon, passive, simulated, stat, statValue, args), + args, + ); +} +export function applyPostSetStatusAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + effect: StatusEffect, + sourcePokemon?: Pokemon | null, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostSetStatus(pokemon, sourcePokemon, passive, effect, simulated, args), + args, + false, + simulated, + ); +} + +export function applyPostDamageAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + damage: number, + passive: boolean, + simulated: boolean = false, + args: any[], + source?: Pokemon, +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostDamage(pokemon, damage, passive, simulated, args, source), + args, + ); } /** @@ -5248,109 +5604,369 @@ export function applyPostDamageAbAttrs(attrType: Constructor, * @param hasApplied {@linkcode Utils.BooleanHolder} whether or not a FieldMultiplyBattleStatAbAttr has already affected this stat * @param args unused */ -export function applyFieldStatMultiplierAbAttrs(attrType: Constructor, - pokemon: Pokemon, stat: Stat, statValue: Utils.NumberHolder, checkedPokemon: Pokemon, hasApplied: Utils.BooleanHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyFieldStat(pokemon, passive, simulated, stat, statValue, checkedPokemon, hasApplied, args), args); +export function applyFieldStatMultiplierAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + stat: Stat, + statValue: Utils.NumberHolder, + checkedPokemon: Pokemon, + hasApplied: Utils.BooleanHolder, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => + attr.applyFieldStat(pokemon, passive, simulated, stat, statValue, checkedPokemon, hasApplied, args), + args, + ); } -export function applyPreAttackAbAttrs(attrType: Constructor, - pokemon: Pokemon, defender: Pokemon | null, move: Move, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreAttack(pokemon, passive, simulated, defender, move, args), args, false, simulated); +export function applyPreAttackAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + defender: Pokemon | null, + move: Move, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPreAttack(pokemon, passive, simulated, defender, move, args), + args, + false, + simulated, + ); } -export function applyPostAttackAbAttrs(attrType: Constructor, - pokemon: Pokemon, defender: Pokemon, move: Move, hitResult: HitResult | null, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostAttack(pokemon, passive, simulated, defender, move, hitResult, args), args, false, simulated); +export function applyPostAttackAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + defender: Pokemon, + move: Move, + hitResult: HitResult | null, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostAttack(pokemon, passive, simulated, defender, move, hitResult, args), + args, + false, + simulated, + ); } -export function applyPostKnockOutAbAttrs(attrType: Constructor, - pokemon: Pokemon, knockedOut: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostKnockOut(pokemon, passive, simulated, knockedOut, args), args, false, simulated); +export function applyPostKnockOutAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + knockedOut: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostKnockOut(pokemon, passive, simulated, knockedOut, args), + args, + false, + simulated, + ); } -export function applyPostVictoryAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostVictory(pokemon, passive, simulated, args), args, false, simulated); +export function applyPostVictoryAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostVictory(pokemon, passive, simulated, args), + args, + false, + simulated, + ); } -export function applyPostSummonAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostSummon(pokemon, passive, simulated, args), args, false, simulated); +export function applyPostSummonAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostSummon(pokemon, passive, simulated, args), + args, + false, + simulated, + ); } -export function applyPreSwitchOutAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreSwitchOut(pokemon, passive, simulated, args), args, true, simulated); +export function applyPreSwitchOutAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPreSwitchOut(pokemon, passive, simulated, args), + args, + true, + simulated, + ); } -export function applyPreLeaveFieldAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreLeaveField(pokemon, passive, simulated, args), args, true, simulated); +export function applyPreLeaveFieldAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + return applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => + attr.applyPreLeaveField(pokemon, passive, simulated, args), + args, + true, + simulated + ); } -export function applyPreStatStageChangeAbAttrs(attrType: Constructor, - pokemon: Pokemon | null, stat: BattleStat, cancelled: Utils.BooleanHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreStatStageChange(pokemon, passive, simulated, stat, cancelled, args), args, false, simulated); +export function applyPreStatStageChangeAbAttrs( + attrType: Constructor, + pokemon: Pokemon | null, + stat: BattleStat, + cancelled: Utils.BooleanHolder, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPreStatStageChange(pokemon, passive, simulated, stat, cancelled, args), + args, + false, + simulated, + ); } -export function applyPostStatStageChangeAbAttrs(attrType: Constructor, - pokemon: Pokemon, stats: BattleStat[], stages: number, selfTarget: boolean, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, _passive) => attr.applyPostStatStageChange(pokemon, simulated, stats, stages, selfTarget, args), args, false, simulated); +export function applyPostStatStageChangeAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + stats: BattleStat[], + stages: integer, + selfTarget: boolean, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, _passive) => attr.applyPostStatStageChange(pokemon, simulated, stats, stages, selfTarget, args), + args, + false, + simulated, + ); } -export function applyPreSetStatusAbAttrs(attrType: Constructor, - pokemon: Pokemon, effect: StatusEffect | undefined, cancelled: Utils.BooleanHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreSetStatus(pokemon, passive, simulated, effect, cancelled, args), args, false, simulated); +export function applyPreSetStatusAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + effect: StatusEffect | undefined, + cancelled: Utils.BooleanHolder, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPreSetStatus(pokemon, passive, simulated, effect, cancelled, args), + args, + false, + simulated, + ); } -export function applyPreApplyBattlerTagAbAttrs(attrType: Constructor, - pokemon: Pokemon, tag: BattlerTag, cancelled: Utils.BooleanHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreApplyBattlerTag(pokemon, passive, simulated, tag, cancelled, args), args, false, simulated); +export function applyPreApplyBattlerTagAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + tag: BattlerTag, + cancelled: Utils.BooleanHolder, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPreApplyBattlerTag(pokemon, passive, simulated, tag, cancelled, args), + args, + false, + simulated, + ); } -export function applyPreWeatherEffectAbAttrs(attrType: Constructor, - pokemon: Pokemon, weather: Weather | null, cancelled: Utils.BooleanHolder, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPreWeatherEffect(pokemon, passive, simulated, weather, cancelled, args), args, true, simulated); +export function applyPreWeatherEffectAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + weather: Weather | null, + cancelled: Utils.BooleanHolder, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPreWeatherEffect(pokemon, passive, simulated, weather, cancelled, args), + args, + true, + simulated, + ); } -export function applyPostTurnAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostTurn(pokemon, passive, simulated, args), args, false, simulated); +export function applyPostTurnAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostTurn(pokemon, passive, simulated, args), + args, + false, + simulated, + ); } -export function applyPostWeatherChangeAbAttrs(attrType: Constructor, - pokemon: Pokemon, weather: WeatherType, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostWeatherChange(pokemon, passive, simulated, weather, args), args, false, simulated); +export function applyPostWeatherChangeAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + weather: WeatherType, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostWeatherChange(pokemon, passive, simulated, weather, args), + args, + false, + simulated, + ); } -export function applyPostWeatherLapseAbAttrs(attrType: Constructor, - pokemon: Pokemon, weather: Weather | null, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostWeatherLapse(pokemon, passive, simulated, weather, args), args, false, simulated); +export function applyPostWeatherLapseAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + weather: Weather | null, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostWeatherLapse(pokemon, passive, simulated, weather, args), + args, + false, + simulated, + ); } -export function applyPostTerrainChangeAbAttrs(attrType: Constructor, - pokemon: Pokemon, terrain: TerrainType, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostTerrainChange(pokemon, passive, simulated, terrain, args), args, false, simulated); +export function applyPostTerrainChangeAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + terrain: TerrainType, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostTerrainChange(pokemon, passive, simulated, terrain, args), + args, + false, + simulated, + ); } -export function applyCheckTrappedAbAttrs(attrType: Constructor, - pokemon: Pokemon, trapped: Utils.BooleanHolder, otherPokemon: Pokemon, messages: string[], simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyCheckTrapped(pokemon, passive, simulated, trapped, otherPokemon, args), args, false, simulated, messages); +export function applyCheckTrappedAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + trapped: Utils.BooleanHolder, + otherPokemon: Pokemon, + messages: string[], + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyCheckTrapped(pokemon, passive, simulated, trapped, otherPokemon, args), + args, + false, + simulated, + messages, + ); } -export function applyPostBattleAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostBattle(pokemon, passive, simulated, args), args, false, simulated); +export function applyPostBattleAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostBattle(pokemon, passive, simulated, args), + args, + false, + simulated, + ); } -export function applyPostFaintAbAttrs(attrType: Constructor, - pokemon: Pokemon, attacker?: Pokemon, move?: Move, hitResult?: HitResult, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostFaint(pokemon, passive, simulated, attacker, move, hitResult, args), args, false, simulated); +export function applyPostFaintAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + attacker?: Pokemon, + move?: Move, + hitResult?: HitResult, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostFaint(pokemon, passive, simulated, attacker, move, hitResult, args), + args, + false, + simulated, + ); } -export function applyPostItemLostAbAttrs(attrType: Constructor, - pokemon: Pokemon, simulated: boolean = false, ...args: any[]): Promise { - return applyAbAttrsInternal(attrType, pokemon, (attr, passive) => attr.applyPostItemLost(pokemon, simulated, args), args); +export function applyPostItemLostAbAttrs( + attrType: Constructor, + pokemon: Pokemon, + simulated: boolean = false, + ...args: any[] +): void { + applyAbAttrsInternal( + attrType, + pokemon, + (attr, passive) => attr.applyPostItemLost(pokemon, simulated, args), + args, + ); } /** @@ -6096,7 +6712,7 @@ export function initAbilities() { .bypassFaint(), new Ability(Abilities.CORROSION, 7) .attr(IgnoreTypeStatusEffectImmunityAbAttr, [ StatusEffect.POISON, StatusEffect.TOXIC ], [ Type.STEEL, Type.POISON ]) - .edgeCase(), // Should interact correctly with magic coat/bounce (not yet implemented) + fling with toxic orb (not implemented yet) + .edgeCase(), // Should poison itself with toxic orb. new Ability(Abilities.COMATOSE, 7) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) @@ -6455,9 +7071,11 @@ export function initAbilities() { .attr(UnswappableAbilityAbAttr) .ignorable(), new Ability(Abilities.TERAFORM_ZERO, 9) + .attr(ClearWeatherAbAttr, [ WeatherType.SUNNY, WeatherType.RAIN, WeatherType.SANDSTORM, WeatherType.HAIL, WeatherType.SNOW, WeatherType.FOG, WeatherType.HEAVY_RAIN, WeatherType.HARSH_SUN, WeatherType.STRONG_WINDS ]) + .attr(ClearTerrainAbAttr, [ TerrainType.MISTY, TerrainType.ELECTRIC, TerrainType.GRASSY, TerrainType.PSYCHIC ]) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) - .unimplemented(), + .condition(getOncePerBattleCondition(Abilities.TERAFORM_ZERO)), new Ability(Abilities.POISON_PUPPETEER, 9) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 8d5f21c0a42..7b16c718f07 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -2752,6 +2752,12 @@ export class TauntTag extends MoveRestrictionBattlerTag { globalScene.queueMessage(i18next.t("battlerTags:tauntOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), 1500); } + public override onRemove(pokemon: Pokemon): void { + super.onRemove(pokemon); + + globalScene.queueMessage(i18next.t("battlerTags:tauntOnRemove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); + } + /** * Checks if a move is a status move and determines its restriction status on that basis * @param {Moves} move the move under investigation diff --git a/src/data/challenge.ts b/src/data/challenge.ts index c6e85be2389..30c2c9a6ce4 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -708,6 +708,7 @@ export class FreshStartChallenge extends Challenge { pokemon.variant = 0; // Not shiny pokemon.formIndex = 0; // Froakie should be base form pokemon.ivs = [ 15, 15, 15, 15, 15, 15 ]; // Default IVs of 15 for all stats (Updated to 15 from 10 in 1.2.0) + pokemon.teraType = pokemon.species.type1; // Always primary tera type return true; } diff --git a/src/data/move.ts b/src/data/move.ts index 7b5be63d603..422660886ce 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1,5 +1,16 @@ -import { ChargeAnim, initMoveAnim, loadMoveAnimAssets, MoveChargeAnim } from "./battle-anims"; -import { CommandedTag, EncoreTag, GulpMissileTag, HelpingHandTag, SemiInvulnerableTag, ShellTrapTag, StockpilingTag, SubstituteTag, TrappedTag, TypeBoostTag } from "./battler-tags"; +import { ChargeAnim, MoveChargeAnim } from "./battle-anims"; +import { + CommandedTag, + EncoreTag, + GulpMissileTag, + HelpingHandTag, + SemiInvulnerableTag, + ShellTrapTag, + StockpilingTag, + SubstituteTag, + TrappedTag, + TypeBoostTag, +} from "./battler-tags"; import { getPokemonNameWithAffix } from "../messages"; import type { AttackMoveResult, TurnMove } from "../field/pokemon"; import type Pokemon from "../field/pokemon"; @@ -30,7 +41,7 @@ import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { MoveUsedEvent } from "#app/events/battle-scene"; -import { BATTLE_STATS, type BattleStat, EFFECTIVE_STATS, type EffectiveStat, getStatKey, Stat } from "#app/enums/stat"; +import { BATTLE_STATS, type BattleStat, type EffectiveStat, getStatKey, Stat } from "#app/enums/stat"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MovePhase } from "#app/phases/move-phase"; @@ -46,6 +57,11 @@ import { applyChallenges, ChallengeType } from "./challenge"; import { SwitchType } from "#enums/switch-type"; import { StatusEffect } from "#enums/status-effect"; import { globalScene } from "#app/global-scene"; +import { RevivalBlessingPhase } from "#app/phases/revival-blessing-phase"; +import { LoadMoveAnimPhase } from "#app/phases/load-move-anim-phase"; +import { PokemonTransformPhase } from "#app/phases/pokemon-transform-phase"; +import { MoveAnimPhase } from "#app/phases/move-anim-phase"; +import { loggedInUser } from "#app/account"; export enum MoveCategory { PHYSICAL, @@ -677,19 +693,17 @@ export default class Move implements Localizable { /** * Sees if a move has a custom failure text (by looking at each {@linkcode MoveAttr} of this move) * @param user {@linkcode Pokemon} using the move - * @param target {@linkcode Pokemon} receiving the move - * @param move {@linkcode Move} using the move - * @param cancelled {@linkcode Utils.BooleanHolder} to hold boolean value + * @param target {@linkcode Pokemon} target of the move + * @param move {@linkcode Move} with this attribute * @returns string of the custom failure text, or `null` if it uses the default text ("But it failed!") */ - getFailedText(user: Pokemon, target: Pokemon, move: Move, cancelled: Utils.BooleanHolder): string | null { + getFailedText(user: Pokemon, target: Pokemon, move: Move): string | undefined { for (const attr of this.attrs) { - const failedText = attr.getFailedText(user, target, move, cancelled); - if (failedText !== null) { + const failedText = attr.getFailedText(user, target, move); + if (failedText) { return failedText; } } - return null; } /** @@ -1057,7 +1071,7 @@ export abstract class MoveAttr { * @param args Set of unique arguments needed by this attribute * @returns true if application of the ability succeeds */ - apply(user: Pokemon | null, target: Pokemon | null, move: Move, args: any[]): boolean | Promise { + apply(user: Pokemon | null, target: Pokemon | null, move: Move, args: any[]): boolean { return true; } @@ -1074,11 +1088,10 @@ export abstract class MoveAttr { * @param user {@linkcode Pokemon} using the move * @param target {@linkcode Pokemon} target of the move * @param move {@linkcode Move} with this attribute - * @param cancelled {@linkcode Utils.BooleanHolder} which stores if the move should fail * @returns the string representing failure of this {@linkcode Move} */ - getFailedText(user: Pokemon, target: Pokemon, move: Move, cancelled: Utils.BooleanHolder): string | null { - return null; + getFailedText(user: Pokemon, target: Pokemon, move: Move): string | undefined { + return; } /** @@ -1200,7 +1213,7 @@ export class MoveEffectAttr extends MoveAttr { } /** Applies move effects so long as they are able based on {@linkcode canApply} */ - apply(user: Pokemon, target: Pokemon, move: Move, args?: any[]): boolean | Promise { + apply(user: Pokemon, target: Pokemon, move: Move, args?: any[]): boolean { return this.canApply(user, target, move, args); } @@ -1320,6 +1333,54 @@ export class PreMoveMessageAttr extends MoveAttr { } } +/** + * Attribute for moves that can be conditionally interrupted to be considered to + * have failed before their "useMove" message is displayed. Currently used by + * Focus Punch. + * @extends MoveAttr + */ +export class PreUseInterruptAttr extends MoveAttr { + protected message?: string | ((user: Pokemon, target: Pokemon, move: Move) => string); + protected overridesFailedMessage: boolean; + protected conditionFunc: MoveConditionFunc; + + /** + * Create a new MoveInterruptedMessageAttr. + * @param message The message to display when the move is interrupted, or a function that formats the message based on the user, target, and move. + */ + constructor(message?: string | ((user: Pokemon, target: Pokemon, move: Move) => string), conditionFunc?: MoveConditionFunc) { + super(); + this.message = message; + this.conditionFunc = conditionFunc ?? (() => true); + } + + /** + * Message to display when a move is interrupted. + * @param user {@linkcode Pokemon} using the move + * @param target {@linkcode Pokemon} target of the move + * @param move {@linkcode Move} with this attribute + */ + override apply(user: Pokemon, target: Pokemon, move: Move): boolean { + return this.conditionFunc(user, target, move); + } + + /** + * Message to display when a move is interrupted. + * @param user {@linkcode Pokemon} using the move + * @param target {@linkcode Pokemon} target of the move + * @param move {@linkcode Move} with this attribute + */ + override getFailedText(user: Pokemon, target: Pokemon, move: Move): string | undefined { + if (this.message && this.conditionFunc(user, target, move)) { + const message = + typeof this.message === "string" + ? (this.message as string) + : this.message(user, target, move); + return message; + } + } +} + /** * Attribute for Status moves that take attack type effectiveness * into consideration (i.e. {@linkcode https://bulbapedia.bulbagarden.net/wiki/Thunder_Wave_(move) | Thunder Wave}) @@ -1524,6 +1585,20 @@ export class SurviveDamageAttr extends ModifiedDamageAttr { } } +export class SplashAttr extends MoveEffectAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + globalScene.queueMessage(i18next.t("moveTriggers:splash")); + return true; + } +} + +export class CelebrateAttr extends MoveEffectAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + globalScene.queueMessage(i18next.t("moveTriggers:celebrate", { playerName: loggedInUser?.username })); + return true; + } +} + export class RecoilAttr extends MoveEffectAttr { private useHp: boolean; private damageRatio: number; @@ -1739,13 +1814,16 @@ export class AddSubstituteAttr extends MoveEffectAttr { return (user, target, move) => !user.getTag(SubstituteTag) && user.hp > Math.floor(user.getMaxHp() * this.hpCost) && user.getMaxHp() > 1; } - getFailedText(user: Pokemon, target: Pokemon, move: Move, cancelled: Utils.BooleanHolder): string | null { + /** + * Get the substitute-specific failure message if one should be displayed. + * @param user The pokemon using the move. + * @returns The substitute-specific failure message if the conditions apply, otherwise `undefined` + */ + getFailedText(user: Pokemon, _target: Pokemon, _move: Move): string | undefined { if (user.getTag(SubstituteTag)) { return i18next.t("moveTriggers:substituteOnOverlap", { pokemonName: getPokemonNameWithAffix(user) }); } else if (user.hp <= Math.floor(user.getMaxHp() / 4) || user.getMaxHp() === 1) { return i18next.t("moveTriggers:substituteNotEnoughHp"); - } else { - return i18next.t("battle:attackFailed"); } } } @@ -1866,7 +1944,7 @@ export class FlameBurstAttr extends MoveEffectAttr { * @param args - n/a * @returns A boolean indicating whether the effect was successfully applied. */ - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const targetAlly = target.getAlly(); const cancelled = new Utils.BooleanHolder(false); @@ -2406,32 +2484,27 @@ export class StealHeldItemChanceAttr extends MoveEffectAttr { this.chance = chance; } - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { - return new Promise(resolve => { - if (move.hitsSubstitute(user, target)) { - return resolve(false); - } - const rand = Phaser.Math.RND.realInRange(0, 1); - if (rand >= this.chance) { - return resolve(false); - } - const heldItems = this.getTargetHeldItems(target).filter(i => i.isTransferable); - if (heldItems.length) { - const poolType = target.isPlayer() ? ModifierPoolType.PLAYER : target.hasTrainer() ? ModifierPoolType.TRAINER : ModifierPoolType.WILD; - const highestItemTier = heldItems.map(m => m.type.getOrInferTier(poolType)).reduce((highestTier, tier) => Math.max(tier!, highestTier), 0); // TODO: is the bang after tier correct? - const tierHeldItems = heldItems.filter(m => m.type.getOrInferTier(poolType) === highestItemTier); - const stolenItem = tierHeldItems[user.randSeedInt(tierHeldItems.length)]; - globalScene.tryTransferHeldItemModifier(stolenItem, user, false).then(success => { - if (success) { - globalScene.queueMessage(i18next.t("moveTriggers:stoleItem", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target), itemName: stolenItem.type.name })); - } - resolve(success); - }); - return; - } + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (move.hitsSubstitute(user, target)) { + return false; + } - resolve(false); - }); + const rand = Phaser.Math.RND.realInRange(0, 1); + if (rand >= this.chance) { + return false; + } + const heldItems = this.getTargetHeldItems(target).filter((i) => i.isTransferable); + if (heldItems.length) { + const poolType = target.isPlayer() ? ModifierPoolType.PLAYER : target.hasTrainer() ? ModifierPoolType.TRAINER : ModifierPoolType.WILD; + const highestItemTier = heldItems.map((m) => m.type.getOrInferTier(poolType)).reduce((highestTier, tier) => Math.max(tier!, highestTier), 0); // TODO: is the bang after tier correct? + const tierHeldItems = heldItems.filter((m) => m.type.getOrInferTier(poolType) === highestItemTier); + const stolenItem = tierHeldItems[user.randSeedInt(tierHeldItems.length)]; + if (globalScene.tryTransferHeldItemModifier(stolenItem, user, false)) { + globalScene.queueMessage(i18next.t("moveTriggers:stoleItem", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target), itemName: stolenItem.type.name })); + return true; + } + } + return false; } getTargetHeldItems(target: Pokemon): PokemonHeldItemModifier[] { @@ -2875,9 +2948,7 @@ export class WeatherInstantChargeAttr extends InstantChargeAttr { } export class OverrideMoveEffectAttr extends MoveAttr { - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise { - //const overridden = args[0] as Utils.BooleanHolder; - //const virtual = arg[1] as boolean; + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { return true; } } @@ -2903,26 +2974,27 @@ export class DelayedAttackAttr extends OverrideMoveEffectAttr { this.chargeText = chargeText; } - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { // Edge case for the move applied on a pokemon that has fainted if (!target) { - return Promise.resolve(true); + return true; } - const side = target.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY; - return new Promise(resolve => { - if (args.length < 2 || !args[1]) { - new MoveChargeAnim(this.chargeAnim, move.id, user).play(false, () => { - (args[0] as Utils.BooleanHolder).value = true; - globalScene.queueMessage(this.chargeText.replace("{TARGET}", getPokemonNameWithAffix(target)).replace("{USER}", getPokemonNameWithAffix(user))); - user.pushMoveHistory({ move: move.id, targets: [ target.getBattlerIndex() ], result: MoveResult.OTHER }); - globalScene.arena.addTag(this.tagType, 3, move.id, user.id, side, false, target.getBattlerIndex()); - resolve(true); - }); - } else { - globalScene.ui.showText(i18next.t("moveTriggers:tookMoveAttack", { pokemonName: getPokemonNameWithAffix(globalScene.getPokemonById(target.id) ?? undefined), moveName: move.name }), null, () => resolve(true)); - } - }); + const overridden = args[0] as Utils.BooleanHolder; + const virtual = args[1] as boolean; + + if (!virtual) { + overridden.value = true; + globalScene.unshiftPhase(new MoveAnimPhase(new MoveChargeAnim(this.chargeAnim, move.id, user))); + globalScene.queueMessage(this.chargeText.replace("{TARGET}", getPokemonNameWithAffix(target)).replace("{USER}", getPokemonNameWithAffix(user))); + user.pushMoveHistory({ move: move.id, targets: [ target.getBattlerIndex() ], result: MoveResult.OTHER }); + const side = target.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY; + globalScene.arena.addTag(this.tagType, 3, move.id, user.id, side, false, target.getBattlerIndex()); + } else { + globalScene.queueMessage(i18next.t("moveTriggers:tookMoveAttack", { pokemonName: getPokemonNameWithAffix(globalScene.getPokemonById(target.id) ?? undefined), moveName: move.name })); + } + + return true; } } @@ -3053,7 +3125,7 @@ export class StatStageChangeAttr extends MoveEffectAttr { * @param args unused * @returns whether stat stages were changed */ - apply(user: Pokemon, target: Pokemon, move: Move, args?: any[]): boolean | Promise { + apply(user: Pokemon, target: Pokemon, move: Move, args?: any[]): boolean { if (!super.apply(user, target, move, args) || (this.condition && !this.condition(user, target, move))) { return false; } @@ -3131,7 +3203,7 @@ export class SecretPowerAttr extends MoveEffectAttr { * Used to apply the secondary effect to the target Pokemon * @returns `true` if a secondary effect is successfully applied */ - override apply(user: Pokemon, target: Pokemon, move: Move, args?: any[]): boolean | Promise { + override apply(user: Pokemon, target: Pokemon, move: Move, args?: any[]): boolean { if (!super.apply(user, target, move, args)) { return false; } @@ -3286,8 +3358,8 @@ export class AcupressureStatStageChangeAttr extends MoveEffectAttr { super(); } - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise { - const randStats = BATTLE_STATS.filter(s => target.getStatStage(s) < 6); + override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + const randStats = BATTLE_STATS.filter((s) => target.getStatStage(s) < 6); if (randStats.length > 0) { const boostStat = [ randStats[user.randSeedInt(randStats.length)] ]; globalScene.unshiftPhase(new StatStageChangePhase(target.getBattlerIndex(), this.selfTarget, boostStat, 2)); @@ -3324,17 +3396,14 @@ export class CutHpStatStageBoostAttr extends StatStageChangeAttr { this.messageCallback = messageCallback; } - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { - return new Promise(resolve => { - user.damageAndUpdate(Utils.toDmgValue(user.getMaxHp() / this.cutRatio), HitResult.OTHER, false, true); - user.updateInfo().then(() => { - const ret = super.apply(user, target, move, args); - if (this.messageCallback) { - this.messageCallback(user); - } - resolve(ret); - }); - }); + override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + user.damageAndUpdate(Utils.toDmgValue(user.getMaxHp() / this.cutRatio), HitResult.OTHER, false, true); + user.updateInfo(); + const ret = super.apply(user, target, move, args); + if (this.messageCallback) { + this.messageCallback(user); + } + return ret; } getCondition(): MoveConditionFunc { @@ -3426,28 +3495,27 @@ export class ResetStatsAttr extends MoveEffectAttr { super(); this.targetAllPokemon = targetAllPokemon; } - async apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { - const promises: Promise[] = []; - if (this.targetAllPokemon) { // Target all pokemon on the field when Freezy Frost or Haze are used + + override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (this.targetAllPokemon) { + // Target all pokemon on the field when Freezy Frost or Haze are used const activePokemon = globalScene.getField(true); - activePokemon.forEach(p => promises.push(this.resetStats(p))); + activePokemon.forEach((p) => this.resetStats(p)); globalScene.queueMessage(i18next.t("moveTriggers:statEliminated")); } else { // Affects only the single target when Clear Smog is used if (!move.hitsSubstitute(user, target)) { - promises.push(this.resetStats(target)); + this.resetStats(target); globalScene.queueMessage(i18next.t("moveTriggers:resetStats", { pokemonName: getPokemonNameWithAffix(target) })); } } - - await Promise.all(promises); return true; } - async resetStats(pokemon: Pokemon): Promise { + private resetStats(pokemon: Pokemon): void { for (const s of BATTLE_STATS) { pokemon.setStatStage(s, 0); } - return pokemon.updateInfo(); + pokemon.updateInfo(); } } @@ -3503,43 +3571,28 @@ export class SwapStatStagesAttr extends MoveEffectAttr { } export class HpSplitAttr extends MoveEffectAttr { - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { - return new Promise(resolve => { - if (!super.apply(user, target, move, args)) { - return resolve(false); - } + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (!super.apply(user, target, move, args)) { + return false; + } - const infoUpdates: Promise[] = []; - - const hpValue = Math.floor((target.hp + user.hp) / 2); - if (user.hp < hpValue) { - const healing = user.heal(hpValue - user.hp); + const hpValue = Math.floor((target.hp + user.hp) / 2); + [ user, target ].forEach((p) => { + if (p.hp < hpValue) { + const healing = p.heal(hpValue - p.hp); if (healing) { - globalScene.damageNumberHandler.add(user, healing, HitResult.HEAL); + globalScene.damageNumberHandler.add(p, healing, HitResult.HEAL); } - } else if (user.hp > hpValue) { - const damage = user.damage(user.hp - hpValue, true); + } else if (p.hp > hpValue) { + const damage = p.damage(p.hp - hpValue, true); if (damage) { - globalScene.damageNumberHandler.add(user, damage); + globalScene.damageNumberHandler.add(p, damage); } } - infoUpdates.push(user.updateInfo()); - - if (target.hp < hpValue) { - const healing = target.heal(hpValue - target.hp); - if (healing) { - globalScene.damageNumberHandler.add(user, healing, HitResult.HEAL); - } - } else if (target.hp > hpValue) { - const damage = target.damage(target.hp - hpValue, true); - if (damage) { - globalScene.damageNumberHandler.add(target, damage); - } - } - infoUpdates.push(target.updateInfo()); - - return Promise.all(infoUpdates).then(() => resolve(true)); + p.updateInfo(); }); + + return true; } } @@ -6024,44 +6077,44 @@ export class RevivalBlessingAttr extends MoveEffectAttr { * @param args N/A * @returns Promise, true if function succeeds. */ - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { - return new Promise(resolve => { - // If user is player, checks if the user has fainted pokemon - if (user instanceof PlayerPokemon - && globalScene.getPlayerParty().findIndex(p => p.isFainted()) > -1) { - (user as PlayerPokemon).revivalBlessing().then(() => { - resolve(true); - }); - // If user is enemy, checks that it is a trainer, and it has fainted non-boss pokemon in party - } else if (user instanceof EnemyPokemon - && user.hasTrainer() - && globalScene.getEnemyParty().findIndex(p => p.isFainted() && !p.isBoss()) > -1) { - // Selects a random fainted pokemon - const faintedPokemon = globalScene.getEnemyParty().filter(p => p.isFainted() && !p.isBoss()); - const pokemon = faintedPokemon[user.randSeedInt(faintedPokemon.length)]; - const slotIndex = globalScene.getEnemyParty().findIndex(p => pokemon.id === p.id); - pokemon.resetStatus(); - pokemon.heal(Math.min(Utils.toDmgValue(0.5 * pokemon.getMaxHp()), pokemon.getMaxHp())); - globalScene.queueMessage(i18next.t("moveTriggers:revivalBlessing", { pokemonName: getPokemonNameWithAffix(pokemon) }), 0, true); + override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + // If user is player, checks if the user has fainted pokemon + if (user instanceof PlayerPokemon) { + globalScene.unshiftPhase(new RevivalBlessingPhase(user)); + return true; + } else if (user instanceof EnemyPokemon && user.hasTrainer() && globalScene.getEnemyParty().findIndex((p) => p.isFainted() && !p.isBoss()) > -1) { + // If used by an enemy trainer with at least one fainted non-boss Pokemon, this + // revives one of said Pokemon selected at random. + const faintedPokemon = globalScene.getEnemyParty().filter((p) => p.isFainted() && !p.isBoss()); + const pokemon = faintedPokemon[user.randSeedInt(faintedPokemon.length)]; + const slotIndex = globalScene.getEnemyParty().findIndex((p) => pokemon.id === p.id); + pokemon.resetStatus(); + pokemon.heal(Math.min(Utils.toDmgValue(0.5 * pokemon.getMaxHp()), pokemon.getMaxHp())); + globalScene.queueMessage(i18next.t("moveTriggers:revivalBlessing", { pokemonName: getPokemonNameWithAffix(pokemon) }), 0, true); - if (globalScene.currentBattle.double && globalScene.getEnemyParty().length > 1) { - const allyPokemon = user.getAlly(); - if (slotIndex <= 1) { - globalScene.unshiftPhase(new SwitchSummonPhase(SwitchType.SWITCH, pokemon.getFieldIndex(), slotIndex, false, false)); - } else if (allyPokemon.isFainted()) { - globalScene.unshiftPhase(new SwitchSummonPhase(SwitchType.SWITCH, allyPokemon.getFieldIndex(), slotIndex, false, false)); - } + if (globalScene.currentBattle.double && globalScene.getEnemyParty().length > 1) { + const allyPokemon = user.getAlly(); + if (slotIndex <= 1) { + globalScene.unshiftPhase(new SwitchSummonPhase(SwitchType.SWITCH, pokemon.getFieldIndex(), slotIndex, false, false)); + } else if (allyPokemon.isFainted()) { + globalScene.unshiftPhase(new SwitchSummonPhase(SwitchType.SWITCH, allyPokemon.getFieldIndex(), slotIndex, false, false)); } - resolve(true); - } else { - globalScene.queueMessage(i18next.t("battle:attackFailed")); - resolve(false); } - }); + return true; + } + return false; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { - if (user.hasTrainer() && globalScene.getEnemyParty().findIndex(p => p.isFainted() && !p.isBoss()) > -1) { + getCondition(): MoveConditionFunc { + return (user, target, move) => + (user instanceof PlayerPokemon && globalScene.getPlayerParty().some((p) => p.isFainted())) || + (user instanceof EnemyPokemon && + user.hasTrainer() && + globalScene.getEnemyParty().some((p) => p.isFainted() && !p.isBoss())); + } + + override getUserBenefitScore(user: Pokemon, _target: Pokemon, _move: Move): number { + if (user.hasTrainer() && globalScene.getEnemyParty().some((p) => p.isFainted() && !p.isBoss())) { return 20; } @@ -6240,10 +6293,12 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { return (user, target, move) => (move.category !== MoveCategory.STATUS || this.getSwitchOutCondition()(user, target, move)); } - getFailedText(user: Pokemon, target: Pokemon, move: Move, cancelled: Utils.BooleanHolder): string | null { + getFailedText(_user: Pokemon, target: Pokemon, _move: Move): string | undefined { const blockedByAbility = new Utils.BooleanHolder(false); applyAbAttrs(ForceSwitchOutImmunityAbAttr, target, blockedByAbility); - return blockedByAbility.value ? i18next.t("moveTriggers:cannotBeSwitchedOut", { pokemonName: getPokemonNameWithAffix(target) }) : null; + if (blockedByAbility.value) { + return i18next.t("moveTriggers:cannotBeSwitchedOut", { pokemonName: getPokemonNameWithAffix(target) }); + } } getSwitchOutCondition(): MoveConditionFunc { @@ -6579,7 +6634,7 @@ export class FirstMoveTypeAttr extends MoveEffectAttr { class CallMoveAttr extends OverrideMoveEffectAttr { protected invalidMoves: Moves[]; protected hasTarget: boolean; - async apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const replaceMoveTarget = move.moveTarget === MoveTarget.NEAR_OTHER ? MoveTarget.NEAR_ENEMY : undefined; const moveTargets = getMoveTargets(user, move.id, replaceMoveTarget); if (moveTargets.targets.length === 0) { @@ -6589,11 +6644,8 @@ class CallMoveAttr extends OverrideMoveEffectAttr { ? moveTargets.targets : [ this.hasTarget ? target.getBattlerIndex() : moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ]; // account for Mirror Move having a target already user.getMoveQueue().push({ move: move.id, targets: targets, virtual: true, ignorePP: true }); + globalScene.unshiftPhase(new LoadMoveAnimPhase(move.id)); globalScene.unshiftPhase(new MovePhase(user, targets, new PokemonMove(move.id, 0, 0, true), true, true)); - - await Promise.resolve(initMoveAnim(move.id).then(() => { - loadMoveAnimAssets([ move.id ], true); - })); return true; } } @@ -6626,7 +6678,7 @@ export class RandomMoveAttr extends CallMoveAttr { * @param move Move being used * @param args Unused */ - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { + override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const moveIds = Utils.getEnumValues(Moves).map(m => !this.invalidMoves.includes(m) && !allMoves[m].name.endsWith(" (N)") ? m : Moves.NONE); let moveId: Moves = Moves.NONE; do { @@ -6663,7 +6715,7 @@ export class RandomMovesetMoveAttr extends CallMoveAttr { * @param move Move being used * @param args Unused */ - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { return super.apply(user, target, allMoves[this.moveId], args); } @@ -6965,145 +7017,141 @@ const invalidCopycatMoves = [ ]; export class NaturePowerAttr extends OverrideMoveEffectAttr { - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { - return new Promise(resolve => { - let moveId; - switch (globalScene.arena.getTerrainType()) { - // this allows terrains to 'override' the biome move - case TerrainType.NONE: - switch (globalScene.arena.biomeType) { - case Biome.TOWN: - moveId = Moves.ROUND; - break; - case Biome.METROPOLIS: - moveId = Moves.TRI_ATTACK; - break; - case Biome.SLUM: - moveId = Moves.SLUDGE_BOMB; - break; - case Biome.PLAINS: - moveId = Moves.SILVER_WIND; - break; - case Biome.GRASS: - moveId = Moves.GRASS_KNOT; - break; - case Biome.TALL_GRASS: - moveId = Moves.POLLEN_PUFF; - break; - case Biome.MEADOW: - moveId = Moves.GIGA_DRAIN; - break; - case Biome.FOREST: - moveId = Moves.BUG_BUZZ; - break; - case Biome.JUNGLE: - moveId = Moves.LEAF_STORM; - break; - case Biome.SEA: - moveId = Moves.HYDRO_PUMP; - break; - case Biome.SWAMP: - moveId = Moves.MUD_BOMB; - break; - case Biome.BEACH: - moveId = Moves.SCALD; - break; - case Biome.LAKE: - moveId = Moves.BUBBLE_BEAM; - break; - case Biome.SEABED: - moveId = Moves.BRINE; - break; - case Biome.ISLAND: - moveId = Moves.LEAF_TORNADO; - break; - case Biome.MOUNTAIN: - moveId = Moves.AIR_SLASH; - break; - case Biome.BADLANDS: - moveId = Moves.EARTH_POWER; - break; - case Biome.DESERT: - moveId = Moves.SCORCHING_SANDS; - break; - case Biome.WASTELAND: - moveId = Moves.DRAGON_PULSE; - break; - case Biome.CONSTRUCTION_SITE: - moveId = Moves.STEEL_BEAM; - break; - case Biome.CAVE: - moveId = Moves.POWER_GEM; - break; - case Biome.ICE_CAVE: - moveId = Moves.ICE_BEAM; - break; - case Biome.SNOWY_FOREST: - moveId = Moves.FROST_BREATH; - break; - case Biome.VOLCANO: - moveId = Moves.LAVA_PLUME; - break; - case Biome.GRAVEYARD: - moveId = Moves.SHADOW_BALL; - break; - case Biome.RUINS: - moveId = Moves.ANCIENT_POWER; - break; - case Biome.TEMPLE: - moveId = Moves.EXTRASENSORY; - break; - case Biome.DOJO: - moveId = Moves.FOCUS_BLAST; - break; - case Biome.FAIRY_CAVE: - moveId = Moves.ALLURING_VOICE; - break; - case Biome.ABYSS: - moveId = Moves.OMINOUS_WIND; - break; - case Biome.SPACE: - moveId = Moves.DRACO_METEOR; - break; - case Biome.FACTORY: - moveId = Moves.FLASH_CANNON; - break; - case Biome.LABORATORY: - moveId = Moves.ZAP_CANNON; - break; - case Biome.POWER_PLANT: - moveId = Moves.CHARGE_BEAM; - break; - case Biome.END: - moveId = Moves.ETERNABEAM; - break; - } - break; - case TerrainType.MISTY: - moveId = Moves.MOONBLAST; - break; - case TerrainType.ELECTRIC: - moveId = Moves.THUNDERBOLT; - break; - case TerrainType.GRASSY: - moveId = Moves.ENERGY_BALL; - break; - case TerrainType.PSYCHIC: - moveId = Moves.PSYCHIC; - break; - default: - // Just in case there's no match - moveId = Moves.TRI_ATTACK; - break; - } + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + let moveId; + switch (globalScene.arena.getTerrainType()) { + // this allows terrains to 'override' the biome move + case TerrainType.NONE: + switch (globalScene.arena.biomeType) { + case Biome.TOWN: + moveId = Moves.ROUND; + break; + case Biome.METROPOLIS: + moveId = Moves.TRI_ATTACK; + break; + case Biome.SLUM: + moveId = Moves.SLUDGE_BOMB; + break; + case Biome.PLAINS: + moveId = Moves.SILVER_WIND; + break; + case Biome.GRASS: + moveId = Moves.GRASS_KNOT; + break; + case Biome.TALL_GRASS: + moveId = Moves.POLLEN_PUFF; + break; + case Biome.MEADOW: + moveId = Moves.GIGA_DRAIN; + break; + case Biome.FOREST: + moveId = Moves.BUG_BUZZ; + break; + case Biome.JUNGLE: + moveId = Moves.LEAF_STORM; + break; + case Biome.SEA: + moveId = Moves.HYDRO_PUMP; + break; + case Biome.SWAMP: + moveId = Moves.MUD_BOMB; + break; + case Biome.BEACH: + moveId = Moves.SCALD; + break; + case Biome.LAKE: + moveId = Moves.BUBBLE_BEAM; + break; + case Biome.SEABED: + moveId = Moves.BRINE; + break; + case Biome.ISLAND: + moveId = Moves.LEAF_TORNADO; + break; + case Biome.MOUNTAIN: + moveId = Moves.AIR_SLASH; + break; + case Biome.BADLANDS: + moveId = Moves.EARTH_POWER; + break; + case Biome.DESERT: + moveId = Moves.SCORCHING_SANDS; + break; + case Biome.WASTELAND: + moveId = Moves.DRAGON_PULSE; + break; + case Biome.CONSTRUCTION_SITE: + moveId = Moves.STEEL_BEAM; + break; + case Biome.CAVE: + moveId = Moves.POWER_GEM; + break; + case Biome.ICE_CAVE: + moveId = Moves.ICE_BEAM; + break; + case Biome.SNOWY_FOREST: + moveId = Moves.FROST_BREATH; + break; + case Biome.VOLCANO: + moveId = Moves.LAVA_PLUME; + break; + case Biome.GRAVEYARD: + moveId = Moves.SHADOW_BALL; + break; + case Biome.RUINS: + moveId = Moves.ANCIENT_POWER; + break; + case Biome.TEMPLE: + moveId = Moves.EXTRASENSORY; + break; + case Biome.DOJO: + moveId = Moves.FOCUS_BLAST; + break; + case Biome.FAIRY_CAVE: + moveId = Moves.ALLURING_VOICE; + break; + case Biome.ABYSS: + moveId = Moves.OMINOUS_WIND; + break; + case Biome.SPACE: + moveId = Moves.DRACO_METEOR; + break; + case Biome.FACTORY: + moveId = Moves.FLASH_CANNON; + break; + case Biome.LABORATORY: + moveId = Moves.ZAP_CANNON; + break; + case Biome.POWER_PLANT: + moveId = Moves.CHARGE_BEAM; + break; + case Biome.END: + moveId = Moves.ETERNABEAM; + break; + } + break; + case TerrainType.MISTY: + moveId = Moves.MOONBLAST; + break; + case TerrainType.ELECTRIC: + moveId = Moves.THUNDERBOLT; + break; + case TerrainType.GRASSY: + moveId = Moves.ENERGY_BALL; + break; + case TerrainType.PSYCHIC: + moveId = Moves.PSYCHIC; + break; + default: + // Just in case there's no match + moveId = Moves.TRI_ATTACK; + break; + } - user.getMoveQueue().push({ move: moveId, targets: [ target.getBattlerIndex() ], ignorePP: true }); - globalScene.unshiftPhase(new MovePhase(user, [ target.getBattlerIndex() ], new PokemonMove(moveId, 0, 0, true), true)); - initMoveAnim(moveId).then(() => { - loadMoveAnimAssets([ moveId ], true) - .then(() => resolve(true)); - }); - }); + user.getMoveQueue().push({ move: moveId, targets: [ target.getBattlerIndex() ], ignorePP: true }); + globalScene.unshiftPhase(new LoadMoveAnimPhase(moveId)); + globalScene.unshiftPhase(new MovePhase(user, [ target.getBattlerIndex() ], new PokemonMove(moveId, 0, 0, true), true)); + return true; } } @@ -7121,7 +7169,7 @@ export class CopyMoveAttr extends CallMoveAttr { this.invalidMoves = invalidMoves; } - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { this.hasTarget = this.mirrorMove; const lastMove = this.mirrorMove ? target.getLastXMoves()[0].move : globalScene.currentBattle.lastMove; return super.apply(user, target, allMoves[lastMove], args); @@ -7683,50 +7731,15 @@ export class SuppressAbilitiesIfActedAttr extends MoveEffectAttr { * Used by Transform */ export class TransformAttr extends MoveEffectAttr { - async apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { + override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { if (!super.apply(user, target, move, args)) { return false; } - const promises: Promise[] = []; - user.summonData.speciesForm = target.getSpeciesForm(); - user.summonData.gender = target.getGender(); - - // Power Trick's effect will not preserved after using Transform - user.removeTag(BattlerTagType.POWER_TRICK); - - // Copy all stats (except HP) - for (const s of EFFECTIVE_STATS) { - user.setStat(s, target.getStat(s, false), false); - } - - // Copy all stat stages - for (const s of BATTLE_STATS) { - user.setStatStage(s, target.getStatStage(s)); - } - - user.summonData.moveset = target.getMoveset().map((m) => { - if (m) { - // If PP value is less than 5, do nothing. If greater, we need to reduce the value to 5. - return new PokemonMove(m.moveId, 0, 0, false, Math.min(m.getMove().pp, 5)); - } else { - console.warn(`Transform: somehow iterating over a ${m} value when copying moveset!`); - return new PokemonMove(Moves.NONE); - } - }); - user.summonData.types = target.getTypes(); - promises.push(user.updateInfo()); + globalScene.unshiftPhase(new PokemonTransformPhase(user.getBattlerIndex(), target.getBattlerIndex())); globalScene.queueMessage(i18next.t("moveTriggers:transformedIntoTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) })); - promises.push(user.loadAssets(false).then(() => { - user.playAnim(); - user.updateInfo(); - // If the new ability activates immediately, it needs to happen after all the transform animations - user.setTempAbility(target.getAbility()); - })); - - await Promise.all(promises); return true; } } @@ -8036,6 +8049,56 @@ export class AfterYouAttr extends MoveEffectAttr { } } +/** + * Move effect to force the target to move last, ignoring priority. + * If applied to multiple targets, they move in speed order after all other moves. + * @extends MoveEffectAttr + */ +export class ForceLastAttr extends MoveEffectAttr { + /** + * Forces the target of this move to move last. + * + * @param user {@linkcode Pokemon} that is using the move. + * @param target {@linkcode Pokemon} that will be forced to move last. + * @param move {@linkcode Move} {@linkcode Moves.QUASH} + * @param _args N/A + * @returns true + */ + override apply(user: Pokemon, target: Pokemon, _move: Move, _args: any[]): boolean { + globalScene.queueMessage(i18next.t("moveTriggers:forceLast", { targetPokemonName: getPokemonNameWithAffix(target) })); + + const targetMovePhase = globalScene.findPhase((phase) => phase.pokemon === target); + if (targetMovePhase && !targetMovePhase.isForcedLast() && globalScene.tryRemovePhase((phase: MovePhase) => phase.pokemon === target)) { + // Finding the phase to insert the move in front of - + // Either the end of the turn or in front of another, slower move which has also been forced last + const prependPhase = globalScene.findPhase((phase) => + [ MovePhase, MoveEndPhase ].every(cls => !(phase instanceof cls)) + || (phase instanceof MovePhase) && phaseForcedSlower(phase, target, !!globalScene.arena.getTag(ArenaTagType.TRICK_ROOM)) + ); + if (prependPhase) { + globalScene.phaseQueue.splice( + globalScene.phaseQueue.indexOf(prependPhase), + 0, + new MovePhase(target, [ ...targetMovePhase.targets ], targetMovePhase.move, false, false, false, true) + ); + } + } + return true; + } +} + +/** Returns whether a {@linkcode MovePhase} has been forced last and the corresponding pokemon is slower than {@linkcode target} */ +const phaseForcedSlower = (phase: MovePhase, target: Pokemon, trickRoom: boolean): boolean => { + let slower: boolean; + // quashed pokemon still have speed ties + if (phase.pokemon.getEffectiveStat(Stat.SPD) === target.getEffectiveStat(Stat.SPD)) { + slower = !!target.randSeedInt(2); + } else { + slower = !trickRoom ? phase.pokemon.getEffectiveStat(Stat.SPD) < target.getEffectiveStat(Stat.SPD) : phase.pokemon.getEffectiveStat(Stat.SPD) > target.getEffectiveStat(Stat.SPD); + } + return phase.isForcedLast() && slower; +}; + const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !globalScene.arena.getTag(ArenaTagType.GRAVITY); const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune(); @@ -8079,44 +8142,54 @@ const attackedByItemMessageFunc = (user: Pokemon, target: Pokemon, move: Move) = export type MoveAttrFilter = (attr: MoveAttr) => boolean; -function applyMoveAttrsInternal(attrFilter: MoveAttrFilter, user: Pokemon | null, target: Pokemon | null, move: Move, args: any[]): Promise { - return new Promise(resolve => { - const attrPromises: Promise[] = []; - const moveAttrs = move.attrs.filter(a => attrFilter(a)); - for (const attr of moveAttrs) { - const result = attr.apply(user, target, move, args); - if (result instanceof Promise) { - attrPromises.push(result); - } - } - Promise.allSettled(attrPromises).then(() => resolve()); - }); +function applyMoveAttrsInternal( + attrFilter: MoveAttrFilter, + user: Pokemon | null, + target: Pokemon | null, + move: Move, + args: any[], +): void { + move.attrs.filter((attr) => attrFilter(attr)).forEach((attr) => attr.apply(user, target, move, args)); } -function applyMoveChargeAttrsInternal(attrFilter: MoveAttrFilter, user: Pokemon | null, target: Pokemon | null, move: ChargingMove, args: any[]): Promise { - return new Promise(resolve => { - const chargeAttrPromises: Promise[] = []; - const chargeMoveAttrs = move.chargeAttrs.filter(a => attrFilter(a)); - for (const attr of chargeMoveAttrs) { - const result = attr.apply(user, target, move, args); - if (result instanceof Promise) { - chargeAttrPromises.push(result); - } - } - Promise.allSettled(chargeAttrPromises).then(() => resolve()); - }); +function applyMoveChargeAttrsInternal( + attrFilter: MoveAttrFilter, + user: Pokemon | null, + target: Pokemon | null, + move: ChargingMove, + args: any[], +): void { + move.chargeAttrs.filter((attr) => attrFilter(attr)).forEach((attr) => attr.apply(user, target, move, args)); } -export function applyMoveAttrs(attrType: Constructor, user: Pokemon | null, target: Pokemon | null, move: Move, ...args: any[]): Promise { - return applyMoveAttrsInternal((attr: MoveAttr) => attr instanceof attrType, user, target, move, args); +export function applyMoveAttrs( + attrType: Constructor, + user: Pokemon | null, + target: Pokemon | null, + move: Move, + ...args: any[] +): void { + applyMoveAttrsInternal((attr: MoveAttr) => attr instanceof attrType, user, target, move, args); } -export function applyFilteredMoveAttrs(attrFilter: MoveAttrFilter, user: Pokemon, target: Pokemon | null, move: Move, ...args: any[]): Promise { - return applyMoveAttrsInternal(attrFilter, user, target, move, args); +export function applyFilteredMoveAttrs( + attrFilter: MoveAttrFilter, + user: Pokemon, + target: Pokemon | null, + move: Move, + ...args: any[] +): void { + applyMoveAttrsInternal(attrFilter, user, target, move, args); } -export function applyMoveChargeAttrs(attrType: Constructor, user: Pokemon | null, target: Pokemon | null, move: ChargingMove, ...args: any[]): Promise { - return applyMoveChargeAttrsInternal((attr: MoveAttr) => attr instanceof attrType, user, target, move, args); +export function applyMoveChargeAttrs( + attrType: Constructor, + user: Pokemon | null, + target: Pokemon | null, + move: ChargingMove, + ...args: any[] +): void { + applyMoveChargeAttrsInternal((attr: MoveAttr) => attr instanceof attrType, user, target, move, args); } export class MoveCondition { @@ -8795,6 +8868,7 @@ export function initMoves() { new AttackMove(Moves.PSYWAVE, Type.PSYCHIC, MoveCategory.SPECIAL, -1, 100, 15, -1, 0, 1) .attr(RandomLevelDamageAttr), new SelfStatusMove(Moves.SPLASH, Type.NORMAL, -1, 40, -1, 0, 1) + .attr(SplashAttr) .condition(failOnGravityCondition), new SelfStatusMove(Moves.ACID_ARMOR, Type.POISON, -1, 20, -1, 0, 1) .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true), @@ -9178,8 +9252,8 @@ export function initMoves() { .attr(BypassBurnDamageReductionAttr), new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3) .attr(MessageHeaderAttr, (user, move) => i18next.t("moveTriggers:isTighteningFocus", { pokemonName: getPokemonNameWithAffix(user) })) - .punchingMove() - .condition((user, target, move) => !user.turnData.attacksReceived.find(r => r.damage)), + .attr(PreUseInterruptAttr, i18next.t("moveTriggers:lostFocus"), user => !!user.turnData.attacksReceived.find(r => r.damage)) + .punchingMove(), new AttackMove(Moves.SMELLING_SALTS, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 3) .attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.PARALYSIS ? 2 : 1) .attr(HealStatusEffectAttr, true, StatusEffect.PARALYSIS), @@ -9915,7 +9989,8 @@ export function initMoves() { .attr(RemoveHeldItemAttr, true), new StatusMove(Moves.QUASH, Type.DARK, 100, 15, -1, 0, 5) .condition(failIfSingleBattle) - .unimplemented(), + .condition((user, target, move) => !target.turnData.acted) + .attr(ForceLastAttr), new AttackMove(Moves.ACROBATICS, Type.FLYING, MoveCategory.PHYSICAL, 55, 100, 15, -1, 0, 5) .attr(MovePowerMultiplierAttr, (user, target, move) => Math.max(1, 2 - 0.2 * user.getHeldItems().filter(i => i.isTransferable).reduce((v, m) => v + m.stackCount, 0))), new StatusMove(Moves.REFLECT_TYPE, Type.NORMAL, -1, 15, -1, 0, 5) @@ -10236,7 +10311,8 @@ export function initMoves() { .target(MoveTarget.BOTH_SIDES), new AttackMove(Moves.DAZZLING_GLEAM, Type.FAIRY, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 6) .target(MoveTarget.ALL_NEAR_ENEMIES), - new SelfStatusMove(Moves.CELEBRATE, Type.NORMAL, -1, 40, -1, 0, 6), + new SelfStatusMove(Moves.CELEBRATE, Type.NORMAL, -1, 40, -1, 0, 6) + .attr(CelebrateAttr), new StatusMove(Moves.HOLD_HANDS, Type.NORMAL, -1, 40, -1, 0, 6) .ignoresSubstitute() .target(MoveTarget.NEAR_ALLY), 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 ca6b384cfbb..7d3f6f4c5bc 100644 --- a/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts @@ -151,7 +151,7 @@ async function spawnNextTrainerOrEndEncounter() { // Give 10x Voucher const newModifier = modifierTypes.VOUCHER_PREMIUM().newModifier(); - await globalScene.addModifier(newModifier); + globalScene.addModifier(newModifier); globalScene.playSound("item_fanfare"); await showEncounterText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name })); diff --git a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts index f7c70cb7052..454d179c003 100644 --- a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts +++ b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts @@ -406,7 +406,7 @@ async function doNewTeamPostProcess(transformations: PokemonTransformation[]) { // Copy old items to new pokemon for (const item of transformation.heldItems) { item.pokemonId = newPokemon.id; - await globalScene.addModifier(item, false, false, false, true); + globalScene.addModifier(item, false, false, false, true); } // Any pokemon that is below 570 BST gets +20 permanent BST to 3 stats if (shouldGetOldGateau(newPokemon)) { @@ -416,7 +416,7 @@ async function doNewTeamPostProcess(transformations: PokemonTransformation[]) { ?.withIdFromFunc(modifierTypes.MYSTERY_ENCOUNTER_OLD_GATEAU); const modifier = modType?.newModifier(newPokemon); if (modifier) { - await globalScene.addModifier(modifier, false, false, false, true); + globalScene.addModifier(modifier, false, false, false, true); } } diff --git a/src/data/mystery-encounters/utils/encounter-phase-utils.ts b/src/data/mystery-encounters/utils/encounter-phase-utils.ts index d745da5ecb3..1f740763148 100644 --- a/src/data/mystery-encounters/utils/encounter-phase-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-phase-utils.ts @@ -47,6 +47,8 @@ import { StatusEffect } from "#enums/status-effect"; import { globalScene } from "#app/global-scene"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Type } from "#app/enums/type"; +import { getNatureName } from "#app/data/nature"; +import { getPokemonNameWithAffix } from "#app/messages"; /** * Animates exclamation sprite over trainer's head at start of encounter @@ -357,7 +359,31 @@ export async function initBattleWithEnemyConfig(partyConfig: EnemyPartyConfig): loadEnemyAssets.push(enemyPokemon.loadAssets()); - console.log(`Pokemon: ${enemyPokemon.name}`, `Species ID: ${enemyPokemon.species.speciesId}`, `Stats: ${enemyPokemon.stats}`, `Ability: ${enemyPokemon.getAbility().name}`, `Passive Ability: ${enemyPokemon.getPassiveAbility().name}`); + const stats: string[] = [ + `HP: ${enemyPokemon.stats[0]} (${enemyPokemon.ivs[0]})`, + ` Atk: ${enemyPokemon.stats[1]} (${enemyPokemon.ivs[1]})`, + ` Def: ${enemyPokemon.stats[2]} (${enemyPokemon.ivs[2]})`, + ` Spatk: ${enemyPokemon.stats[3]} (${enemyPokemon.ivs[3]})`, + ` Spdef: ${enemyPokemon.stats[4]} (${enemyPokemon.ivs[4]})`, + ` Spd: ${enemyPokemon.stats[5]} (${enemyPokemon.ivs[5]})`, + ]; + const moveset: string[] = []; + enemyPokemon.getMoveset().forEach((move) => { + moveset.push(move!.getName()); // TODO: remove `!` after moveset-null removal PR + }); + + console.log( + `Pokemon: ${getPokemonNameWithAffix(enemyPokemon)}`, + `| Species ID: ${enemyPokemon.species.speciesId}`, + `| Nature: ${getNatureName(enemyPokemon.nature, true, true, true)}`, + ); + console.log(`Stats (IVs): ${stats}`); + console.log( + `Ability: ${enemyPokemon.getAbility().name}`, + `| Passive Ability${enemyPokemon.hasPassive() ? "" : " (inactive)"}: ${enemyPokemon.getPassiveAbility().name}`, + `${enemyPokemon.isBoss() ? `| Boss Bars: ${enemyPokemon.bossSegments}` : ""}` + ); + console.log("Moveset:", moveset); }); globalScene.pushPhase(new MysteryEncounterBattlePhase(partyConfig.disableSwitch)); diff --git a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts index 580aaaf2cc6..be7d11d6cf1 100644 --- a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts @@ -326,7 +326,7 @@ export async function modifyPlayerPokemonBST(pokemon: PlayerPokemon, value: numb ?.withIdFromFunc(modifierTypes.MYSTERY_ENCOUNTER_SHUCKLE_JUICE); const modifier = modType?.newModifier(pokemon); if (modifier) { - await globalScene.addModifier(modifier, false, false, false, true); + globalScene.addModifier(modifier, false, false, false, true); pokemon.calculateStats(); } } @@ -359,7 +359,7 @@ export async function applyModifierTypeToPlayerPokemon(pokemon: PlayerPokemon, m return applyModifierTypeToPlayerPokemon(pokemon, fallbackModifierType); } - await globalScene.addModifier(modifier, false, false, false, true); + globalScene.addModifier(modifier, false, false, false, true); } /** diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 4349cee2cbf..06704666153 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -830,7 +830,11 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali } } - if (!allowEvolving || !pokemonEvolutions.hasOwnProperty(this.speciesId)) { + if ( // If evolutions shouldn't happen, add more cases here :) + !allowEvolving + || !pokemonEvolutions.hasOwnProperty(this.speciesId) + || globalScene.currentBattle?.waveIndex === 20 && globalScene.gameMode.isClassic && globalScene.currentBattle.trainer + ) { return this.speciesId; } @@ -1848,7 +1852,7 @@ export function initSpecies() { new PokemonSpecies(Species.REGIGIGAS, 4, true, false, false, "Colossal Pokémon", Type.NORMAL, null, 3.7, 420, Abilities.SLOW_START, Abilities.NONE, Abilities.NORMALIZE, 670, 110, 160, 110, 80, 110, 100, 3, 0, 335, GrowthRate.SLOW, null, false), new PokemonSpecies(Species.GIRATINA, 4, false, true, false, "Renegade Pokémon", Type.GHOST, Type.DRAGON, 4.5, 750, Abilities.PRESSURE, Abilities.NONE, Abilities.TELEPATHY, 680, 150, 100, 120, 100, 120, 90, 3, 0, 340, GrowthRate.SLOW, null, false, true, new PokemonForm("Altered Forme", "altered", Type.GHOST, Type.DRAGON, 4.5, 750, Abilities.PRESSURE, Abilities.NONE, Abilities.TELEPATHY, 680, 150, 100, 120, 100, 120, 90, 3, 0, 340, false, null, true), - new PokemonForm("Origin Forme", "origin", Type.GHOST, Type.DRAGON, 6.9, 650, Abilities.LEVITATE, Abilities.NONE, Abilities.NONE, 680, 150, 120, 100, 120, 100, 90, 3, 0, 340), + new PokemonForm("Origin Forme", "origin", Type.GHOST, Type.DRAGON, 6.9, 650, Abilities.LEVITATE, Abilities.NONE, Abilities.LEVITATE, 680, 150, 120, 100, 120, 100, 90, 3, 0, 340), ), new PokemonSpecies(Species.CRESSELIA, 4, true, false, false, "Lunar Pokémon", Type.PSYCHIC, null, 1.5, 85.6, Abilities.LEVITATE, Abilities.NONE, Abilities.NONE, 580, 120, 70, 110, 75, 120, 85, 3, 100, 300, GrowthRate.SLOW, 0, false), new PokemonSpecies(Species.PHIONE, 4, false, false, true, "Sea Drifter Pokémon", Type.WATER, null, 0.4, 3.1, Abilities.HYDRATION, Abilities.NONE, Abilities.NONE, 480, 80, 80, 80, 80, 80, 80, 30, 70, 240, GrowthRate.SLOW, null, false), diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index d9aab528e72..1b646fc6478 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -1247,9 +1247,6 @@ function getGymLeaderPartyTemplate() { export function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void) { return (level: number, strength: PartyMemberStrength) => { let species = Utils.randSeedItem(speciesPool); - if (globalScene.gameMode.isClassic && globalScene.currentBattle.waveIndex === 20) { - ignoreEvolution = true; - } if (!ignoreEvolution) { species = getPokemonSpecies(species).getTrainerSpeciesForLevel(level, true, strength, globalScene.currentBattle.waveIndex); } diff --git a/src/enums/buttons.ts b/src/enums/buttons.ts index fe26023f8e7..f828b280d45 100644 --- a/src/enums/buttons.ts +++ b/src/enums/buttons.ts @@ -13,7 +13,7 @@ export enum Button { CYCLE_GENDER, CYCLE_ABILITY, CYCLE_NATURE, - V, + CYCLE_TERA, SPEED_UP, - SLOW_DOWN + SLOW_DOWN, } diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 4f7be67213b..56c1a3a1491 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -105,7 +105,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { ObtainStatusEffectPhase } from "#app/phases/obtain-status-effect-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; -import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase"; import { Challenges } from "#enums/challenges"; import { PokemonAnimType } from "#enums/pokemon-anim-type"; import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; @@ -2355,12 +2354,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const maxPower = Math.min(movePool.reduce((v, m) => Math.max(allMoves[m[0]].power, v), 40), 90); movePool = movePool.map(m => [ m[0], m[1] * (allMoves[m[0]].category === MoveCategory.STATUS ? 1 : Math.max(Math.min(allMoves[m[0]].power / maxPower, 1), 0.5)) ]); - // Weight damaging moves against the lower stat + // Weight damaging moves against the lower stat. This uses a non-linear relationship. + // If the higher stat is 1 - 1.09x higher, no change. At higher stat ~1.38x lower stat, off-stat moves have half weight. + // One third weight at ~1.58x higher, one quarter weight at ~1.73x higher, one fifth at ~1.87x, and one tenth at ~2.35x higher. const atk = this.getStat(Stat.ATK); const spAtk = this.getStat(Stat.SPATK); const worseCategory: MoveCategory = atk > spAtk ? MoveCategory.SPECIAL : MoveCategory.PHYSICAL; const statRatio = worseCategory === MoveCategory.PHYSICAL ? atk / spAtk : spAtk / atk; - movePool = movePool.map(m => [ m[0], m[1] * (allMoves[m[0]].category === worseCategory ? statRatio : 1) ]); + movePool = movePool.map(m => [ m[0], m[1] * (allMoves[m[0]].category === worseCategory ? Math.min(Math.pow(statRatio, 3) * 1.3, 1) : 1) ]); /** The higher this is the more the game weights towards higher level moves. At `0` all moves are equal weight. */ let weightMultiplier = 0.9; @@ -2401,14 +2402,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { while (baseWeights.length > this.moveset.length && this.moveset.length < 4) { if (this.hasTrainer()) { // Sqrt the weight of any damaging moves with overlapping types. This is about a 0.05 - 0.1 multiplier. - // Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights double if STAB. + // Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights get 20x if STAB. // Status moves remain unchanged on weight, this encourages 1-2 movePool = baseWeights.filter(m => !this.moveset.some(mo => m[0] === mo?.moveId)).map((m) => { let ret: number; if (this.moveset.some(mo => mo?.getMove().category !== MoveCategory.STATUS && mo?.getMove().type === allMoves[m[0]].type)) { ret = Math.ceil(Math.sqrt(m[1])); } else if (allMoves[m[0]].category !== MoveCategory.STATUS) { - ret = Math.ceil(m[1] / Math.max(Math.pow(4, this.moveset.filter(mo => (mo?.getMove().power ?? 0) > 1).length) / 8, 0.5) * (this.isOfType(allMoves[m[0]].type) ? 2 : 1)); + ret = Math.ceil(m[1] / Math.max(Math.pow(4, this.moveset.filter(mo => (mo?.getMove().power ?? 0) > 1).length) / 8, 0.5) * (this.isOfType(allMoves[m[0]].type) ? 20 : 1)); } else { ret = m[1]; } @@ -2854,7 +2855,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { stabMultiplier.value += 0.5; } - if (source.isTerastallized && source.teraType === Type.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) { + if (source.isTerastallized && source.getTeraType() === Type.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) { if (matchesSourceType) { stabMultiplier.value += 0.5; } else { @@ -4515,43 +4516,6 @@ export class PlayerPokemon extends Pokemon { this.friendship = Math.max(this.friendship + friendship, 0); } } - /** - * Handles Revival Blessing when used by player. - * @returns Promise to revive a pokemon. - * @see {@linkcode RevivalBlessingAttr} - */ - revivalBlessing(): Promise { - return new Promise(resolve => { - globalScene.ui.setMode(Mode.PARTY, PartyUiMode.REVIVAL_BLESSING, this.getFieldIndex(), (slotIndex:number, option: PartyOption) => { - if (slotIndex >= 0 && slotIndex < 6) { - const pokemon = globalScene.getPlayerParty()[slotIndex]; - if (!pokemon || !pokemon.isFainted()) { - resolve(); - } - - pokemon.resetTurnData(); - pokemon.resetStatus(); - pokemon.heal(Math.min(Utils.toDmgValue(0.5 * pokemon.getMaxHp()), pokemon.getMaxHp())); - globalScene.queueMessage(i18next.t("moveTriggers:revivalBlessing", { pokemonName: pokemon.name }), 0, true); - - if (globalScene.currentBattle.double && globalScene.getPlayerParty().length > 1) { - const allyPokemon = this.getAlly(); - if (slotIndex <= 1) { - // Revived ally pokemon - globalScene.unshiftPhase(new SwitchSummonPhase(SwitchType.SWITCH, pokemon.getFieldIndex(), slotIndex, false, true)); - globalScene.unshiftPhase(new ToggleDoublePositionPhase(true)); - } else if (allyPokemon.isFainted()) { - // Revived party pokemon, and ally pokemon is fainted - globalScene.unshiftPhase(new SwitchSummonPhase(SwitchType.SWITCH, allyPokemon.getFieldIndex(), slotIndex, false, true)); - globalScene.unshiftPhase(new ToggleDoublePositionPhase(true)); - } - } - - } - globalScene.ui.setMode(Mode.MESSAGE).then(() => resolve()); - }, PartyUiHandler.FilterFainted); - }); - } getPossibleEvolution(evolution: SpeciesFormEvolution | null): Promise { if (!evolution) { @@ -4675,8 +4639,9 @@ export class PlayerPokemon extends Pokemon { newPokemon.fusionVariant = this.fusionVariant; newPokemon.fusionGender = this.fusionGender; newPokemon.fusionLuck = this.fusionLuck; - newPokemon.fusionTeraType = this.teraType; + newPokemon.fusionTeraType = this.fusionTeraType; newPokemon.usedTMs = this.usedTMs; + newPokemon.evoCounter = this.evoCounter; globalScene.getPlayerParty().push(newPokemon); newPokemon.evolve((!isFusion ? newEvolution : new FusionSpeciesFormEvolution(this.id, newEvolution)), evoSpecies); @@ -4733,70 +4698,63 @@ export class PlayerPokemon extends Pokemon { } /** - * Returns a Promise to fuse two PlayerPokemon together - * @param pokemon The PlayerPokemon to fuse to this one - */ - fuse(pokemon: PlayerPokemon): Promise { - return new Promise(resolve => { - this.fusionSpecies = pokemon.species; - this.fusionFormIndex = pokemon.formIndex; - this.fusionAbilityIndex = pokemon.abilityIndex; - this.fusionShiny = pokemon.shiny; - this.fusionVariant = pokemon.variant; - this.fusionGender = pokemon.gender; - this.fusionLuck = pokemon.luck; - this.fusionCustomPokemonData = pokemon.customPokemonData; - if ((pokemon.pauseEvolutions) || (this.pauseEvolutions)) { - this.pauseEvolutions = true; - } + * Returns a Promise to fuse two PlayerPokemon together + * @param pokemon The PlayerPokemon to fuse to this one + */ + fuse(pokemon: PlayerPokemon): void { + this.fusionSpecies = pokemon.species; + this.fusionFormIndex = pokemon.formIndex; + this.fusionAbilityIndex = pokemon.abilityIndex; + this.fusionShiny = pokemon.shiny; + this.fusionVariant = pokemon.variant; + this.fusionGender = pokemon.gender; + this.fusionLuck = pokemon.luck; + this.fusionCustomPokemonData = pokemon.customPokemonData; + this.evoCounter = Math.max(pokemon.evoCounter, this.evoCounter); + if (pokemon.pauseEvolutions || this.pauseEvolutions) { + this.pauseEvolutions = true; + } - globalScene.validateAchv(achvs.SPLICE); - globalScene.gameData.gameStats.pokemonFused++; + globalScene.validateAchv(achvs.SPLICE); + globalScene.gameData.gameStats.pokemonFused++; - // Store the average HP% that each Pokemon has - const maxHp = this.getMaxHp(); - const newHpPercent = ((pokemon.hp / pokemon.getMaxHp()) + (this.hp / maxHp)) / 2; + // Store the average HP% that each Pokemon has + const maxHp = this.getMaxHp(); + const newHpPercent = (pokemon.hp / pokemon.getMaxHp() + this.hp / maxHp) / 2; - this.generateName(); - this.calculateStats(); + this.generateName(); + this.calculateStats(); - // Set this Pokemon's HP to the average % of both fusion components - this.hp = Math.round(maxHp * newHpPercent); - if (!this.isFainted()) { - // If this Pokemon hasn't fainted, make sure the HP wasn't set over the new maximum - this.hp = Math.min(this.hp, maxHp); - this.status = getRandomStatus(this.status, pokemon.status); // Get a random valid status between the two - } else if (!pokemon.isFainted()) { - // If this Pokemon fainted but the other hasn't, make sure the HP wasn't set to zero - this.hp = Math.max(this.hp, 1); - this.status = pokemon.status; // Inherit the other Pokemon's status - } + // Set this Pokemon's HP to the average % of both fusion components + this.hp = Math.round(maxHp * newHpPercent); + if (!this.isFainted()) { + // If this Pokemon hasn't fainted, make sure the HP wasn't set over the new maximum + this.hp = Math.min(this.hp, maxHp); + this.status = getRandomStatus(this.status, pokemon.status); // Get a random valid status between the two + } else if (!pokemon.isFainted()) { + // If this Pokemon fainted but the other hasn't, make sure the HP wasn't set to zero + this.hp = Math.max(this.hp, 1); + this.status = pokemon.status; // Inherit the other Pokemon's status + } - this.generateCompatibleTms(); - this.updateInfo(true); - const fusedPartyMemberIndex = globalScene.getPlayerParty().indexOf(pokemon); - let partyMemberIndex = globalScene.getPlayerParty().indexOf(this); - if (partyMemberIndex > fusedPartyMemberIndex) { - partyMemberIndex--; - } - const fusedPartyMemberHeldModifiers = globalScene.findModifiers(m => m instanceof PokemonHeldItemModifier - && m.pokemonId === pokemon.id, true) as PokemonHeldItemModifier[]; - const transferModifiers: Promise[] = []; - for (const modifier of fusedPartyMemberHeldModifiers) { - transferModifiers.push(globalScene.tryTransferHeldItemModifier(modifier, this, false, modifier.getStackCount(), true, true, false)); - } - Promise.allSettled(transferModifiers).then(() => { - globalScene.updateModifiers(true, true).then(() => { - globalScene.removePartyMemberModifiers(fusedPartyMemberIndex); - globalScene.getPlayerParty().splice(fusedPartyMemberIndex, 1)[0]; - const newPartyMemberIndex = globalScene.getPlayerParty().indexOf(this); - pokemon.getMoveset(true).map((m: PokemonMove) => globalScene.unshiftPhase(new LearnMovePhase(newPartyMemberIndex, m.getMove().id))); - pokemon.destroy(); - this.updateFusionPalette(); - resolve(); - }); - }); - }); + this.generateCompatibleTms(); + this.updateInfo(true); + const fusedPartyMemberIndex = globalScene.getPlayerParty().indexOf(pokemon); + let partyMemberIndex = globalScene.getPlayerParty().indexOf(this); + if (partyMemberIndex > fusedPartyMemberIndex) { + partyMemberIndex--; + } + const fusedPartyMemberHeldModifiers = globalScene.findModifiers((m) => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemon.id, true) as PokemonHeldItemModifier[]; + for (const modifier of fusedPartyMemberHeldModifiers) { + globalScene.tryTransferHeldItemModifier(modifier, this, false, modifier.getStackCount(), true, true, false); + } + globalScene.updateModifiers(true, true); + globalScene.removePartyMemberModifiers(fusedPartyMemberIndex); + globalScene.getPlayerParty().splice(fusedPartyMemberIndex, 1)[0]; + const newPartyMemberIndex = globalScene.getPlayerParty().indexOf(this); + pokemon.getMoveset(true).map((m: PokemonMove) => globalScene.unshiftPhase(new LearnMovePhase(newPartyMemberIndex, m.getMove().id))); + pokemon.destroy(); + this.updateFusionPalette(); } unfuse(): Promise { diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index fe61eadaccd..f6a69fcca2d 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -158,7 +158,7 @@ export abstract class Modifier { * Handles applying of {@linkcode Modifier} * @param args collection of all passed parameters */ - abstract apply(...args: unknown[]): boolean | Promise; + abstract apply(...args: unknown[]): boolean; } export abstract class PersistentModifier extends Modifier { @@ -1949,7 +1949,7 @@ export abstract class ConsumablePokemonModifier extends ConsumableModifier { * @param playerPokemon The {@linkcode PlayerPokemon} that consumes the item * @param args Additional arguments passed to {@linkcode ConsumablePokemonModifier.apply} */ - abstract override apply(playerPokemon: PlayerPokemon, ...args: unknown[]): boolean | Promise; + abstract override apply(playerPokemon: PlayerPokemon, ...args: unknown[]): boolean; getPokemon() { return globalScene.getPlayerParty().find(p => p.id === this.pokemonId); @@ -2288,8 +2288,8 @@ export class FusePokemonModifier extends ConsumablePokemonModifier { * @param playerPokemon2 {@linkcode PlayerPokemon} that should be fused with {@linkcode playerPokemon} * @returns always Promise */ - override async apply(playerPokemon: PlayerPokemon, playerPokemon2: PlayerPokemon): Promise { - await playerPokemon.fuse(playerPokemon2); + override apply(playerPokemon: PlayerPokemon, playerPokemon2: PlayerPokemon): boolean { + playerPokemon.fuse(playerPokemon2); return true; } } @@ -3136,8 +3136,6 @@ export abstract class HeldItemTransferModifier extends PokemonHeldItemModifier { let highestItemTier = itemModifiers.map(m => m.type.getOrInferTier(poolType)).reduce((highestTier, tier) => Math.max(tier!, highestTier), 0); // TODO: is this bang correct? let tierItemModifiers = itemModifiers.filter(m => m.type.getOrInferTier(poolType) === highestItemTier); - const heldItemTransferPromises: Promise[] = []; - for (let i = 0; i < transferredItemCount; i++) { if (!tierItemModifiers.length) { while (highestItemTier-- && !tierItemModifiers.length) { @@ -3149,19 +3147,15 @@ export abstract class HeldItemTransferModifier extends PokemonHeldItemModifier { } const randItemIndex = pokemon.randSeedInt(itemModifiers.length); const randItem = itemModifiers[randItemIndex]; - heldItemTransferPromises.push(globalScene.tryTransferHeldItemModifier(randItem, pokemon, false).then(success => { - if (success) { - transferredModifierTypes.push(randItem.type); - itemModifiers.splice(randItemIndex, 1); - } - })); + if (globalScene.tryTransferHeldItemModifier(randItem, pokemon, false)) { + transferredModifierTypes.push(randItem.type); + itemModifiers.splice(randItemIndex, 1); + } } - Promise.all(heldItemTransferPromises).then(() => { - for (const mt of transferredModifierTypes) { - globalScene.queueMessage(this.getTransferMessage(pokemon, targetPokemon, mt)); - } - }); + for (const mt of transferredModifierTypes) { + globalScene.queueMessage(this.getTransferMessage(pokemon, targetPokemon, mt)); + } return !!transferredModifierTypes.length; } @@ -3390,7 +3384,7 @@ abstract class EnemyDamageMultiplierModifier extends EnemyPersistentModifier { * @returns always `true` */ override apply(multiplier: NumberHolder): boolean { - multiplier.value = Math.floor(multiplier.value * Math.pow(this.damageMultiplier, this.getStackCount())); + multiplier.value = toDmgValue(multiplier.value * Math.pow(this.damageMultiplier, this.getStackCount())); return true; } diff --git a/src/overrides.ts b/src/overrides.ts index e53d3b766c4..d15370259fc 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -47,6 +47,7 @@ class DefaultOverrides { // ----------------- /** a specific seed (default: a random string of 24 characters) */ readonly SEED_OVERRIDE: string = ""; + readonly DAILY_RUN_SEED_OVERRIDE: string | null = null; readonly WEATHER_OVERRIDE: WeatherType = WeatherType.NONE; /** * If `null`, ignore this override. diff --git a/src/phases/add-enemy-buff-modifier-phase.ts b/src/phases/add-enemy-buff-modifier-phase.ts index d79b4f6eca5..f504fd0aaa2 100644 --- a/src/phases/add-enemy-buff-modifier-phase.ts +++ b/src/phases/add-enemy-buff-modifier-phase.ts @@ -21,6 +21,7 @@ export class AddEnemyBuffModifierPhase extends Phase { for (let i = 0; i < count; i++) { globalScene.addEnemyModifier(getEnemyBuffModifierForWave(tier, globalScene.findModifiers(m => m instanceof EnemyPersistentModifier, false)), true, true); } - globalScene.updateModifiers(false, true).then(() => this.end()); + globalScene.updateModifiers(false, true); + this.end(); } } diff --git a/src/phases/battle-end-phase.ts b/src/phases/battle-end-phase.ts index edffd8498d6..c0922b91809 100644 --- a/src/phases/battle-end-phase.ts +++ b/src/phases/battle-end-phase.ts @@ -63,6 +63,7 @@ export class BattleEndPhase extends BattlePhase { } } - globalScene.updateModifiers().then(() => this.end()); + globalScene.updateModifiers(); + this.end(); } } diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 1dd275ab130..9485e77e5aa 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -38,6 +38,7 @@ import { Species } from "#enums/species"; import { overrideHeldItems, overrideModifiers } from "#app/modifier/modifier"; import i18next from "i18next"; import { WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/data/mystery-encounters/mystery-encounters"; +import { getNatureName } from "#app/data/nature"; export class EncounterPhase extends BattlePhase { private loaded: boolean; @@ -156,7 +157,31 @@ export class EncounterPhase extends BattlePhase { loadEnemyAssets.push(enemyPokemon.loadAssets()); - console.log(`Pokemon: ${getPokemonNameWithAffix(enemyPokemon)}`, `Species ID: ${enemyPokemon.species.speciesId}`, `Stats: ${enemyPokemon.stats}`, `Ability: ${enemyPokemon.getAbility().name}`, `Passive Ability: ${enemyPokemon.getPassiveAbility().name}`); + const stats: string[] = [ + `HP: ${enemyPokemon.stats[0]} (${enemyPokemon.ivs[0]})`, + ` Atk: ${enemyPokemon.stats[1]} (${enemyPokemon.ivs[1]})`, + ` Def: ${enemyPokemon.stats[2]} (${enemyPokemon.ivs[2]})`, + ` Spatk: ${enemyPokemon.stats[3]} (${enemyPokemon.ivs[3]})`, + ` Spdef: ${enemyPokemon.stats[4]} (${enemyPokemon.ivs[4]})`, + ` Spd: ${enemyPokemon.stats[5]} (${enemyPokemon.ivs[5]})`, + ]; + const moveset: string[] = []; + enemyPokemon.getMoveset().forEach((move) => { + moveset.push(move!.getName()); // TODO: remove `!` after moveset-null removal PR + }); + + console.log( + `Pokemon: ${getPokemonNameWithAffix(enemyPokemon)}`, + `| Species ID: ${enemyPokemon.species.speciesId}`, + `| Nature: ${getNatureName(enemyPokemon.nature, true, true, true)}`, + ); + console.log(`Stats (IVs): ${stats}`); + console.log( + `Ability: ${enemyPokemon.getAbility().name}`, + `| Passive Ability${enemyPokemon.hasPassive() ? "" : " (inactive)"}: ${enemyPokemon.getPassiveAbility().name}`, + `${enemyPokemon.isBoss() ? `| Boss Bars: ${enemyPokemon.bossSegments}` : ""}` + ); + console.log("Moveset:", moveset); return true; }); diff --git a/src/phases/game-over-modifier-reward-phase.ts b/src/phases/game-over-modifier-reward-phase.ts index c98bb5fff04..93f53bf38c0 100644 --- a/src/phases/game-over-modifier-reward-phase.ts +++ b/src/phases/game-over-modifier-reward-phase.ts @@ -12,16 +12,22 @@ export class GameOverModifierRewardPhase extends ModifierRewardPhase { doReward(): Promise { return new Promise(resolve => { const newModifier = this.modifierType.newModifier(); - globalScene.addModifier(newModifier).then(() => { - // Sound loaded into game as is - globalScene.playSound("level_up_fanfare"); - globalScene.ui.setMode(Mode.MESSAGE); - globalScene.ui.fadeIn(250).then(() => { - globalScene.ui.showText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }), null, () => { + globalScene.addModifier(newModifier); + // Sound loaded into game as is + globalScene.playSound("level_up_fanfare"); + globalScene.ui.setMode(Mode.MESSAGE); + globalScene.ui.fadeIn(250).then(() => { + globalScene.ui.showText( + i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }), + null, + () => { globalScene.time.delayedCall(1500, () => globalScene.arenaBg.setVisible(true)); resolve(); - }, null, true, 1500); - }); + }, + null, + true, + 1500, + ); }); }); } diff --git a/src/phases/load-move-anim-phase.ts b/src/phases/load-move-anim-phase.ts new file mode 100644 index 00000000000..66cb90744e0 --- /dev/null +++ b/src/phases/load-move-anim-phase.ts @@ -0,0 +1,20 @@ +import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; +import type { Moves } from "#enums/moves"; +import { Phase } from "#app/phase"; + +/** + * Phase for synchronous move animation loading. + * Should be used when a move invokes another move that + * isn't already loaded (e.g. for Metronome) + */ +export class LoadMoveAnimPhase extends Phase { + constructor(protected moveId: Moves) { + super(); + } + + public override start(): void { + initMoveAnim(this.moveId) + .then(() => loadMoveAnimAssets([ this.moveId ], true)) + .then(() => this.end()); + } +} diff --git a/src/phases/modifier-reward-phase.ts b/src/phases/modifier-reward-phase.ts index 1cdfd6b2721..e4fac33767f 100644 --- a/src/phases/modifier-reward-phase.ts +++ b/src/phases/modifier-reward-phase.ts @@ -22,10 +22,9 @@ export class ModifierRewardPhase extends BattlePhase { doReward(): Promise { return new Promise(resolve => { const newModifier = this.modifierType.newModifier(); - globalScene.addModifier(newModifier).then(() => { - globalScene.playSound("item_fanfare"); - globalScene.ui.showText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }), null, () => resolve(), null, true); - }); + globalScene.addModifier(newModifier); + globalScene.playSound("item_fanfare"); + globalScene.ui.showText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }), null, () => resolve(), null, true); }); } } diff --git a/src/phases/move-anim-phase.ts b/src/phases/move-anim-phase.ts new file mode 100644 index 00000000000..005445924a0 --- /dev/null +++ b/src/phases/move-anim-phase.ts @@ -0,0 +1,20 @@ +import type { MoveAnim } from "#app/data/battle-anims"; +import { Phase } from "#app/phase"; + +/** + * Plays the given {@linkcode MoveAnim} sequentially. + */ +export class MoveAnimPhase extends Phase { + constructor( + protected anim: Anim, + protected onSubstitute: boolean = false, + ) { + super(); + } + + public override start(): void { + super.start(); + + this.anim.play(this.onSubstitute, () => this.end()); + } +} diff --git a/src/phases/move-charge-phase.ts b/src/phases/move-charge-phase.ts index b0925f1f6cb..6eccdd20254 100644 --- a/src/phases/move-charge-phase.ts +++ b/src/phases/move-charge-phase.ts @@ -44,10 +44,9 @@ export class MoveChargePhase extends PokemonPhase { new MoveChargeAnim(move.chargeAnim, move.id, user).play(false, () => { move.showChargeText(user, target); - applyMoveChargeAttrs(MoveEffectAttr, user, target, move).then(() => { - user.addTag(BattlerTagType.CHARGING, 1, move.id, user.id); - this.end(); - }); + applyMoveChargeAttrs(MoveEffectAttr, user, target, move); + user.addTag(BattlerTagType.CHARGING, 1, move.id, user.id); + this.end(); }); } diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index 65d8d95cde6..f878cb40e2e 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -61,7 +61,7 @@ import { PokemonMultiHitModifier, } from "#app/modifier/modifier"; import { PokemonPhase } from "#app/phases/pokemon-phase"; -import { BooleanHolder, executeIf, isNullOrUndefined, NumberHolder } from "#app/utils"; +import { BooleanHolder, isNullOrUndefined, NumberHolder } from "#app/utils"; import { type nil } from "#app/utils"; import { BattlerTagType } from "#enums/battler-tag-type"; import type { Moves } from "#enums/moves"; @@ -143,86 +143,86 @@ export class MoveEffectPhase extends PokemonPhase { const move = this.move.getMove(); // Assume single target for override - applyMoveAttrs(OverrideMoveEffectAttr, user, this.getFirstTarget() ?? null, move, overridden, this.move.virtual).then(() => { - // If other effects were overriden, stop this phase before they can be applied - if (overridden.value) { - return this.end(); + applyMoveAttrs(OverrideMoveEffectAttr, user, this.getFirstTarget() ?? null, move, overridden, this.move.virtual); + + // If other effects were overriden, stop this phase before they can be applied + if (overridden.value) { + return this.end(); + } + + user.lapseTags(BattlerTagLapseType.MOVE_EFFECT); + + // If the user is acting again (such as due to Instruct), reset hitsLeft/hitCount so that + // the move executes correctly (ensures all hits of a multi-hit are properly calculated) + if (user.turnData.hitsLeft === 0 && user.turnData.hitCount > 0 && user.turnData.extraTurns > 0) { + user.turnData.hitsLeft = -1; + user.turnData.hitCount = 0; + user.turnData.extraTurns--; + } + + /** + * If this phase is for the first hit of the invoked move, + * resolve the move's total hit count. This block combines the + * effects of the move itself, Parental Bond, and Multi-Lens to do so. + */ + if (user.turnData.hitsLeft === -1) { + const hitCount = new NumberHolder(1); + // Assume single target for multi hit + applyMoveAttrs(MultiHitAttr, user, this.getFirstTarget() ?? null, move, hitCount); + // If Parental Bond is applicable, add another hit + applyPreAttackAbAttrs(AddSecondStrikeAbAttr, user, null, move, false, hitCount, null); + // If Multi-Lens is applicable, add hits equal to the number of held Multi-Lenses + globalScene.applyModifiers(PokemonMultiHitModifier, user.isPlayer(), user, move.id, hitCount); + // Set the user's relevant turnData fields to reflect the final hit count + user.turnData.hitCount = hitCount.value; + user.turnData.hitsLeft = hitCount.value; + } + + /** + * Log to be entered into the user's move history once the move result is resolved. + * Note that `result` (a {@linkcode MoveResult}) logs whether the move was successfully + * used in the sense of "Does it have an effect on the user?". + */ + const moveHistoryEntry = { move: this.move.moveId, targets: this.targets, result: MoveResult.PENDING, virtual: this.move.virtual }; + + /** + * Stores results of hit checks of the invoked move against all targets, organized by battler index. + * @see {@linkcode hitCheck} + */ + const targetHitChecks = Object.fromEntries(targets.map(p => [ p.getBattlerIndex(), this.hitCheck(p) ])); + const hasActiveTargets = targets.some(t => t.isActive(true)); + + /** Check if the target is immune via ability to the attacking move, and NOT in semi invulnerable state */ + const isImmune = targets[0]?.hasAbilityWithAttr(TypeImmunityAbAttr) + && (targets[0]?.getAbility()?.getAttrs(TypeImmunityAbAttr)?.[0]?.getImmuneType() === user.getMoveType(move)) + && !targets[0]?.getTag(SemiInvulnerableTag); + + const mayBounce = move.hasFlag(MoveFlags.REFLECTABLE) && !this.reflected && targets.some(t => t.hasAbilityWithAttr(ReflectStatusMoveAbAttr) || !!t.getTag(BattlerTagType.MAGIC_COAT)); + + /** + * If no targets are left for the move to hit (FAIL), or the invoked move is non-reflectable, single-target + * (and not random target) and failed the hit check against its target (MISS), log the move + * as FAILed or MISSed (depending on the conditions above) and end this phase. + */ + if (!hasActiveTargets || (!mayBounce && !move.hasAttr(VariableTargetAttr) && !move.isMultiTarget() && !targetHitChecks[this.targets[0]] && !targets[0].getTag(ProtectedTag) && !isImmune)) { + this.stopMultiHit(); + if (hasActiveTargets) { + globalScene.queueMessage(i18next.t("battle:attackMissed", { pokemonNameWithAffix: this.getFirstTarget() ? getPokemonNameWithAffix(this.getFirstTarget()!) : "" })); + moveHistoryEntry.result = MoveResult.MISS; + applyMoveAttrs(MissEffectAttr, user, null, this.move.getMove()); + } else { + globalScene.queueMessage(i18next.t("battle:attackFailed")); + moveHistoryEntry.result = MoveResult.FAIL; } + user.pushMoveHistory(moveHistoryEntry); + return this.end(); + } - user.lapseTags(BattlerTagLapseType.MOVE_EFFECT); - - // If the user is acting again (such as due to Instruct), reset hitsLeft/hitCount so that - // the move executes correctly (ensures all hits of a multi-hit are properly calculated) - if (user.turnData.hitsLeft === 0 && user.turnData.hitCount > 0 && user.turnData.extraTurns > 0) { - user.turnData.hitsLeft = -1; - user.turnData.hitCount = 0; - user.turnData.extraTurns--; - } - - /** - * If this phase is for the first hit of the invoked move, - * resolve the move's total hit count. This block combines the - * effects of the move itself, Parental Bond, and Multi-Lens to do so. - */ - if (user.turnData.hitsLeft === -1) { - const hitCount = new NumberHolder(1); - // Assume single target for multi hit - applyMoveAttrs(MultiHitAttr, user, this.getFirstTarget() ?? null, move, hitCount); - // If Parental Bond is applicable, add another hit - applyPreAttackAbAttrs(AddSecondStrikeAbAttr, user, null, move, false, hitCount, null); - // If Multi-Lens is applicable, add hits equal to the number of held Multi-Lenses - globalScene.applyModifiers(PokemonMultiHitModifier, user.isPlayer(), user, move.id, hitCount); - // Set the user's relevant turnData fields to reflect the final hit count - user.turnData.hitCount = hitCount.value; - user.turnData.hitsLeft = hitCount.value; - } - - /** - * Log to be entered into the user's move history once the move result is resolved. - * Note that `result` (a {@linkcode MoveResult}) logs whether the move was successfully - * used in the sense of "Does it have an effect on the user?". - */ - const moveHistoryEntry = { move: this.move.moveId, targets: this.targets, result: MoveResult.PENDING, virtual: this.move.virtual }; - - /** - * Stores results of hit checks of the invoked move against all targets, organized by battler index. - * @see {@linkcode hitCheck} - */ - const targetHitChecks = Object.fromEntries(targets.map(p => [ p.getBattlerIndex(), this.hitCheck(p) ])); - const hasActiveTargets = targets.some(t => t.isActive(true)); - - /** Check if the target is immune via ability to the attacking move, and NOT in semi invulnerable state */ - const isImmune = targets[0]?.hasAbilityWithAttr(TypeImmunityAbAttr) - && (targets[0]?.getAbility()?.getAttrs(TypeImmunityAbAttr)?.[0]?.getImmuneType() === user.getMoveType(move)) - && !targets[0]?.getTag(SemiInvulnerableTag); - - const mayBounce = move.hasFlag(MoveFlags.REFLECTABLE) && !this.reflected && targets.some(t => t.hasAbilityWithAttr(ReflectStatusMoveAbAttr) || !!t.getTag(BattlerTagType.MAGIC_COAT)); - - /** - * If no targets are left for the move to hit (FAIL), or the invoked move is non-reflectable, single-target - * (and not random target) and failed the hit check against its target (MISS), log the move - * as FAILed or MISSed (depending on the conditions above) and end this phase. - */ - if (!hasActiveTargets || (!mayBounce && !move.hasAttr(VariableTargetAttr) && !move.isMultiTarget() && !targetHitChecks[this.targets[0]] && !targets[0].getTag(ProtectedTag) && !isImmune)) { - this.stopMultiHit(); - if (hasActiveTargets) { - globalScene.queueMessage(i18next.t("battle:attackMissed", { pokemonNameWithAffix: this.getFirstTarget() ? getPokemonNameWithAffix(this.getFirstTarget()!) : "" })); - moveHistoryEntry.result = MoveResult.MISS; - applyMoveAttrs(MissEffectAttr, user, null, this.move.getMove()); - } else { - globalScene.queueMessage(i18next.t("battle:attackFailed")); - moveHistoryEntry.result = MoveResult.FAIL; - } - user.pushMoveHistory(moveHistoryEntry); - return this.end(); - } - - /** All move effect attributes are chained together in this array to be applied asynchronously. */ - const applyAttrs: Promise[] = []; - - const playOnEmptyField = globalScene.currentBattle?.mysteryEncounter?.hasBattleAnimationsWithoutTargets ?? false; - // Move animation only needs one target - new MoveAnim(move.id as Moves, user, this.getFirstTarget()!.getBattlerIndex(), playOnEmptyField).play(move.hitsSubstitute(user, this.getFirstTarget()!), () => { + const playOnEmptyField = globalScene.currentBattle?.mysteryEncounter?.hasBattleAnimationsWithoutTargets ?? false; + // Move animation only needs one target + new MoveAnim(move.id as Moves, user, this.getFirstTarget()!.getBattlerIndex(), playOnEmptyField).play( + move.hitsSubstitute(user, this.getFirstTarget()!), + () => { /** Has the move successfully hit a target (for damage) yet? */ let hasHit: boolean = false; @@ -313,7 +313,7 @@ export class MoveEffectPhase extends PokemonPhase { } /** Does this phase represent the invoked move's first strike? */ - const firstHit = (user.turnData.hitsLeft === user.turnData.hitCount); + const firstHit = user.turnData.hitsLeft === user.turnData.hitCount; // Only log the move's result on the first strike if (firstHit) { @@ -363,7 +363,7 @@ export class MoveEffectPhase extends PokemonPhase { } /** Does this phase represent the invoked move's last strike? */ - const lastHit = (user.turnData.hitsLeft === 1 || !this.getFirstTarget()?.isActive()); + const lastHit = user.turnData.hitsLeft === 1 || !this.getFirstTarget()?.isActive(); /** * If the user can change forms by using the invoked move, @@ -381,43 +381,29 @@ export class MoveEffectPhase extends PokemonPhase { } } - /** - * Create a Promise that applies *all* effects from the invoked move's MoveEffectAttrs. - * These are ordered by trigger type (see {@linkcode MoveEffectTrigger}), and each trigger - * type requires different conditions to be met with respect to the move's hit result. - */ - const k = new Promise((resolve) => { - //Start promise chain and apply PRE_APPLY move attributes - let promiseChain: Promise = applyFilteredMoveAttrs((attr: MoveAttr) => - attr instanceof MoveEffectAttr - && attr.trigger === MoveEffectTrigger.PRE_APPLY - && (!attr.firstHitOnly || firstHit) - && (!attr.lastHitOnly || lastHit) - && hitResult !== HitResult.NO_EFFECT, user, target, move); + applyFilteredMoveAttrs( + (attr: MoveAttr) => + attr instanceof MoveEffectAttr && + attr.trigger === MoveEffectTrigger.PRE_APPLY && + (!attr.firstHitOnly || firstHit) && + (!attr.lastHitOnly || lastHit) && + hitResult !== HitResult.NO_EFFECT, + user, + target, + move, + ); - /** Don't complete if the move failed */ - if (hitResult === HitResult.FAIL) { - return resolve(); - } - - /** Apply Move/Ability Effects in correct order */ - promiseChain = promiseChain - .then(this.applySelfTargetEffects(user, target, firstHit, lastHit)); + if (hitResult !== HitResult.FAIL) { + this.applySelfTargetEffects(user, target, firstHit, lastHit); if (hitResult !== HitResult.NO_EFFECT) { - promiseChain - .then(this.applyPostApplyEffects(user, target, firstHit, lastHit)) - .then(this.applyHeldItemFlinchCheck(user, target, dealsDamage)) - .then(this.applySuccessfulAttackEffects(user, target, firstHit, lastHit, !!isProtected, hitResult, firstTarget)) - .then(() => resolve()); + this.applyPostApplyEffects(user, target, firstHit, lastHit); + this.applyHeldItemFlinchCheck(user, target, dealsDamage); + this.applySuccessfulAttackEffects(user, target, firstHit, lastHit, !!isProtected, hitResult, firstTarget); } else { - promiseChain - .then(() => applyMoveAttrs(NoEffectAttr, user, null, move)) - .then(resolve); + applyMoveAttrs(NoEffectAttr, user, null, move); } - }); - - applyAttrs.push(k); + } } // Apply queued phases @@ -425,41 +411,35 @@ export class MoveEffectPhase extends PokemonPhase { globalScene.appendToPhase(queuedPhases, MoveEndPhase); } // Apply the move's POST_TARGET effects on the move's last hit, after all targeted effects have resolved - const postTarget = (user.turnData.hitsLeft === 1 || !this.getFirstTarget()?.isActive()) ? - applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && attr.trigger === MoveEffectTrigger.POST_TARGET, user, null, move) : - null; - - if (postTarget) { - if (applyAttrs.length) { // If there is a pending asynchronous move effect, do this after - applyAttrs[applyAttrs.length - 1].then(() => postTarget); - } else { // Otherwise, push a new asynchronous move effect - applyAttrs.push(postTarget); - } + if (user.turnData.hitsLeft === 1 || !this.getFirstTarget()?.isActive()) { + applyFilteredMoveAttrs( + (attr: MoveAttr) => attr instanceof MoveEffectAttr && attr.trigger === MoveEffectTrigger.POST_TARGET, + user, + null, + move, + ); } - // Wait for all move effects to finish applying, then end this phase - Promise.allSettled(applyAttrs).then(() => { - /** - * Remove the target's substitute (if it exists and has expired) - * after all targeted effects have applied. - * This prevents blocked effects from applying until after this hit resolves. - */ - targets.forEach(target => { - const substitute = target.getTag(SubstituteTag); - if (substitute && substitute.hp <= 0) { - target.lapseTag(BattlerTagType.SUBSTITUTE); - } - }); - - const moveType = user.getMoveType(move, true); - if (move.category !== MoveCategory.STATUS && !user.stellarTypesBoosted.includes(moveType)) { - user.stellarTypesBoosted.push(moveType); + /** + * Remove the target's substitute (if it exists and has expired) + * after all targeted effects have applied. + * This prevents blocked effects from applying until after this hit resolves. + */ + targets.forEach((target) => { + const substitute = target.getTag(SubstituteTag); + if (substitute && substitute.hp <= 0) { + target.lapseTag(BattlerTagType.SUBSTITUTE); } - - this.end(); }); - }); - }); + + const moveType = user.getMoveType(move, true); + if (move.category !== MoveCategory.STATUS && !user.stellarTypesBoosted.includes(moveType)) { + user.stellarTypesBoosted.push(moveType); + } + + this.end(); + }, + ); } public override end(): void { @@ -500,8 +480,8 @@ export class MoveEffectPhase extends PokemonPhase { * @param lastHit - `true` if this is the last hit in a multi-hit attack * @returns a function intended to be passed into a `then()` call. */ - protected applySelfTargetEffects(user: Pokemon, target: Pokemon, firstHit: boolean, lastHit: boolean): () => Promise { - return () => applyFilteredMoveAttrs((attr: MoveAttr) => + protected applySelfTargetEffects(user: Pokemon, target: Pokemon, firstHit: boolean, lastHit: boolean): void { + applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && attr.trigger === MoveEffectTrigger.POST_APPLY && attr.selfTarget @@ -518,8 +498,8 @@ export class MoveEffectPhase extends PokemonPhase { * @param lastHit - `true` if this is the last hit in a multi-hit attack * @returns a function intended to be passed into a `then()` call. */ - protected applyPostApplyEffects(user: Pokemon, target: Pokemon, firstHit: boolean, lastHit: boolean): () => Promise { - return () => applyFilteredMoveAttrs((attr: MoveAttr) => + protected applyPostApplyEffects(user: Pokemon, target: Pokemon, firstHit: boolean, lastHit: boolean): void { + applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && attr.trigger === MoveEffectTrigger.POST_APPLY && !attr.selfTarget @@ -537,8 +517,8 @@ export class MoveEffectPhase extends PokemonPhase { * @param firstTarget - `true` if {@linkcode target} is the first target hit by this strike of {@linkcode move} * @returns a function intended to be passed into a `then()` call. */ - protected applyOnHitEffects(user: Pokemon, target: Pokemon, firstHit : boolean, lastHit: boolean, firstTarget: boolean): Promise { - return applyFilteredMoveAttrs((attr: MoveAttr) => + protected applyOnHitEffects(user: Pokemon, target: Pokemon, firstHit : boolean, lastHit: boolean, firstTarget: boolean): void { + applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && attr.trigger === MoveEffectTrigger.HIT && (!attr.firstHitOnly || firstHit) @@ -554,21 +534,18 @@ export class MoveEffectPhase extends PokemonPhase { * @param hitResult - The {@linkcode HitResult} of the attempted move * @returns a `Promise` intended to be passed into a `then()` call. */ - protected applyOnGetHitAbEffects(user: Pokemon, target: Pokemon, hitResult: HitResult): Promise { - return executeIf(!target.isFainted() || target.canApplyAbility(), () => - applyPostDefendAbAttrs(PostDefendAbAttr, target, user, this.move.getMove(), hitResult) - .then(() => { + protected applyOnGetHitAbEffects(user: Pokemon, target: Pokemon, hitResult: HitResult): void { + if (!target.isFainted() || target.canApplyAbility()) { + applyPostDefendAbAttrs(PostDefendAbAttr, target, user, this.move.getMove(), hitResult); - if (!this.move.getMove().hitsSubstitute(user, target)) { - if (!user.isPlayer() && this.move.getMove() instanceof AttackMove) { - globalScene.applyShuffledModifiers(EnemyAttackStatusEffectChanceModifier, false, target); - } + if (!this.move.getMove().hitsSubstitute(user, target)) { + if (!user.isPlayer() && this.move.getMove() instanceof AttackMove) { + globalScene.applyShuffledModifiers(EnemyAttackStatusEffectChanceModifier, false, target); + } - target.lapseTags(BattlerTagLapseType.AFTER_HIT); - } - - }) - ); + target.lapseTags(BattlerTagLapseType.AFTER_HIT); + } + } } /** @@ -583,17 +560,15 @@ export class MoveEffectPhase extends PokemonPhase { * @param firstTarget - `true` if {@linkcode target} is the first target hit by this strike of {@linkcode move} * @returns a function intended to be passed into a `then()` call. */ - protected applySuccessfulAttackEffects(user: Pokemon, target: Pokemon, firstHit : boolean, lastHit: boolean, isProtected : boolean, hitResult: HitResult, firstTarget: boolean) : () => Promise { - return () => executeIf(!isProtected, () => - this.applyOnHitEffects(user, target, firstHit, lastHit, firstTarget).then(() => - this.applyOnGetHitAbEffects(user, target, hitResult)).then(() => - applyPostAttackAbAttrs(PostAttackAbAttr, user, target, this.move.getMove(), hitResult)).then(() => { // Item Stealing Effects - - if (this.move.getMove() instanceof AttackMove) { - globalScene.applyModifiers(ContactHeldItemTransferChanceModifier, this.player, user, target); - } - }) - ); + protected applySuccessfulAttackEffects(user: Pokemon, target: Pokemon, firstHit: boolean, lastHit: boolean, isProtected: boolean, hitResult: HitResult, firstTarget: boolean): void { + if (!isProtected) { + this.applyOnHitEffects(user, target, firstHit, lastHit, firstTarget); + this.applyOnGetHitAbEffects(user, target, hitResult); + applyPostAttackAbAttrs(PostAttackAbAttr, user, target, this.move.getMove(), hitResult); + if (this.move.getMove() instanceof AttackMove) { + globalScene.applyModifiers(ContactHeldItemTransferChanceModifier, this.player, user, target); + } + } } /** @@ -603,20 +578,18 @@ export class MoveEffectPhase extends PokemonPhase { * @param dealsDamage - `true` if the attempted move successfully dealt damage * @returns a function intended to be passed into a `then()` call. */ - protected applyHeldItemFlinchCheck(user: Pokemon, target: Pokemon, dealsDamage: boolean) : () => void { - return () => { - if (this.move.getMove().hasAttr(FlinchAttr)) { - return; - } + protected applyHeldItemFlinchCheck(user: Pokemon, target: Pokemon, dealsDamage: boolean) : void { + if (this.move.getMove().hasAttr(FlinchAttr)) { + return; + } - if (dealsDamage && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && !this.move.getMove().hitsSubstitute(user, target)) { - const flinched = new BooleanHolder(false); - globalScene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched); - if (flinched.value) { - target.addTag(BattlerTagType.FLINCHED, undefined, this.move.moveId, user.id); - } + if (dealsDamage && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && !this.move.getMove().hitsSubstitute(user, target)) { + const flinched = new BooleanHolder(false); + globalScene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched); + if (flinched.value) { + target.addTag(BattlerTagType.FLINCHED, undefined, this.move.moveId, user.id); } - }; + } } /** diff --git a/src/phases/move-header-phase.ts b/src/phases/move-header-phase.ts index 6a982646b50..5b89548b663 100644 --- a/src/phases/move-header-phase.ts +++ b/src/phases/move-header-phase.ts @@ -22,9 +22,8 @@ export class MoveHeaderPhase extends BattlePhase { super.start(); if (this.canMove()) { - applyMoveAttrs(MoveHeaderAttr, this.pokemon, null, this.move.getMove()).then(() => this.end()); - } else { - this.end(); + applyMoveAttrs(MoveHeaderAttr, this.pokemon, null, this.move.getMove()); } + this.end(); } } diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 73468dc1690..d58c052812f 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -9,7 +9,7 @@ import { PokemonTypeChangeAbAttr, PostMoveUsedAbAttr, RedirectMoveAbAttr, - ReduceStatusEffectDurationAbAttr + ReduceStatusEffectDurationAbAttr, } from "#app/data/ability"; import type { DelayedAttackTag } from "#app/data/arena-tag"; import { CommonAnim } from "#app/data/battle-anims"; @@ -24,7 +24,8 @@ import { frenzyMissFunc, HealStatusEffectAttr, MoveFlags, - PreMoveMessageAttr + PreMoveMessageAttr, + PreUseInterruptAttr, } from "#app/data/move"; import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms"; import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect"; @@ -42,7 +43,7 @@ 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 { ShowAbilityPhase } from "#app/phases/show-ability-phase"; -import { BooleanHolder, NumberHolder } from "#app/utils"; +import { NumberHolder } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type"; @@ -56,6 +57,7 @@ export class MovePhase extends BattlePhase { protected _targets: BattlerIndex[]; protected followUp: boolean; protected ignorePp: boolean; + protected forcedLast: boolean; protected failed: boolean = false; protected cancelled: boolean = false; protected reflected: boolean = false; @@ -90,7 +92,8 @@ export class MovePhase extends BattlePhase { * @param reflected Indicates that the move was reflected by Magic Coat or Magic Bounce. * Reflected moves cannot be reflected again and will not trigger Dancer. */ - constructor(pokemon: Pokemon, targets: BattlerIndex[], move: PokemonMove, followUp: boolean = false, ignorePp: boolean = false, reflected: boolean = false) { + + constructor(pokemon: Pokemon, targets: BattlerIndex[], move: PokemonMove, followUp: boolean = false, ignorePp: boolean = false, reflected: boolean = false, forcedLast: boolean = false) { super(); this.pokemon = pokemon; @@ -99,6 +102,7 @@ export class MovePhase extends BattlePhase { this.followUp = followUp; this.ignorePp = ignorePp; this.reflected = reflected; + this.forcedLast = forcedLast; } /** @@ -120,6 +124,15 @@ export class MovePhase extends BattlePhase { this.cancelled = true; } + /** + * Shows whether the current move has been forced to the end of the turn + * Needed for speed order, see {@linkcode Moves.QUASH} + * */ + public isForcedLast(): boolean { + return this.forcedLast; + } + + public start(): void { super.start(); @@ -281,7 +294,18 @@ export class MovePhase extends BattlePhase { } } - this.showMoveText(); + let success: boolean = 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(); + } if (moveQueue.length > 0) { // Using .shift here clears out two turn moves once they've been used @@ -317,11 +341,14 @@ export class MovePhase extends BattlePhase { * Move conditions assume the move has a single target * TODO: is this sustainable? */ - const passesConditions = move.applyConditions(this.pokemon, targets[0], move); - const failedDueToWeather: boolean = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move); - const failedDueToTerrain: boolean = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move); + let failedDueToTerrain: boolean = false; + if (success) { + const passesConditions = move.applyConditions(this.pokemon, targets[0], move); + const failedDueToWeather: boolean = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move); + failedDueToTerrain = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move); + success = passesConditions && !failedDueToWeather && !failedDueToTerrain; + } - const success = passesConditions && !failedDueToWeather && !failedDueToTerrain; // Update the battle's "last move" pointer, unless we're currently mimicking a move. if (!allMoves[this.move.moveId].hasAttr(CopyMoveAttr)) { @@ -348,9 +375,8 @@ export class MovePhase extends BattlePhase { this.pokemon.pushMoveHistory({ move: this.move.moveId, targets: this.targets, result: MoveResult.FAIL, virtual: this.move.virtual }); + const failureMessage = move.getFailedText(this.pokemon, targets[0], move); let failedText: string | undefined; - const failureMessage = move.getFailedText(this.pokemon, targets[0], move, new BooleanHolder(false)); - if (failureMessage) { failedText = failureMessage; } else if (failedDueToTerrain) { @@ -386,7 +412,7 @@ export class MovePhase extends BattlePhase { } else { this.pokemon.pushMoveHistory({ move: this.move.moveId, targets: this.targets, result: MoveResult.FAIL, virtual: this.move.virtual }); - const failureMessage = move.getFailedText(this.pokemon, targets[0], move, new BooleanHolder(false)); + const failureMessage = move.getFailedText(this.pokemon, targets[0], move); this.showMoveText(); this.showFailedText(failureMessage ?? undefined); @@ -554,7 +580,7 @@ export class MovePhase extends BattlePhase { applyMoveAttrs(PreMoveMessageAttr, this.pokemon, this.pokemon.getOpponents()[0], this.move.getMove()); } - public showFailedText(failedText?: string): void { - globalScene.queueMessage(failedText ?? i18next.t("battle:attackFailed")); + public showFailedText(failedText: string = i18next.t("battle:attackFailed")): void { + globalScene.queueMessage(failedText); } } diff --git a/src/phases/pokemon-transform-phase.ts b/src/phases/pokemon-transform-phase.ts new file mode 100644 index 00000000000..d67f758b1fd --- /dev/null +++ b/src/phases/pokemon-transform-phase.ts @@ -0,0 +1,77 @@ +import type { BattlerIndex } from "#app/battle"; +import { BattlerTagType } from "#enums/battler-tag-type"; +import { Moves } from "#enums/moves"; +import { EFFECTIVE_STATS, BATTLE_STATS } from "#enums/stat"; +import { PokemonMove } from "#app/field/pokemon"; +import { globalScene } from "#app/global-scene"; +import { PokemonPhase } from "./pokemon-phase"; + +/** + * Transforms a Pokemon into another Pokemon on the field. + * Used for Transform (move) and Imposter (ability) + */ +export class PokemonTransformPhase extends PokemonPhase { + protected targetIndex: BattlerIndex; + private playSound: boolean; + + constructor(userIndex: BattlerIndex, targetIndex: BattlerIndex, playSound: boolean = false) { + super(userIndex); + + this.targetIndex = targetIndex; + this.playSound = playSound; + } + + public override start(): void { + const user = this.getPokemon(); + const target = globalScene.getField(true).find((p) => p.getBattlerIndex() === this.targetIndex); + + if (!target) { + return this.end(); + } + + user.summonData.speciesForm = target.getSpeciesForm(); + user.summonData.ability = target.getAbility().id; + user.summonData.gender = target.getGender(); + + // Power Trick's effect is removed after using Transform + user.removeTag(BattlerTagType.POWER_TRICK); + + // Copy all stats (except HP) + for (const s of EFFECTIVE_STATS) { + user.setStat(s, target.getStat(s, false), false); + } + + // Copy all stat stages + for (const s of BATTLE_STATS) { + user.setStatStage(s, target.getStatStage(s)); + } + + user.summonData.moveset = target.getMoveset().map((m) => { + if (m) { + // If PP value is less than 5, do nothing. If greater, we need to reduce the value to 5. + return new PokemonMove(m.moveId, 0, 0, false, Math.min(m.getMove().pp, 5)); + } else { + console.warn(`Transform: somehow iterating over a ${m} value when copying moveset!`); + return new PokemonMove(Moves.NONE); + } + }); + user.summonData.types = target.getTypes(); + + const promises = [ user.updateInfo() ]; + + if (this.playSound) { + globalScene.playSound("battle_anims/PRSFX- Transform"); + } + + promises.push( + user.loadAssets(false).then(() => { + user.playAnim(); + user.updateInfo(); + // If the new ability activates immediately, it needs to happen after all the transform animations + user.setTempAbility(target.getAbility()); + }), + ); + + Promise.allSettled(promises).then(() => this.end()); + } +} diff --git a/src/phases/post-summon-phase.ts b/src/phases/post-summon-phase.ts index d76708b7050..b92d79501d4 100644 --- a/src/phases/post-summon-phase.ts +++ b/src/phases/post-summon-phase.ts @@ -27,12 +27,10 @@ export class PostSummonPhase extends PokemonPhase { pokemon.lapseTag(BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON); } - applyPostSummonAbAttrs(PostSummonAbAttr, pokemon) - .then(() => { - const field = pokemon.isPlayer() ? globalScene.getPlayerField() : globalScene.getEnemyField(); - field.forEach((p) => applyAbAttrs(CommanderAbAttr, p, null, false)); + applyPostSummonAbAttrs(PostSummonAbAttr, pokemon); + const field = pokemon.isPlayer() ? globalScene.getPlayerField() : globalScene.getEnemyField(); + field.forEach((p) => applyAbAttrs(CommanderAbAttr, p, null, false)); - this.end(); - }); + this.end(); } } diff --git a/src/phases/quiet-form-change-phase.ts b/src/phases/quiet-form-change-phase.ts index 6cd1129d318..81a39f53a76 100644 --- a/src/phases/quiet-form-change-phase.ts +++ b/src/phases/quiet-form-change-phase.ts @@ -11,7 +11,7 @@ import { getPokemonNameWithAffix } from "#app/messages"; import { BattlePhase } from "./battle-phase"; import { MovePhase } from "./move-phase"; import { PokemonHealPhase } from "./pokemon-heal-phase"; -import { applyAbAttrs, PostTeraFormChangeStatChangeAbAttr } from "#app/data/ability"; +import { applyAbAttrs, ClearTerrainAbAttr, ClearWeatherAbAttr, PostTeraFormChangeStatChangeAbAttr } from "#app/data/ability"; export class QuietFormChangePhase extends BattlePhase { protected pokemon: Pokemon; @@ -148,6 +148,8 @@ export class QuietFormChangePhase extends BattlePhase { } if (this.formChange.trigger instanceof SpeciesFormChangeTeraTrigger) { applyAbAttrs(PostTeraFormChangeStatChangeAbAttr, this.pokemon, null); + applyAbAttrs(ClearWeatherAbAttr, this.pokemon, null); + applyAbAttrs(ClearTerrainAbAttr, this.pokemon, null); } super.end(); diff --git a/src/phases/revival-blessing-phase.ts b/src/phases/revival-blessing-phase.ts new file mode 100644 index 00000000000..a063e325a31 --- /dev/null +++ b/src/phases/revival-blessing-phase.ts @@ -0,0 +1,61 @@ +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 { Mode } from "#app/ui/ui"; +import i18next from "i18next"; +import * as Utils from "#app/utils"; +import { BattlePhase } from "#app/phases/battle-phase"; +import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; +import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase"; +import type { PlayerPokemon } from "#app/field/pokemon"; + +/** + * Sets the Party UI and handles the effect of Revival Blessing + * when used by one of the player's Pokemon. + */ +export class RevivalBlessingPhase extends BattlePhase { + constructor(protected user: PlayerPokemon) { + super(); + } + + public override start(): void { + globalScene.ui.setMode( + Mode.PARTY, + PartyUiMode.REVIVAL_BLESSING, + this.user.getFieldIndex(), + (slotIndex: integer, option: PartyOption) => { + if (slotIndex >= 0 && slotIndex < 6) { + const pokemon = globalScene.getPlayerParty()[slotIndex]; + if (!pokemon || !pokemon.isFainted()) { + return this.end(); + } + + pokemon.resetTurnData(); + pokemon.resetStatus(); + pokemon.heal(Math.min(Utils.toDmgValue(0.5 * pokemon.getMaxHp()), pokemon.getMaxHp())); + globalScene.queueMessage(i18next.t("moveTriggers:revivalBlessing", { pokemonName: pokemon.name }), 0, true); + + if (globalScene.currentBattle.double && globalScene.getPlayerParty().length > 1) { + const allyPokemon = this.user.getAlly(); + if (slotIndex <= 1) { + // Revived ally pokemon + globalScene.unshiftPhase( + new SwitchSummonPhase(SwitchType.SWITCH, pokemon.getFieldIndex(), slotIndex, false, true), + ); + globalScene.unshiftPhase(new ToggleDoublePositionPhase(true)); + } else if (allyPokemon.isFainted()) { + // Revived party pokemon, and ally pokemon is fainted + globalScene.unshiftPhase( + new SwitchSummonPhase(SwitchType.SWITCH, allyPokemon.getFieldIndex(), slotIndex, false, true), + ); + globalScene.unshiftPhase(new ToggleDoublePositionPhase(true)); + } + } + } + globalScene.ui.setMode(Mode.MESSAGE).then(() => this.end()); + }, + PartyUiHandler.FilterFainted, + ); + } +} diff --git a/src/phases/ribbon-modifier-reward-phase.ts b/src/phases/ribbon-modifier-reward-phase.ts index 8cf15ba8f2c..72a8f4bf37c 100644 --- a/src/phases/ribbon-modifier-reward-phase.ts +++ b/src/phases/ribbon-modifier-reward-phase.ts @@ -17,17 +17,16 @@ export class RibbonModifierRewardPhase extends ModifierRewardPhase { doReward(): Promise { return new Promise(resolve => { const newModifier = this.modifierType.newModifier(); - globalScene.addModifier(newModifier).then(() => { - globalScene.playSound("level_up_fanfare"); - globalScene.ui.setMode(Mode.MESSAGE); - globalScene.ui.showText(i18next.t("battle:beatModeFirstTime", { - speciesName: this.species.name, - gameMode: globalScene.gameMode.getName(), - newModifier: newModifier?.type.name - }), null, () => { - resolve(); - }, null, true, 1500); - }); + globalScene.addModifier(newModifier); + globalScene.playSound("level_up_fanfare"); + globalScene.ui.setMode(Mode.MESSAGE); + globalScene.ui.showText(i18next.t("battle:beatModeFirstTime", { + speciesName: this.species.name, + gameMode: globalScene.gameMode.getName(), + newModifier: newModifier?.type.name, + }), null, () => { + resolve(); + }, null, true, 1500); }); } } diff --git a/src/phases/select-modifier-phase.ts b/src/phases/select-modifier-phase.ts index a3a2fa1aa24..36f18a8d64d 100644 --- a/src/phases/select-modifier-phase.ts +++ b/src/phases/select-modifier-phase.ts @@ -171,30 +171,21 @@ export class SelectModifierPhase extends BattlePhase { } if (cost && !(modifier.type instanceof RememberMoveModifierType)) { - result.then(success => { - if (success) { - if (!Overrides.WAIVE_ROLL_FEE_OVERRIDE) { - globalScene.money -= cost; - globalScene.updateMoneyText(); - globalScene.animateMoneyChanged(false); - } - globalScene.playSound("se/buy"); - (globalScene.ui.getHandler() as ModifierSelectUiHandler).updateCostText(); - } else { - globalScene.ui.playError(); + if (result) { + if (!Overrides.WAIVE_ROLL_FEE_OVERRIDE) { + globalScene.money -= cost; + globalScene.updateMoneyText(); + globalScene.animateMoneyChanged(false); } - }); - } else { - const doEnd = () => { - globalScene.ui.clearText(); - globalScene.ui.setMode(Mode.MESSAGE); - super.end(); - }; - if (result instanceof Promise) { - result.then(() => doEnd()); + globalScene.playSound("se/buy"); + (globalScene.ui.getHandler() as ModifierSelectUiHandler).updateCostText(); } else { - doEnd(); + globalScene.ui.playError(); } + } else { + globalScene.ui.clearText(); + globalScene.ui.setMode(Mode.MESSAGE); + super.end(); } }; @@ -304,7 +295,7 @@ export class SelectModifierPhase extends BattlePhase { ); } - addModifier(modifier: Modifier): Promise { + addModifier(modifier: Modifier): boolean { return globalScene.addModifier(modifier, false, true); } } diff --git a/src/phases/select-starter-phase.ts b/src/phases/select-starter-phase.ts index 79012901a3a..b7ad15533a6 100644 --- a/src/phases/select-starter-phase.ts +++ b/src/phases/select-starter-phase.ts @@ -12,6 +12,7 @@ import type { Starter } from "#app/ui/starter-select-ui-handler"; import { Mode } from "#app/ui/ui"; import type { Species } from "#enums/species"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; +import * as Utils from "../utils"; export class SelectStarterPhase extends Phase { @@ -79,6 +80,12 @@ export class SelectStarterPhase extends Phase { starterPokemon.nickname = starter.nickname; } + if (!Utils.isNullOrUndefined(starter.teraType)) { + starterPokemon.teraType = starter.teraType; + } else { + starterPokemon.teraType = starterPokemon.species.type1; + } + if (globalScene.gameMode.isSplicedOnly || Overrides.STARTER_FUSION_OVERRIDE) { starterPokemon.generateFusionSpecies(true); } diff --git a/src/phases/tera-phase.ts b/src/phases/tera-phase.ts index f4b72d39192..462a4e1882e 100644 --- a/src/phases/tera-phase.ts +++ b/src/phases/tera-phase.ts @@ -20,9 +20,7 @@ export class TeraPhase extends BattlePhase { start() { super.start(); - console.log(this.pokemon.name, "terastallized to", Type[this.pokemon.teraType].toString()); - - globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.teraType]}`) })); + globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.getTeraType()]}`) })); new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => { this.end(); }); @@ -41,7 +39,7 @@ export class TeraPhase extends BattlePhase { if (this.pokemon.isPlayer()) { globalScene.validateAchv(achvs.TERASTALLIZE); - if (this.pokemon.teraType === Type.STELLAR) { + if (this.pokemon.getTeraType() === Type.STELLAR) { globalScene.validateAchv(achvs.STELLAR_TERASTALLIZE); } } diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 0d486da1998..a560897037e 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -21,6 +21,7 @@ import { SelectChallengePhase } from "./select-challenge-phase"; import { SelectStarterPhase } from "./select-starter-phase"; import { SummonPhase } from "./summon-phase"; import { globalScene } from "#app/global-scene"; +import Overrides from "#app/overrides"; export class TitlePhase extends Phase { @@ -256,7 +257,11 @@ export class TitlePhase extends Phase { console.error("Failed to load daily run:\n", err); }); } else { - generateDaily(btoa(new Date().toISOString().substring(0, 10))); + let seed: string = btoa(new Date().toISOString().substring(0, 10)); + if (!Utils.isNullOrUndefined(Overrides.DAILY_RUN_SEED_OVERRIDE)) { + seed = Overrides.DAILY_RUN_SEED_OVERRIDE; + } + generateDaily(seed); } }); } diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 63d79d47fba..57e25325ba4 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -55,6 +55,8 @@ import { MysteryEncounterSaveData } from "#app/data/mystery-encounters/mystery-e 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 { Type } from "#enums/type"; export const defaultStarterSpecies: Species[] = [ Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, @@ -229,6 +231,7 @@ export interface StarterAttributes { shiny?: boolean; favorite?: boolean; nickname?: string; + tera?: Type; } export interface StarterPreferences { @@ -1627,11 +1630,29 @@ export class GameData { const caughtAttr = dexEntry.caughtAttr; const formIndex = pokemon.formIndex; const dexAttr = pokemon.getDexAttr(); - pokemon.formIndex = formIndex; // Mark as caught dexEntry.caughtAttr |= dexAttr; + // If the caught form is a battleform, we want to also mark the base form as caught. + // This snippet assumes that the base form has formIndex equal to 0, which should be + // always true except for the case of Urshifu. + const formKey = pokemon.getFormKey(); + if (formIndex > 0) { + if (pokemon.species.speciesId === Species.URSHIFU) { + if (formIndex === 2) { + dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(0); + } else if (formIndex === 3) { + dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(1); + } + } + const allFormChanges = pokemonFormChanges.hasOwnProperty(species.speciesId) ? pokemonFormChanges[species.speciesId] : []; + const toCurrentFormChanges = allFormChanges.filter(f => (f.formKey === formKey)); + if (toCurrentFormChanges.length > 0) { + dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(0); + } + } + // Unlock ability if (speciesStarterCosts.hasOwnProperty(species.speciesId)) { this.starterData[species.speciesId].abilityAttr |= pokemon.abilityIndex !== 1 || pokemon.species.ability2 diff --git a/src/system/settings/settings-gamepad.ts b/src/system/settings/settings-gamepad.ts index d26c0c9f019..840304ab1ba 100644 --- a/src/system/settings/settings-gamepad.ts +++ b/src/system/settings/settings-gamepad.ts @@ -21,7 +21,7 @@ export enum SettingGamepad { Button_Cycle_Gender = "BUTTON_CYCLE_GENDER", Button_Cycle_Ability = "BUTTON_CYCLE_ABILITY", Button_Cycle_Nature = "BUTTON_CYCLE_NATURE", - Button_Cycle_Variant = "BUTTON_CYCLE_VARIANT", + Button_Cycle_Tera = "BUTTON_CYCLE_TERA", Button_Speed_Up = "BUTTON_SPEED_UP", Button_Slow_Down = "BUTTON_SLOW_DOWN", Button_Submit = "BUTTON_SUBMIT", @@ -45,7 +45,7 @@ export const settingGamepadOptions = { [SettingGamepad.Button_Cycle_Gender]: [ `KEY ${Button.CYCLE_GENDER.toString()}`, pressAction ], [SettingGamepad.Button_Cycle_Ability]: [ `KEY ${Button.CYCLE_ABILITY.toString()}`, pressAction ], [SettingGamepad.Button_Cycle_Nature]: [ `KEY ${Button.CYCLE_NATURE.toString()}`, pressAction ], - [SettingGamepad.Button_Cycle_Variant]: [ `KEY ${Button.V.toString()}`, pressAction ], + [SettingGamepad.Button_Cycle_Tera]: [ `KEY ${Button.CYCLE_TERA.toString()}`, pressAction ], [SettingGamepad.Button_Speed_Up]: [ `KEY ${Button.SPEED_UP.toString()}`, pressAction ], [SettingGamepad.Button_Slow_Down]: [ `KEY ${Button.SLOW_DOWN.toString()}`, pressAction ], [SettingGamepad.Button_Submit]: [ `KEY ${Button.SUBMIT.toString()}`, pressAction ], @@ -67,7 +67,7 @@ export const settingGamepadDefaults = { [SettingGamepad.Button_Cycle_Gender]: 0, [SettingGamepad.Button_Cycle_Ability]: 0, [SettingGamepad.Button_Cycle_Nature]: 0, - [SettingGamepad.Button_Cycle_Variant]: 0, + [SettingGamepad.Button_Cycle_Tera]: 0, [SettingGamepad.Button_Speed_Up]: 0, [SettingGamepad.Button_Slow_Down]: 0, [SettingGamepad.Button_Submit]: 0, @@ -96,7 +96,7 @@ export function setSettingGamepad(setting: SettingGamepad, value: number): boole case SettingGamepad.Button_Cycle_Gender: case SettingGamepad.Button_Cycle_Ability: case SettingGamepad.Button_Cycle_Nature: - case SettingGamepad.Button_Cycle_Variant: + case SettingGamepad.Button_Cycle_Tera: case SettingGamepad.Button_Speed_Up: case SettingGamepad.Button_Slow_Down: case SettingGamepad.Button_Submit: diff --git a/src/system/settings/settings-keyboard.ts b/src/system/settings/settings-keyboard.ts index 95ad4ba41f1..1a7db1b10c2 100644 --- a/src/system/settings/settings-keyboard.ts +++ b/src/system/settings/settings-keyboard.ts @@ -32,8 +32,8 @@ export enum SettingKeyboard { Alt_Button_Cycle_Ability = "ALT_BUTTON_CYCLE_ABILITY", Button_Cycle_Nature = "BUTTON_CYCLE_NATURE", Alt_Button_Cycle_Nature = "ALT_BUTTON_CYCLE_NATURE", - Button_Cycle_Variant = "BUTTON_CYCLE_VARIANT", - Alt_Button_Cycle_Variant = "ALT_BUTTON_CYCLE_VARIANT", + Button_Cycle_Tera = "BUTTON_CYCLE_TERA", + Alt_Button_Cycle_Tera = "ALT_BUTTON_CYCLE_TERA", Button_Speed_Up = "BUTTON_SPEED_UP", Alt_Button_Speed_Up = "ALT_BUTTON_SPEED_UP", Button_Slow_Down = "BUTTON_SLOW_DOWN", @@ -73,8 +73,8 @@ export const settingKeyboardOptions = { [SettingKeyboard.Alt_Button_Cycle_Ability]: [ `KEY ${Button.CYCLE_ABILITY.toString()}`, pressAction ], [SettingKeyboard.Button_Cycle_Nature]: [ `KEY ${Button.CYCLE_NATURE.toString()}`, pressAction ], [SettingKeyboard.Alt_Button_Cycle_Nature]: [ `KEY ${Button.CYCLE_NATURE.toString()}`, pressAction ], - [SettingKeyboard.Button_Cycle_Variant]: [ `KEY ${Button.V.toString()}`, pressAction ], - [SettingKeyboard.Alt_Button_Cycle_Variant]: [ `KEY ${Button.V.toString()}`, pressAction ], + [SettingKeyboard.Button_Cycle_Tera]: [ `KEY ${Button.CYCLE_TERA.toString()}`, pressAction ], + [SettingKeyboard.Alt_Button_Cycle_Tera]: [ `KEY ${Button.CYCLE_TERA.toString()}`, pressAction ], [SettingKeyboard.Button_Speed_Up]: [ `KEY ${Button.SPEED_UP.toString()}`, pressAction ], [SettingKeyboard.Alt_Button_Speed_Up]: [ `KEY ${Button.SPEED_UP.toString()}`, pressAction ], [SettingKeyboard.Button_Slow_Down]: [ `KEY ${Button.SLOW_DOWN.toString()}`, pressAction ], @@ -112,8 +112,8 @@ export const settingKeyboardDefaults = { [SettingKeyboard.Alt_Button_Cycle_Ability]: 0, [SettingKeyboard.Button_Cycle_Nature]: 0, [SettingKeyboard.Alt_Button_Cycle_Nature]: 0, - [SettingKeyboard.Button_Cycle_Variant]: 0, - [SettingKeyboard.Alt_Button_Cycle_Variant]: 0, + [SettingKeyboard.Button_Cycle_Tera]: 0, + [SettingKeyboard.Alt_Button_Cycle_Tera]: 0, [SettingKeyboard.Button_Speed_Up]: 0, [SettingKeyboard.Alt_Button_Speed_Up]: 0, [SettingKeyboard.Button_Slow_Down]: 0, @@ -148,7 +148,7 @@ export function setSettingKeyboard(setting: SettingKeyboard, value: number): boo case SettingKeyboard.Button_Cycle_Gender: case SettingKeyboard.Button_Cycle_Ability: case SettingKeyboard.Button_Cycle_Nature: - case SettingKeyboard.Button_Cycle_Variant: + case SettingKeyboard.Button_Cycle_Tera: case SettingKeyboard.Button_Speed_Up: case SettingKeyboard.Button_Slow_Down: case SettingKeyboard.Alt_Button_Up: @@ -164,7 +164,7 @@ export function setSettingKeyboard(setting: SettingKeyboard, value: number): boo case SettingKeyboard.Alt_Button_Cycle_Gender: case SettingKeyboard.Alt_Button_Cycle_Ability: case SettingKeyboard.Alt_Button_Cycle_Nature: - case SettingKeyboard.Alt_Button_Cycle_Variant: + case SettingKeyboard.Alt_Button_Cycle_Tera: case SettingKeyboard.Alt_Button_Speed_Up: case SettingKeyboard.Alt_Button_Slow_Down: case SettingKeyboard.Alt_Button_Submit: diff --git a/src/ui-inputs.ts b/src/ui-inputs.ts index e6a0ed7a69c..951aec2a3b6 100644 --- a/src/ui-inputs.ts +++ b/src/ui-inputs.ts @@ -86,7 +86,7 @@ export class UiInputs { [Button.CYCLE_GENDER]: () => this.buttonCycleOption(Button.CYCLE_GENDER), [Button.CYCLE_ABILITY]: () => this.buttonCycleOption(Button.CYCLE_ABILITY), [Button.CYCLE_NATURE]: () => this.buttonCycleOption(Button.CYCLE_NATURE), - [Button.V]: () => this.buttonCycleOption(Button.V), + [Button.CYCLE_TERA]: () => this.buttonCycleOption(Button.CYCLE_TERA), [Button.SPEED_UP]: () => this.buttonSpeedChange(), [Button.SLOW_DOWN]: () => this.buttonSpeedChange(false), }; @@ -109,7 +109,7 @@ export class UiInputs { [Button.CYCLE_GENDER]: () => undefined, [Button.CYCLE_ABILITY]: () => undefined, [Button.CYCLE_NATURE]: () => undefined, - [Button.V]: () => this.buttonInfo(false), + [Button.CYCLE_TERA]: () => undefined, [Button.SPEED_UP]: () => undefined, [Button.SLOW_DOWN]: () => undefined, }; @@ -197,7 +197,7 @@ export class UiInputs { const uiHandler = globalScene.ui?.getHandler(); if (whitelist.some(handler => uiHandler instanceof handler)) { globalScene.ui.processInput(button); - } else if (button === Button.V) { + } else if (button === Button.CYCLE_TERA) { this.buttonInfo(true); } } diff --git a/src/ui/abstact-option-select-ui-handler.ts b/src/ui/abstact-option-select-ui-handler.ts index 10dbedd7b2f..07e43a344dd 100644 --- a/src/ui/abstact-option-select-ui-handler.ts +++ b/src/ui/abstact-option-select-ui-handler.ts @@ -35,6 +35,7 @@ const scrollDownLabel = "↓"; export default abstract class AbstractOptionSelectUiHandler extends UiHandler { protected optionSelectContainer: Phaser.GameObjects.Container; + protected optionSelectTextContainer: Phaser.GameObjects.Container; protected optionSelectBg: Phaser.GameObjects.NineSlice; protected optionSelectText: BBCodeText; protected optionSelectIcons: Phaser.GameObjects.Sprite[]; @@ -53,6 +54,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { protected unskippedIndices: number[] = []; protected defaultTextStyle: TextStyle = TextStyle.WINDOW; + protected textContent: string; constructor(mode: Mode | null) { @@ -78,6 +80,9 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { this.optionSelectBg.setOrigin(1, 1); this.optionSelectContainer.add(this.optionSelectBg); + this.optionSelectTextContainer = globalScene.add.container(0, 0); + this.optionSelectContainer.add(this.optionSelectTextContainer); + this.optionSelectIcons = []; this.scale = getTextStyleOptions(TextStyle.WINDOW, globalScene.uiTheme).scale; @@ -123,19 +128,18 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { ); this.optionSelectText.setOrigin(0, 0); this.optionSelectText.setName("text-option-select"); - this.optionSelectContainer.add(this.optionSelectText); + this.optionSelectTextContainer.add(this.optionSelectText); this.optionSelectContainer.setPosition((globalScene.game.canvas.width / 6) - 1 - (this.config?.xOffset || 0), -48 + (this.config?.yOffset || 0)); this.optionSelectBg.width = Math.max(this.optionSelectText.displayWidth + 24, this.getWindowWidth()); this.optionSelectBg.height = this.getWindowHeight(); - this.optionSelectText.setPosition(this.optionSelectBg.x - this.optionSelectBg.width + 12 + 24 * this.scale, this.optionSelectBg.y - this.optionSelectBg.height + 2 + 42 * this.scale); + this.optionSelectTextContainer.setPosition(this.optionSelectBg.x - this.optionSelectBg.width + 12 + 24 * this.scale, this.optionSelectBg.y - this.optionSelectBg.height + 2 + 42 * this.scale); // Now that the container and background widths are established, we can set up the proper text restricted to visible options - this.optionSelectText.setText(optionsWithScroll.map(o => o.item + this.textContent = optionsWithScroll.map(o => o.item ? `[shadow=${getTextColor(o.style ?? this.defaultTextStyle, true, globalScene.uiTheme)}][color=${getTextColor(o.style ?? TextStyle.WINDOW, false, globalScene.uiTheme)}] ${o.label}[/color][/shadow]` : `[shadow=${getTextColor(o.style ?? this.defaultTextStyle, true, globalScene.uiTheme)}][color=${getTextColor(o.style ?? TextStyle.WINDOW, false, globalScene.uiTheme)}]${o.label}[/color][/shadow]` - ).join("\n") - - ); + ).join("\n"); + this.optionSelectText.setText(this.textContent); options.forEach((option: OptionSelectItem, i: number) => { if (option.item) { @@ -184,7 +188,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { if (this.config.delay) { this.blockInput = true; - this.optionSelectText.setAlpha(0.5); + this.optionSelectTextContainer.setAlpha(0.5); this.cursorObj?.setAlpha(0.8); globalScene.time.delayedCall(Utils.fixedInt(this.config.delay), () => this.unblockInput()); } @@ -278,7 +282,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { } this.blockInput = false; - this.optionSelectText.setAlpha(1); + this.optionSelectTextContainer.setAlpha(1); this.cursorObj?.setAlpha(1); } diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index 75970a5908b..b9da9320fcb 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -1,6 +1,7 @@ import { globalScene } from "#app/global-scene"; import type Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; +import i18next from "i18next"; export default class PartyExpBar extends Phaser.GameObjects.Container { private bg: Phaser.GameObjects.NineSlice; @@ -43,9 +44,9 @@ export default class PartyExpBar extends Phaser.GameObjects.Container { // if we want to only display the level in the small frame if (showOnlyLevelUp) { if (newLevel > 200) { // if the level is greater than 200, we only display Lv. UP - this.expText.setText("Lv. UP"); + this.expText.setText(i18next.t("battleScene:levelUp")); } else { // otherwise we display Lv. Up and the new level - this.expText.setText(`Lv. UP: ${newLevel.toString()}`); + this.expText.setText(i18next.t("battleScene:levelUpWithLevel", { level: newLevel })); } } else { // if we want to display the exp diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index 8b5a5bd12f1..99b25c3c383 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -16,7 +16,7 @@ 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 { allSpecies, getPokemonSpeciesForm, normalForm } from "#app/data/pokemon-species"; +import { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, normalForm } from "#app/data/pokemon-species"; import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; import { starterPassiveAbilities } from "#app/data/balance/passives"; import { Type } from "#enums/type"; @@ -45,7 +45,6 @@ import { EggSourceType } from "#enums/egg-source-types"; import { getPassiveCandyCount, getValueReductionCandyCounts, getSameSpeciesEggCandyCounts } from "#app/data/balance/starters"; import { BooleanHolder, getLocalizedSpriteKey, isNullOrUndefined, NumberHolder, padInt, rgbHexToRgba, toReadableString } from "#app/utils"; import type { Nature } from "#enums/nature"; -import BgmBar from "./bgm-bar"; import * as Utils from "../utils"; import { speciesTmMoves } from "#app/data/balance/tms"; import type { BiomeTierTod } from "#app/data/balance/biomes"; @@ -165,7 +164,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler { private pokemonFormText: Phaser.GameObjects.Text; private pokemonHatchedIcon : Phaser.GameObjects.Sprite; private pokemonHatchedCountText: Phaser.GameObjects.Text; - private pokemonShinyIcon: Phaser.GameObjects.Sprite; + private pokemonShinyIcons: Phaser.GameObjects.Sprite[]; private activeTooltip: "ABILITY" | "PASSIVE" | "CANDY" | undefined; private instructionsContainer: Phaser.GameObjects.Container; @@ -242,10 +241,14 @@ export default class PokedexPageUiHandler extends MessageUiHandler { private menuContainer: Phaser.GameObjects.Container; private menuBg: Phaser.GameObjects.NineSlice; protected optionSelectText: Phaser.GameObjects.Text; - public bgmBar: BgmBar; private menuOptions: MenuOptions[]; protected scale: number = 0.1666666667; private menuDescriptions: string[]; + private isFormGender: boolean; + private filteredIndices: Species[] | null = null; + + private availableVariants: number; + private unlockedVariants: boolean[]; constructor() { super(Mode.POKEDEX_PAGE); @@ -383,10 +386,16 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.pokemonHatchedIcon.setScale(0.8); this.pokemonCaughtHatchedContainer.add(this.pokemonHatchedIcon); - this.pokemonShinyIcon = globalScene.add.sprite(14, 117, "shiny_icons"); - this.pokemonShinyIcon.setOrigin(0.15, 0.2); - this.pokemonShinyIcon.setScale(1); - this.pokemonCaughtHatchedContainer.add(this.pokemonShinyIcon); + this.pokemonShinyIcons = []; + for (let i = 0; i < 3; i++) { + const pokemonShinyIcon = globalScene.add.sprite(153 + i * 13, 160, "shiny_icons"); + pokemonShinyIcon.setOrigin(0.15, 0.2); + pokemonShinyIcon.setScale(1); + pokemonShinyIcon.setFrame(getVariantIcon(i as Variant)); + pokemonShinyIcon.setVisible(false); + this.pokemonCaughtHatchedContainer.add(pokemonShinyIcon); + this.pokemonShinyIcons.push(pokemonShinyIcon); + } this.pokemonHatchedCountText = addTextObject(24, 19, "0", TextStyle.SUMMARY_ALT); this.pokemonHatchedCountText.setOrigin(0, 0); @@ -480,10 +489,6 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.menuContainer.setName("menu"); this.menuContainer.setInteractive(new Phaser.Geom.Rectangle(0, 0, globalScene.game.canvas.width / 6, globalScene.game.canvas.height / 6), Phaser.Geom.Rectangle.Contains); - this.bgmBar = new BgmBar(); - this.bgmBar.setup(); - ui.bgmBar = this.bgmBar; - this.menuContainer.add(this.bgmBar); this.menuContainer.setVisible(false); this.menuOptions = Utils.getEnumKeys(MenuOptions).map(m => parseInt(MenuOptions[m]) as MenuOptions); @@ -557,6 +562,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.species = args[0]; this.formIndex = args[1] ?? 0; this.savedStarterAttributes = args[2] ?? { shiny:false, female:true, variant:0, form:0 }; + this.filteredIndices = args[3] ?? null; this.starterSetup(); } @@ -628,6 +634,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.tmMoves = speciesTmMoves[species.speciesId]?.filter(m => Array.isArray(m) ? (m[0] === formKey ? true : false ) : true) .map(m => Array.isArray(m) ? m[1] : m).sort((a, b) => allMoves[a].name > allMoves[b].name ? 1 : -1) ?? []; + this.isFormGender = formKey === "male" || formKey === "female"; + const passiveId = starterPassiveAbilities.hasOwnProperty(species.speciesId) ? species.speciesId : starterPassiveAbilities.hasOwnProperty(this.starterId) ? this.starterId : pokemonPrevolutions[this.starterId]; const passives = starterPassiveAbilities[passiveId]; @@ -678,6 +686,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler { ) ); } + + this.availableVariants = species.getFullUnlocksData() & DexAttr.VARIANT_3 ? 3 : 1; } // Function to ensure that forms appear in the appropriate biome and tod @@ -801,17 +811,17 @@ export default class PokedexPageUiHandler extends MessageUiHandler { starterAttributes.variant = 0; } - const unlockedVariants = [ - hasShiny && caughtAttr & DexAttr.DEFAULT_VARIANT, - hasShiny && caughtAttr & DexAttr.VARIANT_2, - hasShiny && caughtAttr & DexAttr.VARIANT_3 + this.unlockedVariants = [ + !!(hasShiny && caughtAttr & DexAttr.DEFAULT_VARIANT), + !!(hasShiny && caughtAttr & DexAttr.VARIANT_2), + !!(hasShiny && caughtAttr & DexAttr.VARIANT_3) ]; if (starterAttributes.variant === undefined || isNaN(starterAttributes.variant) || starterAttributes.variant < 0) { starterAttributes.variant = 0; - } else if (!unlockedVariants[starterAttributes.variant]) { + } else if (!this.unlockedVariants[starterAttributes.variant]) { let highestValidIndex = -1; - for (let i = 0; i <= starterAttributes.variant && i < unlockedVariants.length; i++) { - if (unlockedVariants[i] !== 0n) { + for (let i = 0; i <= starterAttributes.variant && i < this.unlockedVariants.length; i++) { + if (this.unlockedVariants[i]) { highestValidIndex = i; } } @@ -983,13 +993,23 @@ export default class PokedexPageUiHandler extends MessageUiHandler { ui.setModeWithoutClear(Mode.OPTION_SELECT, { options: this.levelMoves.map(m => { + const levelNumber = m[0] > 0 ? String(m[0]) : ""; const option: OptionSelectItem = { - label: String(m[0]).padEnd(4, " ") + allMoves[m[1]].name, + label: levelNumber.padEnd(4, " ") + allMoves[m[1]].name, handler: () => { return false; }, onHover: () => { this.moveInfoOverlay.show(allMoves[m[1]]); + if (m[0] === 0) { + this.showText(i18next.t("pokedexUiHandler:onlyEvolutionMove")); + } else if (m[0] === -1) { + this.showText(i18next.t("pokedexUiHandler:onlyRecallMove")); + } else if (m[0] <= 5) { + this.showText(i18next.t("pokedexUiHandler:onStarterSelectMove")); + } else { + this.showText(i18next.t("pokedexUiHandler:byLevelUpMove")); + } }, }; return option; @@ -1432,7 +1452,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.savedStarterAttributes.form = newFormIndex; this.moveInfoOverlay.clear(); this.clearText(); - ui.setMode(Mode.POKEDEX_PAGE, newSpecies, newFormIndex, this.savedStarterAttributes); + ui.setMode(Mode.POKEDEX_PAGE, newSpecies, newFormIndex, this.savedStarterAttributes, this.filteredIndices); return true; }, onHover: () => this.showText(conditionText) @@ -1526,11 +1546,6 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.setSpeciesDetails(this.species, { shiny: true, variant: newVariant }); globalScene.playSound("se/sparkle"); - // Set the variant label to the shiny tint - const tint = getVariantTint(newVariant); - this.pokemonShinyIcon.setFrame(getVariantIcon(newVariant)); - this.pokemonShinyIcon.setTint(tint); - this.pokemonShinyIcon.setVisible(true); starterAttributes.shiny = true; this.savedStarterAttributes.shiny = starterAttributes.shiny; @@ -1557,14 +1572,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.savedStarterAttributes.variant = starterAttributes.variant; if (newVariant > props.variant) { this.setSpeciesDetails(this.species, { variant: newVariant as Variant }); - // Cycle tint based on current sprite tint - const tint = getVariantTint(newVariant as Variant); - this.pokemonShinyIcon.setFrame(getVariantIcon(newVariant as Variant)); - this.pokemonShinyIcon.setTint(tint); success = true; } else { this.setSpeciesDetails(this.species, { shiny: false, variant: 0 }); - this.pokemonShinyIcon.setVisible(false); success = true; starterAttributes.shiny = false; @@ -1586,8 +1596,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler { starterAttributes.form = newFormIndex; // store the selected form this.savedStarterAttributes.form = starterAttributes.form; this.formIndex = newFormIndex; + // Some forms are tied to the gender and should change accordingly + let newFemale = props.female; + if (this.isFormGender) { + newFemale = !props.female; + } + starterAttributes.female = newFemale; + this.savedStarterAttributes.female = starterAttributes.female; this.starterSetup(); - this.setSpeciesDetails(this.species, { formIndex: newFormIndex }); + this.setSpeciesDetails(this.species, { formIndex: newFormIndex, female: newFemale }); success = this.setCursor(this.cursor); } break; @@ -1595,7 +1612,16 @@ export default class PokedexPageUiHandler extends MessageUiHandler { if (this.canCycleGender) { starterAttributes.female = !props.female; this.savedStarterAttributes.female = starterAttributes.female; - this.setSpeciesDetails(this.species, { female: !props.female }); + let newFormIndex = this.formIndex; + // Some forms are tied to the gender and should change accordingly + if (this.isFormGender) { + newFormIndex = this.formIndex === 0 ? 1 : 0; + } + starterAttributes.form = newFormIndex; // store the selected form + this.savedStarterAttributes.form = starterAttributes.form; + this.formIndex = newFormIndex; + this.starterSetup(); + this.setSpeciesDetails(this.species, { female: !props.female, formIndex: newFormIndex }); success = true; } break; @@ -1747,31 +1773,45 @@ export default class PokedexPageUiHandler extends MessageUiHandler { case Button.LEFT: this.blockInput = true; ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => { - const index = allSpecies.findIndex(species => species.speciesId === this.species.speciesId); - const newIndex = index <= 0 ? allSpecies.length - 1 : index - 1; - const newSpecies = allSpecies[newIndex]; + let newSpecies: PokemonSpecies; + if (this.filteredIndices) { + const index = this.filteredIndices.findIndex(id => id === this.species.speciesId); + const newIndex = index <= 0 ? this.filteredIndices.length - 1 : index - 1; + newSpecies = getPokemonSpecies(this.filteredIndices[newIndex]); + } else { + const index = allSpecies.findIndex(species => species.speciesId === this.species.speciesId); + const newIndex = index <= 0 ? allSpecies.length - 1 : index - 1; + newSpecies = allSpecies[newIndex]; + } const matchingForm = newSpecies?.forms.find(form => form.formKey === this.species?.forms[this.formIndex]?.formKey); const newFormIndex = matchingForm ? matchingForm.formIndex : 0; this.starterAttributes.form = newFormIndex; this.savedStarterAttributes.form = newFormIndex; this.moveInfoOverlay.clear(); this.clearText(); - ui.setModeForceTransition(Mode.POKEDEX_PAGE, newSpecies, newFormIndex, this.savedStarterAttributes); + ui.setModeForceTransition(Mode.POKEDEX_PAGE, newSpecies, newFormIndex, this.savedStarterAttributes, this.filteredIndices); }); this.blockInput = false; break; case Button.RIGHT: ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => { - const index = allSpecies.findIndex(species => species.speciesId === this.species.speciesId); - const newIndex = index >= allSpecies.length - 1 ? 0 : index + 1; - const newSpecies = allSpecies[newIndex]; + let newSpecies: PokemonSpecies; + if (this.filteredIndices) { + const index = this.filteredIndices.findIndex(id => id === this.species.speciesId); + const newIndex = index >= this.filteredIndices.length - 1 ? 0 : index + 1; + newSpecies = getPokemonSpecies(this.filteredIndices[newIndex]); + } else { + const index = allSpecies.findIndex(species => species.speciesId === this.species.speciesId); + const newIndex = index >= allSpecies.length - 1 ? 0 : index + 1; + newSpecies = allSpecies[newIndex]; + } const matchingForm = newSpecies?.forms.find(form => form.formKey === this.species?.forms[this.formIndex]?.formKey); const newFormIndex = matchingForm ? matchingForm.formIndex : 0; this.starterAttributes.form = newFormIndex; this.savedStarterAttributes.form = newFormIndex; this.moveInfoOverlay.clear(); this.clearText(); - ui.setModeForceTransition(Mode.POKEDEX_PAGE, newSpecies, newFormIndex, this.savedStarterAttributes); + ui.setModeForceTransition(Mode.POKEDEX_PAGE, newSpecies, newFormIndex, this.savedStarterAttributes, this.filteredIndices); }); break; } @@ -2001,7 +2041,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.type2Icon.setVisible(true); this.pokemonLuckLabelText.setVisible(false); this.pokemonLuckText.setVisible(false); - this.pokemonShinyIcon.setVisible(false); + for (const icon of this.pokemonShinyIcons) { + icon.setVisible(false); + } this.pokemonUncaughtText.setVisible(true); this.pokemonCaughtHatchedContainer.setVisible(true); this.pokemonCandyContainer.setVisible(false); @@ -2027,7 +2069,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.type2Icon.setVisible(false); this.pokemonLuckLabelText.setVisible(false); this.pokemonLuckText.setVisible(false); - this.pokemonShinyIcon.setVisible(false); + for (const icon of this.pokemonShinyIcons) { + icon.setVisible(false); + } this.pokemonUncaughtText.setVisible(!!species); this.pokemonCaughtHatchedContainer.setVisible(false); this.pokemonCandyContainer.setVisible(false); @@ -2228,21 +2272,33 @@ export default class PokedexPageUiHandler extends MessageUiHandler { const defaultDexAttr = this.getCurrentDexProps(species.speciesId); const defaultProps = globalScene.gameData.getSpeciesDexAttrProps(species, defaultDexAttr); - const variant = defaultProps.variant; - const tint = getVariantTint(variant); - this.pokemonShinyIcon.setFrame(getVariantIcon(variant)); - this.pokemonShinyIcon.setTint(tint); - this.pokemonShinyIcon.setVisible(defaultProps.shiny); - this.pokemonCaughtHatchedContainer.setVisible(true); + const variant = defaultProps.variant; + for (let v = 0; v < 3; v++) { + const icon = this.pokemonShinyIcons[v]; + if (v < this.availableVariants) { + if (!this.unlockedVariants[v]) { + icon.setTint(0x000000); + } else if (shiny && v === variant) { + const tint = getVariantTint(v as Variant); + icon.setTint(tint); + } else { + icon.setTint(0x808080); + } + icon.setVisible(true); + } else { + icon.setVisible(false); + } + } + + this.pokemonCaughtHatchedContainer.setVisible(true); this.pokemonCaughtHatchedContainer.setY(25); this.pokemonCandyIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[0]))); this.pokemonCandyOverlayIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[1]))); - this.pokemonCandyCountText.setText(`x${globalScene.gameData.starterData[this.starterId].candyCount}`); + this.pokemonCandyCountText.setText(`x${species.speciesId === Species.PIKACHU ? 0 : globalScene.gameData.starterData[this.starterId].candyCount}`); this.pokemonCandyContainer.setVisible(true); if (pokemonPrevolutions.hasOwnProperty(species.speciesId)) { - this.pokemonShinyIcon.setFrame(getVariantIcon(variant)); this.pokemonHatchedIcon.setVisible(false); this.pokemonHatchedCountText.setVisible(false); this.pokemonFormText.setY(36); @@ -2269,7 +2325,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.pokemonUncaughtText.setVisible(true); this.pokemonCaughtHatchedContainer.setVisible(false); this.pokemonCandyContainer.setVisible(false); - this.pokemonShinyIcon.setVisible(false); + for (const icon of this.pokemonShinyIcons) { + icon.setVisible(false); + } } // Setting type icons and form text diff --git a/src/ui/pokedex-ui-handler.ts b/src/ui/pokedex-ui-handler.ts index 5180d7bd956..82208a5899d 100644 --- a/src/ui/pokedex-ui-handler.ts +++ b/src/ui/pokedex-ui-handler.ts @@ -215,6 +215,7 @@ export default class PokedexUiHandler extends MessageUiHandler { private showFormTrayIconElement: Phaser.GameObjects.Sprite; private showFormTrayLabel: Phaser.GameObjects.Text; private canShowFormTray: boolean; + private filteredIndices: Species[]; constructor() { super(Mode.POKEDEX); @@ -919,7 +920,7 @@ export default class PokedexUiHandler extends MessageUiHandler { } else { error = true; } - } else if (button === Button.V) { + } else if (button === Button.CYCLE_TERA) { if (!this.filterTextMode && !this.showingTray) { this.cursorObj.setVisible(false); this.setSpecies(null); @@ -1037,7 +1038,7 @@ export default class PokedexUiHandler extends MessageUiHandler { } else if (this.showingTray) { if (button === Button.ACTION) { const formIndex = this.trayForms[this.trayCursor].formIndex; - ui.setOverlayMode(Mode.POKEDEX_PAGE, this.lastSpecies, formIndex, { form: formIndex }); + ui.setOverlayMode(Mode.POKEDEX_PAGE, this.lastSpecies, formIndex, { form: formIndex }, this.filteredIndices); success = true; } else { const numberOfForms = this.trayContainers.length; @@ -1084,7 +1085,7 @@ export default class PokedexUiHandler extends MessageUiHandler { } } else { if (button === Button.ACTION) { - ui.setOverlayMode(Mode.POKEDEX_PAGE, this.lastSpecies, 0); + ui.setOverlayMode(Mode.POKEDEX_PAGE, this.lastSpecies, 0, null, this.filteredIndices); success = true; } else { switch (button) { @@ -1170,9 +1171,6 @@ export default class PokedexUiHandler extends MessageUiHandler { case SettingKeyboard.Button_Cycle_Shiny: iconPath = "R.png"; break; - case SettingKeyboard.Button_Cycle_Variant: - iconPath = "V.png"; - break; case SettingKeyboard.Button_Cycle_Form: iconPath = "F.png"; break; @@ -1210,7 +1208,7 @@ export default class PokedexUiHandler extends MessageUiHandler { shiny: false, female: props.female, variant: 0, - formIndex: 0, + formIndex: props.formIndex, }; return sanitizedProps; } @@ -1537,8 +1535,8 @@ export default class PokedexUiHandler extends MessageUiHandler { case SortCriteria.COST: return (a.cost - b.cost) * -sort.dir; case SortCriteria.CANDY: - const candyCountA = globalScene.gameData.starterData[a.species.speciesId].candyCount; - const candyCountB = globalScene.gameData.starterData[b.species.speciesId].candyCount; + const candyCountA = globalScene.gameData.starterData[this.getStarterSpeciesId(a.species.speciesId)].candyCount; + const candyCountB = globalScene.gameData.starterData[this.getStarterSpeciesId(b.species.speciesId)].candyCount; return (candyCountA - candyCountB) * -sort.dir; case SortCriteria.IV: const avgIVsA = globalScene.gameData.dexData[a.species.speciesId].ivs.reduce((a, b) => a + b, 0) / globalScene.gameData.dexData[a.species.speciesId].ivs.length; @@ -1554,6 +1552,8 @@ export default class PokedexUiHandler extends MessageUiHandler { return 0; }); + this.filteredIndices = this.filteredPokemonContainers.map(c => c.species.speciesId); + this.updateScroll(); }; @@ -1909,7 +1909,7 @@ export default class PokedexUiHandler extends MessageUiHandler { const dexEntry = globalScene.gameData.dexData[species.speciesId]; const caughtAttr = dexEntry.caughtAttr & globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)].caughtAttr & species.getFullUnlocksData(); - if (!caughtAttr) { + if (caughtAttr) { const props = this.getSanitizedProps(globalScene.gameData.getSpeciesDexAttrProps(species, this.getCurrentDexProps(species.speciesId))); if (shiny === undefined) { diff --git a/src/ui/settings/move-touch-controls-handler.ts b/src/ui/settings/move-touch-controls-handler.ts index da7ac7f0514..48677122363 100644 --- a/src/ui/settings/move-touch-controls-handler.ts +++ b/src/ui/settings/move-touch-controls-handler.ts @@ -93,9 +93,9 @@ export default class MoveTouchControlsHandler { toolbar.innerHTML = `

-
${i18next.t("settings:reset")}
-
${i18next.t("settings:saveClose")}
-
${i18next.t("settings:cancel")}
+
${i18next.t("settings:touchReset")}
+
${i18next.t("settings:touchSaveClose")}
+
${i18next.t("settings:touchCancel")}
diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index b919679be00..80a2baf7f55 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -56,6 +56,8 @@ import { getPassiveCandyCount, getValueReductionCandyCounts, getSameSpeciesEggCa import { BooleanHolder, fixedInt, getLocalizedSpriteKey, isNullOrUndefined, NumberHolder, padInt, randIntRange, rgbHexToRgba, toReadableString } from "#app/utils"; import type { Nature } from "#enums/nature"; import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; +import { achvs } from "#app/system/achv"; +import * as Utils from "../utils"; export type StarterSelectCallback = (starters: Starter[]) => void; @@ -68,6 +70,7 @@ export interface Starter { moveset?: StarterMoveset; pokerus: boolean; nickname?: string; + teraType?: Type; } interface LanguageSetting { @@ -212,6 +215,7 @@ interface SpeciesDetails { abilityIndex?: number, natureIndex?: number, forSeen?: boolean, // default = false + teraType?: Type, } export default class StarterSelectUiHandler extends MessageUiHandler { @@ -262,6 +266,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private pokemonShinyIcon: Phaser.GameObjects.Sprite; private pokemonPassiveDisabledIcon: Phaser.GameObjects.Sprite; private pokemonPassiveLockedIcon: Phaser.GameObjects.Sprite; + private teraIcon: Phaser.GameObjects.Sprite; private activeTooltip: "ABILITY" | "PASSIVE" | "CANDY" | undefined; private instructionsContainer: Phaser.GameObjects.Container; @@ -271,12 +276,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private abilityIconElement: Phaser.GameObjects.Sprite; private genderIconElement: Phaser.GameObjects.Sprite; private natureIconElement: Phaser.GameObjects.Sprite; + private teraIconElement: Phaser.GameObjects.Sprite; private goFilterIconElement: Phaser.GameObjects.Sprite; private shinyLabel: Phaser.GameObjects.Text; private formLabel: Phaser.GameObjects.Text; private genderLabel: Phaser.GameObjects.Text; private abilityLabel: Phaser.GameObjects.Text; private natureLabel: Phaser.GameObjects.Text; + private teraLabel: Phaser.GameObjects.Text; private goFilterLabel: Phaser.GameObjects.Text; private starterSelectMessageBox: Phaser.GameObjects.NineSlice; @@ -292,6 +299,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private dexAttrCursor: bigint = 0n; private abilityCursor: number = -1; private natureCursor: number = -1; + private teraCursor: Type = Type.UNKNOWN; private filterBarCursor: number = 0; private starterMoveset: StarterMoveset | null; private scrollCursor: number; @@ -304,6 +312,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private starterAttr: bigint[] = []; private starterAbilityIndexes: number[] = []; private starterNatures: Nature[] = []; + private starterTeras: Type[] = []; private starterMovesets: StarterMoveset[] = []; private speciesStarterDexEntry: DexEntry | null; private speciesStarterMoves: Moves[]; @@ -312,6 +321,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private canCycleGender: boolean; private canCycleAbility: boolean; private canCycleNature: boolean; + private canCycleTera: boolean; private assetLoadCancelled: BooleanHolder | null; public cursorObj: Phaser.GameObjects.Image; @@ -823,6 +833,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.starterSelectContainer.add(this.pokemonEggMovesContainer); + this.teraIcon = globalScene.add.sprite(85, 63, "button_tera"); + this.teraIcon.setName("terrastallize-icon"); + this.teraIcon.setFrame("fire"); + this.starterSelectContainer.add(this.teraIcon); + // The font size should be set per language const instructionTextSize = textSettings.instructionTextSize; @@ -867,6 +882,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.natureLabel = addTextObject(this.instructionRowX + this.instructionRowTextOffset, this.instructionRowY, i18next.t("starterSelectUiHandler:cycleNature"), TextStyle.PARTY, { fontSize: instructionTextSize }); this.natureLabel.setName("text-nature-label"); + this.teraIconElement = new Phaser.GameObjects.Sprite(globalScene, this.instructionRowX, this.instructionRowY, "keyboard", "V.png"); + this.teraIconElement.setName("sprite-tera-icon-element"); + this.teraIconElement.setScale(0.675); + this.teraIconElement.setOrigin(0.0, 0.0); + this.teraLabel = addTextObject(this.instructionRowX + this.instructionRowTextOffset, this.instructionRowY, i18next.t("starterSelectUiHandler:cycleTera"), TextStyle.PARTY, { fontSize: instructionTextSize }); + this.teraLabel.setName("text-tera-label"); + this.goFilterIconElement = new Phaser.GameObjects.Sprite(globalScene, this.filterInstructionRowX, this.filterInstructionRowY, "keyboard", "C.png"); this.goFilterIconElement.setName("sprite-goFilter-icon-element"); this.goFilterIconElement.setScale(0.675); @@ -1497,6 +1519,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const props = globalScene.gameData.getSpeciesDexAttrProps(randomSpecies, dexAttr); const abilityIndex = this.abilityCursor; const nature = this.natureCursor as unknown as Nature; + const teraType = this.teraCursor; const moveset = this.starterMoveset?.slice(0) as StarterMoveset; const starterCost = globalScene.gameData.getSpeciesStarterValue(randomSpecies.speciesId); const speciesForm = getPokemonSpeciesForm(randomSpecies.speciesId, props.formIndex); @@ -1505,7 +1528,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { .loadAssets(props.female, props.formIndex, props.shiny, props.variant, true) .then(() => { if (this.tryUpdateValue(starterCost, true)) { - this.addToParty(randomSpecies, dexAttr, abilityIndex, nature, moveset, true); + this.addToParty(randomSpecies, dexAttr, abilityIndex, nature, moveset, teraType, true); ui.playSelect(); } }); @@ -1585,7 +1608,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const cursorObj = this.starterCursorObjs[this.starterSpecies.length]; cursorObj.setVisible(true); cursorObj.setPosition(this.cursorObj.x, this.cursorObj.y); - this.addToParty(this.lastSpecies, this.dexAttrCursor, this.abilityCursor, this.natureCursor as unknown as Nature, this.starterMoveset?.slice(0) as StarterMoveset); + this.addToParty(this.lastSpecies, this.dexAttrCursor, this.abilityCursor, this.natureCursor as unknown as Nature, this.starterMoveset?.slice(0) as StarterMoveset, this.teraCursor); ui.playSelect(); } else { ui.playError(); // this should be redundant as there is now a trigger for when a pokemon can't be added to party @@ -1961,15 +1984,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler { yOffset: 47 }); }; - if (!pokemonPrevolutions.hasOwnProperty(this.lastSpecies.speciesId)) { - options.push({ - label: i18next.t("starterSelectUiHandler:useCandies"), - handler: () => { - ui.setMode(Mode.STARTER_SELECT).then(() => showUseCandies()); - return true; - } - }); - } options.push({ label: i18next.t("menuUiHandler:POKEDEX"), handler: () => { @@ -1985,6 +1999,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return true; } }); + if (!pokemonPrevolutions.hasOwnProperty(this.lastSpecies.speciesId)) { + options.push({ + label: i18next.t("starterSelectUiHandler:useCandies"), + handler: () => { + ui.setMode(Mode.STARTER_SELECT).then(() => showUseCandies()); + return true; + } + }); + } options.push({ label: i18next.t("menu:cancel"), handler: () => { @@ -2066,7 +2089,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } } while (newFormIndex !== props.formIndex); starterAttributes.form = newFormIndex; // store the selected form - this.setSpeciesDetails(this.lastSpecies, { formIndex: newFormIndex }); + starterAttributes.tera = this.lastSpecies.forms[newFormIndex].type1; + this.setSpeciesDetails(this.lastSpecies, { formIndex: newFormIndex, teraType: starterAttributes.tera }); success = true; } break; @@ -2125,6 +2149,19 @@ export default class StarterSelectUiHandler extends MessageUiHandler { success = true; } break; + case Button.CYCLE_TERA: + if (this.canCycleTera) { + const speciesForm = getPokemonSpeciesForm(this.lastSpecies.speciesId, starterAttributes.form ?? 0); + if (speciesForm.type1 === this.teraCursor && !Utils.isNullOrUndefined(speciesForm.type2)) { + starterAttributes.tera = speciesForm.type2!; + this.setSpeciesDetails(this.lastSpecies, { teraType: speciesForm.type2! }); + } else { + starterAttributes.tera = speciesForm.type1; + this.setSpeciesDetails(this.lastSpecies, { teraType: speciesForm.type1 }); + } + success = true; + } + break; case Button.UP: if (!this.starterIconsCursorObj.visible) { if (currentRow > 0) { @@ -2289,7 +2326,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return [ isDupe, removeIndex ]; } - addToParty(species: PokemonSpecies, dexAttr: bigint, abilityIndex: number, nature: Nature, moveset: StarterMoveset, randomSelection: boolean = false) { + addToParty(species: PokemonSpecies, dexAttr: bigint, abilityIndex: number, nature: Nature, moveset: StarterMoveset, teraType: Type, randomSelection: boolean = false) { const props = globalScene.gameData.getSpeciesDexAttrProps(species, dexAttr); this.starterIcons[this.starterSpecies.length].setTexture(species.getIconAtlasKey(props.formIndex, props.shiny, props.variant)); this.starterIcons[this.starterSpecies.length].setFrame(species.getIconId(props.female, props.formIndex, props.shiny, props.variant)); @@ -2299,6 +2336,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.starterAttr.push(dexAttr); this.starterAbilityIndexes.push(abilityIndex); this.starterNatures.push(nature); + this.starterTeras.push(teraType); this.starterMovesets.push(moveset); if (this.speciesLoaded.get(species.speciesId) || randomSelection ) { getPokemonSpeciesForm(species.speciesId, props.formIndex).cry(); @@ -2379,6 +2417,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler { case SettingKeyboard.Button_Cycle_Nature: iconPath = "N.png"; break; + case SettingKeyboard.Button_Cycle_Tera: + iconPath = "V.png"; + break; case SettingKeyboard.Button_Stats: iconPath = "C.png"; break; @@ -2459,6 +2500,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler { if (this.canCycleNature) { this.updateButtonIcon(SettingKeyboard.Button_Cycle_Nature, gamepadType, this.natureIconElement, this.natureLabel); } + if (this.canCycleTera) { + this.updateButtonIcon(SettingKeyboard.Button_Cycle_Tera, gamepadType, this.teraIconElement, this.teraLabel); + } } // if filter mode is inactivated and gamepadType is not undefined, update the button icons @@ -2876,6 +2920,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.dexAttrCursor = species ? this.getCurrentDexProps(species.speciesId) : 0n; this.abilityCursor = species ? globalScene.gameData.getStarterSpeciesDefaultAbilityIndex(species) : 0; this.natureCursor = species ? globalScene.gameData.getSpeciesDefaultNature(species) : 0; + this.teraCursor = species ? species.type1 : Type.UNKNOWN; if (!species && globalScene.ui.getTooltip().visible) { globalScene.ui.hideTooltip(); @@ -2894,6 +2939,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler { // load default ability from stater save data, if set this.abilityCursor = starterAttributes.ability; } + if (starterAttributes?.tera) { + // load default tera from starter save data, if set + this.teraCursor = starterAttributes.tera; + } if (this.statsMode) { if (this.speciesStarterDexEntry?.caughtAttr) { @@ -3035,7 +3084,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { female: props.female, variant: props.variant, abilityIndex: this.starterAbilityIndexes[starterIndex], - natureIndex: this.starterNatures[starterIndex] + natureIndex: this.starterNatures[starterIndex], + teraType: this.starterTeras[starterIndex] }); } else { const defaultDexAttr = this.getCurrentDexProps(species.speciesId); @@ -3083,6 +3133,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonCaughtHatchedContainer.setVisible(false); this.pokemonCandyContainer.setVisible(false); this.pokemonFormText.setVisible(false); + this.teraIcon.setVisible(false); const defaultDexAttr = globalScene.gameData.getSpeciesDefaultDexAttr(species, true, true); const defaultAbilityIndex = globalScene.gameData.getStarterSpeciesDefaultAbilityIndex(species); @@ -3117,6 +3168,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonCaughtHatchedContainer.setVisible(false); this.pokemonCandyContainer.setVisible(false); this.pokemonFormText.setVisible(false); + this.teraIcon.setVisible(false); this.setSpeciesDetails(species!, { // TODO: is this bang correct? shiny: false, @@ -3131,7 +3183,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } setSpeciesDetails(species: PokemonSpecies, options: SpeciesDetails = {}): void { - let { shiny, formIndex, female, variant, abilityIndex, natureIndex } = options; + let { shiny, formIndex, female, variant, abilityIndex, natureIndex, teraType } = options; const forSeen: boolean = options.forSeen ?? false; const oldProps = species ? globalScene.gameData.getSpeciesDexAttrProps(species, this.dexAttrCursor) : null; const oldAbilityIndex = this.abilityCursor > -1 ? this.abilityCursor : globalScene.gameData.getStarterSpeciesDefaultAbilityIndex(species); @@ -3139,6 +3191,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.dexAttrCursor = 0n; this.abilityCursor = -1; this.natureCursor = -1; + this.teraCursor = Type.UNKNOWN; // We will only update the sprite if there is a change to form, shiny/variant // or gender for species with gender sprite differences const shouldUpdateSprite = (species?.genderDiffs && !isNullOrUndefined(female)) @@ -3168,6 +3221,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.dexAttrCursor |= globalScene.gameData.getFormAttr(formIndex !== undefined ? formIndex : (formIndex = oldProps!.formIndex)); // TODO: is this bang correct? this.abilityCursor = abilityIndex !== undefined ? abilityIndex : (abilityIndex = oldAbilityIndex); this.natureCursor = natureIndex !== undefined ? natureIndex : (natureIndex = oldNatureIndex); + this.teraCursor = !Utils.isNullOrUndefined(teraType) ? teraType : (teraType = species.type1); const [ isInParty, partyIndex ]: [boolean, number] = this.isInParty(species); // we use this to firstly check if the pokemon is in the party, and if so, to get the party index in order to update the icon image if (isInParty) { this.updatePartyIcon(species, partyIndex); @@ -3179,6 +3233,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonPassiveText.setVisible(false); this.pokemonPassiveDisabledIcon.setVisible(false); this.pokemonPassiveLockedIcon.setVisible(false); + this.teraIcon.setVisible(false); if (this.assetLoadCancelled) { this.assetLoadCancelled.value = true; @@ -3230,6 +3285,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.starterAttr[starterIndex] = this.dexAttrCursor; this.starterAbilityIndexes[starterIndex] = this.abilityCursor; this.starterNatures[starterIndex] = this.natureCursor; + this.starterTeras[starterIndex] = this.teraCursor; } const assetLoadCancelled = new BooleanHolder(false); @@ -3288,7 +3344,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.canCycleForm = species.forms.filter(f => f.isStarterSelectable || !pokemonFormChanges[species.speciesId]?.find(fc => fc.formKey)) .map((_, f) => dexEntry.caughtAttr & globalScene.gameData.getFormAttr(f)).filter(f => f).length > 1; this.canCycleNature = globalScene.gameData.getNaturesForAttr(dexEntry.natureAttr).length > 1; - + this.canCycleTera = globalScene.gameData.achvUnlocks.hasOwnProperty(achvs.TERASTALLIZE.id) && !Utils.isNullOrUndefined(getPokemonSpeciesForm(species.speciesId, formIndex ?? 0).type2); } if (dexEntry.caughtAttr && species.malePercent !== null) { @@ -3412,10 +3468,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonFormText.setText(formText); this.setTypeIcons(speciesForm.type1, speciesForm.type2); + + this.teraIcon.setFrame(Type[this.teraCursor].toLowerCase()); + this.teraIcon.setVisible(!this.statsMode && globalScene.gameData.achvUnlocks.hasOwnProperty(achvs.TERASTALLIZE.id)); } else { this.pokemonAbilityText.setText(""); this.pokemonPassiveText.setText(""); this.pokemonNatureText.setText(""); + this.teraIcon.setVisible(false); this.setTypeIcons(null, null); } } else { @@ -3426,6 +3486,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonAbilityText.setText(""); this.pokemonPassiveText.setText(""); this.pokemonNatureText.setText(""); + this.teraIcon.setVisible(false); this.setTypeIcons(null, null); } @@ -3479,6 +3540,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.starterAttr.splice(index, 1); this.starterAbilityIndexes.splice(index, 1); this.starterNatures.splice(index, 1); + this.starterTeras.splice(index, 1); this.starterMovesets.splice(index, 1); for (let s = 0; s < this.starterSpecies.length; s++) { @@ -3690,6 +3752,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { abilityIndex: thisObj.starterAbilityIndexes[i], passive: !(globalScene.gameData.starterData[starterSpecies.speciesId].passiveAttr ^ (PassiveAttr.ENABLED | PassiveAttr.UNLOCKED)), nature: thisObj.starterNatures[i] as Nature, + teraType: thisObj.starterTeras[i] as Type, moveset: thisObj.starterMovesets[i], pokerus: thisObj.pokerusSpecies.includes(starterSpecies), nickname: thisObj.starterPreferences[starterSpecies.speciesId]?.nickname, @@ -3816,6 +3879,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.abilityLabel.setVisible(false); this.natureIconElement.setVisible(false); this.natureLabel.setVisible(false); + this.teraIconElement.setVisible(false); + this.teraLabel.setVisible(false); this.goFilterIconElement.setVisible(false); this.goFilterLabel.setVisible(false); } diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 1526ae982e5..b952037a079 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -225,7 +225,7 @@ export default class SummaryUiHandler extends UiHandler { this.summaryContainer.add(this.championRibbon); this.championRibbon.setVisible(false); - this.levelText = addTextObject(36, -17, "", TextStyle.SUMMARY_ALT); + this.levelText = addTextObject(24, -17, "", TextStyle.SUMMARY_ALT); this.levelText.setOrigin(0, 1); this.summaryContainer.add(this.levelText); @@ -413,7 +413,7 @@ export default class SummaryUiHandler extends UiHandler { } this.pokeball.setFrame(getPokeballAtlasKey(this.pokemon.pokeball)); - this.levelText.setText(this.pokemon.level.toString()); + this.levelText.setText(`${i18next.t("pokemonSummary:lv")}${this.pokemon.level.toString()}`); this.genderText.setText(getGenderSymbol(this.pokemon.getGender(true))); this.genderText.setColor(getGenderColor(this.pokemon.getGender(true))); this.genderText.setShadowColor(getGenderColor(this.pokemon.getGender(true), true)); @@ -756,7 +756,7 @@ export default class SummaryUiHandler extends UiHandler { trainerText.setOrigin(0, 0); profileContainer.add(trainerText); - const trainerIdText = addTextObject(174, 12, globalScene.gameData.trainerId.toString(), TextStyle.SUMMARY_ALT); + const trainerIdText = addTextObject(141, 12, `${i18next.t("pokemonSummary:idNo")}${globalScene.gameData.trainerId.toString()}`, TextStyle.SUMMARY_ALT); trainerIdText.setOrigin(0, 0); profileContainer.add(trainerIdText); diff --git a/src/test/abilities/ability_duplication.test.ts b/test/abilities/ability_duplication.test.ts similarity index 96% rename from src/test/abilities/ability_duplication.test.ts rename to test/abilities/ability_duplication.test.ts index f9122b3259c..73092b41ce6 100644 --- a/src/test/abilities/ability_duplication.test.ts +++ b/test/abilities/ability_duplication.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/abilities/ability_timing.test.ts b/test/abilities/ability_timing.test.ts similarity index 96% rename from src/test/abilities/ability_timing.test.ts rename to test/abilities/ability_timing.test.ts index e3264c2c1a8..85332b9cd82 100644 --- a/src/test/abilities/ability_timing.test.ts +++ b/test/abilities/ability_timing.test.ts @@ -5,7 +5,7 @@ import i18next from "#app/plugins/i18n"; import { Mode } from "#app/ui/ui"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/analytic.test.ts b/test/abilities/analytic.test.ts similarity index 98% rename from src/test/abilities/analytic.test.ts rename to test/abilities/analytic.test.ts index 12777c545f0..45f7bc55006 100644 --- a/src/test/abilities/analytic.test.ts +++ b/test/abilities/analytic.test.ts @@ -3,7 +3,7 @@ import { isBetween, toDmgValue } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/arena_trap.test.ts b/test/abilities/arena_trap.test.ts similarity index 98% rename from src/test/abilities/arena_trap.test.ts rename to test/abilities/arena_trap.test.ts index 12b9673080d..dda6e60e886 100644 --- a/src/test/abilities/arena_trap.test.ts +++ b/test/abilities/arena_trap.test.ts @@ -2,7 +2,7 @@ import { allAbilities } from "#app/data/ability"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/abilities/aroma_veil.test.ts b/test/abilities/aroma_veil.test.ts similarity index 97% rename from src/test/abilities/aroma_veil.test.ts rename to test/abilities/aroma_veil.test.ts index 4ba4d16504b..111d682aabe 100644 --- a/src/test/abilities/aroma_veil.test.ts +++ b/test/abilities/aroma_veil.test.ts @@ -1,7 +1,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/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"; diff --git a/src/test/abilities/aura_break.test.ts b/test/abilities/aura_break.test.ts similarity index 97% rename from src/test/abilities/aura_break.test.ts rename to test/abilities/aura_break.test.ts index 137688d1f22..230835a887e 100644 --- a/src/test/abilities/aura_break.test.ts +++ b/test/abilities/aura_break.test.ts @@ -2,7 +2,7 @@ import { allMoves } from "#app/data/move"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/battery.test.ts b/test/abilities/battery.test.ts similarity index 97% rename from src/test/abilities/battery.test.ts rename to test/abilities/battery.test.ts index 8abeca287f7..b82ffaeea7b 100644 --- a/src/test/abilities/battery.test.ts +++ b/test/abilities/battery.test.ts @@ -4,7 +4,7 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/battle_bond.test.ts b/test/abilities/battle_bond.test.ts similarity index 98% rename from src/test/abilities/battle_bond.test.ts rename to test/abilities/battle_bond.test.ts index db7ed01e7d9..38d25fa3800 100644 --- a/src/test/abilities/battle_bond.test.ts +++ b/test/abilities/battle_bond.test.ts @@ -4,7 +4,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/beast_boost.test.ts b/test/abilities/beast_boost.test.ts similarity index 98% rename from src/test/abilities/beast_boost.test.ts rename to test/abilities/beast_boost.test.ts index de31b979e32..c9877709467 100644 --- a/src/test/abilities/beast_boost.test.ts +++ b/test/abilities/beast_boost.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/commander.test.ts b/test/abilities/commander.test.ts similarity index 99% rename from src/test/abilities/commander.test.ts rename to test/abilities/commander.test.ts index 70568639b61..1b054bbd5ea 100644 --- a/src/test/abilities/commander.test.ts +++ b/test/abilities/commander.test.ts @@ -9,7 +9,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/competitive.test.ts b/test/abilities/competitive.test.ts similarity index 97% rename from src/test/abilities/competitive.test.ts rename to test/abilities/competitive.test.ts index ecb276a1b8d..e4baf9b9855 100644 --- a/src/test/abilities/competitive.test.ts +++ b/test/abilities/competitive.test.ts @@ -3,7 +3,7 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/contrary.test.ts b/test/abilities/contrary.test.ts similarity index 97% rename from src/test/abilities/contrary.test.ts rename to test/abilities/contrary.test.ts index c838a5a098e..eaf8d885a83 100644 --- a/src/test/abilities/contrary.test.ts +++ b/test/abilities/contrary.test.ts @@ -2,7 +2,7 @@ import { Moves } from "#app/enums/moves"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/corrosion.test.ts b/test/abilities/corrosion.test.ts similarity index 96% rename from src/test/abilities/corrosion.test.ts rename to test/abilities/corrosion.test.ts index e607e85defb..2829c3c3b41 100644 --- a/src/test/abilities/corrosion.test.ts +++ b/test/abilities/corrosion.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/costar.test.ts b/test/abilities/costar.test.ts similarity index 97% rename from src/test/abilities/costar.test.ts rename to test/abilities/costar.test.ts index 3be29ea2dcf..09b724a07ec 100644 --- a/src/test/abilities/costar.test.ts +++ b/test/abilities/costar.test.ts @@ -4,7 +4,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { CommandPhase } from "#app/phases/command-phase"; import { MessagePhase } from "#app/phases/message-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/abilities/dancer.test.ts b/test/abilities/dancer.test.ts similarity index 98% rename from src/test/abilities/dancer.test.ts rename to test/abilities/dancer.test.ts index 3a480316c96..99d8a6d588d 100644 --- a/src/test/abilities/dancer.test.ts +++ b/test/abilities/dancer.test.ts @@ -3,7 +3,7 @@ import type { MovePhase } from "#app/phases/move-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/defiant.test.ts b/test/abilities/defiant.test.ts similarity index 97% rename from src/test/abilities/defiant.test.ts rename to test/abilities/defiant.test.ts index aa8d250dad7..ce8c7bac8b3 100644 --- a/src/test/abilities/defiant.test.ts +++ b/test/abilities/defiant.test.ts @@ -3,7 +3,7 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/desolate-land.test.ts b/test/abilities/desolate-land.test.ts similarity index 98% rename from src/test/abilities/desolate-land.test.ts rename to test/abilities/desolate-land.test.ts index 75576d7a8f6..4aa44c97404 100644 --- a/src/test/abilities/desolate-land.test.ts +++ b/test/abilities/desolate-land.test.ts @@ -3,7 +3,7 @@ import { WeatherType } from "#app/enums/weather-type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/abilities/disguise.test.ts b/test/abilities/disguise.test.ts similarity index 99% rename from src/test/abilities/disguise.test.ts rename to test/abilities/disguise.test.ts index 07a84bd7a5a..cb875e23019 100644 --- a/src/test/abilities/disguise.test.ts +++ b/test/abilities/disguise.test.ts @@ -5,7 +5,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/dry_skin.test.ts b/test/abilities/dry_skin.test.ts similarity index 98% rename from src/test/abilities/dry_skin.test.ts rename to test/abilities/dry_skin.test.ts index 314564df15c..f3a67f0c1fd 100644 --- a/src/test/abilities/dry_skin.test.ts +++ b/test/abilities/dry_skin.test.ts @@ -1,7 +1,7 @@ import { Species } from "#app/enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/early_bird.test.ts b/test/abilities/early_bird.test.ts similarity index 98% rename from src/test/abilities/early_bird.test.ts rename to test/abilities/early_bird.test.ts index a69290fa1e4..5889cfe2f89 100644 --- a/src/test/abilities/early_bird.test.ts +++ b/test/abilities/early_bird.test.ts @@ -4,7 +4,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/flash_fire.test.ts b/test/abilities/flash_fire.test.ts similarity index 99% rename from src/test/abilities/flash_fire.test.ts rename to test/abilities/flash_fire.test.ts index 0ca55227ea4..1c94c694b29 100644 --- a/src/test/abilities/flash_fire.test.ts +++ b/test/abilities/flash_fire.test.ts @@ -6,7 +6,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/flower_gift.test.ts b/test/abilities/flower_gift.test.ts similarity index 99% rename from src/test/abilities/flower_gift.test.ts rename to test/abilities/flower_gift.test.ts index 04ada598f22..99f4211eeaa 100644 --- a/src/test/abilities/flower_gift.test.ts +++ b/test/abilities/flower_gift.test.ts @@ -4,7 +4,7 @@ import { Stat } from "#app/enums/stat"; import { WeatherType } from "#app/enums/weather-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/forecast.test.ts b/test/abilities/forecast.test.ts similarity index 99% rename from src/test/abilities/forecast.test.ts rename to test/abilities/forecast.test.ts index 6d1f776da16..31c9942cd98 100644 --- a/src/test/abilities/forecast.test.ts +++ b/test/abilities/forecast.test.ts @@ -9,7 +9,7 @@ import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/friend_guard.test.ts b/test/abilities/friend_guard.test.ts similarity index 98% rename from src/test/abilities/friend_guard.test.ts rename to test/abilities/friend_guard.test.ts index 4ce64468c43..986bd8e7925 100644 --- a/src/test/abilities/friend_guard.test.ts +++ b/test/abilities/friend_guard.test.ts @@ -1,7 +1,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { BattlerIndex } from "#app/battle"; diff --git a/src/test/abilities/galvanize.test.ts b/test/abilities/galvanize.test.ts similarity index 98% rename from src/test/abilities/galvanize.test.ts rename to test/abilities/galvanize.test.ts index 80e767866ea..f0230be3b31 100644 --- a/src/test/abilities/galvanize.test.ts +++ b/test/abilities/galvanize.test.ts @@ -5,7 +5,7 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { HitResult } from "#app/field/pokemon"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/good_as_gold.test.ts b/test/abilities/good_as_gold.test.ts similarity index 99% rename from src/test/abilities/good_as_gold.test.ts rename to test/abilities/good_as_gold.test.ts index ecda1a0e031..e3367d5b7f8 100644 --- a/src/test/abilities/good_as_gold.test.ts +++ b/test/abilities/good_as_gold.test.ts @@ -9,7 +9,7 @@ import { WeatherType } from "#app/enums/weather-type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/gorilla_tactics.test.ts b/test/abilities/gorilla_tactics.test.ts similarity index 98% rename from src/test/abilities/gorilla_tactics.test.ts rename to test/abilities/gorilla_tactics.test.ts index 8aee365eb8f..e97bca6a725 100644 --- a/src/test/abilities/gorilla_tactics.test.ts +++ b/test/abilities/gorilla_tactics.test.ts @@ -3,7 +3,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/gulp_missile.test.ts b/test/abilities/gulp_missile.test.ts similarity index 99% rename from src/test/abilities/gulp_missile.test.ts rename to test/abilities/gulp_missile.test.ts index bbb103c63e6..d34e86ddc08 100644 --- a/src/test/abilities/gulp_missile.test.ts +++ b/test/abilities/gulp_missile.test.ts @@ -6,7 +6,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/heatproof.test.ts b/test/abilities/heatproof.test.ts similarity index 97% rename from src/test/abilities/heatproof.test.ts rename to test/abilities/heatproof.test.ts index bf4e99ce467..6c41460535f 100644 --- a/src/test/abilities/heatproof.test.ts +++ b/test/abilities/heatproof.test.ts @@ -4,7 +4,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { toDmgValue } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/honey_gather.test.ts b/test/abilities/honey_gather.test.ts similarity index 97% rename from src/test/abilities/honey_gather.test.ts rename to test/abilities/honey_gather.test.ts index fc9d6cdd150..a1cad453843 100644 --- a/src/test/abilities/honey_gather.test.ts +++ b/test/abilities/honey_gather.test.ts @@ -3,7 +3,7 @@ import { Command } from "#app/ui/command-ui-handler"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/hustle.test.ts b/test/abilities/hustle.test.ts similarity index 98% rename from src/test/abilities/hustle.test.ts rename to test/abilities/hustle.test.ts index 08a441315fb..c92bc5cbbd3 100644 --- a/src/test/abilities/hustle.test.ts +++ b/test/abilities/hustle.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#app/enums/abilities"; import { Stat } from "#app/enums/stat"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/hyper_cutter.test.ts b/test/abilities/hyper_cutter.test.ts similarity index 96% rename from src/test/abilities/hyper_cutter.test.ts rename to test/abilities/hyper_cutter.test.ts index e51fef6bd49..c8c4c21c98f 100644 --- a/src/test/abilities/hyper_cutter.test.ts +++ b/test/abilities/hyper_cutter.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/ice_face.test.ts b/test/abilities/ice_face.test.ts similarity index 99% rename from src/test/abilities/ice_face.test.ts rename to test/abilities/ice_face.test.ts index e31bee1c721..e4339cb8a28 100644 --- a/src/test/abilities/ice_face.test.ts +++ b/test/abilities/ice_face.test.ts @@ -8,7 +8,7 @@ import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/illuminate.test.ts b/test/abilities/illuminate.test.ts similarity index 96% rename from src/test/abilities/illuminate.test.ts rename to test/abilities/illuminate.test.ts index 4f7d3d83b51..c4fbcd2c7a4 100644 --- a/src/test/abilities/illuminate.test.ts +++ b/test/abilities/illuminate.test.ts @@ -1,7 +1,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/abilities/imposter.test.ts b/test/abilities/imposter.test.ts similarity index 98% rename from src/test/abilities/imposter.test.ts rename to test/abilities/imposter.test.ts index 98f30c60505..d73b77feda9 100644 --- a/src/test/abilities/imposter.test.ts +++ b/test/abilities/imposter.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/abilities/infiltrator.test.ts b/test/abilities/infiltrator.test.ts similarity index 98% rename from src/test/abilities/infiltrator.test.ts rename to test/abilities/infiltrator.test.ts index 8ea72b55b0c..c614bbe4474 100644 --- a/src/test/abilities/infiltrator.test.ts +++ b/test/abilities/infiltrator.test.ts @@ -7,7 +7,7 @@ import { StatusEffect } from "#enums/status-effect"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/intimidate.test.ts b/test/abilities/intimidate.test.ts similarity index 97% rename from src/test/abilities/intimidate.test.ts rename to test/abilities/intimidate.test.ts index d5a37d06593..eab59e7c1a2 100644 --- a/src/test/abilities/intimidate.test.ts +++ b/test/abilities/intimidate.test.ts @@ -1,9 +1,9 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Mode } from "#app/ui/ui"; import { Stat } from "#enums/stat"; -import { getMovePosition } from "#test/utils/gameManagerUtils"; +import { getMovePosition } from "#test/testUtils/gameManagerUtils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/abilities/intrepid_sword.test.ts b/test/abilities/intrepid_sword.test.ts similarity index 95% rename from src/test/abilities/intrepid_sword.test.ts rename to test/abilities/intrepid_sword.test.ts index 7bf0654276c..0f4305d38b4 100644 --- a/src/test/abilities/intrepid_sword.test.ts +++ b/test/abilities/intrepid_sword.test.ts @@ -1,5 +1,5 @@ import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; diff --git a/src/test/abilities/libero.test.ts b/test/abilities/libero.test.ts similarity index 99% rename from src/test/abilities/libero.test.ts rename to test/abilities/libero.test.ts index f6e85979c69..46093019daa 100644 --- a/src/test/abilities/libero.test.ts +++ b/test/abilities/libero.test.ts @@ -9,7 +9,7 @@ import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/abilities/magic_bounce.test.ts b/test/abilities/magic_bounce.test.ts similarity index 99% rename from src/test/abilities/magic_bounce.test.ts rename to test/abilities/magic_bounce.test.ts index 2fc460662ca..9bb7b55bc72 100644 --- a/src/test/abilities/magic_bounce.test.ts +++ b/test/abilities/magic_bounce.test.ts @@ -9,7 +9,7 @@ import { StatusEffect } from "#app/enums/status-effect"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Abilities - Magic Bounce", () => { diff --git a/src/test/abilities/magic_guard.test.ts b/test/abilities/magic_guard.test.ts similarity index 99% rename from src/test/abilities/magic_guard.test.ts rename to test/abilities/magic_guard.test.ts index 7c038354748..a2a88915419 100644 --- a/src/test/abilities/magic_guard.test.ts +++ b/test/abilities/magic_guard.test.ts @@ -8,7 +8,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/mimicry.test.ts b/test/abilities/mimicry.test.ts similarity index 98% rename from src/test/abilities/mimicry.test.ts rename to test/abilities/mimicry.test.ts index 29aa1d649d3..75990c89707 100644 --- a/src/test/abilities/mimicry.test.ts +++ b/test/abilities/mimicry.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Type } from "#enums/type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/mirror_armor.test.ts b/test/abilities/mirror_armor.test.ts similarity index 99% rename from src/test/abilities/mirror_armor.test.ts rename to test/abilities/mirror_armor.test.ts index 070428a8ee7..1d103c45be1 100644 --- a/src/test/abilities/mirror_armor.test.ts +++ b/test/abilities/mirror_armor.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { BattlerIndex } from "#app/battle"; diff --git a/src/test/abilities/moody.test.ts b/test/abilities/moody.test.ts similarity index 98% rename from src/test/abilities/moody.test.ts rename to test/abilities/moody.test.ts index 166f69b0fe3..64c2c7d8a07 100644 --- a/src/test/abilities/moody.test.ts +++ b/test/abilities/moody.test.ts @@ -2,7 +2,7 @@ import { BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/moxie.test.ts b/test/abilities/moxie.test.ts similarity index 97% rename from src/test/abilities/moxie.test.ts rename to test/abilities/moxie.test.ts index 5f337fedabb..c518c55671f 100644 --- a/src/test/abilities/moxie.test.ts +++ b/test/abilities/moxie.test.ts @@ -1,5 +1,5 @@ import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/abilities/mummy.test.ts b/test/abilities/mummy.test.ts similarity index 96% rename from src/test/abilities/mummy.test.ts rename to test/abilities/mummy.test.ts index bf93cdcf61d..96b5e170c14 100644 --- a/src/test/abilities/mummy.test.ts +++ b/test/abilities/mummy.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/mycelium_might.test.ts b/test/abilities/mycelium_might.test.ts similarity index 98% rename from src/test/abilities/mycelium_might.test.ts rename to test/abilities/mycelium_might.test.ts index 0c8e7b5a703..2c0bd39b32a 100644 --- a/src/test/abilities/mycelium_might.test.ts +++ b/test/abilities/mycelium_might.test.ts @@ -1,6 +1,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { TurnStartPhase } from "#app/phases/turn-start-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Stat } from "#enums/stat"; import { Moves } from "#enums/moves"; diff --git a/src/test/abilities/no_guard.test.ts b/test/abilities/no_guard.test.ts similarity index 97% rename from src/test/abilities/no_guard.test.ts rename to test/abilities/no_guard.test.ts index b0b454dd560..1a319eb2611 100644 --- a/src/test/abilities/no_guard.test.ts +++ b/test/abilities/no_guard.test.ts @@ -4,7 +4,7 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/abilities/parental_bond.test.ts b/test/abilities/parental_bond.test.ts similarity index 99% rename from src/test/abilities/parental_bond.test.ts rename to test/abilities/parental_bond.test.ts index c2f54fa4cfc..d22c5615df2 100644 --- a/src/test/abilities/parental_bond.test.ts +++ b/test/abilities/parental_bond.test.ts @@ -6,7 +6,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/pastel_veil.test.ts b/test/abilities/pastel_veil.test.ts similarity index 97% rename from src/test/abilities/pastel_veil.test.ts rename to test/abilities/pastel_veil.test.ts index dd8360493a1..cb73a79bae4 100644 --- a/src/test/abilities/pastel_veil.test.ts +++ b/test/abilities/pastel_veil.test.ts @@ -5,7 +5,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/perish_body.test.ts b/test/abilities/perish_body.test.ts similarity index 98% rename from src/test/abilities/perish_body.test.ts rename to test/abilities/perish_body.test.ts index 70ba6d8d684..7084076713a 100644 --- a/src/test/abilities/perish_body.test.ts +++ b/test/abilities/perish_body.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/power_construct.test.ts b/test/abilities/power_construct.test.ts similarity index 98% rename from src/test/abilities/power_construct.test.ts rename to test/abilities/power_construct.test.ts index aaab5ddb5c4..b6b7be33753 100644 --- a/src/test/abilities/power_construct.test.ts +++ b/test/abilities/power_construct.test.ts @@ -5,7 +5,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/abilities/power_spot.test.ts b/test/abilities/power_spot.test.ts similarity index 97% rename from src/test/abilities/power_spot.test.ts rename to test/abilities/power_spot.test.ts index a566c2277c3..dbc3799d48d 100644 --- a/src/test/abilities/power_spot.test.ts +++ b/test/abilities/power_spot.test.ts @@ -4,7 +4,7 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/protean.test.ts b/test/abilities/protean.test.ts similarity index 99% rename from src/test/abilities/protean.test.ts rename to test/abilities/protean.test.ts index c7d04b9e1c8..a20fa61d75f 100644 --- a/src/test/abilities/protean.test.ts +++ b/test/abilities/protean.test.ts @@ -9,7 +9,7 @@ import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/abilities/protosynthesis.test.ts b/test/abilities/protosynthesis.test.ts similarity index 97% rename from src/test/abilities/protosynthesis.test.ts rename to test/abilities/protosynthesis.test.ts index 67786c3ae9e..a122fbad797 100644 --- a/src/test/abilities/protosynthesis.test.ts +++ b/test/abilities/protosynthesis.test.ts @@ -3,7 +3,7 @@ import { Moves } from "#enums/moves"; import { Nature } from "#enums/nature"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { BattlerIndex } from "#app/battle"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/quick_draw.test.ts b/test/abilities/quick_draw.test.ts similarity index 98% rename from src/test/abilities/quick_draw.test.ts rename to test/abilities/quick_draw.test.ts index 4979152f4d6..c451218a56c 100644 --- a/src/test/abilities/quick_draw.test.ts +++ b/test/abilities/quick_draw.test.ts @@ -3,7 +3,7 @@ import { FaintPhase } from "#app/phases/faint-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; diff --git a/src/test/abilities/sand_spit.test.ts b/test/abilities/sand_spit.test.ts similarity index 97% rename from src/test/abilities/sand_spit.test.ts rename to test/abilities/sand_spit.test.ts index 092c3e66105..dafae695d3b 100644 --- a/src/test/abilities/sand_spit.test.ts +++ b/test/abilities/sand_spit.test.ts @@ -2,7 +2,7 @@ import { WeatherType } from "#app/enums/weather-type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/sand_veil.test.ts b/test/abilities/sand_veil.test.ts similarity index 97% rename from src/test/abilities/sand_veil.test.ts rename to test/abilities/sand_veil.test.ts index ee8ca450df9..0128276075b 100644 --- a/src/test/abilities/sand_veil.test.ts +++ b/test/abilities/sand_veil.test.ts @@ -7,7 +7,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; diff --git a/src/test/abilities/sap_sipper.test.ts b/test/abilities/sap_sipper.test.ts similarity index 98% rename from src/test/abilities/sap_sipper.test.ts rename to test/abilities/sap_sipper.test.ts index dc254a54b54..836219fcbcb 100644 --- a/src/test/abilities/sap_sipper.test.ts +++ b/test/abilities/sap_sipper.test.ts @@ -6,7 +6,7 @@ import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { allMoves, RandomMoveAttr } from "#app/data/move"; diff --git a/src/test/abilities/schooling.test.ts b/test/abilities/schooling.test.ts similarity index 97% rename from src/test/abilities/schooling.test.ts rename to test/abilities/schooling.test.ts index e1ec58f517e..a52c6a06f12 100644 --- a/src/test/abilities/schooling.test.ts +++ b/test/abilities/schooling.test.ts @@ -5,7 +5,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/abilities/screen_cleaner.test.ts b/test/abilities/screen_cleaner.test.ts similarity index 97% rename from src/test/abilities/screen_cleaner.test.ts rename to test/abilities/screen_cleaner.test.ts index c036aa90a77..9c182398765 100644 --- a/src/test/abilities/screen_cleaner.test.ts +++ b/test/abilities/screen_cleaner.test.ts @@ -4,7 +4,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/seed_sower.test.ts b/test/abilities/seed_sower.test.ts similarity index 97% rename from src/test/abilities/seed_sower.test.ts rename to test/abilities/seed_sower.test.ts index 71b76e24d2e..6e3acdf6093 100644 --- a/src/test/abilities/seed_sower.test.ts +++ b/test/abilities/seed_sower.test.ts @@ -2,7 +2,7 @@ import { TerrainType } from "#app/data/terrain"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/serene_grace.test.ts b/test/abilities/serene_grace.test.ts similarity index 96% rename from src/test/abilities/serene_grace.test.ts rename to test/abilities/serene_grace.test.ts index 6f9b2195a9c..cb21121743b 100644 --- a/src/test/abilities/serene_grace.test.ts +++ b/test/abilities/serene_grace.test.ts @@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { allMoves } from "#app/data/move"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/sheer_force.test.ts b/test/abilities/sheer_force.test.ts similarity index 99% rename from src/test/abilities/sheer_force.test.ts rename to test/abilities/sheer_force.test.ts index a0ddf5bb9c6..a65334cbfa0 100644 --- a/src/test/abilities/sheer_force.test.ts +++ b/test/abilities/sheer_force.test.ts @@ -4,7 +4,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { allMoves, FlinchAttr } from "#app/data/move"; diff --git a/src/test/abilities/shield_dust.test.ts b/test/abilities/shield_dust.test.ts similarity index 97% rename from src/test/abilities/shield_dust.test.ts rename to test/abilities/shield_dust.test.ts index 329f52cc4c6..a63898b0c63 100644 --- a/src/test/abilities/shield_dust.test.ts +++ b/test/abilities/shield_dust.test.ts @@ -6,7 +6,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/shields_down.test.ts b/test/abilities/shields_down.test.ts similarity index 99% rename from src/test/abilities/shields_down.test.ts rename to test/abilities/shields_down.test.ts index ca6d945824e..4e47a018471 100644 --- a/src/test/abilities/shields_down.test.ts +++ b/test/abilities/shields_down.test.ts @@ -6,7 +6,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/abilities/simple.test.ts b/test/abilities/simple.test.ts similarity index 95% rename from src/test/abilities/simple.test.ts rename to test/abilities/simple.test.ts index e5ca474d7c3..e8d478655ab 100644 --- a/src/test/abilities/simple.test.ts +++ b/test/abilities/simple.test.ts @@ -2,7 +2,7 @@ import { Moves } from "#app/enums/moves"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/speed_boost.test.ts b/test/abilities/speed_boost.test.ts similarity index 98% rename from src/test/abilities/speed_boost.test.ts rename to test/abilities/speed_boost.test.ts index 74ee6a8cb92..912bb62bca4 100644 --- a/src/test/abilities/speed_boost.test.ts +++ b/test/abilities/speed_boost.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import type { CommandPhase } from "#app/phases/command-phase"; diff --git a/src/test/abilities/stakeout.test.ts b/test/abilities/stakeout.test.ts similarity index 97% rename from src/test/abilities/stakeout.test.ts rename to test/abilities/stakeout.test.ts index 885169b284e..67442ae1822 100644 --- a/src/test/abilities/stakeout.test.ts +++ b/test/abilities/stakeout.test.ts @@ -3,7 +3,7 @@ import { isBetween } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/stall.test.ts b/test/abilities/stall.test.ts similarity index 98% rename from src/test/abilities/stall.test.ts rename to test/abilities/stall.test.ts index b51c56dbe1f..c0b71221071 100644 --- a/src/test/abilities/stall.test.ts +++ b/test/abilities/stall.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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"; diff --git a/src/test/abilities/steely_spirit.test.ts b/test/abilities/steely_spirit.test.ts similarity index 98% rename from src/test/abilities/steely_spirit.test.ts rename to test/abilities/steely_spirit.test.ts index 61e76989060..e1f6a04c0fa 100644 --- a/src/test/abilities/steely_spirit.test.ts +++ b/test/abilities/steely_spirit.test.ts @@ -3,7 +3,7 @@ import { allMoves } from "#app/data/move"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/sturdy.test.ts b/test/abilities/sturdy.test.ts similarity index 97% rename from src/test/abilities/sturdy.test.ts rename to test/abilities/sturdy.test.ts index 8f134338f12..36b098ab69e 100644 --- a/src/test/abilities/sturdy.test.ts +++ b/test/abilities/sturdy.test.ts @@ -4,7 +4,7 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/abilities/supreme_overlord.test.ts b/test/abilities/supreme_overlord.test.ts similarity index 99% rename from src/test/abilities/supreme_overlord.test.ts rename to test/abilities/supreme_overlord.test.ts index ecd595cb6bb..6de17bc3c7a 100644 --- a/src/test/abilities/supreme_overlord.test.ts +++ b/test/abilities/supreme_overlord.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; import { BattlerIndex } from "#app/battle"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/utils/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/move"; diff --git a/src/test/abilities/sweet_veil.test.ts b/test/abilities/sweet_veil.test.ts similarity index 98% rename from src/test/abilities/sweet_veil.test.ts rename to test/abilities/sweet_veil.test.ts index ef66cb1c68a..14f4f79c3f0 100644 --- a/src/test/abilities/sweet_veil.test.ts +++ b/test/abilities/sweet_veil.test.ts @@ -5,7 +5,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/synchronize.test.ts b/test/abilities/synchronize.test.ts similarity index 98% rename from src/test/abilities/synchronize.test.ts rename to test/abilities/synchronize.test.ts index 2ae80ae9c7a..19b5560f61a 100644 --- a/src/test/abilities/synchronize.test.ts +++ b/test/abilities/synchronize.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/tera_shell.test.ts b/test/abilities/tera_shell.test.ts similarity index 98% rename from src/test/abilities/tera_shell.test.ts rename to test/abilities/tera_shell.test.ts index 01382d0fd9a..38be70f511b 100644 --- a/src/test/abilities/tera_shell.test.ts +++ b/test/abilities/tera_shell.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { HitResult } from "#app/field/pokemon"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/trace.test.ts b/test/abilities/trace.test.ts similarity index 96% rename from src/test/abilities/trace.test.ts rename to test/abilities/trace.test.ts index ffa76f59769..e7059d2b0f1 100644 --- a/src/test/abilities/trace.test.ts +++ b/test/abilities/trace.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/unburden.test.ts b/test/abilities/unburden.test.ts similarity index 99% rename from src/test/abilities/unburden.test.ts rename to test/abilities/unburden.test.ts index a652f55d591..67cf83870b3 100644 --- a/src/test/abilities/unburden.test.ts +++ b/test/abilities/unburden.test.ts @@ -9,7 +9,7 @@ import { BerryType } from "#enums/berry-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -391,7 +391,7 @@ describe("Abilities - Unburden", () => { await game.forceEnemyMove(Moves.THIEF, BattlerIndex.PLAYER); await game.forceEnemyMove(Moves.SPLASH); await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2 ]); - game.doSelectPartyPokemon(0, "MoveEffectPhase"); + game.doSelectPartyPokemon(0, "RevivalBlessingPhase"); await game.toNextTurn(); expect(game.scene.getPlayerField()[0]).toBe(treecko); diff --git a/src/test/abilities/unseen_fist.test.ts b/test/abilities/unseen_fist.test.ts similarity index 98% rename from src/test/abilities/unseen_fist.test.ts rename to test/abilities/unseen_fist.test.ts index 584f997aa55..de93aef0988 100644 --- a/src/test/abilities/unseen_fist.test.ts +++ b/test/abilities/unseen_fist.test.ts @@ -2,7 +2,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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"; diff --git a/src/test/abilities/volt_absorb.test.ts b/test/abilities/volt_absorb.test.ts similarity index 98% rename from src/test/abilities/volt_absorb.test.ts rename to test/abilities/volt_absorb.test.ts index 4fee7653b99..2221619af07 100644 --- a/src/test/abilities/volt_absorb.test.ts +++ b/test/abilities/volt_absorb.test.ts @@ -4,7 +4,7 @@ import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { BattlerIndex } from "#app/battle"; diff --git a/src/test/abilities/wandering_spirit.test.ts b/test/abilities/wandering_spirit.test.ts similarity index 97% rename from src/test/abilities/wandering_spirit.test.ts rename to test/abilities/wandering_spirit.test.ts index 4bc9298353f..48c7afa5751 100644 --- a/src/test/abilities/wandering_spirit.test.ts +++ b/test/abilities/wandering_spirit.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/wimp_out.test.ts b/test/abilities/wimp_out.test.ts similarity index 99% rename from src/test/abilities/wimp_out.test.ts rename to test/abilities/wimp_out.test.ts index 90cd3d62af5..5aff05d4c20 100644 --- a/src/test/abilities/wimp_out.test.ts +++ b/test/abilities/wimp_out.test.ts @@ -1,7 +1,7 @@ import { BattlerIndex } from "#app/battle"; import { ArenaTagSide } from "#app/data/arena-tag"; import { allMoves } from "#app/data/move"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { toDmgValue } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; diff --git a/src/test/abilities/wind_power.test.ts b/test/abilities/wind_power.test.ts similarity index 98% rename from src/test/abilities/wind_power.test.ts rename to test/abilities/wind_power.test.ts index 538b65f898b..f9be5393d15 100644 --- a/src/test/abilities/wind_power.test.ts +++ b/test/abilities/wind_power.test.ts @@ -3,7 +3,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/wind_rider.test.ts b/test/abilities/wind_rider.test.ts similarity index 98% rename from src/test/abilities/wind_rider.test.ts rename to test/abilities/wind_rider.test.ts index cd7094fb0a9..7cebd70a11a 100644 --- a/src/test/abilities/wind_rider.test.ts +++ b/test/abilities/wind_rider.test.ts @@ -1,5 +1,5 @@ import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/abilities/wonder_skin.test.ts b/test/abilities/wonder_skin.test.ts similarity index 97% rename from src/test/abilities/wonder_skin.test.ts rename to test/abilities/wonder_skin.test.ts index 6b25701e36a..4f6e45d8fe0 100644 --- a/src/test/abilities/wonder_skin.test.ts +++ b/test/abilities/wonder_skin.test.ts @@ -4,7 +4,7 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/abilities/zen_mode.test.ts b/test/abilities/zen_mode.test.ts similarity index 98% rename from src/test/abilities/zen_mode.test.ts rename to test/abilities/zen_mode.test.ts index e0cc457c4d5..cb4c82e00dc 100644 --- a/src/test/abilities/zen_mode.test.ts +++ b/test/abilities/zen_mode.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/abilities/zero_to_hero.test.ts b/test/abilities/zero_to_hero.test.ts similarity index 98% rename from src/test/abilities/zero_to_hero.test.ts rename to test/abilities/zero_to_hero.test.ts index 5702f73e6c4..338ebd6344f 100644 --- a/src/test/abilities/zero_to_hero.test.ts +++ b/test/abilities/zero_to_hero.test.ts @@ -5,7 +5,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/account.test.ts b/test/account.test.ts similarity index 99% rename from src/test/account.test.ts rename to test/account.test.ts index 0f49014c377..099564ce7a8 100644 --- a/src/test/account.test.ts +++ b/test/account.test.ts @@ -1,7 +1,7 @@ import * as battleScene from "#app/battle-scene"; import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; import { describe, expect, it, vi } from "vitest"; -import { initLoggedInUser, loggedInUser, updateUserInfo } from "../account"; +import { initLoggedInUser, loggedInUser, updateUserInfo } from "#app/account"; describe("account", () => { describe("initLoggedInUser", () => { diff --git a/src/test/achievements/achievement.test.ts b/test/achievements/achievement.test.ts similarity index 99% rename from src/test/achievements/achievement.test.ts rename to test/achievements/achievement.test.ts index 2d1cc50603e..3c6dc8aefe8 100644 --- a/src/test/achievements/achievement.test.ts +++ b/test/achievements/achievement.test.ts @@ -1,10 +1,10 @@ import { TurnHeldItemTransferModifier } from "#app/modifier/modifier"; import { Achv, AchvTier, DamageAchv, HealAchv, LevelAchv, ModifierAchv, MoneyAchv, RibbonAchv, achvs } from "#app/system/achv"; import { NumberHolder } from "#app/utils"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import BattleScene from "../../battle-scene"; +import BattleScene from "#app/battle-scene"; describe("check some Achievement related stuff", () => { it ("should check Achievement creation", () => { diff --git a/src/test/arena/arena_gravity.test.ts b/test/arena/arena_gravity.test.ts similarity index 98% rename from src/test/arena/arena_gravity.test.ts rename to test/arena/arena_gravity.test.ts index 13e9c23a35c..75197a4341c 100644 --- a/src/test/arena/arena_gravity.test.ts +++ b/test/arena/arena_gravity.test.ts @@ -5,7 +5,7 @@ import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/arena/grassy_terrain.test.ts b/test/arena/grassy_terrain.test.ts similarity index 97% rename from src/test/arena/grassy_terrain.test.ts rename to test/arena/grassy_terrain.test.ts index ead4467925b..f493242a9d8 100644 --- a/src/test/arena/grassy_terrain.test.ts +++ b/test/arena/grassy_terrain.test.ts @@ -2,7 +2,7 @@ import { allMoves } from "#app/data/move"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/arena/weather_fog.test.ts b/test/arena/weather_fog.test.ts similarity index 96% rename from src/test/arena/weather_fog.test.ts rename to test/arena/weather_fog.test.ts index 8c1fcb1e3a4..8b4ffff3a64 100644 --- a/src/test/arena/weather_fog.test.ts +++ b/test/arena/weather_fog.test.ts @@ -4,7 +4,7 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/arena/weather_hail.test.ts b/test/arena/weather_hail.test.ts similarity index 97% rename from src/test/arena/weather_hail.test.ts rename to test/arena/weather_hail.test.ts index 0b267550d75..137c7622517 100644 --- a/src/test/arena/weather_hail.test.ts +++ b/test/arena/weather_hail.test.ts @@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/arena/weather_sandstorm.test.ts b/test/arena/weather_sandstorm.test.ts similarity index 98% rename from src/test/arena/weather_sandstorm.test.ts rename to test/arena/weather_sandstorm.test.ts index 17ccfdee94b..6420117d107 100644 --- a/src/test/arena/weather_sandstorm.test.ts +++ b/test/arena/weather_sandstorm.test.ts @@ -3,7 +3,7 @@ import { Stat } from "#app/enums/stat"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/arena/weather_strong_winds.test.ts b/test/arena/weather_strong_winds.test.ts similarity index 98% rename from src/test/arena/weather_strong_winds.test.ts rename to test/arena/weather_strong_winds.test.ts index 557de93d644..2685a9149ae 100644 --- a/src/test/arena/weather_strong_winds.test.ts +++ b/test/arena/weather_strong_winds.test.ts @@ -4,7 +4,7 @@ import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/battle-scene.test.ts b/test/battle-scene.test.ts similarity index 93% rename from src/test/battle-scene.test.ts rename to test/battle-scene.test.ts index 4da75cea197..44f1364441b 100644 --- a/src/test/battle-scene.test.ts +++ b/test/battle-scene.test.ts @@ -1,6 +1,6 @@ import { LoadingScene } from "#app/loading-scene"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import GameManager from "./utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; describe("BattleScene", () => { let phaserGame: Phaser.Game; diff --git a/src/test/battle/ability_swap.test.ts b/test/battle/ability_swap.test.ts similarity index 97% rename from src/test/battle/ability_swap.test.ts rename to test/battle/ability_swap.test.ts index 9ce7a36c16e..ff3f7c002bc 100644 --- a/src/test/battle/ability_swap.test.ts +++ b/test/battle/ability_swap.test.ts @@ -3,7 +3,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/battle/battle-order.test.ts b/test/battle/battle-order.test.ts similarity index 99% rename from src/test/battle/battle-order.test.ts rename to test/battle/battle-order.test.ts index d4e9950dec9..165a2fc916c 100644 --- a/src/test/battle/battle-order.test.ts +++ b/test/battle/battle-order.test.ts @@ -4,7 +4,7 @@ import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/battle/battle.test.ts b/test/battle/battle.test.ts similarity index 98% rename from src/test/battle/battle.test.ts rename to test/battle/battle.test.ts index bd84cb2fd3b..edd04cf8ed0 100644 --- a/src/test/battle/battle.test.ts +++ b/test/battle/battle.test.ts @@ -16,8 +16,8 @@ import { SwitchPhase } from "#app/phases/switch-phase"; import { TitlePhase } from "#app/phases/title-phase"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { VictoryPhase } from "#app/phases/victory-phase"; -import GameManager from "#app/test/utils/gameManager"; -import { generateStarter } from "#app/test/utils/gameManagerUtils"; +import GameManager from "#test/testUtils/gameManager"; +import { generateStarter } from "#test/testUtils/gameManagerUtils"; import { Mode } from "#app/ui/ui"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; @@ -122,7 +122,7 @@ describe("Test Battle Phase", () => { }, 20000); it("load 100% data file", async () => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; diff --git a/src/test/battle/damage_calculation.test.ts b/test/battle/damage_calculation.test.ts similarity index 81% rename from src/test/battle/damage_calculation.test.ts rename to test/battle/damage_calculation.test.ts index e6aca828156..0a954b624c0 100644 --- a/src/test/battle/damage_calculation.test.ts +++ b/test/battle/damage_calculation.test.ts @@ -1,9 +1,11 @@ import { allMoves } from "#app/data/move"; +import type { EnemyPersistentModifier } from "#app/modifier/modifier"; +import { modifierTypes } from "#app/modifier/modifier-type"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -65,6 +67,28 @@ describe("Battle Mechanics - Damage Calculation", () => { expect(aggron.hp).toBe(aggron.getMaxHp() - 1); }); + it("Attacks deal 1 damage at minimum even with many tokens", async () => { + game.override + .startingLevel(1) + .enemySpecies(Species.AGGRON) + .enemyAbility(Abilities.STURDY) + .enemyLevel(10000); + + await game.classicMode.startBattle([ Species.SHUCKLE ]); + + const dmg_redux_modifier = modifierTypes.ENEMY_DAMAGE_REDUCTION().newModifier() as EnemyPersistentModifier; + dmg_redux_modifier.stackCount = 1000; + await game.scene.addEnemyModifier(modifierTypes.ENEMY_DAMAGE_REDUCTION().newModifier() as EnemyPersistentModifier); + + const aggron = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.TACKLE); + + await game.phaseInterceptor.to("BerryPhase", false); + + expect(aggron.hp).toBe(aggron.getMaxHp() - 1); + }); + it("Fixed-damage moves ignore damage multipliers", async () => { game.override .enemySpecies(Species.DRAGONITE) diff --git a/src/test/battle/double_battle.test.ts b/test/battle/double_battle.test.ts similarity index 98% rename from src/test/battle/double_battle.test.ts rename to test/battle/double_battle.test.ts index b48f2a96a5b..de65245698e 100644 --- a/src/test/battle/double_battle.test.ts +++ b/test/battle/double_battle.test.ts @@ -6,7 +6,7 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/battle/inverse_battle.test.ts b/test/battle/inverse_battle.test.ts similarity index 99% rename from src/test/battle/inverse_battle.test.ts rename to test/battle/inverse_battle.test.ts index 0bda678bbd3..ce44824e772 100644 --- a/src/test/battle/inverse_battle.test.ts +++ b/test/battle/inverse_battle.test.ts @@ -6,7 +6,7 @@ import { Challenges } from "#enums/challenges"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/battle/special_battle.test.ts b/test/battle/special_battle.test.ts similarity index 98% rename from src/test/battle/special_battle.test.ts rename to test/battle/special_battle.test.ts index af9e3dddbec..df24626766c 100644 --- a/src/test/battle/special_battle.test.ts +++ b/test/battle/special_battle.test.ts @@ -3,7 +3,7 @@ import { Mode } from "#app/ui/ui"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/battlerTags/octolock.test.ts b/test/battlerTags/octolock.test.ts similarity index 96% rename from src/test/battlerTags/octolock.test.ts rename to test/battlerTags/octolock.test.ts index 4bf0257af8f..f161d90d466 100644 --- a/src/test/battlerTags/octolock.test.ts +++ b/test/battlerTags/octolock.test.ts @@ -3,7 +3,7 @@ import type Pokemon from "#app/field/pokemon"; import { BattlerTagLapseType, OctolockTag, TrappedTag } from "#app/data/battler-tags"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; describe("BattlerTag - OctolockTag", () => { describe("lapse behavior", () => { diff --git a/src/test/battlerTags/stockpiling.test.ts b/test/battlerTags/stockpiling.test.ts similarity index 99% rename from src/test/battlerTags/stockpiling.test.ts rename to test/battlerTags/stockpiling.test.ts index 13a4227853d..5970b5abbc6 100644 --- a/src/test/battlerTags/stockpiling.test.ts +++ b/test/battlerTags/stockpiling.test.ts @@ -4,7 +4,7 @@ import { PokemonSummonData } from "#app/field/pokemon"; import * as messages from "#app/messages"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; beforeEach(() => { diff --git a/src/test/battlerTags/substitute.test.ts b/test/battlerTags/substitute.test.ts similarity index 100% rename from src/test/battlerTags/substitute.test.ts rename to test/battlerTags/substitute.test.ts diff --git a/src/test/boss-pokemon.test.ts b/test/boss-pokemon.test.ts similarity index 99% rename from src/test/boss-pokemon.test.ts rename to test/boss-pokemon.test.ts index 389b42a2963..ea5a9000000 100644 --- a/src/test/boss-pokemon.test.ts +++ b/test/boss-pokemon.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import GameManager from "./utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#app/enums/species"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Abilities } from "#app/enums/abilities"; diff --git a/src/test/daily_mode.test.ts b/test/daily_mode.test.ts similarity index 98% rename from src/test/daily_mode.test.ts rename to test/daily_mode.test.ts index 3e70cc2d8a7..95c01b51434 100644 --- a/src/test/daily_mode.test.ts +++ b/test/daily_mode.test.ts @@ -6,7 +6,7 @@ import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; import { Species } from "#enums/species"; import { Mode } from "#app/ui/ui"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; //const TIMEOUT = 20 * 1000; diff --git a/src/test/data/splash_messages.test.ts b/test/data/splash_messages.test.ts similarity index 100% rename from src/test/data/splash_messages.test.ts rename to test/data/splash_messages.test.ts diff --git a/src/test/data/status_effect.test.ts b/test/data/status_effect.test.ts similarity index 99% rename from src/test/data/status_effect.test.ts rename to test/data/status_effect.test.ts index 071dea989a9..e94cb193f0a 100644 --- a/src/test/data/status_effect.test.ts +++ b/test/data/status_effect.test.ts @@ -11,8 +11,8 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; -import { mockI18next } from "#test/utils/testUtils"; +import GameManager from "#test/testUtils/gameManager"; +import { mockI18next } from "#test/testUtils/testUtils"; import i18next from "i18next"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/eggs/egg.test.ts b/test/eggs/egg.test.ts similarity index 99% rename from src/test/eggs/egg.test.ts rename to test/eggs/egg.test.ts index d7ed07dd151..e4a7cc31709 100644 --- a/src/test/eggs/egg.test.ts +++ b/test/eggs/egg.test.ts @@ -7,7 +7,7 @@ import { VariantTier } from "#app/enums/variant-tier"; import EggData from "#app/system/egg-data"; import * as Utils from "#app/utils"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -29,7 +29,7 @@ describe("Egg Generation Tests", () => { }); beforeEach(async () => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); }); it("should return Kyogre for the 10th of June", () => { diff --git a/src/test/eggs/manaphy-egg.test.ts b/test/eggs/manaphy-egg.test.ts similarity index 96% rename from src/test/eggs/manaphy-egg.test.ts rename to test/eggs/manaphy-egg.test.ts index 5bb5b790201..c63dbae7780 100644 --- a/src/test/eggs/manaphy-egg.test.ts +++ b/test/eggs/manaphy-egg.test.ts @@ -2,7 +2,7 @@ import { Egg } from "#app/data/egg"; import { EggSourceType } from "#app/enums/egg-source-types"; import { EggTier } from "#app/enums/egg-type"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -25,7 +25,7 @@ describe("Manaphy Eggs", () => { }); beforeEach(async () => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); /** * In our tests, we will perform an "RNG sweep" by letting rngSweepProgress diff --git a/src/test/endless_boss.test.ts b/test/endless_boss.test.ts similarity index 98% rename from src/test/endless_boss.test.ts rename to test/endless_boss.test.ts index c9f3afc3936..ab7df412c12 100644 --- a/src/test/endless_boss.test.ts +++ b/test/endless_boss.test.ts @@ -2,7 +2,7 @@ import { Biome } from "#app/enums/biome"; import { Species } from "#app/enums/species"; import { GameModes } from "#app/game-mode"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import GameManager from "./utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; const EndlessBossWave = { Minor: 250, diff --git a/src/test/enemy_command.test.ts b/test/enemy_command.test.ts similarity index 98% rename from src/test/enemy_command.test.ts rename to test/enemy_command.test.ts index 647c0be279a..b8e0c38b9e8 100644 --- a/src/test/enemy_command.test.ts +++ b/test/enemy_command.test.ts @@ -6,7 +6,7 @@ import { Species } from "#app/enums/species"; import type { EnemyPokemon } from "#app/field/pokemon"; import { AiType } from "#app/field/pokemon"; import { randSeedInt } from "#app/utils"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/escape-calculations.test.ts b/test/escape-calculations.test.ts similarity index 99% rename from src/test/escape-calculations.test.ts rename to test/escape-calculations.test.ts index 419a6b4c19a..6c5c8777d01 100644 --- a/src/test/escape-calculations.test.ts +++ b/test/escape-calculations.test.ts @@ -4,7 +4,7 @@ import { Command } from "#app/ui/command-ui-handler"; import * as Utils from "#app/utils"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/evolution.test.ts b/test/evolution.test.ts similarity index 99% rename from src/test/evolution.test.ts rename to test/evolution.test.ts index 8dc19a548ca..dbd4ef3a0d7 100644 --- a/src/test/evolution.test.ts +++ b/test/evolution.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import * as Utils from "#app/utils"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/field/pokemon.test.ts b/test/field/pokemon.test.ts similarity index 99% rename from src/test/field/pokemon.test.ts rename to test/field/pokemon.test.ts index 0c282b44f49..b327fe0c137 100644 --- a/src/test/field/pokemon.test.ts +++ b/test/field/pokemon.test.ts @@ -1,6 +1,6 @@ import { Species } from "#app/enums/species"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { PokeballType } from "#enums/pokeball"; import type BattleScene from "#app/battle-scene"; import { Moves } from "#app/enums/moves"; diff --git a/src/test/final_boss.test.ts b/test/final_boss.test.ts similarity index 99% rename from src/test/final_boss.test.ts rename to test/final_boss.test.ts index 5540d9511e4..f7675c17005 100644 --- a/src/test/final_boss.test.ts +++ b/test/final_boss.test.ts @@ -5,7 +5,7 @@ import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; const FinalWave = { diff --git a/src/test/fontFace.setup.ts b/test/fontFace.setup.ts similarity index 100% rename from src/test/fontFace.setup.ts rename to test/fontFace.setup.ts diff --git a/src/test/game-mode.test.ts b/test/game-mode.test.ts similarity index 95% rename from src/test/game-mode.test.ts rename to test/game-mode.test.ts index 2c8184a30ef..3f5819f9a38 100644 --- a/src/test/game-mode.test.ts +++ b/test/game-mode.test.ts @@ -1,8 +1,8 @@ import type { GameMode } from "#app/game-mode"; import { GameModes, getGameMode } from "#app/game-mode"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as Utils from "../utils"; -import GameManager from "./utils/gameManager"; +import * as Utils from "#app/utils"; +import GameManager from "#test/testUtils/gameManager"; describe("game-mode", () => { let phaserGame: Phaser.Game; diff --git a/src/test/imports.test.ts b/test/imports.test.ts similarity index 100% rename from src/test/imports.test.ts rename to test/imports.test.ts diff --git a/src/test/inputs/inputs.test.ts b/test/inputs/inputs.test.ts similarity index 96% rename from src/test/inputs/inputs.test.ts rename to test/inputs/inputs.test.ts index 6306c1b9da6..2cdab4b3eb2 100644 --- a/src/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/utils/gameManager"; -import InputsHandler from "#test/utils/inputsHandler"; +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/src/test/internals.test.ts b/test/internals.test.ts similarity index 95% rename from src/test/internals.test.ts rename to test/internals.test.ts index ce2cd55dbc6..2cc827a8906 100644 --- a/src/test/internals.test.ts +++ b/test/internals.test.ts @@ -1,6 +1,6 @@ import { Abilities } from "#app/enums/abilities"; import { Species } from "#app/enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/items/dire_hit.test.ts b/test/items/dire_hit.test.ts similarity index 98% rename from src/test/items/dire_hit.test.ts rename to test/items/dire_hit.test.ts index 3c82ebd3a47..4a94030ab93 100644 --- a/src/test/items/dire_hit.test.ts +++ b/test/items/dire_hit.test.ts @@ -1,7 +1,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import 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"; diff --git a/src/test/items/double_battle_chance_booster.test.ts b/test/items/double_battle_chance_booster.test.ts similarity index 98% rename from src/test/items/double_battle_chance_booster.test.ts rename to test/items/double_battle_chance_booster.test.ts index cccd8d4765e..2a86a151685 100644 --- a/src/test/items/double_battle_chance_booster.test.ts +++ b/test/items/double_battle_chance_booster.test.ts @@ -1,7 +1,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { DoubleBattleChanceBoosterModifier } from "#app/modifier/modifier"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; diff --git a/src/test/items/eviolite.test.ts b/test/items/eviolite.test.ts similarity index 99% rename from src/test/items/eviolite.test.ts rename to test/items/eviolite.test.ts index a97c287da29..64038cc9b82 100644 --- a/src/test/items/eviolite.test.ts +++ b/test/items/eviolite.test.ts @@ -2,7 +2,7 @@ import { StatBoosterModifier } from "#app/modifier/modifier"; import { NumberHolder, randItem } from "#app/utils"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/exp_booster.test.ts b/test/items/exp_booster.test.ts similarity index 95% rename from src/test/items/exp_booster.test.ts rename to test/items/exp_booster.test.ts index 7441dcaeb73..4519df29b01 100644 --- a/src/test/items/exp_booster.test.ts +++ b/test/items/exp_booster.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#app/enums/abilities"; import { PokemonExpBoosterModifier } from "#app/modifier/modifier"; import * as Utils from "#app/utils"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/items/grip_claw.test.ts b/test/items/grip_claw.test.ts similarity index 98% rename from src/test/items/grip_claw.test.ts rename to test/items/grip_claw.test.ts index e0cbeb95b6f..854e0998d3b 100644 --- a/src/test/items/grip_claw.test.ts +++ b/test/items/grip_claw.test.ts @@ -5,7 +5,7 @@ import { Abilities } from "#enums/abilities"; import { BerryType } from "#enums/berry-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/leek.test.ts b/test/items/leek.test.ts similarity index 98% rename from src/test/items/leek.test.ts rename to test/items/leek.test.ts index 901b353b3d3..a3c509d19dd 100644 --- a/src/test/items/leek.test.ts +++ b/test/items/leek.test.ts @@ -2,7 +2,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import * as Utils from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/leftovers.test.ts b/test/items/leftovers.test.ts similarity index 97% rename from src/test/items/leftovers.test.ts rename to test/items/leftovers.test.ts index 672151d97cb..8d74301968f 100644 --- a/src/test/items/leftovers.test.ts +++ b/test/items/leftovers.test.ts @@ -3,7 +3,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/items/light_ball.test.ts b/test/items/light_ball.test.ts similarity index 99% rename from src/test/items/light_ball.test.ts rename to test/items/light_ball.test.ts index aae1d806a28..8dff8001ffc 100644 --- a/src/test/items/light_ball.test.ts +++ b/test/items/light_ball.test.ts @@ -4,7 +4,7 @@ import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; import * as Utils from "#app/utils"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/lock_capsule.test.ts b/test/items/lock_capsule.test.ts similarity index 96% rename from src/test/items/lock_capsule.test.ts rename to test/items/lock_capsule.test.ts index 2d95cea5847..4cdd3b8a8a0 100644 --- a/src/test/items/lock_capsule.test.ts +++ b/test/items/lock_capsule.test.ts @@ -3,7 +3,7 @@ import { Moves } from "#app/enums/moves"; import { ModifierTier } from "#app/modifier/modifier-tier"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; import { Mode } from "#app/ui/ui"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/items/metal_powder.test.ts b/test/items/metal_powder.test.ts similarity index 99% rename from src/test/items/metal_powder.test.ts rename to test/items/metal_powder.test.ts index 68c3107af08..c1345af35df 100644 --- a/src/test/items/metal_powder.test.ts +++ b/test/items/metal_powder.test.ts @@ -4,7 +4,7 @@ import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; import * as Utils from "#app/utils"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/multi_lens.test.ts b/test/items/multi_lens.test.ts similarity index 99% rename from src/test/items/multi_lens.test.ts rename to test/items/multi_lens.test.ts index bd586878fce..01447a29544 100644 --- a/src/test/items/multi_lens.test.ts +++ b/test/items/multi_lens.test.ts @@ -3,7 +3,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/quick_powder.test.ts b/test/items/quick_powder.test.ts similarity index 99% rename from src/test/items/quick_powder.test.ts rename to test/items/quick_powder.test.ts index ae16daf17ff..80ff0d7ba33 100644 --- a/src/test/items/quick_powder.test.ts +++ b/test/items/quick_powder.test.ts @@ -4,7 +4,7 @@ import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; import * as Utils from "#app/utils"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/scope_lens.test.ts b/test/items/scope_lens.test.ts similarity index 95% rename from src/test/items/scope_lens.test.ts rename to test/items/scope_lens.test.ts index e39517ceae9..98e374b6969 100644 --- a/src/test/items/scope_lens.test.ts +++ b/test/items/scope_lens.test.ts @@ -1,7 +1,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/temp_stat_stage_booster.test.ts b/test/items/temp_stat_stage_booster.test.ts similarity index 99% rename from src/test/items/temp_stat_stage_booster.test.ts rename to test/items/temp_stat_stage_booster.test.ts index 3e496d1bbf8..8bbd9f4f29d 100644 --- a/src/test/items/temp_stat_stage_booster.test.ts +++ b/test/items/temp_stat_stage_booster.test.ts @@ -1,5 +1,5 @@ import { BATTLE_STATS, Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/thick_club.test.ts b/test/items/thick_club.test.ts similarity index 99% rename from src/test/items/thick_club.test.ts rename to test/items/thick_club.test.ts index d32c213e506..f18c0bd073e 100644 --- a/src/test/items/thick_club.test.ts +++ b/test/items/thick_club.test.ts @@ -4,7 +4,7 @@ import { modifierTypes } from "#app/modifier/modifier-type"; import i18next from "#app/plugins/i18n"; import * as Utils from "#app/utils"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phase from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/items/toxic_orb.test.ts b/test/items/toxic_orb.test.ts similarity index 96% rename from src/test/items/toxic_orb.test.ts rename to test/items/toxic_orb.test.ts index 6918d7f34f0..8201036b927 100644 --- a/src/test/items/toxic_orb.test.ts +++ b/test/items/toxic_orb.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/misc.test.ts b/test/misc.test.ts similarity index 95% rename from src/test/misc.test.ts rename to test/misc.test.ts index ae91a5014d9..f2b89418ef5 100644 --- a/src/test/misc.test.ts +++ b/test/misc.test.ts @@ -1,6 +1,6 @@ // import { apiFetch } from "#app/utils"; -import GameManager from "#test/utils/gameManager"; -import { waitUntil } from "#test/utils/gameManagerUtils"; +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/src/test/moves/after_you.test.ts b/test/moves/after_you.test.ts similarity index 97% rename from src/test/moves/after_you.test.ts rename to test/moves/after_you.test.ts index 99f383194aa..bf030027436 100644 --- a/src/test/moves/after_you.test.ts +++ b/test/moves/after_you.test.ts @@ -4,7 +4,7 @@ import { MoveResult } from "#app/field/pokemon"; import { MovePhase } from "#app/phases/move-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/alluring_voice.test.ts b/test/moves/alluring_voice.test.ts similarity index 96% rename from src/test/moves/alluring_voice.test.ts rename to test/moves/alluring_voice.test.ts index 2980f102735..bf5a9f90f82 100644 --- a/src/test/moves/alluring_voice.test.ts +++ b/test/moves/alluring_voice.test.ts @@ -4,7 +4,7 @@ import { BattlerTagType } from "#app/enums/battler-tag-type"; import { BerryPhase } from "#app/phases/berry-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/aromatherapy.test.ts b/test/moves/aromatherapy.test.ts similarity index 98% rename from src/test/moves/aromatherapy.test.ts rename to test/moves/aromatherapy.test.ts index 874dadc0a1f..e70384355a0 100644 --- a/src/test/moves/aromatherapy.test.ts +++ b/test/moves/aromatherapy.test.ts @@ -3,7 +3,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/assist.test.ts b/test/moves/assist.test.ts similarity index 98% rename from src/test/moves/assist.test.ts rename to test/moves/assist.test.ts index 81633d9a277..4168ec6295a 100644 --- a/src/test/moves/assist.test.ts +++ b/test/moves/assist.test.ts @@ -5,7 +5,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/astonish.test.ts b/test/moves/astonish.test.ts similarity index 97% rename from src/test/moves/astonish.test.ts rename to test/moves/astonish.test.ts index d94e50fc9f9..87af0db737b 100644 --- a/src/test/moves/astonish.test.ts +++ b/test/moves/astonish.test.ts @@ -7,7 +7,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; diff --git a/src/test/moves/aurora_veil.test.ts b/test/moves/aurora_veil.test.ts similarity index 98% rename from src/test/moves/aurora_veil.test.ts rename to test/moves/aurora_veil.test.ts index 721f682f778..c8da3e03db5 100644 --- a/src/test/moves/aurora_veil.test.ts +++ b/test/moves/aurora_veil.test.ts @@ -10,7 +10,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/autotomize.test.ts b/test/moves/autotomize.test.ts similarity index 98% rename from src/test/moves/autotomize.test.ts rename to test/moves/autotomize.test.ts index e15642b7ce5..29d2edbcf4e 100644 --- a/src/test/moves/autotomize.test.ts +++ b/test/moves/autotomize.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/moves/baddy_bad.test.ts b/test/moves/baddy_bad.test.ts similarity index 95% rename from src/test/moves/baddy_bad.test.ts rename to test/moves/baddy_bad.test.ts index 1be25704393..78e7c63d49f 100644 --- a/src/test/moves/baddy_bad.test.ts +++ b/test/moves/baddy_bad.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/baneful_bunker.test.ts b/test/moves/baneful_bunker.test.ts similarity index 98% rename from src/test/moves/baneful_bunker.test.ts rename to test/moves/baneful_bunker.test.ts index a0fc0f21ee2..55b4b7d985e 100644 --- a/src/test/moves/baneful_bunker.test.ts +++ b/test/moves/baneful_bunker.test.ts @@ -1,6 +1,6 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/baton_pass.test.ts b/test/moves/baton_pass.test.ts similarity index 98% rename from src/test/moves/baton_pass.test.ts rename to test/moves/baton_pass.test.ts index 52e4c3ec016..6abd2d95f7b 100644 --- a/src/test/moves/baton_pass.test.ts +++ b/test/moves/baton_pass.test.ts @@ -1,5 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/beak_blast.test.ts b/test/moves/beak_blast.test.ts similarity index 98% rename from src/test/moves/beak_blast.test.ts rename to test/moves/beak_blast.test.ts index 0c1e7bbeed9..177610182b0 100644 --- a/src/test/moves/beak_blast.test.ts +++ b/test/moves/beak_blast.test.ts @@ -6,7 +6,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/beat_up.test.ts b/test/moves/beat_up.test.ts similarity index 97% rename from src/test/moves/beat_up.test.ts rename to test/moves/beat_up.test.ts index 41e5b63471f..1ac2ae238b8 100644 --- a/src/test/moves/beat_up.test.ts +++ b/test/moves/beat_up.test.ts @@ -3,7 +3,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { StatusEffect } from "#app/enums/status-effect"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/belly_drum.test.ts b/test/moves/belly_drum.test.ts similarity index 98% rename from src/test/moves/belly_drum.test.ts rename to test/moves/belly_drum.test.ts index 0bed1248e7e..7d8b17262d7 100644 --- a/src/test/moves/belly_drum.test.ts +++ b/test/moves/belly_drum.test.ts @@ -3,7 +3,7 @@ import { toDmgValue } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import { Abilities } from "#app/enums/abilities"; diff --git a/src/test/moves/burning_jealousy.test.ts b/test/moves/burning_jealousy.test.ts similarity index 98% rename from src/test/moves/burning_jealousy.test.ts rename to test/moves/burning_jealousy.test.ts index abe2c09bb72..bfa9af600a2 100644 --- a/src/test/moves/burning_jealousy.test.ts +++ b/test/moves/burning_jealousy.test.ts @@ -4,7 +4,7 @@ import { Abilities } from "#app/enums/abilities"; import { StatusEffect } from "#app/enums/status-effect"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/camouflage.test.ts b/test/moves/camouflage.test.ts similarity index 96% rename from src/test/moves/camouflage.test.ts rename to test/moves/camouflage.test.ts index 5773afffcc3..8995e2d00bb 100644 --- a/src/test/moves/camouflage.test.ts +++ b/test/moves/camouflage.test.ts @@ -4,7 +4,7 @@ import { Species } from "#enums/species"; import { TerrainType } from "#app/data/terrain"; import { Type } from "#enums/type"; import { BattlerIndex } from "#app/battle"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/ceaseless_edge.test.ts b/test/moves/ceaseless_edge.test.ts similarity index 98% rename from src/test/moves/ceaseless_edge.test.ts rename to test/moves/ceaseless_edge.test.ts index 3fbbb7b0aaf..22cf310bc80 100644 --- a/src/test/moves/ceaseless_edge.test.ts +++ b/test/moves/ceaseless_edge.test.ts @@ -6,7 +6,7 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; diff --git a/src/test/moves/chilly_reception.test.ts b/test/moves/chilly_reception.test.ts similarity index 98% rename from src/test/moves/chilly_reception.test.ts rename to test/moves/chilly_reception.test.ts index 664ca242b20..0d99175a9bc 100644 --- a/src/test/moves/chilly_reception.test.ts +++ b/test/moves/chilly_reception.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; //import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/chloroblast.test.ts b/test/moves/chloroblast.test.ts similarity index 95% rename from src/test/moves/chloroblast.test.ts rename to test/moves/chloroblast.test.ts index 5e55bf46958..ee01935291a 100644 --- a/src/test/moves/chloroblast.test.ts +++ b/test/moves/chloroblast.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/clangorous_soul.test.ts b/test/moves/clangorous_soul.test.ts similarity index 98% rename from src/test/moves/clangorous_soul.test.ts rename to test/moves/clangorous_soul.test.ts index 52e980cc4fa..6bb50b9ba59 100644 --- a/src/test/moves/clangorous_soul.test.ts +++ b/test/moves/clangorous_soul.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/copycat.test.ts b/test/moves/copycat.test.ts similarity index 98% rename from src/test/moves/copycat.test.ts rename to test/moves/copycat.test.ts index d9e64289481..9b111c7b342 100644 --- a/src/test/moves/copycat.test.ts +++ b/test/moves/copycat.test.ts @@ -5,7 +5,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/crafty_shield.test.ts b/test/moves/crafty_shield.test.ts similarity index 98% rename from src/test/moves/crafty_shield.test.ts rename to test/moves/crafty_shield.test.ts index 93dd4a02538..054d19debf8 100644 --- a/src/test/moves/crafty_shield.test.ts +++ b/test/moves/crafty_shield.test.ts @@ -1,6 +1,6 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/defog.test.ts b/test/moves/defog.test.ts similarity index 97% rename from src/test/moves/defog.test.ts rename to test/moves/defog.test.ts index c83cdc192bf..52c51df657a 100644 --- a/src/test/moves/defog.test.ts +++ b/test/moves/defog.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/destiny_bond.test.ts b/test/moves/destiny_bond.test.ts similarity index 99% rename from src/test/moves/destiny_bond.test.ts rename to test/moves/destiny_bond.test.ts index e668aee2191..9ae37ef5b9b 100644 --- a/src/test/moves/destiny_bond.test.ts +++ b/test/moves/destiny_bond.test.ts @@ -5,7 +5,7 @@ import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { BattlerIndex } from "#app/battle"; diff --git a/src/test/moves/diamond_storm.test.ts b/test/moves/diamond_storm.test.ts similarity index 96% rename from src/test/moves/diamond_storm.test.ts rename to test/moves/diamond_storm.test.ts index 6e5be2a790d..7a30f73a113 100644 --- a/src/test/moves/diamond_storm.test.ts +++ b/test/moves/diamond_storm.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/dig.test.ts b/test/moves/dig.test.ts similarity index 98% rename from src/test/moves/dig.test.ts rename to test/moves/dig.test.ts index 4c6b5d3b75d..53104f13b20 100644 --- a/src/test/moves/dig.test.ts +++ b/test/moves/dig.test.ts @@ -7,7 +7,7 @@ import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; import { MoveResult } from "#app/field/pokemon"; import { describe, beforeAll, afterEach, beforeEach, it, expect } from "vitest"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; describe("Moves - Dig", () => { let phaserGame: Phaser.Game; diff --git a/src/test/moves/disable.test.ts b/test/moves/disable.test.ts similarity index 98% rename from src/test/moves/disable.test.ts rename to test/moves/disable.test.ts index bd56201ad33..044cfc762cd 100644 --- a/src/test/moves/disable.test.ts +++ b/test/moves/disable.test.ts @@ -3,7 +3,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Disable", () => { diff --git a/src/test/moves/dive.test.ts b/test/moves/dive.test.ts similarity index 98% rename from src/test/moves/dive.test.ts rename to test/moves/dive.test.ts index b60416d7740..e8febaa72f6 100644 --- a/src/test/moves/dive.test.ts +++ b/test/moves/dive.test.ts @@ -4,7 +4,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; import { WeatherType } from "#enums/weather-type"; diff --git a/src/test/moves/doodle.test.ts b/test/moves/doodle.test.ts similarity index 97% rename from src/test/moves/doodle.test.ts rename to test/moves/doodle.test.ts index 258abda392a..6272a822094 100644 --- a/src/test/moves/doodle.test.ts +++ b/test/moves/doodle.test.ts @@ -3,7 +3,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/double_team.test.ts b/test/moves/double_team.test.ts similarity index 96% rename from src/test/moves/double_team.test.ts rename to test/moves/double_team.test.ts index 62848553e06..9145265bf93 100644 --- a/src/test/moves/double_team.test.ts +++ b/test/moves/double_team.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#app/enums/abilities"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/dragon_cheer.test.ts b/test/moves/dragon_cheer.test.ts similarity index 98% rename from src/test/moves/dragon_cheer.test.ts rename to test/moves/dragon_cheer.test.ts index 750f09214ca..44bedeaa03a 100644 --- a/src/test/moves/dragon_cheer.test.ts +++ b/test/moves/dragon_cheer.test.ts @@ -3,7 +3,7 @@ import { Type } from "#enums/type"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/dragon_rage.test.ts b/test/moves/dragon_rage.test.ts similarity index 98% rename from src/test/moves/dragon_rage.test.ts rename to test/moves/dragon_rage.test.ts index 61630ede326..0a5202825f5 100644 --- a/src/test/moves/dragon_rage.test.ts +++ b/test/moves/dragon_rage.test.ts @@ -6,7 +6,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/dragon_tail.test.ts b/test/moves/dragon_tail.test.ts similarity index 99% rename from src/test/moves/dragon_tail.test.ts rename to test/moves/dragon_tail.test.ts index 96db67279d3..8415251c24c 100644 --- a/src/test/moves/dragon_tail.test.ts +++ b/test/moves/dragon_tail.test.ts @@ -7,7 +7,7 @@ import { Type } from "#enums/type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/dynamax_cannon.test.ts b/test/moves/dynamax_cannon.test.ts similarity index 99% rename from src/test/moves/dynamax_cannon.test.ts rename to test/moves/dynamax_cannon.test.ts index 033d8960bad..0deb12b2737 100644 --- a/src/test/moves/dynamax_cannon.test.ts +++ b/test/moves/dynamax_cannon.test.ts @@ -4,7 +4,7 @@ import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/effectiveness.test.ts b/test/moves/effectiveness.test.ts similarity index 98% rename from src/test/moves/effectiveness.test.ts rename to test/moves/effectiveness.test.ts index 09c94c740cc..d9974fd1980 100644 --- a/src/test/moves/effectiveness.test.ts +++ b/test/moves/effectiveness.test.ts @@ -6,7 +6,7 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import * as Messages from "#app/messages"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/electrify.test.ts b/test/moves/electrify.test.ts similarity index 97% rename from src/test/moves/electrify.test.ts rename to test/moves/electrify.test.ts index 8015dd0a74d..f7d78a2f4d0 100644 --- a/src/test/moves/electrify.test.ts +++ b/test/moves/electrify.test.ts @@ -3,7 +3,7 @@ import { Type } from "#enums/type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/electro_shot.test.ts b/test/moves/electro_shot.test.ts similarity index 98% rename from src/test/moves/electro_shot.test.ts rename to test/moves/electro_shot.test.ts index 283154b3408..7cc7e793f4a 100644 --- a/src/test/moves/electro_shot.test.ts +++ b/test/moves/electro_shot.test.ts @@ -5,7 +5,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/moves/encore.test.ts b/test/moves/encore.test.ts similarity index 98% rename from src/test/moves/encore.test.ts rename to test/moves/encore.test.ts index 7d8dc9658bf..4cf466a7f2a 100644 --- a/src/test/moves/encore.test.ts +++ b/test/moves/encore.test.ts @@ -4,7 +4,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/endure.test.ts b/test/moves/endure.test.ts similarity index 97% rename from src/test/moves/endure.test.ts rename to test/moves/endure.test.ts index bde5a26f68e..8514470d59c 100644 --- a/src/test/moves/endure.test.ts +++ b/test/moves/endure.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/entrainment.test.ts b/test/moves/entrainment.test.ts similarity index 96% rename from src/test/moves/entrainment.test.ts rename to test/moves/entrainment.test.ts index 5d0991c8dfd..608c6ef3676 100644 --- a/src/test/moves/entrainment.test.ts +++ b/test/moves/entrainment.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/fairy_lock.test.ts b/test/moves/fairy_lock.test.ts similarity index 99% rename from src/test/moves/fairy_lock.test.ts rename to test/moves/fairy_lock.test.ts index ceb298ed0fe..627eac401cc 100644 --- a/src/test/moves/fairy_lock.test.ts +++ b/test/moves/fairy_lock.test.ts @@ -3,7 +3,7 @@ import { ArenaTagType } from "#app/enums/arena-tag-type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/fake_out.test.ts b/test/moves/fake_out.test.ts similarity index 98% rename from src/test/moves/fake_out.test.ts rename to test/moves/fake_out.test.ts index f20b6db3a13..21a129b6410 100644 --- a/src/test/moves/fake_out.test.ts +++ b/test/moves/fake_out.test.ts @@ -1,4 +1,4 @@ -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; diff --git a/src/test/moves/fell_stinger.test.ts b/test/moves/fell_stinger.test.ts similarity index 99% rename from src/test/moves/fell_stinger.test.ts rename to test/moves/fell_stinger.test.ts index a901ddced44..fdcba624e22 100644 --- a/src/test/moves/fell_stinger.test.ts +++ b/test/moves/fell_stinger.test.ts @@ -1,6 +1,6 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/fillet_away.test.ts b/test/moves/fillet_away.test.ts similarity index 98% rename from src/test/moves/fillet_away.test.ts rename to test/moves/fillet_away.test.ts index aa3243270cb..076a3011afa 100644 --- a/src/test/moves/fillet_away.test.ts +++ b/test/moves/fillet_away.test.ts @@ -3,7 +3,7 @@ import { toDmgValue } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/moves/fissure.test.ts b/test/moves/fissure.test.ts similarity index 97% rename from src/test/moves/fissure.test.ts rename to test/moves/fissure.test.ts index 65719df0205..07f2a3bfacb 100644 --- a/src/test/moves/fissure.test.ts +++ b/test/moves/fissure.test.ts @@ -5,7 +5,7 @@ import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/flame_burst.test.ts b/test/moves/flame_burst.test.ts similarity index 98% rename from src/test/moves/flame_burst.test.ts rename to test/moves/flame_burst.test.ts index 9dea930d7e8..7bcf06d92ae 100644 --- a/src/test/moves/flame_burst.test.ts +++ b/test/moves/flame_burst.test.ts @@ -4,7 +4,7 @@ import type Pokemon from "#app/field/pokemon"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/flower_shield.test.ts b/test/moves/flower_shield.test.ts similarity index 98% rename from src/test/moves/flower_shield.test.ts rename to test/moves/flower_shield.test.ts index 4c03df5212b..d6f79c40533 100644 --- a/src/test/moves/flower_shield.test.ts +++ b/test/moves/flower_shield.test.ts @@ -6,7 +6,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/fly.test.ts b/test/moves/fly.test.ts similarity index 98% rename from src/test/moves/fly.test.ts rename to test/moves/fly.test.ts index 6ae758fe3dc..b0abf96e128 100644 --- a/src/test/moves/fly.test.ts +++ b/test/moves/fly.test.ts @@ -4,7 +4,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; import { BattlerIndex } from "#app/battle"; diff --git a/src/test/moves/focus_punch.test.ts b/test/moves/focus_punch.test.ts similarity index 79% rename from src/test/moves/focus_punch.test.ts rename to test/moves/focus_punch.test.ts index 352e3b60aa4..9bf858dfda5 100644 --- a/src/test/moves/focus_punch.test.ts +++ b/test/moves/focus_punch.test.ts @@ -6,9 +6,10 @@ import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; +import i18next from "i18next"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Focus Punch", () => { @@ -41,7 +42,7 @@ describe("Moves - Focus Punch", () => { it( "should deal damage at the end of turn if uninterrupted", async () => { - await game.startBattle([ Species.CHARIZARD ]); + await game.classicMode.startBattle([ Species.CHARIZARD ]); const leadPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -68,7 +69,7 @@ describe("Moves - Focus Punch", () => { async () => { game.override.enemyMoveset([ Moves.TACKLE ]); - await game.startBattle([ Species.CHARIZARD ]); + await game.classicMode.startBattle([ Species.CHARIZARD ]); const leadPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -95,7 +96,7 @@ describe("Moves - Focus Punch", () => { async () => { game.override.enemyMoveset([ Moves.SPORE ]); - await game.startBattle([ Species.CHARIZARD ]); + await game.classicMode.startBattle([ Species.CHARIZARD ]); const leadPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -119,7 +120,7 @@ describe("Moves - Focus Punch", () => { /** Guarantee a Trainer battle with multiple enemy Pokemon */ game.override.startingWave(25); - await game.startBattle([ Species.CHARIZARD ]); + await game.classicMode.startBattle([ Species.CHARIZARD ]); game.forceEnemyToSwitch(); game.move.select(Moves.FOCUS_PUNCH); @@ -130,4 +131,15 @@ describe("Moves - Focus Punch", () => { expect(game.scene.phaseQueue.find(phase => phase instanceof MoveHeaderPhase)).toBeDefined(); } ); + it("should replace the 'but it failed' text when the user gets hit", async () => { + game.override.enemyMoveset([ Moves.TACKLE ]); + await game.classicMode.startBattle([ Species.CHARIZARD ]); + + game.move.select(Moves.FOCUS_PUNCH); + await game.phaseInterceptor.to("MoveEndPhase", true); + await game.phaseInterceptor.to("MessagePhase", false); + const consoleSpy = vi.spyOn(console, "log"); + await game.phaseInterceptor.to("MoveEndPhase", true); + expect(consoleSpy).nthCalledWith(1, i18next.t("moveTriggers:lostFocus")); + }); }); diff --git a/src/test/moves/follow_me.test.ts b/test/moves/follow_me.test.ts similarity index 98% rename from src/test/moves/follow_me.test.ts rename to test/moves/follow_me.test.ts index fba7937f812..bef9b9ddb01 100644 --- a/src/test/moves/follow_me.test.ts +++ b/test/moves/follow_me.test.ts @@ -4,7 +4,7 @@ import { Abilities } from "#app/enums/abilities"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/moves/foresight.test.ts b/test/moves/foresight.test.ts similarity index 97% rename from src/test/moves/foresight.test.ts rename to test/moves/foresight.test.ts index 1195cd0b71b..7dccd0fefca 100644 --- a/src/test/moves/foresight.test.ts +++ b/test/moves/foresight.test.ts @@ -1,7 +1,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/forests_curse.test.ts b/test/moves/forests_curse.test.ts similarity index 96% rename from src/test/moves/forests_curse.test.ts rename to test/moves/forests_curse.test.ts index 010b00599a5..c9977190c9d 100644 --- a/src/test/moves/forests_curse.test.ts +++ b/test/moves/forests_curse.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Type } from "#enums/type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/freeze_dry.test.ts b/test/moves/freeze_dry.test.ts similarity index 99% rename from src/test/moves/freeze_dry.test.ts rename to test/moves/freeze_dry.test.ts index f207e297191..f07105882c2 100644 --- a/src/test/moves/freeze_dry.test.ts +++ b/test/moves/freeze_dry.test.ts @@ -4,7 +4,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { Type } from "#enums/type"; import { Challenges } from "#enums/challenges"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/freezy_frost.test.ts b/test/moves/freezy_frost.test.ts similarity index 98% rename from src/test/moves/freezy_frost.test.ts rename to test/moves/freezy_frost.test.ts index 09d7779474f..26c7d06961f 100644 --- a/src/test/moves/freezy_frost.test.ts +++ b/test/moves/freezy_frost.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { allMoves } from "#app/data/move"; diff --git a/src/test/moves/fusion_bolt.test.ts b/test/moves/fusion_bolt.test.ts similarity index 96% rename from src/test/moves/fusion_bolt.test.ts rename to test/moves/fusion_bolt.test.ts index 4e35b939abf..9bb53ef8fb0 100644 --- a/src/test/moves/fusion_bolt.test.ts +++ b/test/moves/fusion_bolt.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/fusion_flare.test.ts b/test/moves/fusion_flare.test.ts similarity index 96% rename from src/test/moves/fusion_flare.test.ts rename to test/moves/fusion_flare.test.ts index 75641c04d02..02f5b19d97f 100644 --- a/src/test/moves/fusion_flare.test.ts +++ b/test/moves/fusion_flare.test.ts @@ -2,7 +2,7 @@ import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/fusion_flare_bolt.test.ts b/test/moves/fusion_flare_bolt.test.ts similarity index 99% rename from src/test/moves/fusion_flare_bolt.test.ts rename to test/moves/fusion_flare_bolt.test.ts index dbd4479dff8..340020c85b7 100644 --- a/src/test/moves/fusion_flare_bolt.test.ts +++ b/test/moves/fusion_flare_bolt.test.ts @@ -7,7 +7,7 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MovePhase } from "#app/phases/move-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/future_sight.test.ts b/test/moves/future_sight.test.ts similarity index 95% rename from src/test/moves/future_sight.test.ts rename to test/moves/future_sight.test.ts index d0110a87202..e0a9a1efd04 100644 --- a/src/test/moves/future_sight.test.ts +++ b/test/moves/future_sight.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/gastro_acid.test.ts b/test/moves/gastro_acid.test.ts similarity index 97% rename from src/test/moves/gastro_acid.test.ts rename to test/moves/gastro_acid.test.ts index ec9246c855c..2e4f7938306 100644 --- a/src/test/moves/gastro_acid.test.ts +++ b/test/moves/gastro_acid.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { MoveResult } from "#app/field/pokemon"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/geomancy.test.ts b/test/moves/geomancy.test.ts similarity index 97% rename from src/test/moves/geomancy.test.ts rename to test/moves/geomancy.test.ts index 9ff3a1e7a7d..914e4f7188a 100644 --- a/src/test/moves/geomancy.test.ts +++ b/test/moves/geomancy.test.ts @@ -4,7 +4,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/moves/gigaton_hammer.test.ts b/test/moves/gigaton_hammer.test.ts similarity index 97% rename from src/test/moves/gigaton_hammer.test.ts rename to test/moves/gigaton_hammer.test.ts index f54700fe660..37735b29a3b 100644 --- a/src/test/moves/gigaton_hammer.test.ts +++ b/test/moves/gigaton_hammer.test.ts @@ -1,5 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; diff --git a/src/test/moves/glaive_rush.test.ts b/test/moves/glaive_rush.test.ts similarity index 98% rename from src/test/moves/glaive_rush.test.ts rename to test/moves/glaive_rush.test.ts index 9cfbfdd8727..557d003e541 100644 --- a/src/test/moves/glaive_rush.test.ts +++ b/test/moves/glaive_rush.test.ts @@ -2,7 +2,7 @@ import { allMoves } from "#app/data/move"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/growth.test.ts b/test/moves/growth.test.ts similarity index 96% rename from src/test/moves/growth.test.ts rename to test/moves/growth.test.ts index a66e4ec6719..dfc41acd757 100644 --- a/src/test/moves/growth.test.ts +++ b/test/moves/growth.test.ts @@ -1,5 +1,5 @@ import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/grudge.test.ts b/test/moves/grudge.test.ts similarity index 98% rename from src/test/moves/grudge.test.ts rename to test/moves/grudge.test.ts index 340808929ab..4b9683dd417 100644 --- a/src/test/moves/grudge.test.ts +++ b/test/moves/grudge.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { BattlerIndex } from "#app/battle"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/guard_split.test.ts b/test/moves/guard_split.test.ts similarity index 97% rename from src/test/moves/guard_split.test.ts rename to test/moves/guard_split.test.ts index 519f347b920..af5023608d3 100644 --- a/src/test/moves/guard_split.test.ts +++ b/test/moves/guard_split.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/guard_swap.test.ts b/test/moves/guard_swap.test.ts similarity index 97% rename from src/test/moves/guard_swap.test.ts rename to test/moves/guard_swap.test.ts index 99769b32899..592307ff168 100644 --- a/src/test/moves/guard_swap.test.ts +++ b/test/moves/guard_swap.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/hard_press.test.ts b/test/moves/hard_press.test.ts similarity index 97% rename from src/test/moves/hard_press.test.ts rename to test/moves/hard_press.test.ts index 0fa4181491c..29a386207ad 100644 --- a/src/test/moves/hard_press.test.ts +++ b/test/moves/hard_press.test.ts @@ -3,7 +3,7 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/haze.test.ts b/test/moves/haze.test.ts similarity index 97% rename from src/test/moves/haze.test.ts rename to test/moves/haze.test.ts index 30aab8bd98c..11071bdc07d 100644 --- a/src/test/moves/haze.test.ts +++ b/test/moves/haze.test.ts @@ -1,5 +1,5 @@ import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/heal_bell.test.ts b/test/moves/heal_bell.test.ts similarity index 98% rename from src/test/moves/heal_bell.test.ts rename to test/moves/heal_bell.test.ts index b180588d3a3..72957ee21e7 100644 --- a/src/test/moves/heal_bell.test.ts +++ b/test/moves/heal_bell.test.ts @@ -3,7 +3,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/heal_block.test.ts b/test/moves/heal_block.test.ts similarity index 98% rename from src/test/moves/heal_block.test.ts rename to test/moves/heal_block.test.ts index 25f2076ff3e..a0e8eaf541c 100644 --- a/src/test/moves/heal_block.test.ts +++ b/test/moves/heal_block.test.ts @@ -1,6 +1,6 @@ import { BattlerIndex } from "#app/battle"; import { ArenaTagSide } from "#app/data/arena-tag"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type"; diff --git a/src/test/moves/heart_swap.test.ts b/test/moves/heart_swap.test.ts similarity index 96% rename from src/test/moves/heart_swap.test.ts rename to test/moves/heart_swap.test.ts index a128549c459..43569a32a69 100644 --- a/src/test/moves/heart_swap.test.ts +++ b/test/moves/heart_swap.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/hyper_beam.test.ts b/test/moves/hyper_beam.test.ts similarity index 97% rename from src/test/moves/hyper_beam.test.ts rename to test/moves/hyper_beam.test.ts index af8440a0911..5869655948c 100644 --- a/src/test/moves/hyper_beam.test.ts +++ b/test/moves/hyper_beam.test.ts @@ -5,7 +5,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { BerryPhase } from "#app/phases/berry-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/imprison.test.ts b/test/moves/imprison.test.ts similarity index 98% rename from src/test/moves/imprison.test.ts rename to test/moves/imprison.test.ts index f10e20dab63..85d529d7a74 100644 --- a/src/test/moves/imprison.test.ts +++ b/test/moves/imprison.test.ts @@ -1,7 +1,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/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"; diff --git a/src/test/moves/instruct.test.ts b/test/moves/instruct.test.ts similarity index 99% rename from src/test/moves/instruct.test.ts rename to test/moves/instruct.test.ts index b26f9c9669f..db9801932cc 100644 --- a/src/test/moves/instruct.test.ts +++ b/test/moves/instruct.test.ts @@ -5,7 +5,7 @@ import type { MovePhase } from "#app/phases/move-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/jaw_lock.test.ts b/test/moves/jaw_lock.test.ts similarity index 99% rename from src/test/moves/jaw_lock.test.ts rename to test/moves/jaw_lock.test.ts index 30dbcac64a8..4f9c6481a9a 100644 --- a/src/test/moves/jaw_lock.test.ts +++ b/test/moves/jaw_lock.test.ts @@ -5,7 +5,7 @@ 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 "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; diff --git a/src/test/moves/lash_out.test.ts b/test/moves/lash_out.test.ts similarity index 96% rename from src/test/moves/lash_out.test.ts rename to test/moves/lash_out.test.ts index 014c0ae8fe5..3fe5c56dd3e 100644 --- a/src/test/moves/lash_out.test.ts +++ b/test/moves/lash_out.test.ts @@ -3,7 +3,7 @@ import { allMoves } from "#app/data/move"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/last_respects.test.ts b/test/moves/last_respects.test.ts similarity index 99% rename from src/test/moves/last_respects.test.ts rename to test/moves/last_respects.test.ts index 71a76e3fa1a..54e4bc5a0bc 100644 --- a/src/test/moves/last_respects.test.ts +++ b/test/moves/last_respects.test.ts @@ -2,7 +2,7 @@ import { Moves } from "#enums/moves"; import { BattlerIndex } from "#app/battle"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { allMoves } from "#app/data/move"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import Phaser from "phaser"; diff --git a/src/test/moves/light_screen.test.ts b/test/moves/light_screen.test.ts similarity index 98% rename from src/test/moves/light_screen.test.ts rename to test/moves/light_screen.test.ts index 424f43e155c..8eee58c8e17 100644 --- a/src/test/moves/light_screen.test.ts +++ b/test/moves/light_screen.test.ts @@ -9,7 +9,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { NumberHolder } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/lucky_chant.test.ts b/test/moves/lucky_chant.test.ts similarity index 98% rename from src/test/moves/lucky_chant.test.ts rename to test/moves/lucky_chant.test.ts index 02e9dd24465..7f943732192 100644 --- a/src/test/moves/lucky_chant.test.ts +++ b/test/moves/lucky_chant.test.ts @@ -5,7 +5,7 @@ import { Species } from "#app/enums/species"; import { BerryPhase } from "#app/phases/berry-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; describe("Moves - Lucky Chant", () => { diff --git a/src/test/moves/lunar_blessing.test.ts b/test/moves/lunar_blessing.test.ts similarity index 97% rename from src/test/moves/lunar_blessing.test.ts rename to test/moves/lunar_blessing.test.ts index 52c41a30e11..a81e967a6d9 100644 --- a/src/test/moves/lunar_blessing.test.ts +++ b/test/moves/lunar_blessing.test.ts @@ -3,7 +3,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/lunar_dance.test.ts b/test/moves/lunar_dance.test.ts similarity index 98% rename from src/test/moves/lunar_dance.test.ts rename to test/moves/lunar_dance.test.ts index 603247298ac..37e96e0dc3e 100644 --- a/src/test/moves/lunar_dance.test.ts +++ b/test/moves/lunar_dance.test.ts @@ -3,7 +3,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/moves/magic_coat.test.ts b/test/moves/magic_coat.test.ts similarity index 99% rename from src/test/moves/magic_coat.test.ts rename to test/moves/magic_coat.test.ts index 7371c89d4ac..6ecbea435b6 100644 --- a/src/test/moves/magic_coat.test.ts +++ b/test/moves/magic_coat.test.ts @@ -9,7 +9,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Moves - Magic Coat", () => { diff --git a/src/test/moves/magnet_rise.test.ts b/test/moves/magnet_rise.test.ts similarity index 97% rename from src/test/moves/magnet_rise.test.ts rename to test/moves/magnet_rise.test.ts index b26bbf42ed0..e4ceeaea929 100644 --- a/src/test/moves/magnet_rise.test.ts +++ b/test/moves/magnet_rise.test.ts @@ -2,7 +2,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/make_it_rain.test.ts b/test/moves/make_it_rain.test.ts similarity index 98% rename from src/test/moves/make_it_rain.test.ts rename to test/moves/make_it_rain.test.ts index 08021227e9c..8de6777bddf 100644 --- a/src/test/moves/make_it_rain.test.ts +++ b/test/moves/make_it_rain.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import 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"; diff --git a/src/test/moves/mat_block.test.ts b/test/moves/mat_block.test.ts similarity index 98% rename from src/test/moves/mat_block.test.ts rename to test/moves/mat_block.test.ts index a4d9177cbdc..b9e66253058 100644 --- a/src/test/moves/mat_block.test.ts +++ b/test/moves/mat_block.test.ts @@ -1,6 +1,6 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/metal_burst.test.ts b/test/moves/metal_burst.test.ts similarity index 98% rename from src/test/moves/metal_burst.test.ts rename to test/moves/metal_burst.test.ts index 3b32dd322a3..7f7cfa841da 100644 --- a/src/test/moves/metal_burst.test.ts +++ b/test/moves/metal_burst.test.ts @@ -3,7 +3,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/metronome.test.ts b/test/moves/metronome.test.ts similarity index 98% rename from src/test/moves/metronome.test.ts rename to test/moves/metronome.test.ts index 946dc92de0f..85c027b62e3 100644 --- a/src/test/moves/metronome.test.ts +++ b/test/moves/metronome.test.ts @@ -5,7 +5,7 @@ import { Stat } from "#app/enums/stat"; import { CommandPhase } from "#app/phases/command-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/miracle_eye.test.ts b/test/moves/miracle_eye.test.ts similarity index 96% rename from src/test/moves/miracle_eye.test.ts rename to test/moves/miracle_eye.test.ts index 70f487de942..068f4f70493 100644 --- a/src/test/moves/miracle_eye.test.ts +++ b/test/moves/miracle_eye.test.ts @@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/mirror_move.test.ts b/test/moves/mirror_move.test.ts similarity index 98% rename from src/test/moves/mirror_move.test.ts rename to test/moves/mirror_move.test.ts index e55c55038ae..a6fe90548be 100644 --- a/src/test/moves/mirror_move.test.ts +++ b/test/moves/mirror_move.test.ts @@ -4,7 +4,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/mist.test.ts b/test/moves/mist.test.ts similarity index 96% rename from src/test/moves/mist.test.ts rename to test/moves/mist.test.ts index cd338f79412..a9b69bccc6c 100644 --- a/src/test/moves/mist.test.ts +++ b/test/moves/mist.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/moongeist_beam.test.ts b/test/moves/moongeist_beam.test.ts similarity index 97% rename from src/test/moves/moongeist_beam.test.ts rename to test/moves/moongeist_beam.test.ts index 216eee482fb..15a5787be41 100644 --- a/src/test/moves/moongeist_beam.test.ts +++ b/test/moves/moongeist_beam.test.ts @@ -2,7 +2,7 @@ import { allMoves, RandomMoveAttr } from "#app/data/move"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/multi_target.test.ts b/test/moves/multi_target.test.ts similarity index 98% rename from src/test/moves/multi_target.test.ts rename to test/moves/multi_target.test.ts index 965876d3445..a2379524c73 100644 --- a/src/test/moves/multi_target.test.ts +++ b/test/moves/multi_target.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#app/enums/abilities"; import { Species } from "#app/enums/species"; import * as Utils from "#app/utils"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/nightmare.test.ts b/test/moves/nightmare.test.ts similarity index 96% rename from src/test/moves/nightmare.test.ts rename to test/moves/nightmare.test.ts index 850b0793b1e..0a2392fe833 100644 --- a/src/test/moves/nightmare.test.ts +++ b/test/moves/nightmare.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/obstruct.test.ts b/test/moves/obstruct.test.ts similarity index 98% rename from src/test/moves/obstruct.test.ts rename to test/moves/obstruct.test.ts index 1649c199e32..e2c469e21f0 100644 --- a/src/test/moves/obstruct.test.ts +++ b/test/moves/obstruct.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/octolock.test.ts b/test/moves/octolock.test.ts similarity index 98% rename from src/test/moves/octolock.test.ts rename to test/moves/octolock.test.ts index 6ca96eeb464..882a2357e1a 100644 --- a/src/test/moves/octolock.test.ts +++ b/test/moves/octolock.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/order_up.test.ts b/test/moves/order_up.test.ts similarity index 98% rename from src/test/moves/order_up.test.ts rename to test/moves/order_up.test.ts index a9281b121b2..339f3f31584 100644 --- a/src/test/moves/order_up.test.ts +++ b/test/moves/order_up.test.ts @@ -6,7 +6,7 @@ import { Stat } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/parting_shot.test.ts b/test/moves/parting_shot.test.ts similarity index 99% rename from src/test/moves/parting_shot.test.ts rename to test/moves/parting_shot.test.ts index 30ad3660a32..43a6d833949 100644 --- a/src/test/moves/parting_shot.test.ts +++ b/test/moves/parting_shot.test.ts @@ -3,7 +3,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, test } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Stat } from "#enums/stat"; import { BerryPhase } from "#app/phases/berry-phase"; import { FaintPhase } from "#app/phases/faint-phase"; diff --git a/src/test/moves/plasma_fists.test.ts b/test/moves/plasma_fists.test.ts similarity index 98% rename from src/test/moves/plasma_fists.test.ts rename to test/moves/plasma_fists.test.ts index 4075c1ab988..5a2ec90f60b 100644 --- a/src/test/moves/plasma_fists.test.ts +++ b/test/moves/plasma_fists.test.ts @@ -3,7 +3,7 @@ import { Type } from "#enums/type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/pledge_moves.test.ts b/test/moves/pledge_moves.test.ts similarity index 99% rename from src/test/moves/pledge_moves.test.ts rename to test/moves/pledge_moves.test.ts index 64d586e7ba4..24fff05a25d 100644 --- a/src/test/moves/pledge_moves.test.ts +++ b/test/moves/pledge_moves.test.ts @@ -9,7 +9,7 @@ import { toDmgValue } from "#app/utils"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/powder.test.ts b/test/moves/powder.test.ts similarity index 99% rename from src/test/moves/powder.test.ts rename to test/moves/powder.test.ts index a1db2bced3a..24162825230 100644 --- a/src/test/moves/powder.test.ts +++ b/test/moves/powder.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/power_shift.test.ts b/test/moves/power_shift.test.ts similarity index 97% rename from src/test/moves/power_shift.test.ts rename to test/moves/power_shift.test.ts index e389f77bedf..bb98d8cf3ed 100644 --- a/src/test/moves/power_shift.test.ts +++ b/test/moves/power_shift.test.ts @@ -2,7 +2,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/power_split.test.ts b/test/moves/power_split.test.ts similarity index 97% rename from src/test/moves/power_split.test.ts rename to test/moves/power_split.test.ts index 914fa86e491..69ea92c69ef 100644 --- a/src/test/moves/power_split.test.ts +++ b/test/moves/power_split.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/power_swap.test.ts b/test/moves/power_swap.test.ts similarity index 97% rename from src/test/moves/power_swap.test.ts rename to test/moves/power_swap.test.ts index e9a4b569c92..637714f1277 100644 --- a/src/test/moves/power_swap.test.ts +++ b/test/moves/power_swap.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/power_trick.test.ts b/test/moves/power_trick.test.ts similarity index 98% rename from src/test/moves/power_trick.test.ts rename to test/moves/power_trick.test.ts index a064a43dec4..e60172b5304 100644 --- a/src/test/moves/power_trick.test.ts +++ b/test/moves/power_trick.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Moves } from "#enums/moves"; import { Stat } from "#enums/stat"; import { Species } from "#enums/species"; diff --git a/src/test/moves/protect.test.ts b/test/moves/protect.test.ts similarity index 98% rename from src/test/moves/protect.test.ts rename to test/moves/protect.test.ts index e639969ddf0..d502e997483 100644 --- a/src/test/moves/protect.test.ts +++ b/test/moves/protect.test.ts @@ -1,6 +1,6 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/psycho_shift.test.ts b/test/moves/psycho_shift.test.ts similarity index 96% rename from src/test/moves/psycho_shift.test.ts rename to test/moves/psycho_shift.test.ts index 448a8c99ef0..d5890a3af0b 100644 --- a/src/test/moves/psycho_shift.test.ts +++ b/test/moves/psycho_shift.test.ts @@ -2,7 +2,7 @@ import { StatusEffect } from "#app/enums/status-effect"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/purify.test.ts b/test/moves/purify.test.ts similarity index 97% rename from src/test/moves/purify.test.ts rename to test/moves/purify.test.ts index d72b4a87d2a..eba8e9d851f 100644 --- a/src/test/moves/purify.test.ts +++ b/test/moves/purify.test.ts @@ -5,7 +5,7 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/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/quash.test.ts b/test/moves/quash.test.ts new file mode 100644 index 00000000000..dd91820a8db --- /dev/null +++ b/test/moves/quash.test.ts @@ -0,0 +1,99 @@ +import { Species } from "#enums/species"; +import { Moves } from "#enums/moves"; +import { Abilities } from "#app/enums/abilities"; +import { BattlerIndex } from "#app/battle"; +import { WeatherType } from "#enums/weather-type"; +import { MoveResult } from "#app/field/pokemon"; +import GameManager from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { describe, beforeAll, afterEach, beforeEach, it, expect } from "vitest"; + +describe("Moves - Quash", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("double") + .enemyLevel(1) + .enemySpecies(Species.SLOWPOKE) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset([ Moves.RAIN_DANCE, Moves.SPLASH ]) + .ability(Abilities.BALL_FETCH) + .moveset([ Moves.QUASH, Moves.SUNNY_DAY, Moves.RAIN_DANCE, Moves.SPLASH ]); + }); + + it("makes the target move last in a turn, ignoring priority", async () => { + await game.classicMode.startBattle([ Species.ACCELGOR, Species.RATTATA ]); + + game.move.select(Moves.QUASH, 0, BattlerIndex.PLAYER_2); + game.move.select(Moves.SUNNY_DAY, 1); + await game.forceEnemyMove(Moves.SPLASH); + await game.forceEnemyMove(Moves.RAIN_DANCE); + + await game.phaseInterceptor.to("TurnEndPhase", false); + // will be sunny if player_2 moved last because of quash, rainy otherwise + expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.SUNNY); + }); + + it("fails if the target has already moved", async () => { + await game.classicMode.startBattle([ Species.ACCELGOR, Species.RATTATA ]); + game.move.select(Moves.SPLASH, 0); + game.move.select(Moves.QUASH, 1, BattlerIndex.PLAYER); + + await game.phaseInterceptor.to("MoveEndPhase"); + await game.phaseInterceptor.to("MoveEndPhase"); + + expect(game.scene.getPlayerField()[1].getLastXMoves(1)[0].result).toBe(MoveResult.FAIL); + }); + + it("makes multiple quashed targets move in speed order at the end of the turn", async () => { + game.override.enemySpecies(Species.NINJASK) + .enemyLevel(100); + + await game.classicMode.startBattle([ Species.ACCELGOR, Species.RATTATA ]); + + // both users are quashed - rattata is slower so sun should be up at end of turn + game.move.select(Moves.RAIN_DANCE, 0); + game.move.select(Moves.SUNNY_DAY, 1); + + await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER); + await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER_2); + + await game.phaseInterceptor.to("TurnEndPhase", false); + expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.SUNNY); + }); + + it("respects trick room", async () => { + game.override.enemyMoveset([ Moves.RAIN_DANCE, Moves.SPLASH, Moves.TRICK_ROOM ]); + + await game.classicMode.startBattle([ Species.ACCELGOR, Species.RATTATA ]); + game.move.select(Moves.SPLASH, 0); + game.move.select(Moves.SPLASH, 1); + + await game.forceEnemyMove(Moves.TRICK_ROOM); + await game.forceEnemyMove(Moves.SPLASH); + await game.phaseInterceptor.to("TurnInitPhase"); + // both users are quashed - accelgor should move last w/ TR so rain should be up at end of turn + game.move.select(Moves.RAIN_DANCE, 0); + game.move.select(Moves.SUNNY_DAY, 1); + + await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER); + await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER_2); + + await game.phaseInterceptor.to("TurnEndPhase", false); + expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.RAIN); + }); + +}); diff --git a/src/test/moves/quick_guard.test.ts b/test/moves/quick_guard.test.ts similarity index 98% rename from src/test/moves/quick_guard.test.ts rename to test/moves/quick_guard.test.ts index 7bda71782aa..c326e77d057 100644 --- a/src/test/moves/quick_guard.test.ts +++ b/test/moves/quick_guard.test.ts @@ -1,6 +1,6 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/rage_fist.test.ts b/test/moves/rage_fist.test.ts similarity index 98% rename from src/test/moves/rage_fist.test.ts rename to test/moves/rage_fist.test.ts index a85be5a88d9..4d17cf990f7 100644 --- a/src/test/moves/rage_fist.test.ts +++ b/test/moves/rage_fist.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { allMoves } from "#app/data/move"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/rage_powder.test.ts b/test/moves/rage_powder.test.ts similarity index 97% rename from src/test/moves/rage_powder.test.ts rename to test/moves/rage_powder.test.ts index 1b73a7f0f5f..15a9bfd951c 100644 --- a/src/test/moves/rage_powder.test.ts +++ b/test/moves/rage_powder.test.ts @@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/moves/reflect.test.ts b/test/moves/reflect.test.ts similarity index 98% rename from src/test/moves/reflect.test.ts rename to test/moves/reflect.test.ts index aa9f2095c89..edc3f1ab8aa 100644 --- a/src/test/moves/reflect.test.ts +++ b/test/moves/reflect.test.ts @@ -9,7 +9,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { NumberHolder } from "#app/utils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/reflect_type.test.ts b/test/moves/reflect_type.test.ts similarity index 97% rename from src/test/moves/reflect_type.test.ts rename to test/moves/reflect_type.test.ts index 50e0fc2fbe6..575f4b88f86 100644 --- a/src/test/moves/reflect_type.test.ts +++ b/test/moves/reflect_type.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Type } from "#enums/type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/relic_song.test.ts b/test/moves/relic_song.test.ts similarity index 97% rename from src/test/moves/relic_song.test.ts rename to test/moves/relic_song.test.ts index c09514850eb..f28047bb90e 100644 --- a/src/test/moves/relic_song.test.ts +++ b/test/moves/relic_song.test.ts @@ -3,7 +3,7 @@ import { Challenges } from "#app/enums/challenges"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/retaliate.test.ts b/test/moves/retaliate.test.ts similarity index 96% rename from src/test/moves/retaliate.test.ts rename to test/moves/retaliate.test.ts index e00b9da6010..32d5379f05e 100644 --- a/src/test/moves/retaliate.test.ts +++ b/test/moves/retaliate.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Moves } from "#enums/moves"; import { allMoves } from "#app/data/move"; diff --git a/test/moves/revival_blessing.test.ts b/test/moves/revival_blessing.test.ts new file mode 100644 index 00000000000..647771fa23b --- /dev/null +++ b/test/moves/revival_blessing.test.ts @@ -0,0 +1,117 @@ +import { BattlerIndex } from "#app/battle"; +import { MoveResult } from "#app/field/pokemon"; +import { toDmgValue } from "#app/utils"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Moves - Revival Blessing", () => { + 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([ Moves.SPLASH, Moves.REVIVAL_BLESSING, Moves.MEMENTO ]) + .ability(Abilities.BALL_FETCH) + .battleType("single") + .disableCrits() + .enemySpecies(Species.MAGIKARP) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(Moves.SPLASH); + }); + + it("should revive a selected fainted Pokemon when used by the player", async () => { + await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]); + + game.move.select(Moves.MEMENTO); + game.doSelectPartyPokemon(1, "SwitchPhase"); + await game.toNextTurn(); + + const player = game.scene.getPlayerPokemon()!; + + expect(player.species.speciesId).toBe(Species.MAGIKARP); + game.move.select(Moves.REVIVAL_BLESSING); + + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); + game.doSelectPartyPokemon(1, "RevivalBlessingPhase"); + + await game.phaseInterceptor.to("MoveEndPhase", false); + + const revivedPokemon = game.scene.getPlayerParty()[1]; + expect(revivedPokemon.status?.effect).toBeFalsy(); + expect(revivedPokemon.hp).toBe(Math.floor(revivedPokemon.getMaxHp() / 2)); + }); + + it("should revive a random fainted enemy when used by an enemy Trainer", async () => { + game.override.enemyMoveset(Moves.REVIVAL_BLESSING).startingWave(8); + + await game.classicMode.startBattle([ Species.MAGIKARP ]); + + game.move.select(Moves.SPLASH); + await game.doKillOpponents(); + + await game.toNextTurn(); + game.move.select(Moves.SPLASH); + await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]); + + await game.phaseInterceptor.to("MoveEndPhase", false); + + const revivedPokemon = game.scene.getEnemyParty()[1]; + expect(revivedPokemon.status?.effect).toBeFalsy(); + expect(revivedPokemon.hp).toBe(Math.floor(revivedPokemon.getMaxHp() / 2)); + }); + + it("should fail when there are no fainted Pokemon to target", async () => { + await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]); + + game.move.select(Moves.REVIVAL_BLESSING); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); + await game.phaseInterceptor.to("MoveEndPhase", false); + + const player = game.scene.getPlayerPokemon()!; + expect(player.getLastXMoves()[0].result).toBe(MoveResult.FAIL); + }); + + it("should revive a player pokemon and immediately send it back out if used in the same turn it fainted in doubles", async () => { + game.override + .battleType("double") + .enemyMoveset([ Moves.SPLASH, Moves.FISSURE ]) + .enemyAbility(Abilities.NO_GUARD) + .enemyLevel(100); + await game.classicMode.startBattle([ Species.FEEBAS, Species.MILOTIC, Species.GYARADOS ]); + + const feebas = game.scene.getPlayerField()[0]; + + game.move.select(Moves.SPLASH); + game.move.select(Moves.REVIVAL_BLESSING, 1); + await game.forceEnemyMove(Moves.FISSURE, BattlerIndex.PLAYER); + await game.forceEnemyMove(Moves.SPLASH); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2 ]); + + await game.phaseInterceptor.to("MoveEndPhase"); + await game.phaseInterceptor.to("MoveEndPhase"); + + expect(feebas.isFainted()).toBe(true); + + game.doSelectPartyPokemon(0, "RevivalBlessingPhase"); + await game.toNextTurn(); + + expect(feebas.isFainted()).toBe(false); + expect(feebas.hp).toBe(toDmgValue(0.5 * feebas.getMaxHp())); + expect(game.scene.getPlayerField()[0]).toBe(feebas); + }); +}); diff --git a/src/test/moves/role_play.test.ts b/test/moves/role_play.test.ts similarity index 96% rename from src/test/moves/role_play.test.ts rename to test/moves/role_play.test.ts index a37f4faac9b..edc41de5c68 100644 --- a/src/test/moves/role_play.test.ts +++ b/test/moves/role_play.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/rollout.test.ts b/test/moves/rollout.test.ts similarity index 98% rename from src/test/moves/rollout.test.ts rename to test/moves/rollout.test.ts index 199f4e1dcf2..c58ab3e6a18 100644 --- a/src/test/moves/rollout.test.ts +++ b/test/moves/rollout.test.ts @@ -3,7 +3,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/roost.test.ts b/test/moves/roost.test.ts similarity index 99% rename from src/test/moves/roost.test.ts rename to test/moves/roost.test.ts index 69301dc86cf..b9424747f5e 100644 --- a/src/test/moves/roost.test.ts +++ b/test/moves/roost.test.ts @@ -5,7 +5,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/moves/round.test.ts b/test/moves/round.test.ts similarity index 97% rename from src/test/moves/round.test.ts rename to test/moves/round.test.ts index 1d7c91bcbd4..5d26e242aff 100644 --- a/src/test/moves/round.test.ts +++ b/test/moves/round.test.ts @@ -4,7 +4,7 @@ import type { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/safeguard.test.ts b/test/moves/safeguard.test.ts similarity index 98% rename from src/test/moves/safeguard.test.ts rename to test/moves/safeguard.test.ts index 6505162fd04..9768b24f170 100644 --- a/src/test/moves/safeguard.test.ts +++ b/test/moves/safeguard.test.ts @@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle"; import { allAbilities, PostDefendContactApplyStatusEffectAbAttr } from "#app/data/ability"; import { Abilities } from "#app/enums/abilities"; import { StatusEffect } from "#app/enums/status-effect"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import Phaser from "phaser"; diff --git a/src/test/moves/scale_shot.test.ts b/test/moves/scale_shot.test.ts similarity index 98% rename from src/test/moves/scale_shot.test.ts rename to test/moves/scale_shot.test.ts index cbaa6611f3e..76954ba2413 100644 --- a/src/test/moves/scale_shot.test.ts +++ b/test/moves/scale_shot.test.ts @@ -8,7 +8,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/secret_power.test.ts b/test/moves/secret_power.test.ts similarity index 98% rename from src/test/moves/secret_power.test.ts rename to test/moves/secret_power.test.ts index 09fe5faa50b..f155633d545 100644 --- a/src/test/moves/secret_power.test.ts +++ b/test/moves/secret_power.test.ts @@ -4,7 +4,7 @@ import { Moves } from "#enums/moves"; import { Stat } from "#enums/stat"; import { allMoves } from "#app/data/move"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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"; diff --git a/src/test/moves/shed_tail.test.ts b/test/moves/shed_tail.test.ts similarity index 97% rename from src/test/moves/shed_tail.test.ts rename to test/moves/shed_tail.test.ts index 33a7d81e460..37f046ba2fa 100644 --- a/src/test/moves/shed_tail.test.ts +++ b/test/moves/shed_tail.test.ts @@ -3,7 +3,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/moves/shell_side_arm.test.ts b/test/moves/shell_side_arm.test.ts similarity index 97% rename from src/test/moves/shell_side_arm.test.ts rename to test/moves/shell_side_arm.test.ts index 41cbefb186b..3a658d53a83 100644 --- a/src/test/moves/shell_side_arm.test.ts +++ b/test/moves/shell_side_arm.test.ts @@ -3,7 +3,7 @@ import { allMoves, ShellSideArmCategoryAttr } from "#app/data/move"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/shell_trap.test.ts b/test/moves/shell_trap.test.ts similarity index 98% rename from src/test/moves/shell_trap.test.ts rename to test/moves/shell_trap.test.ts index 04d3cf998b1..aa94d0cab1b 100644 --- a/src/test/moves/shell_trap.test.ts +++ b/test/moves/shell_trap.test.ts @@ -6,7 +6,7 @@ import { MoveResult } from "#app/field/pokemon"; 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/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/simple_beam.test.ts b/test/moves/simple_beam.test.ts similarity index 95% rename from src/test/moves/simple_beam.test.ts rename to test/moves/simple_beam.test.ts index b4566669e8d..1fb8b54e8aa 100644 --- a/src/test/moves/simple_beam.test.ts +++ b/test/moves/simple_beam.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/sketch.test.ts b/test/moves/sketch.test.ts similarity index 98% rename from src/test/moves/sketch.test.ts rename to test/moves/sketch.test.ts index f531f44ef0c..e736893b0aa 100644 --- a/src/test/moves/sketch.test.ts +++ b/test/moves/sketch.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { MoveResult, PokemonMove } from "#app/field/pokemon"; -import GameManager from "#test/utils/gameManager"; +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"; diff --git a/src/test/moves/skill_swap.test.ts b/test/moves/skill_swap.test.ts similarity index 96% rename from src/test/moves/skill_swap.test.ts rename to test/moves/skill_swap.test.ts index 9c0f0b75ade..e39dac8bb01 100644 --- a/src/test/moves/skill_swap.test.ts +++ b/test/moves/skill_swap.test.ts @@ -2,7 +2,7 @@ import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/sleep_talk.test.ts b/test/moves/sleep_talk.test.ts similarity index 97% rename from src/test/moves/sleep_talk.test.ts rename to test/moves/sleep_talk.test.ts index 9ad2d23f903..b9c98f4fb65 100644 --- a/src/test/moves/sleep_talk.test.ts +++ b/test/moves/sleep_talk.test.ts @@ -4,7 +4,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/solar_beam.test.ts b/test/moves/solar_beam.test.ts similarity index 98% rename from src/test/moves/solar_beam.test.ts rename to test/moves/solar_beam.test.ts index ebec338932a..7f18cebff6d 100644 --- a/src/test/moves/solar_beam.test.ts +++ b/test/moves/solar_beam.test.ts @@ -5,7 +5,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/sparkly_swirl.test.ts b/test/moves/sparkly_swirl.test.ts similarity index 98% rename from src/test/moves/sparkly_swirl.test.ts rename to test/moves/sparkly_swirl.test.ts index a83f1c3a437..53851cb77d3 100644 --- a/src/test/moves/sparkly_swirl.test.ts +++ b/test/moves/sparkly_swirl.test.ts @@ -4,7 +4,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/spectral_thief.test.ts b/test/moves/spectral_thief.test.ts similarity index 99% rename from src/test/moves/spectral_thief.test.ts rename to test/moves/spectral_thief.test.ts index 8913b7f3683..883f280da08 100644 --- a/src/test/moves/spectral_thief.test.ts +++ b/test/moves/spectral_thief.test.ts @@ -5,7 +5,7 @@ import { allMoves } from "#app/data/move"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/speed_swap.test.ts b/test/moves/speed_swap.test.ts similarity index 96% rename from src/test/moves/speed_swap.test.ts rename to test/moves/speed_swap.test.ts index 179f1212394..5cdea223296 100644 --- a/src/test/moves/speed_swap.test.ts +++ b/test/moves/speed_swap.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/spikes.test.ts b/test/moves/spikes.test.ts similarity index 97% rename from src/test/moves/spikes.test.ts rename to test/moves/spikes.test.ts index 35e89c8caf7..11ef295a62f 100644 --- a/src/test/moves/spikes.test.ts +++ b/test/moves/spikes.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/spit_up.test.ts b/test/moves/spit_up.test.ts similarity index 99% rename from src/test/moves/spit_up.test.ts rename to test/moves/spit_up.test.ts index 7f9dfaad38b..125b17891ed 100644 --- a/src/test/moves/spit_up.test.ts +++ b/test/moves/spit_up.test.ts @@ -4,7 +4,7 @@ import { allMoves } from "#app/data/move"; import { BattlerTagType } from "#app/enums/battler-tag-type"; import type { TurnMove } from "#app/field/pokemon"; import { MoveResult } from "#app/field/pokemon"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/spotlight.test.ts b/test/moves/spotlight.test.ts similarity index 97% rename from src/test/moves/spotlight.test.ts rename to test/moves/spotlight.test.ts index 095f7d80bfe..2a883d403a7 100644 --- a/src/test/moves/spotlight.test.ts +++ b/test/moves/spotlight.test.ts @@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; diff --git a/src/test/moves/steamroller.test.ts b/test/moves/steamroller.test.ts similarity index 97% rename from src/test/moves/steamroller.test.ts rename to test/moves/steamroller.test.ts index f641c58c2d1..2aed941fd92 100644 --- a/src/test/moves/steamroller.test.ts +++ b/test/moves/steamroller.test.ts @@ -5,7 +5,7 @@ import type { DamageCalculationResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/stockpile.test.ts b/test/moves/stockpile.test.ts similarity index 98% rename from src/test/moves/stockpile.test.ts rename to test/moves/stockpile.test.ts index f83459cd09d..0d0a1de4840 100644 --- a/src/test/moves/stockpile.test.ts +++ b/test/moves/stockpile.test.ts @@ -7,7 +7,7 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/substitute.test.ts b/test/moves/substitute.test.ts similarity index 99% rename from src/test/moves/substitute.test.ts rename to test/moves/substitute.test.ts index 18b0c6ea536..5acbb6c0a44 100644 --- a/src/test/moves/substitute.test.ts +++ b/test/moves/substitute.test.ts @@ -4,7 +4,7 @@ import { SubstituteTag, TrappedTag } from "#app/data/battler-tags"; import { allMoves, StealHeldItemChanceAttr } from "#app/data/move"; import { MoveResult } from "#app/field/pokemon"; import type { CommandPhase } from "#app/phases/command-phase"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Command } from "#app/ui/command-ui-handler"; import { Mode } from "#app/ui/ui"; import { Abilities } from "#enums/abilities"; diff --git a/src/test/moves/swallow.test.ts b/test/moves/swallow.test.ts similarity index 99% rename from src/test/moves/swallow.test.ts rename to test/moves/swallow.test.ts index b2435ba77b3..1ede5808d82 100644 --- a/src/test/moves/swallow.test.ts +++ b/test/moves/swallow.test.ts @@ -8,7 +8,7 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/syrup_bomb.test.ts b/test/moves/syrup_bomb.test.ts similarity index 98% rename from src/test/moves/syrup_bomb.test.ts rename to test/moves/syrup_bomb.test.ts index ea2f8b6bab3..a284e6fa669 100644 --- a/src/test/moves/syrup_bomb.test.ts +++ b/test/moves/syrup_bomb.test.ts @@ -3,7 +3,7 @@ import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { BattlerTagType } from "#enums/battler-tag-type"; import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { BattlerIndex } from "#app/battle"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/tackle.test.ts b/test/moves/tackle.test.ts similarity index 97% rename from src/test/moves/tackle.test.ts rename to test/moves/tackle.test.ts index ff50f027f87..2ee811d3137 100644 --- a/src/test/moves/tackle.test.ts +++ b/test/moves/tackle.test.ts @@ -3,7 +3,7 @@ import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/tail_whip.test.ts b/test/moves/tail_whip.test.ts similarity index 96% rename from src/test/moves/tail_whip.test.ts rename to test/moves/tail_whip.test.ts index 5c83feb8a4e..fea334e4708 100644 --- a/src/test/moves/tail_whip.test.ts +++ b/test/moves/tail_whip.test.ts @@ -1,5 +1,5 @@ import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/tailwind.test.ts b/test/moves/tailwind.test.ts similarity index 98% rename from src/test/moves/tailwind.test.ts rename to test/moves/tailwind.test.ts index a26dde82824..56cf85749cd 100644 --- a/src/test/moves/tailwind.test.ts +++ b/test/moves/tailwind.test.ts @@ -4,7 +4,7 @@ import { ArenaTagType } from "#app/enums/arena-tag-type"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/tar_shot.test.ts b/test/moves/tar_shot.test.ts similarity index 98% rename from src/test/moves/tar_shot.test.ts rename to test/moves/tar_shot.test.ts index 66f540e4f9f..1a259206e48 100644 --- a/src/test/moves/tar_shot.test.ts +++ b/test/moves/tar_shot.test.ts @@ -4,7 +4,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/taunt.test.ts b/test/moves/taunt.test.ts similarity index 96% rename from src/test/moves/taunt.test.ts rename to test/moves/taunt.test.ts index a425a048a2c..c5cdd512704 100644 --- a/src/test/moves/taunt.test.ts +++ b/test/moves/taunt.test.ts @@ -1,7 +1,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { MoveResult } from "#app/field/pokemon"; diff --git a/src/test/moves/telekinesis.test.ts b/test/moves/telekinesis.test.ts similarity index 99% rename from src/test/moves/telekinesis.test.ts rename to test/moves/telekinesis.test.ts index ba2bc40a189..441c70fff34 100644 --- a/src/test/moves/telekinesis.test.ts +++ b/test/moves/telekinesis.test.ts @@ -4,7 +4,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { MoveResult } from "#app/field/pokemon"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; import { BattlerIndex } from "#app/battle"; diff --git a/src/test/moves/tera_blast.test.ts b/test/moves/tera_blast.test.ts similarity index 96% rename from src/test/moves/tera_blast.test.ts rename to test/moves/tera_blast.test.ts index 08e401ef9d1..22231ec6e46 100644 --- a/src/test/moves/tera_blast.test.ts +++ b/test/moves/tera_blast.test.ts @@ -6,7 +6,7 @@ import { Abilities } from "#app/enums/abilities"; import { HitResult } from "#app/field/pokemon"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/tera_starstorm.test.ts b/test/moves/tera_starstorm.test.ts similarity index 98% rename from src/test/moves/tera_starstorm.test.ts rename to test/moves/tera_starstorm.test.ts index 1e934b88c86..219a64b4ecc 100644 --- a/src/test/moves/tera_starstorm.test.ts +++ b/test/moves/tera_starstorm.test.ts @@ -3,7 +3,7 @@ import { Type } from "#enums/type"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect, vi } from "vitest"; diff --git a/src/test/moves/thousand_arrows.test.ts b/test/moves/thousand_arrows.test.ts similarity index 98% rename from src/test/moves/thousand_arrows.test.ts rename to test/moves/thousand_arrows.test.ts index 976b4352ee4..563f99c030d 100644 --- a/src/test/moves/thousand_arrows.test.ts +++ b/test/moves/thousand_arrows.test.ts @@ -4,7 +4,7 @@ import { BerryPhase } from "#app/phases/berry-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/throat_chop.test.ts b/test/moves/throat_chop.test.ts similarity index 96% rename from src/test/moves/throat_chop.test.ts rename to test/moves/throat_chop.test.ts index 24293f8d086..d69205aadf3 100644 --- a/src/test/moves/throat_chop.test.ts +++ b/test/moves/throat_chop.test.ts @@ -3,7 +3,7 @@ import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/moves/thunder_wave.test.ts b/test/moves/thunder_wave.test.ts similarity index 98% rename from src/test/moves/thunder_wave.test.ts rename to test/moves/thunder_wave.test.ts index 21e215a51f2..34ab64e081a 100644 --- a/src/test/moves/thunder_wave.test.ts +++ b/test/moves/thunder_wave.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/tidy_up.test.ts b/test/moves/tidy_up.test.ts similarity index 98% rename from src/test/moves/tidy_up.test.ts rename to test/moves/tidy_up.test.ts index 255967b40ac..5b5b67847ce 100644 --- a/src/test/moves/tidy_up.test.ts +++ b/test/moves/tidy_up.test.ts @@ -5,7 +5,7 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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"; diff --git a/src/test/moves/torment.test.ts b/test/moves/torment.test.ts similarity index 97% rename from src/test/moves/torment.test.ts rename to test/moves/torment.test.ts index b4c9a059db1..8cc835aad48 100644 --- a/src/test/moves/torment.test.ts +++ b/test/moves/torment.test.ts @@ -1,7 +1,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { MoveResult } from "#app/field/pokemon"; diff --git a/src/test/moves/toxic.test.ts b/test/moves/toxic.test.ts similarity index 98% rename from src/test/moves/toxic.test.ts rename to test/moves/toxic.test.ts index b146134ae51..8e66fefe6ff 100644 --- a/src/test/moves/toxic.test.ts +++ b/test/moves/toxic.test.ts @@ -1,6 +1,6 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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"; diff --git a/src/test/moves/toxic_spikes.test.ts b/test/moves/toxic_spikes.test.ts similarity index 98% rename from src/test/moves/toxic_spikes.test.ts rename to test/moves/toxic_spikes.test.ts index 8969289c2f2..2bddbc2eccb 100644 --- a/src/test/moves/toxic_spikes.test.ts +++ b/test/moves/toxic_spikes.test.ts @@ -7,7 +7,7 @@ import { ArenaTagType } from "#enums/arena-tag-type"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/transform.test.ts b/test/moves/transform.test.ts similarity index 98% rename from src/test/moves/transform.test.ts rename to test/moves/transform.test.ts index ffe935aa61b..781e83b7e89 100644 --- a/src/test/moves/transform.test.ts +++ b/test/moves/transform.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/trick_or_treat.test.ts b/test/moves/trick_or_treat.test.ts similarity index 96% rename from src/test/moves/trick_or_treat.test.ts rename to test/moves/trick_or_treat.test.ts index 5c85cac05e2..2efd1b76d1a 100644 --- a/src/test/moves/trick_or_treat.test.ts +++ b/test/moves/trick_or_treat.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { Type } from "#enums/type"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/triple_arrows.test.ts b/test/moves/triple_arrows.test.ts similarity index 97% rename from src/test/moves/triple_arrows.test.ts rename to test/moves/triple_arrows.test.ts index 98ad29997df..9aa08d7b670 100644 --- a/src/test/moves/triple_arrows.test.ts +++ b/test/moves/triple_arrows.test.ts @@ -2,7 +2,7 @@ import { allMoves, FlinchAttr, StatStageChangeAttr } from "#app/data/move"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/u_turn.test.ts b/test/moves/u_turn.test.ts similarity index 98% rename from src/test/moves/u_turn.test.ts rename to test/moves/u_turn.test.ts index c6e255e01b2..f57dec2e39f 100644 --- a/src/test/moves/u_turn.test.ts +++ b/test/moves/u_turn.test.ts @@ -2,7 +2,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/moves/upper_hand.test.ts b/test/moves/upper_hand.test.ts similarity index 98% rename from src/test/moves/upper_hand.test.ts rename to test/moves/upper_hand.test.ts index f94197d3fbd..c7556c1fa91 100644 --- a/src/test/moves/upper_hand.test.ts +++ b/test/moves/upper_hand.test.ts @@ -3,7 +3,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/moves/whirlwind.test.ts b/test/moves/whirlwind.test.ts similarity index 99% rename from src/test/moves/whirlwind.test.ts rename to test/moves/whirlwind.test.ts index 69232bee43a..8637b6ec02c 100644 --- a/src/test/moves/whirlwind.test.ts +++ b/test/moves/whirlwind.test.ts @@ -5,7 +5,7 @@ import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import 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"; diff --git a/src/test/moves/wide_guard.test.ts b/test/moves/wide_guard.test.ts similarity index 98% rename from src/test/moves/wide_guard.test.ts rename to test/moves/wide_guard.test.ts index c25a700c981..1f0579e24ee 100644 --- a/src/test/moves/wide_guard.test.ts +++ b/test/moves/wide_guard.test.ts @@ -1,6 +1,6 @@ import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; -import GameManager from "../utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; diff --git a/src/test/moves/will_o_wisp.test.ts b/test/moves/will_o_wisp.test.ts similarity index 96% rename from src/test/moves/will_o_wisp.test.ts rename to test/moves/will_o_wisp.test.ts index 39729d331ad..473f0d4d0a8 100644 --- a/src/test/moves/will_o_wisp.test.ts +++ b/test/moves/will_o_wisp.test.ts @@ -3,7 +3,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/mystery-encounter/encounter-test-utils.ts b/test/mystery-encounter/encounter-test-utils.ts similarity index 99% rename from src/test/mystery-encounter/encounter-test-utils.ts rename to test/mystery-encounter/encounter-test-utils.ts index 69fa9b5465f..97f292ef6b1 100644 --- a/src/test/mystery-encounter/encounter-test-utils.ts +++ b/test/mystery-encounter/encounter-test-utils.ts @@ -12,7 +12,7 @@ import { Mode } from "#app/ui/ui"; import { isNullOrUndefined } from "#app/utils"; import { Button } from "#enums/buttons"; import { StatusEffect } from "#enums/status-effect"; -import type GameManager from "#test/utils/gameManager"; +import type GameManager from "#test/testUtils/gameManager"; import { expect, vi } from "vitest"; /** diff --git a/src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts b/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts rename to test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts index 5a01b8a7379..d7f0ed6e20e 100644 --- a/src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts +++ b/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts @@ -3,14 +3,14 @@ import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-e import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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, 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts b/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts rename to test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts index 797c062dafe..0503a60cf1b 100644 --- a/src/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts +++ b/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts @@ -1,7 +1,7 @@ import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; diff --git a/src/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 similarity index 98% rename from src/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts rename to test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts index 9a6dae53901..b88e02be6ab 100644 --- a/src/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 @@ -3,7 +3,7 @@ import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-e import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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"; @@ -12,7 +12,7 @@ import { PlayerPokemon, PokemonMove } from "#app/field/pokemon"; import { AnOfferYouCantRefuseEncounter } from "#app/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Moves } from "#enums/moves"; import { ShinyRateBoosterModifier } from "#app/modifier/modifier"; diff --git a/src/test/mystery-encounter/encounters/berries-abound-encounter.test.ts b/test/mystery-encounter/encounters/berries-abound-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/berries-abound-encounter.test.ts rename to test/mystery-encounter/encounters/berries-abound-encounter.test.ts index f980b0cb20a..d623d1ce7a8 100644 --- a/src/test/mystery-encounter/encounters/berries-abound-encounter.test.ts +++ b/test/mystery-encounter/encounters/berries-abound-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; import type BattleScene from "#app/battle-scene"; @@ -11,7 +11,7 @@ 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts b/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts rename to test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts index 1ff523909da..6827ea5a463 100644 --- a/src/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts +++ b/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; import { Moves } from "#enums/moves"; @@ -11,7 +11,7 @@ import { PokemonMove } from "#app/field/pokemon"; import { Mode } from "#app/ui/ui"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts b/test/mystery-encounter/encounters/clowning-around-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts rename to test/mystery-encounter/encounters/clowning-around-encounter.test.ts index f105678e71f..799e26ea271 100644 --- a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts +++ b/test/mystery-encounter/encounters/clowning-around-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import * as BattleAnims from "#app/data/battle-anims"; @@ -16,7 +16,7 @@ import { PokemonMove } from "#app/field/pokemon"; import { Mode } from "#app/ui/ui"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import { ModifierTier } from "#app/modifier/modifier-tier"; import { ClowningAroundEncounter } from "#app/data/mystery-encounters/encounters/clowning-around-encounter"; import { TrainerType } from "#enums/trainer-type"; @@ -375,6 +375,6 @@ describe("Clowning Around - Mystery Encounter", () => { async function addItemToPokemon(scene: BattleScene, pokemon: Pokemon, stackCount: number, itemType: PokemonHeldItemModifierType) { const itemMod = itemType.newModifier(pokemon) as PokemonHeldItemModifier; itemMod.stackCount = stackCount; - await scene.addModifier(itemMod, true, false, false, true); + scene.addModifier(itemMod, true, false, false, true); await scene.updateModifiers(true); } diff --git a/src/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts b/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts similarity index 97% rename from src/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts rename to test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts index 795e6b6650b..46217cca5e2 100644 --- a/src/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts +++ b/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts @@ -1,7 +1,7 @@ import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; @@ -123,8 +123,6 @@ describe("Dancing Lessons - Mystery Encounter", () => { partyLead.level = 1000; partyLead.calculateStats(); await runMysteryEncounterToEnd(game, 1, undefined, true); - // For some reason updateModifiers breaks in this test and does not resolve promise - vi.spyOn(game.scene, "updateModifiers").mockImplementation(() => new Promise(resolve => resolve())); await skipBattleRunMysteryEncounterRewardsPhase(game); await game.phaseInterceptor.to(SelectModifierPhase, false); expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); diff --git a/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts b/test/mystery-encounter/encounters/delibirdy-encounter.test.ts similarity index 94% rename from src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts rename to test/mystery-encounter/encounters/delibirdy-encounter.test.ts index f99aa24805e..baea430fdaf 100644 --- a/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts +++ b/test/mystery-encounter/encounters/delibirdy-encounter.test.ts @@ -1,7 +1,7 @@ import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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"; @@ -123,7 +123,7 @@ describe("Delibird-y - Mystery Encounter", () => { scene.modifiers = []; const amuletCoin = generateModifierType(modifierTypes.AMULET_COIN)!.newModifier() as MoneyMultiplierModifier; amuletCoin.stackCount = 5; - await scene.addModifier(amuletCoin, true, false, false, true); + scene.addModifier(amuletCoin, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 1); @@ -193,7 +193,7 @@ describe("Delibird-y - Mystery Encounter", () => { const sitrus = generateModifierType(modifierTypes.BERRY, [ BerryType.SITRUS ])!; const sitrusMod = sitrus.newModifier(scene.getPlayerParty()[0]) as BerryModifier; sitrusMod.stackCount = 2; - await scene.addModifier(sitrusMod, true, false, false, true); + scene.addModifier(sitrusMod, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 1 }); @@ -214,7 +214,7 @@ describe("Delibird-y - Mystery Encounter", () => { const revSeed = generateModifierType(modifierTypes.REVIVER_SEED)!; const modifier = revSeed.newModifier(scene.getPlayerParty()[0]) as PokemonInstantReviveModifier; modifier.stackCount = 1; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 1 }); @@ -234,13 +234,13 @@ describe("Delibird-y - Mystery Encounter", () => { scene.modifiers = []; const candyJar = generateModifierType(modifierTypes.CANDY_JAR)!.newModifier() as LevelIncrementBoosterModifier; candyJar.stackCount = 99; - await scene.addModifier(candyJar, true, false, false, true); + scene.addModifier(candyJar, true, false, false, true); const sitrus = generateModifierType(modifierTypes.BERRY, [ BerryType.SITRUS ])!; // Sitrus berries on party const sitrusMod = sitrus.newModifier(scene.getPlayerParty()[0]) as BerryModifier; sitrusMod.stackCount = 2; - await scene.addModifier(sitrusMod, true, false, false, true); + scene.addModifier(sitrusMod, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 1 }); @@ -263,13 +263,13 @@ describe("Delibird-y - Mystery Encounter", () => { scene.modifiers = []; const healingCharm = generateModifierType(modifierTypes.BERRY_POUCH)!.newModifier() as PreserveBerryModifier; healingCharm.stackCount = 3; - await scene.addModifier(healingCharm, true, false, false, true); + scene.addModifier(healingCharm, true, false, false, true); // Set 1 Reviver Seed on party lead const revSeed = generateModifierType(modifierTypes.REVIVER_SEED)!; const modifier = revSeed.newModifier(scene.getPlayerParty()[0]) as PokemonInstantReviveModifier; modifier.stackCount = 1; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 1 }); @@ -292,7 +292,7 @@ describe("Delibird-y - Mystery Encounter", () => { scene.modifiers = []; const soulDew = generateModifierType(modifierTypes.SOUL_DEW)!; const modifier = soulDew.newModifier(scene.getPlayerParty()[0]); - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await game.phaseInterceptor.to(MysteryEncounterPhase, false); @@ -321,7 +321,7 @@ describe("Delibird-y - Mystery Encounter", () => { const revSeed = generateModifierType(modifierTypes.REVIVER_SEED)!; const modifier = revSeed.newModifier(scene.getPlayerParty()[0]) as PokemonInstantReviveModifier; modifier.stackCount = 1; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 1 }); @@ -355,7 +355,7 @@ describe("Delibird-y - Mystery Encounter", () => { const soulDew = generateModifierType(modifierTypes.SOUL_DEW)!; const modifier = soulDew.newModifier(scene.getPlayerParty()[0]) as PokemonNatureWeightModifier; modifier.stackCount = 2; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 1 }); @@ -376,7 +376,7 @@ describe("Delibird-y - Mystery Encounter", () => { const soulDew = generateModifierType(modifierTypes.SOUL_DEW)!; const modifier = soulDew.newModifier(scene.getPlayerParty()[0]) as PokemonNatureWeightModifier; modifier.stackCount = 1; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 1 }); @@ -396,13 +396,13 @@ describe("Delibird-y - Mystery Encounter", () => { scene.modifiers = []; const healingCharm = generateModifierType(modifierTypes.HEALING_CHARM)!.newModifier() as HealingBoosterModifier; healingCharm.stackCount = 5; - await scene.addModifier(healingCharm, true, false, false, true); + scene.addModifier(healingCharm, true, false, false, true); // Set 1 Soul Dew on party lead const soulDew = generateModifierType(modifierTypes.SOUL_DEW)!; const modifier = soulDew.newModifier(scene.getPlayerParty()[0]) as PokemonNatureWeightModifier; modifier.stackCount = 1; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 1 }); @@ -425,7 +425,7 @@ describe("Delibird-y - Mystery Encounter", () => { scene.modifiers = []; const revSeed = generateModifierType(modifierTypes.REVIVER_SEED)!; const modifier = revSeed.newModifier(scene.getPlayerParty()[0]); - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await game.phaseInterceptor.to(MysteryEncounterPhase, false); @@ -455,7 +455,7 @@ describe("Delibird-y - Mystery Encounter", () => { const soulDew = generateModifierType(modifierTypes.SOUL_DEW)!; const modifier = soulDew.newModifier(scene.getPlayerParty()[0]) as PokemonNatureWeightModifier; modifier.stackCount = 1; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 1 }); diff --git a/src/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts b/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts rename to test/mystery-encounter/encounters/department-store-sale-encounter.test.ts index e30aaadbf85..224a4403942 100644 --- a/src/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts +++ b/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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"; diff --git a/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts b/test/mystery-encounter/encounters/field-trip-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/field-trip-encounter.test.ts rename to test/mystery-encounter/encounters/field-trip-encounter.test.ts index bc9be246e10..b831a52f116 100644 --- a/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts +++ b/test/mystery-encounter/encounters/field-trip-encounter.test.ts @@ -1,7 +1,7 @@ import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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"; diff --git a/src/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts b/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts rename to test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts index 2f668dd7f50..96fac78d872 100644 --- a/src/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts +++ b/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#enums/biome"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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"; @@ -18,7 +18,7 @@ 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts b/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts rename to test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts index 8c869812f39..116c45c1faf 100644 --- a/src/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts +++ b/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; import { Moves } from "#enums/moves"; @@ -12,7 +12,7 @@ import { Mode } from "#app/ui/ui"; 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts b/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts rename to test/mystery-encounter/encounters/fun-and-games-encounter.test.ts index 44ddbb8f7ba..de351e48c76 100644 --- a/src/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts +++ b/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts @@ -3,14 +3,14 @@ import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-e import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption } from "#test/mystery-encounter/encounter-test-utils"; import type BattleScene from "#app/battle-scene"; import { Mode } from "#app/ui/ui"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts b/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts rename to test/mystery-encounter/encounters/global-trade-system-encounter.test.ts index fb5801c941a..f898b1f574f 100644 --- a/src/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts +++ b/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts @@ -1,7 +1,7 @@ import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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"; @@ -224,7 +224,7 @@ describe("Global Trade System - Mystery Encounter", () => { const soulDew = generateModifierType(modifierTypes.SOUL_DEW)!; const modifier = soulDew.newModifier(scene.getPlayerParty()[0]) as PokemonNatureWeightModifier; modifier.stackCount = 2; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 1 }); @@ -249,7 +249,7 @@ describe("Global Trade System - Mystery Encounter", () => { const soulDew = generateModifierType(modifierTypes.SOUL_DEW)!; const modifier = soulDew.newModifier(scene.getPlayerParty()[0]) as PokemonNatureWeightModifier; modifier.stackCount = 1; - await scene.addModifier(modifier, true, false, false, true); + scene.addModifier(modifier, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 1 }); diff --git a/src/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts b/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts rename to test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts index 17e324f29f0..09ecbc6c31a 100644 --- a/src/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts +++ b/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts @@ -5,12 +5,12 @@ import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts b/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts rename to test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts index 7729fa40599..e42cd321cde 100644 --- a/src/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts +++ b/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts @@ -3,14 +3,14 @@ import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-e import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; import type BattleScene from "#app/battle-scene"; import { Mode } from "#app/ui/ui"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import { ModifierTier } from "#app/modifier/modifier-tier"; import { MysteriousChallengersEncounter } from "#app/data/mystery-encounters/encounters/mysterious-challengers-encounter"; import { TrainerConfig, TrainerPartyCompoundTemplate, TrainerPartyTemplate } from "#app/data/trainer-config"; diff --git a/src/test/mystery-encounter/encounters/part-timer-encounter.test.ts b/test/mystery-encounter/encounters/part-timer-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/part-timer-encounter.test.ts rename to test/mystery-encounter/encounters/part-timer-encounter.test.ts index e8f2af0de5f..0cd7bc9bc76 100644 --- a/src/test/mystery-encounter/encounters/part-timer-encounter.test.ts +++ b/test/mystery-encounter/encounters/part-timer-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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"; diff --git a/src/test/mystery-encounter/encounters/safari-zone.test.ts b/test/mystery-encounter/encounters/safari-zone.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/safari-zone.test.ts rename to test/mystery-encounter/encounters/safari-zone.test.ts index a807805b81c..068e28547f4 100644 --- a/src/test/mystery-encounter/encounters/safari-zone.test.ts +++ b/test/mystery-encounter/encounters/safari-zone.test.ts @@ -2,13 +2,13 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#enums/biome"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts b/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts rename to test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts index a00cca5083c..c7fcc1e967f 100644 --- a/src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts +++ b/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts @@ -8,13 +8,13 @@ import { Species } from "#enums/species"; 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/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; import { Mode } from "#app/ui/ui"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import i18next from "i18next"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts b/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts rename to test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts index e6f8127b776..7b10adc9680 100644 --- a/src/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts @@ -3,13 +3,13 @@ import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-e import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts b/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts rename to test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts index 4fd96f8d5bc..3a3d94dbc44 100644 --- a/src/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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"; @@ -12,7 +12,7 @@ import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-e 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts b/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts rename to test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts index 3c0e75a2195..1a075ffaff2 100644 --- a/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#enums/biome"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import * as BattleAnims from "#app/data/battle-anims"; @@ -20,7 +20,7 @@ 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import { CustomPokemonData } from "#app/data/custom-pokemon-data"; import { CommandPhase } from "#app/phases/command-phase"; import { MovePhase } from "#app/phases/move-phase"; diff --git a/src/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts b/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts similarity index 99% rename from src/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts rename to test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts index e087bc5c180..85dbb4e23ff 100644 --- a/src/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts @@ -3,14 +3,14 @@ import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-e import { Biome } from "#enums/biome"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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 { Mode } from "#app/ui/ui"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts b/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts rename to test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts index 395e33e818a..90a13c75dc3 100644 --- a/src/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts +++ b/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import * as BattleAnims from "#app/data/battle-anims"; @@ -16,7 +16,7 @@ import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; import { HitHealModifier, HealShopCostModifier, TurnHealModifier } from "#app/modifier/modifier"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import { TrashToTreasureEncounter } from "#app/data/mystery-encounters/encounters/trash-to-treasure-encounter"; import { ModifierTier } from "#app/modifier/modifier-tier"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; diff --git a/src/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts b/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts similarity index 97% rename from src/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts rename to test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts index 39904c030a3..ab50666ab3d 100644 --- a/src/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts +++ b/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { runMysteryEncounterToEnd, runSelectMysteryEncounterOption } from "#test/mystery-encounter/encounter-test-utils"; import { Moves } from "#enums/moves"; @@ -10,7 +10,7 @@ import type BattleScene from "#app/battle-scene"; import { PokemonMove } from "#app/field/pokemon"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; @@ -216,11 +216,11 @@ describe("Uncommon Breed - Mystery Encounter", () => { const sitrus = generateModifierType(modifierTypes.BERRY, [ BerryType.SITRUS ])!; const sitrusMod = sitrus.newModifier(scene.getPlayerParty()[0]) as BerryModifier; sitrusMod.stackCount = 2; - await scene.addModifier(sitrusMod, true, false, false, true); + scene.addModifier(sitrusMod, true, false, false, true); const ganlon = generateModifierType(modifierTypes.BERRY, [ BerryType.GANLON ])!; const ganlonMod = ganlon.newModifier(scene.getPlayerParty()[0]) as BerryModifier; ganlonMod.stackCount = 3; - await scene.addModifier(ganlonMod, true, false, false, true); + scene.addModifier(ganlonMod, true, false, false, true); await scene.updateModifiers(true); await runMysteryEncounterToEnd(game, 2); diff --git a/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts b/test/mystery-encounter/encounters/weird-dream-encounter.test.ts similarity index 98% rename from src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts rename to test/mystery-encounter/encounters/weird-dream-encounter.test.ts index 669a99b92cd..073893f340d 100644 --- a/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts +++ b/test/mystery-encounter/encounters/weird-dream-encounter.test.ts @@ -2,7 +2,7 @@ import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encount import { Biome } from "#app/enums/biome"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; import { Species } from "#app/enums/species"; -import GameManager from "#app/test/utils/gameManager"; +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, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; @@ -11,7 +11,7 @@ import { Mode } from "#app/ui/ui"; 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 { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +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"; diff --git a/src/test/mystery-encounter/mystery-encounter-utils.test.ts b/test/mystery-encounter/mystery-encounter-utils.test.ts similarity index 98% rename from src/test/mystery-encounter/mystery-encounter-utils.test.ts rename to test/mystery-encounter/mystery-encounter-utils.test.ts index 7c924b86e0d..dacfb5cc96e 100644 --- a/src/test/mystery-encounter/mystery-encounter-utils.test.ts +++ b/test/mystery-encounter/mystery-encounter-utils.test.ts @@ -6,10 +6,10 @@ import { getHighestLevelPlayerPokemon, getLowestLevelPlayerPokemon, getRandomPla import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Type } from "#enums/type"; import { MessagePhase } from "#app/phases/message-phase"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/mystery-encounter/mystery-encounter.test.ts b/test/mystery-encounter/mystery-encounter.test.ts similarity index 96% rename from src/test/mystery-encounter/mystery-encounter.test.ts rename to test/mystery-encounter/mystery-encounter.test.ts index 7958fc1cd46..c70193a5d56 100644 --- a/src/test/mystery-encounter/mystery-encounter.test.ts +++ b/test/mystery-encounter/mystery-encounter.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeAll, beforeEach, expect, describe, it } from "vitest"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { Species } from "#enums/species"; import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; diff --git a/src/test/phases/form-change-phase.test.ts b/test/phases/form-change-phase.test.ts similarity index 97% rename from src/test/phases/form-change-phase.test.ts rename to test/phases/form-change-phase.test.ts index 07e59cafe1c..10287cd2046 100644 --- a/src/test/phases/form-change-phase.test.ts +++ b/test/phases/form-change-phase.test.ts @@ -1,7 +1,7 @@ import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { Type } from "#enums/type"; diff --git a/src/test/phases/frenzy-move-reset.test.ts b/test/phases/frenzy-move-reset.test.ts similarity index 97% rename from src/test/phases/frenzy-move-reset.test.ts rename to test/phases/frenzy-move-reset.test.ts index db9ec2bfe66..0bea8e87f47 100644 --- a/src/test/phases/frenzy-move-reset.test.ts +++ b/test/phases/frenzy-move-reset.test.ts @@ -4,7 +4,7 @@ import { BattlerTagType } from "#enums/battler-tag-type"; import { StatusEffect } from "#enums/status-effect"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; diff --git a/src/test/phases/game-over-phase.test.ts b/test/phases/game-over-phase.test.ts similarity index 98% rename from src/test/phases/game-over-phase.test.ts rename to test/phases/game-over-phase.test.ts index 2e19d5fe954..4f5e215959a 100644 --- a/src/test/phases/game-over-phase.test.ts +++ b/test/phases/game-over-phase.test.ts @@ -2,7 +2,7 @@ import { Biome } from "#enums/biome"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +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"; diff --git a/src/test/phases/learn-move-phase.test.ts b/test/phases/learn-move-phase.test.ts similarity index 99% rename from src/test/phases/learn-move-phase.test.ts rename to test/phases/learn-move-phase.test.ts index 3a3d111f551..6eb86620877 100644 --- a/src/test/phases/learn-move-phase.test.ts +++ b/test/phases/learn-move-phase.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import Phaser from "phaser"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import { Species } from "#enums/species"; import { Moves } from "#enums/moves"; import { LearnMovePhase } from "#app/phases/learn-move-phase"; diff --git a/src/test/phases/mystery-encounter-phase.test.ts b/test/phases/mystery-encounter-phase.test.ts similarity index 98% rename from src/test/phases/mystery-encounter-phase.test.ts rename to test/phases/mystery-encounter-phase.test.ts index 507862534af..aa4e1683aae 100644 --- a/src/test/phases/mystery-encounter-phase.test.ts +++ b/test/phases/mystery-encounter-phase.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeAll, beforeEach, expect, describe, it, vi } from "vitest"; -import GameManager from "#app/test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { Species } from "#enums/species"; import { MysteryEncounterOptionSelectedPhase, MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; diff --git a/src/test/phases/phases.test.ts b/test/phases/phases.test.ts similarity index 96% rename from src/test/phases/phases.test.ts rename to test/phases/phases.test.ts index 36a405b8d15..4aabeb55b9e 100644 --- a/src/test/phases/phases.test.ts +++ b/test/phases/phases.test.ts @@ -3,7 +3,7 @@ import { LoginPhase } from "#app/phases/login-phase"; import { TitlePhase } from "#app/phases/title-phase"; import { UnavailablePhase } from "#app/phases/unavailable-phase"; import { Mode } from "#app/ui/ui"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; diff --git a/src/test/phases/select-modifier-phase.test.ts b/test/phases/select-modifier-phase.test.ts similarity index 98% rename from src/test/phases/select-modifier-phase.test.ts rename to test/phases/select-modifier-phase.test.ts index 23fab729838..0949eeec955 100644 --- a/src/test/phases/select-modifier-phase.test.ts +++ b/test/phases/select-modifier-phase.test.ts @@ -12,8 +12,8 @@ import { Abilities } from "#enums/abilities"; import { Button } from "#enums/buttons"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; -import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import GameManager from "#test/testUtils/gameManager"; +import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/plugins/api/pokerogue-account-api.test.ts b/test/plugins/api/pokerogue-account-api.test.ts similarity index 98% rename from src/test/plugins/api/pokerogue-account-api.test.ts rename to test/plugins/api/pokerogue-account-api.test.ts index 90a7d3639ad..e9033c859de 100644 --- a/src/test/plugins/api/pokerogue-account-api.test.ts +++ b/test/plugins/api/pokerogue-account-api.test.ts @@ -1,7 +1,7 @@ import type { AccountInfoResponse } from "#app/@types/PokerogueAccountApi"; import { SESSION_ID_COOKIE_NAME } from "#app/constants"; import { PokerogueAccountApi } from "#app/plugins/api/pokerogue-account-api"; -import { getApiBaseUrl } from "#app/test/utils/testUtils"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import * as Utils from "#app/utils"; import { http, HttpResponse } from "msw"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/plugins/api/pokerogue-admin-api.test.ts b/test/plugins/api/pokerogue-admin-api.test.ts similarity index 99% rename from src/test/plugins/api/pokerogue-admin-api.test.ts rename to test/plugins/api/pokerogue-admin-api.test.ts index 5ae46abfcc8..5af55967ae2 100644 --- a/src/test/plugins/api/pokerogue-admin-api.test.ts +++ b/test/plugins/api/pokerogue-admin-api.test.ts @@ -7,7 +7,7 @@ import type { UnlinkAccountFromGoogledIdRequest, } from "#app/@types/PokerogueAdminApi"; import { PokerogueAdminApi } from "#app/plugins/api/pokerogue-admin-api"; -import { getApiBaseUrl } from "#app/test/utils/testUtils"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import { http, HttpResponse } from "msw"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/plugins/api/pokerogue-api.test.ts b/test/plugins/api/pokerogue-api.test.ts similarity index 98% rename from src/test/plugins/api/pokerogue-api.test.ts rename to test/plugins/api/pokerogue-api.test.ts index a62174c226d..241453866a5 100644 --- a/src/test/plugins/api/pokerogue-api.test.ts +++ b/test/plugins/api/pokerogue-api.test.ts @@ -1,6 +1,6 @@ import type { TitleStatsResponse } from "#app/@types/PokerogueApi"; import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { getApiBaseUrl } from "#app/test/utils/testUtils"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import { http, HttpResponse } from "msw"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/plugins/api/pokerogue-daily-api.test.ts b/test/plugins/api/pokerogue-daily-api.test.ts similarity index 98% rename from src/test/plugins/api/pokerogue-daily-api.test.ts rename to test/plugins/api/pokerogue-daily-api.test.ts index 569e7cbb15d..95d938e6625 100644 --- a/src/test/plugins/api/pokerogue-daily-api.test.ts +++ b/test/plugins/api/pokerogue-daily-api.test.ts @@ -1,6 +1,6 @@ import type { GetDailyRankingsPageCountRequest, GetDailyRankingsRequest } from "#app/@types/PokerogueDailyApi"; import { PokerogueDailyApi } from "#app/plugins/api/pokerogue-daily-api"; -import { getApiBaseUrl } from "#app/test/utils/testUtils"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import { ScoreboardCategory, type RankingEntry } from "#app/ui/daily-run-scoreboard"; import { http, HttpResponse } from "msw"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/plugins/api/pokerogue-savedata-api.test.ts b/test/plugins/api/pokerogue-savedata-api.test.ts similarity index 96% rename from src/test/plugins/api/pokerogue-savedata-api.test.ts rename to test/plugins/api/pokerogue-savedata-api.test.ts index 6dd402206e5..47eafa0a933 100644 --- a/src/test/plugins/api/pokerogue-savedata-api.test.ts +++ b/test/plugins/api/pokerogue-savedata-api.test.ts @@ -1,6 +1,6 @@ import type { UpdateAllSavedataRequest } from "#app/@types/PokerogueSavedataApi"; import { PokerogueSavedataApi } from "#app/plugins/api/pokerogue-savedata-api"; -import { getApiBaseUrl } from "#app/test/utils/testUtils"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import { http, HttpResponse } from "msw"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/plugins/api/pokerogue-session-savedata-api.test.ts b/test/plugins/api/pokerogue-session-savedata-api.test.ts similarity index 99% rename from src/test/plugins/api/pokerogue-session-savedata-api.test.ts rename to test/plugins/api/pokerogue-session-savedata-api.test.ts index f453c5edd88..d8103428d59 100644 --- a/src/test/plugins/api/pokerogue-session-savedata-api.test.ts +++ b/test/plugins/api/pokerogue-session-savedata-api.test.ts @@ -8,7 +8,7 @@ import type { } 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 "#app/test/utils/testUtils"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import { http, HttpResponse } from "msw"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/plugins/api/pokerogue-system-savedata-api.test.ts b/test/plugins/api/pokerogue-system-savedata-api.test.ts similarity index 98% rename from src/test/plugins/api/pokerogue-system-savedata-api.test.ts rename to test/plugins/api/pokerogue-system-savedata-api.test.ts index af377762b77..f108e22ee2c 100644 --- a/src/test/plugins/api/pokerogue-system-savedata-api.test.ts +++ b/test/plugins/api/pokerogue-system-savedata-api.test.ts @@ -6,7 +6,7 @@ import type { } from "#app/@types/PokerogueSystemSavedataApi"; import { PokerogueSystemSavedataApi } from "#app/plugins/api/pokerogue-system-savedata-api"; import type { SystemSaveData } from "#app/system/game-data"; -import { getApiBaseUrl } from "#app/test/utils/testUtils"; +import { getApiBaseUrl } from "#test/testUtils/testUtils"; import { http, HttpResponse } from "msw"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/pre.test.ts b/test/pre.test.ts similarity index 100% rename from src/test/pre.test.ts rename to test/pre.test.ts diff --git a/src/test/reload.test.ts b/test/reload.test.ts similarity index 97% rename from src/test/reload.test.ts rename to test/reload.test.ts index b5f66630606..019da0a4c2a 100644 --- a/src/test/reload.test.ts +++ b/test/reload.test.ts @@ -6,8 +6,8 @@ import { Biome } from "#enums/biome"; import { Button } from "#enums/buttons"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; -import type { MockClock } from "#test/utils/mocks/mockClock"; +import GameManager from "#test/testUtils/gameManager"; +import type { MockClock } from "#test/testUtils/mocks/mockClock"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; describe("Reload", () => { diff --git a/src/test/settingMenu/helpers/inGameManip.ts b/test/settingMenu/helpers/inGameManip.ts similarity index 100% rename from src/test/settingMenu/helpers/inGameManip.ts rename to test/settingMenu/helpers/inGameManip.ts diff --git a/src/test/settingMenu/helpers/menuManip.ts b/test/settingMenu/helpers/menuManip.ts similarity index 92% rename from src/test/settingMenu/helpers/menuManip.ts rename to test/settingMenu/helpers/menuManip.ts index 0b1f48525f1..1d53b845047 100644 --- a/src/test/settingMenu/helpers/menuManip.ts +++ b/test/settingMenu/helpers/menuManip.ts @@ -1,4 +1,15 @@ -import { assign, canIAssignThisKey, canIDeleteThisKey, canIOverrideThisSetting, deleteBind, getIconWithKeycode, getIconWithSettingName, getKeyWithKeycode, getKeyWithSettingName, getSettingNameWithKeycode } from "#app/configs/inputs/configHandler"; +import { + assign, + canIAssignThisKey, + canIDeleteThisKey, + canIOverrideThisSetting, + deleteBind, + getIconWithKeycode, + getIconWithSettingName, + getKeyWithKeycode, + getKeyWithSettingName, + getSettingNameWithKeycode, +} from "#app/configs/inputs/configHandler"; import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; import { expect } from "vitest"; diff --git a/src/test/settingMenu/rebinding_setting.test.ts b/test/settingMenu/rebinding_setting.test.ts similarity index 98% rename from src/test/settingMenu/rebinding_setting.test.ts rename to test/settingMenu/rebinding_setting.test.ts index cae2df363d8..46a37f4e137 100644 --- a/src/test/settingMenu/rebinding_setting.test.ts +++ b/test/settingMenu/rebinding_setting.test.ts @@ -406,9 +406,9 @@ describe("Test Rebinding", () => { }); it("check to delete all the binds of an action", () => { - inGame.whenWePressOnKeyboard("V").weShouldTriggerTheButton("Button_Cycle_Variant"); - inTheSettingMenu.whenCursorIsOnSetting("Alt_Button_Cycle_Variant").thereShouldBeNoIcon().weWantThisBindInstead("K").confirm(); - inTheSettingMenu.whenCursorIsOnSetting("Alt_Button_Cycle_Variant").iconDisplayedIs("KEY_K").whenWeDelete().thereShouldBeNoIconAnymore(); - inTheSettingMenu.whenCursorIsOnSetting("Button_Cycle_Variant").iconDisplayedIs("KEY_V").whenWeDelete().thereShouldBeNoIconAnymore(); + inGame.whenWePressOnKeyboard("V").weShouldTriggerTheButton("Button_Cycle_Tera"); + inTheSettingMenu.whenCursorIsOnSetting("Alt_Button_Cycle_Tera").thereShouldBeNoIcon().weWantThisBindInstead("K").confirm(); + inTheSettingMenu.whenCursorIsOnSetting("Alt_Button_Cycle_Tera").iconDisplayedIs("KEY_K").whenWeDelete().thereShouldBeNoIconAnymore(); + inTheSettingMenu.whenCursorIsOnSetting("Button_Cycle_Tera").iconDisplayedIs("KEY_V").whenWeDelete().thereShouldBeNoIconAnymore(); }); }); diff --git a/src/test/sprites/pokemonSprite.test.ts b/test/sprites/pokemonSprite.test.ts similarity index 99% rename from src/test/sprites/pokemonSprite.test.ts rename to test/sprites/pokemonSprite.test.ts index 2bfdbe9ce39..43749015e1c 100644 --- a/src/test/sprites/pokemonSprite.test.ts +++ b/test/sprites/pokemonSprite.test.ts @@ -2,7 +2,7 @@ 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 _masterlist from "../../public/images/pokemon/variant/_masterlist.json"; type PokemonVariantMasterlist = typeof _masterlist; diff --git a/src/test/sprites/spritesUtils.ts b/test/sprites/spritesUtils.ts similarity index 100% rename from src/test/sprites/spritesUtils.ts rename to test/sprites/spritesUtils.ts diff --git a/src/test/system/game_data.test.ts b/test/system/game_data.test.ts similarity index 96% rename from src/test/system/game_data.test.ts rename to test/system/game_data.test.ts index ad24c40f445..f7940567746 100644 --- a/src/test/system/game_data.test.ts +++ b/test/system/game_data.test.ts @@ -3,10 +3,10 @@ import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; import type { SessionSaveData } from "#app/system/game-data"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import * as account from "../../account"; +import * as account from "#app/account"; describe("System - Game Data", () => { let phaserGame: Phaser.Game; diff --git a/src/test/utils/TextInterceptor.ts b/test/testUtils/TextInterceptor.ts similarity index 100% rename from src/test/utils/TextInterceptor.ts rename to test/testUtils/TextInterceptor.ts diff --git a/src/test/utils/errorInterceptor.ts b/test/testUtils/errorInterceptor.ts similarity index 100% rename from src/test/utils/errorInterceptor.ts rename to test/testUtils/errorInterceptor.ts diff --git a/src/test/utils/fakeMobile.html b/test/testUtils/fakeMobile.html similarity index 95% rename from src/test/utils/fakeMobile.html rename to test/testUtils/fakeMobile.html index 4b566d592d9..263b03969d4 100644 --- a/src/test/utils/fakeMobile.html +++ b/test/testUtils/fakeMobile.html @@ -35,7 +35,7 @@
R
-
+
V
@@ -59,7 +59,7 @@
N
-
+
V
diff --git a/src/test/utils/gameManager.ts b/test/testUtils/gameManager.ts similarity index 95% rename from src/test/utils/gameManager.ts rename to test/testUtils/gameManager.ts index b2015700c9b..436c97a6967 100644 --- a/src/test/utils/gameManager.ts +++ b/test/testUtils/gameManager.ts @@ -22,8 +22,8 @@ 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 ErrorInterceptor from "#app/test/utils/errorInterceptor"; -import type InputsHandler from "#app/test/utils/inputsHandler"; +import ErrorInterceptor from "#test/testUtils/errorInterceptor"; +import type InputsHandler from "#test/testUtils/inputsHandler"; 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"; @@ -40,18 +40,18 @@ import type { Moves } from "#enums/moves"; import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PlayerGender } from "#enums/player-gender"; import type { Species } from "#enums/species"; -import { generateStarter, waitUntil } from "#test/utils/gameManagerUtils"; -import GameWrapper from "#test/utils/gameWrapper"; -import { ChallengeModeHelper } from "#test/utils/helpers/challengeModeHelper"; -import { ClassicModeHelper } from "#test/utils/helpers/classicModeHelper"; -import { DailyModeHelper } from "#test/utils/helpers/dailyModeHelper"; -import { ModifierHelper } from "#test/utils/helpers/modifiersHelper"; -import { MoveHelper } from "#test/utils/helpers/moveHelper"; -import { OverridesHelper } from "#test/utils/helpers/overridesHelper"; -import { ReloadHelper } from "#test/utils/helpers/reloadHelper"; -import { SettingsHelper } from "#test/utils/helpers/settingsHelper"; -import PhaseInterceptor from "#test/utils/phaseInterceptor"; -import TextInterceptor from "#test/utils/TextInterceptor"; +import { generateStarter, waitUntil } from "#test/testUtils/gameManagerUtils"; +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"; +import { ModifierHelper } from "#test/testUtils/helpers/modifiersHelper"; +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 PhaseInterceptor from "#test/testUtils/phaseInterceptor"; +import TextInterceptor from "#test/testUtils/TextInterceptor"; import { AES, enc } from "crypto-js"; import fs from "fs"; import { expect, vi } from "vitest"; diff --git a/src/test/utils/gameManagerUtils.ts b/test/testUtils/gameManagerUtils.ts similarity index 100% rename from src/test/utils/gameManagerUtils.ts rename to test/testUtils/gameManagerUtils.ts diff --git a/src/test/utils/gameWrapper.ts b/test/testUtils/gameWrapper.ts similarity index 90% rename from src/test/utils/gameWrapper.ts rename to test/testUtils/gameWrapper.ts index ca5a67f901a..c2614b2b61d 100644 --- a/src/test/utils/gameWrapper.ts +++ b/test/testUtils/gameWrapper.ts @@ -4,17 +4,18 @@ import BattleScene, * as battleScene from "#app/battle-scene"; import { MoveAnim } from "#app/data/battle-anims"; import Pokemon from "#app/field/pokemon"; import * as Utils from "#app/utils"; -import { blobToString } from "#test/utils/gameManagerUtils"; -import { MockClock } from "#test/utils/mocks/mockClock"; -import mockConsoleLog from "#test/utils/mocks/mockConsoleLog"; -import { MockFetch } from "#test/utils/mocks/mockFetch"; -import MockLoader from "#test/utils/mocks/mockLoader"; -import mockLocalStorage from "#test/utils/mocks/mockLocalStorage"; -import MockImage from "#test/utils/mocks/mocksContainer/mockImage"; -import MockTextureManager from "#test/utils/mocks/mockTextureManager"; +import { blobToString } from "#test/testUtils/gameManagerUtils"; +import { MockClock } from "#test/testUtils/mocks/mockClock"; +import mockConsoleLog from "#test/testUtils/mocks/mockConsoleLog"; +import { MockFetch } from "#test/testUtils/mocks/mockFetch"; +import MockLoader from "#test/testUtils/mocks/mockLoader"; +import mockLocalStorage from "#test/testUtils/mocks/mockLocalStorage"; +import MockImage from "#test/testUtils/mocks/mocksContainer/mockImage"; +import MockTextureManager from "#test/testUtils/mocks/mockTextureManager"; import fs from "fs"; import Phaser from "phaser"; import InputText from "phaser3-rex-plugins/plugins/inputtext"; +import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import { vi } from "vitest"; import { MockGameObjectCreator } from "./mocks/mockGameObjectCreator"; import InputManager = Phaser.Input.InputManager; @@ -23,7 +24,7 @@ import KeyboardPlugin = Phaser.Input.Keyboard.KeyboardPlugin; import GamepadPlugin = Phaser.Input.Gamepad.GamepadPlugin; import EventEmitter = Phaser.Events.EventEmitter; import UpdateList = Phaser.GameObjects.UpdateList; -import { version } from "../../../package.json"; +import { version } from "../../package.json"; import { MockTimedEventManager } from "./mocks/mockTimedEventManager"; Object.defineProperty(window, "localStorage", { @@ -33,7 +34,8 @@ Object.defineProperty(window, "console", { value: mockConsoleLog(false), }); - +BBCodeText.prototype.destroy = () => null; +BBCodeText.prototype.resize = () => null; InputText.prototype.setElement = () => null; InputText.prototype.resize = () => null; Phaser.GameObjects.Image = MockImage; @@ -91,6 +93,7 @@ export default class GameWrapper { Pokemon.prototype.updateFusionPalette = () => null; Pokemon.prototype.cry = () => null; Pokemon.prototype.faintCry = (cb) => { if (cb) cb(); }; + BattleScene.prototype.addPokemonIcon = () => new Phaser.GameObjects.Container(this.scene); } setScene(scene: BattleScene) { diff --git a/src/test/utils/helpers/challengeModeHelper.ts b/test/testUtils/helpers/challengeModeHelper.ts similarity index 100% rename from src/test/utils/helpers/challengeModeHelper.ts rename to test/testUtils/helpers/challengeModeHelper.ts diff --git a/src/test/utils/helpers/classicModeHelper.ts b/test/testUtils/helpers/classicModeHelper.ts similarity index 100% rename from src/test/utils/helpers/classicModeHelper.ts rename to test/testUtils/helpers/classicModeHelper.ts diff --git a/src/test/utils/helpers/dailyModeHelper.ts b/test/testUtils/helpers/dailyModeHelper.ts similarity index 100% rename from src/test/utils/helpers/dailyModeHelper.ts rename to test/testUtils/helpers/dailyModeHelper.ts diff --git a/src/test/utils/helpers/gameManagerHelper.ts b/test/testUtils/helpers/gameManagerHelper.ts similarity index 100% rename from src/test/utils/helpers/gameManagerHelper.ts rename to test/testUtils/helpers/gameManagerHelper.ts diff --git a/src/test/utils/helpers/modifiersHelper.ts b/test/testUtils/helpers/modifiersHelper.ts similarity index 100% rename from src/test/utils/helpers/modifiersHelper.ts rename to test/testUtils/helpers/modifiersHelper.ts diff --git a/src/test/utils/helpers/moveHelper.ts b/test/testUtils/helpers/moveHelper.ts similarity index 97% rename from src/test/utils/helpers/moveHelper.ts rename to test/testUtils/helpers/moveHelper.ts index ee026c06a8d..535537b34a2 100644 --- a/src/test/utils/helpers/moveHelper.ts +++ b/test/testUtils/helpers/moveHelper.ts @@ -9,8 +9,8 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Command } from "#app/ui/command-ui-handler"; import { Mode } from "#app/ui/ui"; import { Moves } from "#enums/moves"; -import { getMovePosition } from "#test/utils/gameManagerUtils"; -import { GameManagerHelper } from "#test/utils/helpers/gameManagerHelper"; +import { getMovePosition } from "#test/testUtils/gameManagerUtils"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; import { vi } from "vitest"; /** diff --git a/src/test/utils/helpers/overridesHelper.ts b/test/testUtils/helpers/overridesHelper.ts similarity index 100% rename from src/test/utils/helpers/overridesHelper.ts rename to test/testUtils/helpers/overridesHelper.ts diff --git a/src/test/utils/helpers/reloadHelper.ts b/test/testUtils/helpers/reloadHelper.ts similarity index 100% rename from src/test/utils/helpers/reloadHelper.ts rename to test/testUtils/helpers/reloadHelper.ts diff --git a/src/test/utils/helpers/settingsHelper.ts b/test/testUtils/helpers/settingsHelper.ts similarity index 100% rename from src/test/utils/helpers/settingsHelper.ts rename to test/testUtils/helpers/settingsHelper.ts diff --git a/src/test/utils/inputsHandler.ts b/test/testUtils/inputsHandler.ts similarity index 94% rename from src/test/utils/inputsHandler.ts rename to test/testUtils/inputsHandler.ts index e2591def447..c526300a75a 100644 --- a/src/test/utils/inputsHandler.ts +++ b/test/testUtils/inputsHandler.ts @@ -2,7 +2,7 @@ import type BattleScene from "#app/battle-scene"; import pad_xbox360 from "#app/configs/inputs/pad_xbox360"; import type { InputsController } from "#app/inputs-controller"; import TouchControl from "#app/touch-controls"; -import { holdOn } from "#test/utils/gameManagerUtils"; +import { holdOn } from "#test/testUtils/gameManagerUtils"; import fs from "fs"; import { JSDOM } from "jsdom"; import Phaser from "phaser"; @@ -90,7 +90,7 @@ class Fakepad extends Phaser.Input.Gamepad.Gamepad { class FakeMobile { constructor() { - const fakeMobilePage = fs.readFileSync("./src/test/utils/fakeMobile.html", { encoding: "utf8", flag: "r" }); + const fakeMobilePage = fs.readFileSync("././test/testUtils/fakeMobile.html", { encoding: "utf8", flag: "r" }); const dom = new JSDOM(fakeMobilePage); Object.defineProperty(window, "document", { value: dom.window.document, diff --git a/src/test/utils/mocks/mockClock.ts b/test/testUtils/mocks/mockClock.ts similarity index 100% rename from src/test/utils/mocks/mockClock.ts rename to test/testUtils/mocks/mockClock.ts diff --git a/src/test/utils/mocks/mockConsoleLog.ts b/test/testUtils/mocks/mockConsoleLog.ts similarity index 100% rename from src/test/utils/mocks/mockConsoleLog.ts rename to test/testUtils/mocks/mockConsoleLog.ts diff --git a/src/test/utils/mocks/mockFetch.ts b/test/testUtils/mocks/mockFetch.ts similarity index 100% rename from src/test/utils/mocks/mockFetch.ts rename to test/testUtils/mocks/mockFetch.ts diff --git a/src/test/utils/mocks/mockGameObject.ts b/test/testUtils/mocks/mockGameObject.ts similarity index 100% rename from src/test/utils/mocks/mockGameObject.ts rename to test/testUtils/mocks/mockGameObject.ts diff --git a/src/test/utils/mocks/mockGameObjectCreator.ts b/test/testUtils/mocks/mockGameObjectCreator.ts similarity index 100% rename from src/test/utils/mocks/mockGameObjectCreator.ts rename to test/testUtils/mocks/mockGameObjectCreator.ts diff --git a/src/test/utils/mocks/mockLoader.ts b/test/testUtils/mocks/mockLoader.ts similarity index 100% rename from src/test/utils/mocks/mockLoader.ts rename to test/testUtils/mocks/mockLoader.ts diff --git a/src/test/utils/mocks/mockLocalStorage.ts b/test/testUtils/mocks/mockLocalStorage.ts similarity index 100% rename from src/test/utils/mocks/mockLocalStorage.ts rename to test/testUtils/mocks/mockLocalStorage.ts diff --git a/src/test/utils/mocks/mockTextureManager.ts b/test/testUtils/mocks/mockTextureManager.ts similarity index 80% rename from src/test/utils/mocks/mockTextureManager.ts rename to test/testUtils/mocks/mockTextureManager.ts index 39066561f25..44d33cf8910 100644 --- a/src/test/utils/mocks/mockTextureManager.ts +++ b/test/testUtils/mocks/mockTextureManager.ts @@ -1,11 +1,11 @@ -import MockContainer from "#test/utils/mocks/mocksContainer/mockContainer"; -import MockImage from "#test/utils/mocks/mocksContainer/mockImage"; -import MockNineslice from "#test/utils/mocks/mocksContainer/mockNineslice"; -import MockPolygon from "#test/utils/mocks/mocksContainer/mockPolygon"; -import MockRectangle from "#test/utils/mocks/mocksContainer/mockRectangle"; -import MockSprite from "#test/utils/mocks/mocksContainer/mockSprite"; -import MockText from "#test/utils/mocks/mocksContainer/mockText"; -import MockTexture from "#test/utils/mocks/mocksContainer/mockTexture"; +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"; diff --git a/src/test/utils/mocks/mockTimedEventManager.ts b/test/testUtils/mocks/mockTimedEventManager.ts similarity index 100% rename from src/test/utils/mocks/mockTimedEventManager.ts rename to test/testUtils/mocks/mockTimedEventManager.ts diff --git a/src/test/utils/mocks/mockVideoGameObject.ts b/test/testUtils/mocks/mockVideoGameObject.ts similarity index 100% rename from src/test/utils/mocks/mockVideoGameObject.ts rename to test/testUtils/mocks/mockVideoGameObject.ts diff --git a/src/test/utils/mocks/mocksContainer/mockContainer.ts b/test/testUtils/mocks/mocksContainer/mockContainer.ts similarity index 98% rename from src/test/utils/mocks/mocksContainer/mockContainer.ts rename to test/testUtils/mocks/mocksContainer/mockContainer.ts index f0198535e7b..6c03ff7460d 100644 --- a/src/test/utils/mocks/mocksContainer/mockContainer.ts +++ b/test/testUtils/mocks/mocksContainer/mockContainer.ts @@ -1,4 +1,4 @@ -import type MockTextureManager from "#test/utils/mocks/mockTextureManager"; +import type MockTextureManager from "#test/testUtils/mocks/mockTextureManager"; import type { MockGameObject } from "../mockGameObject"; export default class MockContainer implements MockGameObject { diff --git a/src/test/utils/mocks/mocksContainer/mockGraphics.ts b/test/testUtils/mocks/mocksContainer/mockGraphics.ts similarity index 100% rename from src/test/utils/mocks/mocksContainer/mockGraphics.ts rename to test/testUtils/mocks/mocksContainer/mockGraphics.ts diff --git a/src/test/utils/mocks/mocksContainer/mockImage.ts b/test/testUtils/mocks/mocksContainer/mockImage.ts similarity index 70% rename from src/test/utils/mocks/mocksContainer/mockImage.ts rename to test/testUtils/mocks/mocksContainer/mockImage.ts index be183a0dd89..3badde4f8ab 100644 --- a/src/test/utils/mocks/mocksContainer/mockImage.ts +++ b/test/testUtils/mocks/mocksContainer/mockImage.ts @@ -1,4 +1,4 @@ -import MockContainer from "#test/utils/mocks/mocksContainer/mockContainer"; +import MockContainer from "#test/testUtils/mocks/mocksContainer/mockContainer"; export default class MockImage extends MockContainer { diff --git a/src/test/utils/mocks/mocksContainer/mockNineslice.ts b/test/testUtils/mocks/mocksContainer/mockNineslice.ts similarity index 86% rename from src/test/utils/mocks/mocksContainer/mockNineslice.ts rename to test/testUtils/mocks/mocksContainer/mockNineslice.ts index a8e10036a72..4f6b8a5d21d 100644 --- a/src/test/utils/mocks/mocksContainer/mockNineslice.ts +++ b/test/testUtils/mocks/mocksContainer/mockNineslice.ts @@ -1,4 +1,4 @@ -import MockContainer from "#test/utils/mocks/mocksContainer/mockContainer"; +import MockContainer from "#test/testUtils/mocks/mocksContainer/mockContainer"; export default class MockNineslice extends MockContainer { diff --git a/src/test/utils/mocks/mocksContainer/mockPolygon.ts b/test/testUtils/mocks/mocksContainer/mockPolygon.ts similarity index 67% rename from src/test/utils/mocks/mocksContainer/mockPolygon.ts rename to test/testUtils/mocks/mocksContainer/mockPolygon.ts index 12b60904a96..43e9c5460d0 100644 --- a/src/test/utils/mocks/mocksContainer/mockPolygon.ts +++ b/test/testUtils/mocks/mocksContainer/mockPolygon.ts @@ -1,4 +1,4 @@ -import MockContainer from "#test/utils/mocks/mocksContainer/mockContainer"; +import MockContainer from "#test/testUtils/mocks/mocksContainer/mockContainer"; export default class MockPolygon extends MockContainer { diff --git a/src/test/utils/mocks/mocksContainer/mockRectangle.ts b/test/testUtils/mocks/mocksContainer/mockRectangle.ts similarity index 100% rename from src/test/utils/mocks/mocksContainer/mockRectangle.ts rename to test/testUtils/mocks/mocksContainer/mockRectangle.ts diff --git a/src/test/utils/mocks/mocksContainer/mockSprite.ts b/test/testUtils/mocks/mocksContainer/mockSprite.ts similarity index 100% rename from src/test/utils/mocks/mocksContainer/mockSprite.ts rename to test/testUtils/mocks/mocksContainer/mockSprite.ts diff --git a/src/test/utils/mocks/mocksContainer/mockText.ts b/test/testUtils/mocks/mocksContainer/mockText.ts similarity index 100% rename from src/test/utils/mocks/mocksContainer/mockText.ts rename to test/testUtils/mocks/mocksContainer/mockText.ts diff --git a/src/test/utils/mocks/mocksContainer/mockTexture.ts b/test/testUtils/mocks/mocksContainer/mockTexture.ts similarity index 92% rename from src/test/utils/mocks/mocksContainer/mockTexture.ts rename to test/testUtils/mocks/mocksContainer/mockTexture.ts index 57c87df23be..a9186783d46 100644 --- a/src/test/utils/mocks/mocksContainer/mockTexture.ts +++ b/test/testUtils/mocks/mocksContainer/mockTexture.ts @@ -1,4 +1,4 @@ -import type MockTextureManager from "#test/utils/mocks/mockTextureManager"; +import type MockTextureManager from "#test/testUtils/mocks/mockTextureManager"; import type { MockGameObject } from "../mockGameObject"; diff --git a/src/test/utils/phaseInterceptor.ts b/test/testUtils/phaseInterceptor.ts similarity index 96% rename from src/test/utils/phaseInterceptor.ts rename to test/testUtils/phaseInterceptor.ts index d60e0e78373..fe0fbf82e29 100644 --- a/src/test/utils/phaseInterceptor.ts +++ b/test/testUtils/phaseInterceptor.ts @@ -1,5 +1,5 @@ import { Phase } from "#app/phase"; -import ErrorInterceptor from "#app/test/utils/errorInterceptor"; +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"; @@ -60,6 +60,7 @@ import { RibbonModifierRewardPhase } from "#app/phases/ribbon-modifier-reward-ph 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"; export interface PromptHandler { phaseTarget?: string; @@ -126,7 +127,8 @@ type PhaseClass = | typeof EncounterPhase | typeof GameOverPhase | typeof UnlockPhase - | typeof PostGameOverPhase; + | typeof PostGameOverPhase + | typeof RevivalBlessingPhase; type PhaseString = | "LoginPhase" @@ -185,7 +187,8 @@ type PhaseString = | "EncounterPhase" | "GameOverPhase" | "UnlockPhase" - | "PostGameOverPhase"; + | "PostGameOverPhase" + | "RevivalBlessingPhase"; type PhaseInterceptorPhase = PhaseClass | PhaseString; @@ -269,6 +272,7 @@ export default class PhaseInterceptor { [ GameOverPhase, this.startPhase ], [ UnlockPhase, this.startPhase ], [ PostGameOverPhase, this.startPhase ], + [ RevivalBlessingPhase, this.startPhase ], ]; private endBySetMode = [ @@ -511,11 +515,11 @@ export default class PhaseInterceptor { if (expireFn) { this.prompts.shift(); } else if ( - currentMode === actionForNextPrompt.mode - && currentPhase === actionForNextPrompt.phaseTarget - && currentHandler.active - && (!actionForNextPrompt.awaitingActionInput - || (actionForNextPrompt.awaitingActionInput && currentHandler.awaitingActionInput)) + currentMode === actionForNextPrompt.mode && + currentPhase === actionForNextPrompt.phaseTarget && + currentHandler.active && + (!actionForNextPrompt.awaitingActionInput || + (actionForNextPrompt.awaitingActionInput && currentHandler.awaitingActionInput)) ) { const prompt = this.prompts.shift(); if (prompt?.callback) { diff --git a/src/test/utils/saves/data_new.prsv b/test/testUtils/saves/data_new.prsv similarity index 100% rename from src/test/utils/saves/data_new.prsv rename to test/testUtils/saves/data_new.prsv diff --git a/src/test/utils/saves/everything.prsv b/test/testUtils/saves/everything.prsv similarity index 100% rename from src/test/utils/saves/everything.prsv rename to test/testUtils/saves/everything.prsv diff --git a/src/test/utils/testUtils.ts b/test/testUtils/testUtils.ts similarity index 100% rename from src/test/utils/testUtils.ts rename to test/testUtils/testUtils.ts diff --git a/src/test/ui/battle_info.test.ts b/test/ui/battle_info.test.ts similarity index 96% rename from src/test/ui/battle_info.test.ts rename to test/ui/battle_info.test.ts index 3100372f091..6209312c451 100644 --- a/src/test/ui/battle_info.test.ts +++ b/test/ui/battle_info.test.ts @@ -3,7 +3,7 @@ import { Species } from "#app/enums/species"; import { ExpPhase } from "#app/phases/exp-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/test/ui/starter-select.test.ts b/test/ui/starter-select.test.ts similarity index 97% rename from src/test/ui/starter-select.test.ts rename to test/ui/starter-select.test.ts index 15b5f643539..685debf098d 100644 --- a/src/test/ui/starter-select.test.ts +++ b/test/ui/starter-select.test.ts @@ -13,7 +13,7 @@ import { Mode } from "#app/ui/ui"; import { Abilities } from "#enums/abilities"; import { Button } from "#enums/buttons"; import { Species } from "#enums/species"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import i18next from "i18next"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -38,7 +38,7 @@ describe("UI - Starter select", () => { }); it("Bulbasaur - shiny - variant 2 male", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -98,7 +98,7 @@ describe("UI - Starter select", () => { }, 20000); it("Bulbasaur - shiny - variant 2 female hardy overgrow", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -160,7 +160,7 @@ describe("UI - Starter select", () => { }, 20000); it("Bulbasaur - shiny - variant 2 female lonely chlorophyl", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -225,7 +225,7 @@ describe("UI - Starter select", () => { }, 20000); it("Bulbasaur - shiny - variant 2 female", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -286,7 +286,7 @@ describe("UI - Starter select", () => { }, 20000); it("Bulbasaur - not shiny", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -346,7 +346,7 @@ describe("UI - Starter select", () => { }, 20000); it("Bulbasaur - shiny - variant 1", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -408,7 +408,7 @@ describe("UI - Starter select", () => { }, 20000); it("Bulbasaur - shiny - variant 0", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -469,7 +469,7 @@ describe("UI - Starter select", () => { }, 20000); it("Check if first pokemon in party is caterpie from gen 1 and 1rd row, 3rd column", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; @@ -533,7 +533,7 @@ describe("UI - Starter select", () => { }, 20000); it("Check if first pokemon in party is nidoran_m from gen 1 and 2nd row, 4th column (cursor (9+4)-1)", async() => { - await game.importData("src/test/utils/saves/everything.prsv"); + await game.importData("./test/testUtils/saves/everything.prsv"); const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => { const species = game.scene.gameData.dexData[key]; return species.caughtAttr !== 0n; diff --git a/src/test/ui/transfer-item.test.ts b/test/ui/transfer-item.test.ts similarity index 98% rename from src/test/ui/transfer-item.test.ts rename to test/ui/transfer-item.test.ts index b08b056f60e..83c2eb2ef79 100644 --- a/src/test/ui/transfer-item.test.ts +++ b/test/ui/transfer-item.test.ts @@ -5,7 +5,7 @@ import { Species } from "#app/enums/species"; import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; import PartyUiHandler, { PartyUiMode } from "#app/ui/party-ui-handler"; import { Mode } from "#app/ui/ui"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; 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/src/test/ui/type-hints.test.ts b/test/ui/type-hints.test.ts similarity index 95% rename from src/test/ui/type-hints.test.ts rename to test/ui/type-hints.test.ts index 9046d82c1df..0838ab01f51 100644 --- a/src/test/ui/type-hints.test.ts +++ b/test/ui/type-hints.test.ts @@ -4,10 +4,10 @@ import { Species } from "#app/enums/species"; import { CommandPhase } from "#app/phases/command-phase"; import FightUiHandler from "#app/ui/fight-ui-handler"; import { Mode } from "#app/ui/ui"; -import GameManager from "#test/utils/gameManager"; +import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import type MockText from "#test/utils/mocks/mocksContainer/mockText"; +import type MockText from "#test/testUtils/mocks/mocksContainer/mockText"; import i18next from "i18next"; describe("UI - Type Hints", () => { diff --git a/src/test/vitest.setup.ts b/test/vitest.setup.ts similarity index 97% rename from src/test/vitest.setup.ts rename to test/vitest.setup.ts index eb2c1e4b9cf..bc7db8ea591 100644 --- a/src/test/vitest.setup.ts +++ b/test/vitest.setup.ts @@ -45,7 +45,7 @@ vi.mock("i18next", async (importOriginal) => { const filename = req.params[0]; try { - const json = await import(`../../public/locales/en/${req.params[0]}`); + const json = await import(`../public/locales/en/${req.params[0]}`); console.log("Loaded locale", filename); return HttpResponse.json(json); } catch (err) { diff --git a/tsconfig.json b/tsconfig.json index 0ec945df4ee..6bb0ae51c1b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,12 +8,12 @@ "strictNullChecks": true, "sourceMap": false, "strict": false, - "rootDir": "./src", + "rootDir": ".", "baseUrl": "./src", "paths": { "#enums/*": ["./enums/*.ts"], "#app/*": ["*.ts"], - "#test/*": ["./test/*.ts"] + "#test/*": ["../test/*.ts"] }, "outDir": "./build", "noEmit": true @@ -31,4 +31,4 @@ "vitest.config.ts", "vitest.workspace.ts", ] -} \ No newline at end of file +} diff --git a/vitest.config.ts b/vitest.config.ts index 9f9245687a1..b52c16ec00c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,7 +5,7 @@ export default defineProject(({ mode }) => ({ ...defaultConfig, test: { testTimeout: 20000, - setupFiles: ["./src/test/fontFace.setup.ts", "./src/test/vitest.setup.ts"], + setupFiles: ["./test/fontFace.setup.ts", "./test/vitest.setup.ts"], server: { deps: { inline: ["vitest-canvas-mock"], @@ -33,8 +33,8 @@ export default defineProject(({ mode }) => ({ reporters: ["text-summary", "html"], }, name: "main", - include: ["./src/test/**/*.{test,spec}.ts"], - exclude: ["./src/test/pre.test.ts"], + include: ["./test/**/*.{test,spec}.ts"], + exclude: ["./test/pre.test.ts"], }, esbuild: { pure: mode === "production" ? ["console.log"] : [], diff --git a/vitest.workspace.ts b/vitest.workspace.ts index 38121942004..2f5d1f1e2c8 100644 --- a/vitest.workspace.ts +++ b/vitest.workspace.ts @@ -6,7 +6,7 @@ export default defineWorkspace([ ...defaultConfig, test: { name: "pre", - include: ["src/test/pre.test.ts"], + include: ["./test/pre.test.ts"], environment: "jsdom", }, },