```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

fix(fight): 修复属性值计算逻辑错误

在SetProp方法中,当level为负数时应该减少攻击值而不是增加,
修正了属性值变化的方向错误。
```
This commit is contained in:
昔念
2026-03-09 00:40:13 +08:00
parent 2fd56f9dbf
commit 86d28f47d1

View File

@@ -33,7 +33,7 @@ func (target *Input) SetProp(source *Input, index, level int8) bool {
switch {
case level < 0:
if target.AttackValue.Prop[index] > -6 {
target.AttackValue.Prop[index] -= level
target.AttackValue.Prop[index] += level
} else {
return false
}