mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
IPVGO: Provide API for getting game stats per opponent (#1255)
Give users access to wins, losses, stat bonuses, and favor gained
This commit is contained in:
committed by
GitHub
parent
35c32e2871
commit
b53c35126e
33
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
33
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -3949,6 +3949,17 @@ type GoOpponent =
|
||||
| "Illuminati"
|
||||
| "????????????";
|
||||
|
||||
/** @public */
|
||||
type SimpleOpponentStats = {
|
||||
wins: number;
|
||||
losses: number;
|
||||
winStreak: number;
|
||||
highestWinStreak: number;
|
||||
favor: number;
|
||||
bonusPercent: number;
|
||||
bonusDescription: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* IPvGO api
|
||||
* @public
|
||||
@@ -4167,6 +4178,28 @@ export interface Go {
|
||||
* (This is intentionally expensive; you can derive this info from just getBoardState() )
|
||||
*/
|
||||
getControlledEmptyNodes(): string[];
|
||||
|
||||
/**
|
||||
* Displays the game history, captured nodes, and gained bonuses for each opponent you have played against.
|
||||
*
|
||||
* The details are keyed by opponent name, in this structure:
|
||||
*
|
||||
* <pre lang="javascript">
|
||||
* {
|
||||
* <OpponentName>: {
|
||||
* wins: number,
|
||||
* losses: number,
|
||||
* winStreak: number,
|
||||
* highestWinStreak: number,
|
||||
* favor: number,
|
||||
* bonusPercent: number,
|
||||
* bonusDescription: string,
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
getStats(): Partial<Record<GoOpponent, SimpleOpponentStats>>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user