diff --git a/public/images/items.json b/public/images/items.json index b5f778fdc..cb5cd289f 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -4,8 +4,8 @@ "image": "items.png", "format": "RGBA8888", "size": { - "w": 248, - "h": 248 + "w": 256, + "h": 256 }, "scale": 1, "frames": [ @@ -136,7 +136,7 @@ } }, { - "filename": "scanner", + "filename": "salac_berry", "rotated": false, "trimmed": true, "sourceSize": { @@ -157,7 +157,7 @@ } }, { - "filename": "silk_scarf", + "filename": "scanner", "rotated": false, "trimmed": true, "sourceSize": { @@ -178,7 +178,7 @@ } }, { - "filename": "sun_stone", + "filename": "silk_scarf", "rotated": false, "trimmed": true, "sourceSize": { @@ -198,6 +198,27 @@ "h": 24 } }, + { + "filename": "sun_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 4, + "w": 24, + "h": 24 + }, + "frame": { + "x": 147, + "y": 0, + "w": 24, + "h": 24 + } + }, { "filename": "big_root", "rotated": false, @@ -213,7 +234,7 @@ "h": 24 }, "frame": { - "x": 147, + "x": 171, "y": 0, "w": 23, "h": 24 @@ -234,7 +255,7 @@ "h": 23 }, "frame": { - "x": 170, + "x": 194, "y": 0, "w": 24, "h": 23 @@ -254,27 +275,6 @@ "w": 24, "h": 23 }, - "frame": { - "x": 194, - "y": 0, - "w": 24, - "h": 23 - } - }, - { - "filename": "scope-lens", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 5, - "w": 24, - "h": 23 - }, "frame": { "x": 218, "y": 0, @@ -388,7 +388,7 @@ } }, { - "filename": "silver_powder", + "filename": "max_revive", "rotated": false, "trimmed": true, "sourceSize": { @@ -396,16 +396,37 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, - "y": 11, - "w": 24, - "h": 15 + "x": 5, + "y": 4, + "w": 22, + "h": 24 }, "frame": { "x": 0, "y": 232, - "w": 24, - "h": 15 + "w": 22, + "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": 22, + "y": 232, + "w": 21, + "h": 24 } }, { @@ -472,7 +493,7 @@ } }, { - "filename": "twisted_spoon", + "filename": "scope-lens", "rotated": false, "trimmed": true, "sourceSize": { @@ -492,6 +513,27 @@ "h": 23 } }, + { + "filename": "twisted_spoon", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 5, + "w": 24, + "h": 23 + }, + "frame": { + "x": 64, + "y": 24, + "w": 24, + "h": 23 + } + }, { "filename": "berry_pouch", "rotated": false, @@ -507,7 +549,7 @@ "h": 23 }, "frame": { - "x": 64, + "x": 88, "y": 24, "w": 23, "h": 23 @@ -528,7 +570,7 @@ "h": 22 }, "frame": { - "x": 87, + "x": 111, "y": 24, "w": 24, "h": 22 @@ -549,7 +591,7 @@ "h": 22 }, "frame": { - "x": 111, + "x": 135, "y": 24, "w": 24, "h": 22 @@ -570,7 +612,7 @@ "h": 22 }, "frame": { - "x": 135, + "x": 159, "y": 24, "w": 23, "h": 22 @@ -591,33 +633,12 @@ "h": 23 }, "frame": { - "x": 158, + "x": 182, "y": 24, "w": 22, "h": 23 } }, - { - "filename": "max_revive", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 4, - "w": 22, - "h": 24 - }, - "frame": { - "x": 180, - "y": 23, - "w": 22, - "h": 24 - } - }, { "filename": "rare_candy", "rotated": false, @@ -633,14 +654,14 @@ "h": 23 }, "frame": { - "x": 202, + "x": 204, "y": 23, "w": 23, "h": 23 } }, { - "filename": "rarer_candy", + "filename": "dragon_fang", "rotated": false, "trimmed": true, "sourceSize": { @@ -648,15 +669,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, + "x": 5, "y": 5, - "w": 23, + "w": 21, "h": 23 }, "frame": { - "x": 225, + "x": 227, "y": 23, - "w": 23, + "w": 21, "h": 23 } }, @@ -681,6 +702,27 @@ "h": 24 } }, + { + "filename": "rarer_candy", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 5, + "w": 23, + "h": 23 + }, + "frame": { + "x": 49, + "y": 47, + "w": 23, + "h": 23 + } + }, { "filename": "fire_stone", "rotated": false, @@ -696,12 +738,159 @@ "h": 23 }, "frame": { - "x": 49, + "x": 72, "y": 47, "w": 22, "h": 23 } }, + { + "filename": "focus_sash", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 4, + "w": 22, + "h": 23 + }, + "frame": { + "x": 94, + "y": 47, + "w": 22, + "h": 23 + } + }, + { + "filename": "never_melt_ice", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 23 + }, + "frame": { + "x": 116, + "y": 46, + "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": 138, + "y": 46, + "w": 22, + "h": 23 + } + }, + { + "filename": "reaper_cloth", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 23 + }, + "frame": { + "x": 160, + "y": 46, + "w": 22, + "h": 23 + } + }, + { + "filename": "charcoal", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 182, + "y": 47, + "w": 22, + "h": 22 + } + }, + { + "filename": "dire_hit", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 204, + "y": 46, + "w": 22, + "h": 22 + } + }, + { + "filename": "electirizer", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 226, + "y": 46, + "w": 22, + "h": 22 + } + }, { "filename": "max_elixir", "rotated": false, @@ -724,7 +913,7 @@ } }, { - "filename": "oval_charm", + "filename": "shiny_charm", "rotated": false, "trimmed": true, "sourceSize": { @@ -745,91 +934,7 @@ } }, { - "filename": "dragon_fang", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 21, - "h": 23 - }, - "frame": { - "x": 71, - "y": 47, - "w": 21, - "h": 23 - } - }, - { - "filename": "focus_sash", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 4, - "w": 22, - "h": 23 - }, - "frame": { - "x": 92, - "y": 46, - "w": 22, - "h": 23 - } - }, - { - "filename": "never_melt_ice", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 23 - }, - "frame": { - "x": 114, - "y": 46, - "w": 22, - "h": 23 - } - }, - { - "filename": "reaper_cloth", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 23 - }, - "frame": { - "x": 136, - "y": 46, - "w": 22, - "h": 23 - } - }, - { - "filename": "charcoal", + "filename": "enigma_berry", "rotated": false, "trimmed": true, "sourceSize": { @@ -842,116 +947,32 @@ "w": 22, "h": 22 }, - "frame": { - "x": 158, - "y": 47, - "w": 22, - "h": 22 - } - }, - { - "filename": "dire_hit", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 180, - "y": 47, - "w": 22, - "h": 22 - } - }, - { - "filename": "electirizer", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 202, - "y": 46, - "w": 22, - "h": 22 - } - }, - { - "filename": "sacred_ash", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 7, - "w": 24, - "h": 20 - }, - "frame": { - "x": 224, - "y": 46, - "w": 24, - "h": 20 - } - }, - { - "filename": "soft_sand", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 7, - "w": 24, - "h": 20 - }, - "frame": { - "x": 224, - "y": 66, - "w": 24, - "h": 20 - } - }, - { - "filename": "shiny_charm", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 21, - "h": 24 - }, "frame": { "x": 72, "y": 70, - "w": 21, - "h": 24 + "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": 94, + "y": 70, + "w": 22, + "h": 22 } }, { @@ -969,7 +990,7 @@ "h": 22 }, "frame": { - "x": 93, + "x": 116, "y": 69, "w": 22, "h": 22 @@ -990,7 +1011,7 @@ "h": 22 }, "frame": { - "x": 115, + "x": 138, "y": 69, "w": 22, "h": 22 @@ -1011,7 +1032,7 @@ "h": 22 }, "frame": { - "x": 137, + "x": 160, "y": 69, "w": 22, "h": 22 @@ -1032,12 +1053,33 @@ "h": 22 }, "frame": { - "x": 159, + "x": 182, "y": 69, "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": 204, + "y": 68, + "w": 21, + "h": 23 + } + }, { "filename": "leaf_stone", "rotated": false, @@ -1053,96 +1095,12 @@ "h": 23 }, "frame": { - "x": 181, - "y": 69, + "x": 225, + "y": 68, "w": 21, "h": 23 } }, - { - "filename": "protector", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 202, - "y": 68, - "w": 22, - "h": 22 - } - }, - { - "filename": "choice_specs", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 24, - "h": 18 - }, - "frame": { - "x": 224, - "y": 86, - "w": 24, - "h": 18 - } - }, - { - "filename": "deep_sea_scale", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 22, - "h": 20 - }, - "frame": { - "x": 202, - "y": 90, - "w": 22, - "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": 224, - "y": 104, - "w": 24, - "h": 18 - } - }, { "filename": "moon_stone", "rotated": false, @@ -1164,6 +1122,27 @@ "h": 21 } }, + { + "filename": "protector", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 18, + "y": 119, + "w": 22, + "h": 22 + } + }, { "filename": "sharp_beak", "rotated": false, @@ -1180,34 +1159,13 @@ }, "frame": { "x": 18, - "y": 119, + "y": 141, "w": 21, "h": 23 } }, { - "filename": "mystic_water", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 5, - "w": 20, - "h": 23 - }, - "frame": { - "x": 18, - "y": 142, - "w": 20, - "h": 23 - } - }, - { - "filename": "dubious_disc", + "filename": "binding_band", "rotated": false, "trimmed": true, "sourceSize": { @@ -1216,15 +1174,15 @@ }, "spriteSourceSize": { "x": 5, - "y": 7, - "w": 22, - "h": 19 + "y": 6, + "w": 23, + "h": 20 }, "frame": { "x": 18, - "y": 165, - "w": 22, - "h": 19 + "y": 164, + "w": 23, + "h": 20 } }, { @@ -1290,6 +1248,279 @@ "h": 21 } }, + { + "filename": "starf_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 40, + "y": 119, + "w": 22, + "h": 22 + } + }, + { + "filename": "mystic_water", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 20, + "h": 23 + }, + "frame": { + "x": 39, + "y": 141, + "w": 20, + "h": 23 + } + }, + { + "filename": "hyper_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 41, + "y": 164, + "w": 17, + "h": 23 + } + }, + { + "filename": "potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 41, + "y": 187, + "w": 17, + "h": 23 + } + }, + { + "filename": "metal_coat", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 19, + "h": 22 + }, + "frame": { + "x": 41, + "y": 210, + "w": 19, + "h": 22 + } + }, + { + "filename": "pp_max", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 43, + "y": 232, + "w": 16, + "h": 24 + } + }, + { + "filename": "pp_up", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 59, + "y": 232, + "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": 61, + "y": 94, + "w": 16, + "h": 24 + } + }, + { + "filename": "sacred_ash", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 7, + "w": 24, + "h": 20 + }, + "frame": { + "x": 77, + "y": 92, + "w": 24, + "h": 20 + } + }, + { + "filename": "full_heal", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 4, + "w": 15, + "h": 23 + }, + "frame": { + "x": 62, + "y": 118, + "w": 15, + "h": 23 + } + }, + { + "filename": "soft_sand", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 7, + "w": 24, + "h": 20 + }, + "frame": { + "x": 77, + "y": 112, + "w": 24, + "h": 20 + } + }, + { + "filename": "sitrus_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 20, + "h": 22 + }, + "frame": { + "x": 59, + "y": 141, + "w": 20, + "h": 22 + } + }, + { + "filename": "zinc", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 101, + "y": 92, + "w": 16, + "h": 24 + } + }, { "filename": "thunder_stone", "rotated": false, @@ -1305,8 +1536,8 @@ "h": 22 }, "frame": { - "x": 39, - "y": 119, + "x": 117, + "y": 91, "w": 22, "h": 22 } @@ -1326,8 +1557,8 @@ "h": 22 }, "frame": { - "x": 61, - "y": 94, + "x": 139, + "y": 91, "w": 22, "h": 22 } @@ -1347,33 +1578,12 @@ "h": 22 }, "frame": { - "x": 61, - "y": 116, + "x": 161, + "y": 91, "w": 22, "h": 22 } }, - { - "filename": "pp_max", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 83, - "y": 94, - "w": 16, - "h": 24 - } - }, { "filename": "tm_dragon", "rotated": false, @@ -1389,7 +1599,7 @@ "h": 22 }, "frame": { - "x": 99, + "x": 183, "y": 91, "w": 22, "h": 22 @@ -1410,7 +1620,7 @@ "h": 22 }, "frame": { - "x": 121, + "x": 205, "y": 91, "w": 22, "h": 22 @@ -1431,117 +1641,12 @@ "h": 22 }, "frame": { - "x": 143, + "x": 227, "y": 91, "w": 22, "h": 22 } }, - { - "filename": "pp_up", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 165, - "y": 91, - "w": 16, - "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": 181, - "y": 92, - "w": 21, - "h": 21 - } - }, - { - "filename": "deep_sea_tooth", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 22, - "h": 21 - }, - "frame": { - "x": 202, - "y": 110, - "w": 22, - "h": 21 - } - }, - { - "filename": "poison_barb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 181, - "y": 113, - "w": 21, - "h": 21 - } - }, - { - "filename": "binding_band", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 23, - "h": 20 - }, - "frame": { - "x": 83, - "y": 118, - "w": 23, - "h": 20 - } - }, { "filename": "tm_fighting", "rotated": false, @@ -1557,12 +1662,33 @@ "h": 22 }, "frame": { - "x": 106, - "y": 113, + "x": 79, + "y": 132, "w": 22, "h": 22 } }, + { + "filename": "super_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 101, + "y": 116, + "w": 17, + "h": 23 + } + }, { "filename": "tm_fire", "rotated": false, @@ -1578,75 +1704,12 @@ "h": 22 }, "frame": { - "x": 128, + "x": 118, "y": 113, "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": 150, - "y": 113, - "w": 15, - "h": 23 - } - }, - { - "filename": "protein", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 165, - "y": 115, - "w": 16, - "h": 24 - } - }, - { - "filename": "black_glasses", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 23, - "h": 17 - }, - "frame": { - "x": 224, - "y": 122, - "w": 23, - "h": 17 - } - }, { "filename": "tm_flying", "rotated": false, @@ -1662,75 +1725,12 @@ "h": 22 }, "frame": { - "x": 202, - "y": 131, + "x": 140, + "y": 113, "w": 22, "h": 22 } }, - { - "filename": "shiny_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 181, - "y": 134, - "w": 21, - "h": 21 - } - }, - { - "filename": "shell_bell", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 23, - "h": 20 - }, - "frame": { - "x": 224, - "y": 139, - "w": 23, - "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": 24, - "y": 232, - "w": 15, - "h": 15 - } - }, { "filename": "tm_ghost", "rotated": false, @@ -1746,159 +1746,12 @@ "h": 22 }, "frame": { - "x": 202, - "y": 153, + "x": 162, + "y": 113, "w": 22, "h": 22 } }, - { - "filename": "wise_glasses", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 23, - "h": 17 - }, - "frame": { - "x": 224, - "y": 159, - "w": 23, - "h": 17 - } - }, - { - "filename": "hyper_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 38, - "y": 142, - "w": 17, - "h": 23 - } - }, - { - "filename": "lum_berry", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 7, - "w": 20, - "h": 19 - }, - "frame": { - "x": 40, - "y": 165, - "w": 20, - "h": 19 - } - }, - { - "filename": "metal_coat", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 5, - "w": 19, - "h": 22 - }, - "frame": { - "x": 41, - "y": 184, - "w": 19, - "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": 41, - "y": 206, - "w": 20, - "h": 22 - } - }, - { - "filename": "gb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 41, - "y": 228, - "w": 20, - "h": 20 - } - }, - { - "filename": "zinc", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 55, - "y": 141, - "w": 16, - "h": 24 - } - }, { "filename": "tm_grass", "rotated": false, @@ -1914,33 +1767,12 @@ "h": 22 }, "frame": { - "x": 71, - "y": 138, + "x": 184, + "y": 113, "w": 22, "h": 22 } }, - { - "filename": "leftovers", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 15, - "h": 22 - }, - "frame": { - "x": 93, - "y": 138, - "w": 15, - "h": 22 - } - }, { "filename": "tm_ground", "rotated": false, @@ -1956,54 +1788,12 @@ "h": 22 }, "frame": { - "x": 108, - "y": 135, + "x": 206, + "y": 113, "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": 130, - "y": 135, - "w": 20, - "h": 20 - } - }, - { - "filename": "potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 60, - "y": 165, - "w": 17, - "h": 23 - } - }, { "filename": "tm_ice", "rotated": false, @@ -2019,14 +1809,14 @@ "h": 22 }, "frame": { - "x": 77, - "y": 160, + "x": 228, + "y": 113, "w": 22, "h": 22 } }, { - "filename": "everstone", + "filename": "apicot_berry", "rotated": false, "trimmed": true, "sourceSize": { @@ -2035,15 +1825,15 @@ }, "spriteSourceSize": { "x": 6, - "y": 8, - "w": 20, - "h": 17 + "y": 6, + "w": 19, + "h": 20 }, "frame": { - "x": 60, - "y": 188, - "w": 20, - "h": 17 + "x": 101, + "y": 139, + "w": 19, + "h": 20 } }, { @@ -2061,75 +1851,12 @@ "h": 22 }, "frame": { - "x": 61, - "y": 205, + "x": 120, + "y": 135, "w": 22, "h": 22 } }, - { - "filename": "zoom_lens", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 61, - "y": 227, - "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": 82, - "y": 227, - "w": 19, - "h": 21 - } - }, - { - "filename": "super_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 80, - "y": 182, - "w": 17, - "h": 23 - } - }, { "filename": "tm_poison", "rotated": false, @@ -2145,33 +1872,12 @@ "h": 22 }, "frame": { - "x": 83, - "y": 205, + "x": 142, + "y": 135, "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": 99, - "y": 160, - "w": 17, - "h": 22 - } - }, { "filename": "tm_psychic", "rotated": false, @@ -2187,8 +1893,8 @@ "h": 22 }, "frame": { - "x": 97, - "y": 182, + "x": 164, + "y": 135, "w": 22, "h": 22 } @@ -2208,8 +1914,8 @@ "h": 22 }, "frame": { - "x": 105, - "y": 204, + "x": 186, + "y": 135, "w": 22, "h": 22 } @@ -2229,8 +1935,8 @@ "h": 22 }, "frame": { - "x": 105, - "y": 226, + "x": 208, + "y": 135, "w": 22, "h": 22 } @@ -2250,12 +1956,201 @@ "h": 22 }, "frame": { - "x": 116, - "y": 157, + "x": 230, + "y": 135, "w": 22, "h": 22 } }, + { + "filename": "deep_sea_scale", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 22, + "h": 20 + }, + "frame": { + "x": 79, + "y": 154, + "w": 22, + "h": 20 + } + }, + { + "filename": "black_glasses", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 23, + "h": 17 + }, + "frame": { + "x": 101, + "y": 159, + "w": 23, + "h": 17 + } + }, + { + "filename": "choice_specs", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 124, + "y": 157, + "w": 24, + "h": 18 + } + }, + { + "filename": "dragon_scale", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 148, + "y": 157, + "w": 24, + "h": 18 + } + }, + { + "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": 157, + "w": 23, + "h": 20 + } + }, + { + "filename": "deep_sea_tooth", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 22, + "h": 21 + }, + "frame": { + "x": 195, + "y": 157, + "w": 22, + "h": 21 + } + }, + { + "filename": "liechi_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 22, + "h": 21 + }, + "frame": { + "x": 217, + "y": 157, + "w": 22, + "h": 21 + } + }, + { + "filename": "metronome", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 5, + "w": 17, + "h": 22 + }, + "frame": { + "x": 239, + "y": 157, + "w": 17, + "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": 58, + "y": 164, + "w": 21, + "h": 21 + } + }, { "filename": "water_stone", "rotated": false, @@ -2271,8 +2166,8 @@ "h": 22 }, "frame": { - "x": 119, - "y": 179, + "x": 58, + "y": 185, "w": 22, "h": 22 } @@ -2292,12 +2187,54 @@ "h": 22 }, "frame": { - "x": 127, - "y": 201, + "x": 60, + "y": 207, "w": 22, "h": 22 } }, + { + "filename": "poison_barb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 80, + "y": 174, + "w": 21, + "h": 21 + } + }, + { + "filename": "dubious_disc", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 101, + "y": 176, + "w": 22, + "h": 19 + } + }, { "filename": "x_attack", "rotated": false, @@ -2313,8 +2250,8 @@ "h": 22 }, "frame": { - "x": 127, - "y": 223, + "x": 82, + "y": 195, "w": 22, "h": 22 } @@ -2334,12 +2271,33 @@ "h": 22 }, "frame": { - "x": 138, - "y": 155, + "x": 104, + "y": 195, "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": 82, + "y": 217, + "w": 24, + "h": 15 + } + }, { "filename": "x_sp_atk", "rotated": false, @@ -2355,12 +2313,33 @@ "h": 22 }, "frame": { - "x": 141, - "y": 177, + "x": 75, + "y": 232, "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": 106, + "y": 217, + "w": 20, + "h": 17 + } + }, { "filename": "x_sp_def", "rotated": false, @@ -2376,8 +2355,8 @@ "h": 22 }, "frame": { - "x": 149, - "y": 199, + "x": 97, + "y": 234, "w": 22, "h": 22 } @@ -2397,14 +2376,14 @@ "h": 22 }, "frame": { - "x": 149, - "y": 221, + "x": 119, + "y": 234, "w": 22, "h": 22 } }, { - "filename": "oval_stone", + "filename": "revive", "rotated": false, "trimmed": true, "sourceSize": { @@ -2412,16 +2391,100 @@ "h": 32 }, "spriteSourceSize": { - "x": 7, - "y": 7, - "w": 18, - "h": 19 + "x": 10, + "y": 8, + "w": 12, + "h": 17 }, "frame": { - "x": 163, - "y": 139, - "w": 18, - "h": 19 + "x": 242, + "y": 0, + "w": 12, + "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": 124, + "y": 175, + "w": 23, + "h": 17 + } + }, + { + "filename": "shiny_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 126, + "y": 192, + "w": 21, + "h": 21 + } + }, + { + "filename": "zoom_lens", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 126, + "y": 213, + "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": 141, + "y": 234, + "w": 15, + "h": 22 } }, { @@ -2439,12 +2502,75 @@ "h": 19 }, "frame": { - "x": 160, - "y": 158, + "x": 147, + "y": 175, "w": 22, "h": 19 } }, + { + "filename": "gb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 147, + "y": 194, + "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": 147, + "y": 214, + "w": 20, + "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": 169, + "y": 177, + "w": 20, + "h": 19 + } + }, { "filename": "mb", "rotated": false, @@ -2460,33 +2586,12 @@ "h": 20 }, "frame": { - "x": 182, - "y": 155, + "x": 167, + "y": 196, "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": 163, - "y": 177, - "w": 19, - "h": 20 - } - }, { "filename": "pb", "rotated": false, @@ -2502,8 +2607,8 @@ "h": 20 }, "frame": { - "x": 182, - "y": 175, + "x": 167, + "y": 216, "w": 20, "h": 20 } @@ -2523,8 +2628,29 @@ "h": 20 }, "frame": { - "x": 202, - "y": 175, + "x": 156, + "y": 236, + "w": 20, + "h": 20 + } + }, + { + "filename": "ub", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 176, + "y": 236, "w": 20, "h": 20 } @@ -2544,35 +2670,14 @@ "h": 19 }, "frame": { - "x": 222, - "y": 176, + "x": 189, + "y": 178, "w": 20, "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": 171, - "y": 197, - "w": 17, - "h": 20 - } - }, - { - "filename": "ub", + "filename": "candy_jar", "rotated": false, "trimmed": true, "sourceSize": { @@ -2582,16 +2687,37 @@ "spriteSourceSize": { "x": 6, "y": 6, - "w": 20, + "w": 19, "h": 20 }, "frame": { - "x": 188, - "y": 195, - "w": 20, + "x": 209, + "y": 178, + "w": 19, "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": 187, + "y": 197, + "w": 19, + "h": 21 + } + }, { "filename": "hard_stone", "rotated": false, @@ -2607,14 +2733,14 @@ "h": 20 }, "frame": { - "x": 208, - "y": 195, + "x": 206, + "y": 198, "w": 19, "h": 20 } }, { - "filename": "lucky_egg", + "filename": "prism_scale", "rotated": false, "trimmed": true, "sourceSize": { @@ -2622,16 +2748,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 17, - "h": 20 + "x": 9, + "y": 8, + "w": 15, + "h": 15 }, "frame": { - "x": 171, - "y": 217, - "w": 17, - "h": 20 + "x": 187, + "y": 218, + "w": 15, + "h": 15 } }, { @@ -2649,12 +2775,33 @@ "h": 19 }, "frame": { - "x": 188, - "y": 215, + "x": 202, + "y": 218, "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": 196, + "y": 237, + "w": 18, + "h": 19 + } + }, { "filename": "razor_fang", "rotated": false, @@ -2670,14 +2817,14 @@ "h": 20 }, "frame": { - "x": 207, - "y": 215, + "x": 228, + "y": 179, "w": 18, "h": 20 } }, { - "filename": "revive", + "filename": "golden_egg", "rotated": false, "trimmed": true, "sourceSize": { @@ -2685,16 +2832,37 @@ "h": 32 }, "spriteSourceSize": { - "x": 10, - "y": 8, - "w": 12, - "h": 17 + "x": 7, + "y": 6, + "w": 17, + "h": 20 }, "frame": { - "x": 150, - "y": 136, - "w": 12, - "h": 17 + "x": 225, + "y": 199, + "w": 17, + "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": 221, + "y": 219, + "w": 17, + "h": 20 } } ] @@ -2703,6 +2871,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:b6805cfc15896d75dbfaf0817c2b16ed:fb72ca38a99466642275b1256b378b18:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:d9fed6b45a0ede021dc0e0f8ffebf257:0d52b1a17d46f9faa1086dd8feb3b9eb:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index a369477d0..1f37d8214 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/apicot_berry.png b/public/images/items/apicot_berry.png new file mode 100644 index 000000000..2cfa66acd Binary files /dev/null and b/public/images/items/apicot_berry.png differ diff --git a/public/images/items/enigma_berry.png b/public/images/items/enigma_berry.png new file mode 100644 index 000000000..26c7f11ee Binary files /dev/null and b/public/images/items/enigma_berry.png differ diff --git a/public/images/items/ganlon_berry.png b/public/images/items/ganlon_berry.png new file mode 100644 index 000000000..81aecd830 Binary files /dev/null and b/public/images/items/ganlon_berry.png differ diff --git a/public/images/items/lansat_berry.png b/public/images/items/lansat_berry.png new file mode 100644 index 000000000..6b2a8fb47 Binary files /dev/null and b/public/images/items/lansat_berry.png differ diff --git a/public/images/items/liechi_berry.png b/public/images/items/liechi_berry.png new file mode 100644 index 000000000..492ef7e86 Binary files /dev/null and b/public/images/items/liechi_berry.png differ diff --git a/public/images/items/petaya_berry.png b/public/images/items/petaya_berry.png new file mode 100644 index 000000000..e1dae4671 Binary files /dev/null and b/public/images/items/petaya_berry.png differ diff --git a/public/images/items/salac_berry.png b/public/images/items/salac_berry.png new file mode 100644 index 000000000..ac0d29f21 Binary files /dev/null and b/public/images/items/salac_berry.png differ diff --git a/public/images/items/starf_berry.png b/public/images/items/starf_berry.png new file mode 100644 index 000000000..71fe1ac11 Binary files /dev/null and b/public/images/items/starf_berry.png differ diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 4a8608036..a8ded16c1 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -5,7 +5,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, HitsTagAttr, Mis 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, HeldItemTransferModifier, HitHealModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, TempBattleStatBoosterModifier, TurnHealModifier } from "./modifier/modifier"; +import { BerryModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, 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"; @@ -768,7 +768,7 @@ export abstract class MovePhase extends BattlePhase { } if (this.cancelled) { - this.pokemon.getMoveHistory().push({ move: Moves.NONE, result: MoveResult.FAILED }); + this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAILED }); this.end(); return; } @@ -783,7 +783,7 @@ export abstract class MovePhase extends BattlePhase { if (success) this.scene.unshiftPhase(this.getEffectPhase()); else { - this.pokemon.getMoveHistory().push({ move: this.move.moveId, result: MoveResult.FAILED, virtual: this.move.virtual }); + this.pokemon.pushMoveHistory({ move: this.move.moveId, result: MoveResult.FAILED, virtual: this.move.virtual }); this.scene.queueMessage('But it failed!'); } @@ -900,7 +900,7 @@ abstract class MoveEffectPhase extends PokemonPhase { if (!this.hitCheck()) { this.scene.queueMessage(getPokemonMessage(user, '\'s\nattack missed!')); - user.getMoveHistory().push({ move: this.move.moveId, result: MoveResult.MISSED, virtual: this.move.virtual }); + user.pushMoveHistory({ move: this.move.moveId, result: MoveResult.MISSED, virtual: this.move.virtual }); applyMoveAttrs(MissEffectAttr, user, target, this.move.getMove()); this.end(); return; @@ -911,9 +911,15 @@ abstract class MoveEffectPhase extends PokemonPhase { new MoveAnim(this.move.getMove().id as Moves, user, target).play(this.scene, () => { const result = !isProtected ? target.apply(user, this.move) : MoveResult.NO_EFFECT; ++user.turnData.hitCount; - user.getMoveHistory().push({ move: this.move.moveId, result: result, virtual: this.move.virtual }); + user.pushMoveHistory({ move: this.move.moveId, result: result, virtual: this.move.virtual }); if (result !== MoveResult.NO_EFFECT && result !== MoveResult.FAILED) { applyMoveAttrs(MoveEffectAttr, user, target, this.move.getMove()); + if (result < MoveResult.NO_EFFECT) { + const flinched = new Utils.BooleanHolder(false); + user.scene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched); + if (flinched.value) + target.addTag(BattlerTagType.FLINCHED, undefined, this.move.moveId, user.id); + } // Charge attribute with charge effect takes all effect attributes and applies them to charge stage, so ignore them if this is present if (!isProtected && target.hp && !this.move.getMove().getAttrs(ChargeAttr).filter(ca => (ca as ChargeAttr).chargeEffect).length) applyMoveAttrs(MoveHitEffectAttr, user, target, this.move.getMove()); diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 39f5d4137..a6715f5af 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -470,7 +470,7 @@ export default class BattleScene extends Phaser.Scene { this.arenaBgTransition.setPosition(0, 0); this.arenaPlayer.setPosition(340, 20); - this.arenaPlayerTransition.setPosition(40, 2); + this.arenaPlayerTransition.setPosition(40, 20); this.arenaEnemy.setPosition(-240, 13); this.arenaNextEnemy.setPosition(-240, 13); diff --git a/src/data/battler-tag.ts b/src/data/battler-tag.ts index 3ef76ef72..38fd5e62d 100644 --- a/src/data/battler-tag.ts +++ b/src/data/battler-tag.ts @@ -5,7 +5,7 @@ import Pokemon from "../pokemon"; import { Stat } from "./pokemon-stat"; import { StatusEffect } from "./status-effect"; import * as Utils from "../utils"; -import { Moves, allMoves } from "./move"; +import { LapseBattlerTagAttr, Moves, allMoves } from "./move"; import { Type } from "./type"; export enum BattlerTagType { @@ -30,6 +30,7 @@ export enum BattlerTagType { PROTECTED, FLYING, UNDERGROUND, + CRIT_BOOST, NO_CRIT, BYPASS_SLEEP, IGNORE_FLYING @@ -462,6 +463,28 @@ export class HideSpriteTag extends BattlerTag { } } +export class CritBoostTag extends BattlerTag { + constructor(tagType: BattlerTagType, sourceMove: Moves) { + super(tagType, BattlerTagLapseType.TURN_END, 1, sourceMove); + } + + onAdd(pokemon: Pokemon): void { + super.onAdd(pokemon); + + pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' is getting\npumped!')); + } + + lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { + return lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); + } + + onRemove(pokemon: Pokemon): void { + super.onRemove(pokemon); + + pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' relaxed.')); + } +} + export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourceMove: Moves, sourceId: integer): BattlerTag { switch (tagType) { case BattlerTagType.RECHARGING: @@ -501,6 +524,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc case BattlerTagType.FLYING: case BattlerTagType.UNDERGROUND: return new HideSpriteTag(tagType, turnCount, sourceMove); + case BattlerTagType.CRIT_BOOST: + return new CritBoostTag(tagType, sourceMove); case BattlerTagType.NO_CRIT: return new BattlerTag(tagType, BattlerTagLapseType.AFTER_MOVE, turnCount, sourceMove); case BattlerTagType.BYPASS_SLEEP: diff --git a/src/data/berry.ts b/src/data/berry.ts index 34546f767..c346c92c8 100644 --- a/src/data/berry.ts +++ b/src/data/berry.ts @@ -1,21 +1,26 @@ -import { MessagePhase, PokemonHealPhase } from "../battle-phases"; +import { PokemonHealPhase, StatChangePhase } from "../battle-phases"; import { getPokemonMessage } from "../messages"; -import Pokemon from "../pokemon"; +import Pokemon, { MoveResult } from "../pokemon"; +import { getBattleStatName } from "./battle-stat"; +import { BattleStat } from "./battle-stat"; import { BattlerTagType } from "./battler-tag"; import { getStatusEffectHealText } from "./status-effect"; export enum BerryType { SITRUS, - LUM + LUM, + ENIGMA, + LIECHI, + GANLON, + SALAC, + PETAYA, + APICOT, + LANSAT, + STARF } export function getBerryName(berryType: BerryType) { - switch (berryType) { - case BerryType.SITRUS: - return 'SITRUS BERRY'; - case BerryType.LUM: - return 'LUM BERRY'; - } + return `${BerryType[berryType]} BERRY`; } export function getBerryEffectDescription(berryType: BerryType) { @@ -24,6 +29,19 @@ export function getBerryEffectDescription(berryType: BerryType) { return 'Restores 25% HP if HP is below 50%'; case BerryType.LUM: return 'Cures any non-volatile status condition and confusion'; + case BerryType.ENIGMA: + return 'Restores 25% HP if hit by a super effective move'; + case BerryType.LIECHI: + case BerryType.GANLON: + case BerryType.SALAC: + case BerryType.PETAYA: + case BerryType.APICOT: + const stat = (berryType - BerryType.LIECHI) as BattleStat; + return `Raises ${getBattleStatName(stat)} if HP is below 25%`; + case BerryType.LANSAT: + return 'Raises critical hit ratio if HP is below 25%'; + case BerryType.STARF: + return 'Sharply raises a random stat if HP is below 25%'; } } @@ -35,6 +53,26 @@ export function getBerryPredicate(berryType: BerryType): BerryPredicate { return (pokemon: Pokemon) => pokemon.getHpRatio() < 0.5; case BerryType.LUM: return (pokemon: Pokemon) => !!pokemon.status || !!pokemon.getTag(BattlerTagType.CONFUSED); + case BerryType.ENIGMA: + return (pokemon: Pokemon) => { + const opponent = pokemon.isPlayer() ? pokemon.scene.getEnemyPokemon() : pokemon.scene.getPlayerPokemon(); + const opponentLastMove = opponent ? opponent.getLastXMoves(1).find(() => true) : null; // TODO: Update so this works even if opponent has fainted + + return opponentLastMove && opponentLastMove.turn === pokemon.scene.currentBattle?.turn - 1 && opponentLastMove.result === MoveResult.SUPER_EFFECTIVE; + }; + case BerryType.LIECHI: + case BerryType.GANLON: + case BerryType.SALAC: + case BerryType.PETAYA: + case BerryType.APICOT: + return (pokemon: Pokemon) => { + const battleStat = (berryType - BerryType.LIECHI) as BattleStat; + return pokemon.getHpRatio() < 0.25 && pokemon.summonData.battleStats[battleStat] < 6; + }; + case BerryType.LANSAT: + return (pokemon: Pokemon) => pokemon.getHpRatio() < 0.25 && !pokemon.getTag(BattlerTagType.CRIT_BOOST); + case BerryType.STARF: + return (pokemon: Pokemon) => pokemon.getHpRatio() < 0.25; } } @@ -43,6 +81,7 @@ export type BerryEffectFunc = (pokemon: Pokemon) => void; export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { switch (berryType) { case BerryType.SITRUS: + case BerryType.ENIGMA: return (pokemon: Pokemon) => { pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.isPlayer(), Math.floor(pokemon.getMaxHp() / 4), getPokemonMessage(pokemon, `'s ${getBerryName(berryType)}\nrestored its HP!`), true)); }; @@ -55,5 +94,20 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { } else if (pokemon.getTag(BattlerTagType.CONFUSED)) pokemon.lapseTag(BattlerTagType.CONFUSED); }; + case BerryType.LIECHI: + case BerryType.GANLON: + case BerryType.SALAC: + case BerryType.PETAYA: + case BerryType.APICOT: + return (pokemon: Pokemon) => { + const battleStat = (berryType - BerryType.LIECHI) as BattleStat; + pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.isPlayer(), [ battleStat ], 1)); + }; + case BerryType.LANSAT: + return (pokemon: Pokemon) => { + pokemon.addTag(BattlerTagType.CRIT_BOOST); + }; + case BerryType.STARF: + return (pokemon: Pokemon) => pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.isPlayer(), [ BattleStat.RAND ], 2)); } } \ No newline at end of file diff --git a/src/data/move.ts b/src/data/move.ts index dc049f6c4..9d7de0e8c 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -9,6 +9,7 @@ import { Type } from "./type"; import * as Utils from "../utils"; import { WeatherType } from "./weather"; import { ArenaTagType, ArenaTrapTag } from "./arena-tag"; +import { FlinchChanceModifier } from "../modifier/modifier"; export enum MoveCategory { PHYSICAL, @@ -1037,7 +1038,7 @@ export class ChargeAttr extends OverrideMoveEffectAttr { user.addTag(this.tagType, 1, move.id, user.id); if (this.chargeEffect) applyMoveAttrs(MoveEffectAttr, user, target, move); - user.getMoveHistory().push({ move: move.id, result: MoveResult.OTHER }); + user.pushMoveHistory({ move: move.id, result: MoveResult.OTHER }); user.getMoveQueue().push({ move: move.id, ignorePP: true }); resolve(true); }); @@ -1427,7 +1428,8 @@ export class AddBattlerTagAttr extends MoveEffectAttr { if (!super.apply(user, target, move, args)) return false; - if (move.chance < 0 || move.chance === 100 || Utils.randInt(100) < move.chance) { + const chance = this.getTagChance(user, target, move); + if (chance < 0 || chance === 100 || Utils.randInt(100) < chance) { (this.selfTarget ? user : target).addTag(this.tagType, this.turnCount, move.id, user.id); return true; } @@ -1435,6 +1437,10 @@ export class AddBattlerTagAttr extends MoveEffectAttr { return false; } + getTagChance(user: Pokemon, target: Pokemon, move: Move): integer { + return move.chance; + } + getCondition(): MoveCondition { return this.failOnOverlap ? (user: Pokemon, target: Pokemon, move: Move) => !(this.selfTarget ? user : target).getTag(this.tagType) @@ -1925,7 +1931,8 @@ export const allMoves = [ new SelfStatusMove(Moves.LIGHT_SCREEN, "Light Screen (N)", Type.PSYCHIC, -1, 30, 75, "Halves damage from Special attacks for 5 turns.", -1, 0, 1), new SelfStatusMove(Moves.HAZE, "Haze (N)", Type.ICE, -1, 30, -1, "Resets all stat changes.", -1, 0, 1), new SelfStatusMove(Moves.REFLECT, "Reflect (N)", Type.PSYCHIC, -1, 20, 74, "Halves damage from Physical attacks for 5 turns.", -1, 0, 1), - new SelfStatusMove(Moves.FOCUS_ENERGY, "Focus Energy (N)", Type.NORMAL, -1, 30, -1, "Increases critical hit ratio.", -1, 0, 1), + new SelfStatusMove(Moves.FOCUS_ENERGY, "Focus Energy", Type.NORMAL, -1, 30, -1, "Increases critical hit ratio.", -1, 0, 1) + .attr(AddBattlerTagAttr, BattlerTagType.CRIT_BOOST, true, undefined, true), new AttackMove(Moves.BIDE, "Bide (N)", Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 10, -1, "User takes damage for two turns then strikes back double.", -1, 0, 1), new SelfStatusMove(Moves.METRONOME, "Metronome", Type.NORMAL, -1, 10, 80, "User performs almost any move in the game at random.", -1, 0, 1) .attr(RandomMoveAttr), diff --git a/src/data/pokemon-evolutions.ts b/src/data/pokemon-evolutions.ts index 816ca7ed8..663d04b6f 100644 --- a/src/data/pokemon-evolutions.ts +++ b/src/data/pokemon-evolutions.ts @@ -1,5 +1,5 @@ import { Gender } from "./gender"; -import { AttackTypeBoosterModifier } from "../modifier/modifier"; +import { AttackTypeBoosterModifier, FlinchChanceModifier } from "../modifier/modifier"; import { AttackTypeBoosterModifierType } from "../modifier/modifier-type"; import { Moves } from "./move"; import { PokeballType } from "./pokeball"; @@ -167,7 +167,7 @@ export const pokemonEvolutions: PokemonEvolutions = { ], [Species.SLOWPOKE]: [ new SpeciesEvolution(Species.SLOWBRO, 37, null, null), - new SpeciesEvolution(Species.SLOWKING, 1, EvolutionItem.LINKING_CORD, new SpeciesEvolutionCondition((p: Pokemon) => true /* King's rock*/), SpeciesWildEvolutionDelay.VERY_LONG) + new SpeciesEvolution(Species.SLOWKING, 1, EvolutionItem.LINKING_CORD, new SpeciesEvolutionCondition((p: Pokemon) => !!p.scene.findModifier(m => (m instanceof FlinchChanceModifier) && (m as FlinchChanceModifier).pokemonId === p.id, true)), SpeciesWildEvolutionDelay.VERY_LONG) ], [Species.MAGNEMITE]: [ new SpeciesEvolution(Species.MAGNETON, 30, null, null) @@ -779,7 +779,7 @@ export const pokemonEvolutions: PokemonEvolutions = { ], [Species.POLIWHIRL]: [ new SpeciesEvolution(Species.POLIWRATH, 1, EvolutionItem.WATER_STONE, null, SpeciesWildEvolutionDelay.LONG), - new SpeciesEvolution(Species.POLITOED, 1, EvolutionItem.LINKING_CORD, new SpeciesEvolutionCondition((p: Pokemon) => true /* King's rock*/), SpeciesWildEvolutionDelay.VERY_LONG) + new SpeciesEvolution(Species.POLITOED, 1, EvolutionItem.LINKING_CORD, new SpeciesEvolutionCondition((p: Pokemon) => !!p.scene.findModifier(m => (m instanceof FlinchChanceModifier) && (m as FlinchChanceModifier).pokemonId === p.id, true)), SpeciesWildEvolutionDelay.VERY_LONG) ], [Species.WEEPINBELL]: [ new SpeciesEvolution(Species.VICTREEBEL, 1, EvolutionItem.LEAF_STONE, null, SpeciesWildEvolutionDelay.LONG) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index b27b3f936..6f33f92fa 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -35,7 +35,7 @@ export class ModifierType { constructor(name: string, description: string, newModifierFunc: NewModifierFunc, iconImage?: string, group?: string, soundName?: string) { this.name = name; this.description = description; - this.iconImage = iconImage || name?.replace(/[ \-]/g, '_')?.toLowerCase(); + this.iconImage = iconImage || name?.replace(/[ \-]/g, '_')?.replace(/'/g, '')?.toLowerCase(); this.group = group || ''; this.soundName = soundName || 'restore'; this.newModifierFunc = newModifierFunc; @@ -497,7 +497,14 @@ const modifierTypes = { BERRY: () => new ModifierTypeGenerator((party: Pokemon[]) => { const berryTypes = Utils.getEnumValues(BerryType); - const randBerryType = berryTypes[Utils.randInt(berryTypes.length)]; + let randBerryType; + let rand = Utils.randInt(10); + if (rand < 2) + randBerryType = BerryType.SITRUS; + else if (rand < 4) + randBerryType = BerryType.LUM; + else + randBerryType = berryTypes[Utils.randInt(berryTypes.length - 2) + 2]; return new PokemonHeldItemModifierType(getBerryName(randBerryType), getBerryEffectDescription(randBerryType), (type, args) => new Modifiers.BerryModifier(type, (args[0] as Pokemon).id, randBerryType), null, 'berry'); @@ -521,6 +528,7 @@ const modifierTypes = { GOLDEN_EXP_CHARM: () => new ExpBoosterModifierType('GOLDEN EXP CHARM', 100), LUCKY_EGG: () => new PokemonExpBoosterModifierType('LUCKY EGG', 50), + GOLDEN_EGG: () => new PokemonExpBoosterModifierType('GOLDEN EGG', 200), HEALING_CHARM: () => new ModifierType('HEALING CHARM', 'Doubles the effectiveness of HP restoring moves and items (excludes revives)', (type, _args) => new Modifiers.HealingBoosterModifier(type, 2), 'healing_charm'), @@ -536,6 +544,9 @@ const modifierTypes = { FOCUS_BAND: () => new PokemonHeldItemModifierType('FOCUS BAND', 'Adds a 10% chance to survive with 1 HP after being damaged enough to faint', (type, args) => new Modifiers.SurviveDamageModifier(type, (args[0] as Pokemon).id)), + KINGS_ROCK: () => new PokemonHeldItemModifierType('KING\'S ROCK', 'Adds a 10% chance an attack move will cause the opponent to flinch', + (type, args) => new Modifiers.FlinchChanceModifier(type, (args[0] as Pokemon).id)), + LEFTOVERS: () => new PokemonHeldItemModifierType('LEFTOVERS', 'Heals 1/16 of a POKéMON\'s maximum HP every turn', (type, args) => new Modifiers.TurnHealModifier(type, (args[0] as Pokemon).id)), SHELL_BELL: () => new PokemonHeldItemModifierType('SHELL BELL', 'Heals 1/8 of a POKéMON\'s dealt damage', @@ -570,7 +581,7 @@ const modifierPool = { return thresholdPartyMemberCount; }), new WeightedModifierType(modifierTypes.TEMP_STAT_BOOSTER, 4), - new WeightedModifierType(modifierTypes.BERRY, 2) + new WeightedModifierType(modifierTypes.BERRY, 20) ].map(m => { m.setTier(ModifierTier.COMMON); return m; }), [ModifierTier.GREAT]: [ new WeightedModifierType(modifierTypes.GREAT_BALL, 6), @@ -617,6 +628,7 @@ const modifierPool = { //new WeightedModifierType(modifierTypes.OVAL_CHARM, 1), new WeightedModifierType(modifierTypes.HEALING_CHARM, 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), @@ -644,13 +656,15 @@ const enemyModifierPool = { new WeightedModifierType(modifierTypes.BASE_STAT_BOOSTER, 1) ].map(m => { m.setTier(ModifierTier.GREAT); return m; }), [ModifierTier.ULTRA]: [ - new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 5), + new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 10), new WeightedModifierType(modifierTypes.FOCUS_BAND, 2), - new WeightedModifierType(modifierTypes.LUCKY_EGG, 2), + new WeightedModifierType(modifierTypes.LUCKY_EGG, 4), + 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.LEFTOVERS, 4), - new WeightedModifierType(modifierTypes.SHELL_BELL, 4), + new WeightedModifierType(modifierTypes.GOLDEN_EGG, 1), new WeightedModifierType(modifierTypes.MINI_BLACK_HOLE, 1) ].map(m => { m.setTier(ModifierTier.MASTER); return m; }) }; diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index eb43dfe7a..f8ca381fd 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -370,7 +370,7 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier { const pokemon = args[0] as Pokemon; const surviveDamage = args[1] as Utils.BooleanHolder; - if (!surviveDamage.value && (this.getStackCount() === this.getMaxStackCount() || Utils.randInt(10) < this.getStackCount())) { + if (!surviveDamage.value && Utils.randInt(10) < this.getStackCount()) { surviveDamage.value = true; pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` hung on\nusing its ${this.type.name}!`)); @@ -384,6 +384,37 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier { } } +export class FlinchChanceModifier extends PokemonHeldItemModifier { + constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) { + super(type, pokemonId, stackCount); + } + + matchType(modifier: Modifier) { + return modifier instanceof FlinchChanceModifier; + } + + clone() { + return new FlinchChanceModifier(this.type, this.pokemonId, this.stackCount); + } + + shouldApply(args: any[]): boolean { + return super.shouldApply(args) && args.length === 2 && args[1] instanceof Utils.BooleanHolder; + } + + apply(args: any[]): boolean { + const flinched = args[1] as Utils.BooleanHolder; + + if (!flinched.value && Utils.randInt(10) < this.getStackCount()) + flinched.value = true; + + return true; + } + + getMaxStackCount(): number { + return 3; + } +} + export class TurnHealModifier extends PokemonHeldItemModifier { constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) { super(type, pokemonId, stackCount); diff --git a/src/pokemon.ts b/src/pokemon.ts index 791fd761a..06706e255 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -491,6 +491,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const critLevel = new Utils.IntegerHolder(0); applyMoveAttrs(HighCritAttr, source, this, move, critLevel); this.scene.applyModifiers(TempBattleStatBoosterModifier, source.isPlayer(), TempBattleStat.CRIT, critLevel); + if (source.getTag(BattlerTagType.CRIT_BOOST)) + critLevel.value += 2; const critChance = Math.ceil(16 / Math.pow(2, critLevel.value)); let isCritical = !source.getTag(BattlerTagType.NO_CRIT) && (critChance === 1 || !Utils.randInt(critChance)); const sourceAtk = source.getBattleStat(isPhysical ? Stat.ATK : Stat.SPATK); @@ -642,6 +644,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return this.summonData.moveHistory; } + pushMoveHistory(turnMove: TurnMove) { + turnMove.turn = this.scene.currentBattle?.turn; + this.getMoveHistory().push(turnMove); + } + getLastXMoves(turnCount?: integer): TurnMove[] { const moveHistory = this.getMoveHistory(); return moveHistory.slice(turnCount >= 0 ? Math.max(moveHistory.length - (turnCount || 1), 0) : 0, moveHistory.length).reverse(); @@ -1035,6 +1042,7 @@ export interface TurnMove { move: Moves; result: MoveResult; virtual?: boolean; + turn?: integer; } export interface QueuedMove {