hoa_global::GlobalActor Class Reference

Represents an actor that can participate in battles. More...

#include <global_actors.h>

Inheritance diagram for hoa_global::GlobalActor:

Inheritance graph
[legend]
Collaboration diagram for hoa_global::GlobalActor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void AddSkill (uint32 skill_id)=0
 Adds a new skill to the actor's skill set.
GlobalArmorEquipArmor (GlobalArmor *armor, uint32 index)
 Equips a new armor on the actor.
GlobalWeaponEquipWeapon (GlobalWeapon *weapon)
 Equips a new weapon on the actor.
GLOBAL_TARGET GetTargetType ()
 A pure virtual function that returns the type of target.
 GlobalActor ()
bool IsAlive () const
 Determines if the actor is "alive" and able to perform actions.
virtual bool IsCharacter ()=0
 A purely virtual function used for actor type identification.
virtual ~GlobalActor ()
Class member add and subtract functions
These methods provide a means to easily add or subtract amounts off of certain stats, such as hit points or stength. Total attack, defense, or evade ratings are re-calculated when an appropriately related stat is changed.

void AddAgility (uint32 ag)
void AddEvade (float ev)
void AddFortitude (uint32 fo)
void AddHitPoints (uint32 hp)
 
Note:
The current hit points is prevented from exceeding the maximum hit points possible

void AddMaxHitPoints (uint32 hp)
 
Note:
The current hit points is also increased by the same amount as the max hit points

void AddMaxSkillPoints (uint32 sp)
 
Note:
The current skill points is also increased by the same amount as the max skill points

void AddProtection (uint32 pr)
void AddSkillPoints (uint32 sp)
 
Note:
The current skill points is prevented from exceeding the maximum skill points possible

void AddStrength (uint32 st)
void AddVigor (uint32 vi)
void SubHitPoints (uint32 hp)
 
Note:
If an overflow condition is detected, hit points will be set to zero

void SubSkillPoints (uint32 sp)
 
Note:
If an overflow condition is detected, skill points will be set to zero

Class member get functions
Some of these functions take an index argument to retrieve a particular attack point stat or piece of armor. If an invalid index is given, a zero or NULL value will be returned.

uint32 GetAgility () const
GlobalArmorGetArmorEquipped (uint32 index) const
std::vector< GlobalArmor * > * GetArmorEquipped ()
GlobalAttackPointGetAttackPoint (uint32 index) const
std::vector< GlobalAttackPoint * > * GetAttackPoints ()
float GetEvade () const
uint32 GetExperienceLevel () const
uint32 GetExperiencePoints () const
std::string & GetFilename ()
uint32 GetFortitude () const
uint32 GetHitPoints () const
uint32 GetID () const
uint32 GetMaxHitPoints () const
uint32 GetMaxSkillPoints () const
hoa_utils::ustringGetName ()
uint32 GetProtection () const
GlobalSkillGetSkill (const GlobalSkill *skill) const
 An alternative GetSkill call that takes a skill pointer as an argument.
GlobalSkillGetSkill (uint32 skill_id) const
 Used to detect if a character knows a certain skill.
uint32 GetSkillPoints () const
std::map< uint32, GlobalSkill * > * GetSkills ()
uint32 GetStrength () const
float GetTotalEvadeRating (uint32 index) const
uint32 GetTotalMetaphysicalAttack () const
uint32 GetTotalMetaphysicalDefense (uint32 index) const
uint32 GetTotalPhysicalAttack () const
uint32 GetTotalPhysicalDefense (uint32 index) const
uint32 GetVigor () const
GlobalWeaponGetWeaponEquipped () const
Class member set functions
Normally you should not need to directly set these members, but rather add or subtract an amount from the current value of the member. Total attack, defense, or evade ratings are re-calculated when an appropriately related stat is changed.

void SetAgility (uint32 ag)
void SetEvade (float ev)
void SetExperienceLevel (uint32 xp_level)
void SetExperiencePoints (uint32 xp_points)
void SetFortitude (uint32 fo)
void SetHitPoints (uint32 hp)
void SetMaxHitPoints (uint32 hp)
void SetMaxSkillPoints (uint32 sp)
void SetProtection (uint32 pr)
void SetSkillPoints (uint32 sp)
void SetStrength (uint32 st)
void SetVigor (uint32 vi)

Protected Member Functions

void _CalculateAttackRatings ()
 The elemental effects added to the actor's attack Actors may carry various elemental attack bonuses, or they may carry none. These bonuses include those that are brought upon by the weapon that the character may have equipped. The status effects added to the actor's attack Actors may carry various status attack bonuses, or they may carry none. These bonuses include those that are brought upon by the weapon that the character may have equipped. The first member in the pair is the likelihood (between 0.0 and 1.0) that the actor has of inflicting that status effect upon a targeted foe. The elemental effects added to the actor's defense Actors may carry various elemental defense bonuses, or they may carry none. These bonuses include those that are brought upon by all of the armors that the character may have equipped. The status effects added to the actor's defense Actors may carry various status defense bonuses, or they may carry none. These bonuses include those that are brought upon by the armors that the character may have equipped. The first member in the pair is the reduction in the likelihood (between 0.0 and 1.0) that the actor has of repelling an attack with a status effect. Calculates an actor's physical and metaphysical attack ratings This function simply sums the actor's strength/vigor with their weapon's attack ratings and places the result in total physical/metaphysical attack members.
void _CalculateDefenseRatings ()
 Calculates the physical and metaphysical defense ratings for each attack point This function is called whenever the fortitude or protection members are modified or armor equipment is changed. It will update the total defense members of each attack point that belongs to the actor.
void _CalculateEvadeRatings ()
 Calculates the evade rating for each attack point This function is called whenever the evade member is modified. It updates the evade ratings of all attack points that belong to the actor.

Protected Attributes

std::vector< GlobalArmor * > _armor_equipped
 The various armors that the actor has equipped.
std::vector< GlobalAttackPoint * > _attack_points
 The attack points that are located on the actor.
std::string _filename
 The filename based used to look up an actors image files and other data.
uint32 _id
 An identification number to represent the actor.
hoa_utils::ustring _name
 The name of the actor as it will be displayed upon the screen.
std::map< uint32, GlobalSkill * > _skills
 A map containing all skills that the actor can use Unlike with characters, there is no need to hold the various types of skills in seperate containers for enemies. An enemy must have at least one skill in order to do anything useful in battle.
uint32 _total_metaphysical_attack
 The sum of the character's vigor and their weapon's metaphysical attack.
uint32 _total_physical_attack
 The sum of the character's strength and their weapon's physical attack.
GlobalWeapon_weapon_equipped
 The weapon that the actor has equipped.
Base Actor Statistics
uint32 _agility
 Used to calculate the time it takes to recover stamina in battles.
float _evade
 The attack evade percentage of the actor, ranged from 0.0 to 1.0.
uint32 _experience_level
 The current experience level of the actor.
uint32 _experience_points
 The number of experience points the actor has earned.
uint32 _fortitude
 Used to determine the actor's physical defense rating.
uint32 _hit_points
 The current number of hit points that the actor has.
uint32 _max_hit_points
 The maximum number of hit points that the actor may have.
uint32 _max_skill_points
 The maximum number of skill points that the actor may have.
uint32 _protection
 Used to determine the actor's metaphysical defense rating.
uint32 _skill_points
 The current number of skill points that the actor has.
uint32 _strength
 Used to determine the actor's physical attack rating.
uint32 _vigor
 Used to determine the actor's metaphysical attack rating.

Detailed Description

Represents an actor that can participate in battles.

****************************************************************************

This is an abstract parent class that both playable characters and enemies inherit from in order to provide a consistent interface to the statistics that characters and enemies share.

Todo:
The copy constructor and copy assignment operator need to written to avoid having two objects with the same set of pointers (to skills, equipment, attack points, etc). Deleting both the original and then the copy will cause a segmentation fault.

Definition at line 239 of file global_actors.h.


Constructor & Destructor Documentation

hoa_global::GlobalActor::GlobalActor (  )  [inline]

Definition at line 241 of file global_actors.h.

hoa_global::GlobalActor::~GlobalActor (  )  [virtual]

Definition at line 64 of file global_actors.cpp.

References _armor_equipped, _attack_points, _skills, and _weapon_equipped.


Member Function Documentation

void hoa_global::GlobalActor::_CalculateAttackRatings (  )  [protected]

