Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 (void)=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 (void)

Protected Attributes

int dist

Classes

struct  tavalues

Constructor & Destructor Documentation

tfight::tfight void   )  [protected]
 

Definition at line 137 of file attack.cpp.


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 142 of file attack.cpp.

References actmap, 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, GameMap::getgameparameter(), tfight::tavalues::hemming, tfight::tavalues::kamikaze, maxunitexperience, tfight::tavalues::strength, AttackFormula::strength_attackbonus(), AttackFormula::strength_damage(), AttackFormula::strength_experience(), warning(), and tfight::tavalues::weapcount.

Referenced by trunreplay::execnextreplaymove(), VehicleAttack::execute(), GuiFunctions::AttackGui::getName(), and BaseVehicleMovement::moveunitxy().

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.

virtual void tfight::setresult void   )  [pure virtual]
 

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

Implemented in tunitattacksunit, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.

Referenced by VehicleAttack::execute().

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().


Member Data Documentation

struct tfight::tavalues tfight::av
 

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

int tfight::dist [protected]
 

Definition at line 81 of file attack.h.

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

struct tfight::tavalues tfight::dv
 

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:21:30 2008 for Advanced Strategic Command by  doxygen 1.4.2