feat: 新增多个战斗效果并修复逻辑问题
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-07 14:51:32 +08:00
committed by cnb
parent 02629b6f6c
commit de8ce9fc81
8 changed files with 210 additions and 1 deletions

View File

@@ -23,6 +23,9 @@ func (target *Input) SetProp(source *Input, prop, level int8, opType info.EnumAb
switch t {
case info.AbilityOpType.ADD:
// 属性提升上限为6
if l < 0 {
l = -l
}
newValue = utils.Min(target.AttackValue.Prop[p]+l, 6)
if newValue > target.AttackValue.Prop[p] {
//fmt.Println("属性值会增加")
@@ -32,6 +35,9 @@ func (target *Input) SetProp(source *Input, prop, level int8, opType info.EnumAb
return false
case info.AbilityOpType.SUB:
if l > 0 {
l = -l
}
// 属性降低,下限为-6
newValue = utils.Max(target.AttackValue.Prop[p]+l, -6)
if newValue < target.AttackValue.Prop[p] {