diff --git a/src/Augmentation/data/AugmentationCreator.tsx b/src/Augmentation/data/AugmentationCreator.tsx index 6c3519df5..e3faedc5b 100644 --- a/src/Augmentation/data/AugmentationCreator.tsx +++ b/src/Augmentation/data/AugmentationCreator.tsx @@ -105,7 +105,7 @@ export const initSoAAugmentations = (): Augmentation[] => [ "injects *Γ-based cells that provides general enhancement to the body.", stats: ( <> - This augmentation makes many aspect of infiltration easier and more productive. Such as increased timer, + This augmentation makes many aspects of infiltration easier and more productive. Such as increased timer, rewards, reduced damage taken, etc. ), @@ -117,10 +117,10 @@ export const initSoAAugmentations = (): Augmentation[] => [ repCost: 1e4, moneyCost: 1e6, info: - "Extra-occular neurons taken from old martial art master. Injecting the user the ability to " + - "predict enemy attack before they even know it themself.", + "Extra-occular neurons taken from old martial art master. Injecting them gives the user the ability to " + + "predict the enemy's attack before they even know it themself.", stats: ( - <>This augmentation makes the Slash minigame easier by showing you via an indictor when the slash in coming. + <>This augmentation makes the Slash minigame easier by showing you via an indicator when the slash in coming. ), isSpecial: true, factions: [FactionNames.ShadowsOfAnarchy], @@ -129,7 +129,7 @@ export const initSoAAugmentations = (): Augmentation[] => [ name: AugmentationNames.WisdomOfAthena, repCost: 1e4, moneyCost: 1e6, - info: "A connective brain implant to SASHA that focuses in pattern recognition and predictive templating.", + info: "A connective brain implant to SASHA that focuses on pattern recognition and predictive templating.", stats: <>This augmentation makes the Bracket minigame easier by removing all '[' ']'., isSpecial: true, factions: [FactionNames.ShadowsOfAnarchy], @@ -138,7 +138,7 @@ export const initSoAAugmentations = (): Augmentation[] => [ name: AugmentationNames.ChaosOfDionysus, repCost: 1e4, moneyCost: 1e6, - info: "Opto-occipito implant to process visual signal before brain interpretation.", + info: "Opto-occipito implant to process visual signals before brain interpretation.", stats: <>This augmentation makes the Backwards minigame easier by flipping the words., isSpecial: true, factions: [FactionNames.ShadowsOfAnarchy], @@ -176,7 +176,7 @@ export const initSoAAugmentations = (): Augmentation[] => [ name: AugmentationNames.HuntOfArtemis, repCost: 1e4, moneyCost: 1e6, - info: "magneto-turboencabulator based on technology by Micha Eike Siemon, increases the users electro-magnetic sensitivity.", + info: "magneto-turboencabulator based on technology by Micha Eike Siemon, increases the user's electro-magnetic sensitivity.", stats: ( <> This augmentation makes the Minesweeper minigame easier by showing the location of all mines and keeping their @@ -190,7 +190,7 @@ export const initSoAAugmentations = (): Augmentation[] => [ name: AugmentationNames.KnowledgeOfApollo, repCost: 1e4, moneyCost: 1e6, - info: "Neodynic retention fjengeln spoofer using -φ karmions, net positive effect on implantees delta wave.", + info: "Neodynic retention fjengeln spoofer using -φ karmions, net positive effect on implantee's delta wave.", stats: <>This augmentation makes the Wire Cutting minigame easier by indicating the incorrect wires., isSpecial: true, factions: [FactionNames.ShadowsOfAnarchy], @@ -515,7 +515,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "TITN is a series of viruses that targets and alters the sequences of human DNA in genes that " + "control personality. The TITN-41 strain alters these genes so that the subject becomes more " + - "outgoing and socialable.", + "outgoing and sociable.", charisma_mult: 1.15, charisma_exp_mult: 1.15, factions: [FactionNames.Silhouette], @@ -526,9 +526,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ moneyCost: 1.375e9, info: "A cranial implant that greatly assists in the user's ability to analyze social situations " + - "and interactions. The system uses a wide variety of factors such as facial expressions, body " + - "language, and the voice tone, and inflection to determine the best course of action during social" + - "situations. The implant also uses deep learning software to continuously learn new behavior" + + "and interactions. The system uses a wide variety of factors such as facial expression, body " + + "language, voice tone, and inflection to determine the best course of action during social " + + "situations. The implant also uses deep learning software to continuously learn new behavior " + "patterns and how to best respond.", charisma_mult: 1.6, charisma_exp_mult: 1.6, @@ -988,7 +988,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "This is an additional installation that upgrades the functionality of the " + "PC Direct-Neural Interface augmentation. When connected to a computer, " + - "The Neural Network upgrade allows the user to use their own brain's " + + "the Neural Network upgrade allows the user to use their own brain's " + "processing power to aid the computer in computational tasks.", prereqs: [AugmentationNames.PCDNI], company_rep_mult: 2, @@ -1172,7 +1172,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "A skin implant that reinforces the skin with highly-advanced synthetic cells. These " + "cells, when powered, have a negative refractive index. As a result, they bend light " + - "around the skin, making the user much harder to see to the naked eye.", + "around the skin, making the user much harder to see with the naked eye.", agility_mult: 1.05, crime_money_mult: 1.1, factions: [FactionNames.SlumSnakes, FactionNames.Tetrads], @@ -1734,7 +1734,7 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ info: "An improved version of Vangelis, a synthetic symbiotic virus that is " + "injected into human brain tissue. On top of the benefits of the original " + - "virus, this also grants an accelerated healing factor and enhanced " + + "virus, this also grants accelerated healing and enhanced " + "reflexes.", prereqs: [AugmentationNames.VangelisVirus], defense_exp_mult: 1.1, @@ -1930,7 +1930,7 @@ export const initChurchOfTheMachineGodAugmentations = (): Augmentation[] => [ info: "The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human " + "organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon " + - "your frame granting lesser penalty of 5% to all stats.", + "your frame granting a 5% reduced penalty to all stats.", prereqs: [AugmentationNames.StaneksGift1], isSpecial: true, hacking_chance_mult: 0.95 / 0.9, @@ -1969,7 +1969,7 @@ export const initChurchOfTheMachineGodAugmentations = (): Augmentation[] => [ info: "The synthesis of human and machine is nothing to fear. It is our destiny. " + "You will become greater than the sum of our parts. As One. Embrace your gift " + - "fully and wholly free of it's accursed toll. Serenity brings tranquility the form " + + "fully and wholly free of it's accursed toll. Serenity brings tranquility in the form " + "of no longer suffering a stat penalty. ", prereqs: [AugmentationNames.StaneksGift2, AugmentationNames.StaneksGift1], isSpecial: true, diff --git a/src/Augmentation/ui/PurchasableAugmentations.tsx b/src/Augmentation/ui/PurchasableAugmentations.tsx index a19060bf4..27a8f927b 100644 --- a/src/Augmentation/ui/PurchasableAugmentations.tsx +++ b/src/Augmentation/ui/PurchasableAugmentations.tsx @@ -2,7 +2,7 @@ * React component for displaying a single augmentation for purchase through * the faction UI */ -import { CheckBox, CheckBoxOutlineBlank, CheckCircle, Info, NewReleases, Report } from "@mui/icons-material"; +import { CheckBox, CheckBoxOutlineBlank, CheckCircle, NewReleases, Report } from "@mui/icons-material"; import { Box, Button, Container, Paper, Tooltip, Typography } from "@mui/material"; import React, { useState } from "react"; import { Faction } from "../../Faction/Faction"; @@ -11,8 +11,8 @@ import { Settings } from "../../Settings/Settings"; import { numeralWrapper } from "../../ui/numeralFormat"; import { Augmentation } from "../Augmentation"; import { AugmentationNames } from "../data/AugmentationNames"; -import { PurchaseAugmentationModal } from "./PurchaseAugmentationModal"; import { StaticAugmentations } from "../StaticAugmentations"; +import { PurchaseAugmentationModal } from "./PurchaseAugmentationModal"; interface IPreReqsProps { player: IPlayer; @@ -42,11 +42,13 @@ const PreReqs = (props: IPreReqsProps): React.ReactElement => { } > {hasPreReqs ? ( @@ -100,7 +102,10 @@ const Exclusive = (props: IExclusiveProps): React.ReactElement => { } > - + ); }; @@ -113,7 +118,9 @@ interface IReqProps { const Requirement = (props: IReqProps): React.ReactElement => { return ( - + {props.fulfilled ? : } {props.value} @@ -138,7 +145,7 @@ export const PurchasableAugmentations = (props: IPurchasableAugsProps): React.Re {props.augNames.map((augName: string) => ( @@ -176,11 +183,12 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac return ( <> @@ -192,13 +200,13 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac }) } disabled={!props.parent.canPurchase(props.parent.player, aug) || props.owned} - sx={{ width: "48px", height: "48px", float: "left", clear: "none", mr: 1 }} + sx={{ width: "48px", height: "36px", float: "left", clear: "none", mr: 1 }} > {props.owned ? "Owned" : "Buy"} - + @@ -211,34 +219,33 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac } > - + + {aug.name} + {aug.name === AugmentationNames.NeuroFluxGovernor && ` - Level ${aug.getLevel(props.parent.player)}`} + - - {aug.name} - {aug.name === AugmentationNames.NeuroFluxGovernor && ` - Level ${aug.getLevel(props.parent.player)}`} - + {aug.factions.length === 1 && !props.parent.sleeveAugs && ( )} + {aug.prereqs.length > 0 && !props.parent.sleeveAugs && } - - {aug.prereqs.length > 0 && !props.parent.sleeveAugs && } {props.owned || ( - + cost} value={numeralWrapper.formatMoney(cost)} diff --git a/src/Bladeburner/Bladeburner.tsx b/src/Bladeburner/Bladeburner.tsx index 771726395..451d7e119 100644 --- a/src/Bladeburner/Bladeburner.tsx +++ b/src/Bladeburner/Bladeburner.tsx @@ -287,6 +287,8 @@ export class Bladeburner implements IBladeburner { resetAction(): void { this.action = new ActionIdentifier({ type: ActionTypes.Idle }); + this.actionTimeCurrent = 0; + this.actionTimeToComplete = 0; } clearConsole(): void { diff --git a/src/Corporation/ui/Overview.tsx b/src/Corporation/ui/Overview.tsx index e43d0d327..e2856867a 100644 --- a/src/Corporation/ui/Overview.tsx +++ b/src/Corporation/ui/Overview.tsx @@ -60,6 +60,7 @@ export function Overview({ rerender }: IProps): React.ReactElement { ["Total Funds:", ], ["Total Revenue:", ], ["Total Expenses:", ], + ["Total Profit:", ], ["Publicly Traded:", corp.public ? "Yes" : "No"], ["Owned Stock Shares:", numeralWrapper.format(corp.numShares, "0.000a")], ["Stock Price:", corp.public ? : "N/A"], diff --git a/src/Infiltration/ui/Victory.tsx b/src/Infiltration/ui/Victory.tsx index c73993ae1..51a1d2f71 100644 --- a/src/Infiltration/ui/Victory.tsx +++ b/src/Infiltration/ui/Victory.tsx @@ -44,8 +44,8 @@ export function Victory(props: IProps): React.ReactElement { } function trade(): void { - handleInfiltrators(); if (faction === "none") return; + handleInfiltrators(); Factions[faction].playerReputation += repGain; quitInfiltration(); } diff --git a/src/Netscript/RamCostGenerator.ts b/src/Netscript/RamCostGenerator.ts index 9c49d94bd..620d67453 100644 --- a/src/Netscript/RamCostGenerator.ts +++ b/src/Netscript/RamCostGenerator.ts @@ -226,6 +226,7 @@ const bladeburner: IMap = { stopBladeburnerAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2, getCurrentAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 4, getActionTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost, + getActionCurrentTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost, getActionEstimatedSuccessChance: RamCostConstants.ScriptBladeburnerApiBaseRamCost, getActionRepGain: RamCostConstants.ScriptBladeburnerApiBaseRamCost, getActionCountRemaining: RamCostConstants.ScriptBladeburnerApiBaseRamCost, @@ -356,6 +357,7 @@ export const RamCosts: IMap = { print: 0, printf: 0, tprint: 0, + tprintf: 0, clearLog: 0, disableLog: 0, enableLog: 0, diff --git a/src/NetscriptFunctions/Bladeburner.ts b/src/NetscriptFunctions/Bladeburner.ts index e87490fa7..e96a4efbf 100644 --- a/src/NetscriptFunctions/Bladeburner.ts +++ b/src/NetscriptFunctions/Bladeburner.ts @@ -137,6 +137,19 @@ export function NetscriptBladeburner(player: IPlayer, workerScript: WorkerScript throw ctx.makeRuntimeErrorMsg(e); } }, + getActionCurrentTime: (ctx: NetscriptContext) => (): number => { + checkBladeburnerAccess(ctx); + const bladeburner = player.bladeburner; + if (bladeburner === null) throw new Error("Should not be called without Bladeburner"); + try { + const timecomputed = + Math.min(bladeburner.actionTimeCurrent + bladeburner.actionTimeOverflow, bladeburner.actionTimeToComplete) * + 1000; + return timecomputed; + } catch (e: any) { + throw ctx.makeRuntimeErrorMsg(e); + } + }, getActionEstimatedSuccessChance: (ctx: NetscriptContext) => (_type: unknown, _name: unknown): [number, number] => { diff --git a/src/NetscriptFunctions/Sleeve.ts b/src/NetscriptFunctions/Sleeve.ts index cca654cac..bd3c604bd 100644 --- a/src/NetscriptFunctions/Sleeve.ts +++ b/src/NetscriptFunctions/Sleeve.ts @@ -190,6 +190,7 @@ export function NetscriptSleeve(player: IPlayer): InternalAPI { location: sl.currentTaskLocation, gymStatType: sl.gymStatType, factionWorkType: FactionWorkType[sl.factionWorkType], + className: sl.className, }; }, getInformation: diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 15e46763e..8ab194568 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -1110,6 +1110,8 @@ export interface SleeveTask { gymStatType: string; /** Faction work type being performed, if any */ factionWorkType: string; + /** Class being taken at university, if any */ + className: string; } /** @@ -2884,7 +2886,7 @@ export interface Bladeburner { * @remarks * RAM cost: 4 GB * - * Returns the number of seconds it takes to complete the specified action + * Returns the number of milliseconds it takes to complete the specified action * * @param type - Type of action. * @param name - Name of action. Must be an exact match. @@ -2892,6 +2894,17 @@ export interface Bladeburner { */ getActionTime(type: string, name: string): number; + /** + * Get the time elapsed on current action. + * @remarks + * RAM cost: 4 GB + * + * Returns the number of milliseconds already spent on the current action. + * + * @returns Number of milliseconds already spent on the current action. + */ + getActionCurrentTime(): number; + /** * Get estimate success chance of an action. * @remarks diff --git a/src/Terminal/Terminal.ts b/src/Terminal/Terminal.ts index 8f3cf13cb..c19ce6742 100644 --- a/src/Terminal/Terminal.ts +++ b/src/Terminal/Terminal.ts @@ -73,6 +73,7 @@ import { weaken } from "./commands/weaken"; import { wget } from "./commands/wget"; import { hash } from "../hash/hash"; import { apr1 } from "./commands/apr1"; +import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; export class Terminal implements ITerminal { // Flags to determine whether the player is currently running a hack or an analyze @@ -204,7 +205,7 @@ export class Terminal implements ITerminal { router.toBitVerse(false, false); return; } - let moneyGained = calculatePercentMoneyHacked(server, player); + let moneyGained = calculatePercentMoneyHacked(server, player) * BitNodeMultipliers.ManualHackMoney; moneyGained = Math.floor(server.moneyAvailable * moneyGained); if (moneyGained <= 0) { diff --git a/src/ui/React/LogBoxManager.tsx b/src/ui/React/LogBoxManager.tsx index 8da57a924..08d5e2586 100644 --- a/src/ui/React/LogBoxManager.tsx +++ b/src/ui/React/LogBoxManager.tsx @@ -103,6 +103,7 @@ const useStyles = makeStyles((_theme: Theme) => scrollbarWidth: "auto", flexDirection: "column-reverse", whiteSpace: "pre-wrap", + wordWrap: "break-word", }, titleButton: { padding: "1px 0",