mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-15 16:57:10 +00:00
- remove any `.js` extension imports - remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static - increase vite chunk-size warning limit Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
30 lines
653 B
TypeScript
30 lines
653 B
TypeScript
import BattleScene from "#app/battle-scene";
|
|
import { BattlerIndex } from "#app/battle";
|
|
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();
|
|
}
|
|
}
|