From ab38fad8ae1e73ee001e42c1708bf40bf1a8ac52 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: Thu, 12 Sep 2024 14:45:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=8B=E5=93=8D=E3=80=81=E7=99=BD=E5=B0=8F?= =?UTF-8?q?=E5=B9=B4=E3=80=81=E9=AC=BC=E8=84=9A=E3=80=81=E7=8E=9B=E5=88=A9?= =?UTF-8?q?=E4=BA=9AAI=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/MessageCardValue.kt | 14 ++++++++++++++ src/main/kotlin/RobotPlayer.kt | 12 +++--------- src/main/kotlin/phase/WaitForSelectRole.kt | 9 ++++++++- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/MessageCardValue.kt b/src/main/kotlin/MessageCardValue.kt index 9faccc9b..edc7fd7d 100644 --- a/src/main/kotlin/MessageCardValue.kt +++ b/src/main/kotlin/MessageCardValue.kt @@ -324,6 +324,20 @@ fun Player.calculateMessageCardValue( addScore(inFrontOfWhom, 10) } } + if (colors.any { it != Black } && inFrontOfWhom.skills.any { it is WorkersAreKnowledgable }) { + // 王响【咱们工人有知识】 + addScore(inFrontOfWhom, 9) + } + if (Black !in colors && inFrontOfWhom.skills.any { it is ZhuanJiao || it is JiSong }) { + // 白小年【转交】、鬼脚【急送】 + addScore(inFrontOfWhom, 11) + } + if (sender.skills.any { it is CangShenJiaoTang }) { + // 玛利亚【藏身教堂】 + if (sender.isPartnerOrSelf(inFrontOfWhom) && !inFrontOfWhom.isPublicRole && inFrontOfWhom.roleFaceUp) { + addScore(inFrontOfWhom, 80) + } + } if (Black in colors && inFrontOfWhom.roleFaceUp && inFrontOfWhom.skills.any { it is YiXin } && inFrontOfWhom.messageCards.count(Black) == 2) { // 李宁玉【遗信】 diff --git a/src/main/kotlin/RobotPlayer.kt b/src/main/kotlin/RobotPlayer.kt index 62040c7f..e6ae0c90 100644 --- a/src/main/kotlin/RobotPlayer.kt +++ b/src/main/kotlin/RobotPlayer.kt @@ -8,7 +8,7 @@ import com.fengsheng.protos.Common.color.Black import com.fengsheng.protos.Common.direction import com.fengsheng.protos.Common.direction.Left import com.fengsheng.protos.Common.direction.Right -import com.fengsheng.protos.Common.role.* +import com.fengsheng.protos.Common.role.zhang_yi_ting import com.fengsheng.protos.Common.secret_task.* import com.fengsheng.protos.endReceivePhaseTos import com.fengsheng.protos.notifyDieGiveCardToc @@ -150,14 +150,8 @@ class RobotPlayer : Player() { if (myValue >= 0 || nextNextValue >= 0) { if (myValue > myNextValue) return@run true // 自己比下家收益高就接 if (myValue == myNextValue && myValue >= 0) { - // 下家和自己是队友,且下家是张一挺,王响,白小年就不接 - if (isPartner(nextPlayer) && ( - nextPlayer.role == zhang_yi_ting || - nextPlayer.role == huo_che_si_ji || - nextPlayer.role == bai_xiao_nian)) { - return@run false - } - return@run true // 相等的情况下,收益不为负就接 + // 相等的情况下,下家和自己是队友,且下家是张一挺就不接,否则接 + return@run !(isPartner(nextPlayer) && nextPlayer.role == zhang_yi_ting) } } val lockPlayer = fsm.lockedPlayers.ifEmpty { listOf(fsm.sender) }.first() diff --git a/src/main/kotlin/phase/WaitForSelectRole.kt b/src/main/kotlin/phase/WaitForSelectRole.kt index 1d0fb961..e24d06ba 100644 --- a/src/main/kotlin/phase/WaitForSelectRole.kt +++ b/src/main/kotlin/phase/WaitForSelectRole.kt @@ -1,11 +1,15 @@ package com.fengsheng.phase import com.fengsheng.* -import com.fengsheng.protos.* import com.fengsheng.protos.Common.color.Black import com.fengsheng.protos.Common.role.* import com.fengsheng.protos.Common.secret_task.Collector +import com.fengsheng.protos.Common.secret_task.Disturber import com.fengsheng.protos.Fengsheng.select_role_tos +import com.fengsheng.protos.gameStartToc +import com.fengsheng.protos.selectRoleToc +import com.fengsheng.protos.selectRoleTos +import com.fengsheng.protos.waitForSelectRoleToc import com.fengsheng.skill.RoleCache import com.fengsheng.skill.RoleSkillsData import com.google.protobuf.GeneratedMessage @@ -45,6 +49,9 @@ data class WaitForSelectRole(val game: Game, val options: List