Skip to content

Commit 9e66ead

Browse files
committed
add paved joker
1 parent f0bc5d5 commit 9e66ead

File tree

7 files changed

+112
-2
lines changed

7 files changed

+112
-2
lines changed

assets/1x/atlasone.png

3.12 KB
Loading

assets/2x/atlasone.png

3.55 KB
Loading

items/misc_joker.lua

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10242,7 +10242,7 @@ local yarnball = { -- +1 to all listed probabilities for the highest cat tag lev
1024210242
end,
1024310243
}
1024410244

10245-
local pizza = { -- +1 to all listed probabilities for the highest cat tag level
10245+
local pizza = {
1024610246
cry_credits = {
1024710247
idea = {
1024810248
"Enemui",
@@ -10318,7 +10318,7 @@ local pizza = { -- +1 to all listed probabilities for the highest cat tag level
1031810318
end,
1031910319
}
1032010320

10321-
local pizza_slice = { -- +1 to all listed probabilities for the highest cat tag level
10321+
local pizza_slice = {
1032210322
cry_credits = {
1032310323
idea = {
1032410324
"Enemui",
@@ -10375,6 +10375,37 @@ local pizza_slice = { -- +1 to all listed probabilities for the highest cat tag
1037510375
end,
1037610376
}
1037710377

10378+
local paved_joker = { -- +1 to all listed probabilities for the highest cat tag level
10379+
cry_credits = {
10380+
idea = {
10381+
"InspectorB",
10382+
},
10383+
art = {
10384+
"gemstonez",
10385+
},
10386+
code = {
10387+
"lord.ruby",
10388+
},
10389+
},
10390+
object_type = "Joker",
10391+
dependencies = {
10392+
items = {
10393+
"set_cry_misc_joker",
10394+
},
10395+
},
10396+
name = "cry-paved_joker",
10397+
key = "paved_joker",
10398+
atlas = "atlasone",
10399+
pos = { x = 1, y = 6 },
10400+
rarity = 1,
10401+
cost = 4,
10402+
order = 142,
10403+
config = { extra = 1 },
10404+
loc_vars = function(self, info_queue, card)
10405+
return { vars = { number_format(math.floor(card.ability.extra)) } }
10406+
end,
10407+
}
10408+
1037810409
local miscitems = {
1037910410
jimball_sprite,
1038010411
dropshot,
@@ -10503,6 +10534,7 @@ local miscitems = {
1050310534
--yarnball,
1050410535
pizza,
1050510536
pizza_slice,
10537+
paved_joker
1050610538
}
1050710539
return {
1050810540
name = "Misc. Jokers",

lib/misc.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,3 +1037,19 @@ function Cryptid.add_circus_rarity(rarity, dontreload)
10371037
Cryptid.reload_localization()
10381038
end
10391039
end
1040+
1041+
function Cryptid.get_paved_joker()
1042+
local total = 0
1043+
for i, v in pairs(SMODS.find_card("j_cry_paved_joker")) do
1044+
total = total + v.ability.extra
1045+
end
1046+
local stones = 0
1047+
for i, v in pairs(G.hand.highlighted) do
1048+
if v.config.center.key == "m_stone" then stones = stones + 1 end
1049+
end
1050+
for i, v in pairs(G.play.cards) do
1051+
if v.config.center.key == "m_stone" then stones = stones + 1 end
1052+
end
1053+
total = math.min(stones, total)
1054+
return total
1055+
end

lib/overrides.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,3 +1957,15 @@ function CardArea:shuffle(_seed)
19571957

19581958
SMODS.calculate_context({ cry_shuffling_area = true, cardarea = self, cry_post_shuffle = true })
19591959
end
1960+
1961+
local smods_four_fingers = SMODS.four_fingers
1962+
function SMODS.four_fingers()
1963+
return smods_four_fingers() - Cryptid.get_paved_joker()
1964+
end
1965+
1966+
get_straight_ref = get_straight
1967+
function get_straight(hand, min_length, skip, wrap)
1968+
min_length = (min_length or 5)
1969+
min_length = min_length + Cryptid.get_paved_joker()
1970+
return get_straight_ref(hand, min_length, skip, wrap)
1971+
end

localization/en-us.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2702,6 +2702,14 @@ return {
27022702
"{C:inactive}(Currently{} {X:mult,C:white}X#2#{}{C:inactive} Mult){}",
27032703
},
27042704
},
2705+
j_cry_paved_joker = {
2706+
name = "Paved Joker",
2707+
text = {
2708+
"Stone Cards may fill",
2709+
"gaps of {C:attention}#1#{} in",
2710+
"{C:attention}Straights{} and {C:attention}Flushes{}"
2711+
},
2712+
},
27052713
j_cry_spaceglobe = {
27062714
name = "Celestial Globe",
27072715
text = {

lovely/misc_joker.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,45 @@ position = "at"
2020
payload = "ret.playing_card = ret.playing_card or {}"
2121
match_indent = true
2222

23+
[[patches]]
24+
[patches.pattern]
25+
target = '''=[SMODS _ "src/overrides.lua"]'''
26+
pattern = '''
27+
local tuples = {}
28+
local ret = {}
29+
'''
30+
position = "before"
31+
payload = "local stones = Cryptid.get_paved_joker()"
32+
match_indent = true
33+
34+
[[patches]]
35+
[patches.pattern]
36+
target = '''=[SMODS _ "src/overrides.lua"]'''
37+
pattern = '''
38+
if next(ranks[l]) then
39+
'''
40+
position = "at"
41+
payload = "if next(ranks[l]) or stones > 0 then"
42+
match_indent = true
43+
44+
[[patches]]
45+
[patches.pattern]
46+
target = '''=[SMODS _ "src/overrides.lua"]'''
47+
pattern = '''
48+
if i > min_length and not any_tuple then
49+
'''
50+
position = "at"
51+
payload = "if i > min_length and not any_tuple or stones > 0 then"
52+
match_indent = true
53+
54+
[[patches]]
55+
[patches.pattern]
56+
target = '''=[SMODS _ "src/overrides.lua"]'''
57+
pattern = '''
58+
tuples = new_tuples
59+
'''
60+
position = "after"
61+
payload = '''
62+
stones = stones - 1
63+
'''
64+
match_indent = true

0 commit comments

Comments
 (0)