Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain.older/src/world_entities/character_attributes.h @ 10769

Last change on this file since 10769 was 5039, checked in by bensch, 19 years ago

orxonox/trunk: useless stuff :)

File size: 2.9 KB
Line 
1/*!
2 * @file character_attributes.h
3 * Definition of the attributes of a character (healt, armor,.. ) whatever is important to the character
4 */
5
6#ifndef _CHARACTER_ATTRIBUTES_H
7#define _CHARACTER_ATTRIBUTES_H
8
9#include "base_object.h"
10
11
12//! A class including all important information about a character
13/**
14  its not yet clear, what the character-attributes will be.
15*/
16class CharacterAttributes : public BaseObject {
17
18 public:
19  CharacterAttributes();
20  virtual ~CharacterAttributes();
21
22  /* health */
23  void setHealth(int health);
24  int addHealth(int health);
25  bool substractHealth(int health);
26  int getHealth();
27
28  void setHealthMax(int healthMax);
29  int getHealthMax();
30
31
32  /* armor/ shields */
33  void setShieldStrength(int shieldStrength);
34  void addShieldStrength(int shiledStrength);
35  int substractShieldStrength(int shieldStrength);
36  int getShieldStrength();
37
38
39  /* damage */
40  void setDamageToAirCraft(int damage);
41  int getDamageToAirCraft();
42
43  void setDamageToGroundCraft(int damage);
44  int getDamageToGroundCraft();
45
46  void setDamageLaserModifier(float modifier);
47  float getDamageLaserModifier();
48
49  void setDamagePlasmaModifier(float modifier);
50  float getDamagePlasmaModifier();
51
52  void setDamageExplosiveModifier(float modifier);
53  float getDamageExplosiveModifier();
54
55
56  /* energy */
57  void setEnergy(int energy);
58  int addEnergy(int addEnergy);
59  bool substractEnergy(int subEnergy);
60  int getEnergy();
61
62  void setEnergyConsumption(int energy);
63  int getEnergyConsumption();
64
65  void setEnergyMax(int energy);
66  int getEnergyMax();
67
68
69 private:
70  /* healt */
71  int health;                        //<! the healt of a projectile
72  int healthMax;                     //<! the max healt of a projectile, =0 if no limit
73
74  /* armor/ shields */
75  int shieldStrength;                //<! the shiled strength of a character, =0 if no shields
76
77  /* damage */
78  int damageToAirCraft;              //<! damage dealt to a air craft in case of a hit
79  int damageToGroundCraft;           //<! damage dealt to a ground craft in case of a hit
80
81  float damageLaserModifier;         //<! [0..1] the damage from laser is multiplied with this modifier. there can be things in the world, that are immune to certain damage
82  float damagePlasmaModifier;        //<! [0..1] the damage from plasma is multiplied with this modifier. there can be things in the world, that are immune to certain damage
83  float damageExplosiveModifier;      //<! [0..1] the damage from exposives (rockets, tnt,...) is multiplied with this modifier. there can be things in the world, that are immune to certain damage
84
85  /* energy */
86  int energyConsumption;             //<! if the character defines an action, it will consume energy
87  int energy;                        //<! the current amount of energy saved in this part
88  int energyMax;                     //<! the maximal energy a character can handle
89};
90
91#endif /* _CHARACTER_ATTRIBUTES_H */
Note: See TracBrowser for help on using the repository browser.