diff --git a/markdown/bitburner.bladeburner.checkbladeburnerapiaccess.md b/markdown/bitburner.bladeburner.checkbladeburnerapiaccess.md new file mode 100644 index 0000000000..0bd1dabd9c --- /dev/null +++ b/markdown/bitburner.bladeburner.checkbladeburnerapiaccess.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Bladeburner](./bitburner.bladeburner.md) > [checkBladeburnerAPIAccess](./bitburner.bladeburner.checkbladeburnerapiaccess.md) + +## Bladeburner.checkBladeburnerAPIAccess() method + +Check if you have access to the Bladeburner API. + +**Signature:** + +```typescript +checkBladeburnerAPIAccess(): boolean; +``` +**Returns:** + +boolean + +true if you have access to the Bladeburner API, false otherwise. + +## Remarks + +RAM cost: 0 GB diff --git a/markdown/bitburner.bladeburner.iseligible.md b/markdown/bitburner.bladeburner.iseligible.md new file mode 100644 index 0000000000..fc415ea12f --- /dev/null +++ b/markdown/bitburner.bladeburner.iseligible.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Bladeburner](./bitburner.bladeburner.md) > [isEligible](./bitburner.bladeburner.iseligible.md) + +## Bladeburner.isEligible() method + +Check if the player is eligible to join the Bladeburner faction. + +**Signature:** + +```typescript +isEligible(): boolean; +``` +**Returns:** + +boolean + +True if the player is eligible to join the Bladeburner faction, false otherwise. + +## Remarks + +RAM cost: 0 GB diff --git a/markdown/bitburner.bladeburner.md b/markdown/bitburner.bladeburner.md index df8461a3f1..b7c8719a49 100644 --- a/markdown/bitburner.bladeburner.md +++ b/markdown/bitburner.bladeburner.md @@ -20,6 +20,7 @@ You have to be employed in the Bladeburner division and be in BitNode-7 or have | Method | Description | | --- | --- | +| [checkBladeburnerAPIAccess()](./bitburner.bladeburner.checkbladeburnerapiaccess.md) | Check if you have access to the Bladeburner API. | | [getActionAutolevel(type, name)](./bitburner.bladeburner.getactionautolevel.md) | Get whether an action is set to autolevel. | | [getActionCountRemaining(type, name)](./bitburner.bladeburner.getactioncountremaining.md) | Get action count remaining. | | [getActionCurrentLevel(type, name)](./bitburner.bladeburner.getactioncurrentlevel.md) | Get the current level of an action. | @@ -49,6 +50,7 @@ You have to be employed in the Bladeburner division and be in BitNode-7 or have | [getStamina()](./bitburner.bladeburner.getstamina.md) | Get Bladeburner stamina. | | [getTeamSize(type, name)](./bitburner.bladeburner.getteamsize.md) | Get team size. | | [inBladeburner()](./bitburner.bladeburner.inbladeburner.md) | Returns whether player is a member of Bladeburner division. Does not require API access. | +| [isEligible()](./bitburner.bladeburner.iseligible.md) | Check if the player is eligible to join the Bladeburner faction. | | [joinBladeburnerDivision()](./bitburner.bladeburner.joinbladeburnerdivision.md) | Join the Bladeburner division. | | [joinBladeburnerFaction()](./bitburner.bladeburner.joinbladeburnerfaction.md) | Join the Bladeburner faction. | | [nextUpdate()](./bitburner.bladeburner.nextupdate.md) | Sleep until the next Bladeburner update has happened. | @@ -59,4 +61,3 @@ You have to be employed in the Bladeburner division and be in BitNode-7 or have | [stopBladeburnerAction()](./bitburner.bladeburner.stopbladeburneraction.md) | Stop current action. | | [switchCity(city)](./bitburner.bladeburner.switchcity.md) | Travel to another city in Bladeburner. | | [upgradeSkill(skillName, count)](./bitburner.bladeburner.upgradeskill.md) | Upgrade skill. | - diff --git a/markdown/bitburner.ns.settailfontsize.md b/markdown/bitburner.ns.settailfontsize.md index 5d48d89cf3..3abbcb985a 100644 --- a/markdown/bitburner.ns.settailfontsize.md +++ b/markdown/bitburner.ns.settailfontsize.md @@ -31,9 +31,6 @@ RAM cost: 0 GB This overwrites the tail font size and forces an update of the tail window's contents. -The font size is saved across restarts. - If ran without a filename or pid, this will affect the current script's tail window. Otherwise, the PID or filename, hostname/ip, and argsā€¦ arguments can be used to target the tail window from another script. Remember that scripts are uniquely identified by both their names and arguments. - diff --git a/markdown/bitburner.stanek.checkstanekapiaccess.md b/markdown/bitburner.stanek.checkstanekapiaccess.md new file mode 100644 index 0000000000..e1decc464a --- /dev/null +++ b/markdown/bitburner.stanek.checkstanekapiaccess.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Stanek](./bitburner.stanek.md) > [checkStanekAPIAccess](./bitburner.stanek.checkstanekapiaccess.md) + +## Stanek.checkStanekAPIAccess() method + +Check if Stanek's Gift is installed. + +**Signature:** + +```typescript +checkStanekAPIAccess(): boolean; +``` +**Returns:** + +boolean + +true if Stanek's Gift is installed, false otherwise. + +## Remarks + +RAM cost: 0 GB diff --git a/markdown/bitburner.stanek.iseligible.md b/markdown/bitburner.stanek.iseligible.md new file mode 100644 index 0000000000..22fa78af93 --- /dev/null +++ b/markdown/bitburner.stanek.iseligible.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Stanek](./bitburner.stanek.md) > [isEligible](./bitburner.stanek.iseligible.md) + +## Stanek.isEligible() method + +Check if player is eligible for Stanek's Gift. + +**Signature:** + +```typescript +isEligible(): boolean; +``` +**Returns:** + +boolean + +true if the player can receive Stanek's Gift. + +## Remarks + +RAM cost: 0 GB diff --git a/markdown/bitburner.stanek.md b/markdown/bitburner.stanek.md index 8717576b03..599b6318f0 100644 --- a/markdown/bitburner.stanek.md +++ b/markdown/bitburner.stanek.md @@ -20,11 +20,12 @@ interface Stanek | [activeFragments()](./bitburner.stanek.activefragments.md) | List of fragments in Stanek's Gift. | | [canPlaceFragment(rootX, rootY, rotation, fragmentId)](./bitburner.stanek.canplacefragment.md) | Check if fragment can be placed at specified location. | | [chargeFragment(rootX, rootY)](./bitburner.stanek.chargefragment.md) | Charge a fragment, increasing its power. | +| [checkStanekAPIAccess()](./bitburner.stanek.checkstanekapiaccess.md) | Check if Stanek's Gift is installed. | | [clearGift()](./bitburner.stanek.cleargift.md) | Clear the board of all fragments. | | [fragmentDefinitions()](./bitburner.stanek.fragmentdefinitions.md) | List possible fragments. | | [getFragment(rootX, rootY)](./bitburner.stanek.getfragment.md) | Get placed fragment at location. | | [giftHeight()](./bitburner.stanek.giftheight.md) | Stanek's Gift height. | | [giftWidth()](./bitburner.stanek.giftwidth.md) | Stanek's Gift width. | +| [isEligible()](./bitburner.stanek.iseligible.md) | Check if player is eligible for Stanek's Gift. | | [placeFragment(rootX, rootY, rotation, fragmentId)](./bitburner.stanek.placefragment.md) | Place fragment on Stanek's Gift. | | [removeFragment(rootX, rootY)](./bitburner.stanek.removefragment.md) | Remove fragment at location. | - diff --git a/src/Bladeburner/Bladeburner.ts b/src/Bladeburner/Bladeburner.ts index 286602309a..47415e7884 100644 --- a/src/Bladeburner/Bladeburner.ts +++ b/src/Bladeburner/Bladeburner.ts @@ -224,10 +224,14 @@ export class Bladeburner implements OperationTeam { this.joinFaction(); } + isEligible(): boolean { + return this.rank >= BladeburnerConstants.RankNeededForFaction; + } + joinFaction(): Attempt<{ message: string }> { const faction = Factions[FactionName.Bladeburners]; if (faction.isMember) return { success: true, message: `Already a member of ${FactionName.Bladeburners} faction` }; - if (this.rank >= BladeburnerConstants.RankNeededForFaction) { + if (this.isEligible()) { joinFaction(faction); return { success: true, message: `Joined ${FactionName.Bladeburners} faction` }; } @@ -402,15 +406,15 @@ export class Bladeburner implements OperationTeam { this.postToConsole("Automation: " + (this.automateEnabled ? "enabled" : "disabled")); this.postToConsole( "When your stamina drops to " + - formatNumberNoSuffix(this.automateThreshLow, 0) + - ", you will automatically switch to " + - (this.automateActionLow?.name ?? "Idle") + - ". When your stamina recovers to " + - formatNumberNoSuffix(this.automateThreshHigh, 0) + - ", you will automatically " + - "switch to " + - (this.automateActionHigh?.name ?? "Idle") + - ".", + formatNumberNoSuffix(this.automateThreshLow, 0) + + ", you will automatically switch to " + + (this.automateActionLow?.name ?? "Idle") + + ". When your stamina recovers to " + + formatNumberNoSuffix(this.automateThreshHigh, 0) + + ", you will automatically " + + "switch to " + + (this.automateActionHigh?.name ?? "Idle") + + ".", ); } else if (flag.toLowerCase().includes("en")) { if (!this.automateActionLow || !this.automateActionHigh) { @@ -635,8 +639,8 @@ export class Bladeburner implements OperationTeam { if (this.logging.events) { this.log( "Intelligence indicates that a large number of Synthoids migrated from " + - sourceCityName + - " to some other city", + sourceCityName + + " to some other city", ); } } else if (chance <= 0.7) { @@ -920,7 +924,7 @@ export class Bladeburner implements OperationTeam { } else if (!isOperation && this.logging.contracts) { this.log( `${person.whoAmI()}: ${action.name} contract successfully completed! Gained ` + - `${formatBigNumber(gain)} rank and ${formatMoney(moneyGain)}.`, + `${formatBigNumber(gain)} rank and ${formatMoney(moneyGain)}.`, ); } } @@ -1069,17 +1073,17 @@ export class Bladeburner implements OperationTeam { if (this.logging.general) { this.log( `${person.whoAmI()}: ` + - "Training completed. Gained: " + - formatExp(strExpGain) + - " str exp, " + - formatExp(defExpGain) + - " def exp, " + - formatExp(dexExpGain) + - " dex exp, " + - formatExp(agiExpGain) + - " agi exp, " + - formatBigNumber(staminaGain) + - " max stamina.", + "Training completed. Gained: " + + formatExp(strExpGain) + + " str exp, " + + formatExp(defExpGain) + + " def exp, " + + formatExp(dexExpGain) + + " dex exp, " + + formatExp(agiExpGain) + + " agi exp, " + + formatBigNumber(staminaGain) + + " max stamina.", ); } break; @@ -1107,9 +1111,9 @@ export class Bladeburner implements OperationTeam { if (this.logging.general) { this.log( `${person.whoAmI()}: ` + - `Field analysis completed. Gained ${formatBigNumber(rankGain)} rank, ` + - `${formatExp(hackingExpGain)} hacking exp, and ` + - `${formatExp(charismaExpGain)} charisma exp.`, + `Field analysis completed. Gained ${formatBigNumber(rankGain)} rank, ` + + `${formatExp(hackingExpGain)} hacking exp, and ` + + `${formatExp(charismaExpGain)} charisma exp.`, ); } break; @@ -1123,9 +1127,9 @@ export class Bladeburner implements OperationTeam { if (this.logging.general) { this.log( `${person.whoAmI()}: ` + - "Successfully recruited a team member! Gained " + - formatExp(expGain) + - " charisma exp.", + "Successfully recruited a team member! Gained " + + formatExp(expGain) + + " charisma exp.", ); } } else { @@ -1134,9 +1138,9 @@ export class Bladeburner implements OperationTeam { if (this.logging.general) { this.log( `${person.whoAmI()}: ` + - "Failed to recruit a team member. Gained " + - formatExp(expGain) + - " charisma exp.", + "Failed to recruit a team member. Gained " + + formatExp(expGain) + + " charisma exp.", ); } } @@ -1289,8 +1293,8 @@ export class Bladeburner implements OperationTeam { // Min value of maxStamina is an arbitrarily small positive value. It must not be 0 to avoid NaN stamina penalty. const maxStamina = clampNumber( (baseStamina + this.staminaBonus) * - this.getSkillMult(BladeburnerMultName.Stamina) * - Player.mults.bladeburner_max_stamina, + this.getSkillMult(BladeburnerMultName.Stamina) * + Player.mults.bladeburner_max_stamina, 1e-9, ); if (this.maxStamina === maxStamina) { diff --git a/src/Netscript/RamCostGenerator.ts b/src/Netscript/RamCostGenerator.ts index 0c565ac009..468ef5fe36 100644 --- a/src/Netscript/RamCostGenerator.ts +++ b/src/Netscript/RamCostGenerator.ts @@ -282,6 +282,7 @@ const go = { // Bladeburner API const bladeburner = { + checkBladeburnerAPIAccess: 0, inBladeburner: RamCostConstants.BladeburnerApiBase / 4, getContractNames: 0, getOperationNames: 0, @@ -317,6 +318,7 @@ const bladeburner = { getCity: RamCostConstants.BladeburnerApiBase, switchCity: RamCostConstants.BladeburnerApiBase, getStamina: RamCostConstants.BladeburnerApiBase, + isEligible: 0, joinBladeburnerFaction: RamCostConstants.BladeburnerApiBase, joinBladeburnerDivision: RamCostConstants.BladeburnerApiBase, getBonusTime: 0, @@ -363,6 +365,7 @@ const sleeve = { // Stanek API const stanek = { + checkStanekAPIAccess: 0, giftWidth: RamCostConstants.StanekWidth, giftHeight: RamCostConstants.StanekHeight, chargeFragment: RamCostConstants.StanekCharge, @@ -373,6 +376,7 @@ const stanek = { placeFragment: RamCostConstants.StanekPlace, getFragment: RamCostConstants.StanekFragmentAt, removeFragment: RamCostConstants.StanekDeleteAt, + isEligible: 0, acceptGift: RamCostConstants.StanekAcceptGift, } as const; diff --git a/src/NetscriptFunctions/Bladeburner.ts b/src/NetscriptFunctions/Bladeburner.ts index 8836aef260..bbce8e79a4 100644 --- a/src/NetscriptFunctions/Bladeburner.ts +++ b/src/NetscriptFunctions/Bladeburner.ts @@ -21,10 +21,6 @@ import { checkSleeveAPIAccess, checkSleeveNumber } from "../NetscriptFunctions/S import { canAccessBitNodeFeature } from "../BitNode/BitNodeUtils"; export function NetscriptBladeburner(): InternalAPI { - const checkBladeburnerAccess = function (ctx: NetscriptContext): void { - getBladeburner(ctx); - return; - }; const getBladeburner = function (ctx: NetscriptContext): Bladeburner { const apiAccess = canAccessBitNodeFeature(7); if (!apiAccess) { @@ -35,6 +31,7 @@ export function NetscriptBladeburner(): InternalAPI { throw helpers.errorMessage(ctx, "You must be a member of the Bladeburner division to use this API."); return bladeburner; }; + function getAction(ctx: NetscriptContext, type: unknown, name: unknown): Action { const bladeburner = Player.bladeburner; assertString(ctx, "type", type); @@ -61,6 +58,14 @@ export function NetscriptBladeburner(): InternalAPI { } return { + checkBladeburnerAPIAccess: (ctx) => () => { + try { + getBladeburner(ctx); + return true; + } catch (_) { + return false; + } + }, inBladeburner: () => () => !!Player.bladeburner, getContractNames: (ctx) => () => { getBladeburner(ctx); @@ -82,7 +87,7 @@ export function NetscriptBladeburner(): InternalAPI { return { name: blackOp.name, rank: blackOp.reqdRank }; }, getBlackOpRank: (ctx) => (_blackOpName) => { - checkBladeburnerAccess(ctx); + getBladeburner(ctx); const blackOpName = getEnumHelper("BladeburnerBlackOpName").nsGetMember(ctx, _blackOpName); return BlackOperations[blackOpName].reqdRank; }, @@ -144,7 +149,7 @@ export function NetscriptBladeburner(): InternalAPI { } }, getActionRepGain: (ctx) => (type, name, _level) => { - checkBladeburnerAccess(ctx); + getBladeburner(ctx); const action = getAction(ctx, type, name); const level = isLevelableAction(action) ? helpers.number(ctx, "level", _level ?? action.level) : 1; const rewardMultiplier = isLevelableAction(action) ? Math.pow(action.rewardFac, level - 1) : 1; @@ -164,37 +169,37 @@ export function NetscriptBladeburner(): InternalAPI { } }, getActionMaxLevel: (ctx) => (type, name) => { - checkBladeburnerAccess(ctx); + getBladeburner(ctx); const action = getLevelableAction(ctx, type, name); return action.maxLevel; }, getActionCurrentLevel: (ctx) => (type, name) => { - checkBladeburnerAccess(ctx); + getBladeburner(ctx); const action = getLevelableAction(ctx, type, name); return action.level; }, getActionAutolevel: (ctx) => (type, name) => { - checkBladeburnerAccess(ctx); + getBladeburner(ctx); const action = getLevelableAction(ctx, type, name); return action.autoLevel; }, getActionSuccesses: (ctx) => (type, name) => { - checkBladeburnerAccess(ctx); + getBladeburner(ctx); const action = getLevelableAction(ctx, type, name); return action.successes; }, setActionAutolevel: (ctx) => - (type, name, _autoLevel = true) => { - const autoLevel = !!_autoLevel; - checkBladeburnerAccess(ctx); - const action = getLevelableAction(ctx, type, name); - action.autoLevel = autoLevel; - helpers.log(ctx, () => `Autolevel for ${action.name} has been ${autoLevel ? "enabled" : "disabled"}`); - }, + (type, name, _autoLevel = true) => { + const autoLevel = !!_autoLevel; + getBladeburner(ctx); + const action = getLevelableAction(ctx, type, name); + action.autoLevel = autoLevel; + helpers.log(ctx, () => `Autolevel for ${action.name} has been ${autoLevel ? "enabled" : "disabled"}`); + }, setActionLevel: (ctx) => (type, name, _level) => { const level = helpers.positiveInteger(ctx, "level", _level ?? 1); - checkBladeburnerAccess(ctx); + getBladeburner(ctx); const action = getLevelableAction(ctx, type, name); if (level < 1 || level > action.maxLevel) { throw helpers.errorMessage(ctx, `Level must be between 1 and ${action.maxLevel}, is ${level}`); @@ -300,6 +305,14 @@ export function NetscriptBladeburner(): InternalAPI { const bladeburner = getBladeburner(ctx); return [bladeburner.stamina, bladeburner.maxStamina]; }, + isEligible: (ctx) => () => { + try { + const bladeburner = getBladeburner(ctx); + return bladeburner.isEligible(); + } catch (_) { + return false; + } + }, joinBladeburnerFaction: (ctx) => () => { const bladeburner = getBladeburner(ctx); const attempt = bladeburner.joinFaction(); @@ -335,7 +348,7 @@ export function NetscriptBladeburner(): InternalAPI { return Math.round(bladeburner.storedCycles / 5) * 1000; }, nextUpdate: (ctx) => () => { - checkBladeburnerAccess(ctx); + getBladeburner(ctx); if (!BladeburnerPromise.promise) BladeburnerPromise.promise = new Promise((res) => (BladeburnerPromise.resolve = res)); return BladeburnerPromise.promise; diff --git a/src/NetscriptFunctions/Stanek.ts b/src/NetscriptFunctions/Stanek.ts index 0e260901ac..176d0a74d6 100644 --- a/src/NetscriptFunctions/Stanek.ts +++ b/src/NetscriptFunctions/Stanek.ts @@ -14,13 +14,24 @@ import { helpers } from "../Netscript/NetscriptHelpers"; import { getCoreBonus } from "../Server/ServerHelpers"; export function NetscriptStanek(): InternalAPI { + function hasAugmentation() { + return Player.hasAugmentation(AugmentationName.StaneksGift1, true); + } + function checkStanekAPIAccess(ctx: NetscriptContext): void { - if (!Player.hasAugmentation(AugmentationName.StaneksGift1, true)) { + if (!hasAugmentation) { throw helpers.errorMessage(ctx, "Stanek's Gift is not installed"); } } + function getAugmentations() { + return [...Player.augmentations, ...Player.queuedAugmentations].filter( + (a) => a.name !== AugmentationName.NeuroFluxGovernor, + ); + } + return { + checkStanekAPIAccess: () => hasAugmentation, giftWidth: (ctx) => () => { checkStanekAPIAccess(ctx); return staneksGift.width(); @@ -107,14 +118,16 @@ export function NetscriptStanek(): InternalAPI { checkStanekAPIAccess(ctx); return staneksGift.delete(rootX, rootY); }, + isEligible: () => () => { + // You already accepted Stanek's gift. You can use stanek API of course + if (hasAugmentation()) return true; + if (!Player.canAccessCotMG()) return false; + return getAugmentations().length === 0; + }, acceptGift: (ctx) => () => { const cotmgFaction = Factions[FactionName.ChurchOfTheMachineGod]; - // Check if the player is eligible to join the church if (Player.canAccessCotMG()) { - const augs = [...Player.augmentations, ...Player.queuedAugmentations].filter( - (a) => a.name !== AugmentationName.NeuroFluxGovernor, - ); - if (augs.length == 0) { + if (getAugmentations().length == 0) { // Join the CotMG factionn joinFaction(cotmgFaction); // Install the first Stanek aug diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 21e4e2a298..6442b3828e 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -3259,6 +3259,15 @@ export type BladeburnerActionTypeForSleeve = * @public */ export interface Bladeburner { + /** + * Check if you have access to the Bladeburner API. + * @remarks + * RAM cost: 0 GB + * + * @returns true if you have access to the Bladeburner API, false otherwise. + */ + checkBladeburnerAPIAccess(): boolean; + /** * List all contracts. * @remarks @@ -3773,6 +3782,15 @@ export interface Bladeburner { */ getStamina(): [number, number]; + /** + * Check if the player is eligible to join the Bladeburner faction. + * @remarks + * RAM cost: 0 GB + * + * @returns True if the player is eligible to join the Bladeburner faction, false otherwise. + */ + isEligible(): boolean; + /** * Join the Bladeburner faction. * @remarks @@ -4628,12 +4646,12 @@ export interface Go { * * For example, a 5x5 board might look like this: * - [
- "XX.O.",
- "X..OO",
- ".XO..",
- "XXO.#",
- ".XO.#",
+ [
+ "XX.O.",
+ "X..OO",
+ ".XO..",
+ "XXO.#",
+ ".XO.#",
] * * Each string represents a vertical column on the board, and each character in the string represents a point. @@ -4654,12 +4672,12 @@ export interface Go { * * For example, a single 5x5 prior move board might look like this: * - [
- "XX.O.",
- "X..OO",
- ".XO..",
- "XXO.#",
- ".XO.#",
+ [
+ "XX.O.",
+ "X..OO",
+ ".XO..",
+ "XXO.#",
+ ".XO.#",
] */ getMoveHistory(): string[][]; @@ -5491,10 +5509,20 @@ interface ActiveFragment { * @public */ interface Stanek { + /** + * Check if Stanek's Gift is installed. + * @remarks + * RAM cost: 0 GB + * + * @returns true if Stanek's Gift is installed, false otherwise. + */ + checkStanekAPIAccess(): boolean; + /** * Stanek's Gift width. * @remarks * RAM cost: 0.4 GB + * * @returns The width of the gift. */ giftWidth(): number; @@ -5502,6 +5530,7 @@ interface Stanek { * Stanek's Gift height. * @remarks * RAM cost: 0.4 GB + * * @returns The height of the gift. */ giftHeight(): number; @@ -5510,6 +5539,7 @@ interface Stanek { * Charge a fragment, increasing its power. * @remarks * RAM cost: 0.4 GB + * * @param rootX - Root X against which to align the top left of the fragment. * @param rootY - Root Y against which to align the top left of the fragment. * @returns Promise that lasts until the charge action is over. @@ -5587,6 +5617,15 @@ interface Stanek { */ removeFragment(rootX: number, rootY: number): boolean; + /** + * Check if player is eligible for Stanek's Gift. + * @remarks + * RAM cost: 0 GB + * + * @returns true if the player can receive Stanek's Gift. + */ + isEligible(): boolean; + /** * Accept Stanek's Gift by joining the Church of the Machine God * @remarks