Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10538 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
RevLine 
[5039]1/*!
2 * @file character_attributes.h
3 * Definition of the attributes of a character (healt, armor,.. ) whatever is important to the character
4 */
[3580]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/**
[5039]14  its not yet clear, what the character-attributes will be.
[3580]15*/
16class CharacterAttributes : public BaseObject {
[9869]17    ObjectListDeclaration(CharacterAttributes);
[3580]18
19 public:
20  CharacterAttributes();
21  virtual ~CharacterAttributes();
22
[3581]23  /* health */
24  void setHealth(int health);
[3582]25  int addHealth(int health);
26  bool substractHealth(int health);
[3581]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);
[3582]36  int substractShieldStrength(int shieldStrength);
[3581]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);
[3582]60  bool substractEnergy(int subEnergy);
[3581]61  int getEnergy();
[3582]62
63  void setEnergyConsumption(int energy);
64  int getEnergyConsumption();
65
66  void setEnergyMax(int energy);
67  int getEnergyMax();
[3581]68
[5039]69
[3581]70 private:
71  /* healt */
72  int health;                        //<! the healt of a projectile
[3583]73  int healthMax;                     //<! the max healt of a projectile, =0 if no limit
[3581]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
[5039]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
[3581]85
86  /* energy */
87  int energyConsumption;             //<! if the character defines an action, it will consume energy
[3582]88  int energy;                        //<! the current amount of energy saved in this part
[3581]89  int energyMax;                     //<! the maximal energy a character can handle
[3580]90};
91
92#endif /* _CHARACTER_ATTRIBUTES_H */
Note: See TracBrowser for help on using the repository browser.