The elemental effects added to the actor's attack Actors may carry various elemental attack bonuses, or they may carry none. These bonuses include those that are brought upon by the weapon that the character may have equipped. The status effects added to the actor's attack Actors may carry various status attack bonuses, or they may carry none. These bonuses include those that are brought upon by the weapon that the character may have equipped. The first member in the pair is the likelihood (between 0.0 and 1.0) that the actor has of inflicting that status effect upon a targeted foe. The elemental effects added to the actor's defense Actors may carry various elemental defense bonuses, or they may carry none. These bonuses include those that are brought upon by all of the armors that the character may have equipped. The status effects added to the actor's defense Actors may carry various status defense bonuses, or they may carry none. These bonuses include those that are brought upon by the armors that the character may have equipped. The first member in the pair is the reduction in the likelihood (between 0.0 and 1.0) that the actor has of repelling an attack with a status effect. Calculates an actor's physical and metaphysical attack ratings This function simply sums the actor's strength/vigor with their weapon's attack ratings and places the result in total physical/metaphysical attack members.

Definition at line 180 of file global_actors.cpp.

References _strength, _total_metaphysical_attack, _total_physical_attack, _vigor, _weapon_equipped, hoa_global::GlobalWeapon::GetMetaphysicalAttack(), and hoa_global::GlobalWeapon::GetPhysicalAttack().

Referenced by AddStrength(), AddVigor(), EquipWeapon(), SetStrength(), and SetVigor().

Here is the call graph for this function:

void hoa_global::GlobalActor::_CalculateDefenseRatings (  )  [protected]

Calculates the physical and metaphysical defense ratings for each attack point This function is called whenever the fortitude or protection members are modified or armor equipment is changed. It will update the total defense members of each attack point that belongs to the actor.

Definition at line 192 of file global_actors.cpp.

References _armor_equipped, _attack_points, _fortitude, and _protection.

Referenced by AddFortitude(), AddProtection(), EquipArmor(), SetFortitude(), and SetProtection().

void hoa_global::GlobalActor::_CalculateEvadeRatings (  )  [protected]

Calculates the evade rating for each attack point This function is called whenever the evade member is modified. It updates the evade ratings of all attack points that belong to the actor.

Definition at line 214 of file global_actors.cpp.

References _attack_points, and _evade.

Referenced by AddEvade(), and SetEvade().

void hoa_global::GlobalActor::AddAgility ( uint32  ag  )  [inline]

Definition at line 449 of file global_actors.h.

References _agility.

void hoa_global::GlobalActor::AddEvade ( float  ev  )  [inline]

Definition at line 452 of file global_actors.h.

References _CalculateEvadeRatings(), and _evade.

Here is the call graph for this function:

void hoa_global::GlobalActor::AddFortitude ( uint32  fo  )  [inline]

Definition at line 443 of file global_actors.h.

References _CalculateDefenseRatings(), and _fortitude.

Here is the call graph for this function:

void hoa_global::GlobalActor::AddHitPoints ( uint32  hp  )  [inline]

Note:
The current hit points is prevented from exceeding the maximum hit points possible

Definition at line 414 of file global_actors.h.

References _hit_points, and _max_hit_points.

void hoa_global::GlobalActor::AddMaxHitPoints ( uint32  hp  )  [inline]

Note:
The current hit points is also increased by the same amount as the max hit points

Definition at line 422 of file global_actors.h.

References _hit_points, and _max_hit_points.

void hoa_global::GlobalActor::AddMaxSkillPoints ( uint32  sp  )  [inline]

Note:
The current skill points is also increased by the same amount as the max skill points

Definition at line 434 of file global_actors.h.

References _max_skill_points, and _skill_points.

void hoa_global::GlobalActor::AddProtection ( uint32  pr  )  [inline]

Definition at line 446 of file global_actors.h.

References _CalculateDefenseRatings(), and _protection.

Here is the call graph for this function:

virtual void hoa_global::GlobalActor::AddSkill ( uint32  skill_id  )  [pure virtual]

Adds a new skill to the actor's skill set.

Parameters:
skill_id The id number of the skill to add
No skill may be added more than once. If this case is detected or an error occurs when trying to load the skill data, it will not be added.

Implemented in hoa_global::GlobalCharacter, and hoa_global::GlobalEnemy.

void hoa_global::GlobalActor::AddSkillPoints ( uint32  sp  )  [inline]

Note:
The current skill points is prevented from exceeding the maximum skill points possible

Definition at line 426 of file global_actors.h.

References _max_skill_points, and _skill_points.

void hoa_global::GlobalActor::AddStrength ( uint32  st  )  [inline]

