Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Combatant.h
Go to the documentation of this file.
1
/* Project Starshatter 4.5
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: Stars.exe
6
FILE: Combatant.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
One side in a military conflict
13
*/
14
15
#ifndef Combatant_h
16
#define Combatant_h
17
18
#include "
Types.h
"
19
#include "
Geometry.h
"
20
#include "
Text.h
"
21
#include "
List.h
"
22
23
// +--------------------------------------------------------------------+
24
25
class
CombatGroup
;
26
class
Mission
;
27
28
// +--------------------------------------------------------------------+
29
30
class
Combatant
31
{
32
public
:
33
static
const
char
*
TYPENAME
() {
return
"Combatant"
; }
34
35
Combatant
(
const
char
* com_name,
const
char
* file_name,
int
iff);
36
Combatant
(
const
char
* com_name,
CombatGroup
* force);
37
~Combatant
();
38
39
// operations:
40
41
// accessors:
42
const
char
*
Name
()
const
{
return
name; }
43
int
GetIFF
()
const
{
return
iff; }
44
int
Score
()
const
{
return
score; }
45
const
char
*
GetDescription
()
const
{
return
name; }
46
CombatGroup
*
GetForce
() {
return
force; }
47
CombatGroup
*
FindGroup
(
int
type,
int
id
=-1);
48
List<CombatGroup>
&
GetTargetList
() {
return
target_list; }
49
List<CombatGroup>
&
GetDefendList
() {
return
defend_list; }
50
List<Mission>
&
GetMissionList
() {
return
mission_list; }
51
52
void
AddMission
(
Mission
* m);
53
void
SetScore
(
int
points) { score = points; }
54
void
AddScore
(
int
points) { score += points; }
55
56
double
GetTargetStratFactor
(
int
type);
57
void
SetTargetStratFactor
(
int
type,
double
f);
58
59
private
:
60
Text
name;
61
int
iff;
62
int
score;
63
64
CombatGroup
* force;
65
List<CombatGroup>
target_list;
66
List<CombatGroup>
defend_list;
67
List<Mission>
mission_list;
68
69
double
target_factor[8];
70
};
71
72
73
#endif Combatant_h
Stars45
Combatant.h
Generated on Thu May 31 2012 16:31:04 for Starshatter_Open by
1.8.1