```
refactor(fight/effect): 移除组队对战中无效的技能复制效果 移除了Effect457技能复制功能,该功能在组队对战时无效且不再需要, 简化了战斗效果逻辑。 ```
This commit is contained in:
37
logic/service/fight/effect/497.go
Normal file
37
logic/service/fight/effect/497.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
)
|
||||
|
||||
// 457 - 复制对手释放的技能(组队对战时无效)
|
||||
type Effect457 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect457) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
|
||||
if fattack == nil {
|
||||
return true
|
||||
}
|
||||
//先手是自己
|
||||
if fattack.PlayerID == e.Ctx().Our.UserID {
|
||||
if sattack != nil {
|
||||
fattack.Accuracy = sattack.SkillEntity.Accuracy
|
||||
|
||||
} else {
|
||||
fattack = nil
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 457, &Effect457{})
|
||||
|
||||
}
|
||||
@@ -36,23 +36,6 @@ func (e *Effect523) Action_end_ex() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// 457 - 复制对手释放的技能(组队对战时无效)
|
||||
type Effect457 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect457) Skill_Use_ex() bool {
|
||||
// 这里需要检查是否在组队对战中
|
||||
if !e.Ctx().IsTeamBattle { // 不是组队对战
|
||||
if e.Ctx().SkillEntity != nil {
|
||||
// 复制对手释放的技能
|
||||
e.Ctx().Our.CopySkill(e.Ctx().SkillEntity)
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// 197 - n回合内若被对方击败,则对手所有能力加强状态消失
|
||||
type Effect197 struct {
|
||||
node.EffectNode
|
||||
|
||||
Reference in New Issue
Block a user