Files
bl/logic/service/fight/effect/effect_116.go
2025-11-15 14:23:52 +00:00

46 lines
897 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
/**
* n回合若自己先手则伤害的1/5回复体力
*/
func init() {
t := &Effect116{
EffectNode: node.EffectNode{},
}
// t.Duration(-1) //设置成无限回合,到回合数就停止
input.InitEffect(input.EffectType.Skill, 116, t)
}
type Effect116 struct {
node.EffectNode
}
// 默认添加回合
func (e *Effect116) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}
func (e *Effect116) Skill_Useed() bool {
if !e.Hit() {
return true
}
if e.Input.FightC.IsFirst(e.Input.Player) {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.DamageZone.Damage.Div(decimal.NewFromInt(5)))
}
return true
}