mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Toxic Spikes update
Fixed duplicate code
This commit is contained in:
parent
fab415c156
commit
bc8c283e89
@ -17,21 +17,7 @@ export enum ArenaTagSide {
|
|||||||
ENEMY
|
ENEMY
|
||||||
}
|
}
|
||||||
|
|
||||||
export abstract class ArenaTag {activateTrap(pokemon: Pokemon): boolean {
|
export abstract class ArenaTag {
|
||||||
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.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;
|
|
||||||
}
|
|
||||||
public tagType: ArenaTagType;
|
public tagType: ArenaTagType;
|
||||||
public turnCount: integer;
|
public turnCount: integer;
|
||||||
public sourceMove: Moves;
|
public sourceMove: Moves;
|
||||||
|
Loading…
Reference in New Issue
Block a user