* other is hardly used other than inside the engine.
*/
void setFleet(std::string unittype, int number, int tick = 0);
+
+ void addFleet(std::string unittype, int number, int tick = 0);
+
+ void addFleet(std::map<std::string, int> units, int tick = 0);
+
/**Returns the numbers of units fo a specific type at a specific tick.
* \param unittype The shipname, as a std string
* \param tick The tick you want to look at, tick 0 (before battle) is default
*/
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.
* very similar stuff in both the take* functions.
* \sa takeShoot
*/
- void takeEMP(std::string unittype, int number);
+ void takeEMP(std::string unittype, int number, std::map<std::string, int>& hitunits);
+ void calculateLostStealships(std::string unittype, std::map<std::string, int> stolen, int tick = 1);
+
+ void distributeStolenShips(std::map<std::string, std::map<std::string, int> > stolen, std::vector<Fleet*> 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();
+
+ int freePodGuns(int tick = 0);
+
+ int usedPodGuns(int tick = 0) const;
+
+ void usePodGuns(int tick = 0, int guns = 1);
+
//static functions
//
/** This function is used to set the different races used.
protected:
- std::string m_sName;
- std::string m_sRace;
- int m_iETA;
- FleetList m_Fleet;
- FleetList m_BlockedFleet;
- ResourceList m_Resources;
- ArmorList m_Armor;
+ std::string m_sName;
+ std::string m_sRace;
+ int m_iETA;
+ FleetList m_Fleet;
+ FleetList m_BlockedFleet;
+ ResourceList m_Resources;
+ ArmorList m_Armor;
+ int m_iStays;
+ std::vector<int> m_UsedPodGuns;