Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/joker/cardboard_box.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SMODS.Joker {

},
paperback_credit = {
coder = 'thermo'
coder = { 'thermo' }
},

loc_vars = function(self, info_queue, card)
Expand Down
2 changes: 1 addition & 1 deletion content/joker/doppler_radar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 12 additions & 1 deletion content/joker/freedom_of_choice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
95 changes: 95 additions & 0 deletions content/joker/joker_jacks.lua
Original file line number Diff line number Diff line change
@@ -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
}
35 changes: 35 additions & 0 deletions content/joker/lone_digger.lua
Original file line number Diff line number Diff line change
@@ -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
}
80 changes: 80 additions & 0 deletions content/joker/sinister_minds.lua
Original file line number Diff line number Diff line change
@@ -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
}
8 changes: 8 additions & 0 deletions content/joker/technology.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
29 changes: 29 additions & 0 deletions localization/en-us.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions utilities/definitions/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ PB_UTIL.ENABLED_JOKERS = {
"soft_taco",
"shabu_shabu",
"watermelon",
"joker_jacks",
"complete_breakfast",
"ghost_cola",
"b_soda",
Expand Down Expand Up @@ -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",
Expand Down