Skip to content

Instantly share code, notes, and snippets.

@willium
Forked from anonymous/gameLibrary
Created April 24, 2012 02:28
Show Gist options
  • Save willium/2475590 to your computer and use it in GitHub Desktop.
Save willium/2475590 to your computer and use it in GitHub Desktop.
All my js code for this game
var current = 0;
var meds = 0;
var gun = '0';
var quest = 'none';
var randNum;
var james = 'not_done';
var note = 'not_done';
var mine = 'not_done';
var quests_done = 0;
var left_man_met = 'false';
var left_quest = 'false';
var sav_met = 'false';
var trader_met = 'false';
function getRandNum(nums) {
randNum = Math.floor(Math.random() * nums ) + 1;
return randNum;
}
function validateForm(form) {
if (form.match(/^[\d]*$/ )) {
if (form == "") {
alert ("Please fill out all forms then try again.");
return "false";
} else {
if (form == 1 || form == 2) {
return "true";
} else {
alert ("Please enter a one or a two.");
}
}
} else {
alert ("Make sure you only enter positive numbers and no spaces, then try again.");
return "false";
}
}
function validateForm(form) {
if (form.match(/^[\d]*$/ )) {
if (form == "") {
alert ("Please fill out all forms then try again.");
return "false";
} else {
return 'true';
}
} else {
alert ("Make sure you only enter positive numbers and no spaces, then try again.");
return "false";
}
}
$(function() {
$('#confirm').click(function() {
var screenVal = document.getElementById('gameScreen').value;
var choice = document.getElementById('choice').value;
formValid = validateForm(choice);
if (formValid == 'true') {
//Leaving Colony
if(current == 0) {
//Choice 1 is to take gun
if (choice == 1){
gun = '1/2';
$("#gun").val('50%');
$("#gameScreen").val(screenVal + "You take the gun and leave your colony. You journey out into the wastlands. You are by an abandon town. You can continue out into the wastland, or search the city. \n1. Search abandon town. 2.Continue into the wasteland. \n \n");
current = 1;
}
//Choice 2 is to take medicine
if (choice == 2){
meds = meds+2;
$("#meds").val(meds);
$("#gameScreen").val(screenVal + "You take the medicine and leave your colony. You journey out into the wastlands. You are by an abandon town. You can continue out into the wastland, or search the city. \n1. Search abandon town. 2.Continue into the wasteland. \n \n");
current = 1;
}
//Going to town
} else if (current == 1) {
//Choice to kill kill animal or leave into wastes.
if (choice == 1) {
$("#gameScreen").val(screenVal + "Upon entering the town, you see a dog sized beast with patched fur and pealing skin. Droll hangs from it's mouth and it looks vicious. It's in front of a crate of medicine. \n1.Try to kill the beast 2.Approach the beast. 3.Leave town and wonder into the wastes. \n \n");
current = 2;
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You leave and explore into the wastelands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n \n");
current = 8;
}
//Choice to kill beast.
} else if (current == 2) {
if (choice == 1) {
if (gun == "1/2") {
randNum = getRandNum(2);
if (randNum == 1) {
//You missed
$("#gameScreen").val(screenVal + "You miss the animal, and it attacks you, ripping apart your flesh viciously. You are dead. Game over.");
} else if (randNum == 2) {
meds = meds+1;
$("#meds").val(meds);
$("#gameScreen").val(screenVal + "You hit the animal. It let's out an odd snarl, then falls to the ground, dead. You collect the medicine and may now either go into the waste lands or keep searching the town. \n1.Go into the wastlands. 2.Continue searching the town. \n \n");
current = 3;
}
} else if (gun == '0') {
$("#gameScreen").val(screenVal + "You try to kill the animal with your hands, but the animal tears out a chunk of your skin before you're able to snap it's neck. You use a pack of meds to heal yourself and leave the town into the wastlands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n \n");
meds = meds-1;
$("#meds").val(meds);
current = 8;
}
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You approach the fould beast, but it quickly tearns on you, pouncing on your body. It bites your throat and your blood gushes from your arterry. The animal starts to eat you alive and you die a slow, painful death. Game Over!");
current = "Game Over!";
} else if (choice == 3) {
$("#gameScreen").val(screenVal + "You leave and explore into the wastelands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n \n");
current = 8;
}
//Continue Searching th Town.
} else if (current == 3) {
if (choice == 1) {
$("#gameScreen").val(screenVal + "You leave and explore into the wastelands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n \n");
current = 8;
} else if (choice == 2) {
$('#gameScreen').val(screenVal + 'As you continue searching the town, you find a an odd, grizzled man with a combat knife standing around. \n1.Approach the man 2.Leave the town into the wastelands \n \n');
current = 4;
}
//Approach the grizzled man.
} else if (current == 4) {
if (choice == 1) {
$("#gameScreen").val(screenVal + "You approach the man.\n1.Kill the man 2.Talk to man and try to be nice \n \n");
current = 7;
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You leave and explore into the wastelands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n\n");
current = 8;
}
//Try to kill the man
} else if (current == 7) {
if (choice == 1) {
if (gun == '0') {
$("#gameScreen").val(screenVal + "You attempt to attack the man with your hands but he pulls out his knife and kills you. You are dead. Game Over!");
current = 'game over';
} else if (gun == '1/2') {
randNum = getRandNum(2);
if (randNum == 1) {
//You miss
$("#gameScreen").val(screenVal + "You attempt to shoot the man but miss. He notices and stabs you with a knife until you die. You are dead. Game Over!");
current = 'game over';
} else if (randNum == 2) {
//You hit him
$("#gameScreen").val(screenVal + "You shoot the man and search the dead body. You find a medicine pack and take it. You then leave the town to explore the wastlands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n\n");
meds = meds+1;
$("#meds").val(meds);
current = 8;
}
}
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You talk to the man but he just grumbles at you rudely. \n1.Kill the man 2.Leave the town \n \n");
current = 6;
}
//The man grumbles at you
} else if (current == 6) {
if (choice == 1) {
if (gun == '0') {
$("#gameScreen").val(screenVal + "You attempt to attack the man with your hands but he pulls out his knife and kills you. You are dead. Game Over!");
current = 'game over';
} else if (gun == '1/2') {
randNum = getRandNum(2);
if (randNum == 1) {
//You miss
$("#gameScreen").val(screenVal + "You attempt to shoot the man but miss. He then stabs you with a knife until you die. You are dead. Game Over!");
current = 'game over';
} else if (randNum == 2) {
//You hit him
$("#gameScreen").val(screenVal + "You shoot the man and search the dead body. You find a medicine pack, keep it, and head into the wastelands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n\n");
meds = meds+1;
$("#meds").val(meds);
current = 8;
}
}
} else if(choice == 2) {
$("#gameScreen").val(screenVal + "You leave and explore into the wastelands. When you explore the wastelands, you find a settlement. You see some people standing around and see two large buildings to your left and to your right. You enter one. \n1.Enter the building on the right. 2.Enter the building on the left. \n \n");
current = 8;
}
//You're in the city.
} else if (current == 8) {
if (choice == 1) {
$("#gameScreen").val(screenVal + "Upon entering the building, you see Saverous. He looks a little different then the other bunker survivors had described him, but you know it's him. He's sitting on a throne of sorts. You walk up and begin to tell him about your colony and how they need food. Saverous holds a cold look on his face. He informs you that he will feed your colony under the condition that you complete two of three tasks for him. The first mission is to assassinate a man named James. He's been making faulty weapons for Saverous, one of which malfunctioned and killed one of his men. The second is to bring a note to a colony that Saverous's colony has been fighting for a long time calling for a cease fire. The third is to search an abandoned mine for people. He would like to have his colony expand, but he lacks the man power. 'So what do you think?' Says Saverous. \n1.Kill James 2.Bring the note to the colony 3.Search abandon mine. \n\n");
sav_met = 'true';
current = 9;
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You enter the building on the left. It's a more run down building and a shady man approaches you. He informs you of a man named Archolis that has been causing problems for the colonie for a while, and he wants him dead. The man is willing to pay you a pack of meds to kill the man. \n1. Accept and look for Archolis 2. Leave back into the town.\n\n");
left_man_met = 'true';
current = 14;
}
sav_met = 'true';
//In left house in front of guy.
} else if (current == 14) {
if (choice == 1) {
$("#gameScreen").val(screenVal + "You agree to kill Archolis and the man informs you of his where abouts. You head over to Archolis. He's standing by himself on the outskirts of town. \n1. Kill him on sight 2. Leave Archolis alone and give up mission\n\n");
quest = "archolis";
$("#quest").val("Eliminate Archolis");
current = 15;
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You refuse to kill Archolis and leave back into the town. There are two buildings on your left and right. \n1. Go to building on right 2. Go to building on left\n\n");
current = 8.5;
}
//Back in Town area
} else if (current == 8.5) {
if (choice == 1) {
//Building on right
$("#gameScreen").val(screenVal + "Upon entering the building, you see Saverous. He looks a little different then the other bunker survivors had described him, but you know it's him. He's sitting on a throne of sorts. You walk up and begin to tell him about your colony and how they need food. Saverous holds a cold look on his face. He informs you that he will feed your colony under the condition that you complete two of three tasks for him. The first mission is to assassinate a man named James. He's been making faulty weapons for Saverous, one of which malfunctioned and killed one of his men. The second is to bring a note to a colony that Saverous's colony has been fighting for a long time calling for a cease fire. The third is to search an abandoned mine for people. He would like to have his colony expand, but he lacks the man power. 'So what do you think?' Says Saverous. \n1.Kill James 2.Bring the note to the colony 3.Search abandon mine. \n\n");
sav_met = 'true';
current = 9;
} else if (choice == 2) {
//Building on left
if (left_man_met == 'false') {
$("#gameScreen").val(screenVal + "You enter the building on the left. It's a more run down building and a shady man approaches you. He informs you of a man named Archolis that has been causing problems for the colonie for a while, and he wants him dead. The man is willing to pay you a pack of meds to kill the man. \n1. Accept and look for Archolis 2. Leave back into the town.\n\n");
left_man_met = 'true';
current = 14;
} else if (left_man_met == 'true') {
if (left_quest == 'false') {
$("#gameScreen").val(screenVal + "The shady man that was in room before is still there. He tells you that the offer still stands with Archolis. \n1. Accept and look for Archolis 2. Leave back into the town. \n \n");
current = 14;
} else if (left_quest == 'done') {
$("#gameScreen").val(screenVal + "The shady man is still in the building, but no longer has a use for you. You have no other reason to be in the building and go back into the town.");
current = 8.5;
}
}
}
//Replying to Saverous Quests
} else if (current == 9) {
randNum = getRandNum(2);
if (choice == 1) {
if (trader_met == 'false') {
if (gun == '0') {
$("#gameScreen").val(screenVal + "That's great, report back to me when you finish the job. Saverous says. Saverous hands you a rusty gun and you leave the building into the town to find James. On your way over, you stumble upon a trader. He offers you to trade " + randNum + " med packs in return for a valuable gun.\n1.Try to kill man 2.Trade with man for valuable gun 3.Pass by the man to James\n\n");
gun = '1/4';
$("#gun").val('25%');
current = 11;
} else if (gun != '0') {
$("#gameScreen").val(screenVal + "That's great, report back to me when you finish the job. Saverous says. You leave the building into the town to find James. On your way over, you stumble upon a trader. He offers you to trade " + randNum + " med packs in return for a valuable gun.\n1.Try to kill man 2.Trade with man for valuable gun 3.Pass by the man to James\n\n");
current = 11;
}
trader_met = 'true';
} else if(trader_met == 'true') {
if (gun == '0') {
$("#gameScreen").val(screenVal + "That's great, report back to me when you finish the job. Saverous says. Saverous hands you a rusty gun and you leave the building into the town to find James. On your way over, you stumble upon a trader. He offers you to trade " + randNum + " med packs in return for a valuable gun.\n1.Try to kill man 2.Trade with man for valuable gun 3.Pass by the man to James\n\n");
gun = '1/4';
$("#gun").val('25%');
current = 11;
} else if (gun != '0') {
$("#gameScreen").val(screenVal + "That's great, report back to me when you finish the job. Saverous says. You leave the building into the town to find James. You continue through the town until you find James. You walk up to him. \n1.Kill James 2.Don't kill James and return to Saverous for another quest\n\n");
current = 12;
}
}
$("#quest").val("Eliminate James");
quest = 'james';
} else if (choice == 2) {
$("#quest").val("Deliver Note To Colony");
quest = 'note';
$("#gameScreen").val(screenVal + "Alright, says Saverous. He hands you a note and you head out towards the colonie. About a mile out of the town, you find a wounded dog. It looks like it's been bitten by something. You could heal the dog with one med-pack or move on. \n1. Heal dog with med pack 2. Leave dog and continue to the colony.\n\n");
current = 16;
} else if (choice == 3) {
$("#quest").val("Search the mine for life");
$("#gameScreen").val(screenVal + "You head over towards the mine. By the entrance to it is a deadly looking man with a dog like beast on a chain leash that he's holding. The man's face is peeling skin, and he wears a hat on his head. His skin looks gooey and his dog is similer. It has no fur, and just has greenish skin. It's massive fangs hang out of it's drooling mouth. You can either attempt to run past the man into the mine, try to kill the man, or return to Saverous for another task. \n1.Try to kill man 2. Attempt to tun past the man 3. Return to Saverous.");
current = 13;
}
//Replying to trader
} else if (current == 11) {
alert (gun);
if (choice == 1) {
console.log(gun);
if (gun == '1/2') {
randNum2 = getRandNum(2);
if (randNum2 == 1) {
var randNum3 = getRandNum(2);
if (randNum3 == 1) {
$("#gameScreen").val(screenVal + "You attempt to shoot the man but miss. He immedietley draws his gune and shoots you between the eyes. You're dead. Game over!");
current = 'Game Over';
} else if (randNum3 == 2) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You attempt to shoot the man but miss. He shoots you in the leg before you're able to kill him with another bullet. You use a pack of meds to heal yourself. You continue down the path until you find James by himself. You walk up to him. 1.Kill James 2.Don't kill James and return to Saverous for another quest\n\n");
meds = meds-1;
$("#meds").val(meds);
current = 12;
}
}
} else if (randNum2 == 2) {
$("#gameScreen").val(screenVal + "You draw your gun and shoot the man in the chest. You search the body and take the gun he had. You continue down the path until you find James by himself. You walk up to him. 1.Kill James 2.Don't kill James and return to Saverous for another quest\n\n");
gun = '3/4';
$("#gun").val('75%');
current = 12;
}
} else if (gun == '1/4') {
randNum2 = getRandNum(4);
if (randNum2 == 1) {
$("#gameScreen").val(screenVal + "You draw your gun and shoot the man in the chest. You search the body and take the gun he had. You continue down the path until you find James by himself. You walk up to him. \n1.Kill James 2.Don't kill James and return to Saverous for another quest\n\n");
gun = '3/4';
current = 12;
} else if (randNum2 != 1) {
$("#gameScreen").val(screenVal + "You attempt to shoot the man but miss. He immedietley draws his gone and shoots you between the eyes. You're dead. Game over!");
current = 'Game Over';
}
}
} else if (choice == 2) {
if(meds >= randNum) {
$("#gameScreen").val(screenVal + "You give the man the meds and he hands you the gun. You continue through the town until you find James. You walk up to him. \n1.Kill James 2.Don't kill James and return to Saverous for another quest\n\n");
gun = '3/4';
$("#gun").val('75%');
current = 12;
meds = meds-randNum;
$("#meds").val(meds);
} else if (meds <randNum) {
$("#gameScreen").val(screenVal + "You don't have enough meds to sell for the gun. You leave the man and continue through town until you find James. You walk up to him. \n1.Kill James 2.Don't kill James and return to Saverous for another quest\n\n");
current = 12;
}
} else if (choice == 3) {
$("#gameScreen").val(screenVal + "You continue through the town until you find James. You walk up to him. \n1.Kill James 2.Don't kill James and return to Saverous for another quest\n\n");
current = 12;
}
//Next to James
} else if (current == 12) {
if (choice == 1) {
if (gun == '1/4') {
randNum = getRandNum(4);
if (randNum == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous reporting to him that James is dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (randNum != 1) {
randNum = getRandNum(4);
if (randNum == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot before he get's his knife out that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot before he get's his knife out that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (randNum == 2) {
if (meds >= 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. The stab wounds from James are bleeding profusely and you use a pack of medicine to heal yourself. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. The stab wounds from James are bleeding profusely and you use a pack of medicine to heal yourself. You return to Saverous and let him know that James his dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (meds <= 0) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. Your stab wounds prove fatal and you slowly bleed out. You finnaly drift out of concniousness and die. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (gun == '1/2') {
randNum = getRandNum(2);
if (randNum == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous reporting to him that James is dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (randNum != 1) {
randNum = getRandNum(2);
if (randNum == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot before he get's his knife out that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot before he get's his knife out that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (randNum == 2) {
if (meds >= 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. The stab wounds from James are bleeding profusely and you use a pack of medicine to heal yourself. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. The stab wounds from James are bleeding profusely and you use a pack of medicine to heal yourself. You return to Saverous and let him know that James his dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (meds <= 0) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. Your stab wounds prove fatal and you slowly bleed out. You finnaly drift out of concniousness and die. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (gun == '3/4') {
randNum = getRandNum(4);
if (randNum != 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous reporting to him that James is dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (randNum == 1) {
randNum = getRandNum(4);
if (randNum == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot before he get's his knife out that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot before he get's his knife out that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. You return to Saverous and let him know that James his dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (randNum == 2) {
if (meds >= 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. The stab wounds from James are bleeding profusely and you use a pack of medicine to heal yourself. You return to Saverous and let him know that James his dead. You now only have to complete one more mission. \n1. Bring the note to the colony 2. Search abandon mine\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.1;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. The stab wounds from James are bleeding profusely and you use a pack of medicine to heal yourself. You return to Saverous and let him know that James his dead. He congratulates you and thanks you for your help. Saverous informs you that food will be delivered to your bunker within the next two days. You return home a hero and the people of your bunker eat well. Congratulations. You Win!");
$("#quest").val("You Win!");
}
} else if (meds <= 0) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at James. Your shot misses. James turns around, startled, and goes for his knife. You're able to get out another shot but it too, misses. James gets his knife and stabs you. You shoot one more bullet that finds it's target well, killing James. He falls to face down to the ground, dead, as a pool of blood begins to build beside him. Your stab wounds prove fatal and you slowly bleed out. You finnaly drift out of concniousness and die. You are dead. Game Over!");
current = 'Game Over';
}
}
}
}
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You leave James and go back to Saverous. You still have to complete two out of the three quests. \n1.Kill James 2.Bring the note to the colony 3.Search abandon mine. \n\n");
current = 9;
}
//You are by Archolis
} else if(current == 15) {
if(choice == 1) {
if (gun == '0') {
$("#gameScreen").val(screenVal + "You attempt to punch the man because you have no gun, but he dogges the blow and stabs you with his knife. You are dead. Game Over!");
current = 'Game Over';
}
if (gun == '1/4') {
randNum = getRandNum(4);
if (randNum == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot Archolis in the chest. The bullet hits him and his body jerks as blood starts pouring out of his chest. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. 1. Go to building on right 2. Go to building on left");
quest = 'none';
$("#quest").val("No Quests");
meds = meds+1;
$('#meds').val(meds);
current = 8.5;
left_quest = 'done';
} else if (randNum != 1) {
randNum = getRandNum(4);
if (randNum == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot before he gets his gun out and it hits Archolis square in the chest. His body jerks as the bullet hits him and blood pours from the wound in his chest. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. 1. Go to building on right 2. Go to building on left");
quest = 'none';
$("#quest").val("No Quests");
meds = meds+1;
$('#meds').val(meds);
current = 8.5;
left_quest = 'done';
} else if (randNum != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot but it too, misses. Archolis gets his gun and shoots you in the side of the stomach. You shoot one more bullet that finds it's target well, killing Archolis. He falls backward to the ground and his bullet wound spurts blood. The wounds from Archolis's gun are bleeding profusely and you use a pack of medicine to heal yourself. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. 1. Go to building on right 2. Go to building on left");
quest = 'none';
$("#quest").val("No Quests");
//No meds because you use one healing from wound.
current = 8.5;
left_quest = 'done';
} else if (meds <= 0) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot but it too, misses. Archolis gets his gun and shoots you in the side of the stomach. You shoot one more bullet that finds it's target well, killing Archolis. He falls backward to the ground and his bullet wound spurts blood. The wounds from Archolis's gun are bleeding profusely, and you slowly die of blood loss. Shortly after drifting out of consiousncess you die. You are dead. Game over!");
current = 'Game Over';
}
}
}
} else if (gun == '1/2') {
randNum = getRandNum(2);
if (randNum == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot Archolis in the chest. The bullet hits him and his body jerks as blood starts pouring out of his chest. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. 1. Go to building on right 2. Go to building on left");
quest = 'none';
$("#quest").val("No Quests");
meds = meds+1;
$('#meds').val(meds);
current = 8.5;
left_quest = 'done';
} else if (randNum != 1) {
randNum = getRandNum(2);
if (randNum == 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot before he gets his gun out and it hits Archolis square in the chest. His body jerks as the bullet hits him and blood pours from the wound in his chest. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. \n1. Go to building on right 2. Go to building on left\n\n");
quest = 'none';
$("#quest").val("No Quests");
meds = meds+1;
$('#meds').val(meds);
current = 8.5;
left_quest = 'done';
} else if (randNum != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot but it too, misses. Archolis gets his gun and shoots you in the side of the stomach. You shoot one more bullet that finds it's target well, killing Archolis. He falls backward to the ground and his bullet wound spurts blood. The wounds from Archolis's gun are bleeding profusely and you use a pack of medicine to heal yourself. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. \n1. Go to building on right 2. Go to building on left\n\n");
quest = 'none';
$("#quest").val("No Quests");
//No meds because you use one healing from wound.
current = 8.5;
left_quest = 'done';
} else if (meds <= 0) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot but it too, misses. Archolis gets his gun and shoots you in the side of the stomach. You shoot one more bullet that finds it's target well, killing Archolis. He falls backward to the ground and his bullet wound spurts blood. The wounds from Archolis's gun are bleeding profusely, and you slowly die of blood loss. Shortly after drifting out of consiousncess you die. You are dead. Game over!\n\n");
current = 'Game Over';
}
}
}
} else if (gun == '3/4') {
randNum = getRandNum(4);
if (randNum != 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and shoot Archolis in the chest. The bullet hits him and his body jerks as blood starts pouring out of his chest. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. \nGo to building on right 2. Go to building on left\n\n");
quest = 'none';
$("#quest").val("No Quests");
meds = meds+1;
$('#meds').val(meds);
current = 8.5;
left_quest = 'done';
} else if (randNum == 1) {
randNum = getRandNum(4);
if (randNum != 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot before he gets his gun out and it hits Archolis square in the chest. His body jerks as the bullet hits him and blood pours from the wound in his chest. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. 1. Go to building on right 2. Go to building on left\n\n");
quest = 'none';
$("#quest").val("No Quests");
meds = meds+1;
$('#meds').val(meds);
current = 8.5;
left_quest = 'done';
} else if (randNum == 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot but it too, misses. Archolis gets his gun and shoots you in the side of the stomach. You shoot one more bullet that finds it's target well, killing Archolis. He falls backward to the ground and his bullet wound spurts blood. The wounds from Archolis's gun are bleeding profusely and you use a pack of medicine to heal yourself. You return to the shady man and inform him that Archolis is dead. He gives you a med pack and you return to the town. There are two buildings on your left and right. \n1. Go to building on right 2. Go to building on left\n\n");
quest = 'none';
$("#quest").val("No Quests");
//No meds because you use one healing from wound.
current = 8.5;
left_quest = 'done';
} else if (meds <= 0) {
$("#gameScreen").val(screenVal + "You pull out your pistol and fire at Archolis. Your shot misses. Archolis turns around, startled, and goes for his gun. You're able to get out another shot but it too, misses. Archolis gets his gun and shoots you in the side of the stomach. You shoot one more bullet that finds it's target well, killing Archolis. He falls backward to the ground and his bullet wound spurts blood. The wounds from Archolis's gun are bleeding profusely, and you slowly die of blood loss. Shortly after drifting out of consiousncess you die. You are dead. Game over!\n\n");
current = 'Game Over';
}
}
}
}
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You leave Archolis and let the shady man know that you don't actually want to do the job, then go back into the town. There are two buildings on your left and right. \n1. Go to building on right 2. Go to building on left\n\n");
current = 8.5;
quest = 'none';
$("#quest").val("No Quests");
}
//Choice at dog and the note quest
} else if (current == 16) {
if (choice == 1) {
if (meds >= 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You heal the dog with a a med pack and continue on your way to the colony. The dog follows you and chases animals around you while you walk. You just enter the colony when a young looking man walks up to you and pulls a knife, lightly pressing it against yor skin. He asks for all of your med packs. There's nothing you can do, when suddenly the dog you healed earlier jumps and bites the man's leg. The man keels over in pain and grabs his leg, screaming in pain. The dog runs off and you run further into the colony, leaving the man. When you get in the colony you see starving people working small, dying fields of crops. You ask a women who's in charge in the colony. She looks at you with sad, dead eyes and points at a small shack. You go into the shack and hand the note to the man who seems to be in charge. He thanks you with a slight smile and you leave the colony back to Saverous. You inform that the note was delivered. You still have to complete one more quest. \n1. Kill James 2. Search mine for people\n\n");
quest = 'none';
$("#quest").val("No Quests");
meds = meds-1;
$('#meds').val(meds);
current = 14.2;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You heal the dog with a a med pack and continue on your way to the colony. The dog follows you and chases animals around you while you walk. You just enter the colony when a young looking man walks up to you and pulls a knife, lightly pressing it against yor skin. He asks for all of your med packs. There's nothing you can do, when suddenly the dog you healed earlier jumps and bites the man's leg. The man keels over in pain and grabs his leg, screaming in pain. The dog runs off and you run further into the colony, leaving the man. When you get in the colony you see starving people working small, dying fields of crops. You ask a women who's in charge in the colony. She looks at you with sad, dead eyes and points at a small shack. You go into the shack and hand the note to the man who seems to be in charge. He thanks you with a slight smile and you leave the colony back to Saverous. You inform that the note was delivered. Saverous tells you thatt food will be at your colony soon. You return home a hero and your bunker has enough food to survive. Congratulations. You Win!\n\n");
meds = meds-1;
$('#meds').val(meds);
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (meds <= 0) {
$("#gameScreen").val(screenVal + "You don't have any med packs to heal the dog, so you have to pass him by and continue on your way to the colonie. You just enter the colony when a young looking man walks up to you and pulls a knife, lightly pressing it against yor skin. He asks for all of your med packs. You can either try to get away from the man or give him all of your med packs.\n1. Hand over med packs 2. Try to run get away\n\n");
current = 17;
}
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You pass by the dog and continue towards the colony. You just enter the colony when a young looking man walks up to you and pulls a knife, lightly pressing it against yor skin. He asks for all of your med packs. You can either try to get away from the man or give him all of your med packs.\n1. Hand over med packs 2. Try to run get away\n\n");
current = 17;
}
//Choose what to do at note robber
} else if (current == 17){
if(choice == 1) {
if (meds > 0) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You give the man all of your med packs and head to farther in to the colony. When you get in the colony you see starving people working small, dying fields of crops. You ask a women who's in charge in the colony. She looks at you with sad, dead eyes and points at a small shack. You go into the shack and hand the note to the man who seems to be in charge. He thanks you with a slight smile and you leave the colony back to Saverous. You inform that the note was delivered. You still have to complete one more quest. \n1. Kill James 2. Search mine for people\n\n");
quest = 'none';
$("#quest").val("No Quests");
meds = 0;
$('#meds').val(meds);
current = 14.2;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You give the man all of your med packs and head to farther in to the colony. When you get in the colony you see starving people working small, dying fields of crops. You ask a women who's in charge in the colony. She looks at you with sad, dead eyes and points at a small shack. You go into the shack and hand the note to the man who seems to be in charge. He thanks you with a slight smile and you leave the colony back to Saverous. You inform that the note was delivered. Saverous tells you thatt food will be at your colony soon. You return home a hero and your bunker has enough food to survive. Congratulations. You Win!\n\n");
meds = 0;
$('#meds').val(meds);
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (meds < 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You let the man know you don't have any medicine, and after a search he leaves you, frustrated. You continue into the colony. When you get in the colony you see starving people working small, dying fields of crops. You ask a women who's in charge in the colony. She looks at you with sad, dead eyes and points at a small shack. You go into the shack and hand the note to the man who seems to be in charge. He thanks you with a slight smile and you leave the colony back to Saverous. You inform that the note was delivered. You still have to complete one more quest. \n1. Kill James 2. Search mine for people\n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.2;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You let the man know you don't have any medicine, and after a search he leaves you, frustrated. You continue into the colony. When you get in the colony you see starving people working small, dying fields of crops. You ask a women who's in charge in the colony. She looks at you with sad, dead eyes and points at a small shack. You go into the shack and hand the note to the man who seems to be in charge. He thanks you with a slight smile and you leave the colony back to Saverous. You inform that the note was delivered. Saverous tells you thatt food will be at your colony soon. You return home a hero and your bunker has enough food to survive. Congratulations. You Win!\n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
}
} else if (choice == 2) {
$("#gameScreen").val(screenVal + "You try to get away from the man but he immedietley stabs you in the stomach. You are dead. Game Over!");
current = "Game Over";
}
//Go to the mine by killer man
} else if (current == 13) {
if (choice == 1) {
if (gun == '0') {
$("#gameScreen").val(screenVal + "You punch the man but he quickly turns around and shoots you. His pet beast begins eating your remains. You are dead. Game Over!");
current = 'Game Over';
} else if (gun == '1/4') {
randNumMan = getRandNum(4);
if (randNumMan == 1) {
randNumDog = getRandNum(4);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(4);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan != 1) {
randNumMan2 = getRandNum(4);
if (randNumMan2 == 1) {
randNumDog = getRandNum(4);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man but miss. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(4);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan2 != 1) {
$("#gameScreen").val(screenVal + "You shoot at the man and miss. You pull of one more shot and miss again. The man goes for his gun and shoots you. You are dead. Game Over!");
current = 'Game Over';
}
}
} else if (gun == '1/2') {
randNumMan = getRandNum(2);
if (randNumMan == 1) {
randNumDog = getRandNum(2);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(2);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan != 1) {
randNumMan2 = getRandNum(2);
if (randNumMan2 == 1) {
randNumDog = getRandNum(2);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man but miss. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(2);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan2 != 1) {
$("#gameScreen").val(screenVal + "You shoot at the man and miss. You pull of one more shot and miss again. The man goes for his gun and shoots you. You are dead. Game Over!");
current = 'Game Over';
}
}
} else if (gun == '3/4') {
randNumMan = getRandNum(4);
if (randNumMan != 1) {
randNumDog = getRandNum(4);
if (randNumDog != 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog == 1) {
randNumDog2 = getRandNum($);
if (randNumDog2 != 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan == 1) {
randNumMan2 = getRandNum(4);
if (randNumMan2 != 1) {
randNumDog = getRandNum(2);
if (randNumDog != 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man but miss. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog == 1) {
randNumDog2 = getRandNum(4);
if (randNumDog2 != 1) {
$("#gameScreen").val(screenVal + "You shoot the man and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 == 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan2 == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man and miss. You pull of one more shot and miss again. The man goes for his gun and shoots you. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (choice == 2) {
randNum = getRandNum(2);
if(randNum == 1) {
$("#gameScreen").val(screenVal + "You sneak past the man safely and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNum == 2) {
randNum = getRandNum(2);
if (randNum == 1) {
$("#gameScreen").val(screenVal + "You attempt to sneak past the man but you're shot in the back in the proccess, killing you. You are dead. Game Over!");
current = 'Game Over';
} else if (randNum == 2) {
if (gun == '0') {
$("#gameScreen").val(screenVal + "You punch the man but he quickly turns around and shoots you. His pet beast begins eating your remains. You are dead. Game Over!");
current = 'Game Over';
} else if (gun == '1/4') {
randNumMan = getRandNum(4);
if (randNumMan == 1) {
randNumDog = getRandNum(4);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(4);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan != 1) {
randNumMan2 = getRandNum(4);
if (randNumMan2 == 1) {
randNumDog = getRandNum(4);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man but miss. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(4);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan2 != 1) {
$("#gameScreen").val(screenVal + "You shoot at the man and miss. You pull of one more shot and miss again. The man goes for his gun and shoots you. You are dead. Game Over!");
current = 'Game Over';
}
}
} else if (gun == '1/2') {
randNumMan = getRandNum(2);
if (randNumMan == 1) {
randNumDog = getRandNum(2);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(2);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan != 1) {
randNumMan2 = getRandNum(2);
if (randNumMan2 == 1) {
randNumDog = getRandNum(2);
if (randNumDog == 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man but miss. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog != 1) {
randNumDog2 = getRandNum(2);
if (randNumDog2 == 1) {
$("#gameScreen").val(screenVal + "You shoot the man and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan2 != 1) {
$("#gameScreen").val(screenVal + "You shoot at the man and miss. You pull of one more shot and miss again. The man goes for his gun and shoots you. You are dead. Game Over!");
current = 'Game Over';
}
}
} else if (gun == '3/4') {
randNumMan = getRandNum(4);
if (randNumMan != 1) {
randNumDog = getRandNum(4);
if (randNumDog != 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog == 1) {
randNumDog2 = getRandNum($);
if (randNumDog2 != 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 != 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan == 1) {
randNumMan2 = getRandNum(4);
if (randNumMan2 != 1) {
randNumDog = getRandNum(2);
if (randNumDog != 1) {
quests_done=quests_done+1;
if (quests_done == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man but miss. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (quests_done == 2) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one more time, killing the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems disappointed, but informs you taht food will be delivered to your colony soon. You return home a hero and your bunker has enough to eat. Congratulations. You Win! \n\n");
$("#quest").val("You Win!");
current = 'You Win!';
}
} else if (randNumDog == 1) {
randNumDog2 = getRandNum(4);
if (randNumDog2 != 1) {
$("#gameScreen").val(screenVal + "You shoot the man and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off a finale shot that kills the beast. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (randNumDog2 == 1) {
if (meds >= 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and miss him. You shoot again and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies lifeless at your feet and you use a med pack to heal yuorself. You go past the dead man and continue into the mine. You thouroughly search the mine and it's obvious that there's no life. You return to Saverous and inform him that there is no one in the cave. He seems dissapointed. You still have to do one more quest. \n1. Kill James 2. Bring a note to a colony \n\n");
meds = meds-1;
$('#meds').val(meds);
quest = 'none';
$("#quest").val("No Quests");
current = 14.3;
} else if (meds < 1) {
$("#gameScreen").val(screenVal + "You shoot the man in the back and hit him. He falls to the ground and the beast looks at you, ready to attack. You shoot one but miss the dog. Right before the dog hits your body, you get off another shot but that too misses the beast. The beast bites into your leg and you shoot it in the head. The beast dies and falls lifeless at your feat. Unfortunatley, you don't have any med packs to heal the wound from the dog in oyur leg and you blead out. You are dead. Game Over!");
current = 'Game Over';
}
}
}
} else if (randNumMan2 == 1) {
$("#gameScreen").val(screenVal + "You shoot at the man and miss. You pull of one more shot and miss again. The man goes for his gun and shoots you. You are dead. Game Over!");
current = 'Game Over';
}
}
}
}
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment