@@ -1854,6 +1854,11 @@ end
18541854
18551855local discard_ref = G .FUNCS .discard_cards_from_highlighted
18561856G .FUNCS .discard_cards_from_highlighted = function (e , hook )
1857+ -- Labyrinth: set current_round_discards_used to 0 for effects
1858+ G .GAME .current_round .discards_used2 = G .GAME .current_round .discards_used
1859+ if next (find_joker (" cry-maze" )) then
1860+ G .GAME .current_round .discards_used = 0
1861+ end
18571862 discard_ref (e , hook )
18581863 local highlighted_count = math.min (# G .hand .highlighted , G .discard .config .card_limit - # G .play .cards )
18591864 if highlighted_count <= 0 then
@@ -1889,9 +1894,22 @@ G.FUNCS.discard_cards_from_highlighted = function(e, hook)
18891894 end ,
18901895 }))
18911896 end
1897+ -- Labyrinth: return current_round_discards_used back to the amount it is supposed to be after
1898+ G .GAME .current_round .discards_used = G .GAME .current_round .discards_used2 + 1
18921899end
18931900local play_ref = G .FUNCS .play_cards_from_highlighted
18941901G .FUNCS .play_cards_from_highlighted = function (e )
1902+ -- Labyrinth: set current_round_hands played to 0 for effects
1903+ G .E_MANAGER :add_event (Event ({
1904+ trigger = " immediate" ,
1905+ func = function ()
1906+ G .GAME .current_round .hands_played2 = G .GAME .current_round .hands_played
1907+ if next (find_joker (" cry-maze" )) then
1908+ G .GAME .current_round .hands_played = 0
1909+ end
1910+ return true
1911+ end ,
1912+ }))
18951913 G .GAME .before_play_buffer = true
18961914 -- None Stuff
18971915 if G .GAME .stamp_mod and not G .PROFILES [G .SETTINGS .profile ].cry_none and # G .hand .highlighted == 1 then
@@ -1905,6 +1923,21 @@ G.FUNCS.play_cards_from_highlighted = function(e)
19051923 -- Add blind context for Just before cards are played
19061924 G .GAME .blind :cry_before_play ()
19071925 play_ref (e )
1926+ -- Labyrinth: return current_round_hands played to the amount it is supposed to be at after
1927+ G .E_MANAGER :add_event (Event ({
1928+ trigger = " immediate" ,
1929+ func = function ()
1930+ G .E_MANAGER :add_event (Event ({
1931+ trigger = " after" ,
1932+ delay = 0.1 ,
1933+ func = function ()
1934+ G .GAME .current_round .hands_played = G .GAME .current_round .hands_played2 + 1
1935+ return true
1936+ end ,
1937+ }))
1938+ return true
1939+ end ,
1940+ }))
19081941 G .GAME .before_play_buffer = nil
19091942end
19101943
0 commit comments