ORK Framework  3.17.1
API Documentation
GamingIsLove.ORKFramework.Combatants.CombatantAbilities Class Reference
Inheritance diagram for GamingIsLove.ORKFramework.Combatants.CombatantAbilities:

Public Member Functions

 CombatantAbilities (Combatant owner)
 
void InitAttacks ()
 
void Clear ()
 
void ResetUseCounts (UseCountResetType resetType)
 Resets the use counts of all available abilities. Only abilities that use the 'Use Count' feature will be reset. More...
 
void ChangeUseCounts (int change, FloatOperator floatOperator)
 Changes the use counts of all available abilities. Only abilities that use the 'Use Count' feature will be changed. More...
 
void GroupAbilitiesChanged (Group group)
 
bool CheckDataChanged ()
 
void UpdateLists ()
 
void MarkAbilitiesChanged ()
 
void CheckAbilityChanges ()
 
virtual void UpdateAbilityLists ()
 
List< AbilityShortcutGetAll ()
 
void SetAbilities (List< AbilityShortcut > list)
 
void Add (AbilityShortcut ability)
 
void AddPreview (AbilityShortcut ability)
 
void Remove (string guid)
 
void Remove (AbilityShortcut ability)
 
void RemovePreview (AbilityShortcut ability)
 
void ResetEquipmentAttacks ()
 
AbilityShortcut GetCurrentBaseAttack ()
 Gets the current base attack ability. More...
 
AbilityShortcut GetBaseAttack (int index)
 Gets the base attack ability. More...
 
void GetBaseAttacks (ref List< AbilityShortcut > list)
 Adds all base attacks to the list. More...
 
void NextBaseAttack ()
 
void ResetBaseAttack ()
 
bool InAttackRange (Combatant target)
 
void TickBaseAttackTimeout (float battleTime)
 
AbilityShortcut GetCounterAttack ()
 Gets the counter attack ability. More...
 
bool UseCounter (Combatant target)
 
void GetStatusChanges (ref StatusPreviewInformation info)
 
void SetStartEffects ()
 Applies the auto status effects of passive abilities. More...
 
void RemoveStartEffects ()
 Removes the auto status effects of passive abilities. More...
 
bool CanApplyEffect (StatusEffectSetting effect)
 Checks the passive abilities if a status effect can be applied. More...
 
bool CanRemoveEffect (StatusEffectSetting effect)
 Checks the passive abilities if a status effect can be removed. More...
 
void UseAttackEffects (Combatant target, bool isBlocked, bool isCritical)
 
void UseDefenceEffects (Combatant target, bool isBlocked, bool isCritical)
 
bool IsAttackChangesBlocked ()
 
bool IsAbilityChangesBlocked (AbilityShortcut ability)
 
bool IsItemChangesBlocked (ItemShortcut item)
 
bool Forget (Ability ability, bool showNotification, bool showConsole)
 Forgets an ability. More...
 
bool Learn (Ability ability, int level, bool showNotification, bool showConsole)
 Learns an ability. More...
 
bool Learn (AbilityShortcut ability, bool showNotification, bool showConsole)
 Learns an ability. More...
 
virtual void ShowLearnNotifications (AbilityShortcut ability, bool showNotification, bool showConsole)
 
AbilityShortcut GetUseable (Ability ability)
 Gets a useable ability (not passive), searches in base attacks, counter attack and abilities. More...
 
List< AbilityShortcutGetAbilities (UseableIn useIn, IncludeCheckType addTemporary, bool addPassiveToggleable)
 Gets a list of abilities useable in a specified mode. More...
 
AbilityShortcut GetLearned (Ability ability)
 Gets a learned ability. More...
 
AbilityShortcut Get (string guid)
 Gets an ability by its GUID. More...
 
AbilityShortcut Get (Ability ability)
 Gets a known ability. More...
 
AbilityShortcut Get (Ability ability, int level)
 Gets a known ability and tries to set it's use level (only non-passive abilities). More...
 
AbilityShortcut Get (AbilityShortcut shortcut)
 Gets an ability matching a defined ability. More...
 
List< AbilityTypeGetTypes (bool addDevelopmentTypes, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary)
 
List< AbilityTypeGetTypes (AbilityType parentType, bool addDevelopmentTypes, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary)
 Gets a list of all available ability types. More...
 
List< AbilityTypeGetTypes (UseableIn useIn, IncludeCheckType addTemporary, bool addPassiveToggleable, AbilityType parentType, bool addDevelopmentTypes)
 
List< AbilityShortcutGetByType (bool checkParent, AbilityType type, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary)
 Gets a list of abilities by ability type. More...
 
void GetByType (bool checkParent, AbilityType type, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary, ref List< AbilityShortcut > list)
 
