Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <ctime>
- #include <cstdlib>
- using namespace std;
- int main ()
- {
- int a,b,c,d,f;
- cout << "[2]Attack Spider hatchling (level 1)"<<endl;
- cin>>a;
- if (a==2)
- {
- srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0));
- int exp1; int gold1; int loot1;
- for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){
- exp1 = (rand()%3)+0; gold1 = (rand()%5)+0; loot1 = (rand()%3)+0;
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0));
- int random_integer; int random_integer2; int random_integer3; int random_integer4; int random_integer5;
- for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){
- random_integer = (rand()%2)+0; random_integer2 = (rand()%2)+0; random_integer3 = (rand()%2)+0; random_integer4 = (rand()%2)+0; random_integer5 = (rand()%2)+0;
- srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0));
- int random_integer6; int random_integer7; int random_integer8; int random_integer9; int random_integer10;
- for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){
- random_integer6 = (rand()%2)+0; random_integer7 = (rand()%2)+0; random_integer8 = (rand()%2)+0; random_integer9 = (rand()%2)+0; random_integer10 = (rand()%2)+0;
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0));
- int random_integer11; int random_integer12; int random_integer13; int random_integer14; int random_integer15;
- for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){
- random_integer11 = (rand()%1)+0; random_integer12 = (rand()%1)+0; random_integer13 = (rand()%1)+0; random_integer14 = (rand()%1)+0; random_integer15 = (rand()%1)+0;
- srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0)); srand((unsigned)time(0));
- int random_integer16; int random_integer17; int random_integer18; int random_integer19; int random_integer20;
- for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){ for(int index=0; index<1; index++){
- random_integer16 = (rand()%1)+0; random_integer17 = (rand()%1)+0; random_integer18 = (rand()%1)+0; random_integer19 = (rand()%1)+0; random_integer20 = (rand()%1)+0;
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << 3-random_integer << " health" <<endl;
- int hp;
- hp= 3-(random_integer);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer11 << " damage"<<endl;
- cout << "You have " << 10-random_integer11 << " health left, What is your course of action?"<<endl;
- int hp11;
- hp11= 10-(random_integer11);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer2 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp-random_integer2 << " health" <<endl;
- int hp2;
- hp2= hp-(random_integer2);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer12 << " damage"<<endl;
- cout << "You have " << hp11-random_integer12 << " health left, What is your course of action?"<<endl;
- int hp12;
- hp12= hp11-(random_integer12);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer3 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp2-random_integer3 << " health" <<endl;
- int hp3;
- hp3= hp2-(random_integer3);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer13 << " damage"<<endl;
- cout << "You have " << hp12-random_integer13 << " health left, What is your course of action?"<<endl;
- int hp13;
- hp13= hp12-(random_integer13);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer4 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp3-random_integer4 << " health" <<endl;
- int hp4;
- hp4= hp3-(random_integer4);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer14 << " damage"<<endl;
- cout << "You have " << hp13-random_integer14 << " health left, What is your course of action?"<<endl;
- int hp14;
- hp14= hp13-(random_integer14);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer5 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp4-random_integer5 << " health" <<endl;
- int hp5;
- hp5= hp4-(random_integer5);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer15 << " damage"<<endl;
- cout << "You have " << hp14-random_integer15 << " health left, What is your course of action?"<<endl;
- int hp15;
- hp15= hp14-(random_integer15);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer6 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp5-random_integer6 << " health" <<endl;
- int hp6;
- hp6= hp5-(random_integer6);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer16 << " damage"<<endl;
- cout << "You have " << hp15-random_integer16 << " health left, What is your course of action?"<<endl;
- int hp16;
- hp16= hp15-(random_integer16);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer7 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp6-random_integer7 << " health" <<endl;
- int hp7;
- hp7= hp6-(random_integer7);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer17 << " damage"<<endl;
- cout << "You have " << hp16-random_integer17 << " health left, What is your course of action?"<<endl;
- int hp17;
- hp17= hp16-(random_integer17);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer8 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp7-random_integer8 << " health" <<endl;
- int hp8;
- hp8= hp7-(random_integer8);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer18 << " damage"<<endl;
- cout << "You have " << hp17-random_integer18 << " health left, What is your course of action?"<<endl;
- int hp18;
- hp18= hp17-(random_integer18);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer9 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp8-random_integer9 << " health" <<endl;
- int hp9;
- hp9= hp8-(random_integer9);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer19 << " damage"<<endl;
- cout << "You have " << hp18-random_integer19 << " health left, What is your course of action?"<<endl;
- int hp19;
- hp19= hp18-(random_integer19);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- cout << "You attack the spider hatchling (level 1), You deal " << random_integer10 << " damage" << endl;
- cout << "The Spider Hatchling (level 1) is left with " << hp9-random_integer10 << " health" <<endl;
- int hp10;
- hp10= hp9-(random_integer10);
- cout<<""<<endl;
- cout << "The Spider Hatchling (level 1) retaliates" <<endl;
- cout << "Spider Hatchling (level 1) deals " << random_integer20 << " damage"<<endl;
- cout << "You have " << hp19-random_integer20 << " health left, What is your course of action?"<<endl;
- int hp20;
- hp20= hp19-(random_integer20);
- cout<<""<<endl;
- cout << "[1]Attack again"<<endl;
- cout << "[2]Flee (no exp or gold gained)"<<endl;
- cin>>b;
- system("CLS");
- if (hp<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp2<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp3<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp4<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp5<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp6<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp7<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp8<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- if (hp9<=0)
- {
- cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
- }
- }
- system("PAUSE");
- return 0;
- }}}}}}}}}}}}}}}}}}}}}}}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement