diff --git a/content/joker/cardboard_box.lua b/content/joker/cardboard_box.lua index 2e4a586b..32c73098 100644 --- a/content/joker/cardboard_box.lua +++ b/content/joker/cardboard_box.lua @@ -23,7 +23,7 @@ SMODS.Joker { }, paperback_credit = { - coder = 'thermo' + coder = { 'thermo' } }, loc_vars = function(self, info_queue, card) diff --git a/content/joker/doppler_radar.lua b/content/joker/doppler_radar.lua index e8ed8d0e..803b80fb 100644 --- a/content/joker/doppler_radar.lua +++ b/content/joker/doppler_radar.lua @@ -12,7 +12,7 @@ SMODS.Joker { eternal_compat = true, perishable_compat = true, paperback_credit = { - coder = 'thermo' + coder = { 'thermo' } }, loc_vars = function(self, info_queue, card) diff --git a/content/joker/freedom_of_choice.lua b/content/joker/freedom_of_choice.lua index a8383604..14345378 100644 --- a/content/joker/freedom_of_choice.lua +++ b/content/joker/freedom_of_choice.lua @@ -36,11 +36,22 @@ SMODS.Joker { } end, + in_pool = function(self, args) + -- Only in pool if you have played a Five of a Kind or a Flush Five + for k, v in pairs(G.GAME.hands) do + if string.find(k, "Five of a Kind", nil, true) or string.find(k, "Flush Five", nil, true) or string.find(k, "Spectrum Five", nil, true) then + if G.GAME.hands[k].played > 0 then + return true + end + end + end + end, + calculate = function(self, card, context) if context.before and context.main_eval and next(context.poker_hands[card.ability.extra.poker_hands]) then for _, scored_card in ipairs(context.scoring_hand) do scored_card.ability[card.ability.extra.upgrade] = (scored_card.ability[card.ability.extra.upgrade] or 1) + - card.ability.extra.a_xmult + card.ability.extra.a_xmult end return { message = localize('k_upgrade_ex'), diff --git a/content/joker/joker_jacks.lua b/content/joker/joker_jacks.lua new file mode 100644 index 00000000..dcdd5a0c --- /dev/null +++ b/content/joker/joker_jacks.lua @@ -0,0 +1,95 @@ +SMODS.Joker { + key = "joker_jacks", + config = { + extra = { + dollars = 3, + m_dollars = 1, + rank = "Jack", + consumable_odds = { + 'Planet', + 'Planet', + 'Planet', + 'Tarot', + 'Tarot', + 'Tarot', + 'paperback_minor_arcana', + 'paperback_minor_arcana', + 'paperback_minor_arcana', + 'Spectral' + } + } + }, + attributes = { + 'generation', + 'rank', + 'jack', + 'economy', + 'red', + 'food' + }, + pools = { + Food = true + }, + rarity = 1, + pos = { x = 13, y = 12 }, + atlas = "jokers_atlas", + cost = 6, + blueprint_compat = true, + eternal_compat = false, + perishable_compat = true, + paperback_credit = { + coder = { 'thermo' } + }, + + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.dollars, + card.ability.extra.rank, + card.ability.extra.m_dollars + } + } + end, + + calculate = function(self, card, context) + if context.individual and context.cardarea == G.play then + if PB_UTIL.is_rank(context.other_card, card.ability.extra.rank) then + return { + dollars = card.ability.extra.dollars + } + end + end + if context.end_of_round and context.main_eval and not context.blueprint_card then + if card.ability.extra.dollars - card.ability.extra.m_dollars < 1 then + PB_UTIL.destroy_joker(card) + local set = pseudorandom_element(card.ability.extra.consumable_odds, "joker_jacks") + if PB_UTIL.try_spawn_card { set = set } then + card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, + { + message = localize('paperback_plus_consumable'), + colour = G.C.ORANGE + }) + end + return { + message = localize('paperback_consumed_ex'), + colour = G.C.MULT + } + end + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'dollars', + scalar_value = 'm_dollars', + operation = '-', + scaling_message = { + message = localize { + type = 'variable', + key = 'paperback_a_dollars_minus', + vars = { card.ability.extra.m_dollars } + }, + colour = G.C.ORANGE + } + }) + return nil, true + end + end +} diff --git a/content/joker/lone_digger.lua b/content/joker/lone_digger.lua new file mode 100644 index 00000000..d6ee88a0 --- /dev/null +++ b/content/joker/lone_digger.lua @@ -0,0 +1,35 @@ +SMODS.Joker { + key = "lone_digger", + attributes = { + 'retrigger', + 'face', + 'music' + }, + pools = { + Music = true + }, + rarity = 3, + pos = { x = 18, y = 3 }, + atlas = "jokers_atlas", + cost = 8, + blueprint_compat = true, + eternal_compat = true, + perishable_compat = true, + paperback_credit = { + coder = { 'thermo' } + }, + calculate = function(self, card, context) + if context.repetition and context.cardarea == G.play and context.other_card:is_face() then + local face_count, card_count = 0, 0 + for _, c in ipairs(context.scoring_hand) do + if c:is_face() then face_count = face_count + 1 end + card_count = card_count + 1 + end + if face_count == 1 then + return { + repetitions = card_count + } + end + end + end +} diff --git a/content/joker/sinister_minds.lua b/content/joker/sinister_minds.lua new file mode 100644 index 00000000..211b54f7 --- /dev/null +++ b/content/joker/sinister_minds.lua @@ -0,0 +1,80 @@ +SMODS.Joker { + key = "sinister_minds", + config = { + extra = { + retriggers = 1, + a_retriggers = 1, + required_spectrals = 1, + hand = 'Pair', + spectrals_left = 1 + } + }, + attributes = { + 'retrigger', + 'spectral', + 'hand_type', + 'music' + }, + pools = { + Music = true + }, + rarity = 3, + pos = { x = 0, y = 11 }, + atlas = "jokers_atlas", + cost = 8, + blueprint_compat = true, + eternal_compat = true, + perishable_compat = true, + paperback_credit = { + coder = { 'thermo' } + }, + + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.retriggers, + card.ability.extra.retriggers == 1 and "" or "s", + card.ability.extra.a_retriggers, + card.ability.extra.required_spectrals, + localize('k_spectral'), + card.ability.extra.required_spectrals == 1 and "" or "s", + localize(card.ability.extra.hand, 'poker_hands'), + card.ability.extra.spectrals_left + } + } + end, + + calculate = function(self, card, context) + if context.repetition and context.cardarea == G.play and context.scoring_name == card.ability.extra.hand then + return { + repetitions = card.ability.extra.retriggers + } + end + if not context.blueprint_card and context.using_consumeable and context.consumeable.ability.set == 'Spectral' then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'spectrals_left', + scalar_value = 'a_retriggers', + operation = '-', + no_message = true + }) + + if card.ability.extra.spectrals_left == 0 then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'retriggers', + scalar_value = 'a_retriggers', + message_colour = G.C.ORANGE + }) + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'required_spectrals', + scalar_value = 'a_retriggers', + no_message = true + }) + card.ability.extra.spectrals_left = card.ability.extra.required_spectrals + return nil, true + end + end + end +} diff --git a/content/joker/technology.lua b/content/joker/technology.lua index c2b10b15..980c4d3f 100644 --- a/content/joker/technology.lua +++ b/content/joker/technology.lua @@ -66,5 +66,13 @@ SMODS.Joker { message = localize('k_reset') } end + end, + in_pool = function(self, args) + for _, playing_card in ipairs(G.playing_cards or {}) do + if SMODS.has_enhancement(playing_card, 'm_mult') then + return true + end + end + return false end } diff --git a/localization/en-us.lua b/localization/en-us.lua index ecef1947..556a1ed2 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -2874,6 +2874,34 @@ return { "Retrigger all scored {C:paperback_stars}#1#{}" } }, + j_paperback_lone_digger = { + name = "Lone Digger", + text = { + "If {C:attention}scored hand{} has only", + "one face card, {C:attention}retrigger{} it", + "for each scored card" + } + }, + j_paperback_sinister_minds = { + name = "Sinister Minds", + text = { + "Retrigger all scored cards {C:attention}#1#{} time#2#", + "if played hand was a {C:attention}#7#", + "Increases by {C:attention}#3#{} when", + "using {C:attention}#4#{} {C:spectral}#5#{} card#6#", + "{C:inactive}(Currently {C:attention}#8#{C:inactive} #5# card#6# left)" + } + }, + j_paperback_joker_jacks = { + name = "Joker Jacks", + text = { + "Scored {C:attention}#2#{} give {C:money}$#1#", + "Decreases by {C:money}$#3#", + "Create a {C:attention}prize{}", + "after being consumed", + "{C:inactive}(Must have room)" + } + }, -- Cross-Mod jokers start here j_paperback_moon_waltz = { name = "Moon Waltz", @@ -4480,6 +4508,7 @@ return { paperback_a_plus_cards = "+#1# #2#s", paperback_a_plus_tags = "+#1# Tags", paperback_a_dollars = "$#1#", + paperback_a_dollars_minus = "-$#1#", paperback_a_odds = "+#1# Odds", paperback_a_plus_consumable_slot = "+#1# Consumable Slots", diff --git a/utilities/definitions/misc.lua b/utilities/definitions/misc.lua index 9fe7e1ee..0de04b1a 100644 --- a/utilities/definitions/misc.lua +++ b/utilities/definitions/misc.lua @@ -89,6 +89,7 @@ PB_UTIL.ENABLED_JOKERS = { "soft_taco", "shabu_shabu", "watermelon", + "joker_jacks", "complete_breakfast", "ghost_cola", "b_soda", @@ -292,10 +293,10 @@ PB_UTIL.ENABLED_JOKERS = { "deck_of_cards", "pocket_pair", "ultra_rare", - -- "lore_digger", + "lone_digger", "the_quiet", "big_misser", - -- "sinister_minds", + "sinister_minds", "stereoscopic_specs", "fodder", "the_strongest",