Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10651 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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    ObjectListDeclaration(CharacterAttributes);
18
19 public:
20  CharacterAttributes();
21  virtual ~CharacterAttributes();
22
23  /* health */
24  void setHealth(int health);
25  int addHealth(int health);
26  bool substractHealth(int health);
27  int getHealth();
28
29  void setHealthMax(int healthMax);
30  int getHealthMax();
31
32
33  /* armor/ shields */
34  void setShieldStrength(int shieldStrength);
35  void addShieldStrength(int shiledStrength);
36  int substractShieldStrength(int shieldStrength);
37  int getShieldStrength();
38
39
40  /* damage */
41  void setDamageToAirCraft(int damage);
42  int getDamageToAirCraft();
43
44  void setDamageToGroundCraft(int damage);
45  int getDamageToGroundCraft();
46
47  void setDamageLaserModifier(float modifier);
48  float getDamageLaserModifier();
49
50  void setDamagePlasmaModifier(float modifier);
51  float getDamagePlasmaModifier();
52
53  void setDamageExplosiveModifier(float modifier);
54  float getDamageExplosiveModifier();
55
56
57  /* energy */
58  void setEnergy(int energy);
59  int addEnergy(int addEnergy);
60  bool substractEnergy(int subEnergy);
61  int getEnergy();
62
63  void setEnergyConsumption(int energy);
64  int getEnergyConsumption();
65
66  void setEnergyMax(int energy);
67  int getEnergyMax();
68
69
70 private:
71  /* healt */
72  int health;                        //<! the healt of a projectile
73  int healthMax;                     //<! the max healt of a projectile, =0 if no limit
74
75  /* armor/ shields */
76  int shieldStrength;                //<! the shiled strength of a character, =0 if no shields
77
78  /* damage */
79  int damageToAirCraft;              //<! damage dealt to a air craft in case of a hit
80  int damageToGroundCraft;           //<! damage dealt to a ground craft in case of a hit
81
82  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
83  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
84  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
85
86  /* energy */
87  int energyConsumption;             //<! if the character defines an action, it will consume energy
88  int energy;                        //<! the current amount of energy saved in this part
89  int energyMax;                     //<! the maximal energy a character can handle
90};
91
92#endif /* _CHARACTER_ATTRIBUTES_H */
Note: See TracBrowser for help on using the repository browser.