mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-23 05:25:58 +02:00
25 lines
803 B
TypeScript
25 lines
803 B
TypeScript
import BattleScene from "#app/battle-scene.js";
|
|
import { BattlerIndex } from "#app/battle.js";
|
|
import { applyPostSummonAbAttrs, PostSummonAbAttr } from "#app/data/ability.js";
|
|
import { ArenaTrapTag } from "#app/data/arena-tag.js";
|
|
import { StatusEffect } from "#app/enums/status-effect.js";
|
|
import { PokemonPhase } from "./pokemon-phase";
|
|
|
|
export class PostSummonPhase extends PokemonPhase {
|
|
constructor(scene: BattleScene, battlerIndex: BattlerIndex) {
|
|
super(scene, battlerIndex);
|
|
}
|
|
|
|
start() {
|
|
super.start();
|
|
|
|
const pokemon = this.getPokemon();
|
|
|
|
if (pokemon.status?.effect === StatusEffect.TOXIC) {
|
|
pokemon.status.turnCount = 0;
|
|
}
|
|
this.scene.arena.applyTags(ArenaTrapTag, pokemon);
|
|
applyPostSummonAbAttrs(PostSummonAbAttr, pokemon).then(() => this.end());
|
|
}
|
|
}
|