Add alternative charm art
Merged with https://git.gdane.net/bagels/PhoneStore
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
assets/1x/phorm.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 33 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 |
BIN
assets/2x/phorm.png
Normal file
|
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: 3.3 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 |
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
animated_icon = true,
|
||||
cool_phones = true,
|
||||
equinox_assist = false,
|
||||
faster_planets = false,
|
||||
harsh_ante_scaling = false,
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
55
src/lib/intellisense.lua
Normal file
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||