I've been trying to use AnyDice to calculate some stuff and got completely overwhelmed (never used it properly before).
I'm trying to do something along the lines of:
Roll n + p amount of d10 dice. If any of those result in 1, check for each 1 roll 1d10 + p.
In this sequence I'm trying to see what are the odds that at least one of the dice will result in 1 and what would the secondary roll result spread would be.
Is it possible to do something like this? Because I'm already failing at trying to compare the dice to a number and assigning variables does not seem to help. I think I jumped into something too complex for a first more serious use of the system.
EDIT: Basically the first roll is for casting a spell and 1s represent mishaps. For each 1 you roll onto table which has 10 entries (the higher the number, the more severe result). Adding extra dice p (pushing) makes those table results worse. I want to see how quickly and how bad that can go. If I add 1 extra die, what's the chance to get a mishap and how bad, if i add 2, etc (apologies if too much details, not sure how else to clarify this).
So far I managed to count number of 1s (i think)
function: hitme N:n plus P:n {
X: N + P
result: [count {1} in X d10]
}
output [hitme 4 plus 2]
EDIT2:
You guys are right. I think I was over-complicating the issue. The second half is indeed very straightforward (simple roll with static number value addition). The first one was the real issue.
output [hitme 4 plus 2]
output [hitme 4 plus 3]
etc To see what's the chance of rolling 1s (like 20% to roll one 1) and then what are the chances to get which values on the second roll (having in mind that it will have a static modifier) \$\endgroup\$(N + P)d(d10 = 1)
. But I'm still not sure what you want to do with the result after that. Could you try to describe that part of your mechanic more clearly, more or less like if you were explaining it to your players? \$\endgroup\$