aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-12 23:27:59 +0100
committerNao Pross <naopross@thearcway.org>2018-02-12 23:27:59 +0100
commit97ac1cbd026bfdfbe7153d088a807693323bb4e1 (patch)
tree84b8d5ed2d0809997e50ea054bf4faf227bafe6d
parentAdd tags recipe to generate ctags (diff)
downloadSubconscious-old-97ac1cbd026bfdfbe7153d088a807693323bb4e1.tar.gz
Subconscious-old-97ac1cbd026bfdfbe7153d088a807693323bb4e1.zip
Add Actor attributes
m---------lib/TestNLTmxMap0
m---------lib/libtmx0
-rw-r--r--src/main/headers/Actor.hpp34
3 files changed, 32 insertions, 2 deletions
diff --git a/lib/TestNLTmxMap b/lib/TestNLTmxMap
deleted file mode 160000
-Subproject e8190d51d2141c5414e25f7bb285b12eaaa9ef3
diff --git a/lib/libtmx b/lib/libtmx
new file mode 160000
+Subproject 495d94ddb11d10b3dd2e7707b2c57916675a9f2
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;