Planeshift
psAttack Class Reference

Represents an Attack. More...

#include <psattack.h>

Public Member Functions

virtual void Affect (psCombatAttackGameEvent *event)
 Once the combat event is called, this meathod runs preattack checks and runs all calculations needed before the combat event is applied. More...
 
bool Attack (gemActor *attacker, gemActor *target, INVENTORY_SLOT_NUMBER slot)
 Schedules an attack. More...
 
bool CanAttack (Client *client)
 This is a check to see if the attack can be used by the character. More...
 
const csString & GetDescription () const
 Gets the attack description. More...
 
int GetID () const
 gets the id More...
 
const csString & GetImage () const
 Gets the attack icon string. More...
 
const csString & GetName () const
 Gets the Name. More...
 
psAttackTypeGetType () const
 
bool Load (iResultRow &row)
 Initialize the attack from the database entry. More...
 
 psAttack ()
 
 ~psAttack ()
 

Protected Member Functions

void AffectTarget (gemActor *target, psCombatAttackGameEvent *event, int attack_result)
 
int CalculateAttack (psCombatAttackGameEvent *event, psItem *subWeapon=NULL)
 

Protected Attributes

csString animation
 possible attack animation More...
 
MathExpressionaoeAngle
 AOE Angle: (Power, WaySkill, RelatedStat) -> Degrees. More...
 
MathExpressionaoeRadius
 AOE Radius: (Power, WaySkill, RelatedStat) -> Meters. More...
 
MathExpressionattackDelay
 Delay in milliseconds before attack "hits" or has an effect. More...
 
MathExpressionattackRange
 The Max Range of the attack (Meters) More...
 
MathScriptdamage_script
 Chance of Success. More...
 
csString description
 the attack description More...
 
int id
 The stored ID of the attack. More...
 
csString image
 the address/id of the icon for the attack More...
 
csString name
 The stored name of the attack. More...
 
ProgressionScriptoutcome
 The progression script: (Power, Caster, Target) -> (side effects) More...
 
csRef< psQuestPrereqOprequirements
 all non weapon based attack requirements. More...
 
psAttackTypetype
 the attack type More...
 
csRef< psQuestPrereqOpTypeRequirements
 all Attack Type based requirements(not handled as a script) More...
 

Detailed Description

Represents an Attack.

This is mostly data that is cached from the database to represent what an attack is.

This is going to be very close to how a spell works but more in touch with melee and range style.

Definition at line 82 of file psattack.h.

Constructor & Destructor Documentation

psAttack::psAttack ( )
psAttack::~psAttack ( )

Member Function Documentation

virtual void psAttack::Affect ( psCombatAttackGameEvent event)
virtual

Once the combat event is called, this meathod runs preattack checks and runs all calculations needed before the combat event is applied.

void psAttack::AffectTarget ( gemActor target,
psCombatAttackGameEvent event,
int  attack_result 
)
protected
bool psAttack::Attack ( gemActor attacker,
gemActor target,
INVENTORY_SLOT_NUMBER  slot 
)

Schedules an attack.

int psAttack::CalculateAttack ( psCombatAttackGameEvent event,
psItem subWeapon = NULL 
)
protected
bool psAttack::CanAttack ( Client client)

This is a check to see if the attack can be used by the character.

const csString& psAttack::GetDescription ( ) const
inline

Gets the attack description.

Returns
attack description

Definition at line 136 of file psattack.h.

int psAttack::GetID ( ) const
inline

gets the id

Returns
the attack id

Definition at line 112 of file psattack.h.

const csString& psAttack::GetImage ( ) const
inline

Gets the attack icon string.

Returns
attack icon image string

Definition at line 128 of file psattack.h.

const csString& psAttack::GetName ( ) const
inline

Gets the Name.

Returns
returns the name of attack

Definition at line 120 of file psattack.h.

psAttackType* psAttack::GetType ( ) const
inline

Definition at line 141 of file psattack.h.

bool psAttack::Load ( iResultRow &  row)

Initialize the attack from the database entry.

Member Data Documentation

csString psAttack::animation
protected

possible attack animation

Definition at line 153 of file psattack.h.

MathExpression* psAttack::aoeAngle
protected

AOE Angle: (Power, WaySkill, RelatedStat) -> Degrees.

Definition at line 166 of file psattack.h.

MathExpression* psAttack::aoeRadius
protected

AOE Radius: (Power, WaySkill, RelatedStat) -> Meters.

Definition at line 164 of file psattack.h.

MathExpression* psAttack::attackDelay
protected

Delay in milliseconds before attack "hits" or has an effect.

Definition at line 160 of file psattack.h.

MathExpression* psAttack::attackRange
protected

The Max Range of the attack (Meters)

Definition at line 162 of file psattack.h.

MathScript* psAttack::damage_script
protected

Chance of Success.

Definition at line 168 of file psattack.h.

csString psAttack::description
protected

the attack description

Definition at line 154 of file psattack.h.

int psAttack::id
protected

The stored ID of the attack.

Definition at line 150 of file psattack.h.

csString psAttack::image
protected

the address/id of the icon for the attack

Definition at line 152 of file psattack.h.

csString psAttack::name
protected

The stored name of the attack.

Definition at line 151 of file psattack.h.

ProgressionScript* psAttack::outcome
protected

The progression script: (Power, Caster, Target) -> (side effects)

Definition at line 170 of file psattack.h.

csRef<psQuestPrereqOp> psAttack::requirements
protected

all non weapon based attack requirements.

Definition at line 156 of file psattack.h.

psAttackType* psAttack::type
protected

the attack type

Definition at line 155 of file psattack.h.

csRef<psQuestPrereqOp> psAttack::TypeRequirements
protected

all Attack Type based requirements(not handled as a script)

Definition at line 157 of file psattack.h.


The documentation for this class was generated from the following file: