how to reroll pair dices

how to reroll pair dices

Return to topic list

Tue Apr 22 22:55:25 2014   by   Daniel
Hi Torben,

I want to sum 3d8, but only if have no duplicate...if have 2 or 3 equals I want a reroll until have only different.

I try this but doesnt work:
repeat x:=d8 y:=d8 w:=d8 until (count different {x,y,w}) = 3

sum {x,y,w}

do you know a way to do this? Thanks.
Wed Apr 23 09:55:31 2014   by   Torben
You can do it this way:

sum repeat x := 3d6 until (count different x) = 3

The reason your variant does not work is that you can have only one assignment between repeat and until.
Wed Apr 23 15:52:43 2014   by   Daniel
Whell, I tried to simplify my problem but I confuse more...

I need x,y and w because at realy I donīt sum all of them in the end...I will compare x and y, them compare the with w.

There any way to reroll 3 dices until have no pares, and them get x,y,w to make my comparations?

Thu Apr 24 09:33:44 2014   by   Torben
One way you could do it is to reroll the three dice as a group (like in my previous reply) and then randomly select which of the three is x, y and w.  You can do that this way:

xyw := repeat a := 3d6 until (count different a) = 3;
x := xyw pick 1;        \ pick one as x
y := (xyw -- x) pick 1; \ remove x and pick one of the remainder as y
w := xyw -- {x,y};      \ remove x and y and let w be the remainder
\ do whatever you need to x, y and w

Statistically, this gives the same result as if you pick which dice are x, y and z beforehand and then reroll all until they are different.
Thu Apr 24 15:09:56 2014   by   Daniel
Thanks Torben,

By the way, I want to know if I may mention you and the Troll in the acknowledgment of my book that will be released in 2 or 3 years. Is an indie RPG and Troll was critical for the dice mechanic development.
Fri Apr 25 10:22:44 2014   by   Torben
A mention would be nice, thank you, (but not required).

Return to topic list

New message:
Posted by:

Type the values of the dice shown below:

Return to topic list