From 8628146d760f64aea490c2d2d7361352bf6ed86c Mon Sep 17 00:00:00 2001 From: Kurohyou Date: Wed, 2 Aug 2023 15:45:27 -0600 Subject: [PATCH] Dragonbane: version 1.1 --- dragonbane/dragonbane.css | 656 ++++++++++++++------------ dragonbane/dragonbane.html | 913 +++++++++++++++++++++++++++--------- dragonbane/translation.json | 40 +- 3 files changed, 1072 insertions(+), 537 deletions(-) diff --git a/dragonbane/dragonbane.css b/dragonbane/dragonbane.css index 3312691a8f..dece8282f4 100644 --- a/dragonbane/dragonbane.css +++ b/dragonbane/dragonbane.css @@ -418,7 +418,9 @@ body .ui-dialog .tab-content .charsheet :not(label).--parchment__trim.--bottom.- --lm-fontColor:black; --dm-fontColor: beige; --selectedColor: #e73431; - --elementColor: hsl(167, 76%, 16%); + --lm-elementColor: hsl(167, 76%, 16%); + --dm-elementColor: hsl(167, 76%, 16%); + --elementColor: var(--lm-elementColor); --accentColor: #91643e; --lightAccentColor: #ae9077; --inputHighlight: hsla(78, 87%, 18%, 0.2); @@ -962,7 +964,6 @@ body .ui-dialog .tab-content .charsheet .section--attributes_secondaries { filter: var(--fx-shadow); } body .ui-dialog .tab-content .charsheet .section--attributes_secondaries > .marble-header { - flex: 1; flex-wrap: wrap; font-size: 12px; } @@ -980,11 +981,6 @@ body .ui-dialog .tab-content .charsheet .section--attributes_secondaries > .marb font-weight: 700; z-index: 5; } -@media (max-width: 760px) { - body .ui-dialog .tab-content .charsheet .section--attributes_secondaries .marble-header:nth-child(-n+2) { - display: none; - } -} body .ui-dialog .tab-content .charsheet .section--skills { position: relative; @@ -1099,7 +1095,6 @@ body .ui-dialog .tab-content .charsheet .section--skills__row label:hover { } body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list--secondary { display: grid; - grid-template-columns: 1fr 1fr; height: fit-content; } body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list--secondary .expanded { @@ -1220,6 +1215,9 @@ body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list- display: grid; place-content: center; } +body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list--secondary .repcontrol_edit::before.round-button--no-image { + background: none; +} body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list--secondary .repcontrol_edit::before:hover { filter: hue-rotate(-160deg) brightness(1.5) saturate(2); } @@ -1266,6 +1264,9 @@ body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list- width: 20px; content: "new_label"; } +body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list--secondary .repcontrol-button--add::before.round-button--no-image { + background: none; +} body .ui-dialog .tab-content .charsheet .section--skills .section--skills__list--secondary .repcontrol-button--add::before:hover { filter: hue-rotate(-160deg) brightness(1.5) saturate(2); } @@ -1290,6 +1291,9 @@ body .ui-dialog .tab-content .charsheet .section--skills__button--advance { width: 20px; z-index: 1; } +body .ui-dialog .tab-content .charsheet .section--skills__button--advance.round-button--no-image { + background: none; +} body .ui-dialog .tab-content .charsheet .section--skills__button--advance:hover { filter: hue-rotate(-160deg) brightness(1.5) saturate(2); } @@ -1299,68 +1303,6 @@ body .ui-dialog .tab-content .charsheet .section--skills__button--advance:hover } } -body .ui-dialog .tab-content .charsheet .section--inventory { - display: flex; - flex-direction: column; - justify-content: space-between; - gap: var(--half-gap); -} -body .ui-dialog .tab-content .charsheet .section--inventory .marble-header { - filter: var(--fx-shadow); -} -body .ui-dialog .tab-content .charsheet .section--inventory .repcontainer { - gap: var(--tiny-gap); -} -body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded { - display: grid; - grid-template-columns: auto 1fr auto; - grid-template-rows: auto auto; -} -body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded textarea { - grid-column: 1/-1; - grid-row: 2; -} -body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed { - display: flex; -} -body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed input, body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded input { - width: 100%; -} -body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed input[type=text], body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded input[type=text] { - flex: 1; -} -body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed input[type=number], body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded input[type=number] { - width: 2em; -} -body .ui-dialog .tab-content .charsheet .section--inventory__description { - background: var(--accentColor); - font-size: 0.7em; - height: 10em; -} -body .ui-dialog .tab-content .charsheet .section--inventory__quantity--wrapper { - position: relative; - font-size: 0.8em; -} -body .ui-dialog .tab-content .charsheet .section--inventory__quantity--wrapper span { - position: absolute; - top: 50%; - left: 0; - translate: 0 calc(-50% - 0.05em); -} -body .ui-dialog .tab-content .charsheet .section--inventory__quantity--wrapper input { - --inputPadding: 0; - line-height: 1; -} -body .ui-dialog .tab-content .charsheet .section--inventory__name { - font-weight: bold; -} -body .ui-dialog .tab-content .charsheet .section--inventory [class^=subsection] { - filter: var(--fx-shadow); -} -body .ui-dialog .tab-content .charsheet .section--inventory .subsection--tinyitems { - margin-bottom: 1rem; -} - body .ui-dialog .tab-content .charsheet .section--wealth { display: flex; flex-direction: column; @@ -1369,216 +1311,14 @@ body .ui-dialog .tab-content .charsheet .section--wealth { filter: var(--fx-shadow); } -body .ui-dialog .tab-content .charsheet .section--points { - display: flex; - flex-direction: column; - gap: 0.5em; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=section] { - container-type: inline-size; -} -body .ui-dialog .tab-content .charsheet .section--points .section--rest { - display: flex; - justify-content: space-around; -} -body .ui-dialog .tab-content .charsheet .section--points .section--rest label { - display: grid; - grid-template-columns: 1fr auto; - place-items: center; - cursor: pointer; - gap: 0.5em; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] { - box-sizing: border-box; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - display: grid; - grid-template-columns: 25cqw 2fr; - grid-template-rows: auto 1fr; - grid-template-areas: "title title" "max current"; - aspect-ratio: 950/300; - padding: 4cqw 6cqw; - filter: var(--fx-shadow); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=willpower] { - background-image: var(--img-plate-willpower); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=willpower] .fill-left input { - filter: invert(0.5) brightness(1.5) sepia(1) saturate(3) hue-rotate(100deg); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=health] { - background-image: var(--img-plate-hp); - position: relative; - z-index: 2; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=health] .fill-left input { - filter: invert(0.5) brightness(1.5) sepia(1) saturate(3) hue-rotate(320deg); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] h3 { - grid-area: title; - text-align: left; - color: var(--dm-fontColor); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores { - display: flex; - justify-content: center; - align-items: center; - font-size: 1.25em; - line-height: 1; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores::after { - content: "/"; - color: var(--accentColor); - order: 2; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores input { - place-self: center; - border: 0; - padding: 0; - width: 2ch; - text-align: right; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores input:nth-of-type(2) { - order: 3; - font-weight: bold; - text-align: left; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="0"] + .fill-left input:nth-child(2), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="0"] + .fill-left input:nth-child(2) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="1"] + .fill-left input:nth-child(3), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="1"] + .fill-left input:nth-child(3) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="2"] + .fill-left input:nth-child(4), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="2"] + .fill-left input:nth-child(4) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="3"] + .fill-left input:nth-child(5), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="3"] + .fill-left input:nth-child(5) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="4"] + .fill-left input:nth-child(6), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="4"] + .fill-left input:nth-child(6) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="5"] + .fill-left input:nth-child(7), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="5"] + .fill-left input:nth-child(7) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="6"] + .fill-left input:nth-child(8), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="6"] + .fill-left input:nth-child(8) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="7"] + .fill-left input:nth-child(9), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="7"] + .fill-left input:nth-child(9) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="8"] + .fill-left input:nth-child(10), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="8"] + .fill-left input:nth-child(10) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="9"] + .fill-left input:nth-child(11), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="9"] + .fill-left input:nth-child(11) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="10"] + .fill-left input:nth-child(12), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="10"] + .fill-left input:nth-child(12) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="11"] + .fill-left input:nth-child(13), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="11"] + .fill-left input:nth-child(13) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="12"] + .fill-left input:nth-child(14), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="12"] + .fill-left input:nth-child(14) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="13"] + .fill-left input:nth-child(15), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="13"] + .fill-left input:nth-child(15) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="14"] + .fill-left input:nth-child(16), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="14"] + .fill-left input:nth-child(16) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="15"] + .fill-left input:nth-child(17), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="15"] + .fill-left input:nth-child(17) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="16"] + .fill-left input:nth-child(18), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="16"] + .fill-left input:nth-child(18) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="17"] + .fill-left input:nth-child(19), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="17"] + .fill-left input:nth-child(19) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="18"] + .fill-left input:nth-child(20), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="18"] + .fill-left input:nth-child(20) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="19"] + .fill-left input:nth-child(21), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="19"] + .fill-left input:nth-child(21) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="20"] + .fill-left input:nth-child(22), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="20"] + .fill-left input:nth-child(22) ~ input { - display: none; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left { - display: grid; - grid-template-columns: repeat(10, 1fr); - grid-template-rows: 1fr 1fr; - gap: 2cqw 0; - padding-right: 2.5cqw; - --fillLeftSelectedColor: var(--elementColor); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input { - position: relative; - --background: var(--img-point1); - background: var(--background); - background-size: contain; - background-repeat: no-repeat; - background-position: center; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+1) { - --background: var(--img-point2); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+2) { - --background: var(--img-point3); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+3) { - --background: var(--img-point4); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+4) { - --background: var(--img-point5); -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(6), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(16) { - margin-right: 2cqw; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(7), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(17) { - margin-left: 2cqw; -} -body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input.fill-left__radio:checked ~ input, body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left .fill-left__radio[type=hidden][value="0"] ~ input { - filter: invert(0.8); -} -body .ui-dialog .tab-content .charsheet .section--points .death-saves { - position: relative; - display: flex; - justify-content: space-around; - align-items: center; - top: -1em; - padding: 1em 1em 0.75em 1em; - margin: 0 0.5em; - background: var(--img-field-parchment); - background-size: cover; - background-position: bottom center; - filter: var(--fx-shadow); - z-index: 1; -} -body .ui-dialog .tab-content .charsheet .section--points .death-saves button::before { - content: none; -} -body .ui-dialog .tab-content .charsheet .section--points .death-saves [class^=death-saves] { - display: flex; - flex-direction: column; -} -body .ui-dialog .tab-content .charsheet .section--points .death-saves [class^=death-saves] .fill-left { - --fillLeftSelectedColor: none; - display: flex; - gap: 0.25em; -} -body .ui-dialog .tab-content .charsheet .section--points .death-saves [class^=death-saves] .fill-left input::before { - width: calc(var(--checkboxWidth) - 0.1em); - height: calc(var(--checkboxWidth) - 0.1em); -} - html { font-size: 16px; } +#main { + container: charsheet/inline-size; +} + body { --font1:var(--topHeadFont); --font2:var(--topHeadFont); @@ -1743,7 +1483,9 @@ body { --lm-fontColor:black; --dm-fontColor: beige; --selectedColor: #e73431; - --elementColor: hsl(167, 76%, 16%); + --lm-elementColor: hsl(167, 76%, 16%); + --dm-elementColor: hsl(167, 76%, 16%); + --elementColor: var(--lm-elementColor); --accentColor: #91643e; --lightAccentColor: #ae9077; --inputHighlight: hsla(78, 87%, 18%, 0.2); @@ -1809,7 +1551,6 @@ body { --img-armor: url(https://s3.amazonaws.com/files.d20.io/images/344484246/AUvTw7I48L6os77jb0qrGA/original.png); --_shadow: rgba(0,0,0,0.8); --fx-shadow: drop-shadow(0 0 0.2em var(--_shadow)); - color: var(--fontColor); font-size: 1rem; } body .ui-dialog .nav-tabs { @@ -2849,6 +2590,9 @@ body .ui-dialog .tab-content .charsheet .round-button { height: 20px; width: 20px; } +body .ui-dialog .tab-content .charsheet .round-button.round-button--no-image { + background: none; +} body .ui-dialog .tab-content .charsheet .round-button:hover { filter: hue-rotate(-160deg) brightness(1.5) saturate(2); } @@ -2954,6 +2698,36 @@ body .ui-dialog .tab-content .charsheet ::-webkit-scrollbar-thumb { body .ui-dialog .tab-content .charsheet ::-webkit-scrollbar-thumb:hover { background: var(--elementColor); } +body .ui-dialog .tab-content .charsheet .repeating-section-container { + display: grid; + grid-template-areas: "header" "section" "buttons"; +} +body .ui-dialog .tab-content .charsheet .repcontrol-button--add, +body .ui-dialog .tab-content .charsheet .repcontrol { + grid-area: buttons; +} +body .ui-dialog .tab-content .charsheet .repcontrol { + display: flex; + justify-content: space-between; + place-self: center stretch; +} +body .ui-dialog .tab-content .charsheet .repcontrol-button--add { + place-self: center end; + width: auto; + height: auto; +} +body .ui-dialog .tab-content .charsheet .repcontrol-button--add ~ .repcontrol { + place-self: center start; +} +body .ui-dialog .tab-content .charsheet .display-control:not(:checked) + .controlled-display { + display: none; +} +body .ui-dialog .tab-content .charsheet .display-control--inverted:checked + .controlled-display { + display: none; +} +body .ui-dialog .tab-content .charsheet .display-control--non-zero:is([value="0"], :not([value]), [value=""]) + .controlled-display { + display: none; +} body .ui-dialog .tab-content .charsheet header { margin-bottom: var(--half-gap); align-items: start; @@ -2995,6 +2769,71 @@ body .ui-dialog .tab-content .charsheet header .input-desc { flex: 1 1; min-width: min(300px, 100%); } +body .ui-dialog .tab-content .charsheet .section--inventory { + gap: var(--half-gap); + grid-template-areas: "header" "backpack" "content" "buttons"; +} +body .ui-dialog .tab-content .charsheet .section--inventory .marble-header { + filter: var(--fx-shadow); +} +body .ui-dialog .tab-content .charsheet .section--inventory .repcontainer { + gap: var(--tiny-gap); +} +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded { + display: grid; + grid-template-columns: auto 1fr auto; + grid-template-rows: auto auto; +} +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded textarea { + grid-column: 1/-1; + grid-row: 2; +} +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed { + display: flex; +} +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed input, +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded input { + width: 100%; +} +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed input[type=text], +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded input[type=text] { + flex: 1; +} +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .collapsed input[type=number], +body .ui-dialog .tab-content .charsheet .section--inventory .repitem .expanded input[type=number] { + width: 2em; +} +body .ui-dialog .tab-content .charsheet .section--inventory .repcontrol { + align-self: stretch; +} +body .ui-dialog .tab-content .charsheet .section--inventory__description { + background: var(--accentColor); + font-size: 0.7em; + height: 10em; +} +body .ui-dialog .tab-content .charsheet .section--inventory__quantity--wrapper { + position: relative; + font-size: 0.8em; +} +body .ui-dialog .tab-content .charsheet .section--inventory__quantity--wrapper span { + position: absolute; + top: 50%; + left: 0; + translate: 0 calc(-50% - 0.05em); +} +body .ui-dialog .tab-content .charsheet .section--inventory__quantity--wrapper input { + --inputPadding: 0; + line-height: 1; +} +body .ui-dialog .tab-content .charsheet .section--inventory__name { + font-weight: bold; +} +body .ui-dialog .tab-content .charsheet .section--inventory [class^=subsection] { + filter: var(--fx-shadow); +} +body .ui-dialog .tab-content .charsheet .section--inventory .subsection--tinyitems { + margin-bottom: 1rem; +} body .ui-dialog .tab-content .charsheet .section--abilities { display: grid; gap: var(--half-gap); @@ -3027,17 +2866,13 @@ body .ui-dialog .tab-content .charsheet .repcontainer[data-groupname=repeating_a body .ui-dialog .tab-content .charsheet .repcontainer[data-groupname=repeating_abilities] .expanded .--spellReveal:not(:checked) + ul { display: none; } -body .ui-dialog .tab-content .charsheet .repcontainer[data-groupname=repeating_abilities] + .repcontrol { - justify-self: end; -} body .ui-dialog .tab-content .charsheet .armor { display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-self: start; } body .ui-dialog .tab-content .charsheet .armor .marble-header { - grid-column: 1/-1; - justify-self: start; + justify-self: stretch; } body .ui-dialog .tab-content .charsheet .armor .armor__row { display: grid; @@ -3164,7 +2999,7 @@ body .ui-dialog .tab-content .charsheet .tabs--dragonbane__container--monster .m white-space: pre-wrap; display: inline; } -body .ui-dialog .tab-content .charsheet .tabs--dragonbane__container--monster .repcontainer .roller { +body .ui-dialog .tab-content .charsheet .tabs--dragonbane__container--monster .repcontainer .label { display: inline; margin-inline: var(--half-gap); } @@ -3176,7 +3011,7 @@ body .ui-dialog .tab-content .charsheet .section--monster-stats { body .ui-dialog .tab-content .charsheet .section--monster-stats .input-label { color: var(--lm-fontColor); } -body .ui-dialog .tab-content .charsheet .section--monster-stats .collapsed { +body .ui-dialog .tab-content .charsheet .section--monster-stats .repitem .collapsed { display: block !important; } body .ui-dialog .tab-content .charsheet .section--monster-attacks { @@ -3238,25 +3073,28 @@ body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem > .collapsed .subtable-list .subtable-row:nth-child(even) { background-color: rgba(255 255 255/var(--rowOpacity)); } -body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem .expanded.expanded ul { +body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem li::marker { + content: ""; +} +body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem > .expanded.expanded ul { padding-left: var(--normal-gap); padding-right: var(--normal-gap); } -body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem .expanded.expanded .subtable-row { +body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem > .expanded.expanded .subtable-row { display: grid; grid-template-columns: auto 1fr 1fr; gap: var(--tiny-gap); position: relative; } -body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem .expanded.expanded .subtable-row > :first-child { +body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem > .expanded.expanded .subtable-row > :first-child { padding-left: var(--normal-gap); } -body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem .expanded.expanded .subtable-row:before { +body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem > .expanded.expanded .subtable-row:before { position: absolute; left: var(--half-gap); top: -2px; } -body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem .expanded.expanded .subtable-row .section--monster-sub-attacks__description { +body .ui-dialog .tab-content .charsheet .section--monster-attacks .repcontainer > .repitem > .expanded.expanded .subtable-row .section--monster-sub-attacks__description { grid-column: 1/-1; } body .ui-dialog .tab-content .charsheet .tabs--dragonbane__container--settings section { @@ -3343,6 +3181,218 @@ body .ui-dialog .tab-content .charsheet .section--gm .repcontainer > .repitem .c body .ui-dialog .tab-content .charsheet .section--gm .repcontainer > .repitem .collapsed .subtable-list subtable-row:nth-child(even) { background-color: rgba(255 255 255/var(--rowOpacity)); } +body .ui-dialog .tab-content .charsheet .section--points { + --gridColumnWidth: 270px; + display: grid; + align-content: start; + grid-template-columns: repeat(auto-fit, minmax(var(--gridColumnWidth), 1fr)); + gap: var(--half-gap); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=section] { + container-type: inline-size; +} +body .ui-dialog .tab-content .charsheet .section--points .section--rest { + display: flex; + justify-content: space-around; +} +body .ui-dialog .tab-content .charsheet .section--points .section--rest label { + display: grid; + grid-template-columns: 1fr auto; + place-items: center; + cursor: pointer; + gap: 0.5em; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] { + box-sizing: border-box; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + display: grid; + grid-template-columns: 25cqw 2fr; + grid-template-rows: auto 1fr; + grid-template-areas: "title title" "max current"; + aspect-ratio: 950/300; + padding: 4cqw 6cqw; + filter: var(--fx-shadow); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=willpower] { + background-image: var(--img-plate-willpower); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=willpower] .fill-left input { + filter: invert(0.5) brightness(1.5) sepia(1) saturate(3) hue-rotate(100deg); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=health] { + background-image: var(--img-plate-hp); + position: relative; + z-index: 2; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate][class*=health] .fill-left input { + filter: invert(0.5) brightness(1.5) sepia(1) saturate(3) hue-rotate(320deg); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] h3 { + grid-area: title; + text-align: left; + color: var(--dm-fontColor); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores { + display: flex; + justify-content: center; + align-items: center; + font-size: 1.25em; + line-height: 1; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores::after { + content: "/"; + color: var(--accentColor); + order: 2; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores input { + place-self: center; + border: 0; + padding: 0; + width: 2ch; + text-align: right; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .scores input:nth-of-type(2) { + order: 3; + font-weight: bold; + text-align: left; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="0"] + .fill-left input:nth-child(2), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="0"] + .fill-left input:nth-child(2) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="1"] + .fill-left input:nth-child(3), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="1"] + .fill-left input:nth-child(3) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="2"] + .fill-left input:nth-child(4), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="2"] + .fill-left input:nth-child(4) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="3"] + .fill-left input:nth-child(5), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="3"] + .fill-left input:nth-child(5) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="4"] + .fill-left input:nth-child(6), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="4"] + .fill-left input:nth-child(6) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="5"] + .fill-left input:nth-child(7), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="5"] + .fill-left input:nth-child(7) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="6"] + .fill-left input:nth-child(8), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="6"] + .fill-left input:nth-child(8) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="7"] + .fill-left input:nth-child(9), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="7"] + .fill-left input:nth-child(9) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="8"] + .fill-left input:nth-child(10), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="8"] + .fill-left input:nth-child(10) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="9"] + .fill-left input:nth-child(11), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="9"] + .fill-left input:nth-child(11) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="10"] + .fill-left input:nth-child(12), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="10"] + .fill-left input:nth-child(12) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="11"] + .fill-left input:nth-child(13), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="11"] + .fill-left input:nth-child(13) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="12"] + .fill-left input:nth-child(14), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="12"] + .fill-left input:nth-child(14) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="13"] + .fill-left input:nth-child(15), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="13"] + .fill-left input:nth-child(15) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="14"] + .fill-left input:nth-child(16), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="14"] + .fill-left input:nth-child(16) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="15"] + .fill-left input:nth-child(17), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="15"] + .fill-left input:nth-child(17) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="16"] + .fill-left input:nth-child(18), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="16"] + .fill-left input:nth-child(18) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="17"] + .fill-left input:nth-child(19), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="17"] + .fill-left input:nth-child(19) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="18"] + .fill-left input:nth-child(20), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="18"] + .fill-left input:nth-child(20) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="19"] + .fill-left input:nth-child(21), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="19"] + .fill-left input:nth-child(21) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="20"] + .fill-left input:nth-child(22), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] input[type=hidden][value="20"] + .fill-left input:nth-child(22) ~ input { + display: none; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left { + display: grid; + grid-template-columns: repeat(10, 1fr); + grid-template-rows: 1fr 1fr; + gap: 2cqw 0; + padding-right: 2.5cqw; + --fillLeftSelectedColor: var(--elementColor); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input { + position: relative; + --background: var(--img-point1); + background: var(--background); + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+1) { + --background: var(--img-point2); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+2) { + --background: var(--img-point3); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+3) { + --background: var(--img-point4); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(5n+4) { + --background: var(--img-point5); +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(6), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(16) { + margin-right: 2cqw; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(7), body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input:nth-child(17) { + margin-left: 2cqw; +} +body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left input.fill-left__radio:checked ~ input, body .ui-dialog .tab-content .charsheet .section--points [class^=plate] .fill-left .fill-left__radio[type=hidden][value="0"] ~ input { + filter: invert(0.8); +} +body .ui-dialog .tab-content .charsheet .section--points .death-saves { + position: relative; + display: flex; + justify-content: space-around; + align-items: center; + top: -1em; + padding: 1em 1em 0.75em 1em; + margin: 0 0.5em; + background: var(--img-field-parchment); + background-size: cover; + background-position: bottom center; + filter: var(--fx-shadow); + z-index: 1; +} +body .ui-dialog .tab-content .charsheet .section--points .death-saves button::before { + content: none; +} +body .ui-dialog .tab-content .charsheet .section--points .death-saves [class^=death-saves] { + display: flex; + flex-direction: column; +} +body .ui-dialog .tab-content .charsheet .section--points .death-saves [class^=death-saves] .fill-left { + --fillLeftSelectedColor: none; + display: flex; + gap: 0.25em; +} +body .ui-dialog .tab-content .charsheet .section--points .death-saves [class^=death-saves] .fill-left input::before { + width: calc(var(--checkboxWidth) - 0.1em); + height: calc(var(--checkboxWidth) - 0.1em); +} +@container charsheet (max-width: 550px) { + body .ui-dialog .tab-content .charsheet .section--points { + --gridColumnWidth: 230px; + } +} body .ui-dialog .tab-content .charsheet .colon:not(:empty):after { content: ":"; } @@ -3352,6 +3402,19 @@ body .ui-dialog .tab-content .charsheet .disabled { body .ui-dialog .tab-content .charsheet button[type=roll]:before { content: none; } +body .ui-dialog .tab-content .charsheet h1 { + white-space: pre-wrap; +} +body .ui-dialog .tab-content .charsheet label, +body .ui-dialog .tab-content .charsheet select { + font-size: inherit; + color: inherit; + font-family: inherit; +} +body .ui-dialog .tab-content .charsheet label option, +body .ui-dialog .tab-content .charsheet select option { + background-color: var(--backColor); +} body .ui-dialog .tab-content .charsheet [hidden] { display: none; } @@ -3499,6 +3562,9 @@ body .ui-dialog .tab-content .charsheet .repcontrol_edit::before { display: grid; place-content: center; } +body .ui-dialog .tab-content .charsheet .repcontrol_edit::before.round-button--no-image { + background: none; +} body .ui-dialog .tab-content .charsheet .repcontrol_edit::before:hover { filter: hue-rotate(-160deg) brightness(1.5) saturate(2); } @@ -3560,6 +3626,9 @@ body .ui-dialog .tab-content .charsheet .repcontrol_add::before { width: 20px; content: "new_label"; } +body .ui-dialog .tab-content .charsheet .repcontrol_add::before.round-button--no-image { + background: none; +} body .ui-dialog .tab-content .charsheet .repcontrol_add::before:hover { filter: hue-rotate(-160deg) brightness(1.5) saturate(2); } @@ -3581,6 +3650,9 @@ body .ui-dialog .tab-content .charsheet .repcontrol-button--add:before { width: 20px; content: "new_label"; } +body .ui-dialog .tab-content .charsheet .repcontrol-button--add:before.round-button--no-image { + background: none; +} body .ui-dialog .tab-content .charsheet .repcontrol-button--add:before:hover { filter: hue-rotate(-160deg) brightness(1.5) saturate(2); } @@ -3603,6 +3675,8 @@ body.sheet-darkmode { --img-underline2: var(--img-underline2-dm); --img-underline3: var(--img-underline3-dm); --attributeGradientOuter: var(--dm-attributeGradientOuter); + --elementColor: var(--dm-elementColor); + --collapseExpandedColor:var(--dm-collapseExpandedColor); color: var(--fontColor); } body .containerWrapper { diff --git a/dragonbane/dragonbane.html b/dragonbane/dragonbane.html index d4d22d6606..a0e587da45 100644 --- a/dragonbane/dragonbane.html +++ b/dragonbane/dragonbane.html @@ -2,7 +2,7 @@ -
@@ -24,24 +24,24 @@
- @@ -95,6 +95,18 @@ + +
+

+ +
+
+

+
@@ -147,79 +159,79 @@
-
-
-
-
-
-
-
+

@@ -273,9 +285,9 @@
@@ -287,9 +299,9 @@
@@ -301,9 +313,9 @@ @@ -315,9 +327,9 @@ @@ -329,9 +341,9 @@ @@ -343,9 +355,9 @@ @@ -357,9 +369,9 @@ @@ -371,9 +383,9 @@ @@ -385,9 +397,9 @@ @@ -399,9 +411,9 @@ @@ -413,9 +425,9 @@ @@ -427,9 +439,9 @@ @@ -441,9 +453,9 @@ @@ -455,9 +467,9 @@ @@ -469,9 +481,9 @@ @@ -483,9 +495,9 @@ @@ -497,9 +509,9 @@ @@ -511,9 +523,9 @@ @@ -525,9 +537,9 @@ @@ -538,13 +550,13 @@
- +
@@ -552,13 +564,13 @@
- +
@@ -566,13 +578,13 @@
- +
@@ -580,13 +592,13 @@
- +
@@ -594,13 +606,13 @@
- +
@@ -608,13 +620,13 @@
- +
@@ -622,13 +634,13 @@
- +
@@ -636,13 +648,13 @@
- +
@@ -650,13 +662,13 @@
- +
@@ -664,21 +676,21 @@
- +
-
+

Secondary Skills

-
@@ -689,9 +701,9 @@
-
+

+
- +
@@ -760,19 +774,23 @@
-
+

-
+
+
-
+

-
- - - + +
-

Willpower Points

+

Willpower Points

- +
@@ -956,10 +982,10 @@
-

Hit Points

+

Hit Points

- +
@@ -987,10 +1013,10 @@
- -
@@ -1014,27 +1040,29 @@
-
+

-
+
+
-
    +
    • -
    • +
    • -
    • +
    • -
    • +
    • -
    • +
    • -
    • +
    • -
    • +
    • -
    • +
    • -
    • +
-
+
+
@@ -1155,61 +1184,318 @@
-
-
- - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
    +
  • + +
  • +
+
+ +
+
+
+
-
+
- -
-
+
+
@@ -1327,14 +1613,14 @@
- - - -
@@ -1372,8 +1658,9 @@

{{/label}}
{{computed::roll1}}
{{/roll1}}
{{#damage}} -
-

+
{{#damage_label}} +

{{damage_label}}

{{/damage_label}}{{^damage_label}} +

{{/damage_label}}
{{damage}}
{{/damage}}{{#spell}}
{{#rank}} @@ -1422,11 +1709,11 @@ const k = (function(){ const kFuncs = {}; - const cascades = {"attr_character_name":{"name":"character_name","type":"text","defaultValue":"","affects":[],"triggeredFuncs":["setActionCalls"],"listenerFunc":"accessSheet","listener":"change:character_name"},"attr_sheet_version":{"name":"sheet_version","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_sheet_state":{"name":"sheet_state","type":"hidden","defaultValue":"settings","triggeredFuncs":[],"affects":[]},"attr_collapsed":{"name":"collapsed","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_push":{"triggeredFuncs":["pushRoll"],"name":"push","listener":"clicked:push","listenerFunc":"accessSheet","type":"action"},"attr_drop_name":{"triggeredFuncs":["handleCompendiumDrop"],"name":"drop_name","listener":"change:drop_name","listenerFunc":"accessSheet","type":"hidden","defaultValue":"","affects":[]},"attr_drop_data":{"name":"drop_data","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_dragonbane_tab":{"name":"dragonbane_tab","type":"hidden","defaultValue":"nav-tabs-dragonbane--settings","triggeredFuncs":[],"affects":[]},"attr_boons":{"name":"boons","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_banes":{"name":"banes","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_reset-modifiers":{"triggeredFuncs":["resetModifiers"],"name":"reset-modifiers","listener":"clicked:reset-modifiers","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--settings":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--settings","listener":"clicked:nav-tabs-dragonbane--settings","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--pc":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--pc","listener":"clicked:nav-tabs-dragonbane--pc","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--monster":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--monster","listener":"clicked:nav-tabs-dragonbane--monster","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--party":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--party","listener":"clicked:nav-tabs-dragonbane--party","listenerFunc":"accessSheet","type":"action"},"attr_magical_mishaps":{"name":"magical_mishaps","type":"checkbox","defaultValue":1,"triggeredFuncs":[],"affects":[]},"attr_allow_push":{"name":"allow_push","type":"checkbox","defaultValue":1,"triggeredFuncs":[],"affects":[]},"attr_whisper":{"name":"whisper","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_sheet_type":{"triggeredFuncs":["hideInactiveNavButtons"],"name":"sheet_type","listener":"change:sheet_type","listenerFunc":"accessSheet","type":"select","defaultValue":"","affects":[]},"attr_use_roll20_initiative":{"type":"select","name":"use_roll20_initiative","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_player_name":{"name":"player_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_kin":{"name":"kin","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_kin_movement":{"affects":["movement"],"name":"kin_movement","listener":"change:kin_movement","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_age":{"name":"age","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_profession":{"name":"profession","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_weakness":{"name":"weakness","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_apperance":{"name":"apperance","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_strength":{"affects":["damage_bonus_strength","strength_base_chance","axes","brawling","crafting","hammers","spears","swords","repeating_secondary-skills_$X_skill_total","encumbrance_limit"],"name":"strength","listener":"change:strength","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_Exhausted":{"name":"Exhausted","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_constitution":{"affects":["constitution_base_chance","repeating_secondary-skills_$X_skill_total"],"name":"constitution","listener":"change:constitution","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_Sickly":{"name":"Sickly","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_agility":{"affects":["damage_bonus_agility","agility_base_chance","movement","acrobatics","bows","crossbows","evade","hunting_&_fishing","knives","riding","sleight_of_hand","knives","riding","sleight_of_hand","slings","sneaking","staves","swimming","repeating_secondary-skills_$X_skill_total"],"name":"agility","listener":"change:agility","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_Dazed":{"name":"Dazed","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_intelligence":{"affects":["intelligence_base_chance","awareness","beast_lore","bushcraft","healing","languages","myths_&_legends","seamanship","spot_hidden","repeating_secondary-skills_$X_skill_total"],"name":"intelligence","listener":"change:intelligence","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_Angry":{"name":"Angry","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_willpower":{"affects":["willpower_base_chance","repeating_secondary-skills_$X_skill_total"],"name":"willpower","listener":"change:willpower","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_Scared":{"name":"Scared","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_charisma":{"affects":["charisma_base_chance","bluffing","bartering","performance","persuasion","repeating_secondary-skills_$X_skill_total"],"name":"charisma","listener":"change:charisma","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_Disheartened":{"name":"Disheartened","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_damage_bonus_strength":{"calculation":"calcDamageBonus","name":"damage_bonus_strength","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"attr_damage_bonus_agility":{"calculation":"calcDamageBonus","name":"damage_bonus_agility","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"attr_movement":{"calculation":"calcMovement","name":"movement","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_advance":{"triggeredFuncs":["advanceSkills"],"name":"advance","listener":"clicked:advance","listenerFunc":"accessSheet","type":"action"},"attr_strength_base_chance":{"calculation":"calcSkillBase","name":"strength_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_constitution_base_chance":{"calculation":"calcSkillBase","name":"constitution_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_agility_base_chance":{"calculation":"calcSkillBase","name":"agility_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_intelligence_base_chance":{"calculation":"calcSkillBase","name":"intelligence_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_willpower_base_chance":{"calculation":"calcSkillBase","name":"willpower_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_charisma_base_chance":{"calculation":"calcSkillBase","name":"charisma_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_acrobatics_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"acrobatics_advancement","listener":"change:acrobatics_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_acrobatics_levels":{"affects":["acrobatics"],"name":"acrobatics_levels","listener":"change:acrobatics_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_acrobatics":{"calculation":"calcSkill","name":"acrobatics","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_acrobatics-action":{"triggeredFuncs":["rollSkill"],"name":"acrobatics-action","listener":"clicked:acrobatics-action","listenerFunc":"accessSheet","type":"action"},"attr_acrobatics_action":{"name":"acrobatics_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_awareness_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"awareness_advancement","listener":"change:awareness_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_awareness_levels":{"affects":["awareness"],"name":"awareness_levels","listener":"change:awareness_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_awareness":{"calculation":"calcSkill","name":"awareness","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_awareness-action":{"triggeredFuncs":["rollSkill"],"name":"awareness-action","listener":"clicked:awareness-action","listenerFunc":"accessSheet","type":"action"},"attr_awareness_action":{"name":"awareness_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bartering_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bartering_advancement","listener":"change:bartering_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bartering_levels":{"affects":["bartering"],"name":"bartering_levels","listener":"change:bartering_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bartering":{"calculation":"calcSkill","name":"bartering","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bartering-action":{"triggeredFuncs":["rollSkill"],"name":"bartering-action","listener":"clicked:bartering-action","listenerFunc":"accessSheet","type":"action"},"attr_bartering_action":{"name":"bartering_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_beast_lore_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"beast_lore_advancement","listener":"change:beast_lore_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_beast_lore_levels":{"affects":["beast_lore"],"name":"beast_lore_levels","listener":"change:beast_lore_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_beast_lore":{"calculation":"calcSkill","name":"beast_lore","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_beast-lore-action":{"triggeredFuncs":["rollSkill"],"name":"beast-lore-action","listener":"clicked:beast-lore-action","listenerFunc":"accessSheet","type":"action"},"attr_beast_lore_action":{"name":"beast_lore_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bluffing_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bluffing_advancement","listener":"change:bluffing_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bluffing_levels":{"affects":["bluffing"],"name":"bluffing_levels","listener":"change:bluffing_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bluffing":{"calculation":"calcSkill","name":"bluffing","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bluffing-action":{"triggeredFuncs":["rollSkill"],"name":"bluffing-action","listener":"clicked:bluffing-action","listenerFunc":"accessSheet","type":"action"},"attr_bluffing_action":{"name":"bluffing_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bushcraft_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bushcraft_advancement","listener":"change:bushcraft_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bushcraft_levels":{"affects":["bushcraft"],"name":"bushcraft_levels","listener":"change:bushcraft_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bushcraft":{"calculation":"calcSkill","name":"bushcraft","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bushcraft-action":{"triggeredFuncs":["rollSkill"],"name":"bushcraft-action","listener":"clicked:bushcraft-action","listenerFunc":"accessSheet","type":"action"},"attr_bushcraft_action":{"name":"bushcraft_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_crafting_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"crafting_advancement","listener":"change:crafting_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_crafting_levels":{"affects":["crafting"],"name":"crafting_levels","listener":"change:crafting_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_crafting":{"calculation":"calcSkill","name":"crafting","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_crafting-action":{"triggeredFuncs":["rollSkill"],"name":"crafting-action","listener":"clicked:crafting-action","listenerFunc":"accessSheet","type":"action"},"attr_crafting_action":{"name":"crafting_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_evade_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"evade_advancement","listener":"change:evade_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_evade_levels":{"affects":["evade"],"name":"evade_levels","listener":"change:evade_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_evade":{"calculation":"calcSkill","name":"evade","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_evade-action":{"triggeredFuncs":["rollSkill"],"name":"evade-action","listener":"clicked:evade-action","listenerFunc":"accessSheet","type":"action"},"attr_evade_action":{"name":"evade_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_healing_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"healing_advancement","listener":"change:healing_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_healing_levels":{"affects":["healing"],"name":"healing_levels","listener":"change:healing_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_healing":{"calculation":"calcSkill","name":"healing","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_healing-action":{"triggeredFuncs":["rollSkill"],"name":"healing-action","listener":"clicked:healing-action","listenerFunc":"accessSheet","type":"action"},"attr_healing_action":{"name":"healing_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_hunting_&_fishing_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"hunting_&_fishing_advancement","listener":"change:hunting_&_fishing_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_hunting_&_fishing_levels":{"affects":["hunting_&_fishing"],"name":"hunting_&_fishing_levels","listener":"change:hunting_&_fishing_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_hunting_&_fishing":{"calculation":"calcSkill","name":"hunting_&_fishing","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_hunting-&-fishing-action":{"triggeredFuncs":["rollSkill"],"name":"hunting-&-fishing-action","listener":"clicked:hunting-&-fishing-action","listenerFunc":"accessSheet","type":"action"},"attr_hunting_&_fishing_action":{"name":"hunting_&_fishing_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_languages_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"languages_advancement","listener":"change:languages_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_languages_levels":{"affects":["languages"],"name":"languages_levels","listener":"change:languages_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_languages":{"calculation":"calcSkill","name":"languages","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_languages-action":{"triggeredFuncs":["rollSkill"],"name":"languages-action","listener":"clicked:languages-action","listenerFunc":"accessSheet","type":"action"},"attr_languages_action":{"name":"languages_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_myths_&_legends_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"myths_&_legends_advancement","listener":"change:myths_&_legends_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_myths_&_legends_levels":{"affects":["myths_&_legends"],"name":"myths_&_legends_levels","listener":"change:myths_&_legends_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_myths_&_legends":{"calculation":"calcSkill","name":"myths_&_legends","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_myths-&-legends-action":{"triggeredFuncs":["rollSkill"],"name":"myths-&-legends-action","listener":"clicked:myths-&-legends-action","listenerFunc":"accessSheet","type":"action"},"attr_myths_&_legends_action":{"name":"myths_&_legends_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_performance_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"performance_advancement","listener":"change:performance_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_performance_levels":{"affects":["performance"],"name":"performance_levels","listener":"change:performance_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_performance":{"calculation":"calcSkill","name":"performance","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_performance-action":{"triggeredFuncs":["rollSkill"],"name":"performance-action","listener":"clicked:performance-action","listenerFunc":"accessSheet","type":"action"},"attr_performance_action":{"name":"performance_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_persuasion_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"persuasion_advancement","listener":"change:persuasion_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_persuasion_levels":{"affects":["persuasion"],"name":"persuasion_levels","listener":"change:persuasion_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_persuasion":{"calculation":"calcSkill","name":"persuasion","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_persuasion-action":{"triggeredFuncs":["rollSkill"],"name":"persuasion-action","listener":"clicked:persuasion-action","listenerFunc":"accessSheet","type":"action"},"attr_persuasion_action":{"name":"persuasion_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_riding_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"riding_advancement","listener":"change:riding_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_riding_levels":{"affects":["riding"],"name":"riding_levels","listener":"change:riding_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_riding":{"calculation":"calcSkill","name":"riding","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_riding-action":{"triggeredFuncs":["rollSkill"],"name":"riding-action","listener":"clicked:riding-action","listenerFunc":"accessSheet","type":"action"},"attr_riding_action":{"name":"riding_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_seamanship_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"seamanship_advancement","listener":"change:seamanship_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_seamanship_levels":{"affects":["seamanship"],"name":"seamanship_levels","listener":"change:seamanship_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_seamanship":{"calculation":"calcSkill","name":"seamanship","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_seamanship-action":{"triggeredFuncs":["rollSkill"],"name":"seamanship-action","listener":"clicked:seamanship-action","listenerFunc":"accessSheet","type":"action"},"attr_seamanship_action":{"name":"seamanship_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_sleight_of_hand_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"sleight_of_hand_advancement","listener":"change:sleight_of_hand_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_sleight_of_hand_levels":{"affects":["sleight_of_hand"],"name":"sleight_of_hand_levels","listener":"change:sleight_of_hand_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_sleight_of_hand":{"calculation":"calcSkill","name":"sleight_of_hand","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_sleight-of-hand-action":{"triggeredFuncs":["rollSkill"],"name":"sleight-of-hand-action","listener":"clicked:sleight-of-hand-action","listenerFunc":"accessSheet","type":"action"},"attr_sleight_of_hand_action":{"name":"sleight_of_hand_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_sneaking_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"sneaking_advancement","listener":"change:sneaking_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_sneaking_levels":{"affects":["sneaking"],"name":"sneaking_levels","listener":"change:sneaking_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_sneaking":{"calculation":"calcSkill","name":"sneaking","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_sneaking-action":{"triggeredFuncs":["rollSkill"],"name":"sneaking-action","listener":"clicked:sneaking-action","listenerFunc":"accessSheet","type":"action"},"attr_sneaking_action":{"name":"sneaking_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_spot_hidden_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"spot_hidden_advancement","listener":"change:spot_hidden_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_spot_hidden_levels":{"affects":["spot_hidden"],"name":"spot_hidden_levels","listener":"change:spot_hidden_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_spot_hidden":{"calculation":"calcSkill","name":"spot_hidden","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_spot-hidden-action":{"triggeredFuncs":["rollSkill"],"name":"spot-hidden-action","listener":"clicked:spot-hidden-action","listenerFunc":"accessSheet","type":"action"},"attr_spot_hidden_action":{"name":"spot_hidden_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_swimming_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"swimming_advancement","listener":"change:swimming_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_swimming_levels":{"affects":["swimming"],"name":"swimming_levels","listener":"change:swimming_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_swimming":{"calculation":"calcSkill","name":"swimming","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_swimming-action":{"triggeredFuncs":["rollSkill"],"name":"swimming-action","listener":"clicked:swimming-action","listenerFunc":"accessSheet","type":"action"},"attr_swimming_action":{"name":"swimming_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_axes_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"axes_advancement","listener":"change:axes_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_axes_skill_levels":{"affects":["axes"],"name":"axes_skill_levels","listener":"change:axes_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_axes":{"calculation":"calcSkill","name":"axes","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_axes-action":{"triggeredFuncs":["rollSkill"],"name":"axes-action","listener":"clicked:axes-action","listenerFunc":"accessSheet","type":"action"},"attr_axes_action":{"name":"axes_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bows_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bows_advancement","listener":"change:bows_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bows_skill_levels":{"affects":["bows"],"name":"bows_skill_levels","listener":"change:bows_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bows":{"calculation":"calcSkill","name":"bows","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bows-action":{"triggeredFuncs":["rollSkill"],"name":"bows-action","listener":"clicked:bows-action","listenerFunc":"accessSheet","type":"action"},"attr_bows_action":{"name":"bows_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_brawling_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"brawling_advancement","listener":"change:brawling_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_brawling_skill_levels":{"affects":["brawling"],"name":"brawling_skill_levels","listener":"change:brawling_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_brawling":{"calculation":"calcSkill","name":"brawling","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_brawling-action":{"triggeredFuncs":["rollSkill"],"name":"brawling-action","listener":"clicked:brawling-action","listenerFunc":"accessSheet","type":"action"},"attr_brawling_action":{"name":"brawling_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_crossbows_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"crossbows_advancement","listener":"change:crossbows_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_crossbows_skill_levels":{"affects":["crossbows"],"name":"crossbows_skill_levels","listener":"change:crossbows_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_crossbows":{"calculation":"calcSkill","name":"crossbows","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_crossbows-action":{"triggeredFuncs":["rollSkill"],"name":"crossbows-action","listener":"clicked:crossbows-action","listenerFunc":"accessSheet","type":"action"},"attr_crossbows_action":{"name":"crossbows_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_hammers_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"hammers_advancement","listener":"change:hammers_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_hammers_skill_levels":{"affects":["hammers"],"name":"hammers_skill_levels","listener":"change:hammers_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_hammers":{"calculation":"calcSkill","name":"hammers","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_hammers-action":{"triggeredFuncs":["rollSkill"],"name":"hammers-action","listener":"clicked:hammers-action","listenerFunc":"accessSheet","type":"action"},"attr_hammers_action":{"name":"hammers_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_knives_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"knives_advancement","listener":"change:knives_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_knives_skill_levels":{"affects":["knives"],"name":"knives_skill_levels","listener":"change:knives_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_knives":{"calculation":"calcSkill","name":"knives","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_knives-action":{"triggeredFuncs":["rollSkill"],"name":"knives-action","listener":"clicked:knives-action","listenerFunc":"accessSheet","type":"action"},"attr_knives_action":{"name":"knives_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_slings_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"slings_advancement","listener":"change:slings_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_slings_skill_levels":{"affects":["slings"],"name":"slings_skill_levels","listener":"change:slings_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_slings":{"calculation":"calcSkill","name":"slings","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_slings-action":{"triggeredFuncs":["rollSkill"],"name":"slings-action","listener":"clicked:slings-action","listenerFunc":"accessSheet","type":"action"},"attr_slings_action":{"name":"slings_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_spears_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"spears_advancement","listener":"change:spears_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_spears_skill_levels":{"affects":["spears"],"name":"spears_skill_levels","listener":"change:spears_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_spears":{"calculation":"calcSkill","name":"spears","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_spears-action":{"triggeredFuncs":["rollSkill"],"name":"spears-action","listener":"clicked:spears-action","listenerFunc":"accessSheet","type":"action"},"attr_spears_action":{"name":"spears_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_staves_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"staves_advancement","listener":"change:staves_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_staves_skill_levels":{"affects":["staves"],"name":"staves_skill_levels","listener":"change:staves_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_staves":{"calculation":"calcSkill","name":"staves","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_staves-action":{"triggeredFuncs":["rollSkill"],"name":"staves-action","listener":"clicked:staves-action","listenerFunc":"accessSheet","type":"action"},"attr_staves_action":{"name":"staves_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_swords_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"swords_advancement","listener":"change:swords_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_swords_skill_levels":{"affects":["swords"],"name":"swords_skill_levels","listener":"change:swords_skill_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_swords":{"calculation":"calcSkill","name":"swords","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_swords-action":{"triggeredFuncs":["rollSkill"],"name":"swords-action","listener":"clicked:swords-action","listenerFunc":"accessSheet","type":"action"},"attr_swords_action":{"name":"swords_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-secondary-skills":{"listenerFunc":"addItem","name":"add-secondary-skills","listener":"clicked:add-secondary-skills","type":"action"},"fieldset_repeating_secondary-skills":{"addFuncs":["initializeSkill","setupMagicSelect"],"triggeredFuncs":["setupMagicSelect"],"name":"repeating_secondary-skills","listener":"remove:repeating_secondary-skills","listenerFunc":"accessSheet","type":"fieldset"},"attr_repeating_secondary-skills_$X_collapse":{"name":"repeating_secondary-skills_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_secondary-skills_$X_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"repeating_secondary-skills_$X_advancement","listener":"change:repeating_secondary-skills:advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_repeating_secondary-skills_$X_levels":{"affects":["repeating_secondary-skills_$X_total"],"name":"repeating_secondary-skills_$X_levels","listener":"change:repeating_secondary-skills:levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_repeating_secondary-skills_$X_total":{"calculation":"calcSkill","name":"repeating_secondary-skills_$X_total","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_repeating_secondary-skills_$X_action":{"triggeredFuncs":["rollSkill"],"name":"repeating_secondary-skills_$X_action","listener":"clicked:repeating_secondary-skills:action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_secondary-skills_$X_action":{"name":"repeating_secondary-skills_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_secondary-skills_$X_name":{"name":"repeating_secondary-skills_$X_name","type":"span","defaultValue":"New Skill","triggeredFuncs":["setupMagicSelect"],"affects":[],"listener":"change:repeating_secondary-skills:name","listenerFunc":"accessSheet"},"attr_repeating_secondary-skills_$X_attribute_abbreviation":{"name":"repeating_secondary-skills_$X_attribute_abbreviation","type":"hidden","defaultValue":"intelligence-abbreviation","triggeredFuncs":[],"affects":[],"calculation":"convertAbbreviation"},"attr_repeating_secondary-skills_$X_attribute_select":{"affects":["repeating_secondary-skills_$X_total","repeating_secondary-skills_$X_attribute_abbreviation"],"name":"repeating_secondary-skills_$X_attribute_select","listener":"change:repeating_secondary-skills:attribute_select","listenerFunc":"accessSheet","type":"select","defaultValue":"intelligence","triggeredFuncs":[]},"attr_encumbrance":{"calculation":"calcEncumbrance","name":"encumbrance","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_encumbrance_max":{"calculation":"calcEncumbranceMax","name":"encumbrance_max","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_backpack":{"affects":["encumbrance_max"],"name":"backpack","listener":"change:backpack","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"triggeredFuncs":[]},"attr_repeating_gear_$X_collapse":{"name":"repeating_gear_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_gear_$X_quantity":{"affects":["encumbrance"],"name":"repeating_gear_$X_quantity","listener":"change:repeating_gear:quantity","listenerFunc":"accessSheet","type":"number","defaultValue":"1","triggeredFuncs":[]},"attr_repeating_gear_$X_name":{"name":"repeating_gear_$X_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_gear_$X_weight":{"affects":["encumbrance","encumbrance_limit"],"name":"repeating_gear_$X_weight","listener":"change:repeating_gear:weight","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_repeating_gear_$X_description":{"name":"repeating_gear_$X_description","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_memento":{"name":"memento","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_tiny_list":{"name":"tiny_list","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_collapse":{"name":"repeating_abilities_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_name":{"name":"repeating_abilities_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_abilities_$X_cast-action":{"triggeredFuncs":["castSpell"],"name":"repeating_abilities_$X_cast-action","listener":"clicked:repeating_abilities:cast-action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_abilities_$X_cast_action":{"name":"repeating_abilities_$X_cast_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_cost":{"name":"repeating_abilities_$X_cost","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_requirement":{"name":"repeating_abilities_$X_requirement","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_spell":{"name":"repeating_abilities_$X_spell","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_skill":{"name":"repeating_abilities_$X_skill","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_rank":{"name":"repeating_abilities_$X_rank","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_casting_time":{"name":"repeating_abilities_$X_casting_time","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_range":{"name":"repeating_abilities_$X_range","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_duration":{"name":"repeating_abilities_$X_duration","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_description":{"name":"repeating_abilities_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_gold":{"name":"gold","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_silver":{"name":"silver","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_copper":{"name":"copper","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_rating_total":{"calculation":"calcArmorTotal","name":"armor_rating_total","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_rating":{"affects":["armor_rating_total"],"name":"armor_rating","listener":"change:armor_rating","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_armor_name":{"name":"armor_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_armor_sneaking_bane":{"name":"armor_sneaking_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_evade_bane":{"name":"armor_evade_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_acrobatics_bane":{"name":"armor_acrobatics_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_helmet_rating":{"affects":["armor_rating_total"],"name":"helmet_rating","listener":"change:helmet_rating","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_helmet_name":{"name":"helmet_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_helmet_awareness_bane":{"name":"helmet_awareness_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_helmet_ranged_attacks_bane":{"name":"helmet_ranged_attacks_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_round-rest":{"name":"round-rest","type":"action"},"attr_round_rest":{"triggeredFuncs":["roundRest"],"name":"round_rest","listener":"change:round_rest","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_undefined":{"triggeredFuncs":["roundRest"],"name":"undefined","listener":"change:undefined","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_willpower_points":{"name":"willpower_points","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"attr_willpower_points_max":{"name":"willpower_points_max","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"attr_hit_points":{"name":"hit_points","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"attr_hit_points_max":{"name":"hit_points_max","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"act_death-saves-action":{"triggeredFuncs":["rollDeath"],"name":"death-saves-action","listener":"clicked:death-saves-action","listenerFunc":"accessSheet","type":"action"},"attr_death_saves_action":{"name":"death_saves_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_death_saves_successes":{"triggeredFuncs":["addSuccessHP"],"name":"death_saves_successes","listener":"change:death_saves_successes","listenerFunc":"accessSheet","type":"hidden","defaultValue":0,"affects":[]},"attr_death_saves_failures":{"name":"death_saves_failures","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_collapse":{"name":"repeating_weapons_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_name":{"name":"repeating_weapons_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_weapons_$X_action":{"triggeredFuncs":["rollAttack"],"name":"repeating_weapons_$X_action","listener":"clicked:repeating_weapons:action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_weapons_$X_action":{"name":"repeating_weapons_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_damage":{"name":"repeating_weapons_$X_damage","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_durability":{"calculation":"setDurability","name":"repeating_weapons_$X_durability","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_type":{"name":"repeating_weapons_$X_type","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_skill":{"name":"repeating_weapons_$X_skill","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_grip":{"name":"repeating_weapons_$X_grip","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_strength_requirement":{"name":"repeating_weapons_$X_strength_requirement","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_range":{"name":"repeating_weapons_$X_range","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_durability_max":{"affects":["repeating_weapons_$X_durability"],"name":"repeating_weapons_$X_durability_max","listener":"change:repeating_weapons:durability_max","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_repeating_weapons_$X_properties":{"name":"repeating_weapons_$X_properties","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_description":{"name":"repeating_weapons_$X_description","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_ferocity":{"name":"ferocity","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_size":{"name":"size","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_swarm":{"name":"swarm","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_monster-attacks-action":{"triggeredFuncs":["rollRandomAttack"],"name":"monster-attacks-action","listener":"clicked:monster-attacks-action","listenerFunc":"accessSheet","type":"action"},"attr_monster_attacks_action":{"name":"monster_attacks_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_collapse":{"name":"repeating_attacks_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_weight":{"name":"repeating_attacks_$X_weight","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_name":{"name":"repeating_attacks_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_attacks_$X_action":{"triggeredFuncs":["rollMonsterAttack"],"name":"repeating_attacks_$X_action","listener":"clicked:repeating_attacks:action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_attacks_$X_action":{"name":"repeating_attacks_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_description":{"name":"repeating_attacks_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable":{"name":"repeating_attacks_$X_subtable","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_1":{"name":"repeating_attacks_$X_subtable_weight_1","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_1":{"name":"repeating_attacks_$X_subtable_name_1","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_1":{"name":"repeating_attacks_$X_subtable_description_1","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_2":{"name":"repeating_attacks_$X_subtable_weight_2","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_2":{"name":"repeating_attacks_$X_subtable_name_2","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_2":{"name":"repeating_attacks_$X_subtable_description_2","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_3":{"name":"repeating_attacks_$X_subtable_weight_3","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_3":{"name":"repeating_attacks_$X_subtable_name_3","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_3":{"name":"repeating_attacks_$X_subtable_description_3","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_4":{"name":"repeating_attacks_$X_subtable_weight_4","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_4":{"name":"repeating_attacks_$X_subtable_name_4","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_4":{"name":"repeating_attacks_$X_subtable_description_4","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_5":{"name":"repeating_attacks_$X_subtable_weight_5","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_5":{"name":"repeating_attacks_$X_subtable_name_5","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_5":{"name":"repeating_attacks_$X_subtable_description_5","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_6":{"name":"repeating_attacks_$X_subtable_weight_6","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_6":{"name":"repeating_attacks_$X_subtable_name_6","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_6":{"name":"repeating_attacks_$X_subtable_description_6","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_damage":{"name":"repeating_attacks_$X_damage","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_1":{"name":"repeating_attacks_$X_subtable_damage_1","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_2":{"name":"repeating_attacks_$X_subtable_damage_2","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_3":{"name":"repeating_attacks_$X_subtable_damage_3","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_4":{"name":"repeating_attacks_$X_subtable_damage_4","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_5":{"name":"repeating_attacks_$X_subtable_damage_5","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_6":{"name":"repeating_attacks_$X_subtable_damage_6","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_cards":{"name":"cards","type":"text","defaultValue":"1,2,3,4,5,6,7,8,9,10","triggeredFuncs":[],"affects":[]},"act_initiative-action":{"triggeredFuncs":["rollInitiative"],"name":"initiative-action","listener":"clicked:initiative-action","listenerFunc":"accessSheet","type":"action"},"attr_initiative_action":{"name":"initiative_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_reset-action":{"triggeredFuncs":["resetInitiative"],"name":"reset-action","listener":"clicked:reset-action","listenerFunc":"accessSheet","type":"action"},"attr_reset_action":{"name":"reset_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_initiative_$X_name":{"name":"repeating_initiative_$X_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_initiative_$X_card":{"name":"repeating_initiative_$X_card","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_template_start":{"name":"template_start","type":"hidden","defaultValue":"@{whisper}&{template:dragonbane} {{character_name=@{character_name}}} {{character_id=@{character_id}}}","triggeredFuncs":[],"affects":[]}}; + const cascades = {"attr_character_name":{"name":"character_name","type":"text","defaultValue":"","affects":[],"triggeredFuncs":["setActionCalls"],"listenerFunc":"accessSheet","listener":"change:character_name"},"attr_sheet_version":{"name":"sheet_version","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_sheet_state":{"name":"sheet_state","type":"hidden","defaultValue":"settings","triggeredFuncs":[],"affects":[]},"attr_collapsed":{"name":"collapsed","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_push":{"triggeredFuncs":["pushRoll"],"name":"push","listener":"clicked:push","listenerFunc":"accessSheet","type":"action"},"attr_drop_name":{"triggeredFuncs":["handleCompendiumDrop"],"name":"drop_name","listener":"change:drop_name","listenerFunc":"accessSheet","type":"hidden","defaultValue":"","affects":[]},"attr_drop_data":{"name":"drop_data","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_dragonbane_tab":{"name":"dragonbane_tab","type":"hidden","defaultValue":"nav-tabs-dragonbane--settings","triggeredFuncs":[],"affects":[]},"attr_boons":{"name":"boons","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_banes":{"name":"banes","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_reset-modifiers":{"triggeredFuncs":["resetModifiers"],"name":"reset-modifiers","listener":"clicked:reset-modifiers","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--settings":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--settings","listener":"clicked:nav-tabs-dragonbane--settings","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--pc":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--pc","listener":"clicked:nav-tabs-dragonbane--pc","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--monster":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--monster","listener":"clicked:nav-tabs-dragonbane--monster","listenerFunc":"accessSheet","type":"action"},"act_nav-tabs-dragonbane--party":{"triggeredFuncs":["kSwitchTab","toggleNavButtons"],"name":"nav-tabs-dragonbane--party","listener":"clicked:nav-tabs-dragonbane--party","listenerFunc":"accessSheet","type":"action"},"attr_magical_mishaps":{"name":"magical_mishaps","type":"checkbox","defaultValue":1,"triggeredFuncs":[],"affects":[]},"attr_allow_push":{"name":"allow_push","type":"checkbox","defaultValue":1,"triggeredFuncs":[],"affects":[]},"attr_whisper":{"name":"whisper","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_sheet_type":{"triggeredFuncs":["hideInactiveNavButtons"],"name":"sheet_type","listener":"change:sheet_type","listenerFunc":"accessSheet","type":"select","defaultValue":"","affects":[]},"attr_use_roll20_initiative":{"type":"select","name":"use_roll20_initiative","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_willpower_points_bonus":{"affects":["willpower_points_max"],"name":"willpower_points_bonus","listener":"change:willpower_points_bonus","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_hit_points_bonus":{"affects":["hit_points_max"],"name":"hit_points_bonus","listener":"change:hit_points_bonus","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_player_name":{"name":"player_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_kin":{"name":"kin","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_kin_movement":{"affects":["movement"],"name":"kin_movement","listener":"change:kin_movement","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_age":{"name":"age","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_profession":{"name":"profession","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_weakness":{"name":"weakness","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_apperance":{"name":"apperance","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_strength":{"affects":["damage_bonus_strength","strength_base_chance","axes","brawling","crafting","hammers","spears","swords","repeating_secondary-skills_$X_skill_total","encumbrance_max"],"name":"strength","listener":"change:strength","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_exhausted":{"name":"exhausted","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_constitution":{"affects":["constitution_base_chance","repeating_secondary-skills_$X_skill_total","hit_points_max"],"name":"constitution","listener":"change:constitution","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_sickly":{"name":"sickly","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_agility":{"affects":["damage_bonus_agility","agility_base_chance","movement","acrobatics","bows","crossbows","evade","hunting_&_fishing","knives","riding","sleight_of_hand","knives","riding","sleight_of_hand","slings","sneaking","staves","swimming","repeating_secondary-skills_$X_skill_total"],"name":"agility","listener":"change:agility","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_dazed":{"name":"dazed","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_intelligence":{"affects":["intelligence_base_chance","awareness","beast_lore","bushcraft","healing","languages","myths_&_legends","seamanship","spot_hidden","repeating_secondary-skills_$X_skill_total"],"name":"intelligence","listener":"change:intelligence","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_angry":{"name":"angry","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_willpower":{"affects":["willpower_base_chance","willpower_points_max","repeating_secondary-skills_$X_skill_total"],"name":"willpower","listener":"change:willpower","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_scared":{"name":"scared","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_charisma":{"affects":["charisma_base_chance","bluffing","bartering","performance","persuasion","repeating_secondary-skills_$X_skill_total"],"name":"charisma","listener":"change:charisma","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]},"attr_disheartened":{"name":"disheartened","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_damage_bonus_strength":{"calculation":"calcDamageBonus","name":"damage_bonus_strength","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"attr_damage_bonus_agility":{"calculation":"calcDamageBonus","name":"damage_bonus_agility","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"attr_movement":{"calculation":"calcMovement","name":"movement","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_advance":{"triggeredFuncs":["advanceSkills"],"name":"advance","listener":"clicked:advance","listenerFunc":"accessSheet","type":"action"},"attr_strength_base_chance":{"calculation":"calcSkillBase","name":"strength_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_constitution_base_chance":{"calculation":"calcSkillBase","name":"constitution_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_agility_base_chance":{"calculation":"calcSkillBase","name":"agility_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_intelligence_base_chance":{"calculation":"calcSkillBase","name":"intelligence_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_willpower_base_chance":{"calculation":"calcSkillBase","name":"willpower_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_charisma_base_chance":{"calculation":"calcSkillBase","name":"charisma_base_chance","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_acrobatics_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"acrobatics_advancement","listener":"change:acrobatics_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_acrobatics_levels":{"affects":["acrobatics"],"name":"acrobatics_levels","listener":"change:acrobatics_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_acrobatics":{"calculation":"calcSkill","name":"acrobatics","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_acrobatics-action":{"triggeredFuncs":["rollSkill"],"name":"acrobatics-action","listener":"clicked:acrobatics-action","listenerFunc":"accessSheet","type":"action"},"attr_acrobatics_action":{"name":"acrobatics_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_awareness_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"awareness_advancement","listener":"change:awareness_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_awareness_levels":{"affects":["awareness"],"name":"awareness_levels","listener":"change:awareness_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_awareness":{"calculation":"calcSkill","name":"awareness","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_awareness-action":{"triggeredFuncs":["rollSkill"],"name":"awareness-action","listener":"clicked:awareness-action","listenerFunc":"accessSheet","type":"action"},"attr_awareness_action":{"name":"awareness_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bartering_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bartering_advancement","listener":"change:bartering_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bartering_levels":{"affects":["bartering"],"name":"bartering_levels","listener":"change:bartering_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bartering":{"calculation":"calcSkill","name":"bartering","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bartering-action":{"triggeredFuncs":["rollSkill"],"name":"bartering-action","listener":"clicked:bartering-action","listenerFunc":"accessSheet","type":"action"},"attr_bartering_action":{"name":"bartering_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_beast_lore_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"beast_lore_advancement","listener":"change:beast_lore_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_beast_lore_levels":{"affects":["beast_lore"],"name":"beast_lore_levels","listener":"change:beast_lore_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_beast_lore":{"calculation":"calcSkill","name":"beast_lore","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_beast-lore-action":{"triggeredFuncs":["rollSkill"],"name":"beast-lore-action","listener":"clicked:beast-lore-action","listenerFunc":"accessSheet","type":"action"},"attr_beast_lore_action":{"name":"beast_lore_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bluffing_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bluffing_advancement","listener":"change:bluffing_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bluffing_levels":{"affects":["bluffing"],"name":"bluffing_levels","listener":"change:bluffing_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bluffing":{"calculation":"calcSkill","name":"bluffing","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bluffing-action":{"triggeredFuncs":["rollSkill"],"name":"bluffing-action","listener":"clicked:bluffing-action","listenerFunc":"accessSheet","type":"action"},"attr_bluffing_action":{"name":"bluffing_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bushcraft_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bushcraft_advancement","listener":"change:bushcraft_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bushcraft_levels":{"affects":["bushcraft"],"name":"bushcraft_levels","listener":"change:bushcraft_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bushcraft":{"calculation":"calcSkill","name":"bushcraft","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bushcraft-action":{"triggeredFuncs":["rollSkill"],"name":"bushcraft-action","listener":"clicked:bushcraft-action","listenerFunc":"accessSheet","type":"action"},"attr_bushcraft_action":{"name":"bushcraft_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_crafting_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"crafting_advancement","listener":"change:crafting_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_crafting_levels":{"affects":["crafting"],"name":"crafting_levels","listener":"change:crafting_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_crafting":{"calculation":"calcSkill","name":"crafting","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_crafting-action":{"triggeredFuncs":["rollSkill"],"name":"crafting-action","listener":"clicked:crafting-action","listenerFunc":"accessSheet","type":"action"},"attr_crafting_action":{"name":"crafting_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_evade_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"evade_advancement","listener":"change:evade_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_evade_levels":{"affects":["evade"],"name":"evade_levels","listener":"change:evade_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_evade":{"calculation":"calcSkill","name":"evade","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_evade-action":{"triggeredFuncs":["rollSkill"],"name":"evade-action","listener":"clicked:evade-action","listenerFunc":"accessSheet","type":"action"},"attr_evade_action":{"name":"evade_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_healing_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"healing_advancement","listener":"change:healing_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_healing_levels":{"affects":["healing"],"name":"healing_levels","listener":"change:healing_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_healing":{"calculation":"calcSkill","name":"healing","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_healing-action":{"triggeredFuncs":["rollSkill"],"name":"healing-action","listener":"clicked:healing-action","listenerFunc":"accessSheet","type":"action"},"attr_healing_action":{"name":"healing_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_hunting_&_fishing_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"hunting_&_fishing_advancement","listener":"change:hunting_&_fishing_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_hunting_&_fishing_levels":{"affects":["hunting_&_fishing"],"name":"hunting_&_fishing_levels","listener":"change:hunting_&_fishing_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_hunting_&_fishing":{"calculation":"calcSkill","name":"hunting_&_fishing","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_hunting-&-fishing-action":{"triggeredFuncs":["rollSkill"],"name":"hunting-&-fishing-action","listener":"clicked:hunting-&-fishing-action","listenerFunc":"accessSheet","type":"action"},"attr_hunting_&_fishing_action":{"name":"hunting_&_fishing_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_languages_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"languages_advancement","listener":"change:languages_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_languages_levels":{"affects":["languages"],"name":"languages_levels","listener":"change:languages_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_languages":{"calculation":"calcSkill","name":"languages","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_languages-action":{"triggeredFuncs":["rollSkill"],"name":"languages-action","listener":"clicked:languages-action","listenerFunc":"accessSheet","type":"action"},"attr_languages_action":{"name":"languages_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_myths_&_legends_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"myths_&_legends_advancement","listener":"change:myths_&_legends_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_myths_&_legends_levels":{"affects":["myths_&_legends"],"name":"myths_&_legends_levels","listener":"change:myths_&_legends_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_myths_&_legends":{"calculation":"calcSkill","name":"myths_&_legends","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_myths-&-legends-action":{"triggeredFuncs":["rollSkill"],"name":"myths-&-legends-action","listener":"clicked:myths-&-legends-action","listenerFunc":"accessSheet","type":"action"},"attr_myths_&_legends_action":{"name":"myths_&_legends_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_performance_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"performance_advancement","listener":"change:performance_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_performance_levels":{"affects":["performance"],"name":"performance_levels","listener":"change:performance_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_performance":{"calculation":"calcSkill","name":"performance","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_performance-action":{"triggeredFuncs":["rollSkill"],"name":"performance-action","listener":"clicked:performance-action","listenerFunc":"accessSheet","type":"action"},"attr_performance_action":{"name":"performance_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_persuasion_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"persuasion_advancement","listener":"change:persuasion_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_persuasion_levels":{"affects":["persuasion"],"name":"persuasion_levels","listener":"change:persuasion_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_persuasion":{"calculation":"calcSkill","name":"persuasion","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_persuasion-action":{"triggeredFuncs":["rollSkill"],"name":"persuasion-action","listener":"clicked:persuasion-action","listenerFunc":"accessSheet","type":"action"},"attr_persuasion_action":{"name":"persuasion_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_riding_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"riding_advancement","listener":"change:riding_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_riding_levels":{"affects":["riding"],"name":"riding_levels","listener":"change:riding_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_riding":{"calculation":"calcSkill","name":"riding","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_riding-action":{"triggeredFuncs":["rollSkill"],"name":"riding-action","listener":"clicked:riding-action","listenerFunc":"accessSheet","type":"action"},"attr_riding_action":{"name":"riding_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_seamanship_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"seamanship_advancement","listener":"change:seamanship_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_seamanship_levels":{"affects":["seamanship"],"name":"seamanship_levels","listener":"change:seamanship_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_seamanship":{"calculation":"calcSkill","name":"seamanship","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_seamanship-action":{"triggeredFuncs":["rollSkill"],"name":"seamanship-action","listener":"clicked:seamanship-action","listenerFunc":"accessSheet","type":"action"},"attr_seamanship_action":{"name":"seamanship_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_sleight_of_hand_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"sleight_of_hand_advancement","listener":"change:sleight_of_hand_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_sleight_of_hand_levels":{"affects":["sleight_of_hand"],"name":"sleight_of_hand_levels","listener":"change:sleight_of_hand_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_sleight_of_hand":{"calculation":"calcSkill","name":"sleight_of_hand","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_sleight-of-hand-action":{"triggeredFuncs":["rollSkill"],"name":"sleight-of-hand-action","listener":"clicked:sleight-of-hand-action","listenerFunc":"accessSheet","type":"action"},"attr_sleight_of_hand_action":{"name":"sleight_of_hand_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_sneaking_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"sneaking_advancement","listener":"change:sneaking_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_sneaking_levels":{"affects":["sneaking"],"name":"sneaking_levels","listener":"change:sneaking_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_sneaking":{"calculation":"calcSkill","name":"sneaking","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_sneaking-action":{"triggeredFuncs":["rollSkill"],"name":"sneaking-action","listener":"clicked:sneaking-action","listenerFunc":"accessSheet","type":"action"},"attr_sneaking_action":{"name":"sneaking_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_spot_hidden_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"spot_hidden_advancement","listener":"change:spot_hidden_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_spot_hidden_levels":{"affects":["spot_hidden"],"name":"spot_hidden_levels","listener":"change:spot_hidden_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_spot_hidden":{"calculation":"calcSkill","name":"spot_hidden","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_spot-hidden-action":{"triggeredFuncs":["rollSkill"],"name":"spot-hidden-action","listener":"clicked:spot-hidden-action","listenerFunc":"accessSheet","type":"action"},"attr_spot_hidden_action":{"name":"spot_hidden_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_swimming_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"swimming_advancement","listener":"change:swimming_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_swimming_levels":{"affects":["swimming"],"name":"swimming_levels","listener":"change:swimming_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_swimming":{"calculation":"calcSkill","name":"swimming","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_swimming-action":{"triggeredFuncs":["rollSkill"],"name":"swimming-action","listener":"clicked:swimming-action","listenerFunc":"accessSheet","type":"action"},"attr_swimming_action":{"name":"swimming_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_axes_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"axes_advancement","listener":"change:axes_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_axes_levels":{"affects":["axes"],"name":"axes_levels","listener":"change:axes_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_axes":{"calculation":"calcSkill","name":"axes","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_axes-action":{"triggeredFuncs":["rollSkill"],"name":"axes-action","listener":"clicked:axes-action","listenerFunc":"accessSheet","type":"action"},"attr_axes_action":{"name":"axes_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_bows_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"bows_advancement","listener":"change:bows_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_bows_levels":{"affects":["bows"],"name":"bows_levels","listener":"change:bows_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_bows":{"calculation":"calcSkill","name":"bows","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_bows-action":{"triggeredFuncs":["rollSkill"],"name":"bows-action","listener":"clicked:bows-action","listenerFunc":"accessSheet","type":"action"},"attr_bows_action":{"name":"bows_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_brawling_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"brawling_advancement","listener":"change:brawling_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_brawling_levels":{"affects":["brawling"],"name":"brawling_levels","listener":"change:brawling_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_brawling":{"calculation":"calcSkill","name":"brawling","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_brawling-action":{"triggeredFuncs":["rollSkill"],"name":"brawling-action","listener":"clicked:brawling-action","listenerFunc":"accessSheet","type":"action"},"attr_brawling_action":{"name":"brawling_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_crossbows_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"crossbows_advancement","listener":"change:crossbows_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_crossbows_levels":{"affects":["crossbows"],"name":"crossbows_levels","listener":"change:crossbows_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_crossbows":{"calculation":"calcSkill","name":"crossbows","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_crossbows-action":{"triggeredFuncs":["rollSkill"],"name":"crossbows-action","listener":"clicked:crossbows-action","listenerFunc":"accessSheet","type":"action"},"attr_crossbows_action":{"name":"crossbows_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_hammers_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"hammers_advancement","listener":"change:hammers_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_hammers_levels":{"affects":["hammers"],"name":"hammers_levels","listener":"change:hammers_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_hammers":{"calculation":"calcSkill","name":"hammers","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_hammers-action":{"triggeredFuncs":["rollSkill"],"name":"hammers-action","listener":"clicked:hammers-action","listenerFunc":"accessSheet","type":"action"},"attr_hammers_action":{"name":"hammers_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_knives_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"knives_advancement","listener":"change:knives_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_knives_levels":{"affects":["knives"],"name":"knives_levels","listener":"change:knives_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_knives":{"calculation":"calcSkill","name":"knives","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_knives-action":{"triggeredFuncs":["rollSkill"],"name":"knives-action","listener":"clicked:knives-action","listenerFunc":"accessSheet","type":"action"},"attr_knives_action":{"name":"knives_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_slings_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"slings_advancement","listener":"change:slings_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_slings_levels":{"affects":["slings"],"name":"slings_levels","listener":"change:slings_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_slings":{"calculation":"calcSkill","name":"slings","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_slings-action":{"triggeredFuncs":["rollSkill"],"name":"slings-action","listener":"clicked:slings-action","listenerFunc":"accessSheet","type":"action"},"attr_slings_action":{"name":"slings_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_spears_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"spears_advancement","listener":"change:spears_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_spears_levels":{"affects":["spears"],"name":"spears_levels","listener":"change:spears_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_spears":{"calculation":"calcSkill","name":"spears","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_spears-action":{"triggeredFuncs":["rollSkill"],"name":"spears-action","listener":"clicked:spears-action","listenerFunc":"accessSheet","type":"action"},"attr_spears_action":{"name":"spears_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_staves_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"staves_advancement","listener":"change:staves_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_staves_levels":{"affects":["staves"],"name":"staves_levels","listener":"change:staves_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_staves":{"calculation":"calcSkill","name":"staves","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_staves-action":{"triggeredFuncs":["rollSkill"],"name":"staves-action","listener":"clicked:staves-action","listenerFunc":"accessSheet","type":"action"},"attr_staves_action":{"name":"staves_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_swords_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"swords_advancement","listener":"change:swords_advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_swords_levels":{"affects":["swords"],"name":"swords_levels","listener":"change:swords_levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_swords":{"calculation":"calcSkill","name":"swords","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_swords-action":{"triggeredFuncs":["rollSkill"],"name":"swords-action","listener":"clicked:swords-action","listenerFunc":"accessSheet","type":"action"},"attr_swords_action":{"name":"swords_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-secondary-skills":{"listenerFunc":"addItem","name":"add-secondary-skills","listener":"clicked:add-secondary-skills","type":"action"},"fieldset_repeating_secondary-skills":{"addFuncs":["initializeSkill","setupMagicSelect","setActionCalls"],"triggeredFuncs":["setupMagicSelect"],"name":"repeating_secondary-skills","listener":"remove:repeating_secondary-skills","listenerFunc":"accessSheet","type":"fieldset"},"attr_repeating_secondary-skills_$X_collapse":{"name":"repeating_secondary-skills_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_secondary-skills_$X_advancement":{"triggeredFuncs":["displayUpgrade"],"name":"repeating_secondary-skills_$X_advancement","listener":"change:repeating_secondary-skills:advancement","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_repeating_secondary-skills_$X_levels":{"affects":["repeating_secondary-skills_$X_total"],"name":"repeating_secondary-skills_$X_levels","listener":"change:repeating_secondary-skills:levels","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_repeating_secondary-skills_$X_total":{"calculation":"calcSkill","name":"repeating_secondary-skills_$X_total","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_repeating_secondary-skills_$X_action":{"triggeredFuncs":["rollSkill"],"name":"repeating_secondary-skills_$X_action","listener":"clicked:repeating_secondary-skills:action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_secondary-skills_$X_action":{"name":"repeating_secondary-skills_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_secondary-skills_$X_name":{"name":"repeating_secondary-skills_$X_name","type":"span","defaultValue":"New Skill","triggeredFuncs":["setupMagicSelect"],"affects":[],"listener":"change:repeating_secondary-skills:name","listenerFunc":"accessSheet"},"attr_repeating_secondary-skills_$X_attribute_abbreviation":{"name":"repeating_secondary-skills_$X_attribute_abbreviation","type":"hidden","defaultValue":"intelligence-abbreviation","triggeredFuncs":[],"affects":[],"calculation":"convertAbbreviation"},"attr_repeating_secondary-skills_$X_attribute_select":{"affects":["repeating_secondary-skills_$X_total","repeating_secondary-skills_$X_attribute_abbreviation"],"name":"repeating_secondary-skills_$X_attribute_select","listener":"change:repeating_secondary-skills:attribute_select","listenerFunc":"accessSheet","type":"select","defaultValue":"intelligence","triggeredFuncs":[]},"attr_encumbrance":{"calculation":"calcEncumbrance","name":"encumbrance","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_encumbrance_max":{"calculation":"calcEncumbranceMax","name":"encumbrance_max","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_backpack":{"affects":["encumbrance_max"],"name":"backpack","listener":"change:backpack","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"triggeredFuncs":[]},"act_add-gear":{"listenerFunc":"addItem","name":"add-gear","listener":"clicked:add-gear","type":"action"},"fieldset_repeating_gear":{"affects":["encumbrance"],"name":"repeating_gear","listener":"remove:repeating_gear","listenerFunc":"accessSheet","type":"fieldset"},"attr_repeating_gear_$X_collapse":{"name":"repeating_gear_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_gear_$X_quantity":{"affects":["encumbrance"],"name":"repeating_gear_$X_quantity","listener":"change:repeating_gear:quantity","listenerFunc":"accessSheet","type":"number","defaultValue":"1","triggeredFuncs":[]},"attr_repeating_gear_$X_name":{"name":"repeating_gear_$X_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_gear_$X_weight":{"affects":["encumbrance","encumbrance_limit"],"name":"repeating_gear_$X_weight","listener":"change:repeating_gear:weight","listenerFunc":"accessSheet","type":"number","defaultValue":1,"triggeredFuncs":[]},"attr_repeating_gear_$X_description":{"name":"repeating_gear_$X_description","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_memento":{"name":"memento","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_tiny_list":{"name":"tiny_list","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-abilities":{"listenerFunc":"addItem","name":"add-abilities","listener":"clicked:add-abilities","type":"action"},"fieldset_repeating_abilities":{"addFuncs":["setActionCalls"],"name":"repeating_abilities","type":"fieldset"},"attr_repeating_abilities_$X_collapse":{"name":"repeating_abilities_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_spell":{"name":"repeating_abilities_$X_spell","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":["repeating_abilities_$X_cost"],"listener":"change:repeating_abilities:spell","listenerFunc":"accessSheet"},"attr_repeating_abilities_$X_prepared":{"name":"repeating_abilities_$X_prepared","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_name":{"name":"repeating_abilities_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_abilities_$X_cast-action":{"triggeredFuncs":["castSpell"],"name":"repeating_abilities_$X_cast-action","listener":"clicked:repeating_abilities:cast-action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_abilities_$X_cast_action":{"name":"repeating_abilities_$X_cast_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_cost":{"name":"repeating_abilities_$X_cost","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[],"calculation":"calcCost"},"attr_repeating_abilities_$X_requirement":{"name":"repeating_abilities_$X_requirement","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_skill":{"affects":["repeating_abilities_$X_cost"],"name":"repeating_abilities_$X_skill","listener":"change:repeating_abilities:skill","listenerFunc":"accessSheet","type":"select","defaultValue":"","triggeredFuncs":[]},"attr_repeating_abilities_$X_spell_power":{"name":"repeating_abilities_$X_spell_power","type":"checkbox","defaultValue":1,"triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_rank":{"name":"repeating_abilities_$X_rank","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_casting_time":{"name":"repeating_abilities_$X_casting_time","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_range":{"name":"repeating_abilities_$X_range","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_duration":{"name":"repeating_abilities_$X_duration","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_abilities_$X_description":{"name":"repeating_abilities_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_gold":{"name":"gold","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_silver":{"name":"silver","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_copper":{"name":"copper","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_rating_total":{"calculation":"calcArmorTotal","name":"armor_rating_total","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_rating":{"affects":["armor_rating_total"],"name":"armor_rating","listener":"change:armor_rating","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_armor_name":{"name":"armor_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_armor_sneaking_bane":{"name":"armor_sneaking_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_evade_bane":{"name":"armor_evade_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_armor_acrobatics_bane":{"name":"armor_acrobatics_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_helmet_rating":{"affects":["armor_rating_total"],"name":"helmet_rating","listener":"change:helmet_rating","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_helmet_name":{"name":"helmet_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_helmet_awareness_bane":{"name":"helmet_awareness_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_helmet_ranged_attacks_bane":{"name":"helmet_ranged_attacks_bane","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_round_rest":{"triggeredFuncs":["useRest"],"name":"round_rest","listener":"change:round_rest","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_stretch_rest":{"triggeredFuncs":["useRest"],"name":"stretch_rest","listener":"change:stretch_rest","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"act_shift-rest-action":{"triggeredFuncs":["useRest"],"name":"shift-rest-action","listener":"clicked:shift-rest-action","listenerFunc":"accessSheet","type":"action"},"attr_shift_rest_action":{"name":"shift_rest_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_willpower_points":{"name":"willpower_points","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"attr_willpower_points_max":{"calculation":"calcPoints","name":"willpower_points_max","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"attr_hit_points":{"name":"hit_points","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"attr_hit_points_max":{"calculation":"calcPoints","name":"hit_points_max","type":"number","defaultValue":"0","triggeredFuncs":[],"affects":[]},"act_death-saves-action":{"triggeredFuncs":["rollDeath"],"name":"death-saves-action","listener":"clicked:death-saves-action","listenerFunc":"accessSheet","type":"action"},"attr_death_saves_action":{"name":"death_saves_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_death_saves_successes":{"triggeredFuncs":["addSuccessHP"],"name":"death_saves_successes","listener":"change:death_saves_successes","listenerFunc":"accessSheet","type":"hidden","defaultValue":0,"affects":[]},"attr_death_saves_failures":{"name":"death_saves_failures","type":"hidden","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_add-weapons":{"listenerFunc":"addItem","name":"add-weapons","listener":"clicked:add-weapons","type":"action"},"fieldset_repeating_weapons":{"addFuncs":["setActionCalls"],"name":"repeating_weapons","type":"fieldset"},"attr_repeating_weapons_$X_collapse":{"name":"repeating_weapons_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_name":{"name":"repeating_weapons_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_weapons_$X_action":{"triggeredFuncs":["rollAttack"],"name":"repeating_weapons_$X_action","listener":"clicked:repeating_weapons:action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_weapons_$X_action":{"name":"repeating_weapons_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_damage":{"name":"repeating_weapons_$X_damage","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_durability":{"calculation":"setDurability","name":"repeating_weapons_$X_durability","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_type":{"name":"repeating_weapons_$X_type","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_skill":{"name":"repeating_weapons_$X_skill","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_grip":{"name":"repeating_weapons_$X_grip","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_strength_requirement":{"name":"repeating_weapons_$X_strength_requirement","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_range":{"name":"repeating_weapons_$X_range","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_durability_max":{"affects":["repeating_weapons_$X_durability"],"name":"repeating_weapons_$X_durability_max","listener":"change:repeating_weapons:durability_max","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"attr_repeating_weapons_$X_properties":{"name":"repeating_weapons_$X_properties","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_weapons_$X_description":{"name":"repeating_weapons_$X_description","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_monster_view":{"name":"monster_view","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_ferocity":{"name":"ferocity","type":"number","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_size":{"name":"size","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_swarm":{"name":"swarm","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_base-skills-action":{"triggeredFuncs":["rollSkill"],"name":"base-skills-action","listener":"clicked:base-skills-action","listenerFunc":"accessSheet","type":"action"},"attr_base_skills_action":{"name":"base_skills_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_base_skills":{"name":"base_skills","type":"span","defaultValue":15,"triggeredFuncs":[],"affects":[]},"act_monster-attacks-action":{"triggeredFuncs":["rollRandomAttack"],"name":"monster-attacks-action","listener":"clicked:monster-attacks-action","listenerFunc":"accessSheet","type":"action"},"attr_monster_attacks_action":{"name":"monster_attacks_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-attacks":{"listenerFunc":"addItem","name":"add-attacks","listener":"clicked:add-attacks","type":"action"},"fieldset_repeating_attacks":{"addFuncs":["setActionCalls"],"name":"repeating_attacks","type":"fieldset"},"attr_repeating_attacks_$X_collapse":{"name":"repeating_attacks_$X_collapse","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_weight":{"name":"repeating_attacks_$X_weight","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_name":{"name":"repeating_attacks_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_attacks_$X_action":{"triggeredFuncs":["rollMonsterAttack"],"name":"repeating_attacks_$X_action","listener":"clicked:repeating_attacks:action","listenerFunc":"accessSheet","type":"action"},"attr_repeating_attacks_$X_action":{"name":"repeating_attacks_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_description":{"name":"repeating_attacks_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable":{"name":"repeating_attacks_$X_subtable","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_1":{"name":"repeating_attacks_$X_subtable_weight_1","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_1":{"name":"repeating_attacks_$X_subtable_name_1","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_1":{"name":"repeating_attacks_$X_subtable_description_1","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_2":{"name":"repeating_attacks_$X_subtable_weight_2","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_2":{"name":"repeating_attacks_$X_subtable_name_2","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_2":{"name":"repeating_attacks_$X_subtable_description_2","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_3":{"name":"repeating_attacks_$X_subtable_weight_3","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_3":{"name":"repeating_attacks_$X_subtable_name_3","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_3":{"name":"repeating_attacks_$X_subtable_description_3","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_4":{"name":"repeating_attacks_$X_subtable_weight_4","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_4":{"name":"repeating_attacks_$X_subtable_name_4","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_4":{"name":"repeating_attacks_$X_subtable_description_4","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_5":{"name":"repeating_attacks_$X_subtable_weight_5","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_5":{"name":"repeating_attacks_$X_subtable_name_5","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_5":{"name":"repeating_attacks_$X_subtable_description_5","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_weight_6":{"name":"repeating_attacks_$X_subtable_weight_6","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_name_6":{"name":"repeating_attacks_$X_subtable_name_6","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_description_6":{"name":"repeating_attacks_$X_subtable_description_6","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_damage":{"name":"repeating_attacks_$X_damage","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_1":{"name":"repeating_attacks_$X_subtable_damage_1","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_2":{"name":"repeating_attacks_$X_subtable_damage_2","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_3":{"name":"repeating_attacks_$X_subtable_damage_3","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_4":{"name":"repeating_attacks_$X_subtable_damage_4","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_5":{"name":"repeating_attacks_$X_subtable_damage_5","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_attacks_$X_subtable_damage_6":{"name":"repeating_attacks_$X_subtable_damage_6","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_cards":{"name":"cards","type":"text","defaultValue":"1,2,3,4,5,6,7,8,9,10","triggeredFuncs":[],"affects":[]},"act_initiative-action":{"triggeredFuncs":["rollInitiative"],"name":"initiative-action","listener":"clicked:initiative-action","listenerFunc":"accessSheet","type":"action"},"attr_initiative_action":{"name":"initiative_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_reset-action":{"triggeredFuncs":["resetInitiative"],"name":"reset-action","listener":"clicked:reset-action","listenerFunc":"accessSheet","type":"action"},"attr_reset_action":{"name":"reset_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_initiative_$X_name":{"name":"repeating_initiative_$X_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_initiative_$X_card":{"name":"repeating_initiative_$X_card","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_template_start":{"name":"template_start","type":"hidden","defaultValue":"@{whisper}&{template:dragonbane} {{character_name=@{character_name}}} {{character_id=@{character_id}}}","triggeredFuncs":[],"affects":[]}}; kFuncs.cascades = cascades; - const repeatingSectionDetails = [{"section":"repeating_secondary-skills","fields":["collapse","advancement","levels","total","action","name","attribute_abbreviation","attribute_select"]},{"section":"repeating_gear","fields":["collapse","quantity","name","weight","description"]},{"section":"repeating_abilities","fields":["collapse","name","cast_action","cost","requirement","spell","skill","rank","casting_time","range","duration","description"]},{"section":"repeating_weapons","fields":["collapse","name","action","damage","durability","type","skill","grip","strength_requirement","range","durability_max","properties","description"]},{"section":"repeating_attacks","fields":["collapse","weight","name","action","description","subtable","subtable_weight_1","subtable_name_1","subtable_description_1","subtable_weight_2","subtable_name_2","subtable_description_2","subtable_weight_3","subtable_name_3","subtable_description_3","subtable_weight_4","subtable_name_4","subtable_description_4","subtable_weight_5","subtable_name_5","subtable_description_5","subtable_weight_6","subtable_name_6","subtable_description_6","damage","subtable_damage_1","subtable_damage_2","subtable_damage_3","subtable_damage_4","subtable_damage_5","subtable_damage_6"]},{"section":"repeating_initiative","fields":["name","card"]}]; + const repeatingSectionDetails = [{"section":"repeating_secondary-skills","fields":["collapse","advancement","levels","total","action","name","attribute_abbreviation","attribute_select"]},{"section":"repeating_gear","fields":["collapse","quantity","name","weight","description"]},{"section":"repeating_abilities","fields":["collapse","spell","prepared","name","cast_action","cost","requirement","skill","spell_power","rank","casting_time","range","duration","description"]},{"section":"repeating_weapons","fields":["collapse","name","action","damage","durability","type","skill","grip","strength_requirement","range","durability_max","properties","description"]},{"section":"repeating_attacks","fields":["collapse","weight","name","action","description","subtable","subtable_weight_1","subtable_name_1","subtable_description_1","subtable_weight_2","subtable_name_2","subtable_description_2","subtable_weight_3","subtable_name_3","subtable_description_3","subtable_weight_4","subtable_name_4","subtable_description_4","subtable_weight_5","subtable_name_5","subtable_description_5","subtable_weight_6","subtable_name_6","subtable_description_6","damage","subtable_damage_1","subtable_damage_2","subtable_damage_3","subtable_damage_4","subtable_damage_5","subtable_damage_6"]},{"section":"repeating_initiative","fields":["name","card"]}]; kFuncs.repeatingSectionDetails = repeatingSectionDetails; @@ -1679,16 +1966,15 @@ kFuncs.log = log; * @returns {void} */ const debug = function(msg,force){ - console.warn('kFuncs.version',kFuncs.version); if(!kFuncs.debugMode && !force && kFuncs.version > 0) return; if(typeof msg === 'string'){ - console.log(`%c${kFuncs.sheetName} DEBUG| ${msg}`,"background-color:tan;color:red;"); + console.warn(`%c${kFuncs.sheetName} DEBUG| ${msg}`,"background-color:tan;color:red;"); }else if(typeof msg === 'object'){ Object.keys(msg).forEach((m)=>{ if(typeof msg[m] === 'string'){ - console.log(`%c${kFuncs.sheetName} DEBUG| ${m}: ${msg[m]}`,"background-color:tan;color:red;"); + console.warn(`%c${kFuncs.sheetName} DEBUG| ${m}: ${msg[m]}`,"background-color:tan;color:red;"); }else{ - console.log(`%c${kFuncs.sheetName} DEBUG| ${typeof msg[m]} ${m}`,"background-color:tan;color:red;font-weight:bold;"); + console.warn(`%c${kFuncs.sheetName} DEBUG| ${typeof msg[m]} ${m}`,"background-color:tan;color:red;font-weight:bold;"); console.table(msg[m]); } }); @@ -1785,9 +2071,9 @@ Object.assign(kFuncs,{escape,unescape});/*jshint esversion: 11, laxcomma:true, e /*jshint -W014,-W084,-W030,-W033*/ //# Attribute Obj Proxy handler -const createAttrProxy = function(attrs){ +const createAttrProxy = function(attrs,sections,casc){ //creates a proxy for the attributes object so that values can be worked with more easily. - const getCascObj = function(event,casc){ + const getCascObj = function(event){ const eventName = event.triggerName || event.sourceAttribute; let typePrefix = eventName.startsWith('clicked:') ? 'act_' : @@ -1808,7 +2094,7 @@ const createAttrProxy = function(attrs){ return cascObj || {}; }; - const triggerFunctions = function(obj,attributes,sections,casc){ + const triggerFunctions = function(obj){ if(obj.triggeredFuncs && obj.triggeredFuncs.length){ debug(`triggering functions for ${obj.name}`); obj.triggeredFuncs && obj.triggeredFuncs.forEach(func=>funcs[func] ? @@ -1817,7 +2103,7 @@ const createAttrProxy = function(attrs){ } }; - const initialFunction = function(obj,attributes,sections){ + const initialFunction = function(obj){ if(obj.initialFunc){ debug(`initial functions for ${obj.name}`); funcs[obj.initialFunc] ? @@ -1825,12 +2111,12 @@ const createAttrProxy = function(attrs){ debug(`!!!Warning!!! no function named ${obj.initialFunc} found. Initial function not called for ${obj.name}`,true); } }; - const alwaysFunctions = function(trigger,attributes,sections,casc){ + const alwaysFunctions = function(trigger){ Object.values(allHandlers).forEach((handler)=>{ handler({trigger,attributes,sections,casc}); }); }; - const processChange = function({event,trigger,attributes,sections,casc}){ + const processChange = function({event,trigger}){ if(event && !trigger){ debug(`${event.sourceAttribute} change detected. No trigger found`); return; @@ -1842,8 +2128,12 @@ const createAttrProxy = function(attrs){ debug({trigger}); if(event){ debug('checking for initial & always functions'); + if(Array.isArray(trigger.affects)){ + attributes.queue.push(...trigger.affects); + } alwaysFunctions(trigger,attributes,sections,casc);//Functions that should be run for all events. initialFunction(trigger,attributes,sections,casc);//functions that should only be run if the attribute was the thing changed by the user + } if(trigger){ debug(`processing ${trigger.name}`); @@ -1853,11 +2143,8 @@ const createAttrProxy = function(attrs){ }else if(trigger.calculation && !funcs[trigger.calculation]){ debug(`K-Scaffold Error: No function named ${trigger.calculation} found`); } - if(Array.isArray(trigger.affects)){ - attributes.queue.push(...trigger.affects); - } } - attributes.set({attributes,sections,casc}); + attributes.set(); }; const attrTarget = { updates:{}, @@ -1876,17 +2163,17 @@ const createAttrProxy = function(attrs){ //If it is a repeating order, returns the array, otherwise returns the update value or the original value if(prop === 'set'){ return function(){ - let {attributes,sections,casc,callback,vocal} = arguments[0] ? arguments[0] : {}; - if(attributes && attributes.queue.length && sections && casc){ - let triggerName = attributes.queue.shift(); - let trigger = getCascObj({sourceAttribute:triggerName},casc); - attributes.processChange({trigger,attributes,sections,casc}); + let {callback,vocal} = arguments[0] ? arguments[0] : {}; + if(sections && casc && attributes.queue.length){ + const triggerName = attributes.queue.shift(); + const trigger = getCascObj({sourceAttribute:triggerName}); + processChange({trigger,attributes,sections,casc}); }else{ debug({updates:obj.updates}); - let trueCallback = Object.keys(obj.repOrders).length ? + const trueCallback = Object.keys(obj.repOrders).length ? function(){ Object.entries(obj.repOrders).forEach(([section,order])=>{ - _setSectionOrder(section,order,) + _setSectionOrder(section,order) }); callback && callback(); }: @@ -1932,6 +2219,12 @@ const createAttrProxy = function(attrs){ }else if(`${obj.attributes}` !== `${value}` || (obj.updates[prop] && `${obj.updates}` !== `${value}`) ){ + if(sections && casc){ + const trigger = getCascObj({sourceAttribute:prop}); + if(Array.isArray(trigger.affects)){ + attributes.queue.push(...trigger.affects); + } + } obj.updates[prop] = value; } }else{ @@ -1946,7 +2239,8 @@ const createAttrProxy = function(attrs){ }); } }; - return new Proxy(attrTarget,attrHandler); + const attributes = new Proxy(attrTarget,attrHandler); + return attributes; }; /** @@ -2111,10 +2405,10 @@ funcs.accessSheet = accessSheet;/*jshint esversion: 11, laxcomma:true, eqeqeq:tr Cascade Expansion functions */ //Expands the repeating section templates in cascades to reflect the rows actually available -const expandCascade = function(cascade,sections,attributes){ +const expandCascade = function(cascade,sections){ return _.keys(cascade).reduce((memo,key)=>{//iterate through cascades and replace references to repeating attributes with correct row ids. if(/^(?:act|attr)_repeating_/.test(key)){//If the attribute is a repeating attribute, do special logic - expandRepeating(memo,key,cascade,sections,attributes); + expandRepeating(memo,key,cascade,sections); }else if(key){//for non repeating attributes do this logic expandNormal(memo,key,cascade,sections); } @@ -2122,7 +2416,7 @@ const expandCascade = function(cascade,sections,attributes){ },{}); }; -const expandRepeating = function(memo,key,cascade,sections,attributes){ +const expandRepeating = function(memo,key,cascade,sections){ key.replace(/((?:attr|act)_)(repeating_[^_]+)_[^_]+?_(.+)/,(match,type,section,field)=>{ (sections[section]||[]).forEach((id)=>{ memo[`${type}${section}_${id}_${field}`]=_.clone(cascade[key]);//clone the details so that each row's attributes have correct ids @@ -2268,9 +2562,9 @@ kFuncs.getAttrs = _getAttrs; const getAllAttrs = function({props=baseGet,sectionDetails=repeatingSectionDetails,callback}){ getSections(sectionDetails,(repeats,sections)=>{ getAttrs([...props,...repeats],(values)=>{ - const attributes = createAttrProxy(values); + const casc = expandCascade(cascades,sections); + const attributes = createAttrProxy(values,sections,casc); orderSections(attributes,sections); - const casc = expandCascade(cascades,sections,attributes); callback(attributes,sections,casc); }) }); @@ -2443,6 +2737,9 @@ const addItem = function(event){ } }); } + if(Array.isArray(trigger.affects)){ + attributes.queue.push(...trigger.affects); + } attributes.set({attributes,sections,casc}); } }); @@ -2485,8 +2782,8 @@ const kTabOnOpen = function({trigger,attributes,sections,casc}){ registerFuncs({ kTabOnOpen },{type:['opener']}); return kFuncs; }()); - const actionAttributes = ["acrobatics_action","awareness_action","bartering_action","beast_lore_action","bluffing_action","bushcraft_action","crafting_action","evade_action","healing_action","hunting_&_fishing_action","languages_action","myths_&_legends_action","performance_action","persuasion_action","riding_action","seamanship_action","sleight_of_hand_action","sneaking_action","spot_hidden_action","swimming_action","axes_action","bows_action","brawling_action","crossbows_action","hammers_action","knives_action","slings_action","spears_action","staves_action","swords_action","repeating_secondary-skills_$X_action","repeating_abilities_$X_cast_action","death_saves_action","repeating_weapons_$X_action","monster_attacks_action","repeating_attacks_$X_action","initiative_action","reset_action"];const characteristics = [{"name":"strength","label":"STR","condition":"Exhausted","sheetworker":{"affects":["damage_bonus_strength","strength_base_chance","axes","brawling","crafting","hammers","spears","swords","repeating_secondary-skills_$X_skill_total","encumbrance_limit"],"name":"strength","listener":"change:strength","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"constitution","label":"CON","condition":"Sickly","sheetworker":{"affects":["constitution_base_chance","repeating_secondary-skills_$X_skill_total"],"name":"constitution","listener":"change:constitution","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"agility","label":"AGL","condition":"Dazed","sheetworker":{"affects":["damage_bonus_agility","agility_base_chance","movement","acrobatics","bows","crossbows","evade","hunting_&_fishing","knives","riding","sleight_of_hand","knives","riding","sleight_of_hand","slings","sneaking","staves","swimming","repeating_secondary-skills_$X_skill_total"],"name":"agility","listener":"change:agility","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"intelligence","label":"INT","condition":"Angry","sheetworker":{"affects":["intelligence_base_chance","awareness","beast_lore","bushcraft","healing","languages","myths_&_legends","seamanship","spot_hidden","repeating_secondary-skills_$X_skill_total"],"name":"intelligence","listener":"change:intelligence","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"willpower","label":"WIL","condition":"Scared","sheetworker":{"affects":["willpower_base_chance","repeating_secondary-skills_$X_skill_total"],"name":"willpower","listener":"change:willpower","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"charisma","label":"CHA","condition":"Disheartened","sheetworker":{"affects":["charisma_base_chance","bluffing","bartering","performance","persuasion","repeating_secondary-skills_$X_skill_total"],"name":"charisma","listener":"change:charisma","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}}];const conditions = ["Exhausted","Sickly","Dazed","Angry","Scared","Disheartened"];const attribute_secondaries = [{"name":"damage bonus strength","label":"Damage Bon. Str","span":{"name":"attr_damage_bonus_strength","class":"uppercase","value":"—","trigger":{"calculation":"calcDamageBonus","name":"damage_bonus_strength","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"title":"@{damage_bonus_strength}","type":"span"}},{"name":"damage bonus agility","label":"Damage Bon. AGL","span":{"name":"attr_damage_bonus_agility","class":"uppercase","value":"—","trigger":{"calculation":"calcDamageBonus","name":"damage_bonus_agility","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"title":"@{damage_bonus_agility}","type":"span"}}];const skills = [{"name":"acrobatics","label":"acrobatics","attr":"agl","attribute":"agility"},{"name":"awareness","label":"awareness","attr":"int","attribute":"intelligence"},{"name":"bartering","label":"bartering","attr":"cha","attribute":"charisma"},{"name":"beast lore","label":"beast_lore","attr":"int","attribute":"intelligence"},{"name":"bluffing","label":"bluffing","attr":"cha","attribute":"charisma"},{"name":"bushcraft","label":"bushcraft","attr":"int","attribute":"intelligence"},{"name":"crafting","label":"crafting","attr":"str","attribute":"strength"},{"name":"evade","label":"evade","attr":"agl","attribute":"agility"},{"name":"healing","label":"healing","attr":"int","attribute":"intelligence"},{"name":"hunting & fishing","label":"hunting_&_fishing","attr":"agl","attribute":"agility"},{"name":"languages","label":"languages","attr":"int","attribute":"intelligence"},{"name":"myths & legends","label":"myths_&_legends","attr":"int","attribute":"intelligence"},{"name":"performance","label":"performance","attr":"cha","attribute":"charisma"},{"name":"persuasion","label":"persuasion","attr":"cha","attribute":"charisma"},{"name":"riding","label":"riding","attr":"agl","attribute":"agility"},{"name":"seamanship","label":"seamanship","attr":"int","attribute":"intelligence"},{"name":"sleight of hand","label":"sleight_of_hand","attr":"agl","attribute":"agility"},{"name":"sneaking","label":"sneaking","attr":"agl","attribute":"agility"},{"name":"spot hidden","label":"spot_hidden","attr":"int","attribute":"intelligence"},{"name":"swimming","label":"swimming","attr":"agl","attribute":"agility"}];const weapon_skills = [{"name":"axes","attr":"str","attribute":"strength"},{"name":"bows","attr":"agl","attribute":"agility"},{"name":"brawling","attr":"str","attribute":"strength"},{"name":"crossbows","attr":"agl","attribute":"agility"},{"name":"hammers","attr":"str","attribute":"strength"},{"name":"knives","attr":"agl","attribute":"agility"},{"name":"slings","attr":"agl","attribute":"agility"},{"name":"spears","attr":"str","attribute":"strength"},{"name":"staves","attr":"agl","attribute":"agility"},{"name":"swords","attr":"str","attribute":"strength"}];const armor = [{"name":"armor","banes":["sneaking","evade","acrobatics"],"image":"https://files.d20.io/images/346041944/S5Qsjcp3Fj_VnKlLShv-hw/original.png"},{"name":"helmet","banes":["awareness","ranged attacks"],"image":"https://files.d20.io/images/346049175/Uv09LQO-CzNxChMNqF6gOA/original.png"}];const weapons = {"expanded":[{"type":"input","labelObj":{"inputObj":{"name":"attr_name","type":"text","data-i18n-placeholder":"New Weapon","class":"input-label__input","title":"@{repeating_weapons_$X_name}"},"spanObj":{"data-i18n":"name","class":"input-label__text"}}},{"type":"select","labelObj":{"inputObj":{"name":"attr_type","class":"input-label__input","title":"@{repeating_weapons_$X_type}"},"spanObj":{"data-i18n":"type","class":"input-label__text"}},"options":[{"value":"-","selected":"","content":"-"},{"data-i18n":"melee","value":"melee"},{"data-i18n":"ranged","value":"ranged"}]},{"type":"select","labelObj":{"inputObj":{"name":"attr_skill","class":"input-label__input","title":"@{repeating_weapons_$X_skill}"},"spanObj":{"data-i18n":"skill","class":"input-label__text"}},"options":[{"value":"-","selected":"","content":"-"},{"value":"axes","data-i18n":"axes"},{"value":"bows","data-i18n":"bows"},{"value":"brawling","data-i18n":"brawling"},{"value":"crossbows","data-i18n":"crossbows"},{"value":"hammers","data-i18n":"hammers"},{"value":"knives","data-i18n":"knives"},{"value":"slings","data-i18n":"slings"},{"value":"spears","data-i18n":"spears"},{"value":"staves","data-i18n":"staves"},{"value":"swords","data-i18n":"swords"}]},{"type":"select","labelObj":{"inputObj":{"name":"attr_grip","class":"uppercase input-label__input","title":"@{repeating_weapons_$X_grip}"},"spanObj":{"data-i18n":"grip","class":"input-label__text"}},"options":[{"value":"-","selected":"","content":"-"},{"data-i18n":"1h-abbreviation","value":1},{"data-i18n":"2h-abbreviation","value":2}]},{"type":"input","labelObj":{"inputObj":{"name":"attr_strength_requirement","type":"number","placeholder":"-","class":"input-label__input","title":"@{repeating_weapons_$X_strength_requirement}"},"spanObj":{"data-i18n":"strength-abbreviation","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_range","type":"text","placeholder":"-","class":"input-label__input","title":"@{repeating_weapons_$X_range}"},"spanObj":{"data-i18n":"range","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_damage","type":"text","class":"input-label__input","title":"@{repeating_weapons_$X_damage}"},"spanObj":{"data-i18n":"damage","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_durability_max","type":"number","placeholder":"-","trigger":{"affects":["repeating_weapons_$X_durability"],"name":"repeating_weapons_$X_durability_max","listener":"change:repeating_weapons:durability_max","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"class":"input-label__input","title":"@{repeating_weapons_$X_durability|max}"},"spanObj":{"data-i18n":"durability","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_properties","type":"text","class":"input-label__input","title":"@{repeating_weapons_$X_properties}"},"spanObj":{"data-i18n":"features","class":"input-label__text"}}}]};const specialCategories = {};const itemCategories = ["Abilities","Armor","Gear","NPCs","Spells","Weapons"];const maxAttr = ["hit_points","willpower_points"];const sectionLookup = {"Internal":"internal-modules"};k.sheetName = 'Dragonbane'; -k.version = 1; + const actionAttributes = ["acrobatics_action","awareness_action","bartering_action","beast_lore_action","bluffing_action","bushcraft_action","crafting_action","evade_action","healing_action","hunting_&_fishing_action","languages_action","myths_&_legends_action","performance_action","persuasion_action","riding_action","seamanship_action","sleight_of_hand_action","sneaking_action","spot_hidden_action","swimming_action","axes_action","bows_action","brawling_action","crossbows_action","hammers_action","knives_action","slings_action","spears_action","staves_action","swords_action","repeating_secondary-skills_$X_action","repeating_abilities_$X_cast_action","shift_rest_action","death_saves_action","repeating_weapons_$X_action","base_skills_action","monster_attacks_action","repeating_attacks_$X_action","initiative_action","reset_action"];const characteristics = [{"name":"strength","label":"STR","condition":"exhausted","sheetworker":{"affects":["damage_bonus_strength","strength_base_chance","axes","brawling","crafting","hammers","spears","swords","repeating_secondary-skills_$X_skill_total","encumbrance_max"],"name":"strength","listener":"change:strength","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"constitution","label":"CON","condition":"sickly","sheetworker":{"affects":["constitution_base_chance","repeating_secondary-skills_$X_skill_total","hit_points_max"],"name":"constitution","listener":"change:constitution","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"agility","label":"AGL","condition":"dazed","sheetworker":{"affects":["damage_bonus_agility","agility_base_chance","movement","acrobatics","bows","crossbows","evade","hunting_&_fishing","knives","riding","sleight_of_hand","knives","riding","sleight_of_hand","slings","sneaking","staves","swimming","repeating_secondary-skills_$X_skill_total"],"name":"agility","listener":"change:agility","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"intelligence","label":"INT","condition":"angry","sheetworker":{"affects":["intelligence_base_chance","awareness","beast_lore","bushcraft","healing","languages","myths_&_legends","seamanship","spot_hidden","repeating_secondary-skills_$X_skill_total"],"name":"intelligence","listener":"change:intelligence","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"willpower","label":"WIL","condition":"scared","sheetworker":{"affects":["willpower_base_chance","willpower_points_max","repeating_secondary-skills_$X_skill_total"],"name":"willpower","listener":"change:willpower","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}},{"name":"charisma","label":"CHA","condition":"disheartened","sheetworker":{"affects":["charisma_base_chance","bluffing","bartering","performance","persuasion","repeating_secondary-skills_$X_skill_total"],"name":"charisma","listener":"change:charisma","listenerFunc":"accessSheet","type":"number","defaultValue":"0","triggeredFuncs":[]}}];const conditions = ["exhausted","sickly","dazed","angry","scared","disheartened"];const attribute_secondaries = [{"name":"damage bonus strength","label":"Damage Bon. Str","span":{"name":"attr_damage_bonus_strength","class":"uppercase","value":"—","trigger":{"calculation":"calcDamageBonus","name":"damage_bonus_strength","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"title":"@{damage_bonus_strength}","type":"span"}},{"name":"damage bonus agility","label":"Damage Bon. AGL","span":{"name":"attr_damage_bonus_agility","class":"uppercase","value":"—","trigger":{"calculation":"calcDamageBonus","name":"damage_bonus_agility","type":"span","defaultValue":"—","triggeredFuncs":[],"affects":[]},"title":"@{damage_bonus_agility}","type":"span"}}];const skills = [{"name":"acrobatics","label":"acrobatics","attr":"agl","attribute":"agility"},{"name":"awareness","label":"awareness","attr":"int","attribute":"intelligence"},{"name":"bartering","label":"bartering","attr":"cha","attribute":"charisma"},{"name":"beast lore","label":"beast_lore","attr":"int","attribute":"intelligence"},{"name":"bluffing","label":"bluffing","attr":"cha","attribute":"charisma"},{"name":"bushcraft","label":"bushcraft","attr":"int","attribute":"intelligence"},{"name":"crafting","label":"crafting","attr":"str","attribute":"strength"},{"name":"evade","label":"evade","attr":"agl","attribute":"agility"},{"name":"healing","label":"healing","attr":"int","attribute":"intelligence"},{"name":"hunting & fishing","label":"hunting_&_fishing","attr":"agl","attribute":"agility"},{"name":"languages","label":"languages","attr":"int","attribute":"intelligence"},{"name":"myths & legends","label":"myths_&_legends","attr":"int","attribute":"intelligence"},{"name":"performance","label":"performance","attr":"cha","attribute":"charisma"},{"name":"persuasion","label":"persuasion","attr":"cha","attribute":"charisma"},{"name":"riding","label":"riding","attr":"agl","attribute":"agility"},{"name":"seamanship","label":"seamanship","attr":"int","attribute":"intelligence"},{"name":"sleight of hand","label":"sleight_of_hand","attr":"agl","attribute":"agility"},{"name":"sneaking","label":"sneaking","attr":"agl","attribute":"agility"},{"name":"spot hidden","label":"spot_hidden","attr":"int","attribute":"intelligence"},{"name":"swimming","label":"swimming","attr":"agl","attribute":"agility"}];const weapon_skills = [{"name":"axes","attr":"str","attribute":"strength"},{"name":"bows","attr":"agl","attribute":"agility"},{"name":"brawling","attr":"str","attribute":"strength"},{"name":"crossbows","attr":"agl","attribute":"agility"},{"name":"hammers","attr":"str","attribute":"strength"},{"name":"knives","attr":"agl","attribute":"agility"},{"name":"slings","attr":"agl","attribute":"agility"},{"name":"spears","attr":"str","attribute":"strength"},{"name":"staves","attr":"agl","attribute":"agility"},{"name":"swords","attr":"str","attribute":"strength"}];const armor = [{"name":"armor","banes":["sneaking","evade","acrobatics"],"image":"https://files.d20.io/images/346041944/S5Qsjcp3Fj_VnKlLShv-hw/original.png"},{"name":"helmet","banes":["awareness","ranged attacks"],"image":"https://files.d20.io/images/346049175/Uv09LQO-CzNxChMNqF6gOA/original.png"}];const weapons = {"expanded":[{"type":"input","labelObj":{"inputObj":{"name":"attr_name","type":"text","data-i18n-placeholder":"New Weapon","class":"input-label__input","title":"@{repeating_weapons_$X_name}"},"spanObj":{"data-i18n":"name","class":"input-label__text"}}},{"type":"select","labelObj":{"inputObj":{"name":"attr_type","class":"input-label__input","title":"@{repeating_weapons_$X_type}"},"spanObj":{"data-i18n":"type","class":"input-label__text"}},"options":[{"value":"-","selected":"","content":"-"},{"data-i18n":"melee","value":"melee"},{"data-i18n":"ranged","value":"ranged"}]},{"type":"select","labelObj":{"inputObj":{"name":"attr_skill","class":"input-label__input","title":"@{repeating_weapons_$X_skill}"},"spanObj":{"data-i18n":"skill","class":"input-label__text"}},"options":[{"value":"-","selected":"","content":"-"},{"value":"axes","data-i18n":"axes"},{"value":"bows","data-i18n":"bows"},{"value":"brawling","data-i18n":"brawling"},{"value":"crossbows","data-i18n":"crossbows"},{"value":"hammers","data-i18n":"hammers"},{"value":"knives","data-i18n":"knives"},{"value":"slings","data-i18n":"slings"},{"value":"spears","data-i18n":"spears"},{"value":"staves","data-i18n":"staves"},{"value":"swords","data-i18n":"swords"}]},{"type":"select","labelObj":{"inputObj":{"name":"attr_grip","class":"uppercase input-label__input","title":"@{repeating_weapons_$X_grip}"},"spanObj":{"data-i18n":"grip","class":"input-label__text"}},"options":[{"value":"-","selected":"","content":"-"},{"data-i18n":"1h-abbreviation","value":1},{"data-i18n":"2h-abbreviation","value":2}]},{"type":"input","labelObj":{"inputObj":{"name":"attr_strength_requirement","type":"number","placeholder":"-","class":"input-label__input","title":"@{repeating_weapons_$X_strength_requirement}"},"spanObj":{"data-i18n":"strength-abbreviation","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_range","type":"text","placeholder":"-","class":"input-label__input","title":"@{repeating_weapons_$X_range}"},"spanObj":{"data-i18n":"range","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_damage","type":"text","class":"input-label__input","title":"@{repeating_weapons_$X_damage}"},"spanObj":{"data-i18n":"damage","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_durability_max","type":"number","placeholder":"-","trigger":{"affects":["repeating_weapons_$X_durability"],"name":"repeating_weapons_$X_durability_max","listener":"change:repeating_weapons:durability_max","listenerFunc":"accessSheet","type":"number","defaultValue":0,"triggeredFuncs":[]},"class":"input-label__input","title":"@{repeating_weapons_$X_durability|max}"},"spanObj":{"data-i18n":"durability","class":"input-label__text"}}},{"type":"input","labelObj":{"inputObj":{"name":"attr_properties","type":"text","class":"input-label__input","title":"@{repeating_weapons_$X_properties}"},"spanObj":{"data-i18n":"features","class":"input-label__text"}}}]};const specialCategories = {};const itemCategories = ["Abilities","Armor","Gear","NPCs","Spells","Weapons"];const maxAttr = ["hit_points","willpower_points"];const sectionLookup = {"Internal":"internal-modules"};k.sheetName = 'Dragonbane'; +k.version = 1.1; /** * Assembles the roll string from the roll object * @param {object} rollObj - object describing the roll @@ -2627,13 +2924,14 @@ const rollDeath = async function({trigger,attributes,sections,casc}){ }; const [deathRoll] = await executeRoll({rollObj}); finishRoll(deathRoll.rollId); - let addHP; if(deathRoll.results.roll1.result <= attributes.constitution){ attributes.death_saves_successes = Math.min(attributes.death_saves_successes + 1, 3); }else{ attributes.death_saves_failures = Math.min(attributes.death_saves_failures + 1, 3); } - attributes.set({attributes,sections,casc}); + attributes.set({callback(){ + addSuccessHP({attributes}); + }}); }; k.registerFuncs({rollDeath});/** * Casts a spell or sends an ability's info to chat. Also handles rolling on effect tables for demon rolls on spell cast rolls. @@ -2652,9 +2950,19 @@ const castSpell = async function({trigger,attributes,sections,casc}){ description:attributes[`${row}_description`], push_through:'[[0[computed value]]]' }; - + let spellCost; + if(attributes[`${row}_skill`] === 'magic trick'){ + spellCost = await k.pseudoQuery(1); + }else{ + const spellPower = await( + attributes[`${row}_spell_power`] ? + k.extractQueryResult(`${k.capitalize(getTranslationByKey('what power are you casting at'))}|1|2|3`) : + k.pseudoQuery(1) + ); + spellCost = spellPower * attributes[`${row}_cost`]; + } // Check if there is enough willpower to cast - const newWillpower = attributes.willpower_points - attributes[`${row}_cost`]; + const newWillpower = attributes.willpower_points - spellCost; let skillRow if(newWillpower < 0){ rollObj.label = `${rollObj.label}\n^{insufficient will}`; @@ -2706,7 +3014,7 @@ const castSpell = async function({trigger,attributes,sections,casc}){ }else{ await k.pseudoQuery(); } - attributes.set({attributes,sections,casc}); + attributes.set(); }; k.registerFuncs({castSpell}); @@ -2821,17 +3129,19 @@ const rollSkill = async function({trigger,attributes,sections,casc}){ `${section}_${rowID}_` : ''; const skillName = section ? - attributes[`${row}skill_name`] : + attributes[`${row}name`] : base.replace(/-/g,' ').replace(/ action/,''); const skillObj = section ? {attribute:attributes[`${row}_attribute_select`] } : skills.find(o => o.name === skillName); const rollObj = { label:section ? skillName : `^{${skillName}}`, - roll1:assembleD20({attributes,characteristic:skillObj.attribute,attribute:base}), + roll1:skillObj ? + assembleD20({attributes,characteristic:skillObj.attribute,attribute:base}) : + assembleD20({attributes,attribute:base}), test: section ? - attributes[`${row}skill_total`] : - attributes[skillName.replace(/_/g,' ')], + attributes[`${row}total`] : + attributes[skillName.replace(/ /g,'_')], push_through:'[[0[computed value]]]' }; const [skillRoll,computeObj] = await executeRoll({rollObj,attributes}); @@ -2858,6 +3168,7 @@ const rollMonsterAttack = async function({trigger,attributes,sections,casc}){ return arr; },[]); + debugger; const subTableRow = subTableRoll ? (tablePossibles.find((n,i) => { return subTableRoll <= (i + 1); @@ -2870,16 +3181,16 @@ const rollMonsterAttack = async function({trigger,attributes,sections,casc}){ subTableRow ? ( attributes[`${row}_subtable_damage_${subTableRow}`] ? - assembleDamage`${attributes[`${row}_subtable_damage_${subTableRow}`]}` : + assembleDamage(`${attributes[`${row}_subtable_damage_${subTableRow}`]}`) : ( attributes[`${row}_damage`] ? - assembleDamage`${attributes[`${row}_damage`]}` : + assembleDamage(`${attributes[`${row}_damage`]}`) : k.pseudoQuery() ) ) : assembleDamage(`${attributes[`${row}_damage`]}`) ) : - k.pseudoQuery()), + k.pseudoQuery('')), description:`${attributes[`${row}_description`]}${subTableRow ? `\n\n**${attributes[`${row}_subtable_name_${subTableRow}`]}:** ${attributes[`${row}_subtable_description_${subTableRow}`]}` : ''}` }; const [attackRoll] = await executeRoll({rollObj}); @@ -2969,7 +3280,7 @@ const addToInitiative = async (attributes,cards,character_name,sections,casc) => if(attributes.use_roll20_initiative){ startRoll(`!{{initiative=[[${cards[0]}&{tracker}]]}}`,r=>finishRoll(r.rollId)); } - attributes.set({attributes,sections,casc}); + attributes.set(); }; /** @@ -3000,7 +3311,44 @@ const extractAttributes = async ({cName,attributeNames,rollValues = []}) => { return obj; },{}); return resReturn; +};/** + * Upgrades the sheet to version 1.1 + * @param {object} trigger - The trigger that caused the function to be called + * @param {object} attributes - The attribute values of the character + * @param {object[]} sections - All the repeating section IDs + * @param {object} casc - Expanded cascade object + */ +const v1x1 = function({trigger,attributes,sections,casc}){ + // update willpower + ['willpower_points','hit_points'].forEach(name => { + const oValue =attributes[`${name}_max`]; + attributes[`${name}_max`] = calcPoints({trigger:{name:`${name}_max`},attributes,sections,casc}); + const valDiff = oValue - attributes[`${name}_max`]; + if(valDiff){ + attributes[`${name}_bonus`] = valDiff; + } + attributes[`${name}_max`] = oValue; + }); + + + // update encumbrance + attributes.encumbrance = calcEncumbrance({trigger,attributes,sections}); + + // update weapon skills + // Using getAttrs to get the old weapon skill attribute names + const v1WeaponSkills = weapon_skills.map(o => `${o.name}_skill_levels`); + k.getAttrs({ + props:v1WeaponSkills, + callback(v1Attrs){ + weapon_skills.forEach(o =>{ + attributes[`${o.name}_levels`] = v1Attrs[`${o.name}_skill_levels`]; + }); + // Set the attributes using the attributes object from the main thread. This will cause the calculations dependent on these changes to fire. + attributes.set(); + } + }) }; +k.registerFuncs({'1.1':v1x1},{type:['updater']}); /*jshint esversion: 11, laxcomma:true, eqeqeq:true*/ /*jshint -W014,-W084,-W030,-W033*/ const handleCompendiumDrop = function(event){ @@ -3018,7 +3366,8 @@ const handleCompendiumDrop = function(event){ k.debug({'threat data':data}); await processDropData({data:lookupObj,attributes,sections,casc}); k.debug('Drop processing complete'); - attributes.set({attributes,sections,casc}); + k.callFunc('setActionCalls',{attributes,sections,casc}); + attributes.set(); } }); } @@ -3356,11 +3705,19 @@ const basicDrop = (lookupKey,arr,attributes,sections,casc,sectionsToQuery) => { const npcHandler = (data,attributes,sections,casc) => { clearSheet(attributes,sections,casc); attributes.sheet_type = data['data-cs-sheet_type'] || 'pc'; - attributes.queue.push('sheet_type'); const tokenObj = { width:70, height:70, }; + attributes.whisper = '/w gm '; + [...skills,...weapon_skills].forEach(obj => { + attributes[`${obj.name.replace(/ /g,'_')}_levels`] = attributes.sheet_type === 'pc' ? + 5 : + 15; + }) + if(attributes.sheet_type === 'monster'){ + attributes.monster_view = 1; + } setDefaultToken(tokenObj); k.callFunc('kSwitchTab',{trigger:{name:`nav-tabs-dragonbane--${attributes.sheet_type}`},attributes}); toggleNavButtons({attributes}); @@ -3407,6 +3764,22 @@ const armorDrop = async (lookupKey,arr,attributes,sections,casc,sectionsToQuery) await processDropData({data:itemObj,attributes,sections,casc,sectionsToQuery}); }); await Promise.all(proms); +};/** +* function to handle dropping monster attacks +* @param {string} lookupKey - The section name +* @param {object[]} arr - Array of data to parse +* @param {attributesProxy} attributes - The attributes for the character +* @param {object} sections - The object with keys equal to repeating section names and values of arrays of repeating ids +* @param {object} casc - The cascade object +* @param {array} sectionsToQuery - sections that need further user input before drop completes +*/ +const attackDrop = (lookupKey,arr,attributes,sections,casc,sectionsToQuery) => { + return repeatWorker(lookupKey,arr,sections,casc,async (itemObj,section)=>{ + if(itemObj['data-cs-subtable_weight_1']){ + itemObj['data-cs-subtable'] = 0; + } + await processDropData({data:itemObj,attributes,sections,casc,sectionsToQuery,section}); + }); };/** * Lookup for what specific drop function to use for a given drop type. Note that the key is the part after `data-` if it is in another compendium item (e.g. in a Monster), or is the same as the Compendium category (minus anything after a space). * @var @@ -3422,8 +3795,8 @@ const repeatProcessors = { gear:basicDrop, Weapons:basicDrop, weapons:basicDrop, - Attacks:basicDrop, - attacks:basicDrop, + Attacks:attackDrop, + attacks:attackDrop, 'Secondary-skills':basicDrop, 'secondary-skills':basicDrop };/** @@ -3508,7 +3881,6 @@ k.registerFuncs({calcSkillBase});const calcSkill = function({trigger, attributes attrName = weapon_skills.find(skill => skill.name === trigger.name.replace(/_/g, ' '))?.attribute; } const attrBonus = attributes[attrName + '_base_chance']; - console.log(trigger.name, skillLevel, attrName, attrBonus); return skillLevel + attrBonus; } @@ -3578,7 +3950,7 @@ const advanceSkills = async function ({ trigger, attributes, sections,casc }) { // Wait for all the rolls to be done await Promise.all(rollPromises); // Use the set method of `attributes` to reconnect to the k-scaffold's pseudo cascade so that we can do all the reactions to these changes without needing to do another getAttrs. - attributes.set({attributes,sections,casc}) + attributes.set() }; k.registerFuncs({ advanceSkills });const calcEncumbranceMax = function({trigger, attributes,sections}) { return Math.floor(attributes.strength / 2) + attributes.backpack; @@ -3594,8 +3966,8 @@ const calcEncumbrance = function({trigger,attributes,sections,casc}){ return sections.repeating_gear .filter(id => id) .reduce((total,id) => { - const row = `repeating_inventory_${id}`; - return total += attributes[`${row}_quantity`] * attributes[`${row}_weight`]; + const row = `repeating_gear_${id}`; + return total + attributes[`${row}_quantity`] * attributes[`${row}_weight`]; },0); }; k.registerFuncs({calcEncumbrance});const getAdvanceName = skillArray => skillArray.map(skillObject => ({name:`${skillObject.name} advancement`.replace(/\s+/g,'_')})); @@ -3626,12 +3998,12 @@ k.registerFuncs({displayUpgrade},{type:['opener']}); * @param {object} casc - Expanded cascade object */ const addSuccessHP = async function({trigger,attributes,sections,casc}){ - if(attributes.death_saves_successes < 3 || attributes.hit_points > 0) return; + if(attributes.death_saves_successes < 3) return; const hpRoll = await startRoll('!{{hp=[[1d6]]}}'); finishRoll(hpRoll.rollId); - attributes.hit_points += hpRoll.results.hp.result; + attributes.hit_points = Math.min(attributes.hit_points + hpRoll.results.hp.result,attributes['hit_points_max']); attributes.death_saves_successes = 0; - attributes.set({attributes,sections,casc}); + attributes.set(); }; k.registerFuncs({addSuccessHP});/** * Adds the custom skills to the selects for selecting which magic skill to use. Runs when an ability is created, when a secondary skill name is updated, or when a secondary skill is removed. @@ -3732,6 +4104,7 @@ k.registerFuncs({hideInactiveNavButtons},{type:['opener']});/** * @param {object} casc - Expanded cascade object */ const calcMovement = function({trigger,attributes,sections,casc}){ + if(attributes.sheet_type === 'monster') return; const moveMod = attributes.agility <= 6 ? -4 : attributes.agility <= 9 ? @@ -3779,5 +4152,79 @@ const initializeSkill = function({trigger,attributes,sections,casc}){ attributes[obj.name.replace(/\$X/,newID).replace(/^attr_/,'')] = k.callFunc(obj.calculation,{trigger:{name:obj.name.replace(/\$X/,newID).replace(/^attr_/,'')},attributes,sections,casc}) }); }; -k.registerFuncs({initializeSkill}); +k.registerFuncs({initializeSkill});/** + * calculates the maximum points for hp/wp + * @param {object} trigger - The trigger that caused the function to be called + * @param {object} attributes - The attribute values of the character + * @param {object[]} sections - All the repeating section IDs + * @param {object} casc - Expanded cascade object + */ +const calcPoints = function({trigger,attributes,sections,casc}){ + const basePointName = trigger.name.replace(/_max/,''); + const attributeObj = characteristics.find(o => o.sheetworker && o.sheetworker.affects && o.sheetworker.affects.includes(trigger.name)); + return attributes[attributeObj.name] + attributes[`${basePointName}_bonus`]; +}; +k.registerFuncs({calcPoints});/** + * Handles the resting for the character + * @param {object} trigger - The trigger that caused the function to be called + * @param {object} attributes - The attribute values of the character + * @param {object[]} sections - All the repeating section IDs + * @param {object} casc - Expanded cascade object + */ +const useRest = function({trigger,attributes,sections,casc}){ + const [duration] = trigger.name.match(/^[a-z]+/i); + const durationSwitch = { + round:roundRest, + stretch:roundRest, + shift:shiftRest + }; + if(durationSwitch[duration]){ + durationSwitch[duration](duration,attributes); + } +}; +k.registerFuncs({useRest}); + +const roundRest = async (duration,attributes) =>{ + if(!attributes[`${duration}_rest`]) return; + const rollObj = { + character_name:`${attributes.character_name} - ^{${duration} rest}`, + label:'^{willpower points}', + roll1:'[[1d6]]' + }; + if(duration === 'stretch'){ + rollObj.damage = `[[?{${k.capitalize(getTranslationByKey('are you being cared for'))}|${k.capitalize(getTranslationByKey('no'))},1|${k.capitalize(getTranslationByKey('yes'))},2}d6]]`; + rollObj.damage_label = '^{hit points}'; + rollObj.description = `^{Heal a condition of your choice}`; + } + [roll] = await executeRoll({rollObj}); + finishRoll(roll.rollId); + attributes.willpower_points = Math.min(attributes.willpower_points + roll.results.roll1.result,attributes.willpower_points_max); + if(rollObj.damage){ + attributes.hit_points = Math.min(attributes.hit_points + roll.results.damage.result,attributes.hit_points_max); + } + attributes.set(); +} + +const shiftRest = (duration,attributes) => { + attributes.willpower_points = attributes.willpower_points_max; + attributes.hit_points = attributes.hit_points_max; + characteristics.forEach(obj => attributes[obj.condition] = 0); + ['round','stretch'].forEach(attr => attributes[`${attr}_rest`] = 0); +};/** + * Calculates the cost of a spell + * @param {object} trigger - The trigger that caused the function to be called + * @param {object} attributes - The attribute values of the character + * @param {object[]} sections - All the repeating section IDs + * @param {object} casc - Expanded cascade object + */ +const calcCost = function({trigger,attributes,sections,casc}){ + const [section,rowID] = k.parseTriggerName(trigger.name); + const row = `${section}_${rowID}`; + if(!attributes[`${row}_spell`]) return; + + return attributes[`${row}_skill`] === 'magic trick' ? + 1 : + 2; +}; +k.registerFuncs({calcCost}); \ No newline at end of file diff --git a/dragonbane/translation.json b/dragonbane/translation.json index 422093d330..81f0b31da5 100644 --- a/dragonbane/translation.json +++ b/dragonbane/translation.json @@ -15,6 +15,8 @@ "party/gm": "party/gm", "use roll20 initiative": "use roll20 initiative", "no": "no", + "Bonus WP": "Bonus WP", + "Bonus HP": "Bonus HP", "character name": "character name", "player name": "player name", "dragon bane": "dragon bane", @@ -24,17 +26,17 @@ "weakness": "weakness", "appearance": "appearance", "strength-abbreviation": "str", - "Exhausted": "Exhausted", + "exhausted": "exhausted", "constitution-abbreviation": "con", - "Sickly": "Sickly", + "sickly": "sickly", "agility-abbreviation": "agl", - "Dazed": "Dazed", + "dazed": "dazed", "intelligence-abbreviation": "int", - "Angry": "Angry", + "angry": "angry", "willpower-abbreviation": "wil", - "Scared": "Scared", + "scared": "scared", "charisma-abbreviation": "cha", - "Disheartened": "Disheartened", + "disheartened": "disheartened", "Damage Bon. Str": "Damage Bon. Str", "Damage Bon. AGL": "Damage Bon. AGL", "movement": "movement", @@ -87,6 +89,7 @@ "skill:": "skill:", "magic trick": "magic trick", "general spell": "general spell", + "dynamic power": "dynamic power", "Rank:": "Rank:", "Casting Time:": "Casting Time:", "Range:": "Range:", @@ -99,10 +102,12 @@ "banes on": "banes on", "helmet": "helmet", "ranged attacks": "ranged attacks", - "Round Rest": "Round Rest", - "Stretch Rest": "Stretch Rest", - "Willpower Points": "Willpower Points", - "Hit Points": "Hit Points", + "rest": "rest", + "round": "round", + "stretch": "stretch", + "shift": "shift", + "willpower points": "Willpower Points", + "hit points": "Hit Points", "Death Rolls": "Death Rolls", "Successes": "Successes", "Failures": "Failures", @@ -127,6 +132,7 @@ "huge": "huge", "swarm": "swarm", "hp": "hp", + "base skills": "base skills", "Monster Attacks": "Monster Attacks", "attacks": "attacks", "weight": "weight", @@ -138,8 +144,8 @@ "dragon-spell-1": "The damage or range of the spell is doubled.", "dragon-spell-2": "The spell does not cost any WP.", "dragon-spell-3": "You can immediately cast another spell, but get a bane on the roll.", - "Draw Initiative": "%{initiative}", - "Reset Initiative Order": "%{reset}", + "Draw Initiative": "Draw Initiative", + "Reset Initiative Order": "Reset Initiative Order", "New Ability": "New Ability", "Gesture": "Gesture", "Instant": "Instant", @@ -175,5 +181,13 @@ "swarm drop query {{creature name}}": "How many {{0}}?", "dynamic spell level drop query {{monster name}}": "What spell level was {{0}} cast at", "power level prompt": "What power level was the spell cast at?", - "new skill": "new skill" + "new skill": "new skill", + "death roll": "death roll", + "round rest": "round rest", + "stretch rest": "stretch rest", + "shift rest": "shift rest", + "Heal a condition of your choice": "Heal a condition of your choice", + "are you being cared for": "are you being cared for", + "yes": "yes", + "what power are you casting at": "what power are you casting at" } \ No newline at end of file