mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 23:05:23 +01:00
* Move phase types out of phase interceptor * Create isXPhase method and add properties to each phase * Replace instanceof phase with isXPhase * Fix missing union types for phaseName * Update doc comment in phase.ts * Fix incomplete comment in encounter-phase * Make phaseName as public and fix more uses * Move phaseName property declaration before constructor in move anim phase Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Rename isXPhase to is --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
33 lines
1010 B
TypeScript
33 lines
1010 B
TypeScript
import { globalScene } from "#app/global-scene";
|
|
import { Phase } from "#app/phase";
|
|
|
|
/**
|
|
* Provides EXP to the player's party *without* doing any Pokemon defeated checks or queueing extraneous post-battle phases
|
|
* Intended to be used as a more 1-off phase to provide exp to the party (such as during MEs), rather than cleanup a battle entirely
|
|
*/
|
|
export class PartyExpPhase extends Phase {
|
|
public readonly phaseName = "PartyExpPhase";
|
|
expValue: number;
|
|
useWaveIndexMultiplier?: boolean;
|
|
pokemonParticipantIds?: Set<number>;
|
|
|
|
constructor(expValue: number, useWaveIndexMultiplier?: boolean, pokemonParticipantIds?: Set<number>) {
|
|
super();
|
|
|
|
this.expValue = expValue;
|
|
this.useWaveIndexMultiplier = useWaveIndexMultiplier;
|
|
this.pokemonParticipantIds = pokemonParticipantIds;
|
|
}
|
|
|
|
/**
|
|
* Gives EXP to the party
|
|
*/
|
|
start() {
|
|
super.start();
|
|
|
|
globalScene.applyPartyExp(this.expValue, false, this.useWaveIndexMultiplier, this.pokemonParticipantIds);
|
|
|
|
this.end();
|
|
}
|
|
}
|