|
CardGame
Rogue-like card videogame
|
Abstract base class for all card effects. More...
#include <effect.h>
Public Member Functions | |
| virtual void | resolve (CombatContext &combatContext, const CardParams &effectParams)=0 |
| Applies the effect during card resolution. | |
| virtual | ~Effect ()=default |
| Virtual destructor. | |
Abstract base class for all card effects.
Effects define behavior that is executed when a card is played. They do not store any numeric values or state — all values are read from the CardInstance.
Effects request actions from CardMatch, but never modify entity state directly.
All derived effects must implement the apply() method.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Applies the effect during card resolution.
| card_match | Reference to the combat authority managing the encounter. |
| card | The card instance triggering this effect. |
Implemented in DrawCardsEffect, GainActionsEffect, GainArmorEffect, GainAttackEffect, HostageCardEffect, and LimitCardToPlayEffect.