fix(skill): 修正技能攻击力计算未除以100的问题
修复技能攻击力(AP)计算时未将百分比转换为小数的问题。原代码直接使用 sAp (百分比值) 与基础攻击力相乘,导致计算结果过大。现在将 sAp 除以 100 以正确计算实际攻击力值。
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user