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-12-05 00:24:02 +08:00
|
|
|
"github.com/alpacahq/alpacadecimal"
|
2025-11-14 03:21:00 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// "可完全抵挡n次攻击伤害 百分百减伤 ,后面还有锁伤
|
|
|
|
|
// ---- Effect46 ----
|
|
|
|
|
type Effect46 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
//StatusID int
|
2025-12-06 15:11:42 +08:00
|
|
|
conut int64
|
2025-11-14 03:21:00 +08:00
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:10:34 +08:00
|
|
|
func (e *Effect46) DamageDivEx(t *info.DamageZone) bool {
|
2026-01-04 21:41:10 +08:00
|
|
|
|
2025-11-14 03:21:00 +08:00
|
|
|
if e.Ctx().SkillEntity == nil {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//fmt.Println("Effect46_o", t.Damage)
|
|
|
|
|
if t.Type == info.DamageType.Red {
|
2025-12-17 01:44:54 +08:00
|
|
|
e.conut++
|
2026-01-21 20:46:05 +00:00
|
|
|
t.Damage = alpacadecimal.Zero
|
2025-11-14 03:21:00 +08:00
|
|
|
|
|
|
|
|
}
|
2025-12-17 01:44:54 +08:00
|
|
|
if e.Args()[0].IntPart() == e.conut {
|
|
|
|
|
e.Alive(false)
|
|
|
|
|
return true
|
|
|
|
|
}
|
2025-11-14 03:21:00 +08:00
|
|
|
//fmt.Println("Effect46_n", t.Damage)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
func (e *Effect46) SetArgs(t *input.Input, a ...int) {
|
|
|
|
|
|
2025-11-14 06:14:49 +08:00
|
|
|
//e.CanStack(-1)//后续的不会顶掉这个效果
|
2025-11-14 03:21:00 +08:00
|
|
|
e.EffectNode.SetArgs(t, a...)
|
|
|
|
|
e.Duration(-1) //次数类,无限回合
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ---- 注册所有效果 ----
|
|
|
|
|
func init() {
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 46, &Effect46{})
|
|
|
|
|
}
|