bitburner-src/markdown/bitburner.bladeburner.getstamina.md
omuretsu 06a985bdf8 Revert "Remove markdown from git tracking (#139)"
This reverts commit bbb6e3f309935aebac74ddb1fbeec12dfb7540b1.
2022-10-21 11:16:00 -04:00

46 lines
844 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Bladeburner](./bitburner.bladeburner.md) &gt; [getStamina](./bitburner.bladeburner.getstamina.md)
## Bladeburner.getStamina() method
Get bladeburner stamina.
<b>Signature:</b>
```typescript
getStamina(): [number, number];
```
<b>Returns:</b>
\[number, number\]
Array containing current stamina and max stamina.
## Remarks
RAM cost: 4 GB Returns an array with two elements: \* \[Current stamina, Max stamina\]
## Example 1
```ts
// NS1:
function getStaminaPercentage() {
var res = bladeburner.getStamina();
return res[0] / res[1];
}
```
## Example 2
```ts
// NS2:
function getStaminaPercentage() {
const [current, max] = ns.bladeburner.getStamina();
return current / max;
}
```