Revert "API: Add types for parameters of gym-university-bladeburner API (#1591)" (#1592)

This reverts commit da8870ed796c916c19cac7c2b6328a75180367fc.
This commit is contained in:
David Walker 2024-08-16 13:45:54 -07:00 committed by GitHub
parent da8870ed79
commit 79bb0d289a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
65 changed files with 468 additions and 1044 deletions

@ -9,18 +9,15 @@ Get whether an action is set to autolevel.
**Signature:**
```typescript
getActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
getActionAutolevel(type: string, name: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
**Returns:**

@ -9,18 +9,15 @@ Get action count remaining.
**Signature:**
```typescript
getActionCountRemaining(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionCountRemaining(type: string, name: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
**Returns:**

@ -9,18 +9,15 @@ Get the current level of an action.
**Signature:**
```typescript
getActionCurrentLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionCurrentLevel(type: string, name: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
**Returns:**

@ -9,19 +9,15 @@ Get estimate success chance of an action.
**Signature:**
```typescript
getActionEstimatedSuccessChance(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
sleeveNumber?: number,
): [number, number];
getActionEstimatedSuccessChance(type: string, name: string, sleeveNumber?: number): [number, number];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| sleeveNumber | number | _(Optional)_ Optional. Index of the sleeve to retrieve information. |
**Returns:**

@ -9,18 +9,15 @@ Get the maximum level of an action.
**Signature:**
```typescript
getActionMaxLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionMaxLevel(type: string, name: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
**Returns:**

@ -9,19 +9,15 @@ Get the reputation gain of an action.
**Signature:**
```typescript
getActionRepGain(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level?: number,
): number;
getActionRepGain(type: string, name: string, level?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| level | number | _(Optional)_ Optional number. Action level at which to calculate the gain. Will be the action's current level if not given. |
**Returns:**

@ -9,18 +9,15 @@ Get action successes.
**Signature:**
```typescript
getActionSuccesses(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionSuccesses(type: string, name: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
**Returns:**

@ -9,18 +9,15 @@ Get the time to complete an action.
**Signature:**
```typescript
getActionTime(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionTime(type: string, name: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
**Returns:**

@ -9,11 +9,11 @@ List all black ops.
**Signature:**
```typescript
getBlackOpNames(): BladeburnerBlackOpName[];
getBlackOpNames(): string[];
```
**Returns:**
[BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)<!-- -->\[\]
string\[\]
Array of strings containing the names of all Bladeburner Black Ops.

@ -9,14 +9,14 @@ Get black op required rank.
**Signature:**
```typescript
getBlackOpRank(name: BladeburnerBlackOpName): number;
getBlackOpRank(name: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| name | [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md) | Name of BlackOp. Must be an exact match. |
| name | string | Name of BlackOp. Must be an exact match. |
**Returns:**

@ -9,11 +9,11 @@ List all contracts.
**Signature:**
```typescript
getContractNames(): BladeburnerContractName[];
getContractNames(): string[];
```
**Returns:**
[BladeburnerContractName](./bitburner.bladeburnercontractname.md)<!-- -->\[\]
string\[\]
Array of strings containing the names of all Bladeburner contracts.

@ -9,11 +9,11 @@ List all general actions.
**Signature:**
```typescript
getGeneralActionNames(): BladeburnerGeneralActionName[];
getGeneralActionNames(): string[];
```
**Returns:**
[BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)<!-- -->\[\]
string\[\]
Array of strings containing the names of all general Bladeburner actions.

@ -9,11 +9,11 @@ Get an object with the name and rank requirement of the next BlackOp that can be
**Signature:**
```typescript
getNextBlackOp(): { name: BladeburnerBlackOpName; rank: number } | null;
getNextBlackOp(): { name: string; rank: number } | null;
```
**Returns:**
{ name: [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)<!-- -->; rank: number } \| null
{ name: string; rank: number } \| null
An object with the `.name` and `.rank` properties of the available BlackOp, or `null`<!-- -->.

@ -9,11 +9,11 @@ List all operations.
**Signature:**
```typescript
getOperationNames(): BladeburnerOperationName[];
getOperationNames(): string[];
```
**Returns:**
[BladeburnerOperationName](./bitburner.bladeburneroperationname.md)<!-- -->\[\]
string\[\]
Array of strings containing the names of all Bladeburner operations.

@ -9,14 +9,14 @@ Get skill level.
**Signature:**
```typescript
getSkillLevel(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`): number;
getSkillLevel(skillName: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| skillName | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Name of skill. Case-sensitive and must be an exact match. |
| skillName | string | Name of skill. Case-sensitive and must be an exact match. |
**Returns:**

@ -9,11 +9,11 @@ List all skills.
**Signature:**
```typescript
getSkillNames(): BladeburnerSkillName[];
getSkillNames(): string[];
```
**Returns:**
[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->\[\]
string\[\]
Array of strings containing the names of all general Bladeburner skills.

@ -9,14 +9,14 @@ Get cost to upgrade skill.
**Signature:**
```typescript
getSkillUpgradeCost(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): number;
getSkillUpgradeCost(skillName: string, count?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| skillName | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Name of skill. Case-sensitive and must be an exact match. |
| skillName | string | Name of skill. Case-sensitive and must be an exact match. |
| count | number | _(Optional)_ Number of times to upgrade the skill. Defaults to 1 if not specified. |
**Returns:**

@ -9,18 +9,15 @@ Get team size.
**Signature:**
```typescript
getTeamSize(
type?: BladeburnerActionType | `${BladeburnerActionType}`,
name?: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getTeamSize(type?: string, name?: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | _(Optional)_ Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | _(Optional)_ Name of action. Must be an exact match. |
| type | string | _(Optional)_ Type of action. |
| name | string | _(Optional)_ Name of action. Must be an exact match. |
**Returns:**

@ -9,19 +9,15 @@ Set an action autolevel.
**Signature:**
```typescript
setActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
autoLevel: boolean,
): void;
setActionAutolevel(type: string, name: string, autoLevel: boolean): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| autoLevel | boolean | Whether or not to autolevel this action |
**Returns:**

@ -9,19 +9,15 @@ Set the level of an action.
**Signature:**
```typescript
setActionLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level: number,
): void;
setActionLevel(type: string, name: string, level: number): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| level | number | Level to set this action to. |
**Returns:**

@ -9,19 +9,15 @@ Set team size.
**Signature:**
```typescript
setTeamSize(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
size: number,
): number;
setTeamSize(type: string, name: string, size: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| size | number | Number of team members to set. Will be converted using Math.round(). |
**Returns:**

@ -9,18 +9,15 @@ Start an action.
**Signature:**
```typescript
startAction(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
startAction(type: string, name: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match |
**Returns:**

@ -9,14 +9,14 @@ Upgrade skill.
**Signature:**
```typescript
upgradeSkill(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): boolean;
upgradeSkill(skillName: string, count?: number): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| skillName | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Name of skill to be upgraded. Case-sensitive and must be an exact match. |
| skillName | string | Name of skill to be upgraded. Case-sensitive and must be an exact match. |
| count | number | _(Optional)_ Number of times to upgrade the skill. Defaults to 1 if not specified. |
**Returns:**

@ -1,18 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerActionName](./bitburner.bladeburneractionname.md)
## BladeburnerActionName type
**Signature:**
```typescript
export type BladeburnerActionName =
| BladeburnerGeneralActionName
| BladeburnerContractName
| BladeburnerOperationName
| BladeburnerBlackOpName;
```
**References:** [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)<!-- -->, [BladeburnerContractName](./bitburner.bladeburnercontractname.md)<!-- -->, [BladeburnerOperationName](./bitburner.bladeburneroperationname.md)<!-- -->, [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)

@ -1,23 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerActionType](./bitburner.bladeburneractiontype.md)
## BladeburnerActionType enum
Action types of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerActionType
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| BlackOp | <code>&quot;Black Operations&quot;</code> | |
| Contract | <code>&quot;Contracts&quot;</code> | |
| General | <code>&quot;General&quot;</code> | |
| Operation | <code>&quot;Operations&quot;</code> | |

@ -1,16 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md)
## BladeburnerActionTypeForSleeve type
**Signature:**
```typescript
export type BladeburnerActionTypeForSleeve =
| Exclude<BladeburnerGeneralActionName, BladeburnerGeneralActionName.InciteViolence>
| SpecialBladeburnerActionTypeForSleeve;
```
**References:** [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)<!-- -->, [BladeburnerGeneralActionName.InciteViolence](./bitburner.bladeburnergeneralactionname.md)<!-- -->, [SpecialBladeburnerActionTypeForSleeve](./bitburner.specialbladeburneractiontypeforsleeve.md)

@ -1,40 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)
## BladeburnerBlackOpName enum
Black Operation names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerBlackOpName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| OperationAnnihilus | <code>&quot;Operation Annihilus&quot;</code> | |
| OperationArchangel | <code>&quot;Operation Archangel&quot;</code> | |
| OperationAres | <code>&quot;Operation Ares&quot;</code> | |
| OperationCenturion | <code>&quot;Operation Centurion&quot;</code> | |
| OperationDaedalus | <code>&quot;Operation Daedalus&quot;</code> | |
| OperationDeckard | <code>&quot;Operation Deckard&quot;</code> | |
| OperationHyron | <code>&quot;Operation Hyron&quot;</code> | |
| OperationIonStorm | <code>&quot;Operation Ion Storm&quot;</code> | |
| OperationJuggernaut | <code>&quot;Operation Juggernaut&quot;</code> | |
| OperationK | <code>&quot;Operation K&quot;</code> | |
| OperationMorpheus | <code>&quot;Operation Morpheus&quot;</code> | |
| OperationRedDragon | <code>&quot;Operation Red Dragon&quot;</code> | |
| OperationShoulderOfOrion | <code>&quot;Operation Shoulder of Orion&quot;</code> | |
| OperationTitan | <code>&quot;Operation Titan&quot;</code> | |
| OperationTyphoon | <code>&quot;Operation Typhoon&quot;</code> | |
| OperationTyrell | <code>&quot;Operation Tyrell&quot;</code> | |
| OperationUltron | <code>&quot;Operation Ultron&quot;</code> | |
| OperationVindictus | <code>&quot;Operation Vindictus&quot;</code> | |
| OperationWallace | <code>&quot;Operation Wallace&quot;</code> | |
| OperationX | <code>&quot;Operation X&quot;</code> | |
| OperationZero | <code>&quot;Operation Zero&quot;</code> | |

@ -1,22 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerContractName](./bitburner.bladeburnercontractname.md)
## BladeburnerContractName enum
Contract names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerContractName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| BountyHunter | <code>&quot;Bounty Hunter&quot;</code> | |
| Retirement | <code>&quot;Retirement&quot;</code> | |
| Tracking | <code>&quot;Tracking&quot;</code> | |

@ -1,25 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)
## BladeburnerGeneralActionName enum
General action names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerGeneralActionName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| Diplomacy | <code>&quot;Diplomacy&quot;</code> | |
| FieldAnalysis | <code>&quot;Field Analysis&quot;</code> | |
| HyperbolicRegen | <code>&quot;Hyperbolic Regeneration Chamber&quot;</code> | |
| InciteViolence | <code>&quot;Incite Violence&quot;</code> | |
| Recruitment | <code>&quot;Recruitment&quot;</code> | |
| Training | <code>&quot;Training&quot;</code> | |

@ -1,25 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerOperationName](./bitburner.bladeburneroperationname.md)
## BladeburnerOperationName enum
Operation names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerOperationName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| Assassination | <code>&quot;Assassination&quot;</code> | |
| Investigation | <code>&quot;Investigation&quot;</code> | |
| Raid | <code>&quot;Raid&quot;</code> | |
| StealthRetirement | <code>&quot;Stealth Retirement Operation&quot;</code> | |
| Sting | <code>&quot;Sting Operation&quot;</code> | |
| Undercover | <code>&quot;Undercover Operation&quot;</code> | |

@ -1,31 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerSkillName](./bitburner.bladeburnerskillname.md)
## BladeburnerSkillName enum
Skill names type of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerSkillName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| BladesIntuition | <code>&quot;Blade's Intuition&quot;</code> | |
| Cloak | <code>&quot;Cloak&quot;</code> | |
| CybersEdge | <code>&quot;Cyber's Edge&quot;</code> | |
| Datamancer | <code>&quot;Datamancer&quot;</code> | |
| DigitalObserver | <code>&quot;Digital Observer&quot;</code> | |
| EvasiveSystem | <code>&quot;Evasive System&quot;</code> | |
| HandsOfMidas | <code>&quot;Hands of Midas&quot;</code> | |
| Hyperdrive | <code>&quot;Hyperdrive&quot;</code> | |
| Overclock | <code>&quot;Overclock&quot;</code> | |
| Reaper | <code>&quot;Reaper&quot;</code> | |
| ShortCircuit | <code>&quot;Short-Circuit&quot;</code> | |
| Tracer | <code>&quot;Tracer&quot;</code> | |

