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

32 lines
531 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
/**
* 对方所受伤害的1/n会反弹给自己
*/
func init() {
input.InitEffect(input.EffectType.Skill, 6, &Effect6{
EffectNode: node.EffectNode{},
})
}
type Effect6 struct {
node.EffectNode
}
func (e *Effect6) Skill_Useed(ctx input.Ctx) bool {
ctx.DamageZone.Damage = ctx.DamageZone.Damage.Div(decimal.NewFromInt(int64(e.SideEffectArgs[0])))
e.Input.Damage(ctx)
return true
}