diff --git a/The One Ring 2e/release-notes.md b/The One Ring 2e/release-notes.md index ff2fd167ba..0e4ad4600b 100644 --- a/The One Ring 2e/release-notes.md +++ b/The One Ring 2e/release-notes.md @@ -6,9 +6,16 @@ This is a rewrite based on the early 2e (basic) and 1e edition that also include ## 02.04.00 (Build 7) +### New Features + +- adversary sheet and rolls include weary modifier +- new roll-template to denote non-roll messages. Format &{template:msg} {{header=Generic Header}} {{sub1=Subheadline1}} {{sub2=Subheadline2}} {{msg=This is a test}} + ### Sheet fixes -- fixed common bonus dice not tied to stance anymore +- fixed common bonus dice pick up stance bonus +- fixed targeted adversary attack rolls don't pickup target's stance in bonus dice query +- set default favourill to "normal" for new characters and adversaries ### CSS fixes diff --git a/The One Ring 2e/sheet.css b/The One Ring 2e/sheet.css index a44fc7e00b..3fbd0cc48d 100644 --- a/The One Ring 2e/sheet.css +++ b/The One Ring 2e/sheet.css @@ -1,27 +1,4 @@ @import url('https://fonts.googleapis.com/css2?family=Uncial+Antiqua&display=swap'); -/* -import url('https://fonts.cdnfonts.com/css/aniron'); -@font-face { - font-family: 'AnorinFace'; - src: url('https://fonts.cdnfonts.com/css/aniron'); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: 'NanumSquareRound'; - src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/NanumSquareRound.woff') format('woff'); - font-weight: normal; - font-style: normal; -} -@font-face {font-family: "AnironOwf"; - src: url("//db.onlinewebfonts.com/t/767cb11dc1ee01154718463adc3a1d1e.eot"); - src: url("//db.onlinewebfonts.com/t/767cb11dc1ee01154718463adc3a1d1e.eot?#iefix") format("embedded-opentype"), - url("//db.onlinewebfonts.com/t/767cb11dc1ee01154718463adc3a1d1e.woff2") format("woff2"), - url("//db.onlinewebfonts.com/t/767cb11dc1ee01154718463adc3a1d1e.woff") format("woff"), - url("//db.onlinewebfonts.com/t/767cb11dc1ee01154718463adc3a1d1e.ttf") format("truetype"), - url("//db.onlinewebfonts.com/t/767cb11dc1ee01154718463adc3a1d1e.svg#Aniron") format("svg"); -} -*/ /* reset all .ui-dialog .charsheet select, .ui-dialog .charsheet textarea, @@ -37,7 +14,8 @@ import url('https://fonts.cdnfonts.com/css/aniron'); font-weight: normal; } .charsheet, -.sheet-rolltemplate-tor { +.sheet-rolltemplate-tor, +.sheet-rolltemplate-msg { /* Define CSS variables */ --red: rgb(176, 33, 30); --gray: rgb(65, 64, 64); @@ -873,20 +851,22 @@ import url('https://fonts.cdnfonts.com/css/aniron'); } /* Roll Template */ -.sheet-rolltemplate-tor { - margin-left: -37px; +.sheet-rolltemplate-tor, +.sheet-rolltemplate-msg { + margin-left: -7px; padding-top: 10px; background: transparent; } .sheet-rolltemplate-tor div, -.sheet-rolltemplate-tor span { +.sheet-rolltemplate-msg div, +.sheet-rolltemplate-tor span, +.sheet-rolltemplate-msg span { font-family: Papyrus, 'Book Antiqua', Palatino, serif, sans-serif; font-weight: bold; + font-size: 13px; } -.sheet-rolltemplate-tor { - margin-left: -7px; -} -.sheet-rolltemplate-tor .sheet-container { +.sheet-rolltemplate-tor .sheet-container, +.sheet-rolltemplate-msg .sheet-container { background: var(--background); background-color: var(--yellow); border: 5px solid transparent; @@ -898,22 +878,30 @@ import url('https://fonts.cdnfonts.com/css/aniron'); border-top: 1px solid #000; height: 205px; } +.sheet-rolltemplate-msg .sheet-contentmin { + border-top: 1px solid #000; + padding-top: 10px; + height: min-content; +} .sheet-rolltemplate-tor .sheet-red, .sheet-rolltemplate-tor .sheet-red span { color: black; } /* Header formatting - title and subtitle */ -.sheet-rolltemplate-tor .sheet-header { +.sheet-rolltemplate-tor .sheet-header, +.sheet-rolltemplate-msg .sheet-header { /* change text-align to center to center the header text */ text-align: left; color: black; padding: 5px; } -.sheet-rolltemplate-tor .sheet-footer { +.sheet-rolltemplate-tor .sheet-footer, +.sheet-rolltemplate-msg .sheet-footer { padding: 5px; margin-top: -5px; } -.sheet-rolltemplate-tor .sheet-title { +.sheet-rolltemplate-tor .sheet-title, +.sheet-rolltemplate-msg .sheet-title { font-family: 'Uncial Antiqua', "Palatino Linotype", "Book Antiqua", Palatino, serif, sans-serif; font-weight: lighter; line-height: 1; @@ -921,20 +909,18 @@ import url('https://fonts.cdnfonts.com/css/aniron'); font-size: medium; line-height: 25px; } -.sheet-rolltemplate-tor .sheet-subtitle { +.sheet-rolltemplate-tor .sheet-subtitle, +.sheet-rolltemplate-msg .sheet-subtitle { font-size: 13px; } -.sheet-rolltemplate-tor .sheet-subtitle2 { - font-size: 13px; -} -.sheet-rolltemplate-tor span, -.sheet-rolltemplate-tor div { - font-size: 13px; -} -.sheet-rolltemplate-tor .sheet-text-center { + +.sheet-rolltemplate-tor .sheet-text-center, +.sheet-rolltemplate-msg .sheet-text-center { text-align: center; } -.sheet-rolltemplate-tor .sheet-center { + +.sheet-rolltemplate-tor .sheet-center, +.sheet-rolltemplate-msg .sheet-center { display: inline-flex; box-sizing: border-box; flex-wrap: nowrap; @@ -969,19 +955,15 @@ import url('https://fonts.cdnfonts.com/css/aniron'); border: 4px solid transparent; background-color: var(--yellow); border-image-source: var(--borderbrown); - /*border-image-source: url('https://raw.githubusercontent.com/bhuesemann/roll20-character-sheets/tor2e_02-00-00/The%20One%20Ring%202e/images/box-border-brown-rttd.png');*/ - /*border-image-source: url('https://raw.githubusercontent.com/roll20/roll20-character-sheets/master/The%20One%20Ring%202e/images/box-border-brown-rttd.png');*/ border-image-slice: 24 24 24 24; border-image-repeat: repeat; width: 30px; height: 30px; transform: rotate(45deg); - /*transform: rotate(45deg);*/ } .sheet-rolltemplate-tor div.sheet-die-result span.sheet-rotated-box span { background-color: var(--yellow); transform: rotate(-45deg); - /*transform: rotate(-45deg);*/ border: 0; } .sheet-rolltemplate-tor .sheet-die-title.sheet-target-number { diff --git a/The One Ring 2e/sheet.html b/The One Ring 2e/sheet.html index aceca5f4c6..22c60210d3 100644 --- a/The One Ring 2e/sheet.html +++ b/The One Ring 2e/sheet.html @@ -1,4 +1,4 @@ - + @@ -260,11 +260,6 @@ -   @@ -296,11 +291,6 @@ -   @@ -333,12 +323,6 @@ -   @@ -371,12 +355,6 @@ -   @@ -972,6 +950,8 @@ +
+
@@ -1009,7 +989,7 @@ @@ -1025,11 +1005,10 @@ - - + + @@ -1042,12 +1021,6 @@ - @@ -1056,16 +1029,10 @@ - - - - + + @@ -1078,12 +1045,6 @@ - @@ -1163,7 +1124,7 @@ const stripaction = (str) => { return str.replace(/_action/g,''); }; - + // ASYNC ATTRIBUTE METHODS (see https://app.roll20.net/forum/post/10346883/adventures-with-startroll) const asw = (() => { const setActiveCharacterId = function(charId){ @@ -1289,13 +1250,12 @@ } } else if ( rolltype.startsWith("combat") ) { favId = favourill_id; - stanceattackmodStr = "0" if ( rolltype.includes("target") ) { if (lm){ // totalparry includes shield, stance and other bonus parrymodStr = `{{parrymod=[[${target.parrytotal}]]}}` // we include targets stance modifier - stanceattackmodStr = target.stanceattackbonus; + stanceAttackBonus = target.stanceattackbonus; } else { parrymodStr = `{{parrymod=[[${target.parry}]]}}` } @@ -1328,7 +1288,7 @@ } */ - modifiers = rolltype !== "custom" ? await getQuery(`?{Bonus dice|${rolltype.startsWith("combat") ? modifiers : 0}}`) : 0; + modifiers = rolltype !== "custom" ? await getQuery(`?{Bonus dice|${rolltype.startsWith("combat") ? stanceAttackBonus : 0}}`) : 0; // add stance attack modifier modifiers = int(modifiers); let modStr = modifiers == 0 ? "" : (modifiers > 0 ? `{{modification=+${modifiers}}}` : `{{modification=${modifiers}}}`); @@ -1354,7 +1314,7 @@ // SUCCESS DICE ROLL DATA successdice = int(dice) + int(modifiers); successdice = successdice < 0 ? 0 : successdice; - successStr = `[[${successdice}+${stanceattackmodStr}]]d6${closefitStr}`; + successStr = `[[${successdice}]]d6${closefitStr}`; // WEAPON INFO & ADDITIONAL INFO // Weapon info @@ -1505,6 +1465,18 @@ }); }); + /*========================== + defaults + ============================*/ + on('sheet:opened', function() { + getAttrs(["favourill_id"], function(values){ + let favourill_id = values.favourill_id || 1; + setAttrs({ + favourill_id: favourill_id, + }); + }); + }); + /*========================== Action Roll Button Updates ============================*/ @@ -1534,23 +1506,16 @@ // weary roll table change on("change:weary sheet:opened", function() { getAttrs(["weary", "wearytype", "sheetTab"], function(values) { - if (values.sheetTab === "isPC"){ - let weary = values.weary||0; - if (weary === "on" || weary == 1) { - wearytype = "weary"; - } - else { - wearytype = "normal"; - } - setAttrs({ - wearytype: wearytype, - }); - } else { - // setting default for adversaries and if sheet is opened the first time - setAttrs({ - wearytype: "normal", - }); - }; + let weary = values.weary||0; + if (weary === "on" || weary == 1) { + wearytype = "weary"; + } + else { + wearytype = "normal"; + } + setAttrs({ + wearytype: wearytype, + }); }); }); @@ -1925,6 +1890,24 @@ }); }); + // table adversary weapon rolls (to reflect the active stance attack bonus) + const advweaponattrs = ["adv_weapon1", "adv_weapon2"]; + on(`change:stance sheet:opened`, function() { + getAttrs([""], function(values) { + advweaponattrs.forEach(advweaponattr => { + index = int(advweaponattr.slice(-1)); // last char + let roll1 = + `/me attacks against parry ?{Parry|0}.\n/roll 1t[lm-feat] + [[(@{weapon_rating_${index}}+?{Bonus Dice|0})]]t[@{wearytype}]`; + let roll2 = + `/me attacks @{target|name} against parry @{target|totalparry}.\n/roll 1t[lm-feat] + [[(@{weapon_rating_${index}}+?{Bonus Dice|@{target|stanceattackbonus}})]]t[@{wearytype}]`; + setAttrs({ + [`${advweaponattr}_roll1`]: roll1, + [`${advweaponattr}_roll2`]: roll2, + }); + }); + }); + }); + // parsed adversary combat proficiency rolls // act_adv_weapon1_target on('clicked:adv_weapon1_action clicked:adv_weapon1_target_action clicked:adv_weapon2_action clicked:adv_weapon2_target_action ', async (ev) => { @@ -2050,8 +2033,24 @@ {{/rollTotal() favorill 3}}
+ + +
+
+ {{#header}}
{{header}}
{{/header}} + {{#sub1}}
{{sub1}}
{{/sub1}} + {{#sub2}}
{{sub2}}
{{/sub2}} +
+ {{#msg}} +
+
{{msg}}
+
+ {{/msg}} +
+
+ -
+
{{#character-name}}
{{character-name}}
{{/character-name}} {{#roll-name}}
{{roll-name}}
{{/roll-name}}