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

Public Member Functions

 CombatantAI (Combatant owner)
 
virtual void Init ()
 
virtual void Clear ()
 
virtual bool IsAITypeEquipped (AIType aiType, bool checkParent)
 
virtual void CheckSlots ()
 
virtual void CheckSlots (bool notifyChange)
 
virtual void NotifyStatusChanged ()
 Warning: for status effects needs to manually register to auto effect checks of a combatant More...
 
virtual void NotifyStatusChanged (Combatant combatant, int id, int id2, float change)
 
virtual void NotifyStatusChanged (Combatant combatant, int id, int id2)
 
virtual void NotifyStatusChanged (Combatant combatant)
 
virtual void NotifyStatusChanged (Combatant combatant, StatusValue statusValue, int change)
 
virtual void NotifyStatusChanged (Combatant combatant, StatusEffect effect)
 
virtual void NotifyStatusChanged (Combatant combatant, ClassShortcut instance)
 
virtual void AddAIBehaviourSlots (AIBehaviourSlotSetting[] slot)
 
virtual void RemoveAIBehaviourSlot (int slotIndex, bool toInventory)
 
virtual void RemoveAllAIBehaviourSlots (bool toInventory)
 
virtual bool IsAIBehaviourEquipped (AIBehaviour aiBehaviour)
 
virtual void EquipAIBehaviourAccess (AIBehaviour aiBehaviour, int slotIndex, bool toInventory, bool fromInventory, bool notifyChange)
 Equips an AI behaviour via the access handler. More...
 
virtual void EquipAIBehaviour (AIBehaviour aiBehaviour, int slotIndex, bool toInventory, bool fromInventory, bool notifyChange)
 Equips an AI behaviour. More...
 
virtual void UnequipAIBehaviour (AIBehaviourShortcut aiBehaviour, bool toInventory, bool notifyChange)
 Unequips an AI behaviour. More...
 
virtual void UnequipAIBehaviour (AIBehaviour aiBehaviour, bool toInventory, bool notifyChange)
 Unequips an AI behaviour. More...
 
virtual void UnequipAIBehaviourSlotAccess (int slotIndex, bool toInventory, bool notifyChange)
 Unequips an AI behaviour via the access handler. More...
 
virtual void UnequipAIBehaviourSlot (int slotIndex, bool toInventory, bool notifyChange)
 Unequips an AI behaviour. More...
 
virtual void AddAIRulesetSlots (AIRulesetSlotSetting[] slot)
 
virtual void RemoveAIRulesetSlot (int slotIndex, bool toInventory)
 
virtual void RemoveAllAIRulesetSlots (bool toInventory)
 
virtual bool IsAIRulesetEquipped (AIRuleset aiRuleset)
 
virtual void EquipAIRulesetAccess (AIRuleset aiRuleset, int slotIndex, bool toInventory, bool fromInventory, bool notifyChange)
 Equips an AI ruleset via the access handler. More...
 
virtual void EquipAIRuleset (AIRuleset aiRuleset, int slotIndex, bool toInventory, bool fromInventory, bool notifyChange)
 Equips an AI ruleset. More...
 
virtual void UnequipAIRuleset (AIRulesetShortcut aiRuleset, bool toInventory, bool notifyChange)
 Unequips an AI ruleset. More...
 
virtual void UnequipAIRuleset (AIRuleset aiRuleset, bool toInventory, bool notifyChange)
 Unequips an AI ruleset. More...
 
virtual void UnequipAIRulesetSlotAccess (int slotIndex, bool toInventory, bool notifyChange)
 Unequips an AI ruleset via the access handler. More...
 
virtual void UnequipAIRulesetSlot (int slotIndex, bool toInventory, bool notifyChange)
 Unequips an AI ruleset. More...
 
virtual bool SetActionTargets (BaseAction action, List< Combatant > preferredTargets, List< Combatant > allies, List< Combatant > enemies)
 
virtual bool CanUseAction (BaseAction action)
 
virtual bool CanUseAbility (AbilityShortcut ability)
 
virtual bool CanUseAttack ()
 
virtual bool CanUseCounterAttack ()
 
virtual bool CanUseItem (ItemShortcut item)
 
virtual void Tick (float battleTime)
 
virtual void TickDecisionTime (float battleTime, bool checkConditions)
 
virtual BaseAction GetAction (List< Combatant > allies, List< Combatant > enemies, bool checkTime, bool checkUseCosts)
 Gets a battle action based on the AI settings and BattleAI of the combatant. More...
 
virtual BaseAction GetNextQueuedAction ()
 
virtual BaseAction PeekNextQueuedAction ()
 
virtual BaseAction GetBattleAIOutcome (List< Combatant > allies, List< Combatant > enemies, bool checkTime, bool checkUseCosts)
 
virtual 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...
 
virtual DataObject SaveGame ()
 
virtual void LoadGame (DataObject data)
 

Protected Attributes

Combatant owner
 
AIBehaviourSlot [] aiBehaviourSlot = new AIBehaviourSlot[0]
 
AIRulesetSlot [] aiRulesetSlot = new AIRulesetSlot[0]
 
bool aiControlled = false
 
bool blocked = false
 
float decisionTime = 0
 
List< BaseActionactionQueue = new List<BaseAction>()
 
Combatant realTimeCounterTarget
 
float realTimeTimeout = 0
 

Properties

virtual bool AIControlled [get, set]
 Gets or sets whether the combatant is AI controlled (only for the player group). More...
 
virtual bool Blocked [get, set]
 Gets or sets whether the combatant's battle AI is blocked. More...
 
virtual float DecisionTime [get, set]
 Gets or sets the time for deciding an AI action. More...
 
