api mod for balatro adds a Planeswalker subtype
- depend on this mod (obviously)
- create a joker whose art uses the planeswalker frame in the repo (modification is allowed, the bright green should be the colour identity or whatever, the only thing that matters is the loyalty symbol in the bottom middle)
- in the joker definition, set
planeswalker = true,planeswalker_costs = { a, b, c }, anddefault_loyalty_effects = true(where a, b, and c are the costs, you may have 1-99 abilities) - in the joker's
config.extra, setloyalty = [starting loyalty]anduses = 1 - create a
can_loyalty(card, index)function on the joker. example:
can_loyalty = function(card, idx)
if idx == 1 then
return #G.hand.cards >= 1
elseif idx == 2 then
return #G.hand.highlighted >= 1 and #G.hand.highlighted <= 3
elseif idx == 3 then
return true
else return false end
end,- create a
loyalty(card, index)function on the joker. example:
loyalty = function(card, idx)
if idx == 1 then
SMODS.draw_cards(3)
elseif idx == 2 then
destroyed_cards = {}
for i=#G.hand.highlighted, 1, -1 do
destroyed_cards[#destroyed_cards+1] = G.hand.highlighted[i]
end
SMODS.destroy_cards(destroyed_cards)
elseif idx == 3 then
card.ability.extra.scoring = true
end
endand that should be it??