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

45 lines
897 B
Go
Raw Normal View History

2025-11-13 23:48:34 +08:00
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect54 n 回合使对方攻击伤害是正常状态下的 1/m
2025-11-13 23:48:34 +08:00
// ---- Effect54 ----
type Effect54 struct {
node.EffectNode
StatusID int
}
func (e *Effect54) DamageDivEx(t *info.DamageZone) bool {
2025-11-13 23:48:34 +08:00
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(e.Args()[1])
2025-11-13 23:48:34 +08:00
}
//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{})
}