chore: 移除游戏内天赋系统相关代码
1. 删除所有TalentType相关导入和天赋数据存储逻辑 2. 移除英雄属性天赋加成计算逻辑 3. 移除卡牌购买、刷新、售卖的天赋优惠逻辑 4. 将getTalentValue方法降级为空实现 5. 清理多余的空行代码格式
This commit is contained in:
@@ -13,7 +13,6 @@ import { Attrs} from "../common/config/HeroAttrs";
|
||||
import { MoveComp } from "./MoveComp";
|
||||
import { mLogger } from "../common/Logger";
|
||||
import { FieldSkillType } from "../common/config/SkillSet";
|
||||
import { TalentType } from "../common/config/TalentSet";
|
||||
/** 英雄实体:负责英雄节点创建、属性初始化、入场动画与销毁流程 */
|
||||
@ecs.register(`Hero`)
|
||||
|
||||
@@ -133,21 +132,9 @@ export class Hero extends ecs.Entity {
|
||||
model.base_ap = base_ap;
|
||||
model.base_hp = base_hp;
|
||||
|
||||
// 应用天赋加成
|
||||
if (model.fac === FacSet.HERO) {
|
||||
let apBonus = HeroAttrsComp.getTalentValue(TalentType.Attack); // 攻击强化
|
||||
let hpBonus = HeroAttrsComp.getTalentValue(TalentType.Hp); // 生命强化
|
||||
model.ap = base_ap * (1 + apBonus / 100);
|
||||
model.hp = model.hp_max = base_hp * (1 + hpBonus / 100);
|
||||
model.critical = HeroAttrsComp.getTalentValue(TalentType.Critical); // 暴击强化
|
||||
model.wfuny = HeroAttrsComp.getTalentValue(TalentType.WindFury); // 风怒强化
|
||||
model.freeze_chance = HeroAttrsComp.getTalentValue(TalentType.Freeze); // 冰冻强化
|
||||
model.puncture_chance = HeroAttrsComp.getTalentValue(TalentType.Puncture); // 穿刺强化
|
||||
// 护盾强化 和 亡语强化 在对应逻辑中应用
|
||||
} else {
|
||||
model.ap = base_ap;
|
||||
model.hp = model.hp_max = base_hp;
|
||||
}
|
||||
// 英雄与怪物统一使用基础值(天赋系统已移除)
|
||||
model.ap = base_ap;
|
||||
model.hp = model.hp_max = base_hp;
|
||||
|
||||
model.speed = hero.speed ?? 800;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import { Timer } from "db://oops-framework/core/common/timer/Timer";
|
||||
import { FacSet, FightSet } from "../common/config/GameSet";
|
||||
import { FieldSkillSet, FieldSkillType, SkillOverrides } from "../common/config/SkillSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { TalentConfig, TalentType } from "../common/config/TalentSet";
|
||||
import { Attrs } from "../common/config/HeroAttrs";
|
||||
import { FieldSkillHelper } from "./FieldSkillHelper";
|
||||
@ecs.register('HeroAttrs')
|
||||
@@ -373,14 +372,9 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
|
||||
|
||||
|
||||
/** 获取指定天赋的加成数值 */
|
||||
public static getTalentValue(talentId: TalentType): number {
|
||||
if (!smc || !smc.collection || !smc.collection.talents) return 0;
|
||||
let level = smc.collection.talents[talentId] || 0;
|
||||
if (level <= 0) return 0;
|
||||
let talentInfo = TalentConfig.talents.find(t => t.id === talentId);
|
||||
if (!talentInfo || !talentInfo.values || level > talentInfo.values.length) return 0;
|
||||
return talentInfo.values[level - 1];
|
||||
/** 获取指定天赋的加成数值 —— 天赋系统已移除,方法保留为空 stub 防止编译错误 */
|
||||
public static getTalentValue(_talentId: number): number {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
import { FacSet } from "../common/config/GameSet";
|
||||
import { FieldSkillType, SkillOverrides } from "../common/config/SkillSet";
|
||||
import { TalentType } from "../common/config/TalentSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { FieldSkillHelper } from "./FieldSkillHelper";
|
||||
|
||||
@@ -59,7 +58,7 @@ export class SkillTriggerHelper {
|
||||
|
||||
/**
|
||||
* 处理召唤(落地)触发技能
|
||||
* 支持受【召唤强化羁绊 (SummonCount)】和【召唤强化天赋 (TalentType.Summon)】的多次触发加成。
|
||||
* 支持受【召唤强化羁绊 (SummonCount)】的多次触发加成。
|
||||
*/
|
||||
private static handleCall(model: HeroAttrsComp, view: HeroViewComp) {
|
||||
if (!model.call || model.call.length === 0) return;
|
||||
@@ -68,7 +67,6 @@ export class SkillTriggerHelper {
|
||||
// 仅英雄享受加成,怪物始终只触发 1 次
|
||||
if (model.fac === FacSet.HERO) {
|
||||
triggerCount += FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.SummonCount);
|
||||
triggerCount += HeroAttrsComp.getTalentValue(TalentType.Summon);
|
||||
}
|
||||
triggerCount = Math.max(1, Math.floor(triggerCount)); // 确保最少触发 1 次
|
||||
|
||||
|
||||
Reference in New Issue
Block a user