Add the Encryption Glitch

This commit is contained in:
Olivier Gagnon 2024-06-09 21:46:59 -04:00
parent e0cd360d4c
commit 548f08ce62
No known key found for this signature in database
GPG Key ID: 0018772EA86FA03F
5 changed files with 11 additions and 4 deletions

@ -92,7 +92,6 @@ export const NewOSocket = (name: string, x: number, y: number) => {
name,
type: DeviceType.OSocket,
isBusy: false,
tier: 0,
x,
y,
currentRequest: getNextISocketRequest(0),

@ -52,7 +52,7 @@ export const getNextISocketRequest = (tier: number) => {
export const tierScale: Record<DeviceType, FactoryFormulaParams> = {
[DeviceType.Bus]: [Infinity, Infinity, Infinity, Infinity],
[DeviceType.ISocket]: [Infinity, Infinity, Infinity, Infinity],
[DeviceType.OSocket]: [2, 1, 3, 0],
[DeviceType.OSocket]: [Infinity, Infinity, Infinity, Infinity],
[DeviceType.Reducer]: [1.5, 1, 2, 0],
[DeviceType.Cache]: [Infinity, Infinity, Infinity, Infinity],
[DeviceType.Lock]: [Infinity, Infinity, Infinity, Infinity],

@ -91,3 +91,11 @@ When Virtualization is active busses install and uninstall devices more slowly.
### Jamming
When Jamming is active busses use reducers more slowly.
## Roaming
When Roaming is active, isockets and osockets start to move around the map
## Encryption
Encryption is the only glitch that's always active. The level of Encryption determines the complexity of the requests made by osockets.

@ -216,7 +216,7 @@ export function NetscriptMyrian(): InternalAPI<IMyrian> {
myrian.vulns += gain;
myrian.totalVulns += gain;
container.content = [];
const request = getNextISocketRequest(container.tier);
const request = getNextISocketRequest(myrian.glitches[Glitch.Encryption]);
container.currentRequest = request;
container.maxContent = request.length;
}

@ -5281,7 +5281,7 @@ export interface ISocket extends ContainerDevice {
cooldownUntil: number;
}
export interface OSocket extends ContainerDevice, TieredDevice {
export interface OSocket extends ContainerDevice {
type: DeviceType.OSocket;
currentRequest: Component[];
}