diff --git a/public/images/pokemon/867.png b/public/images/pokemon/867.png index bd07a7a4837..2fe8856d74d 100644 Binary files a/public/images/pokemon/867.png and b/public/images/pokemon/867.png differ diff --git a/public/images/pokemon/back/867.png b/public/images/pokemon/back/867.png index 925002d7483..ae631607ef2 100644 Binary files a/public/images/pokemon/back/867.png and b/public/images/pokemon/back/867.png differ diff --git a/public/images/pokemon/back/shiny/867.png b/public/images/pokemon/back/shiny/867.png index fce3fe4e37e..accb87844f1 100644 Binary files a/public/images/pokemon/back/shiny/867.png and b/public/images/pokemon/back/shiny/867.png differ diff --git a/public/images/pokemon/exp/867.json b/public/images/pokemon/exp/867.json index 1a9c7572f43..52e0127509b 100644 --- a/public/images/pokemon/exp/867.json +++ b/public/images/pokemon/exp/867.json @@ -4,8 +4,8 @@ "image": "867.png", "format": "RGBA8888", "size": { - "w": 344, - "h": 344 + "w": 361, + "h": 361 }, "scale": 1, "frames": [ @@ -31,7 +31,7 @@ } }, { - "filename": "0020.png", + "filename": "0021.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -52,7 +52,7 @@ } }, { - "filename": "0035.png", + "filename": "0037.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -94,70 +94,7 @@ } }, { - "filename": "0006.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 113, - "h": 56 - }, - "frame": { - "x": 114, - "y": 0, - "w": 113, - "h": 56 - } - }, - { - "filename": "0019.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 113, - "h": 56 - }, - "frame": { - "x": 114, - "y": 0, - "w": 113, - "h": 56 - } - }, - { - "filename": "0021.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 1, - "y": 0, - "w": 113, - "h": 56 - }, - "frame": { - "x": 114, - "y": 0, - "w": 113, - "h": 56 - } - }, - { - "filename": "0034.png", + "filename": "0020.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -199,7 +136,7 @@ } }, { - "filename": "0003.png", + "filename": "0006.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -207,20 +144,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 4, + "x": 2, "y": 0, - "w": 107, + "w": 112, "h": 56 }, "frame": { "x": 227, "y": 0, - "w": 107, + "w": 112, "h": 56 } }, { - "filename": "0018.png", + "filename": "0022.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -228,20 +165,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 4, + "x": 2, "y": 0, - "w": 107, + "w": 112, "h": 56 }, "frame": { "x": 227, "y": 0, - "w": 107, + "w": 112, "h": 56 } }, { - "filename": "0033.png", + "filename": "0038.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -249,62 +186,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 4, + "x": 2, "y": 0, - "w": 107, + "w": 112, "h": 56 }, "frame": { "x": 227, "y": 0, - "w": 107, + "w": 112, "h": 56 } }, { - "filename": "0011.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 103, - "h": 65 - }, - "frame": { - "x": 0, - "y": 56, - "w": 103, - "h": 65 - } - }, - { - "filename": "0013.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 5, - "y": 0, - "w": 103, - "h": 65 - }, - "frame": { - "x": 0, - "y": 56, - "w": 103, - "h": 65 - } - }, - { - "filename": "0026.png", + "filename": "0012.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -346,7 +241,7 @@ } }, { - "filename": "0041.png", + "filename": "0044.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -367,7 +262,7 @@ } }, { - "filename": "0043.png", + "filename": "0003.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -375,16 +270,58 @@ "h": 66 }, "spriteSourceSize": { - "x": 5, + "x": 4, "y": 0, - "w": 103, - "h": 65 + "w": 107, + "h": 56 }, "frame": { - "x": 0, + "x": 103, "y": 56, - "w": 103, - "h": 65 + "w": 107, + "h": 56 + } + }, + { + "filename": "0019.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 4, + "y": 0, + "w": 107, + "h": 56 + }, + "frame": { + "x": 103, + "y": 56, + "w": 107, + "h": 56 + } + }, + { + "filename": "0035.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 4, + "y": 0, + "w": 107, + "h": 56 + }, + "frame": { + "x": 103, + "y": 56, + "w": 107, + "h": 56 } }, { @@ -402,14 +339,14 @@ "h": 56 }, "frame": { - "x": 103, + "x": 210, "y": 56, "w": 107, "h": 56 } }, { - "filename": "0022.png", + "filename": "0023.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -423,14 +360,14 @@ "h": 56 }, "frame": { - "x": 103, + "x": 210, "y": 56, "w": 107, "h": 56 } }, { - "filename": "0037.png", + "filename": "0039.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -444,12 +381,54 @@ "h": 56 }, "frame": { - "x": 103, + "x": 210, "y": 56, "w": 107, "h": 56 } }, + { + "filename": "0053.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 40, + "y": 1, + "w": 44, + "h": 56 + }, + "frame": { + "x": 317, + "y": 56, + "w": 44, + "h": 56 + } + }, + { + "filename": "0064.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 40, + "y": 1, + "w": 44, + "h": 56 + }, + "frame": { + "x": 317, + "y": 56, + "w": 44, + "h": 56 + } + }, { "filename": "0002.png", "rotated": false, @@ -465,14 +444,14 @@ "h": 57 }, "frame": { - "x": 210, - "y": 56, + "x": 103, + "y": 112, "w": 102, "h": 57 } }, { - "filename": "0017.png", + "filename": "0018.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -486,14 +465,14 @@ "h": 57 }, "frame": { - "x": 210, - "y": 56, + "x": 103, + "y": 112, "w": 102, "h": 57 } }, { - "filename": "0032.png", + "filename": "0034.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -507,12 +486,138 @@ "h": 57 }, "frame": { - "x": 210, - "y": 56, + "x": 103, + "y": 112, "w": 102, "h": 57 } }, + { + "filename": "0013.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 5, + "y": 1, + "w": 101, + "h": 65 + }, + "frame": { + "x": 0, + "y": 121, + "w": 101, + "h": 65 + } + }, + { + "filename": "0029.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 5, + "y": 1, + "w": 101, + "h": 65 + }, + "frame": { + "x": 0, + "y": 121, + "w": 101, + "h": 65 + } + }, + { + "filename": "0045.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 5, + "y": 1, + "w": 101, + "h": 65 + }, + "frame": { + "x": 0, + "y": 121, + "w": 101, + "h": 65 + } + }, + { + "filename": "0011.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 7, + "y": 0, + "w": 101, + "h": 61 + }, + "frame": { + "x": 205, + "y": 112, + "w": 101, + "h": 61 + } + }, + { + "filename": "0027.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 7, + "y": 0, + "w": 101, + "h": 61 + }, + "frame": { + "x": 205, + "y": 112, + "w": 101, + "h": 61 + } + }, + { + "filename": "0043.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 7, + "y": 0, + "w": 101, + "h": 61 + }, + "frame": { + "x": 205, + "y": 112, + "w": 101, + "h": 61 + } + }, { "filename": "0008.png", "rotated": false, @@ -524,266 +629,14 @@ "spriteSourceSize": { "x": 6, "y": 0, - "w": 102, + "w": 101, "h": 57 }, - "frame": { - "x": 103, - "y": 112, - "w": 102, - "h": 57 - } - }, - { - "filename": "0023.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 6, - "y": 0, - "w": 102, - "h": 57 - }, - "frame": { - "x": 103, - "y": 112, - "w": 102, - "h": 57 - } - }, - { - "filename": "0038.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 6, - "y": 0, - "w": 102, - "h": 57 - }, - "frame": { - "x": 103, - "y": 112, - "w": 102, - "h": 57 - } - }, - { - "filename": "0012.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 5, - "y": 1, - "w": 101, - "h": 65 - }, - "frame": { - "x": 0, - "y": 121, - "w": 101, - "h": 65 - } - }, - { - "filename": "0027.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 5, - "y": 1, - "w": 101, - "h": 65 - }, - "frame": { - "x": 0, - "y": 121, - "w": 101, - "h": 65 - } - }, - { - "filename": "0042.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 5, - "y": 1, - "w": 101, - "h": 65 - }, - "frame": { - "x": 0, - "y": 121, - "w": 101, - "h": 65 - } - }, - { - "filename": "0010.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 101, - "h": 61 - }, - "frame": { - "x": 205, - "y": 113, - "w": 101, - "h": 61 - } - }, - { - "filename": "0014.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 101, - "h": 61 - }, - "frame": { - "x": 205, - "y": 113, - "w": 101, - "h": 61 - } - }, - { - "filename": "0025.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 101, - "h": 61 - }, - "frame": { - "x": 205, - "y": 113, - "w": 101, - "h": 61 - } - }, - { - "filename": "0029.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 101, - "h": 61 - }, - "frame": { - "x": 205, - "y": 113, - "w": 101, - "h": 61 - } - }, - { - "filename": "0040.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 101, - "h": 61 - }, - "frame": { - "x": 205, - "y": 113, - "w": 101, - "h": 61 - } - }, - { - "filename": "0044.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 7, - "y": 0, - "w": 101, - "h": 61 - }, - "frame": { - "x": 205, - "y": 113, - "w": 101, - "h": 61 - } - }, - { - "filename": "0009.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 8, - "y": 0, - "w": 99, - "h": 59 - }, "frame": { "x": 101, "y": 169, - "w": 99, - "h": 59 + "w": 101, + "h": 57 } }, { @@ -795,20 +648,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 8, + "x": 6, "y": 0, - "w": 99, - "h": 59 + "w": 101, + "h": 57 }, "frame": { "x": 101, "y": 169, - "w": 99, - "h": 59 + "w": 101, + "h": 57 } }, { - "filename": "0039.png", + "filename": "0040.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -816,20 +669,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 8, + "x": 6, "y": 0, - "w": 99, - "h": 59 + "w": 101, + "h": 57 }, "frame": { "x": 101, "y": 169, - "w": 99, - "h": 59 + "w": 101, + "h": 57 } }, { - "filename": "0015.png", + "filename": "0010.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -849,6 +702,195 @@ "h": 59 } }, + { + "filename": "0026.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 8, + "y": 0, + "w": 99, + "h": 59 + }, + "frame": { + "x": 0, + "y": 186, + "w": 99, + "h": 59 + } + }, + { + "filename": "0042.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 8, + "y": 0, + "w": 99, + "h": 59 + }, + "frame": { + "x": 0, + "y": 186, + "w": 99, + "h": 59 + } + }, + { + "filename": "0054.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 40, + "y": 0, + "w": 44, + "h": 54 + }, + "frame": { + "x": 306, + "y": 112, + "w": 44, + "h": 54 + } + }, + { + "filename": "0055.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 40, + "y": 3, + "w": 44, + "h": 54 + }, + "frame": { + "x": 306, + "y": 112, + "w": 44, + "h": 54 + } + }, + { + "filename": "0059.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 40, + "y": 3, + "w": 44, + "h": 54 + }, + "frame": { + "x": 306, + "y": 112, + "w": 44, + "h": 54 + } + }, + { + "filename": "0063.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 40, + "y": 3, + "w": 44, + "h": 54 + }, + "frame": { + "x": 306, + "y": 112, + "w": 44, + "h": 54 + } + }, + { + "filename": "0060.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 39, + "y": 3, + "w": 44, + "h": 54 + }, + "frame": { + "x": 306, + "y": 166, + "w": 44, + "h": 54 + } + }, + { + "filename": "0062.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 39, + "y": 3, + "w": 44, + "h": 54 + }, + "frame": { + "x": 306, + "y": 166, + "w": 44, + "h": 54 + } + }, + { + "filename": "0014.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 5, + "y": 0, + "w": 97, + "h": 65 + }, + "frame": { + "x": 202, + "y": 173, + "w": 97, + "h": 65 + } + }, { "filename": "0030.png", "rotated": false, @@ -858,20 +900,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 8, + "x": 5, "y": 0, - "w": 99, - "h": 59 + "w": 97, + "h": 65 }, "frame": { - "x": 0, - "y": 186, - "w": 99, - "h": 59 + "x": 202, + "y": 173, + "w": 97, + "h": 65 } }, { - "filename": "0045.png", + "filename": "0046.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -879,16 +921,58 @@ "h": 66 }, "spriteSourceSize": { - "x": 8, + "x": 5, "y": 0, - "w": 99, - "h": 59 + "w": 97, + "h": 65 }, "frame": { - "x": 0, - "y": 186, - "w": 99, - "h": 59 + "x": 202, + "y": 173, + "w": 97, + "h": 65 + } + }, + { + "filename": "0051.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 29, + "y": 1, + "w": 58, + "h": 57 + }, + "frame": { + "x": 299, + "y": 220, + "w": 58, + "h": 57 + } + }, + { + "filename": "0066.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 29, + "y": 1, + "w": 58, + "h": 57 + }, + "frame": { + "x": 299, + "y": 220, + "w": 58, + "h": 57 } }, { @@ -906,8 +990,134 @@ "h": 59 }, "frame": { - "x": 0, - "y": 245, + "x": 99, + "y": 226, + "w": 95, + "h": 59 + } + }, + { + "filename": "0009.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 9, + "y": 1, + "w": 95, + "h": 59 + }, + "frame": { + "x": 99, + "y": 226, + "w": 95, + "h": 59 + } + }, + { + "filename": "0017.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 9, + "y": 1, + "w": 95, + "h": 59 + }, + "frame": { + "x": 99, + "y": 226, + "w": 95, + "h": 59 + } + }, + { + "filename": "0025.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 9, + "y": 1, + "w": 95, + "h": 59 + }, + "frame": { + "x": 99, + "y": 226, + "w": 95, + "h": 59 + } + }, + { + "filename": "0033.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 9, + "y": 1, + "w": 95, + "h": 59 + }, + "frame": { + "x": 99, + "y": 226, + "w": 95, + "h": 59 + } + }, + { + "filename": "0041.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 9, + "y": 1, + "w": 95, + "h": 59 + }, + "frame": { + "x": 99, + "y": 226, + "w": 95, + "h": 59 + } + }, + { + "filename": "0068.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 9, + "y": 1, + "w": 95, + "h": 59 + }, + "frame": { + "x": 99, + "y": 226, "w": 95, "h": 59 } @@ -921,146 +1131,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 9, - "y": 1, - "w": 95, - "h": 59 - }, - "frame": { - "x": 0, - "y": 245, - "w": 95, - "h": 59 - } - }, - { - "filename": "0031.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 9, - "y": 1, - "w": 95, - "h": 59 - }, - "frame": { - "x": 0, - "y": 245, - "w": 95, - "h": 59 - } - }, - { - "filename": "0065.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 9, - "y": 1, - "w": 95, - "h": 59 - }, - "frame": { - "x": 0, - "y": 245, - "w": 95, - "h": 59 - } - }, - { - "filename": "0046.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 12, - "y": 1, - "w": 90, - "h": 59 - }, - "frame": { - "x": 95, - "y": 245, - "w": 90, - "h": 59 - } - }, - { - "filename": "0047.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 22, - "y": 1, - "w": 70, - "h": 59 - }, - "frame": { - "x": 185, - "y": 228, - "w": 70, - "h": 59 - } - }, - { - "filename": "0064.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 22, - "y": 1, - "w": 70, - "h": 59 - }, - "frame": { - "x": 185, - "y": 228, - "w": 70, - "h": 59 - } - }, - { - "filename": "0051.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 40, + "x": 8, "y": 0, - "w": 44, - "h": 54 + "w": 95, + "h": 59 }, "frame": { - "x": 200, - "y": 174, - "w": 44, - "h": 54 + "x": 0, + "y": 245, + "w": 95, + "h": 59 } }, { - "filename": "0052.png", + "filename": "0032.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -1068,100 +1152,16 @@ "h": 66 }, "spriteSourceSize": { - "x": 40, - "y": 3, - "w": 44, - "h": 54 + "x": 8, + "y": 0, + "w": 95, + "h": 59 }, "frame": { - "x": 200, - "y": 174, - "w": 44, - "h": 54 - } - }, - { - "filename": "0056.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 40, - "y": 3, - "w": 44, - "h": 54 - }, - "frame": { - "x": 200, - "y": 174, - "w": 44, - "h": 54 - } - }, - { - "filename": "0060.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 40, - "y": 3, - "w": 44, - "h": 54 - }, - "frame": { - "x": 200, - "y": 174, - "w": 44, - "h": 54 - } - }, - { - "filename": "0057.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 39, - "y": 3, - "w": 44, - "h": 54 - }, - "frame": { - "x": 244, - "y": 174, - "w": 44, - "h": 54 - } - }, - { - "filename": "0059.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 39, - "y": 3, - "w": 44, - "h": 54 - }, - "frame": { - "x": 244, - "y": 174, - "w": 44, - "h": 54 + "x": 0, + "y": 245, + "w": 95, + "h": 59 } }, { @@ -1173,41 +1173,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 29, - "y": 1, - "w": 58, - "h": 57 + "x": 8, + "y": 0, + "w": 95, + "h": 59 }, "frame": { - "x": 185, - "y": 287, - "w": 58, - "h": 57 + "x": 0, + "y": 245, + "w": 95, + "h": 59 } }, { - "filename": "0063.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 29, - "y": 1, - "w": 58, - "h": 57 - }, - "frame": { - "x": 185, - "y": 287, - "w": 58, - "h": 57 - } - }, - { - "filename": "0049.png", + "filename": "0052.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -1221,14 +1200,14 @@ "h": 56 }, "frame": { - "x": 288, - "y": 174, + "x": 0, + "y": 304, "w": 56, "h": 56 } }, { - "filename": "0062.png", + "filename": "0065.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -1242,56 +1221,14 @@ "h": 56 }, "frame": { - "x": 288, - "y": 174, + "x": 0, + "y": 304, "w": 56, "h": 56 } }, { - "filename": "0050.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 40, - "y": 1, - "w": 44, - "h": 56 - }, - "frame": { - "x": 243, - "y": 287, - "w": 44, - "h": 56 - } - }, - { - "filename": "0061.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 40, - "y": 1, - "w": 44, - "h": 56 - }, - "frame": { - "x": 243, - "y": 287, - "w": 44, - "h": 56 - } - }, - { - "filename": "0053.png", + "filename": "0056.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -1305,29 +1242,8 @@ "h": 53 }, "frame": { - "x": 255, - "y": 230, - "w": 44, - "h": 53 - } - }, - { - "filename": "0055.png", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 114, - "h": 66 - }, - "spriteSourceSize": { - "x": 41, - "y": 4, - "w": 44, - "h": 53 - }, - "frame": { - "x": 255, - "y": 230, + "x": 56, + "y": 304, "w": 44, "h": 53 } @@ -1341,20 +1257,20 @@ "h": 66 }, "spriteSourceSize": { - "x": 38, + "x": 41, "y": 4, "w": 44, "h": 53 }, "frame": { - "x": 299, - "y": 230, + "x": 56, + "y": 304, "w": 44, "h": 53 } }, { - "filename": "0054.png", + "filename": "0015.png", "rotated": false, "trimmed": true, "sourceSize": { @@ -1362,14 +1278,161 @@ "h": 66 }, "spriteSourceSize": { - "x": 42, + "x": 7, + "y": 0, + "w": 94, + "h": 61 + }, + "frame": { + "x": 194, + "y": 238, + "w": 94, + "h": 61 + } + }, + { + "filename": "0031.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 7, + "y": 0, + "w": 94, + "h": 61 + }, + "frame": { + "x": 194, + "y": 238, + "w": 94, + "h": 61 + } + }, + { + "filename": "0047.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 7, + "y": 0, + "w": 94, + "h": 61 + }, + "frame": { + "x": 194, + "y": 238, + "w": 94, + "h": 61 + } + }, + { + "filename": "0050.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 22, + "y": 1, + "w": 70, + "h": 59 + }, + "frame": { + "x": 288, + "y": 277, + "w": 70, + "h": 59 + } + }, + { + "filename": "0067.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 22, + "y": 1, + "w": 70, + "h": 59 + }, + "frame": { + "x": 288, + "y": 277, + "w": 70, + "h": 59 + } + }, + { + "filename": "0049.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 12, + "y": 1, + "w": 90, + "h": 59 + }, + "frame": { + "x": 100, + "y": 299, + "w": 90, + "h": 59 + } + }, + { + "filename": "0061.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 37, + "y": 4, + "w": 44, + "h": 53 + }, + "frame": { + "x": 190, + "y": 299, + "w": 44, + "h": 53 + } + }, + { + "filename": "0057.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 114, + "h": 66 + }, + "spriteSourceSize": { + "x": 43, "y": 5, "w": 44, "h": 52 }, "frame": { - "x": 287, - "y": 283, + "x": 234, + "y": 299, "w": 44, "h": 52 } @@ -1379,7 +1442,6 @@ ], "meta": { "app": "https://www.codeandweb.com/texturepacker", - "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:b8ca75f7f37906e78ed633b32d037b74:92bc79a7ca35490600679451c06105fc:58bcd289dd222ce646aec14ff657c9fc$" + "version": "3.0" } } diff --git a/public/images/pokemon/exp/867.png b/public/images/pokemon/exp/867.png index 689a72694ef..4f8f67842bd 100644 Binary files a/public/images/pokemon/exp/867.png and b/public/images/pokemon/exp/867.png differ diff --git a/public/images/pokemon/exp/back/867.png b/public/images/pokemon/exp/back/867.png index 766ce3f39ed..b816f10a0de 100644 Binary files a/public/images/pokemon/exp/back/867.png and b/public/images/pokemon/exp/back/867.png differ diff --git a/public/images/pokemon/exp/back/shiny/867.png b/public/images/pokemon/exp/back/shiny/867.png index 7be80836150..9821217341e 100644 Binary files a/public/images/pokemon/exp/back/shiny/867.png and b/public/images/pokemon/exp/back/shiny/867.png differ diff --git a/public/images/pokemon/shiny/867.png b/public/images/pokemon/shiny/867.png index a56e107a9c4..0443deeaf9c 100644 Binary files a/public/images/pokemon/shiny/867.png and b/public/images/pokemon/shiny/867.png differ diff --git a/public/images/pokemon/variant/back/female/178_2.png b/public/images/pokemon/variant/back/female/178_2.png index 7d2785dc0af..3bf2b443719 100644 Binary files a/public/images/pokemon/variant/back/female/178_2.png and b/public/images/pokemon/variant/back/female/178_2.png differ diff --git a/public/images/pokemon/variant/back/female/178_3.png b/public/images/pokemon/variant/back/female/178_3.png index 32ffdd895c6..9533621c6d6 100644 Binary files a/public/images/pokemon/variant/back/female/178_3.png and b/public/images/pokemon/variant/back/female/178_3.png differ diff --git a/public/images/pokemon/variant/exp/800-ultra.json b/public/images/pokemon/variant/exp/800-ultra.json index 53dd9b55df0..cab917ec271 100644 --- a/public/images/pokemon/variant/exp/800-ultra.json +++ b/public/images/pokemon/variant/exp/800-ultra.json @@ -1,21 +1,5 @@ { "1": { - "b0a080": "e552ec", - "f8f8e8": "ffe2ed", - "9b8259": "b021c5", - "e5e4c2": "ffb9f9", - "000000": "000000", - "bc9b4e": "900090", - "f8f8d0": "ff8ae9", - "e8e088": "ff49e7", - "d0b868": "d10cc7", - "7d673b": "510059", - "282828": "282828", - "f84040": "f84040", - "f88888": "1ae2e6", - "c81010": "00c2d2" - }, - "2": { "b0a080": "d96b23", "f8f8e8": "ffe1b8", "9b8259": "b43c06", @@ -30,5 +14,21 @@ "f84040": "f84040", "f88888": "f88888", "c81010": "c81010" + }, + "2": { + "b0a080": "e552ec", + "f8f8e8": "ffe2ed", + "9b8259": "b021c5", + "e5e4c2": "ffb9f9", + "000000": "000000", + "bc9b4e": "900090", + "f8f8d0": "ff8ae9", + "e8e088": "ff49e7", + "d0b868": "d10cc7", + "7d673b": "510059", + "282828": "282828", + "f84040": "f84040", + "f88888": "1ae2e6", + "c81010": "00c2d2" } } \ No newline at end of file diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 674b4e256f9..4faf3863e3c 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2421,7 +2421,6 @@ export default class BattleScene extends SceneBase { getEnemyModifierTypesForWave(difficultyWaveIndex, count, [ enemyPokemon ], this.currentBattle.battleType === BattleType.TRAINER ? ModifierPoolType.TRAINER : ModifierPoolType.WILD, upgradeChance) .map(mt => mt.newModifier(enemyPokemon).add(this.enemyModifiers, false, this)); }); - this.updateModifiers(false).then(() => resolve()); }); } diff --git a/src/data/ability.ts b/src/data/ability.ts index cfd900d621c..38ca4eb25d0 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2395,16 +2395,16 @@ export class PreStatChangeAbAttr extends AbAttr { } export class ProtectStatAbAttr extends PreStatChangeAbAttr { - private protectedStat: BattleStat | null; + private protectedStat?: BattleStat; constructor(protectedStat?: BattleStat) { super(); - this.protectedStat = protectedStat ?? null; + this.protectedStat = protectedStat; } applyPreStatChange(pokemon: Pokemon, passive: boolean, stat: BattleStat, cancelled: Utils.BooleanHolder, args: any[]): boolean { - if (!this.protectedStat || stat === this.protectedStat) { + if (Utils.isNullOrUndefined(this.protectedStat) || stat === this.protectedStat) { cancelled.value = true; return true; } diff --git a/src/data/move.ts b/src/data/move.ts index 79e67ece581..24651bacb2e 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4441,7 +4441,7 @@ export class CurseAttr extends MoveEffectAttr { const curseRecoilDamage = Math.max(1, Math.floor(user.getMaxHp() / 2)); user.damageAndUpdate(curseRecoilDamage, HitResult.OTHER, false, true, true); user.scene.queueMessage( - i18next.t("battle:cursedOnAdd", { + i18next.t("battlerTags:cursedOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(user), pokemonName: getPokemonNameWithAffix(target) }) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f1721299ad0..e38813ed3c0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -921,7 +921,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * by how many learnable moves there are for the {@linkcode Pokemon}. */ getLearnableLevelMoves(): Moves[] { - let levelMoves = this.getLevelMoves(1, true).map(lm => lm[1]); + let levelMoves = this.getLevelMoves(1, true, false, true).map(lm => lm[1]); if (this.metBiome === -1 && !this.scene.gameMode.isFreshStartChallenge() && !this.scene.gameMode.isDaily) { levelMoves = this.getUnlockedEggMoves().concat(levelMoves); } @@ -1210,11 +1210,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * * @param source - The Pokémon using the move. * @param move - The move being used. - * @returns The type damage multiplier or undefined if it's a status move + * @returns The type damage multiplier or 1 if it's a status move */ - getMoveEffectiveness(source: Pokemon, move: PokemonMove): TypeDamageMultiplier | undefined { + getMoveEffectiveness(source: Pokemon, move: PokemonMove): TypeDamageMultiplier { if (move.getMove().category === MoveCategory.STATUS) { - return undefined; + return 1; } return this.getAttackMoveEffectiveness(source, move, !this.battleData?.abilityRevealed); diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 1dff041a14e..f4ec6c499f4 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -2414,7 +2414,7 @@ export class ContactHeldItemTransferChanceModifier extends HeldItemTransferModif } getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string { - return i18next.t("modifier:contactHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: pokemon.name, typeName: this.type.name }); + return i18next.t("modifier:contactHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: getPokemonNameWithAffix(pokemon), typeName: this.type.name }); } getMaxHeldItemCount(pokemon: Pokemon): integer { diff --git a/src/phases.ts b/src/phases.ts index 88acfc825ef..c50d25acf60 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -878,6 +878,10 @@ export class EncounterPhase extends BattlePhase { } else if (!(battle.waveIndex % 1000)) { enemyPokemon.formIndex = 1; enemyPokemon.updateScale(); + const bossMBH = this.scene.findModifier(m => m instanceof TurnHeldItemTransferModifier && m.pokemonId === enemyPokemon.id, false) as TurnHeldItemTransferModifier; + this.scene.removeModifier(bossMBH!); + bossMBH?.setTransferrableFalse(); + this.scene.addEnemyModifier(bossMBH!); } } @@ -4033,13 +4037,24 @@ export class FaintPhase extends PokemonPhase { } if (this.player) { - const nonFaintedLegalPartyMembers = this.scene.getParty().filter(p => p.isAllowedInBattle()); - const nonFaintedPartyMemberCount = nonFaintedLegalPartyMembers.length; - if (!nonFaintedPartyMemberCount) { + /** The total number of Pokemon in the player's party that can legally fight */ + const legalPlayerPokemon = this.scene.getParty().filter(p => p.isAllowedInBattle()); + /** The total number of legal player Pokemon that aren't currently on the field */ + const legalPlayerPartyPokemon = legalPlayerPokemon.filter(p => !p.isActive(true)); + if (!legalPlayerPokemon.length) { + /** If the player doesn't have any legal Pokemon, end the game */ this.scene.unshiftPhase(new GameOverPhase(this.scene)); - } else if (nonFaintedPartyMemberCount === 1 && this.scene.currentBattle.double) { + } else if (this.scene.currentBattle.double && legalPlayerPokemon.length === 1 && legalPlayerPartyPokemon.length === 0) { + /** + * If the player has exactly one Pokemon in total at this point in a double battle, and that Pokemon + * is already on the field, unshift a phase that moves that Pokemon to center position. + */ this.scene.unshiftPhase(new ToggleDoublePositionPhase(this.scene, true)); - } else if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount()) { + } else if (legalPlayerPartyPokemon.length > 0) { + /** + * If previous conditions weren't met, and the player has at least 1 legal Pokemon off the field, + * push a phase that prompts the player to summon a Pokemon from their party. + */ this.scene.pushPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false)); } } else { diff --git a/src/test/abilities/hyper_cutter.test.ts b/src/test/abilities/hyper_cutter.test.ts new file mode 100644 index 00000000000..9637a80ddb4 --- /dev/null +++ b/src/test/abilities/hyper_cutter.test.ts @@ -0,0 +1,58 @@ +import { BattleStat } from "#app/data/battle-stat"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import { getMovePosition } from "#test/utils/gameManagerUtils"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Abilities - Hyper Cutter", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .moveset([Moves.SAND_ATTACK, Moves.NOBLE_ROAR, Moves.DEFOG, Moves.OCTOLOCK]) + .ability(Abilities.BALL_FETCH) + .enemySpecies(Species.SHUCKLE) + .enemyAbility(Abilities.HYPER_CUTTER) + .enemyMoveset(SPLASH_ONLY); + }); + + // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability) + + it("only prevents ATK drops", async () => { + await game.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + + game.doAttack(getMovePosition(game.scene, 0, Moves.OCTOLOCK)); + await game.toNextTurn(); + game.doAttack(getMovePosition(game.scene, 0, Moves.DEFOG)); + await game.toNextTurn(); + game.doAttack(getMovePosition(game.scene, 0, Moves.NOBLE_ROAR)); + await game.toNextTurn(); + game.doAttack(getMovePosition(game.scene, 0, Moves.SAND_ATTACK)); + await game.toNextTurn(); + game.override.moveset([Moves.STRING_SHOT]); + game.doAttack(getMovePosition(game.scene, 0, Moves.STRING_SHOT)); + await game.toNextTurn(); + + expect(enemy.summonData.battleStats[BattleStat.ATK]).toEqual(0); + [BattleStat.ACC, BattleStat.DEF, BattleStat.EVA, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD].forEach((stat: number) => expect(enemy.summonData.battleStats[stat]).toBeLessThan(0)); + }); +}); diff --git a/src/test/moves/rollout.test.ts b/src/test/moves/rollout.test.ts index ad323c447f5..728fe1ecd45 100644 --- a/src/test/moves/rollout.test.ts +++ b/src/test/moves/rollout.test.ts @@ -12,6 +12,7 @@ import { SPLASH_ONLY } from "#test/utils/testUtils"; describe("Moves - Rollout", () => { let phaserGame: Phaser.Game; let game: GameManager; + const TIMEOUT = 20 * 1000; beforeAll(() => { phaserGame = new Phaser.Game({ @@ -77,5 +78,5 @@ describe("Moves - Rollout", () => { // reset expect(turn6Dmg).toBeGreaterThanOrEqual(turn1Dmg - variance); expect(turn6Dmg).toBeLessThanOrEqual(turn1Dmg + variance); - }); + }, TIMEOUT); }); diff --git a/src/test/ui/transfer-item.test.ts b/src/test/ui/transfer-item.test.ts index bbb9a823ad9..9315971e484 100644 --- a/src/test/ui/transfer-item.test.ts +++ b/src/test/ui/transfer-item.test.ts @@ -87,7 +87,6 @@ describe("UI - Transfer Items", () => { handler.processInput(Button.ACTION); // select Pokemon expect(handler.optionsContainer.list.some((option) => (option as BBCodeText).text?.includes("Transfer"))).toBe(true); - game.phaseInterceptor.unlock(); }); diff --git a/src/test/ui/type-hints.test.ts b/src/test/ui/type-hints.test.ts new file mode 100644 index 00000000000..eb0191812e8 --- /dev/null +++ b/src/test/ui/type-hints.test.ts @@ -0,0 +1,89 @@ +import { Button } from "#app/enums/buttons.js"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { CommandPhase } from "#app/phases"; +import FightUiHandler from "#app/ui/fight-ui-handler.js"; +import { Mode } from "#app/ui/ui.js"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import MockText from "../utils/mocks/mocksContainer/mockText"; +import { SPLASH_ONLY } from "../utils/testUtils"; + +describe("UI - Type Hints", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(async () => { + game = new GameManager(phaserGame); + game.settings.typeHints(true); //activate type hints + game.override.battleType("single").startingLevel(100).startingWave(1).enemyMoveset(SPLASH_ONLY); + }); + + it("check immunity color", async () => { + game.override + .battleType("single") + .startingLevel(100) + .startingWave(1) + .enemySpecies(Species.FLORGES) + .enemyMoveset(SPLASH_ONLY) + .moveset([Moves.DRAGON_CLAW]); + game.settings.typeHints(true); //activate type hints + + await game.startBattle([Species.RAYQUAZA]); + + game.onNextPrompt("CommandPhase", Mode.COMMAND, () => { + const { ui } = game.scene; + const handler = ui.getHandler(); + handler.processInput(Button.ACTION); // select "Fight" + game.phaseInterceptor.unlock(); + }); + + game.onNextPrompt("CommandPhase", Mode.FIGHT, () => { + const { ui } = game.scene; + const movesContainer = ui.getByName(FightUiHandler.MOVES_CONTAINER_NAME); + const dragonClawText = movesContainer + .getAll() + .find((text) => text.text === "Dragon Claw")! as unknown as MockText; + + expect.soft(dragonClawText.color).toBe("#929292"); + ui.getHandler().processInput(Button.ACTION); + }); + await game.phaseInterceptor.to(CommandPhase); + }); + + it("check status move color", async () => { + game.override.enemySpecies(Species.FLORGES).moveset([Moves.GROWL]); + + await game.startBattle([Species.RAYQUAZA]); + + game.onNextPrompt("CommandPhase", Mode.COMMAND, () => { + const { ui } = game.scene; + const handler = ui.getHandler(); + handler.processInput(Button.ACTION); // select "Fight" + game.phaseInterceptor.unlock(); + }); + + game.onNextPrompt("CommandPhase", Mode.FIGHT, () => { + const { ui } = game.scene; + const movesContainer = ui.getByName(FightUiHandler.MOVES_CONTAINER_NAME); + const growlText = movesContainer + .getAll() + .find((text) => text.text === "Growl")! as unknown as MockText; + + expect.soft(growlText.color).toBe(undefined); + ui.getHandler().processInput(Button.ACTION); + }); + await game.phaseInterceptor.to(CommandPhase); + }); +}); diff --git a/src/test/utils/gameManager.ts b/src/test/utils/gameManager.ts index 27ba7a215eb..6333179e3b2 100644 --- a/src/test/utils/gameManager.ts +++ b/src/test/utils/gameManager.ts @@ -30,6 +30,7 @@ import { MoveHelper } from "./helpers/moveHelper"; import { vi } from "vitest"; import { ClassicModeHelper } from "./helpers/classicModeHelper"; import { DailyModeHelper } from "./helpers/dailyModeHelper"; +import { SettingsHelper } from "./helpers/settingsHelper"; /** * Class to manage the game state and transitions between phases. @@ -44,6 +45,7 @@ export default class GameManager { public readonly move: MoveHelper; public readonly classicMode: ClassicModeHelper; public readonly dailyMode: DailyModeHelper; + public readonly settings: SettingsHelper; /** * Creates an instance of GameManager. @@ -63,6 +65,7 @@ export default class GameManager { this.move = new MoveHelper(this); this.classicMode = new ClassicModeHelper(this); this.dailyMode = new DailyModeHelper(this); + this.settings = new SettingsHelper(this); } /** diff --git a/src/test/utils/helpers/settingsHelper.ts b/src/test/utils/helpers/settingsHelper.ts new file mode 100644 index 00000000000..dec9e160d51 --- /dev/null +++ b/src/test/utils/helpers/settingsHelper.ts @@ -0,0 +1,15 @@ +import { GameManagerHelper } from "./gameManagerHelper"; + +/** + * Helper to handle settings for tests + */ +export class SettingsHelper extends GameManagerHelper { + + /** + * Disable/Enable type hints settings + * @param enable true to enabled, false to disabled + */ + typeHints(enable: boolean) { + this.game.scene.typeHints = enable; + } +} diff --git a/src/test/utils/mocks/mocksContainer/mockContainer.ts b/src/test/utils/mocks/mocksContainer/mockContainer.ts index d3672cb5235..5babd9e71b2 100644 --- a/src/test/utils/mocks/mocksContainer/mockContainer.ts +++ b/src/test/utils/mocks/mocksContainer/mockContainer.ts @@ -1,4 +1,5 @@ import MockTextureManager from "#test/utils/mocks/mockTextureManager"; +import { vi } from "vitest"; import { MockGameObject } from "../mockGameObject"; export default class MockContainer implements MockGameObject { @@ -13,6 +14,7 @@ export default class MockContainer implements MockGameObject { public frame; protected textureManager; public list: MockGameObject[] = []; + private name?: string; constructor(textureManager: MockTextureManager, x, y) { this.x = x; @@ -159,9 +161,10 @@ export default class MockContainer implements MockGameObject { // Moves this Game Object to be below the given Game Object in the display list. } - setName(name) { + setName = vi.fn((name: string) => { + this.name = name; // return this.phaserSprite.setName(name); - } + }); bringToTop(obj) { // Brings this Game Object to the top of its parents display list. diff --git a/src/test/utils/mocks/mocksContainer/mockText.ts b/src/test/utils/mocks/mocksContainer/mockText.ts index 5d405efadfd..6b9ecf083fd 100644 --- a/src/test/utils/mocks/mocksContainer/mockText.ts +++ b/src/test/utils/mocks/mocksContainer/mockText.ts @@ -1,4 +1,5 @@ import UI from "#app/ui/ui"; +import { vi } from "vitest"; import { MockGameObject } from "../mockGameObject"; export default class MockText implements MockGameObject { @@ -10,6 +11,8 @@ export default class MockText implements MockGameObject { public list: MockGameObject[] = []; public style; public text = ""; + private name?: string; + public color?: string; constructor(textureManager, x, y, content, styleOptions) { this.scene = textureManager.scene; @@ -190,10 +193,9 @@ export default class MockText implements MockGameObject { }; } - setColor(color) { - // Sets the tint of this Game Object. - // return this.phaserText.setColor(color); - } + setColor = vi.fn((color: string) => { + this.color = color; + }); setShadowColor(color) { // Sets the shadow color. @@ -219,9 +221,9 @@ export default class MockText implements MockGameObject { // return this.phaserText.setAlpha(alpha); } - setName(name) { - // return this.phaserText.setName(name); - } + setName = vi.fn((name: string) => { + this.name = name; + }); setAlign(align) { // return this.phaserText.setAlign(align); diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index 1c7dfb27630..7a30e2787df 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -226,7 +226,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler { highestIv = ivs[s]; } }); - if (shownStat) { + if (shownStat !== null && shownStat !== undefined) { shownStats.push(shownStat); statsPool.splice(statsPool.indexOf(shownStat), 1); } diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 8279ab72a70..4ade6ca5d20 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -12,6 +12,8 @@ import {Button} from "#enums/buttons"; import Pokemon, { PokemonMove } from "#app/field/pokemon.js"; export default class FightUiHandler extends UiHandler { + public static readonly MOVES_CONTAINER_NAME = "moves"; + private movesContainer: Phaser.GameObjects.Container; private moveInfoContainer: Phaser.GameObjects.Container; private typeIcon: Phaser.GameObjects.Sprite; @@ -35,7 +37,7 @@ export default class FightUiHandler extends UiHandler { const ui = this.getUi(); this.movesContainer = this.scene.add.container(18, -38.7); - this.movesContainer.setName("moves"); + this.movesContainer.setName(FightUiHandler.MOVES_CONTAINER_NAME); ui.add(this.movesContainer); this.moveInfoContainer = this.scene.add.container(1, 0); @@ -271,11 +273,10 @@ export default class FightUiHandler extends UiHandler { return undefined; } - const moveColors = opponents.map((opponent) => { - return opponent.getMoveEffectiveness(pokemon, pokemonMove); - }).filter((eff) => !!eff).sort((a, b) => b - a).map((effectiveness) => { - return getTypeDamageMultiplierColor(effectiveness, "offense"); - }); + const moveColors = opponents + .map((opponent) => opponent.getMoveEffectiveness(pokemon, pokemonMove)) + .sort((a, b) => b - a) + .map((effectiveness) => getTypeDamageMultiplierColor(effectiveness ?? 0, "offense")); return moveColors[0]; } diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 5e942f3e75a..9f2df1f2329 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -2916,14 +2916,18 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const isCaught = this.scene.gameData.dexData[species.speciesId]?.caughtAttr || BigInt(0); const isVariant3Caught = !!(isCaught & DexAttr.VARIANT_3); const isVariant2Caught = !!(isCaught & DexAttr.VARIANT_2); + const isDefaultVariantCaught = !!(isCaught & DexAttr.DEFAULT_VARIANT); const isVariantCaught = !!(isCaught & DexAttr.SHINY); const isMaleCaught = !!(isCaught & DexAttr.MALE); const isFemaleCaught = !!(isCaught & DexAttr.FEMALE); + const starterAttributes = this.starterPreferences[species.speciesId]; + + const props = this.scene.gameData.getSpeciesDexAttrProps(species, this.getCurrentDexProps(species.speciesId)); + const defaultAbilityIndex = this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species); + const defaultNature = this.scene.gameData.getSpeciesDefaultNature(species); + if (!dexEntry.caughtAttr) { - const props = this.scene.gameData.getSpeciesDexAttrProps(species, this.getCurrentDexProps(species.speciesId)); - const defaultAbilityIndex = this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species); - const defaultNature = this.scene.gameData.getSpeciesDefaultNature(species); if (shiny === undefined || shiny !== props.shiny) { shiny = props.shiny; } @@ -2942,6 +2946,83 @@ export default class StarterSelectUiHandler extends MessageUiHandler { if (natureIndex === undefined || natureIndex !== defaultNature) { natureIndex = defaultNature; } + } else { + // compare current shiny, formIndex, female, variant, abilityIndex, natureIndex with the caught ones + // if the current ones are not caught, we need to find the next caught ones + if (shiny) { + if (!(isVariantCaught || isVariant2Caught || isVariant3Caught)) { + shiny = false; + starterAttributes.shiny = false; + variant = 0; + starterAttributes.variant = 0; + } else { + shiny = true; + starterAttributes.shiny = true; + if (variant === 0 && !isDefaultVariantCaught) { + if (isVariant2Caught) { + variant = 1; + starterAttributes.variant = 1; + } else if (isVariant3Caught) { + variant = 2; + starterAttributes.variant = 2; + } else { + variant = 0; + starterAttributes.variant = 0; + } + } else if (variant === 1 && !isVariant2Caught) { + if (isVariantCaught) { + variant = 0; + starterAttributes.variant = 0; + } else if (isVariant3Caught) { + variant = 2; + starterAttributes.variant = 2; + } else { + variant = 0; + starterAttributes.variant = 0; + } + } else if (variant === 2 && !isVariant3Caught) { + if (isVariantCaught) { + variant = 0; + starterAttributes.variant = 0; + } else if (isVariant2Caught) { + variant = 1; + starterAttributes.variant = 1; + } else { + variant = 0; + starterAttributes.variant = 0; + } + } + } + } + if (female) { + if (!isFemaleCaught) { + female = false; + starterAttributes.female = false; + } + } else { + if (!isMaleCaught) { + female = true; + starterAttributes.female = true; + } + } + + if (species.forms) { + const formCount = species.forms.length; + let newFormIndex = formIndex??0; + if (species.forms[newFormIndex]) { + const isValidForm = species.forms[newFormIndex].isStarterSelectable && dexEntry.caughtAttr & this.scene.gameData.getFormAttr(newFormIndex); + if (!isValidForm) { + do { + newFormIndex = (newFormIndex + 1) % formCount; + if (species.forms[newFormIndex].isStarterSelectable && dexEntry.caughtAttr & this.scene.gameData.getFormAttr(newFormIndex)) { + break; + } + } while (newFormIndex !== props.formIndex); + formIndex = newFormIndex; + starterAttributes.form = formIndex; + } + } + } } this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default? @@ -2993,12 +3074,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } if (dexEntry.caughtAttr && species.malePercent !== null) { - let gender: Gender; - if ((female && isFemaleCaught) || (!female && !isMaleCaught)) { - gender = Gender.FEMALE; - } else { - gender = Gender.MALE; - } + const gender = !female ? Gender.MALE : Gender.FEMALE; this.pokemonGenderText.setText(getGenderSymbol(gender)); this.pokemonGenderText.setColor(getGenderColor(gender)); this.pokemonGenderText.setShadowColor(getGenderColor(gender, true)); @@ -3479,7 +3555,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { checkIconId(icon: Phaser.GameObjects.Sprite, species: PokemonSpecies, female: boolean, formIndex: number, shiny: boolean, variant: number) { if (icon.frame.name !== species.getIconId(female, formIndex, shiny, variant)) { - console.log(`${species.name}'s variant icon does not exist. Replacing with default.`); + console.log(`${species.name}'s icon ${icon.frame.name} does not match getIconId with female: ${female}, formIndex: ${formIndex}, shiny: ${shiny}, variant: ${variant}`); icon.setTexture(species.getIconAtlasKey(formIndex, false, variant)); icon.setFrame(species.getIconId(female, formIndex, false, variant)); } diff --git a/src/utils.ts b/src/utils.ts index aa45c091286..c51ac2b5b0b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -552,3 +552,11 @@ export function capitalizeString(str: string, sep: string, lowerFirstChar: boole } return null; } + +/** + * Returns if an object is null or undefined + * @param object + */ +export function isNullOrUndefined(object: any): boolean { + return null === object || undefined === object; +}