|
CardGame
Rogue-like card videogame
|
Represents a runtime instance of a card during combat. More...
#include <cardInstance.h>
Public Member Functions | |
| CardInstance (const CardDefinition &definition) | |
| Constructs a CardInstance from a CardDefinition. | |
| int | getDamage () const |
| Returns the card's current damage value. | |
| int | getArmor () const |
| Returns the card's current armor value. | |
| const CardDefinition & | getCardDefinition () const |
| Returns the immutable definition this instance was created from. | |
| const CardParams & | getCardParams () const |
Represents a runtime instance of a card during combat.
CardInstance holds temporary state used in a single combat:
Used for tracking temporary buffs, debuffs, or cost changes. CardInstances are created at combat start and destroyed at combat end.
| CardInstance::CardInstance | ( | const CardDefinition & | definition | ) |
Constructs a CardInstance from a CardDefinition.
Copies base values (damage, armor, cost) from the definition.
| definition | Immutable reference to the source CardDefinition. |
|
inline |
Returns the card's current armor value.
| const CardDefinition & CardInstance::getCardDefinition | ( | ) | const |
Returns the immutable definition this instance was created from.
Used for name, ID, effect list, and base values.
| const CardParams & CardInstance::getCardParams | ( | ) | const |
|
inline |
Returns the card's current damage value.