diff --git a/assets/1x/charm.png b/assets/1x/charm.png index 4aa0f29..91b38bd 100644 Binary files a/assets/1x/charm.png and b/assets/1x/charm.png differ diff --git a/assets/1x/phorm.png b/assets/1x/phorm.png new file mode 100644 index 0000000..4aa0f29 Binary files /dev/null and b/assets/1x/phorm.png differ diff --git a/assets/2x/back.png b/assets/2x/back.png index bdf286e..5bb9e1b 100644 Binary files a/assets/2x/back.png and b/assets/2x/back.png differ diff --git a/assets/2x/blind.png b/assets/2x/blind.png index b02e01f..a896500 100644 Binary files a/assets/2x/blind.png and b/assets/2x/blind.png differ diff --git a/assets/2x/charm.png b/assets/2x/charm.png index f9ac6d9..da3934a 100644 Binary files a/assets/2x/charm.png and b/assets/2x/charm.png differ diff --git a/assets/2x/icon.png b/assets/2x/icon.png index a059645..ca1887d 100644 Binary files a/assets/2x/icon.png and b/assets/2x/icon.png differ diff --git a/assets/2x/joker.png b/assets/2x/joker.png index 0ea021c..444300f 100644 Binary files a/assets/2x/joker.png and b/assets/2x/joker.png differ diff --git a/assets/2x/phorm.png b/assets/2x/phorm.png new file mode 100644 index 0000000..8bfbb56 Binary files /dev/null and b/assets/2x/phorm.png differ diff --git a/assets/2x/seal.png b/assets/2x/seal.png index 6eb8b26..39f0af7 100644 Binary files a/assets/2x/seal.png and b/assets/2x/seal.png differ diff --git a/assets/2x/sleeve.png b/assets/2x/sleeve.png index fb09079..e131437 100644 Binary files a/assets/2x/sleeve.png and b/assets/2x/sleeve.png differ diff --git a/assets/2x/spectral.png b/assets/2x/spectral.png index 6afbdd4..b2cae0f 100644 Binary files a/assets/2x/spectral.png and b/assets/2x/spectral.png differ diff --git a/assets/2x/tag.png b/assets/2x/tag.png index 9832345..92d5ac8 100644 Binary files a/assets/2x/tag.png and b/assets/2x/tag.png differ diff --git a/assets/2x/tarot.png b/assets/2x/tarot.png index c49eea1..f501939 100644 Binary files a/assets/2x/tarot.png and b/assets/2x/tarot.png differ diff --git a/assets/2x/unicon.png b/assets/2x/unicon.png index 7b63d35..4e89cc7 100644 Binary files a/assets/2x/unicon.png and b/assets/2x/unicon.png differ diff --git a/config.lua b/config.lua index 328d4f5..5af062b 100644 --- a/config.lua +++ b/config.lua @@ -1,5 +1,6 @@ return { animated_icon = true, + cool_phones = true, equinox_assist = false, faster_planets = false, harsh_ante_scaling = false, diff --git a/localization/en-us.lua b/localization/en-us.lua index 1f684c2..822ca7e 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -23,7 +23,7 @@ return { }, BakeryCharm = { BakeryCharm_Roland_cocacola = { - name = "coca cola phone", + name = SMODS.Mods.Roland.config.cool_phones and "coca cola phone" or "Pentagram", text = { "{C:attention}Discard 0 cards {}to", "gain {C:red}#1# {}discards and", @@ -32,7 +32,7 @@ return { }, }, BakeryCharm_Roland_fat = { - name = "fat i phone", + name = SMODS.Mods.Roland.config.cool_phones and "fat i phone" or "Product", text = { "{C:attention}+#1# Booster Pack {}slots", "All {C:attention}Booster Packs {}are {C:attention}Mega", @@ -40,15 +40,15 @@ return { }, }, BakeryCharm_Roland_flexible = { - name = "flexi ble phone", + name = SMODS.Mods.Roland.config.cool_phones and "flexi ble phone" or "Ring", text = {unpack(G.localization.descriptions.Joker.j_ring_master.text)}, }, BakeryCharm_Roland_hand = { - name = "hand phone", + name = SMODS.Mods.Roland.config.cool_phones and "hand phone" or "Shell", text = {"{C:attention}+#1# {}hand size", "{C:blue}#2# {}hands"}, }, BakeryCharm_Roland_wii = { - name = "wii phone", + name = SMODS.Mods.Roland.config.cool_phones and "wii phone" or "Tire", text = { "Enter the shop", "when any {C:attention}Blind", @@ -514,6 +514,7 @@ return { b_Roland_animated_icon = "Animated Icon (requires restart)", b_Roland_bye = "Bye!", b_Roland_comma = ", ", + b_Roland_cool_phones = "cool phones (requires restart)", b_Roland_debuffed = "DEBUFFED", b_Roland_disabled = "Disabled", b_Roland_enabled = "Enabled", diff --git a/manifest.json b/manifest.json index 1995ed6..9c08fda 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "Roland", "name": "Roland", "prefix": "Roland", - "version": "2.9.8", + "version": "2.9.9", "badge_colour": "8BE9FD", "display_name": "Roland", "main_file": "src/main.lua", diff --git a/src/charm.lua b/src/charm.lua index e62ce19..9c0b994 100644 --- a/src/charm.lua +++ b/src/charm.lua @@ -1,14 +1,15 @@ local f, q = (... or require "lib.shared")[1], (... or require "lib.shared")[2] local mod = SMODS.current_mod +local cool_phones = SMODS.Mods.Roland.config.cool_phones SMODS.Atlas { key = "charm", - path = "charm.png", + path = cool_phones and "phorm.png" or "charm.png", px = 68, py = 68, } -SMODS.Sound { +local _ = cool_phones and SMODS.Sound { key = "phone", path = "phone.ogg", } @@ -16,7 +17,7 @@ SMODS.Sound { local charm = (function() local x = 0 - ---@param tbl SMODS.Joker|{alerted?: boolean, equip?: fun(self: self, card: Card)} + ---@param tbl SMODS.Joker|{alerted?: boolean, artist?: string, equip?: fun(self: self, card: Card)} return function(tbl) q { blocking = false, @@ -35,6 +36,7 @@ local charm = (function() tbl.discovered = true tbl.pos = {x = x, y = 0} tbl.atlas = "charm" + tbl.artist = not cool_phones and "Roland_bakersdozenbagels" or nil x = x + 1 local orig_equip = tbl.equip @@ -47,7 +49,7 @@ local charm = (function() end end - local charm = Bakery_API.Charm(tbl) + local charm = Bakery_API.credit(Bakery_API.Charm(tbl)) charm:inject() charm:process_loc_text() SMODS.current_mod = current_mod diff --git a/src/joker.lua b/src/joker.lua index 002becc..4e8e501 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -759,7 +759,7 @@ joker { key = "violet", pronouns = "she_they", idea = "hamester", - config = {extra = {before = 1 / 3, xmult = 9}}, + config = {extra = {before = 0.1, xmult = 9}}, pixel_size = {w = 68, h = 68}, attributes = {"xmult"}, cost = 6, @@ -1201,7 +1201,10 @@ joker { local delta = (context.cardarea == G.play and not card.blueprint) and 1 or 0 extra.scored = extra.scored + delta - if not extra.flipped and extra.scored == extra.required then + if not extra.getting_flipped and + not extra.flipped and + extra.scored == extra.required then + extra.getting_flipped = true Bakery_API.flip_double_sided(card) q(function() @@ -1209,7 +1212,7 @@ joker { end) end - return extra.scored > extra.required and {card = card, xmult = card.ability.extra.xmult} or + return extra.scored >= extra.required and {card = card, xmult = card.ability.extra.xmult} or (delta > 0 and { message = extra.scored .. "/" .. extra.required, colour = G.C.JOKER_GREY, diff --git a/src/lib/intellisense.lua b/src/lib/intellisense.lua new file mode 100644 index 0000000..c6cd422 --- /dev/null +++ b/src/lib/intellisense.lua @@ -0,0 +1,55 @@ +---@meta +---@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"|"bakery_double_sided"|"bakery_usable"|"bakery_werewolf" +SMODS.Mods.Roland.config = require "config" + +---@type Card[] +CardArea.cards = CardArea.cards + +---@type userdata|{getWidth: fun(self: self): number} +SMODS.Atlas.image_data = SMODS.Atlas.image_data + +--- @type { constants?: { TEN: table }, new: (fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table), pow: (fun(x: number, y: number): number) } +_G["Big"] = _G["Big"] + +--- @type fun(area: CardArea, ...: ...): Card +create_card_for_shop = create_card_for_shop + +--- @overload fun(tbl: SMODS.Joker): SMODS.GameObject +Bakery_API.Charm = Bakery_API.Charm + +--- @generic T: SMODS.GameObject +--- @param obj T +--- @return T +function Bakery_API.credit(obj) + error(obj) +end + +-- This exists to remove the @deprecated warning. +---Returns the elements from the given `list`. This function is equivalent to +---```lua +--- return list[i], list[i+1], ···, list[j] +---``` +--- +--- +---[View documents](command:extension.lua.doc?["en-us/52/manual.html/pdf-unpack"]) +--- +---@generic T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 +---@param list { +--- [1]?: T1, +--- [2]?: T2, +--- [3]?: T3, +--- [4]?: T4, +--- [5]?: T5, +--- [6]?: T6, +--- [7]?: T7, +--- [8]?: T8, +--- [9]?: T9, +--- [10]?: T10, +---} +---@param i? integer +---@param j? integer +---@return T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 +---@nodiscard +function unpack(list, i, j) + error {list, i, j} +end diff --git a/src/lib/shared.lua b/src/lib/shared.lua index 7feeea4..c1cc165 100644 --- a/src/lib/shared.lua +++ b/src/lib/shared.lua @@ -36,54 +36,6 @@ local function protect_ev(fun) end 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"|"bakery_double_sided" -if false then - -- This allows for better type inference. - SMODS.Mods.Roland.config = require "config" - - ---@type Card[] - CardArea.cards = CardArea.cards - - ---@type userdata|{getWidth: fun(self: self): number} - SMODS.Atlas.image_data = SMODS.Atlas.image_data - - --- @type { constants?: { TEN: table }, new: (fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table), pow: (fun(x: number, y: number): number) } - _G["Big"] = _G["Big"] - - --- @type fun(area: CardArea, ...: ...): Card - create_card_for_shop = create_card_for_shop - - -- This exists to remove the @deprecated warning. - ---Returns the elements from the given `list`. This function is equivalent to - ---```lua - --- return list[i], list[i+1], ···, list[j] - ---``` - --- - --- - ---[View documents](command:extension.lua.doc?["en-us/52/manual.html/pdf-unpack"]) - --- - ---@generic T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 - ---@param list { - --- [1]?: T1, - --- [2]?: T2, - --- [3]?: T3, - --- [4]?: T4, - --- [5]?: T5, - --- [6]?: T6, - --- [7]?: T7, - --- [8]?: T8, - --- [9]?: T9, - --- [10]?: T10, - ---} - ---@param i? integer - ---@param j? integer - ---@return T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 - ---@nodiscard - function unpack(list, i, j) - error {list, i, j} - end -end - --- Queues an event to be run. --- Note that events added this way implicitly `return true` unless you explicitly `return false`. --- For `front`; boolean `true` to add the event to the front of the queue, rather than the end. diff --git a/src/main.lua b/src/main.lua index 9f5753c..e86e246 100644 --- a/src/main.lua +++ b/src/main.lua @@ -99,6 +99,7 @@ function SMODS.current_mod.config_tab() config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR}, nodes = { toggle "animated_icon", + toggle "cool_phones", toggle "faster_planets", -- toggle "illusion_seal", -- toggle "no_wild_debuff",