From 9cbb525da31995fc9ec58f8a17aa4787d8de8ab9 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 1 Oct 2021 15:26:12 -0400 Subject: [PATCH] remove hacking missions --- src/Constants.ts | 65 - src/Faction/FactionHelpers.tsx | 7 - src/Faction/ui/FactionRoot.tsx | 16 - src/HackingMission/ui/HackingMissionRoot.tsx | 13 - src/Message/MessageHelpers.ts | 5 +- src/Missions.d.ts | 8 - src/Missions.jsx | 1600 ------------------ src/NetscriptFunctions.ts | 31 +- src/Sidebar/ui/SidebarRoot.tsx | 3 +- src/engine.tsx | 6 - src/ui/GameRoot.tsx | 10 - src/ui/React/Overview.tsx | 3 +- src/ui/Router.ts | 2 - 13 files changed, 6 insertions(+), 1763 deletions(-) delete mode 100644 src/HackingMission/ui/HackingMissionRoot.tsx delete mode 100644 src/Missions.d.ts delete mode 100644 src/Missions.jsx diff --git a/src/Constants.ts b/src/Constants.ts index 0dce70c0e..b02e14809 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -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.

" + - "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.

" + - "Each Node has three stats: Attack, Defense, and HP. There are five different actions that " + - "a Node can take:

" + - "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.

" + - "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.

" + - "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.

" + - "Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.

" + - "Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.

" + - "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.

" + - "To capture a Node, you must lower its HP down to 0.

" + - "There are six different types of Nodes:

" + - "CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action

" + - "Firewall - Nodes with high defense. These Nodes can 'Fortify'

" + - "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

" + - "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

" + - "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

" + - "Shield - Nodes with high defense. These Nodes can 'Fortify'

" + - "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.

" + - "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'.

" + - "Other Notes:

" + - "-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.

" + - "-Whenever a Node is conquered, its stats are significantly reduced

" + - "-Miscellaneous Nodes slowly raise their defense over time

" + - "-Nodes slowly regenerate health over time.", // Time-related constants MillisecondsPer20Hours: 72000000, diff --git a/src/Faction/FactionHelpers.tsx b/src/Faction/FactionHelpers.tsx index 7d4440a7a..876d81e9d 100644 --- a/src/Faction/FactionHelpers.tsx +++ b/src/Faction/FactionHelpers.tsx @@ -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 { diff --git a/src/Faction/ui/FactionRoot.tsx b/src/Faction/ui/FactionRoot.tsx index cc6d656f2..1fb5d7287 100644 --- a/src/Faction/ui/FactionRoot.tsx +++ b/src/Faction/ui/FactionRoot.tsx @@ -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 setGangOpen(false)} /> )} - {!isPlayersGang && factionInfo.offerHackingMission && ( -