Skip to content

Commit 6cbc2b0

Browse files
committed
antipattern queue changes
1 parent fc9ae68 commit 6cbc2b0

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

items/jokers/misc_jokers.lua

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5370,26 +5370,21 @@ local antipattern = {
53705370
pos = {x = 4, y = 12},
53715371
atlas = "jokers",
53725372
loc_vars = function(self, q, card)
5373+
local hands_after_last_played = {}
53735374
local hands = {}
5374-
for i, v in pairs(G.handlist) do
5375-
hands[#hands+1] = {}
5376-
end
5377-
for i, v in pairs(card.ability.hand_pairs) do
5378-
hands[v[1]] = hands[v[1]] or {}
5379-
hands[v[1]][#hands[v[1]]+1] = v[2]
5380-
end
5381-
for i, v in pairs(hands) do
5382-
local vars = {localize(i, "poker_hands")}
5383-
if #v > 0 then
5384-
for i, v2 in pairs(v) do
5385-
vars[#vars+1] = localize(v2, "poker_hands")
5386-
end
5387-
for i = #vars, 12 do
5388-
vars[#vars+1] = ""
5389-
end
5390-
q[#q+1] = {set = "Other", key = "antipattern_pair", vars = vars}
5375+
for i = 1, 13 do hands_after_last_played[i] = "" end
5376+
local last_played = card.ability.last_hand
5377+
for _,hand_pair in ipairs(card.ability.hand_pairs) do
5378+
-- hand_pair[1] is last-played, hand_pair[2] is currently-played
5379+
if hand_pair[1] == last_played then
5380+
hands[#hands+1] = localize(hand_pair[2], "poker_hands")
53915381
end
53925382
end
5383+
for i, v in pairs(hands) do hands_after_last_played[i+1] = v end
5384+
if card.ability.last_hand ~= "" then
5385+
hands_after_last_played[1] = localize(card.ability.last_hand, "poker_hands")
5386+
q[#q+1] = {set = "Other", key = "antipattern_pair", vars = hands_after_last_played}
5387+
end
53935388
return {
53945389
vars = {
53955390
card.ability.xchips_mod,

items/misc/blinds.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,4 +1068,4 @@ return {
10681068
void,
10691069
rr
10701070
}
1071-
}
1071+
}

0 commit comments

Comments
 (0)