Files
bl/logic/service/fight/boss/NewSeIdx_92.go
昔念 b9ae17234d
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
feat(boss): 新增技能优先级调整功能

新增ComparePre方法用于比较和调整技能释放优先级,
修复了Boss战斗中的技能执行顺序问题,
同时在login模块中启用战斗测试功能。
```
2026-03-07 22:16:06 +08:00

64 lines
1.5 KiB
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/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// eid: 92
// icon_id: -1
// isHide: 隐藏特性
// tips:
// - 自身攻击会附加上一回合的伤害, 附加上回合受到伤害(红伤+粉伤等量的粉伤对应BuffId 2056
//
// args:
// - 0 0
//
// tips_help:
// - 自身攻击会附加上一回合的伤害, 附加上回合受到伤害(红伤+粉伤等量的粉伤对应BuffId 2056
//
// T92. 属性技能无效
type NewSel92 struct {
NewSel0
n1 alpacadecimal.Decimal
n2 alpacadecimal.Decimal
}
func init() {
input.InitEffect(input.EffectType.NewSel, 92, &NewSel92{})
}
func (e *NewSel92) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
return
}
e.n1 = e.Ctx().Our.CurrentPet.GetHP()
return
}
func (e *NewSel92) TurnEnd() {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
return
}
e.n2 = e.Ctx().Our.CurrentPet.GetHP()
return
}
func (e *NewSel92) DamageFloor(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
//不是技能
if e.Ctx().SkillEntity == nil {
return true
}
if e.n2.Cmp(e.n1) == 1 {
t.Damage.Add(e.n2.Sub(e.n1))
}
return true
}