API: Add types for parameters of gym-university-bladeburner API (Fix merging error) (#1596)

* API: Add types for parameters of gym-university-bladeburner API
* Fix merging error
This commit is contained in:
catloversg 2024-08-18 04:08:55 +07:00 committed by GitHub
parent 5b2a4eafcb
commit cacecda72f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
67 changed files with 1047 additions and 471 deletions

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

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

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

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

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

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

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

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

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

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

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

@ -9,11 +9,11 @@ List all general actions.
**Signature:** **Signature:**
```typescript ```typescript
getGeneralActionNames(): string[]; getGeneralActionNames(): BladeburnerGeneralActionName[];
``` ```
**Returns:** **Returns:**
string\[\] [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)<!-- -->\[\]
Array of strings containing the names of all general Bladeburner actions. 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:** **Signature:**
```typescript ```typescript
getNextBlackOp(): { name: string; rank: number } | null; getNextBlackOp(): { name: BladeburnerBlackOpName; rank: number } | null;
``` ```
**Returns:** **Returns:**
{ name: string; rank: number } \| null { name: [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)<!-- -->; rank: number } \| null
An object with the `.name` and `.rank` properties of the available BlackOp, or `null`<!-- -->. An object with the `.name` and `.rank` properties of the available BlackOp, or `null`<!-- -->.

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

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

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

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

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

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

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

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

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

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

@ -0,0 +1,18 @@
<!-- 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)

@ -0,0 +1,23 @@
<!-- 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> | |

@ -0,0 +1,16 @@
<!-- 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)

@ -0,0 +1,40 @@
<!-- 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> | |

@ -0,0 +1,22 @@
<!-- 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> | |

@ -0,0 +1,25 @@
<!-- 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> | |

@ -0,0 +1,25 @@
<!-- 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> | |

@ -0,0 +1,31 @@
<!-- 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> | |

@ -0,0 +1,24 @@
<!-- 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,18 +8,27 @@
| Enumeration | Description | | 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 | | [CityName](./bitburner.cityname.md) | Names of all cities |
| [CompanyName](./bitburner.companyname.md) | Names of all companies | | [CompanyName](./bitburner.companyname.md) | Names of all companies |
| [CrimeType](./bitburner.crimetype.md) | | | [CrimeType](./bitburner.crimetype.md) | |
| [FactionWorkType](./bitburner.factionworktype.md) | | | [FactionWorkType](./bitburner.factionworktype.md) | |
| [GymLocationName](./bitburner.gymlocationname.md) | Locations of gym |
| [GymType](./bitburner.gymtype.md) | | | [GymType](./bitburner.gymtype.md) | |
| [JobField](./bitburner.jobfield.md) | | | [JobField](./bitburner.jobfield.md) | |
| [JobName](./bitburner.jobname.md) | | | [JobName](./bitburner.jobname.md) | |
| [LocationName](./bitburner.locationname.md) | Names of all locations | | [LocationName](./bitburner.locationname.md) | Names of all locations |
| [OrderType](./bitburner.ordertype.md) | | | [OrderType](./bitburner.ordertype.md) | |
| [PositionType](./bitburner.positiontype.md) | | | [PositionType](./bitburner.positiontype.md) | |
| [SpecialBladeburnerActionTypeForSleeve](./bitburner.specialbladeburneractiontypeforsleeve.md) | These special Bladeburner action types are only for Sleeve |
| [ToastVariant](./bitburner.toastvariant.md) | | | [ToastVariant](./bitburner.toastvariant.md) | |
| [UniversityClassType](./bitburner.universityclasstype.md) | | | [UniversityClassType](./bitburner.universityclasstype.md) | |
| [UniversityLocationName](./bitburner.universitylocationname.md) | Locations of university |
## Interfaces ## Interfaces
@ -152,6 +161,8 @@
| Type Alias | Description | | Type Alias | Description |
| --- | --- | | --- | --- |
| [BladeburnerActionName](./bitburner.bladeburneractionname.md) | |
| [BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md) | |
| [CodingContractData](./bitburner.codingcontractdata.md) | Coding contract data will differ depending on coding contract. | | [CodingContractData](./bitburner.codingcontractdata.md) | Coding contract data will differ depending on coding contract. |
| [CorpEmployeePosition](./bitburner.corpemployeeposition.md) | | | [CorpEmployeePosition](./bitburner.corpemployeeposition.md) | |
| [CorpIndustryName](./bitburner.corpindustryname.md) | | | [CorpIndustryName](./bitburner.corpindustryname.md) | |

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

