refactor(fight): 优化战斗系统中的数值计算和逻辑处理

- 将GetProp方法返回类型从int改为alpacadecimal.Decimal,
避免精度丢失问题
- 修改战斗中速度比较逻辑,使用Decimal的Cmp方法进行比较
- 修正BattlePetEntity中属性计算公式,将乘法改为除法
- 调整伤害累加逻辑,修复SumDamage叠加问题
- 更新攻击力和防御力计算,直接使用Decimal数值
- 移除Effect178、Effect501等未使用的技能效果
- 重构回合处理逻辑,调整死亡判断时机和流程
- 添加TrueFirst字段用于正确跟踪实际先手方
```
This commit is contained in:
昔念
2026-03-09 20:55:04 +08:00
parent d16e079725
commit d360a85963
10 changed files with 98 additions and 87 deletions

View File

@@ -165,7 +165,7 @@ func (our *Input) GenInfo() {
our.RemainHp = int32(our.CurrentPet.Info.Hp)
our.SkillList = our.CurrentPet.Info.SkillList
our.AttackValue.LostHp = uint32(our.SumDamage.IntPart()) //红伤落实
// f.Second.SkillList = f.Second.CurrentPet.Info.SkillList
// f.Second.RemainHp = int32(f.Second.CurrentPet.Info.Hp)
// ret.FAttack = *f.First.AttackValue