Minor refactoring

pull/16/head
Flashfyre 2024-02-29 20:08:50 -05:00
parent 8d314b199f
commit f48464d48d
41 changed files with 115 additions and 111 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

View File

@ -1,8 +1,8 @@
import Phaser from 'phaser'; import Phaser from 'phaser';
import UI, { Mode } from './ui/ui'; import UI, { Mode } from './ui/ui';
import { EncounterPhase, SummonPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, LevelCapPhase, TestMessagePhase, ShowTrainerPhase, TrainerMessageTestPhase, LoginPhase, ConsolidateDataPhase, SelectGenderPhase, MovePhase } from './phases'; import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, ConsolidateDataPhase, MovePhase } from './phases';
import Pokemon, { PlayerPokemon, EnemyPokemon } from './pokemon'; import Pokemon, { PlayerPokemon, EnemyPokemon } from './field/pokemon';
import PokemonSpecies, { PokemonSpeciesFilter, SpeciesFormKey, allSpecies, getPokemonSpecies, initSpecies, speciesStarters } from './data/pokemon-species'; import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species';
import * as Utils from './utils'; import * as Utils from './utils';
import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier } from './modifier/modifier'; import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier } from './modifier/modifier';
import { PokeballType } from './data/pokeball'; import { PokeballType } from './data/pokeball';
@ -10,7 +10,7 @@ import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets
import { Phase } from './phase'; import { Phase } from './phase';
import { initGameSpeed } from './system/game-speed'; import { initGameSpeed } from './system/game-speed';
import { Biome } from "./data/enums/biome"; import { Biome } from "./data/enums/biome";
import { Arena, ArenaBase, getBiomeHasProps, getBiomeKey } from './arena'; import { Arena, ArenaBase, getBiomeHasProps, getBiomeKey } from './field/arena';
import { GameData, PlayerGender } from './system/game-data'; import { GameData, PlayerGender } from './system/game-data';
import StarterSelectUiHandler from './ui/starter-select-ui-handler'; import StarterSelectUiHandler from './ui/starter-select-ui-handler';
import { TextStyle, addTextObject } from './ui/text'; import { TextStyle, addTextObject } from './ui/text';
@ -27,7 +27,7 @@ import SpritePipeline from './pipelines/sprite';
import PartyExpBar from './ui/party-exp-bar'; import PartyExpBar from './ui/party-exp-bar';
import { trainerConfigs } from './data/trainer-config'; import { trainerConfigs } from './data/trainer-config';
import { TrainerType } from "./data/enums/trainer-type"; import { TrainerType } from "./data/enums/trainer-type";
import Trainer from './trainer'; import Trainer from './field/trainer';
import TrainerData from './system/trainer-data'; import TrainerData from './system/trainer-data';
import SoundFade from 'phaser3-rex-plugins/plugins/soundfade'; import SoundFade from 'phaser3-rex-plugins/plugins/soundfade';
import { pokemonPrevolutions } from './data/pokemon-evolutions'; import { pokemonPrevolutions } from './data/pokemon-evolutions';
@ -49,7 +49,7 @@ import { SpeciesFormChangeTimeOfDayTrigger, SpeciesFormChangeTrigger, pokemonFor
import { FormChangePhase, QuietFormChangePhase } from './form-change-phase'; import { FormChangePhase, QuietFormChangePhase } from './form-change-phase';
import { BattleSpec } from './enums/battle-spec'; import { BattleSpec } from './enums/battle-spec';
import { getTypeRgb } from './data/type'; import { getTypeRgb } from './data/type';
import PokemonSpriteSparkleHandler from './sprite/pokemon-sprite-sparkle-handler'; import PokemonSpriteSparkleHandler from './field/pokemon-sprite-sparkle-handler';
import CharSprite from './ui/char-sprite'; import CharSprite from './ui/char-sprite';
export const bypassLogin = false; export const bypassLogin = false;

View File

@ -1,8 +1,8 @@
import BattleScene from "./battle-scene"; import BattleScene from "./battle-scene";
import { EnemyPokemon, PlayerPokemon, QueuedMove } from "./pokemon"; import { EnemyPokemon, PlayerPokemon, QueuedMove } from "./field/pokemon";
import { Command } from "./ui/command-ui-handler"; import { Command } from "./ui/command-ui-handler";
import * as Utils from "./utils"; import * as Utils from "./utils";
import Trainer from "./trainer"; import Trainer from "./field/trainer";
import { Species } from "./data/enums/species"; import { Species } from "./data/enums/species";
import { Moves } from "./data/enums/moves"; import { Moves } from "./data/enums/moves";
import { TrainerType } from "./data/enums/trainer-type"; import { TrainerType } from "./data/enums/trainer-type";

View File

@ -1,4 +1,4 @@
import Pokemon, { HitResult, PokemonMove } from "../pokemon"; import Pokemon, { HitResult, PokemonMove } from "../field/pokemon";
import { Type } from "./type"; import { Type } from "./type";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { BattleStat, getBattleStatName } from "./battle-stat"; import { BattleStat, getBattleStatName } from "./battle-stat";

View File

@ -1,9 +1,9 @@
import { Arena } from "../arena"; import { Arena } from "../field/arena";
import { Type } from "./type"; import { Type } from "./type";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { allMoves } from "./move"; import { allMoves } from "./move";
import { getPokemonMessage } from "../messages"; import { getPokemonMessage } from "../messages";
import Pokemon, { HitResult, PokemonMove } from "../pokemon"; import Pokemon, { HitResult, PokemonMove } from "../field/pokemon";
import { DamagePhase, MoveEffectPhase, ObtainStatusEffectPhase } from "../phases"; import { DamagePhase, MoveEffectPhase, ObtainStatusEffectPhase } from "../phases";
import { StatusEffect } from "./status-effect"; import { StatusEffect } from "./status-effect";
import { BattlerTagType } from "./enums/battler-tag-type"; import { BattlerTagType } from "./enums/battler-tag-type";

View File

@ -1,7 +1,7 @@
//import { battleAnimRawData } from "./battle-anim-raw-data"; //import { battleAnimRawData } from "./battle-anim-raw-data";
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { AttackMove, ChargeAttr, DelayedAttackAttr, MoveFlags, SelfStatusMove, allMoves } from "./move"; import { AttackMove, ChargeAttr, DelayedAttackAttr, MoveFlags, SelfStatusMove, allMoves } from "./move";
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { BattlerIndex } from "../battle"; import { BattlerIndex } from "../battle";
import stringify, { Element } from "json-stable-stringify"; import stringify, { Element } from "json-stable-stringify";

View File

@ -1,7 +1,7 @@
import { CommonAnim, CommonBattleAnim } from "./battle-anims"; import { CommonAnim, CommonBattleAnim } from "./battle-anims";
import { CommonAnimPhase, DamagePhase, MovePhase, ObtainStatusEffectPhase, PokemonHealPhase, ShowAbilityPhase } from "../phases"; import { CommonAnimPhase, DamagePhase, MovePhase, ObtainStatusEffectPhase, PokemonHealPhase, ShowAbilityPhase } from "../phases";
import { getPokemonMessage } from "../messages"; import { getPokemonMessage } from "../messages";
import Pokemon, { MoveResult, HitResult } from "../pokemon"; import Pokemon, { MoveResult, HitResult } from "../field/pokemon";
import { Stat } from "./pokemon-stat"; import { Stat } from "./pokemon-stat";
import { StatusEffect } from "./status-effect"; import { StatusEffect } from "./status-effect";
import * as Utils from "../utils"; import * as Utils from "../utils";

View File

@ -1,6 +1,6 @@
import { PokemonHealPhase, StatChangePhase } from "../phases"; import { PokemonHealPhase, StatChangePhase } from "../phases";
import { getPokemonMessage } from "../messages"; import { getPokemonMessage } from "../messages";
import Pokemon, { HitResult } from "../pokemon"; import Pokemon, { HitResult } from "../field/pokemon";
import { getBattleStatName } from "./battle-stat"; import { getBattleStatName } from "./battle-stat";
import { BattleStat } from "./battle-stat"; import { BattleStat } from "./battle-stat";
import { BattlerTagType } from "./enums/battler-tag-type"; import { BattlerTagType } from "./enums/battler-tag-type";

View File

@ -5,7 +5,7 @@ import { BattleStat, getBattleStatName } from "./battle-stat";
import { EncoreTag } from "./battler-tags"; import { EncoreTag } from "./battler-tags";
import { BattlerTagType } from "./enums/battler-tag-type"; import { BattlerTagType } from "./enums/battler-tag-type";
import { getPokemonMessage } from "../messages"; import { getPokemonMessage } from "../messages";
import Pokemon, { AttackMoveResult, HitResult, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../pokemon"; import Pokemon, { AttackMoveResult, HitResult, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../field/pokemon";
import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect"; import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect";
import { Type } from "./type"; import { Type } from "./type";
import * as Utils from "../utils"; import * as Utils from "../utils";

View File

@ -3,7 +3,7 @@ import { AttackTypeBoosterModifier, FlinchChanceModifier } from "../modifier/mod
import { AttackTypeBoosterModifierType } from "../modifier/modifier-type"; import { AttackTypeBoosterModifierType } from "../modifier/modifier-type";
import { Moves } from "./enums/moves"; import { Moves } from "./enums/moves";
import { PokeballType } from "./pokeball"; import { PokeballType } from "./pokeball";
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
import { Stat } from "./pokemon-stat"; import { Stat } from "./pokemon-stat";
import { Species } from "./enums/species"; import { Species } from "./enums/species";
import { Type } from "./type"; import { Type } from "./type";

View File

@ -1,6 +1,6 @@
import { TimeOfDay } from "./enums/time-of-day"; import { TimeOfDay } from "./enums/time-of-day";
import { PokemonFormChangeItemModifier } from "../modifier/modifier"; import { PokemonFormChangeItemModifier } from "../modifier/modifier";
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
import { Moves } from "./enums/moves"; import { Moves } from "./enums/moves";
import { SpeciesFormKey } from "./pokemon-species"; import { SpeciesFormKey } from "./pokemon-species";
import { Species } from "./enums/species"; import { Species } from "./enums/species";

View File

@ -1,6 +1,6 @@
import BattleScene, { startingWave } from "../battle-scene"; import BattleScene, { startingWave } from "../battle-scene";
import { ModifierTypeFunc, modifierTypes } from "../modifier/modifier-type"; import { ModifierTypeFunc, modifierTypes } from "../modifier/modifier-type";
import { EnemyPokemon } from "../pokemon"; import { EnemyPokemon } from "../field/pokemon";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { TrainerType } from "./enums/trainer-type"; import { TrainerType } from "./enums/trainer-type";
import { Moves } from "./enums/moves"; import { Moves } from "./enums/moves";

View File

@ -1,6 +1,6 @@
import { Biome } from "./enums/biome"; import { Biome } from "./enums/biome";
import { getPokemonMessage } from "../messages"; import { getPokemonMessage } from "../messages";
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
import { Type } from "./type"; import { Type } from "./type";
import Move, { AttackMove } from "./move"; import Move, { AttackMove } from "./move";
import * as Utils from "../utils"; import * as Utils from "../utils";

View File

@ -6,7 +6,7 @@ import { Mode } from "./ui/ui";
import { EGG_SEED, Egg, GachaType, getLegendaryGachaSpeciesForTimestamp, getTypeGachaTypeForTimestamp } from "./data/egg"; import { EGG_SEED, Egg, GachaType, getLegendaryGachaSpeciesForTimestamp, getTypeGachaTypeForTimestamp } from "./data/egg";
import EggHatchSceneHandler from "./ui/egg-hatch-scene-handler"; import EggHatchSceneHandler from "./ui/egg-hatch-scene-handler";
import { Species } from "./data/enums/species"; import { Species } from "./data/enums/species";
import { PlayerPokemon } from "./pokemon"; import { PlayerPokemon } from "./field/pokemon";
import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species"; import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species";
import { StatsContainer } from "./ui/stats-container"; import { StatsContainer } from "./ui/stats-container";
import { TextStyle, addBBCodeTextObject, addTextObject } from "./ui/text"; import { TextStyle, addBBCodeTextObject, addTextObject } from "./ui/text";

View File

@ -6,8 +6,8 @@ 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 "./phases"; import { LearnMovePhase } from "./phases";
import { cos, sin } from "./anims"; import { cos, sin } from "./field/anims";
import { PlayerPokemon } from "./pokemon"; import { PlayerPokemon } from "./field/pokemon";
import { getTypeRgb } from "./data/type"; import { getTypeRgb } from "./data/type";
export class EvolutionPhase extends Phase { export class EvolutionPhase extends Phase {

View File

@ -1,6 +1,6 @@
import BattleScene from "./battle-scene"; import BattleScene from "../battle-scene";
import { PokeballType } from "./data/pokeball"; import { PokeballType } from "../data/pokeball";
import * as Utils from "./utils"; import * as Utils from "../utils";
export function addPokeballOpenParticles(scene: BattleScene, x: number, y: number, pokeballType: PokeballType): void { export function addPokeballOpenParticles(scene: BattleScene, x: number, y: number, pokeballType: PokeballType): void {
switch (pokeballType) { switch (pokeballType) {

View File

@ -1,21 +1,21 @@
import BattleScene from "./battle-scene"; import BattleScene from "../battle-scene";
import { BiomePoolTier, BiomeTierPokemonPools, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools } from "./data/biomes"; import { BiomePoolTier, BiomeTierPokemonPools, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools } from "../data/biomes";
import { Biome } from "./data/enums/biome"; import { Biome } from "../data/enums/biome";
import * as Utils from "./utils"; import * as Utils from "../utils";
import PokemonSpecies, { getPokemonSpecies } from "./data/pokemon-species"; import PokemonSpecies, { getPokemonSpecies } from "../data/pokemon-species";
import { Species } from "./data/enums/species"; import { Species } from "../data/enums/species";
import { Weather, WeatherType, getWeatherClearMessage, getWeatherStartMessage } from "./data/weather"; import { Weather, WeatherType, getWeatherClearMessage, getWeatherStartMessage } from "../data/weather";
import { CommonAnimPhase } from "./phases"; import { CommonAnimPhase } from "../phases";
import { CommonAnim } from "./data/battle-anims"; import { CommonAnim } from "../data/battle-anims";
import { Type } from "./data/type"; import { Type } from "../data/type";
import Move from "./data/move"; import Move from "../data/move";
import { ArenaTag, ArenaTagSide, getArenaTag } from "./data/arena-tag"; import { ArenaTag, ArenaTagSide, getArenaTag } from "../data/arena-tag";
import { ArenaTagType } from "./data/enums/arena-tag-type"; import { ArenaTagType } from "../data/enums/arena-tag-type";
import { GameMode } from "./game-mode"; import { GameMode } from "../game-mode";
import { TrainerType } from "./data/enums/trainer-type"; import { TrainerType } from "../data/enums/trainer-type";
import { BattlerIndex } from "./battle"; import { BattlerIndex } from "../battle";
import { Moves } from "./data/enums/moves"; import { Moves } from "../data/enums/moves";
import { TimeOfDay } from "./data/enums/time-of-day"; import { TimeOfDay } from "../data/enums/time-of-day";
const WEATHER_OVERRIDE = WeatherType.NONE; const WEATHER_OVERRIDE = WeatherType.NONE;

View File

@ -1,5 +1,5 @@
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import Pokemon from "../pokemon"; import Pokemon from "./pokemon";
import * as Utils from "../utils"; import * as Utils from "../utils";
export default class PokemonSpriteSparkleHandler { export default class PokemonSpriteSparkleHandler {

View File

@ -1,44 +1,44 @@
import Phaser from 'phaser'; import Phaser from 'phaser';
import BattleScene, { AnySound } from './battle-scene'; import BattleScene, { AnySound } from '../battle-scene';
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from './ui/battle-info'; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
import { Moves } from "./data/enums/moves"; import { Moves } from "../data/enums/moves";
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusEffectAttr, AttackMove } from "./data/move"; import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusEffectAttr, AttackMove } from "../data/move";
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies } from './data/pokemon-species'; import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies } from '../data/pokemon-species';
import * as Utils from './utils'; import * as Utils from '../utils';
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from './data/type'; import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
import { getLevelTotalExp } from './data/exp'; import { getLevelTotalExp } from '../data/exp';
import { Stat } from './data/pokemon-stat'; import { Stat } from '../data/pokemon-stat';
import { AttackTypeBoosterModifier, DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, HiddenAbilityRateBoosterModifier, PokemonBaseStatModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempBattleStatBoosterModifier, TerastallizeModifier } from './modifier/modifier'; import { AttackTypeBoosterModifier, DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, HiddenAbilityRateBoosterModifier, PokemonBaseStatModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempBattleStatBoosterModifier, TerastallizeModifier } from '../modifier/modifier';
import { PokeballType } from './data/pokeball'; import { PokeballType } from '../data/pokeball';
import { Gender } from './data/gender'; import { Gender } from '../data/gender';
import { initMoveAnim, loadMoveAnimAssets } from './data/battle-anims'; import { initMoveAnim, loadMoveAnimAssets } from '../data/battle-anims';
import { Status, StatusEffect } from './data/status-effect'; import { Status, StatusEffect } from '../data/status-effect';
import { reverseCompatibleTms, tmSpecies } from './data/tms'; import { reverseCompatibleTms, tmSpecies } from '../data/tms';
import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition } from './data/pokemon-evolutions'; import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition } from '../data/pokemon-evolutions';
import { DamagePhase, FaintPhase, LearnMovePhase, StatChangePhase, SwitchSummonPhase } from './phases'; import { DamagePhase, FaintPhase, LearnMovePhase, StatChangePhase, SwitchSummonPhase } from '../phases';
import { BattleStat } from './data/battle-stat'; import { BattleStat } from '../data/battle-stat';
import { BattlerTag, BattlerTagLapseType, EncoreTag, TypeBoostTag, getBattlerTag } from './data/battler-tags'; import { BattlerTag, BattlerTagLapseType, EncoreTag, TypeBoostTag, getBattlerTag } from '../data/battler-tags';
import { BattlerTagType } from "./data/enums/battler-tag-type"; import { BattlerTagType } from "../data/enums/battler-tag-type";
import { Species } from './data/enums/species'; import { Species } from '../data/enums/species';
import { WeatherType } from './data/weather'; import { WeatherType } from '../data/weather';
import { TempBattleStat } from './data/temp-battle-stat'; import { TempBattleStat } from '../data/temp-battle-stat';
import { WeakenMoveTypeTag } from './data/arena-tag'; import { WeakenMoveTypeTag } from '../data/arena-tag';
import { ArenaTagType } from "./data/enums/arena-tag-type"; import { ArenaTagType } from "../data/enums/arena-tag-type";
import { Biome } from "./data/enums/biome"; import { Biome } from "../data/enums/biome";
import { Abilities, Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs } from './data/ability'; import { Abilities, Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs } from '../data/ability';
import PokemonData from './system/pokemon-data'; import PokemonData from '../system/pokemon-data';
import { BattlerIndex } from './battle'; import { BattlerIndex } from '../battle';
import { BattleSpec } from "./enums/battle-spec"; import { BattleSpec } from "../enums/battle-spec";
import { Mode } from './ui/ui'; import { Mode } from '../ui/ui';
import PartyUiHandler, { PartyOption, PartyUiMode } from './ui/party-ui-handler'; import PartyUiHandler, { PartyOption, PartyUiMode } from '../ui/party-ui-handler';
import SoundFade from 'phaser3-rex-plugins/plugins/soundfade'; import SoundFade from 'phaser3-rex-plugins/plugins/soundfade';
import { GameMode } from './game-mode'; import { GameMode } from '../game-mode';
import { LevelMoves } from './data/pokemon-level-moves'; import { LevelMoves } from '../data/pokemon-level-moves';
import { DamageAchv, achvs } from './system/achv'; import { DamageAchv, achvs } from '../system/achv';
import { DexAttr, StarterMoveset } from './system/game-data'; import { DexAttr, StarterMoveset } from '../system/game-data';
import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from '@material/material-color-utilities'; import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from '@material/material-color-utilities';
import { Nature, getNatureStatMultiplier } from './data/nature'; import { Nature, getNatureStatMultiplier } from '../data/nature';
import { SpeciesFormChange, SpeciesFormChangeActiveTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangeMoveUsedTrigger, SpeciesFormChangeStatusEffectTrigger } from './data/pokemon-forms'; import { SpeciesFormChange, SpeciesFormChangeActiveTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangeMoveUsedTrigger, SpeciesFormChangeStatusEffectTrigger } from '../data/pokemon-forms';
export enum FieldPosition { export enum FieldPosition {
CENTER, CENTER,

View File

@ -1,11 +1,11 @@
import BattleScene from "./battle-scene"; import BattleScene from "../battle-scene";
import { pokemonPrevolutions } from "./data/pokemon-evolutions"; import { pokemonPrevolutions } from "../data/pokemon-evolutions";
import PokemonSpecies, { getPokemonSpecies } from "./data/pokemon-species"; import PokemonSpecies, { getPokemonSpecies } from "../data/pokemon-species";
import { TrainerConfig, TrainerPartyCompoundTemplate, TrainerPartyMemberStrength, TrainerPartyTemplate, TrainerPoolTier, trainerConfigs, trainerPartyTemplates } from "./data/trainer-config"; import { TrainerConfig, TrainerPartyCompoundTemplate, TrainerPartyMemberStrength, TrainerPartyTemplate, TrainerPoolTier, trainerConfigs, trainerPartyTemplates } from "../data/trainer-config";
import { TrainerType } from "./data/enums/trainer-type"; import { TrainerType } from "../data/enums/trainer-type";
import { EnemyPokemon } from "./pokemon"; import { EnemyPokemon } from "./pokemon";
import * as Utils from "./utils"; import * as Utils from "../utils";
import { PersistentModifier } from "./modifier/modifier"; import { PersistentModifier } from "../modifier/modifier";
export default class Trainer extends Phaser.GameObjects.Container { export default class Trainer extends Phaser.GameObjects.Container {
public config: TrainerConfig; public config: TrainerConfig;

View File

@ -4,7 +4,7 @@ import { SpeciesFormKey } from "./data/pokemon-species";
import { achvs } from "./system/achv"; import { achvs } from "./system/achv";
import { SpeciesFormChange, getSpeciesFormChangeMessage } from "./data/pokemon-forms"; import { SpeciesFormChange, getSpeciesFormChangeMessage } from "./data/pokemon-forms";
import { EndEvolutionPhase, EvolutionPhase } from "./evolution-phase"; import { EndEvolutionPhase, EvolutionPhase } from "./evolution-phase";
import Pokemon, { EnemyPokemon, PlayerPokemon } from "./pokemon"; import Pokemon, { EnemyPokemon, PlayerPokemon } from "./field/pokemon";
import { Mode } from "./ui/ui"; import { Mode } from "./ui/ui";
import PartyUiHandler from "./ui/party-ui-handler"; import PartyUiHandler from "./ui/party-ui-handler";
import { BattleSpec } from "./enums/battle-spec"; import { BattleSpec } from "./enums/battle-spec";

View File

@ -1,5 +1,5 @@
import { BattleSpec } from "./enums/battle-spec"; import { BattleSpec } from "./enums/battle-spec";
import Pokemon from "./pokemon"; import Pokemon from "./field/pokemon";
export function getPokemonMessage(pokemon: Pokemon, content: string): string { export function getPokemonMessage(pokemon: Pokemon, content: string): string {
let prefix: string; let prefix: string;

View File

@ -2,7 +2,7 @@ import * as Modifiers from './modifier';
import { AttackMove, allMoves } from '../data/move'; import { AttackMove, allMoves } from '../data/move';
import { Moves } from "../data/enums/moves"; import { Moves } from "../data/enums/moves";
import { PokeballType, getPokeballName } from '../data/pokeball'; import { PokeballType, getPokeballName } from '../data/pokeball';
import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from '../pokemon'; import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from '../field/pokemon';
import { EvolutionItem, SpeciesFriendshipEvolutionCondition, pokemonEvolutions } from '../data/pokemon-evolutions'; import { EvolutionItem, SpeciesFriendshipEvolutionCondition, pokemonEvolutions } from '../data/pokemon-evolutions';
import { Stat, getStatName } from '../data/pokemon-stat'; import { Stat, getStatName } from '../data/pokemon-stat';
import { tmPoolTiers, tmSpecies } from '../data/tms'; import { tmPoolTiers, tmSpecies } from '../data/tms';
@ -740,6 +740,10 @@ export const modifierTypes = {
PP_UP: () => new PokemonPpUpModifierType('PP Up', 1), PP_UP: () => new PokemonPpUpModifierType('PP Up', 1),
PP_MAX: () => new PokemonPpUpModifierType('PP Max', 3), PP_MAX: () => new PokemonPpUpModifierType('PP Max', 3),
/*REPEL: () => new DoubleBattleChanceBoosterModifierType('Repel', 5),
SUPER_REPEL: () => new DoubleBattleChanceBoosterModifierType('Super Repel', 10),
MAX_REPEL: () => new DoubleBattleChanceBoosterModifierType('Max Repel', 25),*/
LURE: () => new DoubleBattleChanceBoosterModifierType('Lure', 5), LURE: () => new DoubleBattleChanceBoosterModifierType('Lure', 5),
SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType('Super Lure', 10), SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType('Super Lure', 10),
MAX_LURE: () => new DoubleBattleChanceBoosterModifierType('Max Lure', 25), MAX_LURE: () => new DoubleBattleChanceBoosterModifierType('Max Lure', 25),

View File

@ -3,7 +3,7 @@ import { LearnMovePhase, LevelUpPhase, ObtainStatusEffectPhase, PokemonHealPhase
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { getLevelTotalExp } from "../data/exp"; import { getLevelTotalExp } from "../data/exp";
import { PokeballType } from "../data/pokeball"; import { PokeballType } from "../data/pokeball";
import Pokemon, { PlayerPokemon } from "../pokemon"; import Pokemon, { PlayerPokemon } from "../field/pokemon";
import { Stat } from "../data/pokemon-stat"; import { Stat } from "../data/pokemon-stat";
import { addTextObject, TextStyle } from "../ui/text"; import { addTextObject, TextStyle } from "../ui/text";
import { Type } from '../data/type'; import { Type } from '../data/type';

View File

@ -1,5 +1,5 @@
import BattleScene, { bypassLogin, startingLevel, startingWave } from "./battle-scene"; import BattleScene, { bypassLogin, startingLevel, startingWave } from "./battle-scene";
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./pokemon"; import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
import * as Utils from './utils'; import * as Utils from './utils';
import { Moves } from "./data/enums/moves"; import { Moves } from "./data/enums/moves";
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveCategory, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr } from "./data/move"; import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveCategory, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr } from "./data/move";
@ -32,7 +32,7 @@ import { ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag } from "./data/arena-
import { ArenaTagType } from "./data/enums/arena-tag-type"; import { ArenaTagType } from "./data/enums/arena-tag-type";
import { Abilities, CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs } from "./data/ability"; import { Abilities, CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs } from "./data/ability";
import { Unlockables, getUnlockableName } from "./system/unlockables"; import { Unlockables, getUnlockableName } from "./system/unlockables";
import { getBiomeKey } from "./arena"; import { getBiomeKey } from "./field/arena";
import { BattleType, BattlerIndex, TurnCommand } from "./battle"; import { BattleType, BattlerIndex, TurnCommand } from "./battle";
import { BattleSpec } from "./enums/battle-spec"; import { BattleSpec } from "./enums/battle-spec";
import { GameMode } from "./game-mode"; import { GameMode } from "./game-mode";
@ -45,7 +45,7 @@ import { Egg } from "./data/egg";
import { vouchers } from "./system/voucher"; import { vouchers } from "./system/voucher";
import { loggedInUser, updateUserInfo } from "./account"; import { loggedInUser, updateUserInfo } from "./account";
import { GameDataType, PlayerGender } from "./system/game-data"; import { GameDataType, PlayerGender } from "./system/game-data";
import { addPokeballCaptureStars, addPokeballOpenParticles } from "./anims"; import { addPokeballCaptureStars, addPokeballOpenParticles } from "./field/anims";
import { SpeciesFormChangeActiveTrigger, SpeciesFormChangeManualTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangeMoveUsedTrigger } from "./data/pokemon-forms"; import { SpeciesFormChangeActiveTrigger, SpeciesFormChangeManualTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangeMoveUsedTrigger } from "./data/pokemon-forms";
import { battleSpecDialogue, getCharVariantFromDialogue } from "./data/dialogue"; import { battleSpecDialogue, getCharVariantFromDialogue } from "./data/dialogue";
import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "./ui/modifier-select-ui-handler"; import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "./ui/modifier-select-ui-handler";

View File

@ -1,5 +1,5 @@
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
import Trainer from "../trainer"; import Trainer from "../field/trainer";
import FieldSpritePipeline from "./field-sprite"; import FieldSpritePipeline from "./field-sprite";
const spriteFragShader = ` const spriteFragShader = `

View File

@ -1,4 +1,4 @@
import { Arena } from "../arena"; import { Arena } from "../field/arena";
import { ArenaTag } from "../data/arena-tag"; import { ArenaTag } from "../data/arena-tag";
import { Biome } from "../data/enums/biome"; import { Biome } from "../data/enums/biome";
import { Weather } from "../data/weather"; import { Weather } from "../data/weather";

View File

@ -1,5 +1,5 @@
import BattleScene, { PokeballCounts, bypassLogin } from "../battle-scene"; import BattleScene, { PokeballCounts, bypassLogin } from "../battle-scene";
import Pokemon, { EnemyPokemon, PlayerPokemon } from "../pokemon"; import Pokemon, { EnemyPokemon, PlayerPokemon } from "../field/pokemon";
import { pokemonPrevolutions } from "../data/pokemon-evolutions"; import { pokemonPrevolutions } from "../data/pokemon-evolutions";
import PokemonSpecies, { allSpecies, getPokemonSpecies, speciesStarters } from "../data/pokemon-species"; import PokemonSpecies, { allSpecies, getPokemonSpecies, speciesStarters } from "../data/pokemon-species";
import { Species } from "../data/enums/species"; import { Species } from "../data/enums/species";

View File

@ -7,7 +7,7 @@ import { PokeballType } from "../data/pokeball";
import { getPokemonSpecies } from "../data/pokemon-species"; import { getPokemonSpecies } from "../data/pokemon-species";
import { Species } from "../data/enums/species"; import { Species } from "../data/enums/species";
import { Status } from "../data/status-effect"; import { Status } from "../data/status-effect";
import Pokemon, { EnemyPokemon, PokemonMove, PokemonSummonData } from "../pokemon"; import Pokemon, { EnemyPokemon, PokemonMove, PokemonSummonData } from "../field/pokemon";
export default class PokemonData { export default class PokemonData {
public id: integer; public id: integer;

View File

@ -1,6 +1,6 @@
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { TrainerType } from "../data/enums/trainer-type"; import { TrainerType } from "../data/enums/trainer-type";
import Trainer from "../trainer"; import Trainer from "../field/trainer";
export default class TrainerData { export default class TrainerData {
public trainerType: TrainerType; public trainerType: TrainerType;

View File

@ -1,5 +1,5 @@
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
import { TextStyle, addTextObject } from "./text"; import { TextStyle, addTextObject } from "./text";
const hiddenX = -91; const hiddenX = -91;

View File

@ -1,4 +1,4 @@
import { EnemyPokemon, default as Pokemon } from '../pokemon'; import { EnemyPokemon, default as Pokemon } from '../field/pokemon';
import { getLevelTotalExp, getLevelRelExp } from '../data/exp'; import { getLevelTotalExp, getLevelRelExp } from '../data/exp';
import * as Utils from '../utils'; import * as Utils from '../utils';
import { addTextObject, TextStyle } from './text'; import { addTextObject, TextStyle } from './text';

View File

@ -1,6 +1,6 @@
import BattleScene, { Button } from "../battle-scene"; import BattleScene, { Button } from "../battle-scene";
import { Mode } from "./ui"; import { Mode } from "./ui";
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "../sprite/pokemon-icon-anim-handler"; import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
import { TextStyle, addTextObject } from "./text"; import { TextStyle, addTextObject } from "./text";
import MessageUiHandler from "./message-ui-handler"; import MessageUiHandler from "./message-ui-handler";
import { EGG_SEED, Egg, GachaType, getEggGachaTypeDescriptor, getEggHatchWavesMessage, getEggDescriptor } from "../data/egg"; import { EGG_SEED, Egg, GachaType, getEggGachaTypeDescriptor, getEggHatchWavesMessage, getEggDescriptor } from "../data/egg";

View File

@ -1,5 +1,5 @@
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
import { TextStyle, addTextObject } from "./text"; import { TextStyle, addTextObject } from "./text";
export default class PartyExpBar extends Phaser.GameObjects.Container { export default class PartyExpBar extends Phaser.GameObjects.Container {

View File

@ -1,6 +1,6 @@
import { CommandPhase } from "../phases"; import { CommandPhase } from "../phases";
import BattleScene, { Button } from "../battle-scene"; import BattleScene, { Button } from "../battle-scene";
import { PlayerPokemon, PokemonMove } from "../pokemon"; import { PlayerPokemon, PokemonMove } from "../field/pokemon";
import { addTextObject, TextStyle } from "./text"; import { addTextObject, TextStyle } from "./text";
import { Command } from "./command-ui-handler"; import { Command } from "./command-ui-handler";
import MessageUiHandler from "./message-ui-handler"; import MessageUiHandler from "./message-ui-handler";
@ -11,7 +11,7 @@ import { allMoves } from "../data/move";
import { Moves } from "../data/enums/moves"; import { Moves } from "../data/enums/moves";
import { getGenderColor, getGenderSymbol } from "../data/gender"; import { getGenderColor, getGenderSymbol } from "../data/gender";
import { StatusEffect } from "../data/status-effect"; import { StatusEffect } from "../data/status-effect";
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "../sprite/pokemon-icon-anim-handler"; import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
import { pokemonEvolutions } from "../data/pokemon-evolutions"; import { pokemonEvolutions } from "../data/pokemon-evolutions";
import { addWindow } from "./window"; import { addWindow } from "./window";
import { SpeciesFormChangeItemTrigger } from "../data/pokemon-forms"; import { SpeciesFormChangeItemTrigger } from "../data/pokemon-forms";

View File

@ -1,5 +1,5 @@
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import Pokemon from "../pokemon"; import Pokemon from "../field/pokemon";
export default class PokeballTray extends Phaser.GameObjects.Container { export default class PokeballTray extends Phaser.GameObjects.Container {
private player: boolean; private player: boolean;

View File

@ -11,7 +11,7 @@ import { Unlockables } from "../system/unlockables";
import { GrowthRate, getGrowthRateColor } from "../data/exp"; import { GrowthRate, getGrowthRateColor } from "../data/exp";
import { DexAttr, DexEntry, StarterFormMoveData, StarterMoveset } from "../system/game-data"; import { DexAttr, DexEntry, StarterFormMoveData, StarterMoveset } from "../system/game-data";
import * as Utils from "../utils"; import * as Utils from "../utils";
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "../sprite/pokemon-icon-anim-handler"; import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
import { StatsContainer } from "./stats-container"; import { StatsContainer } from "./stats-container";
import { addWindow } from "./window"; import { addWindow } from "./window";
import { Nature, getNatureName } from "../data/nature"; import { Nature, getNatureName } from "../data/nature";

View File

@ -2,7 +2,7 @@ import BattleScene, { Button } from "../battle-scene";
import { Mode } from "./ui"; import { Mode } from "./ui";
import UiHandler from "./ui-handler"; import UiHandler from "./ui-handler";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { PlayerPokemon } from "../pokemon"; import { PlayerPokemon } from "../field/pokemon";
import { Type, getTypeRgb } from "../data/type"; import { Type, getTypeRgb } from "../data/type";
import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag, getTextColor } from "./text"; import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag, getTextColor } from "./text";
import Move, { MoveCategory } from "../data/move"; import Move, { MoveCategory } from "../data/move";