From 6d41b2a21080045f73d68f083c1a64562d459d7d 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, 13 Sep 2024 16:15:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=91=E7=94=9F=E7=81=ABAI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/MessageCardValue.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/kotlin/MessageCardValue.kt b/src/main/kotlin/MessageCardValue.kt index 1a5a712e..8ba8adca 100644 --- a/src/main/kotlin/MessageCardValue.kt +++ b/src/main/kotlin/MessageCardValue.kt @@ -222,6 +222,16 @@ fun Player.calculateMessageCardValue( override fun canUse(g: Game, r: Player, vararg args: Any) = false override fun execute(g: Game, r: Player, vararg args: Any) = Unit } + if (colors.size == 2 && inFrontOfWhom.skills.any { it is JinShen }) { // 金生火 + var valueInFrontOfWhom = 0 + for (c in inFrontOfWhom.cards.toList()) { + val v = inFrontOfWhom.calculateMessageCardValue(whoseTurn, inFrontOfWhom, c.colors, checkThreeSame) + if (v > valueInFrontOfWhom) { + valueInFrontOfWhom = v + v1 = calculateMessageCardValue(whoseTurn, inFrontOfWhom, c.colors, checkThreeSame) + } + } + } if (sender.skills.any { it is MianLiCangZhen }) { // 邵秀 inFrontOfWhom.messageCards.add(TmpCard(colors)) var valueSender = -1