初始仓库迁移
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-04 23:57:06 +08:00
parent 80986b790d
commit c49c64896a
18446 changed files with 532435 additions and 2 deletions

110
src/types/items.ts Normal file
View File

@@ -0,0 +1,110 @@
import type {AttributeVector, ItemAttributeResonance} from './attributes';
import type {TimedBuildBuff} from './build';
import {
type EquipmentSlotId,
type ItemRarity,
type ItemWorldAffinity,
WorldType,
} from './core';
import type {RuntimeItemMetadata} from './runtimeItem';
export interface InventoryItem {
id: string;
category: string;
name: string;
quantity: number;
rarity: ItemRarity;
tags: string[];
catalogId?: string;
iconSrc?: string;
description?: string;
worldAffinity?: ItemWorldAffinity;
equipmentSlotId?: EquipmentSlotId | null;
worldProfiles?: Partial<Record<WorldType, ItemWorldProfile>>;
statProfile?: ItemStatProfile | null;
useProfile?: ItemUseProfile | null;
buildProfile?: ItemBuildProfile | null;
value?: number;
attributeResonance?: ItemAttributeResonance | null;
runtimeMetadata?: RuntimeItemMetadata | null;
}
export interface MonsterLootEntry {
id: string;
item: InventoryItem;
dropRate: number;
}
export interface ItemCatalogEntry {
id: string;
sourcePath: string;
iconSrc: string;
name: string;
category: string;
rarity: ItemRarity;
tags: string[];
description: string;
worldAffinity: ItemWorldAffinity;
equipmentSlotId?: EquipmentSlotId | null;
worldProfiles?: Partial<Record<WorldType, ItemWorldProfile>>;
statProfile?: ItemStatProfile | null;
useProfile?: ItemUseProfile | null;
buildProfile?: ItemBuildProfile | null;
value?: number;
attributeResonance?: ItemAttributeResonance | null;
runtimeMetadata?: RuntimeItemMetadata | null;
}
export interface ItemCatalogOverride {
name?: string;
category?: string;
rarity?: ItemRarity;
tags?: string[];
description?: string;
worldAffinity?: ItemWorldAffinity;
equipmentSlotId?: EquipmentSlotId | null;
worldProfiles?: Partial<Record<WorldType, ItemWorldProfile>>;
statProfile?: ItemStatProfile | null;
useProfile?: ItemUseProfile | null;
buildProfile?: ItemBuildProfile | null;
value?: number;
attributeResonance?: ItemAttributeResonance | null;
runtimeMetadata?: RuntimeItemMetadata | null;
}
export interface ItemWorldProfile {
name: string;
description: string;
}
export interface ItemStatProfile {
maxHpBonus?: number;
maxManaBonus?: number;
outgoingDamageBonus?: number;
incomingDamageMultiplier?: number;
}
export interface ItemUseProfile {
hpRestore?: number;
manaRestore?: number;
cooldownReduction?: number;
buildBuffs?: TimedBuildBuff[];
}
export interface ItemBuildProfile {
role: string;
tags: string[];
setId?: string;
setName?: string;
pieceName?: string;
synergy?: string[];
craftTags?: string[];
forgeRank?: number;
resonanceVector?: AttributeVector;
}
export interface EquipmentLoadout {
weapon: InventoryItem | null;
armor: InventoryItem | null;
relic: InventoryItem | null;
}