diff --git a/public/images/items.json b/public/images/items.json index 26498d845..fa8a251c0 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -4,8 +4,8 @@ "image": "items.png", "format": "RGBA8888", "size": { - "w": 237, - "h": 237 + "w": 238, + "h": 238 }, "scale": 1, "frames": [ @@ -262,7 +262,7 @@ } }, { - "filename": "metal_coat", + "filename": "mystic_water", "rotated": false, "trimmed": true, "sourceSize": { @@ -272,14 +272,14 @@ "spriteSourceSize": { "x": 6, "y": 5, - "w": 19, - "h": 22 + "w": 20, + "h": 23 }, "frame": { "x": 218, "y": 0, - "w": 19, - "h": 22 + "w": 20, + "h": 23 } }, { @@ -387,27 +387,6 @@ "h": 24 } }, - { - "filename": "spell_tag", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 19, - "h": 21 - }, - "frame": { - "x": 218, - "y": 22, - "w": 19, - "h": 21 - } - }, { "filename": "calcium", "rotated": false, @@ -472,7 +451,7 @@ } }, { - "filename": "exp_share", + "filename": "exp_balance", "rotated": false, "trimmed": true, "sourceSize": { @@ -492,6 +471,27 @@ "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": 64, + "y": 24, + "w": 24, + "h": 22 + } + }, { "filename": "healing_charm", "rotated": false, @@ -507,33 +507,12 @@ "h": 22 }, "frame": { - "x": 64, + "x": 88, "y": 24, "w": 23, "h": 22 } }, - { - "filename": "rare_candy", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 5, - "w": 23, - "h": 23 - }, - "frame": { - "x": 87, - "y": 24, - "w": 23, - "h": 23 - } - }, { "filename": "black_belt", "rotated": false, @@ -549,12 +528,33 @@ "h": 23 }, "frame": { - "x": 110, + "x": 111, "y": 24, "w": 22, "h": 23 } }, + { + "filename": "rare_candy", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 5, + "w": 23, + "h": 23 + }, + "frame": { + "x": 133, + "y": 23, + "w": 23, + "h": 23 + } + }, { "filename": "fire_stone", "rotated": false, @@ -570,7 +570,7 @@ "h": 23 }, "frame": { - "x": 132, + "x": 156, "y": 23, "w": 22, "h": 23 @@ -591,7 +591,7 @@ "h": 23 }, "frame": { - "x": 154, + "x": 178, "y": 23, "w": 22, "h": 23 @@ -612,54 +612,12 @@ "h": 23 }, "frame": { - "x": 176, + "x": 200, "y": 23, "w": 22, "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": 198, - "y": 23, - "w": 20, - "h": 23 - } - }, - { - "filename": "hard_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 19, - "h": 20 - }, - "frame": { - "x": 218, - "y": 43, - "w": 19, - "h": 20 - } - }, { "filename": "iron", "rotated": false, @@ -675,96 +633,12 @@ "h": 24 }, "frame": { - "x": 33, - "y": 50, + "x": 222, + "y": 23, "w": 16, "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": 49, - "y": 46, - "w": 21, - "h": 24 - } - }, - { - "filename": "hyper_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 70, - "y": 46, - "w": 17, - "h": 23 - } - }, - { - "filename": "charcoal", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 87, - "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": 109, - "y": 47, - "w": 22, - "h": 22 - } - }, { "filename": "max_elixir", "rotated": false, @@ -779,6 +653,27 @@ "w": 18, "h": 24 }, + "frame": { + "x": 33, + "y": 50, + "w": 18, + "h": 24 + } + }, + { + "filename": "max_ether", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 4, + "w": 18, + "h": 24 + }, "frame": { "x": 33, "y": 74, @@ -786,6 +681,48 @@ "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": 51, + "y": 46, + "w": 21, + "h": 24 + } + }, + { + "filename": "reaper_cloth", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 23 + }, + "frame": { + "x": 72, + "y": 46, + "w": 22, + "h": 23 + } + }, { "filename": "shiny_charm", "rotated": false, @@ -808,7 +745,7 @@ } }, { - "filename": "reaper_cloth", + "filename": "charcoal", "rotated": false, "trimmed": true, "sourceSize": { @@ -819,13 +756,55 @@ "x": 5, "y": 5, "w": 22, - "h": 23 + "h": 22 }, "frame": { "x": 72, "y": 69, "w": 22, + "h": 22 + } + }, + { + "filename": "hyper_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, "h": 23 + }, + "frame": { + "x": 94, + "y": 46, + "w": 17, + "h": 23 + } + }, + { + "filename": "dire_hit", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 111, + "y": 47, + "w": 22, + "h": 22 } }, { @@ -843,12 +822,138 @@ "h": 23 }, "frame": { - "x": 94, - "y": 69, + "x": 133, + "y": 46, "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": 94, + "y": 69, + "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": 154, + "y": 46, + "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": 116, + "y": 69, + "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": 176, + "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": 198, + "y": 46, + "w": 24, + "h": 20 + } + }, + { + "filename": "pp_max", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 222, + "y": 47, + "w": 16, + "h": 24 + } + }, { "filename": "leaf_stone", "rotated": false, @@ -864,14 +969,140 @@ "h": 23 }, "frame": { - "x": 115, + "x": 138, "y": 69, "w": 21, "h": 23 } }, { - "filename": "electirizer", + "filename": "moon_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 6, + "w": 23, + "h": 21 + }, + "frame": { + "x": 159, + "y": 68, + "w": 23, + "h": 21 + } + }, + { + "filename": "dawn_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 21 + }, + "frame": { + "x": 182, + "y": 68, + "w": 20, + "h": 21 + } + }, + { + "filename": "gb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 202, + "y": 66, + "w": 20, + "h": 20 + } + }, + { + "filename": "pp_up", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 222, + "y": 71, + "w": 16, + "h": 24 + } + }, + { + "filename": "everstone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 17 + }, + "frame": { + "x": 202, + "y": 86, + "w": 20, + "h": 17 + } + }, + { + "filename": "protein", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 222, + "y": 95, + "w": 16, + "h": 24 + } + }, + { + "filename": "protector", "rotated": false, "trimmed": true, "sourceSize": { @@ -892,7 +1123,7 @@ } }, { - "filename": "guard_spec", + "filename": "sharp_beak", "rotated": false, "trimmed": true, "sourceSize": { @@ -902,18 +1133,18 @@ "spriteSourceSize": { "x": 5, "y": 5, - "w": 22, - "h": 22 + "w": 21, + "h": 23 }, "frame": { "x": 18, "y": 120, - "w": 22, - "h": 22 + "w": 21, + "h": 23 } }, { - "filename": "ice_stone", + "filename": "thunder_stone", "rotated": false, "trimmed": true, "sourceSize": { @@ -928,13 +1159,13 @@ }, "frame": { "x": 18, - "y": 142, + "y": 143, "w": 22, "h": 22 } }, { - "filename": "binding_band", + "filename": "dubious_disc", "rotated": false, "trimmed": true, "sourceSize": { @@ -943,19 +1174,19 @@ }, "spriteSourceSize": { "x": 5, - "y": 6, - "w": 23, - "h": 20 + "y": 7, + "w": 22, + "h": 19 }, "frame": { "x": 18, - "y": 164, - "w": 23, - "h": 20 + "y": 165, + "w": 22, + "h": 19 } }, { - "filename": "max_ether", + "filename": "max_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -976,133 +1207,7 @@ } }, { - "filename": "max_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 22, - "y": 208, - "w": 18, - "h": 24 - } - }, - { - "filename": "pp_max", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 40, - "y": 98, - "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": 40, - "y": 122, - "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": 56, - "y": 94, - "w": 16, - "h": 24 - } - }, - { - "filename": "magmarizer", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 72, - "y": 92, - "w": 22, - "h": 22 - } - }, - { - "filename": "moon_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 6, - "w": 23, - "h": 21 - }, - "frame": { - "x": 94, - "y": 92, - "w": 23, - "h": 21 - } - }, - { - "filename": "dawn_stone", + "filename": "metal_coat", "rotated": false, "trimmed": true, "sourceSize": { @@ -1111,15 +1216,57 @@ }, "spriteSourceSize": { "x": 6, - "y": 6, - "w": 20, - "h": 21 + "y": 5, + "w": 19, + "h": 22 }, "frame": { - "x": 117, - "y": 92, - "w": 20, - "h": 21 + "x": 22, + "y": 208, + "w": 19, + "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": 40, + "y": 98, + "w": 15, + "h": 23 + } + }, + { + "filename": "metronome", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 5, + "w": 17, + "h": 22 + }, + "frame": { + "x": 39, + "y": 121, + "w": 17, + "h": 22 } }, { @@ -1137,14 +1284,14 @@ "h": 24 }, "frame": { - "x": 56, - "y": 118, + "x": 40, + "y": 143, "w": 16, "h": 24 } }, { - "filename": "protector", + "filename": "potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -1152,20 +1299,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 5, + "x": 8, "y": 5, - "w": 22, - "h": 22 + "w": 17, + "h": 23 }, "frame": { - "x": 72, - "y": 114, - "w": 22, - "h": 22 + "x": 55, + "y": 94, + "w": 17, + "h": 23 } }, { - "filename": "sacred_ash", + "filename": "soft_sand", "rotated": false, "trimmed": true, "sourceSize": { @@ -1179,12 +1326,54 @@ "h": 20 }, "frame": { - "x": 94, - "y": 113, + "x": 72, + "y": 91, "w": 24, "h": 20 } }, + { + "filename": "binding_band", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 23, + "h": 20 + }, + "frame": { + "x": 96, + "y": 91, + "w": 23, + "h": 20 + } + }, + { + "filename": "hard_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 19, + "h": 20 + }, + "frame": { + "x": 119, + "y": 91, + "w": 19, + "h": 20 + } + }, { "filename": "deep_sea_scale", "rotated": false, @@ -1200,180 +1389,12 @@ "h": 20 }, "frame": { - "x": 118, - "y": 113, + "x": 138, + "y": 92, "w": 22, "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": 40, - "y": 146, - "w": 24, - "h": 18 - } - }, - { - "filename": "sharp_beak", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 21, - "h": 23 - }, - "frame": { - "x": 41, - "y": 164, - "w": 21, - "h": 23 - } - }, - { - "filename": "deep_sea_tooth", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 22, - "h": 21 - }, - "frame": { - "x": 41, - "y": 187, - "w": 22, - "h": 21 - } - }, - { - "filename": "thunder_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 40, - "y": 208, - "w": 22, - "h": 22 - } - }, - { - "filename": "black_glasses", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 23, - "h": 17 - }, - "frame": { - "x": 72, - "y": 136, - "w": 23, - "h": 17 - } - }, - { - "filename": "soft_sand", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 7, - "w": 24, - "h": 20 - }, - "frame": { - "x": 95, - "y": 133, - "w": 24, - "h": 20 - } - }, - { - "filename": "dusk_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 119, - "y": 133, - "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": 131, - "y": 47, - "w": 15, - "h": 22 - } - }, { "filename": "tm_bug", "rotated": false, @@ -1389,12 +1410,117 @@ "h": 22 }, "frame": { - "x": 146, - "y": 46, + "x": 160, + "y": 89, "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": 182, + "y": 89, + "w": 20, + "h": 20 + } + }, + { + "filename": "mb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 202, + "y": 103, + "w": 20, + "h": 20 + } + }, + { + "filename": "pb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 182, + "y": 109, + "w": 20, + "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": 160, + "y": 111, + "w": 22, + "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": 56, + "y": 117, + "w": 17, + "h": 23 + } + }, { "filename": "tm_dark", "rotated": false, @@ -1410,8 +1536,8 @@ "h": 22 }, "frame": { - "x": 168, - "y": 46, + "x": 56, + "y": 140, "w": 22, "h": 22 } @@ -1431,33 +1557,12 @@ "h": 22 }, "frame": { - "x": 190, - "y": 46, + "x": 73, + "y": 111, "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": 136, - "y": 69, - "w": 15, - "h": 23 - } - }, { "filename": "tm_electric", "rotated": false, @@ -1473,12 +1578,33 @@ "h": 22 }, "frame": { - "x": 151, - "y": 68, + "x": 95, + "y": 111, "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": 117, + "y": 111, + "w": 21, + "h": 21 + } + }, { "filename": "tm_fairy", "rotated": false, @@ -1494,54 +1620,12 @@ "h": 22 }, "frame": { - "x": 173, - "y": 68, + "x": 138, + "y": 112, "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": 195, - "y": 68, - "w": 17, - "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": 137, - "y": 92, - "w": 21, - "h": 21 - } - }, { "filename": "tm_fighting", "rotated": false, @@ -1557,8 +1641,8 @@ "h": 22 }, "frame": { - "x": 158, - "y": 90, + "x": 78, + "y": 133, "w": 22, "h": 22 } @@ -1578,14 +1662,14 @@ "h": 22 }, "frame": { - "x": 180, - "y": 90, + "x": 100, + "y": 133, "w": 22, "h": 22 } }, { - "filename": "potion", + "filename": "leftovers", "rotated": false, "trimmed": true, "sourceSize": { @@ -1595,202 +1679,13 @@ "spriteSourceSize": { "x": 8, "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 140, - "y": 113, - "w": 17, - "h": 23 - } - }, - { - "filename": "tm_flying", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, + "w": 15, "h": 22 }, "frame": { - "x": 212, - "y": 63, - "w": 22, - "h": 22 - } - }, - { - "filename": "dragon_scale", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 8, - "w": 24, - "h": 18 - }, - "frame": { - "x": 140, - "y": 136, - "w": 24, - "h": 18 - } - }, - { - "filename": "super_potion", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 - }, - "frame": { - "x": 202, - "y": 90, - "w": 17, - "h": 23 - } - }, - { - "filename": "razor_fang", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 18, - "h": 20 - }, - "frame": { - "x": 219, - "y": 85, - "w": 18, - "h": 20 - } - }, - { - "filename": "oval_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 7, - "w": 18, - "h": 19 - }, - "frame": { - "x": 219, - "y": 105, - "w": 18, - "h": 19 - } - }, - { - "filename": "silver_powder", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 4, - "y": 11, - "w": 24, - "h": 15 - }, - "frame": { - "x": 64, - "y": 153, - "w": 24, - "h": 15 - } - }, - { - "filename": "dubious_disc", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 22, - "h": 19 - }, - "frame": { - "x": 62, - "y": 168, - "w": 22, - "h": 19 - } - }, - { - "filename": "shiny_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 63, - "y": 187, - "w": 21, - "h": 21 - } - }, - { - "filename": "tm_ghost", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 62, - "y": 208, - "w": 22, + "x": 122, + "y": 132, + "w": 15, "h": 22 } }, @@ -1809,12 +1704,75 @@ "h": 20 }, "frame": { - "x": 88, - "y": 153, + "x": 137, + "y": 134, "w": 23, "h": 20 } }, + { + "filename": "tm_flying", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 160, + "y": 132, + "w": 22, + "h": 22 + } + }, + { + "filename": "tm_ghost", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 182, + "y": 129, + "w": 22, + "h": 22 + } + }, + { + "filename": "black_glasses", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 23, + "h": 17 + }, + "frame": { + "x": 40, + "y": 167, + "w": 23, + "h": 17 + } + }, { "filename": "tm_grass", "rotated": false, @@ -1830,8 +1788,8 @@ "h": 22 }, "frame": { - "x": 84, - "y": 173, + "x": 41, + "y": 184, "w": 22, "h": 22 } @@ -1851,54 +1809,12 @@ "h": 22 }, "frame": { - "x": 84, - "y": 195, + "x": 41, + "y": 206, "w": 22, "h": 22 } }, - { - "filename": "gb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 84, - "y": 217, - "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": 104, - "y": 217, - "w": 20, - "h": 20 - } - }, { "filename": "tm_ice", "rotated": false, @@ -1914,12 +1830,33 @@ "h": 22 }, "frame": { - "x": 111, - "y": 154, + "x": 204, + "y": 123, "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": 226, + "y": 119, + "w": 12, + "h": 17 + } + }, { "filename": "tm_normal", "rotated": false, @@ -1935,8 +1872,8 @@ "h": 22 }, "frame": { - "x": 133, - "y": 154, + "x": 63, + "y": 162, "w": 22, "h": 22 } @@ -1956,54 +1893,12 @@ "h": 22 }, "frame": { - "x": 106, - "y": 176, + "x": 63, + "y": 184, "w": 22, "h": 22 } }, - { - "filename": "upgrade", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 22, - "h": 19 - }, - "frame": { - "x": 106, - "y": 198, - "w": 22, - "h": 19 - } - }, - { - "filename": "mb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 124, - "y": 217, - "w": 20, - "h": 20 - } - }, { "filename": "tm_psychic", "rotated": false, @@ -2019,75 +1914,12 @@ "h": 22 }, "frame": { - "x": 128, - "y": 176, + "x": 63, + "y": 206, "w": 22, "h": 22 } }, - { - "filename": "razor_claw", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 7, - "w": 20, - "h": 19 - }, - "frame": { - "x": 128, - "y": 198, - "w": 20, - "h": 19 - } - }, - { - "filename": "pb", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 144, - "y": 217, - "w": 20, - "h": 20 - } - }, - { - "filename": "miracle_seed", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 7, - "w": 19, - "h": 19 - }, - "frame": { - "x": 148, - "y": 198, - "w": 19, - "h": 19 - } - }, { "filename": "tm_rock", "rotated": false, @@ -2103,8 +1935,8 @@ "h": 22 }, "frame": { - "x": 150, - "y": 176, + "x": 85, + "y": 155, "w": 22, "h": 22 } @@ -2124,33 +1956,12 @@ "h": 22 }, "frame": { - "x": 155, - "y": 154, + "x": 85, + "y": 177, "w": 22, "h": 22 } }, - { - "filename": "pb_gold", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 164, - "y": 217, - "w": 20, - "h": 20 - } - }, { "filename": "tm_water", "rotated": false, @@ -2166,8 +1977,8 @@ "h": 22 }, "frame": { - "x": 172, - "y": 176, + "x": 85, + "y": 199, "w": 22, "h": 22 } @@ -2187,8 +1998,8 @@ "h": 17 }, "frame": { - "x": 167, - "y": 198, + "x": 85, + "y": 221, "w": 23, "h": 17 } @@ -2208,33 +2019,12 @@ "h": 22 }, "frame": { - "x": 184, - "y": 215, + "x": 107, + "y": 155, "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": 190, - "y": 198, - "w": 20, - "h": 17 - } - }, { "filename": "x_accuracy", "rotated": false, @@ -2250,8 +2040,8 @@ "h": 22 }, "frame": { - "x": 206, - "y": 215, + "x": 107, + "y": 177, "w": 22, "h": 22 } @@ -2271,33 +2061,12 @@ "h": 22 }, "frame": { - "x": 158, - "y": 112, + "x": 107, + "y": 199, "w": 22, "h": 22 } }, - { - "filename": "golden_egg", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 17, - "h": 20 - }, - "frame": { - "x": 164, - "y": 134, - "w": 17, - "h": 20 - } - }, { "filename": "x_defense", "rotated": false, @@ -2313,33 +2082,12 @@ "h": 22 }, "frame": { - "x": 180, - "y": 112, + "x": 129, + "y": 154, "w": 22, "h": 22 } }, - { - "filename": "lucky_egg", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 6, - "w": 17, - "h": 20 - }, - "frame": { - "x": 202, - "y": 113, - "w": 17, - "h": 20 - } - }, { "filename": "x_sp_atk", "rotated": false, @@ -2355,33 +2103,12 @@ "h": 22 }, "frame": { - "x": 177, - "y": 154, + "x": 129, + "y": 176, "w": 22, "h": 22 } }, - { - "filename": "ub", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 6, - "w": 20, - "h": 20 - }, - "frame": { - "x": 181, - "y": 134, - "w": 20, - "h": 20 - } - }, { "filename": "x_sp_def", "rotated": false, @@ -2397,8 +2124,8 @@ "h": 22 }, "frame": { - "x": 194, - "y": 176, + "x": 151, + "y": 154, "w": 22, "h": 22 } @@ -2418,14 +2145,35 @@ "h": 22 }, "frame": { - "x": 199, - "y": 154, + "x": 129, + "y": 198, "w": 22, "h": 22 } }, { - "filename": "zoom_lens", + "filename": "choice_specs", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 129, + "y": 220, + "w": 24, + "h": 18 + } + }, + { + "filename": "poison_barb", "rotated": false, "trimmed": true, "sourceSize": { @@ -2439,14 +2187,14 @@ "h": 21 }, "frame": { - "x": 216, + "x": 151, "y": 176, "w": 21, "h": 21 } }, { - "filename": "revive", + "filename": "shiny_stone", "rotated": false, "trimmed": true, "sourceSize": { @@ -2454,16 +2202,37 @@ "h": 32 }, "spriteSourceSize": { - "x": 10, - "y": 8, - "w": 12, - "h": 17 + "x": 5, + "y": 6, + "w": 21, + "h": 21 }, "frame": { - "x": 210, - "y": 198, - "w": 12, - "h": 17 + "x": 151, + "y": 197, + "w": 21, + "h": 21 + } + }, + { + "filename": "pb_gold", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 153, + "y": 218, + "w": 20, + "h": 20 } }, { @@ -2481,11 +2250,263 @@ "h": 15 }, "frame": { - "x": 222, - "y": 197, + "x": 108, + "y": 221, "w": 15, "h": 15 } + }, + { + "filename": "spell_tag", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 19, + "h": 21 + }, + "frame": { + "x": 173, + "y": 154, + "w": 19, + "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": 192, + "y": 151, + "w": 21, + "h": 21 + } + }, + { + "filename": "golden_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 213, + "y": 145, + "w": 17, + "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": 192, + "y": 172, + "w": 24, + "h": 18 + } + }, + { + "filename": "upgrade", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 216, + "y": 165, + "w": 22, + "h": 19 + } + }, + { + "filename": "miracle_seed", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 19, + "h": 19 + }, + "frame": { + "x": 173, + "y": 175, + "w": 19, + "h": 19 + } + }, + { + "filename": "ub", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 172, + "y": 194, + "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": 192, + "y": 190, + "w": 20, + "h": 19 + } + }, + { + "filename": "razor_fang", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 18, + "h": 20 + }, + "frame": { + "x": 173, + "y": 214, + "w": 18, + "h": 20 + } + }, + { + "filename": "silver_powder", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 11, + "w": 24, + "h": 15 + }, + "frame": { + "x": 192, + "y": 209, + "w": 24, + "h": 15 + } + }, + { + "filename": "oval_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 7, + "w": 18, + "h": 19 + }, + "frame": { + "x": 212, + "y": 190, + "w": 18, + "h": 19 + } + }, + { + "filename": "lucky_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 216, + "y": 209, + "w": 17, + "h": 20 + } } ] } @@ -2493,6 +2514,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:ea27e295ceff04088e93f7ad1187a1fc:a8cbcb6f7d3be83d92d32173fccbe041:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:10a8d93fb8ec92f93ee3e4be5874c09d:240b93de032db305ae2062ef1c0868f5:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index 373737020..9a7902722 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/exp_balance.png b/public/images/items/exp_balance.png new file mode 100644 index 000000000..56c645b70 Binary files /dev/null and b/public/images/items/exp_balance.png differ diff --git a/public/images/items/golden_exp_charm.png b/public/images/items/golden_exp_charm.png index efc281fe1..199832159 100644 Binary files a/public/images/items/golden_exp_charm.png and b/public/images/items/golden_exp_charm.png differ diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 1ee4c31c7..b880ee134 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -5,7 +5,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, ConditionalMoveA import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; import { Stat } from "./pokemon-stat"; -import { ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, HitHealModifier, PokemonExpBoosterModifier, TempBattleStatBoosterModifier } from "./modifier"; +import { ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, HitHealModifier, PokemonExpBoosterModifier, TempBattleStatBoosterModifier } from "./modifier"; import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler"; import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./pokeball"; import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./battle-anims"; @@ -502,8 +502,13 @@ export class CommandPhase extends BattlePhase { success = true; } else if (cursor < playerPokemon.moveset.length) { const move = playerPokemon.moveset[cursor]; - if (move.isDisabled()) - this.scene.ui.showText(`${move.getName()} is disabled!`); + if (move.isDisabled()) { + this.scene.ui.setMode(Mode.MESSAGE); + this.scene.ui.showText(`${move.getName()} is disabled!`, null, () => { + this.scene.ui.clearText(); + this.scene.ui.setMode(Mode.FIGHT); + }, null, true); + } } break; @@ -1292,24 +1297,56 @@ export class VictoryPhase extends PokemonPhase { const participantIds = this.scene.currentBattle.playerParticipantIds; const party = this.scene.getParty(); const expShareModifier = this.scene.findModifier(m => m instanceof ExpShareModifier) as ExpShareModifier; + const expBalanceModifier = this.scene.findModifier(m => m instanceof ExpBalanceModifier) as ExpBalanceModifier; const expValue = this.scene.getEnemyPokemon().getExpValue(); - for (let pm = 0; pm < party.length; pm++) { - const pokemon = party[pm]; - if (!pokemon.hp) - continue; - const pId = pokemon.id; + const expPartyMembers = party.filter(p => p.hp && p.level < 100); + const partyMemberExp = []; + for (let partyMember of expPartyMembers) { + const pId = partyMember.id; const participated = participantIds.has(pId); - if (!participated && !expShareModifier) + if (!participated && !expShareModifier) { + partyMemberExp.push(0); continue; - if (pokemon.level < 100) { - let expMultiplier = 0; - if (participated) - expMultiplier += (1 / participantIds.size); - if (expShareModifier) - expMultiplier += expShareModifier.stackCount * 0.1; - const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier); - this.scene.applyModifiers(PokemonExpBoosterModifier, pokemon, pokemonExp); - this.scene.unshiftPhase(new ExpPhase(this.scene, pm, Math.floor(pokemonExp.value))); + } + let expMultiplier = 0; + if (participated) + expMultiplier += (1 / participantIds.size); + if (expShareModifier) + expMultiplier += expShareModifier.stackCount * 0.1; + const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier); + this.scene.applyModifiers(PokemonExpBoosterModifier, partyMember, pokemonExp); + partyMemberExp.push(Math.floor(pokemonExp.value)); + } + + if (expBalanceModifier) { + let totalLevel = 0; + let totalExp = 0; + expPartyMembers.forEach((expPartyMember, epm) => { + totalExp += partyMemberExp[epm]; + totalLevel += expPartyMember.level; + }); + + const medianLevel = Math.floor(totalLevel / expPartyMembers.length); + + const recipientExpPartyMemberIndexes = []; + expPartyMembers.forEach((expPartyMember, epm) => { + if (expPartyMember.level <= medianLevel) + recipientExpPartyMemberIndexes.push(epm); + }); + + const splitExp = Math.floor(totalExp / recipientExpPartyMemberIndexes.length); + + expPartyMembers.forEach((_partyMember, pm) => { + partyMemberExp[pm] = recipientExpPartyMemberIndexes.indexOf(pm) > -1 ? splitExp : 0; + }); + } + + for (let pm = 0; pm < expPartyMembers.length; pm++) { + const exp = partyMemberExp[pm]; + + if (exp) { + const partyMemberIndex = party.indexOf(expPartyMembers[pm]); + this.scene.unshiftPhase(new ExpPhase(this.scene, partyMemberIndex, exp)); } } diff --git a/src/modifier-type.ts b/src/modifier-type.ts index 6a77a1f1e..0520c1748 100644 --- a/src/modifier-type.ts +++ b/src/modifier-type.ts @@ -311,7 +311,8 @@ export class ExpBoosterModifierType extends ModifierType { export class PokemonExpBoosterModifierType extends PokemonModifierType { constructor(name: string, boostPercent: integer, iconImage?: string) { - super(name, `Increases the holder's gain of EXP. Points by ${boostPercent}%`, (_type, args) => new Modifiers.PokemonExpBoosterModifier(this, (args[0] as PlayerPokemon).id, boostPercent), iconImage); + super(name, `Increases the holder's gain of EXP. Points by ${boostPercent}%`, (_type, args) => new Modifiers.PokemonExpBoosterModifier(this, (args[0] as PlayerPokemon).id, boostPercent), + (_pokemon: PlayerPokemon) => null, iconImage); } } @@ -524,7 +525,6 @@ const modifierPool = { return new TmModifierType(uniqueCompatibleTms[randTmIndex]); }), 4), new WeightedModifierType(new ModifierType('EXP. SHARE', 'All POKéMON in your party gain an additional 10% of a battle\'s EXP. Points', (type, _args) => new Modifiers.ExpShareModifier(type), 'exp_share'), 2), - new WeightedModifierType(new PokemonExpBoosterModifierType('LUCKY EGG', 50), 2), new WeightedModifierType(new ModifierTypeGenerator((party: PlayerPokemon[]) => { const randStat = Utils.randInt(6) as Stat; return new PokemonBaseStatBoosterModifierType(getBaseStatBoosterItemName(randStat), randStat); @@ -538,7 +538,9 @@ const modifierPool = { (type, _args) => new Modifiers.PartyShareModifier(type), 'oval_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'), new WeightedModifierType(new PokemonModifierType('SHELL BELL', 'Heals 1/8 of a POKéMON\'s dealt damage', (type, args) => new Modifiers.HitHealModifier(type, (args[0] as PlayerPokemon).id)), 2), - new WeightedModifierType(new ExpBoosterModifierType('EXP CHARM', 25), 4) + new WeightedModifierType(new ExpBoosterModifierType('EXP CHARM', 25), 4), + new WeightedModifierType(new PokemonExpBoosterModifierType('LUCKY EGG', 50), 3), + new WeightedModifierType(new ModifierType('EXP. BALANCE', 'All EXP. Points received from battles is split among the lower leveled party members', (type, _args) => new Modifiers.ExpBalanceModifier(type), 'exp_balance'), 1) ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), [ModifierTier.MASTER]: [ new AddPokeballModifierType(PokeballType.MASTER_BALL, 1, 'mb'), @@ -580,7 +582,7 @@ export function regenerateModifierPoolThresholds(party: PlayerPokemon[]) { }))); } -export function getModifierTypeOptionsForWave(waveIndex: integer, count: integer, party: PlayerPokemon[]): ModifierTypeOption[] { +export function getModifierTypeOptionsForWave(waveIndex: integer, count: integer, party: PlayerPokemon[], maxedTypes: ModifierType[]): ModifierTypeOption[] { if (waveIndex % 10 === 0) return modifierPool[ModifierTier.LUXURY].map(m => new ModifierTypeOption(m, false)); const options: ModifierTypeOption[] = []; diff --git a/src/modifier.ts b/src/modifier.ts index 5ef742aec..05e09d2fe 100644 --- a/src/modifier.ts +++ b/src/modifier.ts @@ -677,6 +677,28 @@ export class ExpShareModifier extends PersistentModifier { } } +export class ExpBalanceModifier extends PersistentModifier { + constructor(type: ModifierType) { + super(type); + } + + match(modifier: Modifier): boolean { + return modifier instanceof ExpBalanceModifier; + } + + apply(_args: any[]): boolean { + return true; + } + + clone(): ExpBalanceModifier { + return new ExpBalanceModifier(this.type); + } + + getMaxStackCount(): integer { + return 1; + } +} + export class ShinyRateBoosterModifier extends PersistentModifier { constructor(type: ModifierType) { super(type);