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

tunitattacksobject Class Reference

#include <attack.h>

Inheritance diagram for tunitattacksobject:

Inheritance graph
[legend]
List of all members.

Public Member Functions

int getAttackingPlayer ()
int getDefendingPlayer ()
 tunitattacksobject (Vehicle *attackingunit, int obj_x, int obj_y, int weapon=-1)
void setup (Vehicle *attackingunit, int obj_x, int obj_y, int weapon)
void setresult (void)
 Writes the result of the attack calculation to the actual units.
ObjectgetTarget ()
void visit (FightVisitor &visitor)

Constructor & Destructor Documentation

tunitattacksobject::tunitattacksobject Vehicle attackingunit,
int  obj_x,
int  obj_y,
int  weapon = -1
 

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

Parameters:
attackingunit the attacking unit
obj_x the X coordinate of the object on the map
obj_y the Y coordinate of the object on the map
weapon The number of the weapon which the attacking unit attacks with. If it is -1, the best weapon is chosen.

Definition at line 625 of file attack.cpp.

References setup().


Member Function Documentation

int tunitattacksobject::getAttackingPlayer  )  [inline, virtual]
 

Reimplemented from UnitAttacksSomething.

Definition at line 250 of file attack.h.

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

int tunitattacksobject::getDefendingPlayer  )  [inline, virtual]
 

Implements tfight.

Definition at line 254 of file attack.h.

Object* tunitattacksobject::getTarget  )  [inline]
 

Definition at line 268 of file attack.h.

void tunitattacksobject::setresult void   )  [virtual]
 

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

Implements tfight.

Definition at line 711 of file attack.cpp.

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

Referenced by trunreplay::execnextreplaymove().

void tunitattacksobject::setup Vehicle attackingunit,
int  obj_x,
int  obj_y,
int  weapon
 

Definition at line 630 of file attack.cpp.

References UnitAttacksSomething::_attackingunit, Vehicle::ammo, ObjectType::armor, tfight::tavalues::armor, tfight::tavalues::attackbonus, attackpossible(), tfight::av, beeline(), chfahrend, cmm_building, tfight::tavalues::color, Object::damage, ContainerBase::damage, tfight::tavalues::damage, tfight::tavalues::defensebonus, tfight::dist, tfight::dv, Vehicle::experience, tfight::tavalues::experience, Vehicle::getArmor(), tfield::getattackbonus(), tfield::getdefensebonus(), ObjectType::getEffectiveHeight(), getfield(), SingleWeapon::getScalarWeaponType(), WeapDist::getWeaponStrength(), tfield::getweather(), ContainerBaseType::hasFunction(), tfight::tavalues::height, Vehicle::height, tfight::tavalues::hemming, tfight::tavalues::kamikaze, ContainerBaseType::KamikazeOnly, AttackWeap::num, tfield::objects, tfight::tavalues::strength, AttackWeap::strength, SingleWeapon::targetingAccuracy, Object::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 tunitattacksobject().

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

Implements tfight.

Definition at line 272 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:57 2008 for Advanced Strategic Command by  doxygen 1.4.2