diff --git a/public/battle-anims/common-snap-trap.json b/public/battle-anims/common-snap-trap.json new file mode 100644 index 00000000000..d9b2cf0ab2d --- /dev/null +++ b/public/battle-anims/common-snap-trap.json @@ -0,0 +1,1208 @@ +{ + "id": 779, + "graphic": "PRAS- Elemental Fangs", + "frames": [ + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -95, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -33, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -94, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -34, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -94, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -34, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -95, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -33, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -96, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -32, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -100, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -28, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -104, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -24, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -104, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -24, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -104, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -24, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -104, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -24, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 90, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -96, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -32, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 80, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -88, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -40, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 70, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -80, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -48, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 70, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -76, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -52, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 70, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -76, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -52, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 70, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -76, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -52, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 70, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -76, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -52, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 70, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -76, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 0, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + }, + { + "x": 128, + "y": -52, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 2, + "graphicFrame": 24, + "opacity": 255, + "tone": [ + -50, + -50, + -50, + 0 + ], + "priority": 1, + "focus": 1 + } + ], + [ + { + "x": 0, + "y": 0, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 0, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 2 + }, + { + "x": 128, + "y": -64, + "zoomX": 100, + "zoomY": 100, + "visible": true, + "target": 1, + "graphicFrame": 0, + "opacity": 255, + "locked": true, + "priority": 1, + "focus": 1 + } + ] + ], + "frameTimedEvents": { + "7": [ + { + "frameIndex": 7, + "resourceName": "metal.m4a", + "volume": 80, + "pitch": 100, + "eventType": "AnimTimedSoundEvent" + } + ], + "11": [ + { + "frameIndex": 11, + "resourceName": "PRSFX- Bite.wav", + "volume": 80, + "pitch": 100, + "eventType": "AnimTimedSoundEvent" + } + ] + }, + "position": 1, + "hue": 0 +} \ No newline at end of file diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index e35914c941e..8118f385fc3 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -78,6 +78,7 @@ export enum CommonAnim { CURSE, MAGMA_STORM, CLAMP, + SNAP_TRAP, THUNDER_CAGE, INFESTATION, ORDER_UP_CURLY, diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index d4fc6da2196..b12d15968f6 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -614,6 +614,16 @@ export class MagmaStormTag extends DamagingTrapTag { } } +export class SnapTrapTag extends DamagingTrapTag { + constructor(turnCount: integer, sourceId: integer) { + super(BattlerTagType.SNAP_TRAP, CommonAnim.SNAP_TRAP, turnCount, Moves.SNAP_TRAP, sourceId); + } + + getTrapMessage(pokemon: Pokemon): string { + return getPokemonMessage(pokemon, ` got trapped\nby a snap trap!`); + } +} + export class ThunderCageTag extends DamagingTrapTag { constructor(turnCount: integer, sourceId: integer) { super(BattlerTagType.THUNDER_CAGE, CommonAnim.THUNDER_CAGE, turnCount, Moves.THUNDER_CAGE, sourceId); @@ -1103,6 +1113,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc return new SandTombTag(turnCount, sourceId); case BattlerTagType.MAGMA_STORM: return new MagmaStormTag(turnCount, sourceId); + case BattlerTagType.SNAP_TRAP: + return new SnapTrapTag(turnCount, sourceId); case BattlerTagType.THUNDER_CAGE: return new ThunderCageTag(turnCount, sourceId); case BattlerTagType.INFESTATION: diff --git a/src/data/enums/battler-tag-type.ts b/src/data/enums/battler-tag-type.ts index 9c740ef4629..4d810b737aa 100644 --- a/src/data/enums/battler-tag-type.ts +++ b/src/data/enums/battler-tag-type.ts @@ -21,6 +21,7 @@ export enum BattlerTagType { CLAMP = "CLAMP", SAND_TOMB = "SAND_TOMB", MAGMA_STORM = "MAGMA_STORM", + SNAP_TRAP = "SNAP_TRAP", THUNDER_CAGE = "THUNDER_CAGE", INFESTATION = "INFESTATION", PROTECTED = "PROTECTED", diff --git a/src/data/move.ts b/src/data/move.ts index f4a98ca8f8e..9445b188b0b 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2511,6 +2511,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr { case BattlerTagType.CLAMP: case BattlerTagType.SAND_TOMB: case BattlerTagType.MAGMA_STORM: + case BattlerTagType.SNAP_TRAP: case BattlerTagType.THUNDER_CAGE: case BattlerTagType.INFESTATION: return -3; @@ -4313,6 +4314,7 @@ export function initMoves() { BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, + BattlerTagType.SNAP_TRAP, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED, BattlerTagType.INFESTATION @@ -5784,7 +5786,7 @@ export function initMoves() { .attr(StatChangeAttr, BattleStat.SPD, -1) .makesContact(false), new AttackMove(Moves.SNAP_TRAP, Type.GRASS, MoveCategory.PHYSICAL, 35, 100, 15, 100, 0, 8) - .partial(), + .attr(TrapAttr, BattlerTagType.SNAP_TRAP), new AttackMove(Moves.PYRO_BALL, Type.FIRE, MoveCategory.PHYSICAL, 120, 90, 5, 10, 0, 8) .attr(HealStatusEffectAttr, true, StatusEffect.FREEZE) .attr(StatusEffectAttr, StatusEffect.BURN) @@ -6147,6 +6149,7 @@ export function initMoves() { BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, + BattlerTagType.SNAP_TRAP, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED, BattlerTagType.INFESTATION