Fix coca cola phone and seal spectrals interaction
This commit is contained in:
parent
1ff01158f9
commit
7372ac0e8e
1 changed files with 36 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
local _, q = unpack(... or require "lib.shared")
|
||||
local f, q = unpack(... or require "lib.shared")
|
||||
|
||||
SMODS.Joker:take_ownership("joker", {cost = 1}, true)
|
||||
local orig_can_highlight = CardArea.can_highlight
|
||||
|
|
@ -35,6 +35,41 @@ function Card:highlight(is_highlighted, ...)
|
|||
end
|
||||
end
|
||||
|
||||
local orig_use_consumeable = Card.use_consumeable
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function Card:use_consumeable(area, copier, ...)
|
||||
local seal_spectrals = {["Deja Vu"] = true, Medium = true, Talisman = true, Trance = true}
|
||||
|
||||
if not seal_spectrals[self.ability.name] then
|
||||
return orig_use_consumeable(self, area, copier, ...)
|
||||
end
|
||||
|
||||
f(Bakery_API.get_highlighted()):each(function(v)
|
||||
q(function()
|
||||
play_sound "tarot1"
|
||||
local card = (copier or self)
|
||||
card:juice_up(0.3, 0.5)
|
||||
end)
|
||||
|
||||
q {
|
||||
delay = 0.1,
|
||||
trigger = "after",
|
||||
func = function()
|
||||
v:set_seal(self.ability.extra, nil, true)
|
||||
end,
|
||||
}
|
||||
end)
|
||||
|
||||
q {
|
||||
delay = 0.7,
|
||||
trigger = "after",
|
||||
func = function()
|
||||
Bakery_API.unhighlight_all()
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: lowercase-global
|
||||
function copy_card(other, new_card, ...)
|
||||
local ret = orig_copy_card(other, new_card, ...)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue