Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CombatUnit Class Reference

#include <CombatUnit.h>

List of all members.

Public Member Functions

 CombatUnit (const char *n, const char *reg, int t, const char *dname, int number, int i)
 CombatUnit (const CombatUnit &unit)
int operator== (const CombatUnit &u) const
const char * GetDescription () const
int GetValue () const
int GetSingleValue () const
bool CanDefend (CombatUnit *unit) const
bool CanAssign () const
bool CanLaunch () const
double PowerVersus (CombatUnit *tgt) const
int AssignMission ()
void CompleteMission ()
double MaxRange () const
double MaxEffectiveRange () const
double OptimumRange () const
void Engage (CombatUnit *tgt)
void Disengage ()
const TextName () const
const TextRegistry () const
const TextDesignName () const
const TextSkin () const
void SetSkin (const char *s)
int Type () const
int Count () const
int LiveCount () const
int DeadCount () const
void SetDeadCount (int n)
int Kill (int n)
int Available () const
int GetIFF () const
bool IsLeader () const
void SetLeader (bool l)
Point Location () const
void MoveTo (const Point &loc)
Text GetRegion () const
void SetRegion (Text rgn)
CombatGroupGetCombatGroup () const
void SetCombatGroup (CombatGroup *g)
Color MarkerColor () const
bool IsGroundUnit () const
bool IsStarship () const
bool IsDropship () const
bool IsStatic () const
CombatUnitGetCarrier () const
void SetCarrier (CombatUnit *c)
const ShipDesignGetDesign ()
int GetShipClass () const
List< CombatUnit > & GetAttackers ()
double GetPlanValue () const
void SetPlanValue (int v)
double GetSustainedDamage () const
void SetSustainedDamage (double d)
double GetHeading () const
void SetHeading (double d)
double GetNextJumpTime () const

Static Public Member Functions

static const char * TYPENAME ()

Detailed Description

Definition at line 31 of file CombatUnit.h.


Constructor & Destructor Documentation

CombatUnit::CombatUnit ( const char *  n,
const char *  reg,
int  t,
const char *  dname,
int  number,
int  i 
)

Definition at line 30 of file CombatUnit.cpp.

CombatUnit::CombatUnit ( const CombatUnit unit)

Definition at line 37 of file CombatUnit.cpp.


Member Function Documentation

int CombatUnit::AssignMission ( )

Definition at line 285 of file CombatUnit.cpp.

int CombatUnit::Available ( ) const
inline

Definition at line 71 of file CombatUnit.h.

bool CombatUnit::CanAssign ( ) const

Definition at line 117 of file CombatUnit.cpp.

bool CombatUnit::CanDefend ( CombatUnit unit) const

Definition at line 212 of file CombatUnit.cpp.

bool CombatUnit::CanLaunch ( ) const

Definition at line 137 of file CombatUnit.cpp.

void CombatUnit::CompleteMission ( )

Definition at line 304 of file CombatUnit.cpp.

int CombatUnit::Count ( ) const
inline

Definition at line 66 of file CombatUnit.h.

int CombatUnit::DeadCount ( ) const
inline

Definition at line 68 of file CombatUnit.h.

const Text& CombatUnit::DesignName ( ) const
inline

Definition at line 62 of file CombatUnit.h.

void CombatUnit::Disengage ( )

Definition at line 341 of file CombatUnit.cpp.

void CombatUnit::Engage ( CombatUnit tgt)

Definition at line 329 of file CombatUnit.cpp.

List<CombatUnit>& CombatUnit::GetAttackers ( )
inline

Definition at line 94 of file CombatUnit.h.

CombatUnit* CombatUnit::GetCarrier ( ) const
inline

Definition at line 88 of file CombatUnit.h.

CombatGroup* CombatUnit::GetCombatGroup ( ) const
inline

Definition at line 79 of file CombatUnit.h.

const char * CombatUnit::GetDescription ( ) const

Definition at line 82 of file CombatUnit.cpp.

const ShipDesign * CombatUnit::GetDesign ( )

Definition at line 50 of file CombatUnit.cpp.

double CombatUnit::GetHeading ( ) const
inline

