2025-11-14 03:21:00 +08:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/fight/info"
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
)
|
|
|
|
|
|
2025-11-14 23:09:16 +08:00
|
|
|
// 可以抵挡n点伤害
|
2025-11-14 03:21:00 +08:00
|
|
|
// ---- Effect49 ----
|
|
|
|
|
type Effect49 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (e *Effect49) Damage_SUB_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("Effect49_o", t.Damage)
|
|
|
|
|
if t.Type == info.DamageType.Red {
|
2025-12-06 15:11:42 +08:00
|
|
|
if e.Args()[0].Cmp(t.Damage) == -1 {
|
|
|
|
|
t.Damage = t.Damage.Sub(e.Args()[0])
|
2025-11-17 13:37:08 +08:00
|
|
|
}
|
2025-11-14 03:21:00 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//fmt.Println("Effect49_n", t.Damage)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ---- 注册所有效果 ----
|
|
|
|
|
func init() {
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 49, &Effect49{})
|
|
|
|
|
}
|