From 046d01e662ffb99e1cc2f6ad68f6b5dffe3c13b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20H=C3=BCsemann?= Date: Tue, 23 Aug 2022 18:40:44 +0200 Subject: [PATCH] fixe piercing blow bug --- The One Ring 2e/release-notes.md | 5 +++++ The One Ring 2e/sheet.html | 32 +++++++++++++++++++++++++------- The One Ring 2e/sheet.json | 2 +- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/The One Ring 2e/release-notes.md b/The One Ring 2e/release-notes.md index 5dda8d74b8..fcc7e22796 100644 --- a/The One Ring 2e/release-notes.md +++ b/The One Ring 2e/release-notes.md @@ -4,7 +4,12 @@ This is a rewrite based on the early 2e (basic) and 1e edition that also include # Release History +## 03.02.00 (Build 22) + +- target attacks calculate priercing blow correctly + ## 03.01.00 (Build 21) + - added header-alt, sub1-alt, sub2-alt to custom roll template msg - added button to post adversary fell ability into chat diff --git a/The One Ring 2e/sheet.html b/The One Ring 2e/sheet.html index 7bb71ddcc3..27d2e008ec 100644 --- a/The One Ring 2e/sheet.html +++ b/The One Ring 2e/sheet.html @@ -1,4 +1,4 @@ - + @@ -1327,7 +1327,7 @@

Fell Ability

- +
@@ -1555,7 +1555,7 @@ target, closefit="", closefitStr="", - keen="", + keen=10, match=[]; act = capitalize(act); @@ -1742,10 +1742,10 @@ // GREATNESS & FEAT DIE // Test for piercing blow on crit success - outcome = rolltype === "combat" && (outcome === 2) ? 3 : outcome; + outcome = rolltype.startsWith("combat") && (outcome === 2) ? 3 : outcome; clog(`Outcome after Crit: ${outcome}`); // Piercing blow also at 10 or 8/9 if the used weapon is keen - outcome = rolltype === "combat" && (outcome === 1) && (rollFeat >= keen && rollFeat <= 10) ? 3 : outcome; + outcome = rolltype.startsWith("combat") && (outcome === 1) && (rollFeat >= keen && rollFeat <= 10) ? 3 : outcome; clog(`Outcome after Piercing or Keen: ${outcome}`); // count number of 6s in success, great or extraordinary success // Count the number of sixes rolled, to report degree of success @@ -2722,7 +2722,7 @@ } } - if (build < 19) { + if (build < 20) { attrs["build"] = 20; let releaselog = {msg:""}; hlog(`Release 03.0.0 - ${new Date().toLocaleString()}`, releaselog); @@ -2741,7 +2741,7 @@ } } - if (build < 20) { + if (build < 21) { attrs["build"] = 21; let releaselog = {msg:""}; hlog(`Release 03.01.00 - ${new Date().toLocaleString()}`, releaselog); @@ -2760,6 +2760,24 @@ }); } } + if (build < 22) { + attrs["build"] = 22; + let releaselog = {msg:""}; + hlog(`Release 03.02.00 - ${new Date().toLocaleString()}`, releaselog); + if (v.sheettab === "isPC"){ + getAttrs(['releaselog'], function(values){ + hlog(` +### Fixed +- Target attacks calculated "piercing blow" correctly + `, releaselog); + hlog("==============", releaselog); + attrs['releaselog'] = releaselog.msg + values['releaselog']; + if (Object.keys(attrs).length) { + setAttrs(attrs); + } + }); + } + } /* if (build === 9) { diff --git a/The One Ring 2e/sheet.json b/The One Ring 2e/sheet.json index 972ae7ff6c..fd09c34097 100644 --- a/The One Ring 2e/sheet.json +++ b/The One Ring 2e/sheet.json @@ -1,6 +1,6 @@ { "title": "The One Ring 2e", - "version": "3.1.0", + "version": "3.2.0", "html": "sheet.html", "css": "sheet.css", "authors": "Bodo Hüsemann, Richard W, Michael (aka Aragent) I, Paul Venner, Michael Heilemann, Stefan Unterhuber, Stuart Johnson, David Domínguez, Eric Le Bourvellec",