package effect import ( "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" "blazing/logic/service/fight/node" "github.com/alpacahq/alpacadecimal" ) /** * 将所受的伤害n倍反馈给对手 */ func init() { input.InitEffect(input.EffectType.Skill, 34, &Effect34{}) } type Effect34 struct { node.EffectNode can bool } // 使用技能时,不可被继承,继承Miss和Hit就行 func (e *Effect34) OnSkill() bool { e.can = true return true } // 被攻击时候反弹 func (e *Effect34) DamageFloor(t *info.DamageZone) bool { if !e.can { return true } //不是技能 if e.Ctx().SkillEntity == nil { return true } t.Damage = alpacadecimal.NewFromInt(int64(e.Ctx().Opp.SumDamage.IntPart())).Mul(alpacadecimal.NewFromInt(int64(e.SideEffectArgs[0]))) return true }