aboutsummaryrefslogtreecommitdiff
path: root/src/creature.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/creature.cc')
-rw-r--r--src/creature.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/creature.cc b/src/creature.cc
index 3587ab0..13b54d3 100644
--- a/src/creature.cc
+++ b/src/creature.cc
@@ -13,7 +13,7 @@ using namespace std;
namespace creature {
Creature::Creature(const json& data)
- : inventory(json2ptrvec<item::Item>(data["inventory"])), creatureName(data["name"]), size(data["size"]), type(data["type"]), alignment(data["alignment"]), hdCount(data["hit_die_count"]), hdSides(data["hit_die_sides"]), speed(data["speed"]), stats(data["stats"]), skills(data["skills"]), saves(data["saves"]), langs(data["langs"]), cr(data["cr"]), proficiency(data["prof"]), dmgImmunities(json2vec<dmgType>(data["d_immunities"])), dmgResistances(json2vec<dmgType>(data["d_resistances"])), dmgVulnerabilities(json2vec<dmgType>(data["d_vulnerabilities"])), condImmunities(json2vec<dmgType>(data["c_immunities"])), features(json2ptrvec<feature::Feature>(data["features"]))
+ : inventory(json2ptrvec<entry::Item>(data["inventory"])), creatureName(data["name"]), size(data["size"]), type(data["type"]), alignment(data["alignment"]), hdCount(data["hit_die_count"]), hdSides(data["hit_die_sides"]), speed(data["speed"]), stats(data["stats"]), skills(data["skills"]), saves(data["saves"]), langs(data["langs"]), cr(data["cr"]), proficiency(data["prof"]), dmgImmunities(json2vec<dmgType>(data["d_immunities"])), dmgResistances(json2vec<dmgType>(data["d_resistances"])), dmgVulnerabilities(json2vec<dmgType>(data["d_vulnerabilities"])), condImmunities(json2vec<dmgType>(data["c_immunities"])), features(json2ptrvec<entry::Feature>(data["features"]))
{
// Initialize names and hp
if(((map<string, json>) data).contains("givenName")) {
@@ -109,7 +109,7 @@ namespace creature {
return bonus;
}
- void Creature::addInventoryItem(shared_ptr<item::Item> item) {
+ void Creature::addInventoryItem(shared_ptr<entry::Item> item) {
inventory.push_back(item);
}
@@ -141,7 +141,7 @@ namespace creature {
const int getAC(const Creature& c) {
int baseBonus = 10 + c.getBonus("dex");
int miscBonus = 0;
- for(auto a : getItems<item::Armor>(c)) {
+ for(auto a : getItems<entry::Armor>(c)) {
if(c.getScore("str") < a->getStrRequirement()) {
continue;
}