Compare commits

...

5 commits

Author SHA1 Message Date
1b153166ad
Reorder Editions and fix Moire shader 2026-08-12 01:14:19 +02:00
7084ec1f40
Use correct Cryptid check 2026-08-12 00:37:07 +02:00
a06fec5c23
Defer loading 2026-08-11 23:02:39 +02:00
7e674bca9c
Fix Junk rarity 2026-08-06 21:18:13 +02:00
817f1bc59a
Use better organization 2026-08-04 17:50:12 +02:00
6 changed files with 84 additions and 72 deletions

View file

@ -1,7 +1,7 @@
[manifest] [manifest]
version = "1.0.0" version = "1.0.0"
dump_lua = true dump_lua = true
priority = 114 priority = 115
[[patches]] [[patches]]
[patches.pattern] [patches.pattern]

View file

@ -9,7 +9,7 @@
"prefix": "jane", "prefix": "jane",
"main_file": "src/main.lua", "main_file": "src/main.lua",
"badge_colour": "3c3cff", "badge_colour": "3c3cff",
"priority": 114, "priority": 115,
"dependencies": [ "dependencies": [
"Steamodded (>=1.0.0~BETA-1606b)", "Steamodded (>=1.0.0~BETA-1606b)",
"Lovely (>=0.6)", "Lovely (>=0.6)",
@ -18,5 +18,5 @@
"conflicts": [ "conflicts": [
"Jen" "Jen"
], ],
"version": "1.11.23" "version": "1.11.28"
} }

View file

@ -36,7 +36,7 @@ SMODS.Edition({
weight = 10, weight = 10,
extra_cost = 2, extra_cost = 2,
in_shop = true, in_shop = true,
shader = "polygloss", shader = "jane_polygloss",
apply_to_float = false, apply_to_float = false,
loc_vars = function(self, _, _) loc_vars = function(self, _, _)
local vars = {self.config.chips} local vars = {self.config.chips}
@ -71,13 +71,46 @@ SMODS.Edition({
get_weight = get_weight, get_weight = get_weight,
}) })
local orig_draw_shader = Sprite.draw_shader local moire = SMODS.Edition({
key = "moire",
function Sprite:draw_shader(_shader, ...) loc_txt = {
if _shader ~= "jane_jumbo" then name = "Moire",
return orig_draw_shader(self, _shader, ...) label = "Moire",
text = {
"{X:dark_edition,C:white}^#1#{} Chips",
"{X:dark_edition,C:white}^#2#{} Mult",
},
},
config = {e_chips = 0.8, e_mult = 1.2},
sound = {sound = "jane_e_moire", per = 1, vol = 0.7},
weight = 1,
extra_cost = 10,
in_shop = true,
shader = "jane_moire",
apply_to_float = false,
get_weight = get_weight,
loc_vars = function(self, _, _)
return {vars = {self.config.e_chips, self.config.e_mult}}
end,
calculate = function(self, card, context)
if not context.post_joker and (not context.main_scoring or context.cardarea ~= G.play) then
return
end end
end
return {
extra = {
card = card,
colour = G.C.jane_RGB,
e_chips = self.config.e_chips,
extra = {
card = card,
colour = G.C.jane_RGB,
e_mult = self.config.e_mult,
},
},
}
end,
})
local jumbo_modifier = Jane.cry and 100 or 2 local jumbo_modifier = Jane.cry and 100 or 2
@ -196,46 +229,16 @@ function Card:set_ability(...)
return ret return ret
end end
SMODS.Edition({ local orig_draw_shader = Sprite.draw_shader
key = "moire",
loc_txt = { function Sprite:draw_shader(_shader, ...)
name = "Moire", if _shader == "jane_jumbo" then
label = "Moire",
text = {
"{X:dark_edition,C:white}^#1#{} Chips",
"{X:dark_edition,C:white}^#2#{} Mult",
},
},
config = {e_chips = 0.8, e_mult = 1.2},
sound = {sound = "jane_e_moire", per = 1, vol = 0.7},
weight = 1,
extra_cost = 10,
in_shop = true,
shader = "moire",
apply_to_float = false,
get_weight = get_weight,
loc_vars = function(self, _, _)
return {vars = {self.config.e_chips, self.config.e_mult}}
end,
draw = function()
G.P_CENTERS.j_jane_saint:draw()
end,
calculate = function(self, card, context)
if not context.post_joker and (not context.main_scoring or context.cardarea ~= G.play) then
return return
end end
return { if _shader == "jane_moire" then
extra = { G.P_CENTERS.j_jane_saint:draw()
card = card, end
colour = G.C.jane_RGB,
e_chips = self.config.e_chips, return orig_draw_shader(self, _shader, ...)
extra = { end
card = card,
colour = G.C.jane_RGB,
e_mult = self.config.e_mult,
},
},
}
end,
})

