Fixed issues... Again
This commit is contained in:
parent
df257c6420
commit
d837a57472
3 changed files with 50 additions and 48 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// Program is started from here, runs functions from other files.
|
||||
import { userInput, sleep, disableRawMode, walkPathMain, randomNumber, removeDuplicates } from './functions.js';
|
||||
import { userInput, sleep, disableRawMode, walkPathMain, randomNumber } from './functions.js';
|
||||
import { forcedEncounter, naturalEncounter } from './encounters.js';
|
||||
import { ravenRockStore } from './shops.js';
|
||||
|
||||
|
|
@ -42,8 +42,9 @@ switch(mainMenuInput) {
|
|||
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 thing2 = [];
|
||||
var thing3 = [];
|
||||
thing2 = thing1
|
||||
while (thing3.length < 6) {
|
||||
let randomPick = randomNumber(1,thing2.length);
|
||||
thing3.push(thing2[randomPick]);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { userInput, pauseScreen, enableRawMode, disableRawMode, sleep } from "./functions.js";
|
||||
import './variables.js';
|
||||
import { whitespringStore, genericBOSStore, trader, eurekaStore, newVegasStore, vaultZeroStore } from "./shops.js";
|
||||
import { whitespringStore, trader, eurekaStore, newVegasStore, vaultZeroStore } from "./shops.js";
|
||||
|
||||
export function checkPOI() {
|
||||
if (path == 0) {
|
||||
|
|
|
|||
|
|
@ -1,49 +1,6 @@
|
|||
// Now holds only variables
|
||||
|
||||
// Player Currency
|
||||
global.preWarMoney = 0; // Used with enclave vendors
|
||||
global.caps = 0; // Used with all other vendors
|
||||
|
||||
// Player Stats
|
||||
global.healthCap = 0; // Maximum health, raises each level
|
||||
global.health = 0; // Players current HP
|
||||
global.food = 0; // Amount of food player has
|
||||
global.isRadiated = false;
|
||||
global.radSeverity = 0; // Modifies healthCapCalc. 3 Levels
|
||||
global.radPoints = 0; // If the player reaches 100 rad points the game ends
|
||||
global.xpPerLevel = 10; // Amount of XP needed per level. Raises 50% each level
|
||||
global.level = 0; // Level of player. Modifies enemy scaling
|
||||
global.inventory = [ // Inventory of player, holds all items
|
||||
// Supplies: chems, aid
|
||||
[],
|
||||
// Equipment: weapons, armor, tools
|
||||
[
|
||||
equipmentList[27],
|
||||
equipmentList[24],
|
||||
]
|
||||
]
|
||||
global.equippedWeapon = equipmentList[27];
|
||||
global.equippedArmor = equipmentList[24];
|
||||
|
||||
// Game Mechanics
|
||||
global.walkRate = 0; // Units the player walks per day, affects foodRateCalc and radPointsCalc
|
||||
global.foodRate = 0; // Amount of food player eats per day, affects radPointsCalc
|
||||
|
||||
global.path = 0; // Path player is currently on, 0 = Main, 1 = A, 2 = B
|
||||
global.location = 0; // Location on main path, 0-255 = main, 500-1000 = A, 1500-2000 = B
|
||||
global.locationA = 0; // Location on path A
|
||||
global.locationB = 0; // Location on path B
|
||||
global.day = 0; // Current day of the game, if you reach 365 the game ends
|
||||
|
||||
global.reputation = {mwbos: 4, legion: 4, ncr: 2, bos: 1, enclave: 10, abomination: 0, raider: 0}
|
||||
// Rep for each faction. Number between 0(worst) and 10(best), 5 is neutral
|
||||
|
||||
global.daysSinceScav = 0; // Days since player last scavenged. Must be >= 15 to scavenge again.
|
||||
|
||||
global.name = "placeholder"; // Player name, changed when the game starts
|
||||
|
||||
global.testDeath = false; // Used to test death, set to true to kill player
|
||||
|
||||
// Items
|
||||
global.supplyList = [ // Supplies: chems, aid
|
||||
{name: "Food", description: "Misc foods", cost: 1, weight: 0},
|
||||
{name: "Stimpak", description: "A Stimpak syringe, heals 25 HP", cost: 5, weight: 0.5},
|
||||
|
|
@ -139,3 +96,47 @@ global.achievements = [
|
|||
{name: "Presidential Suite", description: "Become Idolized within New Vegas"},
|
||||
{name: "Uneasy Alliance", description: "Become Idolized within the Midwest Brotherhood"},
|
||||
]
|
||||
|
||||
// Player Currency
|
||||
global.preWarMoney = 0; // Used with enclave vendors
|
||||
global.caps = 0; // Used with all other vendors
|
||||
|
||||
// Player Stats
|
||||
global.healthCap = 0; // Maximum health, raises each level
|
||||
global.health = 0; // Players current HP
|
||||
global.food = 0; // Amount of food player has
|
||||
global.isRadiated = false;
|
||||
global.radSeverity = 0; // Modifies healthCapCalc. 3 Levels
|
||||
global.radPoints = 0; // If the player reaches 100 rad points the game ends
|
||||
global.xpPerLevel = 10; // Amount of XP needed per level. Raises 50% each level
|
||||
global.level = 0; // Level of player. Modifies enemy scaling
|
||||
global.inventory = [ // Inventory of player, holds all items
|
||||
// Supplies: chems, aid
|
||||
[],
|
||||
// Equipment: weapons, armor, tools
|
||||
[
|
||||
equipmentList[27],
|
||||
equipmentList[24],
|
||||
]
|
||||
]
|
||||
global.equippedWeapon = equipmentList[27];
|
||||
global.equippedArmor = equipmentList[24];
|
||||
|
||||
// Game Mechanics
|
||||
global.walkRate = 0; // Units the player walks per day, affects foodRateCalc and radPointsCalc
|
||||
global.foodRate = 0; // Amount of food player eats per day, affects radPointsCalc
|
||||
|
||||
global.path = 0; // Path player is currently on, 0 = Main, 1 = A, 2 = B
|
||||
global.location = 0; // Location on main path, 0-255 = main, 500-1000 = A, 1500-2000 = B
|
||||
global.locationA = 0; // Location on path A
|
||||
global.locationB = 0; // Location on path B
|
||||
global.day = 0; // Current day of the game, if you reach 365 the game ends
|
||||
|
||||
global.reputation = {mwbos: 4, legion: 4, ncr: 2, bos: 1, enclave: 10, abomination: 0, raider: 0}
|
||||
// Rep for each faction. Number between 0(worst) and 10(best), 5 is neutral
|
||||
|
||||
global.daysSinceScav = 0; // Days since player last scavenged. Must be >= 15 to scavenge again.
|
||||
|
||||
global.name = "placeholder"; // Player name, changed when the game starts
|
||||
|
||||
global.testDeath = false; // Used to test death, set to true to kill player
|
||||
Loading…
Add table
Add a link
Reference in a new issue