#that sounds good 😄

1 messages · Page 1 of 1 (latest)

quick lake
#
    set = "Tarot",
    key = "pawlatro_GiveRandomCard",
    config = {
        maxSelected = 1
    },
    pos = { --change this to a placeholder or it will crash maybe
        x = 1,
        y = 3
    },
    loc_txt = {
        name = "Give Random Card",
        text = {
            "Gives a single random additional card",
        }
    },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.maxSelected } }
    end,
    atlas = 'FoxModJokers', --change this
    cost = 3,
    discovered = true,
    can_use = function(self, card)
        if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT and G.STATE ~= G.STATES.PLAY_TAROT or
        any_state then
                return true
        end
    end,
    use = function(card, area, copier)

        --random stuff to get the next card expected in the seed, idk if you want it.  Also it might be special
        local card = create_card((pseudorandom(pseudoseed('stdset'..G.GAME.round_resets.ante)) > 0.6) and "Enhanced" or "Base", G.pack_cards, nil, nil, nil, true, nil, 'sta')        
        card.states.visible = nil

        --randomly decide whether you want diamond or Hearts

        --call card:set_suit or whatever it is called here

        card:add_to_deck()
        G.playing_card = (G.playing_card and G.playing_card + 1) or 1
        G.deck.config.card_limit = G.deck.config.card_limit + 1
        G.hand:emplace(card)
        table.insert(G.playing_cards, card)
        G.E_MANAGER:add_event(Event({
            func = function()
                card:start_materialize()
                return true
            end
        }))
    end
    })```