SMODS.Blind - Breezebuilder/Steamodded-Wiki GitHub Wiki
API Documentation: SMODS.Blind
Class prefix: bl
- Required parameters:
keyloc_txtor localization entry (reference)
- Optional parameters (defaults)
atlas = 'blind_chips', pos = { x = 0, y = 0 }(reference)- Any atlas specified here must set
atlas_table = 'ANIMATION_ATLAS'. Theyvalue determines the row to use for the animation. Thexvalue is ignored and cycles through each frame of the animation.
- Any atlas specified here must set
discovered = false, no_collection, prefix_config, dependencies(reference)dollars = 5: Amount of money obtained when defeated.mult = 2: Required score relative to the Ante's Base score.boss: Marks this Blind as a Boss Blind and specifies on which Antes it can appear ({ min = 1, max = 10 }).maxis an artifact and not functional. Usein_poolinstead for advanced conditions.boss.showdown: Marks this Blind as a Final Boss Blind that shows up on every multiple of the winning Ante.minis ignored, usein_poolto restrict spawning.
boss_colour: Sets the background colour to use while playing this Blind (e.g.HEX('56789A'))debuff = {}: Configure vanilla Blind effects with these fields:- Disallowing hands in full:
hand = { ['Hand Type'] = true}for a specific set of hands,h_size_ge = n, must play at leastncards,h_size_le = n, must play at mostncards.
- Debuffing cards:
suit = 'Hearts'for one specific suit,value = '2'for one specific rank,nominal = nfor all ranks scoringnbase chips,is_face = truefor all face cards.
- These effects are ignored if you specify a
debuff_handordebuff_cardfunction respectively.
- Disallowing hands in full:
ignore_showdown_check: Enabling this allowsin_poolto be evaluated regardless of whether a showdown Boss Blind was requested or not.vars = {}: variables for the Blind's description in the collection. Fallback ifcollection_loc_varsisn't set.
API methods
In all of the following methods, use the global variable G.GAME.blind to
refer to the current blind. (The base game uses self to refer to the current blind in Blind:foo().)
set_blind(self)- Effects that activate when this Blind is selected
disable(self)- Reverting effects when this Blind gets disabled
defeat(self)- Reverting effects when this Blind is defeated
drawn_to_hand(self)- Effects that activate when cards are drawn to hand
press_play(self)- Effects that activate when a hand is played
recalc_debuff(self, card, from_blind) -> bool- Determines what cards should be debuffed by this Blind
debuff_hand(self, cards, hand, handname, check) -> bool- Determines if a hand is disallowed by this Blind
stay_flipped(self, area, card) -> bool- Determines what cards are drawn face down
modify_hand(self, cards, poker_hands, text, mult, hand_chips) -> number, number, bool- Used for modifications on the base score of played hands. Expected return values in order are:
- The modified value of
mult - The modified value of
hand_chips - A boolean value indicating whether any values were changed
- The modified value of
- Used for modifications on the base score of played hands. Expected return values in order are:
get_loc_debuff_text(self) -> string- Allows modifying text displayed for debuff warnings on invalid hands
loc_vars(self) -> { vars ?= table, key ?= string }(reference)- Due to various constraints, the functionality of
loc_varson blinds is very limited. Onlyvarsandkeyreturns are supported, and noinfo_queueexists.
- Due to various constraints, the functionality of
collection_loc_vars(self) -> { vars ?= table, key ?= string }- Used for passing variables to Blind descriptions when viewing the collection. If not defined, the game will use the
varsfield on your object.
- Used for passing variables to Blind descriptions when viewing the collection. If not defined, the game will use the
in_pool(self) -> bool- For implementing advanced restrictions on when a Blind may appear in a run. This puts
boss.minandboss.maxrestrictions out of effect. - Unless
ignore_showdown_checkis set, this function will not be evaluated in the following cases:- A showdown Boss Blind should appear, but this Blind is a regular Boss Blind.
- A regular Boss Blind should appear, but this Blind is a showdown Boss Blind.
- For implementing advanced restrictions on when a Blind may appear in a run. This puts