Delay sprite change

This commit is contained in:
Emik 2025-03-28 00:03:44 +01:00
parent 6e4f7e6b8e
commit 0140ff7e79
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
2 changed files with 4 additions and 2 deletions

View file

@ -12,5 +12,5 @@
"Bakery (>=0.1.26~*)"
],
"conflicts": ["Jen"],
"version": "0.1.7"
"version": "0.1.8"
}

View file

@ -489,12 +489,13 @@ SMODS.Joker {
update = function(_, card, _)
if card.added_to_deck and card.children.center and card.children.floating_sprite then
local extra = card.ability.extra
card.children.floating_sprite:set_sprite_pos({x = extra.karma >= extra.max_karma and 2 or 1, y = 0})
card.children.floating_sprite:set_sprite_pos({x = extra.is_attuned and 2 or 1, y = 0})
end
end,
calculate = function(_, card, context)
local extra = card.ability.extra
local max_karma = extra.max_karma
extra.is_attuned = extra.karma >= max_karma
if extra.karma >= max_karma then
if card.ability then
@ -592,6 +593,7 @@ SMODS.Joker {
card:flip()
card:juice_up(1, 1)
play_sound("card1")
extra.is_attuned = true
return true
end
}))