Skip to content

Commit 25c2d14

Browse files
committed
stake stuff
1 parent b7b874f commit 25c2d14

22 files changed

+357
-1100
lines changed

assets/1x/stake_cry.png

-9.52 KB
Loading

assets/2x/stake_cry.png

-10.6 KB
Loading

items/code.lua

Lines changed: 29 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,17 +1206,37 @@ local rework = {
12061206
order = 406,
12071207
pos = { x = 10, y = 3 },
12081208
cost = 4,
1209-
loc_vars = function(self, info_queue)
1210-
info_queue[#info_queue + 1] =
1211-
{ set = "Tag", key = "tag_cry_rework", specific_vars = { "[edition]", "[joker]", "n" } }
1212-
return { vars = {} }
1209+
loc_vars = function(self, info_queue, card)
1210+
local cards = Cryptid.get_highlighted_cards({ G.jokers }, card, 1, 1, function(card)
1211+
return card.ability.set == "Joker"
1212+
end)
1213+
local jkr = cards[1]
1214+
if not jkr then return {
1215+
vars = {
1216+
"None"
1217+
}
1218+
} end
1219+
local found_index = 1
1220+
if jkr.edition then
1221+
for i, v in ipairs(G.P_CENTER_POOLS.Edition) do
1222+
if v.key == jkr.edition.key then
1223+
found_index = i
1224+
break
1225+
end
1226+
end
1227+
end
1228+
found_index = found_index + 1
1229+
if found_index > #G.P_CENTER_POOLS.Edition then
1230+
found_index = found_index - #G.P_CENTER_POOLS.Edition
1231+
end
1232+
local rework_edition = G.P_CENTER_POOLS.Edition[found_index].key
1233+
return { vars = {(G.localization.descriptions.Edition[rework_edition] or {}).name or "ERROR"} }
12131234
end,
12141235
can_use = function(self, card)
12151236
local cards = Cryptid.get_highlighted_cards({ G.jokers }, card, 1, 1, function(card)
12161237
return card.ability.set == "Joker"
12171238
end)
12181239
return #cards == 1
1219-
and not cards[1].ability.eternal
12201240
and cards[1].ability.name
12211241
~= ("cry-meteor" or "cry-exoplanet" or "cry-stardust" or "cry_cursed" or "Diet Cola")
12221242
end,
@@ -1225,6 +1245,7 @@ local rework = {
12251245
return card.ability.set == "Joker"
12261246
end)
12271247
local jkr = cards[1]
1248+
if not jkr then return end
12281249
local found_index = 1
12291250
if jkr.edition then
12301251
for i, v in ipairs(G.P_CENTER_POOLS.Edition) do
@@ -1238,22 +1259,13 @@ local rework = {
12381259
if found_index > #G.P_CENTER_POOLS.Edition then
12391260
found_index = found_index - #G.P_CENTER_POOLS.Edition
12401261
end
1241-
local tag = Tag("tag_cry_rework")
1242-
if not tag.ability then
1243-
tag.ability = {}
1244-
end
1245-
if jkr.config.center.key == "c_base" then
1246-
jkr.config.center.key = "j_scholar"
1247-
end
1248-
tag.ability.rework_key = jkr.config.center.key
1249-
tag.ability.rework_edition = G.P_CENTER_POOLS.Edition[found_index].key
1250-
add_tag(tag)
1262+
local rework_edition = G.P_CENTER_POOLS.Edition[found_index].key
12511263
--SMODS.Tags.tag_cry_rework.apply(tag, {type = "store_joker_create"})
12521264
G.E_MANAGER:add_event(Event({
12531265
trigger = "before",
12541266
delay = 0.75,
12551267
func = function()
1256-
jkr:start_dissolve()
1268+
jkr:set_edition(rework_edition)
12571269
return true
12581270
end,
12591271
}))
@@ -1263,84 +1275,6 @@ local rework = {
12631275
self:use(card, area)
12641276
end,
12651277
}
1266-
-- Rework Tag
1267-
-- Upgraded edition refers to the next edition along in the collection; base -> foil -> holo -> poly -> negative -> etc
1268-
local rework_tag = {
1269-
cry_credits = {
1270-
idea = {
1271-
"HexaCryonic",
1272-
},
1273-
art = {
1274-
"HexaCryonic",
1275-
},
1276-
code = {
1277-
"Math",
1278-
},
1279-
},
1280-
dependencies = {
1281-
items = {
1282-
"c_cry_rework",
1283-
},
1284-
},
1285-
object_type = "Tag",
1286-
atlas = "tag_cry",
1287-
name = "cry-Rework Tag",
1288-
order = 610,
1289-
pos = { x = 0, y = 3 },
1290-
config = { type = "store_joker_create" },
1291-
key = "rework",
1292-
ability = { rework_edition = nil, rework_key = nil },
1293-
loc_vars = function(self, info_queue, tag)
1294-
local function p(w)
1295-
r = ""
1296-
local vowels = { "a", "e", "i", "o", "u" }
1297-
for i, v in ipairs(vowels) do
1298-
if string.sub(string.lower(w), 1, 1) == v then
1299-
r = "n"
1300-
break
1301-
end
1302-
end
1303-
return r
1304-
end
1305-
local ed = Cryptid.safe_get(tag, "ability", "rework_edition")
1306-
and localize({ type = "name_text", set = "Edition", key = tag.ability.rework_edition })
1307-
or "[" .. string.lower(localize("k_edition")) .. "]"
1308-
return {
1309-
vars = {
1310-
ed,
1311-
Cryptid.safe_get(tag, "ability", "rework_key")
1312-
and localize({ type = "name_text", set = "Joker", key = tag.ability.rework_key })
1313-
or "[" .. string.lower(localize("k_joker")) .. "]",
1314-
string.sub(ed, 1, 1) ~= "[" and p(ed) or "n",
1315-
},
1316-
}
1317-
end,
1318-
apply = function(self, tag, context)
1319-
if context.type == "store_joker_create" then
1320-
local card = create_card("Joker", context.area, nil, nil, nil, nil, (tag.ability.rework_key or "j_scholar"))
1321-
create_shop_card_ui(card, "Joker", context.area)
1322-
card:set_edition((tag.ability.rework_edition or "e_foil"), true, nil, true)
1323-
card.states.visible = false
1324-
tag:yep("+", G.C.FILTER, function()
1325-
card:start_materialize()
1326-
return true
1327-
end)
1328-
tag.triggered = true
1329-
G.E_MANAGER:add_event(Event({
1330-
trigger = "after",
1331-
delay = 0.5,
1332-
func = function()
1333-
save_run() --fixes savescum bugs hopefully?
1334-
return true
1335-
end,
1336-
}))
1337-
return card
1338-
end
1339-
end,
1340-
in_pool = function()
1341-
return false
1342-
end,
1343-
}
13441278
-- ://Merge
13451279
-- Merges a selected consumable and playing card, destroying the consumable and turning the playing card into a CCD of that consumable
13461280
local merge = {
@@ -4234,7 +4168,7 @@ local ctrl_v = {
42344168
end,
42354169
can_use = function(self, card)
42364170
local cards = Cryptid.get_highlighted_cards({ G.hand, G.consumeables, G.pack_cards }, card, 1, 1, function(card)
4237-
return card.area ~= G.pack_Cards or card.ability.set == "Default" or card.ability.set == "Enhanced"
4171+
return (card.area ~= G.pack_Cards or card.ability.set == "Default" or card.ability.set == "Enhanced") and not card.config.center.hidden
42384172
end)
42394173
return #cards == 1
42404174
end,
@@ -5178,7 +5112,6 @@ local code_cards = {
51785112
malware,
51795113
crynperror,
51805114
rework,
5181-
rework_tag,
51825115
merge,
51835116
commit,
51845117
machinecode,

items/deck.lua

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ local equilibrium = {
4949
name = "cry-Equilibrium",
5050
key = "equilibrium",
5151
order = 3,
52-
config = { vouchers = { "v_overstock_norm", "v_overstock_plus" } },
52+
config = { vouchers = { "v_overstock_norm" } },
5353
pos = { x = 0, y = 1 },
5454
atlas = "atlasdeck",
5555
apply = function(self)
@@ -84,7 +84,7 @@ local misprint = {
8484
name = "cry-Misprint",
8585
key = "misprint",
8686
order = 4,
87-
config = { cry_misprint_min = 0.1, cry_misprint_max = 10 },
87+
config = { cry_misprint_min = 0.25, cry_misprint_max = 4 },
8888
pos = { x = 4, y = 2 },
8989
atlas = "atlasdeck",
9090
apply = function(self)
@@ -217,29 +217,19 @@ local wormhole = {
217217
name = "cry-Wormhole",
218218
key = "wormhole",
219219
order = 6,
220-
config = { cry_negative_rate = 20, joker_slot = -2 },
221220
pos = { x = 3, y = 4 },
222221
atlas = "atlasdeck",
223-
apply = function(self)
224-
G.GAME.modifiers.cry_negative_rate = self.config.cry_negative_rate
225-
G.E_MANAGER:add_event(Event({
226-
func = function()
227-
if G.jokers then
228-
local card = create_card("Joker", G.jokers, nil, "cry_exotic", nil, nil, nil, "cry_wormhole")
229-
card:add_to_deck()
230-
card:start_materialize()
231-
G.jokers:emplace(card)
232-
return true
233-
end
234-
end,
235-
}))
236-
end,
237-
init = function(self)
238-
SMODS.Edition:take_ownership("negative", {
239-
get_weight = function(self)
240-
return self.weight * (G.GAME.modifiers.cry_negative_rate or 1)
241-
end,
242-
}, true)
222+
calculate = function(self, back, context)
223+
if context.end_of_round
224+
and not context.individual
225+
and not context.repetition
226+
and not context.blueprint and G.GAME.blind and G.GAME.blind.config.blind and G.GAME.blind.config.blind.boss then
227+
if G.jokers.cards[1] and G.jokers.cards[1].config.center.rarity ~= "cry_exotic" then
228+
Cryptid.with_deck_effects(G.jokers.cards[1], function(card)
229+
Cryptid.upgrade_rarity(card, "cry_wormhole")
230+
end)
231+
end
232+
end
243233
end,
244234
unlocked = false,
245235
check_for_unlock = function(self, args)

items/pointer.lua

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,6 @@ local pointer = {
416416
end
417417
t.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pointer_orbital"))
418418
end
419-
if current_card == "tag_cry_rework" then
420-
--tbh this is the most unbalanced part of the card
421-
t.ability.rework_edition =
422-
pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("cry_pointer_edition")).key
423-
t.ability.rework_key =
424-
pseudorandom_element(G.P_CENTER_POOLS.Joker, pseudoseed("cry_pointer_joker")).key
425-
end
426419
G.CHOOSE_CARD:remove()
427420
G.GAME.USING_CODE = false
428421
G.GAME.USING_POINTER = false
@@ -2000,7 +1993,7 @@ local aliases = {
20001993
"Rerollsurplus",
20011994
"Reroll Voucher",
20021995
},
2003-
v_reroll_glut = {
1996+
v__glut = {
20041997
"Reroll Glut",
20051998
"Rerollglut",
20061999
"Reroll Surplus+",
@@ -2563,10 +2556,10 @@ local aliases = {
25632556
},
25642557
tag_cry_epic = {
25652558
"Epic Tag",
2566-
"Half-price Epic Joker",
2567-
"Half price Epic Joker",
2568-
"Half price Epic",
2569-
"Half-price Epic",
2559+
"Full-price Epic Joker",
2560+
"Full price Epic Joker",
2561+
"Full price Epic",
2562+
"Full-price Epic",
25702563
},
25712564
tag_cry_gambler = {
25722565
"Gambler Tag",
@@ -2629,13 +2622,6 @@ local aliases = {
26292622
"Quadruple",
26302623
"Quadruple Tag",
26312624
},
2632-
tag_cry_quintuple = {
2633-
"Quintuple",
2634-
"Quintuple Tag",
2635-
},
2636-
tag_cry_rework = {
2637-
"Rework Tag",
2638-
},
26392625
tag_cry_schematic = {
26402626
"Schematic",
26412627
"Schematic Tag",
@@ -2699,6 +2685,7 @@ return {
26992685
--print("[CRYPTID] Inserting Pointer Aliases")
27002686
local alify = Cryptid.pointeraliasify
27012687
Cryptid.pointerblistifytype("rarity", "cry_exotic", nil)
2688+
Cryptid.pointerblistifytype("misc", "hidden", nil)
27022689
for key, aliasesTable in pairs(aliases) do
27032690
for _, alias in pairs(aliasesTable) do
27042691
alify(key, alias, nil)

items/sleeve.lua

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ if CardSleeves then
6868

6969
trigger_effect = function(self, args) end,
7070
apply = function(self)
71-
change_shop_size(2)
71+
change_shop_size(1)
7272
G.GAME.modifiers.cry_equilibrium = true
7373
end,
7474
})
@@ -78,7 +78,7 @@ if CardSleeves then
7878
name = "Misprinted Sleeve",
7979
atlas = "atlasSleeves",
8080
pos = { x = 3, y = 0 },
81-
config = { cry_misprint_min = 0.1, cry_misprint_max = 10 },
81+
config = { cry_misprint_min = 0.24, cry_misprint_max = 4 },
8282
unlocked = true,
8383
unlock_condition = { deck = "Misprint Deck", stake = 1 },
8484
apply = function(self)
@@ -112,28 +112,22 @@ if CardSleeves then
112112
name = "Wormhole Sleeve",
113113
atlas = "atlasSleeves",
114114
pos = { x = 0, y = 0 },
115-
config = { cry_wormhole = true, cry_negative_rate = 20, joker_slot = -2 },
116115
unlocked = true,
117116
unlock_condition = { deck = "Wormhole Deck", stake = 1 },
118117
loc_vars = function(self)
119118
return { vars = {} }
120119
end,
121-
apply = function(self)
122-
G.E_MANAGER:add_event(Event({
123-
func = function()
124-
if G.jokers then
125-
local card =
126-
create_card("Joker", G.jokers, nil, "cry_exotic", nil, nil, nil, "cry_wormholesleeve")
127-
card:add_to_deck()
128-
card:start_materialize()
129-
G.jokers:emplace(card)
130-
return true
131-
end
132-
end,
133-
}))
134-
G.GAME.modifiers.cry_negative_rate = (G.GAME.modifiers.cry_negative_rate or 1)
135-
* self.config.cry_negative_rate
136-
G.GAME.starting_params.joker_slots = G.GAME.starting_params.joker_slots + self.config.joker_slot
120+
calculate = function(self, back, context)
121+
if context.end_of_round
122+
and not context.individual
123+
and not context.repetition
124+
and not context.blueprint and G.GAME.blind and G.GAME.blind.config.blind and G.GAME.blind.config.blind.boss then
125+
if G.jokers.cards[1] and G.jokers.cards[1].config.center.rarity ~= "cry_exotic" then
126+
Cryptid.with_deck_effects(G.jokers.cards[1], function(card)
127+
Cryptid.upgrade_rarity(card, "cry_wormhole")
128+
end)
129+
end
130+
end
137131
end,
138132
})
139133

0 commit comments

Comments
 (0)