refactor: 替换天赋系统为驻场英雄技能系统

1.  删除已废弃的TalentSet天赋配置文件
2.  重构英雄属性计算逻辑,改为使用驻场技能加成
3.  更新卡牌购买、刷新费用和出售收益的加成逻辑
4.  统一技能配置格式,修复代码格式问题
5.  新增驻场技能类型与配置,兼容原有天赋效果
This commit is contained in:
pan
2026-06-03 10:19:52 +08:00
parent 612bcee5a1
commit f00b9496e2
6 changed files with 213 additions and 243 deletions

View File

@@ -33,6 +33,8 @@ import { smc } from "../common/SingletonModuleComp";
import { UIID } from "../common/config/GameUIConfig";
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
import { FieldSkillType } from "../common/config/SkillSet";
import { FieldSkillHelper } from "../hero/FieldSkillHelper";
import { getLvColor } from "../common/config/GameSet";
import { MissionEconomy } from "./MissionEconomy";
@@ -249,7 +251,11 @@ export class CardComp extends CCComp {
this.card_type = data.type;
let baseCost = data.cost ?? 0;
// 天赋系统已移除:购买费用不再有优惠
if (this.card_type === CardType.Hero) {
// 驻场英雄带来的"购买优惠"折扣
const discount = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.BuyDiscount);
baseCost = Math.max(0, baseCost - discount);
}
this.card_cost = Math.floor(baseCost);
this.node.active = true;

View File

@@ -48,7 +48,9 @@ export class MissionEconomy {
*/
static getRefreshCost(baseCost: number = 1): number {
let cost = baseCost;
// 天赋系统已移除:刷新卡牌费用不再有优惠
// 驻场英雄带来的"刷新优惠"折扣
const discount = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.RefreshDiscount);
cost = Math.max(0, cost - discount);
return Math.floor(cost);
}
@@ -71,8 +73,9 @@ export class MissionEconomy {
const sellByLevel: Record<number, number> = { 1: 3, 2: 10, 3: 25 };
const baseSellGold = sellByLevel[heroLevel] || 3;
const goldBoost = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.SellGold);
const totalSellGold = baseSellGold + goldBoost;
// 天赋系统已移除:不再追加 SellBonus
// 驻场英雄带来的"出售返还"加成
const sellBonus = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.SellBonus);
const totalSellGold = baseSellGold + goldBoost + sellBonus;
return Math.floor(totalSellGold);
}