55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import { WorldType } from '../types';
|
|
|
|
const ATTRIBUTE_LABELS = {
|
|
strength: 'Strength',
|
|
agility: 'Agility',
|
|
intelligence: 'Intelligence',
|
|
spirit: 'Spirit',
|
|
} as const;
|
|
|
|
const RESOURCE_LABELS = {
|
|
hp: 'HP',
|
|
mp: 'MP',
|
|
maxHp: '生命上限',
|
|
maxMp: '灵力上限',
|
|
damage: 'Damage',
|
|
guard: 'Guard',
|
|
range: 'Range',
|
|
cooldown: 'Cooldown',
|
|
manaCost: '灵力消耗',
|
|
} as const;
|
|
|
|
export function buildThemedSkillName(_profile: unknown, style: string, index = 0) {
|
|
return `${style || 'skill'}-${index + 1}`;
|
|
}
|
|
|
|
export function buildCustomCampSceneName(profile: { name?: string } | null | undefined) {
|
|
return profile?.name ? `${profile.name} Camp` : 'Camp';
|
|
}
|
|
|
|
export function getAttributeLabelsForWorld(_worldType: WorldType | null) {
|
|
return ATTRIBUTE_LABELS;
|
|
}
|
|
|
|
export function getResourceLabelsForWorld(_worldType: WorldType | null) {
|
|
return RESOURCE_LABELS;
|
|
}
|
|
|
|
export function buildThemedItemName(_profile: unknown, category: string, rarity: string, seedKey: string) {
|
|
return `${category}-${rarity}-${seedKey}`;
|
|
}
|
|
|
|
export function buildThemedItemDescription(_profile: unknown, category: string, rarity: string, seedKey: string) {
|
|
return `${category}-${rarity}-${seedKey} description`;
|
|
}
|
|
|
|
export function inferCustomItemMechanics() {
|
|
return {
|
|
tags: [],
|
|
equipmentSlotId: null,
|
|
statProfile: null,
|
|
useProfile: null,
|
|
value: 0,
|
|
};
|
|
}
|