fix(fight): 修复属性值计算逻辑错误 在SetProp方法中,当level为负数时应该减少攻击值而不是增加, 修正了属性值变化的方向错误。 ```
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user