Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouped Roll Modifiers issue #1

Open
frankieali opened this issue Mar 17, 2022 · 0 comments
Open

Grouped Roll Modifiers issue #1

frankieali opened this issue Mar 17, 2022 · 0 comments

Comments

@frankieali
Copy link

Rolling {3d20+5}>21f<10 - an example roll on roll20 dice reference failed to produce the proper result.

Roll 3 d20's, for each roll add 5 and then count a success for each result of 21 or more and count a failure for each result of 10 or less.

Rolled a 20, 19, 15. Plus 5 would be 25, 24, 20. That should be 2 successes and one null. Instead got three null values. See data below.

A simple group roll of {3d20+5} rolled 4, 5, 11 = 25 indicating that the +5 is being added after summing up the values instead of adding +5 to all three values. So the issue is in group rolls, not success or failure calculations.

{
    "dice": [
        {
            "dice": [
                {
                    "count": {
                        "type": "number",
                        "value": 3,
                        "success": null,
                        "successes": 0,
                        "failures": 0,
                        "valid": true,
                        "order": 0
                    },
                    "die": {
                        "type": "number",
                        "value": 20,
                        "success": null,
                        "successes": 0,
                        "failures": 0,
                        "valid": true,
                        "order": 0
                    },
                    "rolls": [
                        {
                            "critical": null,
                            "die": 20,
                            "matched": false,
                            "order": 0,
                            "roll": 19,
                            "success": false,
                            "successes": 0,
                            "failures": 0,
                            "type": "roll",
                            "valid": true,
                            "value": 0
                        },
                        {
                            "critical": null,
                            "die": 20,
                            "matched": false,
                            "order": 1,
                            "roll": 15,
                            "success": false,
                            "successes": 0,
                            "failures": 0,
                            "type": "roll",
                            "valid": true,
                            "value": 0
                        },
                        {
                            "critical": "success",
                            "die": 20,
                            "matched": false,
                            "order": 2,
                            "roll": 20,
                            "success": false,
                            "successes": 0,
                            "failures": 0,
                            "type": "roll",
                            "valid": true,
                            "value": 0
                        }
                    ],
                    "success": null,
                    "successes": 0,
                    "failures": 0,
                    "type": "die",
                    "valid": true,
                    "value": 54,
                    "order": 0,
                    "matched": false
                },
                {
                    "type": "number",
                    "value": 5,
                    "success": null,
                    "successes": 0,
                    "failures": 0,
                    "valid": true,
                    "order": 0
                }
            ],
            "ops": [
                "+"
            ],
            "success": null,
            "successes": 0,
            "failures": 0,
            "type": "diceexpressionroll",
            "valid": true,
            "value": 0,
            "order": 0
        }
    ],
    "success": false,
    "successes": 0,
    "failures": 0,
    "type": "grouproll",
    "valid": true,
    "value": 0,
    "order": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant