diff --git a/manifest.json b/manifest.json index 570f149..7fb25fe 100644 --- a/manifest.json +++ b/manifest.json @@ -17,5 +17,5 @@ "conflicts": [ "Jen" ], - "version": "1.5.11" + "version": "1.5.12" } \ No newline at end of file diff --git a/src/tarot.lua b/src/tarot.lua index bf257ee..f3f9238 100644 --- a/src/tarot.lua +++ b/src/tarot.lua @@ -2,6 +2,13 @@ local function j() return G.GAME.used_vouchers.v_jane_jolly_voucher and "j_jolly" or "j_joker" end +local required = Cryptid and 2 or 4 + +local function get_uses() + G.GAME.joker_in_a_tarot = G.GAME.joker_in_a_tarot or 2 + return G.GAME.joker_in_a_tarot +end + local blurbs = { "M!", "Hey! Pick me!", @@ -36,9 +43,13 @@ SMODS.Consumable { set = "Tarot", loc_txt = { name = "#1#-in-a-Tarot", - text = { + text = Cryptid and { "Create a {C:dark_edition}Negative {C:attention}#2#", "{C:inactive,E:1}#3#{}", + } or { + "Create a {C:dark_edition}Negative {C:attention}#2#", + "after {C:attention}#3# {}uses {C:inactive}(#4# left)", + "{C:inactive,E:1}#5#{}", }, }, loc_vars = function(_, info_queue, card) @@ -54,12 +65,24 @@ SMODS.Consumable { local desc = is_jolly and "Jolly Joker" or "default Joker" local name = is_jolly and "Jolly" or "Joker" - return {vars = {name, desc, card.blurb}} + + local vars = Cryptid and {name, desc, card.blurb} or + {name, desc, required, required - get_uses(), card.blurb} + + return {vars = vars} end, pos = {x = 0, y = 1}, cost = 4, can_use = Jane.can_use, use = function(_, _, _, _) + local uses = get_uses() + 1 + + if uses < required then + G.GAME.joker_in_a_tarot = uses + return + end + + G.GAME.joker_in_a_tarot = 0 local card = create_card("Joker", G.jokers, nil, nil, nil, nil, j(), "jokerfromatarot") card:set_edition({negative = true}, true) card.cost = 1