string CreatureAttributes::getDescription() const { if (!isSpecial) return ""; string attack; if (attackEffect) attack = " It has a " + Effect::getName(*attackEffect) + " attack."; return adjectives(getSize(), isUndead(), notLiving) + (isHumanoid() ? " humanoid" : " beast") + (!isCorporal() ? " spirit" : "") + bodyDescription() + ". " + attack; }
double CreatureAttributes::getMinDamage(BodyPart part) const { map<BodyPart, double> damage { {BodyPart::WING, 0.3}, {BodyPart::ARM, 0.6}, {BodyPart::LEG, 0.8}, {BodyPart::HEAD, 0.8}, {BodyPart::TORSO, 1.5}, {BodyPart::BACK, 1.5}}; if (isUndead()) return damage.at(part) / 2; else return damage.at(part); }
bool Army::Troop::isAffectedByMorale(void) const { return !(isUndead() || isElemental()); }