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:
42
logic/service/fight/effect/effect_448.go
Normal file
42
logic/service/fight/effect/effect_448.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
)
|
||||
|
||||
type Effect448 struct {
|
||||
node.EffectNode
|
||||
rev bool
|
||||
}
|
||||
|
||||
func (e *Effect448) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.SetArgs(t, a...)
|
||||
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
|
||||
}
|
||||
func (e *Effect448) OnSkill() bool {
|
||||
|
||||
for i, v := range e.SideEffectArgs[1:] {
|
||||
if e.rev {
|
||||
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), int8(v), info.AbilityOpType.SUB)
|
||||
} else {
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(v), info.AbilityOpType.ADD)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// 初始化
|
||||
// -----------------------------------------------------------
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 448, &Effect448{
|
||||
rev: true,
|
||||
})
|
||||
input.InitEffect(input.EffectType.Skill, 433, &Effect448{
|
||||
rev: false,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user