#include <global_skills.h>
Collaboration diagram for hoa_global::GlobalSkill:

Public Member Functions | ||||
| void | BattleExecute (hoa_battle::private_battle::BattleActor *target, hoa_battle::private_battle::BattleActor *instigator) | |||
| Calls the script function which executes the skill for battles. | ||||
| GlobalSkill (uint32 id) | ||||
| ||||
| bool | IsExecutableInBattle () const | |||
| Returns true if the skill can be executed in battles. | ||||
| bool | IsExecutableInMenu () const | |||
| Returns true if the skill can be executed in menus. | ||||
| void | MenuExecute (GlobalCharacter *target, GlobalCharacter *instigator) | |||
| Calls the script function which executes the skill for menus. | ||||
| ~GlobalSkill () | ||||
Class member access functions | ||||
| ||||
| uint32 | GetCooldownTime () const | |||
| hoa_utils::ustring | GetDescription () const | |||
| uint32 | GetID () const | |||
| hoa_utils::ustring | GetName () const | |||
| uint32 | GetSPRequired () const | |||
| GLOBAL_TARGET | GetTargetType () const | |||
| uint8 | GetType () const | |||
| GLOBAL_USE | GetUsage () const | |||
| uint32 | GetWarmupTime () const | |||
| bool | IsTargetAlly () const | |||
Private Attributes | ||||
| ScriptObject * | _battle_execute_function | |||
| A pointer to the skill's execution function for battles. | ||||
| uint32 | _cooldown_time | |||
| The amount of time that must expire after a skill can be used before the actor can regain their stamina After a character or enemy uses a skill, this member tells how many milliseconds must pass before the invoker can recover and begin re-filling their stamina bar. It is acceptable for this member to be zero. | ||||
| hoa_utils::ustring | _description | |||
| A short description of the skill. | ||||
| uint32 | _id | |||
| The unique identifier number of the skill. | ||||
| ScriptObject * | _menu_execute_function | |||
| A pointer to the skill's execution function for menus. | ||||
| hoa_utils::ustring | _name | |||
| The name of the skill as it will be displayed on the screen. | ||||
| uint32 | _sp_required | |||
| The amount of skill points (SP) that the skill requires to be used Zero is a valid value for this member and simply means that no skill points are required to use the skill. These are called "innate skills". | ||||
| bool | _target_ally | |||
| If set to true, the target should be an ally. If not, the target should be a foe. | ||||
| GLOBAL_TARGET | _target_type | |||
| The type of target that the skill is executed upon. | ||||
| GLOBAL_SKILL | _type | |||
| The type identifier for the skill Refer to the Skill Types constants defined in this file. | ||||
| GLOBAL_USE | _usage | |||
| Indicates when the skill may be used (in battles, menus, etc.). | ||||
| uint32 | _warmup_time | |||
| The amount of time that must expire before a skill can be used from when it is selected When a character or enemy is determined to use a skill, this member tells how many milliseconds must pass before the skill can be used (in otherwords, before it can be placed in the action queue in a battle). It is acceptable for this member to be zero. | ||||
****************************************************************************
Skills are one representation of actions that a character or enemy may take in battle. The actual execution of a skill is done by a Lua function, which this class manages pointers to. Typically skills are not shared between characters and enemies, primarily because characters are fully animated when executing actions, while enemies are not animated. Skills can be used in contexts other than battles. For instance, using a healing skill on the party from the character management menu.
There are three types of skills: attack, defend, and support. The way that this class is initialized is by defining the "script ID" of the skill. When this information is known, it seeks a Lua file that contains the data to set the members of this class as well as the script functions that actually perform the execution of the skill.
Definition at line 266 of file global_skills.h.
| hoa_global::GlobalSkill::GlobalSkill | ( | uint32 | id | ) |
| id | The identification number of the skill to construct |
Definition at line 106 of file global_skills.cpp.
References hoa_global::GameGlobal::_attack_skills_script, _battle_execute_function, _cooldown_time, hoa_global::GameGlobal::_defend_skills_script, _description, _id, _menu_execute_function, _name, _sp_required, hoa_global::GameGlobal::_support_skills_script, _target_ally, _target_type, _type, _usage, _warmup_time, hoa_script::ReadScriptDescriptor::CloseTable(), hoa_script::ReadScriptDescriptor::DoesFunctionExist(), hoa_script::ReadScriptDescriptor::DoesStringExist(), hoa_script::ReadScriptDescriptor::DoesTableExist(), hoa_script::ScriptDescriptor::GetErrorMessages(), hoa_global::GLOBAL_DEBUG, hoa_global::GLOBAL_SKILL_ATTACK, hoa_global::GLOBAL_SKILL_DEFEND, hoa_global::GLOBAL_SKILL_INVALID, hoa_global::GLOBAL_SKILL_SUPPORT, hoa_global::GLOBAL_USE_ALL, hoa_global::GLOBAL_USE_BATTLE, hoa_global::GLOBAL_USE_INVALID, hoa_global::GLOBAL_USE_MENU, hoa_global::GlobalManager, hoa_script::ScriptDescriptor::IsErrorDetected(), hoa_utils::MakeUnicodeString(), hoa_global::private_global::MAX_ATTACK_ID, hoa_global::private_global::MAX_DEFEND_ID, hoa_global::private_global::MAX_SUPPORT_ID, hoa_script::ReadScriptDescriptor::OpenTable(), hoa_script::ReadScriptDescriptor::ReadBool(), hoa_script::ReadScriptDescriptor::ReadFunctionPointer(), hoa_script::ReadScriptDescriptor::ReadInt(), hoa_script::ReadScriptDescriptor::ReadString(), hoa_script::ReadScriptDescriptor::ReadUInt(), and ScriptObject.
Here is the call graph for this function:

