bitburner-src/markdown/bitburner.bladeburner.getstamina.md

34 lines
692 B
Markdown
Raw Normal View History

<!-- 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.
**Signature:**
```typescript
getStamina(): [number, number];
```
**Returns:**
\[number, number\]
Array containing current stamina and max stamina.
## Remarks
RAM cost: 4 GB Returns an array with two elements: \* \[Current stamina, Max stamina\]
2023-04-28 20:19:30 +02:00
## Example
2023-04-28 20:19:30 +02:00
```js
function getStaminaPercentage() {
const [current, max] = ns.bladeburner.getStamina();
return current / max;
}
```