mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 22:22:26 +01:00
CCT: Fewer money coding contracts if the reward would be $0 (#918)
This commit is contained in:
parent
8b6caeb68b
commit
f2baa04f45
@ -4,6 +4,7 @@ import {
|
|||||||
CodingContractTypes,
|
CodingContractTypes,
|
||||||
ICodingContractReward,
|
ICodingContractReward,
|
||||||
} from "./CodingContracts";
|
} from "./CodingContracts";
|
||||||
|
import { currentNodeMults } from "./BitNode/BitNodeMultipliers";
|
||||||
import { Factions } from "./Faction/Factions";
|
import { Factions } from "./Faction/Factions";
|
||||||
import { Player } from "@player";
|
import { Player } from "@player";
|
||||||
import { GetServer, GetAllServers } from "./Server/AllServers";
|
import { GetServer, GetAllServers } from "./Server/AllServers";
|
||||||
@ -124,7 +125,10 @@ function getRandomProblemType(): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getRandomReward(): ICodingContractReward {
|
function getRandomReward(): ICodingContractReward {
|
||||||
const rewardType = sanitizeRewardType(getRandomInt(0, CodingContractRewardType.Money));
|
// Don't offer money reward by default if BN multiplier is 0 (e.g. BN8)
|
||||||
|
const rewardTypeUpperBound =
|
||||||
|
currentNodeMults.CodingContractMoney === 0 ? CodingContractRewardType.Money - 1 : CodingContractRewardType.Money;
|
||||||
|
const rewardType = sanitizeRewardType(getRandomInt(0, rewardTypeUpperBound));
|
||||||
|
|
||||||
// Add additional information based on the reward type
|
// Add additional information based on the reward type
|
||||||
const factionsThatAllowHacking = Player.factions.filter((fac) => Factions[fac].getInfo().offerHackingWork);
|
const factionsThatAllowHacking = Player.factions.filter((fac) => Factions[fac].getInfo().offerHackingWork);
|
||||||
|
Loading…
Reference in New Issue
Block a user