CardGame
Rogue-like card videogame
Loading...
Searching...
No Matches
GainArmorEffect Class Reference

Effect that grants armor to a combat target. More...

#include <gainArmorEffect.h>

Inheritance diagram for GainArmorEffect:
Collaboration diagram for GainArmorEffect:

Public Member Functions

 GainArmorEffect (Target target)
 Constructs the effect with a fixed logical target.
 
void resolve (CombatContext &combatContext, const CardParams &values) override
 Grants armor using CardParams::armor.
 
- Public Member Functions inherited from Effect
virtual void resolve (CombatContext &combatContext, const CardParams &effectParams)=0
 Applies the effect during card resolution.
 
virtual ~Effect ()=default
 Virtual destructor.
 

Detailed Description

Effect that grants armor to a combat target.

GainArmorEffect reads the armor value from CardParams and grants it to either the actor or the opponent, depending on the configured Target.

The effect does not modify entity state directly; it requests the operation through CombatContext.

Constructor & Destructor Documentation

◆ GainArmorEffect()

GainArmorEffect::GainArmorEffect ( Target  target)
inline

Constructs the effect with a fixed logical target.

Parameters
targetLogical target selector (Self or Opponent).

Member Function Documentation

◆ resolve()

void GainArmorEffect::resolve ( CombatContext combatContext,
const CardParams values 
)
overridevirtual

Grants armor using CardParams::armor.

Parameters
combatContextCurrent combat execution context.
valuesNumeric parameters used during resolution.

Implements Effect.


The documentation for this class was generated from the following files: