MISC: Tweak "The Covenant" faction's rumor condition (#2110)

This commit is contained in:
catloversg
2025-05-11 12:36:40 +07:00
committed by GitHub
parent 6a0853ddf8
commit 3a6f85d684
2 changed files with 13 additions and 8 deletions
+6 -1
View File
@@ -162,7 +162,12 @@ export const FactionInfos: Record<FactionName, FactionInfo> = {
</>
),
inviteReqs: [haveAugmentations(20), haveMoney(75e9), haveSkill("hacking", 850), haveCombatSkills(850)],
rumorReqs: [haveSourceFile(10)],
rumorReqs: [
someCondition([
inBitNode(10),
everyCondition([haveAugmentations(10), haveMoney(35e9), haveSkill("hacking", 425), haveCombatSkills(425)]),
]),
],
offerHackingWork: true,
offerFieldWork: true,
}),
+7 -7
View File
@@ -121,11 +121,11 @@ export const haveAugmentations = (n: number): PlayerCondition => ({
return { type: "numAugmentations", numAugmentations: n };
},
isSatisfied(p: PlayerObject): boolean {
if (n == 0) {
if (n === 0) {
const augs = [...p.augmentations, ...p.queuedAugmentations].filter(
(a) => a.name !== AugmentationName.NeuroFluxGovernor,
);
return augs.length == 0;
return augs.length === 0;
}
return p.augmentations.length >= n;
},
@@ -201,7 +201,7 @@ export const locatedInCity = (city: CityName): PlayerCondition => ({
return { type: "city", city: city };
},
isSatisfied(p: PlayerObject): boolean {
return p.city == city;
return p.city === city;
},
});
@@ -284,7 +284,7 @@ export const inBitNode = (n: number): PlayerCondition => ({
return { type: "bitNodeN", bitNodeN: n };
},
isSatisfied(p: PlayerObject): boolean {
return p.bitNodeN == n;
return p.bitNodeN === n;
},
});
@@ -302,7 +302,7 @@ export const haveSourceFile = (n: number): PlayerCondition => ({
};
},
isSatisfied(p: PlayerObject): boolean {
return p.bitNodeN == n || p.activeSourceFileLvl(n) > 0;
return p.bitNodeN === n || p.activeSourceFileLvl(n) > 0;
},
});
@@ -370,7 +370,7 @@ export const someCondition = (conditions: PlayerCondition[]): CompoundPlayerCond
},
*[Symbol.iterator](): IterableIterator<PlayerCondition> {
for (const cond of conditions) {
if ("type" in cond && cond.type == "someCondition") {
if ("type" in cond && cond.type === "someCondition") {
// automatically flatten nested OR lists
yield* cond as CompoundPlayerCondition;
} else {
@@ -396,7 +396,7 @@ export const everyCondition = (conditions: PlayerCondition[]): CompoundPlayerCon
},
*[Symbol.iterator](): IterableIterator<PlayerCondition> {
for (const cond of conditions) {
if ("type" in cond && cond.type == "everyCondition") {
if ("type" in cond && cond.type === "everyCondition") {
// automatically flatten nested AND lists
yield* cond as CompoundPlayerCondition;
} else {