Skip to content

02. Blind Definitions

Sebastián Venturino edited this page Aug 18, 2024 · 2 revisions

Definition Documentation

Use Blind definitions to specify how a Blind behaves. Right now, it's used to check if a poker hand triggers the Blind for Matador, but it might have extra uses in the future.

Define a new Blind as follows:

local jd_blind_def = JokerDisplay.Blind_Definitions

jd_blind_def["bl_prefix_key"] = {
    -- Definition
}

A Blind definition is composed by the following values (all of them optional):

  • trigger_function: (function) This function checks if the Blind gets triggered by the current playing hand.

Field Specifications

trigger_function

This function checks if the Blind gets triggered by the current playing hand. See JokerDisplay.triggers_blind.

  • Arguments:

    • blind: The Blind being calculated

    • text: Poker hand text of the current scoring hand.

    • poker_hands: Poker hands included in the current scoring hand.

    • scoring_hand: The hand being (or about to be) scored.

    • full_hand: Full played hand including non-scoring cards.

  • Returns:

    • is_triggered: true if the hand triggers the Blind.
-- The Club/The Goad/The Window/The Head
-- Triggers if hand includes a specific debuffed suit
trigger_function = function(blind, text, poker_hands, scoring_hand, full_hand)
    if text ~= 'Unknown' then
        for _, scoring_card in pairs(scoring_hand) do
            if scoring_card:is_suit(blind.debuff.suit, true) then
                return true
            end
        end
    end
    return false
end
Clone this wiki locally