mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
[Refactor] Move type definitions away from game-data.ts
(#6487)
* Move type definitions away from game-data.ts * Update src/@types/data-types.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Renamed file to save-data.ts * Fixed broken import * Moved some ui files * Run biome, fix broken import * Fixed one more broken input
This commit is contained in:
parent
d9d6163b07
commit
9a92f98f63
@ -1,4 +1,4 @@
|
||||
import type { SessionSaveData, SystemSaveData } from "#system/game-data";
|
||||
import type { SessionSaveData, SystemSaveData } from "#types/save-data";
|
||||
|
||||
export interface UpdateAllSavedataRequest {
|
||||
system: SystemSaveData;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { SystemSaveData } from "#system/game-data";
|
||||
import type { SystemSaveData } from "#types/save-data";
|
||||
|
||||
export interface GetSystemSavedataRequest {
|
||||
clientSessionId: string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { ArenaTagTypeMap } from "#data/arena-tag";
|
||||
import type { ArenaTagType } from "#enums/arena-tag-type";
|
||||
// biome-ignore lint/correctness/noUnusedImports: TSDocs
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import type { ObjectValues } from "#types/type-helpers";
|
||||
|
||||
/** Subset of {@linkcode ArenaTagType}s that apply some negative effect to pokemon that switch in ({@link https://bulbapedia.bulbagarden.net/wiki/List_of_moves_that_cause_entry_hazards#List_of_traps | entry hazards} and Imprison. */
|
||||
|
@ -1,7 +1,7 @@
|
||||
// biome-ignore-start lint/correctness/noUnusedImports: Used in a TSDoc comment
|
||||
import type { AbilityBattlerTag, BattlerTagTypeMap, SerializableBattlerTag, TypeBoostTag } from "#data/battler-tags";
|
||||
import type { AbilityId } from "#enums/ability-id";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
// biome-ignore-end lint/correctness/noUnusedImports: Used in a TSDoc comment
|
||||
|
||||
import type { BattlerTagType } from "#enums/battler-tag-type";
|
||||
|
143
src/@types/save-data.ts
Normal file
143
src/@types/save-data.ts
Normal file
@ -0,0 +1,143 @@
|
||||
import type { PokeballCounts } from "#app/battle-scene";
|
||||
import type { Tutorial } from "#app/tutorial";
|
||||
import type { BattleType } from "#enums/battle-type";
|
||||
import type { GameModes } from "#enums/game-modes";
|
||||
import type { MoveId } from "#enums/move-id";
|
||||
import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import type { PlayerGender } from "#enums/player-gender";
|
||||
import type { PokemonType } from "#enums/pokemon-type";
|
||||
import type { MysteryEncounterSaveData } from "#mystery-encounters/mystery-encounter-save-data";
|
||||
import type { Variant } from "#sprites/variant";
|
||||
import type { ArenaData } from "#system/arena-data";
|
||||
import type { ChallengeData } from "#system/challenge-data";
|
||||
import type { EggData } from "#system/egg-data";
|
||||
import type { GameStats } from "#system/game-stats";
|
||||
import type { ModifierData } from "#system/modifier-data";
|
||||
import type { PokemonData } from "#system/pokemon-data";
|
||||
import type { TrainerData } from "#system/trainer-data";
|
||||
import type { DexData } from "./dex-data";
|
||||
|
||||
export interface SystemSaveData {
|
||||
trainerId: number;
|
||||
secretId: number;
|
||||
gender: PlayerGender;
|
||||
dexData: DexData;
|
||||
starterData: StarterData;
|
||||
gameStats: GameStats;
|
||||
unlocks: Unlocks;
|
||||
achvUnlocks: AchvUnlocks;
|
||||
voucherUnlocks: VoucherUnlocks;
|
||||
voucherCounts: VoucherCounts;
|
||||
eggs: EggData[];
|
||||
gameVersion: string;
|
||||
timestamp: number;
|
||||
eggPity: number[];
|
||||
unlockPity: number[];
|
||||
}
|
||||
|
||||
export interface SessionSaveData {
|
||||
seed: string;
|
||||
playTime: number;
|
||||
gameMode: GameModes;
|
||||
party: PokemonData[];
|
||||
enemyParty: PokemonData[];
|
||||
modifiers: ModifierData[];
|
||||
enemyModifiers: ModifierData[];
|
||||
arena: ArenaData;
|
||||
pokeballCounts: PokeballCounts;
|
||||
money: number;
|
||||
score: number;
|
||||
waveIndex: number;
|
||||
battleType: BattleType;
|
||||
trainer: TrainerData;
|
||||
gameVersion: string;
|
||||
/** The player-chosen name of the run */
|
||||
name: string;
|
||||
timestamp: number;
|
||||
challenges: ChallengeData[];
|
||||
mysteryEncounterType: MysteryEncounterType | -1; // Only defined when current wave is ME,
|
||||
mysteryEncounterSaveData: MysteryEncounterSaveData;
|
||||
/**
|
||||
* Counts the amount of pokemon fainted in your party during the current arena encounter.
|
||||
*/
|
||||
playerFaints: number;
|
||||
}
|
||||
|
||||
export interface Unlocks {
|
||||
[key: number]: boolean;
|
||||
}
|
||||
|
||||
export interface AchvUnlocks {
|
||||
[key: string]: number;
|
||||
}
|
||||
|
||||
export interface VoucherUnlocks {
|
||||
[key: string]: number;
|
||||
}
|
||||
|
||||
export interface VoucherCounts {
|
||||
[type: string]: number;
|
||||
}
|
||||
|
||||
export type StarterMoveset = [MoveId] | [MoveId, MoveId] | [MoveId, MoveId, MoveId] | [MoveId, MoveId, MoveId, MoveId];
|
||||
|
||||
export interface StarterFormMoveData {
|
||||
[key: number]: StarterMoveset;
|
||||
}
|
||||
|
||||
export interface StarterMoveData {
|
||||
[key: number]: StarterMoveset | StarterFormMoveData;
|
||||
}
|
||||
|
||||
export interface StarterAttributes {
|
||||
nature?: number;
|
||||
ability?: number;
|
||||
variant?: number;
|
||||
form?: number;
|
||||
female?: boolean;
|
||||
shiny?: boolean;
|
||||
favorite?: boolean;
|
||||
nickname?: string;
|
||||
tera?: PokemonType;
|
||||
}
|
||||
|
||||
export interface DexAttrProps {
|
||||
shiny: boolean;
|
||||
female: boolean;
|
||||
variant: Variant;
|
||||
formIndex: number;
|
||||
}
|
||||
|
||||
export type RunHistoryData = Record<number, RunEntry>;
|
||||
|
||||
export interface RunEntry {
|
||||
entry: SessionSaveData;
|
||||
isVictory: boolean;
|
||||
/*Automatically set to false at the moment - implementation TBD*/
|
||||
isFavorite: boolean;
|
||||
}
|
||||
|
||||
export interface StarterDataEntry {
|
||||
moveset: StarterMoveset | StarterFormMoveData | null;
|
||||
eggMoves: number;
|
||||
candyCount: number;
|
||||
friendship: number;
|
||||
abilityAttr: number;
|
||||
passiveAttr: number;
|
||||
valueReduction: number;
|
||||
classicWinCount: number;
|
||||
}
|
||||
|
||||
export interface StarterData {
|
||||
[key: number]: StarterDataEntry;
|
||||
}
|
||||
|
||||
// TODO: Rework into a bitmask
|
||||
export type TutorialFlags = {
|
||||
[key in Tutorial]: boolean;
|
||||
};
|
||||
|
||||
// TODO: Rework into a bitmask
|
||||
export interface SeenDialogues {
|
||||
[key: string]: boolean;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { SessionSaveData } from "./save-data";
|
||||
|
||||
export interface SessionSaveMigrator {
|
||||
version: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { SystemSaveData } from "#system/game-data";
|
||||
import type { SystemSaveData } from "./save-data";
|
||||
|
||||
export interface SystemSaveMigrator {
|
||||
version: string;
|
||||
|
@ -21,9 +21,10 @@ import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon";
|
||||
import { Trainer } from "#field/trainer";
|
||||
import type { ModifierTypeOption } from "#modifiers/modifier-type";
|
||||
import { PokemonMove } from "#moves/pokemon-move";
|
||||
import type { DexAttrProps, GameData, StarterDataEntry } from "#system/game-data";
|
||||
import type { GameData } from "#system/game-data";
|
||||
import { RibbonData, type RibbonFlag } from "#system/ribbons/ribbon-data";
|
||||
import type { DexEntry } from "#types/dex-data";
|
||||
import type { DexAttrProps, StarterDataEntry } from "#types/save-data";
|
||||
import { type BooleanHolder, isBetween, type NumberHolder, randSeedItem } from "#utils/common";
|
||||
import { deepCopy } from "#utils/data";
|
||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import type { PlayerPokemon } from "#field/pokemon";
|
||||
import type { StarterDataEntry } from "#system/game-data";
|
||||
import type { DexEntry } from "#types/dex-data";
|
||||
import type { StarterDataEntry } from "#types/save-data";
|
||||
|
||||
/**
|
||||
* Stores data associated with a specific egg and the hatched pokemon
|
||||
|
@ -26,8 +26,8 @@ import { loadPokemonVariantAssets } from "#sprites/pokemon-sprite";
|
||||
import { hasExpSprite } from "#sprites/sprite-utils";
|
||||
import type { Variant, VariantSet } from "#sprites/variant";
|
||||
import { populateVariantColorCache, variantColorCache, variantData } from "#sprites/variant";
|
||||
import type { StarterMoveset } from "#system/game-data";
|
||||
import type { Localizable } from "#types/locales";
|
||||
import type { StarterMoveset } from "#types/save-data";
|
||||
import { isNullOrUndefined, randSeedFloat, randSeedGauss, randSeedInt } from "#utils/common";
|
||||
import { getPokemonSpecies } from "#utils/pokemon-utils";
|
||||
import { toCamelCase, toPascalCase } from "#utils/strings";
|
||||
|
@ -137,13 +137,13 @@ import { loadMoveAnimations } from "#sprites/pokemon-asset-loader";
|
||||
import type { Variant } from "#sprites/variant";
|
||||
import { populateVariantColors, variantColorCache, variantData } from "#sprites/variant";
|
||||
import { achvs } from "#system/achv";
|
||||
import type { StarterDataEntry, StarterMoveset } from "#system/game-data";
|
||||
import type { PokemonData } from "#system/pokemon-data";
|
||||
import { RibbonData } from "#system/ribbons/ribbon-data";
|
||||
import { awardRibbonsToSpeciesLine } from "#system/ribbons/ribbon-methods";
|
||||
import type { AbAttrMap, AbAttrString, TypeMultiplierAbAttrParams } from "#types/ability-types";
|
||||
import type { DamageCalculationResult, DamageResult } from "#types/damage-result";
|
||||
import type { IllusionData } from "#types/illusion-data";
|
||||
import type { StarterDataEntry, StarterMoveset } from "#types/save-data";
|
||||
import type { TurnMove } from "#types/turn-move";
|
||||
import { BattleInfo } from "#ui/battle-info";
|
||||
import { EnemyBattleInfo } from "#ui/enemy-battle-info";
|
||||
|
@ -16,13 +16,13 @@ import type { EndCardPhase } from "#phases/end-card-phase";
|
||||
import { achvs, ChallengeAchv } from "#system/achv";
|
||||
import { ArenaData } from "#system/arena-data";
|
||||
import { ChallengeData } from "#system/challenge-data";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import { ModifierData as PersistentModifierData } from "#system/modifier-data";
|
||||
import { PokemonData } from "#system/pokemon-data";
|
||||
import { RibbonData, type RibbonFlag } from "#system/ribbons/ribbon-data";
|
||||
import { awardRibbonsToSpeciesLine } from "#system/ribbons/ribbon-methods";
|
||||
import { TrainerData } from "#system/trainer-data";
|
||||
import { trainerConfigs } from "#trainers/trainer-config";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import { checkSpeciesValidForChallenge, isNuzlockeChallenge } from "#utils/challenge-utils";
|
||||
import { isLocal, isLocalServerConnected } from "#utils/common";
|
||||
import { getPokemonSpecies } from "#utils/pokemon-utils";
|
||||
|
@ -14,8 +14,8 @@ import { Unlockables } from "#enums/unlockables";
|
||||
import { getBiomeKey } from "#field/arena";
|
||||
import type { Modifier } from "#modifiers/modifier";
|
||||
import { getDailyRunStarterModifiers, regenerateModifierPoolThresholds } from "#modifiers/modifier-type";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import { vouchers } from "#system/voucher";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import type { OptionSelectConfig, OptionSelectItem } from "#ui/handlers/abstract-option-select-ui-handler";
|
||||
import { SaveSlotUiMode } from "#ui/handlers/save-slot-select-ui-handler";
|
||||
import { isLocal, isLocalServerConnected, isNullOrUndefined } from "#utils/common";
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { ApiBase } from "#api/api-base";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type {
|
||||
ClearSessionSavedataRequest,
|
||||
ClearSessionSavedataResponse,
|
||||
@ -8,6 +7,7 @@ import type {
|
||||
NewClearSessionSavedataRequest,
|
||||
UpdateSessionSavedataRequest,
|
||||
} from "#types/api/pokerogue-session-save-data-api";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
|
||||
/**
|
||||
* A wrapper for PokéRogue session savedata API requests.
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { pokerogueApi } from "#api/pokerogue-api";
|
||||
import { clientSessionId, loggedInUser, updateUserInfo } from "#app/account";
|
||||
import type { PokeballCounts } from "#app/battle-scene";
|
||||
import { defaultStarterSpecies, saveKey } from "#app/constants";
|
||||
import { getGameMode } from "#app/game-mode";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
@ -24,11 +23,9 @@ import { Device } from "#enums/devices";
|
||||
import { DexAttr } from "#enums/dex-attr";
|
||||
import { GameDataType } from "#enums/game-data-type";
|
||||
import { GameModes } from "#enums/game-modes";
|
||||
import type { MoveId } from "#enums/move-id";
|
||||
import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import { Nature } from "#enums/nature";
|
||||
import { PlayerGender } from "#enums/player-gender";
|
||||
import type { PokemonType } from "#enums/pokemon-type";
|
||||
import { SpeciesId } from "#enums/species-id";
|
||||
import { StatusEffect } from "#enums/status-effect";
|
||||
import { TrainerVariant } from "#enums/trainer-variant";
|
||||
@ -62,6 +59,19 @@ import {
|
||||
import { VoucherType, vouchers } from "#system/voucher";
|
||||
import { trainerConfigs } from "#trainers/trainer-config";
|
||||
import type { DexData, DexEntry } from "#types/dex-data";
|
||||
import type {
|
||||
AchvUnlocks,
|
||||
DexAttrProps,
|
||||
RunHistoryData,
|
||||
SeenDialogues,
|
||||
SessionSaveData,
|
||||
StarterData,
|
||||
SystemSaveData,
|
||||
TutorialFlags,
|
||||
Unlocks,
|
||||
VoucherCounts,
|
||||
VoucherUnlocks,
|
||||
} from "#types/save-data";
|
||||
import { RUN_HISTORY_LIMIT } from "#ui/handlers/run-history-ui-handler";
|
||||
import { applyChallenges } from "#utils/challenge-utils";
|
||||
import { executeIf, fixedInt, isLocal, NumberHolder, randInt, randSeedItem } from "#utils/common";
|
||||
@ -94,132 +104,6 @@ function getDataTypeKey(dataType: GameDataType, slotId = 0): string {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Move all these exported interfaces to @types
|
||||
export interface SystemSaveData {
|
||||
trainerId: number;
|
||||
secretId: number;
|
||||
gender: PlayerGender;
|
||||
dexData: DexData;
|
||||
starterData: StarterData;
|
||||
gameStats: GameStats;
|
||||
unlocks: Unlocks;
|
||||
achvUnlocks: AchvUnlocks;
|
||||
voucherUnlocks: VoucherUnlocks;
|
||||
voucherCounts: VoucherCounts;
|
||||
eggs: EggData[];
|
||||
gameVersion: string;
|
||||
timestamp: number;
|
||||
eggPity: number[];
|
||||
unlockPity: number[];
|
||||
}
|
||||
|
||||
export interface SessionSaveData {
|
||||
seed: string;
|
||||
playTime: number;
|
||||
gameMode: GameModes;
|
||||
party: PokemonData[];
|
||||
enemyParty: PokemonData[];
|
||||
modifiers: PersistentModifierData[];
|
||||
enemyModifiers: PersistentModifierData[];
|
||||
arena: ArenaData;
|
||||
pokeballCounts: PokeballCounts;
|
||||
money: number;
|
||||
score: number;
|
||||
waveIndex: number;
|
||||
battleType: BattleType;
|
||||
trainer: TrainerData;
|
||||
gameVersion: string;
|
||||
/** The player-chosen name of the run */
|
||||
name: string;
|
||||
timestamp: number;
|
||||
challenges: ChallengeData[];
|
||||
mysteryEncounterType: MysteryEncounterType | -1; // Only defined when current wave is ME,
|
||||
mysteryEncounterSaveData: MysteryEncounterSaveData;
|
||||
/**
|
||||
* Counts the amount of pokemon fainted in your party during the current arena encounter.
|
||||
*/
|
||||
playerFaints: number;
|
||||
}
|
||||
|
||||
interface Unlocks {
|
||||
[key: number]: boolean;
|
||||
}
|
||||
|
||||
export interface AchvUnlocks {
|
||||
[key: string]: number;
|
||||
}
|
||||
|
||||
export interface VoucherUnlocks {
|
||||
[key: string]: number;
|
||||
}
|
||||
|
||||
export interface VoucherCounts {
|
||||
[type: string]: number;
|
||||
}
|
||||
|
||||
export type StarterMoveset = [MoveId] | [MoveId, MoveId] | [MoveId, MoveId, MoveId] | [MoveId, MoveId, MoveId, MoveId];
|
||||
|
||||
export interface StarterFormMoveData {
|
||||
[key: number]: StarterMoveset;
|
||||
}
|
||||
|
||||
export interface StarterMoveData {
|
||||
[key: number]: StarterMoveset | StarterFormMoveData;
|
||||
}
|
||||
|
||||
export interface StarterAttributes {
|
||||
nature?: number;
|
||||
ability?: number;
|
||||
variant?: number;
|
||||
form?: number;
|
||||
female?: boolean;
|
||||
shiny?: boolean;
|
||||
favorite?: boolean;
|
||||
nickname?: string;
|
||||
tera?: PokemonType;
|
||||
}
|
||||
|
||||
export interface DexAttrProps {
|
||||
shiny: boolean;
|
||||
female: boolean;
|
||||
variant: Variant;
|
||||
formIndex: number;
|
||||
}
|
||||
|
||||
export type RunHistoryData = Record<number, RunEntry>;
|
||||
|
||||
export interface RunEntry {
|
||||
entry: SessionSaveData;
|
||||
isVictory: boolean;
|
||||
/*Automatically set to false at the moment - implementation TBD*/
|
||||
isFavorite: boolean;
|
||||
}
|
||||
|
||||
export interface StarterDataEntry {
|
||||
moveset: StarterMoveset | StarterFormMoveData | null;
|
||||
eggMoves: number;
|
||||
candyCount: number;
|
||||
friendship: number;
|
||||
abilityAttr: number;
|
||||
passiveAttr: number;
|
||||
valueReduction: number;
|
||||
classicWinCount: number;
|
||||
}
|
||||
|
||||
export interface StarterData {
|
||||
[key: number]: StarterDataEntry;
|
||||
}
|
||||
|
||||
// TODO: Rework into a bitmask
|
||||
export type TutorialFlags = {
|
||||
[key in Tutorial]: boolean;
|
||||
};
|
||||
|
||||
// TODO: Rework into a bitmask
|
||||
export interface SeenDialogues {
|
||||
[key: string]: boolean;
|
||||
}
|
||||
|
||||
const systemShortKeys = {
|
||||
seenAttr: "$sa",
|
||||
caughtAttr: "$ca",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** biome-ignore-all lint/performance/noNamespaceImport: Convenience */
|
||||
|
||||
import { version } from "#package.json";
|
||||
import type { SessionSaveData, SystemSaveData } from "#system/game-data";
|
||||
import type { SessionSaveData, SystemSaveData } from "#types/save-data";
|
||||
import type { SessionSaveMigrator } from "#types/session-save-migrator";
|
||||
import type { SettingsSaveMigrator } from "#types/settings-save-migrator";
|
||||
import type { SystemSaveMigrator } from "#types/system-save-migrator";
|
||||
|
@ -3,8 +3,8 @@ import { allSpecies } from "#data/data-lists";
|
||||
import { CustomPokemonData } from "#data/pokemon-data";
|
||||
import { AbilityAttr } from "#enums/ability-attr";
|
||||
import { DexAttr } from "#enums/dex-attr";
|
||||
import type { SessionSaveData, SystemSaveData } from "#system/game-data";
|
||||
import { SettingKeys } from "#system/settings";
|
||||
import type { SessionSaveData, SystemSaveData } from "#types/save-data";
|
||||
import type { SessionSaveMigrator } from "#types/session-save-migrator";
|
||||
import type { SettingsSaveMigrator } from "#types/settings-save-migrator";
|
||||
import type { SystemSaveMigrator } from "#types/system-save-migrator";
|
||||
|
@ -2,7 +2,7 @@ import type { BattlerIndex } from "#enums/battler-index";
|
||||
import type { MoveId } from "#enums/move-id";
|
||||
import type { MoveResult } from "#enums/move-result";
|
||||
import { MoveUseMode } from "#enums/move-use-mode";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import type { SessionSaveMigrator } from "#types/session-save-migrator";
|
||||
import type { TurnMove } from "#types/turn-move";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import { DexAttr } from "#enums/dex-attr";
|
||||
import type { SessionSaveData, SystemSaveData } from "#system/game-data";
|
||||
import type { SessionSaveData, SystemSaveData } from "#types/save-data";
|
||||
import type { SessionSaveMigrator } from "#types/session-save-migrator";
|
||||
import type { SystemSaveMigrator } from "#types/system-save-migrator";
|
||||
import { isNullOrUndefined } from "#utils/common";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DexAttr } from "#enums/dex-attr";
|
||||
import { SpeciesId } from "#enums/species-id";
|
||||
import type { SystemSaveData } from "#system/game-data";
|
||||
import type { SystemSaveData } from "#types/save-data";
|
||||
import type { SystemSaveMigrator } from "#types/system-save-migrator";
|
||||
import { getPokemonSpecies } from "#utils/pokemon-utils";
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { MoveId } from "#enums/move-id";
|
||||
import { PokemonMove } from "#moves/pokemon-move";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { PokemonData } from "#system/pokemon-data";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import type { SessionSaveMigrator } from "#types/session-save-migrator";
|
||||
|
||||
/**
|
||||
|
@ -9,11 +9,11 @@ import { PokemonType } from "#enums/pokemon-type";
|
||||
import { SpeciesId } from "#enums/species-id";
|
||||
import { TextStyle } from "#enums/text-style";
|
||||
import type { PlayerPokemon } from "#field/pokemon";
|
||||
import { PokemonInfoContainer } from "#ui/containers/pokemon-info-container";
|
||||
import { addTextObject } from "#ui/text";
|
||||
import { padInt, rgbHexToRgba } from "#utils/common";
|
||||
import { getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
||||
import { argbFromRgba } from "@material/material-color-utilities";
|
||||
import { PokemonInfoContainer } from "./pokemon-info-container";
|
||||
|
||||
/**
|
||||
* Class for the hatch info summary of each pokemon
|
||||
|
@ -6,15 +6,15 @@ import { PokemonType } from "#enums/pokemon-type";
|
||||
import { TextStyle } from "#enums/text-style";
|
||||
import type { Pokemon } from "#field/pokemon";
|
||||
import { getVariantTint } from "#sprites/variant";
|
||||
import type { StarterDataEntry } from "#system/game-data";
|
||||
import type { DexEntry } from "#types/dex-data";
|
||||
import { StatsContainer } from "#ui/containers/stats-container";
|
||||
import type { StarterDataEntry } from "#types/save-data";
|
||||
import { ConfirmUiHandler } from "#ui/handlers/confirm-ui-handler";
|
||||
import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||
import { addWindow } from "#ui/ui-theme";
|
||||
import { fixedInt, getShinyDescriptor } from "#utils/common";
|
||||
import i18next from "i18next";
|
||||
import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||
import { StatsContainer } from "./stats-container";
|
||||
|
||||
interface LanguageSetting {
|
||||
infoContainerTextSize: string;
|
||||
|
@ -5,9 +5,9 @@ import { TextStyle } from "#enums/text-style";
|
||||
import type { UiMode } from "#enums/ui-mode";
|
||||
import type { Achv } from "#system/achv";
|
||||
import { achvs, getAchievementDescription } from "#system/achv";
|
||||
import type { AchvUnlocks, VoucherUnlocks } from "#system/game-data";
|
||||
import type { Voucher } from "#system/voucher";
|
||||
import { getVoucherTypeIcon, getVoucherTypeName, vouchers } from "#system/voucher";
|
||||
import type { AchvUnlocks, VoucherUnlocks } from "#types/save-data";
|
||||
import { ScrollBar } from "#ui/containers/scroll-bar";
|
||||
import { MessageUiHandler } from "#ui/handlers/message-ui-handler";
|
||||
import { addTextObject } from "#ui/text";
|
||||
|
@ -43,9 +43,9 @@ import { TimeOfDay } from "#enums/time-of-day";
|
||||
import { UiMode } from "#enums/ui-mode";
|
||||
import type { Variant } from "#sprites/variant";
|
||||
import { getVariantIcon, getVariantTint } from "#sprites/variant";
|
||||
import type { StarterAttributes } from "#system/game-data";
|
||||
import { SettingKeyboard } from "#system/settings-keyboard";
|
||||
import type { DexEntry } from "#types/dex-data";
|
||||
import type { StarterAttributes } from "#types/save-data";
|
||||
import { BaseStatsOverlay } from "#ui/containers/base-stats-overlay";
|
||||
import { MoveInfoOverlay } from "#ui/containers/move-info-overlay";
|
||||
import { PokedexInfoOverlay } from "#ui/containers/pokedex-info-overlay";
|
||||
|
@ -31,9 +31,9 @@ import { UiMode } from "#enums/ui-mode";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import type { Variant } from "#sprites/variant";
|
||||
import { getVariantIcon, getVariantTint } from "#sprites/variant";
|
||||
import type { DexAttrProps, StarterAttributes } from "#system/game-data";
|
||||
import { SettingKeyboard } from "#system/settings-keyboard";
|
||||
import type { DexEntry } from "#types/dex-data";
|
||||
import type { DexAttrProps, StarterAttributes } from "#types/save-data";
|
||||
import {
|
||||
DropDown,
|
||||
DropDownLabel,
|
||||
|
@ -6,8 +6,8 @@ import { PlayerGender } from "#enums/player-gender";
|
||||
import { TextStyle } from "#enums/text-style";
|
||||
import { TrainerVariant } from "#enums/trainer-variant";
|
||||
import { UiMode } from "#enums/ui-mode";
|
||||
import type { RunEntry } from "#system/game-data";
|
||||
import type { PokemonData } from "#system/pokemon-data";
|
||||
import type { RunEntry } from "#types/save-data";
|
||||
import { MessageUiHandler } from "#ui/handlers/message-ui-handler";
|
||||
import { RunDisplayMode } from "#ui/handlers/run-info-ui-handler";
|
||||
import { addTextObject } from "#ui/text";
|
||||
|
@ -19,9 +19,9 @@ import { UiMode } from "#enums/ui-mode";
|
||||
import * as Modifier from "#modifiers/modifier";
|
||||
import { getLuckString, getLuckTextTint } from "#modifiers/modifier-type";
|
||||
import { getVariantTint } from "#sprites/variant";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { PokemonData } from "#system/pokemon-data";
|
||||
import { SettingKeyboard } from "#system/settings-keyboard";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import { UiHandler } from "#ui/handlers/ui-handler";
|
||||
import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||
import { addWindow } from "#ui/ui-theme";
|
||||
|
@ -6,8 +6,8 @@ import { TextStyle } from "#enums/text-style";
|
||||
import { UiMode } from "#enums/ui-mode";
|
||||
// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts`
|
||||
import * as Modifier from "#modifiers/modifier";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { PokemonData } from "#system/pokemon-data";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import type { OptionSelectConfig } from "#ui/handlers/abstract-option-select-ui-handler";
|
||||
import { MessageUiHandler } from "#ui/handlers/message-ui-handler";
|
||||
import { RunDisplayMode } from "#ui/handlers/run-info-ui-handler";
|
||||
|
@ -46,10 +46,10 @@ import { BattleSceneEventType } from "#events/battle-scene";
|
||||
import type { Variant } from "#sprites/variant";
|
||||
import { getVariantIcon, getVariantTint } from "#sprites/variant";
|
||||
import { achvs } from "#system/achv";
|
||||
import type { DexAttrProps, StarterAttributes, StarterDataEntry, StarterMoveset } from "#system/game-data";
|
||||
import { RibbonData } from "#system/ribbons/ribbon-data";
|
||||
import { SettingKeyboard } from "#system/settings-keyboard";
|
||||
import type { DexEntry } from "#types/dex-data";
|
||||
import type { DexAttrProps, StarterAttributes, StarterDataEntry, StarterMoveset } from "#types/save-data";
|
||||
import {
|
||||
DropDown,
|
||||
DropDownLabel,
|
||||
|
@ -12,8 +12,8 @@ import type { MoveSourceType } from "#enums/move-source-type";
|
||||
import type { SpeciesId } from "#enums/species-id";
|
||||
import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon";
|
||||
import type { ModifierTypeOption } from "#modifiers/modifier-type";
|
||||
import type { DexAttrProps, StarterDataEntry } from "#system/game-data";
|
||||
import type { DexEntry } from "#types/dex-data";
|
||||
import type { DexAttrProps, StarterDataEntry } from "#types/save-data";
|
||||
import { BooleanHolder, type NumberHolder } from "./common";
|
||||
import { getPokemonSpecies } from "./pokemon-utils";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { loggedInUser } from "#app/account";
|
||||
import { saveKey } from "#app/constants";
|
||||
import type { StarterAttributes } from "#system/game-data";
|
||||
import type { StarterAttributes } from "#types/save-data";
|
||||
import { AES, enc } from "crypto-js";
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { PokerogueSessionSavedataApi } from "#api/pokerogue-session-savedata-api";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import { initServerForApiTests } from "#test/test-utils/test-file-initialization";
|
||||
import { getApiBaseUrl } from "#test/test-utils/test-utils";
|
||||
import type {
|
||||
@ -10,6 +9,7 @@ import type {
|
||||
NewClearSessionSavedataRequest,
|
||||
UpdateSessionSavedataRequest,
|
||||
} from "#types/api/pokerogue-session-save-data-api";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import { HttpResponse, http } from "msw";
|
||||
import type { SetupServerApi } from "msw/node";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { PokerogueSystemSavedataApi } from "#api/pokerogue-system-savedata-api";
|
||||
import type { SystemSaveData } from "#system/game-data";
|
||||
import { initServerForApiTests } from "#test/test-utils/test-file-initialization";
|
||||
import { getApiBaseUrl } from "#test/test-utils/test-utils";
|
||||
import type {
|
||||
@ -8,6 +7,7 @@ import type {
|
||||
VerifySystemSavedataRequest,
|
||||
VerifySystemSavedataResponse,
|
||||
} from "#types/api/pokerogue-system-save-data-api";
|
||||
import type { SystemSaveData } from "#types/save-data";
|
||||
import { HttpResponse, http } from "msw";
|
||||
import type { SetupServerApi } from "msw/node";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
@ -3,8 +3,8 @@ import * as account from "#app/account";
|
||||
import * as bypassLoginModule from "#app/global-vars/bypass-login";
|
||||
import { AbilityId } from "#enums/ability-id";
|
||||
import { MoveId } from "#enums/move-id";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import { GameManager } from "#test/test-utils/game-manager";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import * as account from "#app/account";
|
||||
import * as bypassLoginModule from "#app/global-vars/bypass-login";
|
||||
import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
|
||||
import type { SessionSaveData } from "#app/system/game-data";
|
||||
import { AbilityId } from "#enums/ability-id";
|
||||
import { MoveId } from "#enums/move-id";
|
||||
import { GameManager } from "#test/test-utils/game-manager";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { GameModes } from "#enums/game-modes";
|
||||
import type { MoveId } from "#enums/move-id";
|
||||
import type { SpeciesId } from "#enums/species-id";
|
||||
import { PlayerPokemon } from "#field/pokemon";
|
||||
import type { StarterMoveset } from "#system/game-data";
|
||||
import type { StarterMoveset } from "#types/save-data";
|
||||
import type { Starter } from "#ui/handlers/starter-select-ui-handler";
|
||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
||||
|
||||
|
@ -3,9 +3,9 @@ import { UiMode } from "#enums/ui-mode";
|
||||
import { CommandPhase } from "#phases/command-phase";
|
||||
import { TitlePhase } from "#phases/title-phase";
|
||||
import { TurnInitPhase } from "#phases/turn-init-phase";
|
||||
import type { SessionSaveData } from "#system/game-data";
|
||||
import type { GameManager } from "#test/test-utils/game-manager";
|
||||
import { GameManagerHelper } from "#test/test-utils/helpers/game-manager-helper";
|
||||
import type { SessionSaveData } from "#types/save-data";
|
||||
import { vi } from "vitest";
|
||||
|
||||
/**
|
||||
|
@ -6,8 +6,8 @@ import { DropDownColumn } from "#enums/drop-down-column";
|
||||
import { PokemonType } from "#enums/pokemon-type";
|
||||
import { SpeciesId } from "#enums/species-id";
|
||||
import { UiMode } from "#enums/ui-mode";
|
||||
import type { StarterAttributes } from "#system/game-data";
|
||||
import { GameManager } from "#test/test-utils/game-manager";
|
||||
import type { StarterAttributes } from "#types/save-data";
|
||||
import { FilterTextRow } from "#ui/containers/filter-text";
|
||||
import { PokedexPageUiHandler } from "#ui/handlers/pokedex-page-ui-handler";
|
||||
import { PokedexUiHandler } from "#ui/handlers/pokedex-ui-handler";
|
||||
|
Loading…
Reference in New Issue
Block a user