Rewrite
This commit is contained in:
parent
8871c644fb
commit
e5fe71ce46
16 changed files with 573 additions and 638 deletions
|
|
@ -1,10 +1,8 @@
|
|||
// Program is started from here, runs functions from other files.
|
||||
const variables = require("./variables.js");
|
||||
const game = require("./game.js");
|
||||
const shops = require("./shops");
|
||||
const readline = require('node:readline');
|
||||
const encounterMenus = require("./poiscreens.js");
|
||||
const inventoryStuff = require("./inventory.js");
|
||||
import { userInput, calcLocation, radPointsCalc, healthCapCalc, checkLose } from './functions.js';
|
||||
import { pois, poiCounter } from './poiscreens.js';
|
||||
import { name, prewarmoney } from './variables.js';
|
||||
|
||||
|
||||
console.clear();
|
||||
console.log("__________________________________________________________________________________________________________________________________");
|
||||
|
|
@ -13,57 +11,56 @@ console.log(" / ' / / /
|
|||
console.log("---/__-------__---/---/----__---------_/_---------/-------__----__----__---__----__---_--_----__-------/___ /----__----__----__-/-");
|
||||
console.log(" / / ) / / / ) / / / o / / ) / ) /___) (_ ` / ) / / ) /___) / | / ) / ) / / ");
|
||||
console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___");
|
||||
console.log("Credits: Bethesda Game Studio\n")
|
||||
variables.sleep(1000);
|
||||
console.log("Credits: Bethesda Game Studio \n");
|
||||
|
||||
while(true) {
|
||||
console.log("What would you like to do?");
|
||||
console.log("--------------------------");
|
||||
console.log("1) Start new game");
|
||||
console.log("2) Learn How to play");
|
||||
console.log("3) Quit Game");
|
||||
console.log("4) Dev stuff for testing");
|
||||
let mainMenuInput = variables.userInput("Enter: ")
|
||||
switch(mainMenuInput) {
|
||||
case "1":
|
||||
startGame();
|
||||
break;
|
||||
case "2":
|
||||
console.log("Follow the link below for a game manual.")
|
||||
console.log("[ENTER LINK HERE]")
|
||||
break;
|
||||
case "3":
|
||||
console.log("Quitting Game...");
|
||||
variables.sleep(1000);
|
||||
break;
|
||||
case "4":
|
||||
game.travelScreen();
|
||||
break;
|
||||
console.log("What would you like to do?");
|
||||
console.log("--------------------------");
|
||||
console.log("1) Start new game");
|
||||
console.log("2) Learn How to play");
|
||||
console.log("3) Quit Game");
|
||||
console.log("4) Dev stuff for testing");
|
||||
|
||||
var mainMenuInput = userInput("Enter: ")
|
||||
|
||||
switch(mainMenuInput) {
|
||||
case "1":
|
||||
startGame();
|
||||
break;
|
||||
case "2":
|
||||
console.log("Follow the link below for a game manual.")
|
||||
console.log("[ENTER LINK HERE]")
|
||||
break;
|
||||
case "3":
|
||||
console.log("Quitting Game...");
|
||||
break;
|
||||
case "4":
|
||||
console.log(pois[poiCounter]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function startGame() { // So far what I have is filler and testing, feel free to change.
|
||||
console.clear();
|
||||
variables.sleep(1000);
|
||||
variables.name = variables.userInput("What is your name? ");
|
||||
console.log(variables.name+" Is now your name...")
|
||||
variables.sleep(2000);
|
||||
name = userInput("What is your name? ");
|
||||
console.log(name+" Is now your name...")
|
||||
console.clear();
|
||||
console.log("Intro:");
|
||||
console.log("You are an ordinary loyal Enclave Soldier working at Raven Rock. \nYou are typing away at your terminal, entering reports of recovered materials when a message flashes on it.\n\nDear "+variables.name+",\n\n This is a direct order from the Enclave High Command. \nIgnore all previous directives. Proceed to Camp Navarro immediately. \nSeek safe passage through the Brotherhood and NCR territories. \nDo not disclose your mission to anyone but Enclave Personel with \nsecurity clearance 5 or higher. Reqisition supplies before departure. \n\n Signed, President John Henry Eden\n\n");
|
||||
console.log("You are an ordinary loyal Enclave Soldier working at Raven Rock. \nYou are typing away at your terminal, entering reports of recovered materials when a message flashes on it");
|
||||
console.log("|||||||")
|
||||
console.log("|| Enclave Intranet Messager");
|
||||
console.log("")
|
||||
console.log("|| Message From: potus");
|
||||
console.log("|||||||\n\n")
|
||||
console.log("Dear "+name+",\n\n This is a direct order from the Enclave High Command. \nIgnore all previous directives. Proceed to Camp Navarro immediately. \nSeek safe passage through the Brotherhood and NCR territories. \nDo not disclose your mission to anyone but Enclave Personel with \nsecurity clearance 5 or higher. Reqisition supplies before departure. \nYou have been given 1 YEAR to complete this mission or face discharge.\n\n Signed, President John Henry Eden\n\n");
|
||||
|
||||
variables.userInput("[Enter to open shop]");
|
||||
userInput("[Enter to open shop]");
|
||||
console.clear();
|
||||
|
||||
variables.prewarmoney = 500;
|
||||
shops.ravenRock();
|
||||
|
||||
prewarmoney = 500;
|
||||
ravenRockShop();
|
||||
for (variables.location = 0; variables.location <= 255; variables.location++) {
|
||||
game.calcLocation();
|
||||
game.calcEncounter();
|
||||
game.checkPOI();
|
||||
game.calcSickPoints();
|
||||
game.eatFood();
|
||||
game.checkLose();
|
||||
game.travelScreen();
|
||||
calcLocation();
|
||||
radPointsCalc();
|
||||
healthCapCalc
|
||||
checkLose();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue