tmineattacksunit Class Reference

#include <attack.h>

Inheritance diagram for tmineattacksunit:

Inheritance graph
[legend]
List of all members.

Public Member Functions

int getAttackingPlayer ()
int getDefendingPlayer ()
 tmineattacksunit (const MapCoordinate &mineposition, int minenum, Vehicle *&attackedunit)
void setup (const MapCoordinate &position, int minenum, Vehicle *&attackedunit)
void setresult (const Context &context)
 Writes the result of the attack calculation to the actual units.
MinegetFirstMine ()
void visit (FightVisitor &visitor)
VehiclegetTarget ()

Detailed Description

Definition at line 209 of file attack.h.


Constructor & Destructor Documentation

tmineattacksunit::tmineattacksunit ( const MapCoordinate mineposition,
int  minenum,
Vehicle *&  attackedunit 
)

Calculates the fight if a unit drives onto a mine.

Parameters:
mineposition The field on which the mine was placed
minenum The number of a specific mine which explodes. If -1 , all mines on this field which are able to attack the unit will explode.
attackedunit The unit which moved onto the minefield.

Definition at line 542 of file attack.cpp.

References setup().


Member Function Documentation

int tmineattacksunit::getAttackingPlayer (  )  [inline, virtual]

Implements tfight.

Definition at line 219 of file attack.h.

int tmineattacksunit::getDefendingPlayer (  )  [inline, virtual]

Implements tfight.

Definition at line 223 of file attack.h.

References ContainerBase::getOwner().

void tmineattacksunit::setup ( const MapCoordinate position,
int  minenum,
Vehicle *&  attackedunit 
)

Definition at line 548 of file attack.cpp.

References tfight::tavalues::armor, tfight::tavalues::attackbonus, tfight::av, chtieffliegend, cmantipersonnelmine, cmm_trooper, tfight::tavalues::color, cwminen, ContainerBase::damage, tfight::tavalues::damage, tfight::tavalues::defensebonus, tfight::dist, tfight::dv, errorMessage(), Vehicle::experience, tfight::tavalues::experience, Vehicle::getArmor(), GameMap::getField(), ContainerBase::getMap(), MapField::getMine(), ContainerBase::getOwner(), tfight::tavalues::height, Vehicle::height, tfight::tavalues::hemming, VehicleType::initiative, tfight::tavalues::initiative, tfight::tavalues::kamikaze, MapField::mines, VehicleType::movemalustyp, Mine::strength, tfight::tavalues::strength, Vehicle::typ, Mine::type, tfight::tavalues::weapcount, tfight::tavalues::weapnum, and tfight::tavalues::weapontype.

Referenced by tmineattacksunit().

void tmineattacksunit::setresult ( const Context context  )  [virtual]

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

Implements tfight.

Definition at line 621 of file attack.cpp.

References ContainerBase::damage, tfight::tavalues::damage, tfight::dv, ContainerBase::getMap(), ActionRegistry::InflictDamage, MapField::mines, and ActionRegistry::RemoveMine.

Mine * tmineattacksunit::getFirstMine (  ) 

Definition at line 644 of file attack.cpp.

References MapField::mines.

Referenced by GetAttackerImage::visit().

void tmineattacksunit::visit ( FightVisitor visitor  )  [inline, virtual]

Implements tfight.

Definition at line 240 of file attack.h.

References FightVisitor::visit().

Vehicle* tmineattacksunit::getTarget (  )  [inline]

Definition at line 245 of file attack.h.

Referenced by BattleSoundPlayer::visit(), and GetTargetImage::visit().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:51 2012 for Advanced Strategic Command by  doxygen 1.5.1