Files
bl/logic/service/fight/effect/effect_42.go
2025-11-13 23:48:34 +08:00

45 lines
875 B
Go

package effect
import (
element "blazing/common/data/Element"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
// ---- Effect42 ----
type Effect42 struct {
node.EffectNode
StatusID int
}
func (e *Effect42) Damage_Mul(t *info.DamageZone) bool {
if !e.Hit() {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Type().Secondary != nil {
return true
}
if e.Ctx().SkillEntity.Type().Primary != element.ElementTypeElectric {
return true
}
//fmt.Println("Effect42_o", t.Damage)
if t.Type == info.DamageType.Red {
t.Damage = t.Damage.Mul(decimal.NewFromInt(2))
}
//fmt.Println("Effect42_n", t.Damage)
return true
}
// ---- 注册所有效果 ----
func init() {
input.InitEffect(input.EffectType.Skill, 42, &Effect42{})
}