Advanced Strategic Command
Public Member Functions | List of all members
tunitattacksbuilding Class Reference

#include <attack.h>

Inheritance diagram for tunitattacksbuilding:
Inheritance graph
[legend]

Public Member Functions

int getAttackingPlayer ()
 
int getDefendingPlayer ()
 
 tunitattacksbuilding (Vehicle *attackingunit, int x, int y, int weapon=-1)
 
void setup (Vehicle *attackingunit, int x, int y, int weapon)
 
void setresult (const Context &context)
 Writes the result of the attack calculation to the actual units. More...
 
void visit (FightVisitor &visitor)
 
BuildinggetTarget ()
 
- Public Member Functions inherited from UnitAttacksSomething
VehiclegetAttackingUnit ()
 
- Public Member Functions inherited from tfight
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...
 
- 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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from AttackFormula
static float getHemmingFactor (int relDir)
 
- Public Attributes inherited from tfight
struct tfight::tavalues av
 
struct tfight::tavalues dv
 
- Static Public Attributes inherited from AttackFormula
static const int experienceIcons = 24
 
- Protected Member Functions inherited from UnitAttacksSomething
 UnitAttacksSomething (GameMap *gamemap)
 
- Protected Member Functions inherited from tfight
 tfight (GameMap *gamemap)
 
- Protected Attributes inherited from UnitAttacksSomething
Vehicle_attackingunit
 
- Protected Attributes inherited from tfight
int dist
 
- Protected Attributes inherited from AttackFormula
GameMapgamemap
 

Detailed Description

Definition at line 180 of file attack.h.

Constructor & Destructor Documentation

tunitattacksbuilding::tunitattacksbuilding ( Vehicle attackingunit,
int  x,
int  y,
int  weapon = -1 
)

Calculates the fight if one unit attacks the building at coordinate x/y.

Parameters
weaponThe number of the weapon which the attacking unit attacks with. If it is -1, the best weapon is chosen.

Definition at line 509 of file attack.cpp.

References setup().

Member Function Documentation

int tunitattacksbuilding::getAttackingPlayer ( )
inlinevirtual

Reimplemented from UnitAttacksSomething.

Definition at line 185 of file attack.h.

References UnitAttacksSomething::_attackingunit, and ContainerBase::getOwner().

int tunitattacksbuilding::getDefendingPlayer ( )
inlinevirtual

Implements tfight.

Definition at line 189 of file attack.h.

References ContainerBase::getOwner().

Building* tunitattacksbuilding::getTarget ( )
inline

Definition at line 205 of file attack.h.

Referenced by GetTargetImage::visit().

void tunitattacksbuilding::setresult ( const Context context)
virtual
void tunitattacksbuilding::setup ( Vehicle attackingunit,
int  x,
int  y,
int  weapon 
)
void tunitattacksbuilding::visit ( FightVisitor visitor)
inlinevirtual

Implements tfight.

Definition at line 201 of file attack.h.

References FightVisitor::visit().


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