-- SERVER-ONLY (not in fxmanifest files{}, never ships to clients): what a match costs and how
-- wagers pay. The UI still shows the price and wager limits, but it gets them from the server on
-- boot (sd-smashdown:server:boot) - and every charge, escrow and payout is decided here, never by a
-- number a client sends.
return {
    -- Account every charge comes from and every payout goes to: 'cash' | 'bank' (ESX 'money' is
    -- mapped for you by the bridge).
    Account = 'cash',

    -- Currency symbol the UI prints next to amounts (display only).
    Currency = '$',

    -- Cost of one credit - one match - charged to every human in it when the host starts.
    -- 0 = FREE PLAY. Credits are the arcade's takings: they are refunded only when a start fails
    -- part-way, never after the match has begun.
    CreditPrice = 25,

    -- Cash wagers. The host sets a per-player stake; when the match starts every human pays it
    -- into escrow (on top of the credit), and the winner takes the pot minus the house cut.
    -- Wagers need at least two humans, and every human must be able to cover credit + stake.
    --
    -- How a pot settles:
    --   * a human who finished the match wins  -> they get pot * (1 - HouseCut)
    --   * a CPU wins, a draw, or the "winner" had quit -> every human who stayed gets their own
    --     stake back in full, plus an even share of the quitters' stakes (minus HouseCut)
    --   * a player who quits mid-match forfeits: it's a loss and their stake stays in the pot
    --   * a VOID (players' results disagree, nobody reports, everyone leaves, /brawl_void) refunds
    --     every stake of the players who didn't quit; quitters' stakes go to the house
    -- Escrow is journalled to the database, so a crash or restart mid-match refunds the stakes on
    -- the next start (delivered the moment each player is next online).
    Wager = {
        Enabled = true, -- false = the wager option is hidden and refused server-side

        Min = 100, -- smallest stake the host may set (0 always means "no wager")
        Max = 5000, -- largest stake
        Step = 100, -- stakes snap down to Min + n * Step

        -- Fraction of the pot the house keeps on a paid-out match, 0.0 - 1.0 (0.05 = 5%).
        -- Not taken on refunds.
        HouseCut = 0.05,
    },
}
