#include #include "PersonT.h" #include "SpellT.h" #include "DoubleSpellT.h" using namespace std; int main() { PersonT person("Bob"); SpellT * spell{nullptr}; spell = new DoubleSpellT("Health","you heal", "A golden glow surrounds you, you heal!"); spell->AddEffect(AttributeT::HEALTH, 2); spell->SetDuration(3); person.AddSpell(spell); spell = new SpellT("Strength", "A strength spell", "You vibrate and seem to become stronger"); spell->AddEffect(AttributeT::ATTACK, 10); spell->SetDuration(4); person.AddSpell(spell); spell = new SpellT("Bug", "A spell to test for a memory leak.", "The blue screen of death surrounds you and you are weaker."); spell->AddEffect(AttributeT::ATTACK, -10); spell->SetDuration(40); person.AddSpell(spell); for(int turn=0; turn < 5; turn++) { cout << "Ready to tick" << endl; person.Tick(); cout << endl; } return 0; }