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) > [HackingFormulas](./bitburner.hackingformulas.md) > [hackChance](./bitburner.hackingformulas.hackchance.md)
|
|
|
|
|
|
|
|
## HackingFormulas.hackChance() method
|
|
|
|
|
|
|
|
Calculate hack chance. (Ex: 0.25 would indicate a 25% chance of success.)
|
|
|
|
|
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
2022-11-20 18:07:22 +01:00
|
|
|
hackChance(server: Server, player: Person): number;
|
2022-10-21 17:16:00 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
|
2022-11-20 18:07:22 +01:00
|
|
|
| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
|
|
|
number
|
|
|
|
|
|
|
|
The calculated hack chance.
|
|
|
|
|