tfight Class Reference

#include <attack.h>

Inheritance diagram for tfight:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void calc (void)
 Performs the calculation of the attack. The result is only stored in the av and dv structures and is not written to the map.
virtual void setresult (const Context &context)=0
 Writes the result of the attack calculation to the actual units.
virtual void visit (FightVisitor &visitor)=0
virtual int getAttackingPlayer ()=0
virtual int getDefendingPlayer ()=0

Public Attributes

tfight::tavalues av
tfight::tavalues dv

Protected Member Functions

 tfight (GameMap *gamemap)

Protected Attributes

int dist

Classes

struct  tavalues

Detailed Description

Definition at line 81 of file attack.h.


Constructor & Destructor Documentation

tfight::tfight ( GameMap gamemap  )  [inline, protected]

Definition at line 84 of file attack.h.


Member Function Documentation

void tfight::calc ( void   ) 

Performs the calculation of the attack. The result is only stored in the av and dv structures and is not written to the map.

Definition at line 151 of file attack.cpp.

References tfight::tavalues::armor, tfight::tavalues::attackbonus, av, cgp_attackPower, tfight::tavalues::damage, AttackFormula::defense_defensebonus(), AttackFormula::defense_experience(), tfight::tavalues::defensebonus, dv, tfight::tavalues::experience, AttackFormula::gamemap, GameMap::getgameparameter(), tfight::tavalues::hemming, tfight::tavalues::kamikaze, maxunitexperience, tfight::tavalues::strength, AttackFormula::strength_attackbonus(), AttackFormula::strength_damage(), AttackFormula::strength_experience(), warningMessage(), and tfight::tavalues::weapcount.

Referenced by trunreplay::execnextreplaymove(), and GuiFunctions::AttackGui::getName().

virtual void tfight::setresult ( const Context context  )  [pure virtual]

Writes the result of the attack calculation to the actual units.

Implemented in tunitattacksunit, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.

virtual void tfight::visit ( FightVisitor visitor  )  [pure virtual]

Implemented in tunitattacksunit, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.

Referenced by BattleSoundPlayer::BattleSoundPlayer(), GetAttackerImage::GetAttackerImage(), GetTargetImage::GetTargetImage(), and BattleSoundPlayer::playEnd().

virtual int tfight::getAttackingPlayer (  )  [pure virtual]

Implemented in UnitAttacksSomething, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.

virtual int tfight::getDefendingPlayer (  )  [pure virtual]

Implemented in tunitattacksunit, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.


Member Data Documentation

int tfight::dist [protected]

Definition at line 84 of file attack.h.

Referenced by tunitattacksobject::setup(), tmineattacksunit::setup(), tunitattacksbuilding::setup(), and tunitattacksunit::setup().

struct tfight::tavalues tfight::av

Referenced by tsearchreactionfireingunits::attack(), AttackPanel::AttackPanel(), calc(), trunreplay::execnextreplaymove(), GuiFunctions::AttackGui::getName(), AttackPanel::painter(), tunitattacksobject::setresult(), tunitattacksbuilding::setresult(), tunitattacksunit::setresult(), and tmineattacksunit::setup().

struct tfight::tavalues tfight::dv

Referenced by tsearchreactionfireingunits::attack(), AttackPanel::AttackPanel(), calc(), trunreplay::execnextreplaymove(), GuiFunctions::AttackGui::getName(), AttackPanel::painter(), tunitattacksobject::setresult(), tmineattacksunit::setresult(), tunitattacksbuilding::setresult(), tunitattacksunit::setresult(), tmineattacksunit::setup(), and BattleSoundPlayer::visit().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:48 2012 for Advanced Strategic Command by  doxygen 1.5.1