From dc83d32487e70636398bbb0d184775c16b900413 Mon Sep 17 00:00:00 2001 From: Emik Date: Mon, 13 Jul 2026 21:04:57 +0200 Subject: [PATCH] Add new deck (no art) --- assets/upscale.sh | 19 ++++++++++++++---- localization/en-us.lua | 30 ++++++++++++++++++++++++++++ src/back.lua | 45 ++++++++++++++++++++++++++++++++++++++---- src/challenge.lua | 1 - src/main.lua | 1 + 5 files changed, 87 insertions(+), 9 deletions(-) diff --git a/assets/upscale.sh b/assets/upscale.sh index a66be89..ef0eb22 100755 --- a/assets/upscale.sh +++ b/assets/upscale.sh @@ -1,8 +1,19 @@ #!/bin/sh -directory=$(dirname $(readlink -f "$0")) +cd "$(dirname "$0")" -for file in "$directory"/1x/*.png; do +for file in 2x/*.png; do filename=$(basename "$file") - output_file="$directory/2x/${filename}" - magick "$file" -filter point -resize 200% "$output_file" + if [ ! -f "1x/${filename}" ]; then + echo "Removing deleted file ${file} from 2x" + rm "2x/${filename}" + fi +done + +for file in 1x/*.png; do + filename=$(basename "$file") + output_file="2x/${filename}" + if [ ! -f "$output_file" ] || [ "$file" -nt "$output_file" ]; then + echo "Updating changed file ${file} in 2x/" + magick "$file" -filter point -resize 200% "$output_file" + fi done diff --git a/localization/en-us.lua b/localization/en-us.lua index 18e3a1a..cb71dfa 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -11,6 +11,16 @@ return { "{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", }, }, + b_Roland_dropship = { + name = "Dropship Deck", + text = { + "{C:attention}Jokers {}are {C:money}free", + "and {C:attention}Perishable", + "", + "{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", + }, + unlock = {"Have exclusively", "{C:attention}Perishable Jokers"}, + }, b_Roland_swapper = { name = "Swapper Deck", text = { @@ -435,6 +445,26 @@ return { "{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", }, }, + sleeve_Roland_dropship = { + name = "Dropship Sleeve", + text = { + "{C:attention}Jokers {}are {C:money}free", + "and {C:attention}Perishable", + "", + "{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", + }, + unlock = {"Have exclusively", "{C:attention}Perishable Jokers"}, + }, + sleeve_Roland_dropship_alt = { + name = "Business Sleeve", + text = { + "{C:attention}Jokers {}are {C:dark_edition}Negative", + "{C:attention}Perishable {}lasts forever", + "", + "{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", + }, + unlock = {"Have exclusively", "{C:attention}Perishable Jokers"}, + }, sleeve_Roland_swapper = { name = "Swapper Sleeve", text = { diff --git a/src/back.lua b/src/back.lua index 836023b..6e2e15f 100644 --- a/src/back.lua +++ b/src/back.lua @@ -116,7 +116,7 @@ back { back { key = "swapper", pronouns = "he_him", - attributes = {"passive", "spectral", "tarot"}, + attributes = {"passive", "editions", "sell_value"}, apply = function(self) local modifiers = G.GAME.modifiers modifiers.Roland_swapper_deck = true @@ -125,16 +125,52 @@ back { calculate = f.noop, } +back { + key = "dropship", + pronouns = "he_him", + attributes = {"passive", "generation"}, + unlocked = false, + discovered = false, + check_for_unlock = function(_, args) + return args ~= "Bakery_nothing" and + G.jokers and + not not f(G.jokers.cards):map "ability":all "perishable" + end, + apply = function(self) + G.GAME.modifiers.Roland_dropship = true + G.GAME.modifiers.Roland_dropship_alt = self:is_alt() + end, + calculate = f.noop, +} + local swapper = {Spectral = "Tarot", Tarot = "Spectral"} local orig_create_card = create_card +local function create_dropshipped_card(_type, ...) + local ret = orig_create_card(_type, ...) + local ok = _type == "Joker" and ret.ability + + if ok and G.GAME.modifiers.Roland_dropship_alt then + ret:set_edition({negative = true}, true) + ret.ability.perish_tally = 1 / 0 + end + + if ok and G.GAME.modifiers.Roland_dropship then + ret.ability.perishable = true + ret.cost, ret.sell_cost = 0, 0 + ret.ability.perish_tally = G.GAME.modifiers.Roland_dropship_alt and 1 / 0 or 5 + end + + return ret +end + function create_card(_type, ...) if not G.GAME.modifiers.Roland_swapper_deck then - return orig_create_card(_type, ...) + return create_dropshipped_card(_type, ...) end if not G.GAME.modifiers.Roland_alt_swapper_deck then - return orig_create_card(swapper[_type] or _type, ...) + return create_dropshipped_card(swapper[_type] or _type, ...) end local type = f(SMODS.ConsumableTypes):keys():where(function(v) @@ -142,7 +178,8 @@ function create_card(_type, ...) end):table() local has_type = SMODS.ConsumableTypes[_type] - return orig_create_card(has_type and pseudorandom_element(type, pseudoseed "Roland_alt_swapper_deck") or _type, ...) + return create_dropshipped_card( + has_type and pseudorandom_element(type, pseudoseed "Roland_alt_swapper_deck") or _type, ...) end local function redeem(key, fast) diff --git a/src/challenge.lua b/src/challenge.lua index 597f09c..a80d1c5 100644 --- a/src/challenge.lua +++ b/src/challenge.lua @@ -335,7 +335,6 @@ SMODS.Challenge { } q { - blocking = false, no_delete = true, func = function() diff --git a/src/main.lua b/src/main.lua index 09678d5..dd0b2c7 100644 --- a/src/main.lua +++ b/src/main.lua @@ -5,6 +5,7 @@ q { front = true, no_delete = true, blocking = false, + blockable = false, func = function() local contributors = (Bakery_API or {}).contributors