+
+//////////////////////////////////////////////////////////////////////////
+//
+int Fleet::stays() const
+{
+ return m_iStays;
+}
+
+//////////////////////////////////////////////////////////////////////////
+//
+void Fleet::setStays(int ticks)
+{
+ m_iStays = ticks;
+}
+
+//////////////////////////////////////////////////////////////////////////
+//
+void Fleet::calculateLostStealships(string unittype, std::map<std::string, int> stolen, int tick = 1)
+{
+ int stealscore = 0;
+ for (map<string, int>::iterator i = stolen.begin(); i != stolen.end(); ++i)
+ {
+ stealscore += stolen[i->first] * (s_Units[i->first].totRes() / 10.0);
+ }
+
+ int lost = stealscore / (s_Units[unittype].totRes() / 10.0);
+
+ cerr << "Lost " << lost << " " << unittype << " due to stealing ships worth: " << stealscore << endl;
+ killFleet(unittype, lost, tick);
+}