|
| | CardDefinition (std::string_view cardId, std::string_view cardName, std::string_view cardDescription, const CardParams &cardParams={}, std::vector< std::unique_ptr< Effect > > effectList={}, int baseCost=1) |
| | Constructs a new CardDefinition with provided base values and effects.
|
| |
| std::string_view | getName () const |
| | Returns the display name of the card.
|
| |
| std::string_view | getID () const |
| | Returns the internal ID of the card.
|
| |
| std::string_view | getDescription () const |
| |
| int | getBaseDamage () const |
| | Returns the base damage value defined for the card.
|
| |
| int | getBaseArmor () const |
| | Returns the base armor value defined for the card.
|
| |
| int | getBaseCost () const |
| | Returns the base energy cost to play the card.
|
| |
| const CardParams & | getCardParams () const |
| | Returns the parameters of the card.
|
| |
| const std::vector< std::unique_ptr< Effect > > & | getEffectList () const |
| | Returns a const reference to the list of effects.
|
| |
| | ~CardDefinition () |
| | Destructor (default).
|
| |
Immutable static data representing a card type.
CardDefinition defines the core identity and behavior of a card:
- Unique ID and display name
- Base damage, armor, and cost values
- Ordered list of effects to apply when the card is played
CardDefinitions are created once at startup and shared across all matches. They do not contain any runtime state or combat logic.
Effects are owned by the definition and used to build CardInstances at runtime.