diff --git a/The One Ring 2e/release-notes.md b/The One Ring 2e/release-notes.md index 6486839488..f31befe97b 100644 --- a/The One Ring 2e/release-notes.md +++ b/The One Ring 2e/release-notes.md @@ -4,6 +4,16 @@ This is a rewrite based on the early 2e (basic) and 1e edition that also include # Release History +## 02.09.00 (Build 12) + +### Features + +- added custom dice roller + +### CSS + +- added "msg-alt" label for the MSG-custom roll template that will remove the yellow background from inlined rolls. This is usefull when using custom roll tables for events (e.g. hazards) + ## 02.08.00 (Build 11) ### Features diff --git a/The One Ring 2e/sheet.css b/The One Ring 2e/sheet.css index 7174b20691..7929df2e0a 100644 --- a/The One Ring 2e/sheet.css +++ b/The One Ring 2e/sheet.css @@ -546,7 +546,6 @@ grid-template-columns: 60px 40px 20px 40px 60px; align-items: center; } - .charsheet div.attribute label.left { white-space: break-spaces; margin-left: 12px; diff --git a/The One Ring 2e/sheet.html b/The One Ring 2e/sheet.html index 3afa4e3a67..39ab27ac44 100644 --- a/The One Ring 2e/sheet.html +++ b/The One Ring 2e/sheet.html @@ -234,6 +234,30 @@
+

Custom Dice Roller

+
+ +
+
+ +
+
+ + + +

@@ -2128,6 +2152,19 @@ clog(`Completed first roll: weapon_${index}`); }); + // Custom roll + on('clicked:customroll', async (ev) => { + clog(`Starting first roll`); + let data = await asw.getAttrs(['character_name', 'customfeatdie', 'customtn', 'customsuccessdice', 'customrollname', 'favourill_id']), + action = `Custom: ${data.customrollname}`, + actfeat = int(data.customfeatdie), + actdice = int(data.customsuccessdice), + acttn = int(data.customtn); + + clog(`First roll: ${JSON.stringify(data)}, Action : ${action}`); + await rollFirst(data.character_name, action, actdice, acttn, actfeat, "custom"); + clog(`Completed first roll`); + }); /*================== Migration scripts. @@ -2244,24 +2281,25 @@
Feat
Die
Success
Dice
- {{#rollTotal() computed::feat 12}} -
- {{computed::feat}} -
- {{/rollTotal() computed::feat 12}} - {{#rollTotal() computed::feat 11}} -
- {{computed::feat}} -
- {{/rollTotal() computed::feat 11}} + {{#rollTotal() computed::feat 0}} +
-
+ {{/rollTotal() computed::feat 0}} {{#rollBetween() computed::feat 1 10}}
{{computed::feat}}
{{/rollBetween() computed::feat 1 10}} - {{^feat}} -
-
- {{/feat}} + {{#rollTotal() computed::feat 11}} +
+ {{computed::feat}} +
+ {{/rollTotal() computed::feat 11}} + {{#rollTotal() computed::feat 12}} +
+ {{computed::feat}} +
+ {{/rollTotal() computed::feat 12}}
{{r1}}
{{#favoured}}{{favoured}}{{/favoured}} diff --git a/The One Ring 2e/translation.json b/The One Ring 2e/translation.json index a589705d2d..874ae20eb7 100644 --- a/The One Ring 2e/translation.json +++ b/The One Ring 2e/translation.json @@ -219,5 +219,10 @@ "stance-open": "Open", "stance-defensive": "Def.", "stance-rearward": "Rear", - "stance-damage": "Stance Damage:" + "stance-damage": "Stance Damage:", + "custom-roll": "Custom Roll:", + "custom-tn": "TN:", + "custom-successdice": "Success:", + "custom-featdie": "Feat:", + "custom-rollname-placeholder": "Roll Text" } \ No newline at end of file