mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +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
|
||||
}
|
||||
|
||||
export abstract class ArenaTag {activateTrap(pokemon: Pokemon): boolean {
|
||||
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;
|
||||
}
|
||||
export abstract class ArenaTag {
|
||||
public tagType: ArenaTagType;
|
||||
public turnCount: integer;
|
||||
public sourceMove: Moves;
|
||||
|
Loading…
Reference in New Issue
Block a user