Fix import issues with battle phase

pull/1/head
Flashfyre 2023-04-10 14:12:01 -04:00
parent 5b097b347b
commit 3723e25682
11 changed files with 1073 additions and 1070 deletions

View File

@ -1,4 +1,4 @@
import { SelectModifierPhase } from "./battle-phase"; import { SelectModifierPhase } from "./battle-phases";
import BattleScene from "./battle-scene"; import BattleScene from "./battle-scene";
import { ModifierTier, ModifierType, PokemonBaseStatBoosterModifierType, PokemonHpRestoreModifierType, PokemonReviveModifierType } from "./modifier"; import { ModifierTier, ModifierType, PokemonBaseStatBoosterModifierType, PokemonHpRestoreModifierType, PokemonReviveModifierType } from "./modifier";
import Pokemon, { AiType, EnemyPokemon, PlayerPokemon, PokemonMove } from "./pokemon"; import Pokemon, { AiType, EnemyPokemon, PlayerPokemon, PokemonMove } from "./pokemon";

File diff suppressed because it is too large Load Diff

1061
src/battle-phases.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
import Phaser from 'phaser'; import Phaser from 'phaser';
import { Biome, BiomeArena } from './biome'; import { Biome, BiomeArena } from './biome';
import UI from './ui/ui'; import UI from './ui/ui';
import { BattlePhase, EncounterPhase, SummonPhase, CommandPhase, NextEncounterPhase, SwitchBiomePhase, NewBiomeEncounterPhase, EvolutionPhase } from './battle-phase'; import { EncounterPhase, SummonPhase, CommandPhase, NextEncounterPhase, SwitchBiomePhase, NewBiomeEncounterPhase } from './battle-phases';
import { PlayerPokemon, EnemyPokemon } from './pokemon'; import { PlayerPokemon, EnemyPokemon } from './pokemon';
import PokemonSpecies, { allSpecies, getPokemonSpecies } from './pokemon-species'; import PokemonSpecies, { allSpecies, getPokemonSpecies } from './pokemon-species';
import * as Utils from './utils'; import * as Utils from './utils';
@ -11,6 +11,7 @@ import { Species } from './species';
import { initAutoPlay } from './auto-play'; import { initAutoPlay } from './auto-play';
import { Battle } from './battle'; import { Battle } from './battle';
import { populateAnims } from './battle-anims'; import { populateAnims } from './battle-anims';
import { BattlePhase } from './battle-phase';
const enableAuto = true; const enableAuto = true;
@ -18,8 +19,8 @@ export default class BattleScene extends Phaser.Scene {
public auto: boolean; public auto: boolean;
public autoSpeed: integer = 1; public autoSpeed: integer = 1;
private phaseQueue: Array<BattlePhase>; private phaseQueue: BattlePhase[];
private phaseQueuePrepend: Array<BattlePhase>; private phaseQueuePrepend: BattlePhase[];
private currentPhase: BattlePhase; private currentPhase: BattlePhase;
public field: Phaser.GameObjects.Container; public field: Phaser.GameObjects.Container;
public fieldUI: Phaser.GameObjects.Container; public fieldUI: Phaser.GameObjects.Container;

View File

@ -1,10 +1,11 @@
import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
import { BattlePhase, LearnMovePhase } from "./battle-phase"; import { BattlePhase } from "./battle-phase";
import BattleScene from "./battle-scene"; import BattleScene from "./battle-scene";
import { SpeciesEvolution } from "./pokemon-evolutions"; import { SpeciesEvolution } from "./pokemon-evolutions";
import EvolutionSceneHandler from "./ui/evolution-scene-handler"; import EvolutionSceneHandler from "./ui/evolution-scene-handler";
import * as Utils from "./utils"; import * as Utils from "./utils";
import { Mode } from "./ui/ui"; import { Mode } from "./ui/ui";
import { LearnMovePhase } from "./battle-phases";
export class EvolutionPhase extends BattlePhase { export class EvolutionPhase extends BattlePhase {
private partyMemberIndex: integer; private partyMemberIndex: integer;

View File

@ -1,4 +1,4 @@
import { LearnMovePhase, LevelUpPhase } from "./battle-phase"; import { LearnMovePhase, LevelUpPhase } from "./battle-phases";
import BattleScene from "./battle-scene"; import BattleScene from "./battle-scene";
import { getLevelTotalExp } from "./exp"; import { getLevelTotalExp } from "./exp";
import { allMoves, Moves } from "./move"; import { allMoves, Moves } from "./move";

View File

@ -1,4 +1,4 @@
import { MessagePhase, ObtainStatusEffectPhase } from "./battle-phase"; import { MessagePhase, ObtainStatusEffectPhase } from "./battle-phases";
import BattleScene from "./battle-scene"; import BattleScene from "./battle-scene";
import Pokemon, { PlayerPokemon } from "./pokemon"; import Pokemon, { PlayerPokemon } from "./pokemon";
import { Stat } from "./pokemon-stat"; import { Stat } from "./pokemon-stat";

View File

@ -1,7 +1,6 @@
import Phaser from 'phaser'; import Phaser from 'phaser';
import BattleScene from './battle-scene'; import BattleScene from './battle-scene';
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from './battle-info'; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from './battle-info';
import { MessagePhase } from './battle-phase';
import { default as Move, allMoves, MoveCategory, Moves } from './move'; import { default as Move, allMoves, MoveCategory, Moves } from './move';
import { pokemonLevelMoves } from './pokemon-level-moves'; import { pokemonLevelMoves } from './pokemon-level-moves';
import { default as PokemonSpecies, getPokemonSpecies } from './pokemon-species'; import { default as PokemonSpecies, getPokemonSpecies } from './pokemon-species';
@ -16,6 +15,7 @@ import { initAnim, loadMoveAnimAssets } from './battle-anims';
import { StatusEffect } from './status-effect'; import { StatusEffect } from './status-effect';
import { tmSpecies } from './tms'; import { tmSpecies } from './tms';
import { pokemonEvolutions, SpeciesEvolution, SpeciesEvolutionCondition } from './pokemon-evolutions'; import { pokemonEvolutions, SpeciesEvolution, SpeciesEvolutionCondition } from './pokemon-evolutions';
import { MessagePhase } from './battle-phases';
export default abstract class Pokemon extends Phaser.GameObjects.Container { export default abstract class Pokemon extends Phaser.GameObjects.Container {
public id: integer; public id: integer;

View File

@ -1,4 +1,3 @@
import { CommandPhase } from "../battle-phase";
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { addTextObject, TextStyle } from "../text"; import { addTextObject, TextStyle } from "../text";
import { toPokemonUpperCase } from "../utils"; import { toPokemonUpperCase } from "../utils";

View File

@ -1,4 +1,3 @@
import { CommandPhase } from "../battle-phase";
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { addTextObject, TextStyle } from "../text"; import { addTextObject, TextStyle } from "../text";
import { Type } from "../type"; import { Type } from "../type";
@ -6,6 +5,7 @@ import { Command } from "./command-ui-handler";
import { Mode } from "./ui"; import { Mode } from "./ui";
import UiHandler from "./uiHandler"; import UiHandler from "./uiHandler";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { CommandPhase } from "../battle-phases";
export default class FightUiHandler extends UiHandler { export default class FightUiHandler extends UiHandler {
private movesContainer: Phaser.GameObjects.Container; private movesContainer: Phaser.GameObjects.Container;

View File

@ -1,4 +1,4 @@
import { CommandPhase } from "../battle-phase"; import { CommandPhase } from "../battle-phases";
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { PlayerPokemon } from "../pokemon"; import { PlayerPokemon } from "../pokemon";
import { addTextObject, TextStyle } from "../text"; import { addTextObject, TextStyle } from "../text";