refactor: 重命名 ActionEndEx 为 Action_end_ex
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-08 19:14:42 +08:00
committed by cnb
parent 54e902d1e3
commit ca7eb04f6e
22 changed files with 58 additions and 60 deletions

View File

@@ -12,7 +12,7 @@ type NewSel144 struct {
count int count int
} }
func (e *NewSel144) ActionEndEx() bool { func (e *NewSel144) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true
} }

View File

@@ -12,7 +12,7 @@ type NewSel25 struct {
NewSel0 NewSel0
} }
func (e *NewSel25) ActionEndEx() bool { func (e *NewSel25) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true
} }

View File

@@ -10,7 +10,7 @@ type NewSel31 struct {
NewSel0 NewSel0
} }
func (e *NewSel31) ActionEndEx() bool { func (e *NewSel31) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true
} }

View File

@@ -10,7 +10,7 @@ type NewSel33 struct {
NewSel0 NewSel0
} }
func (e *NewSel33) ActionEndEx() bool { func (e *NewSel33) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true
} }

View File

@@ -13,7 +13,7 @@ type NewSel403 struct {
remainingTurns int remainingTurns int
} }
func (e *NewSel403) ActionEndEx() bool { func (e *NewSel403) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -10,8 +10,8 @@ type NewSel408 struct {
NewSel0 NewSel0
} }
// ActionEndEx 实现消除能力强化效果的核心逻辑 // Action_end_ex 实现消除能力强化效果的核心逻辑
func (e *NewSel408) ActionEndEx() bool { func (e *NewSel408) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if !e.IsOwner() { if !e.IsOwner() {
return true return true

View File

@@ -10,7 +10,7 @@ type NewSel409 struct {
NewSel0 NewSel0
} }
func (e *NewSel409) ActionEndEx() bool { func (e *NewSel409) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -11,7 +11,7 @@ type NewSel44 struct {
count int count int
} }
func (e *NewSel44) ActionEndEx() bool { func (e *NewSel44) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true
} }

View File

@@ -15,7 +15,7 @@ type NewSel46 struct {
lastRecoveryRound uint32 lastRecoveryRound uint32
} }
func (e *NewSel46) ActionEndEx() bool { func (e *NewSel46) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -18,7 +18,7 @@ type NewSel49 struct {
remainingTurns int remainingTurns int
} }
func (e *NewSel49) ActionEndEx() bool { func (e *NewSel49) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -16,7 +16,7 @@ type NewSel59 struct {
} }
// TODO: 需要了解魔王的附身触发条件 // TODO: 需要了解魔王的附身触发条件
func (e *NewSel59) ActionEndEx() bool { func (e *NewSel59) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -11,7 +11,7 @@ type NewSel6 struct {
NewSel0 NewSel0
} }
func (e *NewSel6) ActionEndEx() bool { func (e *NewSel6) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -10,7 +10,7 @@ type NewSel74 struct {
NewSel0 NewSel0
} }
func (e *NewSel74) ActionEndEx() bool { func (e *NewSel74) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -10,7 +10,7 @@ type NewSel78 struct {
NewSel0 NewSel0
} }
func (e *NewSel78) ActionEndEx() bool { func (e *NewSel78) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -10,7 +10,7 @@ type NewSel9 struct {
NewSel0 NewSel0
} }
func (e *NewSel9) ActionEndEx() bool { func (e *NewSel9) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true
} }

View File

