hoa_battle::private_battle::ScriptEvent Class Reference

Representation of a single, scripted action to be executed in battle. More...

#include <battle.h>

Collaboration diagram for hoa_battle::private_battle::ScriptEvent:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void RunScript ()
 Executes the script.
 ScriptEvent (BattleActor *source, BattleActor *target, hoa_global::GlobalSkill *skill, hoa_global::GlobalAttackPoint *attack_point=NULL)
 ScriptEvent (BattleActor *source, BattleActor *target, hoa_global::GlobalItem *item, hoa_global::GlobalAttackPoint *attack_point=NULL, uint32 warm_up_time=ITEM_WARM_UP_TIME)
void Update ()
 Updates the script.
 ~ScriptEvent ()
Class member access functions
hoa_global::GlobalItemGetItem ()
hoa_global::GlobalSkillGetSkill ()
BattleActorGetSource ()
BattleActorGetTarget ()
hoa_system::SystemTimerGetWarmUpTime ()

Private Attributes

hoa_global::GlobalAttackPoint_attack_point
 The selected attack point (if applicable).
hoa_global::GlobalItem_item
 Pointer to the item attached to this script (for item events only).
std::string _script_name
 The name of the executing script.
hoa_global::GlobalSkill_skill
 Pointer to the skill attached to this script (for skill events only).
BattleActor_source
 The actor whom is initiating this script.
BattleActor_target
 The targets of the script.
hoa_system::SystemTimer _warm_up_time
 The amount of time to wait to execute the script.

Detailed Description

Representation of a single, scripted action to be executed in battle.

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

Definition at line 132 of file battle.h.


Constructor & Destructor Documentation

hoa_battle::private_battle::ScriptEvent::ScriptEvent ( BattleActor source,
BattleActor target,
hoa_global::GlobalItem item,
hoa_global::GlobalAttackPoint attack_point = NULL,
uint32  warm_up_time = ITEM_WARM_UP_TIME 
)

Definition at line 85 of file battle.cpp.

References _warm_up_time, hoa_system::SystemTimer::Initialize(), and hoa_system::SystemTimer::Run().

Here is the call graph for this function:

hoa_battle::private_battle::ScriptEvent::ScriptEvent ( BattleActor source,
BattleActor target,
hoa_global::GlobalSkill skill,
hoa_global::GlobalAttackPoint attack_point = NULL 
)

Definition at line 73 of file battle.cpp.

References _warm_up_time, hoa_global::GlobalSkill::GetWarmupTime(), hoa_system::SystemTimer::Initialize(), and hoa_system::SystemTimer::Run().

Here is the call graph for this function:

hoa_battle::private_battle::ScriptEvent::~ScriptEvent (  ) 

Definition at line 111 of file battle.cpp.


Member Function Documentation

hoa_global::GlobalItem* hoa_battle::private_battle::ScriptEvent::GetItem (  )  [inline]

Definition at line 155 of file battle.h.

References _item.

hoa_global::GlobalSkill* hoa_battle::private_battle::ScriptEvent::GetSkill (  )  [inline]

Definition at line 158 of file battle.h.

References _skill.

BattleActor* hoa_battle::private_battle::ScriptEvent::GetSource (  )  [inline]

Definition at line 146 of file battle.h.

References _source.

BattleActor* hoa_battle::private_battle::ScriptEvent::GetTarget (  )  [inline]

Definition at line 152 of file battle.h.

References _target.

hoa_system::SystemTimer* hoa_battle::private_battle::ScriptEvent::GetWarmUpTime (  )  [inline]

Definition at line 149 of file battle.h.

References _warm_up_time.

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

void hoa_battle::private_battle::ScriptEvent::RunScript (  ) 

Executes the script.

Definition at line 128 of file battle.cpp.