Definition at line 437 of file global_actors.h.

References _CalculateAttackRatings(), and _strength.

Here is the call graph for this function:

void hoa_global::GlobalActor::AddVigor ( uint32  vi  )  [inline]

Definition at line 440 of file global_actors.h.

References _CalculateAttackRatings(), and _vigor.

Here is the call graph for this function:

GlobalArmor * hoa_global::GlobalActor::EquipArmor ( GlobalArmor armor,
uint32  index 
)

Equips a new armor on the actor.

Parameters:
armor The piece of armor to equip
index The index into the _armor_equippd vector where to equip the armor
Returns:
A pointer to the armor that was previously equipped, or NULL if no armor was equipped
This function will also automatically re-calculate all defense ratings, elemental, and status bonuses. If the index argument is invalid (out-of-bounds), the function will return the armor argument.

Definition at line 235 of file global_actors.cpp.

References _armor_equipped, _CalculateDefenseRatings(), hoa_global::GlobalArmor::GetObjectType(), and hoa_global::GLOBAL_DEBUG.

Referenced by hoa_global::GlobalCharacter::EquipArmArmor(), hoa_global::GlobalCharacter::EquipHeadArmor(), hoa_global::GlobalCharacter::EquipLegArmor(), and hoa_global::GlobalCharacter::EquipTorsoArmor().

Here is the call graph for this function:

GlobalWeapon * hoa_global::GlobalActor::EquipWeapon ( GlobalWeapon weapon  ) 

Equips a new weapon on the actor.

Parameters:
weapon The new weapon to equip on the actor
Returns:
A pointer to the weapon that was previouslly equipped, or NULL if no weapon was equipped.
This function will also automatically re-calculate all attack ratings, elemental, and status bonuses.

Definition at line 226 of file global_actors.cpp.

References _CalculateAttackRatings(), and _weapon_equipped.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

Here is the call graph for this function:

uint32 hoa_global::GlobalActor::GetAgility (  )  const [inline]

Definition at line 309 of file global_actors.h.

References _agility.

Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

GlobalArmor * hoa_global::GlobalActor::GetArmorEquipped ( uint32  index  )  const

Definition at line 131 of file global_actors.cpp.

References _armor_equipped, and hoa_global::GLOBAL_DEBUG.

std::vector<GlobalArmor*>* hoa_global::GlobalActor::GetArmorEquipped (  )  [inline]

Definition at line 330 of file global_actors.h.

References _armor_equipped.

Referenced by hoa_battle::private_battle::BattleCharacterActor::CalcMetaPhysicalDefense(), and hoa_battle::private_battle::BattleCharacterActor::CalcPhysicalDefense().

GlobalAttackPoint * hoa_global::GlobalActor::GetAttackPoint ( uint32  index  )  const

Definition at line 145 of file global_actors.cpp.

References _attack_points, and hoa_global::GLOBAL_DEBUG.

std::vector<GlobalAttackPoint*>* hoa_global::GlobalActor::GetAttackPoints (  )  [inline]

Definition at line 335 of file global_actors.h.

References _attack_points.

Referenced by hoa_battle::BattleMode::_UpdateAttackPointSelection(), hoa_battle::private_battle::BattleEnemyActor::DrawSprite(), and hoa_battle::private_battle::BattleEnemyActor::DrawStatus().

float hoa_global::GlobalActor::GetEvade (  )  const [inline]

Definition at line 312 of file global_actors.h.

References _evade.

Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

uint32 hoa_global::GlobalActor::GetExperienceLevel (  )  const [inline]

Definition at line 291 of file global_actors.h.

References _experience_level.

Referenced by hoa_global::GameGlobal::_SaveCharacter(), hoa_battle::BattleMode::AddEnemy(), hoa_menu::private_menu::StatusWindow::Draw(), and hoa_menu::private_menu::CharacterWindow::Draw().

uint32 hoa_global::GlobalActor::GetExperiencePoints (  )  const [inline]

Definition at line 294 of file global_actors.h.

References _experience_points.

Referenced by hoa_global::GlobalCharacterGrowth::_CheckForGrowth(), hoa_global::GameGlobal::_SaveCharacter(), and hoa_battle::BattleMode::_TallyRewards().

std::string& hoa_global::GlobalActor::GetFilename (  )  [inline]

Definition at line 276 of file global_actors.h.

References _filename.

