2021-10-30 18:34:14 +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
|
|
|
|
|
|
|
|
You have to be employed in the Bladeburner division and be in BitNode-7 or have Source-File 7 in order to use this function.
|
|
|
|
|
|
|
|
Returns an array with two elements: \* \[Current stamina, Max stamina\]
|
|
|
|
|
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
getStamina(): [number, number];
|
|
|
|
```
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
|
|
|
\[number, number\]
|
|
|
|
|
|
|
|
Array containing current stamina and max stamina.
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
2021-10-30 21:46:34 +02:00
|
|
|
RAM cost: 4 GB
|
2021-10-30 18:34:14 +02:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
|
2021-10-30 21:46:34 +02:00
|
|
|
```ts
|
2021-10-30 18:34:14 +02:00
|
|
|
function getStaminaPercentage() {
|
|
|
|
let res = bladeburner.getStamina();
|
|
|
|
return res[0] / res[1];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|