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

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

#include <gainAttackEffect.h>

Inheritance diagram for GainAttackEffect:
Collaboration diagram for GainAttackEffect:

Public Member Functions

 GainAttackEffect (Target target)
 Constructs the effect with a fixed logical target.
 
void resolve (CombatContext &combatContext, const CardParams &values) override
 Grants attack using CardParams::attack.
 
- 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 attack to a combat target.

GainAttackEffect 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

◆ GainAttackEffect()

GainAttackEffect::GainAttackEffect ( Target  target)
inline

Constructs the effect with a fixed logical target.

Parameters
targetLogical target selector (Self or Opponent).

Member Function Documentation

◆ resolve()

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

Grants attack using CardParams::attack.

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

Implements Effect.


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