Skip to content

Commit b31199b

Browse files
crystal joker retooling
1 parent 4e40dec commit b31199b

File tree

1 file changed

+21
-28
lines changed

1 file changed

+21
-28
lines changed

src/jokers/pl_jokers_w1.lua

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -323,44 +323,37 @@ SMODS.Joker {
323323
rarity = 2,
324324
atlas = 'pl_atlas_w1',
325325
discovered = true,
326-
config = { extra = { stone_played = false} },
327-
loc_vars = function(self, info_queue, card)
328-
return { vars = { card.ability.extra.stone_played} }
329-
end,
330326
blueprint_compat = true,
331327
eternal_compat = true,
332328
perishable_compat = true,
333329
pos = { x = 3, y = 1 },
334330
cost = 6,
335331
enhancement_gate = 'm_stone',
336332
calculate = function(self, card, context)
337-
if context.cardarea == G.play and context.individual then
338-
if context.other_card.ability.effect == "Stone Card" and not context.other_card.lucky_trigger then
339-
card.ability.extra.stone_played = true
340-
end
341-
end
342-
343-
if context.before and context.cardarea == G.jokers then
333+
if context.after and context.cardarea == G.jokers then
344334
local stone = false
345335
for i = 1, #context.scoring_hand do
346-
if context.scoring_hand[i].ability.effect == "Stone Card" then stone = true end
336+
if context.scoring_hand[i].ability.effect == "Stone Card" then stone = true
337+
end
338+
end
339+
if stone and (#G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit) then
340+
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
341+
G.E_MANAGER:add_event(Event({
342+
trigger = 'before',
343+
delay = 0.0,
344+
func = (function()
345+
local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil, nil, 'sup')
346+
card:add_to_deck()
347+
G.consumeables:emplace(card)
348+
G.GAME.consumeable_buffer = 0
349+
return true
350+
end)}))
351+
return {
352+
message = localize('k_plus_tarot'),
353+
colour = G.C.SECONDARY_SET.Tarot,
354+
card = card
355+
}
347356
end
348-
if stone then
349-
G.E_MANAGER:add_event(Event({
350-
trigger = 'before',
351-
delay = 0.0,
352-
func = (function()
353-
local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil, nil, 'crystal')
354-
card:add_to_deck()
355-
G.consumeables:emplace(card)
356-
G.GAME.consumeable_buffer = 0
357-
card:juice_up(0.5, 0.5)
358-
return true
359-
end)}))
360-
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_plus_tarot'), colour = G.C.PURPLE})
361-
end
362-
363-
364357
end
365358
end
366359
}

0 commit comments

Comments
 (0)