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 }