mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22:19 +02:00
Hide ability bar in TurnEndPhase
This commit is contained in:
parent
b6761bb9b7
commit
2a73582cf1
@ -2941,6 +2941,15 @@ export default class BattleScene extends SceneBase {
|
||||
this.clearPhaseQueueSplice();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides the ability bar if it is currently visible
|
||||
*/
|
||||
public hideAbilityBar(): void {
|
||||
if (this.abilityBar.isVisible()) {
|
||||
this.unshiftPhase(new HideAbilityPhase());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves everything from nextCommandPhaseQueue to phaseQueue (keeping order)
|
||||
*/
|
||||
|
@ -31,7 +31,6 @@ import ChallengeData from "#app/system/challenge-data";
|
||||
import TrainerData from "#app/system/trainer-data";
|
||||
import ArenaData from "#app/system/arena-data";
|
||||
import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
|
||||
import { HideAbilityPhase } from "#app/phases/hide-ability-phase";
|
||||
|
||||
export class GameOverPhase extends BattlePhase {
|
||||
private isVictory: boolean;
|
||||
@ -46,9 +45,7 @@ export class GameOverPhase extends BattlePhase {
|
||||
start() {
|
||||
super.start();
|
||||
|
||||
if (globalScene.abilityBar.isVisible()) {
|
||||
globalScene.unshiftPhase(new HideAbilityPhase());
|
||||
}
|
||||
globalScene.hideAbilityBar();
|
||||
|
||||
// Failsafe if players somehow skip floor 200 in classic mode
|
||||
if (globalScene.gameMode.isClassic && globalScene.currentBattle.waveIndex > 200) {
|
||||
|
@ -28,6 +28,8 @@ export class TurnEndPhase extends FieldPhase {
|
||||
globalScene.currentBattle.incrementTurn();
|
||||
globalScene.eventTarget.dispatchEvent(new TurnEndEvent(globalScene.currentBattle.turn));
|
||||
|
||||
globalScene.hideAbilityBar();
|
||||
|
||||
const handlePokemon = (pokemon: Pokemon) => {
|
||||
if (!pokemon.switchOutStatus) {
|
||||
pokemon.lapseTags(BattlerTagLapseType.TURN_END);
|
||||
|
Loading…
Reference in New Issue
Block a user