Shops, encounters, poi menus, items, and some other stuff. Poi dialogue and combat left!

This commit is contained in:
Raktbastr 2025-04-25 23:08:47 -05:00
parent 22975aff26
commit 8485d7d800
6 changed files with 371 additions and 142 deletions

View file

@ -1,5 +1,5 @@
// Program is started from here, runs functions from other files.
import { userInput, sleep, disableRawMode, walkPathMain } from './functions.js';
import { userInput, sleep, disableRawMode, walkPathMain, randomNumber, removeDuplicates } from './functions.js';
import { forcedEncounter, naturalEncounter } from './encounters.js';
import { ravenRockStore } from './shops.js';
@ -12,8 +12,6 @@ console.log(" / ' / / /
console.log("---/__-------__---/---/----__---------_/_---------/-------__----__----__---__----__---_--_----__-------/___ /----__----__----__-/-");
console.log(" / / ) / / / ) / / / o / / ) / ) /___) (_ ` / ) / / ) /___) / | / ) / ) / / ");
console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___\n\n");
await sleep(1);
console.log("What would you like to do?");
@ -36,12 +34,23 @@ switch(mainMenuInput) {
case "3":
console.log("Quitting Game...");
await sleep(1);
break;
exit(0);
case "4":
console.log("Credits:");
console.log("Bethesda Game Studios - The Fallout IP and related characters/lore");
console.log("Readline-sync - NPM package used for async collection of user input");
break;
break;
case "5":
var thing1 = [1,2,3,4,5,6,7,8,9];
var thing2 = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var thing3 = [];
while (thing3.length < 6) {
let randomPick = randomNumber(1,thing2.length);
thing3.push(thing2[randomPick]);
thing2.pop(randomPick);
}
console.log(thing2);
break;
}
function startGame() { // So far what I have is filler and testing, feel free to change.