I am making a game where players can win or lose based on dice they throw.
Player throws $M$ number of dice.
By default a success is considered when a die rolls $5$ or $6$.
Player needs to get $N$ successful dice to win.
The basic formula to calculate the probability of the player winning looks like this (Cumulative Binomial Distribution):
$$1 - \sum_{k=0}^{N-1} \binom{M}{k} p^k (1-p)^{M-k} $$
Then $p = 2 / 6$ (probability of success where $5$ & $6$ are considered as success)
The player can also have different effects during the game that increase their chances:
Blessed - Dice sides that count as success: $4 ,5 ,6$
Cursed - Dice sides that count as success: $6$
In these cases I just change the $p$ to $3 / 6$ in case of Blessed and to $1 / 6$ in cased of Cursed.
Now I have the problem calculating the probability in the following case:
"Each $6$ your roll counts as $2$ successes" - I guess this is self explanatory. So now each dice that rolls a $6$ will be considered as $2$ successes.
How can I adapt my formula to take this effect into consideration?
Let me know if something is not clear.
Edit: By default when you throw a die you can get the following results:
$$\matrix{1 &\text{fail}\\ 2 &\text{fail}\\ 3 &\text{fail}\\ 4 &\text{fail}\\ 5 &\text{success}\\ 6 &\text{success}}$$
When player is Blessed it changes to: $$\matrix{1 &\text{fail}\\ 2 &\text{fail}\\ 3 &\text{fail}\\ 4 &\text{success}\\ 5 &\text{success}\\ 6 &\text{success}}$$
When player is Cursed, you get: $$\matrix{1 &\text{fail}\\ 2 &\text{fail}\\ 3 &\text{fail}\\ 4 &\text{fail}\\ 5 &\text{fail}\\ 6 &\text{success}}$$
Edit2: Let's forget about dice for a second. Seems like I won't be able to reuse the old formula.
Let's say that each turn for $M$ turns, I get a value with the following probability:
$$\matrix{Value &Normal&Blessed&Cursed\\ 0 &4/6 & 3/6 & 5/6\\ 1 &1/6 & 2/6 & 0/6\\ 2 &1/6 & 1/6 & 1/6\\ }$$
How do I calculate the probability that the sum of the values is at least $N$ or bigger?
A different way to do (maybe easier, computationally speaking) is just using a generating function of the kind
$$g(x)=(q+p_1x+p_2x^2)^M\tag{1}$$
that represents the act of throwing $M$ dice, where sides of dice with probability $q$ add zero points, sides of dice with probability $p_1$ add one point and sides of dice with probability $p_2$ add two points.
When we expand $g$ we have that each monomial $c_kx^k$ represent the probability $c_k$ to have $k$ successes in the throw. Hence using the multinomial theorem (with multi-index notation) we have that
$$g(x)=\sum_{|\alpha|=M}\binom{M}{\alpha}q^{\alpha_1}(p_1x)^{\alpha_2}(p_2x^2)^{\alpha_3},\quad \alpha\in\Bbb N^3_{\ge 0}\tag{2}$$
Using a program we can easily choose the coefficients that we are interested on. By example using the Wolfram language we can use the code
After we can call the function defined above, by example
gives the result $\approx 55\%$. This means that the probability of victory, for $N=5$, when you throw ten dice ($M=10$), when a six give two points ($p_2=1/6$) and a five give one point ($p_1=1/6$), is approximately of $55\%$.
Obviously when we set $N=0$ we get a $100\%$ probability of victory!
The above will not be too hard to adapt to other programming languages, by example other major CAS as Sage, R, etc...
The charts in this image give some idea about how the game works. In the chart the term "double" in each title means when the $6$ give two points instead of just one. I added too the mechanic that there is a side of the dice that subtract one success and I named it as "cancellation".
For each chart the y-axis represent the probability (in %) to win when you need the number of success labeled in the x-axis.
P.S.: if you need the notebook is here.