summaryrefslogtreecommitdiffhomepage
path: root/Stars45/CombatAssignment.h
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/CombatAssignment.h')
-rw-r--r--Stars45/CombatAssignment.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/Stars45/CombatAssignment.h b/Stars45/CombatAssignment.h
new file mode 100644
index 0000000..cd4cebb
--- /dev/null
+++ b/Stars45/CombatAssignment.h
@@ -0,0 +1,57 @@
+/* Project Starshatter 4.5
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
+
+ SUBSYSTEM: Stars.exe
+ FILE: CombatAssignment.h
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ High level assignment of one group to damage another
+*/
+
+#ifndef CombatAssignment_h
+#define CombatAssignment_h
+
+#include "Types.h"
+#include "List.h"
+
+// +--------------------------------------------------------------------+
+
+class CombatGroup;
+class SimRegion;
+
+// +--------------------------------------------------------------------+
+
+class CombatAssignment
+{
+public:
+ static const char* TYPENAME() { return "CombatAssignment"; }
+
+ CombatAssignment(int t, CombatGroup* obj, CombatGroup* rsc=0);
+ ~CombatAssignment();
+
+ int operator < (const CombatAssignment& a) const;
+
+ // operations:
+ void SetObjective(CombatGroup* o) { objective = o; }
+ void SetResource(CombatGroup* r) { resource = r; }
+
+ // accessors:
+ int Type() { return type; }
+ CombatGroup* GetObjective() { return objective; }
+ CombatGroup* GetResource() { return resource; }
+
+ const char* GetDescription() const;
+ bool IsActive() const { return resource != 0; }
+
+private:
+ int type;
+ CombatGroup* objective;
+ CombatGroup* resource;
+};
+
+
+#endif CombatAssignment_h