Referenced by hoa_battle::private_battle::BattleCharacterActor::BattleCharacterActor(), hoa_battle::private_battle::BattleEnemyActor::BattleEnemyActor(), hoa_menu::private_menu::CharacterWindow::SetCharacter(), and hoa_menu::private_menu::StatusWindow::StatusWindow().

uint32 hoa_global::GlobalActor::GetFortitude (  )  const [inline]

Definition at line 303 of file global_actors.h.

References _fortitude.

Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

uint32 hoa_global::GlobalActor::GetHitPoints (  )  const [inline]

Definition at line 279 of file global_actors.h.

References _hit_points.

Referenced by hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

uint32 hoa_global::GlobalActor::GetID (  )  const [inline]

Definition at line 270 of file global_actors.h.

References _id.

Referenced by hoa_global::GameGlobal::_SaveCharacter(), hoa_global::GlobalParty::AddActor(), hoa_global::GameGlobal::AddCharacter(), hoa_battle::BattleMode::AddEnemy(), and hoa_menu::private_menu::CharacterWindow::SetCharacter().

uint32 hoa_global::GlobalActor::GetMaxHitPoints (  )  const [inline]

Definition at line 282 of file global_actors.h.

References _max_hit_points.

Referenced by hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

uint32 hoa_global::GlobalActor::GetMaxSkillPoints (  )  const [inline]

Definition at line 288 of file global_actors.h.

References _max_skill_points.

Referenced by hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

hoa_utils::ustring& hoa_global::GlobalActor::GetName (  )  [inline]

Definition at line 273 of file global_actors.h.

References _name.

Referenced by hoa_menu::private_menu::StatusWindow::Draw(), and hoa_menu::private_menu::CharacterWindow::Draw().

uint32 hoa_global::GlobalActor::GetProtection (  )  const [inline]

Definition at line 306 of file global_actors.h.

References _protection.

Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

GlobalSkill * hoa_global::GlobalActor::GetSkill ( const GlobalSkill skill  )  const

An alternative GetSkill call that takes a skill pointer as an argument.

Definition at line 169 of file global_actors.cpp.

References hoa_global::GlobalSkill::GetID(), GetSkill(), and hoa_global::GLOBAL_DEBUG.

Here is the call graph for this function:

GlobalSkill * hoa_global::GlobalActor::GetSkill ( uint32  skill_id  )  const

Used to detect if a character knows a certain skill.

Returns:
A pointer to the skill if it is found, or NULL if the skill was not found

Definition at line 159 of file global_actors.cpp.

References _skills.

Referenced by hoa_global::GlobalCharacterGrowth::_CheckForGrowth(), and GetSkill().

uint32 hoa_global::GlobalActor::GetSkillPoints (  )  const [inline]

Definition at line 285 of file global_actors.h.

References _skill_points.

Referenced by hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), hoa_battle::private_battle::BattleActor::InitBattleActorStats(), and hoa_global::GlobalSkill::MenuExecute().

std::map<uint32, GlobalSkill*>* hoa_global::GlobalActor::GetSkills (  )  [inline]

Definition at line 340 of file global_actors.h.

References _skills.

Referenced by hoa_battle::private_battle::BattleEnemyActor::Update().

uint32 hoa_global::GlobalActor::GetStrength (  )  const [inline]

Definition at line 297 of file global_actors.h.

References _strength.

Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

GLOBAL_TARGET hoa_global::GlobalActor::GetTargetType (  )  [inline, virtual]

A pure virtual function that returns the type of target.

Returns:
The appropriate GLOBAL_TARGET enum for the target type in question
This method is necessary so that GlobalTarget can be an abstract class. Inheriting classes simply need to return a valid target type.

Implements hoa_global::GlobalTarget.

Definition at line 246 of file global_actors.h.

References hoa_global::GLOBAL_TARGET_ACTOR.

float hoa_global::GlobalActor::GetTotalEvadeRating ( uint32  index  )  const

Definition at line 117 of file global_actors.cpp.

References _attack_points, and hoa_global::GLOBAL_DEBUG.

uint32 hoa_global::GlobalActor::GetTotalMetaphysicalAttack (  )  const [inline]

Definition at line 318 of file global_actors.h.

References _total_metaphysical_attack.

uint32 hoa_global::GlobalActor::GetTotalMetaphysicalDefense ( uint32  index  )  const

