Re: Parsing a Dice Roll String

new topic     » goto parent     » topic index » view thread      » older message » newer message

Christian Cuvier wrote:
> euphoric wrote:
> > (<number>d<sides>)+(<number>d<sides>|<constant>)...
> > 
> > Where + is any operator and <constant> is "Highest," "Lowest,"
> > an actual number, or whatever other value I can come up with to
> > modify the roll.
> > 
> This is the issue.
> First off, are things like "4d(3d6-Highest)" allowed (perform 4 times the roll
>
> described inside the inner parentheses)?

That formula wouldn't perform what's inside the parens four times.
Instead, it would create the number of faces using the formula inside
the parens, then roll 4 dice with that number of faces.

So, for instance, 2d(3d4) would roll two dice whose sides equalled
from 3 up to 12.

If you want to repeat a roll action, use something like

   4:3d4

Which would now roll 3d4 four times and provide each result.

In the simple version, we can ignore these types. In the advanced
version, sure, why not? The only reason I can see for doing that
would be statistical analysis. It wouldn't be very applicable.

> Second, "would 4d6-Highest-Highest" be legal?
> If so, would it mean "4d9-2*Highest" or "4d6 and remove the two highest 
> outcomes, adding up the rest"?

Right, but remember that

    4d9-2*Highest

is not the same as

    4d9-1stHighest-2ndHighest

> Should we parse '6d6-H3" (remove third highest individual outcome)?
> Then, wht about "6d6-3L" (remove the three lowest individual oitcomes)?

Yeah, sure! (Again, maybe for the advanced version. ;) )

> I may start coding this WE if I get all questions answered before Friday 
> 17:00UTC. And, you know the kind of nasty questions that can arise when one 
> starts coding :D

Well, get at it! And send me questions when ya got 'em.

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu