mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-07 10:28:43 +01:00
30 lines
659 B
TypeScript
30 lines
659 B
TypeScript
import BattleScene from "#app/battle-scene.js";
|
|
import { BattlerIndex } from "#app/battle.js";
|
|
import { PokemonPhase } from "./pokemon-phase";
|
|
|
|
export class ShowAbilityPhase extends PokemonPhase {
|
|
private passive: boolean;
|
|
|
|
constructor(scene: BattleScene, battlerIndex: BattlerIndex, passive: boolean = false) {
|
|
super(scene, battlerIndex);
|
|
|
|
this.passive = passive;
|
|
}
|
|
|
|
start() {
|
|
super.start();
|
|
|
|
const pokemon = this.getPokemon();
|
|
|
|
if (pokemon) {
|
|
this.scene.abilityBar.showAbility(pokemon, this.passive);
|
|
|
|
if (pokemon?.battleData) {
|
|
pokemon.battleData.abilityRevealed = true;
|
|
}
|
|
}
|
|
|
|
this.end();
|
|
}
|
|
}
|