From c0d663aa760512ecd300470311289904237f51c5 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 28 Apr 2024 19:56:00 -0400 Subject: [PATCH] Implementing Gen 6 Toxic Changes. --- src/data/move.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 9329d21c1d4..286c69aa661 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2757,6 +2757,16 @@ export class HitsTagAttr extends MoveAttr { } } +export class ToxicHitAttr extends HitsTagAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (user.isOfType(Type.POISON)) { + this.getTargetBenefitScore(user, target, move) + return true; + } + return false; + } +} + export class AddArenaTagAttr extends MoveEffectAttr { public tagType: ArenaTagType; public turnCount: integer; @@ -3969,7 +3979,11 @@ export function initMoves() { .ignoresVirtual(), new StatusMove(Moves.TOXIC, Type.POISON, 90, 10, -1, 0, 1) .attr(StatusEffectAttr, StatusEffect.TOXIC) - .attr(ToxicAccuracyAttr), + .attr(ToxicAccuracyAttr) + .attr(ToxicHitAttr, BattlerTagType.FLYING) + .attr(ToxicHitAttr, BattlerTagType.UNDERGROUND) + .attr(ToxicHitAttr, BattlerTagType.UNDERWATER) + .attr(ToxicHitAttr, BattlerTagType.HIDDEN), new AttackMove(Moves.CONFUSION, Type.PSYCHIC, MoveCategory.SPECIAL, 50, 100, 25, 10, 0, 1) .attr(ConfuseAttr), new AttackMove(Moves.PSYCHIC, Type.PSYCHIC, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 1)