diff --git a/src/main/kotlin/card/ShiTan.kt b/src/main/kotlin/card/ShiTan.kt index 561bb5ed..1ddd0651 100644 --- a/src/main/kotlin/card/ShiTan.kt +++ b/src/main/kotlin/card/ShiTan.kt @@ -253,6 +253,24 @@ class ShiTan : Card { } } + player.identity == Black -> { + // 按照和自己身份相同的情报数降序排列,然后按照手牌数升序排列 + val c1: Comparator = Comparator { p1, p2 -> + val p1MsgCount = p1!!.messageCards.count(p1.identity) + val p2MsgCount = p2!!.messageCards.count(p2.identity) + if (p1MsgCount != p2MsgCount) + return@Comparator p2MsgCount.compareTo(p1MsgCount) + p1.cards.size.compareTo(p2.cards.size) + } + val colors = listOf(Red, Blue).filter { it !in (card as ShiTan).whoDrawCard } + if (colors.isEmpty()) return false + else { + listOf(player.game!!.players.filter { + it!!.alive && it.identity in colors && it.cards.isNotEmpty() + }.minWithOrNull(c1)) + } + } + jianXianSheng != null && player.isPartner(jianXianSheng) -> listOf(jianXianSheng)