Added a working "forced encounter" function and a

yet to be functional natural encounter function.
This commit is contained in:
Caroline Foy 2025-04-12 09:38:55 -05:00
parent 6714250079
commit dbd27cfa7d
2 changed files with 206 additions and 143 deletions

View file

@ -1,7 +1,8 @@
// Program is started from here, runs functions from other files.
import { userInput, calcLocation, radPointsCalc, healthCapCalc, checkLose, sleep } from './functions.js';
import { userInput, calcLocation, radPointsCalc, healthCapCalc, checkLose, sleep, randomNumber } from './functions.js';
import { pois, poiCounter } from './poiscreens.js';
import { name, prewarmoney, variableChange } from './variables.js';
import { forcedEncounter, naturalEncounter } from './encounters.js';
console.clear();
@ -13,6 +14,8 @@ console.log(" / / ) / / / ) / / / o / / ) / )
console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___");
console.log("Credits: Bethesda Game Studio \n");
sleep(5);
console.log("What would you like to do?");
console.log("--------------------------");
console.log("1) Start new game");
@ -34,8 +37,14 @@ switch(mainMenuInput) {
console.log("Quitting Game...");
break;
case "4":
variableChange("name","=","finn");
console.log(name);
for(var a = 0; a < 10; a++){
var test = naturalEncounter(25);
if(test != false){
console.log(test.name);
} else {
console.log("failed encounter");
}
}
break;
}