virtual float RealTimeTimeout [get, set]
 Gets or sets the timeout between two AI actions in real time battles. More...
 
virtual Combatant RealTimeCounterTarget [get, set]
 Sets a combatant to be the target of a counter attack in 'Real Time' battles. More...
 
virtual AIBehaviourSlot [] AIBehaviourSlot [get, set]
 
virtual AIRulesetSlot [] AIRulesetSlot [get, set]
 
virtual List< BaseActionActionQueue [get]
 

Member Function Documentation

◆ ChangeMoveAI()

virtual bool GamingIsLove.ORKFramework.Combatants.CombatantAI.ChangeMoveAI ( )
virtual

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.

◆ EquipAIBehaviour()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.EquipAIBehaviour ( AIBehaviour  aiBehaviour,
int  slotIndex,
bool  toInventory,
bool  fromInventory,
bool  notifyChange 
)
virtual

Equips an AI behaviour.

Parameters
aiBehaviourThe AI behaviour.
slotIndexThe index of the AI behaviour slot.
toInventorytrue if the currently equipped AI behaviour should be returned to the inventory.
fromInventorytrue if the AI behaviour should be taken from the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ EquipAIBehaviourAccess()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.EquipAIBehaviourAccess ( AIBehaviour  aiBehaviour,
int  slotIndex,
bool  toInventory,
bool  fromInventory,
bool  notifyChange 
)
virtual

Equips an AI behaviour via the access handler.

Parameters
aiBehaviourThe AI behaviour.
slotIndexThe index of the AI behaviour slot.
toInventorytrue if the currently equipped AI behaviour should be returned to the inventory.
fromInventorytrue if the AI behaviour should be taken from the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ EquipAIRuleset()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.EquipAIRuleset ( AIRuleset  aiRuleset,
int  slotIndex,
bool  toInventory,
bool  fromInventory,
bool  notifyChange 
)
virtual

Equips an AI ruleset.

Parameters
aiRulesetThe AI ruleset.
slotIndexThe index of the AI behaviour slot.
toInventorytrue if the currently equipped AI ruleset should be returned to the inventory.
fromInventorytrue if the AI ruleset should be taken from the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ EquipAIRulesetAccess()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.EquipAIRulesetAccess ( AIRuleset  aiRuleset,
int  slotIndex,
bool  toInventory,
bool  fromInventory,
bool  notifyChange 
)
virtual

Equips an AI ruleset via the access handler.

Parameters
aiRulesetThe AI ruleset.
slotIndexThe index of the AI behaviour slot.
toInventorytrue if the currently equipped AI ruleset should be returned to the inventory.
fromInventorytrue if the AI ruleset should be taken from the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ GetAction()

virtual BaseAction GamingIsLove.ORKFramework.Combatants.CombatantAI.GetAction ( List< Combatant allies,
List< Combatant enemies,
bool  checkTime,
bool  checkUseCosts 
)
virtual

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.
checkTimetrue if actions should check for time consumption.
checkUseCoststrue if actions should check for use costs.

◆ NotifyStatusChanged()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.NotifyStatusChanged ( )
virtual

Warning: for status effects needs to manually register to auto effect checks of a combatant

Implements GamingIsLove.ORKFramework.IStatusChanged.

◆ UnequipAIBehaviour() [1/2]

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIBehaviour ( AIBehaviourShortcut  aiBehaviour,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI behaviour.

Parameters
aiBehaviourThe AI behaviour.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ UnequipAIBehaviour() [2/2]

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIBehaviour ( AIBehaviour  aiBehaviour,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI behaviour.

Parameters
aiBehaviourThe AI behaviour.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ UnequipAIBehaviourSlot()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIBehaviourSlot ( int  slotIndex,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI behaviour.

Parameters
slotIndexThe index of the AI behaviour slot.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ UnequipAIBehaviourSlotAccess()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIBehaviourSlotAccess ( int  slotIndex,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI behaviour via the access handler.

Parameters
slotIndexThe index of the AI behaviour slot.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ UnequipAIRuleset() [1/2]

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIRuleset ( AIRulesetShortcut  aiRuleset,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI ruleset.

Parameters
userThe user combatant.
aiRulesetThe AI ruleset.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ UnequipAIRuleset() [2/2]

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIRuleset ( AIRuleset  aiRuleset,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI ruleset.

Parameters
userThe user combatant.
aiRulesetThe AI ruleset.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ UnequipAIRulesetSlot()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIRulesetSlot ( int  slotIndex,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI ruleset.

Parameters
slotIndexThe index of the AI ruleset slot.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

◆ UnequipAIRulesetSlotAccess()

virtual void GamingIsLove.ORKFramework.Combatants.CombatantAI.UnequipAIRulesetSlotAccess ( int  slotIndex,
bool  toInventory,
bool  notifyChange 
)
virtual

Unequips an AI ruleset via the access handler.

Parameters
slotIndexThe index of the AI ruleset slot.
toInventorytrue if it should be returned to the inventory.
notifyChangetrue if the listeners should be notified of the change.

Property Documentation

◆ AIControlled

virtual bool GamingIsLove.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.

◆ Blocked

virtual bool GamingIsLove.ORKFramework.Combatants.CombatantAI.Blocked
getset

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

true if blocked; otherwise, false.

◆ DecisionTime

virtual float GamingIsLove.ORKFramework.Combatants.CombatantAI.DecisionTime
getset

Gets or sets the time for deciding an AI action.

The AI decision time that will be used.

◆ RealTimeCounterTarget

virtual Combatant GamingIsLove.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.

◆ RealTimeTimeout

virtual float GamingIsLove.ORKFramework.Combatants.CombatantAI.RealTimeTimeout
getset

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

The timeout that will be used.