chore: add poisonTypeCondition and HitsTagAttr to moves.toxic

pull/905/head
raksus 2024-05-15 14:18:27 +02:00
parent 512016faef
commit 434025ef17
1 changed files with 8 additions and 1 deletions

View File

@ -4207,6 +4207,8 @@ export class VariableTargetAttr extends MoveAttr {
const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY); 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 failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune();
const failOnMaxCondition: MoveConditionFunc = (user, target, move) => !target.isMax(); const failOnMaxCondition: MoveConditionFunc = (user, target, move) => !target.isMax();
@ -4590,7 +4592,12 @@ export function initMoves() {
.ignoresVirtual(), .ignoresVirtual(),
new StatusMove(Moves.TOXIC, Type.POISON, 90, 10, -1, 0, 1) new StatusMove(Moves.TOXIC, Type.POISON, 90, 10, -1, 0, 1)
.attr(StatusEffectAttr, StatusEffect.TOXIC) .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) new AttackMove(Moves.CONFUSION, Type.PSYCHIC, MoveCategory.SPECIAL, 50, 100, 25, 10, 0, 1)
.attr(ConfuseAttr), .attr(ConfuseAttr),
new AttackMove(Moves.PSYCHIC, Type.PSYCHIC, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 1) new AttackMove(Moves.PSYCHIC, Type.PSYCHIC, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 1)