| hoa_global::GlobalSkill::~GlobalSkill | ( | ) |
Definition at line 185 of file global_skills.cpp.
References _battle_execute_function, and _menu_execute_function.
| void hoa_global::GlobalSkill::BattleExecute | ( | hoa_battle::private_battle::BattleActor * | target, | |
| hoa_battle::private_battle::BattleActor * | instigator | |||
| ) |
Calls the script function which executes the skill for battles.
| target | A pointer to the target of the skill | |
| instigator | A pointer to the instigator whom is executing the skill |
Definition at line 209 of file global_skills.cpp.
References _battle_execute_function, _id, _sp_required, hoa_battle::private_battle::BattleActor::GetSkillPoints(), hoa_global::GLOBAL_DEBUG, and IsExecutableInBattle().
Referenced by hoa_battle::private_battle::ScriptEvent::RunScript().
Here is the call graph for this function:

| uint32 hoa_global::GlobalSkill::GetCooldownTime | ( | ) | const [inline] |
| hoa_utils::ustring hoa_global::GlobalSkill::GetDescription | ( | ) | const [inline] |
Definition at line 303 of file global_skills.h.
References _description.
Referenced by hoa_menu::private_menu::SkillsWindow::Update().
| uint32 hoa_global::GlobalSkill::GetID | ( | ) | const [inline] |
Definition at line 306 of file global_skills.h.
References _id.
Referenced by hoa_global::GlobalCharacterGrowth::_AddSkill(), hoa_global::GlobalEnemy::AddSkill(), hoa_global::GlobalCharacter::AddSkill(), and hoa_global::GlobalActor::GetSkill().
| hoa_utils::ustring hoa_global::GlobalSkill::GetName | ( | ) | const [inline] |
Definition at line 300 of file global_skills.h.
References _name.
Referenced by hoa_menu::private_menu::SkillsWindow::Draw().
| uint32 hoa_global::GlobalSkill::GetSPRequired | ( | ) | const [inline] |
Definition at line 312 of file global_skills.h.
References _sp_required.
Referenced by hoa_battle::private_battle::ScriptEvent::RunScript().
| GLOBAL_TARGET hoa_global::GlobalSkill::GetTargetType | ( | ) | const [inline] |
Definition at line 324 of file global_skills.h.
References _target_type.
Referenced by hoa_battle::private_battle::ScriptEvent::RunScript().
| uint8 hoa_global::GlobalSkill::GetType | ( | ) | const [inline] |
Definition at line 309 of file global_skills.h.
References _type.
Referenced by hoa_global::GlobalCharacter::AddSkill().
| GLOBAL_USE hoa_global::GlobalSkill::GetUsage | ( | ) | const [inline] |
| uint32 hoa_global::GlobalSkill::GetWarmupTime | ( | ) | const [inline] |
Definition at line 315 of file global_skills.h.
References _warmup_time.
Referenced by hoa_battle::private_battle::ScriptEvent::ScriptEvent().
| bool hoa_global::GlobalSkill::IsExecutableInBattle | ( | ) | const [inline] |
Returns true if the skill can be executed in battles.
Definition at line 274 of file global_skills.h.
References _usage, hoa_global::GLOBAL_USE_ALL, and hoa_global::GLOBAL_USE_BATTLE.
Referenced by BattleExecute().
| bool hoa_global::GlobalSkill::IsExecutableInMenu | ( | ) | const [inline] |
Returns true if the skill can be executed in menus.
Definition at line 278 of file global_skills.h.
References _usage, hoa_global::GLOBAL_USE_ALL, and hoa_global::GLOBAL_USE_MENU.
Referenced by MenuExecute().
| bool hoa_global::GlobalSkill::IsTargetAlly | ( | ) | const [inline] |
| void hoa_global::GlobalSkill::MenuExecute | ( | GlobalCharacter * | target, | |
| GlobalCharacter * | instigator | |||
| ) |
Calls the script function which executes the skill for menus.
| target | A pointer to the target of the skill | |
| instigator | A pointer to the instigator whom is executing the skill |
Definition at line 229 of file global_skills.cpp.
References _id, _menu_execute_function, _sp_required, hoa_global::GlobalActor::GetSkillPoints(), hoa_global::GLOBAL_DEBUG, and IsExecutableInMenu().
Here is the call graph for this function:

