Starshatter_Open
Open source Starshatter engine
|
#include <CombatUnit.h>
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 Text & | Name () const |
const Text & | Registry () const |
const Text & | DesignName () const |
const Text & | Skin () 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) |
CombatGroup * | GetCombatGroup () const |
void | SetCombatGroup (CombatGroup *g) |
Color | MarkerColor () const |
bool | IsGroundUnit () const |
bool | IsStarship () const |
bool | IsDropship () const |
bool | IsStatic () const |
CombatUnit * | GetCarrier () const |
void | SetCarrier (CombatUnit *c) |
const ShipDesign * | GetDesign () |
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 () |
Definition at line 31 of file CombatUnit.h.
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.
int CombatUnit::AssignMission | ( | ) |
Definition at line 285 of file CombatUnit.cpp.
|
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.
|
inline |
Definition at line 66 of file CombatUnit.h.
|
inline |
Definition at line 68 of file CombatUnit.h.
|
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.
|
inline |
Definition at line 94 of file CombatUnit.h.
|
inline |
Definition at line 88 of file CombatUnit.h.
|
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.
|
inline |
Definition at line 102 of file CombatUnit.h.
|
inline |
Definition at line 72 of file CombatUnit.h.
|
inline |
Definition at line 105 of file CombatUnit.h.
|
inline |
Definition at line 96 of file CombatUnit.h.
|
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.
|
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.
|
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.
|
inline |
Definition at line 67 of file CombatUnit.h.
|
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.
|
inline |
Definition at line 60 of file CombatUnit.h.
|
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.
|
inline |
Definition at line 61 of file CombatUnit.h.
|
inline |
Definition at line 89 of file CombatUnit.h.
|
inline |
Definition at line 80 of file CombatUnit.h.
|
inline |
Definition at line 69 of file CombatUnit.h.
|
inline |
Definition at line 103 of file CombatUnit.h.
|
inline |
Definition at line 74 of file CombatUnit.h.
|
inline |
Definition at line 97 of file CombatUnit.h.
|
inline |
Definition at line 78 of file CombatUnit.h.
|
inline |
Definition at line 64 of file CombatUnit.h.
|
inline |
Definition at line 100 of file CombatUnit.h.
|
inline |
Definition at line 63 of file CombatUnit.h.
|
inline |
Definition at line 65 of file CombatUnit.h.
|
inlinestatic |
Definition at line 34 of file CombatUnit.h.