2025-11-13 23:06:55 +08:00
|
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"blazing/logic/service/fight/info"
|
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
|
|
2025-12-05 00:24:02 +08:00
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
2025-11-13 23:06:55 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 将所受的伤害n倍反馈给对手
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 34, &Effect34{})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type Effect34 struct {
|
|
|
|
|
|
node.EffectNode
|
|
|
|
|
|
can bool
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 使用技能时,不可被继承,继承Miss和Hit就行
|
|
|
|
|
|
func (e *Effect34) OnSkill() bool {
|
2026-01-04 21:41:10 +08:00
|
|
|
|
|
2025-11-13 23:06:55 +08:00
|
|
|
|
e.can = true
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 被攻击时候反弹
|
2025-12-06 15:11:42 +08:00
|
|
|
|
func (e *Effect34) DamageFloor(t *info.DamageZone) bool {
|
2025-11-13 23:06:55 +08:00
|
|
|
|
|
|
|
|
|
|
if !e.can {
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
//不是技能
|
|
|
|
|
|
if e.Ctx().SkillEntity == nil {
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
2025-12-05 00:24:02 +08:00
|
|
|
|
t.Damage = alpacadecimal.NewFromInt(int64(e.Ctx().Opp.SumDamage.IntPart())).Mul(alpacadecimal.NewFromInt(int64(e.SideEffectArgs[0])))
|
2025-11-13 23:06:55 +08:00
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|