Files
bl/logic/service/fight/effect/effect_128.go

45 lines
825 B
Go

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
func init() {
t := &Effect128{
EffectNode: node.EffectNode{},
}
input.InitEffect(input.EffectType.Skill, 128, t)
}
type Effect128 struct {
node.EffectNode
}
// 默认添加回合
func (e *Effect128) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}
func (e *Effect128) DamageLock_ex(t *info.DamageZone) bool {
if !e.Hit() {
return true
}
if t.Type != info.DamageType.Red {
return true
}
heal := t.Damage
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
t.Damage = alpacadecimal.Zero
return true
}