Definition at line 102 of file CombatUnit.h.

int CombatUnit::GetIFF ( ) const
inline

Definition at line 72 of file CombatUnit.h.

double CombatUnit::GetNextJumpTime ( ) const
inline

Definition at line 105 of file CombatUnit.h.

double CombatUnit::GetPlanValue ( ) const
inline

Definition at line 96 of file CombatUnit.h.

Text CombatUnit::GetRegion ( ) const
inline

Definition at line 77 of file CombatUnit.h.

int CombatUnit::GetShipClass ( ) const

Definition at line 59 of file CombatUnit.cpp.

int CombatUnit::GetSingleValue ( ) const

Definition at line 74 of file CombatUnit.cpp.

double CombatUnit::GetSustainedDamage ( ) const
inline

Definition at line 99 of file CombatUnit.h.

int CombatUnit::GetValue ( ) const

Definition at line 68 of file CombatUnit.cpp.

bool CombatUnit::IsDropship ( ) const

Definition at line 178 of file CombatUnit.cpp.

bool CombatUnit::IsGroundUnit ( ) const

Definition at line 166 of file CombatUnit.cpp.

bool CombatUnit::IsLeader ( ) const
inline

Definition at line 73 of file CombatUnit.h.

bool CombatUnit::IsStarship ( ) const

Definition at line 172 of file CombatUnit.cpp.

bool CombatUnit::IsStatic ( ) const

Definition at line 184 of file CombatUnit.cpp.

int CombatUnit::Kill ( int  n)

Definition at line 373 of file CombatUnit.cpp.

int CombatUnit::LiveCount ( ) const
inline

Definition at line 67 of file CombatUnit.h.

Point CombatUnit::Location ( ) const
inline

Definition at line 75 of file CombatUnit.h.

Color CombatUnit::MarkerColor ( ) const

Definition at line 160 of file CombatUnit.cpp.

double CombatUnit::MaxEffectiveRange ( ) const

Definition at line 197 of file CombatUnit.cpp.

double CombatUnit::MaxRange ( ) const

Definition at line 192 of file CombatUnit.cpp.

void CombatUnit::MoveTo ( const Point loc)

Definition at line 318 of file CombatUnit.cpp.

const Text& CombatUnit::Name ( ) const
inline

Definition at line 60 of file CombatUnit.h.

int CombatUnit::operator== ( const CombatUnit u) const
inline

Definition at line 39 of file CombatUnit.h.

double CombatUnit::OptimumRange ( ) const

Definition at line 202 of file CombatUnit.cpp.

double CombatUnit::PowerVersus ( CombatUnit tgt) const

Definition at line 233 of file CombatUnit.cpp.

const Text& CombatUnit::Registry ( ) const
inline

Definition at line 61 of file CombatUnit.h.

void CombatUnit::SetCarrier ( CombatUnit c)
inline

Definition at line 89 of file CombatUnit.h.

void CombatUnit::SetCombatGroup ( CombatGroup g)
inline

Definition at line 80 of file CombatUnit.h.

void CombatUnit::SetDeadCount ( int  n)
inline

Definition at line 69 of file CombatUnit.h.

void CombatUnit::SetHeading ( double  d)
inline

Definition at line 103 of file CombatUnit.h.

void CombatUnit::SetLeader ( bool  l)
inline

Definition at line 74 of file CombatUnit.h.

void CombatUnit::SetPlanValue ( int  v)
inline

Definition at line 97 of file CombatUnit.h.

void CombatUnit::SetRegion ( Text  rgn)
inline

Definition at line 78 of file CombatUnit.h.

void CombatUnit::SetSkin ( const char *  s)
inline

Definition at line 64 of file CombatUnit.h.

void CombatUnit::SetSustainedDamage ( double  d)
inline

Definition at line 100 of file CombatUnit.h.

const Text& CombatUnit::Skin ( ) const
inline

Definition at line 63 of file CombatUnit.h.

int CombatUnit::Type ( ) const
inline

Definition at line 65 of file CombatUnit.h.

static const char* CombatUnit::TYPENAME ( )
inlinestatic

Definition at line 34 of file CombatUnit.h.


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