refactor(skill): 重构命中次数计算逻辑,移除冗余字段

- 将命中次数计算从 SkillView 移至 Skill 初始化,统一计算逻辑
- 移除 SkillConfig 接口中的 hit 字段,使用 hit_count 统一表示可命中次数
- 更新注释说明,hit_count 表示可命中次数而非攻击目标数量
- 清理 SkillView 中冗余的命中次数初始化代码
- 调整技能配置数据,移除所有 hit 字段值
This commit is contained in:
panw
2026-03-16 10:08:54 +08:00
parent 4e393b48b9
commit d4eeedb2f6
3 changed files with 21 additions and 26 deletions

View File

@@ -182,6 +182,8 @@ export class Skill extends ecs.Entity {
sDataCom.s_uuid=s_uuid
sDataCom.fac=cAttrsComp.fac
sDataCom.ext_dmg=ext_dmg
sDataCom.hit_count = 0
sDataCom.max_hit_count = Math.max(1, config.hit_count + cAttrsComp.puncture)
SView.init();
}