Skip to content

Commit 21cbe52

Browse files
committed
disallow trash finesses with multiple possible cards
1 parent 7c01a0b commit 21cbe52

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/conventions/h-group/clue-interpretation/interpret-clue.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ export function interpret_clue(game, action) {
765765
}
766766
// Check for forward trash finesses or bluffs at level 14
767767
if (game.level >= LEVEL.TRASH_PUSH) {
768-
// trash finesses are only valid if the clue initially reveals all cards to be playable or trash.
768+
// trash bluffs and finesses are only valid if the clue initially reveals all cards to be playable or trash.
769769
const tfcm_orders = interpret_trash_finesse(game, action, focus);
770770
if (tfcm_orders.length > 0) {
771771
// Check who has to play into the trash finesse
@@ -779,6 +779,19 @@ export function interpret_clue(game, action) {
779779
inbetween_players.push(i % game.players.length);
780780
}
781781
if (inbetween_players.length > 0) {
782+
// Trash finesses can only have 1 missing card.
783+
if (inbetween_players.length > 1) {
784+
let missing_cards = 0;
785+
for (const c of common.thoughts[focus].possible.array) {
786+
if (state.isPlayable(c))
787+
missing_cards++;
788+
}
789+
if (missing_cards >= 2) {
790+
game.interpretMove(CLUE_INTERP.MISTAKE);
791+
team_elim(game);
792+
return game;
793+
}
794+
}
782795
for (const p of inbetween_players) {
783796
if (p === state.ourPlayerIndex)
784797
continue;

0 commit comments

Comments
 (0)