Skip to content

Commit

Permalink
判断李宁玉死亡时是翻开的 (#281)
Browse files Browse the repository at this point in the history
* 判断李宁玉死亡时是翻开的

* 判断李宁玉死亡状态
  • Loading branch information
zc-meng authored Sep 3, 2024
1 parent 52d6d97 commit 0182a69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/MessageCardValue.kt
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ fun Player.calculateMessageCardValue(
v1 -= 20
}
}
if (Black in colors && inFrontOfWhom.skills.any { it is YiXin } && inFrontOfWhom.messageCards.count(Black) == 2) {
if (Black in colors && inFrontOfWhom.roleFaceUp &&
inFrontOfWhom.skills.any { it is YiXin } && inFrontOfWhom.messageCards.count(Black) == 2) {
// 李宁玉【遗信】
var liNingYuValue = -1
var myValue = 0
Expand Down Expand Up @@ -626,7 +627,7 @@ fun Player.wantToSave(whoseTurn: Player, whoDie: Player): Boolean {
}
}
// 如果死亡的是李宁玉且有手牌
if (whoDie.skills.any { it is YiXin } && whoDie.cards.isNotEmpty()) {
if (whoDie.roleFaceUp && whoDie.skills.any { it is YiXin } && whoDie.cards.isNotEmpty()) {
// 如果李宁玉的队友听牌
if (whoDie.game!!.players.any {
it!!.alive && it !== whoDie && it.identity == whoDie.identity && it.messageCards.count(whoDie.identity) == 2
Expand Down

0 comments on commit 0182a69

Please sign in to comment.