#include #include #include "FighterT.h" #include "ElfT.h" #include "FighterElfT.h" using namespace std; string FighterElfT::Name(void) const { string rv = FighterT::Name() + " the " + RaceName(); return rv; } string FighterElfT::Fight(void) const { string tmp = FighterT::Fight(); string damage = tmp.substr(10); int intDamage= stoi(damage); intDamage = max(intDamage+CauseDamage(), 1); cout << "\tI'm an elf, I should have hit for " << damage << " but instead I hit for " << intDamage << endl; return tmp.substr(0,10) + to_string(intDamage); }