@ -1,24 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GymLocationName](./bitburner.gymlocationname.md)
## GymLocationName enum
Locations of gym
**Signature:**
```typescript
declare enum GymLocationName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| AevumCrushFitnessGym | <code>LocationName.AevumCrushFitnessGym</code> | |
| AevumSnapFitnessGym | <code>LocationName.AevumSnapFitnessGym</code> | |
| Sector12IronGym | <code>LocationName.Sector12IronGym</code> | |
| Sector12PowerhouseGym | <code>LocationName.Sector12PowerhouseGym</code> | |
| VolhavenMilleniumFitnessGym | <code>LocationName.VolhavenMilleniumFitnessGym</code> | |

@ -8,27 +8,18 @@
| Enumeration | Description |
| --- | --- |
| [BladeburnerActionType](./bitburner.bladeburneractiontype.md) | Action types of Bladeburner |
| [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md) | Black Operation names of Bladeburner |
| [BladeburnerContractName](./bitburner.bladeburnercontractname.md) | Contract names of Bladeburner |
| [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md) | General action names of Bladeburner |
| [BladeburnerOperationName](./bitburner.bladeburneroperationname.md) | Operation names of Bladeburner |
| [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) | Skill names type of Bladeburner |
| [CityName](./bitburner.cityname.md) | Names of all cities |
| [CompanyName](./bitburner.companyname.md) | Names of all companies |
| [CrimeType](./bitburner.crimetype.md) | |
| [FactionWorkType](./bitburner.factionworktype.md) | |
| [GymLocationName](./bitburner.gymlocationname.md) | Locations of gym |
| [GymType](./bitburner.gymtype.md) | |
| [JobField](./bitburner.jobfield.md) | |
| [JobName](./bitburner.jobname.md) | |
| [LocationName](./bitburner.locationname.md) | Names of all locations |
| [OrderType](./bitburner.ordertype.md) | |
| [PositionType](./bitburner.positiontype.md) | |
| [SpecialBladeburnerActionTypeForSleeve](./bitburner.specialbladeburneractiontypeforsleeve.md) | These special Bladeburner action types are only for Sleeve |
| [ToastVariant](./bitburner.toastvariant.md) | |
| [UniversityClassType](./bitburner.universityclasstype.md) | |
| [UniversityLocationName](./bitburner.universitylocationname.md) | Locations of university |
## Interfaces
@ -161,8 +152,6 @@
| Type Alias | Description |
| --- | --- |
| [BladeburnerActionName](./bitburner.bladeburneractionname.md) | |
| [BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md) | |
| [CodingContractData](./bitburner.codingcontractdata.md) | Coding contract data will differ depending on coding contract. |
| [CorpEmployeePosition](./bitburner.corpemployeeposition.md) | |
| [CorpIndustryName](./bitburner.corpindustryname.md) | |

@ -9,15 +9,15 @@ Workout at the gym.
**Signature:**
```typescript
gymWorkout(gymName: GymLocationName | `${GymLocationName}`, stat: GymType | `${GymType}`, focus?: boolean): boolean;
gymWorkout(gymName: string, stat: string, focus?: boolean): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| gymName | [GymLocationName](./bitburner.gymlocationname.md) \| \`${[GymLocationName](./bitburner.gymlocationname.md)<!-- -->}\` | Name of gym. You must be in the correct city for whatever gym you specify. |
| stat | [GymType](./bitburner.gymtype.md) \| \`${[GymType](./bitburner.gymtype.md)<!-- -->}\` | The stat you want to train. |
| gymName | string | Name of gym. You must be in the correct city for whatever gym you specify. |
| stat | string | The stat you want to train. |
| focus | boolean | _(Optional)_ Acquire player focus on this gym workout. Optional. Defaults to true. |
**Returns:**

@ -9,19 +9,15 @@ Take university class.
**Signature:**
```typescript
universityCourse(
universityName: UniversityLocationName | `${UniversityLocationName}`,
courseName: UniversityClassType | `${UniversityClassType}`,
focus?: boolean,
): boolean;
universityCourse(universityName: string, courseName: string, focus?: boolean): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| universityName | [UniversityLocationName](./bitburner.universitylocationname.md) \| \`${[UniversityLocationName](./bitburner.universitylocationname.md)<!-- -->}\` | Name of university. You must be in the correct city for whatever university you specify. |
| courseName | [UniversityClassType](./bitburner.universityclasstype.md) \| \`${[UniversityClassType](./bitburner.universityclasstype.md)<!-- -->}\` | Name of course. |
| universityName | string | Name of university. You must be in the correct city for whatever university you specify. |
| courseName | string | Name of course. |
| focus | boolean | _(Optional)_ Acquire player focus on this class. Optional. Defaults to true. |
**Returns:**

@ -36,6 +36,6 @@ If you are not in BitNode-10, then you must have Source-File 10 in order to use
| [setToIdle(sleeveNumber)](./bitburner.sleeve.settoidle.md) | Set a sleeve to idle. |
| [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, universityName, courseName)](./bitburner.sleeve.settouniversitycourse.md) | Set a sleeve to take a class at a university. |
| [setToUniversityCourse(sleeveNumber, university, className)](./bitburner.sleeve.settouniversitycourse.md) | Set a sleeve to take a class at a university. |
| [travel(sleeveNumber, city)](./bitburner.sleeve.travel.md) | Make a sleeve travel to another city. The cost for using this function is the same as for a player. |

@ -9,11 +9,7 @@ Set a sleeve to perform Bladeburner actions.
**Signature:**
```typescript
setToBladeburnerAction(
sleeveNumber: number,
action: BladeburnerActionTypeForSleeve | `${BladeburnerActionTypeForSleeve}`,
contract?: BladeburnerContractName,
): boolean;
setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string): boolean;
```
## Parameters
@ -21,8 +17,8 @@ setToBladeburnerAction(
| Parameter | Type | Description |
| --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to perform a Bladeburner action. |
| action | [BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md) \| \`${[BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md)<!-- -->}\` | Name of the action to be performed. |
| contract | [BladeburnerContractName](./bitburner.bladeburnercontractname.md) | _(Optional)_ Name of the contract if applicable. |
| action | string | Name of the action to be performed. |
| contract | string | _(Optional)_ Name of the contract if applicable. |
**Returns:**

@ -9,11 +9,7 @@ Set a sleeve to workout at the gym.
**Signature:**
```typescript
setToGymWorkout(
sleeveNumber: number,
gymName: GymLocationName | `${GymLocationName}`,
stat: GymType | `${GymType}`,
): boolean;
setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean;
```
## Parameters
@ -21,8 +17,8 @@ setToGymWorkout(
| Parameter | Type | Description |
| --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to workout at the gym. |
| gymName | [GymLocationName](./bitburner.gymlocationname.md) \| \`${[GymLocationName](./bitburner.gymlocationname.md)<!-- -->}\` | Name of the gym. |
| stat | [GymType](./bitburner.gymtype.md) \| \`${[GymType](./bitburner.gymtype.md)<!-- -->}\` | Name of the stat to train. |
| gymName | string | Name of the gym. |
| stat | string | Name of the stat to train. |
**Returns:**

@ -9,11 +9,7 @@ Set a sleeve to take a class at a university.
**Signature:**
```typescript
setToUniversityCourse(
sleeveNumber: number,
universityName: UniversityLocationName | `${UniversityLocationName}`,
courseName: UniversityClassType | `${UniversityClassType}`,
): boolean;
setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean;
```
## Parameters
@ -21,8 +17,8 @@ setToUniversityCourse(
| Parameter | Type | Description |
| --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to start taking class. |
| universityName | [UniversityLocationName](./bitburner.universitylocationname.md) \| \`${[UniversityLocationName](./bitburner.universitylocationname.md)<!-- -->}\` | Name of the university to attend. |
| courseName | [UniversityClassType](./bitburner.universityclasstype.md) \| \`${[UniversityClassType](./bitburner.universityclasstype.md)<!-- -->}\` | Name of the course to follow. |
| university | string | Name of the university to attend. |
| className | string | Name of the class to follow. |
**Returns:**

@ -1,22 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [SpecialBladeburnerActionTypeForSleeve](./bitburner.specialbladeburneractiontypeforsleeve.md)
## SpecialBladeburnerActionTypeForSleeve enum
These special Bladeburner action types are only for Sleeve
**Signature:**
```typescript
declare enum SpecialBladeburnerActionTypeForSleeve
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| InfiltrateSynthoids | <code>&quot;Infiltrate Synthoids&quot;</code> | |
| SupportMainSleeve | <code>&quot;Support main sleeve&quot;</code> | |
| TakeOnContracts | <code>&quot;Take on contracts&quot;</code> | |

