Skip to content

Commit

Permalink
Alpha 1.1
Browse files Browse the repository at this point in the history
Should be ready for public testing
  • Loading branch information
Sphyxis committed Jan 20, 2024
1 parent 7f00f34 commit 80eb149
Show file tree
Hide file tree
Showing 22 changed files with 127 additions and 76 deletions.
2 changes: 1 addition & 1 deletion markdown/bitburner.bitnodemultipliers.charityexpgain.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## BitNodeMultipliers.CharityExpGain property

Influences the base experience gained for each ability when the player commits a charity.
Influences the base experience gained for each ability when the player performs a charity.

**Signature:**

Expand Down
2 changes: 1 addition & 1 deletion markdown/bitburner.bitnodemultipliers.charitymoney.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## BitNodeMultipliers.CharityMoney property

Influences the base money gained when the player commits a charity.
Influences the base money gained when the player performs a charity.

**Signature:**

Expand Down
4 changes: 2 additions & 2 deletions markdown/bitburner.bitnodemultipliers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ interface BitNodeMultipliers
| [BladeburnerRank](./bitburner.bitnodemultipliers.bladeburnerrank.md) | | number | Influences how quickly the player can gain rank within Bladeburner. |
| [BladeburnerSkillCost](./bitburner.bitnodemultipliers.bladeburnerskillcost.md) | | number | Influences the cost of skill levels from Bladeburner. |
| [CharismaLevelMultiplier](./bitburner.bitnodemultipliers.charismalevelmultiplier.md) | | number | Influences how quickly the player's charisma level (not exp) scales |
| [CharityExpGain](./bitburner.bitnodemultipliers.charityexpgain.md) | | number | Influences the base experience gained for each ability when the player commits a charity. |
| [CharityMoney](./bitburner.bitnodemultipliers.charitymoney.md) | | number | Influences the base money gained when the player commits a charity. |
| [CharityExpGain](./bitburner.bitnodemultipliers.charityexpgain.md) | | number | Influences the base experience gained for each ability when the player performs a charity. |
| [CharityMoney](./bitburner.bitnodemultipliers.charitymoney.md) | | number | Influences the base money gained when the player performs a charity. |
| [CharityORGEventStrength](./bitburner.bitnodemultipliers.charityorgeventstrength.md) | | number | Reduces charity event power, reduces the strength of all completed events and their associated rewards (Banners, Money, Bank, etc). Lowers all effects included in Softcap as well. |
| [CharityORGSoftcap](./bitburner.bitnodemultipliers.charityorgsoftcap.md) | | number | Reduces charity earning. |
| [CharityORGUniqueAugs](./bitburner.bitnodemultipliers.charityorguniqueaugs.md) | | number | Percentage of unique augs that the charityORG has. |
Expand Down
4 changes: 2 additions & 2 deletions markdown/bitburner.charityorg.spendkarma.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Spend Karma.
**Signature:**

```typescript
spendKarma(opt1: string, opt2: string, spendOn: number | string, opt3: string | number): boolean | string[];
spendKarma(opt1: string, opt2: string, spendOn: number | string, opt3?: string | number): boolean | string[];
```

