Sorry i should have posted all the code
Code:
#include <iostream>
#include "mage.h"
#include "Warrior.h"
#include "Rogue.h"
#include "CharacterType.h"
#include <memory>
#include <string>
#include <string.h>
#include "Inventory.h"
#include "blankEnemy.h"
#include "Enemy.h"
#include "Boss.h"
#include <cstdlib>
#include <ctime>
#include "DeathMenu.h"
#include "GameStart.h"
#include "FirstPhase.h"
#include <Windows.h>
#include "SecondPhase.h"
using namespace std;
int SecondPhase(blankCharacter, blankEnemy,Inventory, string name, std::unique_ptr<blankCharacter> myCharacter,std::unique_ptr<blankEnemy> myEnemy, std::unique_ptr<Inventory> myInventory,std::unique_ptr<blankEnemy>myBoss)
{
int Path2;
cout << "______________________________________________________________________________" << endl;
cout << "______________________________________________________________________________" << endl;
cout << "You start walking to the dark lands, you've lost all sense of time, and space " << endl;
cout << "all that has greeted you for what seems like an eternity was the darkness of the "<< endl;
cout << "abyss. In the distance you see a glimer of light, and what seems to be a pert" << endl;
cout << "figure, what will you do?" << endl;
cout << "______________________________________________________________________________" << endl;
cout <<" 1 - Remain shourded in darkness, and follow it, keeping safe as it could be a " << endl;
cout <<" threat" << endl;
cout <<" 2 - Confront the figure" << endl;
cout << "______________________________________________________________________________" << endl;
cin >> Path2;
if(Path2 == 1)
{
cout << "_______________________Chapter two: Blackest Night_________________________" << endl;
cout << "You try to conceal yourself in the dark abyss. Little do you know that " << endl;
cout << "the creature has already detected you, using it's physical form to allure" << endl;
cout << "you. Get ready for battle." << endl;
cout << "___________________________________________________________________________" << endl;
cout << "___________________________________________________________________________" << endl;
do
{
cout << name << endl;
cout << "Magic: " << myCharacter->getMagic() << endl;
cout << "Stamina: " << myCharacter->getStamina() << endl;
cout << "Health: " << myCharacter->getHealth() << endl;
cout << "_____________________________________" << endl;
cout << "_____________________________________" << endl;
cout << "Attack 1 :"<< myCharacter->getFirstAttack() << endl;
cout << "Attack 2 :"<< myCharacter->getSecondAttack() << endl;
cout << "Attack 3 :"<< myCharacter->getThirdAttack() << endl;
cout << "---------------------------------------" << endl;
cout << "----Inventory Bag----" << endl;
cout <<"Potion, health increase 4:"<< myInventory->getPotion() << endl;
cout <<"Ether, Magic increase 5:" << myInventory->getEther() << endl;
cout << "Senzu bean, stamina up 6 :" << myInventory->getSenzuBean() << endl;
cout << "_______________________________________" << endl;
cout << "_______________________________________" << endl << endl;
cout << "Shapeshifer" << endl;
cout << "Health :"<< myEnemy->getHealth() << endl;
cout << "Magic :" << myEnemy->getMagic() << endl << endl;
int choice;
cin >> choice;
switch (choice)
{
//For Warrior's Attack
case 1:
if(myCharacter->getHealth() > 10)
{
myEnemy->DeductHealth(20);
myCharacter->SetStamina(myCharacter->getStamina()-10);
cout << "You attacked the enemy" << endl << endl;
}
else
{
cout << "Not enough stamina!" << endl;
}
break;
//For Warrior's SecondAttack
case 2:
if(myCharacter->getHealth() > 25)
{
myEnemy->DeductHealth(30);
myCharacter->SetStamina(myCharacter->getStamina()-25);
cout << " You did a devistating magic attack." << endl << endl;
}
else
{
cout << name << ", not enough stamina!" << endl;
}
break;
//Warrior's 3rd Attack
case 3:
if(myCharacter->getMagic() > 50)
{
myEnemy->DeductHealth(110);
myCharacter->SetMagic(myCharacter->getMagic()-70);
cout << "You attacked the enemy, it looks critical!" << endl << endl;
}
else
{
cout << name << ",not enough magic! Quick think fast!" << endl;
}
break;
case 4:
if(myInventory->getPotion() > 0)
{
myCharacter->SetHealth(myCharacter->getHealth()+200);
myInventory->SetRestore(myInventory->getPotion() - 1);
cout << " You restored and increased your health." << endl << endl;
}
else
{
cout << "You have no potions!" << endl;
}
break;
case 5:
if(myInventory->getEther() > 0)
{
myCharacter->SetMagic(+200);
myInventory->SetmagicUp(myInventory->getEther() - 1 );
cout << " You restored your magic." << endl << endl;
}
else
{
cout << "You don't have an Ether!" << endl;
}
break;
case 6:
if(myInventory->getSenzuBean() > 0)
{
myCharacter->SetStamina(+200);
myInventory->SetStaminaUp(myInventory->getSenzuBean() -1);
cout << "You restored and increased your stamina" << endl << endl;
}
else
{
cout << "You don't have a Senzu Bean! You can't recover stamina!" << endl;
}
break;
}
cout << "Shapeshifer" << endl;
cout << "Health :"<< myEnemy->getHealth() << endl;
cout << "Magic :" << myEnemy->getMagic() << endl << endl;
cout << "_______________________________________________" << endl;
int max, random_number;
max = 3;
srand(time(0));
random_number = (rand() % max) + 1;
switch(random_number)
{
case 1:
myCharacter->DeductHealth(20);
cout << "The enemy fights back!" << endl;
cout << "___________________________________________________" << endl << endl;
break;
case 2:
myCharacter->SetMagic(myCharacter->getMagic()-25);
cout << "It's attacking your magic supply, quick do something!" << endl;
cout << "_____________________________________________________" << endl;
break;
case 3:
myCharacter->DeductHealth(50);
myCharacter->SetMagic(myCharacter->getMagic()-50);
cout << "It unleashed its ultimate attack, you must fight back!" << endl;
cout << "______________________________________________________" << endl << endl;
break;
};
//ThirdPhase();
} while( myCharacter->getHealth() > 0 || myEnemy->getHealth() > 0 );
if(myEnemy->getHealth() < 0)
{
// return ThirdPhase();
}
if(myCharacter->getHealth()<0)
{
return deathScreen();
}
}
else if(Path2 == 2)
{
cout << "----------------------Chapter two: Blackest Night----------------------" << endl;
cout << "You approach the woman, however, as you begin to close in, a mongolian worm" << endl;
cout << "bursts from the ground and devours her whole" << endl;
//return ThirdPhase();
}
else
{
cout << "You are doing it wrong, warrior! Press either '1','2' or '3', nothing else!" << endl;
cout << "\n----------------------Press any key to continue----------------------" << endl;
//_getch();
}
return 0;
};