Skip to main content

Module cards

Module cards 

Source

Functions§

build_registry
Build a card registry from card definitions without validation
build_validated_registry
Build a card registry from card definitions with ruleset validation This validates that cards only reference keywords defined in the ruleset
card_has_keyword
Check if a card has a specific keyword
generate_ability_commands
Generate commands from a card’s abilities when an event matches a trigger
get_card
Get a card definition by ID
get_card_stat
Get a card’s stat value by key
get_card_stat_i32
Get a card’s stat as an integer
parse_card_stat_i32
Get a card’s stat as an integer, returning Result for better error handling

Type Aliases§

CardRegistry
Maps card IDs to their definitions for O(1) lookup during gameplay