## Parameters
Expand All @@ -19,7 +19,7 @@ spendKarma(opt1: string, opt2: string, spendOn: number | string, opt3: string |
| opt1 | string | Type of boost - 'boost charity', 'sleeves', 'time' |
| opt2 | string | Name of Secondary option - 'bank', 'overclock', etc |
| spendOn | number \| string | Amount of karma to spend, name of Augment or "list" to get a list back of available augments |
| opt3 | string \| number | Optional unless needed. Chosen sleeve. Can be 'all' for all sleeves |
| opt3 | string \| number | _(Optional)_ Optional unless needed. Chosen sleeve. Can be 'all' for all sleeves |

**Returns:**

Expand Down
2 changes: 1 addition & 1 deletion markdown/bitburner.charitystats.karma.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## CharityStats.karma property

Amount of karma gained for successfully committing this charity
Amount of karma gained for successfully performing this charity

**Signature:**

Expand Down
2 changes: 1 addition & 1 deletion markdown/bitburner.charitystats.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface CharityStats
| [hacking\_exp](./bitburner.charitystats.hacking_exp.md) | | number | hacking exp gained from charity |
| [hacking\_success\_weight](./bitburner.charitystats.hacking_success_weight.md) | | number | hacking level impact on success change of the charity |
| [intelligence\_exp](./bitburner.charitystats.intelligence_exp.md) | | number | intelligence exp gained from charity |
| [karma](./bitburner.charitystats.karma.md) | | number | Amount of karma gained for successfully committing this charity |
| [karma](./bitburner.charitystats.karma.md) | | number | Amount of karma gained for successfully performing this charity |
| [money](./bitburner.charitystats.money.md) | | number | How much money is given |
| [saves](./bitburner.charitystats.saves.md) | | number | How many people die as a result of this charity |
| [strength\_exp](./bitburner.charitystats.strength_exp.md) | | number | strength exp gained from charity |
Expand Down
1 change: 1 addition & 0 deletions markdown/bitburner.player.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ interface Player extends Person
| [location](./bitburner.player.location.md) | | string | |
| [money](./bitburner.player.money.md) | | number | |
| [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | | number | |
| [numPeopleSaved](./bitburner.player.numpeoplesaved.md) | | number | |
| [totalPlaytime](./bitburner.player.totalplaytime.md) | | number | |
11 changes: 11 additions & 0 deletions markdown/bitburner.player.numpeoplesaved.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Player](./bitburner.player.md) &gt; [numPeopleSaved](./bitburner.player.numpeoplesaved.md)

## Player.numPeopleSaved property

**Signature:**

```typescript
numPeopleSaved: number;
```
6 changes: 3 additions & 3 deletions markdown/bitburner.singularity.getcharitychance.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Singularity.getCharityChance() method

Get chance to successfully commit a charitable action.
Get chance to successfully perform a charitable action.

**Signature:**

Expand All @@ -22,11 +22,11 @@ getCharityChance(charity: CharityType | `${CharityType}`): number;

number

Chance of success at committing the specified charity.
Chance of success at performing the specified charity.

## Remarks

RAM cost: 5 GB \* 16/4/1

This function returns your chance of success at committing the specified charitable action.
This function returns your chance of success at performing the specified charitable action.

2 changes: 1 addition & 1 deletion markdown/bitburner.singularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This API requires Source-File 4 to use. The RAM cost of all these functions is m
| [getAugmentationRepReq(augName)](./bitburner.singularity.getaugmentationrepreq.md) | Get reputation requirement of an augmentation. |
| [getAugmentationsFromFaction(faction)](./bitburner.singularity.getaugmentationsfromfaction.md) | Get a list of augmentation available from a faction. |
| [getAugmentationStats(name)](./bitburner.singularity.getaugmentationstats.md) | Get the stats of an augmentation. |
| [getCharityChance(charity)](./bitburner.singularity.getcharitychance.md) | Get chance to successfully commit a charitable action. |
| [getCharityChance(charity)](./bitburner.singularity.getcharitychance.md) | Get chance to successfully perform a charitable action. |
| [getCharityStats(charity)](./bitburner.singularity.getcharitystats.md) | Get stats related to a charity. |
| [getCompanyFavor(companyName)](./bitburner.singularity.getcompanyfavor.md) | Get company favor. |
| [getCompanyFavorGain(companyName)](./bitburner.singularity.getcompanyfavorgain.md) | Get company favor gain. |
Expand Down
2 changes: 1 addition & 1 deletion markdown/bitburner.sleeve.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If you are not in BitNode-10, then you must have Source-File 10 in order to use
| [setToFactionWork(sleeveNumber, factionName, factionWorkType)](./bitburner.sleeve.settofactionwork.md) | Set a sleeve to work for a faction. |
| [setToGymWorkout(sleeveNumber, gymName, stat)](./bitburner.sleeve.settogymworkout.md) | Set a sleeve to workout at the gym. |
| [setToIdle(sleeveNumber)](./bitburner.sleeve.settoidle.md) | Set a sleeve to idle. |
| [setToPerformCharity(sleeveNumber, charityType)](./bitburner.sleeve.settoperformcharity.md) | Set a sleeve to commit a charitable act. |
| [setToPerformCharity(sleeveNumber, charityType)](./bitburner.sleeve.settoperformcharity.md) | Set a sleeve to perform a charitable act. |
| [setToShockRecovery(sleeveNumber)](./bitburner.sleeve.settoshockrecovery.md) | Set a sleeve to shock recovery. |
| [setToSynchronize(sleeveNumber)](./bitburner.sleeve.settosynchronize.md) | Set a sleeve to synchronize. |
| [setToUniversityCourse(sleeveNumber, university, className)](./bitburner.sleeve.settouniversitycourse.md) | Set a sleeve to take a class at a university. |
Expand Down
10 changes: 5 additions & 5 deletions markdown/bitburner.sleeve.settoperformcharity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Sleeve.setToPerformCharity() method

Set a sleeve to commit a charitable act.
Set a sleeve to perform a charitable act.

**Signature:**

Expand All @@ -16,7 +16,7 @@ setToPerformCharity(sleeveNumber: number, charityType: CharityType | `${CharityT

| Parameter | Type | Description |
| --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to start committing a charitable act. Sleeves are numbered starting from 0. |
| sleeveNumber | number | Index of the sleeve to start performing a charitable act. Sleeves are numbered starting from 0. |
| charityType | [CharityType](./bitburner.charitytype.md) \| \`${[CharityType](./bitburner.charitytype.md)<!-- -->}\` | Name of the charity. |

**Returns:**
Expand All @@ -35,11 +35,11 @@ Return a boolean indicating whether or not this action was set successfully (fal


```ts
// Assigns the first sleeve to Homicide.
ns.sleeve.setToCommitCharity(0, "help police");
// Assigns the first sleeve to Help Police.
ns.sleeve.setToPerformCharity(0, "help police");

// Assigns the second sleeve to Give Back, using enum
const charities = ns.enums.CharityType;
ns.sleeve.setToCommitCharity(1, charities.giveBack)
ns.sleeve.setToPerformCharity(1, charities.giveBack)
```

39 changes: 20 additions & 19 deletions src/BitNode/BitNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -506,26 +506,26 @@ export function initBitNodes() {
Money Gains:
<br />
<br />
Level 1: 100%
Level 1: 1000%
<br />
Level 2: 1000%
<br />
Level 3: 10000%
Level 2: 10000%
<br />
<br />
Success Rates:
<br />
<br />
Level 1: 6%
<br />
Level 2: 12%
Level 2: 7%
<br />
Level 3: 18%
Level 3: 8%
<br />
<br />
Level 2 will permanently unlock the ability to buy quantom tickets in all bitnodes.
<br />
Level 3 will permanently unlock the ability to get charity event rarity in all bitnodes.
<br />
Level 3 will also reduce all reputation requirements for Augmentations by 3%.
Level 3 will also reduce all reputation requirements for Augmentations by 5%.
<br />
</>
),
Expand Down Expand Up @@ -1041,35 +1041,36 @@ export function getBitNodeMultipliers(n: number, lvl: number): BitNodeMultiplier
return new BitNodeMultipliers({
AugmentationMoneyCost: 2,
AugmentationRepCost: 2.5,
BladeburnerRank: 0.3,
BladeburnerRank: 0.1,
CodingContractMoney: 2,
CompanyWorkMoney: 2,
CorporationValuation: 0.1,
CrimeMoney: 0.5,
CrimeSuccessRate: 0.5,
CharityMoney: 5,
CharityORGUniqueAugs: 1,
CharityORGSoftcap: 1,
CharitySuccessRate: 1.5,
DaedalusAugsRequirement: 40,
FourSigmaMarketDataApiCost: 2,
FourSigmaMarketDataCost: 2,
GangSoftcap: 0.3,
GangSoftcap: 0.5,
GangUniqueAugs: 0.4,
HacknetNodeMoney: 1.5,
InfiltrationMoney: 0,
InfiltrationRep: 0,
ManualHackMoney: 0.3,
ManualHackMoney: 0.1,
PurchasedServerCost: 2,
PurchasedServerSoftcap: 2,
PurchasedServerLimit: 0.3,
PurchasedServerMaxRam: 0.5,
ScriptHackMoney: 0.3,
ScriptHackMoneyGain: 0.3,
ServerGrowthRate: 0.5,
ScriptHackMoney: 0.1,
ScriptHackMoneyGain: 0.1,
ServerGrowthRate: 0.3,
HackExpGain: 0.4,
ServerMaxMoney: 0.3,
ServerMaxMoney: 0.2,
ServerStartingMoney: 0.2,
ServerStartingSecurity: 0.8,
ServerWeakenRate: 1.5,
StaneksGiftPowerMultiplier: 0.8,
ServerStartingSecurity: 5,
ServerWeakenRate: 0.5,
StaneksGiftPowerMultiplier: 1.2,
StaneksGiftExtraSize: 2,
WorldDaemonDifficulty: 5,
CorporationSoftcap: 0.1,
Expand Down
3 changes: 3 additions & 0 deletions src/BitNode/BitNodeMultipliers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export class BitNodeMultipliers {
/** influences the success chance of committing crimes */
CrimeSuccessRate = 1;

/** influences the success chance of performing ccharities */
CharitySuccessRate = 1;

/** Influences how many Augmentations you need in order to get invited to the Daedalus faction */
DaedalusAugsRequirement = 30;

Expand Down
2 changes: 2 additions & 0 deletions src/Charity/Charity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { WorkerScript } from "../Netscript/WorkerScript";
import { CharityType } from "@enums";
import { CharityWork } from "../Work/CharityWork";
import { calculateIntelligenceBonus } from "../PersonObjects/formulas/intelligence";
import { currentNodeMults } from "../BitNode/BitNodeMultipliers";

interface IConstructorParams {
hacking_success_weight?: number;
Expand Down Expand Up @@ -128,6 +129,7 @@ export class Charity {
chance /= CONSTANTS.MaxSkillLevel;
chance /= this.difficulty;
chance *= p.mults.charity_success;
chance *= currentNodeMults.CharitySuccessRate;
chance *= calculateIntelligenceBonus(p.skills.intelligence, 1);

return Math.min(chance, 1);
Expand Down
12 changes: 6 additions & 6 deletions src/CharityORG/CharityEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ export class CharityEvent {
}
case 12: {
// ticket stub
charityORG.ticketStub++;
charityORG.addItemMessage("Found a Ticket Stub!");
charityORG.ticketStub += Math.floor(Math.random() * 5) + 1;
charityORG.addItemMessage("Found some Ticket Stubs!");
break;
}
case 13: {
Expand Down Expand Up @@ -594,18 +594,18 @@ export class CharityEvent {

//Get the best values, and randomize them a bit.
//this.taskObject.baseMoneySpend = dif * 8 * ((Math.random() * .4) + .8);
if (fundraising !== undefined && fundraising) {
if (fundraising) {
this.taskObject.baseMoneyGain = dif * 7000000 * (Math.random() * 0.2 + 0.95);
this.taskObject.baseMoneyGain *= random ? Math.random() * 0.4 + 0.8 : 1;
this.taskObject.basePrestige = dif * 0.01125 * (Math.random() * 0.4 + 0.8);
this.taskObject.basePrestige = dif * 0.1125 * (Math.random() * 0.4 + 0.8);
this.taskObject.basePrestige *= random ? Math.random() * 0.4 + 0.8 : 1;
this.taskObject.isSpending = false;
} else {
this.taskObject.baseMoneySpend = dif * 7000000 * (Math.random() * 0.4 + 0.8);
this.taskObject.baseMoneySpend *= random ? Math.random() * 0.4 + 0.8 : 1;
this.taskObject.baseVisibility = dif * 0.00000014056 * (Math.random() * 0.2 + 0.9);
this.taskObject.baseVisibility *= random ? Math.random() * 0.4 + 0.8 : 1;
this.taskObject.basePrestige = dif * 0.01125 * (Math.random() * 0.4 + 0.8);
this.taskObject.basePrestige = dif * 0.1125 * (Math.random() * 0.4 + 0.8);
this.taskObject.basePrestige *= random ? Math.random() * 0.4 + 0.8 : 1;
this.taskObject.baseKarmaGain = dif * 0.0000000001875 * (Math.random() * 0.2 + 0.9);
this.taskObject.baseKarmaGain *= random ? Math.random() * 0.4 + 0.8 : 1;
Expand Down Expand Up @@ -728,7 +728,7 @@ export class CharityEvent {
}
randomizeDeathEffects(fundraising: boolean, random: boolean): void {
// Recreate death effects
if (this.taskObject.difficulty <= 10 || this.rarity <= 10) return;
if (this.taskObject.difficulty <= 10 || this.rarity <= 10 || !this.hasTimer) return;
const entries = Object.values(DeathEffectTypes);

if (fundraising) {
Expand Down
12 changes: 6 additions & 6 deletions src/CharityORG/data/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const charityVolunteerTasksMetadata: ICharityVolunteerTaskMetadata[] = [
short_name: "Beg",
isSpending: false,
params: {
basePrestige: 0.1125,
basePrestige: 1.125,
//baseVisibility: 0.00000021112,
baseMoneyGain: 8000000,
//baseKarmaGain: 0.0005,
Expand All @@ -82,7 +82,7 @@ export const charityVolunteerTasksMetadata: ICharityVolunteerTaskMetadata[] = [
isSpending: true,
params: {
baseMoneySpend: 4000000,
basePrestige: 1.7,
basePrestige: 17,
baseVisibility: 0.000010556,
baseKarmaGain: 0.0000000375,
hackWeight: 20,
Expand All @@ -102,7 +102,7 @@ export const charityVolunteerTasksMetadata: ICharityVolunteerTaskMetadata[] = [
params: {
baseMoneySpend: 4000000,
baseVisibility: 0.000010556,
basePrestige: 0.1125,
basePrestige: 1.125,
baseKarmaGain: 0.00000375,
hackWeight: 20,
strWeight: 15,
Expand All @@ -119,7 +119,7 @@ export const charityVolunteerTasksMetadata: ICharityVolunteerTaskMetadata[] = [
short_name: "Fundraise",
isSpending: false,
params: {
basePrestige: 0.5625,
basePrestige: 5.625,
//baseVisibility: 0.000001,
baseMoneyGain: 425000000,
//baseKarmaGain: 0.0005,
Expand All @@ -138,7 +138,7 @@ export const charityVolunteerTasksMetadata: ICharityVolunteerTaskMetadata[] = [
short_name: "Door to Door",
isSpending: false,
params: {
basePrestige: 2.25,
basePrestige: 22.5,
//baseVisibility: 0.00004,
baseMoneyGain: 1800000000,
//baseKarmaGain: 0.00053,
Expand All @@ -157,7 +157,7 @@ export const charityVolunteerTasksMetadata: ICharityVolunteerTaskMetadata[] = [
short_name: "Organize Telethon",
isSpending: false,
params: {
basePrestige: 4.5,
basePrestige: 45,
//baseVisibility: 0.00008,
baseMoneyGain: 4000000000,
//baseKarmaGain: 0.00053,
Expand Down
Loading

0 comments on commit 80eb149

Please sign in to comment.