Files
bl/logic/service/fight/effect/effect_42.go
xinian 7405aac82d
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 合并同类 effect 实现到公共基类
2026-04-03 00:26:59 +08:00

40 lines
787 B
Go

package effect
import (
element "blazing/common/data/Element"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// Effect 42: 未在 effectInfo.json 配置说明
type Effect42 struct {
RandomDurationArg01Base
StatusID int
}
func (e *Effect42) Damage_Mul(t *info.DamageZone) bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.XML.Type != int(element.ElementTypeElectric) {
return true
}
//fmt.Println("Effect42_o", t.Damage)
if t.Type == info.DamageType.Red {
t.Damage = t.Damage.Mul(alpacadecimal.NewFromInt(2))
}
//fmt.Println("Effect42_n", t.Damage)
return true
}
// ---- 注册所有效果 ----
func init() {
input.InitEffect(input.EffectType.Skill, 42, &Effect42{})
}