Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/character_attributes.h @ 3581

Last change on this file since 3581 was 3581, checked in by patrick, 19 years ago

orxonox/trunk: character attributes defined

File size: 2.7 KB
Line 
1/*!
2    \file character_attributes.h
3    \brief 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  void addHealth(int health);
25  void 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  void 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  void substractEnergy(int subEnergy);
60  int getEnergy();
61 
62
63 private:
64  /* healt */
65  int health;                        //<! the healt of a projectile
66  int helathMax;                     //<! the max healt of a projectile, =0 if no limit
67
68  /* armor/ shields */
69  int shieldStrength;                //<! the shiled strength of a character, =0 if no shields
70
71  /* damage */
72  int damageToAirCraft;              //<! damage dealt to a air craft in case of a hit
73  int damageToGroundCraft;           //<! damage dealt to a ground craft in case of a hit
74
75  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
76  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
77  float damageExplosiveModifer;      //<! [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
78
79  /* energy */
80  int energyConsumption;             //<! if the character defines an action, it will consume energy
81  int energyMax;                     //<! the maximal energy a character can handle
82};
83
84#endif /* _CHARACTER_ATTRIBUTES_H */
Note: See TracBrowser for help on using the repository browser.