View file

@ -279,7 +279,7 @@ SMODS.Joker {
end, end,
} }
function Jane.update_honey() function Jane.check_honey()
if not G.GAME then if not G.GAME then
return true return true
end end
@ -351,6 +351,7 @@ SMODS.Joker {
blueprint_compat = false, blueprint_compat = false,
cost = 8, cost = 8,
rarity = 3, rarity = 3,
add_to_deck = Jane.check_honey,
loc_vars = function(_, _, card) loc_vars = function(_, _, card)
local level = tonumber(card.ability.extra.level) or 1 local level = tonumber(card.ability.extra.level) or 1
@ -394,8 +395,7 @@ SMODS.Joker {
} }
end, end,
draw = function(_, card) draw = function(_, card)
if not Jane.update_honey() and if card.added_to_deck and
card.added_to_deck and
card.children.center and card.children.center and
card.children.floating_sprite then card.children.floating_sprite then
local extra = card.ability.extra or {} local extra = card.ability.extra or {}

View file

@ -1,5 +1,5 @@
Jane = { Jane = {
cry = not not G.P_CENTERS.j_cry_m, cry = SMODS.Mods.Cryptid and not SMODS.Mods.Cryptid.disabled,
config = { config = {
texture_pack = "default", texture_pack = "default",
wee_sizemod = math.sqrt(2), wee_sizemod = math.sqrt(2),

View file

@ -63,10 +63,25 @@ local exotic = Jane.cry and "cry_exotic" or 4
SMODS.Rarity { SMODS.Rarity {
key = "junk", key = "junk",
default_weight = 0.05, default_weight = 0,
pools = {Joker = true}, pools = {Joker = true},
loc_txt = {name = "Junk"}, loc_txt = {name = "Junk"},
badge_colour = G.C.JOKER_GREY, badge_colour = G.C.JOKER_GREY,
get_weight = function()
local rarity = 0.05
if next(SMODS.find_card("j_jane_rot")) then
return rarity
end
for _, v in pairs(SMODS.find_card("j_jane_honey")) do
if tonumber(v.ability.extra.level) == #Jane.rarity_ids - 1 then
return rarity
end
end
return 0
end,
} }
local monk_limit = 25 local monk_limit = 25
@ -630,13 +645,15 @@ SMODS.Joker {
local rgb = G.C.jane_RGB local rgb = G.C.jane_RGB
rgb[1], rgb[2], rgb[3] = Jane.hsv(1 - (G.TIMERS.REAL / 3 % 1), math.sin(G.TIMERS.REAL) / 10 + 0.6, 1) rgb[1], rgb[2], rgb[3] = Jane.hsv(1 - (G.TIMERS.REAL / 3 % 1), math.sin(G.TIMERS.REAL) / 10 + 0.6, 1)
if card.edition and card.edition.Roland_frozen then local _ = card and
card:set_edition("e_base") card.children.floating_sprite and
elseif card.config.center.key == "j_jane_saint" and card.children.floating_sprite then
card.children.floating_sprite:set_sprite_pos({x = card.ability.extra.is_attuned and 2 or 1, y = 0}) card.children.floating_sprite:set_sprite_pos({x = card.ability.extra.is_attuned and 2 or 1, y = 0})
end
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if card.edition and card.edition.Roland_frozen then
card:set_edition("e_base", true)
end
local extra = card.ability.extra local extra = card.ability.extra
extra.is_attuned = extra.is_attuned and extra.karma >= 0 extra.is_attuned = extra.is_attuned and extra.karma >= 0
@ -801,18 +818,10 @@ SMODS.Joker {
pos = {x = 0, y = 0}, pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0}, soul_pos = {x = 1, y = 0},
blueprint_compat = true, blueprint_compat = true,
cost = 1, cost = 2,
rarity = "jane_junk", rarity = "jane_junk",
in_pool = function(_, _) in_pool = function()
if next(SMODS.find_card("j_jane_rot")) then
return true, {allow_duplicates = true} return true, {allow_duplicates = true}
end
for _, v in pairs(SMODS.find_card("j_jane_honey")) do
if tonumber(v.ability.extra.level) == #Jane.rarity_ids - 1 then
return true, {allow_duplicates = true}
end
end
end, end,
calculate = Jane.cry and function(_, card, context) calculate = Jane.cry and function(_, card, context)
local function has_room() local function has_room()