Advanced Strategic Command
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
tfight Class Referenceabstract

#include <attack.h>

Inheritance diagram for tfight:
Inheritance graph
[legend]

Classes

struct  tavalues
 

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. More...
 
virtual void setresult (const Context &context)=0
 Writes the result of the attack calculation to the actual units. More...
 
virtual void visit (FightVisitor &visitor)=0
 
virtual int getAttackingPlayer ()=0
 
virtual int getDefendingPlayer ()=0
 
- Public Member Functions inherited from AttackFormula
 AttackFormula (GameMap *gamemap)
 
float strength_experience (int experience)
 
float strength_damage (int damage)
 
float strength_attackbonus (int abonus)
 
float strength_hemming (int ax, int ay, Vehicle *d_eht)
 
float defense_experience (int experience)
 
float defense_defensebonus (int defensebonus)
 
int getIconIndex (int experience, bool offensive)
 
virtual ~AttackFormula ()
 

Public Attributes

struct tfight::tavalues av
 
struct tfight::tavalues dv
 

Protected Member Functions

 tfight (GameMap *gamemap)
 

Protected Attributes

int dist
 
- Protected Attributes inherited from AttackFormula
GameMapgamemap
 

Additional Inherited Members

- Static Public Member Functions inherited from AttackFormula
static float getHemmingFactor (int relDir)
 
- Static Public Attributes inherited from AttackFormula
static const int experienceIcons = 24
 

Detailed Description

Definition at line 83 of file attack.h.

Constructor & Destructor Documentation

tfight::tfight ( GameMap gamemap)
inlineprotected

Definition at line 86 of file attack.h.

Member Function Documentation

void tfight::calc ( void  )
virtual int tfight::getAttackingPlayer ( )
pure virtual
virtual int tfight::getDefendingPlayer ( )
pure virtual
virtual void tfight::setresult ( const Context context)
pure virtual

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

Implemented in tunitattacksobject, tmineattacksunit, tunitattacksbuilding, and tunitattacksunit.

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

Member Data Documentation

struct tfight::tavalues tfight::av
int tfight::dist
protected
struct tfight::tavalues tfight::dv

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