Mezryss / FVTT-Genesys

Foundry VTT: Unoffocial implementation of the Genesys RPG
MIT License
26 stars 11 forks source link

Adds alternate way to calculate chance to succeed #104

Closed Assembling-Kings closed 11 months ago

Assembling-Kings commented 11 months ago

A while back I published a PR that made it possible to see the chance to succeed of a dice pool by means of simulation (#77). In the comments 'thirionlogan' pointed out at an alternative way of calculating the chance to succeed. I have since gone over the code he referenced and have created my own version. Basically the new method constructs all the possible permutations of rolling the dice pool, aggregating those that are similar. It then goes over every permutation and checks which meets a specific criteria and compares those to the total amount. This way we can get an exact value for the chance to succeed.

There are a few caveats:

image image