From f23dad31cc22706e3c2617e7253a44a6864e9b2a Mon Sep 17 00:00:00 2001 From: Emik Date: Sun, 26 Apr 2026 20:38:32 +0200 Subject: [PATCH] Add attributes, buff fat phone, buff temple --- localization/en-us.lua | 2 +- manifest.json | 2 +- src/back.lua | 4 +++- src/charm.lua | 24 ++++++++++++++---------- src/edition.lua | 1 + src/joker.lua | 25 +++++++++++++++++++++++-- src/lib/shared.lua | 1 + src/seal.lua | 1 + src/spectral.lua | 5 +++++ src/tweaks.lua | 10 +++++----- 10 files changed, 55 insertions(+), 20 deletions(-) diff --git a/localization/en-us.lua b/localization/en-us.lua index d2c69b1..95e85e5 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -29,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)", }, diff --git a/manifest.json b/manifest.json index 6059ed4..d6c7912 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "author": [ "Emik" ], - "version": "2.2.9", + "version": "2.2.10", "badge_colour": "8BE9FD", "main_file": "src/main.lua", "badge_text_colour": "44475A", diff --git a/src/back.lua b/src/back.lua index 14eedb7..01ea267 100644 --- a/src/back.lua +++ b/src/back.lua @@ -74,6 +74,7 @@ back { key = "blossom", pronouns = "any_all", config = {extra = {times = 2}}, + attributes = {"boss_blind"}, loc_vars = function(self, _, _) return {vars = {self.config.extra.times, self.config.extra.alt_times}} end, @@ -113,12 +114,13 @@ back { 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"} diff --git a/src/charm.lua b/src/charm.lua index 60a5309..eeff614 100644 --- a/src/charm.lua +++ b/src/charm.lua @@ -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}} diff --git a/src/edition.lua b/src/edition.lua index 53992a0..be82f7c 100644 --- a/src/edition.lua +++ b/src/edition.lua @@ -80,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, diff --git a/src/joker.lua b/src/joker.lua index 03532eb..1eb77ac 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -12,7 +12,7 @@ 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" @@ -104,6 +104,7 @@ joker { key = "escapey", pronouns = "they_them", config = {extra = {hands = 2}}, + attributes = {"destroy_card", "tarot", "planet", "spectral", "tag"}, cost = 4, rarity = 2, sinis = true, @@ -247,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, @@ -261,6 +263,7 @@ joker { 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, @@ -295,6 +298,7 @@ joker { key = "phytoestrogens", pronouns = "she_her", config = {extra = {xmult = 0.25}}, + attributes = {"mult", "xmult"}, cost = 8, rarity = 3, eternal_compat = true, @@ -318,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, @@ -346,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, @@ -376,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, @@ -429,6 +436,7 @@ joker { key = "sunny", pronouns = "they_them", artist = "char", + attributes = {"food", "on_sell"}, cost = 2, rarity = 1, eternal_compat = false, @@ -488,6 +496,7 @@ joker { joker { key = "hardboiled", pronouns = "they_them", + attributes = {"food", "editions", "modify_card", "on_sell"}, cost = 5, rarity = 2, eternal_compat = false, @@ -511,6 +520,7 @@ joker { joker { key = "basket", pronouns = "they_them", + attributes = {"food", "generation", "on_sell"}, cost = 8, rarity = 3, eternal_compat = false, @@ -536,6 +546,7 @@ joker { key = "sapling", pronouns = "they_them", artist = "char", + attributes = {"mult", "suit"}, cost = 4, rarity = 1, config = {extra = {mult = 15, suits = 3}}, @@ -569,6 +580,7 @@ joker { key = "yard", pronouns = "he_him", config = {extra = {money = 2}}, + attributes = {"economy"}, cost = 4, rarity = 1, eternal_compat = true, @@ -586,6 +598,7 @@ joker { joker { key = "suitable", pronouns = "she_they", + attributes = {"suit", "passive", "hearts", "diamonds", "spades", "clubs"}, cost = 4, rarity = 2, eternal_compat = true, @@ -638,6 +651,7 @@ joker { key = "misfortune", pronouns = "she_they", artist = "char", + attributes = {"discard", "generation", "seals"}, cost = 6, rarity = 2, eternal_compat = true, @@ -657,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, @@ -684,6 +699,7 @@ joker { key = "jokersr", pronouns = "he_him", config = {extra = {xmult = 1.25}}, + attributes = {"xmult"}, cost = 2, rarity = 2, eternal_compat = true, @@ -701,6 +717,7 @@ joker { joker { key = "bulldozer", pronouns = "it_its", + attributes = {"xmult"}, cost = 6, rarity = 2, eternal_compat = true, @@ -739,6 +756,7 @@ joker { key = "martingale", pronouns = "he_him", config = {extra = {odds = 2}}, + attributes = {"xmult", "chance"}, cost = 8, rarity = 2, eternal_compat = true, @@ -787,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, @@ -821,6 +840,7 @@ joker { key = "nilly", pronouns = "any_all", config = {extra = {flipped = false}}, + attributes = {"xmult"}, cost = 0, rarity = 3, eternal_compat = true, @@ -867,6 +887,7 @@ joker { cost = 10, rarity = 3, config = {extra = {repetitions = 1}}, + attributes = {"retrigger", "editions"}, eternal_compat = true, blueprint_compat = true, perishable_compat = true, diff --git a/src/lib/shared.lua b/src/lib/shared.lua index db76a92..11169ae 100644 --- a/src/lib/shared.lua +++ b/src/lib/shared.lua @@ -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" diff --git a/src/seal.lua b/src/seal.lua index 354441d..4461da2 100644 --- a/src/seal.lua +++ b/src/seal.lua @@ -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) diff --git a/src/spectral.lua b/src/spectral.lua index 491dfe0..76f7ca1 100644 --- a/src/spectral.lua +++ b/src/spectral.lua @@ -38,6 +38,7 @@ 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, {key = "e_negative_playing_card", set = "Edition", config = {extra = 1}}) @@ -69,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}} @@ -94,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, @@ -124,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}} @@ -145,6 +149,7 @@ 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, {key = "e_negative_consumable", set = "Edition", config = {extra = 1}}) table.insert(info_queue, G.P_CENTERS.c_cryptid) diff --git a/src/tweaks.lua b/src/tweaks.lua index de01bfe..4fbef92 100644 --- a/src/tweaks.lua +++ b/src/tweaks.lua @@ -114,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 @@ -135,12 +135,12 @@ 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()