Add unlock conditions for blind jokers

This commit is contained in:
Emik 2026-07-05 04:59:25 +02:00
parent 5066875317
commit d15638243f
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
3 changed files with 28 additions and 2 deletions

View file

@ -138,6 +138,7 @@ return {
"Moves before", "Moves before",
"hand is played", "hand is played",
}, },
unlock = {"Defeat {C:attention}#1#"},
}, },
j_Roland_arctic = { j_Roland_arctic = {
name = "Arctic Circle", name = "Arctic Circle",
@ -184,6 +185,7 @@ return {
"All other {C:attention}Jokers {}cannot", "All other {C:attention}Jokers {}cannot",
"be selected or dragged", "be selected or dragged",
}, },
unlock = {"Defeat {C:blue}#1#"},
}, },
j_Roland_crimson = { j_Roland_crimson = {
name = "Crimson Heart", name = "Crimson Heart",
@ -192,6 +194,7 @@ return {
"{C:red}Debuffs {C:attention}Joker", "{C:red}Debuffs {C:attention}Joker",
"to the left", "to the left",
}, },
unlock = {"Defeat {C:red}#1#"},
}, },
j_Roland_domino = { j_Roland_domino = {
name = "Domino", name = "Domino",
@ -366,6 +369,7 @@ return {
"{C:red}Debuffs {}the {C:attention}first", "{C:red}Debuffs {}the {C:attention}first",
"{C:attention}#2# {}scored cards", "{C:attention}#2# {}scored cards",
}, },
unlock = {"Defeat {C:green}#1#"},
}, },
j_Roland_violet = { j_Roland_violet = {
name = "Violet Vessel", name = "Violet Vessel",
@ -374,10 +378,12 @@ return {
"but {X:mult,C:white}X#2#{} Mult", "but {X:mult,C:white}X#2#{} Mult",
"{C:attention}before {}scoring", "{C:attention}before {}scoring",
}, },
unlock = {"Defeat {C:purple}#1#"},
}, },
j_Roland_venerable = { j_Roland_venerable = {
name = "Venerable Visage", name = "Venerable Visage",
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#"},
}, },
j_Roland_yard = { j_Roland_yard = {
name = "Yard Sale", name = "Yard Sale",

View file

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

View file

@ -22,7 +22,7 @@ local joker = (function()
return ret return ret
end end
---@param tbl SMODS.Joker|{artist?: string, idea?: string, Bakery_can_use: (fun(self: self, card: Card): boolean?), Bakery_use_button_text: (fun(self: self, card: Card): string|table|nil), Bakery_use_joker: fun(self: self, card: Card), attributes?: Attributes[]} ---@param tbl SMODS.Joker|{artist?: string, defeated_blind: string?, idea?: string, Bakery_can_use: (fun(self: self, card: Card): boolean?), Bakery_use_button_text: (fun(self: self, card: Card): string|table|nil), Bakery_use_joker: fun(self: self, card: Card), attributes?: Attributes[]}
return function(tbl) return function(tbl)
tbl.pos = inc() tbl.pos = inc()
tbl.atlas = "joker" tbl.atlas = "joker"
@ -34,6 +34,20 @@ local joker = (function()
tbl.config.extra.back_pos = inc() tbl.config.extra.back_pos = inc()
end end
if tbl.defeated_blind then
tbl.discovered, tbl.unlocked = false, false
function tbl.check_for_unlock()
return Bakery_API.defeated_blinds[tbl.defeated_blind] > 0
end
function tbl.locked_loc_vars()
return G.P_BLINDS[tbl.defeated_blind].discovered and
{vars = {localize {type = "name_text", key = tbl.defeated_blind, set = "Blind"}}} or
{vars = {localize "k_unknown"}}
end
end
return q(SMODS.Joker(tbl)) return q(SMODS.Joker(tbl))
end end
end)() end)()
@ -579,6 +593,7 @@ joker {
joker { joker {
key = "amber", key = "amber",
pronouns = "they_them", pronouns = "they_them",
defeated_blind = "bl_final_acorn",
config = {extra = {xmult = 3}}, config = {extra = {xmult = 3}},
pixel_size = {w = 68, h = 68}, pixel_size = {w = 68, h = 68},
attributes = {"xmult"}, attributes = {"xmult"},
@ -626,6 +641,7 @@ joker {
joker { joker {
key = "cerulean", key = "cerulean",
pronouns = "she_her", pronouns = "she_her",
defeated_blind = "bl_final_bell",
config = {extra = {xmult = 3}}, config = {extra = {xmult = 3}},
pixel_size = {w = 68, h = 68}, pixel_size = {w = 68, h = 68},
attributes = {"xmult"}, attributes = {"xmult"},
@ -659,6 +675,7 @@ joker {
joker { joker {
key = "crimson", key = "crimson",
pronouns = "she_her", pronouns = "she_her",
defeated_blind = "bl_final_heart",
config = {extra = {xmult = 3}}, config = {extra = {xmult = 3}},
pixel_size = {w = 68, h = 68}, pixel_size = {w = 68, h = 68},
attributes = {"xmult"}, attributes = {"xmult"},
@ -706,6 +723,7 @@ end
joker { joker {
key = "verdant", key = "verdant",
pronouns = "she_her", pronouns = "she_her",
defeated_blind = "bl_final_leaf",
config = {extra = {debuffs = 2, xmult = 3}}, config = {extra = {debuffs = 2, xmult = 3}},
pixel_size = {w = 68, h = 68}, pixel_size = {w = 68, h = 68},
attributes = {"xmult"}, attributes = {"xmult"},
@ -756,6 +774,7 @@ end
joker { joker {
key = "violet", key = "violet",
pronouns = "she_they", pronouns = "she_they",
defeated_blind = "bl_final_vessel",
idea = "hamester", idea = "hamester",
config = {extra = {before = 0.1, xmult = 6}}, config = {extra = {before = 0.1, xmult = 6}},
pixel_size = {w = 68, h = 68}, pixel_size = {w = 68, h = 68},
@ -781,6 +800,7 @@ joker {
joker { joker {
key = "venerable", key = "venerable",
pronouns = "any_all", pronouns = "any_all",
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},
attributes = {"discard", "passive"}, attributes = {"discard", "passive"},