All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
移除 `NotAlive` 字段,改用 `Alive()` 方法通过 HP 判断存活状态,修正相关效果触发逻辑。
28 lines
626 B
Go
28 lines
626 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
type Effect547 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect547) Skill_Use() bool {
|
|
fearEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.SideEffectArgs[0]))
|
|
if fearEffect != nil {
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, fearEffect)
|
|
e.Ctx().Our.AddEffect(e.Ctx().Our, fearEffect)
|
|
}
|
|
return true
|
|
}
|
|
func (e *Effect547) SetArgs(t *input.Input, a ...int) {
|
|
e.EffectNode.SetArgs(t, a...)
|
|
e.EffectNode.Duration(a[1]) // 持续n回合
|
|
}
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 547, &Effect547{})
|
|
|
|
}
|