]> ruin.nu Git - hbs.git/blobdiff - bs/fleet.h
added code so you lose ships if you steal..
[hbs.git] / bs / fleet.h
index 93bdee74a247d04ad4c75db9b173a515ce8707aa..3c690fddb775886c08d5c4f4d4fee78d01677b16 100644 (file)
@@ -227,6 +227,13 @@ public:
        int resource(std::string type, int tick = 0)const;
        
        void resetResources();
+
+       /** This function tells how many ticks the fleet stays at it's target.
+        * \returns the number of ticks as an int.
+        */
+       int stays() const;
+       void setStays(int ticks);
+
        /** This is a little more advanced function. It makes a a number of units
         * of a specific unittype shoot at the current fleet and calculates the 
         * losses.
@@ -257,6 +264,8 @@ public:
         */
        void takeEMP(std::string unittype, int number);
 
+       void calculateLostStealships(std::string unittype, std::map<std::string, int> stolen, int tick = 1);
+
        /** This function prints out all the ships in the fleet to stderr,
         * mainly used for debugging.
         */
@@ -288,13 +297,14 @@ public:
 protected:
 
 
-       std::string     m_sName;
-       std::string     m_sRace;
-       int         m_iETA;
-       FleetList       m_Fleet;
-       FleetList       m_BlockedFleet;
+       std::string  m_sName;
+       std::string      m_sRace;
+       int          m_iETA;
+       FleetList    m_Fleet;
+       FleetList    m_BlockedFleet;
        ResourceList m_Resources;
-       ArmorList       m_Armor;
+       ArmorList        m_Armor;
+       int          m_iStays;