diff --git a/public/images/items.json b/public/images/items.json index 3689e281e..f7b822e6b 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -4,8 +4,8 @@ "image": "items.png", "format": "RGBA8888", "size": { - "w": 365, - "h": 365 + "w": 366, + "h": 366 }, "scale": 1, "frames": [ @@ -450,27 +450,6 @@ "h": 16 } }, - { - "filename": "revive", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 10, - "y": 8, - "w": 12, - "h": 17 - }, - "frame": { - "x": 350, - "y": 0, - "w": 12, - "h": 17 - } - }, { "filename": "garchompite", "rotated": false, @@ -486,12 +465,33 @@ "h": 16 }, "frame": { - "x": 0, - "y": 14, + "x": 350, + "y": 0, "w": 16, "h": 16 } }, + { + "filename": "revive", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 10, + "y": 8, + "w": 12, + "h": 17 + }, + "frame": { + "x": 0, + "y": 11, + "w": 12, + "h": 17 + } + }, { "filename": "gardevoirite", "rotated": false, @@ -507,7 +507,7 @@ "h": 16 }, "frame": { - "x": 16, + "x": 12, "y": 14, "w": 16, "h": 16 @@ -528,7 +528,7 @@ "h": 16 }, "frame": { - "x": 32, + "x": 28, "y": 15, "w": 16, "h": 16 @@ -549,7 +549,7 @@ "h": 16 }, "frame": { - "x": 48, + "x": 44, "y": 15, "w": 16, "h": 16 @@ -570,8 +570,8 @@ "h": 16 }, "frame": { - "x": 64, - "y": 16, + "x": 60, + "y": 15, "w": 16, "h": 16 } @@ -591,7 +591,7 @@ "h": 16 }, "frame": { - "x": 80, + "x": 76, "y": 16, "w": 16, "h": 16 @@ -612,7 +612,7 @@ "h": 16 }, "frame": { - "x": 96, + "x": 92, "y": 16, "w": 16, "h": 16 @@ -633,7 +633,7 @@ "h": 16 }, "frame": { - "x": 112, + "x": 108, "y": 16, "w": 16, "h": 16 @@ -654,7 +654,7 @@ "h": 16 }, "frame": { - "x": 128, + "x": 124, "y": 16, "w": 16, "h": 16 @@ -675,7 +675,7 @@ "h": 16 }, "frame": { - "x": 144, + "x": 140, "y": 16, "w": 16, "h": 16 @@ -696,7 +696,7 @@ "h": 16 }, "frame": { - "x": 160, + "x": 156, "y": 16, "w": 16, "h": 16 @@ -717,7 +717,7 @@ "h": 16 }, "frame": { - "x": 176, + "x": 172, "y": 16, "w": 16, "h": 16 @@ -738,7 +738,7 @@ "h": 16 }, "frame": { - "x": 192, + "x": 188, "y": 16, "w": 16, "h": 16 @@ -759,7 +759,7 @@ "h": 16 }, "frame": { - "x": 208, + "x": 204, "y": 16, "w": 16, "h": 16 @@ -780,7 +780,7 @@ "h": 16 }, "frame": { - "x": 224, + "x": 220, "y": 16, "w": 16, "h": 16 @@ -801,7 +801,7 @@ "h": 16 }, "frame": { - "x": 240, + "x": 236, "y": 16, "w": 20, "h": 16 @@ -822,7 +822,7 @@ "h": 16 }, "frame": { - "x": 260, + "x": 256, "y": 16, "w": 16, "h": 16 @@ -843,7 +843,7 @@ "h": 16 }, "frame": { - "x": 276, + "x": 272, "y": 16, "w": 16, "h": 16 @@ -864,7 +864,7 @@ "h": 16 }, "frame": { - "x": 292, + "x": 288, "y": 16, "w": 16, "h": 16 @@ -885,7 +885,7 @@ "h": 16 }, "frame": { - "x": 308, + "x": 304, "y": 16, "w": 16, "h": 16 @@ -906,7 +906,7 @@ "h": 16 }, "frame": { - "x": 324, + "x": 320, "y": 16, "w": 16, "h": 16 @@ -927,8 +927,8 @@ "h": 16 }, "frame": { - "x": 340, - "y": 17, + "x": 336, + "y": 16, "w": 16, "h": 16 } @@ -970,7 +970,7 @@ }, "frame": { "x": 16, - "y": 30, + "y": 31, "w": 16, "h": 16 } @@ -1348,7 +1348,7 @@ }, "frame": { "x": 340, - "y": 33, + "y": 32, "w": 18, "h": 18 } @@ -1369,7 +1369,7 @@ }, "frame": { "x": 0, - "y": 46, + "y": 47, "w": 21, "h": 18 } @@ -1705,7 +1705,7 @@ }, "frame": { "x": 325, - "y": 51, + "y": 50, "w": 20, "h": 18 } @@ -1726,7 +1726,7 @@ }, "frame": { "x": 345, - "y": 51, + "y": 50, "w": 20, "h": 18 } @@ -1747,7 +1747,7 @@ }, "frame": { "x": 0, - "y": 64, + "y": 65, "w": 20, "h": 18 } @@ -2062,7 +2062,7 @@ }, "frame": { "x": 313, - "y": 69, + "y": 68, "w": 20, "h": 19 } @@ -2083,7 +2083,7 @@ }, "frame": { "x": 333, - "y": 69, + "y": 68, "w": 22, "h": 19 } @@ -2104,7 +2104,7 @@ }, "frame": { "x": 0, - "y": 82, + "y": 83, "w": 19, "h": 20 } @@ -2382,27 +2382,6 @@ "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": 294, - "y": 87, - "w": 18, - "h": 20 - } - }, { "filename": "magnet", "rotated": false, @@ -2418,8 +2397,8 @@ "h": 20 }, "frame": { - "x": 312, - "y": 88, + "x": 294, + "y": 87, "w": 20, "h": 20 } @@ -2439,8 +2418,8 @@ "h": 20 }, "frame": { - "x": 332, - "y": 88, + "x": 314, + "y": 87, "w": 22, "h": 20 } @@ -2460,8 +2439,8 @@ "h": 20 }, "frame": { - "x": 0, - "y": 103, + "x": 336, + "y": 87, "w": 20, "h": 20 } @@ -2481,7 +2460,7 @@ "h": 20 }, "frame": { - "x": 20, + "x": 0, "y": 103, "w": 20, "h": 20 @@ -2501,8 +2480,50 @@ "w": 20, "h": 20 }, + "frame": { + "x": 20, + "y": 103, + "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": 40, + "y": 103, + "w": 18, + "h": 20 + } + }, + { + "filename": "rb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 58, "y": 104, "w": 20, "h": 20 @@ -2523,7 +2544,7 @@ "h": 20 }, "frame": { - "x": 60, + "x": 78, "y": 105, "w": 23, "h": 20 @@ -2544,7 +2565,7 @@ "h": 20 }, "frame": { - "x": 83, + "x": 101, "y": 105, "w": 24, "h": 20 @@ -2565,7 +2586,7 @@ "h": 20 }, "frame": { - "x": 107, + "x": 125, "y": 105, "w": 24, "h": 20 @@ -2586,33 +2607,12 @@ "h": 20 }, "frame": { - "x": 131, + "x": 149, "y": 105, "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": 155, - "y": 105, - "w": 20, - "h": 20 - } - }, { "filename": "shell_bell", "rotated": false, @@ -2628,7 +2628,7 @@ "h": 20 }, "frame": { - "x": 175, + "x": 173, "y": 106, "w": 23, "h": 20 @@ -2649,12 +2649,33 @@ "h": 20 }, "frame": { - "x": 198, + "x": 196, "y": 106, "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": 220, + "y": 107, + "w": 20, + "h": 20 + } + }, { "filename": "tera_orb", "rotated": false, @@ -2670,7 +2691,7 @@ "h": 20 }, "frame": { - "x": 222, + "x": 240, "y": 107, "w": 22, "h": 20 @@ -2691,7 +2712,7 @@ "h": 20 }, "frame": { - "x": 244, + "x": 262, "y": 107, "w": 20, "h": 20 @@ -2712,7 +2733,7 @@ "h": 21 }, "frame": { - "x": 264, + "x": 282, "y": 107, "w": 23, "h": 21 @@ -2733,7 +2754,7 @@ "h": 21 }, "frame": { - "x": 287, + "x": 305, "y": 107, "w": 23, "h": 21 @@ -2754,12 +2775,33 @@ "h": 21 }, "frame": { - "x": 310, - "y": 108, + "x": 328, + "y": 107, "w": 23, "h": 21 } }, + { + "filename": "leftovers", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 15, + "h": 22 + }, + "frame": { + "x": 351, + "y": 107, + "w": 15, + "h": 22 + } + }, { "filename": "dawn_stone", "rotated": false, @@ -2775,8 +2817,8 @@ "h": 21 }, "frame": { - "x": 333, - "y": 108, + "x": 0, + "y": 123, "w": 20, "h": 21 } @@ -2796,7 +2838,7 @@ "h": 21 }, "frame": { - "x": 0, + "x": 20, "y": 123, "w": 22, "h": 21 @@ -2817,33 +2859,12 @@ "h": 21 }, "frame": { - "x": 22, + "x": 42, "y": 124, "w": 21, "h": 21 } }, - { - "filename": "leftovers", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 15, - "h": 22 - }, - "frame": { - "x": 43, - "y": 124, - "w": 15, - "h": 22 - } - }, { "filename": "liechi_berry", "rotated": false, @@ -2859,7 +2880,7 @@ "h": 21 }, "frame": { - "x": 58, + "x": 63, "y": 125, "w": 22, "h": 21 @@ -2880,7 +2901,7 @@ "h": 21 }, "frame": { - "x": 80, + "x": 85, "y": 125, "w": 23, "h": 21 @@ -2901,7 +2922,7 @@ "h": 21 }, "frame": { - "x": 103, + "x": 108, "y": 125, "w": 23, "h": 21 @@ -2922,12 +2943,33 @@ "h": 21 }, "frame": { - "x": 126, + "x": 131, "y": 125, "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": 154, + "y": 125, + "w": 19, + "h": 21 + } + }, { "filename": "poison_barb", "rotated": false, @@ -2943,8 +2985,8 @@ "h": 21 }, "frame": { - "x": 149, - "y": 125, + "x": 173, + "y": 126, "w": 21, "h": 21 } @@ -2964,33 +3006,12 @@ "h": 21 }, "frame": { - "x": 170, + "x": 194, "y": 126, "w": 21, "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": 191, - "y": 126, - "w": 19, - "h": 21 - } - }, { "filename": "sweet_apple", "rotated": false, @@ -3006,7 +3027,7 @@ "h": 21 }, "frame": { - "x": 210, + "x": 215, "y": 127, "w": 22, "h": 21 @@ -3027,7 +3048,7 @@ "h": 21 }, "frame": { - "x": 232, + "x": 237, "y": 127, "w": 22, "h": 21 @@ -3048,8 +3069,8 @@ "h": 21 }, "frame": { - "x": 254, - "y": 128, + "x": 259, + "y": 127, "w": 22, "h": 21 } @@ -3069,7 +3090,7 @@ "h": 21 }, "frame": { - "x": 276, + "x": 281, "y": 128, "w": 23, "h": 21 @@ -3090,8 +3111,8 @@ "h": 21 }, "frame": { - "x": 299, - "y": 129, + "x": 304, + "y": 128, "w": 21, "h": 21 } @@ -3111,14 +3132,14 @@ "h": 22 }, "frame": { - "x": 320, - "y": 129, + "x": 325, + "y": 128, "w": 22, "h": 22 } }, { - "filename": "dire_hit", + "filename": "metal_coat", "rotated": false, "trimmed": true, "sourceSize": { @@ -3126,20 +3147,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 5, + "x": 6, "y": 5, - "w": 22, + "w": 19, "h": 22 }, "frame": { - "x": 342, + "x": 347, "y": 129, - "w": 22, + "w": 19, "h": 22 } }, { - "filename": "dna_splicers", + "filename": "dire_hit", "rotated": false, "trimmed": true, "sourceSize": { @@ -3160,7 +3181,7 @@ } }, { - "filename": "metal_coat", + "filename": "metronome", "rotated": false, "trimmed": true, "sourceSize": { @@ -3168,15 +3189,36 @@ "h": 32 }, "spriteSourceSize": { - "x": 6, + "x": 7, "y": 5, - "w": 19, + "w": 17, "h": 22 }, "frame": { "x": 22, + "y": 144, + "w": 17, + "h": 22 + } + }, + { + "filename": "dna_splicers", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 39, "y": 145, - "w": 19, + "w": 22, "h": 22 } }, @@ -3195,7 +3237,7 @@ "h": 22 }, "frame": { - "x": 41, + "x": 61, "y": 146, "w": 22, "h": 22 @@ -3216,7 +3258,7 @@ "h": 22 }, "frame": { - "x": 63, + "x": 83, "y": 146, "w": 22, "h": 22 @@ -3237,7 +3279,7 @@ "h": 22 }, "frame": { - "x": 85, + "x": 105, "y": 146, "w": 24, "h": 22 @@ -3258,12 +3300,33 @@ "h": 22 }, "frame": { - "x": 109, + "x": 129, "y": 146, "w": 24, "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": 153, + "y": 146, + "w": 20, + "h": 22 + } + }, { "filename": "ganlon_berry", "rotated": false, @@ -3279,14 +3342,14 @@ "h": 22 }, "frame": { - "x": 133, - "y": 146, + "x": 173, + "y": 147, "w": 22, "h": 22 } }, { - "filename": "full_heal", + "filename": "soothe_bell", "rotated": false, "trimmed": true, "sourceSize": { @@ -3294,16 +3357,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 9, - "y": 4, - "w": 15, - "h": 23 + "x": 8, + "y": 5, + "w": 17, + "h": 22 }, "frame": { - "x": 155, - "y": 146, - "w": 15, - "h": 23 + "x": 195, + "y": 147, + "w": 17, + "h": 22 } }, { @@ -3321,33 +3384,12 @@ "h": 22 }, "frame": { - "x": 170, - "y": 147, + "x": 212, + "y": 148, "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": 192, - "y": 147, - "w": 17, - "h": 22 - } - }, { "filename": "healing_charm", "rotated": false, @@ -3363,7 +3405,7 @@ "h": 22 }, "frame": { - "x": 209, + "x": 234, "y": 148, "w": 23, "h": 22 @@ -3384,7 +3426,7 @@ "h": 22 }, "frame": { - "x": 232, + "x": 257, "y": 148, "w": 22, "h": 22 @@ -3405,7 +3447,7 @@ "h": 22 }, "frame": { - "x": 254, + "x": 279, "y": 149, "w": 22, "h": 22 @@ -3426,12 +3468,75 @@ "h": 22 }, "frame": { - "x": 276, + "x": 301, "y": 149, "w": 22, "h": 22 } }, + { + "filename": "peat_block", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 5, + "w": 24, + "h": 22 + }, + "frame": { + "x": 323, + "y": 150, + "w": 24, + "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": 347, + "y": 151, + "w": 15, + "h": 23 + } + }, + { + "filename": "map", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 3, + "y": 5, + "w": 27, + "h": 22 + }, + "frame": { + "x": 0, + "y": 166, + "w": 27, + "h": 22 + } + }, { "filename": "protector", "rotated": false, @@ -3447,114 +3552,9 @@ "h": 22 }, "frame": { - "x": 298, - "y": 150, - "w": 22, - "h": 22 - } - }, - { - "filename": "map", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 3, - "y": 5, - "w": 27, - "h": 22 - }, - "frame": { - "x": 320, - "y": 151, - "w": 27, - "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": 347, - "y": 151, - "w": 17, - "h": 22 - } - }, - { - "filename": "scroll_of_darkness", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 0, - "y": 166, - "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": 22, + "x": 27, "y": 167, - "w": 17, - "h": 23 - } - }, - { - "filename": "peat_block", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 5, - "w": 24, - "h": 22 - }, - "frame": { - "x": 39, - "y": 168, - "w": 24, + "w": 22, "h": 22 } }, @@ -3573,12 +3573,33 @@ "h": 22 }, "frame": { - "x": 63, + "x": 49, "y": 168, "w": 23, "h": 22 } }, + { + "filename": "scroll_of_darkness", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 72, + "y": 168, + "w": 22, + "h": 22 + } + }, { "filename": "scroll_of_waters", "rotated": false, @@ -3594,7 +3615,7 @@ "h": 22 }, "frame": { - "x": 86, + "x": 94, "y": 168, "w": 22, "h": 22 @@ -3615,33 +3636,12 @@ "h": 22 }, "frame": { - "x": 108, + "x": 116, "y": 168, "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": 130, - "y": 168, - "w": 20, - "h": 22 - } - }, { "filename": "starf_berry", "rotated": false, @@ -3657,8 +3657,8 @@ "h": 22 }, "frame": { - "x": 150, - "y": 169, + "x": 138, + "y": 168, "w": 22, "h": 22 } @@ -3678,7 +3678,7 @@ "h": 22 }, "frame": { - "x": 172, + "x": 160, "y": 169, "w": 22, "h": 22 @@ -3699,8 +3699,8 @@ "h": 22 }, "frame": { - "x": 194, - "y": 170, + "x": 182, + "y": 169, "w": 22, "h": 22 } @@ -3720,7 +3720,7 @@ "h": 22 }, "frame": { - "x": 216, + "x": 204, "y": 170, "w": 22, "h": 22 @@ -3741,8 +3741,8 @@ "h": 22 }, "frame": { - "x": 238, - "y": 171, + "x": 226, + "y": 170, "w": 22, "h": 22 } @@ -3762,8 +3762,8 @@ "h": 22 }, "frame": { - "x": 260, - "y": 171, + "x": 248, + "y": 170, "w": 22, "h": 22 } @@ -3783,8 +3783,8 @@ "h": 22 }, "frame": { - "x": 282, - "y": 172, + "x": 270, + "y": 171, "w": 22, "h": 22 } @@ -3804,8 +3804,8 @@ "h": 22 }, "frame": { - "x": 304, - "y": 173, + "x": 292, + "y": 171, "w": 22, "h": 22 } @@ -3825,14 +3825,14 @@ "h": 22 }, "frame": { - "x": 326, - "y": 173, + "x": 314, + "y": 172, "w": 22, "h": 22 } }, { - "filename": "potion", + "filename": "tm_flying", "rotated": false, "trimmed": true, "sourceSize": { @@ -3840,20 +3840,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, + "x": 5, "y": 5, - "w": 17, - "h": 23 + "w": 22, + "h": 22 }, "frame": { - "x": 348, - "y": 173, - "w": 17, - "h": 23 + "x": 336, + "y": 174, + "w": 22, + "h": 22 } }, { - "filename": "tm_flying", + "filename": "tm_ghost", "rotated": false, "trimmed": true, "sourceSize": { @@ -3873,27 +3873,6 @@ "h": 22 } }, - { - "filename": "tm_ghost", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 22, - "y": 190, - "w": 22, - "h": 22 - } - }, { "filename": "tm_grass", "rotated": false, @@ -3909,8 +3888,8 @@ "h": 22 }, "frame": { - "x": 44, - "y": 190, + "x": 22, + "y": 189, "w": 22, "h": 22 } @@ -3930,7 +3909,7 @@ "h": 22 }, "frame": { - "x": 66, + "x": 44, "y": 190, "w": 22, "h": 22 @@ -3951,7 +3930,7 @@ "h": 22 }, "frame": { - "x": 88, + "x": 66, "y": 190, "w": 22, "h": 22 @@ -3972,33 +3951,12 @@ "h": 22 }, "frame": { - "x": 110, + "x": 88, "y": 190, "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": 132, - "y": 190, - "w": 18, - "h": 23 - } - }, { "filename": "tm_poison", "rotated": false, @@ -4014,8 +3972,8 @@ "h": 22 }, "frame": { - "x": 150, - "y": 191, + "x": 110, + "y": 190, "w": 22, "h": 22 } @@ -4035,8 +3993,8 @@ "h": 22 }, "frame": { - "x": 172, - "y": 191, + "x": 132, + "y": 190, "w": 22, "h": 22 } @@ -4056,8 +4014,8 @@ "h": 22 }, "frame": { - "x": 194, - "y": 192, + "x": 154, + "y": 191, "w": 22, "h": 22 } @@ -4077,8 +4035,8 @@ "h": 22 }, "frame": { - "x": 216, - "y": 192, + "x": 176, + "y": 191, "w": 22, "h": 22 } @@ -4098,8 +4056,8 @@ "h": 22 }, "frame": { - "x": 238, - "y": 193, + "x": 198, + "y": 192, "w": 22, "h": 22 } @@ -4119,8 +4077,8 @@ "h": 22 }, "frame": { - "x": 260, - "y": 193, + "x": 220, + "y": 192, "w": 22, "h": 22 } @@ -4140,8 +4098,8 @@ "h": 22 }, "frame": { - "x": 282, - "y": 194, + "x": 242, + "y": 192, "w": 22, "h": 22 } @@ -4161,8 +4119,8 @@ "h": 22 }, "frame": { - "x": 304, - "y": 195, + "x": 264, + "y": 193, "w": 22, "h": 22 } @@ -4182,14 +4140,14 @@ "h": 22 }, "frame": { - "x": 326, - "y": 195, + "x": 286, + "y": 193, "w": 22, "h": 22 } }, { - "filename": "super_potion", + "filename": "x_sp_atk", "rotated": false, "trimmed": true, "sourceSize": { @@ -4197,20 +4155,41 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, + "x": 5, "y": 5, - "w": 17, - "h": 23 + "w": 22, + "h": 22 }, "frame": { - "x": 348, - "y": 196, - "w": 17, - "h": 23 + "x": 308, + "y": 194, + "w": 22, + "h": 22 } }, { - "filename": "x_sp_atk", + "filename": "x_sp_def", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 330, + "y": 196, + "w": 22, + "h": 22 + } + }, + { + "filename": "x_speed", "rotated": false, "trimmed": true, "sourceSize": { @@ -4231,7 +4210,7 @@ } }, { - "filename": "x_sp_def", + "filename": "black_belt", "rotated": false, "trimmed": true, "sourceSize": { @@ -4240,36 +4219,15 @@ }, "spriteSourceSize": { "x": 5, - "y": 5, + "y": 4, "w": 22, - "h": 22 + "h": 23 }, "frame": { "x": 22, - "y": 212, + "y": 211, "w": 22, - "h": 22 - } - }, - { - "filename": "x_speed", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 44, - "y": 212, - "w": 22, - "h": 22 + "h": 23 } }, { @@ -4287,54 +4245,12 @@ "h": 23 }, "frame": { - "x": 66, + "x": 44, "y": 212, "w": 23, "h": 23 } }, - { - "filename": "black_belt", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 4, - "w": 22, - "h": 23 - }, - "frame": { - "x": 89, - "y": 212, - "w": 22, - "h": 23 - } - }, - { - "filename": "dragon_fang", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 21, - "h": 23 - }, - "frame": { - "x": 111, - "y": 212, - "w": 21, - "h": 23 - } - }, { "filename": "bug_tera_shard", "rotated": false, @@ -4350,8 +4266,8 @@ "h": 23 }, "frame": { - "x": 132, - "y": 213, + "x": 67, + "y": 212, "w": 22, "h": 23 } @@ -4371,33 +4287,12 @@ "h": 23 }, "frame": { - "x": 154, - "y": 213, + "x": 89, + "y": 212, "w": 24, "h": 23 } }, - { - "filename": "calcium", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 178, - "y": 213, - "w": 16, - "h": 24 - } - }, { "filename": "coin_case", "rotated": false, @@ -4413,14 +4308,14 @@ "h": 23 }, "frame": { - "x": 194, - "y": 214, + "x": 113, + "y": 212, "w": 24, "h": 23 } }, { - "filename": "mystic_water", + "filename": "hyper_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -4428,15 +4323,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 6, + "x": 8, "y": 5, - "w": 20, + "w": 17, "h": 23 }, "frame": { - "x": 218, - "y": 214, - "w": 20, + "x": 137, + "y": 212, + "w": 17, "h": 23 } }, @@ -4455,12 +4350,33 @@ "h": 23 }, "frame": { - "x": 238, - "y": 215, + "x": 154, + "y": 213, "w": 22, "h": 23 } }, + { + "filename": "dragon_fang", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 21, + "h": 23 + }, + "frame": { + "x": 176, + "y": 213, + "w": 21, + "h": 23 + } + }, { "filename": "dragon_tera_shard", "rotated": false, @@ -4476,29 +4392,8 @@ "h": 23 }, "frame": { - "x": 260, - "y": 215, - "w": 22, - "h": 23 - } - }, - { - "filename": "electric_tera_shard", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 22, - "h": 23 - }, - "frame": { - "x": 282, - "y": 216, + "x": 197, + "y": 214, "w": 22, "h": 23 } @@ -4518,56 +4413,14 @@ "h": 23 }, "frame": { - "x": 304, - "y": 217, + "x": 219, + "y": 214, "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": 327, - "y": 217, - "w": 21, - "h": 23 - } - }, - { - "filename": "carbos", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 348, - "y": 219, - "w": 16, - "h": 24 - } - }, - { - "filename": "fairy_tera_shard", + "filename": "electric_tera_shard", "rotated": false, "trimmed": true, "sourceSize": { @@ -4581,8 +4434,8 @@ "h": 23 }, "frame": { - "x": 0, - "y": 232, + "x": 242, + "y": 214, "w": 22, "h": 23 } @@ -4602,14 +4455,14 @@ "h": 23 }, "frame": { - "x": 22, - "y": 234, + "x": 264, + "y": 215, "w": 24, "h": 23 } }, { - "filename": "elixir", + "filename": "mystic_water", "rotated": false, "trimmed": true, "sourceSize": { @@ -4617,16 +4470,37 @@ "h": 32 }, "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 + "x": 6, + "y": 5, + "w": 20, + "h": 23 }, "frame": { - "x": 46, - "y": 234, - "w": 18, - "h": 24 + "x": 288, + "y": 215, + "w": 20, + "h": 23 + } + }, + { + "filename": "fairy_tera_shard", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 22, + "h": 23 + }, + "frame": { + "x": 308, + "y": 216, + "w": 22, + "h": 23 } }, { @@ -4644,8 +4518,8 @@ "h": 23 }, "frame": { - "x": 64, - "y": 235, + "x": 330, + "y": 218, "w": 22, "h": 23 } @@ -4665,8 +4539,8 @@ "h": 23 }, "frame": { - "x": 86, - "y": 235, + "x": 0, + "y": 232, "w": 22, "h": 23 } @@ -4686,8 +4560,8 @@ "h": 23 }, "frame": { - "x": 108, - "y": 235, + "x": 22, + "y": 234, "w": 22, "h": 23 } @@ -4707,8 +4581,8 @@ "h": 23 }, "frame": { - "x": 130, - "y": 236, + "x": 44, + "y": 235, "w": 22, "h": 23 } @@ -4728,8 +4602,8 @@ "h": 23 }, "frame": { - "x": 152, - "y": 236, + "x": 66, + "y": 235, "w": 22, "h": 23 } @@ -4749,8 +4623,8 @@ "h": 23 }, "frame": { - "x": 174, - "y": 237, + "x": 88, + "y": 235, "w": 22, "h": 23 } @@ -4770,54 +4644,12 @@ "h": 23 }, "frame": { - "x": 196, - "y": 237, + "x": 110, + "y": 235, "w": 22, "h": 23 } }, - { - "filename": "ether", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 218, - "y": 237, - "w": 18, - "h": 24 - } - }, - { - "filename": "griseous_core", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 23, - "h": 23 - }, - "frame": { - "x": 236, - "y": 238, - "w": 23, - "h": 23 - } - }, { "filename": "ground_tera_shard", "rotated": false, @@ -4833,14 +4665,14 @@ "h": 23 }, "frame": { - "x": 259, - "y": 238, + "x": 132, + "y": 235, "w": 22, "h": 23 } }, { - "filename": "ice_tera_shard", + "filename": "griseous_core", "rotated": false, "trimmed": true, "sourceSize": { @@ -4848,15 +4680,36 @@ "h": 32 }, "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 22, + "x": 5, + "y": 5, + "w": 23, "h": 23 }, "frame": { - "x": 281, - "y": 239, - "w": 22, + "x": 154, + "y": 236, + "w": 23, + "h": 23 + } + }, + { + "filename": "potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 177, + "y": 236, + "w": 17, "h": 23 } }, @@ -4875,12 +4728,54 @@ "h": 23 }, "frame": { - "x": 303, - "y": 240, + "x": 194, + "y": 237, "w": 24, "h": 23 } }, + { + "filename": "ice_tera_shard", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 22, + "h": 23 + }, + "frame": { + "x": 218, + "y": 237, + "w": 22, + "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": 240, + "y": 237, + "w": 21, + "h": 23 + } + }, { "filename": "leaf_stone", "rotated": false, @@ -4896,33 +4791,12 @@ "h": 23 }, "frame": { - "x": 327, - "y": 240, + "x": 261, + "y": 238, "w": 21, "h": 23 } }, - { - "filename": "hp_up", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 348, - "y": 243, - "w": 16, - "h": 24 - } - }, { "filename": "never_melt_ice", "rotated": false, @@ -4937,6 +4811,90 @@ "w": 22, "h": 23 }, + "frame": { + "x": 282, + "y": 238, + "w": 22, + "h": 23 + } + }, + { + "filename": "normal_tera_shard", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 22, + "h": 23 + }, + "frame": { + "x": 304, + "y": 239, + "w": 22, + "h": 23 + } + }, + { + "filename": "petaya_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 23 + }, + "frame": { + "x": 326, + "y": 241, + "w": 22, + "h": 23 + } + }, + { + "filename": "sachet", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 18, + "h": 23 + }, + "frame": { + "x": 348, + "y": 241, + "w": 18, + "h": 23 + } + }, + { + "filename": "poison_tera_shard", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 22, + "h": 23 + }, "frame": { "x": 0, "y": 255, @@ -4945,7 +4903,7 @@ } }, { - "filename": "normal_tera_shard", + "filename": "psychic_tera_shard", "rotated": false, "trimmed": true, "sourceSize": { @@ -4965,90 +4923,6 @@ "h": 23 } }, - { - "filename": "petaya_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 23 - }, - "frame": { - "x": 44, - "y": 258, - "w": 22, - "h": 23 - } - }, - { - "filename": "poison_tera_shard", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 22, - "h": 23 - }, - "frame": { - "x": 66, - "y": 258, - "w": 22, - "h": 23 - } - }, - { - "filename": "psychic_tera_shard", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 22, - "h": 23 - }, - "frame": { - "x": 88, - "y": 258, - "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": 110, - "y": 258, - "w": 18, - "h": 24 - } - }, { "filename": "rare_candy", "rotated": false, @@ -5064,8 +4938,8 @@ "h": 23 }, "frame": { - "x": 128, - "y": 259, + "x": 44, + "y": 258, "w": 23, "h": 23 } @@ -5085,8 +4959,8 @@ "h": 23 }, "frame": { - "x": 151, - "y": 259, + "x": 67, + "y": 258, "w": 23, "h": 23 } @@ -5106,8 +4980,8 @@ "h": 23 }, "frame": { - "x": 174, - "y": 260, + "x": 90, + "y": 258, "w": 22, "h": 23 } @@ -5127,12 +5001,33 @@ "h": 23 }, "frame": { - "x": 196, - "y": 260, + "x": 112, + "y": 258, "w": 22, "h": 23 } }, + { + "filename": "super_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 134, + "y": 258, + "w": 17, + "h": 23 + } + }, { "filename": "scope-lens", "rotated": false, @@ -5148,12 +5043,33 @@ "h": 23 }, "frame": { - "x": 218, - "y": 261, + "x": 151, + "y": 259, "w": 24, "h": 23 } }, + { + "filename": "calcium", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 175, + "y": 259, + "w": 16, + "h": 24 + } + }, { "filename": "sharp_beak", "rotated": false, @@ -5169,33 +5085,12 @@ "h": 23 }, "frame": { - "x": 242, - "y": 261, + "x": 191, + "y": 260, "w": 21, "h": 23 } }, - { - "filename": "iron", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 263, - "y": 261, - "w": 16, - "h": 24 - } - }, { "filename": "steel_tera_shard", "rotated": false, @@ -5211,8 +5106,8 @@ "h": 23 }, "frame": { - "x": 279, - "y": 262, + "x": 212, + "y": 260, "w": 22, "h": 23 } @@ -5232,8 +5127,8 @@ "h": 23 }, "frame": { - "x": 301, - "y": 263, + "x": 234, + "y": 260, "w": 22, "h": 23 } @@ -5253,14 +5148,14 @@ "h": 23 }, "frame": { - "x": 323, - "y": 263, + "x": 256, + "y": 261, "w": 23, "h": 23 } }, { - "filename": "lure", + "filename": "twisted_spoon", "rotated": false, "trimmed": true, "sourceSize": { @@ -5268,16 +5163,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 17, - "h": 24 + "x": 4, + "y": 5, + "w": 24, + "h": 23 }, "frame": { - "x": 346, - "y": 267, - "w": 17, - "h": 24 + "x": 279, + "y": 261, + "w": 24, + "h": 23 } }, { @@ -5295,8 +5190,8 @@ "h": 23 }, "frame": { - "x": 0, - "y": 278, + "x": 303, + "y": 262, "w": 22, "h": 23 } @@ -5316,14 +5211,14 @@ "h": 23 }, "frame": { - "x": 22, - "y": 280, + "x": 325, + "y": 264, "w": 21, "h": 23 } }, { - "filename": "twisted_spoon", + "filename": "carbos", "rotated": false, "trimmed": true, "sourceSize": { @@ -5331,57 +5226,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, - "y": 5, - "w": 24, - "h": 23 - }, - "frame": { - "x": 43, - "y": 281, - "w": 24, - "h": 23 - } - }, - { - "filename": "big_root", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, + "x": 8, "y": 4, - "w": 23, + "w": 16, "h": 24 }, "frame": { - "x": 67, - "y": 281, - "w": 23, - "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": 90, - "y": 281, - "w": 18, + "x": 346, + "y": 264, + "w": 16, "h": 24 } }, @@ -5400,12 +5253,33 @@ "h": 24 }, "frame": { - "x": 108, - "y": 282, + "x": 0, + "y": 278, "w": 21, "h": 24 } }, + { + "filename": "big_root", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 23, + "h": 24 + }, + "frame": { + "x": 21, + "y": 280, + "w": 23, + "h": 24 + } + }, { "filename": "choice_scarf", "rotated": false, @@ -5421,14 +5295,14 @@ "h": 24 }, "frame": { - "x": 129, - "y": 282, + "x": 44, + "y": 281, "w": 24, "h": 24 } }, { - "filename": "max_ether", + "filename": "elixir", "rotated": false, "trimmed": true, "sourceSize": { @@ -5442,8 +5316,29 @@ "h": 24 }, "frame": { - "x": 153, - "y": 282, + "x": 68, + "y": 281, + "w": 18, + "h": 24 + } + }, + { + "filename": "ether", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 86, + "y": 281, "w": 18, "h": 24 } @@ -5463,14 +5358,14 @@ "h": 24 }, "frame": { - "x": 171, - "y": 283, + "x": 104, + "y": 281, "w": 24, "h": 24 } }, { - "filename": "kings_rock", + "filename": "full_restore", "rotated": false, "trimmed": true, "sourceSize": { @@ -5478,15 +5373,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 5, + "x": 7, "y": 4, - "w": 23, + "w": 18, "h": 24 }, "frame": { - "x": 195, - "y": 283, - "w": 23, + "x": 128, + "y": 281, + "w": 18, "h": 24 } }, @@ -5505,33 +5400,12 @@ "h": 24 }, "frame": { - "x": 218, - "y": 284, + "x": 146, + "y": 282, "w": 24, "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": 242, - "y": 284, - "w": 17, - "h": 24 - } - }, { "filename": "gracidea", "rotated": false, @@ -5547,33 +5421,12 @@ "h": 24 }, "frame": { - "x": 259, - "y": 285, + "x": 170, + "y": 283, "w": 24, "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": 283, - "y": 285, - "w": 18, - "h": 24 - } - }, { "filename": "grip_claw", "rotated": false, @@ -5589,35 +5442,14 @@ "h": 24 }, "frame": { - "x": 301, - "y": 286, + "x": 194, + "y": 283, "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": 325, - "y": 286, - "w": 21, - "h": 24 - } - }, - { - "filename": "pp_max", + "filename": "hp_up", "rotated": false, "trimmed": true, "sourceSize": { @@ -5631,14 +5463,35 @@ "h": 24 }, "frame": { - "x": 346, - "y": 291, + "x": 218, + "y": 283, "w": 16, "h": 24 } }, { - "filename": "max_revive", + "filename": "iron", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 234, + "y": 283, + "w": 16, + "h": 24 + } + }, + { + "filename": "kings_rock", "rotated": false, "trimmed": true, "sourceSize": { @@ -5648,34 +5501,13 @@ "spriteSourceSize": { "x": 5, "y": 4, - "w": 22, + "w": 23, "h": 24 }, "frame": { - "x": 0, - "y": 301, - "w": 22, - "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": 22, - "y": 303, - "w": 16, + "x": 250, + "y": 284, + "w": 23, "h": 24 } }, @@ -5694,8 +5526,8 @@ "h": 24 }, "frame": { - "x": 38, - "y": 304, + "x": 273, + "y": 284, "w": 24, "h": 24 } @@ -5715,33 +5547,12 @@ "h": 24 }, "frame": { - "x": 62, - "y": 305, + "x": 297, + "y": 285, "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": 86, - "y": 305, - "w": 16, - "h": 24 - } - }, { "filename": "lucky_punch_master", "rotated": false, @@ -5757,12 +5568,54 @@ "h": 24 }, "frame": { - "x": 102, - "y": 306, + "x": 321, + "y": 287, "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": 345, + "y": 288, + "w": 17, + "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": 0, + "y": 302, + "w": 18, + "h": 24 + } + }, { "filename": "lucky_punch_ultra", "rotated": false, @@ -5778,33 +5631,12 @@ "h": 24 }, "frame": { - "x": 126, - "y": 306, + "x": 18, + "y": 304, "w": 24, "h": 24 } }, - { - "filename": "red_orb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 20, - "h": 24 - }, - "frame": { - "x": 150, - "y": 306, - "w": 20, - "h": 24 - } - }, { "filename": "lustrous_globe", "rotated": false, @@ -5820,12 +5652,96 @@ "h": 24 }, "frame": { - "x": 170, - "y": 307, + "x": 42, + "y": 305, "w": 24, "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": 66, + "y": 305, + "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": 84, + "y": 305, + "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": 101, + "y": 305, + "w": 18, + "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": 119, + "y": 305, + "w": 22, + "h": 24 + } + }, { "filename": "muscle_band", "rotated": false, @@ -5841,14 +5757,14 @@ "h": 24 }, "frame": { - "x": 194, - "y": 307, + "x": 141, + "y": 306, "w": 24, "h": 24 } }, { - "filename": "reveal_glass", + "filename": "oval_charm", "rotated": false, "trimmed": true, "sourceSize": { @@ -5856,20 +5772,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, + "x": 6, "y": 4, - "w": 23, + "w": 21, "h": 24 }, "frame": { - "x": 218, - "y": 308, - "w": 23, + "x": 165, + "y": 307, + "w": 21, "h": 24 } }, { - "filename": "super_lure", + "filename": "pp_max", "rotated": false, "trimmed": true, "sourceSize": { @@ -5879,18 +5795,18 @@ "spriteSourceSize": { "x": 8, "y": 4, - "w": 17, + "w": 16, "h": 24 }, "frame": { - "x": 241, - "y": 308, - "w": 17, + "x": 186, + "y": 307, + "w": 16, "h": 24 } }, { - "filename": "salac_berry", + "filename": "pp_up", "rotated": false, "trimmed": true, "sourceSize": { @@ -5898,15 +5814,36 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, + "x": 8, "y": 4, - "w": 24, + "w": 16, "h": 24 }, "frame": { - "x": 258, - "y": 309, - "w": 24, + "x": 202, + "y": 307, + "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": 218, + "y": 307, + "w": 16, "h": 24 } }, @@ -5925,12 +5862,75 @@ "h": 24 }, "frame": { - "x": 282, - "y": 309, + "x": 234, + "y": 307, "w": 16, "h": 24 } }, + { + "filename": "red_orb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 4, + "w": 20, + "h": 24 + }, + "frame": { + "x": 250, + "y": 308, + "w": 20, + "h": 24 + } + }, + { + "filename": "reveal_glass", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 23, + "h": 24 + }, + "frame": { + "x": 270, + "y": 308, + "w": 23, + "h": 24 + } + }, + { + "filename": "salac_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 24, + "h": 24 + }, + "frame": { + "x": 293, + "y": 309, + "w": 24, + "h": 24 + } + }, { "filename": "scanner", "rotated": false, @@ -5946,8 +5946,8 @@ "h": 24 }, "frame": { - "x": 298, - "y": 310, + "x": 317, + "y": 311, "w": 24, "h": 24 } @@ -5967,14 +5967,14 @@ "h": 24 }, "frame": { - "x": 322, - "y": 310, + "x": 341, + "y": 312, "w": 21, "h": 24 } }, { - "filename": "zinc", + "filename": "super_lure", "rotated": false, "trimmed": true, "sourceSize": { @@ -5984,35 +5984,14 @@ "spriteSourceSize": { "x": 8, "y": 4, - "w": 16, + "w": 17, "h": 24 }, - "frame": { - "x": 343, - "y": 315, - "w": 16, - "h": 24 - } - }, - { - "filename": "black_augurite", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 3, - "w": 22, - "h": 25 - }, "frame": { "x": 0, - "y": 325, - "w": 22, - "h": 25 + "y": 326, + "w": 17, + "h": 24 } }, { @@ -6030,7 +6009,7 @@ "h": 24 }, "frame": { - "x": 22, + "x": 17, "y": 328, "w": 24, "h": 24 @@ -6051,12 +6030,54 @@ "h": 24 }, "frame": { - "x": 46, + "x": 41, "y": 329, "w": 24, "h": 24 } }, + { + "filename": "zinc", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 65, + "y": 329, + "w": 16, + "h": 24 + } + }, + { + "filename": "black_augurite", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 3, + "w": 22, + "h": 25 + }, + "frame": { + "x": 81, + "y": 329, + "w": 22, + "h": 25 + } + }, { "filename": "ability_charm", "rotated": false, @@ -6072,7 +6093,7 @@ "h": 26 }, "frame": { - "x": 70, + "x": 103, "y": 329, "w": 23, "h": 26 @@ -6093,7 +6114,7 @@ "h": 26 }, "frame": { - "x": 93, + "x": 126, "y": 330, "w": 24, "h": 26 @@ -6114,8 +6135,8 @@ "h": 26 }, "frame": { - "x": 117, - "y": 330, + "x": 150, + "y": 331, "w": 27, "h": 26 } @@ -6135,7 +6156,7 @@ "h": 27 }, "frame": { - "x": 144, + "x": 177, "y": 331, "w": 32, "h": 27 @@ -6156,7 +6177,7 @@ "h": 28 }, "frame": { - "x": 176, + "x": 209, "y": 331, "w": 29, "h": 28 @@ -6177,7 +6198,7 @@ "h": 30 }, "frame": { - "x": 205, + "x": 238, "y": 332, "w": 29, "h": 30 @@ -6198,7 +6219,7 @@ "h": 30 }, "frame": { - "x": 234, + "x": 267, "y": 332, "w": 17, "h": 30 @@ -6219,7 +6240,7 @@ "h": 31 }, "frame": { - "x": 251, + "x": 284, "y": 333, "w": 17, "h": 31 @@ -6240,8 +6261,8 @@ "h": 31 }, "frame": { - "x": 268, - "y": 333, + "x": 301, + "y": 335, "w": 17, "h": 31 } @@ -6261,8 +6282,8 @@ "h": 31 }, "frame": { - "x": 285, - "y": 334, + "x": 318, + "y": 335, "w": 17, "h": 31 } @@ -6273,6 +6294,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:5ab498fb5756f6f3ed6458778d4a7912:435716626779d00fcd5755de13141d94:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:da9dfa54efbac3ab6ffcd5af17456fde:e4349d6f3768c4e71bbf3e8b1c7f9f12:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index 4664afc49..590fe3f13 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/rb.png b/public/images/items/rb.png new file mode 100644 index 000000000..c62e1bff2 Binary files /dev/null and b/public/images/items/rb.png differ diff --git a/public/images/pb.json b/public/images/pb.json index 2b2b8cf9b..c45d722e2 100644 --- a/public/images/pb.json +++ b/public/images/pb.json @@ -4,8 +4,8 @@ "image": "pb.png", "format": "RGBA8888", "size": { - "w": 14, - "h": 245 + "w": 12, + "h": 246 }, "scale": 1, "frames": [ @@ -24,8 +24,8 @@ "h": 16 }, "frame": { - "x": 1, - "y": 1, + "x": 0, + "y": 0, "w": 12, "h": 16 } @@ -45,8 +45,8 @@ "h": 16 }, "frame": { - "x": 1, - "y": 19, + "x": 0, + "y": 16, "w": 12, "h": 16 } @@ -66,8 +66,8 @@ "h": 16 }, "frame": { - "x": 1, - "y": 37, + "x": 0, + "y": 32, "w": 12, "h": 16 } @@ -87,8 +87,29 @@ "h": 16 }, "frame": { - "x": 1, - "y": 55, + "x": 0, + "y": 48, + "w": 12, + "h": 16 + } + }, + { + "filename": "rb_open", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 12, + "h": 16 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 12, + "h": 16 + }, + "frame": { + "x": 0, + "y": 64, "w": 12, "h": 16 } @@ -108,8 +129,8 @@ "h": 16 }, "frame": { - "x": 1, - "y": 73, + "x": 0, + "y": 80, "w": 12, "h": 16 } @@ -124,15 +145,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 2, + "y": 3, "w": 12, - "h": 14 + "h": 13 }, "frame": { - "x": 1, - "y": 91, + "x": 0, + "y": 96, "w": 12, - "h": 14 + "h": 13 } }, { @@ -145,15 +166,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 2, + "y": 3, "w": 12, - "h": 14 + "h": 13 }, "frame": { - "x": 1, - "y": 107, + "x": 0, + "y": 109, "w": 12, - "h": 14 + "h": 13 } }, { @@ -166,15 +187,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 2, + "y": 3, "w": 12, - "h": 14 + "h": 13 }, "frame": { - "x": 1, - "y": 123, + "x": 0, + "y": 122, "w": 12, - "h": 14 + "h": 13 } }, { @@ -187,15 +208,36 @@ }, "spriteSourceSize": { "x": 0, - "y": 2, + "y": 3, "w": 12, - "h": 14 + "h": 13 }, "frame": { - "x": 1, - "y": 139, + "x": 0, + "y": 135, "w": 12, - "h": 14 + "h": 13 + } + }, + { + "filename": "rb_opening", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 12, + "h": 16 + }, + "spriteSourceSize": { + "x": 0, + "y": 3, + "w": 12, + "h": 13 + }, + "frame": { + "x": 0, + "y": 148, + "w": 12, + "h": 13 } }, { @@ -208,15 +250,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 2, + "y": 3, "w": 12, - "h": 14 + "h": 13 }, "frame": { - "x": 1, - "y": 155, + "x": 0, + "y": 161, "w": 12, - "h": 14 + "h": 13 } }, { @@ -229,15 +271,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 3, + "y": 4, "w": 12, - "h": 13 + "h": 12 }, "frame": { - "x": 1, - "y": 171, + "x": 0, + "y": 174, "w": 12, - "h": 13 + "h": 12 } }, { @@ -250,15 +292,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 3, + "y": 4, "w": 12, - "h": 13 + "h": 12 }, "frame": { - "x": 1, + "x": 0, "y": 186, "w": 12, - "h": 13 + "h": 12 } }, { @@ -271,15 +313,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 3, + "y": 4, "w": 12, - "h": 13 + "h": 12 }, "frame": { - "x": 1, - "y": 201, + "x": 0, + "y": 198, "w": 12, - "h": 13 + "h": 12 } }, { @@ -292,15 +334,36 @@ }, "spriteSourceSize": { "x": 0, - "y": 3, + "y": 4, "w": 12, - "h": 13 + "h": 12 }, "frame": { - "x": 1, - "y": 216, + "x": 0, + "y": 210, "w": 12, - "h": 13 + "h": 12 + } + }, + { + "filename": "rb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 12, + "h": 16 + }, + "spriteSourceSize": { + "x": 0, + "y": 4, + "w": 12, + "h": 12 + }, + "frame": { + "x": 0, + "y": 222, + "w": 12, + "h": 12 } }, { @@ -313,15 +376,15 @@ }, "spriteSourceSize": { "x": 0, - "y": 3, + "y": 4, "w": 12, - "h": 13 + "h": 12 }, "frame": { - "x": 1, - "y": 231, + "x": 0, + "y": 234, "w": 12, - "h": 13 + "h": 12 } } ] @@ -330,6 +393,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:c08fee07b4a02d4a278d0b9e81cafea9:8bb540e5126337d0b85e58b6cfcef619:8bcd206ed4f9371dcc2f2cbe354ed6ed$" + "smartupdate": "$TexturePacker:SmartUpdate:d0201027b060060859e6dd538ff09720:06e35198d6d176c5d754233d7a871f7c:8bcd206ed4f9371dcc2f2cbe354ed6ed$" } } diff --git a/public/images/pb.png b/public/images/pb.png index b65be2646..c82530404 100644 Binary files a/public/images/pb.png and b/public/images/pb.png differ diff --git a/public/images/pokeball/rb.png b/public/images/pokeball/rb.png new file mode 100644 index 000000000..f972d83fc Binary files /dev/null and b/public/images/pokeball/rb.png differ diff --git a/public/images/pokeball/rb_open.png b/public/images/pokeball/rb_open.png new file mode 100644 index 000000000..b91b547d8 Binary files /dev/null and b/public/images/pokeball/rb_open.png differ diff --git a/public/images/pokeball/rb_opening.png b/public/images/pokeball/rb_opening.png new file mode 100644 index 000000000..21075b528 Binary files /dev/null and b/public/images/pokeball/rb_opening.png differ diff --git a/src/anims.ts b/src/anims.ts index b8c7b853e..364a3136c 100644 --- a/src/anims.ts +++ b/src/anims.ts @@ -11,6 +11,7 @@ export function addPokeballOpenParticles(scene: BattleScene, x: number, y: numbe doDefaultPbOpenParticles(scene, x, y, 96); break; case PokeballType.ULTRA_BALL: + case PokeballType.ROGUE_BALL: doUbOpenParticles(scene, x, y); break; case PokeballType.MASTER_BALL: diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 9acb74b7f..dc22ba71d 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1171,7 +1171,7 @@ export default class BattleScene extends Phaser.Scene { else if (this.isButtonPressed(Button.CANCEL)) { inputSuccess = this.ui.processInput(Button.CANCEL); } else if (this.isButtonPressed(Button.MENU)) { - switch (this.ui.getMode()) { + switch (this.ui?.getMode()) { case Mode.MESSAGE: if (!(this.ui.getHandler() as MessageUiHandler).pendingPrompt) return; @@ -1213,13 +1213,13 @@ export default class BattleScene extends Phaser.Scene { } else if (this.isButtonPressed(Button.SPEED_UP)) { if (this.gameSpeed < 5) { this.gameData.saveSetting(Setting.Game_Speed, settingOptions[Setting.Game_Speed].indexOf(`${this.gameSpeed}x`) + 1); - if (this.ui.getMode() === Mode.SETTINGS) + if (this.ui?.getMode() === Mode.SETTINGS) (this.ui.getHandler() as SettingsUiHandler).show([]); } } else if (this.isButtonPressed(Button.SLOW_DOWN)) { if (this.gameSpeed > 1) { this.gameData.saveSetting(Setting.Game_Speed, Math.max(settingOptions[Setting.Game_Speed].indexOf(`${this.gameSpeed}x`) - 1, 0)); - if (this.ui.getMode() === Mode.SETTINGS) + if (this.ui?.getMode() === Mode.SETTINGS) (this.ui.getHandler() as SettingsUiHandler).show([]); } } else diff --git a/src/data/egg.ts b/src/data/egg.ts index 9e38db093..28626ef2a 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -1,9 +1,9 @@ -import { ModifierTier } from "../modifier/modifier-tier"; import { Type } from "./type"; import * as Utils from "../utils"; import BattleScene from "../battle-scene"; import { Species } from "./enums/species"; import { getPokemonSpecies, speciesStarters } from "./pokemon-species"; +import { EggTier } from "./enums/egg-type"; export const EGG_SEED = 1073741824; @@ -15,7 +15,7 @@ export enum GachaType { export class Egg { public id: integer; - public tier: ModifierTier; + public tier: EggTier; public gachaType: GachaType; public hatchWaves: integer; public timestamp: integer; @@ -29,7 +29,7 @@ export class Egg { } isManaphyEgg(): boolean { - return this.tier === ModifierTier.COMMON && !(this.id % 255); + return this.tier === EggTier.COMMON && !(this.id % 255); } getKey(): string { @@ -39,13 +39,13 @@ export class Egg { } } -export function getEggTierDefaultHatchWaves(tier: ModifierTier): integer { +export function getEggTierDefaultHatchWaves(tier: EggTier): integer { switch (tier) { - case ModifierTier.COMMON: + case EggTier.COMMON: return 10; - case ModifierTier.GREAT: + case EggTier.GREAT: return 25; - case ModifierTier.ULTRA: + case EggTier.ULTRA: return 50; } return 100; @@ -55,11 +55,11 @@ export function getEggDescriptor(egg: Egg): string { if (egg.isManaphyEgg()) return 'Manaphy'; switch (egg.tier) { - case ModifierTier.GREAT: + case EggTier.GREAT: return 'Rare'; - case ModifierTier.ULTRA: + case EggTier.ULTRA: return 'Epic'; - case ModifierTier.MASTER: + case EggTier.MASTER: return 'Legendary'; default: return 'Common'; diff --git a/src/data/enums/egg-type.ts b/src/data/enums/egg-type.ts new file mode 100644 index 000000000..cd845a0d2 --- /dev/null +++ b/src/data/enums/egg-type.ts @@ -0,0 +1,6 @@ +export enum EggTier { + COMMON, + GREAT, + ULTRA, + MASTER +} \ No newline at end of file diff --git a/src/data/pokeball.ts b/src/data/pokeball.ts index ca36287a6..45775f33d 100644 --- a/src/data/pokeball.ts +++ b/src/data/pokeball.ts @@ -4,6 +4,7 @@ export enum PokeballType { POKEBALL, GREAT_BALL, ULTRA_BALL, + ROGUE_BALL, MASTER_BALL, LUXURY_BALL }; @@ -16,6 +17,8 @@ export function getPokeballAtlasKey(type: PokeballType): string { return 'gb'; case PokeballType.ULTRA_BALL: return 'ub'; + case PokeballType.ROGUE_BALL: + return 'rb'; case PokeballType.MASTER_BALL: return 'mb'; case PokeballType.LUXURY_BALL: @@ -35,6 +38,9 @@ export function getPokeballName(type: PokeballType): string { case PokeballType.ULTRA_BALL: ret = 'Ultra Ball'; break; + case PokeballType.ROGUE_BALL: + ret = 'Rogue Ball'; + break; case PokeballType.MASTER_BALL: ret = 'Master Ball'; break; @@ -53,6 +59,8 @@ export function getPokeballCatchMultiplier(type: PokeballType): number { return 1.5; case PokeballType.ULTRA_BALL: return 2; + case PokeballType.ROGUE_BALL: + return 3; case PokeballType.MASTER_BALL: return -1; case PokeballType.LUXURY_BALL: @@ -68,6 +76,8 @@ export function getPokeballTintColor(type: PokeballType): number { return 0x94b4de; case PokeballType.ULTRA_BALL: return 0xe6cd31; + case PokeballType.ROGUE_BALL: + return 0xd52929; case PokeballType.MASTER_BALL: return 0xa441bd; case PokeballType.LUXURY_BALL: diff --git a/src/egg-hatch-phase.ts b/src/egg-hatch-phase.ts index 19a29f1d8..c7e692951 100644 --- a/src/egg-hatch-phase.ts +++ b/src/egg-hatch-phase.ts @@ -5,7 +5,6 @@ import * as Utils from "./utils"; import { Mode } from "./ui/ui"; import { EGG_SEED, Egg, GachaType, getLegendaryGachaSpeciesForTimestamp, getTypeGachaTypeForTimestamp } from "./data/egg"; import EggHatchSceneHandler from "./ui/egg-hatch-scene-handler"; -import { ModifierTier } from "./modifier/modifier-tier"; import { Species } from "./data/enums/species"; import { PlayerPokemon } from "./pokemon"; import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species"; @@ -16,6 +15,7 @@ import { achvs } from "./system/achv"; import { addWindow } from "./ui/window"; import { getNatureName } from "./data/nature"; import { pokemonPrevolutions } from "./data/pokemon-evolutions"; +import { EggTier } from "./data/enums/egg-type"; export class EggHatchPhase extends Phase { private egg: Egg; @@ -375,7 +375,7 @@ export class EggHatchPhase extends Phase { speciesOverride = rand ? Species.PHIONE : Species.MANAPHY; }, this.egg.id, EGG_SEED.toString()); - } else if (this.egg.tier === ModifierTier.MASTER + } else if (this.egg.tier === EggTier.MASTER && this.egg.gachaType === GachaType.LEGENDARY) { this.scene.executeWithSeedOffset(() => { if (!Utils.randSeedInt(2)) @@ -393,15 +393,15 @@ export class EggHatchPhase extends Phase { let maxStarterValue: integer; switch (this.egg.tier) { - case ModifierTier.GREAT: + case EggTier.GREAT: minStarterValue = 4; maxStarterValue = 5; break; - case ModifierTier.ULTRA: + case EggTier.ULTRA: minStarterValue = 6; maxStarterValue = 7; break; - case ModifierTier.MASTER: + case EggTier.MASTER: minStarterValue = 8; maxStarterValue = 9; break; diff --git a/src/modifier/modifier-tier.ts b/src/modifier/modifier-tier.ts index 27292e47f..ab9ae9989 100644 --- a/src/modifier/modifier-tier.ts +++ b/src/modifier/modifier-tier.ts @@ -2,6 +2,7 @@ export enum ModifierTier { COMMON, GREAT, ULTRA, + ROGUE, MASTER, LUXURY } \ No newline at end of file diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index cc78aa253..c27935e3e 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -20,6 +20,9 @@ import { VoucherType, getVoucherTypeIcon, getVoucherTypeName } from '../system/v import { FormChangeItem, SpeciesFormChangeItemTrigger, pokemonFormChanges } from '../data/pokemon-forms'; import { ModifierTier } from './modifier-tier'; +const outputModifierData = false; +const useMaxWeightForOutput = false; + type Modifier = Modifiers.Modifier; export enum ModifierPoolType { @@ -678,11 +681,13 @@ type WeightedModifierTypeWeightFunc = (party: Pokemon[]) => integer; class WeightedModifierType { public modifierType: ModifierType; public weight: integer | WeightedModifierTypeWeightFunc; + public maxWeight: integer; - constructor(modifierTypeFunc: ModifierTypeFunc, weight: integer | WeightedModifierTypeWeightFunc) { + constructor(modifierTypeFunc: ModifierTypeFunc, weight: integer | WeightedModifierTypeWeightFunc, maxWeight?: integer) { this.modifierType = modifierTypeFunc(); this.modifierType.id = Object.keys(modifierTypes).find(k => modifierTypes[k] === modifierTypeFunc); this.weight = weight; + this.maxWeight = maxWeight || (!(weight instanceof Function) ? weight : 0); } setTier(tier: ModifierTier) { @@ -694,6 +699,7 @@ export const modifierTypes = { POKEBALL: () => new AddPokeballModifierType(PokeballType.POKEBALL, 5, 'pb'), GREAT_BALL: () => new AddPokeballModifierType(PokeballType.GREAT_BALL, 5, 'gb'), ULTRA_BALL: () => new AddPokeballModifierType(PokeballType.ULTRA_BALL, 5, 'ub'), + ROGUE_BALL: () => new AddPokeballModifierType(PokeballType.ROGUE_BALL, 5, 'rb'), MASTER_BALL: () => new AddPokeballModifierType(PokeballType.MASTER_BALL, 1, 'mb'), RARE_CANDY: () => new PokemonLevelIncrementModifierType('Rare Candy'), @@ -878,19 +884,19 @@ const modifierPool = { new WeightedModifierType(modifierTypes.POTION, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.getInverseHp() >= 10 || p.getHpRatio() <= 0.875).length, 3); return thresholdPartyMemberCount * 3; - }), + }, 9), new WeightedModifierType(modifierTypes.SUPER_POTION, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.getInverseHp() >= 25 || p.getHpRatio() <= 0.75).length, 3); return thresholdPartyMemberCount; - }), + }, 3), new WeightedModifierType(modifierTypes.ETHER, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMove().pp - m.ppUsed) <= 5).length).length, 3); return thresholdPartyMemberCount * 3; - }), + }, 9), new WeightedModifierType(modifierTypes.MAX_ETHER, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMove().pp - m.ppUsed) <= 5).length).length, 3); return thresholdPartyMemberCount; - }), + }, 3), new WeightedModifierType(modifierTypes.LURE, 2), new WeightedModifierType(modifierTypes.TEMP_STAT_BOOSTER, 4), new WeightedModifierType(modifierTypes.BERRY, 2), @@ -898,110 +904,110 @@ const modifierPool = { ].map(m => { m.setTier(ModifierTier.COMMON); return m; }), [ModifierTier.GREAT]: [ new WeightedModifierType(modifierTypes.GREAT_BALL, 6), - new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, 2), new WeightedModifierType(modifierTypes.FULL_HEAL, (party: Pokemon[]) => { const statusEffectPartyMemberCount = Math.min(party.filter(p => p.hp && !!p.status).length, 3); return statusEffectPartyMemberCount * 6; - }), + }, 18), new WeightedModifierType(modifierTypes.REVIVE, (party: Pokemon[]) => { const faintedPartyMemberCount = Math.min(party.filter(p => p.isFainted()).length, 3); return faintedPartyMemberCount * 9; - }), + }, 3), new WeightedModifierType(modifierTypes.MAX_REVIVE, (party: Pokemon[]) => { const faintedPartyMemberCount = Math.min(party.filter(p => p.isFainted()).length, 3); return faintedPartyMemberCount * 3; - }), + }, 9), new WeightedModifierType(modifierTypes.SACRED_ASH, (party: Pokemon[]) => { return party.filter(p => p.isFainted()).length >= Math.ceil(party.length / 2) ? 1 : 0; - }), + }, 1), new WeightedModifierType(modifierTypes.HYPER_POTION, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.getInverseHp() >= 100 || p.getHpRatio() <= 0.625).length, 3); return thresholdPartyMemberCount * 3; - }), + }, 9), new WeightedModifierType(modifierTypes.MAX_POTION, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.getInverseHp() >= 150 || p.getHpRatio() <= 0.5).length, 3); return thresholdPartyMemberCount; - }), + }, 3), new WeightedModifierType(modifierTypes.FULL_RESTORE, (party: Pokemon[]) => { const statusEffectPartyMemberCount = Math.min(party.filter(p => p.hp && !!p.status).length, 3); const thresholdPartyMemberCount = Math.floor((Math.min(party.filter(p => p.getInverseHp() >= 150 || p.getHpRatio() <= 0.5).length, 3) + statusEffectPartyMemberCount) / 2); return thresholdPartyMemberCount; - }), + }, 3), new WeightedModifierType(modifierTypes.ELIXIR, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMove().pp - m.ppUsed) <= 5).length).length, 3); return thresholdPartyMemberCount * 3; - }), + }, 9), new WeightedModifierType(modifierTypes.MAX_ELIXIR, (party: Pokemon[]) => { const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMove().pp - m.ppUsed) <= 5).length).length, 3); return thresholdPartyMemberCount; - }), + }, 3), new WeightedModifierType(modifierTypes.SUPER_LURE, 4), new WeightedModifierType(modifierTypes.NUGGET, 5), - new WeightedModifierType(modifierTypes.BIG_NUGGET, 1), - new WeightedModifierType(modifierTypes.MAP, (party: Pokemon[]) => party[0].scene.gameMode === GameMode.CLASSIC ? 1 : 0), + new WeightedModifierType(modifierTypes.MAP, (party: Pokemon[]) => party[0].scene.gameMode === GameMode.CLASSIC ? 1 : 0, 1), new WeightedModifierType(modifierTypes.TM_GREAT, 2), - new WeightedModifierType(modifierTypes.EXP_SHARE, 1), - new WeightedModifierType(modifierTypes.AMULET_COIN, 1), - new WeightedModifierType(modifierTypes.EXP_CHARM, 2), new WeightedModifierType(modifierTypes.MEMORY_MUSHROOM, (party: Pokemon[]) => { if (!party.find(p => p.getLearnableLevelMoves().length)) return 0; const highestPartyLevel = party.map(p => p.level).reduce((highestLevel: integer, level: integer) => Math.max(highestLevel, level), 1); return Math.min(Math.ceil(highestPartyLevel / 20), 4); - }), + }, 4), new WeightedModifierType(modifierTypes.BASE_STAT_BOOSTER, 3), new WeightedModifierType(modifierTypes.TERA_SHARD, 1), new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode === GameMode.SPLICED_ENDLESS && party.filter(p => !p.fusionSpecies).length > 1 ? 4 : 0), new WeightedModifierType(modifierTypes.REVERSE_DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode === GameMode.SPLICED_ENDLESS && party.filter(p => p.fusionSpecies).length ? 6 : 0), ].map(m => { m.setTier(ModifierTier.GREAT); return m; }), [ModifierTier.ULTRA]: [ - new WeightedModifierType(modifierTypes.ULTRA_BALL, 8), + new WeightedModifierType(modifierTypes.ULTRA_BALL, 24), new WeightedModifierType(modifierTypes.MAX_LURE, 4), - new WeightedModifierType(modifierTypes.RELIC_GOLD, 3), - new WeightedModifierType(modifierTypes.PP_UP, 6), - new WeightedModifierType(modifierTypes.PP_MAX, 2), - new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 4), - new WeightedModifierType(modifierTypes.TM_ULTRA, 5), - new WeightedModifierType(modifierTypes.REVIVER_SEED, 3), - new WeightedModifierType(modifierTypes.CANDY_JAR, 3), - new WeightedModifierType(modifierTypes.RARER_CANDY, 3), + new WeightedModifierType(modifierTypes.BIG_NUGGET, 12), + new WeightedModifierType(modifierTypes.PP_UP, 9), + new WeightedModifierType(modifierTypes.PP_MAX, 3), + new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, 16), + new WeightedModifierType(modifierTypes.AMULET_COIN, 3), + new WeightedModifierType(modifierTypes.REVIVER_SEED, 4), + new WeightedModifierType(modifierTypes.CANDY_JAR, 5), + new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 10), + new WeightedModifierType(modifierTypes.TM_ULTRA, 8), + new WeightedModifierType(modifierTypes.RARER_CANDY, 4), new WeightedModifierType(modifierTypes.SOOTHE_BELL, (party: Pokemon[]) => { const friendshipBenefitPartyMemberCount = Math.min(party.filter(p => (pokemonEvolutions.hasOwnProperty(p.species.speciesId) && pokemonEvolutions[p.species.speciesId].find(e => e.condition && e.condition instanceof SpeciesFriendshipEvolutionCondition)) || p.moveset.find(m => m.moveId === Moves.RETURN)).length, 3); return friendshipBenefitPartyMemberCount * 3; - }), - new WeightedModifierType(modifierTypes.SOUL_DEW, 3), + }, 9), + new WeightedModifierType(modifierTypes.SOUL_DEW, 2), new WeightedModifierType(modifierTypes.GOLDEN_PUNCH, 2), - new WeightedModifierType(modifierTypes.GRIP_CLAW, 2), - new WeightedModifierType(modifierTypes.BATON, 1), - new WeightedModifierType(modifierTypes.FOCUS_BAND, 3), - new WeightedModifierType(modifierTypes.KINGS_ROCK, 2), - new WeightedModifierType(modifierTypes.LEFTOVERS, 2), - new WeightedModifierType(modifierTypes.SHELL_BELL, 2), - new WeightedModifierType(modifierTypes.BERRY_POUCH, 3), - new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, 3), - new WeightedModifierType(modifierTypes.OVAL_CHARM, 2), - new WeightedModifierType(modifierTypes.ABILITY_CHARM, 2), new WeightedModifierType(modifierTypes.IV_SCANNER, 2), - new WeightedModifierType(modifierTypes.TERA_ORB, (party: Pokemon[]) => Math.max(Math.floor(party[0].scene.currentBattle.waveIndex / 50) * 2, 1)), + new WeightedModifierType(modifierTypes.EXP_CHARM, 8), + new WeightedModifierType(modifierTypes.EXP_SHARE, 12), new WeightedModifierType(modifierTypes.EXP_BALANCE, 1), - new WeightedModifierType(modifierTypes.FORM_CHANGE_ITEM, 1), - new WeightedModifierType(modifierTypes.REVERSE_DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode !== GameMode.SPLICED_ENDLESS && party.filter(p => p.fusionSpecies).length ? 3 : 0), + new WeightedModifierType(modifierTypes.TERA_ORB, (party: Pokemon[]) => Math.min(Math.max(Math.floor(party[0].scene.currentBattle.waveIndex / 50) * 2, 1), 4), 4), + new WeightedModifierType(modifierTypes.REVERSE_DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode !== GameMode.SPLICED_ENDLESS && party.filter(p => p.fusionSpecies).length ? 3 : 0, 3), new WeightedModifierType(modifierTypes.VOUCHER, 3), ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), + [ModifierTier.ROGUE]: [ + new WeightedModifierType(modifierTypes.ROGUE_BALL, 12), + new WeightedModifierType(modifierTypes.RELIC_GOLD, 3), + new WeightedModifierType(modifierTypes.LEFTOVERS, 1), + new WeightedModifierType(modifierTypes.SHELL_BELL, 1), + new WeightedModifierType(modifierTypes.BERRY_POUCH, 2), + new WeightedModifierType(modifierTypes.GRIP_CLAW, 2), + new WeightedModifierType(modifierTypes.BATON, 1), + //new WeightedModifierType(modifierTypes.OVAL_CHARM, 2), + new WeightedModifierType(modifierTypes.ABILITY_CHARM, 2), + new WeightedModifierType(modifierTypes.FOCUS_BAND, 3), + new WeightedModifierType(modifierTypes.KINGS_ROCK, 2), + new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, 5), + new WeightedModifierType(modifierTypes.FORM_CHANGE_ITEM, 9), + new WeightedModifierType(modifierTypes.MEGA_BRACELET, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 4, 16), + new WeightedModifierType(modifierTypes.DYNAMAX_BAND, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 4, 16), + ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }), [ModifierTier.MASTER]: [ new WeightedModifierType(modifierTypes.MASTER_BALL, 32), new WeightedModifierType(modifierTypes.SHINY_CHARM, 18), new WeightedModifierType(modifierTypes.HEALING_CHARM, 18), - new WeightedModifierType(modifierTypes.VOUCHER_PLUS, 6), - new WeightedModifierType(modifierTypes.MEGA_BRACELET, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 8), - new WeightedModifierType(modifierTypes.DYNAMAX_BAND, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 8), - new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode !== GameMode.SPLICED_ENDLESS && party.filter(p => !p.fusionSpecies).length > 1 ? 12 : 0), - new WeightedModifierType(modifierTypes.MINI_BLACK_HOLE, (party: Pokemon[]) => party[0].scene.gameData.unlocks[Unlockables.MINI_BLACK_HOLE] ? 2 : 0), + new WeightedModifierType(modifierTypes.VOUCHER_PLUS, 8), + new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode !== GameMode.SPLICED_ENDLESS && party.filter(p => !p.fusionSpecies).length > 1 ? 24 : 0, 24), + new WeightedModifierType(modifierTypes.MINI_BLACK_HOLE, (party: Pokemon[]) => party[0].scene.gameData.unlocks[Unlockables.MINI_BLACK_HOLE] ? 1 : 0, 1), ].map(m => { m.setTier(ModifierTier.MASTER); return m; }), [ModifierTier.LUXURY]: [ - new WeightedModifierType(modifierTypes.GOLDEN_EXP_CHARM, 1), - new WeightedModifierType(modifierTypes.GOLDEN_POKEBALL, 1), - new WeightedModifierType(modifierTypes.RARER_CANDY, 1), ].map(m => { m.setTier(ModifierTier.LUXURY); return m; }), }; @@ -1028,19 +1034,20 @@ const trainerModifierPool = { ].map(m => { m.setTier(ModifierTier.COMMON); return m; }), [ModifierTier.GREAT]: [ new WeightedModifierType(modifierTypes.BASE_STAT_BOOSTER, 3), - new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 1), ].map(m => { m.setTier(ModifierTier.GREAT); return m; }), [ModifierTier.ULTRA]: [ + new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 1), + ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), + [ModifierTier.ROGUE]: [ new WeightedModifierType(modifierTypes.REVIVER_SEED, 2), new WeightedModifierType(modifierTypes.FOCUS_BAND, 2), new WeightedModifierType(modifierTypes.LUCKY_EGG, 4), new WeightedModifierType(modifierTypes.GRIP_CLAW, 1), + ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }), + [ModifierTier.MASTER]: [ new WeightedModifierType(modifierTypes.KINGS_ROCK, 1), new WeightedModifierType(modifierTypes.LEFTOVERS, 1), new WeightedModifierType(modifierTypes.SHELL_BELL, 1), - ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), - [ModifierTier.MASTER]: [ - new WeightedModifierType(modifierTypes.GOLDEN_EGG, 1), ].map(m => { m.setTier(ModifierTier.MASTER); return m; }) }; @@ -1074,6 +1081,7 @@ const enemyBuffModifierPool = { new WeightedModifierType(modifierTypes.ENEMY_INSTANT_REVIVE_CHANCE, 5), new WeightedModifierType(modifierTypes.ENEMY_INSTANT_MAX_REVIVE_CHANCE, 3) ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), + [ModifierTier.ROGUE]: [ ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }), [ModifierTier.MASTER]: [ ].map(m => { m.setTier(ModifierTier.MASTER); return m; }) }; @@ -1093,13 +1101,18 @@ let enemyIgnoredPoolIndexes = {}; let enemyBuffModifierPoolThresholds = {}; let enemyBuffIgnoredPoolIndexes = {}; +const tierWeights = [ 769 / 1024, 192 / 1024, 48 / 1024, 12 / 1024, 1 / 1024 ]; + export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: ModifierPoolType) { const player = !poolType; const pool = player ? modifierPool : poolType === ModifierPoolType.WILD ? wildModifierPool : poolType === ModifierPoolType.TRAINER ? trainerModifierPool : enemyBuffModifierPool; const ignoredIndexes = {}; - const thresholds = Object.fromEntries(new Map(Object.keys(pool).map(t => { + const modifierTableData = {}; + const thresholds = Object.fromEntries(new Map(Object.keys(pool).slice(0, -1).map(t => { ignoredIndexes[t] = []; const thresholds = new Map(); + const tierModifierIds: string[] = []; + let tierMaxWeight = 0; let i = 0; pool[t].reduce((total: integer, modifierType: WeightedModifierType) => { const weightedModifierType = modifierType as WeightedModifierType; @@ -1115,6 +1128,13 @@ export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: Mod ? (weightedModifierType.weight as Function)(party) : weightedModifierType.weight as integer : 0; + if (weightedModifierType.maxWeight) { + const modifierId = weightedModifierType.modifierType.generatorId || weightedModifierType.modifierType.id; + tierModifierIds.push(modifierId); + const outputWeight = useMaxWeightForOutput ? weightedModifierType.maxWeight : weight; + modifierTableData[modifierId] = { weight: outputWeight, tier: parseInt(t), tierPercent: 0, totalPercent: 0 }; + tierMaxWeight += outputWeight; + } if (weight) total += weight; else { @@ -1124,8 +1144,16 @@ export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: Mod thresholds.set(total, i++); return total; }, 0); - return [ t, Object.fromEntries(thresholds) ] + for (let id of tierModifierIds) + modifierTableData[id].tierPercent = Math.floor((modifierTableData[id].weight / tierMaxWeight) * 10000) / 100; + return [ t, Object.fromEntries(thresholds) ]; }))); + for (let id of Object.keys(modifierTableData)) { + modifierTableData[id].totalPercent = Math.floor(modifierTableData[id].tierPercent * tierWeights[modifierTableData[id].tier] * 100) / 100; + modifierTableData[id].tier = ModifierTier[modifierTableData[id].tier]; + } + if (outputModifierData) + console.table(modifierTableData); if (player) { modifierPoolThresholds = thresholds; ignoredPoolIndexes = ignoredIndexes; @@ -1144,14 +1172,14 @@ export function getModifierTypeFuncById(id: string): ModifierTypeFunc { export function getPlayerModifierTypeOptionsForWave(waveIndex: integer, count: integer, party: PlayerPokemon[]): ModifierTypeOption[] { if (waveIndex % 10 === 0) - return modifierPool[ModifierTier.LUXURY].filter(m => !(m.weight instanceof Function) || m.weight(party)).map(m => new ModifierTypeOption(m.modifierType, false)); + return modifierPool[ModifierTier.LUXURY].filter(m => !(m.weight instanceof Function) || m.weight(party)).map(m => new ModifierTypeOption(m.modifierType, 0)); const options: ModifierTypeOption[] = []; const retryCount = Math.min(count * 5, 50); new Array(count).fill(0).map(() => { let candidate = getNewModifierTypeOption(party, ModifierPoolType.PLAYER); let r = 0; while (options.length && ++r < retryCount && options.filter(o => o.type.name === candidate.type.name || o.type.group === candidate.type.group).length) - candidate = getNewModifierTypeOption(party, ModifierPoolType.PLAYER, candidate.type.tier, candidate.upgraded); + candidate = getNewModifierTypeOption(party, ModifierPoolType.PLAYER, candidate.type.tier, candidate.upgradeCount); options.push(candidate); }); return options; @@ -1163,31 +1191,31 @@ export function getPlayerShopModifierTypeOptionsForWave(waveIndex: integer, base const options = [ [ - new ModifierTypeOption(modifierTypes.POTION(), false, baseCost * 0.2), - new ModifierTypeOption(modifierTypes.ETHER(), false, baseCost * 0.4), - new ModifierTypeOption(modifierTypes.REVIVE(), false, baseCost * 2) + new ModifierTypeOption(modifierTypes.POTION(), 0, baseCost * 0.2), + new ModifierTypeOption(modifierTypes.ETHER(), 0, baseCost * 0.4), + new ModifierTypeOption(modifierTypes.REVIVE(), 0, baseCost * 2) ], [ - new ModifierTypeOption(modifierTypes.SUPER_POTION(), false, baseCost * 0.45), - new ModifierTypeOption(modifierTypes.ELIXIR(), false, baseCost) + new ModifierTypeOption(modifierTypes.SUPER_POTION(), 0, baseCost * 0.45), + new ModifierTypeOption(modifierTypes.ELIXIR(), 0, baseCost) ], [ - new ModifierTypeOption(modifierTypes.FULL_HEAL(), false, baseCost), - new ModifierTypeOption(modifierTypes.MAX_ETHER(), false, baseCost) + new ModifierTypeOption(modifierTypes.FULL_HEAL(), 0, baseCost), + new ModifierTypeOption(modifierTypes.MAX_ETHER(), 0, baseCost) ], [ - new ModifierTypeOption(modifierTypes.HYPER_POTION(), false, baseCost * 0.8), - new ModifierTypeOption(modifierTypes.MAX_REVIVE(), false, baseCost * 2.75) + new ModifierTypeOption(modifierTypes.HYPER_POTION(), 0, baseCost * 0.8), + new ModifierTypeOption(modifierTypes.MAX_REVIVE(), 0, baseCost * 2.75) ], [ - new ModifierTypeOption(modifierTypes.MAX_POTION(), false, baseCost * 1.5), - new ModifierTypeOption(modifierTypes.MAX_ELIXIR(), false, baseCost * 2.5) + new ModifierTypeOption(modifierTypes.MAX_POTION(), 0, baseCost * 1.5), + new ModifierTypeOption(modifierTypes.MAX_ELIXIR(), 0, baseCost * 2.5) ], [ - new ModifierTypeOption(modifierTypes.FULL_RESTORE(), false, baseCost * 2.25) + new ModifierTypeOption(modifierTypes.FULL_RESTORE(), 0, baseCost * 2.25) ], [ - new ModifierTypeOption(modifierTypes.SACRED_ASH(), false, baseCost * 12) + new ModifierTypeOption(modifierTypes.SACRED_ASH(), 0, baseCost * 12) ] ]; return options.slice(0, Math.ceil(Math.max(waveIndex + 10, 0) / 30)).flat(); @@ -1215,20 +1243,30 @@ export function getEnemyModifierTypesForWave(waveIndex: integer, count: integer, return ret; } -function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType, tier?: ModifierTier, upgrade?: boolean): ModifierTypeOption { +function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType, tier?: ModifierTier, upgradeCount?: integer): ModifierTypeOption { const player = !poolType; const pool = player ? modifierPool : poolType === ModifierPoolType.WILD ? wildModifierPool : poolType === ModifierPoolType.TRAINER ? trainerModifierPool : enemyBuffModifierPool; if (tier === undefined) { - const tierValue = Utils.randSeedInt(256); + const tierValue = Utils.randSeedInt(1024); + upgradeCount = 0; if (player && tierValue) { const partyShinyCount = party.filter(p => p.isShiny() && !p.isFainted()).length; - const upgradeOdds = Math.floor(32 / Math.max((partyShinyCount * 2), 1)); - upgrade = !Utils.randSeedInt(upgradeOdds); - } else - upgrade = false; - tier = (tierValue >= 52 ? ModifierTier.COMMON : tierValue >= 8 ? ModifierTier.GREAT : tierValue >= 1 ? ModifierTier.ULTRA : ModifierTier.MASTER) + (upgrade ? 1 : 0); - while (tier && !modifierPool[tier].length) + const upgradeOdds = Math.floor(32 / ((partyShinyCount + 2) / 2)); + let upgraded = false; + do { + upgraded = !Utils.randSeedInt(upgradeOdds); + if (upgraded) + upgradeCount++; + } while (upgraded); + } + tier = tierValue > 255 ? ModifierTier.COMMON : tierValue > 60 ? ModifierTier.GREAT : tierValue > 12 ? ModifierTier.ULTRA : tierValue ? ModifierTier.ROGUE : ModifierTier.MASTER; + upgradeCount = Math.min(upgradeCount, ModifierTier.MASTER - tier); + tier += upgradeCount; + while (tier && (!modifierPool.hasOwnProperty(tier) || !modifierPool[tier].length)) { tier--; + if (upgradeCount) + upgradeCount--; + } } const thresholds = player ? modifierPoolThresholds : pool !== enemyBuffModifierPool ? enemyModifierPoolThresholds : enemyBuffModifierPoolThresholds; @@ -1251,14 +1289,14 @@ function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType, modifierType = (modifierType as ModifierTypeGenerator).generateType(party); if (modifierType === null) { if (player) - console.log(ModifierTier[tier], upgrade); - return getNewModifierTypeOption(party, poolType, tier, upgrade); + console.log(ModifierTier[tier], upgradeCount); + return getNewModifierTypeOption(party, poolType, tier, upgradeCount); } } console.log(modifierType, !player ? '(enemy)' : ''); - return new ModifierTypeOption(modifierType as ModifierType, upgrade); + return new ModifierTypeOption(modifierType as ModifierType, upgradeCount); } export function getDefaultModifierTypeForTier(tier: ModifierTier): ModifierType { @@ -1270,12 +1308,12 @@ export function getDefaultModifierTypeForTier(tier: ModifierTier): ModifierType export class ModifierTypeOption { public type: ModifierType; - public upgraded: boolean; + public upgradeCount: integer; public cost: integer; - constructor(type: ModifierType, upgraded: boolean, cost: number = 0) { + constructor(type: ModifierType, upgradeCount: integer, cost: number = 0) { this.type = type; - this.upgraded = upgraded; + this.upgradeCount = upgradeCount; this.cost = Math.round(cost); } } \ No newline at end of file diff --git a/src/system/voucher.ts b/src/system/voucher.ts index 09e977dae..c3bae6f08 100644 --- a/src/system/voucher.ts +++ b/src/system/voucher.ts @@ -1,7 +1,7 @@ import BattleScene from "../battle-scene"; import { TrainerType } from "../data/enums/trainer-type"; import { ModifierTier } from "../modifier/modifier-tier"; -import { Achv, achvs } from "./achv"; +import { Achv, AchvTier, achvs } from "./achv"; export enum VoucherType { REGULAR, @@ -35,16 +35,16 @@ export class Voucher { return getVoucherTypeIcon(this.voucherType); } - getTier(): ModifierTier { + getTier(): AchvTier { switch (this.voucherType) { case VoucherType.REGULAR: - return ModifierTier.COMMON; + return AchvTier.COMMON; case VoucherType.PLUS: - return ModifierTier.GREAT; + return AchvTier.GREAT; case VoucherType.PREMIUM: - return ModifierTier.ULTRA; + return AchvTier.ULTRA; case VoucherType.GOLDEN: - return ModifierTier.MASTER; + return AchvTier.MASTER; } } } diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index 4583a0ede..bead7e58f 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -1,6 +1,6 @@ import { CommandPhase } from "../phases"; import BattleScene, { Button } from "../battle-scene"; -import { getPokeballName, PokeballType } from "../data/pokeball"; +import { getPokeballName } from "../data/pokeball"; import { addTextObject, TextStyle } from "./text"; import { Command } from "./command-ui-handler"; import { Mode } from "./ui"; diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index 413f31e50..2c2b823ec 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -1,15 +1,15 @@ import BattleScene, { Button } from "../battle-scene"; import { Mode } from "./ui"; -import { TextStyle, addTextObject, getModifierTierTextTint } from "./text"; +import { TextStyle, addTextObject, getEggTierTextTint } from "./text"; import MessageUiHandler from "./message-ui-handler"; import * as Utils from "../utils"; -import { ModifierTier } from "../modifier/modifier-tier"; import { EGG_SEED, Egg, GachaType, getEggTierDefaultHatchWaves, getEggDescriptor, getLegendaryGachaSpeciesForTimestamp, getTypeGachaTypeForTimestamp } from "../data/egg"; import { VoucherType, getVoucherTypeIcon } from "../system/voucher"; import { getPokemonSpecies } from "../data/pokemon-species"; import { Type } from "../data/type"; import { addWindow } from "./window"; import { Tutorial, handleTutorial } from "../tutorial"; +import { EggTier } from "../data/enums/egg-type"; const defaultText = 'Select a machine.'; @@ -343,13 +343,13 @@ export default class EggGachaUiHandler extends MessageUiHandler { eggs = []; const tierValueOffset = this.gachaCursor === GachaType.LEGENDARY ? 1 : 0; const tiers = new Array(pullCount).fill(null).map(() => { - const tierValue = Utils.randInt(256); - return tierValue >= 52 + tierValueOffset ? ModifierTier.COMMON : tierValue + tierValueOffset >= 8 ? ModifierTier.GREAT : tierValue >= 1 + tierValueOffset ? ModifierTier.ULTRA : ModifierTier.MASTER; + const tierValue = Utils.randInt(1024); + return tierValue >= 52 + tierValueOffset ? EggTier.COMMON : tierValue + tierValueOffset >= 8 ? EggTier.GREAT : tierValue >= 1 + tierValueOffset ? EggTier.ULTRA : EggTier.MASTER; }); - if (pullCount >= 25 && !tiers.filter(t => t >= ModifierTier.ULTRA).length) - tiers[Utils.randInt(tiers.length)] = ModifierTier.ULTRA; - else if (pullCount >= 10 && !tiers.filter(t => t >= ModifierTier.GREAT).length) - tiers[Utils.randInt(tiers.length)] = ModifierTier.GREAT; + if (pullCount >= 25 && !tiers.filter(t => t >= EggTier.ULTRA).length) + tiers[Utils.randInt(tiers.length)] = EggTier.ULTRA; + else if (pullCount >= 10 && !tiers.filter(t => t >= EggTier.GREAT).length) + tiers[Utils.randInt(tiers.length)] = EggTier.GREAT; const timestamp = new Date().getTime(); @@ -357,16 +357,16 @@ export default class EggGachaUiHandler extends MessageUiHandler { const egg = new Egg(Utils.randInt(EGG_SEED, EGG_SEED * tier), this.gachaCursor, getEggTierDefaultHatchWaves(tier), timestamp); if (egg.isManaphyEgg()) { this.scene.gameData.gameStats.manaphyEggsPulled++; - egg.hatchWaves = getEggTierDefaultHatchWaves(ModifierTier.ULTRA); + egg.hatchWaves = getEggTierDefaultHatchWaves(EggTier.ULTRA); } else { switch (tier) { - case ModifierTier.GREAT: + case EggTier.GREAT: this.scene.gameData.gameStats.rareEggsPulled++; break; - case ModifierTier.ULTRA: + case EggTier.ULTRA: this.scene.gameData.gameStats.epicEggsPulled++; break; - case ModifierTier.MASTER: + case EggTier.MASTER: this.scene.gameData.gameStats.legendaryEggsPulled++; break; } @@ -417,7 +417,7 @@ export default class EggGachaUiHandler extends MessageUiHandler { const eggText = addTextObject(this.scene, 0, 14, getEggDescriptor(egg), TextStyle.PARTY, { align: 'center' }); eggText.setOrigin(0.5, 0); - eggText.setTint(getModifierTierTextTint(!egg.isManaphyEgg() ? egg.tier : ModifierTier.ULTRA)); + eggText.setTint(getEggTierTextTint(!egg.isManaphyEgg() ? egg.tier : EggTier.ULTRA)); ret.add(eggText); this.eggGachaSummaryContainer.addAt(ret, 0); diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index 5d0cde552..9728b29c7 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -117,7 +117,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { this.shopOptionsRows[row].push(option); } - const hasUpgrade = typeOptions.filter(to => to.upgraded).length; + const maxUpgradeCount = typeOptions.map(to => to.upgradeCount).reduce((max, current) => Math.max(current, max), 0); this.scene.showFieldOverlay(750); @@ -130,18 +130,19 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { const value = t.getValue(); const index = Math.floor(value * typeOptions.length); if (index > i && index <= typeOptions.length) { - const option = this.options[i++]; - option?.show(Math.floor((1 - value) * 1250) * 0.325 + (hasUpgrade ? 2000 : 0)); + const option = this.options[i]; + option?.show(Math.floor((1 - value) * 1250) * 0.325 + 2000 * maxUpgradeCount, -(maxUpgradeCount - typeOptions[i].upgradeCount)); + i++; } } }); - this.scene.time.delayedCall(1000 + (hasUpgrade ? 2000 : 0), () => { + this.scene.time.delayedCall(1000 + maxUpgradeCount * 2000, () => { for (let shopOption of this.shopOptionsRows.flat()) - shopOption.show(0); + shopOption.show(0, 0); }); - this.scene.time.delayedCall(4000 + (hasUpgrade ? 2000 : 0), () => { + this.scene.time.delayedCall(4000 + maxUpgradeCount * 2000, () => { if (partyHasHeldItem) { this.transferButtonContainer.setAlpha(0); this.transferButtonContainer.setVisible(true); @@ -385,7 +386,7 @@ class ModifierOption extends Phaser.GameObjects.Container { setup() { if (!this.modifierTypeOption.cost) { const getPb = (): Phaser.GameObjects.Sprite => { - const pb = this.scene.add.sprite(0, -182, 'pb', this.getPbAtlasKey(true)); + const pb = this.scene.add.sprite(0, -182, 'pb', this.getPbAtlasKey(-this.modifierTypeOption.upgradeCount)); pb.setScale(2); return pb; }; @@ -434,7 +435,7 @@ class ModifierOption extends Phaser.GameObjects.Container { } } - show(remainingDuration: integer) { + show(remainingDuration: integer, upgradeCountOffset: integer) { if (!this.modifierTypeOption.cost) { this.scene.tweens.add({ targets: this.pb, @@ -465,9 +466,10 @@ class ModifierOption extends Phaser.GameObjects.Container { } }); - if (this.modifierTypeOption.upgraded) { - this.scene.time.delayedCall(remainingDuration, () => { - (this.scene as BattleScene).playSound('upgrade'); + for (let u = 0; u < this.modifierTypeOption.upgradeCount; u++) { + const upgradeIndex = u; + this.scene.time.delayedCall(remainingDuration - 2000 * (this.modifierTypeOption.upgradeCount - (upgradeIndex + 1 + upgradeCountOffset)), () => { + (this.scene as BattleScene).playSound('upgrade', { rate: 1 + 0.25 * upgradeIndex }); this.pbTint.setPosition(this.pb.x, this.pb.y); this.pbTint.setTintFill(0xFFFFFF); this.pbTint.setAlpha(0); @@ -478,11 +480,11 @@ class ModifierOption extends Phaser.GameObjects.Container { duration: 1000, ease: 'Sine.easeIn', onComplete: () => { - this.pb.setTexture('pb', this.getPbAtlasKey(false)); + this.pb.setTexture('pb', this.getPbAtlasKey(-this.modifierTypeOption.upgradeCount + (upgradeIndex + 1))); this.scene.tweens.add({ targets: this.pbTint, alpha: 0, - duration: 1000, + duration: 750, ease: 'Sine.easeOut', onComplete: () => { this.pbTint.setVisible(false); @@ -499,7 +501,7 @@ class ModifierOption extends Phaser.GameObjects.Container { return; if (!this.modifierTypeOption.cost) { - this.pb.setTexture('pb', `${this.getPbAtlasKey(false)}_open`); + this.pb.setTexture('pb', `${this.getPbAtlasKey(0)}_open`); (this.scene as BattleScene).playSound('pb_rel'); this.scene.tweens.add({ @@ -547,8 +549,8 @@ class ModifierOption extends Phaser.GameObjects.Container { }); } - getPbAtlasKey(beforeUpgrade: boolean) { - return getPokeballAtlasKey((this.modifierTypeOption.type.tier - (beforeUpgrade && this.modifierTypeOption.upgraded ? 1 : 0)) as integer as PokeballType); + getPbAtlasKey(tierOffset: integer = 0) { + return getPokeballAtlasKey((this.modifierTypeOption.type.tier + tierOffset) as integer as PokeballType); } updateCostText(): void { diff --git a/src/ui/text.ts b/src/ui/text.ts index 7e1427f09..70c788b37 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -1,6 +1,7 @@ import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; import InputText from "phaser3-rex-plugins/plugins/inputtext"; import { ModifierTier } from "../modifier/modifier-tier"; +import { EggTier } from "../data/enums/egg-type"; export enum TextStyle { MESSAGE, @@ -145,7 +146,7 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean): string { } } -export function getModifierTierTextTint(tier: integer): integer { +export function getModifierTierTextTint(tier: ModifierTier): integer { switch (tier) { case ModifierTier.COMMON: return 0xffffff; @@ -153,9 +154,24 @@ export function getModifierTierTextTint(tier: integer): integer { return 0x3890f8; case ModifierTier.ULTRA: return 0xf8d038; + case ModifierTier.ROGUE: + return 0xd52929; case ModifierTier.MASTER: return 0xe020c0; case ModifierTier.LUXURY: return 0xe64a18; } +} + +export function getEggTierTextTint(tier: EggTier): integer { + switch (tier) { + case EggTier.COMMON: + return getModifierTierTextTint(ModifierTier.COMMON); + case EggTier.GREAT: + return getModifierTierTextTint(ModifierTier.GREAT); + case EggTier.ULTRA: + return getModifierTierTextTint(ModifierTier.ULTRA); + case EggTier.MASTER: + return getModifierTierTextTint(ModifierTier.MASTER); + } } \ No newline at end of file diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 719b87b22..746df09c3 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -326,7 +326,7 @@ export default class UI extends Phaser.GameObjects.Container { }; if (((!chainMode && ((transitionModes.indexOf(this.mode) > -1 || transitionModes.indexOf(mode) > -1) && (noTransitionModes.indexOf(this.mode) === -1 && noTransitionModes.indexOf(mode) === -1))) - || (chainMode && noTransitionModes.indexOf(mode) === -1)) && !(this.scene as BattleScene).auto) { + || (chainMode && noTransitionModes.indexOf(mode) === -1))) { this.fadeOut(250).then(() => { this.scene.time.delayedCall(100, () => { doSetMode();