2022-10-21 17:16:00 +02:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [Bladeburner](./bitburner.bladeburner.md) > [getStamina](./bitburner.bladeburner.getstamina.md)
|
|
|
|
|
|
|
|
## Bladeburner.getStamina() method
|
|
|
|
|
2023-10-23 10:24:30 +02:00
|
|
|
Get Bladeburner stamina.
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2023-02-11 19:18:50 +01:00
|
|
|
**Signature:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
getStamina(): [number, number];
|
|
|
|
```
|
2023-02-11 19:18:50 +01:00
|
|
|
**Returns:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
\[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
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
|
2023-04-28 20:19:30 +02:00
|
|
|
```js
|
2022-10-21 17:16:00 +02:00
|
|
|
function getStaminaPercentage() {
|
|
|
|
const [current, max] = ns.bladeburner.getStamina();
|
|
|
|
return current / max;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|