- 添加亮点成就配置文件,定义九类成就及其等级阈值、奖励分数和称号 - 在游戏得分统计数据结构中增加已达成亮点记录字段 - 实现亮点成就判定逻辑,根据玩家表现计算达成的最高等级 - 将亮点成就奖励分数计入总分计算,并在结算界面展示前三个亮点 - 新增动画资源用于界面表现
132 lines
6.7 KiB
TypeScript
132 lines
6.7 KiB
TypeScript
/**
|
||
* @file HighlightSet.ts
|
||
* @description 亮点成就配置文件
|
||
*
|
||
* 定义所有亮点成就的等级、触发条件、加分以及称号描述。
|
||
* 每个亮点都包含5个递进等级,奖励分随等级增加。
|
||
*/
|
||
|
||
export enum HighlightType {
|
||
CritMaster = "CritMaster", // 暴击大师
|
||
DeathExpert = "DeathExpert", // 送死达人
|
||
IronWall = "IronWall", // 铁壁铜墙
|
||
WindStorm = "WindStorm", // 风暴之王
|
||
OneHitKill = "OneHitKill", // 一击必杀
|
||
HealingLight = "HealingLight", // 治愈之光
|
||
PerfectClear = "PerfectClear", // 完美通关 (特殊,只有一档或布尔判定)
|
||
LuckyKing = "LuckyKing", // 欧皇附体
|
||
ThriftyPlayer = "ThriftyPlayer" // 节俭玩家
|
||
}
|
||
|
||
export interface HighlightLevel {
|
||
level: number; // 成就等级 (1-5)
|
||
threshold: number; // 达成阈值 (如:暴击40次)
|
||
scoreBonus: number; // 额外加分
|
||
title: string; // 成就称号
|
||
desc: string; // 成就描述模板
|
||
}
|
||
|
||
export interface HighlightConfig {
|
||
type: HighlightType;
|
||
icon: string; // 显示前缀icon,如 "🔥"
|
||
levels: HighlightLevel[];
|
||
}
|
||
|
||
export const HighlightSet: Record<HighlightType, HighlightConfig> = {
|
||
[HighlightType.CritMaster]: {
|
||
type: HighlightType.CritMaster,
|
||
icon: "🔥",
|
||
levels: [
|
||
{ level: 1, threshold: 20, scoreBonus: 50, title: "初级暴击者", desc: "暴击{0}次" },
|
||
{ level: 2, threshold: 40, scoreBonus: 100, title: "暴击大师", desc: "暴击{0}次" },
|
||
{ level: 3, threshold: 60, scoreBonus: 150, title: "致命猎手", desc: "暴击{0}次" },
|
||
{ level: 4, threshold: 80, scoreBonus: 200, title: "无情处决", desc: "暴击{0}次" },
|
||
{ level: 5, threshold: 100, scoreBonus: 300, title: "刀刀烈火", desc: "暴击{0}次" },
|
||
]
|
||
},
|
||
[HighlightType.DeathExpert]: {
|
||
type: HighlightType.DeathExpert,
|
||
icon: "💀",
|
||
levels: [
|
||
{ level: 1, threshold: 15, scoreBonus: 50, title: "不怕死", desc: "死亡触发{0}次" },
|
||
{ level: 2, threshold: 25, scoreBonus: 100, title: "送死达人", desc: "死亡触发{0}次" },
|
||
{ level: 3, threshold: 40, scoreBonus: 150, title: "亡灵舞者", desc: "死亡触发{0}次" },
|
||
{ level: 4, threshold: 60, scoreBonus: 200, title: "向死而生", desc: "死亡触发{0}次" },
|
||
{ level: 5, threshold: 80, scoreBonus: 300, title: "不死灾厄", desc: "死亡触发{0}次" },
|
||
]
|
||
},
|
||
[HighlightType.IronWall]: {
|
||
type: HighlightType.IronWall,
|
||
icon: "🛡️",
|
||
levels: [
|
||
{ level: 1, threshold: 15, scoreBonus: 50, title: "坚固盾牌", desc: "格挡{0}次" },
|
||
{ level: 2, threshold: 30, scoreBonus: 100, title: "铁壁铜墙", desc: "格挡{0}次" },
|
||
{ level: 3, threshold: 50, scoreBonus: 150, title: "叹息之墙", desc: "格挡{0}次" },
|
||
{ level: 4, threshold: 70, scoreBonus: 200, title: "不破之阵", desc: "格挡{0}次" },
|
||
{ level: 5, threshold: 100, scoreBonus: 300, title: "绝对防御", desc: "格挡{0}次" },
|
||
]
|
||
},
|
||
[HighlightType.WindStorm]: {
|
||
type: HighlightType.WindStorm,
|
||
icon: "⚡",
|
||
levels: [
|
||
{ level: 1, threshold: 10, scoreBonus: 50, title: "迅捷之风", desc: "风怒{0}次" },
|
||
{ level: 2, threshold: 20, scoreBonus: 100, title: "风暴之王", desc: "风怒{0}次" },
|
||
{ level: 3, threshold: 35, scoreBonus: 150, title: "狂风骤雨", desc: "风怒{0}次" },
|
||
{ level: 4, threshold: 50, scoreBonus: 200, title: "无影之手", desc: "风怒{0}次" },
|
||
{ level: 5, threshold: 70, scoreBonus: 300, title: "神速幻影", desc: "风怒{0}次" },
|
||
]
|
||
},
|
||
[HighlightType.OneHitKill]: {
|
||
type: HighlightType.OneHitKill,
|
||
icon: "🎯",
|
||
levels: [
|
||
{ level: 1, threshold: 100, scoreBonus: 50, title: "重击", desc: "单次伤害{0}" },
|
||
{ level: 2, threshold: 200, scoreBonus: 100, title: "一击必杀", desc: "单次伤害{0}" },
|
||
{ level: 3, threshold: 400, scoreBonus: 150, title: "毁天灭地", desc: "单次伤害{0}" },
|
||
{ level: 4, threshold: 800, scoreBonus: 200, title: "核弹打击", desc: "单次伤害{0}" },
|
||
{ level: 5, threshold: 1500, scoreBonus: 300, title: "弑神一击", desc: "单次伤害{0}" },
|
||
]
|
||
},
|
||
[HighlightType.HealingLight]: {
|
||
type: HighlightType.HealingLight,
|
||
icon: "💊",
|
||
levels: [
|
||
{ level: 1, threshold: 200, scoreBonus: 50, title: "急救员", desc: "治疗总量{0}" },
|
||
{ level: 2, threshold: 500, scoreBonus: 100, title: "治愈之光", desc: "治疗总量{0}" },
|
||
{ level: 3, threshold: 1000, scoreBonus: 150, title: "生命之泉", desc: "治疗总量{0}" },
|
||
{ level: 4, threshold: 2000, scoreBonus: 200, title: "起死回生", desc: "治疗总量{0}" },
|
||
{ level: 5, threshold: 4000, scoreBonus: 300, title: "移动泉水", desc: "治疗总量{0}" },
|
||
]
|
||
},
|
||
[HighlightType.PerfectClear]: {
|
||
type: HighlightType.PerfectClear,
|
||
icon: "🏆",
|
||
levels: [
|
||
{ level: 1, threshold: 1, scoreBonus: 500, title: "完美通关", desc: "20回合全胜且全存活" },
|
||
]
|
||
},
|
||
[HighlightType.LuckyKing]: {
|
||
type: HighlightType.LuckyKing,
|
||
icon: "🎲",
|
||
levels: [
|
||
{ level: 1, threshold: 0.6, scoreBonus: 50, title: "手气不错", desc: "刷新命中率{0}%" },
|
||
{ level: 2, threshold: 0.7, scoreBonus: 100, title: "心想事成", desc: "刷新命中率{0}%" },
|
||
{ level: 3, threshold: 0.8, scoreBonus: 150, title: "欧皇附体", desc: "刷新命中率{0}%" },
|
||
{ level: 4, threshold: 0.9, scoreBonus: 200, title: "天选之子", desc: "刷新命中率{0}%" },
|
||
{ level: 5, threshold: 1.0, scoreBonus: 300, title: "言出法随", desc: "刷新命中率{0}%" },
|
||
]
|
||
},
|
||
[HighlightType.ThriftyPlayer]: {
|
||
type: HighlightType.ThriftyPlayer,
|
||
icon: "💰",
|
||
levels: [
|
||
{ level: 1, threshold: 0.75, scoreBonus: 50, title: "精打细算", desc: "金币使用率{0}%" },
|
||
{ level: 2, threshold: 0.85, scoreBonus: 100, title: "勤俭持家", desc: "金币使用率{0}%" },
|
||
{ level: 3, threshold: 0.95, scoreBonus: 150, title: "节俭玩家", desc: "金币使用率{0}%" },
|
||
{ level: 4, threshold: 0.98, scoreBonus: 200, title: "一毛不拔", desc: "金币使用率{0}%" },
|
||
{ level: 5, threshold: 1.00, scoreBonus: 300, title: "理财大师", desc: "金币使用率{0}%" },
|
||
]
|
||
}
|
||
};
|