ORK Framework  2.25.2
API Documentation
ORKFramework.Combatants.CombatantAbilities Class Reference
Inheritance diagram for ORKFramework.Combatants.CombatantAbilities:
ORKFramework.ISaveData

Public Member Functions

 CombatantAbilities (Combatant owner)
 
void FireChanged ()
 
void GroupAbilitiesChanged (Group group)
 
void UpdateLists ()
 
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)
 Gets the status changes from passive abilities. More...
 
void SetStartEffects ()
 Applies the auto status effects of passive abilities. More...
 
void RemoveStartEffects ()
 Removes the auto status effects of passive abilities. More...
 
bool CanApplyEffect (int effectID)
 Checks the passive abilities if a status effect can be applied. More...
 
bool CanRemoveEffect (int effectID)
 Checks the passive abilities if a status effect can be removed. More...
 
void UseAttackEffects (Combatant target)
 
void UseDefenceEffects (Combatant target)
 
bool Forget (int id, bool showNotification, bool showConsole)
 Forgets an ability. More...
 
bool Learn (int id, int level, bool showNotification, bool showConsole)
 Learns an ability. More...
 
bool Learn (AbilityShortcut ability, bool showNotification, bool showConsole)
 Learns an ability. More...
 
AbilityShortcut GetUseable (int abilityID)
 Gets a useable ability (not passive), searches in base attacks, counter attack and abilities. More...
 
List< AbilityShortcutGetAbilities (UseableIn useIn, IncludeCheckType addTemporary)
 Gets a list of abilities useable in a specified mode. More...
 
AbilityShortcut GetLearned (int id)
 Gets a learned ability. More...
 
AbilityShortcut Get (int id)
 Gets a known ability. More...
 
