Use new SMODS function
This commit is contained in:
parent
77f308685a
commit
d118a17e3f
3 changed files with 20 additions and 39 deletions
|
|
@ -3,7 +3,7 @@
|
|||
"id": "Roland",
|
||||
"name": "Roland",
|
||||
"prefix": "Roland",
|
||||
"version": "2.9.22",
|
||||
"version": "2.9.23",
|
||||
"badge_colour": "8BE9FD",
|
||||
"display_name": "Roland",
|
||||
"main_file": "src/main.lua",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ end
|
|||
|
||||
local function has_enhancement(card)
|
||||
local e = SMODS.get_enhancements(card)
|
||||
return not not (e and next(e))
|
||||
return e and next(e)
|
||||
end
|
||||
|
||||
local function set_freeze(state)
|
||||
|
|
|
|||
|
|
@ -69,15 +69,15 @@ spectral {
|
|||
table.insert(info_queue, G.P_CENTERS.m_stone)
|
||||
end,
|
||||
can_use = function()
|
||||
return u() and not not next(G.hand.cards)
|
||||
return next(G.hand.cards) and u()
|
||||
end,
|
||||
use = function(_, card)
|
||||
q {
|
||||
trigger = "after",
|
||||
delay = 0.4,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
card:juice_up(0.3, 0.5)
|
||||
play_sound("tarot1")
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ spectral {
|
|||
delay = 0.15,
|
||||
func = function()
|
||||
v:flip()
|
||||
play_sound("card1", percent)
|
||||
v:juice_up(0.3, 0.3)
|
||||
play_sound("card1", percent)
|
||||
return true
|
||||
end,
|
||||
}
|
||||
|
|
@ -110,8 +110,8 @@ spectral {
|
|||
delay = 0.15,
|
||||
func = function()
|
||||
v:flip()
|
||||
play_sound("tarot2", percent, 0.6)
|
||||
v:juice_up(0.3, 0.3)
|
||||
play_sound("tarot2", percent, 0.6)
|
||||
return true
|
||||
end,
|
||||
}
|
||||
|
|
@ -155,41 +155,22 @@ spectral {
|
|||
return {vars = {card.ability.extra.amount}}
|
||||
end,
|
||||
can_use = function()
|
||||
return #G.playing_cards > 1 and not not u()
|
||||
return next(G.playing_cards) and u()
|
||||
end,
|
||||
use = function(_, card)
|
||||
local function destructible(v)
|
||||
return not v.ability or not (v.ability.eternal or v.ability.cry_absolute)
|
||||
end
|
||||
|
||||
local function destroy(v)
|
||||
if v.area then
|
||||
v.area:remove_card(v)
|
||||
end
|
||||
|
||||
v.rhm = false
|
||||
v:start_dissolve()
|
||||
end
|
||||
|
||||
local function void()
|
||||
local cards = f(G.playing_cards):where(destructible):table()
|
||||
|
||||
local function calculate_joker(v)
|
||||
v:calculate_joker {remove_playing_cards = true, removed = cards}
|
||||
end
|
||||
|
||||
f(cards):each(destroy)
|
||||
f(G.jokers.cards):each(calculate_joker)
|
||||
|
||||
f(card.ability.extra.amount):each(function()
|
||||
local cryptid = create_card(nil, G.consumeables, nil, nil, nil, nil, "c_cryptid", "void")
|
||||
cryptid:set_edition({negative = true}, true)
|
||||
cryptid:add_to_deck()
|
||||
G.consumeables:emplace(cryptid)
|
||||
end)
|
||||
end
|
||||
|
||||
play_sound("Roland_void", 1, 0.7)
|
||||
q {delay = 0.28, timer = "REAL", trigger = "after", func = void}
|
||||
|
||||
q {
|
||||
delay = 0.28,
|
||||
timer = "REAL",
|
||||
trigger = "after",
|
||||
func = function()
|
||||
SMODS.destroy_cards(G.playing_cards)
|
||||
|
||||
f(card.ability.extra.amount):each(function()
|
||||
SMODS.add_card "c_cryptid":set_edition({negative = true}, true)
|
||||
end)
|
||||
end,
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue