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

tunitattacksbuilding Class Reference

#include <attack.h>

Inheritance diagram for tunitattacksbuilding:

Inheritance graph
[legend]
List of all members.

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 (void)
 Writes the result of the attack calculation to the actual units.
void visit (FightVisitor &visitor)
BuildinggetTarget ()

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:
weapon The number of the weapon which the attacking unit attacks with. If it is -1, the best weapon is chosen.

Definition at line 407 of file attack.cpp.

References setup().


Member Function Documentation

int tunitattacksbuilding::getAttackingPlayer  )  [inline, virtual]
 

Reimplemented from UnitAttacksSomething.

Definition at line 176 of file attack.h.

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

int tunitattacksbuilding::getDefendingPlayer  )  [inline, virtual]
 

Implements tfight.

Definition at line 180 of file attack.h.

References ContainerBase::getOwner().

Building* tunitattacksbuilding::getTarget  )  [inline]
 

Definition at line 196 of file attack.h.

Referenced by GetTargetImage::visit().

void tunitattacksbuilding::setresult void   )  [virtual]
 

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

Implements tfight.

Definition at line 491 of file attack.cpp.

References UnitAttacksSomething::_attackingunit, actmap, Vehicle::ammo, tfight::av, tfight::tavalues::damage, ContainerBase::damage, tfight::dv, GameTime::move(), Vehicle::postAttack(), GameTime::set(), GameMap::time, GameTime::turn(), tfight::tavalues::weapcount, and tfight::tavalues::weapnum.

Referenced by trunreplay::execnextreplaymove().

void tunitattacksbuilding::setup Vehicle attackingunit,
int  x,
int  y,
int  weapon
 

Definition at line 413 of file attack.cpp.

References UnitAttacksSomething::_attackingunit, Vehicle::ammo, tfight::tavalues::armor, tfight::tavalues::attackbonus, attackpossible(), tfight::av, beeline(), BuildingType::buildingheight, chfahrend, cmm_building, tfight::tavalues::color, ContainerBase::damage, tfight::tavalues::damage, tfight::tavalues::defensebonus, tfight::dist, tfight::dv, Vehicle::experience, tfight::tavalues::experience, Building::getArmor(), Vehicle::getArmor(), tfield::getattackbonus(), tfield::getdefensebonus(), getfield(), ContainerBase::getOwner(), SingleWeapon::getScalarWeaponType(), WeapDist::getWeaponStrength(), ContainerBaseType::hasFunction(), tfight::tavalues::height, Vehicle::height, tfight::tavalues::hemming, Vehicletype::initiative, tfight::tavalues::initiative, tfight::tavalues::kamikaze, ContainerBaseType::KamikazeOnly, AttackWeap::num, tfight::tavalues::strength, AttackWeap::strength, SingleWeapon::targetingAccuracy, Building::typ, Vehicle::typ, tfight::tavalues::weapcount, tfight::tavalues::weapnum, UnitWeapon::weapon, Vehicletype::weapons, tfight::tavalues::weapontype, Vehicle::weapstrength, Vehicle::xpos, and Vehicle::ypos.

Referenced by tunitattacksbuilding().

void tunitattacksbuilding::visit FightVisitor visitor  )  [inline, virtual]
 

Implements tfight.

Definition at line 192 of file attack.h.

References FightVisitor::visit().


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