Files
bl/logic/service/fight/effect/1044.go
xinian 78a68148ce
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
chore: update fight logic and effect implementations
2026-04-05 02:25:44 +08:00

48 lines
935 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 1044: 吸取对手能力提升状态,吸取成功则下{0}回合造成的伤害翻倍
type Effect1044 struct {
node.EffectNode
damageMultiplierActive bool
multiplierDuration int
can bool
}
func (e *Effect1044) OnSkill() bool {
// 检查对手是否有能力提升状态可以吸取
for i, v := range e.TargetInput().Prop[:] {
if v > 0 {
if e.TargetInput().SetProp(e.CarrierInput(), int8(i), 0) {
e.can = true
e.CarrierInput().SetProp(e.CarrierInput(), int8(i), v)
}
}
}
return true
}
func (e *Effect1044) Damage_Mul(t *info.DamageZone) bool {
if !e.can {
return true
}
if t.Type != info.DamageType.Red {
return true
}
t.Mul(2)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1044, &Effect1044{})
}