ORK Framework  2.34.1
API Documentation
ORKFramework.Combatant Class Reference
Inheritance diagram for ORKFramework.Combatant:
ORKFramework.IGUID ORKFramework.ISaveData ORKFramework.IContent ORKFramework.IRenameable ORKFramework.IVariableSource ORKFramework.IPortraitContent ORKFramework.ICustomTextCodes ORKFramework.IContentSimple

Public Member Functions

 Combatant (DataObject data, bool loadPosition, Group group)
 
override string ToString ()
 
bool IsPlayerControlled ()
 Determines whether this combatant is player controlled (i.e. part of the player group). More...
 
bool IsAIControlled ()
 Determines whether this combatant is AI controlled, i.e. either not part of the player group or an AI controlled player group member. More...
 
bool IsEnemy (Combatant combatant)
 Determines whether this combatant is an enemy the specified combatant. More...
 
float GetInventoryLimit ()
 Gets the inventory limit. More...
 
void FireChanged ()
 Notifies all event listeners that something changed. More...
 
void FireChanged (bool markUIChanged)
 
void FireGroupChanged ()
 Notifies all group change listeners that the group changed. More...
 
void FireInventoryChanged ()
 Notifies all inventory change listeners that the inventory changed. More...
 
void FireVariablesChanged ()
 Notifies all variable change listeners that the combatant's object variables have. More...
 
void VariablesHaveChanged ()
 Called by VariableHandler when a variable changed. More...
 
string GetName ()
 
string GetShortName ()
 
string GetDescription ()
 
Texture GetIcon ()
 
GUIContent GetContent ()
 
string GetIconTextCode ()
 
string GetInfo (Combatant c)
 
IContentSimple GetTypeContent ()
 
IPortrait GetPortrait (int typeID)
 
void ReplaceCustomTextCodes (ref string text)
 
void FindBestiaryEntry ()
 
void BaseInit (CombatantSetting cs, int id, Group group, bool showNotification, bool showConsole, bool loadGame)
 Handles the basic initialization of the combatant. More...
 
void Init ()
 Initializes the combatant with the default start level, class level and class. Requires the combatant to be base initialized using the BaseInit function. More...
 
void Init (int level, int classLevel, int classID, bool loadGame, bool learnAbilities, bool useStartInventory, bool useStartEquipment, bool useInitEvent, bool useStatusEffects)
 Initialize the combatant with a defined level, class level and class. More...
 
void SetGroup (Group g)
 Sets the group of this combatant. More...
 
void ClearGroup ()
 
void ClearTargets ()
 
void CheckAggressive (AggressionType aggressionType, Combatant origin)
 Checks if the combatant's aggression state is changed due to an aggression of another combatant. Also causes the move AI to react to damage in case it's a damage aggression type. More...
 
void Tick (float time, float battleTime)
 
bool ControlMapTick ()
 
void ClearControlMaps ()
 
void GetLoot (Combatant looter, ref List< IShortcut > list, bool useAddType)
 
void GetBattleAnimation (BattleAnimationType type, ref List< BattleEvent > list)
 
bool GetAbilityAnimation (int abilityID, int abilityLevel, ref List< BattleEvent > list)
 
bool GetItemAnimation (int itemID, ref List< BattleEvent > list)
 
bool IsAnimateJoinBattle ()
 
bool IsLookAtJoinBattle ()
 
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

NotifyCombatant Changed
 
NotifyCombatant GroupChanged
 
NotifyCombatant InventoryChanged
 
NotifyCombatant VariablesChanged
 
NotifyCombatant AggressionStateChanged
 
string GUID [get, set]
 
string RenameableName [get, set]
 
string RenameableDescription [get, set]
 
string NameCount [get, set]
 
int ID [get]
 
int TypeID [get]
 
BestiaryEntry Bestiary [get, set]
 
bool HasGroup [get]
 
CombatantSetting Setting [get]
 
bool HasVariables [get]
 
VariableHandler Variables [get, set]
 
bool HasSelectedData [get]
 
SelectedDataHandler SelectedData [get, set]
 
int RealID [get, set]
 
Group Group [get]
 
FactionSetting Faction [get]
 
bool IsLeader [get]
 
bool IsTemporary [get, set]
 
GameObject GameObject [get, set]
 
CombatantClass Class [get]
 
CombatantStatus Status [get]
 
CombatantAbilities Abilities [get]
 
CombatantEquipment Equipment [get]
 
CombatantBattle Battle [get]
 
CombatantGrid Grid [get]
 
