diff --git a/public/exp_sprites.json b/public/exp-sprites.json similarity index 100% rename from public/exp_sprites.json rename to public/exp-sprites.json diff --git a/public/images/items.json b/public/images/items.json index 40265ec69..3d247c554 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -51,6 +51,27 @@ "h": 14 } }, + { + "filename": "candy_overlay", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 12, + "w": 16, + "h": 15 + }, + "frame": { + "x": 39, + "y": 0, + "w": 16, + "h": 15 + } + }, { "filename": "prism_scale", "rotated": false, @@ -66,7 +87,7 @@ "h": 15 }, "frame": { - "x": 39, + "x": 55, "y": 0, "w": 15, "h": 15 @@ -87,7 +108,7 @@ "h": 15 }, "frame": { - "x": 54, + "x": 70, "y": 0, "w": 24, "h": 15 @@ -108,7 +129,7 @@ "h": 16 }, "frame": { - "x": 78, + "x": 94, "y": 0, "w": 16, "h": 16 @@ -129,7 +150,7 @@ "h": 16 }, "frame": { - "x": 94, + "x": 110, "y": 0, "w": 16, "h": 16 @@ -150,7 +171,7 @@ "h": 16 }, "frame": { - "x": 110, + "x": 126, "y": 0, "w": 16, "h": 16 @@ -171,7 +192,7 @@ "h": 16 }, "frame": { - "x": 126, + "x": 142, "y": 0, "w": 16, "h": 16 @@ -192,7 +213,7 @@ "h": 16 }, "frame": { - "x": 142, + "x": 158, "y": 0, "w": 16, "h": 16 @@ -213,7 +234,7 @@ "h": 16 }, "frame": { - "x": 158, + "x": 174, "y": 0, "w": 16, "h": 16 @@ -234,7 +255,7 @@ "h": 16 }, "frame": { - "x": 174, + "x": 190, "y": 0, "w": 16, "h": 16 @@ -255,7 +276,7 @@ "h": 16 }, "frame": { - "x": 190, + "x": 206, "y": 0, "w": 16, "h": 16 @@ -276,7 +297,7 @@ "h": 16 }, "frame": { - "x": 206, + "x": 222, "y": 0, "w": 16, "h": 16 @@ -297,7 +318,7 @@ "h": 16 }, "frame": { - "x": 222, + "x": 238, "y": 0, "w": 16, "h": 16 @@ -318,7 +339,7 @@ "h": 16 }, "frame": { - "x": 238, + "x": 254, "y": 0, "w": 16, "h": 16 @@ -339,7 +360,7 @@ "h": 16 }, "frame": { - "x": 254, + "x": 270, "y": 0, "w": 16, "h": 16 @@ -360,7 +381,7 @@ "h": 16 }, "frame": { - "x": 270, + "x": 286, "y": 0, "w": 16, "h": 16 @@ -381,7 +402,7 @@ "h": 16 }, "frame": { - "x": 286, + "x": 302, "y": 0, "w": 16, "h": 16 @@ -402,7 +423,7 @@ "h": 16 }, "frame": { - "x": 302, + "x": 318, "y": 0, "w": 16, "h": 16 @@ -423,7 +444,7 @@ "h": 16 }, "frame": { - "x": 318, + "x": 334, "y": 0, "w": 16, "h": 16 @@ -443,27 +464,6 @@ "w": 16, "h": 16 }, - "frame": { - "x": 334, - "y": 0, - "w": 16, - "h": 16 - } - }, - { - "filename": "garchompite", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 8, - "w": 16, - "h": 16 - }, "frame": { "x": 350, "y": 0, @@ -472,7 +472,7 @@ } }, { - "filename": "gardevoirite", + "filename": "garchompite", "rotated": false, "trimmed": true, "sourceSize": { @@ -514,7 +514,7 @@ } }, { - "filename": "gengarite", + "filename": "gardevoirite", "rotated": false, "trimmed": true, "sourceSize": { @@ -535,7 +535,7 @@ } }, { - "filename": "glalitite", + "filename": "gengarite", "rotated": false, "trimmed": true, "sourceSize": { @@ -556,7 +556,7 @@ } }, { - "filename": "gyaradosite", + "filename": "glalitite", "rotated": false, "trimmed": true, "sourceSize": { @@ -576,6 +576,27 @@ "h": 16 } }, + { + "filename": "gyaradosite", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 8, + "w": 16, + "h": 16 + }, + "frame": { + "x": 60, + "y": 15, + "w": 16, + "h": 16 + } + }, { "filename": "heracronite", "rotated": false, @@ -591,7 +612,7 @@ "h": 16 }, "frame": { - "x": 60, + "x": 76, "y": 15, "w": 16, "h": 16 @@ -612,7 +633,7 @@ "h": 16 }, "frame": { - "x": 76, + "x": 92, "y": 16, "w": 16, "h": 16 @@ -633,7 +654,7 @@ "h": 16 }, "frame": { - "x": 92, + "x": 108, "y": 16, "w": 16, "h": 16 @@ -654,7 +675,7 @@ "h": 16 }, "frame": { - "x": 108, + "x": 124, "y": 16, "w": 16, "h": 16 @@ -675,7 +696,7 @@ "h": 16 }, "frame": { - "x": 124, + "x": 140, "y": 16, "w": 16, "h": 16 @@ -696,7 +717,7 @@ "h": 16 }, "frame": { - "x": 140, + "x": 156, "y": 16, "w": 16, "h": 16 @@ -717,7 +738,7 @@ "h": 16 }, "frame": { - "x": 156, + "x": 172, "y": 16, "w": 16, "h": 16 @@ -738,7 +759,7 @@ "h": 16 }, "frame": { - "x": 172, + "x": 188, "y": 16, "w": 16, "h": 16 @@ -759,7 +780,7 @@ "h": 16 }, "frame": { - "x": 188, + "x": 204, "y": 16, "w": 16, "h": 16 @@ -780,7 +801,7 @@ "h": 16 }, "frame": { - "x": 204, + "x": 220, "y": 16, "w": 16, "h": 16 @@ -801,7 +822,7 @@ "h": 16 }, "frame": { - "x": 220, + "x": 236, "y": 16, "w": 20, "h": 16 @@ -822,7 +843,7 @@ "h": 16 }, "frame": { - "x": 240, + "x": 256, "y": 16, "w": 16, "h": 16 @@ -843,7 +864,7 @@ "h": 16 }, "frame": { - "x": 256, + "x": 272, "y": 16, "w": 16, "h": 16 @@ -864,7 +885,7 @@ "h": 16 }, "frame": { - "x": 272, + "x": 288, "y": 16, "w": 16, "h": 16 @@ -885,7 +906,7 @@ "h": 16 }, "frame": { - "x": 288, + "x": 304, "y": 16, "w": 16, "h": 16 @@ -906,7 +927,7 @@ "h": 16 }, "frame": { - "x": 304, + "x": 320, "y": 16, "w": 16, "h": 16 @@ -927,7 +948,7 @@ "h": 16 }, "frame": { - "x": 320, + "x": 336, "y": 16, "w": 16, "h": 16 @@ -948,7 +969,7 @@ "h": 16 }, "frame": { - "x": 336, + "x": 352, "y": 16, "w": 16, "h": 16 @@ -969,7 +990,7 @@ "h": 16 }, "frame": { - "x": 352, + "x": 368, "y": 16, "w": 17, "h": 16 @@ -989,27 +1010,6 @@ "w": 16, "h": 16 }, - "frame": { - "x": 369, - "y": 16, - "w": 16, - "h": 16 - } - }, - { - "filename": "salamencite", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 8, - "w": 16, - "h": 16 - }, "frame": { "x": 0, "y": 30, @@ -1018,7 +1018,7 @@ } }, { - "filename": "sceptilite", + "filename": "salamencite", "rotated": false, "trimmed": true, "sourceSize": { @@ -1039,7 +1039,7 @@ } }, { - "filename": "scizorite", + "filename": "sceptilite", "rotated": false, "trimmed": true, "sourceSize": { @@ -1060,7 +1060,7 @@ } }, { - "filename": "sharpedonite", + "filename": "scizorite", "rotated": false, "trimmed": true, "sourceSize": { @@ -1081,7 +1081,7 @@ } }, { - "filename": "slowbronite", + "filename": "sharpedonite", "rotated": false, "trimmed": true, "sourceSize": { @@ -1096,6 +1096,27 @@ }, "frame": { "x": 64, + "y": 31, + "w": 16, + "h": 16 + } + }, + { + "filename": "slowbronite", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 8, + "w": 16, + "h": 16 + }, + "frame": { + "x": 80, "y": 32, "w": 16, "h": 16 @@ -1116,7 +1137,7 @@ "h": 16 }, "frame": { - "x": 80, + "x": 96, "y": 32, "w": 16, "h": 16 @@ -1137,7 +1158,7 @@ "h": 16 }, "frame": { - "x": 96, + "x": 112, "y": 32, "w": 16, "h": 16 @@ -1158,7 +1179,7 @@ "h": 16 }, "frame": { - "x": 112, + "x": 128, "y": 32, "w": 16, "h": 16 @@ -1179,7 +1200,7 @@ "h": 16 }, "frame": { - "x": 128, + "x": 144, "y": 32, "w": 16, "h": 16 @@ -1200,7 +1221,7 @@ "h": 16 }, "frame": { - "x": 144, + "x": 160, "y": 32, "w": 16, "h": 16 @@ -1221,7 +1242,7 @@ "h": 16 }, "frame": { - "x": 160, + "x": 176, "y": 32, "w": 16, "h": 16 @@ -1242,7 +1263,7 @@ "h": 17 }, "frame": { - "x": 176, + "x": 192, "y": 32, "w": 23, "h": 17 @@ -1263,7 +1284,7 @@ "h": 17 }, "frame": { - "x": 199, + "x": 215, "y": 32, "w": 20, "h": 17 @@ -1284,12 +1305,33 @@ "h": 17 }, "frame": { - "x": 219, + "x": 235, "y": 32, "w": 23, "h": 17 } }, + { + "filename": "candy", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 11, + "w": 18, + "h": 18 + }, + "frame": { + "x": 258, + "y": 32, + "w": 18, + "h": 18 + } + }, { "filename": "choice_specs", "rotated": false, @@ -1305,7 +1347,7 @@ "h": 18 }, "frame": { - "x": 242, + "x": 276, "y": 32, "w": 24, "h": 18 @@ -1326,7 +1368,7 @@ "h": 18 }, "frame": { - "x": 266, + "x": 300, "y": 32, "w": 18, "h": 18 @@ -1347,7 +1389,7 @@ "h": 18 }, "frame": { - "x": 284, + "x": 318, "y": 32, "w": 24, "h": 18 @@ -1368,7 +1410,7 @@ "h": 18 }, "frame": { - "x": 308, + "x": 342, "y": 32, "w": 18, "h": 18 @@ -1389,12 +1431,33 @@ "h": 18 }, "frame": { - "x": 326, + "x": 360, "y": 32, "w": 21, "h": 18 } }, + { + "filename": "mystery_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 8, + "w": 16, + "h": 18 + }, + "frame": { + "x": 0, + "y": 46, + "w": 16, + "h": 18 + } + }, { "filename": "relic_crown", "rotated": false, @@ -1410,33 +1473,12 @@ "h": 18 }, "frame": { - "x": 347, - "y": 32, + "x": 16, + "y": 47, "w": 23, "h": 18 } }, - { - "filename": "wl_ability_urge", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 8, - "w": 20, - "h": 18 - }, - "frame": { - "x": 370, - "y": 32, - "w": 20, - "h": 18 - } - }, { "filename": "unremarkable_teacup", "rotated": false, @@ -1452,12 +1494,33 @@ "h": 18 }, "frame": { - "x": 0, + "x": 39, "y": 47, "w": 21, "h": 18 } }, + { + "filename": "wl_ability_urge", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 18 + }, + "frame": { + "x": 60, + "y": 47, + "w": 20, + "h": 18 + } + }, { "filename": "wl_antidote", "rotated": false, @@ -1473,8 +1536,8 @@ "h": 18 }, "frame": { - "x": 21, - "y": 47, + "x": 80, + "y": 48, "w": 20, "h": 18 } @@ -1494,8 +1557,8 @@ "h": 18 }, "frame": { - "x": 41, - "y": 47, + "x": 100, + "y": 48, "w": 20, "h": 18 } @@ -1515,7 +1578,7 @@ "h": 18 }, "frame": { - "x": 61, + "x": 120, "y": 48, "w": 20, "h": 18 @@ -1536,7 +1599,7 @@ "h": 18 }, "frame": { - "x": 81, + "x": 140, "y": 48, "w": 20, "h": 18 @@ -1557,7 +1620,7 @@ "h": 18 }, "frame": { - "x": 101, + "x": 160, "y": 48, "w": 20, "h": 18 @@ -1578,8 +1641,8 @@ "h": 18 }, "frame": { - "x": 121, - "y": 48, + "x": 180, + "y": 49, "w": 20, "h": 18 } @@ -1599,8 +1662,8 @@ "h": 18 }, "frame": { - "x": 141, - "y": 48, + "x": 200, + "y": 49, "w": 20, "h": 18 } @@ -1620,12 +1683,33 @@ "h": 18 }, "frame": { - "x": 161, + "x": 220, "y": 49, "w": 20, "h": 18 } }, + { + "filename": "oval_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 7, + "w": 18, + "h": 19 + }, + "frame": { + "x": 240, + "y": 49, + "w": 18, + "h": 19 + } + }, { "filename": "wl_full_restore", "rotated": false, @@ -1641,8 +1725,8 @@ "h": 18 }, "frame": { - "x": 181, - "y": 49, + "x": 258, + "y": 50, "w": 20, "h": 18 } @@ -1662,8 +1746,8 @@ "h": 18 }, "frame": { - "x": 201, - "y": 49, + "x": 278, + "y": 50, "w": 20, "h": 18 } @@ -1683,8 +1767,8 @@ "h": 18 }, "frame": { - "x": 221, - "y": 49, + "x": 298, + "y": 50, "w": 20, "h": 18 } @@ -1704,7 +1788,7 @@ "h": 18 }, "frame": { - "x": 241, + "x": 318, "y": 50, "w": 20, "h": 18 @@ -1725,7 +1809,7 @@ "h": 18 }, "frame": { - "x": 261, + "x": 338, "y": 50, "w": 20, "h": 18 @@ -1746,7 +1830,7 @@ "h": 18 }, "frame": { - "x": 281, + "x": 358, "y": 50, "w": 20, "h": 18 @@ -1766,90 +1850,6 @@ "w": 20, "h": 18 }, - "frame": { - "x": 301, - "y": 50, - "w": 20, - "h": 18 - } - }, - { - "filename": "wl_max_ether", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 8, - "w": 20, - "h": 18 - }, - "frame": { - "x": 321, - "y": 50, - "w": 20, - "h": 18 - } - }, - { - "filename": "wl_max_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 8, - "w": 20, - "h": 18 - }, - "frame": { - "x": 341, - "y": 50, - "w": 20, - "h": 18 - } - }, - { - "filename": "wl_max_revive", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 8, - "w": 20, - "h": 18 - }, - "frame": { - "x": 361, - "y": 50, - "w": 20, - "h": 18 - } - }, - { - "filename": "wl_paralyze_heal", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 8, - "w": 20, - "h": 18 - }, "frame": { "x": 0, "y": 65, @@ -1858,7 +1858,7 @@ } }, { - "filename": "wl_potion", + "filename": "wl_max_ether", "rotated": false, "trimmed": true, "sourceSize": { @@ -1879,7 +1879,7 @@ } }, { - "filename": "wl_reset_urge", + "filename": "wl_max_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -1900,7 +1900,7 @@ } }, { - "filename": "wl_revive", + "filename": "wl_max_revive", "rotated": false, "trimmed": true, "sourceSize": { @@ -1915,13 +1915,13 @@ }, "frame": { "x": 60, - "y": 66, + "y": 65, "w": 20, "h": 18 } }, { - "filename": "wl_super_potion", + "filename": "wl_paralyze_heal", "rotated": false, "trimmed": true, "sourceSize": { @@ -1941,6 +1941,90 @@ "h": 18 } }, + { + "filename": "wl_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 18 + }, + "frame": { + "x": 100, + "y": 66, + "w": 20, + "h": 18 + } + }, + { + "filename": "wl_reset_urge", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 18 + }, + "frame": { + "x": 120, + "y": 66, + "w": 20, + "h": 18 + } + }, + { + "filename": "wl_revive", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 18 + }, + "frame": { + "x": 140, + "y": 66, + "w": 20, + "h": 18 + } + }, + { + "filename": "wl_super_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 18 + }, + "frame": { + "x": 160, + "y": 66, + "w": 20, + "h": 18 + } + }, { "filename": "big_mushroom", "rotated": false, @@ -1956,8 +2040,8 @@ "h": 19 }, "frame": { - "x": 100, - "y": 66, + "x": 180, + "y": 67, "w": 19, "h": 19 } @@ -1977,14 +2061,14 @@ "h": 19 }, "frame": { - "x": 119, - "y": 66, + "x": 199, + "y": 67, "w": 22, "h": 19 } }, { - "filename": "lum_berry", + "filename": "miracle_seed", "rotated": false, "trimmed": true, "sourceSize": { @@ -1994,13 +2078,13 @@ "spriteSourceSize": { "x": 6, "y": 7, - "w": 20, + "w": 19, "h": 19 }, "frame": { - "x": 141, - "y": 66, - "w": 20, + "x": 221, + "y": 67, + "w": 19, "h": 19 } }, @@ -2019,8 +2103,8 @@ "h": 19 }, "frame": { - "x": 161, - "y": 67, + "x": 240, + "y": 68, "w": 23, "h": 19 } @@ -2040,8 +2124,8 @@ "h": 19 }, "frame": { - "x": 184, - "y": 67, + "x": 263, + "y": 68, "w": 22, "h": 19 } @@ -2061,12 +2145,33 @@ "h": 19 }, "frame": { - "x": 206, - "y": 67, + "x": 285, + "y": 68, "w": 23, "h": 19 } }, + { + "filename": "lum_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 20, + "h": 19 + }, + "frame": { + "x": 308, + "y": 68, + "w": 20, + "h": 19 + } + }, { "filename": "metal_alloy", "rotated": false, @@ -2082,33 +2187,12 @@ "h": 19 }, "frame": { - "x": 229, + "x": 328, "y": 68, "w": 21, "h": 19 } }, - { - "filename": "miracle_seed", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 7, - "w": 19, - "h": 19 - }, - "frame": { - "x": 250, - "y": 68, - "w": 19, - "h": 19 - } - }, { "filename": "mystic_ticket", "rotated": false, @@ -2124,14 +2208,14 @@ "h": 19 }, "frame": { - "x": 269, + "x": 349, "y": 68, "w": 23, "h": 19 } }, { - "filename": "oval_stone", + "filename": "golden_egg", "rotated": false, "trimmed": true, "sourceSize": { @@ -2140,15 +2224,15 @@ }, "spriteSourceSize": { "x": 7, - "y": 7, - "w": 18, - "h": 19 + "y": 6, + "w": 17, + "h": 20 }, "frame": { - "x": 292, + "x": 372, "y": 68, - "w": 18, - "h": 19 + "w": 17, + "h": 20 } }, { @@ -2166,8 +2250,8 @@ "h": 19 }, "frame": { - "x": 310, - "y": 68, + "x": 0, + "y": 83, "w": 23, "h": 19 } @@ -2187,8 +2271,8 @@ "h": 19 }, "frame": { - "x": 333, - "y": 68, + "x": 23, + "y": 83, "w": 20, "h": 19 } @@ -2208,33 +2292,12 @@ "h": 19 }, "frame": { - "x": 353, - "y": 68, + "x": 43, + "y": 83, "w": 22, "h": 19 } }, - { - "filename": "leftovers", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 15, - "h": 22 - }, - "frame": { - "x": 375, - "y": 68, - "w": 15, - "h": 22 - } - }, { "filename": "apicot_berry", "rotated": false, @@ -2250,8 +2313,8 @@ "h": 20 }, "frame": { - "x": 0, - "y": 83, + "x": 65, + "y": 84, "w": 19, "h": 20 } @@ -2271,29 +2334,8 @@ "h": 20 }, "frame": { - "x": 19, - "y": 83, - "w": 20, - "h": 20 - } - }, - { - "filename": "blue_orb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 39, - "y": 83, + "x": 84, + "y": 84, "w": 20, "h": 20 } @@ -2313,14 +2355,14 @@ "h": 20 }, "frame": { - "x": 59, + "x": 104, "y": 84, "w": 23, "h": 20 } }, { - "filename": "golden_egg", + "filename": "blue_orb", "rotated": false, "trimmed": true, "sourceSize": { @@ -2328,15 +2370,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 7, + "x": 6, "y": 6, - "w": 17, + "w": 20, "h": 20 }, "frame": { - "x": 82, + "x": 127, "y": 84, - "w": 17, + "w": 20, "h": 20 } }, @@ -2355,8 +2397,8 @@ "h": 20 }, "frame": { - "x": 99, - "y": 85, + "x": 147, + "y": 84, "w": 19, "h": 20 } @@ -2376,33 +2418,12 @@ "h": 20 }, "frame": { - "x": 118, - "y": 85, + "x": 166, + "y": 86, "w": 26, "h": 20 } }, - { - "filename": "lucky_egg", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 17, - "h": 20 - }, - "frame": { - "x": 144, - "y": 85, - "w": 17, - "h": 20 - } - }, { "filename": "cracked_pot", "rotated": false, @@ -2418,7 +2439,7 @@ "h": 20 }, "frame": { - "x": 161, + "x": 192, "y": 86, "w": 26, "h": 20 @@ -2439,12 +2460,33 @@ "h": 20 }, "frame": { - "x": 187, + "x": 218, "y": 86, "w": 22, "h": 20 } }, + { + "filename": "fairy_feather", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 20 + }, + "frame": { + "x": 240, + "y": 87, + "w": 22, + "h": 20 + } + }, { "filename": "gb", "rotated": false, @@ -2460,30 +2502,9 @@ "h": 20 }, "frame": { - "x": 209, - "y": 86, - "w": 20, - "h": 20 - } - }, - { - "filename": "fairy_feather", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 22, - "h": 20 - }, - "frame": { - "x": 229, + "x": 262, "y": 87, - "w": 22, + "w": 20, "h": 20 } }, @@ -2502,7 +2523,7 @@ "h": 20 }, "frame": { - "x": 251, + "x": 282, "y": 87, "w": 19, "h": 20 @@ -2523,12 +2544,33 @@ "h": 20 }, "frame": { - "x": 270, + "x": 301, "y": 87, "w": 24, "h": 20 } }, + { + "filename": "lucky_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 325, + "y": 87, + "w": 17, + "h": 20 + } + }, { "filename": "magnet", "rotated": false, @@ -2544,7 +2586,7 @@ "h": 20 }, "frame": { - "x": 294, + "x": 342, "y": 87, "w": 20, "h": 20 @@ -2565,8 +2607,8 @@ "h": 20 }, "frame": { - "x": 314, - "y": 87, + "x": 362, + "y": 88, "w": 22, "h": 20 } @@ -2586,54 +2628,12 @@ "h": 20 }, "frame": { - "x": 336, - "y": 87, + "x": 0, + "y": 102, "w": 20, "h": 20 } }, - { - "filename": "razor_fang", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 18, - "h": 20 - }, - "frame": { - "x": 356, - "y": 87, - "w": 18, - "h": 20 - } - }, - { - "filename": "full_heal", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 9, - "y": 4, - "w": 15, - "h": 23 - }, - "frame": { - "x": 374, - "y": 90, - "w": 15, - "h": 23 - } - }, { "filename": "pb", "rotated": false, @@ -2649,8 +2649,8 @@ "h": 20 }, "frame": { - "x": 0, - "y": 103, + "x": 20, + "y": 102, "w": 20, "h": 20 } @@ -2670,12 +2670,33 @@ "h": 20 }, "frame": { - "x": 20, - "y": 103, + "x": 40, + "y": 102, "w": 20, "h": 20 } }, + { + "filename": "razor_fang", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 18, + "h": 20 + }, + "frame": { + "x": 60, + "y": 104, + "w": 18, + "h": 20 + } + }, { "filename": "rb", "rotated": false, @@ -2691,7 +2712,7 @@ "h": 20 }, "frame": { - "x": 40, + "x": 78, "y": 104, "w": 20, "h": 20 @@ -2712,7 +2733,7 @@ "h": 20 }, "frame": { - "x": 60, + "x": 98, "y": 104, "w": 23, "h": 20 @@ -2733,12 +2754,33 @@ "h": 20 }, "frame": { - "x": 83, - "y": 105, + "x": 121, + "y": 104, "w": 24, "h": 20 } }, + { + "filename": "strange_ball", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 145, + "y": 104, + "w": 20, + "h": 20 + } + }, { "filename": "sacred_ash", "rotated": false, @@ -2754,8 +2796,8 @@ "h": 20 }, "frame": { - "x": 107, - "y": 105, + "x": 165, + "y": 106, "w": 24, "h": 20 } @@ -2775,8 +2817,8 @@ "h": 20 }, "frame": { - "x": 131, - "y": 105, + "x": 189, + "y": 106, "w": 24, "h": 20 } @@ -2796,7 +2838,7 @@ "h": 20 }, "frame": { - "x": 155, + "x": 213, "y": 106, "w": 23, "h": 20 @@ -2817,33 +2859,12 @@ "h": 20 }, "frame": { - "x": 178, - "y": 106, + "x": 236, + "y": 107, "w": 24, "h": 20 } }, - { - "filename": "strange_ball", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 202, - "y": 106, - "w": 20, - "h": 20 - } - }, { "filename": "tera_orb", "rotated": false, @@ -2859,7 +2880,7 @@ "h": 20 }, "frame": { - "x": 222, + "x": 260, "y": 107, "w": 22, "h": 20 @@ -2880,7 +2901,7 @@ "h": 20 }, "frame": { - "x": 244, + "x": 282, "y": 107, "w": 20, "h": 20 @@ -2901,7 +2922,7 @@ "h": 21 }, "frame": { - "x": 264, + "x": 302, "y": 107, "w": 23, "h": 21 @@ -2922,7 +2943,7 @@ "h": 21 }, "frame": { - "x": 287, + "x": 325, "y": 107, "w": 23, "h": 21 @@ -2943,12 +2964,33 @@ "h": 21 }, "frame": { - "x": 310, - "y": 107, + "x": 348, + "y": 108, "w": 23, "h": 21 } }, + { + "filename": "spell_tag", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 19, + "h": 21 + }, + "frame": { + "x": 371, + "y": 108, + "w": 19, + "h": 21 + } + }, { "filename": "dawn_stone", "rotated": false, @@ -2964,54 +3006,12 @@ "h": 21 }, "frame": { - "x": 333, - "y": 107, + "x": 0, + "y": 122, "w": 20, "h": 21 } }, - { - "filename": "dusk_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 353, - "y": 107, - "w": 21, - "h": 21 - } - }, - { - "filename": "calcium", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 374, - "y": 113, - "w": 16, - "h": 24 - } - }, { "filename": "deep_sea_tooth", "rotated": false, @@ -3027,8 +3027,8 @@ "h": 21 }, "frame": { - "x": 0, - "y": 123, + "x": 20, + "y": 122, "w": 22, "h": 21 } @@ -3048,12 +3048,33 @@ "h": 22 }, "frame": { - "x": 22, - "y": 123, + "x": 42, + "y": 122, "w": 18, "h": 22 } }, + { + "filename": "dusk_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 60, + "y": 124, + "w": 21, + "h": 21 + } + }, { "filename": "liechi_berry", "rotated": false, @@ -3069,33 +3090,12 @@ "h": 21 }, "frame": { - "x": 40, + "x": 81, "y": 124, "w": 22, "h": 21 } }, - { - "filename": "poison_barb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 62, - "y": 124, - "w": 21, - "h": 21 - } - }, { "filename": "mint_atk", "rotated": false, @@ -3111,8 +3111,8 @@ "h": 21 }, "frame": { - "x": 83, - "y": 125, + "x": 103, + "y": 124, "w": 28, "h": 21 } @@ -3132,8 +3132,8 @@ "h": 21 }, "frame": { - "x": 111, - "y": 125, + "x": 131, + "y": 124, "w": 28, "h": 21 } @@ -3153,7 +3153,7 @@ "h": 21 }, "frame": { - "x": 139, + "x": 159, "y": 126, "w": 28, "h": 21 @@ -3174,12 +3174,75 @@ "h": 21 }, "frame": { - "x": 167, + "x": 187, "y": 126, "w": 28, "h": 21 } }, + { + "filename": "poison_barb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 215, + "y": 126, + "w": 21, + "h": 21 + } + }, + { + "filename": "mint_spd", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 2, + "y": 5, + "w": 28, + "h": 21 + }, + "frame": { + "x": 236, + "y": 127, + "w": 28, + "h": 21 + } + }, + { + "filename": "mint_spdef", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 2, + "y": 5, + "w": 28, + "h": 21 + }, + "frame": { + "x": 264, + "y": 127, + "w": 28, + "h": 21 + } + }, { "filename": "moon_stone", "rotated": false, @@ -3195,72 +3258,9 @@ "h": 21 }, "frame": { - "x": 195, - "y": 126, - "w": 23, - "h": 21 - } - }, - { - "filename": "mint_spd", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 2, - "y": 5, - "w": 28, - "h": 21 - }, - "frame": { - "x": 218, - "y": 127, - "w": 28, - "h": 21 - } - }, - { - "filename": "metronome", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 5, - "w": 17, - "h": 22 - }, - "frame": { - "x": 246, - "y": 127, - "w": 17, - "h": 22 - } - }, - { - "filename": "mint_spdef", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 2, - "y": 5, - "w": 28, - "h": 21 - }, - "frame": { - "x": 263, + "x": 292, "y": 128, - "w": 28, + "w": 23, "h": 21 } }, @@ -3279,7 +3279,7 @@ "h": 21 }, "frame": { - "x": 291, + "x": 315, "y": 128, "w": 23, "h": 21 @@ -3300,8 +3300,8 @@ "h": 21 }, "frame": { - "x": 314, - "y": 128, + "x": 338, + "y": 129, "w": 23, "h": 21 } @@ -3321,75 +3321,12 @@ "h": 21 }, "frame": { - "x": 337, - "y": 128, + "x": 361, + "y": 129, "w": 21, "h": 21 } }, - { - "filename": "carbos", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 358, - "y": 128, - "w": 16, - "h": 24 - } - }, - { - "filename": "hp_up", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 374, - "y": 137, - "w": 16, - "h": 24 - } - }, - { - "filename": "spell_tag", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 19, - "h": 21 - }, - "frame": { - "x": 0, - "y": 144, - "w": 19, - "h": 21 - } - }, { "filename": "sweet_apple", "rotated": false, @@ -3405,12 +3342,33 @@ "h": 21 }, "frame": { - "x": 19, - "y": 145, + "x": 0, + "y": 143, "w": 22, "h": 21 } }, + { + "filename": "leftovers", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 15, + "h": 22 + }, + "frame": { + "x": 22, + "y": 143, + "w": 15, + "h": 22 + } + }, { "filename": "syrupy_apple", "rotated": false, @@ -3426,33 +3384,12 @@ "h": 21 }, "frame": { - "x": 41, - "y": 145, + "x": 37, + "y": 144, "w": 22, "h": 21 } }, - { - "filename": "lock_capsule", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 5, - "w": 19, - "h": 22 - }, - "frame": { - "x": 63, - "y": 145, - "w": 19, - "h": 22 - } - }, { "filename": "tart_apple", "rotated": false, @@ -3468,8 +3405,8 @@ "h": 21 }, "frame": { - "x": 82, - "y": 146, + "x": 59, + "y": 145, "w": 22, "h": 21 } @@ -3489,8 +3426,8 @@ "h": 21 }, "frame": { - "x": 104, - "y": 146, + "x": 81, + "y": 145, "w": 23, "h": 21 } @@ -3510,8 +3447,8 @@ "h": 21 }, "frame": { - "x": 127, - "y": 147, + "x": 104, + "y": 145, "w": 21, "h": 21 } @@ -3531,8 +3468,8 @@ "h": 22 }, "frame": { - "x": 148, - "y": 147, + "x": 125, + "y": 145, "w": 22, "h": 22 } @@ -3552,7 +3489,7 @@ "h": 22 }, "frame": { - "x": 170, + "x": 147, "y": 147, "w": 22, "h": 22 @@ -3573,7 +3510,7 @@ "h": 22 }, "frame": { - "x": 192, + "x": 169, "y": 147, "w": 22, "h": 22 @@ -3594,8 +3531,8 @@ "h": 22 }, "frame": { - "x": 214, - "y": 148, + "x": 191, + "y": 147, "w": 22, "h": 22 } @@ -3615,8 +3552,8 @@ "h": 22 }, "frame": { - "x": 236, - "y": 149, + "x": 213, + "y": 147, "w": 22, "h": 22 } @@ -3636,8 +3573,8 @@ "h": 22 }, "frame": { - "x": 258, - "y": 149, + "x": 235, + "y": 148, "w": 24, "h": 22 } @@ -3657,8 +3594,8 @@ "h": 22 }, "frame": { - "x": 282, - "y": 149, + "x": 259, + "y": 148, "w": 24, "h": 22 } @@ -3678,7 +3615,7 @@ "h": 22 }, "frame": { - "x": 306, + "x": 283, "y": 149, "w": 22, "h": 22 @@ -3699,7 +3636,7 @@ "h": 22 }, "frame": { - "x": 328, + "x": 305, "y": 149, "w": 22, "h": 22 @@ -3720,54 +3657,12 @@ "h": 22 }, "frame": { - "x": 350, - "y": 152, + "x": 327, + "y": 150, "w": 23, "h": 22 } }, - { - "filename": "soothe_bell", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 22 - }, - "frame": { - "x": 373, - "y": 161, - "w": 17, - "h": 22 - } - }, - { - "filename": "metal_coat", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 5, - "w": 19, - "h": 22 - }, - "frame": { - "x": 0, - "y": 165, - "w": 19, - "h": 22 - } - }, { "filename": "ice_stone", "rotated": false, @@ -3783,12 +3678,54 @@ "h": 22 }, "frame": { - "x": 19, - "y": 166, + "x": 350, + "y": 150, "w": 22, "h": 22 } }, + { + "filename": "metronome", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 5, + "w": 17, + "h": 22 + }, + "frame": { + "x": 372, + "y": 150, + "w": 17, + "h": 22 + } + }, + { + "filename": "lock_capsule", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 5, + "w": 19, + "h": 22 + }, + "frame": { + "x": 0, + "y": 164, + "w": 19, + "h": 22 + } + }, { "filename": "magmarizer", "rotated": false, @@ -3804,12 +3741,33 @@ "h": 22 }, "frame": { - "x": 41, - "y": 166, + "x": 19, + "y": 165, "w": 22, "h": 22 } }, + { + "filename": "soothe_bell", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 22 + }, + "frame": { + "x": 41, + "y": 165, + "w": 17, + "h": 22 + } + }, { "filename": "map", "rotated": false, @@ -3825,8 +3783,8 @@ "h": 22 }, "frame": { - "x": 63, - "y": 167, + "x": 58, + "y": 166, "w": 27, "h": 22 } @@ -3846,12 +3804,33 @@ "h": 22 }, "frame": { - "x": 90, - "y": 167, + "x": 85, + "y": 166, "w": 22, "h": 22 } }, + { + "filename": "full_heal", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 4, + "w": 15, + "h": 23 + }, + "frame": { + "x": 107, + "y": 166, + "w": 15, + "h": 23 + } + }, { "filename": "memory_dark", "rotated": false, @@ -3867,8 +3846,8 @@ "h": 22 }, "frame": { - "x": 112, - "y": 168, + "x": 122, + "y": 167, "w": 22, "h": 22 } @@ -3888,7 +3867,7 @@ "h": 22 }, "frame": { - "x": 134, + "x": 144, "y": 169, "w": 22, "h": 22 @@ -3909,7 +3888,7 @@ "h": 22 }, "frame": { - "x": 156, + "x": 166, "y": 169, "w": 22, "h": 22 @@ -3930,7 +3909,7 @@ "h": 22 }, "frame": { - "x": 178, + "x": 188, "y": 169, "w": 22, "h": 22 @@ -3951,8 +3930,8 @@ "h": 22 }, "frame": { - "x": 200, - "y": 170, + "x": 210, + "y": 169, "w": 22, "h": 22 } @@ -3972,8 +3951,8 @@ "h": 22 }, "frame": { - "x": 222, - "y": 171, + "x": 232, + "y": 170, "w": 22, "h": 22 } @@ -3993,8 +3972,8 @@ "h": 22 }, "frame": { - "x": 244, - "y": 171, + "x": 254, + "y": 170, "w": 22, "h": 22 } @@ -4014,7 +3993,7 @@ "h": 22 }, "frame": { - "x": 266, + "x": 276, "y": 171, "w": 22, "h": 22 @@ -4035,7 +4014,7 @@ "h": 22 }, "frame": { - "x": 288, + "x": 298, "y": 171, "w": 22, "h": 22 @@ -4056,33 +4035,12 @@ "h": 22 }, "frame": { - "x": 310, - "y": 171, + "x": 320, + "y": 172, "w": 22, "h": 22 } }, - { - "filename": "hyper_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 332, - "y": 171, - "w": 17, - "h": 23 - } - }, { "filename": "memory_ice", "rotated": false, @@ -4098,33 +4056,12 @@ "h": 22 }, "frame": { - "x": 349, - "y": 174, + "x": 342, + "y": 172, "w": 22, "h": 22 } }, - { - "filename": "potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 371, - "y": 183, - "w": 17, - "h": 23 - } - }, { "filename": "memory_normal", "rotated": false, @@ -4140,8 +4077,8 @@ "h": 22 }, "frame": { - "x": 0, - "y": 188, + "x": 364, + "y": 172, "w": 22, "h": 22 } @@ -4161,12 +4098,33 @@ "h": 22 }, "frame": { - "x": 0, - "y": 188, + "x": 364, + "y": 172, "w": 22, "h": 22 } }, + { + "filename": "metal_coat", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 19, + "h": 22 + }, + "frame": { + "x": 0, + "y": 186, + "w": 19, + "h": 22 + } + }, { "filename": "memory_poison", "rotated": false, @@ -4182,12 +4140,33 @@ "h": 22 }, "frame": { - "x": 22, - "y": 188, + "x": 19, + "y": 187, "w": 22, "h": 22 } }, + { + "filename": "hyper_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 41, + "y": 187, + "w": 17, + "h": 23 + } + }, { "filename": "memory_psychic", "rotated": false, @@ -4203,8 +4182,8 @@ "h": 22 }, "frame": { - "x": 44, - "y": 189, + "x": 58, + "y": 188, "w": 22, "h": 22 } @@ -4224,8 +4203,8 @@ "h": 22 }, "frame": { - "x": 66, - "y": 189, + "x": 80, + "y": 188, "w": 22, "h": 22 } @@ -4245,12 +4224,33 @@ "h": 22 }, "frame": { - "x": 88, + "x": 102, "y": 189, "w": 22, "h": 22 } }, + { + "filename": "sitrus_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 20, + "h": 22 + }, + "frame": { + "x": 124, + "y": 189, + "w": 20, + "h": 22 + } + }, { "filename": "memory_water", "rotated": false, @@ -4266,8 +4266,8 @@ "h": 22 }, "frame": { - "x": 110, - "y": 190, + "x": 144, + "y": 191, "w": 22, "h": 22 } @@ -4287,7 +4287,7 @@ "h": 22 }, "frame": { - "x": 132, + "x": 166, "y": 191, "w": 22, "h": 22 @@ -4308,12 +4308,33 @@ "h": 22 }, "frame": { - "x": 154, + "x": 188, "y": 191, "w": 24, "h": 22 } }, + { + "filename": "mystic_water", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 20, + "h": 23 + }, + "frame": { + "x": 212, + "y": 191, + "w": 20, + "h": 23 + } + }, { "filename": "protector", "rotated": false, @@ -4329,8 +4350,8 @@ "h": 22 }, "frame": { - "x": 178, - "y": 191, + "x": 232, + "y": 192, "w": 22, "h": 22 } @@ -4350,7 +4371,7 @@ "h": 22 }, "frame": { - "x": 200, + "x": 254, "y": 192, "w": 22, "h": 22 @@ -4371,12 +4392,33 @@ "h": 22 }, "frame": { - "x": 222, + "x": 276, "y": 193, "w": 23, "h": 22 } }, + { + "filename": "dragon_fang", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 21, + "h": 23 + }, + "frame": { + "x": 299, + "y": 193, + "w": 21, + "h": 23 + } + }, { "filename": "scroll_of_waters", "rotated": false, @@ -4392,8 +4434,8 @@ "h": 22 }, "frame": { - "x": 245, - "y": 193, + "x": 320, + "y": 194, "w": 22, "h": 22 } @@ -4413,33 +4455,12 @@ "h": 22 }, "frame": { - "x": 267, - "y": 193, + "x": 342, + "y": 194, "w": 22, "h": 22 } }, - { - "filename": "sitrus_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 5, - "w": 20, - "h": 22 - }, - "frame": { - "x": 289, - "y": 193, - "w": 20, - "h": 22 - } - }, { "filename": "starf_berry", "rotated": false, @@ -4455,14 +4476,14 @@ "h": 22 }, "frame": { - "x": 309, - "y": 193, + "x": 364, + "y": 194, "w": 22, "h": 22 } }, { - "filename": "sachet", + "filename": "potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -4470,15 +4491,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 18, + "x": 8, + "y": 5, + "w": 17, "h": 23 }, "frame": { - "x": 331, - "y": 194, - "w": 18, + "x": 0, + "y": 208, + "w": 17, "h": 23 } }, @@ -4497,33 +4518,12 @@ "h": 22 }, "frame": { - "x": 349, - "y": 196, + "x": 17, + "y": 209, "w": 22, "h": 22 } }, - { - "filename": "super_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 371, - "y": 206, - "w": 17, - "h": 23 - } - }, { "filename": "tm_bug", "rotated": false, @@ -4539,7 +4539,7 @@ "h": 22 }, "frame": { - "x": 0, + "x": 39, "y": 210, "w": 22, "h": 22 @@ -4560,12 +4560,33 @@ "h": 22 }, "frame": { - "x": 22, + "x": 61, "y": 210, "w": 22, "h": 22 } }, + { + "filename": "sachet", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 18, + "h": 23 + }, + "frame": { + "x": 83, + "y": 210, + "w": 18, + "h": 23 + } + }, { "filename": "tm_dragon", "rotated": false, @@ -4581,12 +4602,33 @@ "h": 22 }, "frame": { - "x": 44, + "x": 101, "y": 211, "w": 22, "h": 22 } }, + { + "filename": "lansat_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 4, + "w": 21, + "h": 23 + }, + "frame": { + "x": 123, + "y": 211, + "w": 21, + "h": 23 + } + }, { "filename": "tm_electric", "rotated": false, @@ -4602,8 +4644,8 @@ "h": 22 }, "frame": { - "x": 66, - "y": 211, + "x": 144, + "y": 213, "w": 22, "h": 22 } @@ -4623,8 +4665,8 @@ "h": 22 }, "frame": { - "x": 88, - "y": 211, + "x": 166, + "y": 213, "w": 22, "h": 22 } @@ -4644,8 +4686,8 @@ "h": 22 }, "frame": { - "x": 110, - "y": 212, + "x": 188, + "y": 213, "w": 22, "h": 22 } @@ -4665,8 +4707,8 @@ "h": 22 }, "frame": { - "x": 132, - "y": 213, + "x": 210, + "y": 214, "w": 22, "h": 22 } @@ -4686,8 +4728,8 @@ "h": 22 }, "frame": { - "x": 154, - "y": 213, + "x": 232, + "y": 214, "w": 22, "h": 22 } @@ -4707,8 +4749,8 @@ "h": 22 }, "frame": { - "x": 176, - "y": 213, + "x": 254, + "y": 214, "w": 22, "h": 22 } @@ -4728,8 +4770,8 @@ "h": 22 }, "frame": { - "x": 198, - "y": 214, + "x": 276, + "y": 215, "w": 22, "h": 22 } @@ -4749,8 +4791,8 @@ "h": 22 }, "frame": { - "x": 220, - "y": 215, + "x": 298, + "y": 216, "w": 22, "h": 22 } @@ -4770,8 +4812,8 @@ "h": 22 }, "frame": { - "x": 242, - "y": 215, + "x": 320, + "y": 216, "w": 22, "h": 22 } @@ -4791,8 +4833,8 @@ "h": 22 }, "frame": { - "x": 264, - "y": 215, + "x": 342, + "y": 216, "w": 22, "h": 22 } @@ -4812,8 +4854,8 @@ "h": 22 }, "frame": { - "x": 286, - "y": 215, + "x": 364, + "y": 216, "w": 22, "h": 22 } @@ -4833,12 +4875,33 @@ "h": 22 }, "frame": { - "x": 308, - "y": 215, + "x": 0, + "y": 231, "w": 22, "h": 22 } }, + { + "filename": "super_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 22, + "y": 231, + "w": 17, + "h": 23 + } + }, { "filename": "tm_steel", "rotated": false, @@ -4854,54 +4917,12 @@ "h": 22 }, "frame": { - "x": 330, - "y": 218, + "x": 39, + "y": 232, "w": 22, "h": 22 } }, - { - "filename": "elixir", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 352, - "y": 218, - "w": 18, - "h": 24 - } - }, - { - "filename": "mystic_water", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 5, - "w": 20, - "h": 23 - }, - "frame": { - "x": 370, - "y": 229, - "w": 20, - "h": 23 - } - }, { "filename": "tm_water", "rotated": false, @@ -4917,7 +4938,7 @@ "h": 22 }, "frame": { - "x": 0, + "x": 61, "y": 232, "w": 22, "h": 22 @@ -4938,8 +4959,8 @@ "h": 22 }, "frame": { - "x": 22, - "y": 232, + "x": 83, + "y": 233, "w": 22, "h": 22 } @@ -4959,8 +4980,8 @@ "h": 22 }, "frame": { - "x": 44, - "y": 233, + "x": 105, + "y": 234, "w": 22, "h": 22 } @@ -4980,8 +5001,8 @@ "h": 22 }, "frame": { - "x": 66, - "y": 233, + "x": 127, + "y": 235, "w": 22, "h": 22 } @@ -5001,8 +5022,8 @@ "h": 22 }, "frame": { - "x": 88, - "y": 233, + "x": 149, + "y": 235, "w": 22, "h": 22 } @@ -5022,8 +5043,8 @@ "h": 22 }, "frame": { - "x": 110, - "y": 234, + "x": 171, + "y": 235, "w": 22, "h": 22 } @@ -5043,8 +5064,8 @@ "h": 22 }, "frame": { - "x": 132, - "y": 235, + "x": 193, + "y": 236, "w": 22, "h": 22 } @@ -5064,12 +5085,33 @@ "h": 22 }, "frame": { - "x": 154, - "y": 235, + "x": 215, + "y": 236, "w": 22, "h": 22 } }, + { + "filename": "berry_pouch", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 5, + "w": 23, + "h": 23 + }, + "frame": { + "x": 237, + "y": 236, + "w": 23, + "h": 23 + } + }, { "filename": "black_belt", "rotated": false, @@ -5085,8 +5127,8 @@ "h": 23 }, "frame": { - "x": 176, - "y": 235, + "x": 260, + "y": 237, "w": 22, "h": 23 } @@ -5106,33 +5148,12 @@ "h": 23 }, "frame": { - "x": 198, - "y": 236, + "x": 282, + "y": 238, "w": 22, "h": 23 } }, - { - "filename": "berry_pouch", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 5, - "w": 23, - "h": 23 - }, - "frame": { - "x": 220, - "y": 237, - "w": 23, - "h": 23 - } - }, { "filename": "clefairy_doll", "rotated": false, @@ -5148,8 +5169,8 @@ "h": 23 }, "frame": { - "x": 243, - "y": 237, + "x": 304, + "y": 238, "w": 24, "h": 23 } @@ -5169,8 +5190,8 @@ "h": 23 }, "frame": { - "x": 267, - "y": 237, + "x": 328, + "y": 238, "w": 24, "h": 23 } @@ -5190,14 +5211,14 @@ "h": 23 }, "frame": { - "x": 291, - "y": 237, + "x": 352, + "y": 238, "w": 22, "h": 23 } }, { - "filename": "iron", + "filename": "calcium", "rotated": false, "trimmed": true, "sourceSize": { @@ -5211,54 +5232,12 @@ "h": 24 }, "frame": { - "x": 313, - "y": 237, + "x": 374, + "y": 238, "w": 16, "h": 24 } }, - { - "filename": "dragon_fang", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 21, - "h": 23 - }, - "frame": { - "x": 329, - "y": 240, - "w": 21, - "h": 23 - } - }, - { - "filename": "ether", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 350, - "y": 242, - "w": 18, - "h": 24 - } - }, { "filename": "dragon_tera_shard", "rotated": false, @@ -5274,8 +5253,8 @@ "h": 23 }, "frame": { - "x": 368, - "y": 252, + "x": 0, + "y": 253, "w": 22, "h": 23 } @@ -5295,33 +5274,12 @@ "h": 23 }, "frame": { - "x": 0, + "x": 22, "y": 254, "w": 23, "h": 23 } }, - { - "filename": "lansat_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 4, - "w": 21, - "h": 23 - }, - "frame": { - "x": 23, - "y": 254, - "w": 21, - "h": 23 - } - }, { "filename": "electric_tera_shard", "rotated": false, @@ -5337,14 +5295,14 @@ "h": 23 }, "frame": { - "x": 44, - "y": 255, + "x": 45, + "y": 254, "w": 22, "h": 23 } }, { - "filename": "expert_belt", + "filename": "carbos", "rotated": false, "trimmed": true, "sourceSize": { @@ -5352,16 +5310,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, + "x": 8, "y": 4, - "w": 24, - "h": 23 + "w": 16, + "h": 24 }, "frame": { - "x": 66, - "y": 255, - "w": 24, - "h": 23 + "x": 67, + "y": 254, + "w": 16, + "h": 24 } }, { @@ -5379,8 +5337,8 @@ "h": 23 }, "frame": { - "x": 90, - "y": 256, + "x": 83, + "y": 255, "w": 22, "h": 23 } @@ -5400,12 +5358,33 @@ "h": 23 }, "frame": { - "x": 112, - "y": 257, + "x": 105, + "y": 256, "w": 22, "h": 23 } }, + { + "filename": "expert_belt", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 24, + "h": 23 + }, + "frame": { + "x": 127, + "y": 257, + "w": 24, + "h": 23 + } + }, { "filename": "fire_stone", "rotated": false, @@ -5421,12 +5400,33 @@ "h": 23 }, "frame": { - "x": 134, + "x": 151, "y": 257, "w": 22, "h": 23 } }, + { + "filename": "elixir", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 173, + "y": 257, + "w": 18, + "h": 24 + } + }, { "filename": "fire_tera_shard", "rotated": false, @@ -5442,7 +5442,7 @@ "h": 23 }, "frame": { - "x": 156, + "x": 191, "y": 258, "w": 22, "h": 23 @@ -5463,8 +5463,8 @@ "h": 23 }, "frame": { - "x": 178, - "y": 259, + "x": 213, + "y": 258, "w": 22, "h": 23 } @@ -5484,8 +5484,8 @@ "h": 23 }, "frame": { - "x": 200, - "y": 260, + "x": 235, + "y": 259, "w": 22, "h": 23 } @@ -5505,7 +5505,7 @@ "h": 23 }, "frame": { - "x": 222, + "x": 257, "y": 260, "w": 22, "h": 23 @@ -5526,8 +5526,8 @@ "h": 23 }, "frame": { - "x": 244, - "y": 260, + "x": 279, + "y": 261, "w": 22, "h": 23 } @@ -5547,8 +5547,8 @@ "h": 23 }, "frame": { - "x": 266, - "y": 260, + "x": 301, + "y": 261, "w": 23, "h": 23 } @@ -5568,92 +5568,8 @@ "h": 23 }, "frame": { - "x": 289, - "y": 260, - "w": 22, - "h": 23 - } - }, - { - "filename": "full_restore", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 311, + "x": 324, "y": 261, - "w": 18, - "h": 24 - } - }, - { - "filename": "leaf_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 21, - "h": 23 - }, - "frame": { - "x": 329, - "y": 263, - "w": 21, - "h": 23 - } - }, - { - "filename": "lure", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 17, - "h": 24 - }, - "frame": { - "x": 350, - "y": 266, - "w": 17, - "h": 24 - } - }, - { - "filename": "ice_tera_shard", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 22, - "h": 23 - }, - "frame": { - "x": 367, - "y": 275, "w": 22, "h": 23 } @@ -5673,12 +5589,75 @@ "h": 23 }, "frame": { - "x": 0, - "y": 277, + "x": 346, + "y": 261, "w": 24, "h": 23 } }, + { + "filename": "ether", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 370, + "y": 262, + "w": 18, + "h": 24 + } + }, + { + "filename": "ice_tera_shard", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 22, + "h": 23 + }, + "frame": { + "x": 0, + "y": 276, + "w": 22, + "h": 23 + } + }, + { + "filename": "leaf_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 21, + "h": 23 + }, + "frame": { + "x": 22, + "y": 277, + "w": 21, + "h": 23 + } + }, { "filename": "leppa_berry", "rotated": false, @@ -5694,8 +5673,8 @@ "h": 23 }, "frame": { - "x": 24, - "y": 278, + "x": 43, + "y": 277, "w": 24, "h": 23 } @@ -5715,14 +5694,14 @@ "h": 23 }, "frame": { - "x": 48, + "x": 67, "y": 278, "w": 22, "h": 23 } }, { - "filename": "max_elixir", + "filename": "hp_up", "rotated": false, "trimmed": true, "sourceSize": { @@ -5730,15 +5709,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 7, + "x": 8, "y": 4, - "w": 18, + "w": 16, "h": 24 }, "frame": { - "x": 70, + "x": 89, "y": 278, - "w": 18, + "w": 16, "h": 24 } }, @@ -5757,7 +5736,7 @@ "h": 23 }, "frame": { - "x": 88, + "x": 105, "y": 279, "w": 22, "h": 23 @@ -5778,7 +5757,7 @@ "h": 23 }, "frame": { - "x": 110, + "x": 127, "y": 280, "w": 22, "h": 23 @@ -5799,7 +5778,7 @@ "h": 23 }, "frame": { - "x": 132, + "x": 149, "y": 280, "w": 22, "h": 23 @@ -5820,7 +5799,7 @@ "h": 23 }, "frame": { - "x": 154, + "x": 171, "y": 281, "w": 22, "h": 23 @@ -5841,12 +5820,33 @@ "h": 23 }, "frame": { - "x": 176, - "y": 282, + "x": 193, + "y": 281, "w": 23, "h": 23 } }, + { + "filename": "full_restore", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 216, + "y": 281, + "w": 18, + "h": 24 + } + }, { "filename": "rarer_candy", "rotated": false, @@ -5862,8 +5862,8 @@ "h": 23 }, "frame": { - "x": 199, - "y": 283, + "x": 234, + "y": 282, "w": 23, "h": 23 } @@ -5883,7 +5883,7 @@ "h": 23 }, "frame": { - "x": 222, + "x": 257, "y": 283, "w": 22, "h": 23 @@ -5904,8 +5904,8 @@ "h": 23 }, "frame": { - "x": 244, - "y": 283, + "x": 279, + "y": 284, "w": 22, "h": 23 } @@ -5925,8 +5925,8 @@ "h": 23 }, "frame": { - "x": 266, - "y": 283, + "x": 301, + "y": 284, "w": 24, "h": 23 } @@ -5946,75 +5946,12 @@ "h": 23 }, "frame": { - "x": 290, - "y": 283, + "x": 325, + "y": 284, "w": 21, "h": 23 } }, - { - "filename": "max_ether", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 311, - "y": 285, - "w": 18, - "h": 24 - } - }, - { - "filename": "whipped_dream", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 4, - "w": 21, - "h": 23 - }, - "frame": { - "x": 329, - "y": 286, - "w": 21, - "h": 23 - } - }, - { - "filename": "max_lure", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 17, - "h": 24 - }, - "frame": { - "x": 350, - "y": 290, - "w": 17, - "h": 24 - } - }, { "filename": "steel_tera_shard", "rotated": false, @@ -6030,8 +5967,8 @@ "h": 23 }, "frame": { - "x": 367, - "y": 298, + "x": 346, + "y": 284, "w": 22, "h": 23 } @@ -6050,9 +5987,30 @@ "w": 22, "h": 23 }, + "frame": { + "x": 368, + "y": 286, + "w": 22, + "h": 23 + } + }, + { + "filename": "water_tera_shard", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 22, + "h": 23 + }, "frame": { "x": 0, - "y": 300, + "y": 299, "w": 22, "h": 23 } @@ -6073,13 +6031,13 @@ }, "frame": { "x": 22, - "y": 301, + "y": 300, "w": 23, "h": 23 } }, { - "filename": "twisted_spoon", + "filename": "whipped_dream", "rotated": false, "trimmed": true, "sourceSize": { @@ -6087,60 +6045,18 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, - "y": 5, - "w": 24, + "x": 5, + "y": 4, + "w": 21, "h": 23 }, "frame": { "x": 45, - "y": 301, - "w": 24, + "y": 300, + "w": 21, "h": 23 } }, - { - "filename": "water_tera_shard", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 22, - "h": 23 - }, - "frame": { - "x": 69, - "y": 302, - "w": 22, - "h": 23 - } - }, - { - "filename": "max_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 91, - "y": 302, - "w": 18, - "h": 24 - } - }, { "filename": "big_root", "rotated": false, @@ -6156,12 +6072,33 @@ "h": 24 }, "frame": { - "x": 109, - "y": 303, + "x": 66, + "y": 301, "w": 23, "h": 24 } }, + { + "filename": "twisted_spoon", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 5, + "w": 24, + "h": 23 + }, + "frame": { + "x": 89, + "y": 302, + "w": 24, + "h": 23 + } + }, { "filename": "catching_charm", "rotated": false, @@ -6177,54 +6114,12 @@ "h": 24 }, "frame": { - "x": 132, + "x": 113, "y": 303, "w": 21, "h": 24 } }, - { - "filename": "kings_rock", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 4, - "w": 23, - "h": 24 - }, - "frame": { - "x": 153, - "y": 304, - "w": 23, - "h": 24 - } - }, - { - "filename": "max_repel", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 176, - "y": 305, - "w": 16, - "h": 24 - } - }, { "filename": "choice_scarf", "rotated": false, @@ -6240,8 +6135,8 @@ "h": 24 }, "frame": { - "x": 192, - "y": 306, + "x": 134, + "y": 303, "w": 24, "h": 24 } @@ -6261,8 +6156,8 @@ "h": 24 }, "frame": { - "x": 216, - "y": 306, + "x": 158, + "y": 304, "w": 24, "h": 24 } @@ -6282,8 +6177,8 @@ "h": 24 }, "frame": { - "x": 240, - "y": 306, + "x": 182, + "y": 304, "w": 24, "h": 24 } @@ -6303,33 +6198,12 @@ "h": 24 }, "frame": { - "x": 264, - "y": 306, + "x": 206, + "y": 305, "w": 24, "h": 24 } }, - { - "filename": "max_revive", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 4, - "w": 22, - "h": 24 - }, - "frame": { - "x": 288, - "y": 306, - "w": 22, - "h": 24 - } - }, { "filename": "grip_claw", "rotated": false, @@ -6345,14 +6219,14 @@ "h": 24 }, "frame": { - "x": 310, - "y": 309, + "x": 230, + "y": 305, "w": 24, "h": 24 } }, { - "filename": "pp_max", + "filename": "iron", "rotated": false, "trimmed": true, "sourceSize": { @@ -6366,14 +6240,14 @@ "h": 24 }, "frame": { - "x": 334, - "y": 309, + "x": 254, + "y": 306, "w": 16, "h": 24 } }, { - "filename": "pp_up", + "filename": "kings_rock", "rotated": false, "trimmed": true, "sourceSize": { @@ -6381,15 +6255,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, + "x": 5, "y": 4, - "w": 16, + "w": 23, "h": 24 }, "frame": { - "x": 350, - "y": 314, - "w": 16, + "x": 270, + "y": 307, + "w": 23, "h": 24 } }, @@ -6408,33 +6282,12 @@ "h": 24 }, "frame": { - "x": 366, - "y": 321, + "x": 293, + "y": 307, "w": 24, "h": 24 } }, - { - "filename": "oval_charm", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 21, - "h": 24 - }, - "frame": { - "x": 0, - "y": 323, - "w": 21, - "h": 24 - } - }, { "filename": "lucky_punch_great", "rotated": false, @@ -6450,8 +6303,8 @@ "h": 24 }, "frame": { - "x": 21, - "y": 324, + "x": 317, + "y": 307, "w": 24, "h": 24 } @@ -6471,33 +6324,12 @@ "h": 24 }, "frame": { - "x": 45, - "y": 324, + "x": 341, + "y": 307, "w": 24, "h": 24 } }, - { - "filename": "protein", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 69, - "y": 325, - "w": 16, - "h": 24 - } - }, { "filename": "lucky_punch_ultra", "rotated": false, @@ -6513,12 +6345,33 @@ "h": 24 }, "frame": { - "x": 85, - "y": 326, + "x": 365, + "y": 309, "w": 24, "h": 24 } }, + { + "filename": "lure", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 17, + "h": 24 + }, + "frame": { + "x": 0, + "y": 322, + "w": 17, + "h": 24 + } + }, { "filename": "lustrous_globe", "rotated": false, @@ -6534,12 +6387,243 @@ "h": 24 }, "frame": { - "x": 109, - "y": 327, + "x": 17, + "y": 323, "w": 24, "h": 24 } }, + { + "filename": "max_elixir", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 41, + "y": 323, + "w": 18, + "h": 24 + } + }, + { + "filename": "max_ether", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 59, + "y": 325, + "w": 18, + "h": 24 + } + }, + { + "filename": "max_lure", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 17, + "h": 24 + }, + "frame": { + "x": 77, + "y": 325, + "w": 17, + "h": 24 + } + }, + { + "filename": "max_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 94, + "y": 325, + "w": 18, + "h": 24 + } + }, + { + "filename": "max_repel", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 112, + "y": 327, + "w": 16, + "h": 24 + } + }, + { + "filename": "max_revive", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 4, + "w": 22, + "h": 24 + }, + "frame": { + "x": 128, + "y": 327, + "w": 22, + "h": 24 + } + }, + { + "filename": "muscle_band", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 24, + "h": 24 + }, + "frame": { + "x": 150, + "y": 328, + "w": 24, + "h": 24 + } + }, + { + "filename": "oval_charm", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 21, + "h": 24 + }, + "frame": { + "x": 174, + "y": 328, + "w": 21, + "h": 24 + } + }, + { + "filename": "pp_max", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 195, + "y": 329, + "w": 16, + "h": 24 + } + }, + { + "filename": "pp_up", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 211, + "y": 329, + "w": 16, + "h": 24 + } + }, + { + "filename": "protein", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 227, + "y": 329, + "w": 16, + "h": 24 + } + }, { "filename": "red_orb", "rotated": false, @@ -6555,8 +6639,8 @@ "h": 24 }, "frame": { - "x": 133, - "y": 327, + "x": 243, + "y": 330, "w": 20, "h": 24 } @@ -6576,8 +6660,8 @@ "h": 24 }, "frame": { - "x": 153, - "y": 328, + "x": 263, + "y": 331, "w": 16, "h": 24 } @@ -6597,33 +6681,12 @@ "h": 24 }, "frame": { - "x": 169, - "y": 329, + "x": 279, + "y": 331, "w": 23, "h": 24 } }, - { - "filename": "muscle_band", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 4, - "w": 24, - "h": 24 - }, - "frame": { - "x": 192, - "y": 330, - "w": 24, - "h": 24 - } - }, { "filename": "salac_berry", "rotated": false, @@ -6639,8 +6702,8 @@ "h": 24 }, "frame": { - "x": 216, - "y": 330, + "x": 302, + "y": 331, "w": 24, "h": 24 } @@ -6660,8 +6723,8 @@ "h": 24 }, "frame": { - "x": 240, - "y": 330, + "x": 326, + "y": 331, "w": 24, "h": 24 } @@ -6681,51 +6744,9 @@ "h": 24 }, "frame": { - "x": 264, - "y": 330, - "w": 21, - "h": 24 - } - }, - { - "filename": "silk_scarf", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 4, - "w": 24, - "h": 24 - }, - "frame": { - "x": 285, - "y": 330, - "w": 24, - "h": 24 - } - }, - { - "filename": "sun_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 4, - "w": 24, - "h": 24 - }, - "frame": { - "x": 309, + "x": 350, "y": 333, - "w": 24, + "w": 21, "h": 24 } }, @@ -6744,7 +6765,7 @@ "h": 24 }, "frame": { - "x": 333, + "x": 371, "y": 333, "w": 17, "h": 24 @@ -6765,12 +6786,33 @@ "h": 24 }, "frame": { - "x": 350, - "y": 338, + "x": 0, + "y": 346, "w": 16, "h": 24 } }, + { + "filename": "silk_scarf", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 24, + "h": 24 + }, + "frame": { + "x": 16, + "y": 347, + "w": 24, + "h": 24 + } + }, { "filename": "unknown", "rotated": false, @@ -6786,12 +6828,33 @@ "h": 24 }, "frame": { - "x": 366, - "y": 345, + "x": 40, + "y": 347, "w": 16, "h": 24 } }, + { + "filename": "sun_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 24, + "h": 24 + }, + "frame": { + "x": 56, + "y": 349, + "w": 24, + "h": 24 + } + }, { "filename": "zinc", "rotated": false, @@ -6807,8 +6870,8 @@ "h": 24 }, "frame": { - "x": 0, - "y": 347, + "x": 80, + "y": 349, "w": 16, "h": 24 } @@ -6828,8 +6891,8 @@ "h": 25 }, "frame": { - "x": 16, - "y": 348, + "x": 96, + "y": 351, "w": 22, "h": 25 } @@ -6849,8 +6912,8 @@ "h": 26 }, "frame": { - "x": 38, - "y": 348, + "x": 118, + "y": 351, "w": 23, "h": 26 } @@ -6870,8 +6933,8 @@ "h": 26 }, "frame": { - "x": 61, - "y": 349, + "x": 141, + "y": 352, "w": 24, "h": 26 } @@ -6891,8 +6954,8 @@ "h": 26 }, "frame": { - "x": 85, - "y": 351, + "x": 165, + "y": 352, "w": 27, "h": 26 } @@ -6912,8 +6975,8 @@ "h": 27 }, "frame": { - "x": 112, - "y": 351, + "x": 192, + "y": 353, "w": 32, "h": 27 } @@ -6933,33 +6996,12 @@ "h": 28 }, "frame": { - "x": 144, - "y": 353, + "x": 224, + "y": 354, "w": 29, "h": 28 } }, - { - "filename": "prison_bottle", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 1, - "w": 17, - "h": 30 - }, - "frame": { - "x": 173, - "y": 353, - "w": 17, - "h": 30 - } - }, { "filename": "galarica_cuff", "rotated": false, @@ -6975,12 +7017,33 @@ "h": 30 }, "frame": { - "x": 190, - "y": 354, + "x": 253, + "y": 355, "w": 29, "h": 30 } }, + { + "filename": "prison_bottle", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 1, + "w": 17, + "h": 30 + }, + "frame": { + "x": 282, + "y": 355, + "w": 17, + "h": 30 + } + }, { "filename": "exp_charm", "rotated": false, @@ -6996,8 +7059,8 @@ "h": 31 }, "frame": { - "x": 219, - "y": 354, + "x": 299, + "y": 355, "w": 17, "h": 31 } @@ -7017,8 +7080,8 @@ "h": 31 }, "frame": { - "x": 236, - "y": 354, + "x": 316, + "y": 355, "w": 17, "h": 31 } @@ -7038,8 +7101,8 @@ "h": 31 }, "frame": { - "x": 253, - "y": 354, + "x": 333, + "y": 355, "w": 17, "h": 31 } @@ -7050,6 +7113,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:b9141845043d06c1d7b9be442fde5e4a:247748ff51cffc6859aa94c8cf94099a:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:6d684b34b1074ff970152bf5b6c304e3:7c1ae946dd8c91ed5dfd1e2c9a39e1b1:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index 7ae015963..1ecd17240 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/candy.png b/public/images/items/candy.png new file mode 100644 index 000000000..9a68bdab6 Binary files /dev/null and b/public/images/items/candy.png differ diff --git a/public/images/items/candy_overlay.png b/public/images/items/candy_overlay.png new file mode 100644 index 000000000..67df546a6 Binary files /dev/null and b/public/images/items/candy_overlay.png differ diff --git a/public/images/items/mystery_egg.png b/public/images/items/mystery_egg.png new file mode 100644 index 000000000..bb117a137 Binary files /dev/null and b/public/images/items/mystery_egg.png differ diff --git a/public/starter-colors.json b/public/starter-colors.json new file mode 100644 index 000000000..4e03ff1de --- /dev/null +++ b/public/starter-colors.json @@ -0,0 +1 @@ +{"1":["463b38","7dc084"],"4":["16181e","e7803d"],"7":["353838","a6b29f"],"10":["4e9c44","e4ad77"],"13":["4c2d22","e09247"],"16":["603d31","e4a769"],"19":["5c442e","bc81b5"],"21":["a7563a","f7bd93"],"23":["552335","d47a9d"],"25":["7d421b","f7d13f"],"27":["564941","d4b739"],"29":["433f63","c6c7e8"],"32":["3b4649","cc7bcb"],"35":["623a34","fbc5b4"],"37":["532711","d4794f"],"39":["5d2b35","f8a3a2"],"41":["643965","86a4db"],"43":["55615c","9bc446"],"46":["473323","d98042"],"48":["48324a","b385a0"],"50":["382a19","b4815d"],"52":["101010","d7ac4b"],"54":["4b3316","f5c769"],"56":["3c2819","e5b695"],"58":["714232","f2d183"],"60":["364a6d","e4dada"],"63":["3a2912","e2cd30"],"66":["676656","8fb9b4"],"69":["6d5015","b5c868"],"72":["9b4124","7daac3"],"74":["43342b","b1a791"],"77":["d95f2b","ead29f"],"79":["3c2521","ee868f"],"81":["3d302d","a8c2b7"],"83":["503b16","c9cc7d"],"84":["33291a","bc9268"],"86":["3a3343","d5cee1"],"88":["33213d","b977b9"],"90":["251c24","ae89aa"],"92":["614358","d4afcc"],"95":["595252","cdc5c5"],"96":["8f6a46","e6ca30"],"98":["2b2215","e58b64"],"100":["ee4927","938b91"],"102":["552422","fcbe99"],"104":["5f4b36","eae0db"],"106":["4e3d2d","c4a583"],"107":["2f201a","c99e87"],"108":["321711","f59879"],"109":["945681","ebda76"],"111":["2f2f3d","9e9dbd"],"113":["69352c","ffc3bf"],"114":["302b31","679ebb"],"115":["332913","b9a282"],"116":["27323b","a9b6be"],"118":["8c4632","e5dfda"],"120":["8f5d3a","deb24f"],"122":["383b4e","ecaeb4"],"123":["313924","b6d08e"],"124":["4f2f48","e38066"],"125":["353027","e2c536"],"126":["c23d38","f2d25a"],"127":["7c654e","d4c2a9"],"128":["695548","c4944c"],"129":["c15746","ebdbb2"],"131":["4180ac","d3c09f"],"132":["904faf","c67de6"],"133":["875242","dfb476"],"137":["4a9cba","e07778"],"138":["7e818b","e0cf92"],"140":["553e3c","cc8939"],"142":["5e437e","a396b7"],"143":["345a71","eed6b5"],"144":["2c5476","77aef3"],"145":["281f12","e6b82e"],"146":["c54521","f5b645"],"147":["636cba","e8e6eb"],"150":["6e4f8f","cfc7da"],"151":["793e6b","f9a8cd"],"152":["71a030","d5f08f"],"155":["43545a","f78e3a"],"158":["5c3823","629ece"],"161":["3b281e","c18c6e"],"163":["39281b","d89e6b"],"165":["60322b","e6ca99"],"167":["29231d","99c84e"],"170":["485c8a","fddb73"],"172":["483634","e2ce40"],"173":["43271a","f4a28a"],"174":["7b2a3f","f7a3b5"],"175":["a27069","eaddcb"],"177":["763d2b","8ab941"],"179":["454f56","eacf9f"],"183":["473d5b","91b4eb"],"185":["2c2924","979549"],"187":["76b047","d8687f"],"190":["8d4dae","d6ba89"],"191":["3c3d25","c9e028"],"193":["653525","b8ccac"],"194":["463554","7294df"],"198":["323951","d6b060"],"200":["49384a","5086a5"],"201":["464646","dadada"],"202":["3e343f","5daaf3"],"203":["5d4a4f","e7d26b"],"204":["2d3c5a","78c5cb"],"206":["496f7a","edd578"],"207":["3c2532","c687b6"],"209":["2d302f","e88e95"],"211":["3f595c","c0be7d"],"213":["60311c","dfbf6d"],"214":["21212c","6484b2"],"215":["547e93","b73466"],"216":["3c2918","e08741"],"218":["43190b","e46028"],"220":["473119","bb8e75"],"222":["4f1b26","f0a2c2"],"223":["455368","b3d9d6"],"225":["883820","e9e4dc"],"226":["343755","b0a3d2"],"227":["4a323e","a8b9d7"],"228":["292a2f","cdb0a9"],"231":["753d4d","8fb8df"],"234":["462b14","e6b857"],"235":["3e3319","bec899"],"236":["724734","d3acd7"],"238":["ce537d","d8c357"],"239":["453623","e7ae2e"],"240":["4e251d","e97c51"],"241":["534547","e8b098"],"243":["80798c","e0ad34"],"244":["56382c","d9b991"],"245":["383451","9c9ae0"],"246":["3f3523","a5c491"],"249":["3a3c64","e1e8f8"],"250":["803818","cad574"],"251":["3b4c42","ccdf95"],"252":["48733e","b9b55b"],"255":["e47127","e2b944"],"258":["dd8533","6eaad4"],"261":["585054","b1b0af"],"263":["7b695d","c7b6a6"],"265":["cd3a4f","b9a98b"],"270":["40755a","72b567"],"273":["675b53","cec0a3"],"276":["3c3c5b","dca29f"],"278":["6d6055","dce0f6"],"280":["683a4a","abd5a9"],"283":["cf9f44","5498c5"],"285":["7a8a69","e3caa9"],"287":["6c4b35","cfbca6"],"290":["756e62","d9e1c6"],"293":["f6c950","d388c6"],"296":["4c423f","f1cd69"],"298":["302943","5d93f0"],"299":["6b4c7d","6a82c3"],"300":["4f2d31","eb9792"],"302":["5a4884","9c91df"],"303":["746364","f2b251"],"304":["676f7f","e5e7ed"],"307":["616b7f","c7ccd0"],"309":["30322f","8fc06c"],"311":["97433b","f4de9c"],"312":["101010","bbaec1"],"313":["3c3037","c99e8e"],"314":["222222","a492b1"],"315":["74977a","cc4c69"],"316":["6b8b52","bade8a"],"318":["473c52","df8a3d"],"320":["426fa1","d8c398"],"322":["434137","decb60"],"324":["9e5f49","c7bab3"],"325":["826475","bba4b1"],"327":["422a22","e4bd8e"],"328":["503e3c","e46d48"],"331":["1f3417","8cb453"],"333":["657998","dbe5f6"],"335":["773c44","dae3f1"],"336":["494860","c78e39"],"337":["2c1b1a","b8a75a"],"338":["352916","d69c2d"],"339":["3e7ea3","a8b3c1"],"341":["904128","d9c1a8"],"343":["5b3438","b3aa66"],"345":["94588c","e5ac8a"],"347":["1c1617","a6938c"],"349":["7a6465","bac0b3"],"351":["7a7476","e4dbdb"],"352":["6f8f70","debc7d"],"353":["545283","8789ae"],"355":["44433b","eadeb9"],"357":["409146","906f50"],"358":["be626b","b2d3ed"],"359":["5c607d","d7d6e9"],"360":["6e4f5a","65b2d3"],"361":["5d5553","f1aa72"],"363":["6f89d3","e2d2a7"],"366":["1e1d27","a7a6d0"],"369":["5e4946","c5a98d"],"370":["dc7193","f3a9c9"],"371":["647285","a4c3e2"],"374":["151313","5976b2"],"377":["4a351f","cca785"],"378":["486c99","98cee9"],"379":["5e5e5a","cfc8cb"],"380":["c3474d","c7c6e7"],"381":["465a9a","c5bbb5"],"382":["662427","5870b3"],"383":["c63433","978a8f"],"384":["4c8c73","af5f4a"],"385":["e7c656","9cbcc8"],"386":["47515a","d67061"],"387":["65633b","b4c667"],"390":["97571f","f8d289"],"393":["3e6c93","d5dcd9"],"396":["7a615a","edeeee"],"399":["382b1a","be894b"],"401":["563d30","eebd80"],"403":["504742","79a1e4"],"406":["558049","b9df5f"],"408":["232831","7c93ae"],"410":["4d4a50","dfbd8a"],"412":["2d3330","69824a"],"415":["3b352b","f9bd60"],"417":["4a4b59","d0d8e4"],"418":["6f4329","f0a752"],"420":["467342","bb5173"],"422":["6c6c3e","81b1e5"],"425":["6f5f26","a17ed5"],"427":["7d5642","ddc693"],"431":["55586a","b5aac4"],"433":["ac6f65","e6c156"],"434":["524064","e4cba6"],"436":["1a4860","5091a7"],"438":["67ac52","947549"],"439":["564d95","f2abc2"],"440":["653a4e","f0b5c9"],"441":["454559","e7dbc0"],"442":["6bac44","a55c9e"],"443":["5a3834","548ca3"],"446":["296a83","bbb074"],"447":["383534","397cb6"],"449":["4e3c20","d6ba6e"],"451":["2c3043","898fd0"],"453":["433434","797aca"],"455":["2f3328","9ea35b"],"456":["2d3142","aaaac8"],"458":["124896","a1c3e8"],"459":["60645d","ecf2f2"],"479":["b85423","7eccce"],"480":["453d3f","ceb39c"],"481":["47353c","c38eb9"],"482":["3d3133","879ec8"],"483":["2b4163","adc7db"],"484":["634c67","d4c9e1"],"485":["66443f","c2bab5"],"486":["41594c","e2c9a3"],"487":["524856","d5a15b"],"488":["4c3750","d198b0"],"489":["1c1513","53a4dd"],"490":["27273a","70b2d8"],"491":["3f302f","bbc3cb"],"492":["756363","a7d16e"],"493":["605a3a","ded6c4"],"494":["b76b37","fae4b3"],"495":["18750f","e0cb78"],"498":["382822","e48440"],"501":["52737e","f5f0ea"],"504":["664533","cdb696"],"506":["61412b","e2b57b"],"509":["5f3d59","ddd9ae"],"511":["278c4a","dfb571"],"513":["c54b3c","f4b86c"],"515":["3a9cc1","dcb270"],"517":["4e3247","f1b3cb"],"519":["524441","bcb5b1"],"522":["3d3d3d","edeeec"],"524":["453c50","ca962d"],"527":["342d33","96bcd3"],"529":["3b3b40","d1cccc"],"531":["403636","e4b399"],"532":["593a21","c4ab9a"],"535":["414448","d0c5c5"],"538":["302623","e0ae9f"],"539":["2c343f","92c7e5"],"540":["78af1b","e3bd5a"],"543":["1f3028","a82f4a"],"546":["405436","d6dbc1"],"548":["2f4328","a9d979"],"550":["375c3b","cfafa8"],"551":["302a25","ba9059"],"554":["ac352e","f9c15c"],"556":["51514e","79bf53"],"557":["443d39","c89669"],"559":["553f2e","eac857"],"561":["333f46","ebb147"],"562":["383838","cf751c"],"564":["232c37","6587ae"],"566":["674f72","e6a664"],"568":["2f5d42","cdb9b5"],"570":["1a1a22","6b5166"],"572":["382f2a","bdb2a5"],"574":["423940","e2cbdb"],"577":["5f9265","d0e5b9"],"580":["4b6e8d","98d1df"],"582":["6583af","deeef9"],"585":["b3786f","f8e29a"],"587":["2f2d2b","f8e6c1"],"588":["6e603b","4472e5"],"590":["5a352f","eee3d0"],"592":["2c3a45","92c9eb"],"594":["8a495f","fba2a7"],"595":["4b3c37","eed338"],"597":["2d4b35","a3a7a7"],"599":["4d4e51","cedcec"],"602":["876b50","d8e6eb"],"605":["31423b","8bb7a2"],"607":["654bc0","d3ccd4"],"610":["51573a","99ac5d"],"613":["2c383e","b2d1e6"],"615":["272a53","7c8fd9"],"616":["2e2f42","b1b1c6"],"618":["453937","d9b26a"],"619":["9f5152","e2dd7c"],"621":["60242b","325c9a"],"622":["3b5653","93c0ad"],"624":["7e4a47","ffffff"],"626":["584730","e0bf81"],"627":["6a696c","eee3c4"],"629":["3c2f2e","c4af99"],"631":["8d4438","c19c64"],"632":["2e2e36","a7a4a6"],"633":["3c3739","466fb4"],"636":["74402d","eef0f2"],"638":["4b878b","d7d4be"],"639":["483f3c","b7a593"],"640":["50473b","aacd69"],"641":["4d3358","b2c0a2"],"642":["3a3c4e","c5d6e6"],"643":["736680","e1dde7"],"644":["1c1c23","33333d"],"645":["804d39","dedde0"],"646":["47515d","b2c7d9"],"647":["6f3c38","9fb7c6"],"648":["4d4e3f","cae5a9"],"649":["3d232c","9560b7"],"650":["39311e","c2ba5f"],"653":["40321e","efa85f"],"656":["2d3a40","a5c8cb"],"659":["4f3d30","b5aeaf"],"661":["2e2929","df9997"],"664":["4f4c49","dfd7bb"],"667":["4d423c","e1a176"],"669":["4d472b","f1a087"],"672":["535f4f","eeded7"],"674":["3e3f44","e8ebc6"],"676":["32302d","dadac4"],"677":["4b4a54","b1b0c2"],"679":["344154","afaa8f"],"682":["472e33","e999a9"],"684":["57363c","eed8d9"],"686":["363235","d1c1d0"],"688":["5c5049","dbccaf"],"690":["745033","b7b8e9"],"692":["4a4333","66d2e8"],"694":["3f3e38","ebce4a"],"696":["60453b","cbbeb4"],"698":["544c55","bdd7e3"],"701":["883b2f","85bda3"],"702":["302d29","ddba69"],"703":["484a59","aab2ce"],"704":["62715b","d5bee5"],"707":["322c29","d5bba2"],"708":["353233","997354"],"710":["4f3d34","e29b81"],"712":["576679","bfdfe7"],"714":["3d383a","a371b1"],"716":["3f3b3d","c4afb1"],"717":["292c2f","a74b4c"],"718":["3c3230","99ba41"],"719":["604650","e6c2cd"],"720":["625652","e5aba6"],"721":["354f53","c94b3d"],"722":["3e382f","d6c9b0"],"725":["353547","d86138"],"728":["384c83","b3c9d0"],"731":["572f2a","d2dce3"],"734":["372320","c39064"],"736":["75402b","e0ca9d"],"739":["582f73","88b2cb"],"741":["503c3c","e94c4e"],"742":["5b4a38","f4e9ca"],"744":["4a372f","d6b3a0"],"746":["383963","c5cfd0"],"747":["353249","a4beca"],"749":["272325","bb8778"],"751":["45452f","b9c69f"],"753":["694a45","8dbb97"],"755":["433839","d3b7c2"],"757":["302827","7f6b69"],"759":["473330","f7c0c7"],"761":["49462e","c7997b"],"764":["562d31","cab870"],"765":["395639","c5aec0"],"766":["3d3729","d3e3b3"],"767":["643f61","adbcb0"],"769":["3a2f28","cec0a8"],"771":["303030","bb5673"],"772":["2f2121","927f78"],"774":["281a1a","a76659"],"775":["404045","afb4b5"],"776":["42231e","d27d48"],"777":["4e4d4c","dddad0"],"778":["363026","dbc57c"],"779":["934e7b","bcc59c"],"780":["53706c","ddded2"],"781":["2a5563","a6712b"],"782":["4f4335","ebe2ac"],"785":["4d483c","e8b90e"],"786":["323130","d76c83"],"787":["3e332f","dd7f43"],"788":["2c2931","7874c1"],"789":["573c76","77b3ce"],"793":["191e27","b2c2cc"],"794":["402725","e46949"],"795":["524842","d7ccb8"],"796":["4d3f30","d6dad9"],"797":["32544a","86c0aa"],"798":["79543d","efe5d0"],"799":["30444c","efc235"],"800":["2a3032","949ca0"],"801":["59433b","d9bdb4"],"802":["1e2123","6e6b68"],"803":["3f375a","ab54b3"],"805":["393935","788183"],"806":["48535d","e9d4d0"],"807":["5c544f","edcb48"],"808":["674a2f","eacb80"],"810":["743d2c","88b650"],"813":["905f4d","f0e8dd"],"816":["2c3d62","92b3bd"],"819":["50443a","b9a491"],"821":["434148","d8c174"],"824":["372f6c","c2aa7d"],"827":["332925","bf4f21"],"829":["963521","d6cf51"],"831":["452d28","ddcfcc"],"833":["5f4c39","93caaf"],"835":["a27f3d","ecebea"],"837":["312e2d","8e786e"],"840":["8a9541","e83250"],"843":["4e462e","bbb780"],"845":["215093","beb9a9"],"846":["694b33","e8de9f"],"848":["6a5b76","972ec4"],"850":["421d15","ea612f"],"852":["302b43","f5b79f"],"854":["64425b","b0cdba"],"856":["181818","bfbeda"],"859":["563454","f383af"],"868":["181818","eade9e"],"870":["6b2f1f","f1c55e"],"871":["504355","dba728"],"872":["252328","c6d0d4"],"874":["55483a","a9af9f"],"875":["3a3e50","c6e1df"],"876":["52486e","ece4e8"],"877":["5e504f","ddc069"],"878":["265452","dd784c"],"880":["17553e","e69c59"],"881":["305b79","c8c7a3"],"882":["215b48","c3859e"],"883":["4a5d8b","abceec"],"884":["494056","cbc3d1"],"885":["415a3f","b3b285"],"888":["823e3c","5f8bc1"],"889":["90292b","5d68ad"],"890":["2b195a","e34c55"],"891":["3a3a3b","cdc7c0"],"893":["343435","76a072"],"894":["645260","ebe550"],"895":["3b535c","c34361"],"896":["323b59","d2d7ea"],"897":["2c2e33","7d66ba"],"898":["20564f","bdb6b7"],"905":["7a4658","e0dfe1"],"906":["496136","c2caa7"],"909":["8f4332","f1ddae"],"912":["3c7c98","e2e8e3"],"915":["3b3635","c57c68"],"917":["454d3f","d4ccba"],"919":["2d2d3b","8d93a1"],"921":["413524","dc863d"],"924":["393a41","e9ebee"],"926":["3c3428","e5cf89"],"928":["2a2f1d","a9be4f"],"931":["476630","e7cfb2"],"932":["61423f","dabeb3"],"935":["3b373a","c5461d"],"938":["756454","f6bc3b"],"940":["45454d","e0aa4a"],"942":["432529","cb7659"],"944":["453b3e","a5cbb4"],"946":["3a2c20","ae734b"],"948":["fbe234","e1b09c"],"950":["3c2d25","d4916d"],"951":["364c38","92c08a"],"953":["433930","9b7d59"],"955":["5c4454","dabb4a"],"957":["3a293e","d4678f"],"960":["6c5f60","cfbdc2"],"962":["423337","d6cbcc"],"963":["1f3438","81c3cf"],"965":["3e3441","c0b8c0"],"967":["282f2d","709173"],"968":["4c302e","dd8f88"],"969":["3a376c","888ba9"],"971":["81768e","bec6d1"],"973":["3e2f31","d97c91"],"974":["50353e","d5c7c5"],"976":["979496","c753c8"],"977":["26486b","acc4dd"],"978":["4a2a26","f29775"],"984":["56324f","c3c3c3"],"985":["80363f","eab6d1"],"986":["693831","90ba88"],"987":["333040","8788b1"],"988":["8f3e3a","dbd6b3"],"989":["322c2b","a2b499"],"990":["352d31","b16f69"],"991":["723729","b7cce2"],"992":["494651","e0c366"],"993":["35323c","cd66c6"],"994":["6b5b61","ec9843"],"995":["2f3227","7db45d"],"996":["474849","a6aba5"],"999":["583b3e","ae9653"],"1001":["3d3b34","959865"],"1002":["363d43","c0c6cf"],"1003":["443025","6b7668"],"1004":["4b644a","e87949"],"1005":["833a40","58a4b8"],"1006":["365544","d7a4bf"],"1007":["343449","c76f6a"],"1008":["3c2c5c","b4b1be"],"1009":["6e4f78","a6d0d1"],"1010":["56453b","65aa5f"],"1012":["443d30","b4c594"],"1014":["403639","698f3a"],"1015":["322f31","ad8fb4"],"1016":["412f2d","cb7e83"],"1017":["2e2926","68a558"],"1020":["69413d","e5d262"],"1021":["6a444e","e2c793"],"1022":["463633","c2a57c"],"1023":["2e3b3d","85b2ae"],"1024":["343062","8dc0bf"],"1025":["412e47","e467d4"],"2019":["474b43","d4bb9b"],"2027":["1e2431","a6bfc0"],"2037":["3f4e5a","dce6eb"],"2050":["3b2a2b","ba765d"],"2052":["2f2e33","929daa"],"2074":["2d2e37","969bb6"],"2088":["243832","5c9661"],"2670":["43353c","f4d9d7"],"4052":["2f2d2d","aa9c91"],"4077":["a674cd","b2ddd5"],"4079":["653734","e99a96"],"4083":["343832","d8bb98"],"4122":["41435c","ded4df"],"4144":["1e1d2b","b299da"],"4145":["3d281f","e16019"],"4146":["3a464b","e75170"],"4222":["877c84","e9dfed"],"4263":["37373a","d2cfd0"],"4554":["344e5c","d4ded9"],"4562":["393939","bc7f9f"],"4618":["51473d","aebe88"],"6058":["6e3b2f","cbbfb3"],"6100":["ba5714","e5be8a"],"6211":["423c48","b68f8f"],"6215":["473863","bcaed7"],"6570":["753534","dcd5d8"],"8128":["232323","505152"],"8194":["38262c","9a6f71"],"8901":["4c362c","b39a8f"]} \ No newline at end of file diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 12d7d5d1d..35c7951c3 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2,7 +2,7 @@ import Phaser, { Time } from 'phaser'; import UI, { Mode } from './ui/ui'; import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, MovePhase, TitlePhase, SwitchPhase } from './phases'; import Pokemon, { PlayerPokemon, EnemyPokemon } from './field/pokemon'; -import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species'; +import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies, speciesStarters } from './data/pokemon-species'; import * as Utils from './utils'; import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier } from './modifier/modifier'; import { PokeballType } from './data/pokeball'; @@ -57,6 +57,7 @@ import { initTouchControls } from './touch-controls'; import { UiTheme } from './enums/ui-theme'; import CacheBustedLoaderPlugin from './plugins/cache-busted-loader-plugin'; import { SceneBase } from './scene-base'; +import CandyBar from './ui/candy-bar'; export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; @@ -81,6 +82,11 @@ export const startingWave = STARTING_WAVE_OVERRIDE || 1; const expSpriteKeys: string[] = []; const repeatInputDelayMillis = 250; +export let starterColors: StarterColors; +interface StarterColors { + [key: string]: [string, string] +} + export enum Button { UP, DOWN, @@ -142,6 +148,7 @@ export default class BattleScene extends SceneBase { public pbTrayEnemy: PokeballTray; public abilityBar: AbilityBar; public partyExpBar: PartyExpBar; + public candyBar: CandyBar; public arenaBg: Phaser.GameObjects.Sprite; public arenaBgTransition: Phaser.GameObjects.Sprite; public arenaPlayer: ArenaBase; @@ -359,6 +366,10 @@ export default class BattleScene extends SceneBase { this.partyExpBar.setup(); this.fieldUI.add(this.partyExpBar); + this.candyBar = new CandyBar(this); + this.candyBar.setup(); + this.fieldUI.add(this.candyBar); + this.waveCountText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, startingWave.toString(), TextStyle.BATTLE_INFO); this.waveCountText.setOrigin(1, 0); this.fieldUI.add(this.waveCountText); @@ -440,7 +451,8 @@ export default class BattleScene extends SceneBase { Promise.all([ Promise.all(loadPokemonAssets), initCommonAnims().then(() => loadCommonAnimAssets(this, true)), - Promise.all([ Moves.TACKLE, Moves.TAIL_WHIP, Moves.FOCUS_ENERGY, Moves.STRUGGLE ].map(m => initMoveAnim(m))).then(() => loadMoveAnimAssets(this, defaultMoves, true)) + Promise.all([ Moves.TACKLE, Moves.TAIL_WHIP, Moves.FOCUS_ENERGY, Moves.STRUGGLE ].map(m => initMoveAnim(m))).then(() => loadMoveAnimAssets(this, defaultMoves, true)), + this.initStarterColors() ]).then(() => { this.pushPhase(new LoginPhase(this)); this.pushPhase(new TitlePhase(this)); @@ -472,12 +484,53 @@ export default class BattleScene extends SceneBase { this.updateScoreText(); } - initExpSprites(): void { - if (expSpriteKeys.length) - return; - fetch('./exp_sprites.json').then(res => res.json()).then(keys => { - if (Array.isArray(keys)) - expSpriteKeys.push(...keys); + initExpSprites(): Promise { + return new Promise(resolve => { + if (expSpriteKeys.length) + return resolve(); + fetch('./exp-sprites.json').then(res => res.json()).then(keys => { + if (Array.isArray(keys)) + expSpriteKeys.push(...keys); + resolve(); + }); + }); + } + + initStarterColors(): Promise { + return new Promise(resolve => { + if (starterColors) + return resolve(); + + fetch('./starter-colors.json').then(res => res.json()).then(sc => { + starterColors = {}; + Object.keys(sc).forEach(key => { + starterColors[key] = sc[key]; + }); + + /*const loadPokemonAssets: Promise[] = []; + + for (let s of Object.keys(speciesStarters)) { + const species = getPokemonSpecies(parseInt(s)); + loadPokemonAssets.push(species.loadAssets(this, false, 0, false)); + } + + Promise.all(loadPokemonAssets).then(() => { + const starterCandyColors = {}; + const rgbaToHexFunc = (r, g, b) => [r, g, b].map(x => x.toString(16).padStart(2, '0')).join(''); + + for (let s of Object.keys(speciesStarters)) { + const species = getPokemonSpecies(parseInt(s)); + + starterCandyColors[species.speciesId] = species.generateCandyColors(this).map(c => rgbaToHexFunc(c[0], c[1], c[2])); + } + + console.log(JSON.stringify(starterCandyColors)); + + resolve(); + });*/ + + resolve(); + }); }); } @@ -1075,6 +1128,7 @@ export default class BattleScene extends SceneBase { this.scoreText.setY(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); } diff --git a/src/data/daily-run.ts b/src/data/daily-run.ts index 14401d7bb..a5ea4e585 100644 --- a/src/data/daily-run.ts +++ b/src/data/daily-run.ts @@ -64,6 +64,8 @@ function getDailyRunStarter(scene: BattleScene, starterSpeciesForm: PokemonSpeci const starter: Starter = { species: starterSpecies, dexAttr: pokemon.getDexAttr(), + passive: false, + variant: 0, nature: pokemon.getNature(), pokerus: pokemon.pokerus }; diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 04cc620cf..4d19242b7 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -11,6 +11,7 @@ import { StarterMoveset } from '../system/game-data'; import { speciesEggMoves } from './egg-moves'; import { PartyMemberStrength } from "./enums/party-member-strength"; import { GameMode } from '../game-mode'; +import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-color-utilities"; export enum Region { NORMAL, @@ -381,6 +382,55 @@ export abstract class PokemonSpeciesForm { cry.stop(); return cry; } + + generateCandyColors(scene: BattleScene): integer[][] { + const sourceTexture = scene.textures.get(this.getSpriteKey(false)); + + const sourceFrame = sourceTexture.frames[sourceTexture.firstFrame]; + const sourceImage = sourceTexture.getSourceImage() as HTMLImageElement; + + const canvas = document.createElement('canvas'); + + const spriteColors: integer[][] = []; + + const context = canvas.getContext('2d'); + const frame = sourceFrame; + canvas.width = frame.width; + canvas.height = frame.height; + context.drawImage(sourceImage, frame.cutX, frame.cutY, frame.width, frame.height, 0, 0, frame.width, frame.height); + const imageData = context.getImageData(frame.cutX, frame.cutY, frame.width, frame.height); + const pixelData = imageData.data; + + for (let i = 0; i < pixelData.length; i += 4) { + if (pixelData[i + 3]) { + const pixel = pixelData.slice(i, i + 4); + const [ r, g, b, a ] = pixel; + if (!spriteColors.find(c => c[0] === r && c[1] === g && c[2] === b)) + spriteColors.push([ r, g, b, a ]); + } + } + + const pixelColors = []; + for (let i = 0; i < pixelData.length; i += 4) { + const total = pixelData.slice(i, i + 3).reduce((total: integer, value: integer) => total + value, 0); + if (!total) + continue; + pixelColors.push(argbFromRgba({ r: pixelData[i], g: pixelData[i + 1], b: pixelData[i + 2], a: pixelData[i + 3] })); + } + + let paletteColors: Map; + + const originalRandom = Math.random; + Math.random = () => Phaser.Math.RND.realInRange(0, 1); + + scene.executeWithSeedOffset(() => { + paletteColors = QuantizerCelebi.quantize(pixelColors, 2); + }, 0, 'This result should not vary'); + + Math.random = originalRandom; + + return Array.from(paletteColors.keys()).map(c => Object.values(rgbaFromArgb(c)) as integer[]); + } } export default class PokemonSpecies extends PokemonSpeciesForm { @@ -3058,8 +3108,8 @@ export const starterPassiveAbilities = { [Species.CHARMANDER]: Abilities.INTIMIDATE, [Species.SQUIRTLE]: Abilities.DAUNTLESS_SHIELD, [Species.CATERPIE]: Abilities.MAGICIAN, - [Species.WEEDLE]: Abilities.POISON_TOUCH, - [Species.PIDGEY]: Abilities.TECHNICIAN, + [Species.WEEDLE]: Abilities.TECHNICIAN, + [Species.PIDGEY]: Abilities.GALE_WINGS, [Species.RATTATA]: Abilities.STRONG_JAW, [Species.SPEAROW]: Abilities.MOXIE, [Species.EKANS]: Abilities.ROUGH_SKIN, @@ -3070,14 +3120,14 @@ export const starterPassiveAbilities = { [Species.ZUBAT]: Abilities.WIND_RIDER, [Species.ODDISH]: Abilities.LINGERING_AROMA, [Species.PARAS]: Abilities.POISON_HEAL, - [Species.VENONAT]: Abilities.TECHNICIAN, + [Species.VENONAT]: Abilities.SWARM, [Species.DIGLETT]: Abilities.STURDY, [Species.MEOWTH]: Abilities.NORMALIZE, [Species.PSYDUCK]: Abilities.SIMPLE, - [Species.MANKEY]: Abilities.STAMINA, - [Species.GROWLITHE]: Abilities.BALL_FETCH, + [Species.MANKEY]: Abilities.IRON_FIST, + [Species.GROWLITHE]: Abilities.SPEED_BOOST, [Species.POLIWAG]: Abilities.WATER_BUBBLE, - [Species.ABRA]: Abilities.TECHNICIAN, + [Species.ABRA]: Abilities.OPPORTUNIST, [Species.MACHOP]: Abilities.IRON_FIST, [Species.BELLSPROUT]: Abilities.CORROSION, [Species.TENTACOOL]: Abilities.INNARDS_OUT, @@ -3103,7 +3153,7 @@ export const starterPassiveAbilities = { [Species.TANGELA]: Abilities.TANGLING_HAIR, [Species.KANGASKHAN]: Abilities.IRON_FIST, [Species.HORSEA]: Abilities.DRIZZLE, - [Species.GOLDEEN]: Abilities.VOLT_ABSORB, + [Species.GOLDEEN]: Abilities.MULTISCALE, [Species.STARYU]: Abilities.REGENERATOR, [Species.SCYTHER]: Abilities.SPEED_BOOST, [Species.PINSIR]: Abilities.SAP_SIPPER, @@ -3139,7 +3189,7 @@ export const starterPassiveAbilities = { [Species.HOPPIP]: Abilities.PRANKSTER, [Species.AIPOM]: Abilities.SCRAPPY, [Species.SUNKERN]: Abilities.DROUGHT, - [Species.YANMA]: Abilities.TECHNICIAN, + [Species.YANMA]: Abilities.INFILTRATOR, [Species.WOOPER]: Abilities.SIMPLE, [Species.MURKROW]: Abilities.DEFIANT, [Species.MISDREAVUS]: Abilities.DAZZLING, @@ -3154,7 +3204,7 @@ export const starterPassiveAbilities = { [Species.HERACROSS]: Abilities.QUICK_FEET, [Species.SNEASEL]: Abilities.MOXIE, [Species.TEDDIURSA]: Abilities.GLUTTONY, - [Species.SLUGMA]: Abilities.DESOLATE_LAND, + [Species.SLUGMA]: Abilities.DROUGHT, [Species.SWINUB]: Abilities.SLUSH_RUSH, [Species.CORSOLA]: Abilities.STORM_DRAIN, [Species.REMORAID]: Abilities.SKILL_LINK, @@ -3166,7 +3216,7 @@ export const starterPassiveAbilities = { [Species.SMEARGLE]: Abilities.TRACE, [Species.TYROGUE]: Abilities.STAMINA, [Species.SMOOCHUM]: Abilities.CUTE_CHARM, - [Species.ELEKID]: Abilities.ADAPTABILITY, + [Species.ELEKID]: Abilities.IRON_FIST, [Species.MAGBY]: Abilities.CONTRARY, [Species.MILTANK]: Abilities.GLUTTONY, [Species.RAIKOU]: Abilities.FLARE_BOOST, @@ -3192,7 +3242,7 @@ export const starterPassiveAbilities = { [Species.SLAKOTH]: Abilities.GUTS, [Species.NINCADA]: Abilities.OVERCOAT, [Species.WHISMUR]: Abilities.PUNK_ROCK, - [Species.MAKUHITA]: Abilities.CONTRARY, + [Species.MAKUHITA]: Abilities.STAMINA, [Species.AZURILL]: Abilities.UNNERVE, [Species.NOSEPASS]: Abilities.LEVITATE, [Species.SKITTY]: Abilities.SCRAPPY, @@ -3217,10 +3267,10 @@ export const starterPassiveAbilities = { [Species.SWABLU]: Abilities.WHITE_SMOKE, [Species.ZANGOOSE]: Abilities.SUPER_LUCK, [Species.SEVIPER]: Abilities.MOLD_BREAKER, - [Species.LUNATONE]: Abilities.SHADOW_SHIELD, - [Species.SOLROCK]: Abilities.FULL_METAL_BODY, + [Species.LUNATONE]: Abilities.FAIRY_AURA, + [Species.SOLROCK]: Abilities.DROUGHT, [Species.BARBOACH]: Abilities.BALL_FETCH, - [Species.CORPHISH]: Abilities.WATER_BUBBLE, + [Species.CORPHISH]: Abilities.TOUGH_CLAWS, [Species.BALTOY]: Abilities.OWN_TEMPO, [Species.LILEEP]: Abilities.WATER_ABSORB, [Species.ANORITH]: Abilities.WATER_ABSORB, @@ -3237,7 +3287,7 @@ export const starterPassiveAbilities = { [Species.CLAMPERL]: Abilities.SIMPLE, [Species.RELICANTH]: Abilities.SOLID_ROCK, [Species.LUVDISC]: Abilities.PICKUP, - [Species.BAGON]: Abilities.GALE_WINGS, + [Species.BAGON]: Abilities.BERSERK, [Species.BELDUM]: Abilities.IRON_FIST, [Species.REGIROCK]: Abilities.REGENERATOR, [Species.REGICE]: Abilities.ICE_SCALES, @@ -3251,7 +3301,7 @@ export const starterPassiveAbilities = { [Species.DEOXYS]: Abilities.STICKY_HOLD, [Species.TURTWIG]: Abilities.HARVEST, [Species.CHIMCHAR]: Abilities.DEFIANT, - [Species.PIPLUP]: Abilities.BATTLE_ARMOR, + [Species.PIPLUP]: Abilities.SLUSH_RUSH, [Species.STARLY]: Abilities.ROCK_HEAD, [Species.BIDOOF]: Abilities.NEUROFORCE, [Species.KRICKETOT]: Abilities.SOUNDPROOF, @@ -3304,7 +3354,7 @@ export const starterPassiveAbilities = { [Species.VICTINI]: Abilities.SUPER_LUCK, [Species.SNIVY]: Abilities.MULTISCALE, [Species.TEPIG]: Abilities.SAND_RUSH, - [Species.OSHAWOTT]: Abilities.LIGHTNING_ROD, + [Species.OSHAWOTT]: Abilities.MOLD_BREAKER, [Species.PATRAT]: Abilities.STAKEOUT, [Species.LILLIPUP]: Abilities.BALL_FETCH, [Species.PURRLOIN]: Abilities.DEFIANT, @@ -3325,8 +3375,8 @@ export const starterPassiveAbilities = { [Species.SEWADDLE]: Abilities.SHARPNESS, [Species.VENIPEDE]: Abilities.INTIMIDATE, [Species.COTTONEE]: Abilities.MISTY_SURGE, - [Species.PETILIL]: Abilities.ORICHALCUM_PULSE, - [Species.BASCULIN]: Abilities.ROCK_HEAD, + [Species.PETILIL]: Abilities.DROUGHT, + [Species.BASCULIN]: Abilities.OPPORTUNIST, [Species.SANDILE]: Abilities.STRONG_JAW, [Species.DARUMAKA]: Abilities.IRON_FIST, [Species.MARACTUS]: Abilities.IRON_BARBS, @@ -3346,14 +3396,14 @@ export const starterPassiveAbilities = { [Species.DEERLING]: Abilities.JUSTIFIED, [Species.EMOLGA]: Abilities.WIND_POWER, [Species.KARRABLAST]: Abilities.NO_GUARD, - [Species.FOONGUS]: Abilities.ADAPTABILITY, + [Species.FOONGUS]: Abilities.MIMICRY, [Species.FRILLISH]: Abilities.MUMMY, [Species.ALOMOMOLA]: Abilities.MULTISCALE, [Species.JOLTIK]: Abilities.VOLT_ABSORB, [Species.FERROSEED]: Abilities.SKILL_LINK, [Species.KLINK]: Abilities.STEELWORKER, [Species.TYNAMO]: Abilities.SWIFT_SWIM, - [Species.ELGYEM]: Abilities.COMMANDER, + [Species.ELGYEM]: Abilities.SHADOW_TAG, [Species.LITWICK]: Abilities.SOUL_HEART, [Species.AXEW]: Abilities.SHEER_FORCE, [Species.CUBCHOO]: Abilities.INTIMIDATE, @@ -3362,7 +3412,7 @@ export const starterPassiveAbilities = { [Species.STUNFISK]: Abilities.STORM_DRAIN, [Species.MIENFOO]: Abilities.NO_GUARD, [Species.DRUDDIGON]: Abilities.INTIMIDATE, - [Species.GOLETT]: Abilities.JUSTIFIED, + [Species.GOLETT]: Abilities.SHADOW_SHIELD, [Species.PAWNIARD]: Abilities.SHARPNESS, [Species.BOUFFALANT]: Abilities.THICK_FAT, [Species.RUFFLET]: Abilities.RECKLESS, @@ -3380,7 +3430,7 @@ export const starterPassiveAbilities = { [Species.ZEKROM]: Abilities.HADRON_ENGINE, [Species.LANDORUS]: Abilities.PRANKSTER, [Species.KYUREM]: Abilities.SNOW_WARNING, - [Species.KELDEO]: Abilities.HUGE_POWER, + [Species.KELDEO]: Abilities.SHARPNESS, [Species.MELOETTA]: Abilities.PUNK_ROCK, [Species.GENESECT]: Abilities.MEGA_LAUNCHER, [Species.CHESPIN]: Abilities.IRON_BARBS, @@ -3425,7 +3475,7 @@ export const starterPassiveAbilities = { [Species.POPPLIO]: Abilities.PUNK_ROCK, [Species.PIKIPEK]: Abilities.ANGER_POINT, [Species.YUNGOOS]: Abilities.HUGE_POWER, - [Species.GRUBBIN]: Abilities.GALVANIZE, + [Species.GRUBBIN]: Abilities.SPEED_BOOST, [Species.CRABRAWLER]: Abilities.REFRIGERATE, [Species.ORICORIO]: Abilities.ADAPTABILITY, [Species.CUTIEFLY]: Abilities.FRIEND_GUARD, @@ -3442,7 +3492,7 @@ export const starterPassiveAbilities = { [Species.COMFEY]: Abilities.FRIEND_GUARD, [Species.ORANGURU]: Abilities.HOSPITALITY, [Species.PASSIMIAN]: Abilities.COSTAR, - [Species.WIMPOD]: Abilities.BATTLE_ARMOR, + [Species.WIMPOD]: Abilities.TINTED_LENS, [Species.SANDYGAST]: Abilities.DAUNTLESS_SHIELD, [Species.PYUKUMUKU]: Abilities.IRON_BARBS, [Species.TYPE_NULL]: Abilities.ADAPTABILITY, @@ -3465,7 +3515,7 @@ export const starterPassiveAbilities = { [Species.PHEROMOSA]: Abilities.MOXIE, [Species.XURKITREE]: Abilities.LIGHTNING_ROD, [Species.CELESTEELA]: Abilities.CHLOROPHYLL, - [Species.KARTANA]: Abilities.INTREPID_SWORD, + [Species.KARTANA]: Abilities.SHARPNESS, [Species.GUZZLORD]: Abilities.GLUTTONY, [Species.NECROZMA]: Abilities.BEAST_BOOST, [Species.MAGEARNA]: Abilities.STEELY_SPIRIT, @@ -3479,7 +3529,7 @@ export const starterPassiveAbilities = { [Species.SCORBUNNY]: Abilities.RECKLESS, [Species.SOBBLE]: Abilities.MIMICRY, [Species.SKWOVET]: Abilities.HONEY_GATHER, - [Species.ROOKIDEE]: Abilities.JUSTIFIED, + [Species.ROOKIDEE]: Abilities.IRON_BARBS, [Species.BLIPBUG]: Abilities.TINTED_LENS, [Species.NICKIT]: Abilities.INTIMIDATE, [Species.GOSSIFLEUR]: Abilities.STORM_DRAIN, @@ -3512,7 +3562,7 @@ export const starterPassiveAbilities = { [Species.ARCTOVISH]: Abilities.STRONG_JAW, [Species.DURALUDON]: Abilities.MEGA_LAUNCHER, [Species.DREEPY]: Abilities.PARENTAL_BOND, - [Species.ZACIAN]: Abilities.SHARPNESS, + [Species.ZACIAN]: Abilities.GUARD_DOG, [Species.ZAMAZENTA]: Abilities.GUARD_DOG, [Species.ETERNATUS]: Abilities.SUPREME_OVERLORD, [Species.KUBFU]: Abilities.IRON_FIST, @@ -3535,7 +3585,7 @@ export const starterPassiveAbilities = { [Species.SMOLIV]: Abilities.RIPEN, [Species.SQUAWKABILLY]: Abilities.GALE_WINGS, [Species.NACLI]: Abilities.EARTH_EATER, - [Species.CHARCADET]: Abilities.CONTRARY, + [Species.CHARCADET]: Abilities.MIRROR_ARMOR, [Species.TADBULB]: Abilities.TRANSISTOR, [Species.WATTREL]: Abilities.GALE_WINGS, [Species.MASCHIFF]: Abilities.STRONG_JAW, @@ -3562,15 +3612,15 @@ export const starterPassiveAbilities = { [Species.TATSUGIRI]: Abilities.WATER_BUBBLE, [Species.GREAT_TUSK]: Abilities.INTIMIDATE, [Species.SCREAM_TAIL]: Abilities.PIXILATE, - [Species.BRUTE_BONNET]: Abilities.ADAPTABILITY, + [Species.BRUTE_BONNET]: Abilities.BEAST_BOOST, [Species.FLUTTER_MANE]: Abilities.DAZZLING, - [Species.SLITHER_WING]: Abilities.SCRAPPY, + [Species.SLITHER_WING]: Abilities.MOXIE, [Species.SANDY_SHOCKS]: Abilities.EARTH_EATER, - [Species.IRON_TREADS]: Abilities.STEAM_ENGINE, + [Species.IRON_TREADS]: Abilities.BULLETPROOF, [Species.IRON_BUNDLE]: Abilities.SNOW_WARNING, [Species.IRON_HANDS]: Abilities.IRON_FIST, [Species.IRON_JUGULIS]: Abilities.NO_GUARD, - [Species.IRON_MOTH]: Abilities.TINTED_LENS, + [Species.IRON_MOTH]: Abilities.LEVITATE, [Species.IRON_THORNS]: Abilities.SAND_STREAM, [Species.FRIGIBAX]: Abilities.THICK_FAT, [Species.GIMMIGHOUL]: Abilities.SUPER_LUCK, @@ -3585,7 +3635,7 @@ export const starterPassiveAbilities = { [Species.WALKING_WAKE]: Abilities.BEAST_BOOST, [Species.IRON_LEAVES]: Abilities.SHARPNESS, [Species.POLTCHAGEIST]: Abilities.FLAME_BODY, - [Species.OKIDOGI]: Abilities.STICKY_HOLD, + [Species.OKIDOGI]: Abilities.INTIMIDATE, [Species.MUNKIDORI]: Abilities.PRANKSTER, [Species.FEZANDIPITI]: Abilities.DAZZLING, [Species.OGERPON]: Abilities.DISGUISE, diff --git a/src/debug.js b/src/debug.js index 3abb27f41..68f95c411 100644 --- a/src/debug.js +++ b/src/debug.js @@ -2,7 +2,7 @@ export function getData() { const dataStr = localStorage.getItem('data'); if (!dataStr) return null; - return JSON.parse(atob(dataStr), (k, v) => k.endsWith('Attr') ? BigInt(v) : v); + return JSON.parse(atob(dataStr), (k, v) => k.endsWith('Attr') && ![ 'natureAttr', 'passiveAttr', 'variantAttr' ].includes(k) ? BigInt(v) : v); } export function getSession() { diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index b4ce4f0a0..ac30befa0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -55,7 +55,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { public species: PokemonSpecies; public formIndex: integer; public abilityIndex: integer; + public passive: boolean; public shiny: boolean; + public variant: integer; public pokeball: PokeballType; protected battleInfo: BattleInfo; public level: integer; @@ -127,6 +129,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.hp = dataSource.hp; this.stats = dataSource.stats; this.ivs = dataSource.ivs; + this.passive = !!dataSource.passive; + this.variant = dataSource.variant || 0; this.nature = dataSource.nature || 0 as Nature; this.natureOverride = dataSource.natureOverride !== undefined ? dataSource.natureOverride : -1; this.moveset = dataSource.moveset; @@ -727,7 +731,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } canApplyPassive(): boolean { - return this.isBoss(); + return this.passive || this.isBoss(); } canApplyAbility(passive: boolean = false): boolean { @@ -1237,8 +1241,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (this.scene.arena.terrain?.terrainType === TerrainType.MISTY && this.isGrounded() && type === Type.DRAGON) damage.value = Math.floor(damage.value / 2); - applyMoveAttrs(ModifiedDamageAttr, source, this, move, damage); - const fixedDamage = new Utils.IntegerHolder(0); applyMoveAttrs(FixedDamageAttr, source, this, move, fixedDamage); if (!isTypeImmune && fixedDamage.value) { @@ -1246,8 +1248,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { isCritical = false; result = HitResult.EFFECTIVE; } - - console.log('damage', damage.value, move.name, power.value, sourceAtk, targetDef); if (!result) { if (!typeMultiplier.value) @@ -1275,6 +1275,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.scene.applyModifiers(EnemyDamageReducerModifier, false, damage); } + applyMoveAttrs(ModifiedDamageAttr, source, this, move, damage); + + console.log('damage', damage.value, move.name, power.value, sourceAtk, targetDef); + if (damage.value) { if (this.getHpRatio() === 1) applyPreDefendAbAttrs(PreDefendFullHpEndureAbAttr, this, source, battlerMove, cancelled, damage); @@ -2156,7 +2160,7 @@ export class PlayerPokemon extends Pokemon { } tryPopulateMoveset(moveset: StarterMoveset): boolean { - if (!this.getSpeciesForm().validateStarterMoveset(moveset, this.scene.gameData.starterEggMoveData[this.species.getRootSpeciesId()])) + if (!this.getSpeciesForm().validateStarterMoveset(moveset, this.scene.gameData.starterData[this.species.getRootSpeciesId()].eggMoves)) return false; this.moveset = moveset.map(m => new PokemonMove(m)); diff --git a/src/phases.ts b/src/phases.ts index 5b8b9cdc0..092fa7e5d 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -44,7 +44,7 @@ import { EggHatchPhase } from "./egg-hatch-phase"; import { Egg } from "./data/egg"; import { vouchers } from "./system/voucher"; import { loggedInUser, updateUserInfo } from "./account"; -import { GameDataType, PlayerGender, SessionSaveData } from "./system/game-data"; +import { DexAttr, GameDataType, PlayerGender, SessionSaveData } from "./system/game-data"; import { addPokeballCaptureStars, addPokeballOpenParticles } from "./field/anims"; import { SpeciesFormChangeActiveTrigger, SpeciesFormChangeManualTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangePostMoveTrigger, SpeciesFormChangePreMoveTrigger } from "./data/pokemon-forms"; import { battleSpecDialogue, getCharVariantFromDialogue } from "./data/dialogue"; @@ -175,7 +175,10 @@ export class TitlePhase extends Phase { if (loggedInUser.lastSessionSlot > -1) { options.push({ label: i18next.t('menu:continue'), - handler: () => this.loadSaveSlot(this.lastSessionData ? -1 : loggedInUser.lastSessionSlot) + handler: () => { + this.loadSaveSlot(this.lastSessionData ? -1 : loggedInUser.lastSessionSlot); + return true; + } }); } options.push({ @@ -188,20 +191,29 @@ export class TitlePhase extends Phase { this.end(); }; if (this.scene.gameData.unlocks[Unlockables.ENDLESS_MODE]) { - const options = [ + const options: OptionSelectItem[] = [ { label: gameModes[GameModes.CLASSIC].getName(), - handler: () => setModeAndEnd(GameModes.CLASSIC) + handler: () => { + setModeAndEnd(GameModes.CLASSIC); + return true; + } }, { label: gameModes[GameModes.ENDLESS].getName(), - handler: () => setModeAndEnd(GameModes.ENDLESS) + handler: () => { + setModeAndEnd(GameModes.ENDLESS); + return true; + } } ]; if (this.scene.gameData.unlocks[Unlockables.SPLICED_ENDLESS_MODE]) { options.push({ label: gameModes[GameModes.SPLICED_ENDLESS].getName(), - handler: () => setModeAndEnd(GameModes.SPLICED_ENDLESS) + handler: () => { + setModeAndEnd(GameModes.SPLICED_ENDLESS); + return true; + } }); } options.push({ @@ -210,6 +222,7 @@ export class TitlePhase extends Phase { this.scene.clearPhaseQueue(); this.scene.pushPhase(new TitlePhase(this.scene)); super.end(); + return true; } }); this.scene.ui.showText(i18next.t("menu:selectGameMode"), null, () => this.scene.ui.setOverlayMode(Mode.OPTION_SELECT, { options: options })); @@ -219,21 +232,27 @@ export class TitlePhase extends Phase { this.scene.ui.clearText(); this.end(); } + return true; } }, { label: i18next.t('menu:loadGame'), - handler: () => this.scene.ui.setOverlayMode(Mode.SAVE_SLOT, SaveSlotUiMode.LOAD, - (slotId: integer) => { - if (slotId === -1) - return this.showOptions(); - this.loadSaveSlot(slotId); - } - ) + handler: () => { + this.scene.ui.setOverlayMode(Mode.SAVE_SLOT, SaveSlotUiMode.LOAD, + (slotId: integer) => { + if (slotId === -1) + return this.showOptions(); + this.loadSaveSlot(slotId); + }); + return true; + } }, { label: i18next.t('menu:dailyRun'), - handler: () => this.initDailyRun(), + handler: () => { + this.initDailyRun(); + return true; + }, keepOpen: true }); const config: OptionSelectConfig = { @@ -377,6 +396,7 @@ export class SelectGenderPhase extends Phase { this.scene.gameData.gender = PlayerGender.MALE; this.scene.gameData.saveSetting(Setting.Player_Gender, 0); this.scene.gameData.saveSystem().then(() => this.end()); + return true; } }, { @@ -385,6 +405,7 @@ export class SelectGenderPhase extends Phase { this.scene.gameData.gender = PlayerGender.FEMALE; this.scene.gameData.saveSetting(Setting.Player_Gender, 1); this.scene.gameData.saveSystem().then(() => this.end()); + return true; } } ] @@ -437,6 +458,10 @@ export class SelectStarterPhase extends Phase { const starterIvs = this.scene.gameData.dexData[starter.species.speciesId].ivs.slice(0); const starterPokemon = this.scene.addPlayerPokemon(starter.species, this.scene.gameMode.getStartingLevel(), starterProps.abilityIndex, starterFormIndex, starterGender, starterProps.shiny, starterIvs, starter.nature); starterPokemon.tryPopulateMoveset(starter.moveset); + if (starter.passive) + starterPokemon.passive = true; + if (starter.variant && starter.dexAttr & DexAttr.SHINY) + starterPokemon.variant = starter.variant; if (starter.pokerus) starterPokemon.pokerus = true; if (this.scene.gameMode.isSplicedOnly) diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 1bf385274..78ed699e9 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -43,6 +43,11 @@ export enum PlayerGender { FEMALE } +export enum Passive { + UNLOCKED = 1, + ENABLED = 2 +} + export function getDataTypeKey(dataType: GameDataType, slotId: integer = 0): string { switch (dataType) { case GameDataType.SYSTEM: @@ -64,8 +69,7 @@ interface SystemSaveData { secretId: integer; gender: PlayerGender; dexData: DexData; - starterMoveData: StarterMoveData; - starterEggMoveData: StarterEggMoveData; + starterData: StarterData; gameStats: GameStats; unlocks: Unlocks; achvUnlocks: AchvUnlocks; @@ -145,16 +149,25 @@ export interface DexAttrProps { export type StarterMoveset = [ Moves ] | [ Moves, Moves ] | [ Moves, Moves, Moves ] | [ Moves, Moves, Moves, Moves ]; -export interface StarterMoveData { - [key: integer]: StarterMoveset | StarterFormMoveData -} - export interface StarterFormMoveData { [key: integer]: StarterMoveset } -export interface StarterEggMoveData { - [key: integer]: integer +export interface StarterMoveData { + [key: integer]: StarterMoveset | StarterFormMoveData +} + +export interface StarterDataEntry { + moveset: StarterMoveset | StarterFormMoveData; + eggMoves: integer; + candyCount: integer; + passiveAttr: integer; + variantAttr: integer; + valueReduction: integer; +} + +export interface StarterData { + [key: integer]: StarterDataEntry } export interface TutorialFlags { @@ -167,7 +180,12 @@ const systemShortKeys = { natureAttr: '$na', seenCount: '$s' , caughtCount: '$c', - ivs: '$i' + ivs: '$i', + moveset: '$m', + eggMoves: '$em', + candyCount: '$cc', + passive: '$p', + valueReduction: '$vr' }; export class GameData { @@ -181,9 +199,7 @@ export class GameData { public dexData: DexData; private defaultDexData: DexData; - public starterMoveData: StarterMoveData; - - public starterEggMoveData: StarterEggMoveData; + public starterData: StarterData; public gameStats: GameStats; @@ -200,8 +216,7 @@ export class GameData { this.loadSettings(); this.trainerId = Utils.randSeedInt(65536); this.secretId = Utils.randSeedInt(65536); - this.starterMoveData = {}; - this.starterEggMoveData = {}; + this.starterData = {}; this.gameStats = new GameStats(); this.unlocks = { [Unlockables.ENDLESS_MODE]: false, @@ -218,7 +233,7 @@ export class GameData { }; this.eggs = []; this.initDexData(); - this.initEggMoveData(); + this.initStarterData(); } public saveSystem(): Promise { @@ -234,8 +249,7 @@ export class GameData { secretId: this.secretId, gender: this.gender, dexData: this.dexData, - starterMoveData: this.starterMoveData, - starterEggMoveData: this.starterEggMoveData, + starterData: this.starterData, gameStats: this.gameStats, unlocks: this.unlocks, achvUnlocks: this.achvUnlocks, @@ -297,17 +311,24 @@ export class GameData { this.saveSetting(Setting.Player_Gender, systemData.gender === PlayerGender.FEMALE ? 1 : 0); - this.starterMoveData = systemData.starterMoveData || {}; - - this.starterEggMoveData = {}; - this.initEggMoveData(); + const initStarterData = !systemData.starterData; - if (systemData.starterEggMoveData) { - for (let key of Object.keys(systemData.starterEggMoveData)) { - if (this.starterEggMoveData.hasOwnProperty(key)) - this.starterEggMoveData[key] = systemData.starterEggMoveData[key]; + if (initStarterData) { + this.initStarterData(); + + if (systemData['starterMoveData']) { + const starterMoveData = systemData['starterMoveData']; + for (let s of Object.keys(starterMoveData)) + this.starterData[s].moveset = starterMoveData[s]; } - } + + if (systemData['starterEggMoveData']) { + const starterEggMoveData = systemData['starterEggMoveData']; + for (let s of Object.keys(starterEggMoveData)) + this.starterData[s].eggMoves = starterEggMoveData[s]; + } + } else + this.starterData = systemData.starterData; if (systemData.gameStats) this.gameStats = systemData.gameStats; @@ -348,6 +369,16 @@ export class GameData { this.consolidateDexData(this.dexData); this.defaultDexData = null; + if (initStarterData) { + const starterIds = Object.keys(this.starterData).map(s => parseInt(s) as Species); + for (let s of starterIds) { + this.starterData[s].candyCount += this.dexData[s].caughtCount; + this.starterData[s].candyCount += this.dexData[s].hatchedCount * 2; + if (this.dexData[s].caughtAttr & DexAttr.SHINY) + this.starterData[s].candyCount += 4; + } + } + resolve(true); } catch (err) { console.error(err); @@ -388,7 +419,7 @@ export class GameData { return ret; } - return k.endsWith('Attr') && k !== 'natureAttr' ? BigInt(v) : v; + return k.endsWith('Attr') && ![ 'natureAttr', 'passiveAttr', 'variantAttr' ].includes(k) ? BigInt(v) : v; }) as SystemSaveData; } @@ -906,15 +937,23 @@ export class GameData { this.dexData = data; } - private initEggMoveData(): void { - const data: StarterEggMoveData = {}; - - const starterSpeciesIds = Object.keys(speciesEggMoves).map(k => parseInt(k) as Species); + private initStarterData(): void { + const starterData: StarterData = {}; - for (let speciesId of starterSpeciesIds) - data[speciesId] = 0; + const starterSpeciesIds = Object.keys(speciesStarters).map(k => parseInt(k) as Species); - this.starterEggMoveData = data; + for (let speciesId of starterSpeciesIds) { + starterData[speciesId] = { + moveset: null, + eggMoves: 0, + candyCount: 0, + passiveAttr: 0, + variantAttr: 0, + valueReduction: 0 + }; + } + + this.starterData = starterData; } setPokemonSeen(pokemon: Pokemon, incrementCount: boolean = true): void { @@ -943,6 +982,10 @@ export class GameData { pokemon.formIndex = formIndex; dexEntry.caughtAttr |= dexAttr; dexEntry.natureAttr |= Math.pow(2, pokemon.nature + 1); + + const hasPrevolution = pokemonPrevolutions.hasOwnProperty(species.speciesId); + const newCatch = !caughtAttr; + if (incrementCount) { if (!fromEgg) { dexEntry.caughtCount++; @@ -963,11 +1006,11 @@ export class GameData { if (pokemon.isShiny()) this.gameStats.shinyPokemonHatched++; } + + if (!hasPrevolution) + this.addStarterCandy(species, (1 * (pokemon.isShiny() ? 5 : 1)) * (fromEgg || pokemon.isBoss() ? 2 : 1)); } - - const hasPrevolution = pokemonPrevolutions.hasOwnProperty(species.speciesId); - const newCatch = !caughtAttr; - + const checkPrevolution = () => { if (hasPrevolution) { const prevolutionSpecies = pokemonPrevolutions[species.speciesId]; @@ -984,6 +1027,11 @@ export class GameData { }); } + addStarterCandy(species: PokemonSpecies, count: integer): void { + this.scene.candyBar.showStarterSpeciesCandy(species.speciesId, count); + this.starterData[species.speciesId].candyCount += count; + } + setEggMoveUnlocked(species: PokemonSpecies, eggMoveIndex: integer): Promise { return new Promise(resolve => { const speciesId = species.speciesId; @@ -992,17 +1040,17 @@ export class GameData { return; } - if (!this.starterEggMoveData.hasOwnProperty(speciesId)) - this.starterEggMoveData[speciesId] = 0; + if (!this.starterData[speciesId].eggMoves) + this.starterData[speciesId].eggMoves = 0; const value = Math.pow(2, eggMoveIndex); - if (this.starterEggMoveData[speciesId] & value) { + if (this.starterData[speciesId].eggMoves & value) { resolve(false); return; } - this.starterEggMoveData[speciesId] |= value; + this.starterData[speciesId].eggMoves |= value; this.scene.playSound('level_up_fanfare'); this.scene.ui.showText(`${eggMoveIndex === 3 ? 'Rare ' : ''}Egg Move unlocked: ${allMoves[speciesEggMoves[speciesId][eggMoveIndex]].name}`, null, () => resolve(true), null, true); @@ -1094,7 +1142,6 @@ export class GameData { getSpeciesStarterValue(speciesId: Species): number { const baseValue = speciesStarters[speciesId]; let value = baseValue; - const caughtHatchedCount = this.dexData[speciesId].caughtCount + this.dexData[speciesId].hatchedCount; const decrementValue = (value: number) => { if (value > 1) @@ -1104,44 +1151,8 @@ export class GameData { return value; } - let thresholdA: integer; - let thresholdB: integer; - - switch (baseValue) { - case 1: - [ thresholdA, thresholdB ] = [ 25, 100 ]; - break; - case 2: - [ thresholdA, thresholdB ] = [ 20, 70 ]; - break; - case 3: - [ thresholdA, thresholdB ] = [ 15, 50 ]; - break; - case 4: - [ thresholdA, thresholdB ] = [ 10, 30 ]; - break; - case 5: - [ thresholdA, thresholdB ] = [ 8, 25 ]; - break; - case 6: - [ thresholdA, thresholdB ] = [ 5, 15 ]; - break; - case 7: - [ thresholdA, thresholdB ] = [ 4, 12 ]; - break; - case 8: - [ thresholdA, thresholdB ] = [ 3, 10 ]; - break; - default: - [ thresholdA, thresholdB ] = [ 2, 5 ]; - break; - } - - if (caughtHatchedCount >= thresholdA) { + for (let v = 0; v < this.starterData[speciesId].valueReduction; v++) value = decrementValue(value); - if (caughtHatchedCount >= thresholdB) - value = decrementValue(value); - } return value; } diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 0ad01dd0f..d9cb8b5d4 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -17,7 +17,9 @@ export default class PokemonData { public species: Species; public formIndex: integer; public abilityIndex: integer; + public passive: boolean; public shiny: boolean; + public variant: integer; public pokeball: PokeballType; public level: integer; public exp: integer; @@ -53,7 +55,9 @@ export default class PokemonData { this.species = sourcePokemon ? sourcePokemon.species.speciesId : source.species; this.formIndex = Math.max(Math.min(source.formIndex, getPokemonSpecies(this.species).forms.length - 1), 0); this.abilityIndex = source.abilityIndex; + this.passive = source.passive; this.shiny = source.shiny; + this.variant = source.variant; this.pokeball = source.pokeball; this.level = source.level; this.exp = source.exp; diff --git a/src/ui/abstact-option-select-ui-handler.ts b/src/ui/abstact-option-select-ui-handler.ts index a8d55bc9d..2f2c4face 100644 --- a/src/ui/abstact-option-select-ui-handler.ts +++ b/src/ui/abstact-option-select-ui-handler.ts @@ -4,6 +4,7 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import { addWindow } from "./ui-theme"; import * as Utils from "../utils"; +import { argbFromRgba } from "@material/material-color-utilities"; export interface OptionSelectConfig { xOffset?: number; @@ -16,9 +17,11 @@ export interface OptionSelectConfig { export interface OptionSelectItem { label: string; - handler: Function; + handler: () => boolean; keepOpen?: boolean; overrideSound?: boolean; + item?: string; + itemArgs?: any[] } const scrollUpLabel = '↑'; @@ -28,6 +31,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { protected optionSelectContainer: Phaser.GameObjects.Container; protected optionSelectBg: Phaser.GameObjects.NineSlice; protected optionSelectText: Phaser.GameObjects.Text; + protected optionSelectIcons: Phaser.GameObjects.Sprite[]; protected config: OptionSelectConfig; @@ -58,6 +62,8 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { this.optionSelectBg.setOrigin(1, 1); this.optionSelectContainer.add(this.optionSelectBg); + this.optionSelectIcons = []; + this.setCursor(0); } @@ -66,8 +72,12 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { if (this.optionSelectText) this.optionSelectText.destroy(); + if (this.optionSelectIcons?.length) { + this.optionSelectIcons.map(i => i.destroy()); + this.optionSelectIcons.splice(0, this.optionSelectIcons.length); + } - this.optionSelectText = addTextObject(this.scene, 0, 0, options.map(o => o.label).join('\n'), TextStyle.WINDOW, { maxLines: options.length }); + this.optionSelectText = addTextObject(this.scene, 0, 0, options.map(o => o.item ? ` ${o.label}` : o.label).join('\n'), TextStyle.WINDOW, { maxLines: options.length }); this.optionSelectText.setLineSpacing(12); this.optionSelectContainer.add(this.optionSelectText); this.optionSelectContainer.setPosition((this.scene.game.canvas.width / 6) - 1 - (this.config?.xOffset || 0), -48 + (this.config?.yOffset || 0)); @@ -80,6 +90,31 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { this.optionSelectBg.height = this.getWindowHeight(); this.optionSelectText.setPositionRelative(this.optionSelectBg, 16, 9); + + options.forEach((option: OptionSelectItem, i: integer) => { + if (option.item) { + const itemIcon = this.scene.add.sprite(0, 0, 'items', option.item); + itemIcon.setScale(0.5); + this.optionSelectIcons.push(itemIcon); + + this.optionSelectContainer.add(itemIcon); + + itemIcon.setPositionRelative(this.optionSelectText, 6, 7 + 16 * i); + + if (option.item === 'candy') { + const itemOverlayIcon = this.scene.add.sprite(0, 0, 'items', 'candy_overlay'); + itemOverlayIcon.setScale(0.5); + this.optionSelectIcons.push(itemOverlayIcon); + + this.optionSelectContainer.add(itemOverlayIcon); + + itemOverlayIcon.setPositionRelative(this.optionSelectText, 6, 7 + 16 * i); + + itemIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(option.itemArgs[0]))); + itemOverlayIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(option.itemArgs[1]))); + } + } + }); } show(args: any[]): boolean { @@ -132,10 +167,12 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { return false; } const option = this.config.options[this.cursor + (this.scrollCursor - (this.scrollCursor ? 1 : 0))]; - option.handler(); - if (!option.keepOpen) - this.clear(); - playSound = !option.overrideSound; + if (option.handler()) { + if (!option.keepOpen) + this.clear(); + playSound = !option.overrideSound; + } else + ui.playError(); } else { switch (button) { case Button.UP: @@ -182,12 +219,12 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { if (optionStartIndex) options.unshift({ label: scrollUpLabel, - handler: () => { } + handler: () => true }); if (optionEndIndex < optionsScrollTotal) options.push({ label: scrollDownLabel, - handler: () => { } + handler: () => true }); } diff --git a/src/ui/candy-bar.ts b/src/ui/candy-bar.ts new file mode 100644 index 000000000..2219e0747 --- /dev/null +++ b/src/ui/candy-bar.ts @@ -0,0 +1,123 @@ +import BattleScene, { starterColors } from "../battle-scene"; +import { TextStyle, addTextObject } from "./text"; +import { argbFromRgba } from "@material/material-color-utilities"; +import * as Utils from "../utils"; +import { Species } from "#app/data/enums/species"; + +export default class CandyBar extends Phaser.GameObjects.Container { + private bg: Phaser.GameObjects.NineSlice; + private candyIcon: Phaser.GameObjects.Sprite; + private candyOverlayIcon: Phaser.GameObjects.Sprite; + private countText: Phaser.GameObjects.Text; + private speciesId: Species; + + private tween: Phaser.Tweens.Tween; + private autoHideTimer: number; + + public shown: boolean; + + constructor(scene: BattleScene) { + super(scene, (scene.game.canvas.width / 6), -((scene.game.canvas.height) / 6) + 15); + } + + setup(): void { + this.bg = this.scene.add.nineslice(0, 0, 'party_exp_bar', null, 8, 18, 21, 5, 6, 4); + this.bg.setOrigin(0, 0); + + this.add(this.bg); + + this.candyIcon = this.scene.add.sprite(14, 0, 'items', 'candy'); + this.candyIcon.setOrigin(0.5, 0); + this.candyIcon.setScale(0.5); + + this.add(this.candyIcon); + + this.candyOverlayIcon = this.scene.add.sprite(14, 0, 'items', 'candy_overlay'); + this.candyOverlayIcon.setOrigin(0.5, 0); + this.candyOverlayIcon.setScale(0.5); + + this.add(this.candyOverlayIcon); + + this.countText = addTextObject(this.scene, 22, 4, '', TextStyle.BATTLE_INFO); + this.countText.setOrigin(0, 0); + this.add(this.countText); + + this.setVisible(false); + this.shown = false; + } + + showStarterSpeciesCandy(starterSpeciesId: Species, count: integer): Promise { + return new Promise(resolve => { + if (this.shown) { + if (this.speciesId === starterSpeciesId) + return resolve(); + else + return this.hide().then(() => this.showStarterSpeciesCandy(starterSpeciesId, count)).then(() => resolve()); + } + + const colorScheme = starterColors[starterSpeciesId]; + + this.candyIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[0]))); + this.candyOverlayIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[1]))); + + this.countText.setText(`${(this.scene as BattleScene).gameData.starterData[starterSpeciesId].candyCount + count} (+${count.toString()})`); + + this.bg.width = this.countText.displayWidth + 28; + + (this.scene as BattleScene).fieldUI.bringToTop(this); + + if (this.tween) + this.tween.stop(); + + this.tween = this.scene.tweens.add({ + targets: this, + x: (this.scene.game.canvas.width / 6) - (this.bg.width - 5), + duration: 500, + ease: 'Sine.easeOut', + onComplete: () => { + this.tween = null; + this.resetAutoHideTimer(); + resolve(); + } + }); + + this.setVisible(true); + this.shown = true; + }); + } + + hide(): Promise { + return new Promise(resolve => { + if (!this.shown) + return resolve(); + + if (this.autoHideTimer) + clearInterval(this.autoHideTimer); + + if (this.tween) + this.tween.stop(); + + this.tween = this.scene.tweens.add({ + targets: this, + x: (this.scene.game.canvas.width / 6), + duration: 500, + ease: 'Sine.easeIn', + onComplete: () => { + this.tween = null; + this.shown = false; + this.setVisible(false); + resolve(); + } + }); + }); + } + + resetAutoHideTimer(): void { + if (this.autoHideTimer) + clearInterval(this.autoHideTimer); + this.autoHideTimer = setTimeout(() => { + this.hide(); + this.autoHideTimer = null; + }, 2500); + } +} \ No newline at end of file diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts index e4dfb6224..d9e7726d8 100644 --- a/src/ui/confirm-ui-handler.ts +++ b/src/ui/confirm-ui-handler.ts @@ -20,11 +20,17 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { options: [ { label: 'Yes', - handler: args[0] + handler: () => { + args[0](); + return true; + } }, { label: 'No', - handler: args[1] + handler: () => { + args[1](); + return true; + } } ], delay: args.length >= 6 && args[5] !== null ? args[5] as integer : 0 diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 7c50d9241..88a80f7d2 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -5,7 +5,7 @@ import * as Utils from "../utils"; import { addWindow } from "./ui-theme"; import MessageUiHandler from "./message-ui-handler"; import { GameDataType } from "../system/game-data"; -import { OptionSelectConfig } from "./abstact-option-select-ui-handler"; +import { OptionSelectConfig, OptionSelectItem } from "./abstact-option-select-ui-handler"; import { Tutorial, handleTutorial } from "../tutorial"; import { updateUserInfo } from "../account"; @@ -99,6 +99,7 @@ export default class MenuUiHandler extends MessageUiHandler { callback(i); ui.revertMode(); ui.showText(null, 0); + return true; } }; }).concat([{ @@ -106,6 +107,7 @@ export default class MenuUiHandler extends MessageUiHandler { handler: () => { ui.revertMode(); ui.showText(null, 0); + return true; } }]), xOffset: 98 @@ -117,7 +119,10 @@ export default class MenuUiHandler extends MessageUiHandler { if (Utils.isLocal) { manageDataOptions.push({ label: 'Import Session', - handler: () => confirmSlot('Select a slot to import to.', () => true, slotId => this.scene.gameData.importData(GameDataType.SESSION, slotId)), + handler: () => { + confirmSlot('Select a slot to import to.', () => true, slotId => this.scene.gameData.importData(GameDataType.SESSION, slotId)); + return true; + }, keepOpen: true }); } @@ -137,25 +142,35 @@ export default class MenuUiHandler extends MessageUiHandler { i => dataSlots.indexOf(i) > -1, slotId => this.scene.gameData.tryExportData(GameDataType.SESSION, slotId)); }); + return true; }, keepOpen: true }); if (Utils.isLocal) { manageDataOptions.push({ label: 'Import Data', - handler: () => this.scene.gameData.importData(GameDataType.SYSTEM), + handler: () => { + this.scene.gameData.importData(GameDataType.SYSTEM); + return true; + }, keepOpen: true }); } manageDataOptions.push( { label: 'Export Data', - handler: () => this.scene.gameData.tryExportData(GameDataType.SYSTEM), + handler: () => { + this.scene.gameData.tryExportData(GameDataType.SYSTEM); + return true; + }, keepOpen: true }, { label: 'Cancel', - handler: () => this.scene.ui.revertMode() + handler: () => { + this.scene.ui.revertMode(); + return true; + } } ); @@ -164,25 +179,37 @@ export default class MenuUiHandler extends MessageUiHandler { options: manageDataOptions }; - const communityOptions = [ + const communityOptions: OptionSelectItem[] = [ { label: 'Wiki', - handler: () => window.open(wikiUrl, '_blank').focus(), + handler: () => { + window.open(wikiUrl, '_blank').focus(); + return true; + }, keepOpen: true }, { label: 'Discord', - handler: () => window.open(discordUrl, '_blank').focus(), + handler: () => { + window.open(discordUrl, '_blank').focus(); + return true; + }, keepOpen: true }, { label: 'GitHub', - handler: () => window.open(githubUrl, '_blank').focus(), + handler: () => { + window.open(githubUrl, '_blank').focus(); + return true; + }, keepOpen: true }, { label: 'Cancel', - handler: () => this.scene.ui.revertMode() + handler: () => { + this.scene.ui.revertMode(); + return true; + } } ]; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 24e9f11cb..1604de259 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1,15 +1,14 @@ -import BattleScene, { Button } from "../battle-scene"; -import PokemonSpecies, { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, speciesStarters } from "../data/pokemon-species"; +import BattleScene, { Button, starterColors } from "../battle-scene"; +import PokemonSpecies, { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, speciesStarters, starterPassiveAbilities } from "../data/pokemon-species"; import { Species } from "../data/enums/species"; -import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; +import { TextStyle, addBBCodeTextObject, addTextObject } from "./text"; import { Mode } from "./ui"; import MessageUiHandler from "./message-ui-handler"; import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; import { allAbilities } from "../data/ability"; -import { GameMode, GameModes, gameModes } from "../game-mode"; -import { Unlockables } from "../system/unlockables"; +import { GameModes, gameModes } from "../game-mode"; import { GrowthRate, getGrowthRateColor } from "../data/exp"; -import { DexAttr, DexAttrProps, DexEntry, StarterFormMoveData, StarterMoveset } from "../system/game-data"; +import { DexAttr, DexAttrProps, DexEntry, Passive as PassiveAttr, StarterFormMoveData, StarterMoveset } from "../system/game-data"; import * as Utils from "../utils"; import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler"; import { StatsContainer } from "./stats-container"; @@ -24,17 +23,65 @@ import { Type } from "../data/type"; import { Moves } from "../data/enums/moves"; import { speciesEggMoves } from "../data/egg-moves"; import { TitlePhase } from "../phases"; +import { argbFromRgba } from "@material/material-color-utilities"; +import { OptionSelectItem } from "./abstact-option-select-ui-handler"; export type StarterSelectCallback = (starters: Starter[]) => void; export interface Starter { species: PokemonSpecies; dexAttr: bigint; + passive: boolean; + variant: integer; nature: Nature; moveset?: StarterMoveset; pokerus: boolean; } +function getPassiveCandyCount(baseValue: integer): integer { + switch (baseValue) { + case 1: + return 100; + case 2: + return 75; + case 3: + return 50; + case 4: + return 40 + case 5: + return 30; + case 6: + return 20; + case 7: + return 15; + default: + return 10; + } +} + +function getValueReductionCandyCounts(baseValue: integer): [integer, integer] { + switch (baseValue) { + case 1: + return [ 50, 150 ]; + case 2: + return [ 30, 100 ]; + case 3: + return [ 25, 75 ]; + case 4: + return [ 20, 60 ]; + case 5: + return [ 15, 50 ]; + case 6: + return [ 10, 30 ]; + case 7: + return [ 8, 20 ]; + case 8: + return [ 5, 15 ]; + default: + return [ 3, 10 ]; + } +} + const gens = [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX' ]; export default class StarterSelectUiHandler extends MessageUiHandler { @@ -52,10 +99,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private pokemonUncaughtText: Phaser.GameObjects.Text; private pokemonAbilityLabelText: Phaser.GameObjects.Text; private pokemonAbilityText: Phaser.GameObjects.Text; + private pokemonPassiveLabelText: Phaser.GameObjects.Text; + private pokemonPassiveText: Phaser.GameObjects.Text; private pokemonNatureLabelText: Phaser.GameObjects.Text; private pokemonNatureText: BBCodeText; - private pokemonCaughtCountLabelText: Phaser.GameObjects.Text; - private pokemonCaughtCountText: Phaser.GameObjects.Text; private pokemonMovesContainer: Phaser.GameObjects.Container; private pokemonMoveContainers: Phaser.GameObjects.Container[]; private pokemonMoveBgs: Phaser.GameObjects.NineSlice[]; @@ -65,6 +112,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private pokemonEggMoveContainers: Phaser.GameObjects.Container[]; private pokemonEggMoveBgs: Phaser.GameObjects.NineSlice[]; private pokemonEggMoveLabels: Phaser.GameObjects.Text[]; + private pokemonCandyIcon: Phaser.GameObjects.Sprite; + private pokemonCandyOverlayIcon: Phaser.GameObjects.Sprite; + private pokemonCandyCountText: Phaser.GameObjects.Text; + private pokemonCaughtHatchedContainer: Phaser.GameObjects.Container; + private pokemonCaughtCountText: Phaser.GameObjects.Text; + private pokemonHatchedCountText: Phaser.GameObjects.Text; private genOptionsText: Phaser.GameObjects.Text; private instructionsText: Phaser.GameObjects.Text; private starterSelectMessageBox: Phaser.GameObjects.NineSlice; @@ -179,41 +232,77 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.type2Icon.setOrigin(0, 0); this.starterSelectContainer.add(this.type2Icon); + this.pokemonCandyIcon = this.scene.add.sprite(1, 12, 'items', 'candy'); + this.pokemonCandyIcon.setScale(0.5); + this.pokemonCandyIcon.setOrigin(0, 0); + this.starterSelectContainer.add(this.pokemonCandyIcon); + + this.pokemonCandyOverlayIcon = this.scene.add.sprite(1, 12, 'items', 'candy_overlay'); + this.pokemonCandyOverlayIcon.setScale(0.5); + this.pokemonCandyOverlayIcon.setOrigin(0, 0); + this.starterSelectContainer.add(this.pokemonCandyOverlayIcon); + + this.pokemonCandyCountText = addTextObject(this.scene, 14, 18, 'x0', TextStyle.WINDOW_ALT, { fontSize: '56px' }); + this.pokemonCandyCountText.setOrigin(0, 0); + this.starterSelectContainer.add(this.pokemonCandyCountText); + + this.pokemonCaughtHatchedContainer = this.scene.add.container(2, 25); + this.pokemonCaughtHatchedContainer.setScale(0.5); + this.starterSelectContainer.add(this.pokemonCaughtHatchedContainer); + + const pokemonCaughtIcon = this.scene.add.sprite(1, 0, 'items', 'pb'); + pokemonCaughtIcon.setOrigin(0, 0); + pokemonCaughtIcon.setScale(0.75); + this.pokemonCaughtHatchedContainer.add(pokemonCaughtIcon); + + this.pokemonCaughtCountText = addTextObject(this.scene, 24, 4, '0', TextStyle.SUMMARY_ALT); + this.pokemonCaughtCountText.setOrigin(0, 0); + this.pokemonCaughtHatchedContainer.add(this.pokemonCaughtCountText); + + const pokemonHatchedIcon = this.scene.add.sprite(1, 14, 'items', 'mystery_egg'); + pokemonHatchedIcon.setOrigin(0, 0); + pokemonHatchedIcon.setScale(0.75); + this.pokemonCaughtHatchedContainer.add(pokemonHatchedIcon); + + this.pokemonHatchedCountText = addTextObject(this.scene, 24, 19, '0', TextStyle.SUMMARY_ALT); + this.pokemonHatchedCountText.setOrigin(0, 0); + this.pokemonCaughtHatchedContainer.add(this.pokemonHatchedCountText); + this.pokemonGenderText = addTextObject(this.scene, 96, 112, '', TextStyle.SUMMARY_ALT); this.pokemonGenderText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonGenderText); - this.pokemonUncaughtText = addTextObject(this.scene, 6, 126, 'Uncaught', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonUncaughtText = addTextObject(this.scene, 6, 127, 'Uncaught', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonUncaughtText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonUncaughtText); - this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 126, 'Ability:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, 'Ability:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonAbilityLabelText.setOrigin(0, 0); this.pokemonAbilityLabelText.setVisible(false); this.starterSelectContainer.add(this.pokemonAbilityLabelText); - this.pokemonAbilityText = addTextObject(this.scene, 30, 126, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonAbilityText = addTextObject(this.scene, 31, 127, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonAbilityText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonAbilityText); - this.pokemonNatureLabelText = addTextObject(this.scene, 6, 135, 'Nature:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, 'Passive:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonPassiveLabelText.setOrigin(0, 0); + this.pokemonPassiveLabelText.setVisible(false); + this.starterSelectContainer.add(this.pokemonPassiveLabelText); + + this.pokemonPassiveText = addTextObject(this.scene, 31, 136, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonPassiveText.setOrigin(0, 0); + this.starterSelectContainer.add(this.pokemonPassiveText); + + this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, 'Nature:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonNatureLabelText.setOrigin(0, 0); this.pokemonNatureLabelText.setVisible(false); this.starterSelectContainer.add(this.pokemonNatureLabelText); - this.pokemonNatureText = addBBCodeTextObject(this.scene, 30, 135, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonNatureText = addBBCodeTextObject(this.scene, 31, 145, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonNatureText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonNatureText); - this.pokemonCaughtCountLabelText = addTextObject(this.scene, 6, 144, 'Caught/Hatched:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); - this.pokemonCaughtCountLabelText.setOrigin(0, 0); - this.pokemonCaughtCountLabelText.setVisible(false); - this.starterSelectContainer.add(this.pokemonCaughtCountLabelText); - - this.pokemonCaughtCountText = addTextObject(this.scene, 58, 144, '0/0 (0)', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); - this.pokemonCaughtCountText.setOrigin(0, 0); - this.starterSelectContainer.add(this.pokemonCaughtCountText); - this.pokemonMoveContainers = []; this.pokemonMoveBgs = []; this.pokemonMoveLabels = []; @@ -373,7 +462,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonEggMovesContainer = this.scene.add.container(102, 85); this.pokemonEggMovesContainer.setScale(0.375); - const eggMovesLabel = addTextObject(this.scene, -46, 0, 'Egg Moves', TextStyle.SUMMARY_ALT); + const eggMovesLabel = addTextObject(this.scene, -46, 0, 'Egg Moves', TextStyle.WINDOW_ALT); eggMovesLabel.setOrigin(0.5, 0); this.pokemonEggMovesContainer.add(eggMovesLabel); @@ -622,6 +711,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { ui.playSelect(); } else ui.playError(); + return true; }, overrideSound: true }, @@ -630,6 +720,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { handler: () => { this.toggleStatsMode(); ui.setMode(Mode.STARTER_SELECT); + return true; } } ]; @@ -639,7 +730,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { ui.showText('Select a move to swap out.', null, () => { ui.setModeWithoutClear(Mode.OPTION_SELECT, { options: moveset.map((m: Moves, i: number) => { - return { + const option: OptionSelectItem = { label: allMoves[m].name, handler: () => { ui.setMode(Mode.STARTER_SELECT).then(() => { @@ -647,29 +738,37 @@ export default class StarterSelectUiHandler extends MessageUiHandler { ui.setModeWithoutClear(Mode.OPTION_SELECT, { options: this.speciesStarterMoves.filter((sm: Moves) => sm !== m).map(sm => { // make an option for each available starter move - return { + const option = { label: allMoves[sm].name, handler: () => { this.switchMoveHandler(i, sm, m) showSwapOptions(this.starterMoveset); + return true; } }; + return option; }).concat({ label: 'Cancel', - handler: () => showSwapOptions(this.starterMoveset) + handler: () => { + showSwapOptions(this.starterMoveset); + return true; + } }), maxOptions: 8, yOffset: 19 }); }); }); + return true; } - } + }; + return option; }).concat({ label: 'Cancel', handler: () => { this.clearText(); ui.setMode(Mode.STARTER_SELECT); + return true; } }), maxOptions: 8, @@ -682,6 +781,103 @@ export default class StarterSelectUiHandler extends MessageUiHandler { label: 'Manage Moves', handler: () => { showSwapOptions(this.starterMoveset); + return true; + } + }); + const starterData = this.scene.gameData.starterData[this.lastSpecies.speciesId]; + const candyCount = starterData.candyCount; + const passiveAttr = starterData.passiveAttr; + if (passiveAttr & PassiveAttr.UNLOCKED) { + if (!(passiveAttr & PassiveAttr.ENABLED)) { + options.push({ + label: 'Enable Passive', + handler: () => { + starterData.passiveAttr |= PassiveAttr.ENABLED; + ui.setMode(Mode.STARTER_SELECT); + this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined); + return true; + } + }); + } else { + options.push({ + label: 'Disable Passive', + handler: () => { + starterData.passiveAttr ^= PassiveAttr.ENABLED; + ui.setMode(Mode.STARTER_SELECT); + this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined); + return true; + } + }); + } + } + const showUseCandies = () => { + const options = []; + if (!(passiveAttr & PassiveAttr.UNLOCKED)) { + const passiveCost = getPassiveCandyCount(speciesStarters[this.lastSpecies.speciesId]); + options.push({ + label: `x${passiveCost} Unlock Passive (${allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name})`, + handler: () => { + if (candyCount >= passiveCost) { + starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED; + starterData.candyCount -= passiveCost; + this.pokemonCandyCountText.setText(`x${starterData.candyCount}`); + this.scene.gameData.saveSystem().then(success => { + if (!success) + return this.scene.reset(true); + }); + ui.setMode(Mode.STARTER_SELECT); + this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined); + return true; + } + return false; + }, + item: 'candy', + itemArgs: starterColors[this.lastSpecies.speciesId] + }); + } + const valueReduction = starterData.valueReduction; + if (valueReduction < 2) { + const reductionCost = getValueReductionCandyCounts(speciesStarters[this.lastSpecies.speciesId])[valueReduction]; + options.push({ + label: `x${reductionCost} Reduce Cost`, + handler: () => { + if (candyCount >= reductionCost) { + starterData.valueReduction++; + starterData.candyCount -= reductionCost; + this.pokemonCandyCountText.setText(`x${starterData.candyCount}`); + this.scene.gameData.saveSystem().then(success => { + if (!success) + return this.scene.reset(true); + }); + this.updateStarterValueLabel(this.cursor); + this.tryUpdateValue(0); + ui.setMode(Mode.STARTER_SELECT); + this.scene.playSound('buy'); + return true; + } + return false; + }, + item: 'candy', + itemArgs: starterColors[this.lastSpecies.speciesId] + }); + } + options.push({ + label: 'Cancel', + handler: () => { + ui.setMode(Mode.STARTER_SELECT); + return true; + } + }); + ui.setModeWithoutClear(Mode.OPTION_SELECT, { + options: options, + yOffset: 47 + }); + }; + options.push({ + label: 'Use Candies', + handler: () => { + ui.setMode(Mode.STARTER_SELECT).then(() => showUseCandies()); + return true; } }); } @@ -689,6 +885,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { label: 'Cancel', handler: () => { ui.setMode(Mode.STARTER_SELECT); + return true; } }); ui.setModeWithoutClear(Mode.OPTION_SELECT, { @@ -809,22 +1006,22 @@ export default class StarterSelectUiHandler extends MessageUiHandler { // species has different forms if (pokemonFormLevelMoves.hasOwnProperty(speciesId)) { // starterMoveData doesn't have base form moves or is using the single form format - if (!this.scene.gameData.starterMoveData.hasOwnProperty(speciesId) || Array.isArray(this.scene.gameData.starterMoveData[speciesId])) - this.scene.gameData.starterMoveData[speciesId] = { [props.formIndex]: this.starterMoveset.slice(0) as StarterMoveset }; - const starterMoveData = this.scene.gameData.starterMoveData[speciesId][props.formIndex]; + if (!this.scene.gameData.starterData[speciesId].moveset || Array.isArray(this.scene.gameData.starterData[speciesId].moveset)) + this.scene.gameData.starterData[speciesId].moveset = { [props.formIndex]: this.starterMoveset.slice(0) as StarterMoveset }; + const starterMoveData = this.scene.gameData.starterData[speciesId].moveset[props.formIndex]; // starterMoveData doesn't have active form moves if (!starterMoveData.hasOwnProperty(props.formIndex)) - this.scene.gameData.starterMoveData[speciesId][props.formIndex] = this.starterMoveset.slice(0) as StarterMoveset; + this.scene.gameData.starterData[speciesId].moveset[props.formIndex] = this.starterMoveset.slice(0) as StarterMoveset; // does the species' starter move data have its form's starter moves and has it been updated if (starterMoveData.hasOwnProperty(props.formIndex)) { // active form move hasn't been updated if (starterMoveData[props.formIndex][existingMoveIndex] !== newMove) - this.scene.gameData.starterMoveData[speciesId][props.formIndex] = this.starterMoveset.slice(0) as StarterMoveset; + this.scene.gameData.starterData[speciesId].moveset[props.formIndex] = this.starterMoveset.slice(0) as StarterMoveset; } } else - this.scene.gameData.starterMoveData[speciesId] = this.starterMoveset.slice(0) as StarterMoveset; + this.scene.gameData.starterData[speciesId].moveset = this.starterMoveset.slice(0) as StarterMoveset; this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined, false); } @@ -902,29 +1099,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { for (let s = 0; s < 81; s++) { const speciesId = s < genLimit ? this.genSpecies[genCursorWithScroll][s].speciesId : 0 as Species; const slotVisible = !!speciesId; - if (slotVisible) { - const baseStarterValue = speciesStarters[speciesId]; - const starterValue = slotVisible ? this.scene.gameData.getSpeciesStarterValue(speciesId) : 0; - let valueStr = starterValue.toString(); - if (valueStr.startsWith('0.')) - valueStr = valueStr.slice(1); - this.starterValueLabels[s].setText(valueStr); - let textStyle: TextStyle; - switch (baseStarterValue - starterValue) { - case 0: - textStyle = TextStyle.WINDOW; - break; - case 1: - case 0.5: - textStyle = TextStyle.SUMMARY_BLUE; - break; - default: - textStyle = TextStyle.SUMMARY_GOLD; - break; - } - this.starterValueLabels[s].setColor(this.getTextColor(textStyle)); - this.starterValueLabels[s].setShadowColor(this.getTextColor(textStyle, true)); - } + if (slotVisible) + this.updateStarterValueLabel(s); this.starterValueLabels[s].setVisible(slotVisible); this.shinyIcons[s].setVisible(slotVisible && !!this.scene.gameData.dexData[speciesId].caughtAttr && !!(this.scene.gameData.dexData[speciesId].caughtAttr & DexAttr.SHINY)); } @@ -1007,16 +1183,25 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonNameText.setText(species.name); if (this.speciesStarterDexEntry?.caughtAttr) { + const colorScheme = starterColors[species.speciesId]; + this.pokemonGrowthRateText.setText(Utils.toReadableString(GrowthRate[species.growthRate])); this.pokemonGrowthRateText.setColor(getGrowthRateColor(species.growthRate)); this.pokemonGrowthRateText.setShadowColor(getGrowthRateColor(species.growthRate, true)); this.pokemonGrowthRateLabelText.setVisible(true); this.pokemonUncaughtText.setVisible(false); this.pokemonAbilityLabelText.setVisible(true); + this.pokemonPassiveLabelText.setVisible(true); this.pokemonNatureLabelText.setVisible(true); - this.pokemonCaughtCountLabelText.setVisible(true); - this.pokemonCaughtCountText.setText(`${this.speciesStarterDexEntry.caughtCount}/${this.speciesStarterDexEntry.hatchedCount} (${this.speciesStarterDexEntry.caughtCount + this.speciesStarterDexEntry.hatchedCount})`); - this.pokemonCaughtCountText.setVisible(true); + this.pokemonCaughtCountText.setText(`${this.speciesStarterDexEntry.caughtCount}`); + this.pokemonHatchedCountText.setText(`${this.speciesStarterDexEntry.hatchedCount}`); + this.pokemonCaughtHatchedContainer.setVisible(true); + this.pokemonCandyIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[0]))); + this.pokemonCandyIcon.setVisible(true); + this.pokemonCandyOverlayIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[1]))); + this.pokemonCandyOverlayIcon.setVisible(true); + this.pokemonCandyCountText.setText(`x${this.scene.gameData.starterData[species.speciesId].candyCount}`); + this.pokemonCandyCountText.setVisible(true); this.iconAnimHandler.addOrUpdate(this.starterSelectGenIconContainers[species.generation - 1].getAt(this.genSpecies[species.generation - 1].indexOf(species)) as Phaser.GameObjects.Sprite, PokemonIconAnimMode.PASSIVE); let starterIndex = -1; @@ -1056,9 +1241,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.type2Icon.setVisible(false); this.pokemonUncaughtText.setVisible(true); this.pokemonAbilityLabelText.setVisible(false); + this.pokemonPassiveLabelText.setVisible(false); this.pokemonNatureLabelText.setVisible(false); - this.pokemonCaughtCountLabelText.setVisible(false); - this.pokemonCaughtCountText.setVisible(false); + this.pokemonCaughtHatchedContainer.setVisible(false); + this.pokemonCandyIcon.setVisible(false); + this.pokemonCandyOverlayIcon.setVisible(false); + this.pokemonCandyCountText.setVisible(false); const defaultDexAttr = this.scene.gameData.getSpeciesDefaultDexAttr(species, true); const defaultNature = this.scene.gameData.getSpeciesDefaultNature(species); @@ -1076,9 +1264,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.type2Icon.setVisible(false); this.pokemonUncaughtText.setVisible(!!species); this.pokemonAbilityLabelText.setVisible(false); + this.pokemonPassiveLabelText.setVisible(false); this.pokemonNatureLabelText.setVisible(false); - this.pokemonCaughtCountLabelText.setVisible(false); - this.pokemonCaughtCountText.setVisible(false); + this.pokemonCaughtHatchedContainer.setVisible(false); + this.pokemonCandyIcon.setVisible(false); + this.pokemonCandyOverlayIcon.setVisible(false); + this.pokemonCandyCountText.setVisible(false); this.setSpeciesDetails(species, false, 0, false, 0, 0); this.pokemonSprite.clearTint(); @@ -1185,6 +1376,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonAbilityText.setColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD)); this.pokemonAbilityText.setShadowColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD, true)); + const passiveAttr = this.scene.gameData.starterData[species.speciesId].passiveAttr; + this.pokemonPassiveText.setText(passiveAttr & PassiveAttr.UNLOCKED ? passiveAttr & PassiveAttr.ENABLED ? allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name : 'Disabled' : 'Locked'); + this.pokemonPassiveText.setColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY)); + this.pokemonPassiveText.setShadowColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY, true)); + this.pokemonNatureText.setText(getNatureName(natureIndex as unknown as Nature, true, true, false, this.scene.uiTheme)); let levelMoves: LevelMoves; @@ -1195,18 +1391,18 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.speciesStarterMoves.push(...levelMoves.filter(lm => lm[0] <= 5).map(lm => lm[1])); if (speciesEggMoves.hasOwnProperty(species.speciesId)) { for (let em = 0; em < 4; em++) { - if (this.scene.gameData.starterEggMoveData[species.speciesId] & Math.pow(2, em)) + if (this.scene.gameData.starterData[species.speciesId].eggMoves & Math.pow(2, em)) this.speciesStarterMoves.push(speciesEggMoves[species.speciesId][em]); } } - const speciesMoveData = this.scene.gameData.starterMoveData[species.speciesId]; + const speciesMoveData = this.scene.gameData.starterData[species.speciesId].moveset; let moveData: StarterMoveset = speciesMoveData ? Array.isArray(speciesMoveData) ? speciesMoveData as StarterMoveset : (speciesMoveData as StarterFormMoveData)[formIndex] : null; - const availableStarterMoves = this.speciesStarterMoves.concat(speciesEggMoves.hasOwnProperty(species.speciesId) ? speciesEggMoves[species.speciesId].filter((_, em: integer) => this.scene.gameData.starterEggMoveData[species.speciesId] & Math.pow(2, em)) : []); + const availableStarterMoves = this.speciesStarterMoves.concat(speciesEggMoves.hasOwnProperty(species.speciesId) ? speciesEggMoves[species.speciesId].filter((_, em: integer) => this.scene.gameData.starterData[species.speciesId].eggMoves & Math.pow(2, em)) : []); this.starterMoveset = (moveData || (this.speciesStarterMoves.slice(0, 4) as StarterMoveset)).filter(m => availableStarterMoves.find(sm => sm === m)) as StarterMoveset; // Consolidate move data if it contains an incompatible move if (this.starterMoveset.length < 4 && this.starterMoveset.length < availableStarterMoves.length) @@ -1216,6 +1412,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.setTypeIcons(speciesForm.type1, speciesForm.type2); } else { this.pokemonAbilityText.setText(''); + this.pokemonPassiveText.setText(''); this.pokemonNatureText.setText(''); this.setTypeIcons(null, null); } @@ -1225,6 +1422,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonNumberText.setShadowColor(this.getTextColor(TextStyle.SUMMARY, true)); this.pokemonGenderText.setText(''); this.pokemonAbilityText.setText(''); + this.pokemonPassiveText.setText(''); this.pokemonNatureText.setText(''); this.setTypeIcons(null, null); } @@ -1243,7 +1441,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { for (let em = 0; em < 4; em++) { const eggMove = hasEggMoves ? allMoves[speciesEggMoves[species.speciesId][em]] : null; - const eggMoveUnlocked = eggMove && this.scene.gameData.starterEggMoveData.hasOwnProperty(species.speciesId) && this.scene.gameData.starterEggMoveData[species.speciesId] & Math.pow(2, em); + const eggMoveUnlocked = eggMove && this.scene.gameData.starterData[species.speciesId].eggMoves & Math.pow(2, em); this.pokemonEggMoveBgs[em].setFrame(Type[eggMove ? eggMove.type : Type.UNKNOWN].toString().toLowerCase()); this.pokemonEggMoveLabels[em].setText(eggMove && eggMoveUnlocked ? eggMove.name : '???'); } @@ -1281,6 +1479,31 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.tryUpdateValue(); } + updateStarterValueLabel(cursor: integer): void { + const speciesId = this.genSpecies[this.genCursor][cursor].speciesId; + const baseStarterValue = speciesStarters[speciesId]; + const starterValue = this.scene.gameData.getSpeciesStarterValue(speciesId); + let valueStr = starterValue.toString(); + if (valueStr.startsWith('0.')) + valueStr = valueStr.slice(1); + this.starterValueLabels[cursor].setText(valueStr); + let textStyle: TextStyle; + switch (baseStarterValue - starterValue) { + case 0: + textStyle = TextStyle.WINDOW; + break; + case 1: + case 0.5: + textStyle = TextStyle.SUMMARY_BLUE; + break; + default: + textStyle = TextStyle.SUMMARY_GOLD; + break; + } + this.starterValueLabels[cursor].setColor(this.getTextColor(textStyle)); + this.starterValueLabels[cursor].setShadowColor(this.getTextColor(textStyle, true)); + } + tryUpdateValue(add?: integer): boolean { const value = this.starterGens.reduce((total: integer, gen: integer, i: integer) => total += this.scene.gameData.getSpeciesStarterValue(this.genSpecies[gen][this.starterCursors[i]].speciesId), 0); const newValue = value + (add || 0); @@ -1331,6 +1554,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return { species: starterSpecies, dexAttr: thisObj.starterAttr[i], + passive: !(thisObj.scene.gameData.starterData[starterSpecies.speciesId].passiveAttr ^ (PassiveAttr.ENABLED | PassiveAttr.UNLOCKED)), + variant: 0, nature: thisObj.starterNatures[i] as Nature, moveset: thisObj.starterMovesets[i], pokerus: !![ 0, 1, 2 ].filter(n => thisObj.pokerusGens[n] === starterSpecies.generation - 1 && thisObj.pokerusCursors[n] === thisObj.genSpecies[starterSpecies.generation - 1].indexOf(starterSpecies)).length diff --git a/src/ui/text.ts b/src/ui/text.ts index 6162d21b7..bfb02d06e 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -18,6 +18,7 @@ export enum TextStyle { SUMMARY_BLUE, SUMMARY_PINK, SUMMARY_GOLD, + SUMMARY_GRAY, MONEY, SETTINGS_LABEL, SETTINGS_SELECTED, @@ -75,10 +76,14 @@ function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraStyleOptio switch (style) { case TextStyle.SUMMARY: + case TextStyle.SUMMARY_ALT: + case TextStyle.SUMMARY_BLUE: case TextStyle.SUMMARY_RED: case TextStyle.SUMMARY_PINK: case TextStyle.SUMMARY_GOLD: + case TextStyle.SUMMARY_GRAY: case TextStyle.WINDOW: + case TextStyle.WINDOW_ALT: case TextStyle.MESSAGE: case TextStyle.SETTINGS_LABEL: case TextStyle.SETTINGS_SELECTED: @@ -152,7 +157,9 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui return !shadow ? '#f89890' : '#984038'; case TextStyle.SUMMARY_GOLD: case TextStyle.MONEY: - return !shadow ? '#e8e8a8' : '#a0a060' + return !shadow ? '#e8e8a8' : '#a0a060'; + case TextStyle.SUMMARY_GRAY: + return !shadow ? '#a0a0a0' : '#636363'; case TextStyle.SETTINGS_LABEL: return !shadow ? '#f8b050' : '#c07800'; case TextStyle.SETTINGS_SELECTED: diff --git a/src/utils.ts b/src/utils.ts index 714cc5b08..13b067140 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -311,4 +311,14 @@ export function deltaRgb(rgb1: integer[], rgb2: integer[]): integer { const t = (r1 + r2) / 2; return Math.ceil(Math.sqrt(2 * drp2 + 4 * dgp2 + 3 * dbp2 + t * (drp2 - dbp2) / 256)); +} + +export function rgbHexToRgba(hex: string) { + const color = hex.match(/^([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i); + return { + r: parseInt(color[1], 16), + g: parseInt(color[2], 16), + b: parseInt(color[3], 16), + a: 255 + }; } \ No newline at end of file