diff --git a/public/images/items.json b/public/images/items.json index 23ce0ee7133..75212d73307 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -976,28 +976,7 @@ } }, { - "filename": "moon_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 6, - "w": 23, - "h": 21 - }, - "frame": { - "x": 157, - "y": 68, - "w": 23, - "h": 21 - } - }, - { - "filename": "deep_sea_tooth", + "filename": "mini_black_hole", "rotated": false, "trimmed": true, "sourceSize": { @@ -1006,19 +985,19 @@ }, "spriteSourceSize": { "x": 5, - "y": 6, + "y": 5, "w": 22, - "h": 21 + "h": 22 }, "frame": { - "x": 180, + "x": 157, "y": 68, "w": 22, - "h": 21 + "h": 22 } }, { - "filename": "mystic_water", + "filename": "metal_coat", "rotated": false, "trimmed": true, "sourceSize": { @@ -1028,14 +1007,35 @@ "spriteSourceSize": { "x": 6, "y": 5, - "w": 20, - "h": 23 + "w": 19, + "h": 22 }, "frame": { - "x": 202, + "x": 179, + "y": 68, + "w": 19, + "h": 22 + } + }, + { + "filename": "soft_sand", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 7, + "w": 24, + "h": 20 + }, + "frame": { + "x": 198, "y": 66, - "w": 20, - "h": 23 + "w": 24, + "h": 20 } }, { @@ -1059,6 +1059,69 @@ "h": 21 } }, + { + "filename": "choice_specs", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 198, + "y": 86, + "w": 24, + "h": 18 + } + }, + { + "filename": "poison_barb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 222, + "y": 92, + "w": 21, + "h": 21 + } + }, + { + "filename": "moon_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 6, + "w": 23, + "h": 21 + }, + "frame": { + "x": 18, + "y": 98, + "w": 23, + "h": 21 + } + }, { "filename": "protector", "rotated": false, @@ -1075,7 +1138,7 @@ }, "frame": { "x": 18, - "y": 98, + "y": 119, "w": 22, "h": 22 } @@ -1096,34 +1159,13 @@ }, "frame": { "x": 18, - "y": 120, + "y": 141, "w": 22, "h": 22 } }, { - "filename": "tm_bug", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 18, - "y": 142, - "w": 22, - "h": 22 - } - }, - { - "filename": "binding_band", + "filename": "deep_sea_tooth", "rotated": false, "trimmed": true, "sourceSize": { @@ -1133,14 +1175,14 @@ "spriteSourceSize": { "x": 5, "y": 6, - "w": 23, - "h": 20 + "w": 22, + "h": 21 }, "frame": { "x": 18, - "y": 164, - "w": 23, - "h": 20 + "y": 163, + "w": 22, + "h": 21 } }, { @@ -1165,7 +1207,7 @@ } }, { - "filename": "metal_coat", + "filename": "mystic_water", "rotated": false, "trimmed": true, "sourceSize": { @@ -1175,14 +1217,35 @@ "spriteSourceSize": { "x": 6, "y": 5, - "w": 19, - "h": 22 + "w": 20, + "h": 23 }, "frame": { "x": 22, "y": 208, - "w": 19, - "h": 22 + "w": 20, + "h": 23 + } + }, + { + "filename": "full_heal", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 4, + "w": 15, + "h": 23 + }, + "frame": { + "x": 41, + "y": 98, + "w": 15, + "h": 23 } }, { @@ -1201,7 +1264,7 @@ }, "frame": { "x": 40, - "y": 98, + "y": 121, "w": 16, "h": 24 } @@ -1222,95 +1285,11 @@ }, "frame": { "x": 40, - "y": 122, + "y": 145, "w": 16, "h": 24 } }, - { - "filename": "choice_specs", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 24, - "h": 18 - }, - "frame": { - "x": 40, - "y": 146, - "w": 24, - "h": 18 - } - }, - { - "filename": "tm_dark", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 41, - "y": 164, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_dragon", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 41, - "y": 186, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_electric", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 41, - "y": 208, - "w": 22, - "h": 22 - } - }, { "filename": "protein", "rotated": false, @@ -1333,7 +1312,7 @@ } }, { - "filename": "soft_sand", + "filename": "tm_bug", "rotated": false, "trimmed": true, "sourceSize": { @@ -1341,20 +1320,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, - "y": 7, - "w": 24, - "h": 20 + "x": 5, + "y": 5, + "w": 22, + "h": 22 }, "frame": { "x": 72, "y": 91, - "w": 24, - "h": 20 + "w": 22, + "h": 22 } }, { - "filename": "shell_bell", + "filename": "tm_dark", "rotated": false, "trimmed": true, "sourceSize": { @@ -1363,19 +1342,19 @@ }, "spriteSourceSize": { "x": 5, - "y": 7, - "w": 23, - "h": 20 + "y": 5, + "w": 22, + "h": 22 }, "frame": { - "x": 96, + "x": 94, "y": 91, - "w": 23, - "h": 20 + "w": 22, + "h": 22 } }, { - "filename": "deep_sea_scale", + "filename": "tm_dragon", "rotated": false, "trimmed": true, "sourceSize": { @@ -1384,14 +1363,77 @@ }, "spriteSourceSize": { "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 116, + "y": 91, + "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": 138, + "y": 91, + "w": 20, + "h": 22 + } + }, + { + "filename": "tm_electric", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 158, + "y": 90, + "w": 22, + "h": 22 + } + }, + { + "filename": "razor_fang", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, "y": 6, - "w": 22, + "w": 18, "h": 20 }, "frame": { - "x": 119, - "y": 91, - "w": 22, + "x": 180, + "y": 90, + "w": 18, "h": 20 } }, @@ -1432,7 +1474,7 @@ }, "frame": { "x": 72, - "y": 111, + "y": 113, "w": 22, "h": 22 } @@ -1453,7 +1495,7 @@ }, "frame": { "x": 94, - "y": 111, + "y": 113, "w": 22, "h": 22 } @@ -1474,32 +1516,11 @@ }, "frame": { "x": 116, - "y": 111, + "y": 113, "w": 22, "h": 22 } }, - { - "filename": "gb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 141, - "y": 91, - "w": 20, - "h": 20 - } - }, { "filename": "tm_flying", "rotated": false, @@ -1516,7 +1537,7 @@ }, "frame": { "x": 138, - "y": 111, + "y": 113, "w": 22, "h": 22 } @@ -1535,137 +1556,32 @@ "w": 22, "h": 22 }, - "frame": { - "x": 161, - "y": 89, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_grass", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, "frame": { "x": 160, - "y": 111, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_ground", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 183, - "y": 89, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_ice", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 182, - "y": 111, - "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": 205, - "y": 89, - "w": 17, - "h": 23 - } - }, - { - "filename": "poison_barb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 222, - "y": 92, - "w": 21, - "h": 21 - } - }, - { - "filename": "razor_fang", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 18, - "h": 20 - }, - "frame": { - "x": 204, "y": 112, - "w": 18, - "h": 20 + "w": 22, + "h": 22 + } + }, + { + "filename": "dragon_scale", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 198, + "y": 104, + "w": 24, + "h": 18 } }, { @@ -1690,7 +1606,7 @@ } }, { - "filename": "dragon_scale", + "filename": "hyper_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -1698,62 +1614,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 24, - "h": 18 + "x": 8, + "y": 5, + "w": 17, + "h": 23 }, "frame": { - "x": 72, - "y": 133, - "w": 24, - "h": 18 + "x": 56, + "y": 140, + "w": 17, + "h": 23 } }, { - "filename": "black_glasses", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 23, - "h": 17 - }, - "frame": { - "x": 96, - "y": 133, - "w": 23, - "h": 17 - } - }, - { - "filename": "wise_glasses", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 23, - "h": 17 - }, - "frame": { - "x": 119, - "y": 133, - "w": 23, - "h": 17 - } - }, - { - "filename": "dubious_disc", + "filename": "tm_grass", "rotated": false, "trimmed": true, "sourceSize": { @@ -1762,15 +1636,57 @@ }, "spriteSourceSize": { "x": 5, - "y": 7, + "y": 5, "w": 22, - "h": 19 + "h": 22 }, "frame": { - "x": 142, - "y": 133, + "x": 73, + "y": 135, "w": 22, - "h": 19 + "h": 22 + } + }, + { + "filename": "tm_ground", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 95, + "y": 135, + "w": 22, + "h": 22 + } + }, + { + "filename": "tm_ice", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 117, + "y": 135, + "w": 22, + "h": 22 } }, { @@ -1788,54 +1704,12 @@ "h": 22 }, "frame": { - "x": 164, - "y": 133, + "x": 139, + "y": 135, "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": 186, - "y": 133, - "w": 20, - "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": 206, - "y": 132, - "w": 15, - "h": 23 - } - }, { "filename": "tm_poison", "rotated": false, @@ -1851,432 +1725,12 @@ "h": 22 }, "frame": { - "x": 221, + "x": 161, "y": 134, "w": 22, "h": 22 } }, - { - "filename": "silver_powder", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 11, - "w": 24, - "h": 15 - }, - "frame": { - "x": 64, - "y": 151, - "w": 24, - "h": 15 - } - }, - { - "filename": "tm_psychic", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 63, - "y": 166, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_rock", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 63, - "y": 188, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_steel", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 63, - "y": 210, - "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": 85, - "y": 166, - "w": 17, - "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": 85, - "y": 189, - "w": 17, - "h": 23 - } - }, - { - "filename": "golden_egg", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 17, - "h": 20 - }, - "frame": { - "x": 85, - "y": 212, - "w": 17, - "h": 20 - } - }, - { - "filename": "prism_scale", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 9, - "y": 8, - "w": 15, - "h": 15 - }, - "frame": { - "x": 88, - "y": 151, - "w": 15, - "h": 15 - } - }, - { - "filename": "tm_water", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 103, - "y": 150, - "w": 22, - "h": 22 - } - }, - { - "filename": "water_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 102, - "y": 172, - "w": 22, - "h": 22 - } - }, - { - "filename": "x_accuracy", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 102, - "y": 194, - "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": 125, - "y": 150, - "w": 17, - "h": 22 - } - }, - { - "filename": "x_attack", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 142, - "y": 152, - "w": 22, - "h": 22 - } - }, - { - "filename": "upgrade", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 22, - "h": 19 - }, - "frame": { - "x": 164, - "y": 155, - "w": 22, - "h": 19 - } - }, - { - "filename": "x_defense", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 186, - "y": 155, - "w": 22, - "h": 22 - } - }, - { - "filename": "oval_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 7, - "w": 18, - "h": 19 - }, - "frame": { - "x": 124, - "y": 172, - "w": 18, - "h": 19 - } - }, - { - "filename": "x_sp_atk", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 124, - "y": 191, - "w": 22, - "h": 22 - } - }, - { - "filename": "everstone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 8, - "w": 20, - "h": 17 - }, - "frame": { - "x": 142, - "y": 174, - "w": 20, - "h": 17 - } - }, - { - "filename": "x_sp_def", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 162, - "y": 174, - "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": 184, - "y": 177, - "w": 22, - "h": 22 - } - }, { "filename": "leftovers", "rotated": false, @@ -2292,12 +1746,54 @@ "h": 22 }, "frame": { - "x": 146, - "y": 191, + "x": 182, + "y": 110, "w": 15, "h": 22 } }, + { + "filename": "potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 183, + "y": 132, + "w": 17, + "h": 23 + } + }, + { + "filename": "tm_psychic", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 200, + "y": 122, + "w": 22, + "h": 22 + } + }, { "filename": "zoom_lens", "rotated": false, @@ -2313,14 +1809,14 @@ "h": 21 }, "frame": { - "x": 102, - "y": 216, + "x": 222, + "y": 134, "w": 21, "h": 21 } }, { - "filename": "lum_berry", + "filename": "deep_sea_scale", "rotated": false, "trimmed": true, "sourceSize": { @@ -2328,20 +1824,209 @@ "h": 32 }, "spriteSourceSize": { - "x": 6, - "y": 7, - "w": 20, - "h": 19 + "x": 5, + "y": 6, + "w": 22, + "h": 20 }, "frame": { - "x": 161, - "y": 196, - "w": 20, - "h": 19 + "x": 200, + "y": 144, + "w": 22, + "h": 20 } }, { - "filename": "magnet", + "filename": "silver_powder", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 11, + "w": 24, + "h": 15 + }, + "frame": { + "x": 40, + "y": 169, + "w": 24, + "h": 15 + } + }, + { + "filename": "tm_rock", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 41, + "y": 184, + "w": 22, + "h": 22 + } + }, + { + "filename": "tm_steel", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 42, + "y": 206, + "w": 22, + "h": 22 + } + }, + { + "filename": "prism_scale", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 8, + "w": 15, + "h": 15 + }, + "frame": { + "x": 42, + "y": 228, + "w": 15, + "h": 15 + } + }, + { + "filename": "binding_band", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 23, + "h": 20 + }, + "frame": { + "x": 73, + "y": 157, + "w": 23, + "h": 20 + } + }, + { + "filename": "shell_bell", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 23, + "h": 20 + }, + "frame": { + "x": 96, + "y": 157, + "w": 23, + "h": 20 + } + }, + { + "filename": "tm_water", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 119, + "y": 157, + "w": 22, + "h": 22 + } + }, + { + "filename": "water_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 141, + "y": 157, + "w": 22, + "h": 22 + } + }, + { + "filename": "x_accuracy", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 163, + "y": 156, + "w": 22, + "h": 22 + } + }, + { + "filename": "everstone", "rotated": false, "trimmed": true, "sourceSize": { @@ -2350,15 +2035,15 @@ }, "spriteSourceSize": { "x": 6, - "y": 6, + "y": 8, "w": 20, - "h": 20 + "h": 17 }, "frame": { - "x": 181, - "y": 199, + "x": 222, + "y": 155, "w": 20, - "h": 20 + "h": 17 } }, { @@ -2376,12 +2061,306 @@ "h": 17 }, "frame": { - "x": 208, + "x": 185, "y": 155, "w": 12, "h": 17 } }, + { + "filename": "black_glasses", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 23, + "h": 17 + }, + "frame": { + "x": 197, + "y": 164, + "w": 23, + "h": 17 + } + }, + { + "filename": "wise_glasses", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 23, + "h": 17 + }, + "frame": { + "x": 220, + "y": 172, + "w": 23, + "h": 17 + } + }, + { + "filename": "metronome", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 5, + "w": 17, + "h": 22 + }, + "frame": { + "x": 63, + "y": 184, + "w": 17, + "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": 64, + "y": 206, + "w": 17, + "h": 23 + } + }, + { + "filename": "x_attack", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 80, + "y": 177, + "w": 22, + "h": 22 + } + }, + { + "filename": "golden_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 102, + "y": 177, + "w": 17, + "h": 20 + } + }, + { + "filename": "dubious_disc", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 119, + "y": 179, + "w": 22, + "h": 19 + } + }, + { + "filename": "upgrade", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 141, + "y": 179, + "w": 22, + "h": 19 + } + }, + { + "filename": "x_defense", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 163, + "y": 178, + "w": 22, + "h": 22 + } + }, + { + "filename": "x_sp_atk", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 81, + "y": 199, + "w": 22, + "h": 22 + } + }, + { + "filename": "x_sp_def", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 81, + "y": 221, + "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": 185, + "y": 181, + "w": 22, + "h": 22 + } + }, + { + "filename": "gb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 103, + "y": 198, + "w": 20, + "h": 20 + } + }, + { + "filename": "magnet", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 123, + "y": 198, + "w": 20, + "h": 20 + } + }, { "filename": "mb", "rotated": false, @@ -2397,33 +2376,12 @@ "h": 20 }, "frame": { - "x": 220, - "y": 156, + "x": 143, + "y": 198, "w": 20, "h": 20 } }, - { - "filename": "hard_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 19, - "h": 20 - }, - "frame": { - "x": 201, - "y": 199, - "w": 19, - "h": 20 - } - }, { "filename": "pb", "rotated": false, @@ -2439,33 +2397,12 @@ "h": 20 }, "frame": { - "x": 124, - "y": 213, + "x": 103, + "y": 218, "w": 20, "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": 213, - "w": 17, - "h": 20 - } - }, { "filename": "pb_gold", "rotated": false, @@ -2481,75 +2418,12 @@ "h": 20 }, "frame": { - "x": 161, - "y": 215, + "x": 123, + "y": 218, "w": 20, "h": 20 } }, - { - "filename": "razor_claw", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 7, - "w": 20, - "h": 19 - }, - "frame": { - "x": 181, - "y": 219, - "w": 20, - "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": 201, - "y": 219, - "w": 19, - "h": 19 - } - }, - { - "filename": "spell_tag", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 19, - "h": 21 - }, - "frame": { - "x": 206, - "y": 177, - "w": 19, - "h": 21 - } - }, { "filename": "ub", "rotated": false, @@ -2565,11 +2439,158 @@ "h": 20 }, "frame": { - "x": 220, - "y": 198, + "x": 143, + "y": 218, "w": 20, "h": 20 } + }, + { + "filename": "spell_tag", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 19, + "h": 21 + }, + "frame": { + "x": 163, + "y": 200, + "w": 19, + "h": 21 + } + }, + { + "filename": "hard_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 19, + "h": 20 + }, + "frame": { + "x": 163, + "y": 221, + "w": 19, + "h": 20 + } + }, + { + "filename": "lum_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 20, + "h": 19 + }, + "frame": { + "x": 182, + "y": 203, + "w": 20, + "h": 19 + } + }, + { + "filename": "razor_claw", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 20, + "h": 19 + }, + "frame": { + "x": 182, + "y": 222, + "w": 20, + "h": 19 + } + }, + { + "filename": "lucky_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 202, + "y": 203, + "w": 17, + "h": 20 + } + }, + { + "filename": "miracle_seed", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 19, + "h": 19 + }, + "frame": { + "x": 202, + "y": 223, + "w": 19, + "h": 19 + } + }, + { + "filename": "oval_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 7, + "w": 18, + "h": 19 + }, + "frame": { + "x": 219, + "y": 189, + "w": 18, + "h": 19 + } } ] } @@ -2577,6 +2598,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:cd6f7e7d7ca088a48736507750d678e7:2e6f80a76c6bb03e5060479cd463686a:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:765f253f422caab501ac3462c455c37f:f48edcc7cd6d3b90aef5a1f31e2529df:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index 56025517826..16b7e5bc3ab 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/mini_black_hole.png b/public/images/items/mini_black_hole.png new file mode 100644 index 00000000000..dd7458b8b2a Binary files /dev/null and b/public/images/items/mini_black_hole.png differ diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 9bfbf68d0e5..d7b7d71f1e6 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -5,7 +5,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, ConditionalMoveA import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; import { Stat } from "./data/pokemon-stat"; -import { BerryModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, HealingBoosterModifier, HitHealModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, TempBattleStatBoosterModifier, TurnHealModifier } from "./modifier/modifier"; +import { BerryModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, HealingBoosterModifier, HeldItemTransferModifier, HitHealModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, TempBattleStatBoosterModifier, TurnHealModifier } from "./modifier/modifier"; import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler"; import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball"; import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims"; @@ -16,7 +16,7 @@ import { EvolutionPhase } from "./evolution-phase"; import { BattlePhase } from "./battle-phase"; import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "./data/battle-stat"; import { Biome, biomeLinks } from "./data/biome"; -import { ModifierTypeOption, PokemonModifierType, PokemonMoveModifierType, getEnemyModifierTypesForWave, getPlayerModifierTypeOptionsForWave, regenerateModifierPoolThresholds } from "./modifier/modifier-type"; +import { ModifierTypeOption, PokemonModifierType, PokemonMoveModifierType, getPlayerModifierTypeOptionsForWave, regenerateModifierPoolThresholds } from "./modifier/modifier-type"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import { BattleTagLapseType, BattleTagType, HideSpriteTag as HiddenTag } from "./data/battle-tag"; import { getPokemonMessage } from "./messages"; @@ -293,6 +293,8 @@ export class SummonPhase extends BattlePhase { const playerPokemon = this.scene.getPlayerPokemon(); + this.scene.applyModifiers(HeldItemTransferModifier, true, this.scene); + pokeball.setVisible(true); this.scene.tweens.add({ targets: pokeball, @@ -860,8 +862,6 @@ abstract class MoveEffectPhase extends PokemonPhase { const overridden = new Utils.BooleanHolder(false); - console.log(this.move.getName()); - applyMoveAttrs(OverrideMoveEffectAttr, user, target, this.move.getMove(), overridden).then(() => { if (overridden.value) { @@ -1843,30 +1843,16 @@ export class SelectModifierPhase extends BattlePhase { if (toSlotIndex !== undefined && fromSlotIndex < 6 && toSlotIndex < 6 && fromSlotIndex !== toSlotIndex && itemIndex > -1) { this.scene.ui.setMode(Mode.MODIFIER_SELECT); const itemModifiers = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier - && (m as PokemonHeldItemModifier).pokemonId === party[fromSlotIndex].id) as PokemonHeldItemModifier[]; + && (m as PokemonHeldItemModifier).pokemonId === party[fromSlotIndex].id) as PokemonHeldItemModifier[]; const itemModifier = itemModifiers[itemIndex]; - const newItemModifier = itemModifier.clone() as PokemonHeldItemModifier; - newItemModifier.pokemonId = party[toSlotIndex].id; - const matchingModifier = party[toSlotIndex].scene.findModifier(m => m instanceof PokemonHeldItemModifier - && (m as PokemonHeldItemModifier).matchType(itemModifier)) as PokemonHeldItemModifier; - let removeOld = true; - if (matchingModifier) { - const newStackCount = matchingModifier.stackCount + itemModifier.stackCount; - const maxStackCount = matchingModifier.getMaxStackCount(); - if (newStackCount > maxStackCount) { - itemModifier.stackCount = newStackCount - maxStackCount; - newItemModifier.stackCount = maxStackCount; - removeOld = !itemModifier.stackCount; - } - } - if (!removeOld || this.scene.removeModifier(itemModifier)) { - this.scene.addModifier(newItemModifier, true).then(() => super.end()); - this.scene.ui.clearText(); - this.scene.ui.setMode(Mode.MESSAGE); - return; - } + this.scene.tryTransferHeldItemModifier(itemModifier, party[toSlotIndex], true).then(success => { + if (success) { + this.scene.ui.clearText(); + this.scene.ui.setMode(Mode.MESSAGE); + } else + this.scene.ui.setMode(Mode.MODIFIER_SELECT, typeOptions, modifierSelectCallback); + }); } - this.scene.ui.setMode(Mode.MODIFIER_SELECT, typeOptions, modifierSelectCallback); }, PartyUiHandler.FilterItemMaxStacks); return; } diff --git a/src/battle-scene.ts b/src/battle-scene.ts index a13138cf138..7de36c4a3f2 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1,6 +1,6 @@ import Phaser from 'phaser'; import { Biome } from './data/biome'; -import UI from './ui/ui'; +import UI, { Mode } from './ui/ui'; import { EncounterPhase, SummonPhase, CommandPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, SelectStarterPhase, MessagePhase } from './battle-phases'; import Pokemon, { PlayerPokemon, EnemyPokemon } from './pokemon'; import PokemonSpecies, { allSpecies, getPokemonSpecies } from './data/pokemon-species'; @@ -662,6 +662,34 @@ export default class BattleScene extends Phaser.Scene { }); } + tryTransferHeldItemModifier(itemModifier: PokemonHeldItemModifier, target: Pokemon, playSound: boolean): Promise { + return new Promise(resolve => { + const newItemModifier = itemModifier.clone() as PokemonHeldItemModifier; + newItemModifier.pokemonId = target.id; + const matchingModifier = target.scene.findModifier(m => m instanceof PokemonHeldItemModifier + && (m as PokemonHeldItemModifier).matchType(itemModifier)) as PokemonHeldItemModifier; + let removeOld = true; + if (matchingModifier) { + const maxStackCount = matchingModifier.getMaxStackCount(); + if (matchingModifier.stackCount >= maxStackCount) { + resolve(false); + return; + } + const newStackCount = matchingModifier.stackCount + itemModifier.stackCount; + if (newStackCount > maxStackCount) { + itemModifier.stackCount = newStackCount - maxStackCount; + newItemModifier.stackCount = maxStackCount; + removeOld = !itemModifier.stackCount; + } + } + if (!removeOld || this.removeModifier(itemModifier)) { + this.addModifier(newItemModifier, playSound).then(() => resolve(true)); + return; + } + resolve(false); + }); + } + removePartyMemberModifiers(partyMemberIndex: integer): Promise { return new Promise(resolve => { const pokemonId = this.getParty()[partyMemberIndex].id; diff --git a/src/data/battle-tag.ts b/src/data/battle-tag.ts index b352bb60d28..21040e064b6 100644 --- a/src/data/battle-tag.ts +++ b/src/data/battle-tag.ts @@ -281,7 +281,6 @@ export class ProtectedTag extends BattleTag { } lapse(pokemon: Pokemon, lapseType: BattleTagLapseType): boolean { - console.log(pokemon, BattleTagLapseType[lapseType]); if (lapseType === BattleTagLapseType.CUSTOM) { new CommonBattleAnim(CommonAnim.PROTECT, pokemon).play(pokemon.scene); pokemon.scene.unshiftPhase(new MessagePhase(pokemon.scene, getPokemonMessage(pokemon, '\nprotected itself!'))); diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index a3a2b9c2651..27c838309cf 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -425,6 +425,12 @@ class EvolutionItemModifierTypeGenerator extends ModifierTypeGenerator { } } +class HeldItemTransferModifierType extends ModifierType { + constructor(name: string, iconImage?: string, group?: string, soundName?: string) { + super(name, 'All held items in your party are transferred to a POKéMON on summon', (type, _args) => new Modifiers.HeldItemTransferModifier(type), iconImage, group, soundName); + } +} + class WeightedModifierType { public modifierType: ModifierType; public weight: integer | Function; @@ -521,6 +527,8 @@ const modifierTypes = { (type, args) => new Modifiers.HitHealModifier(type, (args[0] as Pokemon).id)), SHINY_CHARM: new ModifierType('SHINY CHARM', 'Dramatically increases the chance of a wild POKéMON being shiny', (type, _args) => new Modifiers.ShinyRateBoosterModifier(type)), + + MINI_BLACK_HOLE: new HeldItemTransferModifierType('MINI BLACK HOLE'), GOLDEN_POKEBALL: new ModifierType(`GOLDEN ${getPokeballName(PokeballType.POKEBALL)}`, 'Adds 1 extra item option at the end of every battle', (type, _args) => new Modifiers.ExtraModifierModifier(type), 'pb_gold', null, 'pb_bounce_1'), @@ -600,8 +608,9 @@ const modifierPool = { modifierTypes.EXP_BALANCE ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), [ModifierTier.MASTER]: [ - modifierTypes.MASTER_BALL, - new WeightedModifierType(modifierTypes.SHINY_CHARM, 2) + new WeightedModifierType(modifierTypes.MASTER_BALL, 3), + new WeightedModifierType(modifierTypes.SHINY_CHARM, 2), + modifierTypes.MINI_BLACK_HOLE ].map(m => { m.setTier(ModifierTier.MASTER); return m; }), [ModifierTier.LUXURY]: [ modifierTypes.GOLDEN_EXP_CHARM, @@ -690,8 +699,8 @@ export function getEnemyModifierTypesForWave(waveIndex: integer, count: integer, function getNewModifierTypeOption(party: Pokemon[], player?: boolean, tier?: ModifierTier, upgrade?: boolean): ModifierTypeOption { if (player === undefined) player = true; - const tierValue = Utils.randInt(256); if (tier === undefined) { + const tierValue = Utils.randInt(256); if (player) { const partyShinyCount = party.filter(p => p.shiny).length; const upgradeOdds = Math.floor(32 / Math.max((partyShinyCount * 2), 1)); diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 34b19f5415a..e83650227ad 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -833,6 +833,40 @@ export class ShinyRateBoosterModifier extends PersistentModifier { } } +export class HeldItemTransferModifier extends PersistentModifier { + constructor(type: ModifierType, stackCount?: integer) { + super(type, stackCount); + } + + match(modifier: Modifier): boolean { + return modifier instanceof HeldItemTransferModifier; + } + + clone(): HeldItemTransferModifier { + return new HeldItemTransferModifier(this.type, this.stackCount); + } + + shouldApply(args: any[]): boolean { + return super.shouldApply(args) && args.length && args[0] instanceof BattleScene; + } + + apply(args: any[]): boolean { + const scene = args[0] as BattleScene; + const targetPokemon = scene.getPlayerPokemon(); + + const itemModifiers = scene.findModifiers(m => m instanceof PokemonHeldItemModifier + && (m as PokemonHeldItemModifier).pokemonId !== targetPokemon.id) as PokemonHeldItemModifier[]; + for (let modifier of itemModifiers) + scene.tryTransferHeldItemModifier(modifier, targetPokemon, false); + + return true; + } + + getMaxStackCount(): integer { + return 1; + } +} + export class ExtraModifierModifier extends PersistentModifier { constructor(type: ModifierType, stackCount?: integer) { super(type, stackCount); diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts index 34c64596fb5..a3fcca03feb 100644 --- a/src/ui/confirm-ui-handler.ts +++ b/src/ui/confirm-ui-handler.ts @@ -62,7 +62,6 @@ export default class ConfirmUiHandler extends UiHandler { this.setCursor(1); const handler = this.cursor ? this.noHander : this.yesHandler; handler(); - console.log(this.cursor ? this.noHander : this.yesHandler); this.clear(); } else { switch (button) {