35 lines
587 B
Go
35 lines
587 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/action"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
|
||
"github.com/shopspring/decimal"
|
||
)
|
||
|
||
/**
|
||
* 给予对象损伤1/n,会回复自己的体力
|
||
*/
|
||
type Effect105 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func init() {
|
||
|
||
input.InitEffect(input.EffectType.Skill, 105, &Effect105{})
|
||
|
||
}
|
||
|
||
// 命中之后
|
||
func (e *Effect105) OnSkill() bool {
|
||
if !e.Hit() {
|
||
return true
|
||
}
|
||
|
||
e.Input.Heal(
|
||
e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(decimal.NewFromInt(int64(e.Args()[0]))),
|
||
)
|
||
return true
|
||
}
|