Skip to content

Commit

Permalink
优化王魁反贴情报收益 (#291)
Browse files Browse the repository at this point in the history
* 优化王魁反贴情报收益

* 优化王魁反贴情报收益

---------

Co-authored-by: 奇葩の灵梦 <[email protected]>
  • Loading branch information
zc-meng and CuteReimu authored Sep 9, 2024
1 parent 909b972 commit e13d2eb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main/kotlin/MessageCardValue.kt
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,23 @@ fun Player.calculateMessageCardValue(
v1 += valueMe
inFrontOfWhom.messageCards.removeLast()
}
if (Black in colors && inFrontOfWhom.skills.any { it is YiYaHuanYa }) { // 王魁
inFrontOfWhom.messageCards.add(TmpCard(colors))
var valueInFrontOfWhom = -1
var valueMe = 0
for (c in inFrontOfWhom.cards.filter(Card::isBlack)) {
for (p in listOf(sender, sender.getNextLeftAlivePlayer(), sender.getNextRightAlivePlayer())) {
val v = inFrontOfWhom.calculateMessageCardValue(whoseTurn, p, c.colors, checkThreeSame)
if (v > valueInFrontOfWhom) {
valueInFrontOfWhom = v
valueMe = calculateMessageCardValue(whoseTurn, p, c.colors, checkThreeSame)
}
}
}
v1 += valueMe
logger.debug("这是[王魁]传出的情报,计算[以牙还牙]额外分数为$valueMe")
inFrontOfWhom.messageCards.removeLast()
}
if (Black !in colors && sender.skills.any { it is ChiZiZhiXin } && sender !== inFrontOfWhom) { // 青年小九
inFrontOfWhom.messageCards.add(TmpCard(colors))
var valueSender = 30
Expand Down

0 comments on commit e13d2eb

Please sign in to comment.