From 346bef487f08164072b99c8bbc6b51d920802063 Mon Sep 17 00:00:00 2001 From: CuteReimu <415551921@qq.com> Date: Thu, 2 Nov 2023 15:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8A=A0=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/handler/add_robot_tos.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/handler/add_robot_tos.kt b/src/main/kotlin/handler/add_robot_tos.kt index a79da5c4..e9771683 100644 --- a/src/main/kotlin/handler/add_robot_tos.kt +++ b/src/main/kotlin/handler/add_robot_tos.kt @@ -23,7 +23,8 @@ class add_robot_tos : AbstractProtoHandler() { // return // } // } - if (r.game!!.affectScore) { + val humanCount = r.game!!.players.count { it is HumanPlayer } + if (humanCount >= 5) { r.sendErrorMessage("房间内有其他玩家,禁止添加机器人") return }