Skip to content

Commit

Permalink
调整加机器人逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed Nov 2, 2023
1 parent ec54cf6 commit 346bef4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/handler/add_robot_tos.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class add_robot_tos : AbstractProtoHandler<Fengsheng.add_robot_tos>() {
// return
// }
// }
if (r.game!!.affectScore) {
val humanCount = r.game!!.players.count { it is HumanPlayer }
if (humanCount >= 5) {
r.sendErrorMessage("房间内有其他玩家,禁止添加机器人")
return
}
Expand Down

0 comments on commit 346bef4

Please sign in to comment.