#include <being.hpp>
Inheritance diagram for Being:

Used for characters & monsters (all animated objects).
Definition at line 114 of file being.hpp.
Public Types | |
| enum | Action { STAND, WALK, ATTACK, SIT, DEAD, HURT } |
| Moves enum for beings and actors for others players vision. More... | |
Public Member Functions | |
| Being (int type, int id) | |
| Proxy constructor. | |
| ~Being () | |
| Damage | getPhysicalAttackDamage () |
| Creates a damage structure for a normal melee attack based on the current being stats and equipment. | |
| void | fillHitpoints () |
| Sets the hit points to maximum. | |
| void | damage (Damage) |
| Takes a damage structure, computes the real damage based on the stats, deducts the result from the hitpoints and adds the result to the HitsTaken list. | |
| virtual void | die () |
| Kills the being. | |
| Hits const & | getHitsTaken () const |
| Gets the damage list. | |
| void | clearHitsTaken () |
| Clears the damage list. | |
| void | performAttack (MapComposite *) |
| Performs an attack. | |
| virtual void | setAction (Action action) |
| Sets the current action. | |
| virtual Action | getAction () const |
| Sets the current action. | |
| virtual void | move () |
| Moves the being toward its destination. | |
| void | setAttribute (int attributeNumber, unsigned short value) |
| Sets an attribute (doesn't work on derived attributes). | |
| unsigned short | getAttribute (int attributeNumber) const |
| Gets an attribute. | |
Protected Member Functions | |
| void | calculateDerivedAttributes () |
| Calculates all derived attributes of a beings. | |
| virtual WeaponStats | getWeaponStats () |
| Gets the stats of the currently equipped weapon that are relevant for damage calculation. | |
Protected Attributes | |
| int | mHitpoints |
| Hitpoints of the being. | |
| Action | mAction |
| std::vector< unsigned short > | mAttributes |
Private Member Functions | |
| Being (Being const &rhs) | |
| Being & | operator= (Being const &rhs) |
Private Attributes | |
| Hits | mHitsTaken |
| List of punches taken since last update. | |
|
|
Moves enum for beings and actors for others players vision. WARNING: Has to be in sync with the same enum in the Being class of the client! |
|
||||||||||||
|
Proxy constructor.
|
|
|
|
|
|
|
|
|
Calculates all derived attributes of a beings.
|
|
|
Clears the damage list.
|
|
|
Takes a damage structure, computes the real damage based on the stats, deducts the result from the hitpoints and adds the result to the HitsTaken list.
|
|
|
Kills the being.
Reimplemented in Monster. |
|
|
Sets the hit points to maximum.
|
|
|
Sets the current action.
|
|
|
Gets an attribute.
|
|
|
Gets the damage list.
|
|
|
Creates a damage structure for a normal melee attack based on the current being stats and equipment.
|
|
|
Gets the stats of the currently equipped weapon that are relevant for damage calculation.
|
|
|
Moves the being toward its destination.
Reimplemented from MovingObject. |
|
|
|
|
|
Performs an attack.
|
|
|
Sets the current action.
|
|
||||||||||||
|
Sets an attribute (doesn't work on derived attributes).
|
|
|
|
|
|
|
|
|
Hitpoints of the being.
|
|
|
List of punches taken since last update.
|
1.3.9.1