#include #include "PlayerT.h" #include "FighterT.h" #include "WizardT.h" #include "BattleMageT.h" using namespace std; void BattleMageT::ChangeHP(int newHP){ int change = newHP; if(newHP < 0) { change = min( static_cast(newHP * .75) , -1); } PlayerT::ChangeHP(change); } string BattleMageT::Name(void) const{ return "Battlecaster " + PlayerT::Name(); } string BattleMageT::Fight(void) const{ int method = rand() %2; if (method) { return FighterT::Fight(); } else { return WizardT::Fight(); } } string BattleMageT::Speak(void) const { string tmp; tmp = WizardT::Speak(); return tmp.substr(0, tmp.size()/2); }