All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat(boss): 新增技能优先级调整功能 新增ComparePre方法用于比较和调整技能释放优先级, 修复了Boss战斗中的技能执行顺序问题, 同时在login模块中启用战斗测试功能。 ```
40 lines
724 B
Go
40 lines
724 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
func init() {
|
|
|
|
input.InitEffect(input.EffectType.Skill, 152, &Effect152{})
|
|
|
|
}
|
|
|
|
type Effect152 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect152) SetArgs(t *input.Input, a ...int) {
|
|
|
|
e.EffectNode.SetArgs(t, a...)
|
|
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
|
|
|
|
}
|
|
func (e *Effect152) Skill_Use_ex() bool {
|
|
if e.Ctx().SkillEntity == nil {
|
|
return true
|
|
}
|
|
ok, _, _ := e.Input.Player.Roll(e.SideEffectArgs[1], 100)
|
|
if !ok {
|
|
return true
|
|
}
|
|
eff := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
|
|
if eff == nil {
|
|
return true
|
|
}
|
|
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, eff)
|
|
return true
|
|
}
|