ORK Framework  2.24.0
API Documentation
ORKFramework.Combatants.CombatantAI Class Reference
Inheritance diagram for ORKFramework.Combatants.CombatantAI:
ORKFramework.ISaveData ORKFramework.IStatusChanged

Public Member Functions

 CombatantAI (Combatant owner)
 
void Init ()
 
void Clear ()
 
bool IsAITypeEquipped (int aiTypeID, bool checkParent)
 
void FireChanged ()
 
void CheckSlots ()
 
void AttackAttributeChanged (Combatant c, int id, int id2, float change)
 
void DefenceAttributeChanged (Combatant c, int id, int id2, float change)
 
void DefenceAttributeIDChanged (Combatant c, int id, int id2)
 
void StatusValueChanged (Combatant c, int id, int change)
 
void StatusEffectChanged (Combatant c, int id)
 
void LevelChanged (Combatant c, int id)
 
void ClassLevelChanged (Combatant c, int id)
 
void ClassChanged (Combatant c, int id)
 
void AbilitiesChanged (Combatant c)
 
void EquipmentChanged (Combatant c)
 
void CombatantGroupChanged (Combatant combatant)
 
void CombatantInventoryChanged (Combatant combatant)
 
void CombatantBattleStateChanged (Combatant combatant)
 
void CombatantActionStateChanged (Combatant combatant)
 
void CombatantCastingStateChanged (Combatant combatant)
 
void CombatantChoosingStateChanged (Combatant combatant)
 
void CombatantTurnStateChanged (Combatant combatant)
 
void CombatantGridMoveRangeChanged (Combatant combatant)
 
void CombatantResearchChanged (Combatant combatant)
 
void CombatantAIChanged (Combatant combatant)
 
void CombatantActionBarChanged (Combatant combatant)
 
void CombatantDeathStateChanged (Combatant combatant)
 
void AddAIBehaviourSlots (AIBehaviourSlotSetting[] slot)
 
void RemoveAIBehaviourSlot (int slotIndex, bool collect)
 
void RemoveAllAIBehaviourSlots (bool collect)
 
bool IsAIBehaviourEquipped (int aiBehaviourID)
 
void EquipAIBehaviour (int aiBehaviourID, int slotIndex, bool collect, bool fromCollection, bool notify)
 
void UnequipAIBehaviourID (int aiBehaviourID, bool collect, bool notify)
 
void UnequipAIBehaviour (int slotIndex, bool collect, bool notify)
 
void AddAIRulesetSlots (AIRulesetSlotSetting[] slot)
 
void RemoveAIRulesetSlot (int slotIndex, bool collect)
 
void RemoveAllAIRulesetSlots (bool collect)
 
bool IsAIRulesetEquipped (int aiRulesetID)
 
void EquipAIRuleset (int aiRulesetID, int slotIndex, bool collect, bool fromCollection, bool notify)
 
void UnequipAIRulesetID (int aiRulesetID, bool collect, bool notify)
 
void UnequipAIRuleset (int slotIndex, bool collect, bool notify)
 
bool SetActionTargets (BaseAction action, List< Combatant > preferredTargets, List< Combatant > allies, List< Combatant > enemies)
 
bool CanUseAction (BaseAction action)
 
bool CanUseAbility (int abilityID)
 
bool CanUseAttack ()
 
bool CanUseCounterAttack ()
 
bool CanUseItem (int itemID)
 
void Tick (float battleTime)
 
void TickDecisionTime (float battleTime, bool checkConditions)
 
BaseAction GetAction (List< Combatant > allies, List< Combatant > enemies)
 Gets a battle action based on the AI settings and BattleAI of the combatant. More...
 
bool ChangeMoveAI ()
 Changes the used move AI and use mode of the combatant based on equipped AI rulesets and AI behaviours (in that order). The first found change will be used. More...
 
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 Changed
 
bool AIControlled [get, set]
 Gets or sets whether the combatant is AI controlled (only for the player group). More...
 
bool Blocked [get, set]
 Gets or sets whether the combatant's battle AI is blocked. More...
 
float DecisionTime [get, set]
 Gets or sets the time for deciding an AI action. More...
 
float RealTimeTimeout [get, set]
 Gets or sets the timeout between two AI actions in real time battles. More...
 
Combatant RealTimeCounterTarget [get, set]
 Sets a combatant to be the target of a counter attack in 'Real Time' battles. More...
 
AIBehaviourSlot[] AIBehaviourSlot [get]
 
AIRulesetSlot[] AIRulesetSlot [get]
 

Member Function Documentation

bool ORKFramework.Combatants.CombatantAI.ChangeMoveAI ( )

Changes the used move AI and use mode of the combatant based on equipped AI rulesets and AI behaviours (in that order). The first found change will be used.

Returns
true if the move AI was changed.
BaseAction ORKFramework.Combatants.CombatantAI.GetAction ( List< Combatant allies,
List< Combatant enemies 
)

Gets a battle action based on the AI settings and BattleAI of the combatant.

Returns
The selected battle action.
Parameters
alliesA list of combatants allied to the combatant.
enemiesA list of combatants who are enemies of the combatant.
void ORKFramework.Combatants.CombatantAI.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.

DataObject ORKFramework.Combatants.CombatantAI.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.

Property Documentation

bool ORKFramework.Combatants.CombatantAI.AIControlled
getset

Gets or sets whether the combatant is AI controlled (only for the player group).

true if AI controlled; otherwise, false.

bool ORKFramework.Combatants.CombatantAI.Blocked
getset

Gets or sets whether the combatant's battle AI is blocked.

true if blocked; otherwise, false.

float ORKFramework.Combatants.CombatantAI.DecisionTime
getset

Gets or sets the time for deciding an AI action.

The AI decision time that will be used.

Combatant ORKFramework.Combatants.CombatantAI.RealTimeCounterTarget
getset

Sets a combatant to be the target of a counter attack in 'Real Time' battles.

The combatant that will be used as target.

float ORKFramework.Combatants.CombatantAI.RealTimeTimeout
getset

Gets or sets the timeout between two AI actions in real time battles.

The timeout that will be used.