Skip to content

Helper Functions

icyethics edited this page Sep 5, 2025 · 1 revision

Blockbuster: Counters provides multiple helper functions to help with interacting with counters.

  • Blockbuster.Counters.get_total_counters(types, targets) -> number
    • Can be given a table of Counters or counter keys as types, and will return the total value of all of those counters added up together that was found in the cards provided in the targets table.
  • Blockbuster.Counters.get_counter(card) -> Counter
    • will return the counter object that's on the given card
  • Blockbuster.Counters.is_counter(card, counter_key) -> boolean
    • Will return true if the counter on the given card matches the counter_key provided
  • Blockbuster.Counters.get_counter_num(card) -> number
    • Will return the current increment of the given card's current counter. If no counter is present, it will give 0
  • Blockbuster.Counters.is_counter_of_class(card, counter_class_table) -> boolean
    • Checks if counter matches the qualities provided in the counter_class_table. Possible counter classes are provided on the Creating a New Counter page.
  • Blockbuster.Counters.get_counter_targets(table_of_cards, conditions, counter_type, counter_class_table) -> table
    • When provided with a table of cards, will provide a table of cards that match the given perimeters, as per the conditions table. If no conditions are provided, it will return every card without any counters. If the condition 'match' or 'no_match' are provided, it will be checked against the counter_type if possible. if 'match_class' or 'no_match_class' are given, it will check against the table of classes in counter_class_table

Clone this wiki locally