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包导入 ```
34 lines
759 B
Go
34 lines
759 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
)
|
||
|
||
// 37. 自身 一次受到大于n 的伤害时直接将对方体力降至0;(a1: high 16, a2: low 16)
|
||
// TODO: 实现自身 一次受到大于n 的伤害时直接将对方体力降至0;(a1: high 16, a2: low 16)的核心逻辑
|
||
type NewSel37 struct {
|
||
NewSel0
|
||
}
|
||
|
||
func (e *NewSel37) DamageLockEx(t *info.DamageZone) bool {
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||
return true
|
||
}
|
||
|
||
if t.Type != info.DamageType.Red {
|
||
return true
|
||
}
|
||
|
||
if t.Damage.IntPart() > int64(e.Args()[0].IntPart()) {
|
||
|
||
e.Ctx().Opp.CurrentPet.Info.Hp = 0
|
||
|
||
}
|
||
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 37, &NewSel37{})
|
||
}
|