@@ -11,7 +11,7 @@ type Effect561 struct {
can bool can bool
} }
func (e *Effect561) ActionEndEx() bool { func (e *Effect561) Action_end_ex() bool {
if e.Input.FightC.IsFirst(e.Input.Player) { if e.Input.FightC.IsFirst(e.Input.Player) {
if e.Ctx().Our.CurrentPet.GetHP().IntPart() == 0 { if e.Ctx().Our.CurrentPet.GetHP().IntPart() == 0 {
e.Ctx().Our.CurrentPet.Info.Hp = e.Ctx().Our.CurrentPet.Info.MaxHp e.Ctx().Our.CurrentPet.Info.Hp = e.Ctx().Our.CurrentPet.Info.MaxHp

View File

@@ -15,7 +15,7 @@ func (e *Effect164) SetArgs(t *input.Input, a ...int) {
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0]) e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
} }
func (e *Effect164) ActionEndEx() bool { func (e *Effect164) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定 //魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true return true

View File

@@ -32,7 +32,7 @@ func (e *Effect73) SetArgs(t *input.Input, a ...int) {
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0] - 1) e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0] - 1)
} }
func (e *Effect73) ActionEndEx() bool { func (e *Effect73) Action_end_ex() bool {
if !e.Input.FightC.IsFirst(e.Ctx().Our.Player) { if !e.Input.FightC.IsFirst(e.Ctx().Our.Player) {
return true return true

View File

@@ -248,26 +248,26 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
} }
} }
if defender.CurrentPet.Info.Hp > 0 { // if defender.CurrentPet.Info.Hp > 0 {
//技能使用后 // //技能使用后
defender.Exec(func(effect input.Effect) bool { // defender.Exec(func(effect input.Effect) bool {
effect.Ctx().SkillEntity = currentSkill // effect.Ctx().SkillEntity = currentSkill
effect.Skill_Use_ex() // effect.Skill_Use_ex()
return true // return true
}) // })
} // }
//技能使用后 // //技能使用后
attacker.Exec(func(effect input.Effect) bool { //技能使用后的我方效果 // attacker.Exec(func(effect input.Effect) bool { //技能使用后的我方效果
effect.Ctx().SkillEntity = currentSkill // effect.Ctx().SkillEntity = currentSkill
effect.SkillUseed() // effect.SkillUseed()
return true // return true
}) // })
defender.Exec(func(effect input.Effect) bool { // defender.Exec(func(effect input.Effect) bool {
effect.Ctx().SkillEntity = currentSkill // effect.Ctx().SkillEntity = currentSkill
effect.ActionEndEx() // effect.Action_end_ex()
return true // return true
}) // })
if defender.CurrentPet.Info.Hp <= 0 && attacker.CurrentPet.Info.Hp <= 0 { //先手方死亡,触发反同归于尽 if defender.CurrentPet.Info.Hp <= 0 && attacker.CurrentPet.Info.Hp <= 0 { //先手方死亡,触发反同归于尽
attacker.CurrentPet.Info.Hp = 1 attacker.CurrentPet.Info.Hp = 1

View File

@@ -34,9 +34,9 @@ type Effect interface {
DamageLockEx(*info.DamageZone) bool //被动方锁定伤害 DamageLockEx(*info.DamageZone) bool //被动方锁定伤害
Damage_Shield(*info.DamageZone) bool // 护盾值变化时触发 Damage_Shield(*info.DamageZone) bool // 护盾值变化时触发
//Damage_Use() bool // 伤害作用 //Damage_Use() bool // 伤害作用
Skill_Use_ex() bool //技能PP减少节点 //Skill_Use_ex() bool //技能PP减少节点
SkillUseed() bool //技能PP减少节点 //Action_end() bool //技能PP减少节点
ActionEndEx() bool //Action_end_ex() bool
Action_end() bool Action_end() bool
Action_end_ex() bool Action_end_ex() bool
//OnDefeat(opp *Input) bool // 精灵被击败时触发 //OnDefeat(opp *Input) bool // 精灵被击败时触发

View File

@@ -18,7 +18,7 @@ func (e *EffectNode) OnBattleEnd() bool {
func (e *EffectNode) EFFect_Befer(in *input.Input, effEffect input.Effect) bool { func (e *EffectNode) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
return true return true
} }
func (e *EffectNode) ActionEndEx() bool { func (e *EffectNode) Action_end_ex() bool {
// panic("not implemented") // TODO: Implement // panic("not implemented") // TODO: Implement
return true return true
} }

View File

@@ -19,10 +19,7 @@ func (e *EffectNode) SkillHit() bool {
func (e *EffectNode) SkillHit_ex() bool { func (e *EffectNode) SkillHit_ex() bool {
return true return true
} }
func (e *EffectNode) Action_end_ex() bool {
return true
}
func (e *EffectNode) CalculatePre() bool { func (e *EffectNode) CalculatePre() bool {
return true return true
} }
@@ -43,22 +40,23 @@ func (e *EffectNode) Skill_Can() bool {
return e.Input.CurrentPet.HP != 0 return e.Input.CurrentPet.HP != 0
} }
func (e *EffectNode) Skill_Use_ex() bool { // func (e *EffectNode) Skill_Use_ex() bool {
return true // return true
} // }
func (e *EffectNode) SkillUseed() bool {
// if e.Effect != nil {
// if e.Input.CurrentPet.Info.Hp == 0 {
// e.OnDefeat(ctx.Input, ctx.SkillEntity) //死亡
// } else { // func (e *EffectNode) SkillUseed() bool {
// e.OnAlive(ctx.Input, ctx.SkillEntity) //存活 // // if e.Effect != nil {
// } // // if e.Input.CurrentPet.Info.Hp == 0 {
// // e.OnDefeat(ctx.Input, ctx.SkillEntity) //死亡
// } // // } else {
// return true // // e.OnAlive(ctx.Input, ctx.SkillEntity) //存活
return true // // }
}
// // }
// // return true
// return true
// }
type Effect interface { type Effect interface {
OnMiss(opp *input.Input, skill *info.SkillEntity) OnMiss(opp *input.Input, skill *info.SkillEntity)