2025-11-13 23:48:34 +08:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
element "blazing/common/data/Element"
|
|
|
|
|
"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-13 23:48:34 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ---- Effect42 ----
|
|
|
|
|
type Effect42 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
StatusID int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (e *Effect42) Damage_Mul(t *info.DamageZone) bool {
|
2026-01-04 21:41:10 +08:00
|
|
|
|
2025-11-13 23:48:34 +08:00
|
|
|
if e.Ctx().SkillEntity == nil {
|
|
|
|
|
return true
|
|
|
|
|
}
|
2025-11-25 18:25:52 +08:00
|
|
|
|
|
|
|
|
if e.Ctx().SkillEntity.Type != int(element.ElementTypeElectric) {
|
2025-11-13 23:48:34 +08:00
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
//fmt.Println("Effect42_o", t.Damage)
|
|
|
|
|
if t.Type == info.DamageType.Red {
|
|
|
|
|
|
2025-12-05 00:24:02 +08:00
|
|
|
t.Damage = t.Damage.Mul(alpacadecimal.NewFromInt(2))
|
2025-11-13 23:48:34 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//fmt.Println("Effect42_n", t.Damage)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ---- 注册所有效果 ----
|
|
|
|
|
func init() {
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 42, &Effect42{})
|
|
|
|
|
}
|