Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <windows.h>
- #include <stdlib.h>
- #include <time.h>
- void imprime_vida(int vida){
- printf("\nHEALTH BAR: [");
- while(vida>0){
- printf("*");
- vida--;
- }
- printf("]\n");
- }
- int gera_numero(int inicio, int fim){
- int numero;
- while(1){
- numero = rand()%fim;
- if(numero >= inicio)
- break;
- }
- return numero;
- }
- int main() {
- int x,y=10,attack1,atk2,ring1=0,ring2=0,ring,troll,soup,terrain,difficulty,juju,kik;
- char place;
- srand(time(NULL));
- while(1){
- printf("\n \n Difficulty set: \n\n 1 for easy \n 2 for normal \n 3 for hard\n");
- scanf("%i",&difficulty);
- if(difficulty==1){
- x= gera_numero(15, 21);
- break;
- }
- if(difficulty==2){
- x=gera_numero(10,16);
- break;
- }
- if (difficulty==3){
- x=gera_numero(6,11);
- break;
- }
- }
- system("CLS");
- imprime_vida(x);
- printf("You have %i lives.\nOh, don't you worry.\nWhatever happens, you may think it all a mere bad dream.\n\n\nPress any button to start your adventure.\n \n",x);
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("You must find the cure for the curse, this land is doomed, you are the last hopefor the tribes and vilages in here. \n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("Would you like to begin in the swamp or forest? \n 1 for Swamp \n 2 for Forest \n");
- scanf("%i",&terrain);
- if(terrain==2){
- system("CLS");
- imprime_vida(x);
- printf("'The grand lake of mud, hidden now, from sight.'\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("You descend into a realm of darkness, and find it, mortally wounded, and alone.\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("\n You are being attacked by a pack of wolves\n What do you do?\n");
- printf(" 1- Attack them with your sword\n 2- Run away \n 3- Shoot them all with your old rifle\n ");
- scanf("%i",&attack1);
- system("CLS");
- imprime_vida(x);
- if(attack1==1 && x>=6){
- printf("You couldnt handdle the sword properly, but you still have %i lives remaining\n",x-6);
- printf("\n\n\n YOU FOUND THE FROST RING.");
- ring2=1;
- x=x-6;
- system("PAUSE");
- }
- if(attack1==1 && x<6){
- printf("You couldnt handdle the sword properly, you are dead. \n");
- }
- if(attack1==2 && x>=4) {
- printf("You ran away,but one wolf followed your trail, you had to fight it with your\n fists, you have %i lives",x-4);
- ring2=1;
- printf("\n\n\n YOU RECOVERED THE FROST RING\n");
- x=x-4;
- system("PAUSE");}
- if(attack1==2 && x<4){
- system("CLS");
- imprime_vida(x);
- printf("You ran away, but one of the wolves followed your trail, and ate you alive.");
- }
- if((attack1==3) && (x>=3)){
- printf("You killed the wolves, but you weren't able to reload quickly enough and got\nattacked, you have %i lives left. ",x-3);
- printf("\n\n\n YOU RECOVERED THE FROST RING\n");
- x=x-3;
- ring2=1;
- system("PAUSE");
- }
- if((attack1==3) && (x<3))
- printf("The wolf ate your bones, you died.");
- }
- if(terrain==1){
- system("CLS");
- imprime_vida(x);
- printf("Let us pray... to partake in communion. Let us partake in communion... and feastupon the old blood.\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("You walk in the swamp, and it starts to rain.\nYou hear whispers.\n-Their wills are weak, minds young.\n-The foul beasts will dangle nectar and lure the meek into the depths. \n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("Two uruks approaching your area what do you do?\n");
- printf("\n 1- Use your axe against them \n 2- Use a debuff that weakens Uruks \n 3- Use mind control in one of the Uruks\n digit a number\n");
- scanf("%i",&atk2);
- system("CLS");
- imprime_vida(x);
- if(atk2==1 && x<8){
- printf("You died\n");
- system("PAUSE");
- }
- if(atk2==1 && x>=8){
- printf("you killed both uruks but only have %i lives remaining\n",x-8);
- x=x-8;
- system("CLS");
- imprime_vida(x);
- printf("\n\n\nYOU RECOVERED THE RING OF FIRE\n");
- ring1=1;
- system("PAUSE");
- }
- if(atk2==2 && x<6)
- printf("You are dead.\n");
- if(atk2==2 && x>=6){
- system("CLS");
- x=x-6;
- imprime_vida(x);
- printf("Your debuff was very effective, the uruks died in a second, but you only have %i lives left\n",x-6);
- printf("\n\n\nYOU RECOVERED THE RING OF FIRE\n");
- ring1=1;
- system("PAUSE");
- }
- if(atk2==3){
- printf("you mind controlled the tougher Uruk that killed the other one easily, also it \nwas easy to kill a mind controlled Uruk\n Though he still damaged you.\n You have %i lives.",x-4);
- printf("\n\n\nYOU RECOVERED THE RING OF FIRE\n");
- x=x-4;
- ring1=1;
- system("PAUSE");
- }
- }
- system("CLS");
- imprime_vida(x);
- if(ring1==1 || ring2==1){
- printf("Use Magic ring?\n 1 for Yes \n 2 for No\n");
- scanf("%i",&ring);
- }
- if(ring==1 && ring1==1){
- system("CLS");
- imprime_vida(x);
- printf("YOU USED THE RING OF FIRE \n");
- }
- if(ring==1 && ring2==1){
- system("CLS");
- imprime_vida(x);
- printf("YOU USED THE FROST RING\n");
- }
- if(ring==2){
- system("CLS");
- imprime_vida(x);
- printf("Your journey ended now, you felt too scared to use the power of the ring, so you returned home\n");
- ring1=0;
- ring2=0;
- }
- if(ring2==1){
- system("CLS");
- imprime_vida(x);
- printf("You gained a misterious power\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("You found a cave, it's probably the best place to stay during the night\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf(" A huge troll is on your way\n What would you like to do?\n 1- Speak with it\n 2- Attack on stealth\n 3- Find out what he's got cooking\n");
- scanf("%i",&troll);
- if(troll==1){
- printf("TROLL SMASHES!\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("Your Frost Ring froze the troll, but now its uneffective\n");
- ring2=0;
- }
- if(troll==2 && x>=3){
- system("CLS");
- imprime_vida(x);
- system("PAUSE");
- printf("\nYou go on stealth towards the troll and stab his back\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("TROLL DONT WANT.... \nDIE.....\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("\n He dies, but still attacks you\n You have %i lives remaining\n",x-3);
- x=x-3;
- }
- if(troll==2 && x<3){
- system("CLS");
- imprime_vida(x);
- system("PAUSE");
- printf("You go on stealth towards the troll and stab his back\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("You almost died, but your ring activated and froze the troll.\n Your frost ring now is uneffective.\n"); }
- ring2==0;
- if(troll==3){
- system("CLS");
- imprime_vida(x);
- printf("Troll speaks:\n \n -Troll cooks **heh** elven soup would you like to try it?\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("\n 1 for Yes \n 2 for No\n");
- scanf("%i",&soup);
- if(soup==1){
- printf("You got poisoned and died.\n");
- x=-1;
- }
- if(soup==2){
- system("CLS");
- imprime_vida(x);
- printf("You refused to drink the soup.\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("TROLL ANGRY!!!\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("\nYour ring froze the troll, but now it's uneffective\n");
- ring2=0;
- }
- }
- }
- if(ring1==1){
- system("CLS");
- imprime_vida(x);
- printf("You gained a misterious power\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("Seek the old blood... but beware the frailty of men.\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("You found a cave, its the best place to hide during the night.\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf(" A huge troll is on your way\n What would you like to do?\n 1- Speak with it\n 2- Attack on stealth\n 3- Find out what he's got cooking\n");
- scanf("%i",&troll);
- if(troll==1){
- printf("TROLL SMASHES!\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("Your Ring of Fire burnt the troll, but now has less power.\n You have %i lives remaning. \n",x-1);
- ring1=4;
- x=x-1;
- }
- if(troll==2 && x>=4){
- system("CLS");
- imprime_vida(x);
- system("PAUSE");
- printf("\nYou go on stealth towards the troll and stab his back\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("TROLL DONT WANT.... \nDIE.....\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("\n He dies, but still attacks you\n You have %i lives remaining\n",x-4);
- x=x-4;
- }
- if(troll==2 && x<4){
- system("CLS");
- imprime_vida(x);
- system("PAUSE");
- printf("You go on stealth towards the troll and stab his back\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("You almost died, but your Fire Ring activated and burnt the troll.\n Your Fire Ring now is less poweful.\n");
- ring1==4;}
- if(troll==3){
- system("CLS");
- imprime_vida(x);
- printf("Troll speaks:\n \n -Troll cooks **heh** elven soup would you like to try it?\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("\n 1 for Yes \n 2 for No\n");
- scanf("%i",&soup);
- if(soup==1){
- printf("You got poisoned and died.\n");
- x=-1;
- }
- if(soup==2){
- system("CLS");
- imprime_vida(x);
- printf("You refused to drink the soup.\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("TROLL ANGRY!!!\n\n");
- system("PAUSE");
- system("CLS");
- imprime_vida(x);
- printf("\nYour fire ring burnt the troll to ashes, but now it's less powerful.\n");
- ring2=4; }
- }
- }
- system("CLS");
- x=0;
- system("CLS");
- imprime_vida(x);
- printf("And remember... \n this was just a mere dream... \n");
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement