```
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包导入 ```
This commit is contained in:
@@ -11,7 +11,7 @@ type NewSel37 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel37) DamageLock_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel37) DamageLockEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel5 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel5) DamageLock_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel5) DamageLockEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if !e.IsOwner() {
|
||||
return true
|
||||
@@ -24,9 +24,9 @@ func (e *NewSel5) DamageLock_ex(t *info.DamageZone) bool {
|
||||
}
|
||||
|
||||
_, ok := lo.Find(append(e.Args(), alpacadecimal.NewFromInt(8)), func(item alpacadecimal.Decimal) bool {
|
||||
return int(item.IntPart()) == e.Ctx().SkillEntity.Type
|
||||
return int(item.IntPart()) == e.Ctx().Type
|
||||
})
|
||||
if !ok {
|
||||
if ok {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/input"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
@@ -11,7 +12,7 @@ type NewSel53 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel53) TurnEnd() {
|
||||
func (e *NewSel53) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
)
|
||||
@@ -10,7 +11,7 @@ type NewSel54 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel54) TurnEnd() {
|
||||
func (e *NewSel54) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
)
|
||||
@@ -10,7 +11,7 @@ type NewSel71 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel71) TurnEnd() {
|
||||
func (e *NewSel71) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func (e *Effect125) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
|
||||
|
||||
}
|
||||
func (e *Effect125) DamageLock_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect125) DamageLockEx(t *info.DamageZone) bool {
|
||||
|
||||
if t.Type != info.DamageType.Red {
|
||||
return true
|
||||
|
||||
@@ -29,7 +29,7 @@ func (e *Effect128) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
|
||||
|
||||
}
|
||||
func (e *Effect128) DamageLock_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect128) DamageLockEx(t *info.DamageZone) bool {
|
||||
|
||||
if t.Type != info.DamageType.Red {
|
||||
return true
|
||||
|
||||
@@ -27,7 +27,7 @@ type Effect131 struct {
|
||||
|
||||
// DamageDivEx 受击前触发(核心伤害拦截节点)
|
||||
// 该方法在伤害计算前执行,适合修改/清零伤害实现免疫效果
|
||||
func (e *Effect131) DamageLock_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect131) DamageLockEx(t *info.DamageZone) bool {
|
||||
|
||||
// 3. 获取配置的目标性别X(Args[0]存储X性别的数值)
|
||||
xGender := e.Args()[0].IntPart()
|
||||
|
||||
@@ -15,7 +15,7 @@ type Effect68 struct {
|
||||
StatusID int
|
||||
}
|
||||
|
||||
func (e *Effect68) DamageLock_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect68) DamageLockEx(t *info.DamageZone) bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -168,7 +168,7 @@ func (our *Input) Damage(in *Input, sub *info.DamageZone) {
|
||||
if ok {
|
||||
our.Exec(func(t Effect) bool {
|
||||
|
||||
t.DamageLock_ex(sub)
|
||||
t.DamageLockEx(sub)
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@ type Effect interface {
|
||||
DamageDivEx(*info.DamageZone) bool //受击前触发 这时候就是百分比减伤区间
|
||||
DamageSubEx(*info.DamageZone) bool // 受击触发 这时候就是点数减伤
|
||||
DamageLock(*info.DamageZone) bool //锁定伤害
|
||||
DamageLock_ex(*info.DamageZone) bool //被动方锁定伤害
|
||||
DamageLockEx(*info.DamageZone) bool //被动方锁定伤害
|
||||
Damage_Shield(*info.DamageZone) bool // 护盾值变化时触发
|
||||
//Damage_Use() bool // 伤害作用
|
||||
Skill_Use_ex() bool //技能PP减少节点
|
||||
|
||||
@@ -27,7 +27,7 @@ func (e *EffectNode) DamageLock(_ *info.DamageZone) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *EffectNode) DamageLock_ex(_ *info.DamageZone) bool {
|
||||
func (e *EffectNode) DamageLockEx(_ *info.DamageZone) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ type EffectNode struct {
|
||||
|
||||
func (e *EffectNode) Alive(t ...bool) bool {
|
||||
if len(t) > 0 {
|
||||
println("效果失效", e.id.GetEffectType(), e.ID().Suffix(), t[0])
|
||||
// println("效果失效", e.id.GetEffectType(), e.ID().Suffix(), t[0])
|
||||
e.alive = t[0]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user