void GetByType (bool checkParent, AbilityType type, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary, ref List< IShortcut > list)
 
List< AbilityShortcutGetByType (AbilityType type, UseableIn useIn, IncludeCheckType addTemporary, bool addPassiveToggleable, bool checkParent)
 Gets a list of abilities by ability type useable in a specified mode. More...
 
bool HasTypes (bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary)
 
bool HasType (AbilityType type, UseableIn useIn, IncludeCheckType addTemporary, bool addPassiveToggleable)
 
bool HasType (AbilityType type, UseableIn useIn, IncludeCheckType addTemporary, bool addPassiveToggleable, CheckCombatantAbilityShortcut checkAbility)
 
bool CanGetUseExperience (AbilityShortcut ability)
 Determines whether the specified ability can receive experience. The ability has to be a base attack, counter attack or a learned ability to receive experience. More...
 
bool IsLearned (AbilityShortcut ability)
 Determines whether the specified ability has been learned. More...
 
bool HasLearned (Ability ability, int level)
 Determines whether the specified ability has been learned. More...
 
bool Has (AbilityShortcut shortcut)
 Determines whether the specified ability is available. More...
 
bool Has (Ability ability, int level)
 Determines whether the specified ability is available. More...
 
bool HasNewTypes (bool checkParent, List< AbilityType > types, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary)
 
bool HasType (bool checkParent, AbilityType type, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary, bool checkNewContent)
 Determines whether the specified ability type is available. More...
 
void AddTemporaryAbility (AbilityShortcut ability, RemoveTemporaryAbility remove)
 Adds a temporary ability More...
 
void RemoveTemporaryAbility (Ability ability)
 Removes a temporary ability. More...
 
void RemoveTemporaryAbility (AbilityShortcut ability)
 Removes a temporary ability. More...
 
void ClearTemporaryAbilities ()
 Removes all temporary abilities. More...
 
bool HasTemporary (Ability ability, int level)
 Determines wheter the specified temporary ability is available. More...
 
void AddEquipmentAbility (EquipShortcut equipment, EquipmentAbility equipAbility, int index)
 Adds an ability that is attached to an equipment. More...
 
void RemoveEquipmentAbility (EquipShortcut equipment, EquipmentAbility equipAbility)
 Removes an ability that is attached an equipment. More...
 
void ResetEquipmentAbilities ()
 Resets all equipment abilities. All abilities coming from equipments will be removed and the current equipment will be checked for abilities. More...
 
virtual void UpdateSingleClassAbilities ()
 Checks if the current class of the combatant has a class ability and adds it, if it's not yet added to the combatant. More...
 
virtual void AddClassAbility (AbilityShortcut ability)
 
virtual void RemoveClassAbility (AbilityShortcut ability)
 
DataObject SaveGame ()
 
void LoadGame (DataObject data)
 

Protected Member Functions

void AddToList (AbilityShortcut ability)
 
void RemoveFromList (AbilityShortcut ability)
 
void AutoAddShortcut (AbilityShortcut ability)
 
void CheckNewAbilityType (List< AbilityShortcut > list)
 
void CheckAddNew (AbilityShortcut ability)
 
void CreateAbilities (List< AbilityShortcut > list, UseableIn useIn)
 
AbilityShortcut GetBaseAttack (ref int index)
 
List< AbilityShortcutGetAbilities (List< AbilityShortcut > abilities, IncludeCheckType addTemporary, bool addPassiveToggleable)
 
bool CheckType (bool checkParent, AbilityType type, AbilityShortcut ability, IncludeCheckType addTemporary, bool checkNewContent)
 
EquipAbilityShortcut GetEquipmentAbility (EquipShortcut equipment, EquipmentAbility equipAbility)
 

Protected Attributes

Combatant owner
 
GUIDCollection< AbilityShortcutabilityList = new GUIDCollection<AbilityShortcut>()
 
AbilityShortcut [] attack
 
AbilityShortcut counter
 
List< AbilityShortcutequipAttack = new List<AbilityShortcut>()
 
AbilityShortcut equipCounter
 
List< AbilityShortcutpassive = new List<AbilityShortcut>()
 
List< AbilityShortcutboth = new List<AbilityShortcut>()
 
List< AbilityShortcutfield = new List<AbilityShortcut>()
 
List< AbilityShortcutbattle = new List<AbilityShortcut>()
 
bool abilitiesChanged = false
 
bool dataChanged = false
 
List< AbilityaddedAbilities = new List<Ability>()
 
List< AbilityTypenewAbilityTypes = new List<AbilityType>()
 
Ability lastAbility
 
int attackIndex = 0
 
float attackTimeout = -10
 

Properties

bool DataChanged [get, set]
 
