Split files
This commit is contained in:
parent
d6df829f85
commit
557cf21cfe
|
@ -171,11 +171,8 @@ import { initGlobalScene } from "#app/global-scene";
|
|||
import { ShowAbilityPhase } from "#app/phases/show-ability-phase";
|
||||
import { HideAbilityPhase } from "#app/phases/hide-ability-phase";
|
||||
import { timedEventManager } from "./global-event-manager";
|
||||
import {
|
||||
type DynamicPhaseType,
|
||||
type PhasePriorityQueue,
|
||||
PostSummonPhasePriorityQueue,
|
||||
} from "#app/data/phase-priority-queue";
|
||||
import { type PhasePriorityQueue, PostSummonPhasePriorityQueue } from "#app/data/phase-priority-queue";
|
||||
import type { DynamicPhaseType } from "./enums/dynamic-phase-type";
|
||||
import { PostSummonPhase } from "#app/phases/post-summon-phase";
|
||||
import { ActivatePriorityQueuePhase } from "#app/phases/activate-priority-queue-phase";
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import { globalScene } from "#app/global-scene";
|
||||
import type { Phase } from "#app/phase";
|
||||
import { ActivatePriorityQueuePhase } from "#app/phases/activate-priority-queue-phase";
|
||||
import { type PostSummonPhase, PostSummonActivateAbilityPhase } from "#app/phases/post-summon-phase";
|
||||
import type { PostSummonPhase } from "#app/phases/post-summon-phase";
|
||||
import { PostSummonActivateAbilityPhase } from "#app/phases/post-summon-activate-ability-phase";
|
||||
import { Stat } from "#enums/stat";
|
||||
import { BooleanHolder } from "#app/utils";
|
||||
import { TrickRoomTag } from "#app/data/arena-tag";
|
||||
import { DynamicPhaseType } from "#enums/dynamic-phase-type";
|
||||
|
||||
/**
|
||||
* Stores a list of {@linkcode Phase}s
|
||||
|
@ -93,10 +95,3 @@ function isTrickRoom(): boolean {
|
|||
globalScene.arena.applyTags(TrickRoomTag, false, speedReversed);
|
||||
return speedReversed.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum representation of the phase types held by implementations of {@linkcode PhasePriorityQueue}
|
||||
*/
|
||||
export enum DynamicPhaseType {
|
||||
POST_SUMMON,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* Enum representation of the phase types held by implementations of {@linkcode PhasePriorityQueue}
|
||||
*/
|
||||
|
||||
export enum DynamicPhaseType {
|
||||
POST_SUMMON
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import type { DynamicPhaseType } from "#app/data/phase-priority-queue";
|
||||
import type { DynamicPhaseType } from "#enums/dynamic-phase-type";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
import type { BattlerIndex } from "#app/battle";
|
||||
import { applyPostSummonAbAttrs, PostSummonAbAttr } from "#app/data/ability";
|
||||
import { PostSummonPhase } from "#app/phases/post-summon-phase";
|
||||
|
||||
/**
|
||||
* Helper to {@linkcode PostSummonPhase} which applies abilities
|
||||
*/
|
||||
|
||||
export class PostSummonActivateAbilityPhase extends PostSummonPhase {
|
||||
private priority: number;
|
||||
private passive: boolean;
|
||||
|
||||
constructor(battlerIndex: BattlerIndex, priority: number, passive: boolean) {
|
||||
super(battlerIndex);
|
||||
this.priority = priority;
|
||||
this.passive = passive;
|
||||
}
|
||||
|
||||
start() {
|
||||
applyPostSummonAbAttrs(PostSummonAbAttr, this.getPokemon(), this.passive, false);
|
||||
|
||||
this.end();
|
||||
}
|
||||
|
||||
public override getPriority() {
|
||||
return this.priority;
|
||||
}
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
import { globalScene } from "#app/global-scene";
|
||||
import { applyAbAttrs, applyPostSummonAbAttrs, CommanderAbAttr, PostSummonAbAttr } from "#app/data/ability";
|
||||
import { applyAbAttrs, CommanderAbAttr } from "#app/data/ability";
|
||||
import { ArenaTrapTag } from "#app/data/arena-tag";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
import { MysteryEncounterPostSummonTag } from "#app/data/battler-tags";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import type { BattlerIndex } from "#app/battle";
|
||||
|
||||
export class PostSummonPhase extends PokemonPhase {
|
||||
start() {
|
||||
|
@ -38,27 +37,3 @@ export class PostSummonPhase extends PokemonPhase {
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to {@linkcode PostSummonPhase} which applies abilities
|
||||
*/
|
||||
export class PostSummonActivateAbilityPhase extends PostSummonPhase {
|
||||
private priority: number;
|
||||
private passive: boolean;
|
||||
|
||||
constructor(battlerIndex: BattlerIndex, priority: number, passive: boolean) {
|
||||
super(battlerIndex);
|
||||
this.priority = priority;
|
||||
this.passive = passive;
|
||||
}
|
||||
|
||||
start() {
|
||||
applyPostSummonAbAttrs(PostSummonAbAttr, this.getPokemon(), this.passive, false);
|
||||
|
||||
this.end();
|
||||
}
|
||||
|
||||
public override getPriority() {
|
||||
return this.priority;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue