``` feat(fight): 新增多种技能效果实现(110/125/128/131/145/151),优化状态判断逻辑并重构随机数生成方式

This commit is contained in:
1
2025-12-11 20:05:00 +00:00
parent 5ca43fe21f
commit 4c69e578dd
13 changed files with 328 additions and 33 deletions

View File

@@ -0,0 +1,44 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
func init() {
t := &Effect128{
EffectNode: node.EffectNode{},
}
input.InitEffect(input.EffectType.Skill, 128, t)
}
type Effect128 struct {
node.EffectNode
}
// 默认添加回合
func (e *Effect128) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}
func (e *Effect128) DamageLock_ex(t *info.DamageZone) bool {
if !e.Hit() {
return true
}
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
}