Compare commits

...

23 commits
2.1.4 ... main

Author SHA1 Message Date
918ebbc30b
Shorten text 2026-04-27 16:59:01 +02:00
8bcd0e074d
Add Invisible Tag 2026-04-27 16:55:58 +02:00
f23dad31cc
Add attributes, buff fat phone, buff temple 2026-04-26 20:38:32 +02:00
7da197900e
Add setting for an overpowered strategy 2026-04-16 20:01:52 +02:00
5d096d5f58
Add G.calckeys and G.calccontext debugging tools 2026-04-09 20:04:27 +02:00
e74f4d44c9
Add new joker 2026-04-04 19:10:59 +02:00
21952a529b
Adjust deck atlas 2026-04-04 16:32:45 +02:00
4ac13e249c
Move Pass GO from deck to challenge 2026-04-04 16:25:28 +02:00
8d8574bf86
Fix crash and localization 2026-04-04 15:48:54 +02:00
2bd613b458
Optimize SMODS.get_enhancements patch 2026-03-21 22:04:12 +01:00
dd71145698
Use SMODS.get_enhancements 2026-03-21 21:53:03 +01:00
51ad870d8c
Fix Frozen on various jokers 2026-03-21 21:42:04 +01:00
f77dbe3ac8
Bump version 2026-03-19 19:42:23 +01:00
d219e79c89
Add dedicated Estate support 2026-03-19 19:41:49 +01:00
11120727f6
Add dev-art 2026-03-19 12:47:16 +01:00
59e9d43703
Buff new joker 2026-03-19 12:46:08 +01:00
78136a494c
Add more joker art 2026-03-19 01:38:42 +01:00
1869e60d91
Add new joker 2026-03-19 01:34:19 +01:00
286d1c6dc7
Add more joker art 2026-03-19 01:05:23 +01:00
455e08bbf7
Remove artifacts 2026-03-19 00:21:25 +01:00
87be46c360
Add more joker art 2026-03-19 00:21:06 +01:00
1bf6ac6a91
Merge branch 'main' into frozen-jokers 2026-03-18 02:38:49 +01:00
b21f20b127
Add 2 new jokers 2026-03-17 23:02:37 +01:00
29 changed files with 493 additions and 122 deletions

3
.gitignore vendored
View file

@ -38,3 +38,6 @@ luac.out
*.i*86
*.x86_64
*.hex
# Syncthing
.stfolder

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
assets/1x/tag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
assets/2x/tag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

BIN
assets/sounds/nilly.ogg Normal file

Binary file not shown.

View file

@ -6,4 +6,5 @@ return {
import_funky = false,
no_highlight_limit = true,
no_wild_debuff = true,
scribable_basket = false,
}

View file

