In Marvel Multiverse Role-Playing Game, the players roll d616. It means that they roll 3d6, but:
- One die has a different color, its 1 counts as a 6 and it's called the Marvel die, which would mean
1d{6,2,3,4,5,6}
; - The other two dice are normal d6s, which means they total 2d6;
- I believe a normal roll would be 1d{6,2,3,4,5,6} + 2d6;
output 1d{6,2,3,4,5,6} + 2d6
The complicated part is when you add Edges and Troubles:
- If you add an Edge, you reroll the lowest die and keep the highest result for that die between the roll and the reroll;
- If you add a Trouble, you reroll the highest die and keep the lowest result for that die between the roll and the reroll;
- When you reroll because of an Edge or a Trouble, it doesn't matter which die it is, it can be the Marvel die (
d{6,2,3,4,5,6}
) or any of the other two d6s; - Your Edges and Troubles are cumulative (e.g., you can roll with 2 Edges or 3 Troubles);
- An Edge eliminates a Trouble (i.e., you cannot roll with Edges and Troubles at the same time, 2 Edges and 3 Troubles becomes 1 Trouble);
I've been trying to create a function where I can inform in a parameter if the roll gets Edges (1,2,3,...), Troubles (-1,-2,-3,...), or no modifier (0), and it gives me the probabilities for each result since last Friday, but I simply can't.
Can anyone help me get there?
EDITED FOR MORE CLARITY:
Edges and Troubles have priorities:
- For Edges: If you have 2 lowest numbers, you reroll the Marvel Die (the most advantageous to reroll and get a higher number). If you rolled 3, 3, and 6, and one of the 3s is the Marvel Die, you reroll it to try and replace it with a higher number;
- For Troubles: If you have 2 highest numbers, you reroll one of the normal dice (the lest advantageous to reroll and get a lower number). If you rolled 3, 3, and 6, and one of the 3s is the Marvel Die, you reroll the normal one to prevent the Marvel Die from getting lower that it already is;
Stacked Edges and Troubles work one at a time:
- If you rolled 1, 3, and 6 and had two Edges, your first Edge would reroll the 1. Imagine you rerolled the 1 and got a 2, then you would have the sequence 2, 3, and 6. your second edge would reroll the 2.
- If you rolled 1, 3, and 6 and had two Troubles, your first Trouble would reroll the 6. If you rerolled the 6 and got 2, you would then have 1, 2, and 3. Your second Trouble would reroll the 3.
Stacked Edged and Troubles with priorities:
- If you rolled 1, 3, and 6 and had two Edges, your first Edge would reroll the 1. Imagine you rerolled the 1 and got a 3, then you would have the sequence 3, 3, and 6. If one of the 3s if the Marvel Die, you reroll it.
- If you rolled 1, 3, and 6 and had two Troubles, your first Trouble would reroll the 6. If you rerolled the 6 and got 3, you would then have 1, 3, and 3. If one of the 3s is your Marvel Die, your second Trouble would reroll the 3 from the normal die.