feat: 完成天赋系统重做与UI界面优化

1.  新增天赋等级配置与经验升级逻辑,支持连升多级
2.  重构天赋UI界面,添加等级进度条与页签状态显示
3.  优化技能卡片UI,新增技能名称显示与等级格式调整
4.  调整英雄界面布局,修复UI错位问题
5.  新增页签背景预制件与天赋道具UI样式
This commit is contained in:
panFD
2026-08-26 08:50:54 +08:00
parent 93a3c69d22
commit 5b965bba60
13 changed files with 9888 additions and 6078 deletions

View File

@@ -285,6 +285,26 @@ export function getTalentUpgradeCost(curLv: number): number {
return TALENT_UPGRADE_COST[curLv];
}
/** 天赋等级上限(不含):等级从 0 起步,区间 0~29,共 30 级;每升 1 级产出 1 点天赋点 */
export const TALENT_LEVEL_MAX = 30;
/** 天赋升级经验表:索引为当前等级(0~28),值为升到下一级所需经验 */
export const TALENT_LEVEL_EXP: number[] = [
100, 120, 140, 170, 200, 240, 280, 330, 380, 440,
510, 580, 660, 750, 850, 960, 1080, 1210, 1350, 1500,
1670, 1850, 2050, 2270, 2510, 2770, 3060, 3380, 3730,
];
/**
* 查询天赋升到下一级所需经验
* @param curLv 当前等级(0 起步)
* @returns 升到下一级所需经验;已满级或非法等级返回 -1
*/
export function getTalentLevelExp(curLv: number): number {
if (curLv < 0 || curLv >= TALENT_LEVEL_EXP.length) return -1;
return TALENT_LEVEL_EXP[curLv];
}
/** 阶位解锁门槛:前一阶累计投入 ≥ 该点数才能升级下一阶天赋 */
export const TALENT_TIER_UNLOCK_THRESHOLD = 10;