diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..657efa7 --- /dev/null +++ b/main.cpp @@ -0,0 +1,225 @@ +#include +#include +#include +#include +#include + +using namespace std; +//declaring some imp functions +void Hud(); +void Combathud(); +void Combat(); +void CreateAnimal(); +void StepAhed(); + +//Essential Var which i will use in the entire project +string name = "", explore = ""; +int level = 1, Xp = 0, Oxygen = 0, totalOxygen = 0, MaxOxygen = 0, NextLevel = 0, Health = 0, OxygenGas = 0, TotalHealth = 0,heal=0; +int Animal = 0,AnimalLevel = 1,AnimalHealth=0; +string AnimalName[5] = {"Shark","Seal","Whale","Stingray","Piranah"}; +string CurrentAnimal = ""; +int TotalAnimalHealth = AnimalHealth; + + +//Some set of function which I will use +void Hud() { + + std::cout << " Welcome to the World of Scuba: The Explore " << name << std::endl; + sleep(1); + cout << "Your Details are mention below: " << std::endl; + cout << "Your Oxygen is: " << totalOxygen << std::endl; + cout << "Your Health is: " << TotalHealth << std::endl; + cout << "Your Level is: " << level << std::endl; + StepAhed(); + }; + +void Combathud(){ + sleep(1); + system("clear"); + cout<<"Name: "<=1 && AnimalHealth>=1){ + cout<<"\n1. Attack "; + cout<<"\n2. Block"; + cout<<"\n3. Run\n\n\n"; + cin>>playerAttack; + + if(playerAttack==1){ +// attack + cout<<"You have perform an attack "<=1){ + cout<<"\nAnimal is attacking on you \n"; + TotalHealth = TotalHealth - animalAttack; + cout<< "\n you suffered "<=50){ + cout<<"\n You blocked the incomming attack..."; + heal = level*10 / 2; + cout<<"You have been heal for "<=50){ + cout<<"\n You successfully runaway..."; + Hud(); + } + else{ + cout<<"\n Sorry master you have been failed to runaway and monster attack on you..."; + TotalHealth -=animalAttack; + cout<<"Your health is decreases by "<> choice; + if (choice==1){ //choice is declared on line 6 + int temp = rand () % 100 +1; // It will work on probability concepts so each time it will trigger diffrent output + std::cout<<"You are moving forward ...\n"; + if (temp>=50){ + //Encounter an animal + CreateAnimal(); // this function will assign random animal which is located in hurdle.h + string TempName = AnimalName[rand() % 5]; + std::cout<< "A"<=50){ + //Encounter an animal + CreateAnimal(); + std::string TempName = AnimalName[rand() % 5]; + std::cout<< "A"<> name; + + //Fancy output checkpoint 1 + cout << "Creating the Character." << endl; + sleep(1); + cout << "Creating the Character.." << std::endl; + sleep(1); + cout << "Creating the Character..." << std::endl; + sleep(1); + + Hud(); + + +} + + +