Skip to content

Commit d885d40

Browse files
committed
gitkraken this is above my paygrade
2 parents d66429d + a528415 commit d885d40

File tree

5 files changed

+44
-21
lines changed

5 files changed

+44
-21
lines changed

Cryptid.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"priority": 114,
1010
"badge_colour": "708b91",
1111
"badge_text_colour": "FFFFFF",
12-
"version": "0.5.5a~dev",
12+
"version": "0.5.5a~dev2",
1313
"dependencies": [
1414
"Talisman (>=2.0.9)",
1515
"Steamodded (>=1.0.0~BETA-0314c)"

items/misc_joker.lua

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ local potofjokes = {
221221
},
222222
name = "cry-Pot of Jokes",
223223
key = "pot_of_jokes",
224-
config = { extra = { h_size = -2, h_mod = 1 } },
224+
config = { extra = { h_size = -2, h_mod = 1 }, immutable = { h_added = 0, h_mod_max = 1000 } },
225225
pos = { x = 5, y = 0 },
226226
rarity = 3,
227227
order = 104,
@@ -234,19 +234,38 @@ local potofjokes = {
234234
center.ability.extra.h_size < 0 and center.ability.extra.h_size
235235
or "+" .. math.min(1000, center.ability.extra.h_size),
236236
center.ability.extra.h_mod,
237+
"+" .. center.ability.immutable.h_mod_max,
237238
},
238239
}
239240
end,
240241
calculate = function(self, card, context)
241242
if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then
242-
if to_big(card.ability.extra.h_size) + to_big(card.ability.extra.h_mod) >= to_big(1000) then
243-
card.ability.extra.h_size = 1000
243+
if
244+
to_big(card.ability.extra.h_size) + to_big(card.ability.extra.h_mod)
245+
>= to_big(card.ability.immutable.h_mod_max)
246+
then
247+
card.ability.extra.h_size = card.ability.immutable.h_mod_max
244248
card.ability.extra.h_mod = 0
249+
250+
-- Fallback for if Pot of Jokes comes into this calcuate function with large h_size
251+
if card.ability.immutable.h_added < card.ability.immutable.h_mod_max then
252+
local delta = card.ability.immutable.h_mod_max - card.ability.immutable.h_added
253+
254+
G.hand:change_size(delta)
255+
256+
card.ability.immutable.h_added = card.ability.immutable.h_mod_max
257+
end
245258
end
246259

247-
G.hand:change_size(math.min(math.max(0, 1000 - card.ability.extra.h_size), card.ability.extra.h_mod))
260+
local delta = math.min(
261+
math.max(0, card.ability.immutable.h_mod_max - card.ability.extra.h_size),
262+
card.ability.extra.h_mod
263+
)
264+
265+
G.hand:change_size(delta)
248266

249267
card.ability.extra.h_size = card.ability.extra.h_size + card.ability.extra.h_mod
268+
card.ability.immutable.h_added = card.ability.immutable.h_added + delta
250269

251270
return {
252271
message = localize({ type = "variable", key = "a_handsize", vars = { card.ability.extra.h_mod } }),
@@ -256,10 +275,10 @@ local potofjokes = {
256275
end
257276
end,
258277
add_to_deck = function(self, card, from_debuff)
259-
G.hand:change_size(math.min(1000, card.ability.extra.h_size))
278+
G.hand:change_size(math.min(card.ability.immutable.h_mod_max, card.ability.extra.h_size))
260279
end,
261280
remove_from_deck = function(self, card, from_debuff)
262-
G.hand:change_size(-1 * math.min(1000, card.ability.extra.h_size))
281+
G.hand:change_size(-1 * math.min(card.ability.immutable.h_mod_max, card.ability.extra.h_size))
263282
end,
264283
cry_credits = {
265284
idea = {
@@ -270,6 +289,7 @@ local potofjokes = {
270289
},
271290
code = {
272291
"Math",
292+
"BobJoe400",
273293
},
274294
},
275295
unlocked = false,

items/voucher.lua

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,22 @@ local copies = { --Double tags become Triple Tags and are 2X as common
3737
init = function(self)
3838
--Copies and upgrades
3939
local tinit = Tag.init
40-
function Tag:init(tag, y, z)
41-
if tag == "tag_double" and G.GAME.used_vouchers.v_cry_copies then
42-
tag = "tag_cry_triple"
43-
end
44-
if (tag == "tag_double" or tag == "tag_cry_triple") and G.GAME.used_vouchers.v_cry_tag_printer then
45-
tag = "tag_cry_quadruple"
46-
end
47-
if
48-
(tag == "tag_double" or tag == "tag_cry_triple" or tag == "tag_cry_quadruple")
49-
and G.GAME.used_vouchers.v_cry_clone_machine
50-
then
51-
tag = "tag_cry_quintuple"
40+
function Tag:init(tag, for_collection, _blind_type)
41+
if not for_collection then
42+
if tag == "tag_double" and G.GAME.used_vouchers.v_cry_copies then
43+
tag = "tag_cry_triple"
44+
end
45+
if (tag == "tag_double" or tag == "tag_cry_triple") and G.GAME.used_vouchers.v_cry_tag_printer then
46+
tag = "tag_cry_quadruple"
47+
end
48+
if
49+
(tag == "tag_double" or tag == "tag_cry_triple" or tag == "tag_cry_quadruple")
50+
and G.GAME.used_vouchers.v_cry_clone_machine
51+
then
52+
tag = "tag_cry_quintuple"
53+
end
5254
end
53-
return tinit(self, tag, y, z)
55+
return tinit(self, tag, for_collection, _blind_type)
5456
end
5557
end,
5658
}

lib/misprintize.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function Cryptid.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stac
3939
big
4040
)
4141
end
42-
else
42+
elseif not (k == "immutable") then
4343
for _k, _v in pairs(tbl[k]) do
4444
if
4545
is_number(tbl[k][_k])

localization/en-us.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,7 @@ return {
21862186
"{C:attention}#1#{} hand size,",
21872187
"increases by",
21882188
"{C:blue}#2#{} every round",
2189+
"{C:inactive}(Maximum {}{C:attention}#3#{}{C:inactive} hand size){}",
21892190
},
21902191
unlock = {
21912192
"Increase your {C:attention}handsize",

0 commit comments

Comments
 (0)