X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Ffleet.h;h=f632093bd51c8e766c2cd00ecc40f3b85a4e0424;hp=93bdee74a247d04ad4c75db9b173a515ce8707aa;hb=b308a9445cfe1883ea8068d3f4d1a04bfcff9aa8;hpb=217cda78005f993fd6b2e575d4abd97c93cec655 diff --git a/bs/fleet.h b/bs/fleet.h index 93bdee7..f632093 100644 --- a/bs/fleet.h +++ b/bs/fleet.h @@ -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,11 +264,17 @@ public: */ void takeEMP(std::string unittype, int number); + void calculateLostStealships(std::string unittype, std::map stolen, int tick = 1); + + void distributeStolenShips(std::map > stolen, std::vector fleets, int tick = 0); + + void calculateSalvage(); /** This function prints out all the ships in the fleet to stderr, * mainly used for debugging. */ void printFleet(); + void resetTicks(); //static functions // /** This function is used to set the different races used. @@ -288,13 +301,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;