Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Dice Pools and counting hits #22

Closed
manchuwook opened this issue Jan 27, 2018 · 6 comments
Closed

Question: Dice Pools and counting hits #22

manchuwook opened this issue Jan 27, 2018 · 6 comments

Comments

@manchuwook
Copy link

manchuwook commented Jan 27, 2018

What would be the roll notation for 13 10-sided dice, count hits where the number on the dice is 5 or higher?
e.g. [10,5,5,4,3,1,8,8,10,4,2,10,1] = 7 hits

What would it be where 10s count as double? In the previous example, it would instead be 10 hits.

@GreenImp
Copy link
Collaborator

It's currently not possible to use dice pools in a success / failure way. The system isn't built to count valid rolls, based on a pre-defined target number (In your case 5).

I do think that this should be implemented.

Using the same notation as for compare points on exploding / penetrating dice is probably the most sensible, but will mean that you can't do success / failure on exploding / penetrating dice.

You get then do something like:

13d10>=5: [10,5,5,4,3,1,8,8,10,4,2,10,1] = 7 hits // success is greater than or equal to 5
2d6>=4: [3,4,6,2] = 2 hits // success is greater than or equal to 4
2d6<3: [3,4,6,2] = 2 hits // success is less than 2
2d6=6: [3,4,6,2] = 1 hits // success is equal to 6

I've opened issue #23 for implementing this feature. I welcome pull requests if you're able to implement it. Otherwise I will take a look as soon as I can.

I'm not sure how you would specify to count 10s as two hits, rather than one though. That seems a bit more difficult.

Calculating manually

I know it's not ideal, but you could calculate this manually, by looping through the roll log and checking the values.

To get the logs, call the DiceRoller.getLog() method, which returns an array of DiceRoll objects.
Each DiceRoll object has a rolls property, for each actual roll. You can check the values of the rolls, determine whether to include it (If it's greater than or equal to 5), and whether it's worth double "hits").

An example of how to read from the logs can be seen in the dice-roller.js

@GreenImp
Copy link
Collaborator

Closing as separate issue for functionality exists (#23)

@manchuwook
Copy link
Author

Thank you for looking into this as a feature. I will take a look at looping through the log as you suggested.

@GreenImp
Copy link
Collaborator

Let me know how you get on.

This issue on next on my todo.

@GreenImp
Copy link
Collaborator

GreenImp commented Jun 29, 2018

Hi @manchuwook sorry for the delay. I have implemented dice pools, and it's now available under v1.5.0.
You can check the related issue #23

Hopefully it works as expected. Please let me know if you have any issues.

@manchuwook
Copy link
Author

Sweet christmas! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants