1. 新增LangUtil工具类实现统一的多语言映射与参数替换 2. 移除各配置文件中的硬编码多语言包装类,替换为直接中文文本 3. 更新zh.json补充成就相关多语言词条 4. 重构HighlightSet适配新的多语言调用规范
149 lines
7.4 KiB
TypeScript
149 lines
7.4 KiB
TypeScript
/**
|
||
* @file HighlightSet.ts
|
||
* @description 亮点成就配置文件
|
||
*
|
||
* 定义所有亮点成就的等级、触发条件、加分以及称号描述。
|
||
* 每个亮点都包含5个递进等级,奖励分随等级增加。
|
||
*
|
||
* uuid 分组规则:90 + 类型序号(1~9) + 等级(1~5)
|
||
* 9011~9015 = CritMaster 暴击大师
|
||
* 9021~9025 = DeathExpert 送死达人
|
||
* 9031~9035 = IronWall 铁壁铜墙
|
||
* 9041~9045 = WindStorm 风暴之王
|
||
* 9051~9055 = OneHitKill 一击必杀
|
||
* 9061~9065 = HealingLight 治愈之光
|
||
* 9071 = PerfectClear 完美通关
|
||
* 9081~9085 = LuckyKing 欧皇附体
|
||
* 9091~9095 = ThriftyPlayer 节俭玩家
|
||
*
|
||
* 多语言调用方式(与英雄/技能统一):
|
||
* import { lang, langf } from "../common/LangUtil";
|
||
* lang("hl_title", 9011) // → "初级暴击者"
|
||
* langf("hl_desc", 9011, 20) // → "暴击20次"
|
||
*/
|
||
|
||
export enum HighlightType {
|
||
CritMaster = "CritMaster",
|
||
DeathExpert = "DeathExpert",
|
||
IronWall = "IronWall",
|
||
WindStorm = "WindStorm",
|
||
OneHitKill = "OneHitKill",
|
||
HealingLight = "HealingLight",
|
||
PerfectClear = "PerfectClear",
|
||
LuckyKing = "LuckyKing",
|
||
ThriftyPlayer = "ThriftyPlayer"
|
||
}
|
||
|
||
export interface HighlightLevel {
|
||
uuid: number;
|
||
level: number;
|
||
threshold: number;
|
||
scoreBonus: number;
|
||
title: string;
|
||
desc: string;
|
||
}
|
||
|
||
export interface HighlightConfig {
|
||
type: HighlightType;
|
||
icon: string;
|
||
levels: HighlightLevel[];
|
||
}
|
||
|
||
export const HighlightSet: Record<HighlightType, HighlightConfig> = {
|
||
[HighlightType.CritMaster]: {
|
||
type: HighlightType.CritMaster,
|
||
icon: "🔥",
|
||
levels: [
|
||
{ uuid: 9011, level: 1, threshold: 20, scoreBonus: 50, title: "初级暴击者", desc: "暴击20次" },
|
||
{ uuid: 9012, level: 2, threshold: 40, scoreBonus: 100, title: "暴击大师", desc: "暴击40次" },
|
||
{ uuid: 9013, level: 3, threshold: 60, scoreBonus: 150, title: "致命猎手", desc: "暴击60次" },
|
||
{ uuid: 9014, level: 4, threshold: 80, scoreBonus: 200, title: "无情处决", desc: "暴击80次" },
|
||
{ uuid: 9015, level: 5, threshold: 100, scoreBonus: 300, title: "刀刀烈火", desc: "暴击100次" },
|
||
]
|
||
},
|
||
[HighlightType.DeathExpert]: {
|
||
type: HighlightType.DeathExpert,
|
||
icon: "💀",
|
||
levels: [
|
||
{ uuid: 9021, level: 1, threshold: 15, scoreBonus: 50, title: "不怕死", desc: "死亡触发15次" },
|
||
{ uuid: 9022, level: 2, threshold: 25, scoreBonus: 100, title: "送死达人", desc: "死亡触发25次" },
|
||
{ uuid: 9023, level: 3, threshold: 40, scoreBonus: 150, title: "亡灵舞者", desc: "死亡触发40次" },
|
||
{ uuid: 9024, level: 4, threshold: 60, scoreBonus: 200, title: "向死而生", desc: "死亡触发60次" },
|
||
{ uuid: 9025, level: 5, threshold: 80, scoreBonus: 300, title: "不死灾厄", desc: "死亡触发80次" },
|
||
]
|
||
},
|
||
[HighlightType.IronWall]: {
|
||
type: HighlightType.IronWall,
|
||
icon: "🛡️",
|
||
levels: [
|
||
{ uuid: 9031, level: 1, threshold: 15, scoreBonus: 50, title: "坚固盾牌", desc: "格挡15次" },
|
||
{ uuid: 9032, level: 2, threshold: 30, scoreBonus: 100, title: "铁壁铜墙", desc: "格挡30次" },
|
||
{ uuid: 9033, level: 3, threshold: 50, scoreBonus: 150, title: "叹息之墙", desc: "格挡50次" },
|
||
{ uuid: 9034, level: 4, threshold: 70, scoreBonus: 200, title: "不破之阵", desc: "格挡70次" },
|
||
{ uuid: 9035, level: 5, threshold: 100, scoreBonus: 300, title: "绝对防御", desc: "格挡100次" },
|
||
]
|
||
},
|
||
[HighlightType.WindStorm]: {
|
||
type: HighlightType.WindStorm,
|
||
icon: "⚡",
|
||
levels: [
|
||
{ uuid: 9041, level: 1, threshold: 10, scoreBonus: 50, title: "迅捷之风", desc: "风怒10次" },
|
||
{ uuid: 9042, level: 2, threshold: 20, scoreBonus: 100, title: "风暴之王", desc: "风怒20次" },
|
||
{ uuid: 9043, level: 3, threshold: 35, scoreBonus: 150, title: "狂风骤雨", desc: "风怒35次" },
|
||
{ uuid: 9044, level: 4, threshold: 50, scoreBonus: 200, title: "无影之手", desc: "风怒50次" },
|
||
{ uuid: 9045, level: 5, threshold: 70, scoreBonus: 300, title: "神速幻影", desc: "风怒70次" },
|
||
]
|
||
},
|
||
[HighlightType.OneHitKill]: {
|
||
type: HighlightType.OneHitKill,
|
||
icon: "🎯",
|
||
levels: [
|
||
{ uuid: 9051, level: 1, threshold: 100, scoreBonus: 50, title: "重击", desc: "单次伤害100" },
|
||
{ uuid: 9052, level: 2, threshold: 200, scoreBonus: 100, title: "一击必杀", desc: "单次伤害200" },
|
||
{ uuid: 9053, level: 3, threshold: 400, scoreBonus: 150, title: "毁天灭地", desc: "单次伤害400" },
|
||
{ uuid: 9054, level: 4, threshold: 800, scoreBonus: 200, title: "核弹打击", desc: "单次伤害800" },
|
||
{ uuid: 9055, level: 5, threshold: 1500, scoreBonus: 300, title: "弑神一击", desc: "单次伤害1500" },
|
||
]
|
||
},
|
||
[HighlightType.HealingLight]: {
|
||
type: HighlightType.HealingLight,
|
||
icon: "💊",
|
||
levels: [
|
||
{ uuid: 9061, level: 1, threshold: 200, scoreBonus: 50, title: "急救员", desc: "治疗总量200" },
|
||
{ uuid: 9062, level: 2, threshold: 500, scoreBonus: 100, title: "治愈之光", desc: "治疗总量500" },
|
||
{ uuid: 9063, level: 3, threshold: 1000, scoreBonus: 150, title: "生命之泉", desc: "治疗总量1000" },
|
||
{ uuid: 9064, level: 4, threshold: 2000, scoreBonus: 200, title: "起死回生", desc: "治疗总量2000" },
|
||
{ uuid: 9065, level: 5, threshold: 4000, scoreBonus: 300, title: "移动泉水", desc: "治疗总量4000" },
|
||
]
|
||
},
|
||
[HighlightType.PerfectClear]: {
|
||
type: HighlightType.PerfectClear,
|
||
icon: "🏆",
|
||
levels: [
|
||
{ uuid: 9071, level: 1, threshold: 1, scoreBonus: 500, title: "完美通关", desc: "20回合全胜且全存活" },
|
||
]
|
||
},
|
||
[HighlightType.LuckyKing]: {
|
||
type: HighlightType.LuckyKing,
|
||
icon: "🎲",
|
||
levels: [
|
||
{ uuid: 9081, level: 1, threshold: 0.6, scoreBonus: 50, title: "手气不错", desc: "刷新命中率60%" },
|
||
{ uuid: 9082, level: 2, threshold: 0.7, scoreBonus: 100, title: "心想事成", desc: "刷新命中率70%" },
|
||
{ uuid: 9083, level: 3, threshold: 0.8, scoreBonus: 150, title: "欧皇附体", desc: "刷新命中率80%" },
|
||
{ uuid: 9084, level: 4, threshold: 0.9, scoreBonus: 200, title: "天选之子", desc: "刷新命中率90%" },
|
||
{ uuid: 9085, level: 5, threshold: 1.0, scoreBonus: 300, title: "言出法随", desc: "刷新命中率100%" },
|
||
]
|
||
},
|
||
[HighlightType.ThriftyPlayer]: {
|
||
type: HighlightType.ThriftyPlayer,
|
||
icon: "💰",
|
||
levels: [
|
||
{ uuid: 9091, level: 1, threshold: 0.75, scoreBonus: 50, title: "精打细算", desc: "金币使用率75%" },
|
||
{ uuid: 9092, level: 2, threshold: 0.85, scoreBonus: 100, title: "勤俭持家", desc: "金币使用率85%" },
|
||
{ uuid: 9093, level: 3, threshold: 0.95, scoreBonus: 150, title: "节俭玩家", desc: "金币使用率95%" },
|
||
{ uuid: 9094, level: 4, threshold: 0.98, scoreBonus: 200, title: "一毛不拔", desc: "金币使用率98%" },
|
||
{ uuid: 9095, level: 5, threshold: 1.00, scoreBonus: 300, title: "理财大师", desc: "金币使用率100%" },
|
||
]
|
||
}
|
||
};
|