@ -9,14 +9,6 @@ return {
"that are {C:dark_edition}debuffed #1# times",
},
},
b_Roland_go = {
name = "Pass GO Deck",
text = {
"Start with a {C:attention}Credit Card",
"Set money to {C:money}$0 {}when",
"entering the shop",
},
},
b_Roland_swapper = {
name = "Swapper Deck",
text = {
@ -37,7 +29,7 @@ return {
BakeryCharm_Roland_fat = {
name = "fat i phone",
text = {
-- "{C:attention}+#1# Booster Pack {}slots",
"{C:attention}+#1# Booster Pack {}slots",
"All {C:attention}Booster Packs {}are {C:attention}Mega",
"{C:inactive}(Whenever applicable)",
},
@ -126,6 +118,18 @@ return {
},
},
Joker = {
j_Roland_arctic = {
name = "Arctic Circle",
text = {"Retrigger all", "{C:dark_edition}Frozen {}cards"},
},
j_Roland_basket = {
name = "Basket",
text = {
"Sell this Joker to",
"create {C:dark_edition}Negative {}copies",
"of every consumable",
},
},
j_Roland_bulldozer = {
name = "Bulldozer",
text = {
@ -169,6 +173,14 @@ return {
},
},
},
j_Roland_hardboiled = {
name = "Hard-Boiled",
text = {
"Sell this Joker to",
"turn all cards in",
"hand {C:dark_edition}Frozen",
},
},
j_Roland_jokersr = {
name = "Joker Sr.",
text = {"{X:mult,C:white}X#1#{} Mult"},
@ -217,6 +229,14 @@ return {
name = "Ms. Joker",
text = {"{C:chips}+#1#{} Chips"},
},
j_Roland_nilly = {
name = "Nilly",
text = {
"Toggleable {X:mult,C:white}X0{} Mult",
"{C:inactive}(Currently {C:attention}#1#{C:inactive})",
"{C:inactive,s:0.75,E:1}Wait... what?",
},
},
j_Roland_oops = {
name = "Oops! All 7s",
text = {
@ -238,6 +258,10 @@ return {
"least {C:attention}#2# suits",
},
},
j_Roland_suitable = {
name = "Suitable",
text = {"{V:1}#1# {}are {C:attention}Wild", "Suit changes", "every round"},
},
j_Roland_sunny = {
name = "Sunny Side Up",
text = {
@ -296,25 +320,10 @@ return {
name = "Efflorescent Sleeve",
text = {
"{C:attention}Blinds{} are {C:dark_edition}debuffed",
"{C:dark_edition}({X:dark_edition,C:white}ante{} {X:dark_edition,C:white}number{C:dark_edition}) times",
"{C:dark_edition}({X:dark_edition,C:white}(ante * #2#){C:dark_edition}) times",
"{C:inactive}(Instead of #1#)",
},
},
sleeve_Roland_go = {
name = "Pass GO Sleeve",
text = {
"Start with a {C:attention}Credit Card",
"Set money to {C:money}$0 {}when",
"entering the shop",
},
},
sleeve_Roland_go_alt = {
name = "Free Parking Sleeve",
text = {
"Start with an additional",
"{X:attention,C:white}#1#{C:attention} Credit Cards",
},
},
sleeve_Roland_swapper = {
name = "Swapper Sleeve",
text = {
@ -372,6 +381,12 @@ return {
},
},
},
Tag = {
tag_Roland_invisible = {
name = "Invisible Tag",
text = {"{C:attention}Duplicate {}a random Joker", "{C:inactive}(Must have room)"},
},
},
},
misc = {
challenge_names = {
@ -380,6 +395,7 @@ return {
c_Roland_Eternally_Crimson = "Eternally Crimson",
c_Roland_Eternally_Verdant = "Eternally Verdant",
c_Roland_Eternally_Violet = "Eternally Violet",
c_Roland_Go = "Pass GO",
c_Roland_Jokerful = "Jokerful",
c_Roland_Ornate = "Ornate",
c_Roland_Pastries = "Sweet Pastries",
@ -387,6 +403,8 @@ return {
},
v_dictionary = {
b_Roland_bye = "Bye!",
b_Roland_disabled = "Disabled",
b_Roland_enabled = "Enabled",
b_Roland_comma = ", ",
b_Roland_debuffed = "DEBUFFED",
b_Roland_entering_shop = "Entering shop!",
@ -394,6 +412,7 @@ return {
b_Roland_fuse = "FUSE",
b_Roland_equinox_assist = "Assist: Only hide text (Equinox)",
b_Roland_fusable_escapey = "Fusable Escapey (overpowered)",
b_Roland_scribable_basket = "Scribable Basket (overpowered)",
b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)",
b_Roland_illusion_seal = "Allow seals from Illusion voucher",
b_Roland_import_funky = "Debug: Import funky.lua",
@ -402,6 +421,7 @@ return {
b_Roland_no_wild_debuff = "No wild card debuffs",
b_Roland_na = "N/A",
b_Roland_of = " of ",
b_Roland_toggle = "TOGGLE",
},
labels = {
Roland_frozen = "Frozen",
@ -413,6 +433,7 @@ return {
ch_c_Roland_Eternally_Crimson = {"{C:attention}Crimson Heart{}'s effect is active every blind"},
ch_c_Roland_Eternally_Verdant = {"{C:attention}Verdant Leaf{}'s effect is active every blind"},
ch_c_Roland_Eternally_Violet = {"{C:attention}Violet Vessel{}'s effect is active every blind"},
ch_c_Roland_Go = {"Set money to {C:money}$0 {}when entering the shop"},
ch_c_Roland_Jokerful = {"The only jokers are {C:mult}Joker{} and {C:chips}Ms. Joker"},
ch_c_Roland_Ornate = {"Anything vanilla is banned"},
ch_c_Roland_Pastries = {"All blinds, cards, and tags are of {C:gold}Bakery{} or {C:blue}Roland"},

View file

@ -6,7 +6,7 @@
"author": [
"Emik"
],
"version": "2.1.4",
"version": "2.2.12",
"badge_colour": "8BE9FD",
"main_file": "src/main.lua",
"badge_text_colour": "44475A",
@ -15,8 +15,8 @@
"provides": [],
"conflicts": [],
"dependencies": [
"Steamodded (>=1.*)",
"Steamodded (>=1.0~*)",
"Lovely (>=0.6)",
"Bakery (>=1.3.2~*)"
"Bakery (>=0.1.26~*)"
]
}

View file

@ -74,8 +74,9 @@ back {
key = "blossom",
pronouns = "any_all",
config = {extra = {times = 2}},
attributes = {"boss_blind"},
loc_vars = function(self, _, _)
return {vars = {self.config.extra.times}}
return {vars = {self.config.extra.times, self.config.extra.alt_times}}
end,
apply = function(_, _)
G.GAME.modifiers.Roland_blossom_deck = true
@ -91,9 +92,11 @@ back {
return
end
local count = self:is_alt() and G.GAME.round_resets.ante or self.config.extra.times
local count = self:is_alt() and
G.GAME.round_resets.ante * self.config.extra.alt_times or
self.config.extra.times
for _ = 1, count do
f(count):each(function()
G.GAME.blind:disable()
q {
@ -104,59 +107,20 @@ back {
play_sound "timpani"
end,
}
end
end,
}
back {
key = "go",
pronouns = "he_him",
config = {extra = {times = 1, alt_times = 5}},
loc_vars = function(self, info_queue, _)
local _ = info_queue and table.insert(info_queue, G.P_CENTERS.j_credit_card)
return {vars = {self.config.extra.alt_times - self.config.extra.times}}
end,
apply = function(self)
q(function()
local count = self:is_alt() and self.config.extra.alt_times or self.config.extra.times
for _ = 1, count do
local c = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_credit_card", "Roland_go")
c:add_to_deck()
c:start_materialize()
G.jokers:emplace(c)
end
end)
end,
calculate = function(_, card, context)
if not context.starting_shop then
return
end
ease_dollars(-G.GAME.dollars)
attention_text {
text = localize "k_nope_ex",
backdrop_colour = G.C.MONEY,
offset = {x = 0, y = 0},
silent = true,
major = card,
align = "cm",
scale = 1.3,
hold = 1.4,
}
end,
}
back {
key = "swapper",
pronouns = "he_him",
attributes = {"spectral", "tarot"},
apply = function(self)
local modifiers = G.GAME.modifiers
modifiers.Roland_swapper_deck = true
modifiers.Roland_alt_swapper_deck = modifiers.Roland_alt_swapper_deck or self:is_alt()
end,
calculate = function() end,
calculate = f().noop,
}
local swapper = {Spectral = "Tarot", Tarot = "Spectral"}

View file

@ -337,6 +337,8 @@ function SMODS.current_mod:calculate(context)
modifiers.Roland_martingale_seed = (modifiers.Roland_martingale_seed or 0) + 1
end
local _ = type(G.calccontext) == "function" and G.calccontext(context)
local _ = type(G.calckeys) == "function" and G.calckeys(f(context):keys())
local _ = type(G.calc) == "function" and G.calc(f(context):keys():string())
local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities

View file

@ -52,6 +52,29 @@ end
local jokerful, vanillas, pastries, amber, cerulean, crimson, verdant, violet, final
= bans(), bans(), bans(), bans(), bans(), bans(), bans(), bans(), bans()
SMODS.Challenge {
key = "Go",
rules = {custom = {{id = "Roland_Go"}}},
jokers = {{id = "j_credit_card"}},
pronouns = "he_him",
calculate = function(self, context)
if context.starting_shop then
ease_dollars(-G.GAME.dollars)
attention_text {
text = localize "k_nope_ex",
backdrop_colour = G.C.MONEY,
offset = {x = 0, y = 0},
silent = true,
major = self,
align = "cm",
scale = 1.3,
hold = 1.4,
}
end
end,
}
SMODS.Challenge {
key = "Jokerful",
rules = {custom = {{id = "Roland_Jokerful"}}},

View file

@ -79,6 +79,7 @@ end
charm {
key = "wii",
pronouns = "they_them",
attributes = {"skip"},
calculate = function(_, card, context)
if not context.skip_blind then
return
@ -116,16 +117,17 @@ end
charm {
key = "fat",
pronouns = "he_they",
-- config = {extra = {mod = 1}},
-- loc_vars = function(_, _, card)
-- return {vars = {card.ability.extra.mod}}
-- end,
-- equip = function(_, card)
-- SMODS.change_booster_limit(card.ability.extra.mod)
-- end,
-- unequip = function(card)
-- SMODS.change_booster_limit(-card.ability.extra.mod)
-- end,
attributes = {"passive"},
config = {extra = {mod = 1}},
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.mod}}
end,
equip = function(_, card)
SMODS.change_booster_limit(card.ability.extra.mod)
end,
unequip = function(card)
SMODS.change_booster_limit(-card.ability.extra.mod)
end,
}
local orig_init = Card.init
@ -160,6 +162,7 @@ end
charm {
key = "cocacola",
pronouns = "he_they",
attributes = {"passive", "tarot", "spectral"},
equip = function()
f(G.consumeables.cards):each(add_to_consumable_ability_by(1))
end,
@ -184,6 +187,7 @@ charm {
key = "hand",
pronouns = "he_him",
config = {extra = {hands = -2, hand_size = 5}},
attributes = {"hands", "hand_size", "passive"},
loc_vars = function(_, _, card)
local extra = card.ability.extra
return {vars = {extra.hand_size, extra.hands}}

View file

@ -16,7 +16,6 @@ local frozen_sounds = f(4):map(frozen_sound):map("key"):table()
local needs_chip_mult_override = {
Bull = true,
Estate = true,
Erosion = true,
Misprint = true,
TierList = true,
@ -36,6 +35,7 @@ local current_round_overrides = {
Obelisk = "most_played_poker_hand",
["Ancient Joker"] = "ancient_card",
Wherewolf = "Bakery_Wherewolf_card",
j_Roland_suitable = "Roland_suitable",
}
SMODS.current_mod.frozen_chip_mult = needs_chip_mult_override
@ -53,10 +53,15 @@ local function freeze(card)
card.Roland_frozen_ability = card.Roland_frozen_ability or copy(card.ability)
card.ability = card.Roland_frozen_ability and copy(card.Roland_frozen_ability) or card.ability
local ret = card.Roland_frozen_ability
local ability = card.ability
local ability, ret = card.ability, card.Roland_frozen_ability
if type(ability) ~= "table" or not ability.name or not G.GAME.current_round then
if type(ability) ~= "table" then
return ret
end
ability.seal = ability.seal or {}
if not ability.name or not G.GAME.current_round then
return ret
end
@ -75,6 +80,7 @@ SMODS.Edition {
key = "frozen",
shader = "frozen",
sound = {sound = "Roland_frozen", per = 1, vol = 0.8},
attributes = {"passive", "scaling"},
weight = 8,
extra_cost = 4,
in_shop = true,
@ -83,6 +89,8 @@ SMODS.Edition {
freeze(card)
end,
on_remove = function(card)
card.Roland_frozen_proxy = nil
card.Roland_frozen_estate = nil
card.Roland_frozen_ability = nil
end,
get_weight = function(self)
@ -124,6 +132,11 @@ local orig_calculate_joker = Card.calculate_joker
function Card:calculate_joker(context, ...)
local is_frozen = self.edition and self.edition.Roland_frozen
if is_frozen and self.ability.name == "Loyalty Card" then
return (context.joker_main and self.ability.loyalty_remaining == 0) and
{xmult = self.ability.extra.Xmult} or nil
end
if is_frozen and self.ability.name == "Turtle Bean" then
return
end
@ -155,8 +168,6 @@ function Card:calculate_joker(context, ...)
ability.Roland_frozen_mult_mod or
ability.Roland_frozen_chip_mod or
ability.Roland_frozen_xmult,
(ability.Roland_frozen_mult_mod and ability.Roland_frozen_chip_mod) and
ability.Roland_frozen_chip_mod or nil,
},
},
}
@ -182,6 +193,57 @@ function Card:calculate_dollar_bonus(...)
return orig_calculate_dollar_bonus(self, ...)
end
q(function()
local estate = G.P_CENTERS.j_Bakery_Estate
if not estate then
return
end
---@param card Card|{ Roland_frozen_estate: integer }
local function estate_pos(card)
if card.area ~= G.jokers and card.area.config.type ~= "title" then
return 1
end
card.Roland_frozen_estate = card.Roland_frozen_estate and
card.Roland_frozen_estate or
(f(card.area.cards):swap():any(function(_, k)
return k == card
end) or 1)
return card.Roland_frozen_estate
end
local orig_calculate = estate.calculate
function estate:calculate(card, context, ...)
if not card or not card.edition or not card.edition.Roland_frozen then
return orig_calculate(self, card, context, ...)
end
if not context.joker_main then
return
end
local joker_count = estate_pos(card)
local extra = card.ability.extra or {}
return {chips = extra.chips * joker_count, mult = extra.mult * joker_count}
end
local orig_loc_vars = estate.loc_vars
function estate:loc_vars(info_queue, card, ...)
if not card or not card.edition or not card.edition.Roland_frozen then
return orig_loc_vars(self, info_queue, card, ...)
end
local joker_count = estate_pos(card)
local extra = card.ability.extra or {}
return {vars = {extra.chips * joker_count, extra.mult * joker_count}}
end
end)
q(function()
local proxy = G.P_CENTERS.j_Bakery_Proxy
@ -189,25 +251,25 @@ q(function()
return
end
---@param card Card|{ Roland_frozen_proxy: number }
local function get_proxied_joker(card)
if not G.jokers or not G.jokers.cards then
return
end
local ability = freeze(card)
card.Roland_frozen_proxy = card.Roland_frozen_proxy or
(Bakery_API.get_proxied_joker() or card).unique_val
---@param v Card
local function eq(v)
return v.unique_val == ability.Roland_frozen_proxy
return v.unique_val == card.Roland_frozen_proxy
end
ability.Roland_frozen_proxy = (Bakery_API.get_proxied_joker() or card).unique_val
return f(G.jokers.cards):any(eq) ---@type Card?
end
local orig_calculate = proxy.calculate
---@param card Card|{ Roland_frozen_ability: table }
function proxy:calculate(card, context, ...)
if not card or not card.edition or not card.edition.Roland_frozen then
return orig_calculate(self, card, context, ...)
@ -234,3 +296,17 @@ q(function()
return {vars = {var}}
end
end)
q(function()
local orig_flip_double_sided = (Bakery_API or {}).flip_double_sided
if not orig_flip_double_sided then
return
end
function Bakery_API.flip_double_sided(card, ...)
if not card.edition or not card.edition.Roland_frozen then
return orig_flip_double_sided(card, ...)
end
end
end)

View file

@ -12,13 +12,19 @@ local joker = (function()
return ret
end
---@param tbl SMODS.Joker|{artist?: string, sinis?: boolean|{x: number, y: number}, soul_pos?: boolean|{x: number, y: number}}
---@param tbl SMODS.Joker|{artist?: string, sinis?: boolean|{x: number, y: number}, soul_pos?: boolean|{x: number, y: number}, attributes?: Attributes[]}
return function(tbl)
tbl.pos = inc()
tbl.atlas = "joker"
tbl.artist = tbl.artist and "Roland_" .. tbl.artist or nil
tbl.soul_pos = tbl.soul_pos and inc() or nil
tbl.sinis = tbl.sinis and inc() or nil
if ((tbl.config or {}).extra or {}).flipped ~= nil then
tbl.config.extra.front_pos = tbl.pos
tbl.config.extra.back_pos = inc()
end
local joker = SMODS.Joker(tbl)
q(function()
@ -31,10 +37,16 @@ local function destructible(card)
return not card.highlighted and not (card.ability or {}).eternal
end
---@param card Card
local function is_carbon(card)
return card.edition and card.edition.key == "e_Bakery_Carbon"
end
---@param card Card
local function is_frozen(card)
return card.edition and card.edition.key == "e_Roland_frozen"
end
local function is_mergeable_with(x)
return function(y)
return x.rank ~= y.rank and
@ -83,10 +95,16 @@ SMODS.Atlas {
py = 95,
}
SMODS.Sound {
key = "nilly",
path = "nilly.ogg",
}
joker {
key = "escapey",
pronouns = "they_them",
config = {extra = {hands = 2}},
attributes = {"destroy_card", "tarot", "planet", "spectral", "tag"},
cost = 4,
rarity = 2,
sinis = true,
@ -117,6 +135,9 @@ joker {
},
}
end,
calculate = function(self, card, context)
return context.forcetrigger and self.proc(card) or nil
end,
Bakery_can_use = function(self, card)
return not card.debuff and u() and (self.exchangable() or self.fusable(card))
end,
@ -128,9 +149,6 @@ joker {
"b_Roland_fuse" or "b_Roland_escape"),
}
end,
calculate = function(self, card, context)
return context.forcetrigger and self.proc(card) or nil
end,
Bakery_use_joker = function(self, card)
if card.debuff then
return
@ -230,6 +248,7 @@ joker {
blueprint_compat = true,
perishable_compat = true,
config = {extra = {chips = 30}},
attributes = {"chips"},
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.chips}}
end,
@ -242,7 +261,9 @@ joker {
joker {
key = "mrsbones",
pronouns = "she_her",
artist = "char",
config = {extra = {xmult = 4, requirement = 4}},
attributes = {"xmult"},
cost = G.P_CENTERS.j_mr_bones.cost - 1,
rarity = 2,
eternal_compat = false,
@ -277,6 +298,7 @@ joker {
key = "phytoestrogens",
pronouns = "she_her",
config = {extra = {xmult = 0.25}},
attributes = {"mult", "xmult"},
cost = 8,
rarity = 3,
eternal_compat = true,
@ -300,6 +322,7 @@ joker {
pronouns = "it_its",
artist = "char",
config = {extra = {price = 4, hand_name = "Four of a Kind"}},
attributes = {"sell_value", "scaling", "economy", "hand_type"},
cost = 4,
rarity = 1,
eternal_compat = true,
@ -328,6 +351,7 @@ joker {
pronouns = "it_its",
artist = "char",
config = {extra = {mult_gain = 4, hand_name = "Four of a Kind", mult = 0}},
attributes = {"mult", "scaling", "hand_type"},
cost = 4,
rarity = 2,
eternal_compat = true,
@ -358,6 +382,7 @@ joker {
pronouns = "it_its",
artist = "char",
config = {extra = {times = 4, hand_name = "Four of a Kind"}},
attributes = {"generation", "hand_type"},
cost = 8,
rarity = 3,
eternal_compat = false,
@ -385,7 +410,7 @@ joker {
return
end
for _ = 1, extra.times do
f(extra.times):each(function()
G.playing_card = (G.playing_card or 0) + 1
G.deck.config.card_limit = G.deck.config.card_limit + 1
local chosen = pseudorandom_element(scored_cards, pseudoseed "Roland_trimino")
@ -395,7 +420,7 @@ joker {
copy:start_materialize()
table.insert(copied, copy)
table.insert(G.playing_cards, copy)
end
end)
SMODS.calculate_effect({{message = localize "k_copied_ex", message_card = card}}, card)
playing_card_joker_effects(copied)
@ -408,8 +433,10 @@ joker {
}
joker {
key = "sunny", -- Cracked egg
key = "sunny",
pronouns = "they_them",
artist = "char",
attributes = {"food", "on_sell"},
cost = 2,
rarity = 1,
eternal_compat = false,
@ -466,9 +493,60 @@ joker {
end,
}
joker {
key = "hardboiled",
pronouns = "they_them",
attributes = {"food", "editions", "modify_card", "on_sell"},
cost = 5,
rarity = 2,
eternal_compat = false,
blueprint_compat = true,
perishable_compat = true,
loc_vars = function(_, info_queue)
table.insert(info_queue, G.P_CENTERS.e_Roland_frozen)
end,
calculate = function(_, _, context)
return (context.selling_self or context.forcetrigger) and f(G.hand.cards):each(function(v)
q {
delay = 0.1,
func = function()
v:set_edition {Roland_frozen = true}
end,
}
end) or nil
end,
}
joker {
key = "basket",
pronouns = "they_them",
attributes = {"food", "generation", "on_sell"},
cost = 8,
rarity = 3,
eternal_compat = false,
blueprint_compat = true,
perishable_compat = true,
loc_vars = function(_, info_queue)
table.insert(info_queue, negative)
end,
calculate = function(_, _, context)
return (context.selling_self or context.forcetrigger) and f(G.consumeables.cards):each(function(v)
q {
delay = 1,
func = function()
play_sound "timpani"
SMODS.add_card {edition = "e_negative", key = v.config.center.key}
end,
}
end) or nil
end,
}
joker {
key = "sapling",
pronouns = "they_them",
artist = "char",
attributes = {"mult", "suit"},
cost = 4,
rarity = 1,
config = {extra = {mult = 15, suits = 3}},
@ -502,8 +580,9 @@ joker {
key = "yard",
pronouns = "he_him",
config = {extra = {money = 2}},
cost = 6,
rarity = 2,
attributes = {"economy"},
cost = 4,
rarity = 1,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = true,
@ -516,9 +595,63 @@ joker {
end,
}
joker {
key = "suitable",
pronouns = "she_they",
attributes = {"suit", "passive", "hearts", "diamonds", "spades", "clubs"},
cost = 4,
rarity = 2,
eternal_compat = true,
blueprint_compat = false,
perishable_compat = true,
loc_vars = function(_, info_queue)
table.insert(info_queue, G.P_CENTERS.m_wild)
local suit = (G.GAME.current_round.Roland_suitable or {}).suit or "Spades"
return {vars = {localize(suit, "suits_plural"), colours = {G.C.SUITS[suit]}}}
end,
add_to_deck = function()
G.GAME.modifiers.Roland_suitable = (G.GAME.modifiers.Roland_suitable or 0) + 1
end,
remove_from_deck = function()
G.GAME.modifiers.Roland_suitable = (G.GAME.modifiers.Roland_suitable or 0) - 1
end,
}
function SMODS.current_mod.reset_game_globals()
local immutable = f(SMODS.find_card "j_Roland_suitable"):any(is_frozen)
local suitable = {suit = "Spades"}
G.GAME.current_round.Roland_suitable = immutable and
G.GAME.current_round.Roland_suitable or suitable
if immutable then
return
end
local suits = f(G.playing_cards):where(SMODS.has_no_suit, false):table()
local card = pseudorandom_element(suits, "Roland_suitable" .. G.GAME.round_resets.ante)
suitable.suit = card and card.base.suit or suitable.suit
end
local orig_get_enhancements = SMODS.get_enhancements
function SMODS.get_enhancements(card, ...)
if (G.GAME.modifiers.Roland_suitable or 0) <= 0 or
card.base.suit ~= G.GAME.current_round.Roland_suitable.suit or
(card.area ~= G.hand and card.area ~= G.play) then
return orig_get_enhancements(card, ...)
end
local ret = orig_get_enhancements(card, ...) or {}
ret.m_wild = true
return ret
end
joker {
key = "misfortune",
pronouns = "she_they",
artist = "char",
attributes = {"discard", "generation", "seals"},
cost = 6,
rarity = 2,
eternal_compat = true,
@ -538,7 +671,8 @@ joker {
joker {
key = "temple",
pronouns = "any_all",
config = {extra = {xmult = 1.5}},
config = {extra = {xmult = 2}},
attributes = {"xmult", "enhancements"},
cost = 6,
rarity = 2,
eternal_compat = true,
@ -565,6 +699,7 @@ joker {
key = "jokersr",
pronouns = "he_him",
config = {extra = {xmult = 1.25}},
attributes = {"xmult"},
cost = 2,
rarity = 2,
eternal_compat = true,
@ -582,19 +717,20 @@ joker {
joker {
key = "bulldozer",
pronouns = "it_its",
attributes = {"xmult"},
cost = 6,
rarity = 2,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = true,
loc_vars = function(self, card, _)
loc_vars = function(self, _, card)
return {vars = {self:xmult_frozen(card)}}
end,
calculate = function(self, card, context)
return (context.joker_main or context.forcetrigger) and {card = card, xmult = self:xmult_frozen(card)} or nil
end,
xmult_frozen = function(self, card)
if not card.edition or not card.edition.Roland_frozen then
if not is_frozen(card) then
return self.xmult()
end
@ -620,6 +756,7 @@ joker {
key = "martingale",
pronouns = "he_him",
config = {extra = {odds = 2}},
attributes = {"xmult", "chance"},
cost = 8,
rarity = 2,
eternal_compat = true,
@ -668,6 +805,7 @@ joker {
cost = 7,
rarity = 3,
config = {extra = {probability = 1, probability_mult = 2, reset = 1}},
attributes = {"hands", "mod_chance", "scaling"},
eternal_compat = true,
blueprint_compat = false,
perishable_compat = true,
@ -697,3 +835,75 @@ joker {
end
end,
}
joker {
key = "nilly",
pronouns = "any_all",
config = {extra = {flipped = false}},
attributes = {"xmult"},
cost = 0,
rarity = 3,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = true,
loc_vars = function(_, _, card)
return {
vars = {localize {
type = "variable",
key = card.ability.extra.flipped and "b_Roland_enabled" or "b_Roland_disabled",
}},
}
end,
inject = function(...)
SMODS.Joker.inject(...)
Bakery_API.double_sided_jokers.j_Roland_nilly = true
end,
calculate = function(_, card, context)
if (not context.joker_main or not card.ability.extra.flipped) and not context.forcetrigger then
return
end
mult = mod_mult(0)
update_hand_text({delay = 0}, {chips = hand_chips, mult = mult})
return {sound = "Roland_nilly", message = "0X " .. localize "k_mult", colour = G.C.MULT, card = card}
end,
Bakery_can_use = function(_, card)
return not card.debuff
end,
Bakery_use_button_text = function(_, card)
return localize {
type = "variable",
key = card.debuff and "b_Roland_debuffed" or "b_Roland_toggle",
}
end,
Bakery_use_joker = function(_, card)
local _ = card.debuff or Bakery_API.flip_double_sided(card)
end,
}
joker {
key = "arctic",
pronouns = "it_its",
cost = 10,
rarity = 3,
config = {extra = {repetitions = 1}},
attributes = {"retrigger", "editions"},
eternal_compat = true,
blueprint_compat = true,
perishable_compat = true,
loc_vars = function(_, info_queue)
table.insert(info_queue, G.P_CENTERS.e_Roland_frozen)
end,
calculate = function(_, card, context)
return (context.repetition and is_frozen(context.other_card)) and {repetitions = 1} or SMODS.merge_effects(
f(G.jokers.cards):where(is_frozen):map(function(v)
return SMODS.blueprint_effect(card, v, context) or true
end):where(function(v)
return type(v) == "table"
end):map(function(v)
v.colour = G.C.BLACK
return v
end):table()
)
end,
}

View file

@ -342,6 +342,20 @@ function f:values()
end)
end
---@generic K, V
---@param self F|{ [K]: V }
---@return F|{ [V]: K }
---@nodiscard
function f:swap()
return f.new(function()
local k, v = self:next()
if k ~= nil then
return v, k
end
end)
end
---@generic K, V
---@param self F|{ [K]: V }
---@param skip? integer
@ -427,7 +441,7 @@ end
---@param func F|fun(v: V, k: K): boolean
---@return boolean|V
---@nodiscard
---@overload fun(self: F|{ [K]: V }, func: string): boolean|V
---@overload fun(self: F|{ [K]: V }, func: string?): boolean|V
function f:any(func)
func = type(func) == "string" and f.index(func) or func
@ -445,7 +459,7 @@ end
---@param func F|fun(v: V, k: K): boolean
---@return boolean|V
---@nodiscard
---@overload fun(self: F|{ [K]: V }, func: string): boolean|V
---@overload fun(self: F|{ [K]: V }, func: string?): boolean|V
function f:all(func)
func = type(func) == "string" and f.index(func) or func

View file

@ -23,6 +23,7 @@ local function protect_ev(fun)
return fun
end
---@alias Attributes "mult"|"chips"|"xmult"|"xchips"|"score"|"xscore"|"blindsize"|"xblindsize"|"balance"|"swap"|"retrigger"|"scaling"|"reset"|"suit"|"diamonds"|"hearts"|"spades"|"clubs"|"hand_type"|"rank"|"ace"|"two"|"three"|"four"|"five"|"six"|"seven"|"eight"|"nine"|"ten"|"jack"|"queen"|"king"|"face"|"economy"|"generation"|"destroy_card"|"hands"|"discard"|"hand_size"|"chance"|"joker_slot"|"mod_chance"|"copying"|"full_deck"|"passive"|"joker"|"tarot"|"planet"|"spectral"|"enhancements"|"seals"|"editions"|"tag"|"skip"|"modify_card"|"perma_bonus"|"prevents_death"|"boss_blind"|"reroll"|"on_sell"|"sell_value"|"food"|"space"
if false then
-- This allows for better type inference.
SMODS.Mods.Roland.config = require "config"

View file

@ -1,7 +1,7 @@
local qol = assert(SMODS.load_file "src/lib/shared.lua")() or require "lib.shared"
local f, q = unpack(qol)
f {"challenge", "spectral", "edition", "tweaks", "blind", "charm", "joker", "back", "seal"}:each(function(v)
f {"challenge", "spectral", "edition", "tweaks", "blind", "charm", "joker", "back", "seal", "tag"}:each(function(v)
assert(SMODS.load_file("src/" .. v .. ".lua"))(qol)
end)
@ -61,6 +61,7 @@ function SMODS.current_mod.config_tab()
toggle "no_highlight_limit",
_G["Talisman"] and toggle "harsh_ante_scaling",
toggle "fusable_escapey",
G.P_CENTERS.c_Bakery_Scribe and toggle "scribable_basket",
toggle "equinox_assist",
SMODS.Mods.DebugPlus and toggle "import_funky",
},

View file

@ -11,6 +11,7 @@ SMODS.Seal {
key = "glass",
atlas = "seal",
pos = {x = 0, y = 0},
attributes = {"destroy_card", "tag"},
badge_colour = HEX "a6a6a6ff",
pronouns = "he_him",
calculate = function(_, card, context)

View file

@ -1,7 +1,5 @@
local f, q, u = unpack(... or require "lib.shared")
local negative = {key = "e_negative_consumable", set = "Edition", config = {extra = 1}}
local spectral = (function()
local x = 0
@ -40,9 +38,10 @@ spectral {
key = "afterimage",
pronouns = "he_they",
artist = "aster",
attributes = {"editions", "modify_card", "hand_size", "spectral"},
config = {extra = {amount = 1, hand = -2}},
loc_vars = function(_, info_queue, card)
table.insert(info_queue, negative)
table.insert(info_queue, {key = "e_negative_playing_card", set = "Edition", config = {extra = 1}})
return {vars = {card.ability.extra.amount, card.ability.extra.hand}}
end,
can_use = function(_, card)
@ -71,6 +70,7 @@ spectral {
spectral {
key = "coolheaded",
config = {extra = {amount = 1}},
attributes = {"editions", "modify_card", "spectral"},
loc_vars = function(_, info_queue, card)
table.insert(info_queue, G.P_CENTERS.e_Roland_frozen)
return {vars = {card.ability.extra.amount}}
@ -96,6 +96,7 @@ spectral {
key = "dual",
pronouns = "they_them",
config = {extra = {amount = 2}},
attributes = {"seal", "modify_card", "spectral"},
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.amount}}
end,
@ -109,7 +110,7 @@ spectral {
f(cards):take(card.ability.extra.amount):each(function(v)
local seal
for _ = 1, 31 do
for _ = 1, 64 do
seal = SMODS.poll_seal {guaranteed = true}
if seal ~= "Roland_glass" then
@ -126,6 +127,7 @@ spectral {
key = "mirror",
pronouns = "he_him",
config = {extra = {amount = 1}},
attributes = {"seal", "modify_card", "spectral"},
loc_vars = function(_, info_queue, card)
table.insert(info_queue, G.P_SEALS.Roland_glass)
return {vars = {card.ability.extra.amount}}
@ -147,8 +149,9 @@ local void = spectral {
soul_rate = 0.003,
soul_set = "Spectral",
config = {extra = {amount = 2}},
attributes = {"destroy_card", "generation", "spectral"},
loc_vars = function(_, info_queue, card)
table.insert(info_queue, negative)
table.insert(info_queue, {key = "e_negative_consumable", set = "Edition", config = {extra = 1}})
table.insert(info_queue, G.P_CENTERS.c_cryptid)
return {vars = {card.ability.extra.amount}}
end,
@ -179,12 +182,12 @@ local void = spectral {
f(cards):each(destroy)
f(G.jokers.cards):each(calculate_joker)
for _ = 1, card.ability.extra.amount do
f(card.ability.extra.amount):each(function()
local cryptid = create_card(nil, G.consumeables, nil, nil, nil, nil, "c_cryptid", "void")
cryptid:set_edition({negative = true}, true)
cryptid:add_to_deck()
G.consumeables:emplace(cryptid)
end
end)
end
play_sound("Roland_void", 1, 0.7)

34
src/tag.lua Normal file
View file

@ -0,0 +1,34 @@
SMODS.Atlas {
px = 34,
py = 34,
key = "tag",
path = "tag.png",
}
SMODS.Tag {
key = "invisible",
atlas = "tag",
min_ante = 2,
pos = {x = 0, y = 0},
apply = function(_, tag)
local modifiers = G.GAME.modifiers
if tag.triggered or
not next(G.jokers.cards) or
#G.jokers.cards + (modifiers.Roland_invisible or 0) >= G.jokers.config.card_limit then
return
end
tag.triggered = true
modifiers.Roland_invisible = (modifiers.Roland_invisible or 0) + 1
tag:yep("!", G.C.GREY, function()
local copied = pseudorandom_element(G.jokers.cards, pseudoseed "Roland_invisible")
local copy = copy_card(copied)
G.jokers:emplace(copy)
copy:add_to_deck()
modifiers.Roland_invisible = (modifiers.Roland_invisible or 0) - 1
return true
end)
end,
}

View file

@ -17,9 +17,7 @@ function CardArea:can_highlight(...)
end
function Card:set_debuff(...)
if self.config and
self.config.center_key == "m_wild" and
SMODS.Mods.Roland.config.no_wild_debuff then
if SMODS.get_enhancements(self).m_wild and SMODS.Mods.Roland.config.no_wild_debuff then
self.debuff = false
else
orig_set_debuff(self, ...)
@ -116,7 +114,7 @@ end
local orig_get_blind_amount = get_blind_amount
---@param ante number
---@return number
---@return table|number
local function blind(ante)
return ante == 39 and 1e294 or (_G["to_number"] or f().id)(orig_get_blind_amount(ante))
end
@ -137,10 +135,25 @@ function get_blind_amount(ante, ...)
end
--- @type { constants?: { TEN: table }, new: (fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table), pow: (fun(x: number, y: number): number) }
local big, rem = _G["Big"], (ante % loop) + 1
local big, rem = _G["Big"], tonumber(blind((ante % loop) + 1))
return ante / 15 >= loop and big:new(f(blind(ante - (loop * 15))):map(f().const(10)):table()) or
(ante / 9 >= loop and big:new(f(ante / loop - 8):map(f().const(10)):concat {blind(rem)}:table()) or
(ante / 2 >= loop and big:new {blind(rem), ante / loop} or
(big.constants and big.constants.TEN or big:new {10}):pow(blind(rem))))
(ante / 9 >= loop and big:new(f(ante / loop - 8):map(f().const(10)):concat {rem}:table()) or
(ante / 2 >= loop and big:new {rem, ante / loop} or
(big.constants and big.constants.TEN or big:new {10}):pow(rem)))
end
q(function()
if not G.P_CENTERS.c_Bakery_Scribe then
return
end
local orig_can_use = G.P_CENTERS.c_Bakery_Scribe.can_use
function G.P_CENTERS.c_Bakery_Scribe.can_use(...)
return orig_can_use(...) and
(SMODS.Mods.Roland.config.scribable_basket or f(G.jokers.highlighted):all(function(v)
return v.config.center.key ~= "j_Roland_basket"
end))
end
end)