CardRPG 1.0
 
Loading...
Searching...
No Matches
CardRPG.CardLogic Class Referenceabstract

Abstract base class for card logic. Handles the application of card effects, targeting, and AI logic. More...

Inheritance diagram for CardRPG.CardLogic:
CardRPG.ActivateLogic CardRPG.AddPipLogic CardRPG.AruaLogic CardRPG.BeguileLogic CardRPG.CharmLogic CardRPG.ConfuseLogic CardRPG.CreateCardLogic CardRPG.DamageBonusLogic CardRPG.DamageLogic CardRPG.DetonateLogic CardRPG.DrawCardLogic CardRPG.GlobalLogic CardRPG.HealLogic CardRPG.MinionLogic CardRPG.PacifyLogic CardRPG.PushLogic CardRPG.RemoveLogic CardRPG.SetPipLogic CardRPG.StealLogic CardRPG.StunLogic CardRPG.SwapLogic CardRPG.TauntLogic CardRPG.WardLogic

Public Member Functions

void AddValue (int n)
 
int GetElement (Dueler caster, Dueler enemy)
 Gets the element to use for this logic, based on the matcher type.
 
bool SatisfyCondition (Dueler caster, Dueler target)
 Checks if the card condition is satisfied for the given caster and target.
 
int RepeatCount (Dueler caster, Dueler target)
 Gets the number of times to repeat the logic for the given caster and target.
 
List< DuelerGetTargets (List< Dueler > targets, List< Dueler > allTargets)
 Determines the list of targets for this logic based on the allEnemy flag.
 
IEnumerator MainLogic (Dueler caster, Dueler target, Dueler originalTarget, float value)
 The main logic to apply to a single target.
 
bool AILogic (Dueler caster, Dueler target)
 AI logic for determining if this logic should be used on the given target.
 
Dueler AISelect (Dueler caster, List< Dueler > targets)
 AI logic for selecting the best target for this logic.
 

Properties

int MinValue [get]
 Minimum value for the effect (e.g., damage or heal).
 
int MaxValue [get]
 Maximum value for the effect (e.g., damage or heal).
 
bool PerPip [get]
 If true, effect value is multiplied by the number of pips.
 
bool AllEnemy [get]
 If true, applies to all enemies.
 
bool Self [get]
 If true, applies effect to self.
 
CardCondition CardCondition [get]
 The condition that must be satisfied for this logic to apply.
 
RepeatCondition RepeatCondition [get]
 The repeat condition for this logic.
 
virtual bool CanCrit [get]
 
Card Card [get, set]
 The card this logic belongs to.
 
virtual int DamageAmount [get]
 

Detailed Description

Abstract base class for card logic. Handles the application of card effects, targeting, and AI logic.

Member Function Documentation

◆ AILogic()

bool CardRPG.CardLogic.AILogic ( Dueler caster,
Dueler target )
abstract

AI logic for determining if this logic should be used on the given target.

Parameters
casterThe dueler casting the card.
targetThe target dueler.
Returns
True if the AI should use this logic, otherwise false.

◆ AISelect()

Dueler CardRPG.CardLogic.AISelect ( Dueler caster,
List< Dueler > targets )
abstract

AI logic for selecting the best target for this logic.

Parameters
casterThe dueler casting the card.
targetsThe list of possible targets.
Returns
The selected target dueler.

◆ GetElement()

int CardRPG.CardLogic.GetElement ( Dueler caster,
Dueler enemy )
inline

Gets the element to use for this logic, based on the matcher type.

Parameters
casterThe dueler casting the card.
enemyThe target dueler.
Returns
The element value.

◆ GetTargets()

List< Dueler > CardRPG.CardLogic.GetTargets ( List< Dueler > targets,
List< Dueler > allTargets )
inline

Determines the list of targets for this logic based on the allEnemy flag.

Parameters
casterThe dueler casting the card.
targetsThe selected targets.
allTargetsAll possible targets.
Returns
The list of duelers to apply the logic to.

◆ MainLogic()

IEnumerator CardRPG.CardLogic.MainLogic ( Dueler caster,
Dueler target,
Dueler originalTarget,
float value )
abstract

The main logic to apply to a single target.

Parameters
casterThe dueler casting the card.
targetThe target dueler.
valueThe value to use (e.g., damage or heal amount).
Returns
Coroutine enumerator.

◆ RepeatCount()

int CardRPG.CardLogic.RepeatCount ( Dueler caster,
Dueler target )
inline

Gets the number of times to repeat the logic for the given caster and target.

Parameters
casterThe dueler casting the card.
targetThe target dueler.
Returns
The repeat count.

◆ SatisfyCondition()

bool CardRPG.CardLogic.SatisfyCondition ( Dueler caster,
Dueler target )
inline

Checks if the card condition is satisfied for the given caster and target.

Parameters
casterThe dueler casting the card.
targetThe target dueler.
Returns
True if the condition is satisfied, otherwise false.

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