aboutsummaryrefslogtreecommitdiff
path: root/src/creature.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-04-13 16:16:27 -0400
committerYour Name <you@example.com>2021-04-13 16:16:27 -0400
commit9034c3d2533177f7cb7a7ce939ec53f7fa63f60e (patch)
tree49bf01a4682c251cb3778f563afeb7e1ec8d41c7 /src/creature.h
parent2ab51e507d620c4479e07ca0ec47d22c8c66bc90 (diff)
downloaddmtool-9034c3d2533177f7cb7a7ce939ec53f7fa63f60e.tar.gz
dmtool-9034c3d2533177f7cb7a7ce939ec53f7fa63f60e.tar.bz2
dmtool-9034c3d2533177f7cb7a7ce939ec53f7fa63f60e.zip
Added spells
Diffstat (limited to 'src/creature.h')
-rw-r--r--src/creature.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/creature.h b/src/creature.h
index f73942f..6ba8cca 100644
--- a/src/creature.h
+++ b/src/creature.h
@@ -62,35 +62,38 @@ namespace creature {
// Setters (mutators)
void setGivenName(std::string);
void applyDamage(int amount, const std::string& type, const std::vector<std::string>& qualifiers);
- void setScore(const std::string& ability, int score);
+ //void setScore(const std::string& ability, int score);
void addInventoryItem(std::shared_ptr<item::Item> item);
void removeInventoryItem(const std::string& itemName);
virtual json toJson(void) const;
private:
- const std::string creatureName;
+ // Mutable variables
std::string givenName;
+ int hpMax;
+ int hp;
+ std::vector<std::shared_ptr<item::Item>> inventory;
+
+ //Immutable variables
+ const std::string creatureName;
const std::string size;
const std::string type;
const std::string alignment;
- int hdCount;
+ const int hdCount;
const int hdSides;
- int hpMax;
- int hp;
const std::string speed;
- std::map<std::string, int> stats;
- std::map<std::string, int> skills;
- std::vector<std::string> saves;
+ const std::map<std::string, int> stats;
+ const std::map<std::string, int> skills;
+ const std::vector<std::string> saves;
const std::vector<std::string> senses;
const std::string langs;
const double cr;
- int proficiency;
+ const int proficiency;
const std::vector<dmgType> dmgImmunities;
const std::vector<dmgType> dmgResistances;
const std::vector<dmgType> dmgVulnerabilities;
const std::vector<dmgType> condImmunities;
- std::vector<std::shared_ptr<item::Item>> inventory;
std::vector<std::shared_ptr<feature::Feature>> features;
};