Files
bl/logic/service/fight/effect/effect_46.go
昔念 142ef11a99 ```
refactor(fight): 统一战斗系统函数命名规范

统一了boss技能和效果系统中的函数命名规范,将下划线命名方式
改为驼峰命名方式,提高代码一致性和可读性。

函数名变更包括:
- Prop_Befer -> PropBefer
- Damage_DIV_ex -> DamageDivEx
- Compare_Pre -> ComparePre
- Skill_Hit_ex -> SkillHit_ex
- Damage_SUB_ex -> DamageSubEx
- Skill_Hit -> SkillHit
- DamageLock_ex -> DamageLock_ex

同时更新了相关注释中的函数名引用,
2026-01-04 22:10:34 +08:00

53 lines
1.1 KiB
Go

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.NewFromInt(0)
}
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{})
}