aboutsummaryrefslogtreecommitdiff
path: root/src/creature.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-04-16 11:23:27 -0400
committerYour Name <you@example.com>2021-04-16 11:23:27 -0400
commit4618763c0e3a723bf4bb43c7b9edbce87240e0af (patch)
treea18aa4bf7da05ac02b4e37b199aeeb82da977aea /src/creature.h
parentdfce4d0398a8bafbb7ad7a31345af181c0269c09 (diff)
downloaddmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.gz
dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.bz2
dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.zip
Rebased feature/item on entry
Diffstat (limited to 'src/creature.h')
-rw-r--r--src/creature.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/creature.h b/src/creature.h
index 88326f4..fee7c35 100644
--- a/src/creature.h
+++ b/src/creature.h
@@ -2,10 +2,10 @@
#include "json.hpp"
#include "jsonable.h"
-namespace feature {
+namespace entry {
class Feature;
}
-namespace item {
+namespace entry {
class Item;
}
class Armor;
@@ -54,15 +54,15 @@ namespace creature {
int getScore(const std::string& ability) const {return stats.at(ability);}
int getBonus(const std::string& ability) const {return (int) (getScore(ability) - 10) / 2;}
int getProficiency(void) const {return proficiency;}
- std::vector<std::shared_ptr<feature::Feature>> getFeatures(void) const {return features;}
- std::vector<std::shared_ptr<item::Item>> getInventory(void) const {return inventory;}
+ std::vector<std::shared_ptr<entry::Feature>> getFeatures(void) const {return features;}
+ std::vector<std::shared_ptr<entry::Item>> getInventory(void) const {return inventory;}
// Setters (mutators)
void setGivenName(std::string name) {givenName = name;}
void applyDamage(int amount, const std::string& type, const std::vector<std::string>& qualifiers);
//void setScore(const std::string& ability, int score);
- void addInventoryItem(std::shared_ptr<item::Item> item);
+ void addInventoryItem(std::shared_ptr<entry::Item> item);
void removeInventoryItem(const std::string& itemName);
virtual json toJson(void) const;
@@ -72,7 +72,7 @@ namespace creature {
std::string givenName;
int hpMax;
int hp;
- std::vector<std::shared_ptr<item::Item>> inventory;
+ std::vector<std::shared_ptr<entry::Item>> inventory;
//Immutable variables
const std::string creatureName;
@@ -93,7 +93,7 @@ namespace creature {
const std::vector<dmgType> dmgResistances;
const std::vector<dmgType> dmgVulnerabilities;
const std::vector<dmgType> condImmunities;
- const std::vector<std::shared_ptr<feature::Feature>> features;
+ const std::vector<std::shared_ptr<entry::Feature>> features;
};