DiceParser icon indicating copy to clipboard operation
DiceParser copied to clipboard

New Feature Request: Support for Tunnels and Trolls DARO/TARO

Open sirkerry opened this issue 4 years ago • 8 comments

A feature to consider: The game system Tunnels and Trolls has a thing similar to exploding dice, but slightly different. It's doubles and triples of the same value rolled get added and rolled over.

If possible, would be a nice feature to add.

sirkerry avatar Aug 20 '19 21:08 sirkerry

Could you give me an example with details on values and when reroll/add must be trigger. I don't know the Tunnels and Trolls system.

obiwankennedy avatar Aug 21 '19 22:08 obiwankennedy

Sure, this occurs with 2d6 (aka DARO - Doubles And Roll Again) and 3d6 (aka TARO - Triples And Roll Again) rolls. So when rolling 2d6 if you roll the same number on both dice (i.e. doubles,) you would roll the 2d6 again and add to the original roll and keep doing so until doubles were not rolled. And when rolling 3d6 if you roll the same number on all 3 dice (i.e. triples) you would roll the 3d6 again and add to original roll and keep doing so until triples were not rolled again.

sirkerry avatar Aug 22 '19 00:08 sirkerry

So if I understand well:

Example 1 DARO:

Roll

2d6

Result

[2,5]

No double, we stop! Final result => 2+5 = 7 Right ?

Example 2 DARO:

Roll

2d6

Result

[5,5]

Roll again and add

2d6

Result

[6,3]

No more double, we stop! Final result => 5+5+6+3 => 19

Example 1 TARO:

Roll

3d6

Result

[2,5,6]

No triple, we stop! Final result => 2+5+6 = 13

Example 2 TARO:

Roll

3d6

Result

[5,5,5]

Roll again and add

3d6

Result

[6,3,2]

No more triple, we stop! Final result => 5+5+5+6+3+2 => 26


Questions

The detection of double is only triggered when we roll 2d6. If there is a double when we roll 3d6 ([5,5,1]), Do we need to reroll or not ?

Because the condition is not double or triple, currently the condition is "While all dice have the same values then reroll and add"

obiwankennedy avatar Aug 22 '19 09:08 obiwankennedy

Sorry for not being clearer. Your examples are all correct. And yes the double or triple condition is actually "While all dice have the same values then reroll and add". If there's a double in a roll of 3d6 it's ignored, it's has to be all dice values match to trigger the Add Roll Again.

sirkerry avatar Aug 22 '19 15:08 sirkerry

I worked a bit on it. And there is two options:

Add a specific node which managed exactly this behaviour or make it more generic and improve current operators to managed this behaviour.

First solution will produce command lines like this:

3d6t > node of type T will do the job.

But T is node really specific to Tunnels and Trolls system and I did not design diceparser to get some specific game code.

The other way is to manage comparing method in every operator. Which make diceparser so much powerful. So we will be able to write:

3d6r[=] // meaning reroll when ALL are equals to ALL


First solution will be implemented quickly and when the second is ready, the first will be removed.

obiwankennedy avatar Sep 04 '19 08:09 obiwankennedy

That sounds great, thanks!

sirkerry avatar Sep 04 '19 14:09 sirkerry

commit d94207bc22768e579766b281c28f211d25d2d9d4 provide the t operator. I will test it a bit and then deploy it for the discord bot, in few days.

obiwankennedy avatar Sep 26 '19 12:09 obiwankennedy

@obiwankennedy has any work been done on the comparison operator? I was looking to implement a system where matching doubles or triples get reported from a larger role (so for example something like 5d6[=*]kl1 to report the lowest set of doubles, if I understand your proposed syntax correctly)

nightpool avatar Jul 04 '21 16:07 nightpool