Ability LastAbility [get, set]
 
int AttackIndex [get, set]
 
bool HasAbilities [get]
 Is true if any active or passive abilities are available. More...
 

Member Function Documentation

◆ AddEquipmentAbility()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.AddEquipmentAbility ( EquipShortcut  equipment,
EquipmentAbility  equipAbility,
int  index 
)

Adds an ability that is attached to an equipment.

Parameters
equipAbilityThe equipment ability.

◆ AddTemporaryAbility()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.AddTemporaryAbility ( AbilityShortcut  ability,
RemoveTemporaryAbility  remove 
)

Adds a temporary ability

◆ CanApplyEffect()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.CanApplyEffect ( StatusEffectSetting  effect)

Checks the passive abilities if a status effect can be applied.

Returns
true if the status effect can be applied; otherwise, false.
Parameters
effectThe status effect.

◆ CanGetUseExperience()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.CanGetUseExperience ( AbilityShortcut  ability)

Determines whether the specified ability can receive experience. The ability has to be a base attack, counter attack or a learned ability to receive experience.

Returns
true if the ability can receive experience; otherwise, false.
Parameters
abilityThe AbilityShortcut representing the ability.

◆ CanRemoveEffect()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.CanRemoveEffect ( StatusEffectSetting  effect)

Checks the passive abilities if a status effect can be removed.

Returns
true if the status effect can be removed; otherwise, false.
Parameters
effectThe status effect

◆ ChangeUseCounts()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.ChangeUseCounts ( int  change,
FloatOperator  floatOperator 
)

Changes the use counts of all available abilities. Only abilities that use the 'Use Count' feature will be changed.

Parameters
changeThe value by which the use count will be changed.
floatOperator

◆ ClearTemporaryAbilities()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.ClearTemporaryAbilities ( )

Removes all temporary abilities.

◆ Forget()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Forget ( Ability  ability,
bool  showNotification,
bool  showConsole 
)

Forgets an ability.

Parameters
abilityThe ability.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.
Returns
true if the ability was forgotten.

◆ Get() [1/4]

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Get ( string  guid)

Gets an ability by its GUID.

Parameters
guidThe GUID of the ability instance.
Returns
The ability connected to the GUID.

◆ Get() [2/4]

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Get ( Ability  ability)

Gets a known ability.

Returns
The ability if known, otherwise null.
Parameters
abilityThe ability.

◆ Get() [3/4]

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Get ( Ability  ability,
int  level 
)

Gets a known ability and tries to set it's use level (only non-passive abilities).

Returns
The ability if known, otherwise null.
Parameters
abilityThe ID (index) of the ability.
levelThe level that should be used.

◆ Get() [4/4]

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Get ( AbilityShortcut  shortcut)

Gets an ability matching a defined ability.

Parameters
shortcutThe AbilityShortcut to look for.

◆ GetAbilities()

List<AbilityShortcut> GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetAbilities ( UseableIn  useIn,
IncludeCheckType  addTemporary,
bool  addPassiveToggleable 
)

Gets a list of abilities useable in a specified mode.

Returns
The ability list.
Parameters
useInEither useable in Field, Battle, Both or None (passive abilities).

◆ GetBaseAttack()

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetBaseAttack ( int  index)

Gets the base attack ability.

Parameters
indexThe index of the base attack. Will be reset to 0 if outside of available attacks.
Returns
The base attack's as an AbilityShortcut.

◆ GetBaseAttacks()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetBaseAttacks ( ref List< AbilityShortcut list)

Adds all base attacks to the list.

Parameters
listThe list the base attacks will be added to.

◆ GetByType() [1/2]

List<AbilityShortcut> GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetByType ( bool  checkParent,
AbilityType  type,
bool  addAttacks,
bool  addCounters,
bool  addClass,
bool  addActive,
bool  addPassive,
IncludeCheckType  addTemporary 
)

Gets a list of abilities by ability type.

Returns
The list of abilities.
Parameters
typeThe ID (index) of the ability type to look for.
addAttackstrue to add base attack abilities.
addCounterstrue to add counter attack abilities.
addClasstrue to add class abilities.
addActivetrue to add active abilities.
addPassivetrue to add passive abilities.

◆ GetByType() [2/2]

List<AbilityShortcut> GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetByType ( AbilityType  type,
UseableIn  useIn,
IncludeCheckType  addTemporary,
bool  addPassiveToggleable,
bool  checkParent 
)

Gets a list of abilities by ability type useable in a specified mode.

Returns
The list of abilities.
Parameters
typeThe ID (index) of the ability type.
useInEither useable in Field, Battle, Both or None (passive abilities).

◆ GetCounterAttack()

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetCounterAttack ( )

Gets the counter attack ability.

Returns
The counter attack's ability.

◆ GetCurrentBaseAttack()

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetCurrentBaseAttack ( )

Gets the current base attack ability.

Returns
The current base attack as an AbilityShortcut.

◆ GetLearned()

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetLearned ( Ability  ability)

Gets a learned ability.

Returns
The ability if learned, otherwise null.
Parameters
abilityThe ability.

◆ GetTypes()

List<AbilityType> GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetTypes ( AbilityType  parentType,
bool  addDevelopmentTypes,
bool  addAttacks,
bool  addCounters,
bool  addClass,
bool  addActive,
bool  addPassive,
IncludeCheckType  addTemporary 
)

Gets a list of all available ability types.

Returns
The ability types as a list of integers (IDs of the types).

◆ GetUseable()

AbilityShortcut GamingIsLove.ORKFramework.Combatants.CombatantAbilities.GetUseable ( Ability  ability)

Gets a useable ability (not passive), searches in base attacks, counter attack and abilities.

Returns
The ability.
Parameters
abilityThe ability.

◆ Has() [1/2]

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Has ( AbilityShortcut  shortcut)

Determines whether the specified ability is available.

Returns
true if the ability is available; otherwise, false.
Parameters
shortcutThe AbilityShortcut representing the ability.

◆ Has() [2/2]

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Has ( Ability  ability,
int  level 
)

Determines whether the specified ability is available.

Returns
true if the ability is available; otherwise, false.
Parameters
abilityThe ability.
levelThe minimum level that has to be learned.

◆ HasLearned()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.HasLearned ( Ability  ability,
int  level 
)

Determines whether the specified ability has been learned.

Returns
true if the ability has been learned; otherwise, false.
Parameters
abilityThe ability.
levelThe minimum level that has to be learned.

◆ HasTemporary()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.HasTemporary ( Ability  ability,
int  level 
)

Determines wheter the specified temporary ability is available.

Parameters
abilityThe ability.
levelThe minimum level of the ability.
Returns

◆ HasType()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.HasType ( bool  checkParent,
AbilityType  type,
bool  addAttacks,
bool  addCounters,
bool  addClass,
bool  addActive,
bool  addPassive,
IncludeCheckType  addTemporary,
bool  checkNewContent 
)

Determines whether the specified ability type is available.

Returns
true if the ability type is available; otherwise, false.
Parameters
typeThe ID (index) of the ability type.

◆ IsLearned()

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.IsLearned ( AbilityShortcut  ability)

Determines whether the specified ability has been learned.

Returns
true if the ability has been learned; otherwise, false.
Parameters
abilityThe AbilityShortcut representing the ability.

◆ Learn() [1/2]

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Learn ( Ability  ability,
int  level,
bool  showNotification,
bool  showConsole 
)

Learns an ability.

Parameters
abilityThe ID/index of the ability.
levelThe level of the ability.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.
Returns
true if the ability was learned.

◆ Learn() [2/2]

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.Learn ( AbilityShortcut  ability,
bool  showNotification,
bool  showConsole 
)

Learns an ability.

Parameters
abilityThe ability that will be learned.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.
Returns
true if the ability was learned.

◆ RemoveEquipmentAbility()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.RemoveEquipmentAbility ( EquipShortcut  equipment,
EquipmentAbility  equipAbility 
)

Removes an ability that is attached an equipment.

Parameters
equipAbilityThe equipment ability.

◆ RemoveStartEffects()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.RemoveStartEffects ( )

Removes the auto status effects of passive abilities.

◆ RemoveTemporaryAbility() [1/2]

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.RemoveTemporaryAbility ( Ability  ability)

Removes a temporary ability.

Parameters
abilityThe ability that will be removed.

◆ RemoveTemporaryAbility() [2/2]

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.RemoveTemporaryAbility ( AbilityShortcut  ability)

Removes a temporary ability.

Parameters
abilityThe ability that will be removed.

◆ ResetEquipmentAbilities()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.ResetEquipmentAbilities ( )

Resets all equipment abilities. All abilities coming from equipments will be removed and the current equipment will be checked for abilities.

◆ ResetUseCounts()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.ResetUseCounts ( UseCountResetType  resetType)

Resets the use counts of all available abilities. Only abilities that use the 'Use Count' feature will be reset.

◆ SetStartEffects()

void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.SetStartEffects ( )

Applies the auto status effects of passive abilities.

◆ UpdateSingleClassAbilities()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAbilities.UpdateSingleClassAbilities ( )
virtual

Checks if the current class of the combatant has a class ability and adds it, if it's not yet added to the combatant.

Property Documentation

◆ HasAbilities

bool GamingIsLove.ORKFramework.Combatants.CombatantAbilities.HasAbilities
get

Is true if any active or passive abilities are available.