From 434025ef1741010ed1913ae9ad79c35b63f6e475 Mon Sep 17 00:00:00 2001 From: raksus Date: Wed, 15 May 2024 14:18:27 +0200 Subject: [PATCH] chore: add poisonTypeCondition and HitsTagAttr to moves.toxic --- src/data/move.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 5f5765c1d..6f9703323 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4207,6 +4207,8 @@ export class VariableTargetAttr extends MoveAttr { const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY); +const poisonTypeCondition: MoveConditionFunc = (user, target, move) => user.isOfType(Type.POISON); + const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune(); const failOnMaxCondition: MoveConditionFunc = (user, target, move) => !target.isMax(); @@ -4590,7 +4592,12 @@ export function initMoves() { .ignoresVirtual(), new StatusMove(Moves.TOXIC, Type.POISON, 90, 10, -1, 0, 1) .attr(StatusEffectAttr, StatusEffect.TOXIC) - .attr(ToxicAccuracyAttr), + .attr(ToxicAccuracyAttr) + .condition(poisonTypeCondition) + .attr(HitsTagAttr, BattlerTagType.UNDERGROUND, true) + .attr(HitsTagAttr, BattlerTagType.FLYING, true) + .attr(HitsTagAttr, BattlerTagType.UNDERWATER, true) + .attr(HitsTagAttr, BattlerTagType.HIDDEN, true), 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)