Definition at line 103 of file global_actors.cpp.

References _attack_points, and hoa_global::GLOBAL_DEBUG.

uint32 hoa_global::GlobalActor::GetTotalPhysicalAttack (  )  const [inline]

Definition at line 315 of file global_actors.h.

References _total_physical_attack.

uint32 hoa_global::GlobalActor::GetTotalPhysicalDefense ( uint32  index  )  const

Definition at line 89 of file global_actors.cpp.

References _attack_points, and hoa_global::GLOBAL_DEBUG.

uint32 hoa_global::GlobalActor::GetVigor (  )  const [inline]

Definition at line 300 of file global_actors.h.

References _vigor.

Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::StatusWindow::Draw(), and hoa_battle::private_battle::BattleActor::InitBattleActorStats().

GlobalWeapon* hoa_global::GlobalActor::GetWeaponEquipped (  )  const [inline]

Definition at line 327 of file global_actors.h.

References _weapon_equipped.

Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_global::GameGlobal::_SaveCharacter(), hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), hoa_battle::private_battle::BattleEnemyActor::CalcMetaPhysicalAttack(), hoa_battle::private_battle::BattleCharacterActor::CalcMetaPhysicalAttack(), hoa_battle::private_battle::BattleEnemyActor::CalcPhysicalAttack(), hoa_battle::private_battle::BattleCharacterActor::CalcPhysicalAttack(), and hoa_menu::private_menu::EquipWindow::EquipWindow().

bool hoa_global::GlobalActor::IsAlive (  )  const [inline]

Determines if the actor is "alive" and able to perform actions.

Returns:
True if the character has a non-zero amount of hit points.

Definition at line 261 of file global_actors.h.

References _hit_points.

Referenced by hoa_battle::BattleMode::GetIndexOfFirstIdleCharacter().

virtual bool hoa_global::GlobalActor::IsCharacter (  )  [pure virtual]

A purely virtual function used for actor type identification.

Returns:
True if the actor is a character, false if it is an enemy
This function is implemented primarily because GlobalActor requires at least one purely virtual function to be an abstract class. FIX ME Obsolete. Moved to BattleActor and now called IsEnemy().

Implemented in hoa_global::GlobalCharacter, and hoa_global::GlobalEnemy.

void hoa_global::GlobalActor::SetAgility ( uint32  ag  )  [inline]

Definition at line 400 of file global_actors.h.

References _agility.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

void hoa_global::GlobalActor::SetEvade ( float  ev  )  [inline]

Definition at line 403 of file global_actors.h.

References _CalculateEvadeRatings(), and _evade.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

Here is the call graph for this function:

void hoa_global::GlobalActor::SetExperienceLevel ( uint32  xp_level  )  [inline]

Definition at line 370 of file global_actors.h.

References _experience_level.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

void hoa_global::GlobalActor::SetExperiencePoints ( uint32  xp_points  )  [inline]

Definition at line 373 of file global_actors.h.

References _experience_points.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

void hoa_global::GlobalActor::SetFortitude ( uint32  fo  )  [inline]

Definition at line 394 of file global_actors.h.

References _CalculateDefenseRatings(), and _fortitude.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

Here is the call graph for this function:

void hoa_global::GlobalActor::SetHitPoints ( uint32  hp  )  [inline]

Definition at line 376 of file global_actors.h.

References _hit_points, and _max_hit_points.

Referenced by hoa_global::GameGlobal::_LoadCharacter(), and hoa_battle::private_battle::BattleCharacterActor::UpdateGlobalActorStats().

void hoa_global::GlobalActor::SetMaxHitPoints ( uint32  hp  )  [inline]

Definition at line 379 of file global_actors.h.

References _hit_points, and _max_hit_points.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

void hoa_global::GlobalActor::SetMaxSkillPoints ( uint32  sp  )  [inline]

Definition at line 385 of file global_actors.h.

References _max_skill_points, and _skill_points.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

void hoa_global::GlobalActor::SetProtection ( uint32  pr  )  [inline]

Definition at line 397 of file global_actors.h.

References _CalculateDefenseRatings(), and _protection.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

Here is the call graph for this function:

void hoa_global::GlobalActor::SetSkillPoints ( uint32  sp  )  [inline]

Definition at line 382 of file global_actors.h.

References _max_skill_points, and _skill_points.

Referenced by hoa_global::GameGlobal::_LoadCharacter(), and hoa_battle::private_battle::BattleCharacterActor::UpdateGlobalActorStats().

