Skip to content

Commit f56d3bc

Browse files
committed
even more straight calc fixes
1 parent b1713fe commit f56d3bc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/overrides.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,7 @@ function SMODS.four_fingers()
19641964
end
19651965

19661966
function Cryptid.create_dummy_from_stone(rank)
1967+
local r = rank
19671968
rank = tonumber(rank) or ({
19681969
Ace = 14,
19691970
King = 13,
@@ -1979,6 +1980,7 @@ function Cryptid.create_dummy_from_stone(rank)
19791980
},
19801981
base = {
19811982
id = rank,
1983+
value = rank >= 11 and "Queen" or "10"
19821984
},
19831985
}
19841986
end
@@ -2047,6 +2049,16 @@ function get_straight(hand, min_length, skip, wrap)
20472049
ranks[#ranks + 1] = v
20482050
end
20492051
end
2052+
if v:get_id() >= 11 then
2053+
new_ranks = {
2054+
"Ace",
2055+
"King",
2056+
"Queen",
2057+
"Jack",
2058+
10
2059+
}
2060+
for i, v in pairs(new_ranks) do ranks[#ranks+1] = v end
2061+
end
20502062
end
20512063
for i, v in Cryptid.unique_combinations(ranks) do
20522064
if #i == stones then
@@ -2066,7 +2078,7 @@ function get_straight(hand, min_length, skip, wrap)
20662078
actual[#actual + 1] = d
20672079
end
20682080
end
2069-
local ret = get_straight_ref(actual, min_length + stones, skip, wrap)
2081+
local ret = get_straight_ref(actual, min_length + stones, skip, true)
20702082
if ret and #ret > 0 then
20712083
return ret
20722084
end

0 commit comments

Comments
 (0)