2026-03-09 22:36:30 +08:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/fight/info"
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-28 21:57:22 +08:00
|
|
|
// Effect 1044: 吸取对手能力提升状态,吸取成功则下{0}回合造成的伤害翻倍
|
2026-03-09 22:36:30 +08:00
|
|
|
type Effect1044 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
damageMultiplierActive bool
|
|
|
|
|
multiplierDuration int
|
2026-03-19 14:50:11 +08:00
|
|
|
can bool
|
2026-03-09 22:36:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (e *Effect1044) OnSkill() bool {
|
|
|
|
|
// 检查对手是否有能力提升状态可以吸取
|
2026-03-19 14:50:11 +08:00
|
|
|
|
2026-03-09 22:36:30 +08:00
|
|
|
for i, v := range e.Ctx().Opp.Prop[:] {
|
|
|
|
|
if v > 0 {
|
2026-03-19 14:50:11 +08:00
|
|
|
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
|
|
|
|
|
e.can = true
|
|
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
|
|
|
|
|
}
|
2026-03-09 22:36:30 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-19 14:50:11 +08:00
|
|
|
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)
|
2026-03-09 22:36:30 +08:00
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
func init() {
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 1044, &Effect1044{})
|
|
|
|
|
|
|
|
|
|
}
|