References _attack_point, _item, _skill, _source, _target, hoa_global::GlobalSkill::BattleExecute(), hoa_global::GlobalItem::BattleUse(), hoa_battle::private_battle::BattleActor::CalcEvade(), hoa_battle::private_battle::BattleCharacterActor::CalcEvade(), hoa_battle::private_battle::BattleEnemyActor::CalcEvade(), hoa_battle::private_battle::BattleActor::CalcMetaPhysicalAttack(), hoa_battle::private_battle::BattleActor::CalcMetaPhysicalDefense(), hoa_battle::private_battle::BattleCharacterActor::CalcMetaPhysicalDefense(), hoa_battle::private_battle::BattleActor::CalcPhysicalAttack(), hoa_battle::private_battle::BattleActor::CalcPhysicalDefense(), hoa_battle::private_battle::BattleCharacterActor::CalcPhysicalDefense(), hoa_battle::private_battle::current_battle, hoa_global::GlobalObject::GetCount(), hoa_battle::BattleMode::GetEnemyActorAt(), hoa_global::GlobalObject::GetID(), hoa_battle::BattleMode::GetNumberOfCharacters(), hoa_battle::BattleMode::GetNumberOfEnemies(), hoa_battle::BattleMode::GetPlayerCharacterAt(), hoa_battle::private_battle::BattleActor::GetSkillPoints(), hoa_global::GlobalSkill::GetSPRequired(), hoa_global::GlobalSkill::GetTargetType(), hoa_global::GlobalItem::GetTargetType(), hoa_global::GLOBAL_TARGET_PARTY, hoa_global::GlobalManager, hoa_battle::private_battle::BattleActor::IsAlive(), hoa_battle::private_battle::BattleActor::IsEnemy(), hoa_global::GameGlobal::RemoveFromInventory(), hoa_battle::private_battle::BattleActor::SetSkillPoints(), and hoa_battle::private_battle::BattleActor::TEMP_ResetAttackTimer().

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

Here is the call graph for this function:

void hoa_battle::private_battle::ScriptEvent::Update (  ) 

Updates the script.

Definition at line 116 of file battle.cpp.

References _source, _warm_up_time, hoa_system::SystemTimer::GetDuration(), hoa_battle::private_battle::BattleActor::GetTimePortraitLocation(), hoa_system::GameSystem::GetUpdateTime(), hoa_system::SystemTimer::IsRunning(), hoa_battle::private_battle::BattleActor::SetTimePortraitLocation(), and hoa_system::SystemManager.

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

Here is the call graph for this function:


Member Data Documentation

hoa_global::GlobalAttackPoint* hoa_battle::private_battle::ScriptEvent::_attack_point [private]

The selected attack point (if applicable).

Definition at line 192 of file battle.h.

Referenced by RunScript().

hoa_global::GlobalItem* hoa_battle::private_battle::ScriptEvent::_item [private]

Pointer to the item attached to this script (for item events only).

Definition at line 189 of file battle.h.

Referenced by GetItem(), and RunScript().

std::string hoa_battle::private_battle::ScriptEvent::_script_name [private]

The name of the executing script.

Definition at line 180 of file battle.h.

hoa_global::GlobalSkill* hoa_battle::private_battle::ScriptEvent::_skill [private]

Pointer to the skill attached to this script (for skill events only).

Definition at line 186 of file battle.h.

Referenced by GetSkill(), and RunScript().

BattleActor* hoa_battle::private_battle::ScriptEvent::_source [private]

The actor whom is initiating this script.

Definition at line 183 of file battle.h.

Referenced by GetSource(), RunScript(), and Update().

BattleActor* hoa_battle::private_battle::ScriptEvent::_target [private]

The targets of the script.

Definition at line 197 of file battle.h.

Referenced by GetTarget(), and RunScript().

hoa_system::SystemTimer hoa_battle::private_battle::ScriptEvent::_warm_up_time [private]

The amount of time to wait to execute the script.

Definition at line 203 of file battle.h.

Referenced by GetWarmUpTime(), ScriptEvent(), and Update().


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