-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevens.lua
More file actions
56 lines (49 loc) · 1.48 KB
/
evens.lua
File metadata and controls
56 lines (49 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
if not TEST then
assert(SMODS.load_file('modutils/init.lua'))()
assert(SMODS.load_file('logic/init.lua'))()
end
local EvensHand = {
mult = 4,
chips = 32,
mult_increase_per_level = 3,
chips_increase_per_level = 20
}
SMODS.PokerHand {
key = 'EvensHand',
mult = EvensHand.mult,
chips = EvensHand.chips,
l_mult = EvensHand.mult_increase_per_level,
l_chips = EvensHand.chips_increase_per_level,
example = {
{ 'S_2', true }, -- 2 of Spades, scores
{ 'C_4', true }, -- 4 of Clubs, scores
{ 'H_6', true }, -- 6 of Hearts, scores
{ 'D_8', true }, -- 8 of Diamonds, scores
{ 'S_T', true } -- 10 of Spades, scores
},
evaluate = function (parts, hand)
local cardRanksFromHand = ModUtils.cardRanksFromHand(hand)
if (EvensHandValidator.isValidCardRanks(cardRanksFromHand)) then
return { hand }
end
return {}
end
}
--[[
Use SMODS.PokerHandPart for Flush and Straight Flush variants of Evens hand
possibly use SMODS.merge_lists function for Flush and Straight Flush future variants of Evens hand(?)
--]]
if not TEST then
SMODS.current_mod.config_tab = function()
return {
n = G.UIT.ROOT,
nodes = {
create_toggle {
label = localize('evens_evil_mode'),
ref_table = SMODS.current_mod.config,
ref_value = 'evil_mode',
}
}
}
end
end