@ -1,22 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [UniversityLocationName](./bitburner.universitylocationname.md)
## UniversityLocationName enum
Locations of university
**Signature:**
```typescript
declare enum UniversityLocationName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| AevumSummitUniversity | <code>LocationName.AevumSummitUniversity</code> | |
| Sector12RothmanUniversity | <code>LocationName.Sector12RothmanUniversity</code> | |
| VolhavenZBInstituteOfTechnology | <code>LocationName.VolhavenZBInstituteOfTechnology</code> | |

@ -1,6 +1,6 @@
import {
AugmentationName,
BladeburnerSkillName,
BladeSkillName,
CityName,
CompletedProgramName,
CorpUnlockName,
@ -417,8 +417,7 @@ export const achievements: Record<string, Achievement> = {
Icon: "BLADEOVERCLOCK",
Visible: () => canAccessBitNodeFeature(6),
Condition: () =>
Player.bladeburner?.getSkillLevel(BladeburnerSkillName.Overclock) ===
Skills[BladeburnerSkillName.Overclock].maxLvl,
Player.bladeburner?.getSkillLevel(BladeSkillName.overclock) === Skills[BladeSkillName.overclock].maxLvl,
},
BLADEBURNER_UNSPENT_100000: {
...achievementData.BLADEBURNER_UNSPENT_100000,

@ -6,7 +6,7 @@ import type { Skills as PersonSkills } from "../../PersonObjects/Skills";
import { addOffset } from "../../utils/helpers/addOffset";
import { BladeburnerConstants } from "../data/Constants";
import { calculateIntelligenceBonus } from "../../PersonObjects/formulas/intelligence";
import { BladeburnerMultName } from "../Enums";
import { BladeMultName } from "../Enums";
import { getRecordKeys } from "../../Types/Record";
import { clampNumber } from "../../utils/helpers/clampNumber";
@ -100,7 +100,7 @@ export abstract class ActionClass {
getActionTime(bladeburner: Bladeburner, person: Person): number {
const difficulty = this.getDifficulty();
let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor;
const skillFac = bladeburner.getSkillMult(BladeburnerMultName.ActionTime); // Always < 1
const skillFac = bladeburner.getSkillMult(BladeMultName.actionTime); // Always < 1
const effAgility = bladeburner.getEffectiveSkillLevel(person, "agility");
const effDexterity = bladeburner.getEffectiveSkillLevel(person, "dexterity");
@ -175,10 +175,10 @@ export abstract class ActionClass {
difficulty *= this.getChaosSuccessFactor(inst);
// Factor skill multipliers into success chance
competence *= inst.getSkillMult(BladeburnerMultName.SuccessChanceAll);
competence *= inst.getSkillMult(BladeMultName.successChanceAll);
competence *= this.getActionTypeSkillSuccessBonus(inst);
if (this.isStealth) competence *= inst.getSkillMult(BladeburnerMultName.SuccessChanceStealth);
if (this.isKill) competence *= inst.getSkillMult(BladeburnerMultName.SuccessChanceKill);
if (this.isStealth) competence *= inst.getSkillMult(BladeMultName.successChanceStealth);
if (this.isKill) competence *= inst.getSkillMult(BladeMultName.successChanceKill);
// Augmentation multiplier
competence *= person.mults.bladeburner_success_chance;

@ -1,19 +1,19 @@
import type { Bladeburner } from "../Bladeburner";
import type { Availability, ActionIdentifier } from "../Types";
import { BladeburnerActionType, BladeburnerBlackOpName } from "@enums";
import { BladeActionType, BladeBlackOpName } from "@enums";
import { ActionClass, ActionParams } from "./Action";
import { operationSkillSuccessBonus, operationTeamSuccessBonus } from "./Operation";
interface BlackOpParams {
name: BladeburnerBlackOpName;
name: BladeBlackOpName;
reqdRank: number;
n: number;
}
export class BlackOperation extends ActionClass {
type: BladeburnerActionType.BlackOp = BladeburnerActionType.BlackOp;
name: BladeburnerBlackOpName;
type: BladeActionType.blackOp = BladeActionType.blackOp;
name: BladeBlackOpName;
n: number;
reqdRank: number;
teamCount = 0;

@ -2,23 +2,23 @@ import type { Bladeburner } from "../Bladeburner";
import type { ActionIdentifier } from "../Types";
import { Generic_fromJSON, IReviverValue, constructorsForReviver } from "../../utils/JSONReviver";
import { BladeburnerActionType, BladeburnerContractName, BladeburnerMultName } from "../Enums";
import { BladeActionType, BladeContractName, BladeMultName } from "../Enums";
import { LevelableActionClass, LevelableActionParams } from "./LevelableAction";
export class Contract extends LevelableActionClass {
type: BladeburnerActionType.Contract = BladeburnerActionType.Contract;
name: BladeburnerContractName = BladeburnerContractName.Tracking;
type: BladeActionType.contract = BladeActionType.contract;
name: BladeContractName = BladeContractName.tracking;
get id(): ActionIdentifier {
return { type: this.type, name: this.name };
}
constructor(params: (LevelableActionParams & { name: BladeburnerContractName }) | null = null) {
constructor(params: (LevelableActionParams & { name: BladeContractName }) | null = null) {
super(params);
if (params) this.name = params.name;
}
getActionTypeSkillSuccessBonus(inst: Bladeburner): number {
return inst.getSkillMult(BladeburnerMultName.SuccessChanceContract);
return inst.getSkillMult(BladeMultName.successChanceContract);
}
toJSON(): IReviverValue {

@ -2,19 +2,19 @@ import type { Person } from "../../PersonObjects/Person";
import type { Bladeburner } from "../Bladeburner";
import type { ActionIdentifier } from "../Types";
import { BladeburnerActionType, BladeburnerGeneralActionName } from "@enums";
import { BladeActionType, BladeGeneralActionName } from "@enums";
import { ActionClass, ActionParams } from "./Action";
import { clampNumber } from "../../utils/helpers/clampNumber";
type GeneralActionParams = ActionParams & {
name: BladeburnerGeneralActionName;
name: BladeGeneralActionName;
getActionTime: (bladeburner: Bladeburner, person: Person) => number;
getSuccessChance?: (bladeburner: Bladeburner, person: Person) => number;
};
export class GeneralAction extends ActionClass {
type: BladeburnerActionType.General = BladeburnerActionType.General;
name: BladeburnerGeneralActionName;
type: BladeActionType.general = BladeActionType.general;
name: BladeGeneralActionName;
get id(): ActionIdentifier {
return { type: this.type, name: this.name };
}

@ -3,7 +3,7 @@ import type { BlackOperation } from "./BlackOperation";
import type { Bladeburner } from "../Bladeburner";
import type { Availability, ActionIdentifier, SuccessChanceParams } from "../Types";
import { BladeburnerActionType, BladeburnerMultName, BladeburnerOperationName } from "@enums";
import { BladeActionType, BladeMultName, BladeOperationName } from "@enums";
import { BladeburnerConstants } from "../data/Constants";
import { ActionClass } from "./Action";
import { Generic_fromJSON, IReviverValue, constructorsForReviver } from "../../utils/JSONReviver";
@ -11,13 +11,13 @@ import { LevelableActionClass, LevelableActionParams } from "./LevelableAction";
import { clampInteger } from "../../utils/helpers/clampNumber";
export interface OperationParams extends LevelableActionParams {
name: BladeburnerOperationName;
name: BladeOperationName;
getAvailability?: (bladeburner: Bladeburner) => Availability;
}
export class Operation extends LevelableActionClass {
type: BladeburnerActionType.Operation = BladeburnerActionType.Operation;
name = BladeburnerOperationName.Investigation;
type: BladeActionType.operation = BladeActionType.operation;
name = BladeOperationName.investigation;
teamCount = 0;
get id(): ActionIdentifier {
return { type: this.type, name: this.name };
@ -46,7 +46,7 @@ export class Operation extends LevelableActionClass {
return 1;
}
getSuccessChance(inst: Bladeburner, person: Person, params: SuccessChanceParams) {
if (this.name === BladeburnerOperationName.Raid && inst.getCurrentCity().comms <= 0) {
if (this.name === BladeOperationName.raid && inst.getCurrentCity().comms <= 0) {
return 0;
}
return ActionClass.prototype.getSuccessChance.call(this, inst, person, params);
@ -75,7 +75,7 @@ constructorsForReviver.Operation = Operation;
// shared member functions for Operation and BlackOperation
export const operationSkillSuccessBonus = (inst: Bladeburner) => {
return inst.getSkillMult(BladeburnerMultName.SuccessChanceOperation);
return inst.getSkillMult(BladeMultName.successChanceOperation);
};
export function operationTeamSuccessBonus(this: Operation | BlackOperation, inst: Bladeburner) {

@ -6,12 +6,12 @@ import type { Skills as PersonSkills } from "../PersonObjects/Skills";
import {
AugmentationName,
BladeburnerActionType,
BladeburnerContractName,
BladeburnerGeneralActionName,
BladeburnerMultName,
BladeburnerOperationName,
BladeburnerSkillName,
BladeActionType,
BladeContractName,
BladeGeneralActionName,
BladeMultName,
BladeOperationName,
BladeSkillName,
CityName,
FactionName,
} from "@enums";
@ -78,14 +78,14 @@ export class Bladeburner {
cities = createEnumKeyedRecord(CityName, (name) => new City(name));
city = CityName.Sector12;
// Todo: better types for all these Record<string, etc> types. Will need custom types or enums for the named string categories (e.g. skills).
skills: PartialRecord<BladeburnerSkillName, number> = {};
skillMultipliers: PartialRecord<BladeburnerMultName, number> = {};
skills: PartialRecord<BladeSkillName, number> = {};
skillMultipliers: PartialRecord<BladeMultName, number> = {};
staminaBonus = 0;
maxStamina = 1;
stamina = 1;
// Contracts and operations are stored on the Bladeburner object even though they are global so that they can utilize save/load of the main bladeburner object
contracts: Record<BladeburnerContractName, Contract>;
operations: Record<BladeburnerOperationName, Operation>;
contracts: Record<BladeContractName, Contract>;
operations: Record<BladeOperationName, Operation>;
numBlackOpsComplete = 0;
logging = {
general: true,
@ -142,13 +142,13 @@ export class Bladeburner {
}
/** Directly sets a skill level, with no validation */
setSkillLevel(skillName: BladeburnerSkillName, value: number) {
setSkillLevel(skillName: BladeSkillName, value: number) {
this.skills[skillName] = clampInteger(value, 0, Number.MAX_VALUE);
this.updateSkillMultipliers();
}
/** Attempts to perform a skill upgrade, gives a message on both success and failure */
upgradeSkill(skillName: BladeburnerSkillName, count = 1): Attempt<{ message: string }> {
upgradeSkill(skillName: BladeSkillName, count = 1): Attempt<{ message: string }> {
const currentSkillLevel = this.skills[skillName] ?? 0;
const actualCount = currentSkillLevel + count - currentSkillLevel;
if (actualCount === 0) {
@ -284,7 +284,7 @@ export class Bladeburner {
}
case 3: {
const skillName = args[2];
if (!getEnumHelper("BladeburnerSkillName").isMember(skillName)) {
if (!getEnumHelper("BladeSkillName").isMember(skillName)) {
this.postToConsole("Invalid skill name (Note that it is case-sensitive): " + skillName);
return;
}
@ -450,31 +450,31 @@ export class Bladeburner {
return;
case "general":
case "gen": {
if (!getEnumHelper("BladeburnerGeneralActionName").isMember(name)) {
if (!getEnumHelper("BladeGeneralActionName").isMember(name)) {
this.postToConsole("Invalid General Action name specified: " + name);
return;
}
actionId = { type: BladeburnerActionType.General, name };
actionId = { type: BladeActionType.general, name };
break;
}
case "contract":
case "contracts": {
if (!getEnumHelper("BladeburnerContractName").isMember(name)) {
if (!getEnumHelper("BladeContractName").isMember(name)) {
this.postToConsole("Invalid Contract name specified: " + name);
return;
}
actionId = { type: BladeburnerActionType.Contract, name };
actionId = { type: BladeActionType.contract, name };
break;
}
case "ops":
case "op":
case "operations":
case "operation":
if (!getEnumHelper("BladeburnerOperationName").isMember(name)) {
if (!getEnumHelper("BladeOperationName").isMember(name)) {
this.postToConsole("Invalid Operation name specified: " + name);
return;
}
actionId = { type: BladeburnerActionType.Operation, name };
actionId = { type: BladeActionType.operation, name };
break;
default:
this.postToConsole("Invalid use of automate command.");
@ -685,7 +685,7 @@ export class Bladeburner {
const unweightedGain = time * BladeburnerConstants.BaseStatGain * successMult * difficultyMult;
const unweightedIntGain = time * BladeburnerConstants.BaseIntGain * successMult * difficultyMult;
const skillMult = this.getSkillMult(BladeburnerMultName.ExpGain);
const skillMult = this.getSkillMult(BladeMultName.expGain);
return {
hackExp: unweightedGain * action.weights.hacking * skillMult,
@ -724,22 +724,22 @@ export class Bladeburner {
}
}
getSkillMult(name: BladeburnerMultName): number {
getSkillMult(name: BladeMultName): number {
return this.skillMultipliers[name] ?? 1;
}
getEffectiveSkillLevel(person: Person, name: keyof PersonSkills): number {
switch (name) {
case "strength":
return person.skills.strength * this.getSkillMult(BladeburnerMultName.EffStr);
return person.skills.strength * this.getSkillMult(BladeMultName.effStr);
case "defense":
return person.skills.defense * this.getSkillMult(BladeburnerMultName.EffDef);
return person.skills.defense * this.getSkillMult(BladeMultName.effDef);
case "dexterity":
return person.skills.dexterity * this.getSkillMult(BladeburnerMultName.EffDex);
return person.skills.dexterity * this.getSkillMult(BladeMultName.effDex);
case "agility":
return person.skills.agility * this.getSkillMult(BladeburnerMultName.EffAgi);
return person.skills.agility * this.getSkillMult(BladeMultName.effAgi);
case "charisma":
return person.skills.charisma * this.getSkillMult(BladeburnerMultName.EffCha);
return person.skills.charisma * this.getSkillMult(BladeMultName.effCha);
default:
return person.skills[name];
}
@ -758,7 +758,7 @@ export class Bladeburner {
}
completeOperation(success: boolean): void {
if (this.action?.type !== BladeburnerActionType.Operation) {
if (this.action?.type !== BladeActionType.operation) {
throw new Error("completeOperation() called even though current action is not an Operation");
}
const action = this.getActionObject(this.action);
@ -786,25 +786,21 @@ export class Bladeburner {
const city = this.getCurrentCity();
switch (action.name) {
case BladeburnerOperationName.Investigation:
case BladeOperationName.investigation:
if (success) {
city.improvePopulationEstimateByPercentage(
0.4 * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate),
);
city.improvePopulationEstimateByPercentage(0.4 * this.getSkillMult(BladeMultName.successChanceEstimate));
} else {
this.triggerPotentialMigration(this.city, 0.1);
}
break;
case BladeburnerOperationName.Undercover:
case BladeOperationName.undercover:
if (success) {
city.improvePopulationEstimateByPercentage(
0.8 * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate),
);
city.improvePopulationEstimateByPercentage(0.8 * this.getSkillMult(BladeMultName.successChanceEstimate));
} else {
this.triggerPotentialMigration(this.city, 0.15);
}
break;
case BladeburnerOperationName.Sting:
case BladeOperationName.sting:
if (success) {
city.changePopulationByPercentage(-0.1, {
changeEstEqually: true,
@ -813,7 +809,7 @@ export class Bladeburner {
}
city.changeChaosByCount(0.1);
break;
case BladeburnerOperationName.Raid:
case BladeOperationName.raid:
if (success) {
city.changePopulationByPercentage(-1, {
changeEstEqually: true,
@ -829,7 +825,7 @@ export class Bladeburner {
}
city.changeChaosByPercentage(getRandomIntInclusive(1, 5));
break;
case BladeburnerOperationName.StealthRetirement:
case BladeOperationName.stealthRetirement:
if (success) {
city.changePopulationByPercentage(-0.5, {
changeEstEqually: true,
@ -838,7 +834,7 @@ export class Bladeburner {
}
city.changeChaosByPercentage(getRandomIntInclusive(-3, -1));
break;
case BladeburnerOperationName.Assassination:
case BladeOperationName.assassination:
if (success) {
city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });
}
@ -853,17 +849,17 @@ export class Bladeburner {
const city = this.getCurrentCity();
if (success) {
switch (action.name) {
case BladeburnerContractName.Tracking:
case BladeContractName.tracking:
// Increase estimate accuracy by a relatively small amount
city.improvePopulationEstimateByCount(
getRandomIntInclusive(100, 1e3) * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate),
getRandomIntInclusive(100, 1e3) * this.getSkillMult(BladeMultName.successChanceEstimate),
);
break;
case BladeburnerContractName.BountyHunter:
case BladeContractName.bountyHunter:
city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });
city.changeChaosByCount(0.02);
break;
case BladeburnerContractName.Retirement:
case BladeContractName.retirement:
city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });
city.changeChaosByCount(0.04);
break;
@ -891,10 +887,10 @@ export class Bladeburner {
let retValue = newWorkStats();
const action = this.getActionObject(actionIdent);
switch (action.type) {
case BladeburnerActionType.Contract:
case BladeburnerActionType.Operation: {
case BladeActionType.contract:
case BladeActionType.operation: {
try {
const isOperation = action.type === BladeburnerActionType.Operation;
const isOperation = action.type === BladeActionType.operation;
const difficulty = action.getDifficulty();
const difficultyMultiplier =
Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +
@ -919,9 +915,7 @@ export class Bladeburner {
let moneyGain = 0;
if (!isOperation) {
moneyGain =
BladeburnerConstants.ContractBaseMoneyGain *
rewardMultiplier *
this.getSkillMult(BladeburnerMultName.Money);
BladeburnerConstants.ContractBaseMoneyGain * rewardMultiplier * this.getSkillMult(BladeMultName.money);
retValue.money = moneyGain;
}
@ -986,7 +980,7 @@ export class Bladeburner {
}
break;
}
case BladeburnerActionType.BlackOp: {
case BladeActionType.blackOp: {
const difficulty = action.getDifficulty();
const difficultyMultiplier =
Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +
@ -1070,15 +1064,15 @@ export class Bladeburner {
}
break;
}
case BladeburnerActionType.General:
case BladeActionType.general:
switch (action.name) {
case BladeburnerGeneralActionName.Training: {
case BladeGeneralActionName.training: {
this.stamina -= 0.5 * BladeburnerConstants.BaseStaminaLoss;
const strExpGain = 30 * person.mults.strength_exp,
defExpGain = 30 * person.mults.defense_exp,
dexExpGain = 30 * person.mults.dexterity_exp,
agiExpGain = 30 * person.mults.agility_exp,
staminaGain = 0.04 * this.getSkillMult(BladeburnerMultName.Stamina);
staminaGain = 0.04 * this.getSkillMult(BladeMultName.stamina);
retValue.strExp = strExpGain;
retValue.defExp = defExpGain;
retValue.dexExp = dexExpGain;
@ -1102,7 +1096,7 @@ export class Bladeburner {
}
break;
}
case BladeburnerGeneralActionName.FieldAnalysis: {
case BladeGeneralActionName.fieldAnalysis: {
// Does not use stamina. Effectiveness depends on hacking, int, and cha
let eff =
0.04 * Math.pow(person.skills.hacking, 0.3) +
@ -1120,7 +1114,7 @@ export class Bladeburner {
retValue.intExp = BladeburnerConstants.BaseIntGain;
this.changeRank(person, rankGain);
this.getCurrentCity().improvePopulationEstimateByPercentage(
eff * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate),
eff * this.getSkillMult(BladeMultName.successChanceEstimate),
);
if (this.logging.general) {
this.log(
@ -1132,7 +1126,7 @@ export class Bladeburner {
}
break;
}
case BladeburnerGeneralActionName.Recruitment: {
case BladeGeneralActionName.recruitment: {
const actionTime = action.getActionTime(this, person) * 1000;
if (action.attempt(this, person)) {
const expGain = 2 * BladeburnerConstants.BaseStatGain * actionTime;
@ -1160,7 +1154,7 @@ export class Bladeburner {
}
break;
}
case BladeburnerGeneralActionName.Diplomacy: {
case BladeGeneralActionName.diplomacy: {
const eff = this.getDiplomacyEffectiveness(person);
this.getCurrentCity().chaos *= eff;
if (this.getCurrentCity().chaos < 0) {
@ -1175,7 +1169,7 @@ export class Bladeburner {
}
break;
}
case BladeburnerGeneralActionName.HyperbolicRegen: {
case BladeGeneralActionName.hyperbolicRegen: {
person.regenerateHp(BladeburnerConstants.HrcHpGain);
const currentStamina = this.stamina;
@ -1197,7 +1191,7 @@ export class Bladeburner {
}
break;
}
case BladeburnerGeneralActionName.InciteViolence: {
case BladeGeneralActionName.inciteViolence: {
for (const contract of Object.values(this.contracts)) {
contract.count += (60 * 3 * contract.growthFunction()) / BladeburnerConstants.ActionCountGrowthPeriod;
}
@ -1231,10 +1225,10 @@ export class Bladeburner {
infiltrateSynthoidCommunities(): void {
const infilSleeves = Player.sleeves.filter((s) => isSleeveInfiltrateWork(s.currentWork)).length;
const amt = Math.pow(infilSleeves, -0.5) / 2;
for (const contract of Object.values(BladeburnerContractName)) {
for (const contract of Object.values(BladeContractName)) {
this.contracts[contract].count += amt;
}
for (const operation of Object.values(BladeburnerOperationName)) {
for (const operation of Object.values(BladeOperationName)) {
this.operations[operation].count += amt;
}
if (this.logging.general) {
@ -1289,7 +1283,7 @@ export class Bladeburner {
const retValue = this.completeAction(Player, action.id);
Player.gainMoney(retValue.money, "bladeburner");
Player.gainStats(retValue);
if (action.type != BladeburnerActionType.BlackOp) {
if (action.type != BladeActionType.blackOp) {
this.startAction(action.id); // Attempt to repeat action
}
}
@ -1299,10 +1293,7 @@ export class Bladeburner {
const effAgility = this.getEffectiveSkillLevel(Player, "agility");
const maxStaminaBonus = this.maxStamina / BladeburnerConstants.MaxStaminaToGainFactor;
const gain = (BladeburnerConstants.StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);
return clampNumber(
gain * (this.getSkillMult(BladeburnerMultName.Stamina) * Player.mults.bladeburner_stamina_gain),
0,
);
return clampNumber(gain * (this.getSkillMult(BladeMultName.stamina) * Player.mults.bladeburner_stamina_gain), 0);
}
calculateMaxStamina(): void {
@ -1310,7 +1301,7 @@ export class Bladeburner {
// Min value of maxStamina is an arbitrarily small positive value. It must not be 0 to avoid NaN stamina penalty.
const maxStamina = clampNumber(
(baseStamina + this.staminaBonus) *
this.getSkillMult(BladeburnerMultName.Stamina) *
this.getSkillMult(BladeMultName.stamina) *
Player.mults.bladeburner_max_stamina,
1e-9,
);
@ -1323,7 +1314,7 @@ export class Bladeburner {
this.stamina = clampNumber((this.maxStamina * this.stamina) / oldMax, 0, maxStamina);
}
getSkillLevel(skillName: BladeburnerSkillName): number {
getSkillLevel(skillName: BladeSkillName): number {
return this.skills[skillName] ?? 0;
}
@ -1409,20 +1400,20 @@ export class Bladeburner {
}
/** Return the action based on an ActionIdentifier, discriminating types when possible */
getActionObject(actionId: ActionIdentifier & { type: BladeburnerActionType.BlackOp }): BlackOperation;
getActionObject(actionId: ActionIdentifier & { type: BladeburnerActionType.Operation }): Operation;
getActionObject(actionId: ActionIdentifier & { type: BladeburnerActionType.Contract }): Contract;
getActionObject(actionId: ActionIdentifier & { type: BladeburnerActionType.General }): GeneralAction;
getActionObject(actionId: ActionIdentifier & { type: BladeActionType.blackOp }): BlackOperation;
getActionObject(actionId: ActionIdentifier & { type: BladeActionType.operation }): Operation;
getActionObject(actionId: ActionIdentifier & { type: BladeActionType.contract }): Contract;
getActionObject(actionId: ActionIdentifier & { type: BladeActionType.general }): GeneralAction;
getActionObject(actionId: ActionIdentifier): Action;
getActionObject(actionId: ActionIdentifier): Action {
switch (actionId.type) {
case BladeburnerActionType.Contract:
case BladeActionType.contract:
return this.contracts[actionId.name];
case BladeburnerActionType.Operation:
case BladeActionType.operation:
return this.operations[actionId.name];
case BladeburnerActionType.BlackOp:
case BladeActionType.blackOp:
return BlackOperations[actionId.name];
case BladeburnerActionType.General:
case BladeActionType.general:
return GeneralActions[actionId.name];
}
}
@ -1435,13 +1426,13 @@ export class Bladeburner {
case "contract":
case "contracts":
case "contr":
if (!getEnumHelper("BladeburnerContractName").isMember(name)) return null;
if (!getEnumHelper("BladeContractName").isMember(name)) return null;
return this.contracts[name];
case "operation":
case "operations":
case "op":
case "ops":
if (!getEnumHelper("BladeburnerOperationName").isMember(name)) return null;
if (!getEnumHelper("BladeOperationName").isMember(name)) return null;
return this.operations[name];
case "blackoperation":
case "black operation":
@ -1450,12 +1441,12 @@ export class Bladeburner {
case "black ops":
case "blackop":
case "blackops":
if (!getEnumHelper("BladeburnerBlackOpName").isMember(name)) return null;
if (!getEnumHelper("BladeBlackOpName").isMember(name)) return null;
return BlackOperations[name];
case "general":
case "general action":
case "gen": {
if (!getEnumHelper("BladeburnerGeneralActionName").isMember(name)) return null;
if (!getEnumHelper("BladeGeneralActionName").isMember(name)) return null;
return GeneralActions[name];
}
}

@ -1,35 +1,31 @@
export enum BladeburnerActionType {
General = "General",
Contract = "Contracts",
Operation = "Operations",
BlackOp = "Black Operations",
export enum BladeActionType {
general = "General",
contract = "Contracts",
operation = "Operations",
blackOp = "Black Operations",
}
export enum BladeburnerGeneralActionName {
Training = "Training",
FieldAnalysis = "Field Analysis",
Recruitment = "Recruitment",
Diplomacy = "Diplomacy",
HyperbolicRegen = "Hyperbolic Regeneration Chamber",
InciteViolence = "Incite Violence",
export enum BladeGeneralActionName {
training = "Training",
fieldAnalysis = "Field Analysis",
recruitment = "Recruitment",
diplomacy = "Diplomacy",
hyperbolicRegen = "Hyperbolic Regeneration Chamber",
inciteViolence = "Incite Violence",
}
export enum BladeburnerContractName {
Tracking = "Tracking",
BountyHunter = "Bounty Hunter",
Retirement = "Retirement",
export enum BladeContractName {
tracking = "Tracking",
bountyHunter = "Bounty Hunter",
retirement = "Retirement",
}
export enum BladeburnerOperationName {
Investigation = "Investigation",
Undercover = "Undercover Operation",
Sting = "Sting Operation",
Raid = "Raid",
StealthRetirement = "Stealth Retirement Operation",
Assassination = "Assassination",
export enum BladeOperationName {
investigation = "Investigation",
undercover = "Undercover Operation",
sting = "Sting Operation",
raid = "Raid",
stealthRetirement = "Stealth Retirement Operation",
assassination = "Assassination",
}
export enum BladeburnerBlackOpName {
export enum BladeBlackOpName {
OperationTyphoon = "Operation Typhoon",
OperationZero = "Operation Zero",
OperationX = "Operation X",
@ -53,35 +49,35 @@ export enum BladeburnerBlackOpName {
OperationDaedalus = "Operation Daedalus",
}
export enum BladeburnerSkillName {
BladesIntuition = "Blade's Intuition",
Cloak = "Cloak",
ShortCircuit = "Short-Circuit",
DigitalObserver = "Digital Observer",
Tracer = "Tracer",
Overclock = "Overclock",
Reaper = "Reaper",
EvasiveSystem = "Evasive System",
Datamancer = "Datamancer",
CybersEdge = "Cyber's Edge",
HandsOfMidas = "Hands of Midas",
Hyperdrive = "Hyperdrive",
export enum BladeSkillName {
bladesIntuition = "Blade's Intuition",
cloak = "Cloak",
shortCircuit = "Short-Circuit",
digitalObserver = "Digital Observer",
tracer = "Tracer",
overclock = "Overclock",
reaper = "Reaper",
evasiveSystem = "Evasive System",
datamancer = "Datamancer",
cybersEdge = "Cyber's Edge",
handsOfMidas = "Hands of Midas",
hyperdrive = "Hyperdrive",
}
export enum BladeburnerMultName {
SuccessChanceAll = "Total Success Chance",
SuccessChanceStealth = "Stealth Success Chance",
SuccessChanceKill = "Retirement Success Chance",
SuccessChanceContract = "Contract Success Chance",
SuccessChanceOperation = "Operation Success Chance",
SuccessChanceEstimate = "Synthoid Data Estimate",
ActionTime = "Action Time",
EffStr = "Effective Strength",
EffDef = "Effective Defense",
EffDex = "Effective Dexterity",
EffAgi = "Effective Agility",
EffCha = "Effective Charisma",
Stamina = "Stamina",
Money = "Contract Money",
ExpGain = "Experience Gain",
export enum BladeMultName {
successChanceAll = "Total Success Chance",
successChanceStealth = "Stealth Success Chance",
successChanceKill = "Retirement Success Chance",
successChanceContract = "Contract Success Chance",
successChanceOperation = "Operation Success Chance",
successChanceEstimate = "Synthoid Data Estimate",
actionTime = "Action Time",
effStr = "Effective Strength",
effDef = "Effective Defense",
effDex = "Effective Dexterity",
effAgi = "Effective Agility",
effCha = "Effective Charisma",
stamina = "Stamina",
money = "Contract Money",
expGain = "Experience Gain",
}

@ -1,4 +1,4 @@
import type { BladeburnerMultName, BladeburnerSkillName } from "@enums";
import type { BladeMultName, BladeSkillName } from "@enums";
import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { Bladeburner } from "./Bladeburner";
@ -7,23 +7,23 @@ import { PositiveInteger, PositiveNumber, isPositiveInteger } from "../types";
import { PartialRecord, getRecordEntries } from "../Types/Record";
interface SkillParams {
name: BladeburnerSkillName;
name: BladeSkillName;
desc: string;
baseCost?: number;
costInc?: number;
maxLvl?: number;
mults: PartialRecord<BladeburnerMultName, number>;
mults: PartialRecord<BladeMultName, number>;
}
export class Skill {
name: BladeburnerSkillName;
name: BladeSkillName;
desc: string;
// Cost is in Skill Points
baseCost: number;
// Additive cost increase per level
costInc: number;
maxLvl: number;
mults: PartialRecord<BladeburnerMultName, number> = {};
mults: PartialRecord<BladeMultName, number> = {};
constructor(params: SkillParams) {
this.name = params.name;
@ -150,7 +150,7 @@ export class Skill {
return { available: true, cost };
}
getMultiplier(name: BladeburnerMultName): number {
getMultiplier(name: BladeMultName): number {
return this.mults[name] ?? 0;
}
}

@ -1,10 +1,10 @@
import type { BlackOperation, Contract, GeneralAction, Operation } from "./Actions";
import type {
BladeburnerActionType,
BladeburnerBlackOpName,
BladeburnerContractName,
BladeburnerOperationName,
BladeburnerGeneralActionName,
BladeActionType,
BladeBlackOpName,
BladeContractName,
BladeOperationName,
BladeGeneralActionName,
} from "@enums";
export interface SuccessChanceParams {
@ -23,9 +23,9 @@ export type Attempt<T extends object = object> = AttemptSuccess<T> | AttemptFail
export type Action = Contract | Operation | BlackOperation | GeneralAction;
export type ActionIdentifier =
| { type: BladeburnerActionType.BlackOp; name: BladeburnerBlackOpName }
| { type: BladeburnerActionType.Contract; name: BladeburnerContractName }
| { type: BladeburnerActionType.Operation; name: BladeburnerOperationName }
| { type: BladeburnerActionType.General; name: BladeburnerGeneralActionName };
| { type: BladeActionType.blackOp; name: BladeBlackOpName }
| { type: BladeActionType.contract; name: BladeContractName }
| { type: BladeActionType.operation; name: BladeOperationName }
| { type: BladeActionType.general; name: BladeGeneralActionName };
export type LevelableAction = Contract | Operation;

@ -1,9 +1,9 @@
import { BlackOperation } from "../Actions/BlackOperation";
import { BladeburnerBlackOpName, CityName, FactionName } from "@enums";
import { BladeBlackOpName, CityName, FactionName } from "@enums";
export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
[BladeburnerBlackOpName.OperationTyphoon]: new BlackOperation({
name: BladeburnerBlackOpName.OperationTyphoon,
export const BlackOperations: Record<BladeBlackOpName, BlackOperation> = {
[BladeBlackOpName.OperationTyphoon]: new BlackOperation({
name: BladeBlackOpName.OperationTyphoon,
n: 0,
baseDifficulty: 2000,
reqdRank: 2.5e3,
@ -32,11 +32,11 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
desc:
"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community " +
"that Zenyatta, along with the rest of the PMC, is a Synthoid.\n\n" +
`The goal of ${BladeburnerBlackOpName.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means ` +
`The goal of ${BladeBlackOpName.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means ` +
"necessary. After the task is completed, the actions must be covered up from the general public.",
}),
[BladeburnerBlackOpName.OperationZero]: new BlackOperation({
name: BladeburnerBlackOpName.OperationZero,
[BladeBlackOpName.OperationZero]: new BlackOperation({
name: BladeBlackOpName.OperationZero,
n: 1,
baseDifficulty: 2500,
reqdRank: 5e3,
@ -65,13 +65,13 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
desc:
"AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be " +
"a supporter of Synthoid rights. He must be removed.\n\n" +
`The goal of ${BladeburnerBlackOpName.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating ` +
`The goal of ${BladeBlackOpName.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating ` +
"evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. " +
"Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced " +
"security measures in the world.",
}),
[BladeburnerBlackOpName.OperationX]: new BlackOperation({
name: BladeburnerBlackOpName.OperationX,
[BladeBlackOpName.OperationX]: new BlackOperation({
name: BladeBlackOpName.OperationX,
n: 2,
baseDifficulty: 3000,
reqdRank: 7.5e3,
@ -106,8 +106,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
`their base of operations is in ${CityName.Ishima}'s underground sewer systems. Your task is to investigate the ` +
"sewer systems, and eliminate Samizdat. They must never publish anything again.",
}),
[BladeburnerBlackOpName.OperationTitan]: new BlackOperation({
name: BladeburnerBlackOpName.OperationTitan,
[BladeBlackOpName.OperationTitan]: new BlackOperation({
name: BladeBlackOpName.OperationTitan,
n: 3,
baseDifficulty: 4000,
reqdRank: 10e3,
@ -142,8 +142,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"just to retire the Synthoids there, but also to destroy any information or research at the facility that is " +
"relevant to the Synthoids and their goals.",
}),
[BladeburnerBlackOpName.OperationAres]: new BlackOperation({
name: BladeburnerBlackOpName.OperationAres,
[BladeBlackOpName.OperationAres]: new BlackOperation({
name: BladeBlackOpName.OperationAres,
n: 4,
baseDifficulty: 5000,
reqdRank: 12.5e3,
@ -175,8 +175,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"weapons. It is critical for the safety of humanity that this deal does not happen.\n\n" +
"Your task is to intercept the deal. Leave no survivors.",
}),
[BladeburnerBlackOpName.OperationArchangel]: new BlackOperation({
name: BladeburnerBlackOpName.OperationArchangel,
[BladeBlackOpName.OperationArchangel]: new BlackOperation({
name: BladeBlackOpName.OperationArchangel,
n: 5,
baseDifficulty: 7500,
reqdRank: 15e3,
@ -209,8 +209,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the " +
"number of other casualties, but do what you must to complete the mission.",
}),
[BladeburnerBlackOpName.OperationJuggernaut]: new BlackOperation({
name: BladeburnerBlackOpName.OperationJuggernaut,
[BladeBlackOpName.OperationJuggernaut]: new BlackOperation({
name: BladeBlackOpName.OperationJuggernaut,
n: 6,
baseDifficulty: 10e3,
reqdRank: 20e3,
@ -244,8 +244,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"Synthoid, and have thus enlisted our help.\n\n" +
"Your mission is to eradicate Juggernaut and his followers.",
}),
[BladeburnerBlackOpName.OperationRedDragon]: new BlackOperation({
name: BladeburnerBlackOpName.OperationRedDragon,
[BladeBlackOpName.OperationRedDragon]: new BlackOperation({
name: BladeBlackOpName.OperationRedDragon,
n: 7,
baseDifficulty: 12.5e3,
reqdRank: 25e3,
@ -278,8 +278,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
`Your task is to infiltrate and destroy the ${FactionName.Tetrads}' base of operations in Los Angeles. ` +
"Intelligence tells us that their base houses one of their Synthoid manufacturing units.",
}),
[BladeburnerBlackOpName.OperationK]: new BlackOperation({
name: BladeburnerBlackOpName.OperationK,
[BladeBlackOpName.OperationK]: new BlackOperation({
name: BladeBlackOpName.OperationK,
n: 8,
baseDifficulty: 15e3,
reqdRank: 30e3,
@ -315,8 +315,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its " +
"creation.",
}),
[BladeburnerBlackOpName.OperationDeckard]: new BlackOperation({
name: BladeburnerBlackOpName.OperationDeckard,
[BladeBlackOpName.OperationDeckard]: new BlackOperation({
name: BladeBlackOpName.OperationDeckard,
n: 9,
baseDifficulty: 20e3,
reqdRank: 40e3,
@ -344,14 +344,14 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
isKill: true,
desc:
"Despite your success in eliminating VitaLife's new android-replicating technology in " +
`${BladeburnerBlackOpName.OperationK}, we've discovered that a small group of MK-VI Synthoids were able to make off with ` +
`${BladeBlackOpName.OperationK}, we've discovered that a small group of MK-VI Synthoids were able to make off with ` +
"the schematics and design of the technology before the Operation. It is almost a certainty that these Synthoids " +
"are some of the rogue MK-VI ones from the Synthoid Uprising.\n\n" +
`The goal of ${BladeburnerBlackOpName.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need to ` +
`The goal of ${BladeBlackOpName.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need to ` +
"tell you how critical this mission is.",
}),
[BladeburnerBlackOpName.OperationTyrell]: new BlackOperation({
name: BladeburnerBlackOpName.OperationTyrell,
[BladeBlackOpName.OperationTyrell]: new BlackOperation({
name: BladeBlackOpName.OperationTyrell,
n: 10,
baseDifficulty: 25e3,
reqdRank: 50e3,
@ -384,8 +384,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt " +
`down associated ${FactionName.TheDarkArmy} members and eliminate them.`,
}),
[BladeburnerBlackOpName.OperationWallace]: new BlackOperation({
name: BladeburnerBlackOpName.OperationWallace,
[BladeBlackOpName.OperationWallace]: new BlackOperation({
name: BladeBlackOpName.OperationWallace,
n: 11,
baseDifficulty: 30e3,
reqdRank: 75e3,
@ -412,18 +412,18 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
},
isKill: true,
desc:
`Based on information gathered from ${BladeburnerBlackOpName.OperationTyrell}, we've discovered that ` +
`Based on information gathered from ${BladeBlackOpName.OperationTyrell}, we've discovered that ` +
`${FactionName.TheDarkArmy} was well aware that there were Synthoids amongst their ranks. Even worse, we believe ` +
`that ${FactionName.TheDarkArmy} is working together with other criminal organizations such as ` +
`${FactionName.TheSyndicate} and that they are planning some sort of large-scale takeover of multiple major ` +
`cities, most notably ${CityName.Aevum}. We suspect that Synthoids have infiltrated the ranks of these criminal ` +
"factions and are trying to stage another Synthoid uprising.\n\n" +
"The best way to deal with this is to prevent it before it even happens. The goal of " +
`${BladeburnerBlackOpName.OperationWallace} is to destroy ${FactionName.TheDarkArmy} and Syndicate factions in ` +
`${BladeBlackOpName.OperationWallace} is to destroy ${FactionName.TheDarkArmy} and Syndicate factions in ` +
`${CityName.Aevum} immediately. Leave no survivors.`,
}),
[BladeburnerBlackOpName.OperationShoulderOfOrion]: new BlackOperation({
name: BladeburnerBlackOpName.OperationShoulderOfOrion,
[BladeBlackOpName.OperationShoulderOfOrion]: new BlackOperation({
name: BladeBlackOpName.OperationShoulderOfOrion,
n: 12,
baseDifficulty: 35e3,
reqdRank: 100e3,
@ -456,8 +456,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"mission you will be officially disavowed by the NSA and the national government until after you successfully " +
"return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",
}),
[BladeburnerBlackOpName.OperationHyron]: new BlackOperation({
name: BladeburnerBlackOpName.OperationHyron,
[BladeBlackOpName.OperationHyron]: new BlackOperation({
name: BladeBlackOpName.OperationHyron,
n: 13,
baseDifficulty: 40e3,
reqdRank: 125e3,
@ -493,8 +493,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
`facilities in ${CityName.Aevum}, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, ` +
"and then find and kill the project lead.",
}),
[BladeburnerBlackOpName.OperationMorpheus]: new BlackOperation({
name: BladeburnerBlackOpName.OperationMorpheus,
[BladeBlackOpName.OperationMorpheus]: new BlackOperation({
name: BladeBlackOpName.OperationMorpheus,
n: 14,
baseDifficulty: 45e3,
reqdRank: 150e3,
@ -527,8 +527,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.\n\n" +
"The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.",
}),
[BladeburnerBlackOpName.OperationIonStorm]: new BlackOperation({
name: BladeburnerBlackOpName.OperationIonStorm,
[BladeBlackOpName.OperationIonStorm]: new BlackOperation({
name: BladeBlackOpName.OperationIonStorm,
n: 15,
baseDifficulty: 50e3,
reqdRank: 175e3,
@ -561,8 +561,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
`This is a full-scale assault operation to find and retire all of these Synthoids in the ${CityName.Sector12} ` +
"Slums.",
}),
[BladeburnerBlackOpName.OperationAnnihilus]: new BlackOperation({
name: BladeburnerBlackOpName.OperationAnnihilus,
[BladeBlackOpName.OperationAnnihilus]: new BlackOperation({
name: BladeBlackOpName.OperationAnnihilus,
n: 16,
baseDifficulty: 55e3,
reqdRank: 200e3,
@ -594,8 +594,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
`organization called '${FactionName.TheCovenant}'. We have no prior intelligence about this organization, so you ` +
"are going in blind.",
}),
[BladeburnerBlackOpName.OperationUltron]: new BlackOperation({
name: BladeburnerBlackOpName.OperationUltron,
[BladeBlackOpName.OperationUltron]: new BlackOperation({
name: BladeBlackOpName.OperationUltron,
n: 17,
baseDifficulty: 60e3,
reqdRank: 250e3,
@ -633,8 +633,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).\n\n" +
"Your task is to find and destroy Ultron.",
}),
[BladeburnerBlackOpName.OperationCenturion]: new BlackOperation({
name: BladeburnerBlackOpName.OperationCenturion,
[BladeBlackOpName.OperationCenturion]: new BlackOperation({
name: BladeBlackOpName.OperationCenturion,
n: 18,
baseDifficulty: 70e3,
reqdRank: 300e3,
@ -667,8 +667,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"It seems that the universe is not without a sense of irony.\n\n" +
"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",
}),
[BladeburnerBlackOpName.OperationVindictus]: new BlackOperation({
name: BladeburnerBlackOpName.OperationVindictus,
[BladeBlackOpName.OperationVindictus]: new BlackOperation({
name: BladeBlackOpName.OperationVindictus,
n: 19,
baseDifficulty: 75e3,
reqdRank: 350e3,
@ -699,8 +699,8 @@ export const BlackOperations: Record<BladeburnerBlackOpName, BlackOperation> = {
"ways.\n\n" +
"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",
}),
[BladeburnerBlackOpName.OperationDaedalus]: new BlackOperation({
name: BladeburnerBlackOpName.OperationDaedalus,
[BladeBlackOpName.OperationDaedalus]: new BlackOperation({
name: BladeBlackOpName.OperationDaedalus,
n: 20,
baseDifficulty: 80e3,
reqdRank: 400e3,

@ -1,12 +1,12 @@
import { BladeburnerContractName } from "@enums";
import { BladeContractName } from "@enums";
import { Contract } from "../Actions/Contract";
import { getRandomIntInclusive } from "../../utils/helpers/getRandomIntInclusive";
import { assertLoadingType } from "../../utils/TypeAssertion";
export function createContracts(): Record<BladeburnerContractName, Contract> {
export function createContracts(): Record<BladeContractName, Contract> {
return {
[BladeburnerContractName.Tracking]: new Contract({
name: BladeburnerContractName.Tracking,
[BladeContractName.tracking]: new Contract({
name: BladeContractName.tracking,
desc:
"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT " +
"engage. Stealth is of the utmost importance.\n\n" +
@ -39,8 +39,8 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
growthFunction: () => getRandomIntInclusive(5, 75) / 10,
minCount: 25,
}),
[BladeburnerContractName.BountyHunter]: new Contract({
name: BladeburnerContractName.BountyHunter,
[BladeContractName.bountyHunter]: new Contract({
name: BladeContractName.bountyHunter,
desc:
"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n\n" +
"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also " +
@ -72,8 +72,8 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
growthFunction: () => getRandomIntInclusive(5, 75) / 10,
minCount: 5,
}),
[BladeburnerContractName.Retirement]: new Contract({
name: BladeburnerContractName.Retirement,
[BladeContractName.retirement]: new Contract({
name: BladeContractName.retirement,
desc:
"Hunt down and retire (kill) rogue Synthoids.\n\n" +
"Successfully completing a Retirement contract will lower the population in your current city, and will also " +
@ -108,12 +108,12 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
};
}
export function loadContractsData(data: unknown, contracts: Record<BladeburnerContractName, Contract>) {
export function loadContractsData(data: unknown, contracts: Record<BladeContractName, Contract>) {
// loading data as "unknown" and typechecking it down is probably not necessary
// but this will prevent crashes even with malformed savedata
if (!data || typeof data !== "object") return;
assertLoadingType<Record<BladeburnerContractName, unknown>>(data);
for (const contractName of Object.values(BladeburnerContractName)) {
assertLoadingType<Record<BladeContractName, unknown>>(data);
for (const contractName of Object.values(BladeContractName)) {
const loadedContract = data[contractName];
if (!(loadedContract instanceof Contract)) continue;
contracts[contractName].loadData(loadedContract);

@ -1,17 +1,17 @@
import { BladeburnerGeneralActionName } from "@enums";
import { BladeGeneralActionName } from "@enums";
import { GeneralAction } from "../Actions/GeneralAction";
import { BladeburnerConstants } from "./Constants";
export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction> = {
[BladeburnerGeneralActionName.Training]: new GeneralAction({
name: BladeburnerGeneralActionName.Training,
export const GeneralActions: Record<BladeGeneralActionName, GeneralAction> = {
[BladeGeneralActionName.training]: new GeneralAction({
name: BladeGeneralActionName.training,
getActionTime: () => 30,
desc:
"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for " +
"all combat stats and also increases your max stamina.",
}),
[BladeburnerGeneralActionName.FieldAnalysis]: new GeneralAction({
name: BladeburnerGeneralActionName.FieldAnalysis,
[BladeGeneralActionName.fieldAnalysis]: new GeneralAction({
name: BladeGeneralActionName.fieldAnalysis,
getActionTime: () => 30,
desc:
"Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations " +
@ -19,8 +19,8 @@ export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction>
"current city.\n\n" +
"Does NOT require stamina.",
}),
[BladeburnerGeneralActionName.Recruitment]: new GeneralAction({
name: BladeburnerGeneralActionName.Recruitment,
[BladeGeneralActionName.recruitment]: new GeneralAction({
name: BladeGeneralActionName.recruitment,
getActionTime: function (bladeburner, person) {
const effCharisma = bladeburner.getEffectiveSkillLevel(person, "charisma");
const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;
@ -33,23 +33,23 @@ export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction>
"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n\n" +
"Does NOT require stamina.",
}),
[BladeburnerGeneralActionName.Diplomacy]: new GeneralAction({
name: BladeburnerGeneralActionName.Diplomacy,
[BladeGeneralActionName.diplomacy]: new GeneralAction({
name: BladeGeneralActionName.diplomacy,
getActionTime: () => 60,
desc:
"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in " +
"your current city.\n\n" +
"Does NOT require stamina.",
}),
[BladeburnerGeneralActionName.HyperbolicRegen]: new GeneralAction({
name: BladeburnerGeneralActionName.HyperbolicRegen,
[BladeGeneralActionName.hyperbolicRegen]: new GeneralAction({
name: BladeGeneralActionName.hyperbolicRegen,
getActionTime: () => 60,
desc:
"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your " +
"wounds and slightly increase your stamina.",
}),
[BladeburnerGeneralActionName.InciteViolence]: new GeneralAction({
name: BladeburnerGeneralActionName.InciteViolence,
[BladeGeneralActionName.inciteViolence]: new GeneralAction({
name: BladeGeneralActionName.inciteViolence,
getActionTime: () => 60,
desc:
"Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate " +

@ -1,13 +1,13 @@
import { BladeburnerOperationName } from "@enums";
import { BladeOperationName } from "@enums";
import { Operation } from "../Actions/Operation";
import { getRandomIntInclusive } from "../../utils/helpers/getRandomIntInclusive";
import { LevelableActionClass } from "../Actions/LevelableAction";
import { assertLoadingType } from "../../utils/TypeAssertion";
export function createOperations(): Record<BladeburnerOperationName, Operation> {
export function createOperations(): Record<BladeOperationName, Operation> {
return {
[BladeburnerOperationName.Investigation]: new Operation({
name: BladeburnerOperationName.Investigation,
[BladeOperationName.investigation]: new Operation({
name: BladeOperationName.investigation,
desc:
"As a field agent, investigate and identify Synthoid populations, movements, and operations.\n\n" +
"Successful Investigation ops will increase the accuracy of your synthoid data.\n\n" +
@ -39,8 +39,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
growthFunction: () => getRandomIntInclusive(10, 40) / 10,
maxCount: 100,
}),
[BladeburnerOperationName.Undercover]: new Operation({
name: BladeburnerOperationName.Undercover,
[BladeOperationName.undercover]: new Operation({
name: BladeOperationName.undercover,
desc:
"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n\n" +
"Successful Undercover ops will increase the accuracy of your synthoid data.",
@ -72,8 +72,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
growthFunction: () => getRandomIntInclusive(10, 40) / 10,
maxCount: 100,
}),
[BladeburnerOperationName.Sting]: new Operation({
name: BladeburnerOperationName.Sting,
[BladeOperationName.sting]: new Operation({
name: BladeOperationName.sting,
desc: "Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.",
baseDifficulty: 650,
difficultyFac: 1.04,
@ -102,8 +102,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
isStealth: true,
growthFunction: () => getRandomIntInclusive(3, 40) / 10,
}),
[BladeburnerOperationName.Raid]: new Operation({
name: BladeburnerOperationName.Raid,
[BladeOperationName.raid]: new Operation({
name: BladeOperationName.raid,
desc:
"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your " +
"current city in order for this Operation to be successful.",
@ -138,8 +138,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
return LevelableActionClass.prototype.getAvailability.call(this, bladeburner);
},
}),
[BladeburnerOperationName.StealthRetirement]: new Operation({
name: BladeburnerOperationName.StealthRetirement,
[BladeOperationName.stealthRetirement]: new Operation({
name: BladeOperationName.stealthRetirement,
desc:
"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any " +
"attention. Stealth and discretion are key.",
@ -171,8 +171,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
isKill: true,
growthFunction: () => getRandomIntInclusive(1, 20) / 10,
}),
[BladeburnerOperationName.Assassination]: new Operation({
name: BladeburnerOperationName.Assassination,
[BladeOperationName.assassination]: new Operation({
name: BladeOperationName.assassination,
desc:
"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the " +
"Synthoid communities.",
@ -207,12 +207,12 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
};
}
export function loadOperationsData(data: unknown, operations: Record<BladeburnerOperationName, Operation>) {
export function loadOperationsData(data: unknown, operations: Record<BladeOperationName, Operation>) {
// loading data as "unknown" and typechecking it down is probably not necessary
// but this will prevent crashes even with malformed savedata
if (!data || typeof data !== "object") return;
assertLoadingType<Record<BladeburnerOperationName, unknown>>(data);
for (const operationName of Object.values(BladeburnerOperationName)) {
assertLoadingType<Record<BladeOperationName, unknown>>(data);
for (const operationName of Object.values(BladeOperationName)) {
const loadedOperation = data[operationName];
if (!(loadedOperation instanceof Operation)) continue;
operations[operationName].loadData(loadedOperation);

@ -1,77 +1,77 @@
import { BladeburnerMultName, BladeburnerSkillName } from "@enums";
import { BladeMultName, BladeSkillName } from "@enums";
import { Skill } from "../Skill";
export const Skills: Record<BladeburnerSkillName, Skill> = {
[BladeburnerSkillName.BladesIntuition]: new Skill({
name: BladeburnerSkillName.BladesIntuition,
export const Skills: Record<BladeSkillName, Skill> = {
[BladeSkillName.bladesIntuition]: new Skill({
name: BladeSkillName.bladesIntuition,
desc: "Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",
baseCost: 3,
costInc: 2.1,
mults: { [BladeburnerMultName.SuccessChanceAll]: 3 },
mults: { [BladeMultName.successChanceAll]: 3 },
}),
[BladeburnerSkillName.Cloak]: new Skill({
name: BladeburnerSkillName.Cloak,
[BladeSkillName.cloak]: new Skill({
name: BladeSkillName.cloak,
desc:
"Each level of this skill increases your " +
"success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",
baseCost: 2,
costInc: 1.1,
mults: { [BladeburnerMultName.SuccessChanceStealth]: 5.5 },
mults: { [BladeMultName.successChanceStealth]: 5.5 },
}),
[BladeburnerSkillName.ShortCircuit]: new Skill({
name: BladeburnerSkillName.ShortCircuit,
[BladeSkillName.shortCircuit]: new Skill({
name: BladeSkillName.shortCircuit,
desc:
"Each level of this skill increases your success chance " +
"in Contracts, Operations, and BlackOps that involve retirement by 5.5%",
baseCost: 2,
costInc: 2.1,
mults: { [BladeburnerMultName.SuccessChanceKill]: 5.5 },
mults: { [BladeMultName.successChanceKill]: 5.5 },
}),
[BladeburnerSkillName.DigitalObserver]: new Skill({
name: BladeburnerSkillName.DigitalObserver,
[BladeSkillName.digitalObserver]: new Skill({
name: BladeSkillName.digitalObserver,
desc: "Each level of this skill increases your success chance in all Operations and BlackOps by 4%",
baseCost: 2,
costInc: 2.1,
mults: { [BladeburnerMultName.SuccessChanceOperation]: 4 },
mults: { [BladeMultName.successChanceOperation]: 4 },
}),
[BladeburnerSkillName.Tracer]: new Skill({
name: BladeburnerSkillName.Tracer,
[BladeSkillName.tracer]: new Skill({
name: BladeSkillName.tracer,
desc: "Each level of this skill increases your success chance in all Contracts by 4%",
baseCost: 2,
costInc: 2.1,
mults: { [BladeburnerMultName.SuccessChanceContract]: 4 },
mults: { [BladeMultName.successChanceContract]: 4 },
}),
[BladeburnerSkillName.Overclock]: new Skill({
name: BladeburnerSkillName.Overclock,
[BladeSkillName.overclock]: new Skill({
name: BladeSkillName.overclock,
desc:
"Each level of this skill decreases the time it takes " +
"to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",
baseCost: 3,
costInc: 1.4,
maxLvl: 90,
mults: { [BladeburnerMultName.ActionTime]: -1 },
mults: { [BladeMultName.actionTime]: -1 },
}),
[BladeburnerSkillName.Reaper]: new Skill({
name: BladeburnerSkillName.Reaper,
[BladeSkillName.reaper]: new Skill({
name: BladeSkillName.reaper,
desc: "Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",
baseCost: 2,
costInc: 2.1,
mults: {
[BladeburnerMultName.EffStr]: 2,
[BladeburnerMultName.EffDef]: 2,
[BladeburnerMultName.EffDex]: 2,
[BladeburnerMultName.EffAgi]: 2,
[BladeMultName.effStr]: 2,
[BladeMultName.effDef]: 2,
[BladeMultName.effDex]: 2,
[BladeMultName.effAgi]: 2,
},
}),
[BladeburnerSkillName.EvasiveSystem]: new Skill({
name: BladeburnerSkillName.EvasiveSystem,
[BladeSkillName.evasiveSystem]: new Skill({
name: BladeSkillName.evasiveSystem,
desc: "Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",
baseCost: 2,
costInc: 2.1,
mults: { [BladeburnerMultName.EffDex]: 4, [BladeburnerMultName.EffAgi]: 4 },
mults: { [BladeMultName.effDex]: 4, [BladeMultName.effAgi]: 4 },
}),
[BladeburnerSkillName.Datamancer]: new Skill({
name: BladeburnerSkillName.Datamancer,
[BladeSkillName.datamancer]: new Skill({
name: BladeSkillName.datamancer,
desc:
"Each level of this skill increases your effectiveness in " +
"synthoid population analysis and investigation by 5%. " +
@ -79,27 +79,27 @@ export const Skills: Record<BladeburnerSkillName, Skill> = {
"the accuracy of your synthoid population/community estimates.",
baseCost: 3,
costInc: 1,
mults: { [BladeburnerMultName.SuccessChanceEstimate]: 5 },
mults: { [BladeMultName.successChanceEstimate]: 5 },
}),
[BladeburnerSkillName.CybersEdge]: new Skill({
name: BladeburnerSkillName.CybersEdge,
[BladeSkillName.cybersEdge]: new Skill({
name: BladeSkillName.cybersEdge,
desc: "Each level of this skill increases your max stamina by 2%",
baseCost: 1,
costInc: 3,
mults: { [BladeburnerMultName.Stamina]: 2 },
mults: { [BladeMultName.stamina]: 2 },
}),
[BladeburnerSkillName.HandsOfMidas]: new Skill({
name: BladeburnerSkillName.HandsOfMidas,
[BladeSkillName.handsOfMidas]: new Skill({
name: BladeSkillName.handsOfMidas,
desc: "Each level of this skill increases the amount of money you receive from Contracts by 10%",
baseCost: 2,
costInc: 2.5,
mults: { [BladeburnerMultName.Money]: 10 },
mults: { [BladeMultName.money]: 10 },
}),
[BladeburnerSkillName.Hyperdrive]: new Skill({
name: BladeburnerSkillName.Hyperdrive,
[BladeSkillName.hyperdrive]: new Skill({
name: BladeSkillName.hyperdrive,
desc: "Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",
baseCost: 1,
costInc: 2.5,
mults: { [BladeburnerMultName.ExpGain]: 10 },
mults: { [BladeMultName.expGain]: 10 },
}),
};

@ -11,7 +11,7 @@ import { ActionLevel } from "./ActionLevel";
import { Autolevel } from "./Autolevel";
import { formatBigNumber } from "../../ui/formatNumber";
import { useRerender } from "../../ui/React/hooks";
import { BladeburnerActionType } from "@enums";
import { BladeActionType } from "@enums";
import { ActionHeader } from "./ActionHeader";
interface OperationElemProps {
@ -21,8 +21,7 @@ interface OperationElemProps {
export function OperationElem({ bladeburner, action }: OperationElemProps): React.ReactElement {
const rerender = useRerender();
const isActive =
bladeburner.action?.type === BladeburnerActionType.Operation && action.name === bladeburner.action?.name;
const isActive = bladeburner.action?.type === BladeActionType.operation && action.name === bladeburner.action?.name;
const actionTime = action.getActionTime(bladeburner, Player);
return (

@ -1,5 +1,5 @@
import type { ActionIdentifier } from "../Types";
import { BladeburnerActionType } from "@enums";
import { BladeActionType } from "@enums";
import { assertLoadingType } from "../../utils/TypeAssertion";
import { getEnumHelper } from "../../utils/EnumHelper";
@ -9,17 +9,17 @@ import { getEnumHelper } from "../../utils/EnumHelper";
export function loadActionIdentifier(identifier: unknown): ActionIdentifier | null {
if (!identifier || typeof identifier !== "object") return null;
assertLoadingType<ActionIdentifier>(identifier);
if (getEnumHelper("BladeburnerBlackOpName").isMember(identifier.name)) {
return { type: BladeburnerActionType.BlackOp, name: identifier.name };
if (getEnumHelper("BladeBlackOpName").isMember(identifier.name)) {
return { type: BladeActionType.blackOp, name: identifier.name };
}
if (getEnumHelper("BladeburnerContractName").isMember(identifier.name)) {
return { type: BladeburnerActionType.Contract, name: identifier.name };
if (getEnumHelper("BladeContractName").isMember(identifier.name)) {
return { type: BladeActionType.contract, name: identifier.name };
}
if (getEnumHelper("BladeburnerOperationName").isMember(identifier.name)) {
return { type: BladeburnerActionType.Operation, name: identifier.name };
if (getEnumHelper("BladeOperationName").isMember(identifier.name)) {
return { type: BladeActionType.operation, name: identifier.name };
}
if (getEnumHelper("BladeburnerGeneralActionName").isMember(identifier.name)) {
return { type: BladeburnerActionType.General, name: identifier.name };
if (getEnumHelper("BladeGeneralActionName").isMember(identifier.name)) {
return { type: BladeActionType.general, name: identifier.name };
}
return null;
}

@ -15,7 +15,7 @@ import Select, { SelectChangeEvent } from "@mui/material/Select";
import DeleteIcon from "@mui/icons-material/Delete";
import { Adjuster } from "./Adjuster";
import { Player } from "@player";
import { BladeburnerSkillName, CityName } from "@enums";
import { BladeSkillName, CityName } from "@enums";
import { Skills as AllSkills } from "../../Bladeburner/data/Skills";
import { Bladeburner } from "../../Bladeburner/Bladeburner";
import { getEnumHelper } from "../../utils/EnumHelper";
@ -57,9 +57,9 @@ export function BladeburnerDev({ bladeburner }: { bladeburner: Bladeburner }): R
};
// Skill functions
const [skillName, setSkillName] = useState(BladeburnerSkillName.BladesIntuition);
const [skillName, setSkillName] = useState(BladeSkillName.bladesIntuition);
function setSkillDropdown(event: SelectChangeEvent): void {
if (!getEnumHelper("BladeburnerSkillName").isMember(event.target.value)) return;
if (!getEnumHelper("BladeSkillName").isMember(event.target.value)) return;
setSkillName(event.target.value);
}
const modifySkill = (modifier: number) => (levelchange: number) => {
@ -81,7 +81,7 @@ export function BladeburnerDev({ bladeburner }: { bladeburner: Bladeburner }): R
const AllContracts = bladeburner.contracts;
const [contractTarget, setContract] = useState(AllContracts.Tracking.name);
function setContractDropdown(event: SelectChangeEvent): void {
if (!getEnumHelper("BladeburnerContractName").isMember(event.target.value)) return;
if (!getEnumHelper("BladeContractName").isMember(event.target.value)) return;
setContract(event.target.value);
}
const modifyContractLevel = (modifier: number) => (levelchange: number) => {
@ -117,7 +117,7 @@ export function BladeburnerDev({ bladeburner }: { bladeburner: Bladeburner }): R
const AllOperations = bladeburner.operations;
const [operationTarget, setOperation] = useState(AllOperations.Investigation.name);
function setOperationDropdown(event: SelectChangeEvent): void {
if (!getEnumHelper("BladeburnerOperationName").isMember(event.target.value)) return;
if (!getEnumHelper("BladeOperationName").isMember(event.target.value)) return;
setOperation(event.target.value);
}
const modifyOperationLevel = (modifier: number) => (levelchange: number) => {

@ -3,13 +3,7 @@ import type { Action, LevelableAction } from "../Bladeburner/Types";
import type { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
import { Player } from "@player";
import {
BladeburnerActionType,
BladeburnerContractName,
BladeburnerGeneralActionName,
BladeburnerOperationName,
BladeburnerSkillName,
} from "@enums";
import { BladeActionType, BladeContractName, BladeGeneralActionName, BladeOperationName, BladeSkillName } from "@enums";
import { Bladeburner, BladeburnerPromise } from "../Bladeburner/Bladeburner";
import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { helpers } from "../Netscript/NetscriptHelpers";
@ -46,7 +40,7 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
}
function isLevelableAction(action: Action): action is LevelableAction {
return action.type === BladeburnerActionType.Contract || action.type === BladeburnerActionType.Operation;
return action.type === BladeActionType.contract || action.type === BladeActionType.operation;
}
function getLevelableAction(ctx: NetscriptContext, type: unknown, name: unknown): LevelableAction {
@ -64,11 +58,11 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
inBladeburner: () => () => !!Player.bladeburner,
getContractNames: (ctx) => () => {
getBladeburner(ctx);
return Object.values(BladeburnerContractName);
return Object.values(BladeContractName);
},
getOperationNames: (ctx) => () => {
getBladeburner(ctx);
return Object.values(BladeburnerOperationName);
return Object.values(BladeOperationName);
},
getBlackOpNames: (ctx) => () => {
getBladeburner(ctx);
@ -83,16 +77,16 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
},
getBlackOpRank: (ctx) => (_blackOpName) => {
checkBladeburnerAccess(ctx);
const blackOpName = getEnumHelper("BladeburnerBlackOpName").nsGetMember(ctx, _blackOpName);
const blackOpName = getEnumHelper("BladeBlackOpName").nsGetMember(ctx, _blackOpName);
return BlackOperations[blackOpName].reqdRank;
},
getGeneralActionNames: (ctx) => () => {
getBladeburner(ctx);
return Object.values(BladeburnerGeneralActionName);
return Object.values(BladeGeneralActionName);
},
getSkillNames: (ctx) => () => {
getBladeburner(ctx);
return Object.values(BladeburnerSkillName);
return Object.values(BladeSkillName);
},
startAction: (ctx) => (type, name) => {
const bladeburner = getBladeburner(ctx);
@ -134,8 +128,8 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
const sleeveNumber = helpers.number(ctx, "sleeve", _sleeve);
checkSleeveNumber(ctx, sleeveNumber);
switch (action.type) {
case BladeburnerActionType.General:
case BladeburnerActionType.Contract: {
case BladeActionType.general:
case BladeActionType.contract: {
const sleevePerson = Player.sleeves[sleeveNumber];
return action.getSuccessRange(bladeburner, sleevePerson);
}
@ -154,12 +148,12 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
const bladeburner = getBladeburner(ctx);
const action = getAction(ctx, type, name);
switch (action.type) {
case BladeburnerActionType.General:
case BladeActionType.general:
return Infinity;
case BladeburnerActionType.BlackOp:
case BladeActionType.blackOp:
return bladeburner.numBlackOpsComplete > action.n ? 0 : 1;
case BladeburnerActionType.Contract:
case BladeburnerActionType.Operation:
case BladeActionType.contract:
case BladeActionType.operation:
return action.count;
}
},
@ -212,12 +206,12 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
},
getSkillLevel: (ctx) => (_skillName) => {
const bladeburner = getBladeburner(ctx);
const skillName = getEnumHelper("BladeburnerSkillName").nsGetMember(ctx, _skillName, "skillName");
const skillName = getEnumHelper("BladeSkillName").nsGetMember(ctx, _skillName, "skillName");
return bladeburner.getSkillLevel(skillName);
},
getSkillUpgradeCost: (ctx) => (_skillName, _count) => {
const bladeburner = getBladeburner(ctx);
const skillName = getEnumHelper("BladeburnerSkillName").nsGetMember(ctx, _skillName, "skillName");
const skillName = getEnumHelper("BladeSkillName").nsGetMember(ctx, _skillName, "skillName");
const count = helpers.positiveInteger(ctx, "count", _count ?? 1);
const currentLevel = bladeburner.getSkillLevel(skillName);
const skill = Skills[skillName];
@ -228,7 +222,7 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
},
upgradeSkill: (ctx) => (_skillName, _count) => {
const bladeburner = getBladeburner(ctx);
const skillName = getEnumHelper("BladeburnerSkillName").nsGetMember(ctx, _skillName, "skillName");
const skillName = getEnumHelper("BladeSkillName").nsGetMember(ctx, _skillName, "skillName");
const count = helpers.positiveInteger(ctx, "count", _count ?? 1);
const attempt = bladeburner.upgradeSkill(skillName, count);
helpers.log(ctx, () => attempt.message);
@ -239,11 +233,11 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
if (!type && !name) return bladeburner.teamSize;
const action = getAction(ctx, type, name);
switch (action.type) {
case BladeburnerActionType.General:
case BladeburnerActionType.Contract:
case BladeActionType.general:
case BladeActionType.contract:
return 0;
case BladeburnerActionType.BlackOp:
case BladeburnerActionType.Operation:
case BladeActionType.blackOp:
case BladeActionType.operation:
return action.teamCount;
}
},
@ -256,12 +250,12 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
return -1;
}
switch (action.type) {
case BladeburnerActionType.Contract:
case BladeburnerActionType.General:
case BladeActionType.contract:
case BladeActionType.general:
helpers.log(ctx, () => "Only valid for Operations and Black Operations");
return -1;
case BladeburnerActionType.BlackOp:
case BladeburnerActionType.Operation: {
case BladeActionType.blackOp:
case BladeActionType.operation: {
action.teamCount = size;
helpers.log(ctx, () => `Set team size for ${action.name} to ${size}`);
return size;

@ -3,7 +3,7 @@ import type { Sleeve as NetscriptSleeve } from "@nsdefs";
import type { ActionIdentifier } from "../Bladeburner/Types";
import { Player } from "@player";
import { BladeburnerActionType, type BladeburnerContractName } from "@enums";
import { BladeActionType, type BladeContractName } from "@enums";
import { Augmentations } from "../Augmentation/Augmentations";
import { findCrime } from "../Crime/CrimeHelpers";
import { getEnumHelper } from "../utils/EnumHelper";
@ -259,9 +259,9 @@ export function NetscriptSleeve(): InternalAPI<NetscriptSleeve> {
const action = helpers.string(ctx, "action", _action);
checkSleeveAPIAccess(ctx);
checkSleeveNumber(ctx, sleeveNumber);
let contract: BladeburnerContractName | undefined = undefined;
let contract: BladeContractName | undefined = undefined;
if (action === "Take on contracts") {
contract = getEnumHelper("BladeburnerContractName").nsGetMember(ctx, _contract);
contract = getEnumHelper("BladeContractName").nsGetMember(ctx, _contract);
for (let i = 0; i < Player.sleeves.length; ++i) {
if (i === sleeveNumber) continue;
const otherWork = Player.sleeves[i].currentWork;
@ -272,7 +272,7 @@ export function NetscriptSleeve(): InternalAPI<NetscriptSleeve> {
);
}
}
const actionId: ActionIdentifier = { type: BladeburnerActionType.Contract, name: contract };
const actionId: ActionIdentifier = { type: BladeActionType.contract, name: contract };
Player.sleeves[sleeveNumber].startWork(new SleeveBladeburnerWork({ actionId }));
}
return Player.sleeves[sleeveNumber].bladeburner(action, contract);

@ -25,8 +25,8 @@ import {
UniversityClassType,
CompanyName,
FactionName,
BladeburnerActionType,
BladeburnerGeneralActionName,
BladeActionType,
BladeGeneralActionName,
AugmentationName,
} from "@enums";
@ -482,7 +482,7 @@ export class Sleeve extends Person implements SleevePerson {
case "Training":
this.startWork(
new SleeveBladeburnerWork({
actionId: { type: BladeburnerActionType.General, name: BladeburnerGeneralActionName.Training },
actionId: { type: BladeActionType.general, name: BladeGeneralActionName.training },
}),
);
return true;
@ -490,28 +490,28 @@ export class Sleeve extends Person implements SleevePerson {
case "Field Analysis":
this.startWork(
new SleeveBladeburnerWork({
actionId: { type: BladeburnerActionType.General, name: BladeburnerGeneralActionName.FieldAnalysis },
actionId: { type: BladeActionType.general, name: BladeGeneralActionName.fieldAnalysis },
}),
);
return true;
case "Recruitment":
this.startWork(
new SleeveBladeburnerWork({
actionId: { type: BladeburnerActionType.General, name: BladeburnerGeneralActionName.Recruitment },
actionId: { type: BladeActionType.general, name: BladeGeneralActionName.recruitment },
}),
);
return true;
case "Diplomacy":
this.startWork(
new SleeveBladeburnerWork({
actionId: { type: BladeburnerActionType.General, name: BladeburnerGeneralActionName.Diplomacy },
actionId: { type: BladeActionType.general, name: BladeGeneralActionName.diplomacy },
}),
);
return true;
case "Hyperbolic Regeneration Chamber":
this.startWork(
new SleeveBladeburnerWork({
actionId: { type: BladeburnerActionType.General, name: BladeburnerGeneralActionName.HyperbolicRegen },
actionId: { type: BladeActionType.general, name: BladeGeneralActionName.hyperbolicRegen },
}),
);
return true;
@ -523,10 +523,8 @@ export class Sleeve extends Person implements SleevePerson {
this.startWork(new SleeveSupportWork());
return true;
case "Take on contracts":
if (!getEnumHelper("BladeburnerContractName").isMember(contract)) return false;
this.startWork(
new SleeveBladeburnerWork({ actionId: { type: BladeburnerActionType.Contract, name: contract } }),
);
if (!getEnumHelper("BladeContractName").isMember(contract)) return false;
this.startWork(new SleeveBladeburnerWork({ actionId: { type: BladeActionType.contract, name: contract } }));
return true;
}
return false;

@ -2,7 +2,7 @@ import type { Sleeve } from "../Sleeve";
import type { ActionIdentifier } from "../../../Bladeburner/Types";
import type { PromisePair } from "../../../Types/Promises";
import { Player } from "@player";
import { BladeburnerActionType, BladeburnerGeneralActionName } from "@enums";
import { BladeActionType, BladeGeneralActionName } from "@enums";
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../../../utils/JSONReviver";
import { applySleeveGains, SleeveWorkClass, SleeveWorkType } from "./Work";
import { CONSTANTS } from "../../../Constants";
@ -12,7 +12,7 @@ import { loadActionIdentifier } from "../../../Bladeburner/utils/loadActionIdent
import { invalidWork } from "../../../Work/InvalidWork";
interface SleeveBladeburnerWorkParams {
actionId: ActionIdentifier & { type: BladeburnerActionType.General | BladeburnerActionType.Contract };
actionId: ActionIdentifier & { type: BladeActionType.general | BladeActionType.contract };
}
export const isSleeveBladeburnerWork = (w: SleeveWorkClass | null): w is SleeveBladeburnerWork =>
@ -22,15 +22,12 @@ export class SleeveBladeburnerWork extends SleeveWorkClass {
type: SleeveWorkType.BLADEBURNER = SleeveWorkType.BLADEBURNER;
tasksCompleted = 0;
cyclesWorked = 0;
actionId: ActionIdentifier & { type: BladeburnerActionType.General | BladeburnerActionType.Contract };
actionId: ActionIdentifier & { type: BladeActionType.general | BladeActionType.contract };
nextCompletionPair: PromisePair<void> = { promise: null, resolve: null };
constructor(params?: SleeveBladeburnerWorkParams) {
super();
this.actionId = params?.actionId ?? {
type: BladeburnerActionType.General,
name: BladeburnerGeneralActionName.FieldAnalysis,
};
this.actionId = params?.actionId ?? { type: BladeActionType.general, name: BladeGeneralActionName.fieldAnalysis };
}
cyclesNeeded(sleeve: Sleeve): number {
@ -51,13 +48,13 @@ export class SleeveBladeburnerWork extends SleeveWorkClass {
process(sleeve: Sleeve, cycles: number) {
if (!Player.bladeburner) return sleeve.stopWork();
this.cyclesWorked += cycles;
if (this.actionId.type === BladeburnerActionType.Contract) {
if (this.actionId.type === BladeActionType.contract) {
const action = Player.bladeburner.getActionObject(this.actionId);
if (action.count < 1) return sleeve.stopWork();
}
while (this.cyclesWorked >= this.cyclesNeeded(sleeve)) {
if (this.actionId.type === BladeburnerActionType.Contract) {
if (this.actionId.type === BladeActionType.contract) {
const action = Player.bladeburner.getActionObject(this.actionId);
if (action.count < 1) return sleeve.stopWork();
}

@ -5,8 +5,8 @@ import { MenuItem, Select, SelectChangeEvent } from "@mui/material";
import { Player } from "@player";
import {
BladeburnerActionType,
BladeburnerContractName,
BladeActionType,
BladeContractName,
CityName,
FactionName,
FactionWorkType,
@ -96,19 +96,19 @@ function possibleFactions(sleeve: Sleeve): string[] {
});
}
function possibleContracts(sleeve: Sleeve): BladeburnerContractName[] | ["------"] {
function possibleContracts(sleeve: Sleeve): BladeContractName[] | ["------"] {
const bb = Player.bladeburner;
if (bb === null) {
return ["------"];
}
let contracts = Object.values(BladeburnerContractName);
let contracts = Object.values(BladeContractName);
for (const otherSleeve of Player.sleeves) {
if (sleeve === otherSleeve) {
continue;
}
if (
otherSleeve.currentWork?.type === SleeveWorkType.BLADEBURNER &&
otherSleeve.currentWork.actionId.type === BladeburnerActionType.Contract
otherSleeve.currentWork.actionId.type === BladeActionType.contract
) {
const w = otherSleeve.currentWork;
contracts = contracts.filter((x) => x != w.actionId.name);
@ -262,7 +262,7 @@ function getABC(sleeve: Sleeve): [string, string, string] {
return ["Work for Faction", work.factionName, workNames[work.factionWorkType] ?? ""];
}
case SleeveWorkType.BLADEBURNER:
if (work.actionId.type === BladeburnerActionType.Contract) {
if (work.actionId.type === BladeActionType.contract) {
return ["Perform Bladeburner Actions", "Take on contracts", work.actionId.name];
}
return ["Perform Bladeburner Actions", work.actionId.name, "------"];

@ -1787,11 +1787,7 @@ export interface Singularity {
* @param focus - Acquire player focus on this class. Optional. Defaults to true.
* @returns True if action is successfully started, false otherwise.
*/
universityCourse(
universityName: UniversityLocationName | `${UniversityLocationName}`,
courseName: UniversityClassType | `${UniversityClassType}`,
focus?: boolean,
): boolean;
universityCourse(universityName: string, courseName: string, focus?: boolean): boolean;
/**
* Workout at the gym.
@ -1813,7 +1809,7 @@ export interface Singularity {
* @param focus - Acquire player focus on this gym workout. Optional. Defaults to true.
* @returns True if action is successfully started, false otherwise.
*/
gymWorkout(gymName: GymLocationName | `${GymLocationName}`, stat: GymType | `${GymType}`, focus?: boolean): boolean;
gymWorkout(gymName: string, stat: string, focus?: boolean): boolean;
/**
* Travel to another city.
@ -3037,133 +3033,6 @@ export interface Hacknet {
getTrainingMult(): number;
}
/**
* Action types of Bladeburner
*
* @public
*/
declare enum BladeburnerActionType {
General = "General",
Contract = "Contracts",
Operation = "Operations",
BlackOp = "Black Operations",
}
/**
* General action names of Bladeburner
*
* @public
*/
declare enum BladeburnerGeneralActionName {
Training = "Training",
FieldAnalysis = "Field Analysis",
Recruitment = "Recruitment",
Diplomacy = "Diplomacy",
HyperbolicRegen = "Hyperbolic Regeneration Chamber",
InciteViolence = "Incite Violence",
}
/**
* Contract names of Bladeburner
*
* @public
*/
declare enum BladeburnerContractName {
Tracking = "Tracking",
BountyHunter = "Bounty Hunter",
Retirement = "Retirement",
}
/**
* Operation names of Bladeburner
*
* @public
*/
declare enum BladeburnerOperationName {
Investigation = "Investigation",
Undercover = "Undercover Operation",
Sting = "Sting Operation",
Raid = "Raid",
StealthRetirement = "Stealth Retirement Operation",
Assassination = "Assassination",
}
/**
* Black Operation names of Bladeburner
*
* @public
*/
declare enum BladeburnerBlackOpName {
OperationTyphoon = "Operation Typhoon",
OperationZero = "Operation Zero",
OperationX = "Operation X",
OperationTitan = "Operation Titan",
OperationAres = "Operation Ares",
OperationArchangel = "Operation Archangel",
OperationJuggernaut = "Operation Juggernaut",
OperationRedDragon = "Operation Red Dragon",
OperationK = "Operation K",
OperationDeckard = "Operation Deckard",
OperationTyrell = "Operation Tyrell",
OperationWallace = "Operation Wallace",
OperationShoulderOfOrion = "Operation Shoulder of Orion",
OperationHyron = "Operation Hyron",
OperationMorpheus = "Operation Morpheus",
OperationIonStorm = "Operation Ion Storm",
OperationAnnihilus = "Operation Annihilus",
OperationUltron = "Operation Ultron",
OperationCenturion = "Operation Centurion",
OperationVindictus = "Operation Vindictus",
OperationDaedalus = "Operation Daedalus",
}
/**
* Skill names type of Bladeburner
*
* @public
*/
declare enum BladeburnerSkillName {
BladesIntuition = "Blade's Intuition",
Cloak = "Cloak",
ShortCircuit = "Short-Circuit",
DigitalObserver = "Digital Observer",
Tracer = "Tracer",
Overclock = "Overclock",
Reaper = "Reaper",
EvasiveSystem = "Evasive System",
Datamancer = "Datamancer",
CybersEdge = "Cyber's Edge",
HandsOfMidas = "Hands of Midas",
Hyperdrive = "Hyperdrive",
}
/**
* @public
*/
export type BladeburnerActionName =
| BladeburnerGeneralActionName
| BladeburnerContractName
| BladeburnerOperationName
| BladeburnerBlackOpName;
/**
* These special Bladeburner action types are only for Sleeve
*
* @public
*/
declare enum SpecialBladeburnerActionTypeForSleeve {
InfiltrateSynthoids = "Infiltrate Synthoids",
SupportMainSleeve = "Support main sleeve",
TakeOnContracts = "Take on contracts",
}
/**
* @public
*/
export type BladeburnerActionTypeForSleeve =
| Exclude<BladeburnerGeneralActionName, BladeburnerGeneralActionName.InciteViolence>
| SpecialBladeburnerActionTypeForSleeve;
/**
* Bladeburner API
* @remarks
@ -3181,7 +3050,7 @@ export interface Bladeburner {
*
* @returns Array of strings containing the names of all Bladeburner contracts.
*/
getContractNames(): BladeburnerContractName[];
getContractNames(): string[];
/**
* List all operations.
@ -3192,7 +3061,7 @@ export interface Bladeburner {
*
* @returns Array of strings containing the names of all Bladeburner operations.
*/
getOperationNames(): BladeburnerOperationName[];
getOperationNames(): string[];
/**
* List all black ops.
@ -3203,7 +3072,7 @@ export interface Bladeburner {
*
* @returns Array of strings containing the names of all Bladeburner Black Ops.
*/
getBlackOpNames(): BladeburnerBlackOpName[];
getBlackOpNames(): string[];
/**
* Get an object with the name and rank requirement of the next BlackOp that can be completed.
@ -3215,7 +3084,7 @@ export interface Bladeburner {
*
* @returns An object with the `.name` and `.rank` properties of the available BlackOp, or `null`.
*/
getNextBlackOp(): { name: BladeburnerBlackOpName; rank: number } | null;
getNextBlackOp(): { name: string; rank: number } | null;
/**
* List all general actions.
@ -3226,7 +3095,7 @@ export interface Bladeburner {
*
* @returns Array of strings containing the names of all general Bladeburner actions.
*/
getGeneralActionNames(): BladeburnerGeneralActionName[];
getGeneralActionNames(): string[];
/**
* List all skills.
@ -3237,7 +3106,7 @@ export interface Bladeburner {
*
* @returns Array of strings containing the names of all general Bladeburner skills.
*/
getSkillNames(): BladeburnerSkillName[];
getSkillNames(): string[];
/**
* Start an action.
@ -3257,10 +3126,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match
* @returns True if the action was started successfully, and false otherwise.
*/
startAction(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
startAction(type: string, name: string): boolean;
/**
* Stop current action.
@ -3292,10 +3158,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @returns Number of milliseconds it takes to complete the specified action.
*/
getActionTime(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionTime(type: string, name: string): number;
/**
* Get the time elapsed on current action.
@ -3323,11 +3186,7 @@ export interface Bladeburner {
* @param sleeveNumber - Optional. Index of the sleeve to retrieve information.
* @returns Estimated success chance for the specified action.
*/
getActionEstimatedSuccessChance(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
sleeveNumber?: number,
): [number, number];
getActionEstimatedSuccessChance(type: string, name: string, sleeveNumber?: number): [number, number];
/**
* Get the reputation gain of an action.
@ -3343,11 +3202,7 @@ export interface Bladeburner {
* @param level - Optional number. Action level at which to calculate the gain. Will be the action's current level if not given.
* @returns Average Bladeburner reputation gain for successfully completing the specified action.
*/
getActionRepGain(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level?: number,
): number;
getActionRepGain(type: string, name: string, level?: number): number;
/**
* Get action count remaining.
@ -3365,10 +3220,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @returns Remaining count of the specified action.
*/
getActionCountRemaining(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionCountRemaining(type: string, name: string): number;
/**
* Get the maximum level of an action.
@ -3383,10 +3235,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @returns Maximum level of the specified action.
*/
getActionMaxLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionMaxLevel(type: string, name: string): number;
/**
* Get the current level of an action.
@ -3401,10 +3250,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @returns Current level of the specified action.
*/
getActionCurrentLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionCurrentLevel(type: string, name: string): number;
/**
* Get whether an action is set to autolevel.
@ -3419,10 +3265,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @returns True if the action is set to autolevel, and false otherwise.
*/
getActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
getActionAutolevel(type: string, name: string): boolean;
/**
* Get action successes.
@ -3435,10 +3278,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @returns a number with how many successes you have with action.
*/
getActionSuccesses(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getActionSuccesses(type: string, name: string): number;
/**
* Set an action autolevel.
@ -3451,11 +3291,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @param autoLevel - Whether or not to autolevel this action
*/
setActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
autoLevel: boolean,
): void;
setActionAutolevel(type: string, name: string, autoLevel: boolean): void;
/**
* Set the level of an action.
@ -3468,11 +3304,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @param level - Level to set this action to.
*/
setActionLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level: number,
): void;
setActionLevel(type: string, name: string, level: number): void;
/**
* Get player bladeburner rank.
@ -3497,7 +3329,7 @@ export interface Bladeburner {
* @param name - Name of BlackOp. Must be an exact match.
* @returns Rank required to complete this BlackOp.
*/
getBlackOpRank(name: BladeburnerBlackOpName): number;
getBlackOpRank(name: string): number;
/**
* Get bladeburner skill points.
@ -3522,7 +3354,7 @@ export interface Bladeburner {
* @param skillName - Name of skill. Case-sensitive and must be an exact match.
* @returns Level in the specified skill.
*/
getSkillLevel(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`): number;
getSkillLevel(skillName: string): number;
/**
* Get cost to upgrade skill.
@ -3537,7 +3369,7 @@ export interface Bladeburner {
* @param count - Number of times to upgrade the skill. Defaults to 1 if not specified.
* @returns Number of skill points needed to upgrade the specified skill.
*/
getSkillUpgradeCost(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): number;
getSkillUpgradeCost(skillName: string, count?: number): number;
/**
* Upgrade skill.
@ -3552,7 +3384,7 @@ export interface Bladeburner {
* @param count - Number of times to upgrade the skill. Defaults to 1 if not specified.
* @returns true if the skill is successfully upgraded, and false otherwise.
*/
upgradeSkill(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): boolean;
upgradeSkill(skillName: string, count?: number): boolean;
/**
* Get team size.
@ -3569,10 +3401,7 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match.
* @returns Number of Bladeburner team members that were assigned to the specified action.
*/
getTeamSize(
type?: BladeburnerActionType | `${BladeburnerActionType}`,
name?: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
getTeamSize(type?: string, name?: string): number;
/**
* Set team size.
@ -3588,11 +3417,7 @@ export interface Bladeburner {
* @param size - Number of team members to set. Will be converted using Math.round().
* @returns Number of Bladeburner team members you assigned to the specified action.
*/
setTeamSize(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
size: number,
): number;
setTeamSize(type: string, name: string, size: number): number;
/**
* Get estimated population in city.
@ -4741,15 +4566,11 @@ export interface Sleeve {
* Return a boolean indicating whether or not this action was set successfully.
*
* @param sleeveNumber - Index of the sleeve to start taking class.
* @param universityName - Name of the university to attend.
* @param courseName - Name of the course to follow.
* @param university - Name of the university to attend.
* @param className - Name of the class to follow.
* @returns True if this action was set successfully, false otherwise.
*/
setToUniversityCourse(
sleeveNumber: number,
universityName: UniversityLocationName | `${UniversityLocationName}`,
courseName: UniversityClassType | `${UniversityClassType}`,
): boolean;
setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean;
/**
* Set a sleeve to workout at the gym.
@ -4763,11 +4584,7 @@ export interface Sleeve {
* @param stat - Name of the stat to train.
* @returns True if the sleeve started working out, false otherwise.
*/
setToGymWorkout(
sleeveNumber: number,
gymName: GymLocationName | `${GymLocationName}`,
stat: GymType | `${GymType}`,
): boolean;
setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean;
/**
* Make a sleeve travel to another city. The cost for using this function is the same as for a player.
@ -4853,11 +4670,7 @@ export interface Sleeve {
* @param contract - Name of the contract if applicable.
* @returns True if the sleeve started the given Bladeburner action, false otherwise.
*/
setToBladeburnerAction(
sleeveNumber: number,
action: BladeburnerActionTypeForSleeve | `${BladeburnerActionTypeForSleeve}`,
contract?: BladeburnerContractName,
): boolean;
setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string): boolean;
}
/**
@ -8080,30 +7893,6 @@ declare enum LocationName {
Void = "The Void",
}
/**
* Locations of university
*
* @public
*/
declare enum UniversityLocationName {
AevumSummitUniversity = LocationName.AevumSummitUniversity,
Sector12RothmanUniversity = LocationName.Sector12RothmanUniversity,
VolhavenZBInstituteOfTechnology = LocationName.VolhavenZBInstituteOfTechnology,
}
/**
* Locations of gym
*
* @public
*/
declare enum GymLocationName {
AevumCrushFitnessGym = LocationName.AevumCrushFitnessGym,
AevumSnapFitnessGym = LocationName.AevumSnapFitnessGym,
Sector12IronGym = LocationName.Sector12IronGym,
Sector12PowerhouseGym = LocationName.Sector12PowerhouseGym,
VolhavenMilleniumFitnessGym = LocationName.VolhavenMilleniumFitnessGym,
}
/** Names of all companies
* @public */
declare enum CompanyName {