fix(skill): 修正技能攻击力计算未除以100的问题

修复技能攻击力(AP)计算时未将百分比转换为小数的问题。原代码直接使用 sAp (百分比值) 与基础攻击力相乘,导致计算结果过大。现在将 sAp 除以 100 以正确计算实际攻击力值。
This commit is contained in:
panw
2026-03-24 10:09:20 +08:00
parent 9a68ef957d
commit 78d4b10a88
2 changed files with 684 additions and 222 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -210,7 +210,7 @@ export class Skill extends ecs.Entity {
const sBck = (config.bck ?? 0)+SUp.bck*skill_lv;
const sAp =config.ap+SUp.ap*skill_lv;
const sHit=config.hit_count+SUp.hit_count*skill_lv + cAttrsComp.puncture
sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap*sAp);
sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap*sAp/100);
sDataCom.Attrs[Attrs.critical] = cAttrsComp.critical + sCrt;
sDataCom.Attrs[Attrs.freeze_chance] = cAttrsComp.freeze_chance + sFrz;
sDataCom.Attrs[Attrs.back_chance] = cAttrsComp.back_chance + sBck;