refactor(talent): 重构天赋升级消耗计算逻辑
1. 将天赋升级消耗从按等级索引改为按阶位统一配置 2. 调整getTalentUpgradeCost入参和计算逻辑 3. 更新天赋已投入点数的统计方式,优化计算效率 4. 修正天赋升级消耗判断的参数传递错误
This commit is contained in:
@@ -260,7 +260,7 @@ export class TalentsComp extends CCComp {
|
||||
this.showSmallTip(tab?.node ?? null, "该天赋已满级");
|
||||
return;
|
||||
}
|
||||
const cost = getTalentUpgradeCost(lv);
|
||||
const cost = getTalentUpgradeCost(cfg.tier);
|
||||
if (cost <= 0) return;
|
||||
if (smc.getTalentPoints() < cost) {
|
||||
this.showSmallTip(tab?.node ?? null, "天赋点不足");
|
||||
|
||||
Reference in New Issue
Block a user