ironmonk88 / monks-tokenbar

GNU General Public License v3.0
47 stars 44 forks source link

[BUG] tokenbar redirect issue #478

Open WizardForHire123 opened 5 months ago

WizardForHire123 commented 5 months ago

Describe the bug when rolling a save in pf2e seems to be passing a failure regardless

To Reproduce Steps to reproduce the behavior:

  1. create a tile with a success and failure condition.
  2. Redirect based on results.
  3. Profit?

Expected behavior A clear and concise description of what you expected to happen. Please complete as much of the following information as possible:

Additional context Add any other context about the problem here.

Screenshots https://photos.google.com/lr/photo/AN_hkrU9H5-_8daQ9iPXD3xrQm5CGA0696J8ycjzbk5pm2WY4NY3iEddZ30br96cx-_CUAjW72cfrtyrhuJQ5M3uGS-6kMU_1w

If applicable, add screenshots to help explain your problem.


    "user": "M8SGJbaRDHxs3mwY",
    "content": "<div class=\"monks-tokenbar savingthrow chat-card\">\n    <header class=\"card-header flexrow\">\n        <h3 class=\"item-name noborder\">Will Saving Throw</h3>\n        <div class=\"item-controls flexrow\" style=\"text-align:right;flex:0 0 55px\">\n            <h3 class=\"gm-only noborder\">DC: 25</h3>\n        </div>\n    </header>\n    <div class=\"message-content\" style=\"margin:5px 0px\">\n        <div class=\"card-content\"></div>\n\t    <div class=\"form-group sheet actor\">\n            <ol class=\"items-list inventory-list\" style=\"overflow-y:visible\">\n                <li class=\"items-header flexrow\">\n                    <h3 class=\"item-name noborder flexrow\">Actors</h3>\n\n                    <div class=\"item-controls flexrow\">\n                        <a class=\"item-control roll-all gm-only\" title=\"Roll All\" data-control=\"all\">\n                            <i class=\"fas fa-users\"></i>\n                        </a>\n                        <a class=\"item-control roll-npc gm-only\" title=\"Roll NPCs\" data-control=\"npc\">\n                            <i class=\"fas fa-users-cog\"></i>\n                        </a>\n                    </div>\n                </li>\n\n                <ol class=\"item-list\">\n                    <li class=\"item flexcol \" data-item-id=\"GUSUrkOZ4kwBa5vY\" style=\"display:none\">\n                        <div class=\"flexrow token-roll-container\">\n                            <div class=\"dice-roll flexcol\">\n                                <div class=\"item-row flexrow\">\n                                    <div class=\"item-name flexrow\">\n                                        <div class=\"item-image\" style=\"background-image:url('https://assets.forge-vtt.com/6216e39e4fabb3c5ba409bb5/tokenizer/pc-images/felix_tolomin.Token.webp?1708128064460')\"></div>\n                                        <h4 class=\"noselect\">\n                                            <span class=\"gm-only\">Felix</span>\n                                            <span class=\"player-only\">Felix</span>\n                                        </h4>\n                                    </div>\n\n                                    <div class=\"roll-controls flexrow\">\n                                        \n                                    <div class=\"reroll\"></div><div class=\"dice-total flexrow noselect\" style=\"display:none\">\n                        <div class=\"dice-result noselect reveal\"><span class=\"smoke-screen\">...</span><span class=\"total\">23</span></div>\n                        <a class=\"item-control result-passed gm-only\" data-control=\"rollPassed\">\n                            <i class=\"fas fa-check\"></i>\n                        </a>\n                        <a class=\"item-control result-failed gm-only\" data-control=\"rollFailed\">\n                            <i class=\"fas fa-times\"></i>\n                        </a>\n                        <div class=\"dice-text player-only\"></div>\n                    </div></div>\n                                </div><div class=\"dice-tooltip\">\n    <section class=\"tooltip-part\">\n        <div class=\"dice\">\n            <header class=\"part-header flexrow\">\n                <span class=\"part-formula\">1d20</span>\n                \n                <span class=\"part-total\">8</span>\n            </header>\n            <ol class=\"dice-rolls\">\n                <li class=\"roll die d20\">8</li>\n            </ol>\n        </div>\n    </section>\n</div>\n                            </div>\n                        </div>\n                        <div class=\"token-properties\"></div>\n                    </li>\n                </ol>\n            </ol>\n        </div>\n    </div>\n    <footer class=\"card-footer gm-only flexcol\">\n        <div class=\"flexrow\" style=\"justify-content:flex-end\">\n            <button type=\"button\" class=\"select-all footer-button\" title=\"Select All Actors\"><i class=\"fas fa-users\"></i></button>\n            <button type=\"button\" class=\"select-success footer-button\" title=\"Select Critical Saved\"><i class=\"fas fa-user-plus\"></i></button>\n            <button type=\"button\" class=\"select-saved footer-button\" title=\"Select Saved Actors\"><i class=\"fas fa-user-check\"></i></button>\n            <button type=\"button\" class=\"select-failed footer-button\" title=\"Select Failed Actors\"><i class=\"fas fa-user-times\"></i></button>\n            <button type=\"button\" class=\"select-critical footer-button\" title=\"Select Critical Failed\"><i class=\"fas fa-user-minus\"></i></button>\n            \n        </div>\n        <div style=\"overflow:hidden;white-space:nowrap\">\n            <span class=\"message-mode\">Private Roll, Results Hidden</span><span> Group DC: <span class=\"group-dc\"></span></span>\n        </div>\n    </footer>\n</div>",
    "flavor": "As you step on the fungal bridge your sprayed with a mist",
    "flags": {
        "core": {
            "canPopout": true
        },
        "monks-tokenbar": {
            "dc": "25",
            "name": "Will Saving Throw",
            "requests": [
                {
                    "type": "save",
                    "key": "will",
                    "slug": "save:will",
                    "name": "Will Saving Throw"
                }
            ],
            "rollmode": "blindroll",
            "modename": "Private Roll, Results Hidden",
            "hasCritical": true,
            "showAdvantage": false,
            "options": {
                "rollmode": "blindroll",
                "request": [
                    {
                        "type": "save",
                        "key": "will",
                        "slug": "save:will",
                        "name": "Will Saving Throw"
                    }
                ],
                "dc": "25",
                "flavor": "As you step on the fungal bridge your sprayed with a mist"
            },
            "what": "savingthrow",
            "tokenGUSUrkOZ4kwBa5vY": {
                "id": "GUSUrkOZ4kwBa5vY",
                "uuid": "Scene.sNu61QDoD7w8tF18.Token.GUSUrkOZ4kwBa5vY",
                "actorid": "bxBItTToXUsQmhhl",
                "icon": "https://assets.forge-vtt.com/6216e39e4fabb3c5ba409bb5/tokenizer/pc-images/felix_tolomin.Token.webp?1708128064460",
                "name": "Felix",
                "realname": "Felix",
                "showname": true,
                "showtoken": true,
                "npc": false,
                "keys": {},
                "roll": {
                    "class": "CheckRoll",
                    "options": {
                        "type": "saving-throw",
                        "action": null,
                        "domains": [
                            "will",
                            "wis-based",
                            "saving-throw",
                            "all",
                            "check",
                            "will-check"
                        ],
                        "isReroll": false,
                        "totalModifier": 15,
                        "damaging": false,
                        "rollerId": "M8SGJbaRDHxs3mwY",
                        "showBreakdown": true
                    },
                    "dice": [],
                    "formula": "1d20 + 15",
                    "terms": [
                        {
                            "class": "Die",
                            "options": {},
                            "evaluated": true,
                            "number": 1,
                            "faces": 20,
                            "modifiers": [],
                            "results": [
                                {
                                    "result": 8,
                                    "active": true
                                }
                            ]
                        },
                        {
                            "class": "OperatorTerm",
                            "options": {},
                            "evaluated": true,
                            "operator": "+"
                        },
                        {
                            "class": "NumericTerm",
                            "options": {},
                            "evaluated": true,
                            "number": 15
                        }
                    ],
                    "total": 23,
                    "evaluated": true
                },
                "total": 23,
                "reveal": true,
                "request": {
                    "type": "save",
                    "key": "will",
                    "slug": "save:will",
                    "name": "Will Saving Throw"
                },
                "passed": false,
                "properties": []
            },
            "active-tiles": {
                "id": "3NQr0sRz1BNTnEQr",
                "tile": "Scene.sNu61QDoD7w8tF18.Tile.PTvOZxMBWFkBLC9d",
                "action": {
                    "action": "monks-tokenbar.requestroll",
                    "data": {
                        "entity": {
                            "id": "token",
                            "name": "Triggering Token"
                        },
                        "request": "save:will",
                        "dc": "25",
                        "flavor": "As you step on the fungal bridge your sprayed with a mist",
                        "rollmode": "blindroll",
                        "silent": true,
                        "fastforward": true,
                        "usetokens": "all",
                        "continue": "always"
                    },
                    "id": "q0vVt2VdZ4oPVm6F"
                }
            }
        },
        "pf2e": {},
        "foundryvtt-simple-calendar": {
            "sc-timestamps": {
                "id": "default",
                "timestamp": -83312017334
            }
        },
        "pf2e-thaum-vuln": {
            "targets": []
        },
        "pf2e-dorako-ux": {
            "userAvatar": {
                "image": "https://assets.forge-vtt.com/bazaar/core/icons/svg/mystery-man.svg",
                "type": "avatar"
            },
            "combatantAvatar": null,
            "tokenAvatar": null,
            "actorAvatar": null
        }
    },
    "whisper": [
        "M8SGJbaRDHxs3mwY",
        "bixUXtuBHFgxq35r"
    ],
    "_id": "L4yAVHZnN6Tyw4HS",
    "type": 0,
    "timestamp": 1711909267103,
    "speaker": {
        "scene": null,
        "actor": null,
        "token": null
    },
    "blind": false,
    "rolls": [],
    "emote": false
}```