feat(hero): 为英雄系统添加天赋加成支持

- 在 HeroAttrsComp 中添加 getTalentValue 静态方法,用于获取指定天赋的加成数值
- 定义 TalentType 枚举,明确各类天赋类型
- 调整部分天赋配置,如亡语强化和召唤强化的数值与消耗
- 在 Hero 实体初始化时,根据英雄阵营应用攻击、生命、暴击等天赋加成
- 在召唤技能触发逻辑中,增加召唤强化天赋的额外触发次数
This commit is contained in:
panw
2026-04-28 15:26:47 +08:00
parent 738ecf3bf8
commit 1a45c87e70
3 changed files with 53 additions and 6 deletions

View File

@@ -3,6 +3,20 @@
* @description 天赋系统配置数据,包含经验要求、消耗、每个天赋的具体加成数值和描述。
*/
export enum TalentType {
Attack = 1, // 攻击强化
Hp = 2, // 生命强化
Critical = 3, // 暴击强化
WindFury = 4, // 风怒强化
Freeze = 5, // 冰冻强化
Puncture = 6, // 穿刺强化
DeadTrigger = 7,// 亡语强化
Summon = 8, // 召唤强化
BuyDiscount = 9,// 采购优惠
RefreshDiscount = 10, // 刷新优惠
SellBonus = 11 // 出售补贴
}
export interface TalentInfo {
/** 天赋 ID */
id: number;
@@ -42,10 +56,10 @@ export const TalentConfig = {
maxLevel: 5, values: [2, 4, 6, 8, 10], costs: [1, 1, 2, 2, 3] },
{ id: 6, name: "穿刺强化", icon: "🗡️", desc: "所有英雄穿刺 +{value}",
maxLevel: 5, values: [0.2, 0.4, 0.6, 0.8, 1.0], costs: [1, 1, 2, 2, 3] },
{ id: 7, name: "亡语强化", icon: "🛡️", desc: "死亡触发技能额外触发次数+1",
maxLevel: 5, values: [0.2, 0.4, 0.6, 0.8, 1.0], costs: [1, 1, 2, 2, 3] },
{ id: 8, name: "召唤强化", icon: "🛡️", desc: "召唤触发技能额外触发次数+1",
maxLevel: 1, values: [1], costs: [20] },
{ id: 7, name: "亡语强化", icon: "🛡️", desc: "死亡触发技能额外触发次数+{value}次",
maxLevel: 5, values: [1], costs: [25] },
{ id: 8, name: "召唤强化", icon: "🛡️", desc: "召唤触发技能额外触发次数+{value}次",
maxLevel: 1, values: [1], costs: [25] },
{ id: 9, name: "采购优惠", icon: "🛒", desc: "购买英雄 -{value}金",
maxLevel: 1, values: [1], costs: [10] },
{ id: 10, name: "刷新优惠", icon: "🔄", desc: "刷新重抽 -{value}金",