Files
bl/logic/service/fight/boss/NewSeIdx_53.go
昔念 b964b14f1d ```
refactor(fight): 统一DamageLock方法命名规范并修改方法签名

- 将DamageLock_ex方法重命名为DamageLockEx,统一命名规范
- 修改NewSeIdx_53、NewSeIdx_54、NewSeIdx_71的TurnEnd方法为TurnStart
- 为TurnStart方法添加fattack和sattack参数
- 修复NewSeIdx_5中的条件判断逻辑,将!ok改为ok
- 修正NewSeIdx_5中的Ctx().SkillEntity.Type为Ctx().Type
- 移除EffectNode.Alive方法中的调试打印语句
- 添加必要的action包导入
```
2026-01-06 01:34:26 +08:00

37 lines
996 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 53. 敌我双方每回合恢复n%HP不超过最大血量a1: n
type NewSel53 struct {
NewSel0
}
func (e *NewSel53) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return
}
// 计算恢复的HP量
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
healAmount := maxHP.Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
// 恢复我方HP
e.Ctx().Our.Heal(e.Ctx().Our, nil, healAmount)
// 恢复敌方HP
oppMaxHP := e.Ctx().Opp.CurrentPet.GetMaxHP()
oppHealAmount := oppMaxHP.Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
e.Ctx().Opp.Heal(e.Ctx().Opp, nil, oppHealAmount)
}
func init() {
input.InitEffect(input.EffectType.NewSel, 53, &NewSel53{})
}