From 5d81ebda2f6b188e5c7d488fab9cc6c1ff6432fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E8=91=A9=E3=81=AE=E7=81=B5=E6=A2=A6?= Date: Fri, 6 Dec 2024 17:19:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96AI=E6=98=AF=E5=90=A6=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E9=A3=8E=E4=BA=91=E5=8F=98=E5=B9=BB=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/card/FengYunBianHuan.kt | 27 ++++++++++++------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/main/kotlin/card/FengYunBianHuan.kt b/src/main/kotlin/card/FengYunBianHuan.kt index 78f529a2..2b7af14f 100644 --- a/src/main/kotlin/card/FengYunBianHuan.kt +++ b/src/main/kotlin/card/FengYunBianHuan.kt @@ -225,22 +225,21 @@ class FengYunBianHuan : Card { !player.cannotPlayCard(Feng_Yun_Bian_Huan) || return false if (player.identity == Black) { when (player.secretTask) { - Disturber -> {} - Collector, Mutator -> { - val counts = CountColors(player.messageCards) - var zeroColors = 0 - if (counts.red == 0) zeroColors++ - if (counts.blue == 0) zeroColors++ - if (counts.blue == 0) zeroColors++ - if (zeroColors < 2) return false - } + Collector, Mutator, Disturber -> + if (!player.game!!.isEarly) return false else -> return false } - } else if (player.game!!.players.all { - !it!!.alive || - it.identity != player.identity || - it.messageCards.any { c -> player.identity in c.colors } - }) return false + } else if (!player.game!!.isEarly) { + var score = 0 + val alivePlayers = player.game!!.players.filterNotNull().filter { it.alive } + var curScore = alivePlayers.size + for (p in player.game!!.sortedFrom(alivePlayers, player.location)) { + if (p.identity == player.identity) score += curScore + else if (p.identity != Black) score -= curScore + curScore-- + } + score > 0 || return false + } GameExecutor.post(player.game!!, { convertCardSkill?.onConvert(player) card.asCard(Feng_Yun_Bian_Huan).execute(player.game!!, player)