Refactored icarus.msg check

This commit is contained in:
Undeemiss 2022-04-12 20:47:00 -05:00
parent 001e8f6d06
commit 0d26976f1a

@ -1,5 +1,4 @@
import { Message } from "./Message"; import { Message } from "./Message";
import { Augmentations } from "../Augmentation/Augmentations";
import { AugmentationNames } from "../Augmentation/data/AugmentationNames"; import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
import { Router } from "../ui/GameRoot"; import { Router } from "../ui/GameRoot";
import { Programs } from "../Programs/Programs"; import { Programs } from "../Programs/Programs";
@ -63,18 +62,9 @@ function checkForMessagesToSend(): void {
const bitrunnersTest = Messages[MessageFilenames.BitRunnersTest]; const bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];
const redpill = Messages[MessageFilenames.RedPill]; const redpill = Messages[MessageFilenames.RedPill];
let redpillOwned = false; if (Player.hasAugmentation(AugmentationNames.TheRedPill)) {
if (Augmentations[AugmentationNames.TheRedPill].owned) { //Force the message if the player has never destroyed a BitNode
redpillOwned = true; sendMessage(redpill, (Player.sourceFiles.length === 0));
}
if (redpillOwned && Player.sourceFiles.length === 0 && Router.page() !== Page.BitVerse) {
sendMessage(redpill, true);
} else if (redpillOwned) {
//If player has already destroyed a BitNode, message is not forced
if (Router.page() !== Page.BitVerse) {
sendMessage(redpill);
}
} else if (!jumper0.recvd && Player.hacking >= 25) { } else if (!jumper0.recvd && Player.hacking >= 25) {
sendMessage(jumper0); sendMessage(jumper0);
const flightName = Programs.Flight.name; const flightName = Programs.Flight.name;
@ -130,48 +120,48 @@ function initMessages(): void {
new Message( new Message(
MessageFilenames.Jumper0, MessageFilenames.Jumper0,
"I know you can sense it. I know you're searching for it. " + "I know you can sense it. I know you're searching for it. " +
"It's why you spend night after " + "It's why you spend night after " +
"night at your computer. <br><br>It's real, I've seen it. And I can " + "night at your computer. <br><br>It's real, I've seen it. And I can " +
"help you find it. But not right now. You're not ready yet.<br><br>" + "help you find it. But not right now. You're not ready yet.<br><br>" +
"Use this program to track your progress<br><br>" + "Use this program to track your progress<br><br>" +
"The fl1ght.exe program was added to your home computer<br><br>" + "The fl1ght.exe program was added to your home computer<br><br>" +
"-jump3R", "-jump3R",
), ),
); );
AddToAllMessages( AddToAllMessages(
new Message( new Message(
MessageFilenames.Jumper1, MessageFilenames.Jumper1,
`Soon you will be contacted by a hacking group known as ${FactionNames.NiteSec}. ` + `Soon you will be contacted by a hacking group known as ${FactionNames.NiteSec}. ` +
"They can help you with your search. <br><br>" + "They can help you with your search. <br><br>" +
"You should join them, garner their favor, and " + "You should join them, garner their favor, and " +
"exploit them for their Augmentations. But do not trust them. " + "exploit them for their Augmentations. But do not trust them. " +
"They are not what they seem. No one is.<br><br>" + "They are not what they seem. No one is.<br><br>" +
"-jump3R", "-jump3R",
), ),
); );
AddToAllMessages( AddToAllMessages(
new Message( new Message(
MessageFilenames.Jumper2, MessageFilenames.Jumper2,
"Do not try to save the world. There is no world to save. If " + "Do not try to save the world. There is no world to save. If " +
"you want to find the truth, worry only about yourself. Ethics and " + "you want to find the truth, worry only about yourself. Ethics and " +
`morals will get you killed. <br><br>Watch out for a hacking group known as ${FactionNames.NiteSec}.` + `morals will get you killed. <br><br>Watch out for a hacking group known as ${FactionNames.NiteSec}.` +
"<br><br>-jump3R", "<br><br>-jump3R",
), ),
); );
AddToAllMessages( AddToAllMessages(
new Message( new Message(
MessageFilenames.Jumper3, MessageFilenames.Jumper3,
"You must learn to walk before you can run. And you must " + "You must learn to walk before you can run. And you must " +
`run before you can fly. Look for ${FactionNames.TheBlackHand}. <br><br>` + `run before you can fly. Look for ${FactionNames.TheBlackHand}. <br><br>` +
"I.I.I.I <br><br>-jump3R", "I.I.I.I <br><br>-jump3R",
), ),
); );
AddToAllMessages( AddToAllMessages(
new Message( new Message(
MessageFilenames.Jumper4, MessageFilenames.Jumper4,
"To find what you are searching for, you must understand the bits. " + "To find what you are searching for, you must understand the bits. " +
"The bits are all around us. The runners will help you.<br><br>" + "The bits are all around us. The runners will help you.<br><br>" +
"-jump3R", "-jump3R",
), ),
); );
@ -180,31 +170,31 @@ function initMessages(): void {
new Message( new Message(
MessageFilenames.CyberSecTest, MessageFilenames.CyberSecTest,
"We've been watching you. Your skills are very impressive. But you're wasting " + "We've been watching you. Your skills are very impressive. But you're wasting " +
"your talents. If you join us, you can put your skills to good use and change " + "your talents. If you join us, you can put your skills to good use and change " +
"the world for the better. If you join us, we can unlock your full potential. <br><br>" + "the world for the better. If you join us, we can unlock your full potential. <br><br>" +
"But first, you must pass our test. Find and install the backdoor on our server. <br><br>" + "But first, you must pass our test. Find and install the backdoor on our server. <br><br>" +
`-${FactionNames.CyberSec}`, `-${FactionNames.CyberSec}`,
), ),
); );
AddToAllMessages( AddToAllMessages(
new Message( new Message(
MessageFilenames.NiteSecTest, MessageFilenames.NiteSecTest,
"People say that the corrupted governments and corporations rule the world. " + "People say that the corrupted governments and corporations rule the world. " +
"Yes, maybe they do. But do you know who everyone really fears? People " + "Yes, maybe they do. But do you know who everyone really fears? People " +
"like us. Because they can't hide from us. Because they can't fight shadows " + "like us. Because they can't hide from us. Because they can't fight shadows " +
"and ideas with bullets. <br><br>" + "and ideas with bullets. <br><br>" +
"Join us, and people will fear you, too. <br><br>" + "Join us, and people will fear you, too. <br><br>" +
"Find and install the backdoor on our server. Then, we will contact you again." + "Find and install the backdoor on our server. Then, we will contact you again." +
`<br><br>-${FactionNames.NiteSec}`, `<br><br>-${FactionNames.NiteSec}`,
), ),
); );
AddToAllMessages( AddToAllMessages(
new Message( new Message(
MessageFilenames.BitRunnersTest, MessageFilenames.BitRunnersTest,
"We know what you are doing. We know what drives you. We know " + "We know what you are doing. We know what drives you. We know " +
"what you are looking for. <br><br> " + "what you are looking for. <br><br> " +
"We can help you find the answers.<br><br>" + "We can help you find the answers.<br><br>" +
"run4theh111z", "run4theh111z",
), ),
); );
@ -212,9 +202,9 @@ function initMessages(): void {
new Message( new Message(
MessageFilenames.RedPill, MessageFilenames.RedPill,
"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>" + "@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>" +
")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>" + ")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>" +
"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>" + "@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>" +
"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)", "DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)",
), ),
); );
} }