Add new deck, adjust unlock requirements
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 242 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
|
@ -20,6 +20,17 @@ return {
|
|||
"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels",
|
||||
},
|
||||
},
|
||||
b_Roland_wish = {
|
||||
name = "Wish Deck",
|
||||
text = {
|
||||
"Redeem a random {C:attention}Voucher",
|
||||
"after {C:attention}Small {}and {C:attention}Big Blinds",
|
||||
"{C:attention}Vouchers {}no longer",
|
||||
"appear in the shop",
|
||||
--"",
|
||||
--"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels",
|
||||
},
|
||||
},
|
||||
},
|
||||
BakeryCharm = {
|
||||
BakeryCharm_Roland_cocacola = {
|
||||
|
|
@ -442,6 +453,27 @@ return {
|
|||
"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels",
|
||||
},
|
||||
},
|
||||
sleeve_Roland_wish = {
|
||||
name = "Wish Sleeve",
|
||||
text = {
|
||||
"A random {C:attention}voucher{} is",
|
||||
"{C:attention}redeemed {}at the end",
|
||||
"of {C:attention}Small {}and {C:attention}Big Blinds",
|
||||
"{C:attention}Vouchers {}no longer",
|
||||
"appear in the shop",
|
||||
--"",
|
||||
--"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels",
|
||||
},
|
||||
},
|
||||
sleeve_Roland_wish_alt = {
|
||||
name = "Miracle Sleeve",
|
||||
text = {
|
||||
"All {C:attention}vouchers",
|
||||
"start {C:attention}redeemed",
|
||||
--"",
|
||||
--"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels",
|
||||
},
|
||||
},
|
||||
},
|
||||
Spectral = {
|
||||
c_Roland_afterimage = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"id": "Roland",
|
||||
"name": "Roland",
|
||||
"prefix": "Roland",
|
||||
"version": "2.9.34",
|
||||
"version": "2.9.35",
|
||||
"badge_colour": "8BE9FD",
|
||||
"display_name": "Roland",
|
||||
"main_file": "src/main.lua",
|
||||
|
|
|
|||
75
src/back.lua
|
|
@ -8,7 +8,7 @@ end
|
|||
local back = (function()
|
||||
local x = 0
|
||||
|
||||
---@param tbl SMODS.Back|{is_alt: (fun(self: self): boolean), alt_apply?: fun(self: SMODS.Back|table, back: Back|table), alt_calculate?: fun(self: SMODS.Back|table, back: Back|table, context: CalcContext|table): table?, boolean?}
|
||||
---@param tbl SMODS.Back|{attributes?: Attributes[], is_alt: (fun(self: self): boolean), alt_apply?: fun(self: SMODS.Back|table, back: Back|table), alt_calculate?: fun(self: SMODS.Back|table, back: Back|table, context: CalcContext|table): table?, boolean?}
|
||||
return function(tbl)
|
||||
local key = tbl.key
|
||||
local apply = tbl.apply
|
||||
|
|
@ -71,7 +71,7 @@ back {
|
|||
key = "blossom",
|
||||
pronouns = "any_all",
|
||||
config = {extra = {alt_times = 4, times = 2}},
|
||||
attributes = {"boss_blind"},
|
||||
attributes = {"passive", "boss_blind"},
|
||||
loc_vars = function(self, _, _)
|
||||
return {vars = {self.config.extra.alt_times}}
|
||||
end,
|
||||
|
|
@ -79,13 +79,15 @@ back {
|
|||
G.GAME.modifiers.Roland_blossom_deck = true
|
||||
end,
|
||||
calculate = function(self, card, context)
|
||||
if not context.setting_blind then
|
||||
if not context.forcetrigger and not context.setting_blind then
|
||||
return
|
||||
end
|
||||
|
||||
local blinds = G.GAME.round_resets.blind_states
|
||||
|
||||
if blinds.Small ~= "Current" and blinds.Big ~= "Current" then
|
||||
if not context.forcetrigger and
|
||||
blinds.Small ~= "Current" and
|
||||
blinds.Big ~= "Current" then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
@ -112,7 +114,7 @@ back {
|
|||
back {
|
||||
key = "swapper",
|
||||
pronouns = "he_him",
|
||||
attributes = {"spectral", "tarot"},
|
||||
attributes = {"passive", "spectral", "tarot"},
|
||||
apply = function(self)
|
||||
local modifiers = G.GAME.modifiers
|
||||
modifiers.Roland_swapper_deck = true
|
||||
|
|
@ -140,3 +142,66 @@ function create_card(_type, ...)
|
|||
local has_type = SMODS.ConsumableTypes[_type]
|
||||
return orig_create_card(has_type and pseudorandom_element(type, pseudoseed "Roland_alt_swapper_deck") or _type, ...)
|
||||
end
|
||||
|
||||
local function redeem(key, fast)
|
||||
if fast then
|
||||
G.GAME.used_vouchers[key] = true
|
||||
end
|
||||
|
||||
q {
|
||||
delay = 1,
|
||||
func = function()
|
||||
local voucher = SMODS.create_card {key = key, set = "Voucher"}
|
||||
voucher.T.y = (fast and pseudorandom(pseudoseed "Roland_wish_deck") + 0.5 or 1) * 4.25
|
||||
voucher.T.x = (fast and pseudorandom(pseudoseed "Roland_wish_deck") + 0.5 or 1) * 9
|
||||
voucher.cost = 0
|
||||
voucher:start_materialize()
|
||||
|
||||
q {
|
||||
delay = 1,
|
||||
front = true,
|
||||
func = function()
|
||||
if fast then
|
||||
play_sound "card1"
|
||||
voucher:apply_to_run()
|
||||
voucher:juice_up(0.3, 0.5)
|
||||
else
|
||||
voucher:redeem()
|
||||
end
|
||||
|
||||
q {
|
||||
delay = 1,
|
||||
func = function()
|
||||
voucher:start_dissolve()
|
||||
end,
|
||||
}
|
||||
end,
|
||||
}
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
back {
|
||||
key = "wish",
|
||||
pronouns = "he_him",
|
||||
attributes = {"passive", "generation"},
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.Roland_no_voucher = true
|
||||
local _ = self:is_alt() and f(G.P_CENTER_POOLS.Voucher):map "key":each(redeem)
|
||||
end,
|
||||
calculate = function(_, _, context)
|
||||
local _ = (context.forcetrigger or
|
||||
context.blind_defeated and
|
||||
not context.repetition and
|
||||
not G.GAME.blind.boss) and
|
||||
redeem(get_next_voucher_key())
|
||||
end,
|
||||
}
|
||||
|
||||
local orig_add_voucher_to_shop = SMODS.add_voucher_to_shop
|
||||
|
||||
function SMODS.add_voucher_to_shop(...)
|
||||
if not G.GAME.modifiers.Roland_no_voucher then
|
||||
return orig_add_voucher_to_shop(...)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -116,6 +116,9 @@ SMODS.Challenge {
|
|||
jokers = {{id = "j_Roland_amber"}},
|
||||
restrictions = amber,
|
||||
pronouns = "they_them",
|
||||
unlocked = function()
|
||||
return G.P_CENTERS.j_Roland_amber and G.P_CENTERS.j_Roland_amber.check_for_unlock()
|
||||
end,
|
||||
calculate = function(_, context)
|
||||
local function slide(pitch)
|
||||
q(function()
|
||||
|
|
@ -155,6 +158,9 @@ SMODS.Challenge {
|
|||
jokers = {{id = "j_Roland_cerulean"}},
|
||||
restrictions = cerulean,
|
||||
pronouns = "she_her",
|
||||
unlocked = function()
|
||||
return G.P_CENTERS.j_Roland_cerulean and G.P_CENTERS.j_Roland_cerulean.check_for_unlock()
|
||||
end,
|
||||
calculate = function(_, context)
|
||||
if not context.hand_drawn then
|
||||
return
|
||||
|
|
@ -182,6 +188,9 @@ SMODS.Challenge {
|
|||
jokers = {{id = "j_Roland_crimson"}},
|
||||
restrictions = crimson,
|
||||
pronouns = "she_her",
|
||||
unlocked = function()
|
||||
return G.P_CENTERS.j_Roland_crimson and G.P_CENTERS.j_Roland_crimson.check_for_unlock()
|
||||
end,
|
||||
calculate = function(_, context)
|
||||
local _ = context.blind_defeated and f(G.jokers.cards):each(function(v)
|
||||
v.ability.Roland_crimson_heart_chosen = nil
|
||||
|
|
@ -242,6 +251,9 @@ SMODS.Challenge {
|
|||
jokers = {{id = "j_Roland_verdant"}},
|
||||
restrictions = verdant,
|
||||
pronouns = "she_her",
|
||||
unlocked = function()
|
||||
return G.P_CENTERS.j_Roland_verdant and G.P_CENTERS.j_Roland_verdant.check_for_unlock()
|
||||
end,
|
||||
calculate = function(_, context)
|
||||
if context.setting_blind then
|
||||
G.GAME.modifiers.Roland_Eternally_Verdant = true
|
||||
|
|
@ -265,6 +277,9 @@ SMODS.Challenge {
|
|||
jokers = {{id = "j_joker"}, {id = "j_Roland_violet"}},
|
||||
restrictions = violet,
|
||||
pronouns = "she_they",
|
||||
unlocked = function()
|
||||
return G.P_CENTERS.j_Roland_violet and G.P_CENTERS.j_Roland_violet.check_for_unlock()
|
||||
end,
|
||||
calculate = function(_, context)
|
||||
if not context.setting_blind then
|
||||
return
|
||||
|
|
|
|||
|
|
@ -1202,11 +1202,6 @@ joker {
|
|||
eternal_compat = true,
|
||||
blueprint_compat = false,
|
||||
perishable_compat = true,
|
||||
check_for_unlock = function(_, args)
|
||||
return args.type == "modify_deck" and f(G.playing_cards):all(function(v)
|
||||
return SMODS.has_enhancement(v, "m_stone")
|
||||
end)
|
||||
end,
|
||||
loc_vars = function(_, info_queue, card)
|
||||
local extra = card.ability.extra
|
||||
local _ = card.fake_card or table.insert(info_queue, G.P_CENTERS.m_stone)
|
||||
|
|
|
|||