Update infiltrators

This commit is contained in:
Olivier Gagnon
2022-04-22 15:30:49 -04:00
parent adbd6c3486
commit 9fdfb77dd4
30 changed files with 163 additions and 308 deletions
-15
View File
@@ -83,7 +83,6 @@ export class PlayerObject implements IPlayer {
lastUpdate: number;
lastSave: number;
totalPlaytime: number;
hasCompletedAnInfiltration: boolean;
// Stats
hacking: number;
@@ -134,12 +133,6 @@ export class PlayerObject implements IPlayer {
bladeburner_stamina_gain_mult: number;
bladeburner_analysis_mult: number;
bladeburner_success_chance_mult: number;
infiltration_base_rep_increase: number;
infiltration_rep_mult: number;
infiltration_trade_mult: number;
infiltration_sell_mult: number;
infiltration_timer_mult: number;
infiltration_damage_reduction_mult: number;
createProgramReqLvl: number;
factionWorkType: string;
@@ -472,13 +465,6 @@ export class PlayerObject implements IPlayer {
this.bladeburner_analysis_mult = 1; //Field Analysis Onl;
this.bladeburner_success_chance_mult = 1;
this.infiltration_base_rep_increase = 0;
this.infiltration_rep_mult = 1;
this.infiltration_trade_mult = 1;
this.infiltration_sell_mult = 1;
this.infiltration_timer_mult = 1;
this.infiltration_damage_reduction_mult = 1;
// Sleeves & Re-sleeving
this.sleeves = [];
this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenan;
@@ -491,7 +477,6 @@ export class PlayerObject implements IPlayer {
this.lastUpdate = 0;
this.lastSave = 0;
this.totalPlaytime = 0;
this.hasCompletedAnInfiltration = false;
this.playtimeSinceLastAug = 0;
this.playtimeSinceLastBitnode = 0;
@@ -7,7 +7,7 @@ import { Augmentation } from "../../Augmentation/Augmentation";
import { calculateEntropy } from "../Grafting/EntropyAccumulation";
export function hasAugmentation(this: IPlayer, aug: string | Augmentation, includeQueued = false): boolean {
export function hasAugmentation(this: IPlayer, aug: string | Augmentation, ignoreQueued = false): boolean {
const augName: string = aug instanceof Augmentation ? aug.name : aug;
for (const owned of this.augmentations) {
@@ -16,7 +16,7 @@ export function hasAugmentation(this: IPlayer, aug: string | Augmentation, inclu
}
}
if (!includeQueued) {
if (!ignoreQueued) {
for (const owned of this.queuedAugmentations) {
if (owned.name === augName) {
return true;
@@ -160,7 +160,6 @@ export function prestigeAugmentation(this: PlayerObject): void {
this.workChaExpGained = 0;
this.workRepGained = 0;
this.workMoneyGained = 0;
this.hasCompletedAnInfiltration = false;
this.timeWorked = 0;
@@ -313,13 +312,6 @@ export function resetMultipliers(this: IPlayer): void {
this.bladeburner_stamina_gain_mult = 1;
this.bladeburner_analysis_mult = 1;
this.bladeburner_success_chance_mult = 1;
this.infiltration_base_rep_increase = 0;
this.infiltration_rep_mult = 1;
this.infiltration_trade_mult = 1;
this.infiltration_sell_mult = 1;
this.infiltration_timer_mult = 1;
this.infiltration_damage_reduction_mult = 1;
}
export function hasProgram(this: IPlayer, programName: string): boolean {
@@ -2151,12 +2143,6 @@ export function checkForFactionInvitations(this: IPlayer): Faction[] {
return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;
}
//Infiltrators
const InfiltratorsFac = Factions[FactionNames.Infiltrators];
if (this.hasCompletedAnInfiltration && !InfiltratorsFac.isMember && !InfiltratorsFac.alreadyInvited) {
invitedFactions.push(InfiltratorsFac);
}
//Illuminati
const illuminatiFac = Factions[FactionNames.Illuminati];
if (