ScriptObject* hoa_global::GlobalSkill::_battle_execute_function [private] |
A pointer to the skill's execution function for battles.
Definition at line 396 of file global_skills.h.
Referenced by BattleExecute(), GlobalSkill(), and ~GlobalSkill().
The amount of time that must expire after a skill can be used before the actor can regain their stamina After a character or enemy uses a skill, this member tells how many milliseconds must pass before the invoker can recover and begin re-filling their stamina bar. It is acceptable for this member to be zero.
Definition at line 369 of file global_skills.h.
Referenced by GetCooldownTime(), and GlobalSkill().
A short description of the skill.
Definition at line 342 of file global_skills.h.
Referenced by GetDescription(), and GlobalSkill().
uint32 hoa_global::GlobalSkill::_id [private] |
The unique identifier number of the skill.
Definition at line 345 of file global_skills.h.
Referenced by BattleExecute(), GetID(), GlobalSkill(), and MenuExecute().
ScriptObject* hoa_global::GlobalSkill::_menu_execute_function [private] |
A pointer to the skill's execution function for menus.
Definition at line 399 of file global_skills.h.
Referenced by GlobalSkill(), MenuExecute(), and ~GlobalSkill().
The name of the skill as it will be displayed on the screen.
Definition at line 339 of file global_skills.h.
Referenced by GetName(), and GlobalSkill().
uint32 hoa_global::GlobalSkill::_sp_required [private] |
The amount of skill points (SP) that the skill requires to be used Zero is a valid value for this member and simply means that no skill points are required to use the skill. These are called "innate skills".
Definition at line 356 of file global_skills.h.
Referenced by BattleExecute(), GetSPRequired(), GlobalSkill(), and MenuExecute().
bool hoa_global::GlobalSkill::_target_ally [private] |
If set to true, the target should be an ally. If not, the target should be a foe.
Definition at line 378 of file global_skills.h.
Referenced by GlobalSkill(), and IsTargetAlly().
The type of target that the skill is executed upon.
Definition at line 375 of file global_skills.h.
Referenced by GetTargetType(), and GlobalSkill().
GLOBAL_SKILL hoa_global::GlobalSkill::_type [private] |
The type identifier for the skill Refer to the Skill Types constants defined in this file.
Definition at line 350 of file global_skills.h.
Referenced by GetType(), and GlobalSkill().
GLOBAL_USE hoa_global::GlobalSkill::_usage [private] |
Indicates when the skill may be used (in battles, menus, etc.).
Definition at line 372 of file global_skills.h.
Referenced by GetUsage(), GlobalSkill(), IsExecutableInBattle(), and IsExecutableInMenu().
uint32 hoa_global::GlobalSkill::_warmup_time [private] |
The amount of time that must expire before a skill can be used from when it is selected When a character or enemy is determined to use a skill, this member tells how many milliseconds must pass before the skill can be used (in otherwords, before it can be placed in the action queue in a battle). It is acceptable for this member to be zero.
Definition at line 363 of file global_skills.h.
Referenced by GetWarmupTime(), and GlobalSkill().
1.5.1