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.)
|
|
|
|
|
2023-02-11 19:18:50 +01:00
|
|
|
**Signature:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
```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 |
|
|
|
|
| --- | --- | --- |
|
2023-02-17 09:14:20 +01:00
|
|
|
| server | [Server](./bitburner.server.md) | Server info, typically from [getServer](./bitburner.ns.getserver.md) |
|
|
|
|
| player | [Person](./bitburner.person.md) | Player info, typically from [getPlayer](./bitburner.ns.getplayer.md) |
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2023-02-11 19:18:50 +01:00
|
|
|
**Returns:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
number
|
|
|
|
|
|
|
|
The calculated hack chance.
|
|
|
|
|