diff --git a/gamerule/chess/constants.go b/gamerule/chess/constants.go index 39fe5dd..9341718 100644 --- a/gamerule/chess/constants.go +++ b/gamerule/chess/constants.go @@ -10,12 +10,12 @@ const ( ) const ( - WaitStartTimeout = time.Second * 3 // 开始游戏 - HandCardTimeout = time.Second * 1 // 发牌 - PlayerOpTimeout = time.Second * 16 // 玩家操作阶段 - BilledTimeout = time.Second * 1 // 结算 - - PlayerTotalTime = time.Minute*15 + time.Second // 下棋总时长 + WaitStartTimeout = time.Second * 3 // 开始游戏 + HandCardTimeout = time.Second * 1 // 发牌 + PlayerOpTimeout = time.Second * 61 // 玩家操作阶段 + BilledTimeout = time.Second * 1 // 结算 + PlayerFirstOpTimeout = time.Second * 31 + PlayerTotalTime = time.Minute*10 + time.Second // 下棋总时长 ) // 场景状态 diff --git a/gamesrv/chess/scenepolicy.go b/gamesrv/chess/scenepolicy.go index f39d27c..27b3dc2 100644 --- a/gamesrv/chess/scenepolicy.go +++ b/gamesrv/chess/scenepolicy.go @@ -1164,8 +1164,14 @@ func (this *SceneStatePlayerOp) OnTick(s *base.Scene) { } } - if now.Sub(sceneEx.StateStartTime) > rule.PlayerOpTimeout { - f() + if sceneEx.chess.GetRound() == 1 || sceneEx.chess.GetRound() == 2 { + if now.Sub(sceneEx.StateStartTime) > rule.PlayerFirstOpTimeout { + f() + } + } else { + if now.Sub(sceneEx.StateStartTime) > rule.PlayerOpTimeout { + f() + } } curPlayer := sceneEx.seats[sceneEx.GetCurOpPos()]