ORK Framework  3.17.1
API Documentation
GamingIsLove.ORKFramework.Combatant Class Reference
Inheritance diagram for GamingIsLove.ORKFramework.Combatant:
GamingIsLove.ORKFramework.IAddRandomStatusBonus GamingIsLove.ORKFramework.IStatusBonus GamingIsLove.ORKFramework.ILevel GamingIsLove.ORKFramework.IRenameable GamingIsLove.ORKFramework.IGUID GamingIsLove.ORKFramework.CombatantBodyPart

Public Member Functions

 Combatant (DataObject data, bool loadPosition, Group group)
 
override string ToString ()
 
virtual bool IsInputIDSet ()
 
virtual bool IsPlayerControlled ()
 Determines whether this combatant is player controlled (i.e. part of the player group). More...
 
virtual 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...
 
virtual bool IsEnemy (Combatant combatant)
 Determines whether this combatant is an enemy the specified combatant. More...
 
virtual float GetInventoryLimit ()
 Gets the inventory limit. More...
 
virtual float GetInventorySlots (InventoryContainerSetting settings)
 Gets the inventory slots. More...
 
virtual void FireChanged ()
 Notifies all event listeners that something changed. More...
 
virtual void FireChanged (bool markUIChanged)
 
virtual void FireGroupChanged ()
 Notifies all group change listeners that the group changed. More...
 
virtual void VariablesHaveChanged ()
 Called by VariableHandler when a variable changed. More...
 
virtual string GetName ()
 
virtual string GetShortName ()
 
virtual string GetDescription ()
 
virtual Texture GetIconTexture ()
 
virtual Sprite GetIconSprite ()
 
virtual string GetIconTextCode ()
 
virtual string GetCustomContent (string contentKey)
 
virtual IContent GetTypeContent ()
 
virtual IPortrait GetPortrait (PortraitTypeAsset portraitType)
 
virtual void ReplaceCustomTextCodes (ref string text)
 
virtual string GetBonusText ()
 
virtual StatusPreviewInformation GetStatusBonus ()
 Gets the blank bonus provided by the status bonus. More...
 
virtual void GetStatusBonus (ref StatusPreviewInformation info)
 Adds the bonus provided by the status bonus to existing status bonus information. More...
 
virtual void AddRandomStatusBonus (RandomStatusBonusSettings settings)
 
virtual void RemoveAllStatusBonuses ()
 
virtual void BaseInit (CombatantSetting cs, Group group, bool showNotification, bool showConsole, bool loadGame)
 Handles the basic initialization of the combatant. More...
 
virtual 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...
 
virtual void Init (int level, int classLevel, Class startClass, bool isLoading, bool learnAbilities, bool useStartInventory, bool useStartEquipment, bool useInitSchematic, bool useStatusEffects)
 Initialize the combatant with a defined level, class level and class. More...
 
virtual void SetGroup (Group g)
 Sets the group of this combatant. More...
 
virtual void ClearGroup ()
 
virtual void InstanceRemoved ()
 
virtual void AddBodyParts (CombatantBodyPartSetting[] bodyPartSetting)
 
virtual void RemoveBodyPart (CombatantBodyPart bodyPart)
 
virtual bool HasBodyPart (CombatantSetting combatant)
 
virtual CombatantBodyPart GetBodyPart (CombatantSetting combatant)
 
virtual List< CombatantBodyPartGetBodyParts ()
 
virtual void SetPassive (bool isPassive, bool mustDefeat)
 
virtual void ClearTargets ()
 
virtual void ChangeAggressionState (Combatant aggressor, bool aggressive, bool notifyOthers, bool moveAI)
 
virtual void CheckAggressive (AggressionType aggressionType, Combatant aggressor)
 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...
 
virtual void Tick (float time, float battleTime)
 
virtual bool ControlMapTick ()
 
virtual void ClearControlMaps ()
 
virtual void GetLoot (Combatant looter, ref List< IShortcut > list, bool useAddType)
 
virtual void GetBattleAnimation (BattleAnimationType type, ref List< KeyValuePair< BattleAnimation, Schematic >> list)
 
virtual bool GetAbilityAnimation (AbilityShortcut ability, int abilityLevel, ref List< KeyValuePair< BattleAnimation, Schematic >> list)
 
virtual bool GetItemAnimation (ItemShortcut item, ref List< KeyValuePair< BattleAnimation, Schematic >> list)
 
virtual bool IsAnimateJoinBattle ()
 
virtual bool IsLookAtJoinBattle ()
 
virtual DataObject SaveGame ()
 
virtual void LoadGame (DataObject data)
 

Protected Attributes

CombatantSetting setting
 
string guid = ""
 
Group group
 
bool isInitialized = false
 
bool isTemporary = false
 
Inventory inventory
 
CombatantObject objectHandler
 
CombatantClass classHandler
 
CombatantStatus status
 
CombatantEquipment equipment
 
CombatantAbilities abilities
 
CombatantActions actions
 
CombatantAI ai
 
CombatantBattle battle
 
CombatantShortcuts shortcuts
 
CombatantAnimations animations
 
ResearchHandler research
 
ConsoleHandler console
 
CombatantGrid grid
 
CombatantUI ui
 
CombatantEventHandler eventHandler
 
List< CombatantBodyPartbodyParts
 
string newName = ""
 
string newDescription = ""
 
string nameCount = ""
 
BestiaryEntry bestiaryEntry
 
SelectedTargets selectedTargets
 
bool isPassive = false
 
bool passiveMustDefeat = false
 
bool isAggressive = false
 
bool lootCollected = false
 
List< ControlMapcontrolMaps
 
VariableHandler variableHandler
 
SelectedDataHandler selectedData
 
CombatantDataCall call
 
int inputID = -1
 

Properties

virtual DataCall Call [get]
 
virtual int?? InputID [get, set]
 
virtual CombatantEventHandler Events [get]
 
virtual string GUID [get, set]
 
virtual string RenameableName [get, set]
 
virtual string RenameableDescription [get, set]
 
virtual string NameCount [get, set]
 
virtual int ID [get]
 
virtual CombatantType CombatantType [get]
 
virtual BestiaryEntry Bestiary [get, set]
 
virtual bool HasGroup [get]
 
virtual bool IsBodyPart [get]
 
virtual bool HasBodyParts [get]
 
virtual CombatantSetting Setting [get]
 
virtual int Level [get]
 
virtual bool IsPassive [get]
 
virtual bool PassiveMustDefeat [get]
 
virtual bool HasVariables [get]
 
virtual VariableHandler Variables [get, set]
 
virtual bool HasSelectedData [get]
 
virtual SelectedDataHandler SelectedData [get, set]
 
virtual Group Group [get]
 
virtual FactionSetting Faction [get, set]
 
virtual bool IsLeader [get]
 
virtual bool IsTemporary [get, set]
 
virtual GameObject GameObject [get, set]
 
virtual CombatantClass Class [get]
 
virtual CombatantStatus Status [get]
 
virtual CombatantAbilities Abilities [get]
 
virtual CombatantEquipment Equipment [get]
 
virtual CombatantBattle Battle [get]
 
virtual CombatantGrid Grid [get]
 
bool GridInitialized [get]
 
virtual CombatantActions Actions [get]
 
virtual CombatantShortcuts Shortcuts [get]
 
virtual CombatantAI AI [get]
 
virtual CombatantAnimations Animations [get]
 
virtual CombatantObject Object [get]
 
virtual CombatantUI UI [get]
 
virtual bool ResearchInitialized [get]
 
virtual ResearchHandler Research [get]
 
virtual ConsoleHandler Console [get]
 
virtual Inventory Inventory [get]
 
