#include <global_actors.h>
Inheritance diagram for hoa_global::GlobalAttackPoint:


Public Member Functions | |
| GLOBAL_TARGET | GetTargetType () |
| A pure virtual function that returns the type of target. | |
| GlobalAttackPoint (GlobalActor *actor_owner) | |
| ~GlobalAttackPoint () | |
Class Member Access Functions | |
| GlobalActor * | GetActorOwner () const |
| float | GetEvadeModifier () const |
| float | GetFortitudeModifier () const |
| hoa_utils::ustring & | GetName () |
| float | GetProtectionModifier () const |
| float | GetTotalEvadeRating () const |
| uint16 | GetTotalMetaphysicalDefense () const |
| uint16 | GetTotalPhysicalDefense () const |
| uint16 | GetXPosition () const |
| uint16 | GetYPosition () const |
Private Member Functions | |
| bool | _LoadData (hoa_script::ReadScriptDescriptor &script) |
| A vector containing all status effects that may be triggered by attacking the point This vector contains only the status effects that have a non-zero chance of affecting their target. Therefore, it is very possible that this vector may be empty. The first element in the pair is a floating point value from 0.0 to 1.0 that indicates the likelihood of success that should the attack point be successfully attacked by an opponent, the status effect becomes triggered on the enemy. Note that this likelihood does not take into account that the target may have a particular defense or immunity against the status effect. Reads in the attack point's data from a script file. | |
Private Attributes | |
| GlobalActor * | _actor_owner |
| A pointer to the actor which "owns" this attack point (i.e., the attack point is a location on the actor). | |
| hoa_utils::ustring | _name |
| The name of the attack point as is displayed on the screen Usually, this is simply the name of a body part such as "head" or "tail". More elaborate names may be chosen for special foes and bosses, however. | |
| uint16 | _x_position |
| The position of the physical attack point relative to the actor's battle sprite These members treat the bottom left corner of the sprite as the origin (0, 0) and increase in the right and upwards directions. The combination of these two members point to the center pinpoint location of the attack point. The units of these two members are in number of pixels. | |
| uint16 | _y_position |
| float | _evade_modifier |
| float | _fortitude_modifier |
| The defense and evasion percentage modifiers for this attack point. | |
| float | _protection_modifier |
| float | _total_evade_rating |
| uint16 | _total_metaphysical_defense |
| uint16 | _total_physical_defense |
| The cumunalative defense and evade stats for this attack point These totals include the actor's base stat, the percentage modifier for the attack point, and the stats of any armor that is equipped on the attack point. | |
Friends | |
| class | GlobalActor |
| class | GlobalCharacter |
| class | GlobalEnemy |
****************************************************************************
An attack point is a place where an actor may be attacked (it is not a numerical quantity). Actors may have multiple attack points, each with their own resistances and weaknesses. For example, the number of attack points on all character battle sprites is four, and they are located on the head, torso, arms, and legs. An attack point may have armor equipped to it, which would increase its defense ratings. Attack points may also have "natural" weaknesses to certain status effects. For example, attacking the legs of an actor may induce a status effect that reduces their agility
Definition at line 111 of file global_actors.h.
| hoa_global::GlobalAttackPoint::GlobalAttackPoint | ( | GlobalActor * | actor_owner | ) | [inline] |
Definition at line 117 of file global_actors.h.
| hoa_global::GlobalAttackPoint::~GlobalAttackPoint | ( | ) | [inline] |
Definition at line 120 of file global_actors.h.
| bool hoa_global::GlobalAttackPoint::_LoadData | ( | hoa_script::ReadScriptDescriptor & | script | ) | [private] |
A vector containing all status effects that may be triggered by attacking the point This vector contains only the status effects that have a non-zero chance of affecting their target. Therefore, it is very possible that this vector may be empty. The first element in the pair is a floating point value from 0.0 to 1.0 that indicates the likelihood of success that should the attack point be successfully attacked by an opponent, the status effect becomes triggered on the enemy. Note that this likelihood does not take into account that the target may have a particular defense or immunity against the status effect. Reads in the attack point's data from a script file.
| script | A reference to the open script file where to retrieve the data from |
Definition at line 36 of file global_actors.cpp.
References _evade_modifier, _fortitude_modifier, _name, _protection_modifier, _x_position, _y_position, hoa_script::ScriptDescriptor::GetErrorMessages(), hoa_global::GLOBAL_DEBUG, hoa_script::ScriptDescriptor::IsErrorDetected(), hoa_script::ScriptDescriptor::IsFileOpen(), hoa_utils::MakeUnicodeString(), hoa_script::ReadScriptDescriptor::ReadFloat(), hoa_script::ReadScriptDescriptor::ReadInt(), and hoa_script::ReadScriptDescriptor::ReadString().
Here is the call graph for this function:

| GlobalActor* hoa_global::GlobalAttackPoint::GetActorOwner | ( | ) | const [inline] |
| float hoa_global::GlobalAttackPoint::GetEvadeModifier | ( | ) | const [inline] |
Definition at line 143 of file global_actors.h.
References _evade_modifier.
Referenced by hoa_battle::private_battle::BattleEnemyActor::CalcEvade(), and hoa_battle::private_battle::BattleCharacterActor::CalcEvade().
| float hoa_global::GlobalAttackPoint::GetFortitudeModifier | ( | ) | const [inline] |
Definition at line 137 of file global_actors.h.
References _fortitude_modifier.
Referenced by hoa_battle::private_battle::BattleEnemyActor::CalcPhysicalDefense(), and hoa_battle::private_battle::BattleCharacterActor::CalcPhysicalDefense().
| hoa_utils::ustring& hoa_global::GlobalAttackPoint::GetName | ( | ) | [inline] |
| float hoa_global::GlobalAttackPoint::GetProtectionModifier | ( | ) | const [inline] |
Definition at line 140 of file global_actors.h.
References _protection_modifier.
Referenced by hoa_battle::private_battle::BattleEnemyActor::CalcMetaPhysicalDefense(), and hoa_battle::private_battle::BattleCharacterActor::CalcMetaPhysicalDefense().
| GLOBAL_TARGET hoa_global::GlobalAttackPoint::GetTargetType | ( | ) | [inline, virtual] |
A pure virtual function that returns the type of target.
Implements hoa_global::GlobalTarget.
Definition at line 123 of file global_actors.h.
References hoa_global::GLOBAL_TARGET_ATTACK_POINT.
| float hoa_global::GlobalAttackPoint::GetTotalEvadeRating | ( | ) | const [inline] |
| uint16 hoa_global::GlobalAttackPoint::GetTotalMetaphysicalDefense | ( | ) | const [inline] |
| uint16 hoa_global::GlobalAttackPoint::GetTotalPhysicalDefense | ( | ) | const [inline] |
| uint16 hoa_global::GlobalAttackPoint::GetXPosition | ( | ) | const [inline] |
| uint16 hoa_global::GlobalAttackPoint::GetYPosition | ( | ) | const [inline] |
friend class GlobalActor [friend] |
Definition at line 112 of file global_actors.h.
friend class GlobalCharacter [friend] |
Definition at line 113 of file global_actors.h.
friend class GlobalEnemy [friend] |
Definition at line 114 of file global_actors.h.
A pointer to the actor which "owns" this attack point (i.e., the attack point is a location on the actor).
Definition at line 191 of file global_actors.h.
Referenced by GetActorOwner().
float hoa_global::GlobalAttackPoint::_evade_modifier [private] |
float hoa_global::GlobalAttackPoint::_fortitude_modifier [private] |
The defense and evasion percentage modifiers for this attack point.
These are called "modifiers" because they modify the value of fortitude, protection, and evade ratings of the actor. They represent percentage change from the base stat. So for example, a fortitude modifer that is 0.25f increases the fortitude of the attack point by 25%. If the base protection rating was 10 and the protection modifier was -0.30f, the resulting protection for the attack point would be: 10 + (10 * -0.30f) = 7.
The lower bound for each modifier is -1.0f (-100%), which will result in a value of zero for that stat. No actor stats can be negative so even if the modifier drops below -1.0f, the resulting value will still be zero. There is no theoretical upper bound, but it is usually advised to keep it under 1.0f (100%).
Definition at line 185 of file global_actors.h.
Referenced by _LoadData(), and GetFortitudeModifier().
The name of the attack point as is displayed on the screen Usually, this is simply the name of a body part such as "head" or "tail". More elaborate names may be chosen for special foes and bosses, however.
Definition at line 164 of file global_actors.h.
Referenced by _LoadData(), and GetName().
float hoa_global::GlobalAttackPoint::_protection_modifier [private] |
Definition at line 186 of file global_actors.h.
Referenced by _LoadData(), and GetProtectionModifier().
float hoa_global::GlobalAttackPoint::_total_evade_rating [private] |
The cumunalative defense and evade stats for this attack point These totals include the actor's base stat, the percentage modifier for the attack point, and the stats of any armor that is equipped on the attack point.
Definition at line 198 of file global_actors.h.
Referenced by GetTotalPhysicalDefense().
The position of the physical attack point relative to the actor's battle sprite These members treat the bottom left corner of the sprite as the origin (0, 0) and increase in the right and upwards directions. The combination of these two members point to the center pinpoint location of the attack point. The units of these two members are in number of pixels.
Definition at line 171 of file global_actors.h.
Referenced by _LoadData(), and GetXPosition().
1.5.1