Add music, make compatible with latest Cryptid

This commit is contained in:
Emik 2025-04-18 22:38:37 +02:00
parent f1e6007cbd
commit cf014cb9b7
Signed by: emik
GPG key ID: 09CDFF9E5703688D
6 changed files with 77 additions and 42 deletions

Binary file not shown.

Binary file not shown.

View file

@ -122,3 +122,11 @@ pattern = '''hand_chips\*mult\)'''
position = "at" position = "at"
payload = "Jane.get_chipmult_sum(hand_chips, mult))" payload = "Jane.get_chipmult_sum(hand_chips, mult))"
match_indent = true match_indent = true
[[patches]]
[patches.pattern]
target = '=[SMODS Cryptid "items/exotic.lua"]'
pattern = 'local _first_dissolve = nil'
position = "after"
payload = 'deletable_jokers = next(SMODS.find_card("j_jane_saint")) and {} or deletable_jokers'
match_indent = true

View file

@ -17,5 +17,5 @@
"conflicts": [ "conflicts": [
"Jen" "Jen"
], ],
"version": "1.3.3" "version": "1.4.0"
} }

View file

@ -152,11 +152,6 @@ function Jane.get_operator()
return math.max(math.min(G.GAME.operator, 3), 1) return math.max(math.min(G.GAME.operator, 3), 1)
end end
function Jane.get_small_chipmult_sum(chips, mult)
local ret = Jane.get_chipmult_sum()
return type(ret) == "table" and ret:to_number() or ret
end
function Jane.hidden(card) function Jane.hidden(card)
return G.GAME and not G.GAME.obsidian and return G.GAME and not G.GAME.obsidian and
(type(card) == "table" and (card.name == "Black Hole" or card.name == "The Soul") or card.hidden) (type(card) == "table" and (card.name == "Black Hole" or card.name == "The Soul") or card.hidden)

View file

@ -5,6 +5,36 @@ for i = 1, 8 do
SMODS.Sound({key = "gore" .. i, path = "gore" .. i .. ".ogg"}) SMODS.Sound({key = "gore" .. i, path = "gore" .. i .. ".ogg"})
end end
SMODS.Sound({
key = "music_attuned",
path = "music_attuned.ogg",
volume = 1,
select_music_track = function()
for _, v in pairs(SMODS.find_card("j_jane_saint")) do
if v.ability.extra.is_attuned then
return Jane.sinister and -1 / 0 or 10
end
end
return -1 / 0
end,
})
SMODS.Sound({
key = "music_attuned_sinister",
path = "music_attuned_sinister.ogg",
volume = 1,
select_music_track = function()
for _, v in pairs(SMODS.find_card("j_jane_saint")) do
if v.ability.extra.is_attuned then
return Jane.sinister and 10 or -1 / 0
end
end
return -1 / 0
end,
})
for _, v in pairs({ for _, v in pairs({
"artificer", "artificer",
"hunter", "hunter",
@ -438,16 +468,6 @@ function Card:set_debuff(should_debuff)
end end
end end
local orig_card = SMODS.find_card
---@param key string
---@param count_debuffed true?
---@return Card[]|table[]
--- Returns all cards matching provided `key`.
function SMODS.find_card(key, count_debuffed)
return orig_card(key == "j_jen_saint" and "j_jane_saint" or key, count_debuffed)
end
local function attunement() local function attunement()
return (G.GAME or {}).weeckweeck and 2 or (Cryptid and 1.001 or 1.2) return (G.GAME or {}).weeckweeck and 2 or (Cryptid and 1.001 or 1.2)
end end
@ -517,7 +537,41 @@ SMODS.Joker {
calculate = function(_, card, context) calculate = function(_, card, context)
local extra = card.ability.extra local extra = card.ability.extra
local max_karma = extra.max_karma local max_karma = extra.max_karma
extra.is_attuned = extra.karma >= max_karma extra.is_attuned = extra.is_attuned and extra.karma >= max_karma
local function ascend()
if not extra.is_attuning then
return
end
extra.is_attuning = true
Jane.card_status_text(
card,
"!!!",
nil,
0.05 * card.T.h,
G.C.DARK_EDITION,
0.6,
0.6,
2,
2,
"bm",
"jane_enlightened"
)
Jane.q(function()
card:flip()
play_sound("card1")
end, 0.1)
Jane.q(function()
card:flip()
card:juice_up(1, 1)
play_sound("card1")
extra.is_attuned = true
end, 1)
end
if extra.is_attuned then if extra.is_attuned then
card.debuff = false card.debuff = false
@ -558,6 +612,8 @@ SMODS.Joker {
end end
return trigger return trigger
elseif extra.karma >= max_karma then
ascend()
end end
if not (not context.blueprint and if not (not context.blueprint and
@ -598,31 +654,7 @@ SMODS.Joker {
return return
end end
Jane.card_status_text( ascend()
card,
"!!!",
nil,
0.05 * card.T.h,
G.C.DARK_EDITION,
0.6,
0.6,
2,
2,
"bm",
"jane_enlightened"
)
Jane.q(function()
card:flip()
play_sound("card1")
end, 0.1)
Jane.q(function()
card:flip()
card:juice_up(1, 1)
play_sound("card1")
extra.is_attuned = true
end, 1)
end, end,
} }