diff options
author | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2012-06-17 06:38:09 +0000 |
---|---|---|
committer | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2012-06-17 06:38:09 +0000 |
commit | 05f1b225a03adeab4cda01a6c96595359464ac0e (patch) | |
tree | be9beaaee8116ed81ef9c2aa07d0e16864b4b84b /Stars45/CombatUnit.cpp | |
parent | 89fce9332d6a40fe82acea1c235129b3c823bddc (diff) | |
download | starshatter-05f1b225a03adeab4cda01a6c96595359464ac0e.zip starshatter-05f1b225a03adeab4cda01a6c96595359464ac0e.tar.gz starshatter-05f1b225a03adeab4cda01a6c96595359464ac0e.tar.bz2 |
(Hopefully) Allows SWACS ships to do more than sit around. Needs testing.
Diffstat (limited to 'Stars45/CombatUnit.cpp')
-rw-r--r-- | Stars45/CombatUnit.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/Stars45/CombatUnit.cpp b/Stars45/CombatUnit.cpp index 951cb87..f03b349 100644 --- a/Stars45/CombatUnit.cpp +++ b/Stars45/CombatUnit.cpp @@ -114,26 +114,6 @@ CombatUnit::GetDescription() const // +----------------------------------------------------------------------+
bool
-CombatUnit::CanAssign() const
-{
- bool result = false;
-
- switch (type) {
- case Ship::FIGHTER:
- case Ship::ATTACK:
- case Ship::CORVETTE:
- case Ship::FRIGATE:
- case Ship::DESTROYER:
- case Ship::CRUISER:
- case Ship::CARRIER: result = true; break;
- }
-
- return result;
-}
-
-// +----------------------------------------------------------------------+
-
-bool
CombatUnit::CanLaunch() const
{
bool result = false;
@@ -262,6 +242,9 @@ double CombatUnit::PowerVersus(CombatUnit* tgt) const else if (type == Ship::CARRIER) {
return 0;
}
+ else if (type == Ship::SWACS) {
+ return 0;
+ }
else if (type == Ship::CRUISER) {
if (tgt->type <= Ship::ATTACK)
return type * effectiveness;
|