Code Monkey home page Code Monkey logo

Comments (3)

obiwankennedy avatar obiwankennedy commented on July 3, 2024

First of all, the right command should be something like that: !3d6r[:<10]
Yes, it does not do what you want but the other syntaxes are wrong.

!3d6r[<10] is always true
!3d6r[?<10] is always true

I'm investigating the issue about the right syntax but I thing the R/r/a/e operator does not manage validator's compare method, they always do it as "on each dice".

from diceparser.

ACleverDisguise avatar ACleverDisguise commented on July 3, 2024

Well, when I tried the syntax that looked right and it failed, I also tried every other variant (because the docs aren't written for comprehension). I even tried * and . as operators, knowing that they're not going to work either, just to be complete. Grouping. Lower-case or upper-case R. *, ., :, or nothing. It all failed.

So how would I go about making a "3d6, reroll if under 10" using the DiceParser?

from diceparser.

obiwankennedy avatar obiwankennedy commented on July 3, 2024

As I said, I'm investigating on the issue about the right syntax. And it is was I thought Reroll does not manage compare methods for validator. I'm trying to add its support but it is an important change.

As a work around, you can use the if operator:

!3d6;$1i:[<10]{3d6};"Final score: $2"

If you want to check each result:

!3d6;$1i:[<10]{3d6};"Results: $1 - $2"

from diceparser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.