diff options
Diffstat (limited to 'src/creature.cc')
-rw-r--r-- | src/creature.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/creature.cc b/src/creature.cc index 955da4d..d181f76 100644 --- a/src/creature.cc +++ b/src/creature.cc @@ -291,9 +291,9 @@ namespace creature { int baseBonus = 10 + dex; int miscBonus = 0; for(auto a : utils::castPtrs<entry::Item, entry::Armor>(c.getInventory())) { - if(c.getScore(rules::Ability::Str()) < a->getStrRequirement()) { - continue; - } + //if(c.getScore(rules::Ability::Str()) < a->getStrRequirement()) { + // continue; + //} auto armorType = a->getArmorType(); if(armorType == "misc" || armorType == "shield") { miscBonus += a->getACBonus(); @@ -452,12 +452,14 @@ namespace creature { } if(! getFeatures().empty()) { text << std::endl << "Features:" << std::endl; - for(auto f: getFeatures()) { - text << " * " << f->getText(*this) << std::endl; + std::set<std::string> sortedFeatures; // set implementation sorts (but masks repeats...) + for(auto f : getFeatures()) sortedFeatures.insert(f->getText(*this)); + for(auto str : sortedFeatures) { + text << " * " << str << std::endl; } } if(! getInventory().empty()) { - std::map<std::string, int> inventoryText; + std::map<std::string, int> inventoryText; // map implementation maintains keys in sorted order double totalWeight = 0; int totalCost = 0; for(auto i : getInventory()) { |