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包导入 ```
43 lines
793 B
Go
43 lines
793 B
Go
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) 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
|
|
}
|