Skip to content

Commit 0b461b9

Browse files
Merge pull request #503 from lord-ruby/main
Ascended hands turn the mult & chips colours gold
2 parents f8d0b6a + 6ef5036 commit 0b461b9

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

lib/ascended.lua

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ G.FUNCS.cry_asc_UI_set = function(e)
88
end
99
e.config.object:update_text()
1010
end
11+
12+
-- Needed because get_poker_hand_info isnt called at the end of the road
13+
local evaluateroundref = G.FUNCS.evaluate_round
14+
function G.FUNCS.evaluate_round()
15+
evaluateroundref()
16+
-- This is just the easiest way to check if its gold because lua is annoying
17+
if G.C.UI_CHIPS[1] == G.C.GOLD[1] then
18+
ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.3)
19+
ease_colour(G.C.UI_MULT, G.C.RED, 0.3)
20+
end
21+
end
22+
1123
-- this is a hook to make funny "x of a kind"/"flush x" display text
1224
local pokerhandinforef = G.FUNCS.get_poker_hand_info
1325
function G.FUNCS.get_poker_hand_info(_cards)
@@ -20,6 +32,7 @@ function G.FUNCS.get_poker_hand_info(_cards)
2032
loc_disp_text = localize(disp_text, "poker_hands")
2133
end
2234
end
35+
2336
if G.SETTINGS.language == "en-us" then
2437
if #scoring_hand > 5 and (text == "Flush Five" or text == "Five of a Kind") then
2538
local rank_array = {}
@@ -116,7 +129,14 @@ function G.FUNCS.get_poker_hand_info(_cards)
116129
["cry_UltPair"] = 8,
117130
["cry_WholeDeck"] = 52,
118131
}
119-
132+
-- Change mult and chips colors if hand is ascended
133+
if #scoring_hand > hand_table[text] then
134+
ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.3)
135+
ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.3)
136+
else
137+
ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.3)
138+
ease_colour(G.C.UI_MULT, G.C.RED, 0.3)
139+
end
120140
-- this is where all the logic for asc hands is. currently it's very simple but if you want more complex logic, here's the place to do it
121141
if hand_table[text] and Cryptid.enabled("set_cry_poker_hand_stuff") == true then
122142
G.GAME.current_round.current_hand.cry_asc_num = G.GAME.used_vouchers.v_cry_hyperspacetether

0 commit comments

Comments
 (0)