]> ruin.nu Git - hbs.git/blobdiff - bs/planet.cpp
Started the work to split up the pods better..
[hbs.git] / bs / planet.cpp
index 3e1f39ae65eab751585cde681e1cddc6789c67bd..3c4404f800d4dee61ae9a968b6015f8eb27dde4a 100644 (file)
@@ -131,6 +131,9 @@ void Planet::takeRoids(std::string type, int number, int tick = 0)
        for (int i = ticks; i <= tick; ++i )
                m_Roids[type].push_back(roids);
        m_Roids[type][tick] -= number;
+
+       if (type != "uninit")
+               addPlanetScore(-3000*number, tick);
 }
 
 
@@ -184,6 +187,8 @@ void Planet::runBattle(std::vector<Fleet*> friendly, std::vector<Fleet*> hostile
                //allFriends.printFleet();
 
                allFriends.distributeLossesGains(friends, tick);
+
+               allHostiles.addPodsForLostRoids();
                allHostiles.distributeLossesGains(hostiles, tick);
                allHostiles.distributeCappedRoids(hostiles, tick);
 
@@ -202,7 +207,7 @@ void Planet::runBattle(std::vector<Fleet*> friendly, std::vector<Fleet*> hostile
 
 //////////////////////////////////////////////////////////////////////////
 //
-void Planet::calcOneTick(Planet* friendly, Fleet* hostile, std::map<std::string, std::map<std::string, int> >& stealfriendly, std::map<std::string, std::map<std::string, int> >&  stealhostile, int tick = 0)
+void Planet::calcOneTick(Planet* friendly, Fleet* hostile, std::map<std::string, std::map<std::string, int> >& stealfriendly, std::map<std::string, std::map<std::string, int> >&  stealhostile, int tick = 1)
 {
        map<int, string> unitsinit; // order units after their ininitiative
        for (UnitList::iterator i = s_Units.begin(); i != s_Units.end(); ++i)