diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index b34205db3..4a22b25fd 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -211,18 +211,20 @@ class ToxicSpikesTag extends ArenaTrapTag { } activateTrap(pokemon: Pokemon): boolean { - if (!pokemon.status && pokemon.isGrounded()) { - const toxic = this.layers > 1; - if (pokemon.trySetStatus(!toxic ? StatusEffect.POISON : StatusEffect.TOXIC, true, null, `the ${this.getMoveName()}`)) + if (pokemon.isOfType(Type.POISON) && pokemon.isGrounded()) { + this.neutralized = true; + if (pokemon.scene.arena.removeTag(this.tagType)) { + pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` absorbed the ${this.getMoveName()}!`)); return true; - else if (pokemon.isOfType(Type.POISON)) { - this.neutralized = true; - if (pokemon.scene.arena.removeTag(this.tagType)) { - pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` absorbed the ${this.getMoveName()}!`)); - return true; - } } } + else if (!pokemon.status && pokemon.isGrounded()) { + const toxic = this.layers > 1; + if (pokemon.trySetStatus(!toxic ? StatusEffect.POISON : StatusEffect.TOXIC, true, null, `the ${this.getMoveName()}`)) + return true; + } + return false; + } return false; } @@ -378,4 +380,4 @@ export function getArenaTag(tagType: ArenaTagType, turnCount: integer, sourceMov case ArenaTagType.GRAVITY: return new GravityTag(turnCount); } -} \ No newline at end of file +}