CardRPG 1.0
 
Loading...
Searching...
No Matches
CardRPG.Polymorph Class Reference

A polymorph is a type of dueler that can transform into other characters. More...

Inheritance diagram for CardRPG.Polymorph:
CardRPG.Henchman CardRPG.Dueler

Public Member Functions

override IEnumerator SelectCardandTarget (Action< int, List< Dueler >, List< int >, int > callback=null, bool noPass=false)
 Selects a card and target using AI logic.
 
override object Clone ()
 
- Public Member Functions inherited from CardRPG.Dueler
int ElementPip (int element)
 
void OnEnable ()
 Called automatically when the ScriptableObject is created or enabled in the editor. Ensures all fields are properly initialized.
 
virtual void InitializeDeck ()
 Initializes the deck and hand for the dueler, shuffling the deck.
 
void TriggerRoundStart (int roundNumber)
 Triggers the start of a round, reducing taunt and pacify durations and invoking the round start event.
 
void TriggerRoundEnd (int roundNumber)
 Triggers the end of a round, reducing status effect durations, invoking the round end event, and resolving pips.
 
void DrawCards (int count)
 Draws a specified number of cards from the deck to the hand, up to the maximum hand size.
 
bool IsAlive ()
 Checks if the dueler is alive (health > 0).
 
bool HasElement (int element)
 Checks if the dueler has the specified element.
 
int GetPipCount (int element)
 Gets the total pip count for a given element, considering power pips.
 
void AddPip (int n)
 Adds regular pips to the dueler.
 
void AddPowerPip (int n)
 Adds power pips to the dueler.
 
void AddElementalPip (int element, int n)
 
void RemovePip (int n)
 Removes pips from the dueler, converting power pips to regular pips if needed.
 
virtual bool CanPlayCard (Card card)
 Checks if the dueler can play the specified card based on pip cost.
 
virtual IEnumerator PlayCard (int handIndex, List< Dueler > selectedTargets, List< int > subCardIndex, int enchantCardIndex=-1)
 Plays the card from the hands.
 
IEnumerator UseCard (Card card, List< Dueler > selectedTargets)
 Uses the specified card, applying its logic to the selected targets.
 
void ResolvePips ()
 Resolves pip gain at the end of the round, increasing the pip or power pip count as appropriate.
 
virtual IEnumerator Damage (int damage, int element, Action< int > callback=null, int pierce=0)
 Applies damage to the dueler, considering wards, defense, and triggers.
 
IEnumerator Heal (int healAmount)
 Heals the dueler by the specified amount, considering incoming heal modifiers.
 
IEnumerator ApplyArua (Arua arua)
 Applies an aura to the dueler.
 
void AddCardToDeck (Card card)
 Adds a card to the dueler's deck.
 
void AddCardToHand (Card card)
 Adds a card to the dueler's hand.
 
void Cleanup ()
 Cleans up all effects, resets status counters, and removes event listeners.
 
override string ToString ()
 Returns a string representation of the dueler's health.
 

Additional Inherited Members

- Public Attributes inherited from CardRPG.Dueler
List< DuelerCardduelerCards
 List of DuelerCard objects representing the dueler's deck configuration.
 
DuelerEffectSlots duelerEffectSlots = new()
 
- Protected Member Functions inherited from CardRPG.Dueler
virtual void UsePips (Card card)
 Deducts pips and power pips based on the card's cost.
 
- Protected Attributes inherited from CardRPG.Dueler
Status status = new()
 
List< int > elements = new List<int>() { 0 }
 
int pips
 
int powerPips
 
int[] elementPip = new int[0]
 
int archmasteryElementFocus
 
- Properties inherited from CardRPG.Dueler
virtual Status Status [get]
 
virtual int CurrentHealth [get, set]
 Gets or sets the current health of the dueler.
 
List< CardDeck [get, set]
 The dueler's deck of cards.
 
List< CardHand [get, set]
 The dueler's hand of cards.
 
virtual List< int > Elements [get, set]
 Gets or sets the list of elements associated with the dueler.
 
int ArchmasteryElementFocus [get, set]
 
Minion Minion [get, set]
 Gets or sets the minion object associated with the dueler.
 
int StunRound [get, set]
 Gets or sets the stun round counter.
 
int BeguileRound [get, set]
 Gets or sets the beguile round counter.
 
int ConfuseRound [get, set]
 Gets or sets the confuse round counter.
 
int TauntRound [get, set]
 Gets or sets the taunt round counter.
 
int PacifyRound [get, set]
 Gets or sets the pacify round counter.
 
List< PassiveAbilityPassiveAbilities [get]
 
UnityEvent OnDuelStart = new() [get, set]
 Event triggered at the start of a duel.
 
Func< int, Dueler, IEnumerator > OnRoundStart [get, set]
 Event triggered at the start of a round.
 
UnityEvent< int > OnRoundEnd = new() [get, set]
 Event triggered at the end of a round.
 
Func< Card, Dueler, int, Action< int >, IEnumerator > OnPreCast [get, set]
 Event triggered before a card is played, allowing modify the accuracy.
 
Func< Card, CardOnCardPlayed = card => card [get, set]
 Event triggered when a card is played, allowing listeners to modify or replace the card before it is used. The event should return the (possibly modified) card to be used.
 
UnityEvent< CardOnPostCardPlayed = new() [get, set]
 Event triggered once spell is casted.
 
UnityEvent< Card, DuelerOnCardObserved = new() [get, set]
 Event triggered once spell is observed.
 
Func< float, int, int, Dueler, Action< float, int, int >, IEnumerator > OnDamage [get, set]
 Event triggered when the dueler takes damage.
 
UnityEvent< int > OnPostDamage = new() [get, set]
 Event triggered after the dueler takes damage.
 
UnityEvent< int > OnHeal = new() [get, set]
 Event triggered when the dueler is healed.
 
UnityEvent< int, int, int[]> OnPipChange = new() [get, set]
 Event triggered when the dueler's pip or power pip count changes.
 
UnityEvent< AruaOnAuraApply = new() [get, set]
 
UnityEvent< AruaOnAuraRemove = new() [get, set]
 
UnityEvent OnCleanUp = new() [get, set]
 Event triggered when the dueler is cleaned up.
 
Func< CardLogic, Dueler, Dueler, float, Action< float >, IEnumerator > OnCardLogic [get, set]
 Event triggered before a card logic is executed, allowing listeners to modify the base value. The event should be a coroutine and return the (possibly modified) base value via callback.
 

Detailed Description

A polymorph is a type of dueler that can transform into other characters.

Member Function Documentation

◆ Clone()

override object CardRPG.Polymorph.Clone ( )
inlinevirtual

Reimplemented from CardRPG.Henchman.

◆ SelectCardandTarget()

override IEnumerator CardRPG.Polymorph.SelectCardandTarget ( Action< int, List< Dueler >, List< int >, int > callback = null,
bool noPass = false )
inlinevirtual

Selects a card and target using AI logic.

Parameters
callbackCallback with selected targets.
noPassIf true, passing is not allowed.
Returns
Coroutine enumerator.

Reimplemented from CardRPG.Dueler.


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