X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=bs%2Funittype.h;h=ccff1d1a958a34a7162ca2df70b6f2a31c0b39b5;hb=9fa0d25038087d8417c0849a495eeae1abcb9504;hp=895b03de4595fbaaaf559f516cd095a59392be6e;hpb=7b5ccf741883c34b2ac96afe460a3d0eda3701bb;p=hbs.git diff --git a/bs/unittype.h b/bs/unittype.h index 895b03d..ccff1d1 100644 --- a/bs/unittype.h +++ b/bs/unittype.h @@ -94,16 +94,31 @@ public: */ int initiative() const; - /** Sets the agility, the higher it is the harder it is to hit the unit */ + /** Used to set the agility, the higher it is the harder it is to hit the unit + * \param iAgil the agility represnted as an int + */ void setAgility (int iAgil); + /** used to get this unittype's agility, higher is equal to hard to hit. + * \returns the agility as an int + */ int agility() const; - /** Sets the weaponspeed.. just a simple integer that shows how good it is at hitting things */ + /** Used to set the weaponspeed.. Higher is equal to better at hitting + * \param iWPSP the weaponspeed represented as an int. + */ void setWeaponSpeed(int iWPSP); + /** Used to get what weaponspeed this unittype has + * \returns the weaponspeed as an int + */ int weaponSpeed() const; - /** Sets the number of guns. */ + /** Sets the number of guns for this unittype + * \param iGuns the number of guns represented as an int + */ void setGuns(int iGuns); + /** used to get the number of guns this unittype has + * \returns the number of guns as an int + */ int guns() const; /** Sets the how much power the guns have.. or in other words: the damage they do. */ @@ -119,10 +134,13 @@ public: int EMP() const; /** Sets the resource cost for this unittype. Used for example for score calculation and so on. */ - void setTotalResources(int iTR); + void setResources(std::string type, int i); + void setResources(std::map res); /** Returns the number of total resources this unittype cost. */ int totRes() const; + std::map resources(); + /** Sets the fuelcost for this unittype */ void setFuel(int iFuel); /** Returns the fuelcost */ @@ -143,17 +161,17 @@ protected: int m_iRace; //!< Not really the race, but an indiaction on what race can use it.. std::string m_sClass; std::vector m_vTarget; - int m_iInitiative; - int m_iAgility; - int m_iWeaponSpeed; - int m_iGuns; - int m_iPower; - int m_iArmor; - int m_iEMP; - int m_iTotalResources; - std::string m_sType; //!< normal,emp,cloak,steal,pod - int m_iETA; - int m_iFuel; + int m_iInitiative; + int m_iAgility; + int m_iWeaponSpeed; + int m_iGuns; + int m_iPower; + int m_iArmor; + int m_iEMP; + std::map m_Resources; + std::string m_sType; //!< normal,emp,cloak,steal,pod + int m_iETA; + int m_iFuel; }; #endif