diff --git a/logic/service/fight/fightc.go b/logic/service/fight/fightc.go index bfe010c67..a55902f40 100644 --- a/logic/service/fight/fightc.go +++ b/logic/service/fight/fightc.go @@ -202,11 +202,17 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction) }) canUse := canUseSkill && action.CanUse(currentSkill) && attacker.CurrentPet.Info.Hp > 0 + if i == 0 { //先手方被控,这时候应该算做未出手状态 + if canUse { + f.TrueFirst = attacker - if !canUse { - if i == 0 { //增加我方放弃出手时变成后手放判断 - f.Second, f.First = f.First, f.Second + } else { + f.TrueFirst = defender } + + } + if !canUse { + attacker.RecoverEffect() currentSkill = nil } else { diff --git a/logic/service/fight/input.go b/logic/service/fight/input.go index da4d3f516..24731defb 100644 --- a/logic/service/fight/input.go +++ b/logic/service/fight/input.go @@ -45,6 +45,7 @@ type FightC struct { quit chan struct{} over chan struct{} First *input.Input + TrueFirst *input.Input Second *input.Input closefight bool overl sync.Once @@ -103,7 +104,7 @@ func (f *FightC) GetRand() *rand.Rand { // 获取随机数 func (f *FightC) IsFirst(play common.PlayerI) bool { - return f.First.Player == play + return f.TrueFirst.Player == play } func (f *FightC) Chat(c common.PlayerI, msg string) {