CombatantActions Actions [get]
 
CombatantShortcuts Shortcuts [get]
 
CombatantAI AI [get]
 
CombatantAnimations Animations [get]
 
CombatantObject Object [get]
 
CombatantUI UI [get]
 
ResearchHandler Research [get]
 
ConsoleHandler Console [get]
 
Inventory Inventory [get]
 
SelectedTargets SelectedTargets [get]
 
bool IsAggressive [get, set]
 
bool LootCollected [get, set]
 
- Properties inherited from ORKFramework.IGUID
string GUID [get, set]
 
- Properties inherited from ORKFramework.IContent
int TypeID [get]
 
- Properties inherited from ORKFramework.IContentSimple
int ID [get]
 
- Properties inherited from ORKFramework.IRenameable
string RenameableName [get, set]
 
string RenameableDescription [get, set]
 
- Properties inherited from ORKFramework.IVariableSource
bool HasVariables [get]
 
VariableHandler Variables [get]
 

Member Function Documentation

◆ BaseInit()

void ORKFramework.Combatant.BaseInit ( CombatantSetting  cs,
int  id,
Group  group,
bool  showNotification,
bool  showConsole,
bool  loadGame 
)

Handles the basic initialization of the combatant.

Parameters
csThe CombatantSettings used to initialize the combatant.
idThe ID (index) of the combatant.
groupThe Group the combatant will be added to. If null, a new group is created.
loadGametrue if the initalization comes from loading the game; otherwise, false.

◆ CheckAggressive()

void ORKFramework.Combatant.CheckAggressive ( AggressionType  aggressionType,
Combatant  origin 
)

Checks if the combatant's aggression state is changed due to an aggression of another combatant. Also causes the move AI to react to damage in case it's a damage aggression type.

Parameters
aggressionTypeThe aggression type that is checked for.
originThe combatant who's the origin of the aggression.

◆ FireChanged()

void ORKFramework.Combatant.FireChanged ( )

Notifies all event listeners that something changed.

◆ FireGroupChanged()

void ORKFramework.Combatant.FireGroupChanged ( )

Notifies all group change listeners that the group changed.

◆ FireInventoryChanged()

void ORKFramework.Combatant.FireInventoryChanged ( )

Notifies all inventory change listeners that the inventory changed.

◆ FireVariablesChanged()

void ORKFramework.Combatant.FireVariablesChanged ( )

Notifies all variable change listeners that the combatant's object variables have.

◆ GetInventoryLimit()

float ORKFramework.Combatant.GetInventoryLimit ( )

Gets the inventory limit.

Returns
The inventory limit.

◆ Init() [1/2]

void ORKFramework.Combatant.Init ( )

Initializes the combatant with the default start level, class level and class. Requires the combatant to be base initialized using the BaseInit function.

◆ Init() [2/2]

void ORKFramework.Combatant.Init ( int  level,
int  classLevel,
int  classID,
bool  loadGame,
bool  learnAbilities,
bool  useStartInventory,
bool  useStartEquipment,
bool  useInitEvent,
bool  useStatusEffects 
)

Initialize the combatant with a defined level, class level and class.

Parameters
levelThe level.
classLevelThe class level.
classIDThe ID (index) of the class.
useStartInventorytrue if the start inventory should be used.
useStartEquipmenttrue if the start equipment should be used.
useInitEventtrue if the init game event should be used.

◆ IsAIControlled()

bool ORKFramework.Combatant.IsAIControlled ( )

Determines whether this combatant is AI controlled, i.e. either not part of the player group or an AI controlled player group member.

Returns
true if this combatant is AI controlled; otherwise, false.

◆ IsEnemy()

bool ORKFramework.Combatant.IsEnemy ( Combatant  combatant)

Determines whether this combatant is an enemy the specified combatant.

Returns
true if this combatant is an enemy the specified combatant; otherwise, false.
Parameters
combatantThe combatant to check.

◆ IsPlayerControlled()

bool ORKFramework.Combatant.IsPlayerControlled ( )

Determines whether this combatant is player controlled (i.e. part of the player group).

Returns
true if this combatant is controlled by the player; otherwise, false.

◆ LoadGame()

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

◆ SaveGame()

DataObject ORKFramework.Combatant.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.

◆ SetGroup()

void ORKFramework.Combatant.SetGroup ( Group  g)

Sets the group of this combatant.

Parameters
gThe Group.

◆ VariablesHaveChanged()

void ORKFramework.Combatant.VariablesHaveChanged ( )

Called by VariableHandler when a variable changed.