Skip to content

Commit 124fb19

Browse files
authored
Allow exploit (and crossmod stuff) to display the correct numbers for None (#694)
1 parent d31e8e7 commit 124fb19

File tree

3 files changed

+11
-29
lines changed

3 files changed

+11
-29
lines changed

lib/misc.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,3 +796,7 @@ function Cryptid.cry_rankname_to_id(rankname)
796796
end
797797
return nil
798798
end
799+
800+
function Cryptid.reset_to_none()
801+
update_hand_text({delay = 0}, {mult = Cryptid.ascend(G.GAME.hands["cry_None"].mult), chips = Cryptid.ascend(G.GAME.hands["cry_None"].chips), level = G.GAME.hands["cry_None"].level, handname = localize('cry_None', "poker_hands")})
802+
end

lib/overrides.lua

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,13 +1647,7 @@ function Blind:set_blind(blind, reset, silent)
16471647
G.E_MANAGER:add_event(Event({
16481648
trigger = "after",
16491649
func = function()
1650-
update_hand_text({ delay = 0, immediate = true }, {
1651-
mult = G.GAME.hands["cry_None"].mult,
1652-
chips = G.GAME.hands["cry_None"].chips,
1653-
level = G.GAME.hands["cry_None"].level,
1654-
handname = localize("cry_None", "poker_hands"),
1655-
})
1656-
1650+
Cryptid.reset_to_none()
16571651
return true
16581652
end,
16591653
}))
@@ -1688,12 +1682,7 @@ function Game:update_selecting_hand(dt)
16881682
G.E_MANAGER:add_event(Event({
16891683
trigger = "after",
16901684
func = function()
1691-
update_hand_text({ delay = 0, immediate = true }, {
1692-
mult = G.GAME.hands["cry_None"].mult,
1693-
chips = G.GAME.hands["cry_None"].chips,
1694-
level = G.GAME.hands["cry_None"].level,
1695-
handname = localize("cry_None", "poker_hands"),
1696-
})
1685+
Cryptid.reset_to_none()
16971686

16981687
return true
16991688
end,
@@ -1714,12 +1703,7 @@ function Blind:load(blindTable)
17141703
G.E_MANAGER:add_event(Event({
17151704
trigger = "after",
17161705
func = function()
1717-
update_hand_text({ delay = 0, immediate = true, volume = 0.01 }, {
1718-
mult = G.GAME.hands["cry_None"].mult,
1719-
chips = G.GAME.hands["cry_None"].chips,
1720-
level = G.GAME.hands["cry_None"].level,
1721-
handname = localize("cry_None", "poker_hands"),
1722-
})
1706+
Cryptid.reset_to_none()
17231707
return true
17241708
end,
17251709
}))
@@ -1771,13 +1755,7 @@ G.FUNCS.discard_cards_from_highlighted = function(e, hook)
17711755
G.E_MANAGER:add_event(Event({
17721756
trigger = "after",
17731757
func = function()
1774-
update_hand_text({ delay = 0, immediate = true }, {
1775-
mult = G.GAME.hands["cry_None"].mult,
1776-
chips = G.GAME.hands["cry_None"].chips,
1777-
level = G.GAME.hands["cry_None"].level,
1778-
handname = localize("cry_None", "poker_hands"),
1779-
})
1780-
1758+
Cryptid.reset_to_none()
17811759
return true
17821760
end,
17831761
}))

lovely/none.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ position = "at"
5656
payload = '''
5757
level_up_hand(context.blueprint_card or self, text, nil, 1)
5858
if G.GAME.hands["cry_None"].visible then
59-
update_hand_text({delay = 0}, {G.GAME.hands["cry_None"].mult, chips = G.GAME.hands["cry_None"].chips, level = G.GAME.hands["cry_None"].level, handname = localize('cry_None', "poker_hands")})
59+
Cryptid.reset_to_none()
6060
6161
else
6262
update_hand_text({delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
@@ -103,7 +103,7 @@ payload = '''
103103
level_up_hand(self, k, true)
104104
end
105105
if G.GAME.hands["cry_None"].visible then
106-
update_hand_text({delay = 0}, {G.GAME.hands["cry_None"].mult, chips = G.GAME.hands["cry_None"].chips, level = G.GAME.hands["cry_None"].level, handname = localize('cry_None', "poker_hands")})
106+
Cryptid.reset_to_none()
107107
108108
else
109109
update_hand_text({delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
@@ -123,7 +123,7 @@ position = "at"
123123
payload = '''
124124
if self.ability.consumeable.max_highlighted then
125125
if G.GAME.hands["cry_None"].visible then
126-
update_hand_text({delay = 0}, {G.GAME.hands["cry_None"].mult, chips = G.GAME.hands["cry_None"].chips, level = G.GAME.hands["cry_None"].level, handname = localize('cry_None', "poker_hands")})
126+
Cryptid.reset_to_none()
127127
128128
else
129129
update_hand_text({delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})

0 commit comments

Comments
 (0)