Files
bl/logic/service/fight/effect/effect_128.go
xinian 875ad668aa
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 实现战斗效果逻辑和接口重构
2026-03-28 21:57:22 +08:00

36 lines
658 B
Go

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
func init() {
t := &Effect128{}
input.InitEffect(input.EffectType.Skill, 128, t)
}
// Effect 128: {0}回合内将受到的攻击伤害转化为自身体力
type Effect128 struct {
RoundEffectSideArg0Base
}
// 默认添加回合
func (e *Effect128) DamageLockEx(t *info.DamageZone) bool {
if t.Type != info.DamageType.Red {
return true
}
heal := t.Damage
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
t.Damage = alpacadecimal.Zero
return true
}