Skip to content

Commit df9be20

Browse files
committed
fix bug where it plays into trash clues when it shouldn't
1 parent 569b6e9 commit df9be20

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -1181,15 +1181,18 @@ function interpret_trash_finesse(game, action, focus_order) {
11811181
if (focus_thoughts.possible.intersect(promised_ids).some(i => !isTrash(state, mod_common, i, focus_order, { infer: true }) && !state.isPlayable(i)))
11821182
return [];
11831183
}
1184-
else if (focus_thoughts.possible.some(c => !isTrash(state, mod_common, c, focus_order, { infer: true })) ||
1185-
focus_thoughts.inferred.every(i => state.isPlayable(i) && !isTrash(state, mod_common, i, focus_order, { infer: true }) && !state.isPlayable(i))) {
1184+
else if (focus_thoughts.inferred.some(i => !state.isPlayable(i) && !isTrash(state, mod_common, i, focus_order, { infer: true }))) {
11861185
return [];
11871186
}
11881187
// check if all new cards are actually trash
11891188
for (const order of list) {
11901189
if (state.deck[order].newly_clued && !state.isBasicTrash(state.deck[order]))
11911190
return [];
11921191
}
1192+
// if it's already kt, no blind play needed
1193+
if (focus_thoughts.possible.every(i => isTrash(state, mod_common, i, focus_order, { infer: true }))) {
1194+
return [];
1195+
}
11931196

11941197
const oldest_trash_index = state.hands[target].findLastIndex(o => state.deck[o].newly_clued);
11951198

0 commit comments

Comments
 (0)