diff options
author | Nao Pross <naopross@thearcway.org> | 2018-02-12 23:27:59 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-02-12 23:27:59 +0100 |
commit | 97ac1cbd026bfdfbe7153d088a807693323bb4e1 (patch) | |
tree | 84b8d5ed2d0809997e50ea054bf4faf227bafe6d /src | |
parent | Add tags recipe to generate ctags (diff) | |
download | Subconscious-old-97ac1cbd026bfdfbe7153d088a807693323bb4e1.tar.gz Subconscious-old-97ac1cbd026bfdfbe7153d088a807693323bb4e1.zip |
Add Actor attributes
Diffstat (limited to 'src')
-rw-r--r-- | src/main/headers/Actor.hpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/main/headers/Actor.hpp b/src/main/headers/Actor.hpp index 24b7c72..14c4fff 100644 --- a/src/main/headers/Actor.hpp +++ b/src/main/headers/Actor.hpp @@ -22,8 +22,21 @@ public: Item& drop(); /* accessors */ - bool alive() { return _alive; } - unsigned hp() { return _hp; } + bool alive() const { return _alive; } + unsigned hp() const { return _hp; } + + unsigned attack() const { return _attack; } + unsigned defence() const { return _defence; } + + unsigned magicAttack() const { return _magicAttack; } + unsigned magicDefence() const { return _magicDefence; } + + unsigned precisionProbabiliy() const { return _precisionProbability; } + unsigned dodgeProbabiliy() const { return _dodgeProbability; } + + unsigned reactionSpeed() const { return _reactionSpeed; } + + const std::list<Item*>& inventory() const { return _inventory; } int x() { return _x; } int y() { return _y; } @@ -31,8 +44,25 @@ public: protected: bool _alive; unsigned _hp; + + /* movement related */ + unsigned _movements; int _x, _y; + /* combat related */ + unsigned _attack; + unsigned _defence; + + unsigned _magicAttack; // nota come magia + unsigned _magicDefence; // nota come resistenza + + unsigned _precisionProbability; + unsigned _dodgeProbability; + unsigned _reactionSpeed; + + // unsigned _abilityProbability; + + /* others */ unsigned _inventorySize; std::list<Item*> _inventory; |