mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-28 08:57:32 +01:00
remove hacking missions
This commit is contained in:
parent
0ae8b72188
commit
9cbb525da3
@ -47,14 +47,6 @@ export const CONSTANTS: {
|
||||
IntelligenceTerminalHackBaseExpGain: number;
|
||||
IntelligenceSingFnBaseExpGain: number;
|
||||
IntelligenceClassBaseExpGain: number;
|
||||
IntelligenceHackingMissionBaseExpGain: number;
|
||||
HackingMissionRepToDiffConversion: number;
|
||||
HackingMissionRepToRewardConversion: number;
|
||||
HackingMissionSpamTimeIncrease: number;
|
||||
HackingMissionTransferAttackIncrease: number;
|
||||
HackingMissionMiscDefenseIncrease: number;
|
||||
HackingMissionDifficultyToHacking: number;
|
||||
HackingMissionHowToPlay: string;
|
||||
MillisecondsPer20Hours: number;
|
||||
GameCyclesPer20Hours: number;
|
||||
MillisecondsPer10Hours: number;
|
||||
@ -199,63 +191,6 @@ export const CONSTANTS: {
|
||||
IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain
|
||||
IntelligenceSingFnBaseExpGain: 1.5,
|
||||
IntelligenceClassBaseExpGain: 0.01,
|
||||
IntelligenceHackingMissionBaseExpGain: 3, // Hacking Mission difficulty multiplied by this to get exp gain
|
||||
|
||||
// Hacking Missions
|
||||
// TODO Move this into Hacking Mission implementation
|
||||
HackingMissionRepToDiffConversion: 10000, // Faction rep is divided by this to get mission difficulty
|
||||
HackingMissionRepToRewardConversion: 7, // Faction rep divided byt his to get mission rep reward
|
||||
HackingMissionSpamTimeIncrease: 25000, // How much time limit increase is gained when conquering a Spam Node (ms)
|
||||
HackingMissionTransferAttackIncrease: 1.05, // Multiplier by which the attack for all Core Nodes is increased when conquering a Transfer Node
|
||||
HackingMissionMiscDefenseIncrease: 1.05, // The amount by which every misc node's defense is multiplied when one is conquered
|
||||
HackingMissionDifficultyToHacking: 135, // Difficulty is multiplied by this to determine enemy's "hacking" level (to determine effects of scan/attack, etc)
|
||||
HackingMissionHowToPlay:
|
||||
"Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>" +
|
||||
"In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes " +
|
||||
"are colored blue, while the enemy's are red. There are also other nodes on the map colored gray " +
|
||||
"that initially belong to neither you nor the enemy. The goal of the game is " +
|
||||
"to capture all of the enemy's Database nodes within the time limit. " +
|
||||
"If you fail to do this, you will lose.<br><br>" +
|
||||
"Each Node has three stats: Attack, Defense, and HP. There are five different actions that " +
|
||||
"a Node can take:<br><br> " +
|
||||
"Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's " +
|
||||
"hacking level, and the enemy's defense.<br><br>" +
|
||||
"Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the " +
|
||||
"enemy's defense.<br><br>" +
|
||||
"Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's " +
|
||||
"defense.<br><br>" +
|
||||
"Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>" +
|
||||
"Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>" +
|
||||
"Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the " +
|
||||
"Attack/Defense of the individual Node that is performing the action.<br><br>" +
|
||||
"To capture a Node, you must lower its HP down to 0.<br><br>" +
|
||||
"There are six different types of Nodes:<br><br>" +
|
||||
"CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>" +
|
||||
"Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>" +
|
||||
"Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within " +
|
||||
"the time limit. These Nodes cannot perform any actions<br><br>" +
|
||||
"Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete " +
|
||||
"the mission. These Nodes cannot perform any actions<br><br>" +
|
||||
"Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. " +
|
||||
"These Nodes are capable of performing every action except the 'Attack' action<br><br>" +
|
||||
"Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>" +
|
||||
"To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking " +
|
||||
"a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes " +
|
||||
"that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, " +
|
||||
"select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard " +
|
||||
"shortcut.<br><br>" +
|
||||
"For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target " +
|
||||
"another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target " +
|
||||
"any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes " +
|
||||
"can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents " +
|
||||
"the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, " +
|
||||
"or press 'd'.<br><br>" +
|
||||
"Other Notes:<br><br>" +
|
||||
"-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that " +
|
||||
"are not actively being targeted will increase by a fixed percentage.<br><br>" +
|
||||
"-Whenever a Node is conquered, its stats are significantly reduced<br><br>" +
|
||||
"-Miscellaneous Nodes slowly raise their defense over time<br><br>" +
|
||||
"-Nodes slowly regenerate health over time.",
|
||||
|
||||
// Time-related constants
|
||||
MillisecondsPer20Hours: 72000000,
|
||||
|
@ -7,7 +7,6 @@ import { CONSTANTS } from "../Constants";
|
||||
|
||||
import { Faction } from "./Faction";
|
||||
import { Factions } from "./Factions";
|
||||
import { HackingMission, setInMission } from "../Missions";
|
||||
import { Player } from "../Player";
|
||||
import { Settings } from "../Settings/Settings";
|
||||
import {
|
||||
@ -49,12 +48,6 @@ export function joinFaction(faction: Faction): void {
|
||||
}
|
||||
}
|
||||
|
||||
export function startHackingMission(faction: Faction): void {
|
||||
const mission = new HackingMission(faction.playerReputation, faction);
|
||||
setInMission(true, mission); //Sets inMission flag to true
|
||||
mission.init();
|
||||
}
|
||||
|
||||
//Returns a boolean indicating whether the player has the prerequisites for the
|
||||
//specified Augmentation
|
||||
export function hasAugmentationPrereqs(aug: Augmentation): boolean {
|
||||
|
@ -30,10 +30,6 @@ type IProps = {
|
||||
|
||||
// Info text for all options on the UI
|
||||
const gangInfo = "Create and manage a gang for this Faction. Gangs will earn you money and " + "faction reputation";
|
||||
const hackingMissionInfo =
|
||||
"Attempt a hacking mission for your faction. " +
|
||||
"A mission is a mini game that, if won, earns you " +
|
||||
"significant reputation with this faction. (Recommended hacking level: 200+)";
|
||||
const hackingContractsInfo =
|
||||
"Complete hacking contracts for your faction. " +
|
||||
"Your effectiveness, which determines how much " +
|
||||
@ -96,11 +92,6 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
|
||||
player.startFactionHackWork(router, faction);
|
||||
}
|
||||
|
||||
function startHackingMission(faction: Faction): void {
|
||||
player.singularityStopWork();
|
||||
router.toHackingMission(faction);
|
||||
}
|
||||
|
||||
function startSecurityWork(faction: Faction): void {
|
||||
player.startFactionSecurityWork(router, faction);
|
||||
}
|
||||
@ -138,13 +129,6 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
|
||||
<CreateGangModal facName={faction.name} open={gangOpen} onClose={() => setGangOpen(false)} />
|
||||
</>
|
||||
)}
|
||||
{!isPlayersGang && factionInfo.offerHackingMission && (
|
||||
<Option
|
||||
buttonText={"Hacking Mission"}
|
||||
infoText={hackingMissionInfo}
|
||||
onClick={() => startHackingMission(faction)}
|
||||
/>
|
||||
)}
|
||||
{!isPlayersGang && factionInfo.offerHackingWork && (
|
||||
<Option
|
||||
buttonText={"Hacking Contracts"}
|
||||
|
@ -1,13 +0,0 @@
|
||||
import React, { useEffect } from "react";
|
||||
|
||||
import { startHackingMission } from "../../Faction/FactionHelpers";
|
||||
import { Faction } from "../../Faction/Faction";
|
||||
|
||||
interface IProps {
|
||||
faction: Faction;
|
||||
}
|
||||
|
||||
export function HackingMissionRoot(props: IProps): React.ReactElement {
|
||||
useEffect(() => startHackingMission(props.faction));
|
||||
return <div id="mission-container"></div>;
|
||||
}
|
@ -2,7 +2,6 @@ import { Message } from "./Message";
|
||||
import { Augmentations } from "../Augmentation/Augmentations";
|
||||
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
|
||||
import { Programs } from "../Programs/Programs";
|
||||
import { inMission } from "../Missions";
|
||||
import { Player } from "../Player";
|
||||
import { redPillFlag } from "../RedPill";
|
||||
import { GetServerByHostname } from "../Server/ServerHelpers";
|
||||
@ -66,11 +65,11 @@ function checkForMessagesToSend(): void {
|
||||
redpillOwned = true;
|
||||
}
|
||||
|
||||
if (redpill && redpillOwned && Player.sourceFiles.length === 0 && !redPillFlag && !inMission) {
|
||||
if (redpill && redpillOwned && Player.sourceFiles.length === 0 && !redPillFlag) {
|
||||
sendMessage(redpill, true);
|
||||
} else if (redpill && redpillOwned) {
|
||||
//If player has already destroyed a BitNode, message is not forced
|
||||
if (!redPillFlag && !inMission) {
|
||||
if (!redPillFlag) {
|
||||
sendMessage(redpill);
|
||||
}
|
||||
} else if (jumper0 && !jumper0.recvd && Player.hacking_skill >= 25) {
|
||||
|
8
src/Missions.d.ts
vendored
8
src/Missions.d.ts
vendored
@ -1,8 +0,0 @@
|
||||
export declare let inMission: boolean;
|
||||
export declare class HackingMission {
|
||||
constructor(reputation: number, faction: Faction);
|
||||
init(): void;
|
||||
process(numCycles: number): void;
|
||||
}
|
||||
export declare function setInMission(inMission: boolean, mission: HackingMission): void;
|
||||
export declare let currMission: HackingMission;
|
1600
src/Missions.jsx
1600
src/Missions.jsx
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,6 @@ import { Terminal } from "./Terminal";
|
||||
import { calculateSkill, calculateExp } from "./PersonObjects/formulas/skill";
|
||||
|
||||
import { Message } from "./Message/Message";
|
||||
import { inMission } from "./Missions";
|
||||
import { Player } from "./Player";
|
||||
import { Programs } from "./Programs/Programs";
|
||||
import { Script } from "./Script/Script";
|
||||
@ -2965,10 +2964,6 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
universityCourse: function (universityName: any, className: any): any {
|
||||
updateDynamicRam("universityCourse", getRamCost("universityCourse"));
|
||||
checkSingularityAccess("universityCourse", 1);
|
||||
if (inMission) {
|
||||
workerScript.log("universityCourse", "You are in the middle of a mission.");
|
||||
return;
|
||||
}
|
||||
if (Player.isWorking) {
|
||||
const txt = Player.singularityStopWork();
|
||||
workerScript.log("universityCourse", txt);
|
||||
@ -3049,10 +3044,6 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
gymWorkout: function (gymName: any, stat: any): any {
|
||||
updateDynamicRam("gymWorkout", getRamCost("gymWorkout"));
|
||||
checkSingularityAccess("gymWorkout", 1);
|
||||
if (inMission) {
|
||||
workerScript.log("gymWorkout", "You are in the middle of a mission.");
|
||||
return;
|
||||
}
|
||||
if (Player.isWorking) {
|
||||
const txt = Player.singularityStopWork();
|
||||
workerScript.log("gymWorkout", txt);
|
||||
@ -3486,7 +3477,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
isBusy: function (): any {
|
||||
updateDynamicRam("isBusy", getRamCost("isBusy"));
|
||||
checkSingularityAccess("isBusy", 1);
|
||||
return Player.isWorking || inMission;
|
||||
return Player.isWorking;
|
||||
},
|
||||
stopAction: function (): any {
|
||||
updateDynamicRam("stopAction", getRamCost("stopAction"));
|
||||
@ -3553,12 +3544,6 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Cant work while in a mission
|
||||
if (inMission) {
|
||||
workerScript.log("workForCompany", "You are in the middle of a mission.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check to make sure company position data is valid
|
||||
const companyPositionName = Player.jobs[companyName];
|
||||
const companyPosition = CompanyPositions[companyPositionName];
|
||||
@ -3708,11 +3693,6 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return;
|
||||
}
|
||||
|
||||
if (inMission) {
|
||||
workerScript.log("workForFaction", "You are in the middle of a mission.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Player.factions.includes(name)) {
|
||||
workerScript.log("workForFaction", `You are not a member of '${name}'`);
|
||||
return false;
|
||||
@ -3900,10 +3880,6 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
updateDynamicRam("createProgram", getRamCost("createProgram"));
|
||||
checkSingularityAccess("createProgram", 3);
|
||||
|
||||
if (inMission) {
|
||||
workerScript.log("createProgram", "You are in the middle of a mission.");
|
||||
return;
|
||||
}
|
||||
if (Player.isWorking) {
|
||||
const txt = Player.singularityStopWork();
|
||||
workerScript.log("createProgram", txt);
|
||||
@ -3946,10 +3922,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
commitCrime: function (crimeRoughName: any): any {
|
||||
updateDynamicRam("commitCrime", getRamCost("commitCrime"));
|
||||
checkSingularityAccess("commitCrime", 3);
|
||||
if (inMission) {
|
||||
workerScript.log("commitCrime", "You are in the middle of a mission.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Player.isWorking) {
|
||||
const txt = Player.singularityStopWork();
|
||||
workerScript.log("commitCrime", txt);
|
||||
|
@ -50,7 +50,6 @@ import { getAvailableCreatePrograms } from "../../Programs/ProgramHelpers";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { redPillFlag } from "../../RedPill";
|
||||
|
||||
import { inMission } from "../../Missions";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
|
||||
const openedMixin = (theme: Theme): CSSObject => ({
|
||||
@ -266,7 +265,7 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
// Alt-o - Options
|
||||
function handleShortcuts(this: Document, event: KeyboardEvent): any {
|
||||
if (Settings.DisableHotkeys) return;
|
||||
if (props.player.isWorking || redPillFlag || inMission) return;
|
||||
if (props.player.isWorking || redPillFlag) return;
|
||||
if (event.keyCode == KEY.T && event.altKey) {
|
||||
event.preventDefault();
|
||||
clickTerminal();
|
||||
|
@ -23,7 +23,6 @@ import {
|
||||
import { hasHacknetServers, processHacknetEarnings } from "./Hacknet/HacknetHelpers";
|
||||
import { iTutorialStart } from "./InteractiveTutorial";
|
||||
import { checkForMessagesToSend, initMessages } from "./Message/MessageHelpers";
|
||||
import { inMission, currMission } from "./Missions";
|
||||
import { loadAllRunningScripts, updateOnlineScriptTimes } from "./NetscriptWorker";
|
||||
import { Player } from "./Player";
|
||||
import { saveObject, loadGame } from "./SaveObject";
|
||||
@ -131,11 +130,6 @@ const Engine: {
|
||||
Player.gang.process(numCycles, Player);
|
||||
}
|
||||
|
||||
// Mission
|
||||
if (inMission && currMission) {
|
||||
currMission.process(numCycles);
|
||||
}
|
||||
|
||||
// Corporation
|
||||
if (Player.corporation instanceof Corporation) {
|
||||
// Stores cycles in a "buffer". Processed separately using Engine Counters
|
||||
|
@ -56,7 +56,6 @@ import { TerminalRoot } from "../Terminal/ui/TerminalRoot";
|
||||
import { TutorialRoot } from "../Tutorial/ui/TutorialRoot";
|
||||
import { ActiveScriptsRoot } from "../ui/ActiveScripts/ActiveScriptsRoot";
|
||||
import { FactionsRoot } from "../Faction/ui/FactionsRoot";
|
||||
import { HackingMissionRoot } from "../HackingMission/ui/HackingMissionRoot";
|
||||
import { FactionRoot } from "../Faction/ui/FactionRoot";
|
||||
import { CharacterStats } from "./CharacterStats";
|
||||
import { TravelAgencyRoot } from "../Locations/ui/TravelAgencyRoot";
|
||||
@ -178,9 +177,6 @@ export let Router: IRouter = {
|
||||
toLocation: () => {
|
||||
throw new Error("Router called before initialization");
|
||||
},
|
||||
toHackingMission: () => {
|
||||
throw new Error("Router called before initialization");
|
||||
},
|
||||
};
|
||||
|
||||
function determineStartPage(player: IPlayer): Page {
|
||||
@ -270,10 +266,6 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
||||
setLocation(location);
|
||||
setPage(Page.Location);
|
||||
},
|
||||
toHackingMission: (faction: Faction) => {
|
||||
setPage(Page.HackingMission);
|
||||
setFaction(faction);
|
||||
},
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@ -296,8 +288,6 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
||||
<BitverseRoot flume={flume} enter={enterBitNode} quick={quick} />
|
||||
) : page === Page.Infiltration ? (
|
||||
<InfiltrationRoot location={location} />
|
||||
) : page === Page.HackingMission ? (
|
||||
<HackingMissionRoot faction={faction} />
|
||||
) : page === Page.BladeburnerCinematic ? (
|
||||
<BladeburnerCinematic />
|
||||
) : page === Page.Work ? (
|
||||
|
@ -23,8 +23,7 @@ export function Overview({ children }: IProps): React.ReactElement {
|
||||
const [open, setOpen] = useState(true);
|
||||
const classes = useStyles();
|
||||
const router = use.Router();
|
||||
if (router.page() === Page.BitVerse || router.page() === Page.HackingMission || router.page() === Page.Loading)
|
||||
return <></>;
|
||||
if (router.page() === Page.BitVerse || router.page() === Page.Loading) return <></>;
|
||||
let icon;
|
||||
if (open) {
|
||||
icon = <VisibilityOffIcon color="primary" />;
|
||||
|
@ -33,7 +33,6 @@ export enum Page {
|
||||
Work,
|
||||
BladeburnerCinematic,
|
||||
Location,
|
||||
HackingMission,
|
||||
Loading,
|
||||
}
|
||||
|
||||
@ -74,5 +73,4 @@ export interface IRouter {
|
||||
toWork(): void;
|
||||
toBladeburnerCinematic(): void;
|
||||
toLocation(location: Location): void;
|
||||
toHackingMission(faction: Faction): void;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user