refactor(战斗): 重构英雄与怪物属性系统,简化数据结构

- 移除 HeroSkillsComp 组件,将技能逻辑合并到 HeroAttrsComp
- 将属性从 Attrs 枚举映射改为 HeroAttrsComp 中的独立字段
- 为 HeroAttrsComp 添加攻击和技能冷却时间管理功能
- 统一英雄和怪物的属性初始化方式,简化配置数据
- 在 GameSet 中添加击退概率配置项
- 修复 SkillView 中属性名大小写错误
This commit is contained in:
walkpan
2026-03-11 23:13:21 +08:00
parent 9d6075be6e
commit a544f65d73
9 changed files with 85 additions and 202 deletions

View File

@@ -183,7 +183,7 @@ export class SkillView extends CCComp {
this.sData.hit_count++
// 检查技能是否应该销毁
if (
this.sData.hit_count >= (this.SConf.hit + this.sData.Attrs[Attrs.PUNCTURE]) &&
this.sData.hit_count >= (this.SConf.hit + this.sData.Attrs[Attrs.puncture]) &&
(this.SConf.DTType != DTType.range) &&
(this.SConf.EType != EType.animationEnd) &&
(this.SConf.EType != EType.timeEnd)