AbilityShortcut Get (int id, 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< int > GetTypes (int 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< int > GetTypes (UseableIn useIn, IncludeCheckType addTemporary, int parentType, bool addDevelopmentTypes)
 Gets a list of all available ability types useable in a specified mode. More...
 
List< AbilityShortcutGetByType (bool checkParent, int typeID, 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, int typeID, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary, ref List< AbilityShortcut > list)
 
List< AbilityShortcutGetByType (int typeID, UseableIn useIn, IncludeCheckType addTemporary, bool checkParent)
 Gets a list of abilities by ability type useable in a specified mode. More...
 
bool HasType (int typeID, UseableIn useIn, IncludeCheckType addTemporary)
 
bool CanGetUseExperience (AbilityShortcut ab)
 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 ab)
 Determines whether the specified ability has been learned. More...
 
bool HasLearned (int id, 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 (int id, int level)
 Determines whether the specified ability is available. More...
 
bool HasNewTypes (bool checkParent, List< int > types, bool addAttacks, bool addCounters, bool addClass, bool addActive, bool addPassive, IncludeCheckType addTemporary)
 
bool HasType (bool checkParent, int typeID, 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 (int abilityID, int level, EndAfter removeAfter, float time)
 Adds a temporary ability. If the same ability (ID) is already added as temporary ability, the higher level version will be used. More...
 
void AddTemporaryAbility (AbilityShortcut ability, EndAfter removeAfter, float time)
 Adds a temporary ability. If the same ability (ID) is already added as temporary ability, the higher level version will be used. More...
 
void RemoveTemporaryAbility (int abilityID)
 Removes a temporary ability. More...
 
void ClearTemporaryAbilities ()
 Removes all temporary abilities. More...
 
bool HasTemporary (int abilityID, 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...
 
void UpdateClassAbility ()
 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...
 
bool HasClassAbility ()
 Determines whether the class ability of the combatant's current class is available. More...
 
AbilityShortcut GetClassAbility ()
 Gets the class ability. More...
 
bool LearnTree (int abilityTreeID, bool showConsole)
 Learns an ability tree. More...
 
void ForgetTree (int abilityTreeID, bool showConsole)
 Forgets an ability tree. More...
 
bool HasTree (bool checkParent, int abilityTreeID, bool checkNewContent)
 Determines whether the combatant has learned an ability tree. More...
 
List< int > GetTrees (int parentTree)
 Gets a list of learned ability trees. More...
 
bool UnmarkNewTree (int treeID)
 
DataObject SaveGame ()
 Used to save the data - you need to add the data to a ORKFramework.DataObject. More...
 
void LoadGame (DataObject data)
 Used to load the data - you need to get the data from the ORKFramework.DataObject. More...
 

Properties

CombatantChanged AbilitiesChanged
 
bool DataChanged [get, set]
 
bool TreeDataChanged [get, set]
 
int LastAbilityID [get, set]
 
int AttackIndex [get, set]
 
bool HasAbilities [get]
 Is true if any active or passive abilities are available. More...
 
bool HasTrees [get]
 Is true if any ability trees are available. More...
 

Member Function Documentation

◆ AddEquipmentAbility()

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

Adds an ability that is attached to an equipment.

Parameters
equipAbilityThe equipment ability.

◆ AddTemporaryAbility() [1/2]

void ORKFramework.Combatants.CombatantAbilities.AddTemporaryAbility ( int  abilityID,
int  level,
EndAfter  removeAfter,
float  time 
)

Adds a temporary ability. If the same ability (ID) is already added as temporary ability, the higher level version will be used.

Parameters
abilityIDThe ID of the ability that will be added.
levelThe level of the ability that will be added.

◆ AddTemporaryAbility() [2/2]

void ORKFramework.Combatants.CombatantAbilities.AddTemporaryAbility ( AbilityShortcut  ability,
EndAfter  removeAfter,
float  time 
)

Adds a temporary ability. If the same ability (ID) is already added as temporary ability, the higher level version will be used.

Parameters
abilityThe ability that will be added.
levelThe level of the ability that will be added.

◆ CanApplyEffect()

bool ORKFramework.Combatants.CombatantAbilities.CanApplyEffect ( int  effectID)

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

Returns
true if the status effect can be applied; otherwise, false.
Parameters
effectIDThe ID (index) of the status effect.

◆ CanGetUseExperience()

bool ORKFramework.Combatants.CombatantAbilities.CanGetUseExperience ( AbilityShortcut  ab)

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
abThe AbilityShortcut representing the ability.

◆ CanRemoveEffect()

bool ORKFramework.Combatants.CombatantAbilities.CanRemoveEffect ( int  effectID)

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

Returns
true if the status effect can be removed; otherwise, false.
Parameters
effectIDThe ID (index) of the status effect

◆ ClearTemporaryAbilities()

void ORKFramework.Combatants.CombatantAbilities.ClearTemporaryAbilities ( )

Removes all temporary abilities.

◆ Forget()

bool ORKFramework.Combatants.CombatantAbilities.Forget ( int  id,
bool  showNotification,
bool  showConsole 
)

Forgets an ability.

Parameters
idThe ID (index) of the ability.
showNotificationtrue to display popup notifications.
showConsoletrue to display in the console.

◆ ForgetTree()

void ORKFramework.Combatants.CombatantAbilities.ForgetTree ( int  abilityTreeID,
bool  showConsole 
)

Forgets an ability tree.

Parameters
abilityTreeIDThe ID (index) of the ability tree.
showConsoletrue to show learning the ability tree in the console.

◆ Get() [1/3]

AbilityShortcut ORKFramework.Combatants.CombatantAbilities.Get ( int  id)

Gets a known ability.

Returns
The ability if known, otherwise null.
Parameters
idThe ID (index) of the ability.

◆ Get() [2/3]

AbilityShortcut ORKFramework.Combatants.CombatantAbilities.Get ( int  id,
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
idThe ID (index) of the ability.
levelThe level that should be used.

◆ Get() [3/3]

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

Gets an ability matching a defined ability.

Parameters
shortcutThe AbilityShortcut to look for.

◆ GetAbilities()

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

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 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 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> ORKFramework.Combatants.CombatantAbilities.GetByType ( bool  checkParent,
int  typeID,
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
typeIDThe 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> ORKFramework.Combatants.CombatantAbilities.GetByType ( int  typeID,
UseableIn  useIn,
IncludeCheckType  addTemporary,
bool  checkParent 
)

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

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

◆ GetClassAbility()

AbilityShortcut ORKFramework.Combatants.CombatantAbilities.GetClassAbility ( )

Gets the class ability.

Returns
The class ability (if available); otherwise null.

◆ GetCounterAttack()

AbilityShortcut ORKFramework.Combatants.CombatantAbilities.GetCounterAttack ( )

Gets the counter attack ability.

Returns
The counter attack's ability.

◆ GetCurrentBaseAttack()

AbilityShortcut ORKFramework.Combatants.CombatantAbilities.GetCurrentBaseAttack ( )

Gets the current base attack ability.

Returns
The current base attack as an AbilityShortcut.

◆ GetLearned()

AbilityShortcut ORKFramework.Combatants.CombatantAbilities.GetLearned ( int  id)

Gets a learned ability.

Returns
The ability if learned, otherwise null.
Parameters
idThe ID (index) of the ability.

◆ GetStatusChanges()

void ORKFramework.Combatants.CombatantAbilities.GetStatusChanges ( ref StatusPreviewInformation  info)

Gets the status changes from passive abilities.

Parameters
statusThe status value changes (absolute).
statusPercentThe status value changes (percent).
chanceThe chance changes.
atkBonusAttack attribute bonuses.
defBonusDefence attribute bonuses.

◆ GetTrees()

List<int> ORKFramework.Combatants.CombatantAbilities.GetTrees ( int  parentTree)

Gets a list of learned ability trees.

Returns
The list of ability trees. The ability trees are represented by their ID (index).

◆ GetTypes() [1/2]

List<int> ORKFramework.Combatants.CombatantAbilities.GetTypes ( int  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).

◆ GetTypes() [2/2]

List<int> ORKFramework.Combatants.CombatantAbilities.GetTypes ( UseableIn  useIn,
IncludeCheckType  addTemporary,
int  parentType,
bool  addDevelopmentTypes 
)

Gets a list of all available ability types useable in a specified mode.

Returns
The ability types as a list of integers (IDs of the types).
Parameters
useInEither useable in Field, Battle, Both or None (passive abilities).

◆ GetUseable()

AbilityShortcut ORKFramework.Combatants.CombatantAbilities.GetUseable ( int  abilityID)

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

Returns
The ability.
Parameters
abilityIDThe ID (index) of the ability.

◆ Has() [1/2]

bool 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 ORKFramework.Combatants.CombatantAbilities.Has ( int  id,
int  level 
)

Determines whether the specified ability is available.

Returns
true if the ability is available; otherwise, false.
Parameters
idThe ID (index) of the ability.
levelThe minimum level that has to be learned.

◆ HasClassAbility()

bool ORKFramework.Combatants.CombatantAbilities.HasClassAbility ( )

Determines whether the class ability of the combatant's current class is available.

Returns
true if the class ability is available; otherwise, false.

◆ HasLearned()

bool ORKFramework.Combatants.CombatantAbilities.HasLearned ( int  id,
int  level 
)

Determines whether the specified ability has been learned.

Returns
true if the ability has been learned; otherwise, false.
Parameters
idThe ID (index) of the ability.
levelThe minimum level that has to be learned.

◆ HasTemporary()

bool ORKFramework.Combatants.CombatantAbilities.HasTemporary ( int  abilityID,
int  level 
)

Determines wheter the specified temporary ability is available.

Parameters
abilityIDThe ID of the ability.
levelThe minimum level of the ability.
Returns

◆ HasTree()

bool ORKFramework.Combatants.CombatantAbilities.HasTree ( bool  checkParent,
int  abilityTreeID,
bool  checkNewContent 
)

Determines whether the combatant has learned an ability tree.

Returns
true if the ability tree has been learned; otherwise, false.
Parameters
abilityTreeIDThe ID (index) of the ability tree.

◆ HasType()

bool ORKFramework.Combatants.CombatantAbilities.HasType ( bool  checkParent,
int  typeID,
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
typeIDThe ID (index) of the ability type.

◆ IsLearned()

bool ORKFramework.Combatants.CombatantAbilities.IsLearned ( AbilityShortcut  ab)

Determines whether the specified ability has been learned.

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

◆ Learn() [1/2]

bool ORKFramework.Combatants.CombatantAbilities.Learn ( int  id,
int  level,
bool  showNotification,
bool  showConsole 
)

Learns an ability.

Parameters
idThe ID (index) of the ability.
levelThe level that will be learned
showNotificationtrue to display popup notifications.
showConsoletrue to display in the console.

◆ Learn() [2/2]

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

Learns an ability.

Parameters
abilityThe ability that will be learned.
showNotificationtrue to display popup notifications.
showConsoletrue to display in the console.

◆ LearnTree()

bool ORKFramework.Combatants.CombatantAbilities.LearnTree ( int  abilityTreeID,
bool  showConsole 
)

Learns an ability tree.

Returns
true if the ability tree has been learned; otherwise false.
Parameters
abilityTreeIDThe ID (index) of the ability tree.
showConsoletrue to show learning the ability tree in the console.

◆ LoadGame()

void ORKFramework.Combatants.CombatantAbilities.LoadGame ( DataObject  data)

Used to load the data - you need to get the data from the ORKFramework.DataObject.

Parameters
dataA ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

◆ RemoveEquipmentAbility()

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

Removes an ability that is attached an equipment.

Parameters
equipAbilityThe equipment ability.

◆ RemoveStartEffects()

void ORKFramework.Combatants.CombatantAbilities.RemoveStartEffects ( )

Removes the auto status effects of passive abilities.

◆ RemoveTemporaryAbility()

void ORKFramework.Combatants.CombatantAbilities.RemoveTemporaryAbility ( int  abilityID)

Removes a temporary ability.

Parameters
abilityIDThe ID of the ability that will be removed.

◆ ResetEquipmentAbilities()

void 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.

◆ SaveGame()

DataObject ORKFramework.Combatants.CombatantAbilities.SaveGame ( )

Used to save the data - you need to add the data to a ORKFramework.DataObject.

Returns
A ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

◆ SetStartEffects()

void ORKFramework.Combatants.CombatantAbilities.SetStartEffects ( )

Applies the auto status effects of passive abilities.

◆ UpdateClassAbility()

void ORKFramework.Combatants.CombatantAbilities.UpdateClassAbility ( )

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 ORKFramework.Combatants.CombatantAbilities.HasAbilities
get

Is true if any active or passive abilities are available.

◆ HasTrees

bool ORKFramework.Combatants.CombatantAbilities.HasTrees
get

Is true if any ability trees are available.