Compare commits

...

17 commits
2.9.76 ... main

19 changed files with 257 additions and 94 deletions

52
README.md Normal file
View file

@ -0,0 +1,52 @@
# Roland
[![License](https://img.shields.io/github/license/Emik03/Roland.svg?color=6272a4&style=for-the-badge)](https://github.com/Emik03/Roland/blob/main/LICENSE)
This is a [Steamodded](https://github.com/Steamodded/smods) mod for the video game [Balatro (2024)](https://playbalatro.com).
This mod has been in the works since early 2025, and been worked on continously until its official public release as a celebration for my 23rd birthday.
---
- [About](#about)
- [Contents](#contents)
- [Installation](#installation)
- [License](#license)
---
## About
The main theme of this mod centers around the addition of a new edition: Frozen.
Frozen can be applied to playing cards or jokers and will cause whatever state they have to be locked in place, removing any possibility of future scaling; positive or negative.
The primary goal is to create interesting interactions in-and-outside of the added editions. This does not necessarily mean that these mechanics have to be balanced, but does hopefully make new strategies viable and breathe new life into some of the base game's weaker jokers. It is designed to work very well with its parent mod [Bakery](https://github.com/BakersDozenBagels/BalatroBakery), but can work just as well on its own or with other content mods.
The mod offers a config for accessibility options, general convenience, modifications that I believe make the game healthier, and otherwise purely cosmetic.
## Contents
- 31 Jokers
- 1 Tarot Card
- 4 Spectral Cards
- 2 Vouchers
- 1 Seal
- 1 Edition
- 2 Tags
- 9 Blinds
- 4 Decks
- 4 [Deck Sleeves (CardSleeves)](https://github.com/larswijn/CardSleeves)
- 5 [Charms (Bakery)](https://github.com/BakersDozenBagels/BalatroBakery)
## Installation
1. Set up [Steamodded](https://github.com/Steamodded/smods/wiki#i-want-to-play-with-mods).
2. Set up [Bakery](https://github.com/BakersDozenBagels). You are free to use the [Lite version](https://github.com/BakersDozenBagels/BalatroBakery/tree/lite) if you want to play Roland standalone.
3. Clone the repository into your mods folder, or download it as a zip and place it there.
## License
This repository falls under the [MPL-2 license](https://www.mozilla.org/en-US/MPL/2.0/).
You may copy individual or multiple source files, granted that you keep the copyright license, and disclose the source back to this repository.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View file

@ -414,6 +414,16 @@ return {
text = {"{X:red,C:white}X#1#{} discards each round"}, text = {"{X:red,C:white}X#1#{} discards each round"},
unlock = {"Defeat {C:dark_edition}#1#"}, unlock = {"Defeat {C:dark_edition}#1#"},
}, },
j_Roland_yard = {
name = "Yard Sale",
text = {
"Gain {C:money}$#1#{} when a",
"card is {C:attention}added",
"or {C:attention}removed",
"from the deck",
},
unlock = {"Complete the", "{C:attention}#1#", "challenge"},
},
}, },
Other = { Other = {
roland_glass_seal = { roland_glass_seal = {
@ -594,7 +604,7 @@ return {
c_Roland_Jokerful = "Jokerful", c_Roland_Jokerful = "Jokerful",
c_Roland_Pastries = "Sweet Pastries", c_Roland_Pastries = "Sweet Pastries",
c_Roland_Spin_To_Win = "Spin to Win", c_Roland_Spin_To_Win = "Spin to Win",
c_Roland_Yard_Sale = "Yard Sale", c_Roland_Spring_Cleaning = "Spring Cleaning",
}, },
v_dictionary = { v_dictionary = {
b_Roland_add = "ADD", b_Roland_add = "ADD",
@ -634,8 +644,6 @@ return {
ch_c_Roland_Eternally_Violet = {"{C:attention}Violet Vessel{}'s effect is active every blind"}, ch_c_Roland_Eternally_Violet = {"{C:attention}Violet Vessel{}'s effect is active every blind"},
ch_c_Roland_Glass1 = {"Played cards with no seal have a"}, ch_c_Roland_Glass1 = {"Played cards with no seal have a"},
ch_c_Roland_Glass2 = {"{C:green}1 in 2{} chance to gain {C:dark_edition}Glass Seal"}, ch_c_Roland_Glass2 = {"{C:green}1 in 2{} chance to gain {C:dark_edition}Glass Seal"},
ch_c_Roland_Yard_Sale1 = {"Gain {C:money}$5 {}when playing cards are {C:attention}added {}or {C:attention}removed"},
ch_c_Roland_Yard_Sale2 = {"Earn {C:red}no money {}from any other source"},
ch_c_Roland_Go = {"Set money to {C:money}$0 {}when entering the shop"}, 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_Jokerful = {"The only jokers are {C:mult}Joker{} and {C:chips}Ms. Joker"},
ch_c_Roland_Pastries = {"All blinds, cards, and tags are of {C:gold}Bakery{} or {C:blue}Roland"}, ch_c_Roland_Pastries = {"All blinds, cards, and tags are of {C:gold}Bakery{} or {C:blue}Roland"},
@ -644,6 +652,7 @@ return {
ch_c_Roland_Showdown_Crimson = {"Showdown blinds are {C:attention}Crimson Heart {}(stacks with above)"}, ch_c_Roland_Showdown_Crimson = {"Showdown blinds are {C:attention}Crimson Heart {}(stacks with above)"},
ch_c_Roland_Showdown_Verdant = {"Showdown blinds are {C:attention}Verdant Leaf {}(stacks with above)"}, ch_c_Roland_Showdown_Verdant = {"Showdown blinds are {C:attention}Verdant Leaf {}(stacks with above)"},
ch_c_Roland_Showdown_Violet = {"Showdown blinds are {C:attention}Violet Vessel {}(stacks with above)"}, ch_c_Roland_Showdown_Violet = {"Showdown blinds are {C:attention}Violet Vessel {}(stacks with above)"},
ch_c_Roland_Spring_Cleaning = {"Earn {C:red}no money {}from sources other than {C:attention}Yard Sale"},
}, },
}, },
} }

View file

@ -65,6 +65,18 @@ position = "at"
payload = "elseif G.GAME.blind_on_deck == 'Big' then" payload = "elseif G.GAME.blind_on_deck == 'Big' then"
match_indent = true match_indent = true
# Prevent Incantation from overriding Faster Planets
[[patches]]
[patches.pattern]
target = '=[SMODS incantation "Incantation.lua"]'
pattern = "function Card:use_consumeable(area, copier)"
position = "after"
payload = """if SMODS.Mods.Roland.config.faster_planets and
self.ability.consumeable.hand_type then
return useconsumeref(self, area, copier)
end"""
match_indent = true
# Misfortune Cookie # Misfortune Cookie
[[patches]] [[patches]]
[patches.pattern] [patches.pattern]
@ -83,7 +95,7 @@ pattern = "local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil,
position = "after" position = "after"
times = 1 times = 1
payload = """if next(SMODS.find_card "j_Roland_misfortune") then payload = """if next(SMODS.find_card "j_Roland_misfortune") then
card:set_edition "e_negative" card:set_edition("e_negative", true, true)
end""" end"""
match_indent = true match_indent = true
@ -105,7 +117,7 @@ target = "card.lua"
pattern = "local card = create_card(card_type,G.consumeables, nil, nil, nil, nil, _planet, 'blusl')" pattern = "local card = create_card(card_type,G.consumeables, nil, nil, nil, nil, _planet, 'blusl')"
position = "after" position = "after"
payload = """if next(SMODS.find_card "j_Roland_misfortune") then payload = """if next(SMODS.find_card "j_Roland_misfortune") then
card:set_edition "e_negative" card:set_edition("e_negative", true, true)
end""" end"""
match_indent = true match_indent = true

View file

@ -3,7 +3,7 @@
"id": "Roland", "id": "Roland",
"name": "Roland", "name": "Roland",
"prefix": "Roland", "prefix": "Roland",
"version": "2.9.76", "version": "3.0.2",
"badge_colour": "8BE9FD", "badge_colour": "8BE9FD",
"display_name": "Roland", "display_name": "Roland",
"main_file": "src/main.lua", "main_file": "src/main.lua",

View file

@ -80,10 +80,10 @@ back {
pronouns = "any_all", pronouns = "any_all",
config = {extra = {alt_times = 9, times = 3}}, config = {extra = {alt_times = 9, times = 3}},
attributes = {"passive", "boss_blind"}, attributes = {"passive", "boss_blind"},
loc_vars = function(self, _, _) loc_vars = function(self)
return {vars = {self.config.extra.alt_times}} return {vars = {self.config.extra.alt_times}}
end, end,
apply = function(_, _) apply = function()
G.GAME.modifiers.Roland_blossom_deck = true G.GAME.modifiers.Roland_blossom_deck = true
end, end,
calculate = function(self, b, context) calculate = function(self, b, context)

View file

@ -257,7 +257,7 @@ blind {
boss = {min = 6}, boss = {min = 6},
boss_colour = HEX "bdaeccff", boss_colour = HEX "bdaeccff",
pronouns = "they_them", pronouns = "they_them",
collection_loc_vars = function(_) collection_loc_vars = function()
return { return {
vars = {localize { vars = {localize {
type = "variable", type = "variable",
@ -265,7 +265,7 @@ blind {
}}, }},
} }
end, end,
loc_vars = function(_) loc_vars = function()
local _, name = common_rank() local _, name = common_rank()
return {vars = {localize(name or "Ace", "ranks")}} return {vars = {localize(name or "Ace", "ranks")}}
end, end,
@ -319,7 +319,7 @@ blind {
dollars = 5, dollars = 5,
defeat = disable_improbable, defeat = disable_improbable,
disable = disable_improbable, disable = disable_improbable,
set_blind = function(_) set_blind = function()
G.GAME.modifiers.Roland_improbable = true G.GAME.modifiers.Roland_improbable = true
end, end,
} }
@ -380,7 +380,7 @@ function SMODS.current_mod:calculate(context)
:map(f.index_into(G.P_CENTERS)) :map(f.index_into(G.P_CENTERS))
:where("config.extra.hand_type", context.scoring_name) :where("config.extra.hand_type", context.scoring_name)
:pun "SMODS.Voucher" :pun "SMODS.Voucher"
:each(function(v, _) :each(function(v)
SMODS.smart_level_up_hand(nil, v.config.extra.hand_type, false, v.config.extra.amount) SMODS.smart_level_up_hand(nil, v.config.extra.hand_type, false, v.config.extra.amount)
end) end)

View file

@ -40,7 +40,7 @@ end
---@param v SMODS.GameObject ---@param v SMODS.GameObject
---@return boolean|string ---@return boolean|string
local function is_economy(v) local function is_economy(v)
return f(Bakery_API.econ_only_items):where(f.id, v.key):any() return f(Bakery_API.econ_only_items):where(f.eq(v.key)):any()
end end
---@param key string ---@param key string
@ -82,26 +82,22 @@ SMODS.Challenge {
end, end,
} }
local yard_sale
SMODS.Challenge { SMODS.Challenge {
key = "Yard_Sale", key = "Spring_Cleaning",
config = {extra = {dollars = 5}, no_interest = true}, config = {no_interest = true},
consumeables = {{id = "c_hanged_man"}},
jokers = {{id = "j_Roland_yard"}, {id = "j_Roland_yard"}},
vouchers = {{id = "v_magic_trick"}, {id = "v_overstock_norm"}}, vouchers = {{id = "v_magic_trick"}, {id = "v_overstock_norm"}},
rules = {custom = multirule("Yard_Sale", 2), modifiers = {{id = "dollars", value = 14}}}, rules = {custom = {{id = "Roland_Spring_Cleaning"}}},
restrictions = yard, restrictions = yard,
apply = function() apply = function()
G.GAME.modifiers.no_blind_reward = {Small = true, Big = true, Boss = true} G.GAME.modifiers.no_blind_reward = {Small = true, Big = true, Boss = true}
G.GAME.modifiers.no_extra_hand_money = true G.GAME.modifiers.no_extra_hand_money = true
f(Bakery_API.econ_only_items):keys():each(function(v) f(Bakery_API.econ_only_items):keys():where(f.nq "j_Roland_yard"):each(function(v)
G.GAME.banned_keys[v] = true G.GAME.banned_keys[v] = true
end) end)
end, end,
calculate = function(self, context)
yard_sale = (context.playing_card_added or context.remove_playing_cards) and not context.blueprint
return yard_sale and {dollars = self.config.extra.dollars * #(context.cards or context.removed or {})} or nil
end,
} }
SMODS.Challenge { SMODS.Challenge {
@ -342,12 +338,14 @@ q {
return false return false
end end
table.insert(Bakery_API.econ_only_items, "j_Roland_yard")
table.insert(Bakery_API.econ_only_items, "j_Roland_artemis")
local orig = Bakery_API.no_money_decks local orig = Bakery_API.no_money_decks
Bakery_API.no_money_decks = setmetatable({}, { Bakery_API.no_money_decks = setmetatable({}, {
orig = orig, orig = orig,
__index = function(_, k) __index = function(_, k)
return (G.GAME or {}).challenge == "c_Roland_Yard_Sale" and not yard_sale or orig[k] return (G.GAME or {}).challenge == "c_Roland_Spring_Cleaning" or orig[k]
end, end,
}) })

View file

@ -10,11 +10,6 @@ return {
fg = HEX "362708ff", fg = HEX "362708ff",
bg = HEX "edd198ff", bg = HEX "edd198ff",
}, },
char = {
name = "char (@irregulester)",
fg = HEX "f8f8f2ff",
bg = HEX "ff79c6ff",
},
ghostlyfield = { ghostlyfield = {
name = "ghostlyfield", name = "ghostlyfield",
fg = HEX "ffffffff", fg = HEX "ffffffff",

View file

@ -329,8 +329,6 @@ function Card:calculate_dollar_bonus(...)
return orig_calculate_dollar_bonus(self, ...) return orig_calculate_dollar_bonus(self, ...)
end end
local orig_get_probability_vars = SMODS.get_probability_vars
function SMODS.current_mod.bootstraps_mult(card) function SMODS.current_mod.bootstraps_mult(card)
local ability = card.Roland_frozen_ability local ability = card.Roland_frozen_ability
local ret = math.floor((G.GAME.dollars + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars) local ret = math.floor((G.GAME.dollars + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars)
@ -343,9 +341,17 @@ function SMODS.current_mod.bootstraps_mult(card)
return ability.Roland_bootstraps_mult return ability.Roland_bootstraps_mult
end end
local orig_get_probability_vars = SMODS.get_probability_vars
function SMODS.get_probability_vars(trigger_obj, ...) function SMODS.get_probability_vars(trigger_obj, ...)
local numerator, denominator = orig_get_probability_vars(trigger_obj, ...) local numerator, denominator = orig_get_probability_vars(trigger_obj, ...)
return trigger_obj and (trigger_obj.Roland_frozen or {}).probability or numerator, denominator local override = ((trigger_obj or {}).Roland_frozen or {}).probability
if override then
return type(denominator) == "table" and to_big(override) or override, denominator
else
return numerator, denominator
end
end end
q { q {

View file

@ -57,7 +57,7 @@ end)()
---@param card Card ---@param card Card
---@return boolean ---@return boolean
local function is_frozen(card) local function is_frozen(card)
return card and card.edition and card.edition.key == "e_Roland_frozen" return card and card.edition and card.edition.Roland_frozen
end end
---@param card? Card|false|{suit: string, value: string} ---@param card? Card|false|{suit: string, value: string}
@ -196,8 +196,8 @@ joker {
joker { joker {
key = "sunny", key = "sunny",
pronouns = "it_its", pronouns = "it_its",
artist = "char",
idea = "redstoad", idea = "redstoad",
artist = "ghostlyfield",
attributes = {"food", "on_sell"}, attributes = {"food", "on_sell"},
cost = 2, cost = 2,
rarity = 1, rarity = 1,
@ -218,8 +218,8 @@ joker {
SMODS.calculate_context {drawing_cards = true, draw = {G.deck.cards}} SMODS.calculate_context {drawing_cards = true, draw = {G.deck.cards}}
SMODS.calculate_context { SMODS.calculate_context {
hand_drawn = facing_blind and {G.deck.cards[1]} and true, hand_drawn = facing_blind and {G.deck.cards[1]} or true,
other_drawn = not facing_blind and {G.deck.cards[1]} and true, other_drawn = not facing_blind and {G.deck.cards[1]} or true,
first_hand_drawn = not current_round.any_hand_drawn and facing_blind or nil, first_hand_drawn = not current_round.any_hand_drawn and facing_blind or nil,
} }
@ -274,7 +274,9 @@ joker {
delay = 1, delay = 1,
func = function() func = function()
play_sound "timpani" play_sound "timpani"
SMODS.add_card {edition = "e_negative", key = v.config.center.key}
SMODS.add_card {edition = "e_negative", key = v.config.center.key, silent = true}
.ability.qty = v.ability.qty
end, end,
} }
end) or nil end) or nil
@ -284,7 +286,7 @@ joker {
joker { joker {
key = "monomino", key = "monomino",
pronouns = "it_its", pronouns = "it_its",
artist = "char", artist = "ghostlyfield",
config = {extra = {price = 4, hand_name = "Four of a Kind"}}, config = {extra = {price = 4, hand_name = "Four of a Kind"}},
attributes = {"sell_value", "scaling", "economy", "hand_type"}, attributes = {"sell_value", "scaling", "economy", "hand_type"},
cost = 4, cost = 4,
@ -313,7 +315,7 @@ joker {
joker { joker {
key = "domino", key = "domino",
pronouns = "it_its", pronouns = "it_its",
artist = "char", artist = "ghostlyfield",
config = {extra = {mult_gain = 4, hand_name = "Four of a Kind", mult = 0}}, config = {extra = {mult_gain = 4, hand_name = "Four of a Kind", mult = 0}},
attributes = {"mult", "scaling", "hand_type"}, attributes = {"mult", "scaling", "hand_type"},
cost = 4, cost = 4,
@ -344,7 +346,7 @@ joker {
joker { joker {
key = "trimino", key = "trimino",
pronouns = "it_its", pronouns = "it_its",
artist = "char", artist = "ghostlyfield",
config = {extra = {times = 4, hand_name = "Four of a Kind"}}, config = {extra = {times = 4, hand_name = "Four of a Kind"}},
attributes = {"generation", "hand_type"}, attributes = {"generation", "hand_type"},
cost = 8, cost = 8,
@ -403,7 +405,7 @@ joker {
joker { joker {
key = "misfortune", key = "misfortune",
pronouns = "she_they", pronouns = "she_they",
artist = "char", artist = "ghostlyfield",
attributes = {"discard", "passive", "tarot", "planet", "generation", "seals"}, attributes = {"discard", "passive", "tarot", "planet", "generation", "seals"},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
@ -423,6 +425,7 @@ joker {
joker { joker {
key = "polaris", key = "polaris",
pronouns = "he_him", pronouns = "he_him",
artist = "ghostlyfield",
attributes = {"editions", "space"}, attributes = {"editions", "space"},
cost = 6, cost = 6,
rarity = 1, rarity = 1,
@ -495,6 +498,7 @@ joker {
joker { joker {
key = "snowsquall", key = "snowsquall",
pronouns = "he_they", pronouns = "he_they",
artist = "ghostlyfield",
config = {extra = {mult_gain = 3, mult = 0}}, config = {extra = {mult_gain = 3, mult = 0}},
attributes = {"mult", "scaling", "hand_type"}, attributes = {"mult", "scaling", "hand_type"},
cost = 6, cost = 6,
@ -526,13 +530,37 @@ joker {
end, end,
} }
---comment
---@param card Card
---@param context table|CalcContext
---@return function
local function copy(card, context)
---@param v Card
return function(v)
local override_compat = v.config.center.blueprint_compat == nil
if override_compat then
v.config.center.blueprint_compat = true
end
local ret = SMODS.blueprint_effect(card, v, context)
if override_compat then
v.config.center.blueprint_compat = nil
end
return ret
end
end
joker { joker {
key = "arctic", key = "arctic",
pronouns = "they_them", pronouns = "they_them",
artist = "ghostlyfield",
cost = 10, cost = 10,
rarity = 3, rarity = 3,
config = {extra = {frozen = 1, non_frozen = 0, max_stack = 6, color = "DARK_EDITION"}}, config = {extra = {frozen = 1, non_frozen = 0, color = "DARK_EDITION"}},
attributes = {"retrigger", "editions"}, attributes = {"retrigger", "editions", "copying"},
eternal_compat = true, eternal_compat = true,
blueprint_compat = true, blueprint_compat = true,
perishable_compat = true, perishable_compat = true,
@ -542,9 +570,9 @@ joker {
calculate = function(_, card, context) calculate = function(_, card, context)
local extra = card.ability.extra local extra = card.ability.extra
if extra.max_stack and if f(context.blueprint_copiers_stack)
context.blueprint_copiers_stack and :where("config.center.key", card.config.center.key)
extra.max_stack < #context.blueprint_copiers_stack then :any() then
return return
end end
@ -557,14 +585,15 @@ joker {
end end
return SMODS.merge_effects( return SMODS.merge_effects(
f(G.jokers.cards):where(is_frozen):where(function(v) f(G)
return v.config.center.key ~= card.config.center.key :where(getmetatable, CardArea)
end):map(function(v) :flatmap("cards", ipairs)
return SMODS.blueprint_effect(card, v, context) :where(is_frozen)
end):where(type, "table"):map(function(v) :map(copy(card, context))
v.colour = G.C[extra.color] :where(type, "table")
return v :map(f.insert(G.C[extra.color], "colour"))
end):values():table() :values()
:table()
) )
end, end,
} }
@ -572,8 +601,8 @@ joker {
joker { joker {
key = "sapling", key = "sapling",
pronouns = "they_them", pronouns = "they_them",
artist = "char",
idea = "redstoad", idea = "redstoad",
artist = "ghostlyfield",
attributes = {"mult", "suit"}, attributes = {"mult", "suit"},
cost = 4, cost = 4,
rarity = 1, rarity = 1,
@ -810,6 +839,7 @@ joker {
joker { joker {
key = "venerable", key = "venerable",
pronouns = "any_all", pronouns = "any_all",
artist = "ghostlyfield",
defeated_blind = "bl_Roland_venerable_visage", defeated_blind = "bl_Roland_venerable_visage",
config = {extra = {xdiscard = 3}}, config = {extra = {xdiscard = 3}},
pixel_size = {w = 68, h = 68}, pixel_size = {w = 68, h = 68},
@ -836,11 +866,45 @@ joker {
ease_discard(round_resets.discards - discards) ease_discard(round_resets.discards - discards)
end, end,
} }
joker {
key = "yard",
pronouns = "he_him",
artist = "ghostlyfield",
config = {extra = {dollars = 3}},
attributes = {"economy"},
cost = 6,
rarity = 1,
unlocked = true,
discovered = true,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = true,
check_for_unlock = function()
return not not f.indices "challenge_progress.completed.c_Roland_Spring_Cleaning" (G.PROFILES[G.SETTINGS.profile])
end,
locked_loc_vars = function()
return {vars = {localize("c_Roland_Spring_Cleaning", "challenge_names")}}
end,
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.dollars}}
end,
calculate = function(_, card, c)
local ret = (c.forcetrigger or c.playing_card_added or c.remove_playing_cards) and
{dollars = card.ability.extra.dollars * #(c.cards or c.removed or {c.forcetrigger})} or nil
if ret and (G.GAME or {}).challenge == "c_Roland_Spring_Cleaning" then
G.GAME.dollars = G.GAME.dollars + ret.dollars
else
return ret
end
end,
}
joker { joker {
key = "bulldozer", key = "bulldozer",
pronouns = "she_her", pronouns = "she_her",
idea = "redstoad", idea = "redstoad",
artist = "ghostlyfield",
attributes = {"xmult"}, attributes = {"xmult"},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
@ -903,8 +967,8 @@ joker {
joker { joker {
key = "nilly", key = "nilly",
pronouns = "any_all", pronouns = "any_all",
artist = "ghostlyfield",
idea = "redstoad", idea = "redstoad",
artist = "ghostlyfield",
config = {extra = {flipped = false}}, config = {extra = {flipped = false}},
attributes = {"xmult", "bakery_double_sided"}, attributes = {"xmult", "bakery_double_sided"},
cost = 0, cost = 0,
@ -940,6 +1004,7 @@ joker {
key = "martingale", key = "martingale",
pronouns = "he_him", pronouns = "he_him",
idea = "redstoad", idea = "redstoad",
artist = "ghostlyfield",
config = {extra = {odds = 2}}, config = {extra = {odds = 2}},
attributes = {"xmult", "chance"}, attributes = {"xmult", "chance"},
cost = 8, cost = 8,
@ -1003,6 +1068,7 @@ joker {
joker { joker {
key = "idle", key = "idle",
pronouns = "any_all", pronouns = "any_all",
artist = "ghostlyfield",
rarity = 2, rarity = 2,
Roland_idle_capacity = 6, Roland_idle_capacity = 6,
cost = G.P_CENTERS.j_idol.cost, cost = G.P_CENTERS.j_idol.cost,
@ -1079,6 +1145,7 @@ joker {
joker { joker {
key = "suitable", key = "suitable",
pronouns = "she_they", pronouns = "she_they",
artist = "ghostlyfield",
attributes = {"suit", "passive", "hearts", "diamonds", "spades", "clubs"}, attributes = {"suit", "passive", "hearts", "diamonds", "spades", "clubs"},
cost = 4, cost = 4,
rarity = 2, rarity = 2,
@ -1131,8 +1198,8 @@ end
joker { joker {
key = "artemis", key = "artemis",
pronouns = "any_all", pronouns = "any_all",
artist = "hamester",
idea = "redstoad", idea = "redstoad",
artist = "hamester",
cost = 6, cost = 6,
rarity = 2, rarity = 2,
config = {extra = { config = {extra = {
@ -1198,6 +1265,7 @@ joker {
key = "excalibur", key = "excalibur",
pronouns = "he_him", pronouns = "he_him",
idea = "redstoad", idea = "redstoad",
artist = "ghostlyfield",
cost = 8, cost = 8,
rarity = 3, rarity = 3,
config = {extra = { config = {extra = {
@ -1269,7 +1337,7 @@ joker {
joker { joker {
key = "oops", key = "oops",
pronouns = "she_they", pronouns = "she_they",
artist = "char", artist = "ghostlyfield",
cost = 7, cost = 7,
rarity = 3, rarity = 3,
config = {extra = {probability = 1, probability_mult = 2, reset = 1}}, config = {extra = {probability = 1, probability_mult = 2, reset = 1}},
@ -1303,15 +1371,3 @@ joker {
end end
end, end,
} }
q {
blocking = false,
no_delete = true,
func = function()
if not Bakery_API then
return false
end
table.insert(Bakery_API.econ_only_items, "j_Roland_artemis")
end,
}

View file

@ -378,6 +378,21 @@ function f.indices(v)
end end
end end
---@generic K, V
---@param v V
---@param k K
---@return fun(x: { [K]: V }): { [K]: V }
---@nodiscard
function f.insert(v, k)
return function(x)
if type(x) == "table" then
x[k] = v
end
return x
end
end
---@generic T ---@generic T
---@param tbl T[] ---@param tbl T[]
---@return fun(t: T[], i?: integer): integer, T ---@return fun(t: T[], i?: integer): integer, T
@ -406,7 +421,7 @@ f[true and "call"] = function(self, ...)
local args = {...} local args = {...}
return type(self) == "string" and function(v) return type(self) == "string" and function(v)
return v[self](self, unpack(args)) return v[self](v, unpack(args))
end or function(v) end or function(v)
return v(unpack(args)) return v(unpack(args))
end end
@ -471,6 +486,7 @@ function f.new(fnext)
index = f.index, index = f.index,
index_into = f.index_into, index_into = f.index_into,
indices = f.indices, indices = f.indices,
insert = f.insert,
isf = f.isf, isf = f.isf,
keys = f.keys, keys = f.keys,
map = f.map, map = f.map,

View file

@ -28,6 +28,11 @@ CardSleeves.Sleeve = CardSleeves.Sleeve
--- @type {aliases: { [string]: [string] }} --- @type {aliases: { [string]: [string] }}
Cryptid = Cryptid Cryptid = Cryptid
---@return Card
function copy_card(...)
error(...)
end
--- @type fun(area: CardArea, ...: ...): Card --- @type fun(area: CardArea, ...: ...): Card
create_card_for_shop = create_card_for_shop create_card_for_shop = create_card_for_shop
@ -43,9 +48,11 @@ G.playing_cards = G.playing_cards
---@type userdata|{getWidth: fun(self: self): number} ---@type userdata|{getWidth: fun(self: self): number}
SMODS.Atlas.image_data = SMODS.Atlas.image_data SMODS.Atlas.image_data = SMODS.Atlas.image_data
---@return Card ---@param context CalcContext|table|{hand_drawn: true, other_drawn: true}
function copy_card(...) ---@param return_table? table
error(...) ---@return table?
function SMODS.calculate_context(context, return_table)
error {context, return_table}
end end
SMODS.Mods.Roland.config = require "config" SMODS.Mods.Roland.config = require "config"

View file

@ -14,10 +14,13 @@ local function add(v)
end end
if G.P_BLINDS[v] then if G.P_BLINDS[v] then
G.from_boss_tag = true if G.STATE ~= G.STATES.MENU then
G.GAME.perscribed_bosses = G.GAME.perscribed_bosses or {} G.from_boss_tag = true
G.GAME.perscribed_bosses[G.GAME.round_resets.ante] = v G.GAME.perscribed_bosses = G.GAME.perscribed_bosses or {}
G.FUNCS.reroll_boss() G.GAME.perscribed_bosses[G.GAME.round_resets.ante] = v
G.FUNCS.reroll_boss()
end
return G.P_BLINDS[v] return G.P_BLINDS[v]
end end

View file

@ -38,26 +38,32 @@ spectral {
return {vars = {card.ability.extra.amount}} return {vars = {card.ability.extra.amount}}
end, end,
can_use = function() can_use = function()
return u() and #G.hand.cards > 0 return next(G.hand.cards) and u()
end, end,
use = function(_, card, _) use = function(_, card)
local cards = f(G.hand.cards):table() local cards = f(G.hand.cards):table()
pseudoshuffle(cards, pseudoseed "RolandDual") pseudoshuffle(cards, pseudoseed "RolandDual")
f(cards):take(card.ability.extra.amount):each(function(v) f(cards):take(card.ability.extra.amount):each(function(v)
local seal local seal = SMODS.poll_seal {
guaranteed = true,
options = f(G.P_SEALS):keys():where(f.nq "Roland_glass"):values():table(),
}
for _ = 1, 64 do local _ = not card.Roland_immediate and q {
seal = SMODS.poll_seal {guaranteed = true} delay = 0.5,
trigger = "after",
if seal ~= "Roland_glass" then func = function()
break v:set_seal(seal, nil, true)
end end,
end } or v:set_seal(seal, true, true)
v:set_seal(seal == "Roland_glass" and "Red" or seal)
end) end)
end, end,
bulk_use = function(self, card, area, copier, number)
card.Roland_immediate = true
f(number):map(f.const(self)):each(f.call("use", card, area, copier))
card.Roland_immediate = nil
end,
} }
spectral { spectral {
@ -132,9 +138,10 @@ spectral {
return {vars = {card.ability.extra.amount}} return {vars = {card.ability.extra.amount}}
end, end,
can_use = function(_, card) can_use = function(_, card)
return u() and #Bakery_API.get_highlighted() <= card.ability.extra.amount local count = #Bakery_API.get_highlighted()
return u() and count > 0 and count <= card.ability.extra.amount
end, end,
use = function(_, _, _) use = function()
f(Bakery_API.get_highlighted()):each(function(v) f(Bakery_API.get_highlighted()):each(function(v)
v:set_seal "Roland_glass" v:set_seal "Roland_glass"
end) end)

View file

@ -122,6 +122,7 @@ SMODS.Tag {
ab.total_rounds = ab.total_rounds or self.config.total_rounds ab.total_rounds = ab.total_rounds or self.config.total_rounds
if tag.triggered or if tag.triggered or
not G.jokers or
not next(G.jokers.cards) or not next(G.jokers.cards) or
ab.invis_rounds < ab.total_rounds or ab.invis_rounds < ab.total_rounds or
#G.jokers.cards + (modifiers.Roland_invisible or 0) >= G.jokers.config.card_limit then #G.jokers.cards + (modifiers.Roland_invisible or 0) >= G.jokers.config.card_limit then

View file

@ -26,8 +26,9 @@ q(SMODS.Consumable {
end end
local highlighted = Bakery_API.get_highlighted() local highlighted = Bakery_API.get_highlighted()
local count = #G.jokers.highlighted + #highlighted
return #G.jokers.highlighted + #highlighted <= card.ability.extra.amount and return count > 0 and count <= card.ability.extra.amount and
f(G.jokers.highlighted):concat(highlighted):all(function(v) f(G.jokers.highlighted):concat(highlighted):all(function(v)
return not v.edition return not v.edition
end) end)

View file

@ -20,7 +20,7 @@ local orig_use_consumeable = Card.use_consumeable
function Card:use_consumeable(area, copier, ...) function Card:use_consumeable(area, copier, ...)
if SMODS.Mods.Roland.config.faster_planets and self.ability.consumeable.hand_type then if SMODS.Mods.Roland.config.faster_planets and self.ability.consumeable.hand_type then
set_consumeable_usage(self) set_consumeable_usage(self)
level_up_hand(copier or self, self.ability.consumeable.hand_type, true) level_up_hand(copier or self, self.ability.consumeable.hand_type, true, self.ability.qty or 1)
return return
end end