virtual SelectedTargets SelectedTargets [get]
 
virtual bool IsAggressive [get, set]
 
virtual bool LootCollected [get, set]
 
- Properties inherited from GamingIsLove.ORKFramework.IGUID
string GUID [get, set]
 
- Properties inherited from GamingIsLove.ORKFramework.IRenameable
string RenameableName [get, set]
 
string RenameableDescription [get, set]
 
- Properties inherited from GamingIsLove.ORKFramework.ILevel
int Level [get]
 

Member Function Documentation

◆ BaseInit()

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

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.

Reimplemented in GamingIsLove.ORKFramework.CombatantBodyPart.

◆ CheckAggressive()

virtual void GamingIsLove.ORKFramework.Combatant.CheckAggressive ( AggressionType  aggressionType,
Combatant  aggressor 
)
virtual

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.
aggressorThe combatant who's the origin of the aggression.

◆ FireChanged()

virtual void GamingIsLove.ORKFramework.Combatant.FireChanged ( )
virtual

Notifies all event listeners that something changed.

◆ FireGroupChanged()

virtual void GamingIsLove.ORKFramework.Combatant.FireGroupChanged ( )
virtual

Notifies all group change listeners that the group changed.

◆ GetInventoryLimit()

virtual float GamingIsLove.ORKFramework.Combatant.GetInventoryLimit ( )
virtual

Gets the inventory limit.

Returns
The inventory limit.

◆ GetInventorySlots()

virtual float GamingIsLove.ORKFramework.Combatant.GetInventorySlots ( InventoryContainerSetting  settings)
virtual

Gets the inventory slots.

Returns
The inventory slots.

◆ GetStatusBonus() [1/2]

virtual StatusPreviewInformation GamingIsLove.ORKFramework.Combatant.GetStatusBonus ( )
virtual

Gets the blank bonus provided by the status bonus.

Returns
Status bonus information.

Implements GamingIsLove.ORKFramework.IStatusBonus.

◆ GetStatusBonus() [2/2]

virtual void GamingIsLove.ORKFramework.Combatant.GetStatusBonus ( ref StatusPreviewInformation  info)
virtual

Adds the bonus provided by the status bonus to existing status bonus information.

Parameters
infoStatus bonus information.

Implements GamingIsLove.ORKFramework.IStatusBonus.

◆ Init() [1/2]

virtual void GamingIsLove.ORKFramework.Combatant.Init ( )
virtual

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]

virtual void GamingIsLove.ORKFramework.Combatant.Init ( int  level,
int  classLevel,
Class  startClass,
bool  isLoading,
bool  learnAbilities,
bool  useStartInventory,
bool  useStartEquipment,
bool  useInitSchematic,
bool  useStatusEffects 
)
virtual

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

Parameters
levelThe level.
classLevelThe class level.
startClassThe the class.
useStartInventorytrue if the start inventory should be used.
useStartEquipmenttrue if the start equipment should be used.
useInitSchematictrue if the init schematic should be used.

Reimplemented in GamingIsLove.ORKFramework.CombatantBodyPart.

◆ IsAIControlled()

virtual bool GamingIsLove.ORKFramework.Combatant.IsAIControlled ( )
virtual

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()

virtual bool GamingIsLove.ORKFramework.Combatant.IsEnemy ( Combatant  combatant)
virtual

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()

virtual bool GamingIsLove.ORKFramework.Combatant.IsPlayerControlled ( )
virtual

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.

◆ SetGroup()

virtual void GamingIsLove.ORKFramework.Combatant.SetGroup ( Group  g)
virtual

Sets the group of this combatant.

Parameters
gThe Group.

Reimplemented in GamingIsLove.ORKFramework.CombatantBodyPart.

◆ VariablesHaveChanged()

virtual void GamingIsLove.ORKFramework.Combatant.VariablesHaveChanged ( )
virtual

Called by VariableHandler when a variable changed.