Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b153166ad | |||
| 7084ec1f40 | |||
| a06fec5c23 | |||
| 7e674bca9c | |||
| 817f1bc59a | |||
| 1e4920143b | |||
| 656be9aa38 | |||
| 6cf6938a1b |
6 changed files with 152 additions and 147 deletions
|
|
@ -1,7 +1,7 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 114
|
||||
priority = 115
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
|
|
@ -16,9 +16,7 @@ match_indent = true
|
|||
target = "globals.lua"
|
||||
pattern = "EDITION = {1,1,1,1},"
|
||||
position = "before"
|
||||
payload = '''jane_RGB = {0,0,0,1},
|
||||
jane_RGB_HUE = 0,
|
||||
almighty = {0,0,1,1},'''
|
||||
payload = "jane_RGB = {1,1,1,1},"
|
||||
match_indent = true
|
||||
|
||||
[[patches]]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"prefix": "jane",
|
||||
"main_file": "src/main.lua",
|
||||
"badge_colour": "3c3cff",
|
||||
"priority": 114,
|
||||
"priority": 115,
|
||||
"dependencies": [
|
||||
"Steamodded (>=1.0.0~BETA-1606b)",
|
||||
"Lovely (>=0.6)",
|
||||
|
|
@ -18,5 +18,5 @@
|
|||
"conflicts": [
|
||||
"Jen"
|
||||
],
|
||||
"version": "1.11.20"
|
||||
"version": "1.11.28"
|
||||
}
|
||||
100
src/edition.lua
100
src/edition.lua
|
|
@ -36,7 +36,7 @@ SMODS.Edition({
|
|||
weight = 10,
|
||||
extra_cost = 2,
|
||||
in_shop = true,
|
||||
shader = "polygloss",
|
||||
shader = "jane_polygloss",
|
||||
apply_to_float = false,
|
||||
loc_vars = function(self, _, _)
|
||||
local vars = {self.config.chips}
|
||||
|
|
@ -71,13 +71,46 @@ SMODS.Edition({
|
|||
get_weight = get_weight,
|
||||
})
|
||||
|
||||
local orig_draw_shader = Sprite.draw_shader
|
||||
local moire = SMODS.Edition({
|
||||
key = "moire",
|
||||
loc_txt = {
|
||||
name = "Moire",
|
||||
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
|
||||
|
||||
function Sprite:draw_shader(_shader, ...)
|
||||
if _shader ~= "jane_jumbo" then
|
||||
return orig_draw_shader(self, _shader, ...)
|
||||
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
|
||||
|
||||
|
|
@ -196,43 +229,16 @@ function Card:set_ability(...)
|
|||
return ret
|
||||
end
|
||||
|
||||
SMODS.Edition({
|
||||
key = "moire",
|
||||
loc_txt = {
|
||||
name = "Moire",
|
||||
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,
|
||||
calculate = function(self, card, context)
|
||||
return (
|
||||
context.post_joker or
|
||||
context.main_scoring and
|
||||
context.cardarea == G.play
|
||||
) and {
|
||||
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,
|
||||
},
|
||||
},
|
||||
} or nil
|
||||
end,
|
||||
})
|
||||
local orig_draw_shader = Sprite.draw_shader
|
||||
|
||||
function Sprite:draw_shader(_shader, ...)
|
||||
if _shader == "jane_jumbo" then
|
||||
return
|
||||
end
|
||||
|
||||
if _shader == "jane_moire" then
|
||||
G.P_CENTERS.j_jane_saint:draw()
|
||||
end
|
||||
|
||||
return orig_draw_shader(self, _shader, ...)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ SMODS.Joker {
|
|||
pos = {x = 0, y = 0},
|
||||
sinis = {x = 2, y = 0},
|
||||
soul_pos = {x = 1, y = 0},
|
||||
blueprint_compat = true,
|
||||
blueprint_compat = false,
|
||||
cost = 6,
|
||||
rarity = 2,
|
||||
loc_vars = function(_, _, card)
|
||||
|
|
@ -279,9 +279,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
function Jane.update_honey()
|
||||
function Jane.check_honey()
|
||||
if not G.GAME then
|
||||
return
|
||||
return true
|
||||
end
|
||||
|
||||
local honey = SMODS.find_card("j_jane_honey")
|
||||
|
|
@ -351,6 +351,7 @@ SMODS.Joker {
|
|||
blueprint_compat = false,
|
||||
cost = 8,
|
||||
rarity = 3,
|
||||
add_to_deck = Jane.check_honey,
|
||||
loc_vars = function(_, _, card)
|
||||
local level = tonumber(card.ability.extra.level) or 1
|
||||
|
||||
|
|
@ -393,8 +394,10 @@ SMODS.Joker {
|
|||
},
|
||||
}
|
||||
end,
|
||||
update = function(_, card, _)
|
||||
if card.added_to_deck and card.children.center and card.children.floating_sprite then
|
||||
draw = function(_, card)
|
||||
if card.added_to_deck and
|
||||
card.children.center and
|
||||
card.children.floating_sprite then
|
||||
local extra = card.ability.extra or {}
|
||||
local y = (tonumber(extra.level) or 1) > 1 and 1 or 0
|
||||
card.children.center:set_sprite_pos({x = 0, y = y})
|
||||
|
|
@ -528,7 +531,7 @@ SMODS.Joker {
|
|||
},
|
||||
}
|
||||
end,
|
||||
update = function(_, card, _)
|
||||
draw = function(_, card)
|
||||
if card.added_to_deck and card.children.center and card.children.floating_sprite then
|
||||
local extra = card.ability.extra or {}
|
||||
local y = extra.is_corrupted and 1 or 0
|
||||
|
|
@ -658,6 +661,9 @@ SMODS.Joker {
|
|||
remove_from_deck = function(_, card, _)
|
||||
grand_dad(card)
|
||||
end,
|
||||
draw = function()
|
||||
G.P_CENTERS.j_jane_saint:draw()
|
||||
end,
|
||||
calculate = function(_, card, context)
|
||||
if context.cardarea ~= G.play or
|
||||
not context.individual or
|
||||
|
|
|
|||
113
src/main.lua
113
src/main.lua
|
|
@ -1,5 +1,5 @@
|
|||
Jane = {
|
||||
cry = not not G.P_CENTERS.j_cry_m,
|
||||
cry = SMODS.Mods.Cryptid and not SMODS.Mods.Cryptid.disabled,
|
||||
config = {
|
||||
texture_pack = "default",
|
||||
wee_sizemod = math.sqrt(2),
|
||||
|
|
@ -155,6 +155,33 @@ function Jane.hidden(card)
|
|||
(type(card) == "table" and (card.name == "Black Hole" or card.name == "The Soul") or card.hidden)
|
||||
end
|
||||
|
||||
function Jane.hsv(h, s, v)
|
||||
if s <= 0 then
|
||||
return v, v, v
|
||||
end
|
||||
|
||||
h = h * 6
|
||||
local c = v * s
|
||||
local x = (1 - math.abs((h % 2) - 1)) * c
|
||||
local m, r, g, b = (v - c), 0, 0, 0
|
||||
|
||||
if h < 1 then
|
||||
r, g, b = c, x, 0
|
||||
elseif h < 2 then
|
||||
r, g, b = x, c, 0
|
||||
elseif h < 3 then
|
||||
r, g, b = 0, c, x
|
||||
elseif h < 4 then
|
||||
r, g, b = 0, x, c
|
||||
elseif h < 5 then
|
||||
r, g, b = x, 0, c
|
||||
else
|
||||
r, g, b = c, 0, x
|
||||
end
|
||||
|
||||
return r + m, g + m, b + m
|
||||
end
|
||||
|
||||
function Jane.is_end_of_ante(context, card)
|
||||
return not context.individual and not
|
||||
context.repetition and not
|
||||
|
|
@ -271,75 +298,17 @@ function Game:main_menu(change_context)
|
|||
orig_menu(self, change_context)
|
||||
end
|
||||
|
||||
local orig_update = Game.update
|
||||
local orig_start_run = Game.start_run
|
||||
|
||||
function Game:update(dt)
|
||||
local function delete_hardbans()
|
||||
if not Jane.config.disable_bans then
|
||||
function Game:start_run(...)
|
||||
orig_start_run(self, ...)
|
||||
|
||||
if self.GAME.banned_keys then
|
||||
for _, v in pairs(Jane.config.bans) do
|
||||
local e = SMODS.Center:get_obj(v)
|
||||
|
||||
if e then
|
||||
e:delete()
|
||||
self.GAME.banned_keys[v] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function hsv(h, s, v)
|
||||
if s <= 0 then
|
||||
return v, v, v
|
||||
end
|
||||
|
||||
h = h * 6
|
||||
local c = v * s
|
||||
local x = (1 - math.abs((h % 2) - 1)) * c
|
||||
local m, r, g, b = (v - c), 0, 0, 0
|
||||
|
||||
if h < 1 then
|
||||
r, g, b = c, x, 0
|
||||
elseif h < 2 then
|
||||
r, g, b = x, c, 0
|
||||
elseif h < 3 then
|
||||
r, g, b = 0, c, x
|
||||
elseif h < 4 then
|
||||
r, g, b = 0, x, c
|
||||
elseif h < 5 then
|
||||
r, g, b = x, 0, c
|
||||
else
|
||||
r, g, b = c, 0, x
|
||||
end
|
||||
|
||||
return r + m, g + m, b + m
|
||||
end
|
||||
|
||||
orig_update(self, dt)
|
||||
local ante = G.GAME.round_resets.ante
|
||||
local blind = get_blind_amount((ante >= 1 and ante <= 8) and math.floor(ante) or ante)
|
||||
G.P_BLINDS["bl_jane_wee"].mult = 22 / blind
|
||||
G.P_BLINDS["bl_jane_descending"].mult = math.ceil(8 * math.sqrt(blind)) / blind
|
||||
Jane.update_honey()
|
||||
|
||||
if not Jane.bans_done then
|
||||
Jane.bans_done = true
|
||||
delete_hardbans()
|
||||
end
|
||||
|
||||
if (G.GAME or {}).banned_keys then
|
||||
for _, v in pairs(Jane.config.bans) do
|
||||
G.GAME.banned_keys[v] = true
|
||||
end
|
||||
end
|
||||
|
||||
if G.ARGS.LOC_COLOURS then
|
||||
local r, g, b = hsv(self.C.jane_RGB_HUE / 360, .5, 1)
|
||||
self.C.jane_RGB[1] = r
|
||||
self.C.jane_RGB[3] = g
|
||||
self.C.jane_RGB[2] = b
|
||||
self.C.jane_RGB_HUE = (self.C.jane_RGB_HUE + 0.5) % 360
|
||||
G.ARGS.LOC_COLOURS.jane_RGB = self.C.jane_RGB
|
||||
end
|
||||
end
|
||||
|
||||
local orig_draw_card = draw_card
|
||||
|
||||
|
|
@ -350,6 +319,20 @@ function draw_card(a, b, c, d, e, f, ...)
|
|||
end
|
||||
end
|
||||
|
||||
local orig_reset_blinds = reset_blinds
|
||||
|
||||
---@diagnostic disable-next-line: lowercase-global
|
||||
function reset_blinds(...)
|
||||
orig_reset_blinds(...)
|
||||
local ante = G.GAME.round_resets.ante
|
||||
local blind = get_blind_amount((ante >= 1 and ante <= 8) and math.floor(ante) or ante)
|
||||
G.P_BLINDS["bl_jane_wee"].mult = 22 / blind
|
||||
G.P_BLINDS["bl_jane_descending"].mult = math.ceil(8 * math.sqrt(blind)) / blind
|
||||
end
|
||||
|
||||
loc_colour()
|
||||
G.ARGS.LOC_COLOURS.jane_RGB = G.C.jane_RGB
|
||||
|
||||
SMODS.Atlas {
|
||||
px = 34,
|
||||
py = 34,
|
||||
|
|
|
|||
|
|
@ -63,10 +63,25 @@ local exotic = Jane.cry and "cry_exotic" or 4
|
|||
|
||||
SMODS.Rarity {
|
||||
key = "junk",
|
||||
default_weight = 0.05,
|
||||
default_weight = 0,
|
||||
pools = {Joker = true},
|
||||
loc_txt = {name = "Junk"},
|
||||
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
|
||||
|
|
@ -181,7 +196,7 @@ SMODS.Joker {
|
|||
},
|
||||
}
|
||||
end,
|
||||
update = function(_, card, _)
|
||||
draw = function(_, card)
|
||||
if card.added_to_deck and card.children.center and card.children.floating_sprite then
|
||||
for k, v in ipairs(hunter) do
|
||||
if card.ability.extra.rounds_left <= v then
|
||||
|
|
@ -397,14 +412,14 @@ SMODS.Joker {
|
|||
return not card.debuff and Jane.can_use() and next(G.hand.highlighted)
|
||||
end,
|
||||
Bakery_use_joker = function(_, card)
|
||||
for _, v in pairs(SMODS.find_card("j_jane_oxy")) do
|
||||
Jane.oxy(v, G.hand.highlighted)
|
||||
end
|
||||
local removed = {unpack(G.hand.highlighted)}
|
||||
|
||||
for _, v in pairs(G.hand.highlighted) do
|
||||
for _, v in pairs(removed) do
|
||||
v:start_dissolve()
|
||||
end
|
||||
|
||||
SMODS.calculate_context {remove_playing_cards = true, removed = removed}
|
||||
|
||||
if Jane.cry then
|
||||
return
|
||||
end
|
||||
|
|
@ -626,14 +641,19 @@ SMODS.Joker {
|
|||
},
|
||||
}
|
||||
end,
|
||||
update = function(_, card, _)
|
||||
if card.edition and card.edition.Roland_frozen then
|
||||
card:set_edition("e_base")
|
||||
elseif card.children.floating_sprite then
|
||||
draw = function(_, card)
|
||||
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)
|
||||
|
||||
local _ = card and
|
||||
card.children.floating_sprite and
|
||||
card.children.floating_sprite:set_sprite_pos({x = card.ability.extra.is_attuned and 2 or 1, y = 0})
|
||||
end
|
||||
end,
|
||||
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
|
||||
extra.is_attuned = extra.is_attuned and extra.karma >= 0
|
||||
|
||||
|
|
@ -671,7 +691,7 @@ SMODS.Joker {
|
|||
end, 1)
|
||||
|
||||
Jane.q(function()
|
||||
extra.karma = extra.karma + extra.jokers
|
||||
extra.karma = Jane.cry and extra.karma + extra.jokers or extra.jokers
|
||||
G.jokers:change_size(extra.jokers)
|
||||
end, 1)
|
||||
end
|
||||
|
|
@ -726,7 +746,7 @@ SMODS.Joker {
|
|||
return
|
||||
end
|
||||
|
||||
G.jokers:change_size((extra.is_attuned and quota or extra.karma) * extra.jokers)
|
||||
G.jokers:change_size((extra.is_attuned and quota or (Jane.cry and extra.karma or 0)) * extra.jokers)
|
||||
ascend()
|
||||
end,
|
||||
add_to_deck = function(_, card)
|
||||
|
|
@ -798,18 +818,10 @@ SMODS.Joker {
|
|||
pos = {x = 0, y = 0},
|
||||
soul_pos = {x = 1, y = 0},
|
||||
blueprint_compat = true,
|
||||
cost = 1,
|
||||
cost = 2,
|
||||
rarity = "jane_junk",
|
||||
in_pool = function(_, _)
|
||||
if next(SMODS.find_card("j_jane_rot")) then
|
||||
in_pool = function()
|
||||
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,
|
||||
calculate = Jane.cry and function(_, card, context)
|
||||
local function has_room()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue