From 0e1e8a98628113b71e937494c0bc03556519324a Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Mon, 15 Jul 2024 04:20:10 +0700 Subject: [PATCH] MISC: Disable rumor of Bladeburners in BN8 (#1484) --- src/Faction/FactionInfo.tsx | 4 +++- src/Faction/FactionJoinCondition.ts | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Faction/FactionInfo.tsx b/src/Faction/FactionInfo.tsx index 63efb441e..92d5ef8c4 100644 --- a/src/Faction/FactionInfo.tsx +++ b/src/Faction/FactionInfo.tsx @@ -32,6 +32,8 @@ import { everyCondition, delayedCondition, unsatisfiable, + notCondition, + inBitNode, } from "./FactionJoinCondition"; import { SpecialServers } from "../Server/data/SpecialServers"; import { CONSTANTS } from "../Constants"; @@ -694,7 +696,7 @@ export const FactionInfos: Record = { ), rumorText: <>The {CompanyName.NSA} would like to have a word with you once you're ready., inviteReqs: [haveSomeSourceFile(6, 7), haveBladeburnerRank(BladeburnerConstants.RankNeededForFaction)], - rumorReqs: [haveSomeSourceFile(6, 7)], + rumorReqs: [haveSomeSourceFile(6, 7), notCondition(inBitNode(8))], special: true, assignment: (): React.ReactElement => { return ( diff --git a/src/Faction/FactionJoinCondition.ts b/src/Faction/FactionJoinCondition.ts index dff62d1c4..167d53144 100644 --- a/src/Faction/FactionJoinCondition.ts +++ b/src/Faction/FactionJoinCondition.ts @@ -27,6 +27,7 @@ import type { NotRequirement, SomeRequirement, EveryRequirement, + BitNodeRequirement, } from "@nsdefs"; import { calculateEffectiveRequiredReputation } from "../Company/utils"; @@ -275,6 +276,18 @@ export const haveBladeburnerRank = (n: number): PlayerCondition => ({ }, }); +export const inBitNode = (n: number): PlayerCondition => ({ + toString(): string { + return `In BitNode ${n}`; + }, + toJSON(): BitNodeRequirement { + return { type: "bitNodeN", bitNodeN: n }; + }, + isSatisfied(p: PlayerObject): boolean { + return p.bitNodeN == n; + }, +}); + export const haveSourceFile = (n: number): PlayerCondition => ({ toString(): string { return `In BitNode ${n} or have SourceFile ${n}`;