feat: 新增多个战斗效果并修复逻辑问题
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -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] {
|
||||
|
||||
Reference in New Issue
Block a user