@ -9,15 +9,19 @@ Take university class.
**Signature:** **Signature:**
```typescript ```typescript
universityCourse(universityName: string, courseName: string, focus?: boolean): boolean; universityCourse(
universityName: UniversityLocationName | `${UniversityLocationName}`,
courseName: UniversityClassType | `${UniversityClassType}`,
focus?: boolean,
): boolean;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| universityName | string | Name of university. You must be in the correct city for whatever university you specify. | | 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 | string | Name of course. | | courseName | [UniversityClassType](./bitburner.universityclasstype.md) \| \`${[UniversityClassType](./bitburner.universityclasstype.md)<!-- -->}\` | Name of course. |
| focus | boolean | _(Optional)_ Acquire player focus on this class. Optional. Defaults to true. | | focus | boolean | _(Optional)_ Acquire player focus on this class. Optional. Defaults to true. |
**Returns:** **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. | | [setToIdle(sleeveNumber)](./bitburner.sleeve.settoidle.md) | Set a sleeve to idle. |
| [setToShockRecovery(sleeveNumber)](./bitburner.sleeve.settoshockrecovery.md) | Set a sleeve to shock recovery. | | [setToShockRecovery(sleeveNumber)](./bitburner.sleeve.settoshockrecovery.md) | Set a sleeve to shock recovery. |
| [setToSynchronize(sleeveNumber)](./bitburner.sleeve.settosynchronize.md) | Set a sleeve to synchronize. | | [setToSynchronize(sleeveNumber)](./bitburner.sleeve.settosynchronize.md) | Set a sleeve to synchronize. |
| [setToUniversityCourse(sleeveNumber, university, className)](./bitburner.sleeve.settouniversitycourse.md) | Set a sleeve to take a class at a university. | | [setToUniversityCourse(sleeveNumber, universityName, courseName)](./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. | | [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,7 +9,11 @@ Set a sleeve to perform Bladeburner actions.
**Signature:** **Signature:**
```typescript ```typescript
setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string): boolean; setToBladeburnerAction(
sleeveNumber: number,
action: BladeburnerActionTypeForSleeve | `${BladeburnerActionTypeForSleeve}`,
contract?: BladeburnerContractName,
): boolean;
``` ```
## Parameters ## Parameters
@ -17,8 +21,8 @@ setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string):
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to perform a Bladeburner action. | | sleeveNumber | number | Index of the sleeve to perform a Bladeburner action. |
| action | string | Name of the action to be performed. | | action | [BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md) \| \`${[BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md)<!-- -->}\` | Name of the action to be performed. |
| contract | string | _(Optional)_ Name of the contract if applicable. | | contract | [BladeburnerContractName](./bitburner.bladeburnercontractname.md) | _(Optional)_ Name of the contract if applicable. |
**Returns:** **Returns:**

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

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

@ -0,0 +1,22 @@
<!-- 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> | |

@ -0,0 +1,22 @@
<!-- 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 { import {
AugmentationName, AugmentationName,
BladeSkillName, BladeburnerSkillName,
CityName, CityName,
CompletedProgramName, CompletedProgramName,
CorpUnlockName, CorpUnlockName,
@ -417,7 +417,8 @@ export const achievements: Record<string, Achievement> = {
Icon: "BLADEOVERCLOCK", Icon: "BLADEOVERCLOCK",
Visible: () => canAccessBitNodeFeature(6), Visible: () => canAccessBitNodeFeature(6),
Condition: () => Condition: () =>
Player.bladeburner?.getSkillLevel(BladeSkillName.overclock) === Skills[BladeSkillName.overclock].maxLvl, Player.bladeburner?.getSkillLevel(BladeburnerSkillName.Overclock) ===
Skills[BladeburnerSkillName.Overclock].maxLvl,
}, },
BLADEBURNER_UNSPENT_100000: { BLADEBURNER_UNSPENT_100000: {
...achievementData.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 { addOffset } from "../../utils/helpers/addOffset";
import { BladeburnerConstants } from "../data/Constants"; import { BladeburnerConstants } from "../data/Constants";
import { calculateIntelligenceBonus } from "../../PersonObjects/formulas/intelligence"; import { calculateIntelligenceBonus } from "../../PersonObjects/formulas/intelligence";
import { BladeMultName } from "../Enums"; import { BladeburnerMultName } from "../Enums";
import { getRecordKeys } from "../../Types/Record"; import { getRecordKeys } from "../../Types/Record";
import { clampNumber } from "../../utils/helpers/clampNumber"; import { clampNumber } from "../../utils/helpers/clampNumber";
@ -100,7 +100,7 @@ export abstract class ActionClass {
getActionTime(bladeburner: Bladeburner, person: Person): number { getActionTime(bladeburner: Bladeburner, person: Person): number {
const difficulty = this.getDifficulty(); const difficulty = this.getDifficulty();
let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor; let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor;
const skillFac = bladeburner.getSkillMult(BladeMultName.actionTime); // Always < 1 const skillFac = bladeburner.getSkillMult(BladeburnerMultName.ActionTime); // Always < 1
const effAgility = bladeburner.getEffectiveSkillLevel(person, "agility"); const effAgility = bladeburner.getEffectiveSkillLevel(person, "agility");
const effDexterity = bladeburner.getEffectiveSkillLevel(person, "dexterity"); const effDexterity = bladeburner.getEffectiveSkillLevel(person, "dexterity");
@ -175,10 +175,10 @@ export abstract class ActionClass {
difficulty *= this.getChaosSuccessFactor(inst); difficulty *= this.getChaosSuccessFactor(inst);
// Factor skill multipliers into success chance // Factor skill multipliers into success chance
competence *= inst.getSkillMult(BladeMultName.successChanceAll); competence *= inst.getSkillMult(BladeburnerMultName.SuccessChanceAll);
competence *= this.getActionTypeSkillSuccessBonus(inst); competence *= this.getActionTypeSkillSuccessBonus(inst);
if (this.isStealth) competence *= inst.getSkillMult(BladeMultName.successChanceStealth); if (this.isStealth) competence *= inst.getSkillMult(BladeburnerMultName.SuccessChanceStealth);
if (this.isKill) competence *= inst.getSkillMult(BladeMultName.successChanceKill); if (this.isKill) competence *= inst.getSkillMult(BladeburnerMultName.SuccessChanceKill);
// Augmentation multiplier // Augmentation multiplier
competence *= person.mults.bladeburner_success_chance; competence *= person.mults.bladeburner_success_chance;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -431,7 +431,7 @@ export function NetscriptFormulas(): InternalAPI<IFormulas> {
bladeburner: { bladeburner: {
skillMaxUpgradeCount: (ctx) => (_name, _level, _skillPoints) => { skillMaxUpgradeCount: (ctx) => (_name, _level, _skillPoints) => {
checkFormulasAccess(ctx); checkFormulasAccess(ctx);
const name = getEnumHelper("BladeSkillName").nsGetMember(ctx, _name, "name"); const name = getEnumHelper("BladeburnerSkillName").nsGetMember(ctx, _name, "name");
const level = helpers.number(ctx, "level", _level); const level = helpers.number(ctx, "level", _level);
if (level < 0) { if (level < 0) {
throw new Error(`Level must be a non-negative number.`); throw new Error(`Level must be a non-negative number.`);

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

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

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

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

@ -1787,7 +1787,11 @@ export interface Singularity {
* @param focus - Acquire player focus on this class. Optional. Defaults to true. * @param focus - Acquire player focus on this class. Optional. Defaults to true.
* @returns True if action is successfully started, false otherwise. * @returns True if action is successfully started, false otherwise.
*/ */
universityCourse(universityName: string, courseName: string, focus?: boolean): boolean; universityCourse(
universityName: UniversityLocationName | `${UniversityLocationName}`,
courseName: UniversityClassType | `${UniversityClassType}`,
focus?: boolean,
): boolean;
/** /**
* Workout at the gym. * Workout at the gym.
@ -1809,7 +1813,7 @@ export interface Singularity {
* @param focus - Acquire player focus on this gym workout. Optional. Defaults to true. * @param focus - Acquire player focus on this gym workout. Optional. Defaults to true.
* @returns True if action is successfully started, false otherwise. * @returns True if action is successfully started, false otherwise.
*/ */
gymWorkout(gymName: string, stat: string, focus?: boolean): boolean; gymWorkout(gymName: GymLocationName | `${GymLocationName}`, stat: GymType | `${GymType}`, focus?: boolean): boolean;
/** /**
* Travel to another city. * Travel to another city.
@ -3033,6 +3037,133 @@ export interface Hacknet {
getTrainingMult(): number; 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 * Bladeburner API
* @remarks * @remarks
@ -3050,7 +3181,7 @@ export interface Bladeburner {
* *
* @returns Array of strings containing the names of all Bladeburner contracts. * @returns Array of strings containing the names of all Bladeburner contracts.
*/ */
getContractNames(): string[]; getContractNames(): BladeburnerContractName[];
/** /**
* List all operations. * List all operations.
@ -3061,7 +3192,7 @@ export interface Bladeburner {
* *
* @returns Array of strings containing the names of all Bladeburner operations. * @returns Array of strings containing the names of all Bladeburner operations.
*/ */
getOperationNames(): string[]; getOperationNames(): BladeburnerOperationName[];
/** /**
* List all black ops. * List all black ops.
@ -3072,7 +3203,7 @@ export interface Bladeburner {
* *
* @returns Array of strings containing the names of all Bladeburner Black Ops. * @returns Array of strings containing the names of all Bladeburner Black Ops.
*/ */
getBlackOpNames(): string[]; getBlackOpNames(): BladeburnerBlackOpName[];
/** /**
* Get an object with the name and rank requirement of the next BlackOp that can be completed. * Get an object with the name and rank requirement of the next BlackOp that can be completed.
@ -3084,7 +3215,7 @@ export interface Bladeburner {
* *
* @returns An object with the `.name` and `.rank` properties of the available BlackOp, or `null`. * @returns An object with the `.name` and `.rank` properties of the available BlackOp, or `null`.
*/ */
getNextBlackOp(): { name: string; rank: number } | null; getNextBlackOp(): { name: BladeburnerBlackOpName; rank: number } | null;
/** /**
* List all general actions. * List all general actions.
@ -3095,7 +3226,7 @@ export interface Bladeburner {
* *
* @returns Array of strings containing the names of all general Bladeburner actions. * @returns Array of strings containing the names of all general Bladeburner actions.
*/ */
getGeneralActionNames(): string[]; getGeneralActionNames(): BladeburnerGeneralActionName[];
/** /**
* List all skills. * List all skills.
@ -3106,7 +3237,7 @@ export interface Bladeburner {
* *
* @returns Array of strings containing the names of all general Bladeburner skills. * @returns Array of strings containing the names of all general Bladeburner skills.
*/ */
getSkillNames(): string[]; getSkillNames(): BladeburnerSkillName[];
/** /**
* Start an action. * Start an action.
@ -3126,7 +3257,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match * @param name - Name of action. Must be an exact match
* @returns True if the action was started successfully, and false otherwise. * @returns True if the action was started successfully, and false otherwise.
*/ */
startAction(type: string, name: string): boolean; startAction(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
/** /**
* Stop current action. * Stop current action.
@ -3158,7 +3292,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @returns Number of milliseconds it takes to complete the specified action. * @returns Number of milliseconds it takes to complete the specified action.
*/ */
getActionTime(type: string, name: string): number; getActionTime(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
/** /**
* Get the time elapsed on current action. * Get the time elapsed on current action.
@ -3186,7 +3323,11 @@ export interface Bladeburner {
* @param sleeveNumber - Optional. Index of the sleeve to retrieve information. * @param sleeveNumber - Optional. Index of the sleeve to retrieve information.
* @returns Estimated success chance for the specified action. * @returns Estimated success chance for the specified action.
*/ */
getActionEstimatedSuccessChance(type: string, name: string, sleeveNumber?: number): [number, number]; getActionEstimatedSuccessChance(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
sleeveNumber?: number,
): [number, number];
/** /**
* Get the reputation gain of an action. * Get the reputation gain of an action.
@ -3202,7 +3343,11 @@ 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. * @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. * @returns Average Bladeburner reputation gain for successfully completing the specified action.
*/ */
getActionRepGain(type: string, name: string, level?: number): number; getActionRepGain(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level?: number,
): number;
/** /**
* Get action count remaining. * Get action count remaining.
@ -3220,7 +3365,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @returns Remaining count of the specified action. * @returns Remaining count of the specified action.
*/ */
getActionCountRemaining(type: string, name: string): number; getActionCountRemaining(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
/** /**
* Get the maximum level of an action. * Get the maximum level of an action.
@ -3235,7 +3383,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @returns Maximum level of the specified action. * @returns Maximum level of the specified action.
*/ */
getActionMaxLevel(type: string, name: string): number; getActionMaxLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
/** /**
* Get the current level of an action. * Get the current level of an action.
@ -3250,7 +3401,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @returns Current level of the specified action. * @returns Current level of the specified action.
*/ */
getActionCurrentLevel(type: string, name: string): number; getActionCurrentLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
/** /**
* Get whether an action is set to autolevel. * Get whether an action is set to autolevel.
@ -3265,7 +3419,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @returns True if the action is set to autolevel, and false otherwise. * @returns True if the action is set to autolevel, and false otherwise.
*/ */
getActionAutolevel(type: string, name: string): boolean; getActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
/** /**
* Get action successes. * Get action successes.
@ -3278,7 +3435,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @returns a number with how many successes you have with action. * @returns a number with how many successes you have with action.
*/ */
getActionSuccesses(type: string, name: string): number; getActionSuccesses(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
/** /**
* Set an action autolevel. * Set an action autolevel.
@ -3291,7 +3451,11 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @param autoLevel - Whether or not to autolevel this action * @param autoLevel - Whether or not to autolevel this action
*/ */
setActionAutolevel(type: string, name: string, autoLevel: boolean): void; setActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
autoLevel: boolean,
): void;
/** /**
* Set the level of an action. * Set the level of an action.
@ -3304,7 +3468,11 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @param level - Level to set this action to. * @param level - Level to set this action to.
*/ */
setActionLevel(type: string, name: string, level: number): void; setActionLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level: number,
): void;
/** /**
* Get player bladeburner rank. * Get player bladeburner rank.
@ -3329,7 +3497,7 @@ export interface Bladeburner {
* @param name - Name of BlackOp. Must be an exact match. * @param name - Name of BlackOp. Must be an exact match.
* @returns Rank required to complete this BlackOp. * @returns Rank required to complete this BlackOp.
*/ */
getBlackOpRank(name: string): number; getBlackOpRank(name: BladeburnerBlackOpName): number;
/** /**
* Get bladeburner skill points. * Get bladeburner skill points.
@ -3354,7 +3522,7 @@ export interface Bladeburner {
* @param skillName - Name of skill. Case-sensitive and must be an exact match. * @param skillName - Name of skill. Case-sensitive and must be an exact match.
* @returns Level in the specified skill. * @returns Level in the specified skill.
*/ */
getSkillLevel(skillName: string): number; getSkillLevel(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`): number;
/** /**
* Get cost to upgrade skill. * Get cost to upgrade skill.
@ -3369,7 +3537,7 @@ export interface Bladeburner {
* @param count - Number of times to upgrade the skill. Defaults to 1 if not specified. * @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. * @returns Number of skill points needed to upgrade the specified skill.
*/ */
getSkillUpgradeCost(skillName: string, count?: number): number; getSkillUpgradeCost(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): number;
/** /**
* Upgrade skill. * Upgrade skill.
@ -3384,7 +3552,7 @@ export interface Bladeburner {
* @param count - Number of times to upgrade the skill. Defaults to 1 if not specified. * @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. * @returns true if the skill is successfully upgraded, and false otherwise.
*/ */
upgradeSkill(skillName: string, count?: number): boolean; upgradeSkill(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): boolean;
/** /**
* Get team size. * Get team size.
@ -3401,7 +3569,10 @@ export interface Bladeburner {
* @param name - Name of action. Must be an exact match. * @param name - Name of action. Must be an exact match.
* @returns Number of Bladeburner team members that were assigned to the specified action. * @returns Number of Bladeburner team members that were assigned to the specified action.
*/ */
getTeamSize(type?: string, name?: string): number; getTeamSize(
type?: BladeburnerActionType | `${BladeburnerActionType}`,
name?: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
/** /**
* Set team size. * Set team size.
@ -3417,7 +3588,11 @@ export interface Bladeburner {
* @param size - Number of team members to set. Will be converted using Math.round(). * @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. * @returns Number of Bladeburner team members you assigned to the specified action.
*/ */
setTeamSize(type: string, name: string, size: number): number; setTeamSize(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
size: number,
): number;
/** /**
* Get estimated population in city. * Get estimated population in city.
@ -4566,11 +4741,15 @@ export interface Sleeve {
* Return a boolean indicating whether or not this action was set successfully. * Return a boolean indicating whether or not this action was set successfully.
* *
* @param sleeveNumber - Index of the sleeve to start taking class. * @param sleeveNumber - Index of the sleeve to start taking class.
* @param university - Name of the university to attend. * @param universityName - Name of the university to attend.
* @param className - Name of the class to follow. * @param courseName - Name of the course to follow.
* @returns True if this action was set successfully, false otherwise. * @returns True if this action was set successfully, false otherwise.
*/ */
setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean; setToUniversityCourse(
sleeveNumber: number,
universityName: UniversityLocationName | `${UniversityLocationName}`,
courseName: UniversityClassType | `${UniversityClassType}`,
): boolean;
/** /**
* Set a sleeve to workout at the gym. * Set a sleeve to workout at the gym.
@ -4584,7 +4763,11 @@ export interface Sleeve {
* @param stat - Name of the stat to train. * @param stat - Name of the stat to train.
* @returns True if the sleeve started working out, false otherwise. * @returns True if the sleeve started working out, false otherwise.
*/ */
setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean; setToGymWorkout(
sleeveNumber: number,
gymName: GymLocationName | `${GymLocationName}`,
stat: GymType | `${GymType}`,
): boolean;
/** /**
* Make a sleeve travel to another city. The cost for using this function is the same as for a player. * Make a sleeve travel to another city. The cost for using this function is the same as for a player.
@ -4670,7 +4853,11 @@ export interface Sleeve {
* @param contract - Name of the contract if applicable. * @param contract - Name of the contract if applicable.
* @returns True if the sleeve started the given Bladeburner action, false otherwise. * @returns True if the sleeve started the given Bladeburner action, false otherwise.
*/ */
setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string): boolean; setToBladeburnerAction(
sleeveNumber: number,
action: BladeburnerActionTypeForSleeve | `${BladeburnerActionTypeForSleeve}`,
contract?: BladeburnerContractName,
): boolean;
} }
/** /**
@ -7893,6 +8080,30 @@ declare enum LocationName {
Void = "The Void", 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 /** Names of all companies
* @public */ * @public */
declare enum CompanyName { declare enum CompanyName {

@ -1,12 +1,12 @@
import { currentNodeMults } from "../../../src/BitNode/BitNodeMultipliers"; import { currentNodeMults } from "../../../src/BitNode/BitNodeMultipliers";
import { Skill } from "../../../src/Bladeburner/Skill"; import { Skill } from "../../../src/Bladeburner/Skill";
import { BladeSkillName } from "../../../src/Enums"; import { BladeburnerSkillName } from "../../../src/Enums";
import { PositiveInteger, isPositiveInteger, isPositiveNumber } from "../../../src/types"; import { PositiveInteger, isPositiveInteger, isPositiveNumber } from "../../../src/types";
import { getRandomArbitrary } from "../../../src/utils/helpers/getRandomArbitrary"; import { getRandomArbitrary } from "../../../src/utils/helpers/getRandomArbitrary";
import { getRandomIntInclusive } from "../../../src/utils/helpers/getRandomIntInclusive"; import { getRandomIntInclusive } from "../../../src/utils/helpers/getRandomIntInclusive";
const skill = new Skill({ const skill = new Skill({
name: BladeSkillName.hyperdrive, name: BladeburnerSkillName.Hyperdrive,
desc: "", desc: "",
baseCost: 1, baseCost: 1,
costInc: 1, costInc: 1,