Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3582 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Mar 16, 2005, 6:54:34 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: written character framework

Location:
orxonox/trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/character_attributes.cc

    r3580 r3582  
    4040{
    4141}
     42
     43
     44/*=====================health=====================*/
     45
     46/**
     47   \brief sets the health of the character
     48   \param helath
     49 */
     50void CharacterAttributes::setHealth(int health)
     51{}
     52
     53/**
     54   \brief adds health to the charater
     55   \param health
     56   \returns health that couldnt be added due to healt limit
     57 */
     58int CharacterAttributes::addHealth(int health)
     59{}
     60
     61/**
     62   \brief remove health due to damager for example
     63   \param amount of health
     64   \returns false if health is zero -> dead
     65 */
     66bool CharacterAttributes::substractHealth(int health)
     67{}
     68
     69/**
     70   \brief gets the current amount of health
     71   \returns health
     72 */
     73int CharacterAttributes::getHealth()
     74{}
     75
     76
     77/**
     78   \brief sets maximum health
     79   \param health
     80
     81   if healthMax = 0 -> unlimited
     82 */
     83void CharacterAttributes::setHealthMax(int healthMax)
     84{}
     85
     86/**
     87   \brief gets health maximium
     88   \returns the health maximum
     89 */
     90int CharacterAttributes::getHealthMax()
     91{}
     92
     93
     94/*======================armor/ shields===================== */
     95/**
     96   \brief sets the shild strength
     97   \param strength
     98 */
     99void CharacterAttributes::setShieldStrength(int shieldStrength)
     100{}
     101
     102/**
     103   \brief adds shield strength
     104   \param strength
     105 */
     106void CharacterAttributes::addShieldStrength(int shiledStrength)
     107{}
     108
     109/**
     110   \brief substracts shield strength
     111   \param strength
     112   \returns amount of shield strength below zero after substraction. Magic: Troumble
     113 */
     114int CharacterAttributes::substractShieldStrength(int shieldStrength)
     115{}
     116
     117/**
     118   \brief gets shield strength
     119   \returns the shield strength
     120 */
     121int CharacterAttributes::getShieldStrength()
     122{}
     123
     124
     125/*=====================damage=====================*/
     126/**
     127   \brief sets the amount of base damage dealt to all aircrafts
     128   \param damage
     129 */
     130void CharacterAttributes::setDamageToAirCraft(int damage)
     131{}
     132
     133/**
     134   \brief gets the amount of base damage
     135   \returns base damage to aircrafts
     136 */
     137int CharacterAttributes::getDamageToAirCraft()
     138{}
     139
     140
     141/**
     142   \brief sets the amount of base damage dealt to all groundcrafts
     143   \param damage
     144 */
     145void CharacterAttributes::setDamageToGroundCraft(int damage)
     146{}
     147
     148/**
     149   \briefgets the amount of base damage
     150   \returns base damage to groundcrafts
     151 */
     152int CharacterAttributes::getDamageToGroundCraft()
     153{}
     154
     155
     156/**
     157   \brief sets the damage modifier to the damage that is dealed via laser weapons
     158   \param modifier [0..1]
     159
     160   eg. the damage is calculated after: damage = modifier * damageToGroundCraft
     161 */
     162void CharacterAttributes::setDamageLaserModifier(float modifier)
     163{}
     164
     165/**
     166   \brief gets the damage modifier to the damage that is dealed via laser weapons
     167   \returns damage modifier
     168
     169   eg. the damage is calculated after: damage = modifier * damageToGroundCraft
     170 */
     171float CharacterAttributes::getDamageLaserModifier()
     172{}
     173
     174
     175/**
     176   \brief sets the damage modifier to the damage that is dealed via plasma weapons
     177   \param damage modifier
     178
     179   eg. the damage is calculated after: damage = modifier * damageToGroundCraft
     180 */
     181void CharacterAttributes::setDamagePlasmaModifier(float modifier)
     182{}
     183
     184/**
     185   \brief gets the damage modifier to the damage that is dealed plasma weapons
     186   \returns damage modifier
     187
     188   eg. the damage is calculated after: damage = modifier * damageToGroundCraft
     189 */
     190float CharacterAttributes::getDamagePlasmaModifier()
     191{}
     192
     193
     194/**
     195   \brief sets the damage modifier to the damage that is dealed via explosives
     196   \param damage modifier
     197
     198   eg. the damage is calculated after: damage = modifier * damageToGroundCraft
     199 */
     200void CharacterAttributes::setDamageExplosiveModifier(float modifier)
     201{}
     202
     203/**
     204   \brief sets the damage modifier to the damage that is dealed via explosives
     205   \returns damage modifier
     206
     207   eg. the damage is calculated after: damage = modifier * damageToGroundCraft
     208 */
     209float CharacterAttributes::getDamageExplosiveModifier()
     210{}
     211
     212
     213/*=====================energy=====================*/
     214/**
     215   \brief sets the amount of energy
     216   \param energy
     217 */
     218void CharacterAttributes::setEnergy(int energy)
     219{}
     220
     221/**
     222   \brief adds energy to the system
     223   \param amount of energy
     224   \returns amount of energy that is too much due to energy limit
     225 */
     226int CharacterAttributes::addEnergy(int addEnergy)
     227{}
     228
     229/**
     230   \brief substracts energy from a system
     231   \param amount of energy
     232   \returns false if there is no energy anymore
     233 */
     234bool CharacterAttributes::substractEnergy(int subEnergy)
     235{}
     236
     237/**
     238   \brief gets the amount of energy
     239   \returns energy
     240 */
     241int CharacterAttributes::getEnergy()
     242{}
     243
     244
     245/**
     246   \brief sets the energy consumption
     247   \param amount of energy
     248*/
     249void setEnergyConsumption(int energy)
     250{}
     251
     252/**
     253   \brief gets the energy consumption
     254   \returns amount of energy
     255*/
     256int getEnergyConsumption()
     257{}
     258 
     259
     260/**
     261   \brief sets the maximum energy level
     262   \param amount of energy
     263*/
     264void setEnergyMax(int energy)
     265{}
     266
     267/**
     268   \brief gets the max energy level
     269   \returns amount of energy
     270*/
     271int getEnergyMax()
     272{}
  • orxonox/trunk/src/world_entities/character_attributes.h

    r3581 r3582  
    2222  /* health */
    2323  void setHealth(int health);
    24   void addHealth(int health);
    25   void substractHealth(int health);
     24  int addHealth(int health);
     25  bool substractHealth(int health);
    2626  int getHealth();
    2727
     
    3333  void setShieldStrength(int shieldStrength);
    3434  void addShieldStrength(int shiledStrength);
    35   void substractShieldStrength(int shieldStrength);
     35  int substractShieldStrength(int shieldStrength);
    3636  int getShieldStrength();
    3737
     
    5757  void setEnergy(int energy);
    5858  int addEnergy(int addEnergy);
    59   void substractEnergy(int subEnergy);
     59  bool substractEnergy(int subEnergy);
    6060  int getEnergy();
     61
     62  void setEnergyConsumption(int energy);
     63  int getEnergyConsumption();
     64
     65  void setEnergyMax(int energy);
     66  int getEnergyMax();
    6167 
    6268
     
    7985  /* energy */
    8086  int energyConsumption;             //<! if the character defines an action, it will consume energy
     87  int energy;                        //<! the current amount of energy saved in this part
    8188  int energyMax;                     //<! the maximal energy a character can handle
    8289};
Note: See TracChangeset for help on using the changeset viewer.