package effect import ( "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" "blazing/logic/service/fight/node" "github.com/alpacahq/alpacadecimal" ) // "可完全抵挡n次攻击伤害 百分百减伤 ,后面还有锁伤 // ---- Effect46 ---- type Effect46 struct { node.EffectNode //StatusID int conut int64 } func (e *Effect46) DamageDivEx(t *info.DamageZone) bool { 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 { e.conut++ t.Damage = alpacadecimal.Zero } if e.Args()[0].IntPart() == e.conut { e.Alive(false) return true } //fmt.Println("Effect46_n", t.Damage) return true } func (e *Effect46) SetArgs(t *input.Input, a ...int) { //e.CanStack(-1)//后续的不会顶掉这个效果 e.EffectNode.SetArgs(t, a...) e.Duration(-1) //次数类,无限回合 } // ---- 注册所有效果 ---- func init() { input.InitEffect(input.EffectType.Skill, 46, &Effect46{}) }