void hoa_global::GlobalActor::SetStrength ( uint32  st  )  [inline]

Definition at line 388 of file global_actors.h.

References _CalculateAttackRatings(), and _strength.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

Here is the call graph for this function:

void hoa_global::GlobalActor::SetVigor ( uint32  vi  )  [inline]

Definition at line 391 of file global_actors.h.

References _CalculateAttackRatings(), and _vigor.

Referenced by hoa_global::GameGlobal::_LoadCharacter().

Here is the call graph for this function:

void hoa_global::GlobalActor::SubHitPoints ( uint32  hp  )  [inline]

Note:
If an overflow condition is detected, hit points will be set to zero

Definition at line 418 of file global_actors.h.

References _hit_points.

void hoa_global::GlobalActor::SubSkillPoints ( uint32  sp  )  [inline]

Note:
If an overflow condition is detected, skill points will be set to zero

Definition at line 430 of file global_actors.h.

References _skill_points.


Member Data Documentation

uint32 hoa_global::GlobalActor::_agility [protected]

Used to calculate the time it takes to recover stamina in battles.

Definition at line 525 of file global_actors.h.

Referenced by AddAgility(), GetAgility(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetAgility().

std::vector<GlobalArmor*> hoa_global::GlobalActor::_armor_equipped [protected]

The various armors that the actor has equipped.

Note:
The size of this vector will always be equal to the number of attack points on the actor.
Actors are not required to have armor of any sort equipped. Note that the defense bonuses that are afforded by the armors are not directly applied to the character's defense ratings, but rather to the defense ratings of their attack points. However the elemental and status bonuses of the armor are applied to the character as a whole. The armor must be equipped on one of the actor's attack points to really afford any kind of defensive bonus.

Definition at line 561 of file global_actors.h.

Referenced by _CalculateDefenseRatings(), EquipArmor(), hoa_global::GlobalCharacter::GetArmArmorEquipped(), GetArmorEquipped(), hoa_global::GlobalCharacter::GetHeadArmorEquipped(), hoa_global::GlobalCharacter::GetLegArmorEquipped(), hoa_global::GlobalCharacter::GetTorsoArmorEquipped(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), and ~GlobalActor().

std::vector<GlobalAttackPoint*> hoa_global::GlobalActor::_attack_points [protected]

The attack points that are located on the actor.

Note:
All actors must have at least one attack point.

Definition at line 540 of file global_actors.h.

Referenced by _CalculateDefenseRatings(), _CalculateEvadeRatings(), GetAttackPoint(), GetAttackPoints(), GetTotalEvadeRating(), GetTotalMetaphysicalDefense(), GetTotalPhysicalDefense(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), and ~GlobalActor().

float hoa_global::GlobalActor::_evade [protected]

The attack evade percentage of the actor, ranged from 0.0 to 1.0.

Definition at line 528 of file global_actors.h.

Referenced by _CalculateEvadeRatings(), AddEvade(), GetEvade(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetEvade().

uint32 hoa_global::GlobalActor::_experience_level [protected]

The current experience level of the actor.

Definition at line 495 of file global_actors.h.

Referenced by hoa_global::GlobalCharacterGrowth::AcknowledgeGrowth(), GetExperienceLevel(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetExperienceLevel().

uint32 hoa_global::GlobalActor::_experience_points [protected]

The number of experience points the actor has earned.

Definition at line 498 of file global_actors.h.

Referenced by hoa_global::GlobalCharacter::AddExperiencePoints(), GetExperiencePoints(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetExperiencePoints().

std::string hoa_global::GlobalActor::_filename [protected]

The filename based used to look up an actors image files and other data.

Definition at line 490 of file global_actors.h.

Referenced by GetFilename(), hoa_global::GlobalCharacter::GlobalCharacter(), and hoa_global::GlobalEnemy::GlobalEnemy().

uint32 hoa_global::GlobalActor::_fortitude [protected]

Used to determine the actor's physical defense rating.

Definition at line 519 of file global_actors.h.

Referenced by _CalculateDefenseRatings(), AddFortitude(), GetFortitude(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetFortitude().

uint32 hoa_global::GlobalActor::_hit_points [protected]

The current number of hit points that the actor has.

Definition at line 501 of file global_actors.h.

Referenced by AddHitPoints(), AddMaxHitPoints(), GetHitPoints(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), IsAlive(), SetHitPoints(), SetMaxHitPoints(), and SubHitPoints().

uint32 hoa_global::GlobalActor::_id [protected]

An identification number to represent the actor.

Definition at line 484 of file global_actors.h.

Referenced by GetID(), hoa_global::GlobalCharacter::GlobalCharacter(), and hoa_global::GlobalEnemy::GlobalEnemy().

uint32 hoa_global::GlobalActor::_max_hit_points [protected]

The maximum number of hit points that the actor may have.

Definition at line 504 of file global_actors.h.

Referenced by AddHitPoints(), AddMaxHitPoints(), GetMaxHitPoints(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), SetHitPoints(), and SetMaxHitPoints().

uint32 hoa_global::GlobalActor::_max_skill_points [protected]

The maximum number of skill points that the actor may have.

Definition at line 510 of file global_actors.h.

Referenced by AddMaxSkillPoints(), AddSkillPoints(), GetMaxSkillPoints(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), SetMaxSkillPoints(), and SetSkillPoints().

hoa_utils::ustring hoa_global::GlobalActor::_name [protected]

The name of the actor as it will be displayed upon the screen.

Definition at line 487 of file global_actors.h.

Referenced by GetName(), hoa_global::GlobalCharacter::GlobalCharacter(), and hoa_global::GlobalEnemy::GlobalEnemy().

uint32 hoa_global::GlobalActor::_protection [protected]

Used to determine the actor's metaphysical defense rating.

Definition at line 522 of file global_actors.h.

Referenced by _CalculateDefenseRatings(), AddProtection(), GetProtection(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetProtection().

uint32 hoa_global::GlobalActor::_skill_points [protected]

The current number of skill points that the actor has.

Definition at line 507 of file global_actors.h.

Referenced by AddMaxSkillPoints(), AddSkillPoints(), GetSkillPoints(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), SetMaxSkillPoints(), SetSkillPoints(), and SubSkillPoints().

std::map<uint32, GlobalSkill*> hoa_global::GlobalActor::_skills [protected]

A map containing all skills that the actor can use Unlike with characters, there is no need to hold the various types of skills in seperate containers for enemies. An enemy must have at least one skill in order to do anything useful in battle.

Definition at line 567 of file global_actors.h.

Referenced by hoa_global::GlobalEnemy::AddSkill(), hoa_global::GlobalCharacter::AddSkill(), GetSkill(), GetSkills(), hoa_global::GlobalEnemy::Initialize(), and ~GlobalActor().

uint32 hoa_global::GlobalActor::_strength [protected]

Used to determine the actor's physical attack rating.

Definition at line 513 of file global_actors.h.

Referenced by _CalculateAttackRatings(), AddStrength(), GetStrength(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetStrength().

uint32 hoa_global::GlobalActor::_total_metaphysical_attack [protected]

The sum of the character's vigor and their weapon's metaphysical attack.

Definition at line 535 of file global_actors.h.

Referenced by _CalculateAttackRatings(), and GetTotalMetaphysicalAttack().

uint32 hoa_global::GlobalActor::_total_physical_attack [protected]

The sum of the character's strength and their weapon's physical attack.

Definition at line 532 of file global_actors.h.

Referenced by _CalculateAttackRatings(), and GetTotalPhysicalAttack().

uint32 hoa_global::GlobalActor::_vigor [protected]

Used to determine the actor's metaphysical attack rating.

Definition at line 516 of file global_actors.h.

Referenced by _CalculateAttackRatings(), AddVigor(), GetVigor(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), hoa_global::GlobalEnemy::Initialize(), and SetVigor().

GlobalWeapon* hoa_global::GlobalActor::_weapon_equipped [protected]

The weapon that the actor has equipped.

Note:
If no weapon is equipped, this member will be equal to NULL.
Actors are not required to have weapons equipped, and indeed most enemies will probably not have any weapons explicitly equipped. The various bonuses to attack ratings, elemental attacks, and status attacks are automatically added to the appropriate members of this class when the weapon is equipped, and likewise those bonuses are removed when the weapon is unequipped.

Definition at line 550 of file global_actors.h.

Referenced by _CalculateAttackRatings(), EquipWeapon(), GetWeaponEquipped(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), and ~GlobalActor().


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 23:14:07 2007 for Hero of Allacrost by  doxygen 1.5.1