Files
bl/logic/service/fight/effect/effect_54.go
2025-11-13 23:48:34 +08:00

49 lines
982 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
// n 回合使对方攻击伤害是正常状态下的 1/m
// ---- Effect54 ----
type Effect54 struct {
node.EffectNode
StatusID int
}
func (e *Effect54) Damage_DIV_ex(t *info.DamageZone) bool {
if !e.Hit() {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
//fmt.Println("Effect54_o", t.Damage)
if t.Type == info.DamageType.Red {
t.Damage = t.Damage.Div(decimal.NewFromInt(int64(e.Args()[1])))
}
//fmt.Println("Effect54_n", t.Damage)
return true
}
func (e *Effect54) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}
// ---- 注册所有效果 ----
func init() {
input.InitEffect(input.EffectType.Skill, 54, &Effect54{})
}