diff --git a/public/audio/se/m_bubble.wav b/public/audio/se/m_bubble.wav deleted file mode 100644 index 4a786ab547c..00000000000 Binary files a/public/audio/se/m_bubble.wav and /dev/null differ diff --git a/public/audio/se/m_bubble2.wav b/public/audio/se/m_bubble2.wav deleted file mode 100644 index 1efc76345b1..00000000000 Binary files a/public/audio/se/m_bubble2.wav and /dev/null differ diff --git a/public/audio/se/m_bubble3.wav b/public/audio/se/m_bubble3.wav deleted file mode 100644 index 797d7f1b6e5..00000000000 Binary files a/public/audio/se/m_bubble3.wav and /dev/null differ diff --git a/public/audio/se/m_crabhammer.wav b/public/audio/se/m_crabhammer.wav deleted file mode 100644 index 5bfc38deef6..00000000000 Binary files a/public/audio/se/m_crabhammer.wav and /dev/null differ diff --git a/public/audio/se/pp_restore.wav b/public/audio/se/pp_restore.wav deleted file mode 100644 index 5069c725735..00000000000 Binary files a/public/audio/se/pp_restore.wav and /dev/null differ diff --git a/public/battle-anims/bounce-charging.json b/public/battle-anims/bounce-charging.json index fdd8d307ba6..ce949a7aa73 100644 --- a/public/battle-anims/bounce-charging.json +++ b/public/battle-anims/bounce-charging.json @@ -1,5 +1,4 @@ { - "id": 1001, "graphic": "", "frames": [ [ diff --git a/public/battle-anims/common-attract.json b/public/battle-anims/common-attract.json index 3102a04d54c..b943bee6e0e 100644 --- a/public/battle-anims/common-attract.json +++ b/public/battle-anims/common-attract.json @@ -1,5 +1,4 @@ { - "id": 2008, "graphic": "PRAS- Status", "frames": [ [ diff --git a/public/battle-anims/common-bide.json b/public/battle-anims/common-bide.json index d0c635e797a..3b63f2561f8 100644 --- a/public/battle-anims/common-bide.json +++ b/public/battle-anims/common-bide.json @@ -1,5 +1,4 @@ { - "id": 2017, "graphic": "PRAS- Bide", "frames": [ [ diff --git a/public/battle-anims/common-bind.json b/public/battle-anims/common-bind.json index b1cae760fa9..199000d73a6 100644 --- a/public/battle-anims/common-bind.json +++ b/public/battle-anims/common-bind.json @@ -1,5 +1,4 @@ { - "id": 2009, "graphic": "PRAS- Wrapping", "frames": [ [ diff --git a/public/battle-anims/common-burn.json b/public/battle-anims/common-burn.json index d9f779d458b..08e9ab0444e 100644 --- a/public/battle-anims/common-burn.json +++ b/public/battle-anims/common-burn.json @@ -1,5 +1,4 @@ { - "id": 2006, "graphic": "PRAS- Status", "frames": [ [ diff --git a/public/battle-anims/common-clamp.json b/public/battle-anims/common-clamp.json index 4185883c88a..d90010b3784 100644 --- a/public/battle-anims/common-clamp.json +++ b/public/battle-anims/common-clamp.json @@ -1,5 +1,4 @@ { - "id": 2023, "graphic": "PRAS- Shell Smash", "frames": [ [ diff --git a/public/battle-anims/common-confusion.json b/public/battle-anims/common-confusion.json index 77b2cde7d7a..ed1f66260a8 100644 --- a/public/battle-anims/common-confusion.json +++ b/public/battle-anims/common-confusion.json @@ -1,5 +1,4 @@ { - "id": 2007, "graphic": "PRAS- Status", "frames": [ [ diff --git a/public/battle-anims/common-covet.json b/public/battle-anims/common-covet.json index f74bcf2eced..40d8f0f3f90 100644 --- a/public/battle-anims/common-covet.json +++ b/public/battle-anims/common-covet.json @@ -1,5 +1,4 @@ { - "id": 2015, "graphic": "PRAS- Covet", "frames": [ [ diff --git a/public/battle-anims/common-curse-no-ghost.json b/public/battle-anims/common-curse-no-ghost.json index 87afddb680d..9dad0bbc88d 100644 --- a/public/battle-anims/common-curse-no-ghost.json +++ b/public/battle-anims/common-curse-no-ghost.json @@ -1,5 +1,4 @@ { - "id": 2011, "graphic": "PRAS- CURSE2", "frames": [ [ diff --git a/public/battle-anims/common-curse.json b/public/battle-anims/common-curse.json index 5c1a8cf4461..593ec00b7fe 100644 --- a/public/battle-anims/common-curse.json +++ b/public/battle-anims/common-curse.json @@ -1,5 +1,4 @@ { - "id": 2021, "graphic": "PRAS- Curse", "frames": [ [ diff --git a/public/battle-anims/common-electric-terrain.json b/public/battle-anims/common-electric-terrain.json index 7d8ba811733..1e25116be2e 100644 --- a/public/battle-anims/common-electric-terrain.json +++ b/public/battle-anims/common-electric-terrain.json @@ -1,5 +1,4 @@ { - "id": 2111, "graphic": "PRAS- Electric", "frames": [ [ diff --git a/public/battle-anims/common-fire-spin.json b/public/battle-anims/common-fire-spin.json index b65afba13cc..71389641f8c 100644 --- a/public/battle-anims/common-fire-spin.json +++ b/public/battle-anims/common-fire-spin.json @@ -1,5 +1,4 @@ { - "id": 2013, "graphic": "PRAS- Fire Spin", "frames": [ [ diff --git a/public/battle-anims/common-frozen.json b/public/battle-anims/common-frozen.json index df738b1b64d..c604dde1fb1 100644 --- a/public/battle-anims/common-frozen.json +++ b/public/battle-anims/common-frozen.json @@ -1,5 +1,4 @@ { - "id": 2005, "graphic": "PRAS- Status", "frames": [ [ diff --git a/public/battle-anims/common-grassy-terrain.json b/public/battle-anims/common-grassy-terrain.json index b33ef37a4c6..616c28b7ff1 100644 --- a/public/battle-anims/common-grassy-terrain.json +++ b/public/battle-anims/common-grassy-terrain.json @@ -1,5 +1,4 @@ { - "id": 2112, "graphic": "PRAS- Grass", "frames": [ [ diff --git a/public/battle-anims/common-hail.json b/public/battle-anims/common-hail.json index 58c292e3bd9..2b71c4a5d4c 100644 --- a/public/battle-anims/common-hail.json +++ b/public/battle-anims/common-hail.json @@ -1,5 +1,4 @@ { - "id": 2103, "graphic": "PRAS- Weather", "frames": [ [ diff --git a/public/battle-anims/common-harsh-sun.json b/public/battle-anims/common-harsh-sun.json index 670b3e4a645..20e9305014c 100644 --- a/public/battle-anims/common-harsh-sun.json +++ b/public/battle-anims/common-harsh-sun.json @@ -1,5 +1,4 @@ { - "id": 2106, "graphic": "weather", "frames": [ [ diff --git a/public/battle-anims/common-health-up.json b/public/battle-anims/common-health-up.json index c36ad7ef3b3..d94847ade72 100644 --- a/public/battle-anims/common-health-up.json +++ b/public/battle-anims/common-health-up.json @@ -1,5 +1,4 @@ { - "id": 2000, "graphic": "PRAS- Recovery", "frames": [ [ diff --git a/public/battle-anims/common-heavy-rain.json b/public/battle-anims/common-heavy-rain.json index d05abe2bd4e..87a8b91060b 100644 --- a/public/battle-anims/common-heavy-rain.json +++ b/public/battle-anims/common-heavy-rain.json @@ -1,5 +1,4 @@ { - "id": 2105, "graphic": "PRAS- Weather", "frames": [ [ diff --git a/public/battle-anims/common-leech-seed.json b/public/battle-anims/common-leech-seed.json index e0dd2839798..219691ec77b 100644 --- a/public/battle-anims/common-leech-seed.json +++ b/public/battle-anims/common-leech-seed.json @@ -1,5 +1,4 @@ { - "id": 2012, "graphic": "PRAS- Absorption2", "frames": [ [ diff --git a/public/battle-anims/common-magma-storm.json b/public/battle-anims/common-magma-storm.json index 1aac0f13d7e..097c76dae0f 100644 --- a/public/battle-anims/common-magma-storm.json +++ b/public/battle-anims/common-magma-storm.json @@ -1,5 +1,4 @@ { - "id": 2022, "graphic": "PRAS- Magma Storm", "frames": [ [ diff --git a/public/battle-anims/common-misty-terrain.json b/public/battle-anims/common-misty-terrain.json index a0391e97578..d2f87ed9b10 100644 --- a/public/battle-anims/common-misty-terrain.json +++ b/public/battle-anims/common-misty-terrain.json @@ -1,5 +1,4 @@ { - "id": 2110, "graphic": "PRAS- Orbs", "frames": [ [ diff --git a/public/battle-anims/common-paralysis.json b/public/battle-anims/common-paralysis.json index 8508270f41d..200402be88e 100644 --- a/public/battle-anims/common-paralysis.json +++ b/public/battle-anims/common-paralysis.json @@ -1,5 +1,4 @@ { - "id": 2003, "graphic": "PRAS- Status", "frames": [ [ diff --git a/public/battle-anims/common-poison.json b/public/battle-anims/common-poison.json index 42f64031529..485ae0e01fa 100644 --- a/public/battle-anims/common-poison.json +++ b/public/battle-anims/common-poison.json @@ -1,5 +1,4 @@ { - "id": 2001, "graphic": "PRAS- Status", "frames": [ [ diff --git a/public/battle-anims/common-protect.json b/public/battle-anims/common-protect.json index 0f7e9ba83b5..59ac040d26c 100644 --- a/public/battle-anims/common-protect.json +++ b/public/battle-anims/common-protect.json @@ -1,5 +1,4 @@ { - "id": 2014, "graphic": "PRAS- Protect", "frames": [ [ diff --git a/public/battle-anims/common-psychic-terrain.json b/public/battle-anims/common-psychic-terrain.json index 7b642e13dc6..05311a3a779 100644 --- a/public/battle-anims/common-psychic-terrain.json +++ b/public/battle-anims/common-psychic-terrain.json @@ -1,5 +1,4 @@ { - "id": 2113, "graphic": "PRAS- Mirror Coat", "frames": [ [ diff --git a/public/battle-anims/common-quick-guard.json b/public/battle-anims/common-quick-guard.json index a524359db9d..03d8b4db3b7 100644 --- a/public/battle-anims/common-quick-guard.json +++ b/public/battle-anims/common-quick-guard.json @@ -1,5 +1,4 @@ { - "id": 2019, "graphic": "PRAS- Lucky Chant", "frames": [ [ diff --git a/public/battle-anims/common-rain.json b/public/battle-anims/common-rain.json index 5d47e8c58c1..5ceecfd6528 100644 --- a/public/battle-anims/common-rain.json +++ b/public/battle-anims/common-rain.json @@ -1,5 +1,4 @@ { - "id": 2101, "graphic": "PRAS- Weather", "frames": [ [ diff --git a/public/battle-anims/common-sand-tomb.json b/public/battle-anims/common-sand-tomb.json index 6b004df6956..514c60d0976 100644 --- a/public/battle-anims/common-sand-tomb.json +++ b/public/battle-anims/common-sand-tomb.json @@ -1,5 +1,4 @@ { - "id": 2018, "graphic": "PRAS- Sand Tomb", "frames": [ [ diff --git a/public/battle-anims/common-sandstorm.json b/public/battle-anims/common-sandstorm.json index cfa47ae8a77..bbdae84161c 100644 --- a/public/battle-anims/common-sandstorm.json +++ b/public/battle-anims/common-sandstorm.json @@ -1,5 +1,4 @@ { - "id": 2102, "graphic": "weather", "frames": [ [ diff --git a/public/battle-anims/common-sleep.json b/public/battle-anims/common-sleep.json index 929cdc28800..44a1ad900c8 100644 --- a/public/battle-anims/common-sleep.json +++ b/public/battle-anims/common-sleep.json @@ -1,5 +1,4 @@ { - "id": 2004, "graphic": "PRAS- Status", "frames": [ [ diff --git a/public/battle-anims/common-strong-winds.json b/public/battle-anims/common-strong-winds.json index d42a845fa0c..1d47bade60e 100644 --- a/public/battle-anims/common-strong-winds.json +++ b/public/battle-anims/common-strong-winds.json @@ -1,5 +1,4 @@ { - "id": 2107, "graphic": "PRAS- Gust", "frames": [ [ diff --git a/public/battle-anims/common-sunny.json b/public/battle-anims/common-sunny.json index ea63175ba87..98f41e811e4 100644 --- a/public/battle-anims/common-sunny.json +++ b/public/battle-anims/common-sunny.json @@ -1,5 +1,4 @@ { - "id": 2100, "graphic": "weather", "frames": [ [ diff --git a/public/battle-anims/common-toxic.json b/public/battle-anims/common-toxic.json index 9a65df4fff7..1d1f90d3041 100644 --- a/public/battle-anims/common-toxic.json +++ b/public/battle-anims/common-toxic.json @@ -1,5 +1,4 @@ { - "id": 2002, "graphic": "PRAS- Poison", "frames": [ [ diff --git a/public/battle-anims/common-use-item.json b/public/battle-anims/common-use-item.json new file mode 100644 index 00000000000..d0fe93db7e1 --- /dev/null +++ b/public/battle-anims/common-use-item.json @@ -0,0 +1,1217 @@ +{ + "graphic": "", + "frames": [ + [ + { + "x": 0, + "y": 0, + "zoomX": 95, + "zoomY": 105, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 90, + "zoomY": 110, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 85, + "zoomY": 115, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 80, + "zoomY": 120, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 75, + "zoomY": 125, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 80, + "zoomY": 120, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 90, + "zoomY": 110, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 95, + "zoomY": 105, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 90, + "zoomY": 110, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 85, + "zoomY": 115, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 80, + "zoomY": 120, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 75, + "zoomY": 125, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 80, + "zoomY": 120, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 90, + "zoomY": 110, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 2 + }, + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "angle": 0, + "mirror": false, + "visible": false, + "blendType": 0, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "color": [ + 0, + 0, + 0, + 0 + ], + "tone": [ + 0, + 0, + 0, + 0 + ], + "flash": [ + 0, + 0, + 0, + 0 + ], + "locked": false, + "priority": 1, + "focus": 1 + } + ] + ], + "frameTimedEvents": { + "0": [ + { + "frameIndex": 0, + "resourceName": "PRSFX- Bite.wav", + "volume": 60, + "pitch": 70, + "eventType": "AnimTimedSoundEvent" + } + ], + "9": [ + { + "frameIndex": 9, + "resourceName": "PRSFX- Bite.wav", + "volume": 60, + "pitch": 70, + "eventType": "AnimTimedSoundEvent" + } + ] + }, + "position": 4, + "hue": 0 +} \ No newline at end of file diff --git a/public/battle-anims/common-whirlpool.json b/public/battle-anims/common-whirlpool.json index 29a2e5ee843..3dfc75b354a 100644 --- a/public/battle-anims/common-whirlpool.json +++ b/public/battle-anims/common-whirlpool.json @@ -1,5 +1,4 @@ { - "id": 2016, "graphic": "PRAS- Whirlpool", "frames": [ [ diff --git a/public/battle-anims/common-wide-guard.json b/public/battle-anims/common-wide-guard.json index 4c20249d8bf..44a90f38a98 100644 --- a/public/battle-anims/common-wide-guard.json +++ b/public/battle-anims/common-wide-guard.json @@ -1,5 +1,4 @@ { - "id": 2020, "graphic": "PRAS- Lucky Chant", "frames": [ [ diff --git a/public/battle-anims/common-wind.json b/public/battle-anims/common-wind.json index f61aa4ffebb..d5b3ae0081c 100644 --- a/public/battle-anims/common-wind.json +++ b/public/battle-anims/common-wind.json @@ -1,5 +1,4 @@ { - "id": 2104, "graphic": "weather", "frames": [ [ diff --git a/public/battle-anims/common-wrap.json b/public/battle-anims/common-wrap.json index fc394f54ab6..199000d73a6 100644 --- a/public/battle-anims/common-wrap.json +++ b/public/battle-anims/common-wrap.json @@ -1,5 +1,4 @@ { - "id": 2010, "graphic": "PRAS- Wrapping", "frames": [ [ diff --git a/public/battle-anims/dig-charging.json b/public/battle-anims/dig-charging.json index 1ded6503ad7..36c773d643f 100644 --- a/public/battle-anims/dig-charging.json +++ b/public/battle-anims/dig-charging.json @@ -1,5 +1,4 @@ { - "id": 1002, "graphic": "PRAS- Dig", "frames": [ [ diff --git a/public/battle-anims/dive-charging.json b/public/battle-anims/dive-charging.json index bf6d6d02fc6..5ff931bdbec 100644 --- a/public/battle-anims/dive-charging.json +++ b/public/battle-anims/dive-charging.json @@ -1,5 +1,4 @@ { - "id": 1003, "graphic": "PRAS- Dive", "frames": [ [ diff --git a/public/battle-anims/doom-desire-charging.json b/public/battle-anims/doom-desire-charging.json index 5ce0be2a339..61904348238 100644 --- a/public/battle-anims/doom-desire-charging.json +++ b/public/battle-anims/doom-desire-charging.json @@ -1,5 +1,4 @@ { - "id": 1011, "graphic": "PRAS- Wish", "frames": [ [ diff --git a/public/battle-anims/fly-charging.json b/public/battle-anims/fly-charging.json index 3b306eea815..f3be210f9cc 100644 --- a/public/battle-anims/fly-charging.json +++ b/public/battle-anims/fly-charging.json @@ -1,5 +1,4 @@ { - "id": 1000, "graphic": "PRAS- Fly", "frames": [ [ diff --git a/public/battle-anims/freeze-shock-charging.json b/public/battle-anims/freeze-shock-charging.json index 9dc03426ca0..bf568a41728 100644 --- a/public/battle-anims/freeze-shock-charging.json +++ b/public/battle-anims/freeze-shock-charging.json @@ -1,5 +1,4 @@ { - "id": 1007, "graphic": "PRAS- Freeze Shock", "frames": [ [ diff --git a/public/battle-anims/ice-burn-charging.json b/public/battle-anims/ice-burn-charging.json index ce684fddcbf..1f8f022f264 100644 --- a/public/battle-anims/ice-burn-charging.json +++ b/public/battle-anims/ice-burn-charging.json @@ -1,5 +1,4 @@ { - "id": 1010, "graphic": "PRAS- Ice Burn", "frames": [ [ diff --git a/public/battle-anims/razor-wind-charging.json b/public/battle-anims/razor-wind-charging.json index 3058644af13..5667315b003 100644 --- a/public/battle-anims/razor-wind-charging.json +++ b/public/battle-anims/razor-wind-charging.json @@ -1,5 +1,4 @@ { - "id": 1012, "graphic": "PRAS- Gust", "frames": [ [ diff --git a/public/battle-anims/shadow-force-charging.json b/public/battle-anims/shadow-force-charging.json index c60587f6ab4..f2aae4f789e 100644 --- a/public/battle-anims/shadow-force-charging.json +++ b/public/battle-anims/shadow-force-charging.json @@ -1,5 +1,4 @@ { - "id": 1005, "graphic": "", "frames": [ [ diff --git a/public/battle-anims/skull-bash-charging.json b/public/battle-anims/skull-bash-charging.json index c62ef9e1e08..5bd08781e27 100644 --- a/public/battle-anims/skull-bash-charging.json +++ b/public/battle-anims/skull-bash-charging.json @@ -1,5 +1,4 @@ { - "id": 1006, "graphic": "", "frames": [ [ diff --git a/public/battle-anims/sky-attack-charging.json b/public/battle-anims/sky-attack-charging.json index c60e6494c54..2de28178710 100644 --- a/public/battle-anims/sky-attack-charging.json +++ b/public/battle-anims/sky-attack-charging.json @@ -1,5 +1,4 @@ { - "id": 1009, "graphic": "", "frames": [ [ diff --git a/public/battle-anims/sky-drop-charging.json b/public/battle-anims/sky-drop-charging.json index 564df8018ea..456f43ee3ed 100644 --- a/public/battle-anims/sky-drop-charging.json +++ b/public/battle-anims/sky-drop-charging.json @@ -1,5 +1,4 @@ { - "id": 1008, "graphic": "", "frames": [ [ diff --git a/public/battle-anims/solar-beam-charging.json b/public/battle-anims/solar-beam-charging.json index 3177bae0aa7..13dbee36fb9 100644 --- a/public/battle-anims/solar-beam-charging.json +++ b/public/battle-anims/solar-beam-charging.json @@ -1,5 +1,4 @@ { - "id": 1004, "graphic": "PRAS- Orbs", "frames": [ [ diff --git a/public/images/items.json b/public/images/items.json index fa8a251c09d..23ce0ee7133 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -4,8 +4,8 @@ "image": "items.png", "format": "RGBA8888", "size": { - "w": 238, - "h": 238 + "w": 243, + "h": 243 }, "scale": 1, "frames": [ @@ -262,7 +262,7 @@ } }, { - "filename": "mystic_water", + "filename": "berry_pouch", "rotated": false, "trimmed": true, "sourceSize": { @@ -270,15 +270,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 6, + "x": 4, "y": 5, - "w": 20, + "w": 23, "h": 23 }, "frame": { "x": 218, "y": 0, - "w": 20, + "w": 23, "h": 23 } }, @@ -618,69 +618,6 @@ "h": 23 } }, - { - "filename": "iron", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 8, - "y": 4, - "w": 16, - "h": 24 - }, - "frame": { - "x": 222, - "y": 23, - "w": 16, - "h": 24 - } - }, - { - "filename": "max_elixir", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 7, - "y": 4, - "w": 18, - "h": 24 - }, - "frame": { - "x": 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, - "w": 18, - "h": 24 - } - }, { "filename": "oval_charm", "rotated": false, @@ -696,12 +633,33 @@ "h": 24 }, "frame": { - "x": 51, - "y": 46, + "x": 222, + "y": 23, "w": 21, "h": 24 } }, + { + "filename": "iron", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 4, + "w": 16, + "h": 24 + }, + "frame": { + "x": 33, + "y": 50, + "w": 16, + "h": 24 + } + }, { "filename": "reaper_cloth", "rotated": false, @@ -717,33 +675,12 @@ "h": 23 }, "frame": { - "x": 72, + "x": 49, "y": 46, "w": 22, "h": 23 } }, - { - "filename": "shiny_charm", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 6, - "y": 4, - "w": 21, - "h": 24 - }, - "frame": { - "x": 51, - "y": 70, - "w": 21, - "h": 24 - } - }, { "filename": "charcoal", "rotated": false, @@ -759,14 +696,14 @@ "h": 22 }, "frame": { - "x": 72, - "y": 69, + "x": 71, + "y": 46, "w": 22, "h": 22 } }, { - "filename": "hyper_potion", + "filename": "max_elixir", "rotated": false, "trimmed": true, "sourceSize": { @@ -774,16 +711,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 17, - "h": 23 + "x": 7, + "y": 4, + "w": 18, + "h": 24 }, "frame": { - "x": 94, + "x": 93, "y": 46, - "w": 17, - "h": 23 + "w": 18, + "h": 24 } }, { @@ -842,27 +779,6 @@ "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, @@ -871,28 +787,7 @@ } }, { - "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", + "filename": "guard_spec", "rotated": false, "trimmed": true, "sourceSize": { @@ -934,7 +829,7 @@ } }, { - "filename": "pp_max", + "filename": "shiny_charm", "rotated": false, "trimmed": true, "sourceSize": { @@ -942,15 +837,36 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, + "x": 6, "y": 4, - "w": 16, + "w": 21, "h": 24 }, "frame": { "x": 222, "y": 47, - "w": 16, + "w": 21, + "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, + "w": 18, "h": 24 } }, @@ -969,14 +885,14 @@ "h": 23 }, "frame": { - "x": 138, + "x": 51, "y": 69, "w": 21, "h": 23 } }, { - "filename": "moon_stone", + "filename": "sharp_beak", "rotated": false, "trimmed": true, "sourceSize": { @@ -984,16 +900,16 @@ "h": 32 }, "spriteSourceSize": { - "x": 4, - "y": 6, - "w": 23, - "h": 21 + "x": 5, + "y": 5, + "w": 21, + "h": 23 }, "frame": { - "x": 159, + "x": 72, "y": 68, - "w": 23, - "h": 21 + "w": 21, + "h": 23 } }, { @@ -1011,14 +927,119 @@ "h": 21 }, "frame": { - "x": 182, - "y": 68, + "x": 93, + "y": 70, "w": 20, "h": 21 } }, { - "filename": "gb", + "filename": "ice_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 113, + "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": 135, + "y": 69, + "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": 157, + "y": 68, + "w": 23, + "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": 180, + "y": 68, + "w": 22, + "h": 21 + } + }, + { + "filename": "mystic_water", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 20, + "h": 23 + }, + "frame": { + "x": 202, + "y": 66, + "w": 20, + "h": 23 + } + }, + { + "filename": "dusk_stone", "rotated": false, "trimmed": true, "sourceSize": { @@ -1028,77 +1049,14 @@ "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 + "w": 21, + "h": 21 }, "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 + "w": 21, + "h": 21 } }, { @@ -1122,27 +1080,6 @@ "h": 22 } }, - { - "filename": "sharp_beak", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 21, - "h": 23 - }, - "frame": { - "x": 18, - "y": 120, - "w": 21, - "h": 23 - } - }, { "filename": "thunder_stone", "rotated": false, @@ -1159,13 +1096,13 @@ }, "frame": { "x": 18, - "y": 143, + "y": 120, "w": 22, "h": 22 } }, { - "filename": "dubious_disc", + "filename": "tm_bug", "rotated": false, "trimmed": true, "sourceSize": { @@ -1174,15 +1111,36 @@ }, "spriteSourceSize": { "x": 5, - "y": 7, + "y": 5, "w": 22, - "h": 19 + "h": 22 }, "frame": { "x": 18, - "y": 165, + "y": 142, "w": 22, - "h": 19 + "h": 22 + } + }, + { + "filename": "binding_band", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 23, + "h": 20 + }, + "frame": { + "x": 18, + "y": 164, + "w": 23, + "h": 20 } }, { @@ -1228,7 +1186,7 @@ } }, { - "filename": "full_heal", + "filename": "pp_max", "rotated": false, "trimmed": true, "sourceSize": { @@ -1236,41 +1194,20 @@ "h": 32 }, "spriteSourceSize": { - "x": 9, + "x": 8, "y": 4, - "w": 15, - "h": 23 + "w": 16, + "h": 24 }, "frame": { "x": 40, "y": 98, - "w": 15, - "h": 23 + "w": 16, + "h": 24 } }, { - "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 - } - }, - { - "filename": "zinc", + "filename": "pp_up", "rotated": false, "trimmed": true, "sourceSize": { @@ -1285,13 +1222,97 @@ }, "frame": { "x": 40, - "y": 143, + "y": 122, "w": 16, "h": 24 } }, { - "filename": "potion", + "filename": "choice_specs", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 24, + "h": 18 + }, + "frame": { + "x": 40, + "y": 146, + "w": 24, + "h": 18 + } + }, + { + "filename": "tm_dark", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 41, + "y": 164, + "w": 22, + "h": 22 + } + }, + { + "filename": "tm_dragon", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 41, + "y": 186, + "w": 22, + "h": 22 + } + }, + { + "filename": "tm_electric", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 5, + "w": 22, + "h": 22 + }, + "frame": { + "x": 41, + "y": 208, + "w": 22, + "h": 22 + } + }, + { + "filename": "protein", "rotated": false, "trimmed": true, "sourceSize": { @@ -1300,15 +1321,15 @@ }, "spriteSourceSize": { "x": 8, - "y": 5, - "w": 17, - "h": 23 + "y": 4, + "w": 16, + "h": 24 }, "frame": { - "x": 55, - "y": 94, - "w": 17, - "h": 23 + "x": 56, + "y": 92, + "w": 16, + "h": 24 } }, { @@ -1333,7 +1354,7 @@ } }, { - "filename": "binding_band", + "filename": "shell_bell", "rotated": false, "trimmed": true, "sourceSize": { @@ -1342,7 +1363,7 @@ }, "spriteSourceSize": { "x": 5, - "y": 6, + "y": 7, "w": 23, "h": 20 }, @@ -1353,27 +1374,6 @@ "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, @@ -1389,119 +1389,14 @@ "h": 20 }, "frame": { - "x": 138, - "y": 92, + "x": 119, + "y": 91, "w": 22, "h": 20 } }, { - "filename": "tm_bug", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "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", + "filename": "zinc", "rotated": false, "trimmed": true, "sourceSize": { @@ -1510,99 +1405,15 @@ }, "spriteSourceSize": { "x": 8, - "y": 5, - "w": 17, - "h": 23 + "y": 4, + "w": 16, + "h": 24 }, "frame": { "x": 56, - "y": 117, - "w": 17, - "h": 23 - } - }, - { - "filename": "tm_dark", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 56, - "y": 140, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_dragon", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 73, - "y": 111, - "w": 22, - "h": 22 - } - }, - { - "filename": "tm_electric", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 5, - "w": 22, - "h": 22 - }, - "frame": { - "x": 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 + "y": 116, + "w": 16, + "h": 24 } }, { @@ -1620,8 +1431,8 @@ "h": 22 }, "frame": { - "x": 138, - "y": 112, + "x": 72, + "y": 111, "w": 22, "h": 22 } @@ -1641,8 +1452,8 @@ "h": 22 }, "frame": { - "x": 78, - "y": 133, + "x": 94, + "y": 111, "w": 22, "h": 22 } @@ -1662,14 +1473,14 @@ "h": 22 }, "frame": { - "x": 100, - "y": 133, + "x": 116, + "y": 111, "w": 22, "h": 22 } }, { - "filename": "leftovers", + "filename": "gb", "rotated": false, "trimmed": true, "sourceSize": { @@ -1677,36 +1488,15 @@ "h": 32 }, "spriteSourceSize": { - "x": 8, - "y": 5, - "w": 15, - "h": 22 - }, - "frame": { - "x": 122, - "y": 132, - "w": 15, - "h": 22 - } - }, - { - "filename": "shell_bell", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 7, - "w": 23, + "x": 6, + "y": 6, + "w": 20, "h": 20 }, "frame": { - "x": 137, - "y": 134, - "w": 23, + "x": 141, + "y": 91, + "w": 20, "h": 20 } }, @@ -1725,8 +1515,8 @@ "h": 22 }, "frame": { - "x": 160, - "y": 132, + "x": 138, + "y": 111, "w": 22, "h": 22 } @@ -1746,33 +1536,12 @@ "h": 22 }, "frame": { - "x": 182, - "y": 129, + "x": 161, + "y": 89, "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, @@ -1788,8 +1557,8 @@ "h": 22 }, "frame": { - "x": 41, - "y": 184, + "x": 160, + "y": 111, "w": 22, "h": 22 } @@ -1809,8 +1578,8 @@ "h": 22 }, "frame": { - "x": 41, - "y": 206, + "x": 183, + "y": 89, "w": 22, "h": 22 } @@ -1830,14 +1599,14 @@ "h": 22 }, "frame": { - "x": 204, - "y": 123, + "x": 182, + "y": 111, "w": 22, "h": 22 } }, { - "filename": "revive", + "filename": "hyper_potion", "rotated": false, "trimmed": true, "sourceSize": { @@ -1845,18 +1614,165 @@ "h": 32 }, "spriteSourceSize": { - "x": 10, + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 205, + "y": 89, + "w": 17, + "h": 23 + } + }, + { + "filename": "poison_barb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 222, + "y": 92, + "w": 21, + "h": 21 + } + }, + { + "filename": "razor_fang", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 18, + "h": 20 + }, + "frame": { + "x": 204, + "y": 112, + "w": 18, + "h": 20 + } + }, + { + "filename": "shiny_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 21, + "h": 21 + }, + "frame": { + "x": 222, + "y": 113, + "w": 21, + "h": 21 + } + }, + { + "filename": "dragon_scale", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, "y": 8, - "w": 12, + "w": 24, + "h": 18 + }, + "frame": { + "x": 72, + "y": 133, + "w": 24, + "h": 18 + } + }, + { + "filename": "black_glasses", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 23, "h": 17 }, "frame": { - "x": 226, - "y": 119, - "w": 12, + "x": 96, + "y": 133, + "w": 23, "h": 17 } }, + { + "filename": "wise_glasses", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 8, + "w": 23, + "h": 17 + }, + "frame": { + "x": 119, + "y": 133, + "w": 23, + "h": 17 + } + }, + { + "filename": "dubious_disc", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 142, + "y": 133, + "w": 22, + "h": 19 + } + }, { "filename": "tm_normal", "rotated": false, @@ -1872,12 +1788,54 @@ "h": 22 }, "frame": { - "x": 63, - "y": 162, + "x": 164, + "y": 133, "w": 22, "h": 22 } }, + { + "filename": "sitrus_berry", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 20, + "h": 22 + }, + "frame": { + "x": 186, + "y": 133, + "w": 20, + "h": 22 + } + }, + { + "filename": "full_heal", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 4, + "w": 15, + "h": 23 + }, + "frame": { + "x": 206, + "y": 132, + "w": 15, + "h": 23 + } + }, { "filename": "tm_poison", "rotated": false, @@ -1893,12 +1851,33 @@ "h": 22 }, "frame": { - "x": 63, - "y": 184, + "x": 221, + "y": 134, "w": 22, "h": 22 } }, + { + "filename": "silver_powder", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 4, + "y": 11, + "w": 24, + "h": 15 + }, + "frame": { + "x": 64, + "y": 151, + "w": 24, + "h": 15 + } + }, { "filename": "tm_psychic", "rotated": false, @@ -1915,7 +1894,7 @@ }, "frame": { "x": 63, - "y": 206, + "y": 166, "w": 22, "h": 22 } @@ -1935,8 +1914,8 @@ "h": 22 }, "frame": { - "x": 85, - "y": 155, + "x": 63, + "y": 188, "w": 22, "h": 22 } @@ -1956,12 +1935,96 @@ "h": 22 }, "frame": { - "x": 85, - "y": 177, + "x": 63, + "y": 210, "w": 22, "h": 22 } }, + { + "filename": "potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 85, + "y": 166, + "w": 17, + "h": 23 + } + }, + { + "filename": "super_potion", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 5, + "w": 17, + "h": 23 + }, + "frame": { + "x": 85, + "y": 189, + "w": 17, + "h": 23 + } + }, + { + "filename": "golden_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 85, + "y": 212, + "w": 17, + "h": 20 + } + }, + { + "filename": "prism_scale", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 8, + "w": 15, + "h": 15 + }, + "frame": { + "x": 88, + "y": 151, + "w": 15, + "h": 15 + } + }, { "filename": "tm_water", "rotated": false, @@ -1977,33 +2040,12 @@ "h": 22 }, "frame": { - "x": 85, - "y": 199, + "x": 103, + "y": 150, "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": 85, - "y": 221, - "w": 23, - "h": 17 - } - }, { "filename": "water_stone", "rotated": false, @@ -2019,8 +2061,8 @@ "h": 22 }, "frame": { - "x": 107, - "y": 155, + "x": 102, + "y": 172, "w": 22, "h": 22 } @@ -2040,12 +2082,33 @@ "h": 22 }, "frame": { - "x": 107, - "y": 177, + "x": 102, + "y": 194, "w": 22, "h": 22 } }, + { + "filename": "metronome", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 5, + "w": 17, + "h": 22 + }, + "frame": { + "x": 125, + "y": 150, + "w": 17, + "h": 22 + } + }, { "filename": "x_attack", "rotated": false, @@ -2061,12 +2124,33 @@ "h": 22 }, "frame": { - "x": 107, - "y": 199, + "x": 142, + "y": 152, "w": 22, "h": 22 } }, + { + "filename": "upgrade", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 5, + "y": 7, + "w": 22, + "h": 19 + }, + "frame": { + "x": 164, + "y": 155, + "w": 22, + "h": 19 + } + }, { "filename": "x_defense", "rotated": false, @@ -2082,12 +2166,33 @@ "h": 22 }, "frame": { - "x": 129, - "y": 154, + "x": 186, + "y": 155, "w": 22, "h": 22 } }, + { + "filename": "oval_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 7, + "w": 18, + "h": 19 + }, + "frame": { + "x": 124, + "y": 172, + "w": 18, + "h": 19 + } + }, { "filename": "x_sp_atk", "rotated": false, @@ -2103,12 +2208,33 @@ "h": 22 }, "frame": { - "x": 129, - "y": 176, + "x": 124, + "y": 191, "w": 22, "h": 22 } }, + { + "filename": "everstone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 17 + }, + "frame": { + "x": 142, + "y": 174, + "w": 20, + "h": 17 + } + }, { "filename": "x_sp_def", "rotated": false, @@ -2124,8 +2250,8 @@ "h": 22 }, "frame": { - "x": 151, - "y": 154, + "x": 162, + "y": 174, "w": 22, "h": 22 } @@ -2145,14 +2271,14 @@ "h": 22 }, "frame": { - "x": 129, - "y": 198, + "x": 184, + "y": 177, "w": 22, "h": 22 } }, { - "filename": "choice_specs", + "filename": "leftovers", "rotated": false, "trimmed": true, "sourceSize": { @@ -2160,121 +2286,16 @@ "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": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "x": 151, - "y": 176, - "w": 21, - "h": 21 - } - }, - { - "filename": "shiny_stone", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 5, - "y": 6, - "w": 21, - "h": 21 - }, - "frame": { - "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 - } - }, - { - "filename": "prism_scale", - "rotated": false, - "trimmed": true, - "sourceSize": { - "w": 32, - "h": 32 - }, - "spriteSourceSize": { - "x": 9, - "y": 8, + "x": 8, + "y": 5, "w": 15, - "h": 15 + "h": 22 }, "frame": { - "x": 108, - "y": 221, + "x": 146, + "y": 191, "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 + "h": 22 } }, { @@ -2292,77 +2313,14 @@ "h": 21 }, "frame": { - "x": 192, - "y": 151, + "x": 102, + "y": 216, "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", + "filename": "lum_berry", "rotated": false, "trimmed": true, "sourceSize": { @@ -2372,18 +2330,18 @@ "spriteSourceSize": { "x": 6, "y": 7, - "w": 19, + "w": 20, "h": 19 }, "frame": { - "x": 173, - "y": 175, - "w": 19, + "x": 161, + "y": 196, + "w": 20, "h": 19 } }, { - "filename": "ub", + "filename": "magnet", "rotated": false, "trimmed": true, "sourceSize": { @@ -2397,8 +2355,134 @@ "h": 20 }, "frame": { - "x": 172, - "y": 194, + "x": 181, + "y": 199, + "w": 20, + "h": 20 + } + }, + { + "filename": "revive", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 10, + "y": 8, + "w": 12, + "h": 17 + }, + "frame": { + "x": 208, + "y": 155, + "w": 12, + "h": 17 + } + }, + { + "filename": "mb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 220, + "y": 156, + "w": 20, + "h": 20 + } + }, + { + "filename": "hard_stone", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 19, + "h": 20 + }, + "frame": { + "x": 201, + "y": 199, + "w": 19, + "h": 20 + } + }, + { + "filename": "pb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 124, + "y": 213, + "w": 20, + "h": 20 + } + }, + { + "filename": "lucky_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 144, + "y": 213, + "w": 17, + "h": 20 + } + }, + { + "filename": "pb_gold", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, + "h": 20 + }, + "frame": { + "x": 161, + "y": 215, "w": 20, "h": 20 } @@ -2418,14 +2502,14 @@ "h": 19 }, "frame": { - "x": 192, - "y": 190, + "x": 181, + "y": 219, "w": 20, "h": 19 } }, { - "filename": "razor_fang", + "filename": "miracle_seed", "rotated": false, "trimmed": true, "sourceSize": { @@ -2433,62 +2517,20 @@ "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, + "x": 6, "y": 7, - "w": 18, + "w": 19, "h": 19 }, "frame": { - "x": 212, - "y": 190, - "w": 18, + "x": 201, + "y": 219, + "w": 19, "h": 19 } }, { - "filename": "lucky_egg", + "filename": "spell_tag", "rotated": false, "trimmed": true, "sourceSize": { @@ -2498,13 +2540,34 @@ "spriteSourceSize": { "x": 7, "y": 6, - "w": 17, + "w": 19, + "h": 21 + }, + "frame": { + "x": 206, + "y": 177, + "w": 19, + "h": 21 + } + }, + { + "filename": "ub", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 20, "h": 20 }, "frame": { - "x": 216, - "y": 209, - "w": 17, + "x": 220, + "y": 198, + "w": 20, "h": 20 } } @@ -2514,6 +2577,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:10a8d93fb8ec92f93ee3e4be5874c09d:240b93de032db305ae2062ef1c0868f5:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:cd6f7e7d7ca088a48736507750d678e7:2e6f80a76c6bb03e5060479cd463686a:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index 9a79027220f..56025517826 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/berry_pouch.png b/public/images/items/berry_pouch.png new file mode 100644 index 00000000000..878ef600239 Binary files /dev/null and b/public/images/items/berry_pouch.png differ diff --git a/public/images/items/lum_berry,png.png b/public/images/items/lum_berry,png.png new file mode 100644 index 00000000000..8feb811e411 Binary files /dev/null and b/public/images/items/lum_berry,png.png differ diff --git a/public/images/items/sitrus_berry.png b/public/images/items/sitrus_berry.png new file mode 100644 index 00000000000..8e9463a80c2 Binary files /dev/null and b/public/images/items/sitrus_berry.png differ diff --git a/src/arena.ts b/src/arena.ts index c4d298d7d88..291c94afbab 100644 --- a/src/arena.ts +++ b/src/arena.ts @@ -1,14 +1,14 @@ import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import BattleScene from "./battle-scene"; -import { Biome, BiomePoolTier, BiomeTierPools, biomePools } from "./biome"; +import { Biome, BiomePoolTier, BiomeTierPools, biomePools } from "./data/biome"; import * as Utils from "./utils"; -import PokemonSpecies, { getPokemonSpecies } from "./pokemon-species"; -import { Species } from "./species"; -import { Weather, WeatherType, getWeatherClearMessage, getWeatherStartMessage } from "./weather"; +import PokemonSpecies, { getPokemonSpecies } from "./data/pokemon-species"; +import { Species } from "./data/species"; +import { Weather, WeatherType, getWeatherClearMessage, getWeatherStartMessage } from "./data/weather"; import { CommonAnimPhase, MessagePhase } from "./battle-phases"; -import { CommonAnim } from "./battle-anims"; -import { Type } from "./type"; -import Move from "./move"; +import { CommonAnim } from "./data/battle-anims"; +import { Type } from "./data/type"; +import Move from "./data/move"; export class Arena { private scene: BattleScene; diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 10c7bb5c901..5a25eb275c0 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1,28 +1,29 @@ import BattleScene, { startingLevel, startingWave } from "./battle-scene"; import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult } from "./pokemon"; import * as Utils from './utils'; -import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, ConditionalMoveAttr, HitsTagAttr, MissEffectAttr, MoveCategory, MoveEffectAttr, MoveFlags, MoveHitEffectAttr, Moves, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr } from "./move"; +import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, ConditionalMoveAttr, HitsTagAttr, MissEffectAttr, MoveCategory, MoveEffectAttr, MoveFlags, MoveHitEffectAttr, Moves, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr } from "./data/move"; import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; -import { Stat } from "./pokemon-stat"; -import { ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, HitHealModifier, PokemonExpBoosterModifier, TempBattleStatBoosterModifier } from "./modifier"; +import { Stat } from "./data/pokemon-stat"; +import { BerryModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, HealingBoosterModifier, HitHealModifier, PokemonExpBoosterModifier, TempBattleStatBoosterModifier } from "./modifier/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"; -import { StatusEffect, getStatusEffectActivationText, getStatusEffectCatchRateMultiplier, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText } from "./status-effect"; +import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball"; +import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims"; +import { StatusEffect, getStatusEffectActivationText, getStatusEffectCatchRateMultiplier, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText } from "./data/status-effect"; import { SummaryUiMode } from "./ui/summary-ui-handler"; import EvolutionSceneHandler from "./ui/evolution-scene-handler"; import { EvolutionPhase } from "./evolution-phase"; import { BattlePhase } from "./battle-phase"; -import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "./battle-stat"; -import { Biome, biomeLinks } from "./biome"; -import { ModifierTypeOption, PokemonModifierType, PokemonMoveModifierType, TempBattleStat, getModifierTypeOptionsForWave, regenerateModifierPoolThresholds } from "./modifier-type"; +import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "./data/battle-stat"; +import { Biome, biomeLinks } from "./data/biome"; +import { ModifierTypeOption, PokemonModifierType, PokemonMoveModifierType, getModifierTypeOptionsForWave, regenerateModifierPoolThresholds } from "./modifier/modifier-type"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; -import { BattleTagLapseType, BattleTagType, HideSpriteTag as HiddenTag } from "./battle-tag"; +import { BattleTagLapseType, BattleTagType, HideSpriteTag as HiddenTag } from "./data/battle-tag"; import { getPokemonMessage } from "./messages"; import { Starter } from "./ui/starter-select-ui-handler"; -import { Gender } from "./gender"; -import { Weather, WeatherType, getRandomWeatherType, getWeatherDamageMessage, getWeatherLapseMessage } from "./weather"; +import { Gender } from "./data/gender"; +import { Weather, WeatherType, getRandomWeatherType, getWeatherDamageMessage, getWeatherLapseMessage } from "./data/weather"; +import { TempBattleStat } from "./data/temp-battle-stat"; export class SelectStarterPhase extends BattlePhase { constructor(scene: BattleScene) { @@ -593,6 +594,10 @@ export class TurnEndPhase extends BattlePhase { this.scene.pushPhase(new MessagePhase(this.scene, `${dm.getName()} is disabled\nno more!`)); } + const hasUsableBerry = pokemon.isPlayer() && !!this.scene.findModifier(m => m instanceof BerryModifier && m.shouldApply([ pokemon ])); + if (hasUsableBerry) + this.scene.pushPhase(new BerryPhase(this.scene, pokemon.isPlayer())); + pokemon.battleSummonData.turnCount++; }; @@ -670,7 +675,7 @@ export class CommonAnimPhase extends PokemonPhase { } start() { - new CommonBattleAnim(this.anim, this.getPokemon()).play(this.scene, () => { + new CommonBattleAnim(this.anim, this.getPokemon(), this.getPokemon().isPlayer() ? this.scene.getEnemyPokemon() : this.scene.getPlayerPokemon()).play(this.scene, () => { this.end(); }); } @@ -775,7 +780,7 @@ export abstract class MovePhase extends BattlePhase { this.scene.unshiftPhase(new MessagePhase(this.scene, getPokemonMessage(this.pokemon, getStatusEffectHealText(this.pokemon.status.effect)))); this.pokemon.resetStatus(); - this.pokemon.updateInfo(true); + this.pokemon.updateInfo(); } doMove(); } @@ -1536,6 +1541,32 @@ export class LearnMovePhase extends PartyMemberPokemonPhase { } } +export class BerryPhase extends CommonAnimPhase { + constructor(scene: BattleScene, player: boolean) { + super(scene, player, CommonAnim.USE_ITEM); + } + + start() { + let berryModifier: BerryModifier; + + if (this.player) { + if ((berryModifier = this.scene.applyModifier(BerryModifier, this.getPokemon()) as BerryModifier)) { + if (berryModifier.consumed) { + if (!--berryModifier.stackCount) + this.scene.removeModifier(berryModifier); + else + berryModifier.consumed = false; + this.scene.updateModifiers(); + } + super.start(); + return; + } + } + + this.end(); + } +} + export class PokemonHealPhase extends CommonAnimPhase { private hpHealed: integer; private message: string; @@ -1564,7 +1595,10 @@ export class PokemonHealPhase extends CommonAnimPhase { const fullHp = pokemon.getHpRatio() >= 1; if (!fullHp) { - pokemon.hp = Math.min(pokemon.hp + this.hpHealed, pokemon.getMaxHp()); + const hpRestoreMultiplier = new Utils.IntegerHolder(1); + if (this.player) + this.scene.applyModifiers(HealingBoosterModifier, hpRestoreMultiplier); + pokemon.hp = Math.min(pokemon.hp + this.hpHealed * hpRestoreMultiplier.value, pokemon.getMaxHp()); pokemon.updateInfo().then(() => super.end()); } else if (this.showFullHpMessage) this.message = getPokemonMessage(pokemon, `'s\nHP is full!`); diff --git a/src/battle-scene.ts b/src/battle-scene.ts index ec5fb73aa83..4f425020f8e 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1,24 +1,24 @@ import Phaser from 'phaser'; -import { Biome } from './biome'; +import { Biome } from './data/biome'; import UI from './ui/ui'; import { EncounterPhase, SummonPhase, CommandPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, SelectStarterPhase, MessagePhase } from './battle-phases'; import { PlayerPokemon, EnemyPokemon } from './pokemon'; -import PokemonSpecies, { allSpecies, getPokemonSpecies } from './pokemon-species'; +import PokemonSpecies, { allSpecies, getPokemonSpecies } from './data/pokemon-species'; import * as Utils from './utils'; -import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PartyShareModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ConsumablePokemonMoveModifier, ModifierPredicate } from './modifier'; -import { PokeballType } from './pokeball'; -import { Species } from './species'; -import { initAutoPlay } from './auto-play'; +import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PartyShareModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ConsumablePokemonMoveModifier, ModifierPredicate } from './modifier/modifier'; +import { PokeballType } from './data/pokeball'; +import { Species } from './data/species'; +import { initAutoPlay } from './system/auto-play'; import { Battle } from './battle'; -import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets, populateAnims } from './battle-anims'; +import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets, populateAnims } from './data/battle-anims'; import { BattlePhase } from './battle-phase'; -import { initGameSpeed } from './game-speed'; +import { initGameSpeed } from './system/game-speed'; import { Arena } from './arena'; -import { GameData } from './game-data'; +import { GameData } from './system/game-data'; import StarterSelectUiHandler from './ui/starter-select-ui-handler'; -import { TextStyle, addTextObject } from './text'; -import { Moves } from './move'; -import { getDefaultModifierTypeForTier } from './modifier-type'; +import { TextStyle, addTextObject } from './ui/text'; +import { Moves } from './data/move'; +import { getDefaultModifierTypeForTier } from './modifier/modifier-type'; const enableAuto = true; export const startingLevel = 5; @@ -598,7 +598,7 @@ export default class BattleScene extends Phaser.Scene { if ((modifier as PersistentModifier).add(this.modifiers, !!virtual)) { if (!virtual && !this.sound.get(soundName)) this.sound.play(soundName); - } if (!virtual) { + } else if (!virtual) { const defaultModifierType = getDefaultModifierTypeForTier(modifier.type.tier); this.addModifier(defaultModifierType.newModifier()).then(() => resolve()); this.unshiftPhase(new MessagePhase(this, `The stack for this item is full.\n You will receive ${defaultModifierType.name} instead.`, null, true)); @@ -617,9 +617,12 @@ export default class BattleScene extends Phaser.Scene { const args: any[] = [ pokemon ]; if (modifier instanceof PokemonHpRestoreModifier) { - const hpRestoreMultiplier = new Utils.IntegerHolder(1); - this.applyModifiers(HealingBoosterModifier, hpRestoreMultiplier); - args.push(hpRestoreMultiplier.value); + if (!(modifier as PokemonHpRestoreModifier).fainted) { + const hpRestoreMultiplier = new Utils.IntegerHolder(1); + this.applyModifiers(HealingBoosterModifier, hpRestoreMultiplier); + args.push(hpRestoreMultiplier.value); + } else + args.push(1); } if (modifier.shouldApply(args)) @@ -704,4 +707,16 @@ export default class BattleScene extends Phaser.Scene { console.log('Applied', modifier.type.name); } } + + applyModifier(modifierType: { new(...args: any[]): Modifier }, ...args: any[]): PersistentModifier { + const modifiers = this.modifiers.filter(m => m instanceof modifierType && m.shouldApply(args)); + for (let modifier of modifiers) { + if (modifier.apply(args)) { + console.log('Applied', modifier.type.name); + return modifier; + } + } + + return null; + } } \ No newline at end of file diff --git a/src/abilities.ts b/src/data/ability.ts similarity index 100% rename from src/abilities.ts rename to src/data/ability.ts diff --git a/src/battle-anims.ts b/src/data/battle-anims.ts similarity index 94% rename from src/battle-anims.ts rename to src/data/battle-anims.ts index b5c86753e9a..a4b6aa21311 100644 --- a/src/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -1,8 +1,8 @@ //import { battleAnimRawData } from "./battle-anim-raw-data"; -import BattleScene from "./battle-scene"; +import BattleScene from "../battle-scene"; import { ChargeAttr, Moves, allMoves } from "./move"; -import Pokemon from "./pokemon"; -import * as Utils from "./utils"; +import Pokemon from "../pokemon"; +import * as Utils from "../utils"; //import fs from 'vite-plugin-fs/browser'; export enum AnimFrameTarget { @@ -41,8 +41,9 @@ export enum ChargeAnim { } export enum CommonAnim { - HEALTH_UP = 2000, - POISON, + USE_ITEM = 2000, + HEALTH_UP, + POISON = 2010, TOXIC, PARALYSIS, SLEEP, @@ -79,7 +80,7 @@ export enum CommonAnim { PSYCHIC_TERRAIN } -export class Anim { +export class AnimConfig { public id: integer; public graphic: string; public frames: AnimFrame[][]; @@ -226,7 +227,7 @@ class AnimTimedSoundEvent extends AnimTimedEvent { public pitch: number; constructor(frameIndex: integer, resourceName: string, source?: any) { - super(frameIndex, resourceName + (resourceName && resourceName.indexOf('.') === -1 ? '.ogg' : '')); + super(frameIndex, resourceName + (resourceName && resourceName.indexOf('.') === -1 ? resourceName.startsWith('PRSFX-') ? '.wav' : '.ogg' : '')); if (source) { this.volume = source.volume; @@ -349,9 +350,9 @@ class AnimTimedAddBgEvent extends AnimTimedBgEvent { } } -export const moveAnims = new Map(); -export const chargeAnims = new Map(); -export const commonAnims = new Map(); +export const moveAnims = new Map(); +export const chargeAnims = new Map(); +export const commonAnims = new Map(); export function initCommonAnims(): Promise { return new Promise(resolve => { @@ -362,7 +363,7 @@ export function initCommonAnims(): Promise { const commonAnimId = commonAnimIds[ca]; commonAnimFetches.push(fetch(`./battle-anims/common-${commonAnimNames[ca].toLowerCase().replace(/\_/g, '-')}.json`) .then(response => response.json()) - .then(cas => commonAnims.set(commonAnimId, new Anim(cas)))); + .then(cas => commonAnims.set(commonAnimId, new AnimConfig(cas)))); } Promise.allSettled(commonAnimFetches).then(() => resolve()); }); @@ -430,22 +431,22 @@ export function initMoveChargeAnim(chargeAnim: ChargeAnim): Promise { }); } -function populateMoveAnim(move: Moves, animSource: any) { - const moveAnim = new Anim(animSource); +function populateMoveAnim(move: Moves, animSource: any): void { + const moveAnim = new AnimConfig(animSource); if (moveAnims.get(move) === null) { moveAnims.set(move, moveAnim); return; } - moveAnims.set(move, [ moveAnims.get(move) as Anim, moveAnim ]); + moveAnims.set(move, [ moveAnims.get(move) as AnimConfig, moveAnim ]); } function populateMoveChargeAnim(chargeAnim: ChargeAnim, animSource: any) { - const moveChargeAnim = new Anim(animSource); + const moveChargeAnim = new AnimConfig(animSource); if (chargeAnims.get(chargeAnim) === null) { chargeAnims.set(chargeAnim, moveChargeAnim); return; } - chargeAnims.set(chargeAnim, [ chargeAnims.get(chargeAnim) as Anim, moveChargeAnim ]); + chargeAnims.set(chargeAnim, [ chargeAnims.get(chargeAnim) as AnimConfig, moveChargeAnim ]); } export function loadCommonAnimAssets(scene: BattleScene, startLoad?: boolean): Promise { @@ -456,12 +457,12 @@ export function loadCommonAnimAssets(scene: BattleScene, startLoad?: boolean): P export function loadMoveAnimAssets(scene: BattleScene, moveIds: Moves[], startLoad?: boolean): Promise { return new Promise(resolve => { - const moveAnimations = moveIds.map(m => moveAnims.get(m)).flat(); + const moveAnimations = moveIds.map(m => moveAnims.get(m) as AnimConfig).flat(); for (let moveId of moveIds) { const chargeAttr = allMoves[moveId - 1].getAttrs(ChargeAttr) as ChargeAttr[]; if (chargeAttr.length) { const moveChargeAnims = chargeAnims.get(chargeAttr[0].chargeAnim); - moveAnimations.push(moveChargeAnims instanceof Anim ? moveChargeAnims : moveChargeAnims[0]); + moveAnimations.push(moveChargeAnims instanceof AnimConfig ? moveChargeAnims : moveChargeAnims[0]); if (Array.isArray(moveChargeAnims)) moveAnimations.push(moveChargeAnims[1]); } @@ -470,7 +471,7 @@ export function loadMoveAnimAssets(scene: BattleScene, moveIds: Moves[], startLo }); } -function loadAnimAssets(scene: BattleScene, anims: Anim[], startLoad?: boolean): Promise { +function loadAnimAssets(scene: BattleScene, anims: AnimConfig[], startLoad?: boolean): Promise { return new Promise(resolve => { const backgrounds = new Set(); const sounds = new Set(); @@ -515,7 +516,7 @@ export abstract class BattleAnim { this.sprites = []; } - abstract getAnim(): Anim; + abstract getAnim(): AnimConfig; abstract isOppAnim(): boolean; @@ -738,7 +739,7 @@ export class CommonBattleAnim extends BattleAnim { this.commonAnim = commonAnim; } - getAnim(): Anim { + getAnim(): AnimConfig { return commonAnims.get(this.commonAnim); } @@ -760,10 +761,10 @@ export class MoveAnim extends BattleAnim { this.move = move; } - getAnim(): Anim { - return moveAnims.get(this.move) instanceof Anim - ? moveAnims.get(this.move) as Anim - : moveAnims.get(this.move)[this.user.isPlayer() ? 0 : 1] as Anim; + getAnim(): AnimConfig { + return moveAnims.get(this.move) instanceof AnimConfig + ? moveAnims.get(this.move) as AnimConfig + : moveAnims.get(this.move)[this.user.isPlayer() ? 0 : 1] as AnimConfig; } isOppAnim(): boolean { @@ -800,10 +801,10 @@ export class MoveChargeAnim extends MoveAnim { this.chargeAnim = chargeAnim; } - getAnim(): Anim { - return chargeAnims.get(this.chargeAnim) instanceof Anim - ? chargeAnims.get(this.chargeAnim) as Anim - : chargeAnims.get(this.chargeAnim)[this.user.isPlayer() ? 0 : 1] as Anim; + getAnim(): AnimConfig { + return chargeAnims.get(this.chargeAnim) instanceof AnimConfig + ? chargeAnims.get(this.chargeAnim) as AnimConfig + : chargeAnims.get(this.chargeAnim)[this.user.isPlayer() ? 0 : 1] as AnimConfig; } } @@ -840,14 +841,15 @@ export function populateAnims() { const animName = fields[1].slice(nameIndex, fields[1].indexOf('\n', nameIndex)); if (!moveNameToId.hasOwnProperty(animName) && !commonAnimId && !chargeAnimId) continue; - let anim = new Anim(); - anim.id = commonAnimId || chargeAnimId || moveNameToId[animName]; + let anim = commonAnimId || chargeAnimId ? new AnimConfig() : new AnimConfig(); + if (anim instanceof AnimConfig) + (anim as AnimConfig).id = moveNameToId[animName]; if (commonAnimId) commonAnims.set(commonAnimId, anim); else if (chargeAnimId) - chargeAnims.set(chargeAnimId, !isOppMove ? anim : [ chargeAnims.get(chargeAnimId) as Anim, anim ]); + chargeAnims.set(chargeAnimId, !isOppMove ? anim : [ chargeAnims.get(chargeAnimId) as AnimConfig, anim ]); else - moveAnims.set(moveNameToId[animName], !isOppMove ? anim : [ moveAnims.get(moveNameToId[animName]) as Anim, anim ]); + moveAnims.set(moveNameToId[animName], !isOppMove ? anim as AnimConfig : [ moveAnims.get(moveNameToId[animName]) as AnimConfig, anim as AnimConfig ]); for (let f = 0; f < fields.length; f++) { const field = fields[f]; const fieldName = field.slice(0, field.indexOf(':')); @@ -940,6 +942,8 @@ export function populateAnims() { } const animReplacer = (k, v) => { + if (k === 'id' && !v) + return undefined; if (v instanceof Map) return Object.fromEntries(v); if (v instanceof AnimTimedEvent) @@ -950,21 +954,21 @@ export function populateAnims() { /*for (let ma of moveAnims.keys()) { const data = moveAnims.get(ma); (async () => { - await fs.writeFile(`./public/battle-anims/${Moves[ma].toLowerCase().replace(/\_/g, '-')}.json`, JSON.stringify(data, animReplacer, ' ')); + await fs.writeFile(`../public/battle-anims/${Moves[ma].toLowerCase().replace(/\_/g, '-')}.json`, JSON.stringify(data, animReplacer, ' ')); })(); } for (let ca of chargeAnims.keys()) { const data = chargeAnims.get(ca); (async () => { - await fs.writeFile(`./public/battle-anims/${chargeAnimNames[chargeAnimIds.indexOf(ca)].replace(/\_/g, '-')}.json`, JSON.stringify(data, animReplacer, ' ')); + await fs.writeFile(`../public/battle-anims/${chargeAnimNames[chargeAnimIds.indexOf(ca)].replace(/\_/g, '-')}.json`, JSON.stringify(data, animReplacer, ' ')); })(); } for (let cma of commonAnims.keys()) { const data = commonAnims.get(cma); (async () => { - await fs.writeFile(`./public/battle-anims/common-${commonAnimNames[commonAnimIds.indexOf(cma)].replace(/\_/g, '-')}.json`, JSON.stringify(data, animReplacer, ' ')); + await fs.writeFile(`../public/battle-anims/common-${commonAnimNames[commonAnimIds.indexOf(cma)].replace(/\_/g, '-')}.json`, JSON.stringify(data, animReplacer, ' ')); })(); }*/ } \ No newline at end of file diff --git a/src/battle-stat.ts b/src/data/battle-stat.ts similarity index 100% rename from src/battle-stat.ts rename to src/data/battle-stat.ts diff --git a/src/battle-tag.ts b/src/data/battle-tag.ts similarity index 97% rename from src/battle-tag.ts rename to src/data/battle-tag.ts index e64e9135e4d..10259c07ee5 100644 --- a/src/battle-tag.ts +++ b/src/data/battle-tag.ts @@ -1,10 +1,10 @@ import { CommonAnim, CommonBattleAnim } from "./battle-anims"; -import { CommonAnimPhase, DamagePhase, MessagePhase, MovePhase, ObtainStatusEffectPhase, PokemonHealPhase } from "./battle-phases"; -import { getPokemonMessage } from "./messages"; -import Pokemon from "./pokemon"; +import { CommonAnimPhase, DamagePhase, MessagePhase, MovePhase, ObtainStatusEffectPhase, PokemonHealPhase } from "../battle-phases"; +import { getPokemonMessage } from "../messages"; +import Pokemon from "../pokemon"; import { Stat } from "./pokemon-stat"; import { StatusEffect } from "./status-effect"; -import * as Utils from "./utils"; +import * as Utils from "../utils"; export enum BattleTagType { NONE, @@ -101,7 +101,7 @@ export class ConfusedTag extends PseudoStatusTag { } lapse(pokemon: Pokemon, lapseType: BattleTagLapseType): boolean { - const ret = super.lapse(pokemon, lapseType); + const ret = lapseType !== BattleTagLapseType.CUSTOM && super.lapse(pokemon, lapseType); if (ret) { pokemon.scene.unshiftPhase(new MessagePhase(pokemon.scene, getPokemonMessage(pokemon, ' is\nconfused!'))); diff --git a/src/data/berry.ts b/src/data/berry.ts new file mode 100644 index 00000000000..c4408ff64c0 --- /dev/null +++ b/src/data/berry.ts @@ -0,0 +1,60 @@ +import { MessagePhase, PokemonHealPhase } from "../battle-phases"; +import { getPokemonMessage } from "../messages"; +import Pokemon from "../pokemon"; +import { BattleTagType } from "./battle-tag"; +import { getStatusEffectHealText } from "./status-effect"; + +export enum BerryType { + SITRUS, + LUM +} + +export function getBerryName(berryType: BerryType) { + switch (berryType) { + case BerryType.SITRUS: + return 'SITRUS BERRY'; + case BerryType.LUM: + return 'LUM BERRY'; + } +} + +export function getBerryEffectDescription(berryType: BerryType) { + switch (berryType) { + case BerryType.SITRUS: + return 'Restores 25% HP if HP is below 50%'; + case BerryType.LUM: + return 'Cures any non-volatile status condition and confusion'; + } +} + +export type BerryPredicate = (pokemon: Pokemon) => boolean; + +export function getBerryPredicate(berryType: BerryType): BerryPredicate { + switch (berryType) { + case BerryType.SITRUS: + return (pokemon: Pokemon) => pokemon.getHpRatio() < 0.5; + case BerryType.LUM: + return (pokemon: Pokemon) => !!pokemon.status || !!pokemon.getTag(BattleTagType.CONFUSED); + } +} + +export type BerryEffectFunc = (pokemon: Pokemon) => void; + +export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { + switch (berryType) { + case BerryType.SITRUS: + return (pokemon: Pokemon) => { + pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, true, Math.floor(pokemon.getMaxHp() / 4), getPokemonMessage(pokemon, `'s ${getBerryName(berryType)}\nrestored its HP!`), true)); + }; + case BerryType.LUM: + return (pokemon: Pokemon) => { + if (pokemon.status) { + pokemon.scene.unshiftPhase(new MessagePhase(pokemon.scene, + getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status.effect)))); + pokemon.resetStatus(); + pokemon.updateInfo(); + } else if (pokemon.getTag(BattleTagType.CONFUSED)) + pokemon.lapseTag(BattleTagType.CONFUSED); + }; + } +} \ No newline at end of file diff --git a/src/biome.ts b/src/data/biome.ts similarity index 99% rename from src/biome.ts rename to src/data/biome.ts index adcff1299b0..8ffaedb7dc2 100644 --- a/src/biome.ts +++ b/src/data/biome.ts @@ -1,7 +1,7 @@ import { pokemonEvolutions, SpeciesEvolution } from "./pokemon-evolutions"; import { Species } from "./species"; import { Type } from './type'; -import * as Utils from './utils'; +import * as Utils from '../utils'; import beautify from 'json-beautify'; diff --git a/src/exp.ts b/src/data/exp.ts similarity index 100% rename from src/exp.ts rename to src/data/exp.ts diff --git a/src/gender.ts b/src/data/gender.ts similarity index 100% rename from src/gender.ts rename to src/data/gender.ts diff --git a/src/move.ts b/src/data/move.ts similarity index 99% rename from src/move.ts rename to src/data/move.ts index 26e750b6e7a..e90864f6743 100644 --- a/src/move.ts +++ b/src/data/move.ts @@ -1,12 +1,12 @@ import { ChargeAnim, MoveChargeAnim, initMoveAnim, loadMoveAnimAssets } from "./battle-anims"; -import { DamagePhase, EnemyMovePhase, MessagePhase, ObtainStatusEffectPhase, PlayerMovePhase, PokemonHealPhase, StatChangePhase } from "./battle-phases"; +import { DamagePhase, EnemyMovePhase, MessagePhase, ObtainStatusEffectPhase, PlayerMovePhase, PokemonHealPhase, StatChangePhase } from "../battle-phases"; import { BattleStat } from "./battle-stat"; import { BattleTagType } from "./battle-tag"; -import { getPokemonMessage } from "./messages"; -import Pokemon, { EnemyPokemon, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "./pokemon"; +import { getPokemonMessage } from "../messages"; +import Pokemon, { EnemyPokemon, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../pokemon"; import { StatusEffect, getStatusEffectDescriptor } from "./status-effect"; import { Type } from "./type"; -import * as Utils from "./utils"; +import * as Utils from "../utils"; import { WeatherType } from "./weather"; export enum MoveCategory { diff --git a/src/pokeball.ts b/src/data/pokeball.ts similarity index 96% rename from src/pokeball.ts rename to src/data/pokeball.ts index 290525acc0f..e4551f6dc11 100644 --- a/src/pokeball.ts +++ b/src/data/pokeball.ts @@ -1,5 +1,5 @@ -import BattleScene from "./battle-scene"; -import { toPokemonUpperCase } from "./utils"; +import BattleScene from "../battle-scene"; +import { toPokemonUpperCase } from "../utils"; export enum PokeballType { POKEBALL, diff --git a/src/pokemon-evolutions.ts b/src/data/pokemon-evolutions.ts similarity index 99% rename from src/pokemon-evolutions.ts rename to src/data/pokemon-evolutions.ts index f4f1e085a25..816ca7ed82a 100644 --- a/src/pokemon-evolutions.ts +++ b/src/data/pokemon-evolutions.ts @@ -1,13 +1,13 @@ import { Gender } from "./gender"; -import { AttackTypeBoosterModifier } from "./modifier"; -import { AttackTypeBoosterModifierType } from "./modifier-type"; +import { AttackTypeBoosterModifier } from "../modifier/modifier"; +import { AttackTypeBoosterModifierType } from "../modifier/modifier-type"; import { Moves } from "./move"; import { PokeballType } from "./pokeball"; -import Pokemon from "./pokemon"; +import Pokemon from "../pokemon"; import { Stat } from "./pokemon-stat"; import { Species } from "./species"; import { Type } from "./type"; -import * as Utils from "./utils"; +import * as Utils from "../utils"; export enum SpeciesWildEvolutionDelay { NONE, diff --git a/src/pokemon-level-moves.ts b/src/data/pokemon-level-moves.ts similarity index 100% rename from src/pokemon-level-moves.ts rename to src/data/pokemon-level-moves.ts diff --git a/src/pokemon-species.ts b/src/data/pokemon-species.ts similarity index 99% rename from src/pokemon-species.ts rename to src/data/pokemon-species.ts index 4a93ea3af7b..5bd93b7998d 100644 --- a/src/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -1,11 +1,10 @@ -import { Abilities } from './abilities'; -import BattleScene from './battle-scene'; +import { Abilities } from './ability'; +import BattleScene from '../battle-scene'; import { GrowthRate } from './exp'; -import { EnemyPokemon } from './pokemon'; import { pokemonEvolutions } from './pokemon-evolutions'; import { Species } from './species'; import { Type } from './type'; -import * as Utils from './utils'; +import * as Utils from '../utils'; export function getPokemonSpecies(species: Species): PokemonSpecies { if (species >= Species.XERNEAS) diff --git a/src/pokemon-stat.ts b/src/data/pokemon-stat.ts similarity index 91% rename from src/pokemon-stat.ts rename to src/data/pokemon-stat.ts index 8f74fb44439..31f5bab3ebc 100644 --- a/src/pokemon-stat.ts +++ b/src/data/pokemon-stat.ts @@ -1,4 +1,4 @@ -import { toPokemonUpperCase } from "./utils"; +import { toPokemonUpperCase } from "../utils"; export enum Stat { HP = 0, diff --git a/src/species.ts b/src/data/species.ts similarity index 100% rename from src/species.ts rename to src/data/species.ts diff --git a/src/status-effect.ts b/src/data/status-effect.ts similarity index 98% rename from src/status-effect.ts rename to src/data/status-effect.ts index c8f3636bd7b..d8d4636bccb 100644 --- a/src/status-effect.ts +++ b/src/data/status-effect.ts @@ -1,4 +1,4 @@ -import * as Utils from "./utils"; +import * as Utils from "../utils"; export enum StatusEffect { NONE, diff --git a/src/data/temp-battle-stat.ts b/src/data/temp-battle-stat.ts new file mode 100644 index 00000000000..72dff92fe52 --- /dev/null +++ b/src/data/temp-battle-stat.ts @@ -0,0 +1,36 @@ +import { BattleStat, getBattleStatName } from "./battle-stat"; + +export enum TempBattleStat { + ATK, + DEF, + SPATK, + SPDEF, + SPD, + ACC, + CRIT +} + +export function getTempBattleStatName(tempBattleStat: TempBattleStat) { + if (tempBattleStat === TempBattleStat.CRIT) + return 'critical-hit ratio'; + return getBattleStatName(tempBattleStat as integer as BattleStat); +} + +export function getTempBattleStatBoosterItemName(tempBattleStat: TempBattleStat) { + switch (tempBattleStat) { + case TempBattleStat.ATK: + return 'X Attack'; + case TempBattleStat.DEF: + return 'X Defense'; + case TempBattleStat.SPATK: + return 'X Sp. Atk'; + case TempBattleStat.SPDEF: + return 'X Sp. Def'; + case TempBattleStat.SPD: + return 'X Speed'; + case TempBattleStat.ACC: + return 'X Accuracy'; + case TempBattleStat.CRIT: + return 'Dire Hit'; + } +} \ No newline at end of file diff --git a/src/tms.ts b/src/data/tms.ts similarity index 100% rename from src/tms.ts rename to src/data/tms.ts diff --git a/src/type.ts b/src/data/type.ts similarity index 100% rename from src/type.ts rename to src/data/type.ts diff --git a/src/weather.ts b/src/data/weather.ts similarity index 98% rename from src/weather.ts rename to src/data/weather.ts index a0b4ab3eaa3..cd311e9721f 100644 --- a/src/weather.ts +++ b/src/data/weather.ts @@ -1,9 +1,9 @@ import { Biome } from "./biome"; -import { getPokemonMessage } from "./messages"; -import Pokemon from "./pokemon"; +import { getPokemonMessage } from "../messages"; +import Pokemon from "../pokemon"; import { Type } from "./type"; import Move, { AttackMove } from "./move"; -import * as Utils from "./utils"; +import * as Utils from "../utils"; export enum WeatherType { NONE, diff --git a/src/evolution-phase.ts b/src/evolution-phase.ts index 9b072f14777..85fa858941e 100644 --- a/src/evolution-phase.ts +++ b/src/evolution-phase.ts @@ -1,7 +1,7 @@ import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import { BattlePhase } from "./battle-phase"; import BattleScene from "./battle-scene"; -import { SpeciesEvolution } from "./pokemon-evolutions"; +import { SpeciesEvolution } from "./data/pokemon-evolutions"; import EvolutionSceneHandler from "./ui/evolution-scene-handler"; import * as Utils from "./utils"; import { Mode } from "./ui/ui"; diff --git a/src/modifier-type.ts b/src/modifier/modifier-type.ts similarity index 91% rename from src/modifier-type.ts rename to src/modifier/modifier-type.ts index f94dce062d6..038c6f1db4b 100644 --- a/src/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1,14 +1,16 @@ -import { BattleStat, getBattleStatName } from './battle-stat'; +import { BattleStat, getBattleStatName } from '../data/battle-stat'; import * as Modifiers from './modifier'; -import { AttackMove, Moves, allMoves } from './move'; -import { PokeballType, getPokeballName } from './pokeball'; -import { PlayerPokemon, PokemonMove } from './pokemon'; -import { EvolutionItem, pokemonEvolutions } from './pokemon-evolutions'; -import { Stat, getStatName } from './pokemon-stat'; -import { tmSpecies } from './tms'; -import { Type } from './type'; -import PartyUiHandler, { PokemonMoveSelectFilter, PokemonSelectFilter } from './ui/party-ui-handler'; -import * as Utils from './utils'; +import { AttackMove, Moves, allMoves } from '../data/move'; +import { PokeballType, getPokeballName } from '../data/pokeball'; +import { PlayerPokemon, PokemonMove } from '../pokemon'; +import { EvolutionItem, pokemonEvolutions } from '../data/pokemon-evolutions'; +import { Stat, getStatName } from '../data/pokemon-stat'; +import { tmSpecies } from '../data/tms'; +import { Type } from '../data/type'; +import PartyUiHandler, { PokemonMoveSelectFilter, PokemonSelectFilter } from '../ui/party-ui-handler'; +import * as Utils from '../utils'; +import { TempBattleStat, getTempBattleStatBoosterItemName, getTempBattleStatName } from '../data/temp-battle-stat'; +import { BerryType, getBerryEffectDescription, getBerryName } from '../data/berry'; type Modifier = Modifiers.Modifier; @@ -59,13 +61,19 @@ class AddPokeballModifierType extends ModifierType { export class PokemonModifierType extends ModifierType { public selectFilter: PokemonSelectFilter; - constructor(name: string, description: string, newModifierFunc: NewModifierFunc, selectFilter?: PokemonSelectFilter, iconImage?: string, group?: string) { - super(name, description, newModifierFunc, iconImage, group); + constructor(name: string, description: string, newModifierFunc: NewModifierFunc, selectFilter?: PokemonSelectFilter, iconImage?: string, group?: string, soundName?: string) { + super(name, description, newModifierFunc, iconImage, group, soundName); this.selectFilter = selectFilter; } } +export class PokemonHeldItemModifierType extends PokemonModifierType { + constructor(name: string, description: string, newModifierFunc: NewModifierFunc, selectFilter?: PokemonSelectFilter, iconImage?: string, group?: string, soundName?: string) { + super(name, description, newModifierFunc, selectFilter, iconImage, group, soundName); + } +} + export class PokemonHpRestoreModifierType extends PokemonModifierType { protected restorePoints: integer; protected percent: boolean; @@ -157,41 +165,6 @@ export class PokemonAllMovePpRestoreModifierType extends PokemonModifierType { } } -export enum TempBattleStat { - ATK, - DEF, - SPATK, - SPDEF, - SPD, - ACC, - CRIT -} - -function getTempBattleStatName(tempBattleStat: TempBattleStat) { - if (tempBattleStat === TempBattleStat.CRIT) - return 'critical-hit ratio'; - return getBattleStatName(tempBattleStat as integer as BattleStat); -} - -function getTempBattleStatBoosterItemName(tempBattleStat: TempBattleStat) { - switch (tempBattleStat) { - case TempBattleStat.ATK: - return 'X Attack'; - case TempBattleStat.DEF: - return 'X Defense'; - case TempBattleStat.SPATK: - return 'X Sp. Atk'; - case TempBattleStat.SPDEF: - return 'X Sp. Def'; - case TempBattleStat.SPD: - return 'X Speed'; - case TempBattleStat.ACC: - return 'X Accuracy'; - case TempBattleStat.CRIT: - return 'Dire Hit'; - } -} - export class TempBattleStatBoosterModifierType extends ModifierType { public tempBattleStat: TempBattleStat; @@ -246,7 +219,7 @@ function getAttackTypeBoosterItemName(type: Type) { } } -export class AttackTypeBoosterModifierType extends PokemonModifierType { +export class AttackTypeBoosterModifierType extends PokemonHeldItemModifierType { public moveType: Type; public boostPercent: integer; @@ -284,7 +257,7 @@ function getBaseStatBoosterItemName(stat: Stat) { } } -export class PokemonBaseStatBoosterModifierType extends PokemonModifierType { +export class PokemonBaseStatBoosterModifierType extends PokemonHeldItemModifierType { private stat: Stat; constructor(name: string, stat: Stat, _iconImage?: string) { @@ -312,7 +285,7 @@ export class ExpBoosterModifierType extends ModifierType { } } -export class PokemonExpBoosterModifierType extends PokemonModifierType { +export class PokemonExpBoosterModifierType extends PokemonHeldItemModifierType { 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), (_pokemon: PlayerPokemon) => null, iconImage); @@ -486,7 +459,14 @@ const modifierPool = { new WeightedModifierType(new ModifierTypeGenerator((party: PlayerPokemon[]) => { const randTempBattleStat = Utils.randInt(7) as TempBattleStat; return new TempBattleStatBoosterModifierType(randTempBattleStat); - }), 4) + }), 4), + new WeightedModifierType(new ModifierTypeGenerator((party: PlayerPokemon[]) => { + const berryTypes = Utils.getEnumValues(BerryType); + const randBerryType = berryTypes[Utils.randInt(berryTypes.length)]; + return new PokemonHeldItemModifierType(getBerryName(randBerryType), getBerryEffectDescription(randBerryType), + (type, args) => new Modifiers.BerryModifier(type, (args[0] as PlayerPokemon).id, randBerryType), + () => null, null, 'berry'); + }), 2) ].map(m => { m.setTier(ModifierTier.COMMON); return m; }), [ModifierTier.GREAT]: [ new WeightedModifierType(new AddPokeballModifierType(PokeballType.GREAT_BALL, 5, 'gb'), 12), @@ -524,6 +504,8 @@ const modifierPool = { new WeightedModifierType(new ModifierTypeGenerator((party: PlayerPokemon[]) => { const partyMemberCompatibleTms = party.map(p => p.compatibleTms); const uniqueCompatibleTms = partyMemberCompatibleTms.flat().filter((tm, i, array) => array.indexOf(tm) === i); + if (!uniqueCompatibleTms.length) + return null; const randTmIndex = Utils.randInt(uniqueCompatibleTms.length); return new TmModifierType(uniqueCompatibleTms[randTmIndex]); }), 4), @@ -535,14 +517,16 @@ const modifierPool = { ].map(m => { m.setTier(ModifierTier.GREAT); return m; }), [ModifierTier.ULTRA]: [ new WeightedModifierType(new AddPokeballModifierType(PokeballType.ULTRA_BALL, 5, 'ub'), 8), - new WeightedModifierType(new EvolutionItemModifierTypeGenerator(), 5), - new WeightedModifierType(new AttackTypeBoosterModifierTypeGenerator(), 3), + new WeightedModifierType(new EvolutionItemModifierTypeGenerator(), 12), + new WeightedModifierType(new AttackTypeBoosterModifierTypeGenerator(), 5), new ModifierType('OVAL CHARM', 'For every X (no. of party members) items in a POKéMON\'s held item stack, give one to each other party member', (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 PokemonHeldItemModifierType('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 PokemonExpBoosterModifierType('LUCKY EGG', 50), 3), + new WeightedModifierType(new ModifierType('BERRY POUCH', 'Adds a 25% chance that a used berry will not be consumed', + (type, _args) => new Modifiers.PreserveBerryModifier(type)), 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]: [ diff --git a/src/modifier.ts b/src/modifier/modifier.ts similarity index 87% rename from src/modifier.ts rename to src/modifier/modifier.ts index f12023c6312..61ec181e36f 100644 --- a/src/modifier.ts +++ b/src/modifier/modifier.ts @@ -1,16 +1,19 @@ import * as ModifierTypes from './modifier-type'; -import { LearnMovePhase, LevelUpPhase, PokemonHealPhase } from "./battle-phases"; -import BattleScene from "./battle-scene"; -import { getLevelTotalExp } from "./exp"; -import { PokeballType } from "./pokeball"; -import Pokemon, { PlayerPokemon } from "./pokemon"; -import { Stat } from "./pokemon-stat"; -import { addTextObject, TextStyle } from "./text"; -import { Type } from './type'; -import { EvolutionPhase } from './evolution-phase'; -import { pokemonEvolutions } from './pokemon-evolutions'; -import { getPokemonMessage } from './messages'; -import * as Utils from "./utils"; +import { CommonAnimPhase, LearnMovePhase, LevelUpPhase, PokemonHealPhase } from "../battle-phases"; +import BattleScene from "../battle-scene"; +import { getLevelTotalExp } from "../data/exp"; +import { PokeballType } from "../data/pokeball"; +import Pokemon, { PlayerPokemon } from "../pokemon"; +import { Stat } from "../data/pokemon-stat"; +import { addTextObject, TextStyle } from "../ui/text"; +import { Type } from '../data/type'; +import { EvolutionPhase } from '../evolution-phase'; +import { pokemonEvolutions } from '../data/pokemon-evolutions'; +import { getPokemonMessage } from '../messages'; +import * as Utils from "../utils"; +import { TempBattleStat } from '../data/temp-battle-stat'; +import { BerryType, getBerryEffectFunc, getBerryPredicate } from '../data/berry'; +import { CommonAnim } from '../data/battle-anims'; type ModifierType = ModifierTypes.ModifierType; export type ModifierPredicate = (modifier: Modifier) => boolean; @@ -185,10 +188,10 @@ export class AddPokeballModifier extends ConsumableModifier { } export class TempBattleStatBoosterModifier extends PersistentModifier { - private tempBattleStat: ModifierTypes.TempBattleStat; + private tempBattleStat: TempBattleStat; private battlesLeft: integer; - constructor(type: ModifierTypes.TempBattleStatBoosterModifierType, tempBattleStat: ModifierTypes.TempBattleStat) { + constructor(type: ModifierTypes.TempBattleStatBoosterModifierType, tempBattleStat: TempBattleStat) { super(type); this.tempBattleStat = tempBattleStat; @@ -200,7 +203,7 @@ export class TempBattleStatBoosterModifier extends PersistentModifier { } apply(args: any[]): boolean { - const tempBattleStat = args[0] as ModifierTypes.TempBattleStat; + const tempBattleStat = args[0] as TempBattleStat; if (tempBattleStat === this.tempBattleStat) { const statLevel = args[1] as Utils.IntegerHolder; @@ -353,15 +356,79 @@ export class HitHealModifier extends PokemonHeldItemModifier { if (pokemon.turnData.damageDealt && pokemon.getHpRatio() < 1) { const scene = pokemon.scene; - const hpRestoreMultiplier = new Utils.IntegerHolder(1); - scene.applyModifiers(HealingBoosterModifier, hpRestoreMultiplier); - scene.unshiftPhase(new PokemonHealPhase(scene, true, Math.max(Math.floor(pokemon.turnData.damageDealt / 8) * this.stackCount * hpRestoreMultiplier.value, 1), getPokemonMessage(pokemon, `'s ${this.type.name}\nrestored its HP a little!`), true)); + scene.unshiftPhase(new PokemonHealPhase(scene, true, Math.max(Math.floor(pokemon.turnData.damageDealt / 8) * this.stackCount, 1), getPokemonMessage(pokemon, `'s ${this.type.name}\nrestored its HP a little!`), true)); } return true; } } +export class BerryModifier extends PokemonHeldItemModifier { + public berryType: BerryType; + public consumed: boolean; + + constructor(type: ModifierType, pokemonId: integer, berryType: BerryType) { + super(type, pokemonId); + + this.berryType = berryType; + this.consumed = false; + } + + match(modifier: Modifier) { + return modifier instanceof BerryModifier && (modifier as BerryModifier).berryType === this.berryType; + } + + clone() { + return new BerryModifier(this.type, this.pokemonId, this.berryType); + } + + shouldApply(args: any[]): boolean { + return !this.consumed && super.shouldApply(args) && getBerryPredicate(this.berryType)(args[0] as Pokemon); + } + + apply(args: any[]): boolean { + const pokemon = args[0] as Pokemon; + + const preserve = new Utils.BooleanHolder(false); + pokemon.scene.applyModifiers(PreserveBerryModifier, preserve); + + getBerryEffectFunc(this.berryType)(pokemon); + if (!preserve.value) + this.consumed = true; + + return true; + } +} + +export class PreserveBerryModifier extends PersistentModifier { + constructor(type: ModifierType) { + super(type); + } + + match(modifier: Modifier) { + return modifier instanceof PreserveBerryModifier; + } + + clone() { + return new PreserveBerryModifier(this.type); + } + + shouldApply(args: any[]): boolean { + return super.shouldApply(args) && args[0] instanceof Utils.BooleanHolder; + } + + apply(args: any[]): boolean { + if (!(args[0] as Utils.BooleanHolder).value) + (args[0] as Utils.BooleanHolder).value = this.getStackCount() === this.getMaxStackCount() || Utils.randInt(this.getMaxStackCount()) < this.getStackCount(); + + return true; + } + + getMaxStackCount(): number { + return 4; + } +} + export abstract class ConsumablePokemonModifier extends ConsumableModifier { public pokemonId: integer; @@ -383,7 +450,7 @@ export abstract class ConsumablePokemonModifier extends ConsumableModifier { export class PokemonHpRestoreModifier extends ConsumablePokemonModifier { private restorePoints: integer; private percent: boolean; - private fainted: boolean; + public fainted: boolean; constructor(type: ModifierType, pokemonId: integer, restorePoints: integer, percent: boolean, fainted?: boolean) { super(type, pokemonId); diff --git a/src/pokemon.ts b/src/pokemon.ts index 9d19b02f157..13eefa6b7eb 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -1,26 +1,26 @@ import Phaser from 'phaser'; import BattleScene from './battle-scene'; -import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from './battle-info'; -import Move, { StatChangeAttr, HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariablePowerAttr, Moves, allMoves, MoveCategory } from "./move"; -import { pokemonLevelMoves } from './pokemon-level-moves'; -import { default as PokemonSpecies, PokemonSpeciesForm, getPokemonSpecies } from './pokemon-species'; +import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from './ui/battle-info'; +import Move, { StatChangeAttr, HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariablePowerAttr, Moves, allMoves, MoveCategory } from "./data/move"; +import { pokemonLevelMoves } from './data/pokemon-level-moves'; +import { default as PokemonSpecies, PokemonSpeciesForm, getPokemonSpecies } from './data/pokemon-species'; import * as Utils from './utils'; -import { Type, getTypeDamageMultiplier } from './type'; -import { getLevelTotalExp } from './exp'; -import { Stat } from './pokemon-stat'; -import { AttackTypeBoosterModifier, PokemonBaseStatModifier as PokemonBaseStatBoosterModifier, ShinyRateBoosterModifier, TempBattleStatBoosterModifier } from './modifier'; -import { PokeballType } from './pokeball'; -import { Gender } from './gender'; -import { initMoveAnim, loadMoveAnimAssets } from './battle-anims'; -import { Status, StatusEffect } from './status-effect'; -import { tmSpecies } from './tms'; -import { pokemonEvolutions, pokemonPrevolutions, SpeciesEvolution, SpeciesEvolutionCondition } from './pokemon-evolutions'; +import { Type, getTypeDamageMultiplier } from './data/type'; +import { getLevelTotalExp } from './data/exp'; +import { Stat } from './data/pokemon-stat'; +import { AttackTypeBoosterModifier, PokemonBaseStatModifier, ShinyRateBoosterModifier, TempBattleStatBoosterModifier } from './modifier/modifier'; +import { PokeballType } from './data/pokeball'; +import { Gender } from './data/gender'; +import { initMoveAnim, loadMoveAnimAssets } from './data/battle-anims'; +import { Status, StatusEffect } from './data/status-effect'; +import { tmSpecies } from './data/tms'; +import { pokemonEvolutions, pokemonPrevolutions, SpeciesEvolution, SpeciesEvolutionCondition } from './data/pokemon-evolutions'; import { DamagePhase, FaintPhase, MessagePhase } from './battle-phases'; -import { BattleStat } from './battle-stat'; -import { BattleTag, BattleTagLapseType, BattleTagType, getBattleTag } from './battle-tag'; -import { Species } from './species'; -import { WeatherType } from './weather'; -import { TempBattleStat } from './modifier-type'; +import { BattleStat } from './data/battle-stat'; +import { BattleTag, BattleTagLapseType, BattleTagType, getBattleTag } from './data/battle-tag'; +import { Species } from './data/species'; +import { WeatherType } from './data/weather'; +import { TempBattleStat } from './data/temp-battle-stat'; export default abstract class Pokemon extends Phaser.GameObjects.Container { public id: integer; @@ -280,7 +280,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (!this.stats) this.stats = [ 0, 0, 0, 0, 0, 0 ]; const baseStats = this.getSpeciesForm().baseStats.slice(0); - this.scene.applyModifiers(PokemonBaseStatBoosterModifier, this, baseStats); + this.scene.applyModifiers(PokemonBaseStatModifier, this, baseStats); const stats = Utils.getEnumValues(Stat); for (let s of stats) { const isHp = s === Stat.HP; diff --git a/src/auto-play.ts b/src/system/auto-play.ts similarity index 93% rename from src/auto-play.ts rename to src/system/auto-play.ts index 9ce777cc01d..b55bf0928ab 100644 --- a/src/auto-play.ts +++ b/src/system/auto-play.ts @@ -1,17 +1,17 @@ -import { SelectModifierPhase } from "./battle-phases"; -import BattleScene, { Button } from "./battle-scene"; -import { ModifierTier, ModifierType, ModifierTypeOption, PokemonBaseStatBoosterModifierType, PokemonHpRestoreModifierType, PokemonReviveModifierType } from "./modifier-type"; -import Pokemon, { AiType, EnemyPokemon, PlayerPokemon, PokemonMove } from "./pokemon"; -import { Species } from "./species"; -import { getTypeDamageMultiplier } from "./type"; -import BattleMessageUiHandler from "./ui/battle-message-ui-handler"; -import CommandUiHandler from "./ui/command-ui-handler"; -import FightUiHandler from "./ui/fight-ui-handler"; -import MessageUiHandler from "./ui/message-ui-handler"; -import ModifierSelectUiHandler from "./ui/modifier-select-ui-handler"; -import PartyUiHandler, { PartyUiMode } from "./ui/party-ui-handler"; -import ConfirmUiHandler from "./ui/confirm-ui-handler"; -import { Mode } from "./ui/ui"; +import { SelectModifierPhase } from "../battle-phases"; +import BattleScene, { Button } from "../battle-scene"; +import { ModifierTier, ModifierType, ModifierTypeOption, PokemonBaseStatBoosterModifierType, PokemonHpRestoreModifierType, PokemonReviveModifierType } from "../modifier/modifier-type"; +import Pokemon, { AiType, EnemyPokemon, PlayerPokemon, PokemonMove } from "../pokemon"; +import { Species } from "../data/species"; +import { getTypeDamageMultiplier } from "../data/type"; +import BattleMessageUiHandler from "../ui/battle-message-ui-handler"; +import CommandUiHandler from "../ui/command-ui-handler"; +import FightUiHandler from "../ui/fight-ui-handler"; +import MessageUiHandler from "../ui/message-ui-handler"; +import ModifierSelectUiHandler from "../ui/modifier-select-ui-handler"; +import PartyUiHandler, { PartyUiMode } from "../ui/party-ui-handler"; +import ConfirmUiHandler from "../ui/confirm-ui-handler"; +import { Mode } from "../ui/ui"; export function initAutoPlay() { const thisArg = this as BattleScene; diff --git a/src/game-data.ts b/src/system/game-data.ts similarity index 96% rename from src/game-data.ts rename to src/system/game-data.ts index 37b8aa9af46..e422ec38082 100644 --- a/src/game-data.ts +++ b/src/system/game-data.ts @@ -1,10 +1,10 @@ -import BattleScene from "./battle-scene"; -import { Gender } from "./gender"; -import Pokemon from "./pokemon"; -import { pokemonPrevolutions } from "./pokemon-evolutions"; -import PokemonSpecies, { allSpecies } from "./pokemon-species"; -import { Species } from "./species"; -import * as Utils from "./utils"; +import BattleScene from "../battle-scene"; +import { Gender } from "../data/gender"; +import Pokemon from "../pokemon"; +import { pokemonPrevolutions } from "../data/pokemon-evolutions"; +import PokemonSpecies, { allSpecies } from "../data/pokemon-species"; +import { Species } from "../data/species"; +import * as Utils from "../utils"; interface SaveData { trainerId: integer; diff --git a/src/game-speed.ts b/src/system/game-speed.ts similarity index 94% rename from src/game-speed.ts rename to src/system/game-speed.ts index 3ff8c159b91..eadfccc595d 100644 --- a/src/game-speed.ts +++ b/src/system/game-speed.ts @@ -1,5 +1,5 @@ -import BattleScene from "./battle-scene"; -import * as Utils from "./utils"; +import BattleScene from "../battle-scene"; +import * as Utils from "../utils"; export function initGameSpeed() { const thisArg = this as BattleScene; diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index 3919d53269b..fc50c2a6fca 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -1,7 +1,7 @@ import { CommandPhase } from "../battle-phases"; import BattleScene, { Button } from "../battle-scene"; -import { getPokeballName, PokeballType } from "../pokeball"; -import { addTextObject, TextStyle } from "../text"; +import { getPokeballName, PokeballType } from "../data/pokeball"; +import { addTextObject, TextStyle } from "./text"; import { Command } from "./command-ui-handler"; import { Mode } from "./ui"; import UiHandler from "./uiHandler"; diff --git a/src/battle-info.ts b/src/ui/battle-info.ts similarity index 97% rename from src/battle-info.ts rename to src/ui/battle-info.ts index 327ec8d5a64..febe3ca8a80 100644 --- a/src/battle-info.ts +++ b/src/ui/battle-info.ts @@ -1,10 +1,10 @@ -import { default as Pokemon } from './pokemon'; -import { getLevelTotalExp, getLevelRelExp } from './exp'; -import * as Utils from './utils'; +import { default as Pokemon } from '../pokemon'; +import { getLevelTotalExp, getLevelRelExp } from '../data/exp'; +import * as Utils from '../utils'; import { addTextObject, TextStyle } from './text'; -import { getGenderSymbol, getGenderColor } from './gender'; -import { StatusEffect } from './status-effect'; -import BattleScene from './battle-scene'; +import { getGenderSymbol, getGenderColor } from '../data/gender'; +import { StatusEffect } from '../data/status-effect'; +import BattleScene from '../battle-scene'; export default class BattleInfo extends Phaser.GameObjects.Container { private player: boolean; diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index e9caa9786fe..a9d32390f81 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -1,9 +1,9 @@ import BattleScene, { Button } from "../battle-scene"; -import { addTextObject, TextStyle } from "../text"; +import { addTextObject, TextStyle } from "./text"; import UI, { Mode } from "./ui"; import * as Utils from "../utils"; import MessageUiHandler from "./message-ui-handler"; -import { getStatName, Stat } from "../pokemon-stat"; +import { getStatName, Stat } from "../data/pokemon-stat"; export default class BattleMessageUiHandler extends MessageUiHandler { private levelUpStatsContainer: Phaser.GameObjects.Container; diff --git a/src/ui/biome-select-ui-handler.ts b/src/ui/biome-select-ui-handler.ts index ff513a1bc8c..0ce72eeaeaa 100644 --- a/src/ui/biome-select-ui-handler.ts +++ b/src/ui/biome-select-ui-handler.ts @@ -1,6 +1,6 @@ import BattleScene, { Button } from "../battle-scene"; -import { Biome, biomeLinks, getBiomeName } from "../biome"; -import { addTextObject, TextStyle } from "../text"; +import { Biome, biomeLinks, getBiomeName } from "../data/biome"; +import { addTextObject, TextStyle } from "./text"; import { Mode } from "./ui"; import UiHandler from "./uiHandler"; diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index d39c3cb0bbc..42e9c82990a 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -1,6 +1,6 @@ import { CommandPhase } from "../battle-phases"; import BattleScene, { Button } from "../battle-scene"; -import { addTextObject, TextStyle } from "../text"; +import { addTextObject, TextStyle } from "./text"; import { toPokemonUpperCase } from "../utils"; import { PartyUiMode } from "./party-ui-handler"; import UI, { Mode } from "./ui"; diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts index 184bffea3fe..34c64596fb5 100644 --- a/src/ui/confirm-ui-handler.ts +++ b/src/ui/confirm-ui-handler.ts @@ -1,5 +1,5 @@ import BattleScene, { Button } from "../battle-scene"; -import { addTextObject, TextStyle } from "../text"; +import { addTextObject, TextStyle } from "./text"; import { Mode } from "./ui"; import UiHandler from "./uiHandler"; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 20d51f37cd2..94d7e1c8257 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -1,6 +1,6 @@ import BattleScene, { Button } from "../battle-scene"; -import { addTextObject, TextStyle } from "../text"; -import { Type } from "../type"; +import { addTextObject, TextStyle } from "./text"; +import { Type } from "../data/type"; import { Command } from "./command-ui-handler"; import { Mode } from "./ui"; import UiHandler from "./uiHandler"; diff --git a/src/ui/modifier-bar.ts b/src/ui/modifier-bar.ts deleted file mode 100644 index e79bab5cd3e..00000000000 --- a/src/ui/modifier-bar.ts +++ /dev/null @@ -1,3 +0,0 @@ -import BattleScene from "../battle-scene"; -import { Modifier } from "../modifier"; - diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index a45f2eb450a..0d1435e2933 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -1,7 +1,7 @@ import BattleScene, { Button } from "../battle-scene"; -import { ModifierTier, ModifierType, ModifierTypeOption } from "../modifier-type"; -import { getPokeballAtlasKey, PokeballType } from "../pokeball"; -import { addTextObject, TextStyle } from "../text"; +import { ModifierTier, ModifierType, ModifierTypeOption } from "../modifier/modifier-type"; +import { getPokeballAtlasKey, PokeballType } from "../data/pokeball"; +import { addTextObject, TextStyle } from "./text"; import AwaitableUiHandler from "./awaitable-ui-handler"; import { Mode } from "./ui"; diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 3cd9087cfe8..47a6a84407e 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -1,7 +1,7 @@ import { CommandPhase, SummonMissingPhase } from "../battle-phases"; import BattleScene, { Button } from "../battle-scene"; import { PlayerPokemon, PokemonMove } from "../pokemon"; -import { addTextObject, TextStyle } from "../text"; +import { addTextObject, TextStyle } from "./text"; import { Command } from "./command-ui-handler"; import MessageUiHandler from "./message-ui-handler"; import { Mode } from "./ui"; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index fb8090ea3e1..fae7680e911 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1,13 +1,13 @@ import BattleScene, { Button } from "../battle-scene"; -import PokemonSpecies, { allSpecies } from "../pokemon-species"; -import { Species } from "../species"; -import { TextStyle, addTextObject } from "../text"; +import PokemonSpecies, { allSpecies } from "../data/pokemon-species"; +import { Species } from "../data/species"; +import { TextStyle, addTextObject } from "./text"; import { Mode } from "./ui"; import * as Utils from "../utils"; import MessageUiHandler from "./message-ui-handler"; -import { DexEntryDetails, StarterDexUnlockTree } from "../game-data"; -import { Gender, getGenderColor, getGenderSymbol } from "../gender"; -import { pokemonPrevolutions } from "../pokemon-evolutions"; +import { DexEntryDetails, StarterDexUnlockTree } from "../system/game-data"; +import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; +import { pokemonPrevolutions } from "../data/pokemon-evolutions"; export type StarterSelectCallback = (starters: Starter[]) => void; diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 467c2dfe011..e7547149aea 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -3,11 +3,11 @@ import { Mode } from "./ui"; import UiHandler from "./uiHandler"; import * as Utils from "../utils"; import { PlayerPokemon } from "../pokemon"; -import { Type } from "../type"; -import { TextStyle, addTextObject } from "../text"; -import Move, { MoveCategory } from "../move"; -import { getPokeballAtlasKey } from "../pokeball"; -import { getGenderColor, getGenderSymbol } from "../gender"; +import { Type } from "../data/type"; +import { TextStyle, addTextObject } from "./text"; +import Move, { MoveCategory } from "../data/move"; +import { getPokeballAtlasKey } from "../data/pokeball"; +import { getGenderColor, getGenderSymbol } from "../data/gender"; enum Page { PROFILE, diff --git a/src/text.ts b/src/ui/text.ts similarity index 100% rename from src/text.ts rename to src/ui/text.ts