diff --git a/public/images/items.json b/public/images/items.json index 133dd23ef..9ba66e483 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -4,8 +4,8 @@ "image": "items.png", "format": "RGBA8888", "size": { - "w": 265, - "h": 265 + "w": 267, + "h": 267 }, "scale": 1, "frames": [ @@ -472,7 +472,7 @@ } }, { - "filename": "moon_stone", + "filename": "scope-lens", "rotated": false, "trimmed": true, "sourceSize": { @@ -481,15 +481,15 @@ }, "spriteSourceSize": { "x": 4, - "y": 6, - "w": 23, - "h": 21 + "y": 5, + "w": 24, + "h": 23 }, "frame": { "x": 0, "y": 244, - "w": 23, - "h": 21 + "w": 24, + "h": 23 } }, { @@ -682,7 +682,7 @@ } }, { - "filename": "scope-lens", + "filename": "twisted_spoon", "rotated": false, "trimmed": true, "sourceSize": { @@ -703,7 +703,7 @@ } }, { - "filename": "twisted_spoon", + "filename": "exp_balance", "rotated": false, "trimmed": true, "sourceSize": { @@ -714,13 +714,13 @@ "x": 4, "y": 5, "w": 24, - "h": 23 + "h": 22 }, "frame": { "x": 44, "y": 119, "w": 24, - "h": 23 + "h": 22 } }, { @@ -739,13 +739,13 @@ }, "frame": { "x": 45, - "y": 142, + "y": 141, "w": 23, "h": 23 } }, { - "filename": "exp_balance", + "filename": "exp_share", "rotated": false, "trimmed": true, "sourceSize": { @@ -765,27 +765,6 @@ "h": 22 } }, - { - "filename": "exp_share", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 5, - "w": 24, - "h": 22 - }, - "frame": { - "x": 98, - "y": 24, - "w": 24, - "h": 22 - } - }, { "filename": "healing_charm", "rotated": false, @@ -801,7 +780,7 @@ "h": 22 }, "frame": { - "x": 122, + "x": 98, "y": 24, "w": 23, "h": 22 @@ -822,7 +801,7 @@ "h": 23 }, "frame": { - "x": 145, + "x": 121, "y": 24, "w": 23, "h": 23 @@ -843,33 +822,12 @@ "h": 23 }, "frame": { - "x": 168, + "x": 144, "y": 24, "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": 191, - "y": 24, - "w": 21, - "h": 23 - } - }, { "filename": "never_melt_ice", "rotated": false, @@ -885,8 +843,8 @@ "h": 23 }, "frame": { - "x": 212, - "y": 23, + "x": 167, + "y": 24, "w": 22, "h": 23 } @@ -906,8 +864,8 @@ "h": 23 }, "frame": { - "x": 234, - "y": 23, + "x": 189, + "y": 24, "w": 22, "h": 23 } @@ -927,8 +885,8 @@ "h": 23 }, "frame": { - "x": 75, - "y": 46, + "x": 211, + "y": 23, "w": 22, "h": 23 } @@ -948,8 +906,8 @@ "h": 22 }, "frame": { - "x": 97, - "y": 46, + "x": 233, + "y": 23, "w": 22, "h": 22 } @@ -969,138 +927,12 @@ "h": 22 }, "frame": { - "x": 119, + "x": 75, "y": 46, "w": 22, "h": 22 } }, - { - "filename": "leaf_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 21, - "h": 23 - }, - "frame": { - "x": 76, - "y": 69, - "w": 21, - "h": 23 - } - }, - { - "filename": "electirizer", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 97, - "y": 68, - "w": 22, - "h": 22 - } - }, - { - "filename": "enigma_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 119, - "y": 68, - "w": 22, - "h": 22 - } - }, - { - "filename": "ganlon_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 141, - "y": 47, - "w": 22, - "h": 22 - } - }, - { - "filename": "guard_spec", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 163, - "y": 47, - "w": 22, - "h": 22 - } - }, - { - "filename": "ice_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 185, - "y": 47, - "w": 22, - "h": 22 - } - }, { "filename": "sacred_ash", "rotated": false, @@ -1116,8 +948,8 @@ "h": 20 }, "frame": { - "x": 141, - "y": 69, + "x": 97, + "y": 46, "w": 24, "h": 20 } @@ -1137,14 +969,56 @@ "h": 20 }, "frame": { - "x": 165, - "y": 69, + "x": 121, + "y": 47, "w": 24, "h": 20 } }, { - "filename": "apicot_berry", + "filename": "binding_band", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 23, + "h": 20 + }, + "frame": { + "x": 145, + "y": 47, + "w": 23, + "h": 20 + } + }, + { + "filename": "moon_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 6, + "w": 23, + "h": 21 + }, + "frame": { + "x": 168, + "y": 47, + "w": 23, + "h": 21 + } + }, + { + "filename": "dawn_stone", "rotated": false, "trimmed": true, "sourceSize": { @@ -1154,14 +1028,224 @@ "spriteSourceSize": { "x": 6, "y": 6, - "w": 19, - "h": 20 + "w": 20, + "h": 21 }, "frame": { - "x": 189, - "y": 69, - "w": 19, - "h": 20 + "x": 191, + "y": 47, + "w": 20, + "h": 21 + } + }, + { + "filename": "electirizer", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 211, + "y": 46, + "w": 22, + "h": 22 + } + }, + { + "filename": "enigma_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 233, + "y": 45, + "w": 22, + "h": 22 + } + }, + { + "filename": "lansat_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 4, + "w": 21, + "h": 23 + }, + "frame": { + "x": 76, + "y": 68, + "w": 21, + "h": 23 + } + }, + { + "filename": "ganlon_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 97, + "y": 66, + "w": 22, + "h": 22 + } + }, + { + "filename": "deep_sea_tooth", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 22, + "h": 21 + }, + "frame": { + "x": 119, + "y": 67, + "w": 22, + "h": 21 + } + }, + { + "filename": "guard_spec", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 141, + "y": 67, + "w": 22, + "h": 22 + } + }, + { + "filename": "ice_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 163, + "y": 68, + "w": 22, + "h": 22 + } + }, + { + "filename": "magmarizer", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 185, + "y": 68, + "w": 22, + "h": 22 + } + }, + { + "filename": "mini_black_hole", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 207, + "y": 68, + "w": 22, + "h": 22 + } + }, + { + "filename": "revive", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 10, + "y": 8, + "w": 12, + "h": 17 + }, + "frame": { + "x": 255, + "y": 23, + "w": 12, + "h": 17 } }, { @@ -1207,7 +1291,7 @@ } }, { - "filename": "dawn_stone", + "filename": "apicot_berry", "rotated": false, "trimmed": true, "sourceSize": { @@ -1217,14 +1301,203 @@ "spriteSourceSize": { "x": 6, "y": 6, - "w": 20, - "h": 21 + "w": 19, + "h": 20 }, "frame": { "x": 68, "y": 144, - "w": 20, - "h": 21 + "w": 19, + "h": 20 + } + }, + { + "filename": "choice_specs", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 23, + "y": 166, + "w": 24, + "h": 18 + } + }, + { + "filename": "leaf_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 21, + "h": 23 + }, + "frame": { + "x": 22, + "y": 184, + "w": 21, + "h": 23 + } + }, + { + "filename": "sharp_beak", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 21, + "h": 23 + }, + "frame": { + "x": 22, + "y": 207, + "w": 21, + "h": 23 + } + }, + { + "filename": "reviver_seed", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 8, + "w": 23, + "h": 20 + }, + "frame": { + "x": 47, + "y": 164, + "w": 23, + "h": 20 + } + }, + { + "filename": "protector", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 43, + "y": 184, + "w": 22, + "h": 22 + } + }, + { + "filename": "shed_shell", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 43, + "y": 206, + "w": 22, + "h": 22 + } + }, + { + "filename": "candy_jar", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 19, + "h": 20 + }, + "frame": { + "x": 70, + "y": 164, + "w": 19, + "h": 20 + } + }, + { + "filename": "starf_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 65, + "y": 184, + "w": 22, + "h": 22 + } + }, + { + "filename": "thunder_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 65, + "y": 206, + "w": 22, + "h": 22 } }, { @@ -1243,13 +1516,13 @@ }, "frame": { "x": 86, - "y": 92, + "y": 91, "w": 16, "h": 24 } }, { - "filename": "magmarizer", + "filename": "tm_bug", "rotated": false, "trimmed": true, "sourceSize": { @@ -1264,13 +1537,13 @@ }, "frame": { "x": 102, - "y": 90, + "y": 88, "w": 22, "h": 22 } }, { - "filename": "iron", + "filename": "hyper_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -1279,61 +1552,19 @@ }, "spriteSourceSize": { "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 86, - "y": 116, - "w": 16, - "h": 24 - } - }, - { - "filename": "mini_black_hole", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 102, - "y": 112, - "w": 22, - "h": 22 - } - }, - { - "filename": "lure", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, "w": 17, - "h": 24 + "h": 23 }, "frame": { "x": 124, - "y": 90, + "y": 88, "w": 17, - "h": 24 + "h": 23 } }, { - "filename": "protector", + "filename": "tm_dark", "rotated": false, "trimmed": true, "sourceSize": { @@ -1354,49 +1585,7 @@ } }, { - "filename": "shed_shell", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 163, - "y": 89, - "w": 22, - "h": 22 - } - }, - { - "filename": "starf_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 185, - "y": 89, - "w": 22, - "h": 22 - } - }, - { - "filename": "binding_band", + "filename": "liechi_berry", "rotated": false, "trimmed": true, "sourceSize": { @@ -1406,18 +1595,18 @@ "spriteSourceSize": { "x": 5, "y": 6, - "w": 23, - "h": 20 + "w": 22, + "h": 21 }, "frame": { - "x": 124, - "y": 114, - "w": 23, - "h": 20 + "x": 163, + "y": 90, + "w": 22, + "h": 21 } }, { - "filename": "sharp_beak", + "filename": "shell_bell", "rotated": false, "trimmed": true, "sourceSize": { @@ -1426,19 +1615,19 @@ }, "spriteSourceSize": { "x": 5, - "y": 5, - "w": 21, - "h": 23 + "y": 7, + "w": 23, + "h": 20 }, "frame": { - "x": 147, - "y": 111, - "w": 21, - "h": 23 + "x": 185, + "y": 90, + "w": 23, + "h": 20 } }, { - "filename": "thunder_stone", + "filename": "deep_sea_scale", "rotated": false, "trimmed": true, "sourceSize": { @@ -1447,19 +1636,19 @@ }, "spriteSourceSize": { "x": 5, - "y": 5, + "y": 6, "w": 22, - "h": 22 + "h": 20 }, "frame": { - "x": 168, - "y": 111, + "x": 208, + "y": 90, "w": 22, - "h": 22 + "h": 20 } }, { - "filename": "hyper_potion", + "filename": "iron", "rotated": false, "trimmed": true, "sourceSize": { @@ -1468,98 +1657,14 @@ }, "spriteSourceSize": { "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 190, - "y": 111, - "w": 17, - "h": 23 - } - }, - { - "filename": "max_ether", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, "y": 4, - "w": 18, + "w": 16, "h": 24 }, "frame": { - "x": 88, - "y": 140, - "w": 18, - "h": 24 - } - }, - { - "filename": "tm_bug", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 106, - "y": 134, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_dark", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 128, - "y": 134, - "w": 22, - "h": 22 - } - }, - { - "filename": "max_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 150, - "y": 134, - "w": 18, + "x": 86, + "y": 115, + "w": 16, "h": 24 } }, @@ -1578,96 +1683,12 @@ "h": 22 }, "frame": { - "x": 168, - "y": 133, + "x": 102, + "y": 110, "w": 22, "h": 22 } }, - { - "filename": "deep_sea_tooth", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 22, - "h": 21 - }, - "frame": { - "x": 190, - "y": 134, - "w": 22, - "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": 106, - "y": 156, - "w": 24, - "h": 18 - } - }, - { - "filename": "gb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 130, - "y": 156, - "w": 20, - "h": 20 - } - }, - { - "filename": "candy_jar", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 19, - "h": 20 - }, - "frame": { - "x": 150, - "y": 158, - "w": 19, - "h": 20 - } - }, { "filename": "tm_electric", "rotated": false, @@ -1683,8 +1704,8 @@ "h": 22 }, "frame": { - "x": 169, - "y": 155, + "x": 124, + "y": 111, "w": 22, "h": 22 } @@ -1704,14 +1725,14 @@ "h": 22 }, "frame": { - "x": 191, - "y": 155, + "x": 146, + "y": 111, "w": 22, "h": 22 } }, { - "filename": "deep_sea_scale", + "filename": "lure", "rotated": false, "trimmed": true, "sourceSize": { @@ -1719,37 +1740,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 22, - "h": 20 + "x": 8, + "y": 4, + "w": 17, + "h": 24 }, "frame": { - "x": 23, - "y": 166, - "w": 22, - "h": 20 - } - }, - { - "filename": "liechi_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 22, - "h": 21 - }, - "frame": { - "x": 45, - "y": 165, - "w": 22, - "h": 21 + "x": 168, + "y": 111, + "w": 17, + "h": 24 } }, { @@ -1767,8 +1767,8 @@ "h": 22 }, "frame": { - "x": 22, - "y": 186, + "x": 185, + "y": 110, "w": 22, "h": 22 } @@ -1788,12 +1788,54 @@ "h": 22 }, "frame": { - "x": 22, - "y": 208, + "x": 207, + "y": 110, "w": 22, "h": 22 } }, + { + "filename": "max_ether", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, + "frame": { + "x": 87, + "y": 139, + "w": 18, + "h": 24 + } + }, + { + "filename": "dusk_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 89, + "y": 163, + "w": 21, + "h": 21 + } + }, { "filename": "tm_flying", "rotated": false, @@ -1809,8 +1851,8 @@ "h": 22 }, "frame": { - "x": 44, - "y": 186, + "x": 87, + "y": 184, "w": 22, "h": 22 } @@ -1830,35 +1872,14 @@ "h": 22 }, "frame": { - "x": 44, - "y": 208, + "x": 87, + "y": 206, "w": 22, "h": 22 } }, { - "filename": "dusk_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 67, - "y": 165, - "w": 21, - "h": 21 - } - }, - { - "filename": "razor_fang", + "filename": "max_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -1867,15 +1888,15 @@ }, "spriteSourceSize": { "x": 7, - "y": 6, + "y": 4, "w": 18, - "h": 20 + "h": 24 }, "frame": { - "x": 88, - "y": 164, + "x": 105, + "y": 132, "w": 18, - "h": 20 + "h": 24 } }, { @@ -1893,8 +1914,8 @@ "h": 22 }, "frame": { - "x": 66, - "y": 186, + "x": 123, + "y": 133, "w": 22, "h": 22 } @@ -1914,35 +1935,14 @@ "h": 22 }, "frame": { - "x": 66, - "y": 208, + "x": 145, + "y": 133, "w": 22, "h": 22 } }, { - "filename": "max_lure", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 17, - "h": 24 - }, - "frame": { - "x": 88, - "y": 184, - "w": 17, - "h": 24 - } - }, - { - "filename": "metal_coat", + "filename": "gb", "rotated": false, "trimmed": true, "sourceSize": { @@ -1951,78 +1951,15 @@ }, "spriteSourceSize": { "x": 6, - "y": 5, - "w": 19, - "h": 22 - }, - "frame": { - "x": 88, - "y": 208, - "w": 19, - "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": 106, - "y": 174, - "w": 24, - "h": 18 - } - }, - { - "filename": "everstone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 8, + "y": 6, "w": 20, - "h": 17 + "h": 20 }, "frame": { - "x": 130, - "y": 176, + "x": 167, + "y": 135, "w": 20, - "h": 17 - } - }, - { - "filename": "silver_powder", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 11, - "w": 24, - "h": 15 - }, - "frame": { - "x": 105, - "y": 192, - "w": 24, - "h": 15 + "h": 20 } }, { @@ -2040,8 +1977,8 @@ "h": 22 }, "frame": { - "x": 107, - "y": 207, + "x": 187, + "y": 132, "w": 22, "h": 22 } @@ -2061,14 +1998,14 @@ "h": 23 }, "frame": { - "x": 129, - "y": 193, + "x": 209, + "y": 132, "w": 20, "h": 23 } }, { - "filename": "dubious_disc", + "filename": "max_lure", "rotated": false, "trimmed": true, "sourceSize": { @@ -2076,37 +2013,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 22, - "h": 19 + "x": 8, + "y": 4, + "w": 17, + "h": 24 }, "frame": { - "x": 150, - "y": 178, - "w": 22, - "h": 19 - } - }, - { - "filename": "shell_bell", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 23, - "h": 20 - }, - "frame": { - "x": 172, - "y": 177, - "w": 23, - "h": 20 + "x": 110, + "y": 156, + "w": 17, + "h": 24 } }, { @@ -2124,8 +2040,8 @@ "h": 22 }, "frame": { - "x": 149, - "y": 197, + "x": 127, + "y": 155, "w": 22, "h": 22 } @@ -2145,12 +2061,159 @@ "h": 22 }, "frame": { - "x": 171, - "y": 197, + "x": 149, + "y": 155, "w": 22, "h": 22 } }, + { + "filename": "metal_coat", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 19, + "h": 22 + }, + "frame": { + "x": 171, + "y": 155, + "w": 19, + "h": 22 + } + }, + { + "filename": "spell_tag", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 19, + "h": 21 + }, + "frame": { + "x": 190, + "y": 154, + "w": 19, + "h": 21 + } + }, + { + "filename": "magnet", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 209, + "y": 155, + "w": 20, + "h": 20 + } + }, + { + "filename": "dragon_scale", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 127, + "y": 177, + "w": 24, + "h": 18 + } + }, + { + "filename": "dubious_disc", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 151, + "y": 177, + "w": 22, + "h": 19 + } + }, + { + "filename": "golden_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 110, + "y": 180, + "w": 17, + "h": 20 + } + }, + { + "filename": "super_lure", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 17, + "h": 24 + }, + "frame": { + "x": 109, + "y": 200, + "w": 17, + "h": 24 + } + }, { "filename": "hard_stone", "rotated": false, @@ -2166,7 +2229,7 @@ "h": 20 }, "frame": { - "x": 195, + "x": 173, "y": 177, "w": 19, "h": 20 @@ -2187,14 +2250,14 @@ "h": 22 }, "frame": { - "x": 193, - "y": 197, + "x": 192, + "y": 175, "w": 22, "h": 22 } }, { - "filename": "lum_berry", + "filename": "full_heal", "rotated": false, "trimmed": true, "sourceSize": { @@ -2202,20 +2265,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 6, - "y": 7, - "w": 20, - "h": 19 + "x": 9, + "y": 4, + "w": 15, + "h": 23 }, "frame": { - "x": 129, - "y": 216, - "w": 20, - "h": 19 + "x": 214, + "y": 175, + "w": 15, + "h": 23 } }, { - "filename": "wise_glasses", + "filename": "silver_powder", "rotated": false, "trimmed": true, "sourceSize": { @@ -2224,15 +2287,15 @@ }, "spriteSourceSize": { "x": 4, - "y": 8, - "w": 23, - "h": 17 + "y": 11, + "w": 24, + "h": 15 }, "frame": { - "x": 149, - "y": 219, - "w": 23, - "h": 17 + "x": 127, + "y": 195, + "w": 24, + "h": 15 } }, { @@ -2250,8 +2313,8 @@ "h": 22 }, "frame": { - "x": 172, - "y": 219, + "x": 151, + "y": 196, "w": 22, "h": 22 } @@ -2271,14 +2334,14 @@ "h": 22 }, "frame": { - "x": 194, - "y": 219, + "x": 173, + "y": 197, "w": 22, "h": 22 } }, { - "filename": "super_lure", + "filename": "metronome", "rotated": false, "trimmed": true, "sourceSize": { @@ -2286,20 +2349,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, - "y": 4, + "x": 7, + "y": 5, "w": 17, - "h": 24 + "h": 22 }, "frame": { - "x": 23, - "y": 241, + "x": 195, + "y": 197, "w": 17, - "h": 24 + "h": 22 } }, { - "filename": "pp_max", + "filename": "poison_barb", "rotated": false, "trimmed": true, "sourceSize": { @@ -2307,20 +2370,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 + "x": 5, + "y": 6, + "w": 21, + "h": 21 }, "frame": { - "x": 40, - "y": 241, - "w": 16, - "h": 24 + "x": 212, + "y": 198, + "w": 21, + "h": 21 } }, { - "filename": "pp_up", + "filename": "wise_glasses", "rotated": false, "trimmed": true, "sourceSize": { @@ -2328,58 +2391,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 + "x": 4, + "y": 8, + "w": 23, + "h": 17 }, "frame": { - "x": 56, - "y": 241, - "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": 72, - "y": 241, - "w": 16, - "h": 24 - } - }, - { - "filename": "zinc", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 88, - "y": 241, - "w": 16, - "h": 24 + "x": 126, + "y": 210, + "w": 23, + "h": 17 } }, { @@ -2397,54 +2418,12 @@ "h": 22 }, "frame": { - "x": 107, - "y": 229, + "x": 149, + "y": 218, "w": 22, "h": 22 } }, - { - "filename": "magnet", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 129, - "y": 235, - "w": 20, - "h": 20 - } - }, - { - "filename": "upgrade", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 22, - "h": 19 - }, - "frame": { - "x": 149, - "y": 236, - "w": 22, - "h": 19 - } - }, { "filename": "water_stone", "rotated": false, @@ -2461,7 +2440,7 @@ }, "frame": { "x": 171, - "y": 241, + "y": 219, "w": 22, "h": 22 } @@ -2482,11 +2461,32 @@ }, "frame": { "x": 193, - "y": 241, + "y": 219, "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": 215, + "y": 219, + "w": 20, + "h": 22 + } + }, { "filename": "leftovers", "rotated": false, @@ -2502,14 +2502,14 @@ "h": 22 }, "frame": { - "x": 207, - "y": 47, + "x": 229, + "y": 68, "w": 15, "h": 22 } }, { - "filename": "x_attack", + "filename": "lucky_egg", "rotated": false, "trimmed": true, "sourceSize": { @@ -2517,20 +2517,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 + "x": 7, + "y": 6, + "w": 17, + "h": 20 }, "frame": { - "x": 222, - "y": 46, - "w": 22, - "h": 22 + "x": 230, + "y": 90, + "w": 17, + "h": 20 } }, { - "filename": "poison_barb", + "filename": "potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -2538,16 +2538,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 + "x": 8, + "y": 5, + "w": 17, + "h": 23 }, "frame": { - "x": 244, - "y": 46, - "w": 21, - "h": 21 + "x": 229, + "y": 110, + "w": 17, + "h": 23 } }, { @@ -2565,33 +2565,12 @@ "h": 21 }, "frame": { - "x": 244, - "y": 67, + "x": 246, + "y": 110, "w": 21, "h": 21 } }, - { - "filename": "x_defense", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 222, - "y": 68, - "w": 22, - "h": 22 - } - }, { "filename": "zoom_lens", "rotated": false, @@ -2607,14 +2586,14 @@ "h": 21 }, "frame": { - "x": 244, - "y": 88, + "x": 246, + "y": 131, "w": 21, "h": 21 } }, { - "filename": "revive", + "filename": "super_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -2622,16 +2601,79 @@ "h": 32 }, "spriteSourceSize": { - "x": 10, - "y": 8, - "w": 12, - "h": 17 + "x": 8, + "y": 5, + "w": 17, + "h": 23 }, "frame": { - "x": 208, - "y": 69, - "w": 12, - "h": 17 + "x": 229, + "y": 133, + "w": 17, + "h": 23 + } + }, + { + "filename": "pp_max", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 229, + "y": 156, + "w": 16, + "h": 24 + } + }, + { + "filename": "x_attack", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 245, + "y": 156, + "w": 22, + "h": 22 + } + }, + { + "filename": "x_defense", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 245, + "y": 178, + "w": 22, + "h": 22 } }, { @@ -2649,96 +2691,12 @@ "h": 22 }, "frame": { - "x": 207, - "y": 90, + "x": 244, + "y": 67, "w": 22, "h": 22 } }, - { - "filename": "full_heal", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 9, - "y": 4, - "w": 15, - "h": 23 - }, - "frame": { - "x": 229, - "y": 90, - "w": 15, - "h": 23 - } - }, - { - "filename": "x_sp_def", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 207, - "y": 112, - "w": 22, - "h": 22 - } - }, - { - "filename": "spell_tag", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 19, - "h": 21 - }, - "frame": { - "x": 212, - "y": 134, - "w": 19, - "h": 21 - } - }, - { - "filename": "sitrus_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 5, - "w": 20, - "h": 22 - }, - "frame": { - "x": 213, - "y": 155, - "w": 20, - "h": 22 - } - }, { "filename": "mb", "rotated": false, @@ -2754,12 +2712,75 @@ "h": 20 }, "frame": { - "x": 214, - "y": 177, + "x": 247, + "y": 89, "w": 20, "h": 20 } }, + { + "filename": "upgrade", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 233, + "y": 200, + "w": 22, + "h": 19 + } + }, + { + "filename": "x_sp_def", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 235, + "y": 219, + "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": 229, + "y": 180, + "w": 15, + "h": 15 + } + }, { "filename": "x_speed", "rotated": false, @@ -2775,8 +2796,8 @@ "h": 22 }, "frame": { - "x": 215, - "y": 197, + "x": 24, + "y": 230, "w": 22, "h": 22 } @@ -2796,14 +2817,140 @@ "h": 20 }, "frame": { - "x": 216, - "y": 219, + "x": 46, + "y": 228, "w": 20, "h": 20 } }, { - "filename": "golden_egg", + "filename": "lum_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 20, + "h": 19 + }, + "frame": { + "x": 46, + "y": 248, + "w": 20, + "h": 19 + } + }, + { + "filename": "pb_gold", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 66, + "y": 228, + "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": 66, + "y": 248, + "w": 20, + "h": 19 + } + }, + { + "filename": "pp_up", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 86, + "y": 228, + "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": 102, + "y": 228, + "w": 16, + "h": 24 + } + }, + { + "filename": "ub", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 118, + "y": 227, + "w": 20, + "h": 20 + } + }, + { + "filename": "razor_fang", "rotated": false, "trimmed": true, "sourceSize": { @@ -2813,13 +2960,13 @@ "spriteSourceSize": { "x": 7, "y": 6, - "w": 17, + "w": 18, "h": 20 }, "frame": { - "x": 229, - "y": 113, - "w": 17, + "x": 118, + "y": 247, + "w": 18, "h": 20 } }, @@ -2838,35 +2985,14 @@ "h": 19 }, "frame": { - "x": 246, - "y": 109, + "x": 136, + "y": 247, "w": 19, "h": 19 } }, { - "filename": "metronome", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 5, - "w": 17, - "h": 22 - }, - "frame": { - "x": 231, - "y": 133, - "w": 17, - "h": 22 - } - }, - { - "filename": "potion", + "filename": "zinc", "rotated": false, "trimmed": true, "sourceSize": { @@ -2875,61 +3001,19 @@ }, "spriteSourceSize": { "x": 8, - "y": 5, - "w": 17, - "h": 23 + "y": 4, + "w": 16, + "h": 24 }, "frame": { - "x": 248, - "y": 128, - "w": 17, - "h": 23 + "x": 155, + "y": 240, + "w": 16, + "h": 24 } }, { - "filename": "super_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 248, - "y": 151, - "w": 17, - "h": 23 - } - }, - { - "filename": "prism_scale", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 9, - "y": 8, - "w": 15, - "h": 15 - }, - "frame": { - "x": 233, - "y": 155, - "w": 15, - "h": 15 - } - }, - { - "filename": "pb_gold", + "filename": "everstone", "rotated": false, "trimmed": true, "sourceSize": { @@ -2938,36 +3022,15 @@ }, "spriteSourceSize": { "x": 6, - "y": 6, + "y": 8, "w": 20, - "h": 20 + "h": 17 }, "frame": { - "x": 234, - "y": 174, + "x": 171, + "y": 241, "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": 237, - "y": 194, - "w": 17, - "h": 20 + "h": 17 } }, { @@ -2985,53 +3048,11 @@ "h": 19 }, "frame": { - "x": 237, - "y": 214, + "x": 191, + "y": 241, "w": 18, "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": 236, - "y": 233, - "w": 20, - "h": 19 - } - }, - { - "filename": "ub", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 216, - "y": 239, - "w": 20, - "h": 20 - } } ] } @@ -3039,6 +3060,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:94cc963f001deac1b1c1ffe83abfa601:3a5974e02790f74ca661e9e624dd58cf:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:ba82aafcf565da1a9adf0d1e3a405b83:d751914787cd1ba803961379ea6f7f7f:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index e1e3e023b..febace7f2 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/reviver_seed.png b/public/images/items/reviver_seed.png new file mode 100644 index 000000000..31cfae46f Binary files /dev/null and b/public/images/items/reviver_seed.png differ diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 655189d53..de480b5ea 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -5,7 +5,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; import { Stat } from "./data/pokemon-stat"; -import { BerryModifier, ContactHeldItemTransferChanceModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier } from "./modifier/modifier"; +import { BerryModifier, ContactHeldItemTransferChanceModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier } from "./modifier/modifier"; import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler"; import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballName, getPokeballTintColor, PokeballType } from "./data/pokeball"; import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims"; @@ -1729,7 +1729,19 @@ export class FaintPhase extends PokemonPhase { start() { super.start(); - this.scene.queueMessage(getPokemonMessage(this.getPokemon(), ' fainted!'), null, true); + const pokemon = this.getPokemon(); + + const instantReviveModifier = this.scene.applyModifier(PokemonInstantReviveModifier, this.player, this.getPokemon()) as PokemonInstantReviveModifier; + + if (instantReviveModifier) { + if (!--instantReviveModifier.stackCount) + this.scene.removeModifier(instantReviveModifier); + this.scene.updateModifiers(this.player); + this.end(); + return; + } + + this.scene.queueMessage(getPokemonMessage(pokemon, ' fainted!'), null, true); if (this.player) { const nonFaintedPartyMemberCount = this.scene.getParty().filter(p => !p.isFainted()).length; @@ -1739,8 +1751,6 @@ export class FaintPhase extends PokemonPhase { this.scene.unshiftPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false)); } else this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex)); - - const pokemon = this.getPokemon(); pokemon.lapseTags(BattlerTagLapseType.FAINT); this.scene.getField().filter(p => p && p !== pokemon).forEach(p => p.removeTagsBySourceId(pokemon.id)); diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index e0602e636..ce70ace89 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -561,6 +561,9 @@ const modifierTypes = { SACRED_ASH: () => new AllPokemonFullReviveModifierType('SACRED ASH'), + REVIVER_SEED: () => new PokemonHeldItemModifierType('REVIVER SEED', 'Revives the holder for 1/2 HP upon fainting', + (type, args) => new Modifiers.PokemonInstantReviveModifier(type, (args[0] as Pokemon).id)), + ETHER: () => new PokemonPpRestoreModifierType('ETHER', 10), MAX_ETHER: () => new PokemonPpRestoreModifierType('MAX ETHER', -1), @@ -723,6 +726,7 @@ const modifierPool = { new WeightedModifierType(modifierTypes.MAX_LURE, 4), 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.GRIP_CLAW, 2), new WeightedModifierType(modifierTypes.HEALING_CHARM, 1), diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 725e91110..27f77f3c7 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -666,6 +666,32 @@ export class PreserveBerryModifier extends PersistentModifier { } } +export class PokemonInstantReviveModifier extends PokemonHeldItemModifier { + constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) { + super(type, pokemonId, stackCount); + } + + matchType(modifier: Modifier) { + return modifier instanceof PokemonInstantReviveModifier; + } + + clone() { + return new PokemonInstantReviveModifier(this.type, this.pokemonId, this.stackCount); + } + + apply(args: any[]): boolean { + const pokemon = args[0] as Pokemon; + + pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(), Math.max(Math.floor(pokemon.getMaxHp() / 2)), getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false)); + + return true; + } + + getMaxStackCount(): integer { + return 10; + } +} + export abstract class ConsumablePokemonModifier extends ConsumableModifier { public pokemonId: integer;