Implement Snap Trap

One of the basic trapping moves that got overlooked.
This commit is contained in:
Madmadness65 committed 2024-04-23 13:04:42 -05:00
1 parent 8f36bf1dcf
commit d48de66179
5 files changed
+1226 -1

No files matched your search

File diff suppressed because it is too large. Load diff
+1
View File
@@ -78,6 +78,7 @@ export enum CommonAnim {
CURSE,
MAGMA_STORM,
CLAMP,
SNAP_TRAP,
THUNDER_CAGE,
INFESTATION,
ORDER_UP_CURLY,
+12
View File
@@ -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:
+1
View File
@@ -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",
+4 -1
View File
@@ -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