tsearchreactionfireingunits Class Reference

#include <reactionfire.h>

Inheritance diagram for tsearchreactionfireingunits:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 tsearchreactionfireingunits (GameMap *gamemap)
void init (Vehicle *eht, const AStar3D::Path &fieldlist)
void init (Vehicle *eht, const MapCoordinate3D &pos)
int checkfield (const MapCoordinate3D &pos, Vehicle *&eht, const Context &context)
virtual int finalCheck (int currentPlayer, const Context &context)
 ~tsearchreactionfireingunits ()

Protected Types

typedef map< const Vehicle *,
int > 
VisibleUnits

Protected Member Functions

int attack (Vehicle *attacker, Vehicle *target, const Context &context)
void addunit (Vehicle *vehicle)
void removeunit (Vehicle *vehicle)

Protected Attributes

VisibleUnits visibleUnits

Static Protected Attributes

static int maxshootdist [8]

Detailed Description

Definition at line 45 of file reactionfire.h.


Member Typedef Documentation

typedef map<const Vehicle*,int> tsearchreactionfireingunits::VisibleUnits [protected]

Definition at line 58 of file reactionfire.h.


Constructor & Destructor Documentation

tsearchreactionfireingunits::tsearchreactionfireingunits ( GameMap gamemap  ) 

Definition at line 49 of file reactionfire.cpp.

References unitlist.

tsearchreactionfireingunits::~tsearchreactionfireingunits (  ) 

Definition at line 350 of file reactionfire.cpp.

References tunitlist::next, and unitlist.


Member Function Documentation

int tsearchreactionfireingunits::attack ( Vehicle attacker,
Vehicle target,
const Context context 
) [protected]

Definition at line 202 of file reactionfire.cpp.

References attackpossible(), tfight::av, Vehicle::ReactionFire::canPerformAttack(), AttackWeap::count, MapDisplayInterface::cursor_goto(), tfight::tavalues::damage, Context::display, tfight::dv, GameMap::getField(), ContainerBase::getMap(), GameMap::getPlayerView(), Vehicle::getPosition(), AttackWeap::num, Vehicle::reactionfire, releasetimeslice(), MapDisplayInterface::showBattle(), AttackWeap::strength, ticker, ASCString::toString(), updateFieldInfo, Vehicle::xpos, and Vehicle::ypos.

Referenced by checkfield(), and finalCheck().

void tsearchreactionfireingunits::addunit ( Vehicle vehicle  )  [protected]

Definition at line 172 of file reactionfire.cpp.

References ContainerBase::color, tunitlist::eht, tunitlist::next, and unitlist.

void tsearchreactionfireingunits::removeunit ( Vehicle vehicle  )  [protected]

Definition at line 182 of file reactionfire.cpp.

References ContainerBase::color, tunitlist::eht, tunitlist::next, and unitlist.

void tsearchreactionfireingunits::init ( Vehicle eht,
const AStar3D::Path fieldlist 
) [virtual]

Implements treactionfire.

Definition at line 148 of file reactionfire.cpp.

References getFirstBit(), Vehicle::height, and maxint.

Referenced by JumpDriveCommand::go().

void tsearchreactionfireingunits::init ( Vehicle eht,
const MapCoordinate3D pos 
)

Definition at line 56 of file reactionfire.cpp.

References MapCoordinate3D::getNumericalHeight(), MapCoordinate::x, and MapCoordinate::y.

int tsearchreactionfireingunits::checkfield ( const MapCoordinate3D pos,
Vehicle *&  eht,
const Context context 
) [virtual]

Implements treactionfire.

Definition at line 277 of file reactionfire.cpp.

References attack(), tunitlist::eht, GameMap::getField(), tunitlist::next, unitlist, MapCoordinate::x, and MapCoordinate::y.

Referenced by JumpDriveCommand::go().

int tsearchreactionfireingunits::finalCheck ( int  currentPlayer,
const Context context 
) [virtual]

Implements treactionfire.

Definition at line 310 of file reactionfire.cpp.

References attack(), beeline(), Player::diplomacy, fieldvisiblenow(), GameMap::getField(), GameMap::getPlayer(), GameMap::getPlayerCount(), GameMap::getUnit(), DiplomaticStateVector::isHostile(), maxshootdist, Player::vehicleList, and visibleUnits.

Referenced by JumpDriveCommand::go().


Member Data Documentation

int tsearchreactionfireingunits::maxshootdist [static, protected]

Definition at line 54 of file reactionfire.h.

Referenced by finalCheck().

VisibleUnits tsearchreactionfireingunits::visibleUnits [protected]

Definition at line 59 of file reactionfire.h.

Referenced by finalCheck().


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