Skip to content

Commit f7a41c3

Browse files
committed
Gameset localization API + Epic Jokers
1 parent d620554 commit f7a41c3

File tree

4 files changed

+80
-8
lines changed

4 files changed

+80
-8
lines changed

items/deck.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,7 @@ local antimatter = {
473473
},
474474
},
475475
loc_vars = function(self, info_queue, center)
476-
return {
477-
key = "b_cry_antimatter"
478-
.. (Cryptid.gameset(G.P_CENTERS.b_cry_antimatter) == "madness" and "" or "_balanced"),
479-
}
476+
return { key = Cryptid.gameset_loc(self, {mainline = "balanced", modest = "balanced"}) }
480477
end,
481478
name = "cry-Antimatter",
482479
order = 76,

items/epic.lua

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ One For all
1717

1818
-- Supercell
1919
-- +15 Chips, +15 Mult, X2 Chips, X2 Mult, earn $3 at end of round
20-
-- TODO: Modest description
2120
local supercell = {
2221
object_type = "Joker",
2322
name = "cry-supercell",
@@ -35,7 +34,8 @@ local supercell = {
3534
blueprint_compat = true,
3635
atlas = "atlasepic",
3736
loc_vars = function(self, info_queue, center)
38-
return { vars = { center.ability.extra.stat1, center.ability.extra.stat2, center.ability.extra.money } }
37+
return { key = Cryptid.gameset_loc(self, {modest = "balanced"}),
38+
vars = { center.ability.extra.stat1, center.ability.extra.stat2, center.ability.extra.money } }
3939
end,
4040
calculate = function(self, card, context)
4141
if context.joker_main then
@@ -108,6 +108,7 @@ local membershipcardtwo = {
108108
a = 8
109109
end
110110
return {
111+
key = Cryptid.gameset_loc(self, {modest = "balanced"}),
111112
vars = { card.ability.extra.chips, card.ability.extra.chips * math.floor(GLOBAL_cry_member_count / a) },
112113
}
113114
end,
@@ -326,6 +327,9 @@ local canvas = {
326327
cost = 18,
327328
blueprint_compat = true,
328329
atlas = "atlasepic",
330+
loc_vars = function(self, info_queue, center)
331+
return { key = Cryptid.gameset_loc(self, {modest = "balanced"}) }
332+
end,
329333
calculate = function(self, card, context)
330334
if context.retrigger_joker_check and not context.retrigger_joker then
331335
local num_retriggers = 0
@@ -1549,7 +1553,8 @@ local altgoogol = {
15491553
madness = { center = { blueprint_compat = true }, copies = 2 },
15501554
},
15511555
loc_vars = function(self, info_queue, center)
1552-
return { vars = { center.ability.copies } }
1556+
return { key = Cryptid.gameset_loc(self, {modest = "balanced"}),
1557+
vars = { center.ability.copies } }
15531558
end,
15541559
calculate = function(self, card, context)
15551560
local gameset = Card.get_gameset(card)
@@ -1644,7 +1649,8 @@ local soccer = {
16441649
cost = 20,
16451650
atlas = "atlasepic",
16461651
loc_vars = function(self, info_queue, center)
1647-
return { vars = { center.ability.extra.holygrail } }
1652+
return { key = Cryptid.gameset_loc(self, {modest = "balanced"}),
1653+
vars = { center.ability.extra.holygrail } }
16481654
end,
16491655
add_to_deck = function(self, card, from_debuff)
16501656
card.ability.extra.holygrail = math.floor(card.ability.extra.holygrail)
@@ -1866,6 +1872,11 @@ local spectrogram = {
18661872
}
18671873
local jtron = {
18681874
object_type = "Joker",
1875+
dependencies = {
1876+
items = {
1877+
"set_cry_epic",
1878+
},
1879+
},
18691880
name = "cry-jtron",
18701881
key = "jtron",
18711882
config = { extra = { bonus = 1, current = 0 } },

lib/gameset.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,15 @@ function Cryptid.get_center(key, m)
932932
return m.obj_table and m.obj_table[key]
933933
end
934934

935+
function Cryptid.gameset_loc(card, config)
936+
local gameset = Cryptid.gameset(card)
937+
if config[gameset] then
938+
return card.key .. "_" .. config[gameset]
939+
else
940+
return card.key
941+
end
942+
end
943+
935944
------------------------------
936945
---- CARD ENABLING SYSTEM ----
937946
------------------------------

localization/en-us.lua

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,16 @@ return {
836836
"{C:inactive,s:0.8}Does not copy Nostalgic Googol Play Cards{}",
837837
},
838838
},
839+
j_cry_altgoogol_balanced = {
840+
name = "Nostalgic Googol Play Card",
841+
text = {
842+
"Sell this card to create",
843+
"{C:attention}#1#{} cop#<ies,y>1# of the leftmost {C:attention}Joker{}",
844+
"{C:inactive,s:0.8}Does not copy Nostalgic Googol Play Cards{}",
845+
"{C:inactive}(Must have room){}",
846+
--todo: add "removes negative from copy" like Ankh/Invis Joker
847+
},
848+
},
839849
j_cry_antennastoheaven = {
840850
name = "...Like Antennas to Heaven",
841851
text = {
@@ -1033,6 +1043,20 @@ return {
10331043
"in one hand",
10341044
},
10351045
},
1046+
j_cry_canvas_balanced = {
1047+
name = "Canvas",
1048+
text = {
1049+
"{C:attention}Retrigger{} all {C:attention}Jokers{} to the left",
1050+
"once for {C:attention}every{} non-{C:blue}Common{C:attention} Joker{}",
1051+
"to the right of this Joker",
1052+
"{C:inactive}(Up to 2 retriggers)"
1053+
},
1054+
unlock = {
1055+
"Retrigger a {C:attention}Joker",
1056+
"{C:attention}114{} times",
1057+
"in one hand",
1058+
},
1059+
},
10361060
j_cry_caramel = {
10371061
name = "Caramel",
10381062
text = {
@@ -1833,6 +1857,15 @@ return {
18331857
"{C:blue,s:0.7}https://discord.gg/cryptid{}",
18341858
},
18351859
},
1860+
j_cry_membershipcardtwo_balanced = {
1861+
name = "Old Membership Card", --Could probably have a diff Name imo
1862+
text = {
1863+
"{C:chips}+#1#{} Chip#<s>1# for every {C:attention}8{} members",
1864+
"in the {C:attention}Cryptid Discord{}",
1865+
"{C:inactive}(Currently {C:chips}+#2#{C:inactive} Chip#<s>2#)",
1866+
"{C:blue,s:0.7}https://discord.gg/cryptid{}",
1867+
},
1868+
},
18361869
j_cry_meteor = {
18371870
name = "Meteor Shower",
18381871
text = {
@@ -2276,6 +2309,20 @@ return {
22762309
"only {C:attention}High Card",
22772310
},
22782311
},
2312+
j_cry_soccer_balanced = {
2313+
name = "One for All", --changed the name from latin because this isn't exotic
2314+
text = {
2315+
"{C:attention}+#1#{} Booster Pack slot#<s>1#",
2316+
"{C:attention}+#1#{} hand size",
2317+
"{C:attention}+#1#{} consumable slot#<s>1#",
2318+
"{C:attention}+#1#{} card#<s>1# in shop",
2319+
"{C:attention}+#1#{} voucher slot#<s>1#",
2320+
},
2321+
unlock = {
2322+
"Win a run with",
2323+
"only {C:attention}High Card",
2324+
},
2325+
},
22792326
j_cry_fleshpanopticon = {
22802327
name = "Flesh Panopticon",
22812328
text = {
@@ -2366,6 +2413,14 @@ return {
23662413
"end of round",
23672414
},
23682415
},
2416+
j_cry_supercell_balanced = {
2417+
name = "Supercell",
2418+
text = {
2419+
"{X:chips,C:white}X#2#{} Chips, {X:mult,C:white}X#2#{} Mult",
2420+
"Earn {C:money}$#3#{} at",
2421+
"end of round",
2422+
},
2423+
},
23692424
j_cry_sus = {
23702425
name = "SUS",
23712426
text = {

0 commit comments

Comments
 (0)