diff --git a/.gitignore b/.gitignore index b512c09..34977ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +.idea \ No newline at end of file diff --git a/assets/svgs/d12-solid-hope.svg b/assets/svgs/d12-solid-hope.svg index af1e966..e6c4f52 100644 --- a/assets/svgs/d12-solid-hope.svg +++ b/assets/svgs/d12-solid-hope.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/css/daggerheart.css b/css/daggerheart.css index 01d7a0d..f65d72c 100644 --- a/css/daggerheart.css +++ b/css/daggerheart.css @@ -1,1796 +1,1146 @@ -@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Cabin+Condensed:wght@400;500;600;700&display=swap"); +.text-bold { + font-weight: bold; +} + +.label { + font-size: 12px; + text-transform: uppercase; +} +.label.strong { + font-weight: bold; +} + +.class { + background-color: rgba(155, 29, 32, 0.5215686275); + color: white; +} + +.community { + background-color: rgba(73, 132, 103, 0.5215686275); + color: white; +} + +.ancestry { + background-color: rgba(255, 170, 51, 0.5215686275); + color: white; +} + .arcana { - background-color: #4E276A !important; + background-color: #4E276A; color: white; } .blade { - background-color: #96352C !important; + background-color: #96352C; color: white; } .bone { - background-color: #666769 !important; + background-color: #666769; color: white; } .codex { - background-color: #1F335F !important; + background-color: #1F335F; color: white; } .grace { - background-color: #7A3662 !important; + background-color: #7A3662; color: white; } .midnight { - background-color: #333439 !important; + background-color: #333439; color: white; } .sage { - background-color: #0C6B41 !important; + background-color: #0C6B41; color: white; } .splendor { - background-color: #AF9F40 !important; + background-color: #AF9F40; color: white; } .valor { - background-color: #B97A23 !important; + background-color: #B97A23; color: white; } -/* Global styles */ -.window-app { - font-family: "Roboto", sans-serif; +.flex { + display: flex; } -.rollable:hover, .rollable:focus { - color: #000; - text-shadow: 0 0 10px red; - cursor: pointer; +.flex-grow { + flex-grow: 1; } -.grid, -.grid-2col { - display: grid; - grid-column: span 2/span 2; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 10px; - margin: 10px 0; - padding: 0; +.flex-shrink { + flex-shrink: 0; } -.grid-3col { - grid-column: span 3/span 3; - grid-template-columns: repeat(3, minmax(0, 1fr)); +.items-center { + align-items: center; } -.grid-4col { - grid-column: span 4/span 4; - grid-template-columns: repeat(4, minmax(0, 1fr)); +.relative { + position: relative; } -.grid-5col { - grid-column: span 5/span 5; - grid-template-columns: repeat(5, minmax(0, 1fr)); +.justify-between { + justify-content: space-between; } -.grid-6col { - grid-column: span 6/span 6; - grid-template-columns: repeat(6, minmax(0, 1fr)); +.justify-around { + justify-content: space-around; } -.grid-7col { - grid-column: span 7/span 7; - grid-template-columns: repeat(7, minmax(0, 1fr)); +.justify-center { + justify-content: center; } -.grid-8col { - grid-column: span 8/span 8; - grid-template-columns: repeat(8, minmax(0, 1fr)); +.w-100 { + width: 100%; } -.grid-9col { - grid-column: span 9/span 9; - grid-template-columns: repeat(9, minmax(0, 1fr)); +.row { + flex-direction: row; } -.grid-10col { - grid-column: span 10/span 10; - grid-template-columns: repeat(10, minmax(0, 1fr)); +.column { + flex-direction: column; } -.grid-11col { - grid-column: span 11/span 11; - grid-template-columns: repeat(11, minmax(0, 1fr)); +.self-stretch { + align-self: stretch; + display: flex; + align-items: center; } -.grid-12col { - grid-column: span 12/span 12; - grid-template-columns: repeat(12, minmax(0, 1fr)); +.text-center { + text-align: center; } -.grid-start-2 { - grid-column-start: 2; +.gap-5 { + gap: 5px; } - -.grid-start-3 { - grid-column-start: 3; +.gap-10 { + gap: 10px; } - -.grid-start-4 { - grid-column-start: 4; +.gap-15 { + gap: 15px; } -.grid-start-5 { - grid-column-start: 5; +.p-5 { + padding: 5px; } - -.grid-start-6 { - grid-column-start: 6; +.p-10 { + padding: 10px; } - -.grid-start-7 { - grid-column-start: 7; +.p-15 { + padding: 15px; } -.grid-start-8 { - grid-column-start: 8; +.mb-5 { + margin-bottom: 5px; } - -.grid-start-9 { - grid-column-start: 9; +.mb-10 { + margin-bottom: 10px; } - -.grid-start-10 { - grid-column-start: 10; +.mb-15 { + margin-bottom: 15px; } -.grid-start-11 { - grid-column-start: 11; +.mt-5 { + margin-top: 5px; } - -.grid-start-12 { - grid-column-start: 12; +.mt-10 { + margin-top: 10px; } - -.grid-span-2 { - grid-column-end: span 2; +.mt-15 { + margin-top: 15px; } -.grid-span-3 { - grid-column-end: span 3; +.accordion { + cursor: pointer; + z-index: 10; + position: relative; } - -.grid-span-4 { - grid-column-end: span 4; +.accordion:after { + font-family: "Font Awesome 6 Pro"; + font-size: 14px; + width: 15px; + content: "\f0da"; } - -.grid-span-5 { - grid-column-end: span 5; +.accordion.active:after { + font-family: "Font Awesome 6 Pro"; + content: "\f0d7"; } -.grid-span-6 { - grid-column-end: span 6; +/* Style the accordion panel. Note: hidden by default */ +.accordion-content { + display: none; + overflow: hidden; + padding: 0em 0.25em; } -.grid-span-7 { - grid-column-end: span 7; +.accordion-content.active { + display: block; } -.grid-span-8 { - grid-column-end: span 8; +.badge { + color: white; + background-color: #1B1A1A; + min-width: 80px; + text-align: center; } - -.grid-span-9 { - grid-column-end: span 9; +.badge.class { + background-color: rgba(155, 29, 32, 0.5215686275); + color: #1B1A1A; } - -.grid-span-10 { - grid-column-end: span 10; +.badge.community { + background-color: rgba(73, 132, 103, 0.5215686275); + color: #1B1A1A; } - -.grid-span-11 { - grid-column-end: span 11; +.badge.subclass { + background-color: rgba(153, 70, 54, 0.5215686275); + color: #1B1A1A; } - -.grid-span-12 { - grid-column-end: span 12; +.badge.ancestry { + background-color: rgba(255, 170, 51, 0.5215686275); + color: #1B1A1A; } -.flex-group-center, -.flex-group-left, -.flex-group-right { - justify-content: center; - align-items: center; - text-align: center; +.section { + background-color: #2B226D; + color: white; + padding: 5px; } -.flex-group-left { - justify-content: flex-start; - text-align: left; +.uppercase { + text-transform: uppercase; } -.flex-group-right { - justify-content: flex-end; - text-align: right; +.grid { + display: grid; } -.flexshrink { - flex: 0; +.row-2 { + grid-template-rows: repeat(2, minmax(0, 1fr)); } -.flex-between { - justify-content: space-between; +.col-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); } -.flexlarge { - flex: 2; +.bg-primary { + background-color: #38227b; + color: white; } - -.align-left { - justify-content: flex-start; - text-align: left; +.bg-card { + background: rgb(217, 216, 214); + border: 1px solid rgb(205, 205, 205); +} +.bg-secondary { + background: #2B226D; + color: white; +} +.bg-white { + background: white; + border: 1px solid rgb(205, 205, 205); } -.align-right { - justify-content: flex-end; - text-align: right; +img.header-image { + object-fit: cover; + object-position: 0% 20%; } -.align-center { - justify-content: center; - text-align: center; +.sheet .item-sheet { + background-color: rgb(217, 216, 214); } -.panel { - background: white; - box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2705882353); +.item-wrap { + padding: 10px; } -.panel-mb { - margin-bottom: 0.5em; +.item-wrap .item-sidebar { + width: 128px; } -.panel-header { - padding: 0.25em 0.5em; - background-color: #1e3a8a; - color: white; - margin-top: 0px !important; + +.class-sheet .editor .editor-content { + height: 150px; + overflow-y: auto; } -.panel-body { - padding: 0.5em; +.class-sheet .editor .editor-content * { + margin: 2px 0px; + font-size: 12px; + font-family: "Cabin Condensed", sans-serif; } - -.flex-grow { - flex-grow: 1; +.class-sheet .class-wrapper { + height: 100%; + display: grid; + grid: 1fr/200px 1fr; } -.flex-grow select { - width: 100%; +.class-sheet .class-sidebar { + background: #38227b; + color: white; } -.flex-align { - display: flex; - align-items: center; - justify-content: space-between; +select.input { + display: block; + padding: 0px; } - -.vtt { - flex-direction: column; +select.input option { + color: black; } -.dialog .choice-dialog-wrap { - margin-bottom: 0.5em; +textarea.input { + background: none; + font-size: 13px; + line-height: 14px; + font-family: "Oswald"; } -.dialog .window-content { + +.input { background: none; - background-color: #d9d9d9 !important; + font-family: "Oswald"; + gap: 10px; + line-height: 23px; + height: 23px; + padding: 5px; + border-radius: 3px; + border: solid 1px #000; } -.dialog .choice-dialog { - background: white; +.input:focus { + box-shadow: none; + border: solid 1px #38227b; } -.dialog .choice-options { - padding: 0.25em; +.input::placeholder { + color: rgba(243, 243, 243, 0.5); } -.dialog .choice-dialog-select-one { - font-size: 16px; - font-weight: bold; - background: black; - padding: 0.25em; +.input.white { color: white; + border: solid 1px #fff; } - -.daggerheart-ui-hand { - width: 100% !important; - margin-bottom: -5px; - z-index: 1; - display: flex; - overflow-y: hidden; - overflow-x: scroll; - background: rgba(27, 26, 26, 0.5); +.input.ability { + height: 40px; + font-size: 36px; + width: 50px; + height: 40px; } -.daggerheart-ui-hand .open-actor-sheet { - padding: 0.5em; +.input.center { text-align: center; - cursor: pointer; } -.daggerheart-ui-hand .hand-roll { +.input.huge { + height: 36px; + font-size: 24px; display: flex; - flex-direction: column; - text-align: center; - padding: 0.5em; - color: white; - background-color: transparent; - border: 2px solid #F1C770; - cursor: pointer; - border-radius: 0.5em; - transition: 0.2s; -} -.daggerheart-ui-hand .hand-roll:hover { - background-color: #1B1A1A; -} -.daggerheart-ui-hand .hand-roll .fear-die { - color: #f43f5e; + align-items: center; + justify-content: flex-start; } -.daggerheart-ui-hand .hand-roll label { - text-transform: uppercase; - font-weight: bold; - font-family: "Oswald"; - cursor: pointer; +.input.w128 { + width: 128px; } -.daggerheart-ui-hand .ui-rolls { - background: rgba(54, 33, 120, 0.5); - color: white; - position: sticky; - left: 0px; - z-index: 20; - padding: 0.5em; +.input.number { display: flex; + width: 32px; + height: 23px; + text-align: center; flex-direction: column; - gap: 0.5em; + justify-content: center; + align-items: center; } -.daggerheart-ui-hand .ui-card:hover .ui-card-body { - transform: rotateY(180deg); - transition: transform 0.5s; + +.checkbox-container { + display: block; + position: relative; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + width: 10px; + height: 10px; +} +.checkbox-container input { + position: absolute; + opacity: 0; + cursor: pointer; + height: 0; + width: 0; } -.daggerheart-ui-hand .ui-cards { - width: max-content !important; - display: flex; - height: 100%; +.checkbox-container .checkmark { + position: absolute; + top: 0; + left: 0; + height: 10px; + width: 10px; + background-color: transparent; + border: 1px solid #fff; } -.daggerheart-ui-hand .ui-card { - position: relative; - display: flex; - flex-direction: column; - width: 150px; - margin: 0.5em; - border-radius: 0.5em; +.checkbox-container .checkmark:after { + content: ""; + position: absolute; + display: none; } -.daggerheart-ui-hand .ui-card-image { - height: 50px; - flex-grow: 1; - object-fit: cover; - object-position: 25% 35%; - border-radius: 0.5em 0.5em 0 0; +.checkbox-container:hover input ~ .checkmark { + background-color: #ccc; } -.daggerheart-ui-hand .ui-card-body { - position: relative; - border-radius: 0.5em 0.5em 0 0; - transition: transform 1s; - transform-style: preserve-3d; +.checkbox-container input:checked ~ .checkmark { + background-color: #fff; } -.daggerheart-ui-hand .ui-card-body .card-front, -.daggerheart-ui-hand .ui-card-body .card-back { - position: absolute; - height: 100%; - width: 100%; - border-radius: 0.5em 0.5em 0 0; +.checkbox-container input:checked ~ .checkmark:after { + display: block; } -.daggerheart-ui-hand .ui-card-body .card-front { - backface-visibility: hidden; - display: flex; - flex-direction: column; - height: 155px; + +.button { + padding: 2px; + cursor: pointer; + transition: 0.2s; + border: 1px solid #1B1A1A; + color: #1B1A1A; } -.daggerheart-ui-hand .ui-card-body .card-back { - background-color: white; - height: 155px; - backface-visibility: hidden; - transform: rotateY(180deg); - padding: 0.25em; - overflow-x: scroll; - font-size: 12px; +.button:hover { + background-color: #1B1A1A; + color: #fff; } -.daggerheart-ui-hand .ui-card-name { - background-color: #334155; +.button.white { + border: 1px solid #fff; color: #fff; - padding: 0.25em; - text-align: center; - font-weight: bold; - text-transform: uppercase; } -.daggerheart-ui-hand .ui-card-domain { - background-color: #eab308; - text-align: center; - font-weight: bold; - padding: 0.25em; - text-transform: uppercase; +.button.min-width { + min-width: 40px; } - -.domain-pill { - padding: 0.25em 0.5em; - text-transform: uppercase; - font-weight: lighter; - border-radius: 0.25em; +.button.center { + text-align: center; } -/* Styles limited to daggerheart sheets */ -.daggerheart { - /* Style the accordion panel. Note: hidden by default */ -} -.daggerheart .item-form { - font-family: "Roboto", sans-serif; +.daggerheart-dice-roll { + font-family: "Oswald", sans-serif; + display: grid; + grid: 1fr/1fr; + align-items: center; + justify-items: center; + margin: 0px auto; + text-align: center; } -.daggerheart .sheet-header { - flex: 0 auto; - overflow: hidden; +.daggerheart-dice-roll .normal-dice-roll { + width: 100%; + height: 100%; display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: flex-start; - margin-bottom: 10px; -} -.daggerheart .sheet-header .profile-img { - flex: 0 0 100px; - height: 100px; - margin-right: 10px; -} -.daggerheart .sheet-header .header-fields { - flex: 1; -} -.daggerheart .sheet-header h1.charname { - height: 50px; - padding: 0px; - margin: 5px 0; - border-bottom: 0; + align-items: center; + justify-content: center; } -.daggerheart .sheet-header h1.charname input { - width: 100%; - height: 100%; - margin: 0; +.daggerheart-dice-roll .hope-roll { + background-color: #e4e4e7; + color: #18181b; } -.daggerheart .sheet-tabs { - flex: 0; +.daggerheart-dice-roll .fear-roll { + color: #e4e4e7; + background-color: #18181b; } -.daggerheart .sheet-body, -.daggerheart .sheet-body .tab, -.daggerheart .sheet-body .tab .editor { - height: 100%; +.daggerheart-dice-roll .hope-roll, +.daggerheart-dice-roll .fear-roll { + font-size: 2em; + font-weight: 900; } -.daggerheart .tox .tox-editor-container { - background: #fff; +.daggerheart-dice-roll .total-roll { + font-size: 3em; + font-weight: 900; } -.daggerheart .tox .tox-edit-area { - padding: 0 8px; + +.hope-result { + background: white !important; + color: #18181b !important; + border-radius: 100% !important; + background-image: none !important; } -.daggerheart .resource-label { - font-weight: bold; + +.fear-result { + background: #18181b !important; + color: white !important; + border-radius: 100% !important; + background-image: none !important; } -.daggerheart .items-header { - height: 28px; - margin: 2px 0; - padding: 0; - align-items: center; - background: rgba(0, 0, 0, 0.05); - border: 2px groove #eeede0; + +.winner { font-weight: bold; -} -.daggerheart .items-header > * { - font-size: 14px; + text-transform: uppercase; + font-size: 16px; text-align: center; + background: #223E6D; + color: white; + padding: 0.25em; + font-family: "Oswald", sans-serif; } -.daggerheart .items-header .item-name { + +.show-result { + text-transform: uppercase; + padding: 0.25em; + text-align: center; + font-size: 10px; font-weight: bold; - padding-left: 5px; - text-align: left; - display: flex; -} -.daggerheart .items-list { - list-style: none; - margin: 0; - padding: 0; - overflow-y: auto; - scrollbar-width: thin; - color: #444; -} -.daggerheart .items-list .item-list { - list-style: none; - margin: 0; - padding: 0; -} -.daggerheart .items-list .item-name { - flex: 2; - margin: 0; - overflow: hidden; - font-size: 13px; - text-align: left; - align-items: center; - display: flex; -} -.daggerheart .items-list .item-name h3, -.daggerheart .items-list .item-name h4 { - margin: 0; - white-space: nowrap; - overflow-x: hidden; -} -.daggerheart .items-list .item-controls { - display: flex; - flex: 0 0 100px; - justify-content: flex-end; + cursor: pointer; + font-family: "Oswald", sans-serif; } -.daggerheart .items-list .item-controls a { - font-size: 12px; + +.action-type { + font-family: "Oswald", sans-serif; + font-weight: bold; + text-transform: uppercase; + font-size: 16px; text-align: center; - margin: 0 6px; -} -.daggerheart .items-list .item { - align-items: center; - padding: 0 2px; - border-bottom: 1px solid #c9c7b8; -} -.daggerheart .items-list .item:last-child { - border-bottom: none; -} -.daggerheart .items-list .item .item-name { - color: #191813; -} -.daggerheart .items-list .item .item-name .item-image { - flex: 0 0 30px; - height: 30px; - background-size: 30px; - border: none; - margin-right: 5px; + background: white; + padding: 0.25em; } -.daggerheart .items-list .item-prop { - text-align: center; - border-left: 1px solid #c9c7b8; - border-right: 1px solid #c9c7b8; - font-size: 12px; + +.daggerheart-roll-header { + display: grid; + width: 100%; + grid: 1fr/2fr 1fr; } -.daggerheart .items-list .items-header { - height: 28px; - margin: 2px 0; - padding: 0; - align-items: center; - background: rgba(0, 0, 0, 0.05); - border: 2px groove #eeede0; - font-weight: bold; + +.item-chat-header { + font-size: 16px; + font-family: "Oswald"; + background-color: #38227b; + padding: 2px 5px; + color: #F3F3F3; } -.daggerheart .items-list .items-header > * { - font-size: 12px; - text-align: center; + +.item-chat-body { + font-size: 14px; + font-family: "Cabin Condensed", sans-serif; + background-color: rgb(217, 216, 214); + padding: 5px 5px; } -.daggerheart .items-list .items-header .item-name { - padding-left: 5px; - text-align: left; +.item-chat-body * { + margin: 0px 2px; } -.daggerheart .item-formula { - flex: 0 0 200px; - padding: 0 8px; + +.dialog-input-group { + display: flex; + flex-direction: column; + margin-bottom: 0.5em; } -.daggerheart .inventory-item { +.dialog-input-group .dialog-input { display: flex; align-items: center; justify-content: space-between; - padding: 0.5em; - background-color: white; - margin-bottom: 0.5em; } -.daggerheart .inventory-item-name { +.dialog-input-group .dialog-input .dialog-input-name { + flex-grow: 1; font-weight: bold; - font-size: 16px; -} -.daggerheart .inventory-left { - display: flex; - align-items: center; } -.daggerheart .inventory-left img { - margin-right: 0.5em; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); +.dialog-input-group .dialog-input .dialog-input-mod { + background: #38227b !important; + padding: 0.25em; + width: 8%; + text-align: center; + color: white; + font-weight: bold; } -.daggerheart .inventory-right { + +.duality-dice-msg-container { display: flex; - gap: 0.5em; -} -.daggerheart .domain-stats { - display: grid; - grid: 1fr/3fr 1fr 50px; -} -.daggerheart .domain-stats select { width: 100%; } -.daggerheart .effects .item .effect-source, -.daggerheart .effects .item .effect-duration, -.daggerheart .effects .item .effect-controls { + +.duality-dice-msg-die-spacer { + display: flex; + flex-wrap: wrap; + justify-content: center; + font-weight: bolder; + font-size: x-large; text-align: center; - border-left: 1px solid #c9c7b8; - border-right: 1px solid #c9c7b8; - font-size: 12px; -} -.daggerheart .effects .item .effect-controls { - border: none; -} -.daggerheart .class-sheet-header .class-img { - height: 100px; - object-fit: contain; - object-position: 100% 0; + flex-grow: 1; } -.daggerheart .class-sheet .question-text, .daggerheart .class-sheet .connection-text { - margin-bottom: 0.5em; + +.duality-dice-msg-die-fear { + display: flex; + flex-direction: column; + justify-content: center; + width: 25px; + height: 25px; + margin: 1%; + background-image: url("/systems/daggerheart/assets/svgs/d12-solid-fear.svg"); } -.daggerheart .class-sheet .domains-header { + +.duality-dice-msg-die-hope { display: flex; - align-items: center; - justify-content: space-between; - width: 100%; + flex-direction: column; + justify-content: center; + width: 25px; + height: 25px; + margin: 1%; + background-image: url("/systems/daggerheart/assets/svgs/d12-solid-hope.svg"); } -.daggerheart .class-sheet-input-group { - justify-items: center; - display: grid; - align-items: center; - margin-bottom: 0.5em; + +.duality-dice-msg-die-selected-hope-disadv { + display: flex; + flex-direction: column; + justify-content: center; + width: 25px; + height: 25px; + margin: 1%; + background-image: url("/systems/daggerheart/assets/svgs/d12-solid-hope.svg"); + border: 1px solid rgb(94, 54, 54); + background-color: #9e5353; + border-radius: 25%; + padding: 1%; + width: 25px; + height: 25px; } -.daggerheart .class-sheet-domain-list { - justify-self: start; + +.duality-dice-msg-die-selected-hope-adv { display: flex; - gap: 1em; + flex-direction: column; + justify-content: center; + width: 25px; + height: 25px; + margin: 1%; + background-image: url("/systems/daggerheart/assets/svgs/d12-solid-hope.svg"); + border: 1px solid rgb(50, 86, 53); + background-color: #4f9150; + border-radius: 25%; + padding: 1%; + width: 25px; + height: 25px; } -.daggerheart .class-sheet-domain-list-item { + +.duality-dice-msg-die-crit-success { display: flex; - align-items: center; - gap: 0.25em; + flex-direction: column; + justify-content: center; + width: 25px; + height: 25px; + margin: 1%; + background-image: url("/systems/daggerheart/assets/svgs/d12-solid-crit-success.svg"); } -.daggerheart .class-sheet .hitpoints-stats .combat-stat-item { - width: 25%; + +.duality-dice-msg-die-crit-fail { + display: flex; + flex-direction: column; + justify-content: center; + width: 25px; + height: 25px; + margin: 1%; + background-image: url("/systems/daggerheart/assets/svgs/d12-solid-crit-fail.svg"); } -.daggerheart .class-sheet select { - color: #fff; - background-color: #f43f5e; - border: none; - box-shadow: none !important; + +.duality-dice-msg-resut-text-fear { + text-align: center; + font-weight: bolder; + font-size: medium; + color: rgb(255, 255, 255); + height: fit-content; + width: fit-content; + background: rgba(0, 0, 0, 0.5); + text-shadow: 1px 1px 1px #000; + margin: 0px auto; } -.daggerheart .class-sheet select option { + +.duality-dice-msg-resut-text-hope { + text-align: center; + font-weight: bolder; + font-size: medium; color: black; + height: fit-content; + width: fit-content; + background: #FFF; + margin: 0px auto; + text-shadow: 1px 1px 1px #FFF; } -.daggerheart .class-sheet .delete-domain:hover { - cursor: pointer; - color: #f43f5e; -} -.daggerheart .class-sheet .examples { - display: grid; + +.duality-dice-msg-resut-text-crit-success { + text-align: center; + font-weight: bolder; + font-size: medium; + text-shadow: 1px 1px 1px #fff; + color: black; } -.daggerheart .class-sheet .examples .tox-toolbar__group button:not(button[aria-label=Save]) { - display: none; + +.duality-dice-msg-resut-text-crit-fail { + text-align: center; + font-weight: bolder; + font-size: medium; + text-shadow: 1px 1px 1px #000; + color: white; } -.daggerheart .questions .question input, -.daggerheart .questions .connection input, -.daggerheart .connections .question input, -.daggerheart .connections .connection input { - border: none; - border-bottom: 1px solid #334155; - margin-bottom: 0.5em; - box-shadow: none; + +.vtt { + flex-direction: column; } -.daggerheart .questions .question label, -.daggerheart .questions .connection label, -.daggerheart .connections .question label, -.daggerheart .connections .connection label { - font-size: 12px; - font-weight: bold; + +.daggerheart-ui-hand { + width: 100% !important; + margin-bottom: -5px; + z-index: 1; display: flex; - align-items: center; - justify-content: space-between; + overflow-y: hidden; + overflow-x: scroll; + background: rgba(27, 26, 26, 0.5); } -.daggerheart .question-add, -.daggerheart .question-remove { - padding: 0.25em; +.daggerheart-ui-hand .open-actor-sheet { + padding: 0.5em; + text-align: center; + cursor: pointer; } -.daggerheart .item-display-flex { +.daggerheart-ui-hand .hand-roll { display: flex; - justify-content: space-between; - align-items: center; + flex-direction: column; text-align: center; + padding: 0.5em; + color: white; + background-color: transparent; + border: 2px solid #f3c267; + cursor: pointer; + border-radius: 0.5em; + transition: 0.2s; } -.daggerheart .item-display-flex h2 { - border: none; - margin: 0; - flex-grow: 1; +.daggerheart-ui-hand .hand-roll:hover { + background-color: #1B1A1A; +} +.daggerheart-ui-hand .hand-roll .fear-die { + color: #92140C; } -.daggerheart .top-header { +.daggerheart-ui-hand .hand-roll label { + text-transform: uppercase; + font-weight: bold; + font-family: "Oswald"; + cursor: pointer; +} +.daggerheart-ui-hand .ui-rolls { + background: rgba(56, 34, 123, 0.5); + color: white; + position: sticky; + left: 0px; + z-index: 20; + padding: 0.5em; display: flex; - gap: 1em; + flex-direction: column; + gap: 0.5em; } -.daggerheart .class-sheet-header-fields { - flex-grow: 1; +.daggerheart-ui-hand .ui-card:hover .ui-card-body { + transform: rotateY(180deg); + transition: transform 0.5s; } -.daggerheart .class-sheet-header-fields input { - font-size: 2em; +.daggerheart-ui-hand .ui-cards { + width: max-content !important; + display: flex; height: 100%; } -.daggerheart .edit-mode-change { +.daggerheart-ui-hand .ui-card { + position: relative; display: flex; - gap: 0.25em; - align-items: center; - font-size: 1em; -} -.daggerheart .edit-mode-change label { - font-weight: normal; - font-size: 1em; + flex-direction: column; + width: 150px; + margin: 0.5em; + border-radius: 0.5em; } -.daggerheart .edit-mode-change input { - height: 18px; +.daggerheart-ui-hand .ui-card-image { + height: 50px; + flex-grow: 1; + object-fit: cover; + object-position: 25% 35%; + border-radius: 0.5em 0.5em 0 0; } -.daggerheart .class-sheet-body .editor { - height: 150px !important; +.daggerheart-ui-hand .ui-card-body { + position: relative; + border-radius: 0.5em 0.5em 0 0; + transition: transform 1s; + transform-style: preserve-3d; } -.daggerheart .leveling .header { - grid-column: span 3; - display: grid; - grid: 1fr/repeat(3, 1fr); +.daggerheart-ui-hand .ui-card-body .card-front, +.daggerheart-ui-hand .ui-card-body .card-back { + position: absolute; + height: 100%; + width: 100%; + border-radius: 0.5em 0.5em 0 0; } -.daggerheart .leveling-section { - margin-top: 0.3em; +.daggerheart-ui-hand .ui-card-body .card-front { + backface-visibility: hidden; + display: flex; + flex-direction: column; + height: 155px; } -.daggerheart .leveling .add-tier { +.daggerheart-ui-hand .ui-card-body .card-back { + background-color: white; + height: 155px; + backface-visibility: hidden; + transform: rotateY(180deg); + padding: 0.25em; + overflow-x: scroll; font-size: 12px; - margin: 0.4em; - padding: 0.4em; - background-color: #f43f5e; - color: #fff; - display: inline-block; - cursor: pointer; } -.daggerheart .leveling .tier { - border-right: 1px solid #334155; - background-color: #fff; +.daggerheart-ui-hand .ui-card-name { + background-color: #38227b; + color: #F3F3F3; + padding: 0.25em; + text-align: center; + font-weight: bold; + text-transform: uppercase; } -.daggerheart .leveling .tier-header { +.daggerheart-ui-hand .ui-card-domain { + background-color: rgba(255, 170, 51, 0.5215686275); text-align: center; + font-weight: bold; + padding: 0.25em; + text-transform: uppercase; } -.daggerheart .leveling .tier-level { - font-size: 14px; + +.daggerheart { + font-family: "Oswald"; } -.daggerheart .leveling .tier-input { - flex-grow: 1; +.daggerheart .window-content { + padding: 0; + background: white; } -.daggerheart .leveling .tier-option { - display: flex; - justify-content: space-between; - padding: 0.25em; - gap: 0.5em; - align-items: center; +.daggerheart hr { + border: 1px solid rgba(243, 243, 243, 0.1); + width: 100%; + margin: 3px 0px; + padding: 0px; } -.daggerheart .leveling .tier-bonus { - font-size: 12px; - flex-grow: 1; +.daggerheart hr.black { + border-color: #000; } -.daggerheart .item-to-get-list-item { - background-color: white; - padding: 0.5em; - margin-bottom: 0.5em; - gap: 0.5em; +.daggerheart .editor { + min-height: 50px; } -.daggerheart .item-to-get-list-item input { - flex-grow: 1; +.daggerheart .editor .tox.tox-tinymce { + min-height: 200px; + background: rgb(217, 216, 214); + border: 2px solid rgb(205, 205, 205); } -.daggerheart .starting-items { - display: grid; - grid: 1fr/repeat(3, 1fr); - margin-bottom: 0.5em; - gap: 1em; - text-transform: uppercase; +.daggerheart .editor .tox-sidebar-wrap { + padding: 0px 5px; } -.daggerheart .starting-items div { - padding: 0.5em; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - color: white; +.daggerheart .editor .white ~ .tox.tox-tinymce { + border: 1px solid white; + background: #F3F3F3; } -.daggerheart .starting-gold-class { - background-color: #362178; - display: flex; - padding: 0.5em; - margin-bottom: 0.5em; +.daggerheart .editor .h150 ~ .tox.tox-tinymce { + min-height: 150px; } -.daggerheart .starting-gold-class label { - flex-grow: 1; - font-size: 1em; - color: white; - font-weight: bold; +.daggerheart .editor .h180 ~ .tox.tox-tinymce { + min-height: 180px; } -.daggerheart .starting-gold-class input { - text-align: center; - width: 40px; +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label=Formats], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label="Numbered list"], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label="Insert/edit image"], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label=Table], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label="Horizontal line"], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label="Insert/edit link"], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label="Clear formatting"], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label="Source code"], +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label="Bullet list"] { + display: none; } -.daggerheart .exp { - display: flex; - align-items: center; - gap: 1em; - margin: 0.25em 0; +.daggerheart .editor .simple ~ .tox.tox-tinymce .tox-toolbar__primary button[aria-label=Save] { + height: 24px; + width: 24px; + padding: 0px; + margin: 0px; } -.daggerheart .exp-delete { - flex-basis: 5%; - text-align: center; +.daggerheart .layout { + display: grid; + height: 100%; + grid-template: "sidebar" 170px "sidebar" 35px "sidebar" 1fr/220px 1fr; } -.daggerheart .leveling-option { - display: flex; +.daggerheart .layout .sidebar { + grid-area: sidebar; + background-color: #38227b; + color: #fff; align-items: center; - font-size: 12px; - background-color: white; - padding: 0.5em; + gap: 5px; } -.daggerheart .leveling-options { - display: grid; - grid: 1fr/repeat(2, 1fr); - gap: 0.5em; +.daggerheart .layout .header { + background-color: #2B226D; + color: #fff; } -.daggerheart .leveling-tier-description { - font-weight: bold; - font-size: 12px; +.daggerheart .sidebar { + display: flex; + flex-direction: column; + width: 100%; + padding: 5px; +} +.daggerheart .sidebar-image { text-align: center; } -.daggerheart .leveling-bonus { - font-size: 10px; - text-transform: uppercase; +.daggerheart .sidebar-image-src { + border: 1px solid #F3F3F3; } -.daggerheart .weapon-form { - padding: 0.5em; +.daggerheart .sidebar-level { + width: 83px; } -.daggerheart .weapon-input-group { - margin-bottom: 0.5em; +.daggerheart .sidebar-experiences-list { + max-height: 100px; + overflow: auto; +} +.daggerheart .header { + display: flex; + flex-direction: column; + width: 100%; + padding: 5px; } -.daggerheart .weapon-input-group-flex { +.daggerheart .header-name { + padding: 2px 0px; +} +.daggerheart .header-title { display: flex; - gap: 1em; + gap: 5px; } -.daggerheart .weapon-grid { - display: grid; - grid: 1fr/100px 1fr; - gap: 0.5em; +.daggerheart .header-title span { + cursor: pointer; } -.daggerheart .weapon-header { - background-color: white; - padding: 0.5em; +.daggerheart .header-title label { + padding: 2px 4px; } -.daggerheart .equipped .weapon-main-ability { +.daggerheart .navigation-tab { + padding: 5px; +} +.daggerheart .navigation .navigation-item { + width: 90px; + height: 25px; + border: 1px solid #000; + color: #000; + font-size: 14px; + text-align: center; text-transform: uppercase; + transition: all 0.2s; } -.daggerheart .weapon-list-inventory-item { - margin: 0.5em 0; +.daggerheart .navigation .navigation-item:hover { + text-shadow: none; + background-color: #000; + color: #fff; } -.daggerheart .weapon-main { - display: flex; - gap: 0.5em; +.daggerheart .navigation .navigation-item.active { + background-color: #38227b; + border: 1px solid #f3c267; + color: #f3c267; } -.daggerheart .weapon-attributes { - display: flex; - align-items: center; - margin-left: 0.5em; +.daggerheart .content { + padding: 5px; } -.daggerheart .equipped-wrapper { - margin-bottom: 0.5em; +.daggerheart .adversary-content { + grid-area: span 2; + padding: 5px; } -.daggerheart .weapon-main-name { - font-family: "Oswald", sans-serif; - font-size: 14px; - display: flex; - align-items: center; - gap: 0.5em; +.daggerheart .inventory-nav .inventory-nav-item { + width: 100px; + text-align: center; + transition: 0.2s; font-weight: bold; + border-bottom: 1px solid transparent; } -.daggerheart .weapon-description { - color: white; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); +.daggerheart .inventory-nav .inventory-nav-item:hover { + color: #38227b; + text-shadow: none; } -.daggerheart .weapon-description * { - padding: 0.25em; - margin: 0px; +.daggerheart .inventory-nav .inventory-nav-item.active { + border-bottom: 1px solid #38227b; } -.daggerheart .weapon-main-description { - font-size: 10px; - text-transform: uppercase; - font-family: "Oswald", sans-serif; - padding-bottom: 0.25em; +.daggerheart .character-card { + padding: 0px 5px; } -.daggerheart .weapon-main-ability, .daggerheart .weapon-main-damage, .daggerheart .equipped-hit, .daggerheart .equipped-damage { +.daggerheart .character-card-header { + background-color: rgb(217, 216, 214); + border: 2px solid rgb(205, 205, 205); + color: #F3F3F3; font-size: 12px; - text-transform: capitalize; - padding: 0.5em; - font-weight: bold; - border: 1px solid black; - margin-right: 0.5em; - cursor: pointer; - transition: 0.2s; } -.daggerheart .weapon-main-ability:hover, .daggerheart .weapon-main-damage:hover, .daggerheart .equipped-hit:hover, .daggerheart .equipped-damage:hover { - background-color: black; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - color: white; -} -.daggerheart .weapon-options { - display: flex; - gap: 0.25em; - align-items: center; +.daggerheart .character-card-header-name { + text-transform: uppercase; + color: black; + font-weight: bolder; + padding: 5px; + min-width: 80px; } -.daggerheart .weapon-equip, .daggerheart .armor-equip { - border: 1px solid #3f6212; - color: #3f6212; +.daggerheart .character-card-header-type { + text-transform: uppercase; + padding: 5px; } -.daggerheart .weapon-equip:hover, .daggerheart .armor-equip:hover { - color: white; - background-color: #3f6212; +.daggerheart .character-card-feature { + font-size: 12px; + font-family: "Cabin Condensed", sans-serif; } -.daggerheart .weapon-unequip, .daggerheart .armor-unequip { - border: 1px solid #f43f5e; - color: #f43f5e; +.daggerheart .character-card-roll { + position: relative; + z-index: 100; + padding: 3px; + transition: 0.2s; + color: #1B1A1A; } -.daggerheart .weapon-unequip:hover, .daggerheart .armor-unequip:hover { +.daggerheart .character-card-roll:hover { color: white; - background-color: #f43f5e; + background-color: #1B1A1A; } -.daggerheart .equipped-main { - display: flex; - align-items: center; +.daggerheart .character-card-roll .fas.fa-comment { + margin-top: -1px; } -.daggerheart .equipped-img img { - height: 30px; - margin-right: 0.5em; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); +.daggerheart .domain-card-roll { + position: relative; + z-index: 100; + padding: 3px; + transition: 0.2s; } -.daggerheart .equipped-feature { - background: #362178; - padding: 0.25em; - padding-left: 0.5em; - font-size: 12px; - font-weight: 300; +.daggerheart .domain-card-roll:hover { color: white; + background-color: #1B1A1A; } -.daggerheart .equipped-feature p { - display: inline; +.daggerheart .domain-card-roll .fas.fa-comment { + margin-top: -1px; } -.daggerheart .weapon-equip, -.daggerheart .weapon-unequip, .daggerheart .armor-equip, .daggerheart .armor-unequip { - text-transform: uppercase; - font-weight: bold; - padding: 0.25em 0.5em; - transition: background-color 0.2s; - cursor: pointer; - text-align: center; - margin: 0px 0.5em; - display: flex; - align-items: center; - justify-content: center; - margin: 0px 0.5em; +.daggerheart .domain-card .domain-card-header-name { + font-size: 14px; } -.daggerheart .weapon-equip:hover, -.daggerheart .weapon-unequip:hover, .daggerheart .armor-equip:hover, .daggerheart .armor-unequip:hover { - text-shadow: none; +.daggerheart .domain-card-level { + padding: 0px 5px; } -.daggerheart .equipped { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0.5em; - background-color: white; +.daggerheart .domain-card-domain { + text-transform: uppercase; + padding: 0px 5px; + border-radius: 3px; } -.daggerheart .equipped-name { - font-family: "Oswald", sans-serif; +.daggerheart .domain-card-name { + font-size: 14px; font-weight: bold; - font-size: 18px; -} -.daggerheart .enemy-hp input, -.daggerheart .enemy-stress input, -.daggerheart .enemy-hitpoints input { - width: 50px; - text-align: center; + padding-bottom: 0px; } -.daggerheart .enemy-label { - width: 70px; +.daggerheart .domain-card-type { + font-size: 11px; text-transform: uppercase; - font-size: 16px; } -.daggerheart .enemy-hp, -.daggerheart .enemy-stress, -.daggerheart .enemy-hitpoints { - display: grid; - grid: 1fr/20% 50px 50px 50px; - gap: 0.5em; +.daggerheart .domain-card-recall { + background-color: #1B1A1A; + border: 1px solid #f3c267; + color: #F3F3F3; + padding: 0px 5px; + border-radius: 3px; + display: flex; align-items: center; } -.daggerheart .enemy-header { - display: grid; - grid: 100px 1fr/100px 1fr; - gap: 1em; -} -.daggerheart .enemy-header-description { - grid-row: span 2; -} -.daggerheart .enemy-type select { - width: 99%; +.daggerheart .domain-card-recall i.fas.fa-bolt { + font-size: 10px; + margin-top: 1px; } -.daggerheart .enemy-name { - margin-bottom: 0.5em; +.daggerheart .domain-card-feature { + font-size: 12px; + font-family: "Cabin Condensed", sans-serif; } -.daggerheart .enemy-name-input { - height: 100%; - font-size: 1.5em; +.daggerheart .domain-card-meta { + background-color: rgb(217, 216, 214); + border: 2px solid rgb(205, 205, 205); } -.daggerheart .adversary label { - font-size: 14px; +.daggerheart .inventory-tab.active[data-tab=vault_cards] .checkmark { + background-color: #4CB944 !important; + border: 1px solid #4CB944; } -.daggerheart .adversary h3 { - font-size: 18px; +.daggerheart .inventory-tab.active[data-tab=loadout_cards] .checkmark { + background-color: #92140C !important; + border: 1px solid #92140C; } -.daggerheart .enemy-wrap { - display: grid; - grid: 1fr/2fr 3fr; - gap: 0.5em; -} -.daggerheart .enemy-wrap .enemy-left { - font-size: 16px; - text-transform: capitalize; -} -.daggerheart .enemy-wrap .enemy-left label { - font-size: 16px !important; -} -.daggerheart .enemy-tactics { - margin-bottom: 0.5em; -} -.daggerheart .enemy-weapon-stats { - gap: 0.25em; -} -.daggerheart .feature-item { - padding: 0.25em; - margin-bottom: 0.5em; -} -.daggerheart .enemy-experience { - gap: 0.25em; - margin-bottom: 0.25em; -} -.daggerheart .enemy-experience .enemy-experience-name { - flex-grow: 1; -} -.daggerheart .view-mode { - display: flex; - gap: 0.5em; - align-items: center; -} -.daggerheart .enemy-header-split { - display: grid; - grid: 1fr/3fr 1fr; -} -.daggerheart .gm-rolls .roll-button { - border: 2px solid black; - padding: 0.5em; - display: flex; - align-items: center; - margin-bottom: 0.5em; - background: transparent; - color: black; - cursor: pointer; - text-transform: uppercase; - font-size: 14px; -} -.daggerheart .gm-rolls .roll-button .fa-dice-d20 { - margin-top: 1px; - margin-left: 2px; -} -.daggerheart .gm-rolls .roll-button:hover { - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - color: white; -} -.daggerheart .gm-sheet .gm-resource { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0.5em; -} -.daggerheart .gm-sheet label { - font-size: 1.5em; -} -.daggerheart .gm-sheet input { - width: 100px; - text-align: center; - height: 100%; - font-size: 1.5em; - position: relative; -} -.daggerheart .gm-sheet .incremental { - display: flex; - align-items: center; - gap: 0.5em; -} -.daggerheart *:not(i) { - font-family: "Oswald", sans-serif; -} -.daggerheart .proficiency { - display: flex; - gap: 0.5em; - justify-content: end; - align-items: CENTER; -} -.daggerheart.actor nav.sheet-tabs { - position: relative; - color: white; - border: none; -} -.daggerheart.actor nav.sheet-tabs:after { - border: 1px solid #F1C770; - content: " "; - position: absolute; - width: 100%; - top: 44%; - z-index: 1; -} -.daggerheart.actor nav.sheet-tabs .item { - position: relative; - z-index: 2; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%) !important; - background-color: #1B1A1A; - border: 2px solid #f1c770; -} -.daggerheart.actor nav.sheet-tabs .item:hover { - text-shadow: none; - background: #383838; - background-color: #383838; -} -.daggerheart.actor nav.sheet-tabs .item.active { - background: #362178 !important; - box-shadow: none; - text-shadow: none; - color: #F1C770; -} -.daggerheart .accordion { - cursor: pointer; - z-index: 10; - position: relative; -} -.daggerheart .accordion:after { - font-family: "Font Awesome 6 Pro"; - content: "\f0da"; -} -.daggerheart .accordion.active:after { - font-family: "Font Awesome 6 Pro"; - content: "\f0d7"; -} -.daggerheart .accordion-content { - display: none; - overflow: hidden; - padding: 0em 0.25em; -} -.daggerheart .accordion-content.active { - display: block; -} -.daggerheart input, -.daggerheart textarea, -.daggerheart select { - border: 1px solid #d1d5db; - background-color: #f3f4f6; -} -.daggerheart input:focus, -.daggerheart textarea:focus, -.daggerheart select:focus { - box-shadow: 0 0 0px 1px #6b7280 !important; -} -.daggerheart .time-to-roll { - cursor: pointer; - flex: 4; - height: 26px; - display: flex; - align-items: center; - padding-left: 5px; - margin-right: 5px; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - background-color: #1B1A1A; - transition: background-color 100ms linear; - color: #fff; -} -.daggerheart .time-to-roll:hover { - background: #383838; -} -.daggerheart .edit-mode-on { - color: #3f6212; -} -.daggerheart .edit-mode-off { - color: #f43f5e; -} -.daggerheart .short-input { - width: 30%; - text-align: center; -} -.daggerheart .side-label { - height: 100%; - align-items: center; - font-weight: bold; - display: flex; - justify-content: center; -} -.daggerheart .side-label.rose { - background-color: #f43f5e; - color: #fff; -} -.daggerheart .editor-content { - margin-right: 3em; -} -.daggerheart .char-sheet-description .editor { - height: 230px !important; - border: none !important; -} -.daggerheart .char-sheet-description .editor-content { - border: none !important; -} -.daggerheart .img-wrap, -.daggerheart .profile-img { - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - border: 2px solid #F1C770; - width: 100px; -} -.daggerheart .editor-wrap .editor-edit { - display: block !important; -} -.daggerheart .editor-wrap .editor { - width: 100%; - height: 150px; -} -.daggerheart .card-delete-option { - color: #f43f5e; - font-size: 10px; - text-transform: uppercase; - font-weight: bold; - padding: 0.1em; - transition: 0.4s; -} -.daggerheart .card-delete-option:hover { - background-color: #f43f5e; - color: white; -} -.daggerheart .item-display { - color: white; - background: #222; - display: flex; - align-self: center; - flex-grow: 1; - width: 100%; - justify-content: center; - padding: 4px 0px; - margin-bottom: 3px; -} -.daggerheart .ability { - padding: 0.25rem 0px; -} -.daggerheart .bio-wrap { - padding: 0px 1em 0.5em 1em; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - border: 2px solid #F1C770; - color: white; -} -.daggerheart .hitpoints { - display: grid; - grid: 1fr 1fr/1fr 1fr 1fr; - gap: 0.25rem; - justify-items: center; - align-items: center; - margin-bottom: 1em; - padding: 0em 0.5em; - padding-bottom: 0.5em; - color: white; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); -} -.daggerheart .hope { - display: flex; - align-items: center; - gap: 0.25rem; - margin: 0.5rem 0px; -} -.daggerheart .health-stress { - display: grid; - grid: 1fr/1fr 1fr 1fr; - gap: 0.25em; - margin: 0.25em 0; -} -.daggerheart .health-stress .take-two { - grid-column: span 2; -} -.daggerheart .meta { +.daggerheart .leveling-tier-options { display: grid; grid: 1fr/1fr 1fr; - width: 100%; -} -.daggerheart .domain { - background-color: #fff; - padding: 0.25rem; - margin: 0.25rem 0; + gap: 10px; + margin-bottom: 10px; } -.daggerheart .tier-description { +.daggerheart .leveling-tier-description { text-align: center; + font-family: "Cabin Condensed", sans-serif; + margin-bottom: 5px; font-size: 12px; - font-weight: bold; -} -.daggerheart .card.panel { - margin: 0.5em 0.25em; -} -.daggerheart .card-header, -.daggerheart .panel-header { - display: flex; -} -.daggerheart .card-name, -.daggerheart .panel-name { - font-size: 16px; - font-weight: bold; - padding: 0.25rem; - padding-left: 8px; - border-bottom: 1px solid black; - text-transform: capitalize; -} -.daggerheart .card-type, -.daggerheart .panel-type { - background-color: #f43f5e; - color: #fff; - padding: 0.25rem; - text-transform: capitalize; - display: flex; - align-items: center; -} -.daggerheart .card-recall, -.daggerheart .panel-recall { - background-color: black; - color: #fff; - padding: 0.25rem; - text-transform: capitalize; - display: flex; - align-items: center; -} -.daggerheart .card-domain, -.daggerheart .panel-domain { - background-color: #8b5cf6; - color: #fff; - padding: 0.25rem; - text-transform: capitalize; - display: flex; - align-items: center; } -.daggerheart .card-body, -.daggerheart .panel-body { +.daggerheart .leveling-tier-level-bonus { font-size: 12px; - color: #18181b; - padding: 0.5em; - padding-left: 8px; + font-family: "Cabin Condensed", sans-serif; } -.daggerheart .card-options, -.daggerheart .panel-options { +.daggerheart .leveling-tier .leveling-option { display: flex; - justify-content: space-between; -} -.daggerheart .card-delete, -.daggerheart .panel-delete { - color: #f43f5e; - cursor: pointer; -} -.daggerheart .card-activate, -.daggerheart .panel-activate { - cursor: pointer; - border: 1px solid #3f6212; - color: #3f6212; - transition: 0.2s; - padding: 0.25rem; - text-transform: uppercase; -} -.daggerheart .card-activate:hover, -.daggerheart .panel-activate:hover { - color: #fff; - background-color: #3f6212; -} -.daggerheart .card-activate.danger, -.daggerheart .panel-activate.danger { - border: 1px solid #f43f5e; - color: #f43f5e; -} -.daggerheart .card-activate.danger:hover, -.daggerheart .panel-activate.danger:hover { - color: #fff; - background-color: #f43f5e; -} -.daggerheart .window-content { - background: none !important; - padding: 0.25rem !important; - background-color: #d9d9d9 !important; -} -.daggerheart .cards-vault h2 { - display: flex; - justify-content: space-between; -} -.daggerheart .section-header { - display: flex; - align-items: center; - background: #222; - text-align: center; - color: #fff; - justify-content: space-between; - padding: 0.5em 0.5em; -} -.daggerheart .section-header h2 { - flex-grow: 1; - text-decoration: none; - border: none; - margin: 0; -} -.daggerheart label { + gap: 5px; font-size: 12px; - font-weight: bold; - margin: 0.25em 0em; - display: block; + text-align: justify; + font-family: "Cabin Condensed", sans-serif; + align-items: flex-start; } -.daggerheart .combat-stat { - display: grid; - grid: 1fr/1fr 1fr 1fr 1fr; - column-gap: 1em; - row-gap: 0.25em; -} -.daggerheart .combat-stat-item { - display: flex; - flex-direction: column; - align-items: center; -} -.daggerheart .combat-stat-item label { - flex-basis: 50%; +.daggerheart .inventory-item { + border: 1px solid black; + margin: 5px 0px; + background-color: rgb(217, 216, 214); + border: 2px solid rgb(205, 205, 205); } -.daggerheart .generic-card { +.daggerheart .inventory-item.weapon { display: grid; - grid: 1fr/1fr 2fr; - margin: 0.5em 0; -} -.daggerheart .traits-tab .trait { - background-color: white; - padding: 1em; - display: flex; - flex-direction: column; - margin: 0.5em; -} -.daggerheart .traits-tab .trait-feature { - font-size: 12px; - flex-grow: 1; - height: 70px; - overflow: auto; -} -.daggerheart .traits-tab .trait-options { - display: flex; - justify-content: end; - margin-top: 0.2em; -} -.daggerheart .traits-tab .delete-trait { - color: #f43f5e; -} -.daggerheart .traits-tab .trait-name { - border-bottom: 2px solid #334155; - padding-bottom: 0.25em; - margin-bottom: 0.25em; - display: flex; + grid: 1fr/40px 2fr 1fr 20px; align-items: center; - justify-content: space-between; } -.daggerheart .traits-tab .trait-name-value { - font-size: 18px; - font-weight: bold; - text-transform: uppercase; - display: flex; - gap: 0.5em; -} -.daggerheart .traits-tab .trait-name-label { - background-color: #eab308; - color: white; - padding: 0.25em; - font-size: 12px; - text-transform: uppercase; - font-weight: 100; -} -.daggerheart .meta-domains-list { - display: flex; - gap: 0.25em; - margin-top: 0.7em; -} -.daggerheart .meta-domains-list .meta-domain { - background-color: #f43f5e; - padding: 0.4em; - text-transform: uppercase; - color: white; -} -.daggerheart .char-sheet .editor-wrap { - width: 100%; -} -.daggerheart .char-sheet.questions-connections { - display: grid; - gap: 0.5em; -} -.daggerheart .char-sheet.looks-description { - display: grid; - grid: 1fr/1fr 2fr; - gap: 0.5em; - margin: 0.5em 0; -} -.daggerheart .money, -.daggerheart .combat-stat { - background: #362178; - display: flex; - padding: 0.5em; - margin: 0.5em 0em; - color: white; - gap: 1em; - text-align: center; +.daggerheart .inventory-item .weapon-name, .daggerheart .inventory-item .item-name { + font-size: 16px; } -.daggerheart .section-title { - font-weight: bold; - font-size: 14px; - margin-bottom: 0.5em; - display: flex; - justify-content: space-between; - text-transform: uppercase; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - border: 2px solid #F1C770; - color: white; - padding: 0.25em 1em; - text-align: center; - align-items: center; +.daggerheart .inventory-item .weapon-meta, .daggerheart .inventory-item .item-meta { + padding-left: 5px; } - -.winner { - font-weight: bold; - text-transform: uppercase; - font-size: 16px; - text-align: center; - background: linear-gradient(180deg, rgb(27, 26, 26) 0%, rgb(27, 26, 26) 50%, rgb(42, 43, 46) 100%); - color: white; - padding: 0.25em; - font-family: "Oswald", sans-serif; +.daggerheart .inventory-item .weapon-description, .daggerheart .inventory-item .item-description { + font-size: 12px; } - -.show-result { - text-transform: uppercase; - padding: 0.25em; - text-align: center; - font-size: 10px; - font-weight: bold; +.daggerheart .inventory-item .weapon-image, .daggerheart .inventory-item .item-image { + position: relative; cursor: pointer; - font-family: "Oswald", sans-serif; -} - -.action-type { - font-family: "Oswald", sans-serif; - font-weight: bold; - text-transform: uppercase; - font-size: 16px; - text-align: center; - background: white; - padding: 0.25em; + display: block; } - -.weapon-roll-type { - background: none; +.daggerheart .inventory-item .weapon-image:after, .daggerheart .inventory-item .item-image:after { + content: " "; } - -.attack-roll-traits { - text-align: center; - margin-top: -5px; +.daggerheart .inventory-item .weapon-ability, .daggerheart .inventory-item .weapon-damage, .daggerheart .inventory-item .item-ability, .daggerheart .inventory-item .item-damage { + padding: 2px; text-transform: uppercase; + cursor: pointer; } - -.daggerheart-roll-header { - display: grid; - width: 100%; - grid: 1fr/2fr 1fr; +.daggerheart .inventory-item .weapon-ability:hover, .daggerheart .inventory-item .weapon-damage:hover, .daggerheart .inventory-item .item-ability:hover, .daggerheart .inventory-item .item-damage:hover { + background-color: #1B1A1A; + color: #F3F3F3; } - -.daggerheart-dice-roll { - font-family: "Oswald", sans-serif; - display: grid; - grid: 1fr/1fr; - align-items: center; - justify-items: center; +.daggerheart .inventory-item .weapon-status .equip-icon, .daggerheart .inventory-item .item-status .equip-icon { + border-radius: 100%; + width: 14px; + height: 14px; + display: block; margin: 0px auto; - text-align: center; -} -.daggerheart-dice-roll .normal-dice-roll { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; -} -.daggerheart-dice-roll .hope-roll { - background-color: #e4e4e7; - color: #18181b; -} -.daggerheart-dice-roll .fear-roll { - color: #e4e4e7; - background-color: #18181b; -} -.daggerheart-dice-roll .hope-roll, -.daggerheart-dice-roll .fear-roll { - font-size: 2em; - font-weight: 900; -} -.daggerheart-dice-roll .total-roll { - font-size: 3em; - font-weight: 900; -} - -.hope-result { - background: white !important; - color: #18181b !important; - border-radius: 100% !important; - background-image: none !important; + transition: 0.2s; + cursor: pointer; } - -.fear-result { - background: #18181b !important; - color: white !important; - border-radius: 100% !important; - background-image: none !important; +.daggerheart .inventory-item .weapon-status .equip-icon.equip, .daggerheart .inventory-item .item-status .equip-icon.equip { + background-color: transparent; + border: 1px solid #38227b; } - -.dialog-input-group { - display: flex; - flex-direction: column; - margin-bottom: 0.5em; +.daggerheart .inventory-item .weapon-status .equip-icon.equip:hover, .daggerheart .inventory-item .item-status .equip-icon.equip:hover { + background-color: #38227b; } -.dialog-input-group .dialog-input { - display: flex; - align-items: center; - justify-content: space-between; +.daggerheart .inventory-item .weapon-status .equip-icon.unequip, .daggerheart .inventory-item .item-status .equip-icon.unequip { + background-color: #38227b; + border: 1px solid #38227b; } -.dialog-input-group .dialog-input .dialog-input-name { - flex-grow: 1; - font-weight: bold; +.daggerheart .inventory-item .weapon-status .equip-icon.unequip:hover, .daggerheart .inventory-item .item-status .equip-icon.unequip:hover { + border: 1px solid #38227b; + background-color: transparent; } -.dialog-input-group .dialog-input .dialog-input-mod { - background: #f43f5e !important; - padding: 0.25em; - width: 8%; - text-align: center; +.daggerheart .inventory-item .weapon-options, .daggerheart .inventory-item .item-options { + font-size: 12px; + font-family: "Cabin Condensed", sans-serif; + grid-column: 4 span; + background-color: rgba(34, 62, 109, 0.5); color: white; - font-weight: bold; -} - -/*# sourceMappingURL=daggerheart.css.map */ - -/* WOJO Test */ -.duality-dice-msg-container { - display: flex; - width: 100%; -} - -.duality-dice-msg-die-spacer { - display: flex; - flex-wrap: wrap; - justify-content: center; - font-weight: bolder; - font-size: x-large; - text-align: top; - flex-grow: 1; -} - -.duality-dice-msg-die-fear{ - display: flex; - flex-direction: column; - justify-content: center; - width: 25px; - height: 25px; - margin: 1%; - background-image: url("/systems/daggerheart/assets/svgs/d12-solid-fear.svg"); -} - -.duality-dice-msg-die-hope { - display: flex; - flex-direction: column; - justify-content: center; - width: 25px; - height: 25px; - margin: 1%; - background-image: url("/systems/daggerheart/assets/svgs/d12-solid-hope.svg"); -} - -.duality-dice-msg-die-selected-hope-disadv{ - display: flex; - flex-direction: column; - justify-content: center; - width: 25px; - height: 25px; - margin: 1%; - background-image: url("/systems/daggerheart/assets/svgs/d12-solid-hope.svg"); - border: 1px solid rgb(94, 54, 54); - background-color: #9e5353; - border-radius: 25%; - padding: 1%; - width: 25px; - height: 25px; + padding: 4px; } - -.duality-dice-msg-die-selected-hope-adv{ - display: flex; - flex-direction: column; - justify-content: center; - width: 25px; - height: 25px; - margin: 1%; - background-image: url("/systems/daggerheart/assets/svgs/d12-solid-hope.svg"); - border: 1px solid rgb(50, 86, 53); - background-color: #4f9150; - border-radius: 25%; - padding: 1%; - width: 25px; - height: 25px; -} - -.duality-dice-msg-die-crit-success { - display: flex; - flex-direction: column; - justify-content: center; - width: 25px; - height: 25px; - margin: 1%; - background-image: url("/systems/daggerheart/assets/svgs/d12-solid-crit-success.svg"); -} - -.duality-dice-msg-die-crit-fail { - display: flex; - flex-direction: column; - justify-content: center; - width: 25px; - height: 25px; - margin: 1%; - background-image: url("/systems/daggerheart/assets/svgs/d12-solid-crit-fail.svg"); -} - -.duality-dice-msg-resut-text-fear { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: yellow; - text-align: center; - font-weight: bolder; - font-size: medium; - text-shadow: 1cm; - color:rgb(39, 39, 39); -} - -.duality-dice-msg-resut-text-hope { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: black; - text-align: center; - font-weight: bolder; - font-size: medium; - text-shadow: 1cm; - color: rgb(106, 106, 106); -} - -.duality-dice-msg-resut-text-crit-success { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: black; - text-align: center; - font-weight: bolder; - font-size: medium; - text-shadow: 1cm; - color: rgb(18, 111, 0); -} - -.duality-dice-msg-resut-text-crit-fail { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: rgb(112, 0, 0); - text-align: center; - font-weight: bolder; - font-size: medium; - text-shadow: 1cm; - color: red; +.daggerheart *[data-action] { + cursor: pointer; } - +/*# sourceMappingURL=daggerheart.css.map */ diff --git a/css/daggerheart.css.map b/css/daggerheart.css.map index 9270b72..6cdc12e 100644 --- a/css/daggerheart.css.map +++ b/css/daggerheart.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../src/scss/daggerheart.scss","../src/scss/utils/_colors.scss","../src/scss/global/_window.scss","../src/scss/utils/_typography.scss","../src/scss/global/_grid.scss","../src/scss/global/_flex.scss","../src/scss/components/_forms.scss","../src/scss/components/_resource.scss","../src/scss/components/_items.scss","../src/scss/utils/_variables.scss","../src/scss/components/_effects.scss","../src/scss/components/_class.scss","../src/scss/components/_exp.scss","../src/scss/components/_leveling.scss","../src/scss/components/_weapons.scss","../src/scss/components/_enemy.scss","../src/scss/components/_gm.scss"],"names":[],"mappings":"AACQ;AACA;ACqCR;EAHE;EAKA;;;AAGF;EARE;EAUA;;;AAGF;EAbE;EAeA;;;AAGF;EAlBE;EAoBA;;;AAGF;EAvBE;EAyBA;;;AAGF;EA5BE;EA8BA;;;AAGF;EAjCE;EAmCA;;;AAGF;EAtCE;EAwCA;;;AAGF;EA3CE;EA6CA;;;ADvEF;AEVA;EACE,aCDa;;;ADKb;EAEE;EACA;EACA;;;AERJ;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAIF;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAiB;;;AACjB;EAAiB;;;AACjB;EAAiB;;;AAEjB;EAAe;;;AACf;EAAe;;;AACf;EAAe;;;AACf;EAAe;;;AACf;EAAe;;;AACf;EAAe;;;AACf;EAAe;;;AACf;EAAe;;;AACf;EAAgB;;;AAChB;EAAgB;;;AAChB;EAAgB;;;ACnFhB;AAAA;AAAA;EAGE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAIF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AL7BF;EACE;EAMA;;AAJA;EACE;;AAKF;EACE;EACA,kBCbG;EDcH;EACA;;AAGF;EACE;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;EACA;EACA;;;AAGF;EACE;;;AAIA;EACE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE,kBC5FO;;AD+FT;EACE,OCzGC;;AD4GH;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;AAAA;EAEE;EACA;EACA;EACA;;AAGF;EAEE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAMJ;EACE,kBCjME;EDkMF,OC/LE;EDgMF;EACA;EACA;EACA;;AAGF;EACE,kBCtMG;EDuMH;EACA;EACA;EACA;;;AAMN;EACE;EACA;EACA;EACA;;;AAGF;AACA;AA+EE;;AMnTF;EACE,aHDa;;AGIf;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AAKN;EACE;;AAGF;AAAA;AAAA;EAGE;;AAIA;EACE,YLhDM;;AKmDR;EACE;;ACpDJ;EACE;;ACAF;EACE;EACA;EACA;EACA;EACA;EACA,QCHc;EDId;;AAEA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AASJ;EACE;EACA;EACA;EACA;EACA;EACA,OP5BM;;AO+BN;EACE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;EACA;EACA;;AAKJ;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;;AAEA;EACE;;AAGF;EACE,OPlFG;;AOoFH;EACE;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA,QC3GY;ED4GZ;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAON;EAEE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AACA;EACE;EACA,YPlIY;;AOsIhB;EACE;EACA;;AAGF;EACE;EACA;;AACA;EACE;;AEnKF;AAAA;AAAA;EAGE;EACA;EACA;EACA;;AAGF;EACE;;ACTA;EACE;EACA;EACA;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;;AAGJ;EACI;;AAEJ;EACE,OV7BI;EU8BJ,kBVhCG;EUiCH;EACA;;AACA;EACE;;AAIJ;EACE;EACA,OV1CG;;AU6CL;EACE;;AAEE;EACE;;AAUJ;AAAA;AAAA;AAAA;EACE;EACA;EACA;EACA;;AAEF;AAAA;AAAA;AAAA;EACE;EACA;EACA;EACA;EACA;;AAKN;AAAA;EAEE;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AAIJ;EACE;EACA;;AAEF;EACE;;AACA;EACE;EACA;;AAGJ;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;;AAIF;EACE;;AAKF;EACE;EACA;EACA;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA,kBVvIG;EUwIH,OVtII;EUuIJ;EACA;;AAEF;EACE;EACA,kBV5II;;AU6IJ;EACE;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;;AAON;EACE;EACA;EACA;EACA;;AACA;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA,YV9KY;EU+KZ;;AAIJ;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;ACtNJ;EACE;EACA;EACA;EACA;;AAIF;EACE;EACE;;ACVJ;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;ACtBF;EACE;;AAGF;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIA;EACE;;AAKJ;EACE;;AAGF;EACE;EACE;;AAGJ;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EAME;EACA,Yb7Cc;;AauCd;EACE;EACA;;AAOJ;EACE;EACA;EACA;EACA;;AAGF;EACE;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA,YbpEY;EaqEZ;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA,ObvFM;;AayFN;EACE;EACA,kBb3FI;;Aa+FR;EACE;EACA,ObvGK;;AayGL;EACE;EACA,kBb3GG;;Aa+GP;EACE;EACA;;AAGF;EACE;EACA;EACA,Yb3Gc;;Aa8GhB;EACE,YbpGU;EaqGV;EACA;EACA;EACA;EACA;;AACA;EACE;;AAIJ;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;;AAIJ;EAOE;EACA;EACA;EACA;EACA;;AAVA;EACE;EACA;EACA;;ACtKJ;AAAA;AAAA;EAGE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;AAAA;AAAA;EAGE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAIA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AACA;EACE;;AAON;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;;AAIF;EACE;EACA;;AAIA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE,YdvGU;EcwGV;;AC5HJ;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AhB0NF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAIA;EACE;EAWA;EACA;;AAVA;EACE;EACA;EACA;EACA;EACA;EACA;;AAMF;EACE;EACA;EACA;EACA,kBC7PK;ED8PL;;AAEA;EACE;EACA,YCtPC;EDuPD,kBCvPC;;AD2PL;EACE;EACA;EACA;EACA,OC9PC;;ADmQP;EACE;EACA;EACA;;AAEA;EACE;EAEA;;AAGF;EACE;EACA;;AAKJ;EACE;EACA;EACA;;AAGF;EACE;;AAGF;AAAA;AAAA;EAGE;EACA,kBCzSO;;AD2SP;AAAA;AAAA;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YC5TY;ED6TZ,kBChUS;EDiUT;EACA,OCzUI;;AD2UJ;EACE,YCzTK;;AD6TT;EACE,OC7UI;;ADgVN;EACE,OCvVG;;AD0VL;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE,kBCvWC;EDwWD,OCtWE;;AD0WN;EACE;;AAIA;EACE;EACA;;AAGF;EACE;;AAIJ;AAAA;EAEE,YCjXY;EDkXZ;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE,OC5YG;ED6YH;EACA;EACA;EACA;EACA;;AAEA;EACE,kBCpZC;EDqZD;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA,YC/ZY;EDgaZ;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YC9aY;;ADibd;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE,kBCpdI;EDqdJ;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAOA;AAAA;EACE;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EACE,kBCvfC;EDwfD,OCtfE;EDufF;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA,OC/fE;EDggBF;EACA;EACA;EACA;;AAGF;AAAA;EACE,kBCxgBG;EDygBH,OCxgBE;EDygBF;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA,OC9gBC;ED+gBD;EACA;;AAGF;AAAA;EACE;EACA;;AAGF;AAAA;EACE,OC9hBC;EDgiBD;;AAGF;AAAA;EACE;EACA;EACA,OChiBE;EDiiBF;EACA;EACA;;AAEA;AAAA;EACE,OC1iBA;ED2iBA,kBCviBA;;AD0iBF;AAAA;EAME;EACA,OCvjBD;;ADijBC;AAAA;EACE,OChjBF;EDijBE,kBCnjBH;;AD4jBL;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA,OC1kBI;ED2kBJ;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EAKE;EACA;EACA;;AANA;EACE;;AASN;EACE;EACA;EACA;;AAIA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE,OC7oBC;;ADgpBH;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE,kBC9pBC;ED+pBD;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EACA;;AAEA;EACE,kBCjrBC;EDkrBD;EACA;EACA;;AAKF;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EAEA;EACA,YCjtBY;EDktBZ;EACA;EACA;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA,YC/tBc;EDguBd;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;AAAA;EAEE;EACA;;AAGF;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA","file":"daggerheart.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../src/scss/daggerheart.scss","../src/scss/utils/_typography.scss","../src/scss/utils/_colors.scss","../src/scss/utils/_flex.scss","../src/scss/utils/_helpers.scss","../src/scss/components/_items.scss","../src/scss/components/_forms.scss","../src/scss/components/_buttons.scss","../src/scss/components/_rolls.scss","../src/scss/components/_dialog.scss","../src/scss/components/_dice.scss","../src/scss/components/_hand.scss","../src/scss/utils/_reset.scss","../src/scss/utils/_editor.scss","../src/scss/components/_layout.scss","../src/scss/components/actor/_sidebar.scss","../src/scss/utils/_variables.scss","../src/scss/components/actor/_header.scss","../src/scss/components/actor/_navigation.scss","../src/scss/components/actor/_content.scss","../src/scss/components/actor/_cards.scss","../src/scss/components/actor/_leveling.scss","../src/scss/components/actor/_inventory.scss"],"names":[],"mappings":"AAAQ;AACA;ACER;EACE;;;AAGF;EACE;EACA;;AACA;EACE;;;ACSJ;EACE,kBARW;EASX;;;AAEF;EACE,kBAXe;EAYf;;;AAGF;EACE,kBAfS;EAgBT;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AC5EF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAIA;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;ACjDF;EACE;;;AAIA;EACE;;AAGF;EACE;;AAGF;EACE;;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;;AAIJ;AACA;EACE;EACA;EACA;;;AAGF;EACE;;;AAIF;EACE;EACA,kBFjFK;EEkFL;EACA;;AAEA;EACE,kBFpFS;EEqFT,OFvFG;;AE0FL;EACE,kBFxFa;EEyFb,OF5FG;;AE+FL;EACE,kBF3FO;EE4FP,OFjGG;;AEoGL;EACE,kBFjGO;EEkGP,OFtGG;;;AE0GP;EACE,kBFrHU;EEsHV;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAIA;EACE,kBF7IM;EE8IN;;AAEF;EACE,YFhIK;EEiIL;;AAEF;EACE,YFpJQ;EEqJR;;AAEF;EACE;EACA;;;AAIJ;EACE;EACA;;;AC/JA;EACE,kBHeK;;;AGZT;EACE;;AAEE;EACE;;;AAKJ;EACE;EACA;;AACA;EACE;EACA;EACA,aJnBY;;AIuBd;EACE;EACA;EACA;;AAGF;EACE,YH/BI;EGgCJ;;;AChCN;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA,aLZa;;;AKef;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIJ;EACE;;AAGF;EACE,kBJ9GU;;AIiHZ;EACE;;;ACtHJ;EACE;EACA;EACA;EACA;EACA,OLMK;;AKLL;EACE,kBLIG;EKHH,OLJU;;AKOZ;EACE;EACA,OLTU;;AKYZ;EACE;;AAGF;EACE;;;ACrBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;AAAA;EAEE;EACA;;AAGF;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA,YNzDc;EM0Dd;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA,aP7Fa;EO8Fb,kBN9FQ;EM+FR;EACA,ON3FM;;;AM8FR;EACE;EACA,aPpGgB;EOqGhB,kBNrFO;EMsFP;;AACA;EACE;;;ACzGJ;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;ACrBN;EACI;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AC5HJ;EACE;;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE,kBTvBC;;AS0BH;EACE,OT7BG;;ASgCL;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;AAAA;EAEE;EACA;EACA;EACA;;AAGF;EAEE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAMJ;EACE,kBT7HI;ES8HJ,OTzHE;ES0HF;EACA;EACA;EACA;;AAGF;EACE,kBTvHK;ESwHL;EACA;EACA;EACA;;;AX1HN;EAeE,aC/Ba;;AWAf;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE,cVLI;;AWNR;EACE;;AACA;EACE;EACA,YXaK;EWZL;;AAGF;EACE;;AAGF;EACE;EACA,YXTI;;AWYN;EACE;;AAGF;EACE;;AAME;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EASE;;AAGF;EACE;EACA;EACA;EACA;;AC5CR;EACE;EACA;EACA,eACE;;AAIF;EACE;EACA,kBZVM;EYWN,OZPU;EYSV;EACA;;AAGF;EACE,kBZjBQ;EYkBR,OZfU;;AaJd;EACE;EACA;EACA;EACA,SCJgB;;ADMhB;EACE;;AAEA;EACE;;AAIJ;EACE;;AAIA;EACE;EACA;;AErBN;EACE;EACA;EACA;EACA,SDJgB;;ACKhB;EACE;;AAEF;EACE;EACA;;AACA;EACE;;AAEF;EACE;;ACdJ;EACE,SFDE;;AEIJ;EACE;EACA;EACA;EACA,OhBHI;EgBIJ;EACA;EACA;EACA;;AACA;EACE;EACA,kBhBVE;EgBWF,OhBbQ;;AgBeV;EACE,kBhBpBI;EgBqBJ;EACA,OhBnBG;;AiBHT;EACE;;AAGF;EACE;EACA,SHLI;;AGSJ;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE,OjBlBI;EiBmBJ;;AAGF;EACE;;ACvBN;EACE;;AAEA;EACE,kBlBaK;EkBZL;EACA,OlBDI;EkBGJ;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAIF;EACE;EACA;;AAIJ;EACE;EACA,anB1Bc;;AmB6BhB;EACE;EACA;EACA;EACA;EACA,OlBxBG;;AkByBH;EACE;EACA,kBlB3BC;;AkB8BH;EACE;;AAOJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA,kBlB9CC;;AkBiDH;EACE;;AAIJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE,kBlBhFG;EkBiFH;EACA,OlBxFI;EkByFJ;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA,anB1Gc;;AmB6GhB;EACE,kBlB9FK;EkB+FL;;AAMA;EACE;EACA;;AAKF;EACE;EACA;;AC9HJ;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA,apBTc;EoBUd;EACA;;AAGF;EACE;EACA,apBhBc;;AoBmBhB;EACE;EACA;EACA;EACA;EACA,apBxBc;EoByBd;;AC1BJ;EACE;EACA;EACA,kBpBcO;EoBbP;;AAEA;EACE;EACA;EACA;;AAIA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AACA;EACE;;AAOJ;EAEE;EACA;EACA;;AACA;EACE,kBpBhCD;EoBiCC,OpBvCA;;AoB2CF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEA;EACE,kBpB7DF;;AoBgEF;EACE,kBpBjEA;EoBkEA;;AAEA;EACE;EACA;;AAMR;EACE;EACA,arB7EY;EqB8EZ;EACA;EACA;EACA;;AtBjDJ;EACE","file":"daggerheart.css"} \ No newline at end of file diff --git a/module/daggerheart.mjs b/module/daggerheart.mjs index 2ec4652..7c4e51c 100644 --- a/module/daggerheart.mjs +++ b/module/daggerheart.mjs @@ -2,14 +2,17 @@ import { DaggerHeartActor } from "./documents/actor.mjs"; import { DaggerHeartItem } from "./documents/item.mjs"; // Import sheet classes. -import { DaggerHeartActorSheet } from "./sheets/actor-sheet.mjs"; -import { DaggerHeartItemSheet } from "./sheets/item-sheet.mjs"; +import { DaggerHeartCharacterSheet } from "./sheets/actor/character-sheet.mjs"; +import { DaggerHeartItemSheet } from "./sheets/items/item-sheet.mjs"; import { DaggerHeartHandSheet } from "./sheets/hand-sheet.mjs"; // Import helper/utility classes and constants. import { preloadHandlebarsTemplates } from "./helpers/templates.mjs"; import { DAGGERHEART } from "./helpers/config.mjs"; // Import DataModel classes import * as models from "./data/_module.mjs"; +import { DaggerHeartAdversarySheet } from "./sheets/actor/adversary-sheet.mjs"; +import { DaggerHeartGMSheet } from "./sheets/actor/gm-sheet.mjs"; +import { DaggerHeartClassSheet } from './sheets/items/class-sheet.mjs' /* -------------------------------------------- */ /* Init Hook */ @@ -66,8 +69,19 @@ Hooks.once("init", function () { // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); - Actors.registerSheet("daggerheart", DaggerHeartActorSheet, { + Actors.registerSheet("daggerheart", DaggerHeartCharacterSheet, { makeDefault: true, + types: ["character"], + label: "DAGGERHEART.SheetLabels.Actor", + }); + + Actors.registerSheet("daggerheart", DaggerHeartAdversarySheet, { + types: ["adversary"], + label: "DAGGERHEART.SheetLabels.Actor", + }); + + Actors.registerSheet("daggerheart", DaggerHeartGMSheet, { + types: ["gm"], label: "DAGGERHEART.SheetLabels.Actor", }); Items.unregisterSheet("core", ItemSheet); @@ -76,6 +90,11 @@ Hooks.once("init", function () { label: "DAGGERHEART.SheetLabels.Item", }); + Items.registerSheet("daggerheart", DaggerHeartClassSheet, { + types: ["class"], + label: "DAGGERHEART.SheetLabels.Item", + }); + // Preload Handlebars templates. return preloadHandlebarsTemplates(); }); @@ -89,10 +108,43 @@ Handlebars.registerHelper("toLowerCase", function (str) { return str.toLowerCase(); }); +Handlebars.registerHelper("checkbox", function (name, checked) { + return ` + + `; +}); + +Handlebars.registerHelper("action", function (context) { + const { action, ...options } = context.hash; + + const dataString = []; + + if (!action) { + return ""; + } + + dataString.push(`data-action="${action}"`); + + Object.keys(options).forEach((key) => { + if (options[key]) { + dataString.push(`data-${key}="${options[key]}"`); + } + }); + + return dataString.join(" "); +}); + Handlebars.registerHelper("ternary", function (cond, v1, v2) { return cond ? v1 : v2; }); +Handlebars.registerHelper("icon", function (icon) { + return ``; +}); + Handlebars.registerHelper("concat", function () { var outStr = ""; for (var arg in arguments) { @@ -102,6 +154,17 @@ Handlebars.registerHelper("concat", function () { } return outStr; }); + +Handlebars.registerHelper("get", function (item, name) { + if (!item) { + return ""; + } + if (item[name]) { + return item[name]; + } + + return ""; +}); /* -------------------------------------------- */ /* Ready Hook */ /* -------------------------------------------- */ diff --git a/module/data/card.mjs b/module/data/card.mjs index 1d81149..49fdf37 100644 --- a/module/data/card.mjs +++ b/module/data/card.mjs @@ -1,3 +1,5 @@ +import DaggerHeartFeature from "./feature.mjs"; + export default class DaggerHeartCard extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields; @@ -11,6 +13,17 @@ export default class DaggerHeartCard extends foundry.abstract.TypeDataModel { initial: "", }); + schema.cardFeatures = new fields.ArrayField( + new fields.SchemaField({ + id: new fields.StringField({ + required: true, + immutable: true, + }), + name: new fields.StringField(), + description: new fields.StringField(), + }) + ); + return schema; } } diff --git a/module/data/character.mjs b/module/data/character.mjs index 3f089bc..f391f38 100644 --- a/module/data/character.mjs +++ b/module/data/character.mjs @@ -1,89 +1,56 @@ -import DaggerHeartActorBase from "./actor-base.mjs"; +import DaggerHeartActorBase from './actor-base.mjs' +import DaggerHeartClass from './class.mjs' export default class DaggerHeartCharacter extends DaggerHeartActorBase { - static defineSchema() { - const fields = foundry.data.fields; - const requiredInteger = { required: true, nullable: false, integer: true }; - const schema = super.defineSchema(); + static defineSchema () { + const fields = foundry.data.fields + const requiredInteger = { required: true, nullable: false, integer: true } + const schema = super.defineSchema() schema.attributes = new fields.SchemaField({ level: new fields.SchemaField({ value: new fields.NumberField({ ...requiredInteger, initial: 1 }), }), - }); + }) schema.looks = new fields.SchemaField({ - clothes: new fields.StringField({ initial: "" }), - eyes: new fields.StringField({ initial: "" }), - body: new fields.StringField({ initial: "" }), - skin: new fields.StringField({ initial: "" }), - attitude: new fields.StringField({ initial: "" }), - }); - + clothes: new fields.StringField({ initial: '' }), + eyes: new fields.StringField({ initial: '' }), + body: new fields.StringField({ initial: '' }), + skin: new fields.StringField({ initial: '' }), + attitude: new fields.StringField({ initial: '' }), + }) + + schema.class = new fields.EmbeddedDataField(DaggerHeartClass) schema.wallet = new fields.SchemaField({ coins: new fields.NumberField({ initial: 0, integer: true }), handful: new fields.NumberField({ initial: 0, integer: true }), bags: new fields.NumberField({ initial: 0, integer: true }), chest: new fields.NumberField({ initial: 0, integer: true }), - }); + }) schema.hitpoints = new fields.SchemaField({ minor: new fields.NumberField({ initial: 0, integer: true }), major: new fields.NumberField({ initial: 0, integer: true }), severe: new fields.NumberField({ initial: 0, integer: true }), - }); + }) schema.armor_slots = new fields.SchemaField({ - current: new fields.NumberField({ initial: 0, integer: true }), - max: new fields.NumberField({ initial: 0, integer: true }), - }); - - schema.primary = new fields.BooleanField({ initial: false }); - schema.secondary = new fields.BooleanField({ initial: false }); - - schema.ancestry = new fields.SchemaField({ - name: new fields.StringField({ - required: true, - initial: "", - }), - img: new fields.StringField({ - required: true, - initial: "", - }), - feature: new fields.StringField({ - required: true, - initial: "", - }), - description: new fields.StringField({ - required: true, - initial: "", - }), - }); - - schema.community = new fields.SchemaField({ - name: new fields.StringField({ - required: true, - initial: "", - }), - img: new fields.StringField({ - required: true, - initial: "", - }), - feature: new fields.StringField({ - required: true, - initial: "", - }), - description: new fields.StringField({ - required: true, - initial: "", - }), - }); - - schema.evasion = new fields.NumberField({ initial: 0, integer: true }); - schema.armor = new fields.NumberField({ initial: 0, integer: true }); - schema.hope = new fields.NumberField({ initial: 0, integer: true }); - schema.proficiency = new fields.NumberField({ initial: 1, integer: true }); - schema.pronouns = new fields.StringField({ blank: true }); + value: new fields.NumberField({ initial: 0, integer: true }), + max: new fields.NumberField({ initial: 6, integer: true }), + }) + + schema.primary = new fields.BooleanField({ initial: false }) + schema.secondary = new fields.BooleanField({ initial: false }) + + schema.evasion = new fields.NumberField({ initial: 0, integer: true }) + schema.armor = new fields.NumberField({ initial: 0, integer: true }) + schema.hope = new fields.SchemaField({ + value: new fields.NumberField({ initial: 0, integer: true }), + max: new fields.NumberField({ initial: 6, integer: true }), + }) + schema.proficiency = new fields.NumberField({ initial: 1, integer: true }) + schema.pronouns = new fields.StringField({ blank: true }) schema.experiences = new fields.ArrayField( new fields.SchemaField({ @@ -93,15 +60,12 @@ export default class DaggerHeartCharacter extends DaggerHeartActorBase { }), name: new fields.StringField({ required: true, - initial: "", + initial: '', }), mod: new fields.NumberField({ initial: 0, integer: true }), editMode: new fields.BooleanField({ initial: false }), - }) - ); - - schema.class = new fields.ObjectField(); - + }), + ) // Iterate over ability names and create a new SchemaField for each. schema.abilities = new fields.SchemaField( Object.keys(CONFIG.DAGGERHEART.abilities).reduce((obj, ability) => { @@ -113,40 +77,65 @@ export default class DaggerHeartCharacter extends DaggerHeartActorBase { }), label: new fields.StringField({ required: true, blank: true }), checked: new fields.BooleanField({}), - }); - return obj; - }, {}) - ); + }) + return obj + }, {}), + ) - return schema; + return schema } - prepareDerivedData() { + prepareDerivedData () { // Loop through ability scores, and add their modifiers to our sheet output. for (const key in this.abilities) { // Calculate the modifier using d20 rules. this.abilities[key].mod = Math.floor( - (this.abilities[key].value - 10) / 2 - ); + (this.abilities[key].value - 10) / 2, + ) // Handle ability label localization. this.abilities[key].label = - game.i18n.localize(CONFIG.DAGGERHEART.abilities[key]) ?? key; + game.i18n.localize(CONFIG.DAGGERHEART.abilities[key]) ?? key } } - getRollData() { - const data = {}; + getRollData () { + const data = {} // Copy the ability scores to the top level, so that rolls can use // formulas like `@str.mod + 4`. if (this.abilities) { for (let [k, v] of Object.entries(this.abilities)) { - data[k] = foundry.utils.deepClone(v); + data[k] = foundry.utils.deepClone(v) } } - data.lvl = this.attributes.level.value; + data.lvl = this.attributes.level.value + + return data + } + + get classItem () { + const classes = this.parent.items.filter((i) => i.type === 'class') + if (classes) return classes[0] + + return {} + } + + get ancestry () { + const ancestry = this.parent.items.filter( + (i) => i.type === 'card' && i.system.cardType === 'ancestry', + ) + if (ancestry) return ancestry[0] + + return {} + } + + get community () { + const community = this.parent.items.filter( + (i) => i.type === 'card' && i.system.cardType === 'community', + ) + if (community) return community[0] - return data; + return {} } } diff --git a/module/data/domain.mjs b/module/data/domain.mjs index a550287..6c5b604 100644 --- a/module/data/domain.mjs +++ b/module/data/domain.mjs @@ -1,25 +1,37 @@ export default class DaggerHeartDomain extends foundry.abstract.TypeDataModel { - static defineSchema() { - const fields = foundry.data.fields; - const schema = {}; + static defineSchema () { + const fields = foundry.data.fields + const schema = {} schema.domain = new fields.StringField({ blank: true, - }); + }) schema.domainType = new fields.StringField({ blank: true, - }); + }) schema.feature = new fields.StringField({ blank: true, - }); + }) - schema.recall = new fields.NumberField({ initial: 0, integer: true }); - schema.level = new fields.NumberField({ initial: 0, integer: true }); + schema.hasTracker = new fields.SchemaField({ + enabled: new fields.BooleanField({ + initial: false, + }), + property: new fields.StringField({ + initial: '', + }), + current: new fields.NumberField({ + initial: 0, + }), + }) - schema.active = new fields.BooleanField({ initial: false }); + schema.recall = new fields.NumberField({ initial: 0, integer: true }) + schema.level = new fields.NumberField({ initial: 0, integer: true }) - return schema; + schema.active = new fields.BooleanField({ initial: false }) + + return schema } } diff --git a/module/data/weapon.mjs b/module/data/weapon.mjs index b9f9b1a..bac155c 100644 --- a/module/data/weapon.mjs +++ b/module/data/weapon.mjs @@ -6,7 +6,7 @@ export default class DaggerHeartWeapon extends foundry.abstract.TypeDataModel { const schema = {}; schema.trait = new fields.StringField({ - blank: true, + initial: "agi" }); schema.range = new fields.StringField({ @@ -22,7 +22,7 @@ export default class DaggerHeartWeapon extends foundry.abstract.TypeDataModel { }); schema.damage = new fields.StringField({ - blank: true, + initial: "D6" }); schema.isEquipped = new fields.BooleanField({ @@ -34,8 +34,7 @@ export default class DaggerHeartWeapon extends foundry.abstract.TypeDataModel { }) schema.burden = new fields.StringField({ - blank: true, - initial: DAGGERHEART.burden["1H"], + initial: "1H", }); schema.feature = new fields.StringField({ diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index f1d2ab8..bfde334 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -42,4 +42,6 @@ export class DaggerHeartActor extends Actor { return { ...super.getRollData(), ...this.system.getRollData?.() ?? null }; } + + } diff --git a/module/helpers/adversary-roll.mjs b/module/helpers/adversary-roll.mjs index ede1be9..2c2b83c 100644 --- a/module/helpers/adversary-roll.mjs +++ b/module/helpers/adversary-roll.mjs @@ -2,7 +2,7 @@ const formHTML = (actor) => { return `
- +
@@ -36,10 +36,7 @@ const template = (roll, { prefix }) => { `
  • ${rollResult.value}
  • ` ); - console.log(roll) - return ` -
    @@ -131,7 +128,6 @@ const doGMRoll = async (actor, prefix = '') => { content: formHTML(actor), }); - console.log(mod, expMod) const roll = await new Roll(`${attack.formula} + @mod`, { mod: mod + expMod, diff --git a/module/helpers/config.mjs b/module/helpers/config.mjs index 327fed3..8e8dea7 100644 --- a/module/helpers/config.mjs +++ b/module/helpers/config.mjs @@ -63,7 +63,7 @@ DAGGERHEART.enemy_types = { skulk: "Skulk", social: "Social", solo: "Solo", - standart: "Standard", + standart: "Standart", support: "Support", } diff --git a/module/helpers/item-choices.mjs b/module/helpers/item-choices.mjs index 0f660c1..5f1a2b0 100644 --- a/module/helpers/item-choices.mjs +++ b/module/helpers/item-choices.mjs @@ -11,8 +11,6 @@ const html = (choices) => { `; }); - console.log(choicesTemplate); - const template = `
    ${choicesTemplate} @@ -24,7 +22,6 @@ const html = (choices) => { const callback = () => { const items = $(".choice-dialog-wrap input:checked").toArray().map(item => $(item).val()) - console.log(items); return items; }; const openChoiceMenu = async (item) => { @@ -38,8 +35,6 @@ const openChoiceMenu = async (item) => { content: html(item.system.choiceItems), }); - console.log(items); - return items; }; diff --git a/module/helpers/roll-macro.mjs b/module/helpers/roll-macro.mjs index cd3e0da..5300809 100644 --- a/module/helpers/roll-macro.mjs +++ b/module/helpers/roll-macro.mjs @@ -3,8 +3,7 @@ const hopeColor = { // Hope colors colorset: "custom", foreground: "#000000", - //background: "#FFFFFF", - Image: "systems/daggerheart/assets/d12-no-text.svg", + background: "#FFFFFF", outline: "#000000", edge: "#000000", texture: "none", @@ -25,34 +24,31 @@ const fearColor = { system: "standard", }; -const inputHTML = ``; - const formHTML = (actor, ability) => { - console.log(ability, actor.system.abilities) return `
    - - ${Object.keys(actor.system.abilities).map( - (key) => - `` - ).join('')}; + (key) => + `` + ).join('')};
    - - + +
    - ${actor.system.experiences - .map( - (item) => - `
    ` - ) - .join("")} + ${actor.system.experiences.map( + (item) => + `
    ` + ).join("")}
    `; }; @@ -96,7 +92,7 @@ function getDiceDetailsHTML(hopeResult, hopeRemovedResult, fearResult, isAdvanta }; - const hopeDisadvantageTemplate = (dieResult) => { + const hopeDisadvantageTemplate = (dieResult) => { return( `
    @@ -130,10 +126,10 @@ function getDiceDetailsHTML(hopeResult, hopeRemovedResult, fearResult, isAdvanta return htmlString; } -const template = - (roll, +const template = + (roll, { isCrit, isHope, isFear, hopeResult, fearResult, prefix, diceDetailsHTML}) => { - + const rolls = roll.terms.reduce((acc, item) => { if (!item.results) { return acc; @@ -156,7 +152,6 @@ const template = } d12">${rollResult.value}` ); - console.log(roll); // Create Die List HTML //let dieListHTML = createRollString(rolls, isAdvantage, isDisadvantage); @@ -278,8 +273,6 @@ const doDHRoll = async (actor, ability, prefix = "") => { buttons, content: formHTML(actor, ability), close: (html, e) => { - console.log(e) - return {cancelled: true} } }); @@ -292,7 +285,7 @@ const doDHRoll = async (actor, ability, prefix = "") => { mod: mod + expMod + abilityMod, }).evaluate(); - // Get the specific results + // Get the specific results const hopeResult = roll.dice[0].results.find( (result) => result.active == true ).result; @@ -304,7 +297,7 @@ const doDHRoll = async (actor, ability, prefix = "") => { (result) => result.active == false ).result; } - + const fearResult = roll.dice[1].results.find( (result) => result.active == true @@ -317,9 +310,8 @@ const doDHRoll = async (actor, ability, prefix = "") => { const isFear = fearResult > hopeResult; // Dice colors - //roll.dice[0].options.appearance = hopeColor; - //roll.dice[1].options.appearance = fearColor; - console.log(isCrit, isHope, isFear, hopeResult, fearResult); + roll.dice[0].options.appearance = hopeColor; + roll.dice[1].options.appearance = fearColor; // roll.toMessage({ // speaker: ChatMessage.implementation.getSpeaker({actor: actor}), // flavor: isCrit ? "Crit" : isHope ? "Hope Wins" : isFear ? "Fear Wins" : "" diff --git a/module/helpers/templates.mjs b/module/helpers/templates.mjs index 212148c..c0ab273 100644 --- a/module/helpers/templates.mjs +++ b/module/helpers/templates.mjs @@ -4,22 +4,34 @@ * @return {Promise} */ export const preloadHandlebarsTemplates = async function () { - return loadTemplates([ - // Actor partials. - 'systems/daggerheart/templates/actor/parts/actor-features.hbs', - 'systems/daggerheart/templates/actor/parts/actor-items.hbs', - 'systems/daggerheart/templates/actor/parts/actor-spells.hbs', - 'systems/daggerheart/templates/actor/parts/actor-effects.hbs', - 'systems/daggerheart/templates/actor/parts/actor-loadout.hbs', - 'systems/daggerheart/templates/actor/parts/actor-exps.hbs', - 'systems/daggerheart/templates/actor/parts/actor-card.hbs', - 'systems/daggerheart/templates/actor/parts/actor-description.hbs', - 'systems/daggerheart/templates/actor/parts/actor-leveling.hbs', - 'systems/daggerheart/templates/actor/parts/actor-weapons.hbs', - 'systems/daggerheart/templates/actor/parts/actor-equipped.hbs', - 'systems/daggerheart/templates/actor/parts/hand-card.hbs', - // Item partials - 'systems/daggerheart/templates/item/parts/item-effects.hbs', - 'systems/daggerheart/templates/item/parts/item-tier.hbs', + loadTemplates(["systems/daggerheart/templates/actor/parts/hand-card.hbs"]); + + loadTemplates([ + "systems/daggerheart/templates/item/parts/item-effects.hbs", + "systems/daggerheart/templates/item/parts/item-tier.hbs", + "systems/daggerheart/templates/item/layout/class/stats.hbs", + "systems/daggerheart/templates/item/layout/class/info.hbs", + "systems/daggerheart/templates/item/layout/class/leveling.hbs", + "systems/daggerheart/templates/item/layout/class/items.hbs", + ]); + + + loadTemplates([ + 'systems/daggerheart/templates/actor/layout/sidebar.hbs', + 'systems/daggerheart/templates/actor/layout/header.hbs', + 'systems/daggerheart/templates/actor/layout/navigation.hbs', + 'systems/daggerheart/templates/actor/layout/content.hbs', + ]); + + + loadTemplates([ + 'systems/daggerheart/templates/actor/parts/character-loadout.hbs', + 'systems/daggerheart/templates/actor/parts/character-inventory.hbs', + 'systems/daggerheart/templates/actor/parts/character-description.hbs', + 'systems/daggerheart/templates/actor/parts/character-leveling.hbs', + 'systems/daggerheart/templates/actor/parts/character-card.hbs', + 'systems/daggerheart/templates/actor/parts/character-domain-card.hbs', + 'systems/daggerheart/templates/actor/parts/character-equipable.hbs', + 'systems/daggerheart/templates/actor/parts/character-item.hbs', ]); }; diff --git a/module/sheets/actor-sheet.mjs b/module/sheets/actor-sheet.mjs deleted file mode 100644 index 8fd684a..0000000 --- a/module/sheets/actor-sheet.mjs +++ /dev/null @@ -1,656 +0,0 @@ -import doGMRoll from "../helpers/adversary-roll.mjs"; -import { DAGGERHEART } from "../helpers/config.mjs"; -import { - onManageActiveEffect, - prepareActiveEffectCategories, -} from "../helpers/effects.mjs"; -import openChoiceMenu from "../helpers/item-choices.mjs"; -import doDHRoll from "../helpers/roll-macro.mjs"; -import { DaggerHeartHandSheet } from "./hand-sheet.mjs"; - -/** - * Extend the basic ActorSheet with some very simple modifications - * @extends {ActorSheet} - */ -export class DaggerHeartActorSheet extends ActorSheet { - /** @override */ - static get defaultOptions() { - return foundry.utils.mergeObject(super.defaultOptions, { - classes: ["daggerheart", "sheet", "actor"], - width: 600, - height: 600, - tabs: [ - { - navSelector: ".sheet-tabs", - contentSelector: ".sheet-body", - initial: "features", - }, - ], - }); - } - - /** @override */ - get template() { - return `systems/daggerheart/templates/actor/actor-${this.actor.type}-sheet.hbs`; - } - - async _onDropItemCreate(itemData) { - if (this.actor.type === "character") { - if (itemData.type === "class") { - this.actor.update({ - "system.class": itemData.system, - "system.hitpoints": itemData.system.defaultThreshold, - "system.evasion": itemData.system.defaultEvasion, - "system.wallet": itemData.system.wallet, - }); - - if (itemData.system.choiceItems) { - const items = await openChoiceMenu(itemData); - - console.log(items); - - items.forEach(async (item) => { - await Item.create( - { type: "item", name: item }, - { parent: this.actor } - ); - }); - } - - if (itemData.system.classFeatures) { - itemData.system.classFeatures.forEach(async (classFeature) => { - await Item.create( - { type: "card", name: classFeature.name, system: {cardType: "class", feature: classFeature.description} }, - { parent: this.actor } - ); - }) - } - - await Item.create( - { type: "item", name: "A torch" }, - { parent: this.actor } - ); - await Item.create( - { type: "item", name: "50ft of rope" }, - { parent: this.actor } - ); - await Item.create( - { type: "item", name: "Basic supplies" }, - { parent: this.actor } - ); - } - - if (itemData.type === "card") { - if ( - itemData.system.cardType === - DAGGERHEART.cardTypes.community.toLowerCase() - ) { - this.actor.update({ - "system.community.name": itemData.name, - "system.community.img": itemData.img, - "system.community.feature": itemData.system.feature, - "system.community.description": itemData.system.description, - }); - return; - } - - if ( - itemData.system.cardType === - DAGGERHEART.cardTypes.ancestry.toLowerCase() - ) { - this.actor.update({ - "system.ancestry.name": itemData.name, - "system.ancestry.img": itemData.img, - "system.ancestry.feature": itemData.system.feature, - "system.ancestry.description": itemData.system.description, - }); - return; - } - } - } - - return super._onDropItemCreate(itemData); - } - - /* -------------------------------------------- */ - - /** @override */ - getData() { - console.log(this) - // Retrieve the data structure from the base sheet. You can inspect or log - // the context variable to see the structure, but some key properties for - // sheets are the actor object, the data object, whether or not it's - // editable, the items array, and the effects array. - const context = super.getData(); - - // Use a safe clone of the actor data for further operations. - const actorData = context.data; - - // Add the actor's data to context.data for easier access, as well as flags. - context.system = actorData.system; - context.flags = actorData.flags; - - // Prepare character data and items. - if (actorData.type == "character") { - this._prepareItems(context); - this._prepareCharacterData(context); - } - - // Prepare NPC data and items. - if (actorData.type == "npc") { - this._prepareItems(context); - } - - if (actorData.type == "adversary") { - this._prepareAdversatyData(context); - } - - context.hasCharacter = game.user.character; - - // Add roll data for TinyMCE editors. - context.rollData = context.actor.getRollData(); - - // Prepare active effects - context.effects = prepareActiveEffectCategories( - // A generator that returns all effects stored on the actor - // as well as any items - this.actor.allApplicableEffects() - ); - - return context; - } - - _prepareAdversatyData(context) { - context.enemy_types = Object.keys(DAGGERHEART.enemy_types).map((key) => ({ - value: key, - label: DAGGERHEART.enemy_types[key], - })); - - context.attack_types = Object.keys(DAGGERHEART.attack_types).map((key) => ({ - value: key, - label: DAGGERHEART.attack_types[key], - })); - context.ranges = Object.keys(DAGGERHEART.range).map((key) => ({ - value: key, - label: DAGGERHEART.range[key], - })); - } - - /** - * Organize and classify Items for Character sheets. - * - * @param {Object} actorData The actor to prepare. - * - * @return {undefined} - */ - _prepareCharacterData(context) { - // Handle ability scores. - // for (let [k, v] of Object.entries(context.system.abilities)) { - // v.label = game.i18n.localize(CONFIG.DAGGERHEART.abilities[k]) ?? k; - // } - if (this.actor.system.class) { - context.tier1 = { - items: this.actor.system.class.tier1, - description: this.actor.system.class.tier1Description, - }; - context.tier2 = { - items: this.actor.system.class.tier2, - description: this.actor.system.class.tier2Description, - }; - context.tier3 = { - items: this.actor.system.class.tier3, - description: this.actor.system.class.tier3Description, - }; - } - } - - /** - * Organize and classify Items for Character sheets. - * - * @param {Object} actorData The actor to prepare. - * - * @return {undefined} - */ - _prepareItems(context) { - // Initialize containers. - const gear = []; - const features = []; - const active_loadout = []; - let armor = null; - const armors = []; - let primaryWeapon = null; - let secondaryWeapon = null; - const weapons = []; - const subclasses = []; - const vault = []; - - if (this.actor.type === "adversary") { - enemy_types = DAGGERHEART.enemy_types; - } - - // Iterate through items, allocating to containers - for (let i of context.items) { - i.img = i.img || Item.DEFAULT_ICON; - // Append to gear. - if (i.type === "item") { - gear.push(i); - } - // Append to features. - else if (i.type === "feature") { - features.push(i); - } - - if (i.type === "armor") { - if (i.system.isEquipped) { - armor = i; - } else { - armors.push(i); - } - } - - if (i.type === "weapon") { - if (i.system.isEquipped) { - if (i.system.isEquipped) { - const abilityScore = - this.actor.system.abilities[i.system.trait].value; - if (i.system.isSecondary) { - secondaryWeapon = i; - secondaryWeapon.abilityScore = abilityScore; - secondaryWeapon.abilityScorePrefix = - abilityScore >= 0 ? "+" : "-"; - } else { - primaryWeapon = i; - primaryWeapon.abilityScore = - this.actor.system.abilities[i.system.trait].value; - primaryWeapon.abilityScorePrefix = abilityScore >= 0 ? "+" : "-"; - } - } - } else { - const abilityScore = - this.actor.system.abilities[i.system.trait].value; - const abilityScorePrefix = abilityScore >= 0 ? "+" : "-"; - weapons.push({ - ...i, - abilityScore, - abilityScorePrefix, - attributeFullName: game.i18n.localize( - DAGGERHEART.abilities[i.system.trait] - ), - }); - } - } - - if (i.type === "card") { - if (["subclass", "class"].includes(i.system.cardType)) { - subclasses.push(i); - } - } - - if (i.type === "domain") { - i.system.active ? active_loadout.push(i) : vault.push(i); - } - } - - console.log(this.actor.img) - // Assign and return - context.gear = gear; - context.features = features; - context.active_loadout = active_loadout; - context.vault = vault; - context.subclasses = subclasses.sort((a,b) => a.system.cardType > b.system.cardType ? 1 : -1); - context.weapons = weapons; - context.primary = primaryWeapon; - context.secondary = secondaryWeapon; - context.armor = armor; - context.armors = armors; - } - - /* -------------------------------------------- */ - - /** @override */ - activateListeners(html) { - super.activateListeners(html); - - html.on('click', ".enemy-attack-roll", async () => { - doGMRoll(this.actor, `Attack Roll`) - }); - - html.on('click', ".enemy-damage-roll", async () => { - const roll = await new Roll( - `${this.actor.system.weapon.damage}` - ); - - roll.toMessage({ - flavor: `
    ${this.actor.system.weapon.name}
    ${this.actor.system.weapon.range} - ${this.actor.system.weapon.type} dmg
    `, - - speaker: ChatMessage.implementation.getSpeaker({ actor: this.actor }), - }); - }); - // Render the item sheet for viewing/editing prior to the editable check. - html.on("click", ".item-edit", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.items.get(li.data("itemId")); - item.sheet.render(true); - }); - - html.on("click", ".incremental .fas", (ev) => { - const item = $(ev.currentTarget).data("type") - const increment = $(ev.currentTarget).data("increment") - const mod = increment ? +1 : -1; - this.actor.update({[`system.${item}`]: this.actor.system[item]+mod}) - }); - - html.on("click", ".accordion", (ev) => { - const id = $(ev.currentTarget).data("to-open"); - - const content = $(`div[data-accordion=${id}]`); - content.toggle(); - $(ev.currentTarget).toggleClass("active"); - }); - - html.on("click", ".open-loadout", (ev) => { - if (game.user.character) { - new DaggerHeartHandSheet(game.user.character).render(true); - } - }); - - html.on("click", ".card-activate", (ev) => { - const id = $(ev.currentTarget).data("itemId"); - const item = this.actor.items.get(id); - item.update({ "system.active": !item.system.active }); - }); - - html.on("click", ".weapon-unequip, .armor-unequip", (ev) => { - const id = $(ev.currentTarget).data("id"); - const item = this.actor.items.get(id); - - item.update({ "system.isEquipped": false }); - }); - - html.on("click", ".armor-equip", (ev) => { - const id = $(ev.currentTarget).data("id"); - const item = this.actor.items.get(id); - - this.actor.items.forEach((armor) => { - if (armor.type === "armor") { - if (armor.system.isEquipped) { - armor.update({ "system.isEquipped": false }); - } - } - }); - - item.update({ "system.isEquipped": true }); - return; - }); - - html.on("click", ".weapon-equip", (ev) => { - const id = $(ev.currentTarget).data("id"); - const item = this.actor.items.get(id); - - if (item.system.isSecondary) { - this.actor.items.forEach((weapon) => { - if (weapon.system.isEquipped && weapon.system.isSecondary) { - weapon.update({ "system.isEquipped": false }); - } - }); - - item.update({ "system.isEquipped": true }); - return; - } - - if (item.system.burden.toUpperCase() === "1H") { - this.actor.items.forEach((weapon) => { - if (weapon.system.burden === "2H") { - weapon.update({ "system.isEquipped": false }); - } - if (weapon.system.isEquipped && weapon.system.burden === "1H") { - weapon.update({ "system.isEquipped": false }); - } - }); - - item.update({ "system.isEquipped": true }); - return; - } - - if (item.system.burden.toUpperCase() === "2H") { - this.actor.items.forEach((weapon) => { - if (weapon.system.isEquipped) { - weapon.update({ "system.isEquipped": false }); - } - }); - - item.update({ "system.isEquipped": true }); - return; - } - }); - - html.on("click", ".weapon-delete, .inventory-item-delete", (ev) => { - const id = $(ev.currentTarget).data("id"); - const item = this.actor.items.get(id); - item.delete(); - }); - - html.on("click", ".weapon-edit, .inventory-item-edit", (ev) => { - const id = $(ev.currentTarget).data("id"); - const item = this.actor.items.get(id); - item.sheet.render(true); - }); - - html.on("click", ".card-delete", (ev) => { - const id = $(ev.currentTarget).data("itemId"); - const item = this.actor.items.get(id); - item.delete(); - }); - - html.on("click", ".card-edit", (ev) => { - const id = $(ev.currentTarget).data("itemId"); - const item = this.actor.items.get(id); - item.sheet.render(true); - }); - - html.on("click", ".delete-trait", (ev) => { - const type = $(ev.currentTarget).data("type"); - - this.actor.update({ - [`system.${type}.name`]: "", - [`system.${type}.feature`]: "", - }); - }); - - // ------------------------------------------------------------- - // Everything below here is only needed if the sheet is editable - if (!this.isEditable) return; - - html.on("click", ".class-delete", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.items.get(li.data("itemId")); - item.delete(); - }); - - html.on("click", ".time-to-roll", (ev) => { - const type = $(ev.currentTarget).data("type"); - - const label = $(ev.currentTarget).data("label"); - return doDHRoll(this.actor, type, `${label} roll`); - }); - - html.on("click", ".weapon-main-ability", (ev) => { - const type = $(ev.currentTarget).data("type"); - return doDHRoll(this.actor, type, "Attack roll"); - }); - - html.on("click", ".weapon-main-damage", async (ev) => { - const id = $(ev.currentTarget).data("id"); - const item = this.actor.items.get(id); - const roll = await new Roll( - `${this.actor.system.proficiency}${item.system.damage}` - ); - - roll.toMessage({ - flavor: `
    ${item.name}
    ${item.system.range} - ${item.system.type} dmg
    `, - - speaker: ChatMessage.implementation.getSpeaker({ actor: this.actor }), - }); - }); - - // Add Inventory Item - html.on("click", ".item-create", this._onItemCreate.bind(this)); - - html.on("click", ".item-save", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.items.get(li.data("itemId")); - item.update({ name: li.find("input")[0].value }); - - // item.delete(); - }); - // Delete Inventory Item - html.on("click", ".item-delete", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.items.get(li.data("itemId")); - item.delete(); - li.slideUp(200, () => this.render(false)); - }); - - // Active Effect management - html.on("click", ".effect-control", (ev) => { - const row = ev.currentTarget.closest("li"); - const document = - row.dataset.parentId === this.actor.id - ? this.actor - : this.actor.items.get(row.dataset.parentId); - onManageActiveEffect(ev, document); - }); - - html.on("click", ".add-experience", async (ev) => { - const exps = this.actor.system.experiences; - const newExp = { - id: await crypto.randomUUID(), - name: "New Experience", - mod: 0, - }; - - exps.push(newExp); - this.actor.update({ "system.experiences": exps }); - }); - html.on("click", ".exp-edit", async (ev) => { - ev.preventDefault(); - ev.stopPropagation(); - const exps = [...this.actor.system.experiences]; - const key = parseInt($(ev.currentTarget).data("key")); - exps[key].editMode = true; - - this.actor.update({ [`system.experiences`]: exps }); - }); - - html.on("click", ".enemy-feature-create", async (ev) => { - const features = this.actor.system.features; - const newFeature = { - id: await crypto.randomUUID(), - name: "New Feature", - mod: 0, - }; - - features.push(newFeature); - - this.actor.update({ "system.features": features }); - }); - - html.on("click", ".enemy-feature-delete", (ev) => { - const id = $(ev.currentTarget).data("id"); - const features = this.actor.system.features.filter((i) => i.id !== id); - - this.actor.update({ "system.features": features }); - }); - - html.on("click", ".exp-save", async (ev) => { - ev.preventDefault(); - ev.stopPropagation(); - const exps = [...this.actor.system.experiences]; - const key = parseInt($(ev.currentTarget).data("key")); - exps[key].editMode = false; - - this.actor.update({ [`system.experiences`]: exps }); - }); - html.on("click", ".exp-delete", (ev) => { - ev.preventDefault(); - ev.stopPropagation(); - const id = $(ev.currentTarget).data("id"); - - const exps = this.actor.system.experiences.filter((i) => i.id !== id); - - this.actor.update({ "system.experiences": exps }); - }); - - // Rollable abilities. - html.on("click", ".rollable", this._onRoll.bind(this)); - - // Drag events for macros. - if (this.actor.isOwner) { - let handler = (ev) => this._onDragStart(ev); - html.find("li.item").each((i, li) => { - if (li.classList.contains("inventory-header")) return; - li.setAttribute("draggable", true); - li.addEventListener("dragstart", handler, false); - }); - } - } - - /** - * Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset - * @param {Event} event The originating click event - * @private - */ - async _onItemCreate(event) { - event.preventDefault(); - const header = event.currentTarget; - // Get the type of item to create. - const type = header.dataset.type; - // Grab any data associated with this control. - const data = duplicate(header.dataset); - // Initialize a default name. - const name = `New ${type.capitalize()}`; - // Prepare the item object. - const itemData = { - name: name, - type: type, - system: data, - }; - // Remove the type from the dataset since it's in the itemData.type prop. - delete itemData.system["type"]; - - // Finally, create the item! - return await Item.create(itemData, { parent: this.actor }); - } - - /** - * Handle clickable rolls. - * @param {Event} event The originating click event - * @private - */ - _onRoll(event) { - event.preventDefault(); - const element = event.currentTarget; - const dataset = element.dataset; - - // Handle item rolls. - if (dataset.rollType) { - if (dataset.rollType == "item") { - const itemId = element.closest(".item").dataset.itemId; - const item = this.actor.items.get(itemId); - if (item) return item.roll(); - } - } - - // Handle rolls that supply the formula directly. - if (dataset.roll) { - let label = dataset.label ? `[ability] ${dataset.label}` : ""; - let roll = new Roll(dataset.roll, this.actor.getRollData()); - roll.toMessage({ - speaker: ChatMessage.getSpeaker({ actor: this.actor }), - flavor: label, - rollMode: game.settings.get("core", "rollMode"), - }); - return roll; - } - } -} diff --git a/module/sheets/actor/adversary-sheet.mjs b/module/sheets/actor/adversary-sheet.mjs new file mode 100644 index 0000000..8bdd3f1 --- /dev/null +++ b/module/sheets/actor/adversary-sheet.mjs @@ -0,0 +1,155 @@ +import doGMRoll from '../../helpers/adversary-roll.mjs' +import { DAGGERHEART } from '../../helpers/config.mjs' +import { + onManageActiveEffect, + prepareActiveEffectCategories, +} from '../../helpers/effects.mjs' +import openChoiceMenu from '../../helpers/item-choices.mjs' +import doDHRoll from '../../helpers/roll-macro.mjs' +import { DaggerHeartHandSheet } from '../hand-sheet.mjs' + +// tabs.bind(window); +/** + * Extend the basic ActorSheet with some very simple modifications + * @extends {ActorSheet} + */ +export class DaggerHeartAdversarySheet extends ActorSheet { + /** @override */ + static get defaultOptions () { + return foundry.utils.mergeObject(super.defaultOptions, { + classes: ['daggerheart', 'sheet', 'adversary'], + width: 700, + height: 700 + }) + } + + /** @override */ + get template () { + return `systems/daggerheart/templates/actor/adversary-sheet.hbs` + } + + /* -------------------------------------------- */ + + /** @override */ + getData () { + console.log(this.actor) + // Retrieve the data structure from the base sheet. You can inspect or log + // the context variable to see the structure, but some key properties for + // sheets are the actor object, the data object, whether or not it's + // editable, the items array, and the effects array. + const context = super.getData() + + // Use a safe clone of the actor data for further operations. + const actorData = context.data + + // Add the actor's data to context.data for easier access, as well as flags. + context.system = actorData.system + context.flags = actorData.flags + + context.enemy_types = Object.keys(DAGGERHEART.enemy_types).map((key) => ({ + value: key, + label: DAGGERHEART.enemy_types[key], + })) + + context.attack_types = Object.keys(DAGGERHEART.attack_types).map((key) => ({ + value: key, + label: DAGGERHEART.attack_types[key], + })) + context.ranges = Object.keys(DAGGERHEART.range).map((key) => ({ + value: key, + label: DAGGERHEART.range[key], + })) + + context.hasCharacter = game.user.character + + // Add roll data for TinyMCE editors. + context.rollData = context.actor.getRollData() + + // Prepare active effects + context.effects = prepareActiveEffectCategories( + // A generator that returns all effects stored on the actor + // as well as any items + this.actor.allApplicableEffects(), + ) + + return context + } + + /** @override */ + activateListeners (html) { + super.activateListeners(html) + + if (!this.isEditable) return + + html.on('click', '[data-action=\'experience-add\']', async (ev) => { + const exps = this.actor.system.experiences + const newExp = { + id: await crypto.randomUUID(), + name: 'New Experience', + mod: 0, + } + + exps.push(newExp) + this.actor.update({ 'system.experiences': exps }) + }) + + html.on('click', '[data-action=\'experience-delete\']', (ev) => { + ev.preventDefault() + ev.stopPropagation() + const id = $(ev.currentTarget).data('id') + + const exps = this.actor.system.experiences.filter((i) => i.id !== id) + + this.actor.update({ 'system.experiences': exps }) + }) + + html.on('click', '[data-action="attack-roll"]', async () => { + doGMRoll(this.actor, `Attack Roll`) + }) + + html.on('click', '[data-action="damage-roll"]', async () => { + const roll = await new Roll(`${this.actor.system.weapon.damage}`) + + roll.toMessage({ + flavor: `
    ${this.actor.system.weapon.name}
    ${this.actor.system.weapon.range} - ${this.actor.system.weapon.type} dmg
    `, + + speaker: ChatMessage.implementation.getSpeaker({ actor: this.actor }), + }) + }) + + html.on('click', '[data-action="feature-add"]', async (ev) => { + const features = this.actor.system.features + const newFeature = { + id: await crypto.randomUUID(), + name: 'New Feature', + mod: 0, + } + + features.push(newFeature) + + this.actor.update({ 'system.features': features }) + }) + + html.on('click', '[data-action="feature-delete"]', (ev) => { + const id = $(ev.currentTarget).data('id') + const features = this.actor.system.features.filter((i) => i.id !== id) + + this.actor.update({ 'system.features': features }) + }) + + html.on('click', '[data-action="feature-show"]', async (ev) => { + const id = $(ev.currentTarget).data('id') + const feature = this.actor.system.features.find((i) => i.id !== id) + + return await ChatMessage.create({ + content: ` +
    ${feature.name}
    +
    + ${feature.description} +
    + `, + speaker: ChatMessage.implementation.getSpeaker({ actor: this.actor }) + }); + }) + } +} diff --git a/module/sheets/actor/character-sheet.mjs b/module/sheets/actor/character-sheet.mjs new file mode 100644 index 0000000..3cfe55d --- /dev/null +++ b/module/sheets/actor/character-sheet.mjs @@ -0,0 +1,550 @@ +import { DAGGERHEART } from '../../helpers/config.mjs' +import { + prepareActiveEffectCategories, +} from '../../helpers/effects.mjs' +import openChoiceMenu from '../../helpers/item-choices.mjs' +import doDHRoll from '../../helpers/roll-macro.mjs' +import { DaggerHeartHandSheet } from '../hand-sheet.mjs' + +/** + * Extend the basic ActorSheet with some very simple modifications + * @extends {ActorSheet} + */ +export class DaggerHeartCharacterSheet extends ActorSheet { + /** @override */ + static get defaultOptions () { + return foundry.utils.mergeObject(super.defaultOptions, { + classes: ['daggerheart', 'sheet', 'actor'], + width: 700, + height: 700, + tabs: [ + { + navSelector: '.navigation-tab', + contentSelector: '.content-body', + initial: 'loadout', + }, + { + navSelector: '.inventory-nav', + contentSelector: '.inventory-content', + initial: 'normal_cards', + }, + ], + }) + } + + /** @override */ + get template () { + return `systems/daggerheart/templates/actor/character-sheet.hbs` + } + + async _onDropItemCreate (itemData) { + if (this.actor.type === 'character') { + if (itemData.type === 'class') { + this._handleClassUpdate(itemData) + } + + if ( + (itemData.type === 'card') & + (itemData.system.cardType === 'ancestry') + ) { + this.actor.items.forEach(async (item) => { + if ( + (item.type === 'card') & + (item.system.cardType === 'ancestry') & + (item._id !== itemData._id) + ) { + await item.delete() + } + }) + } + + if ( + (itemData.type === 'card') & + (itemData.system.cardType === 'community') + ) { + this.actor.items.forEach(async (item) => { + if ( + (item.type === 'card') & + (item.system.cardType === 'community') & + (item._id !== itemData._id) + ) { + await item.delete() + } + }) + } + } + + return super._onDropItemCreate(itemData) + } + + /* -------------------------------------------- */ + + /** @override */ + getData () { + console.log(this.actor) + // Retrieve the data structure from the base sheet. You can inspect or log + // the context variable to see the structure, but some key properties for + // sheets are the actor object, the data object, whether or not it's + // editable, the items array, and the effects array. + const context = super.getData() + + // Use a safe clone of the actor data for further operations. + const actorData = context.data + + // Add the actor's data to context.data for easier access, as well as flags. + context.system = actorData.system + context.flags = actorData.flags + + // Prepare character data and items. + if (actorData.type == 'character') { + this._prepareItems(context) + this._prepareCharacterData(context) + } + + context.hasCharacter = game.user.character + + // Add roll data for TinyMCE editors. + context.rollData = context.actor.getRollData() + + // Prepare active effects + context.effects = prepareActiveEffectCategories( + // A generator that returns all effects stored on the actor + // as well as any items + this.actor.allApplicableEffects(), + ) + + return context + } + + /** + * Organize and classify Items for Character sheets. + * + * @param {Object} actorData The actor to prepare. + * + * @return {undefined} + */ + _prepareCharacterData (context) { + // Handle ability scores. + // for (let [k, v] of Object.entries(context.system.abilities)) { + // v.label = game.i18n.localize(CONFIG.DAGGERHEART.abilities[k]) ?? k; + // } + if (this.actor.system.class) { + context.leveling = [ + { + position: 1, + level: 'Level 2-4', + bonus: 'At Level 2, take an additional Experience.', + items: this.actor.system?.class?.tier1 ?? [], + description: this.actor.system.class?.tier1Description ?? '', + }, + { + position: 2, + level: 'Level 5-7', + bonus: + 'At Level 5, take an additional Experience and clear all marks on Character Traits.', + items: this.actor.system.class?.tier2 ?? [], + description: this.actor.system.class?.tier2Description ?? '', + }, + { + position: 3, + level: 'Level 8-10', + bonus: + 'At Level 8, take an additional Experience and clear all marks on Character Traits.', + items: this.actor.system.class?.tier3 ?? [], + description: this.actor.system.class?.tier3Description ?? '', + }, + ] + } + } + + /** + * Organize and classify Items for Character sheets. + * + * @param {Object} actorData The actor to prepare. + * + * @return {undefined} + */ + _prepareItems (context) { + // Initialize containers. + const cards = {} + const active_loadout = [] + const weapons = [] + const vault = [] + const armors = [] + const randomItems = [] + + const equipment = { + armor: null, + primary: null, + secondary: null, + } + + // Iterate through items, allocating to containers + for (let i of context.items) { + i.img = i.img || Item.DEFAULT_ICON + + if (i.type === 'armor') { + if (i.system.isEquipped) { + equipment.armor = i + } else { + armors.push(i) + } + continue + } + + if (i.type === 'weapon') { + const abilityScore = this.actor.system.abilities[i.system.trait].value + const abilityScorePrefix = abilityScore >= 0 ? '+' : '-' + const abilityFullName = game.i18n.localize( + DAGGERHEART.abilities[i.system.trait], + ) + + const extendedWeapon = { + ...i, + abilityScore, + abilityFullName, + abilityScorePrefix, + } + + if (i.system.isEquipped) { + if (i.system.isSecondary) { + equipment.secondary = extendedWeapon + continue + } else { + equipment.primary = extendedWeapon + continue + } + } else { + weapons.push(extendedWeapon) + continue + } + } + + if (i.type === 'card') { + cards[i.system.cardType] = cards[i.system.cardType] + ? [...cards[i.system.cardType], i] + : [i] + continue + } + if (i.type === 'class') { + continue + } + if (i.type === 'domain') { + i.system.active ? active_loadout.push(i) : vault.push(i) + continue + } + + randomItems.push(i) + } + + // Assign and return + context.cards = [ + ...(cards.ancestry ? cards.ancestry : []), + ...(cards.community ? cards.community : []), + ...(cards.class ? cards.class : []), + ...(cards.subclass ? cards.subclass : []), + ] + context.active_loadout = active_loadout + context.vault = vault + context.weapons = weapons + context.equipment = equipment + context.armors = armors + context.gear = [...weapons, ...armors, ...randomItems] + } + + /* -------------------------------------------- */ + + /** @override */ + activateListeners (html) { + super.activateListeners(html) + + // ------------------------------------------------------------- + // Everything below here is only needed if the sheet is editable + if (!this.isEditable) return + + html.on('click', '.open-loadout', (ev) => { + if (game.user.character) { + new DaggerHeartHandSheet(game.user.character).render(true) + } + }) + + html.on('click', '.accordion', (ev) => { + const id = $(ev.currentTarget).data('accordion') + + const content = $(`.accordion-content[data-accordion="${id}"]`) + content.toggle() + $(ev.currentTarget).toggleClass('active') + }) + + html.on('click', `[data-action="add-character-item"]`, async (ev) => { + const { type } = await Dialog.wait({ + buttons: { + OK: { + label: 'Ok', + callback: (html, event) => { + const type = html.find('#create-item-type option:selected').val() + console.log(html.find('#create-item-type option:selected')) + + return { type } + }, + }, + }, + content: ` + + `, + }) + + await await Item.create( + { type, name: `New ${type}` }, + { parent: this.actor }, + ) + }) + + html.on('click', '[data-action=\'ability-roll\']', (ev) => { + const type = $(ev.currentTarget).data('type') + const label = $(ev.currentTarget).data('label') + return doDHRoll(this.actor, type, `${label} roll`) + }) + + // Character Card Management + html.on('click', `[data-action="toggle-card"]`, async (ev) => { + const id = $(ev.currentTarget).data('id') + const item = this.actor.items.get(id) + item.update({ 'system.active': !item.system.active }) + }) + + html.on('click', `[data-action="weapon-roll"]`, async (ev) => { + const id = $(ev.currentTarget).data('id') + const item = this.actor.items.get(id) + console.log('henlo') + if (!item) { + return + } + + return doDHRoll(this.actor, item.system.trait, 'Attack roll') + }) + + html.on('click', `[data-action="weapon-damage"]`, async (ev) => { + const id = $(ev.currentTarget).data('id') + const item = this.actor.items.get(id) + + if (!item) { + return + } + + const roll = await new Roll( + `${this.actor.system.proficiency}${item.system.damage}`, + ) + + return roll.toMessage() + }) + + // Character Armor equip / unequip + html.on('click', `[data-action="armor-toggle"]`, async (ev) => { + const id = $(ev.currentTarget).data('id') + const item = this.actor.items.get(id) + + if (item.system.isEquipped) { + item.update({ 'system.isEquipped': false }) + return + } + + this.actor.items.forEach((armor) => { + if (armor.type === 'armor') { + if (armor.system.isEquipped) { + armor.update({ 'system.isEquipped': false }) + } + } + }) + + item.update({ 'system.isEquipped': true }) + return + }) + + // Weapon equip / unequip + html.on('click', `[data-action="weapon-toggle"]`, async (ev) => { + console.log(this.actor.items) + const id = $(ev.currentTarget).data('id') + const itemToEquip = this.actor.items.get(id) + + console.log(itemToEquip) + + if (itemToEquip.system.isEquipped) { + itemToEquip.update({ 'system.isEquipped': false }) + return + } + + let has1H = false + let has2H = false + let hasSecondary = false + + this.actor.items.forEach((item) => { + const isEquipped = item.system.isEquipped + const is1H = item.system.burden === '1H' + const is2H = item.system.burden === '2H' + const isSecondary = item.system.isSecondary + + if (isEquipped && is1H) has1H = true + if (isEquipped && is2H) has2H = true + if (isEquipped && isSecondary) hasSecondary = true + + if (itemToEquip.system.burden === '2H') { + if (has1H || hasSecondary) { + item.update({ 'system.isEquipped': false }) + } + } else if (itemToEquip.system.burden === '1H' && has2H) { + item.update({ 'system.isEquipped': false }) + } else if ( + itemToEquip.system.isSecondary && + has1H && + !hasSecondary && + isSecondary + ) { + item.update({ 'system.isEquipped': true }) + console.log(`Equipped ${item.type}: ${item.name}`) + } + }) + + itemToEquip.update({ 'system.isEquipped': true }) + }) + + html.on('click', '[data-action="item-delete"]', async (ev) => { + const id = $(ev.currentTarget).data('id') + const item = this.actor.items.get(id) + item.delete() + }) + + html.on('click', '[data-action="item-edit"]', async (ev) => { + const id = $(ev.currentTarget).data('id') + const item = this.actor.items.get(id) + item.sheet.render(true) + }) + + html.on('click', `[data-action="item-show"]`, async (ev) => { + ev.preventDefault() + ev.stopPropagation() + const id = $(ev.currentTarget).data('id') + const item = this.actor.items.get(id) + return await ChatMessage.create({ + content: ` +
    ${item.name}
    +
    + ${item.system.feature ? item.system.feature : ''} +
    + `, + speaker: ChatMessage.implementation.getSpeaker({ actor: this.actor }), + }) + }) + + html.on('click', `[data-action="feature-show"]`, async (ev) => { + ev.preventDefault() + ev.stopPropagation() + const id = $(ev.currentTarget).data('card') + const featureId = $(ev.currentTarget).data('feature') + const item = await this.actor.items.get(id) + + if (!item) { + return + } + + const feature = item.system.cardFeatures.find(i => i.id === featureId) + return await ChatMessage.create({ + content: ` +
    ${feature.name}
    +
    + ${feature.description} +
    + `, + speaker: ChatMessage.implementation.getSpeaker({ actor: this.actor }), + }) + }) + + html.on('click', '[data-action=\'experience-add\']', async (ev) => { + const exps = this.actor.system.experiences + const newExp = { + id: await crypto.randomUUID(), + name: 'New Experience', + mod: 0, + } + + exps.push(newExp) + this.actor.update({ 'system.experiences': exps }) + }) + + html.on('click', '[data-action=\'experience-delete\']', (ev) => { + ev.preventDefault() + ev.stopPropagation() + const id = $(ev.currentTarget).data('id') + + const exps = this.actor.system.experiences.filter((i) => i.id !== id) + + this.actor.update({ 'system.experiences': exps }) + }) + + // Drag events for macros. + if (this.actor.isOwner) { + let handler = (ev) => this._onDragStart(ev) + html.find('li.item').each((i, li) => { + if (li.classList.contains('inventory-header')) return + li.setAttribute('draggable', true) + li.addEventListener('dragstart', handler, false) + }) + } + } + + async _handleClassUpdate (itemData) { + await this.actor.update({ + 'system.hitpoints': itemData.system.defaultThreshold, + 'system.evasion': itemData.system.defaultEvasion, + 'system.wallet': itemData.system.wallet, + 'system.class': itemData.system, + }) + + if (itemData.system.choiceItems) { + const items = await openChoiceMenu(itemData) + items.forEach(async (item) => { + const result = await Item.create({ type: 'item', name: item }, + { parent: this.actor }) + }) + } + + this.actor.items.forEach((item) => { + if ( + (item.type === 'card') & (item.system.cardType === 'class') || + (item.type === 'class') & (item._id !== this.actor.system.classItem._id) + ) { + item.delete() + } + }) + + if (itemData.system.classFeatures) { + itemData.system.classFeatures.forEach(async (classFeature) => { + await Item.create( + { + type: 'card', + name: classFeature.name, + system: { cardType: 'class', feature: classFeature.description }, + }, + { parent: this.actor }, + ) + }) + } + + await Item.create( + { type: 'item', name: 'A torch' }, + { parent: this.actor }, + ) + await Item.create( + { type: 'item', name: '50ft of rope' }, + { parent: this.actor }, + ) + await Item.create( + { type: 'item', name: 'Basic supplies' }, + { parent: this.actor }, + ) + } +} diff --git a/module/sheets/actor/gm-sheet.mjs b/module/sheets/actor/gm-sheet.mjs new file mode 100644 index 0000000..cfdcf26 --- /dev/null +++ b/module/sheets/actor/gm-sheet.mjs @@ -0,0 +1,54 @@ +/** + * Extend the basic ActorSheet with some very simple modifications + * @extends {ActorSheet} + */ +export class DaggerHeartGMSheet extends ActorSheet { + /** @override */ + static get defaultOptions () { + return foundry.utils.mergeObject(super.defaultOptions, { + classes: ['daggerheart', 'sheet', 'GM'], + width: 300, + height: 155, + }) + } + + /** @override */ + get template () { + return `systems/daggerheart/templates/actor/gm-sheet.hbs` + } + + /** @override */ + getData () { + // Retrieve the data structure from the base sheet. You can inspect or log + // the context variable to see the structure, but some key properties for + // sheets are the actor object, the data object, whether or not it's + // editable, the items array, and the effects array. + const context = super.getData() + + // Use a safe clone of the actor data for further operations. + const actorData = context.data + + // Add the actor's data to context.data for easier access, as well as flags. + context.system = actorData.system + context.flags = actorData.flags + + context.hasCharacter = game.user.character + + // Add roll data for TinyMCE editors. + context.rollData = context.actor.getRollData() + + return context + } + + /** @override */ + activateListeners (html) { + super.activateListeners(html) + + html.on('click', '[data-action="incremental"]', (ev) => { + const item = $(ev.currentTarget).data('type') + const increment = $(ev.currentTarget).data('up'); + const mod = increment ? +1 : -1 + this.actor.update({ [`system.${item}`]: this.actor.system[item] + mod }) + }) + } +} diff --git a/module/sheets/hand-sheet.mjs b/module/sheets/hand-sheet.mjs index ce98bc3..645165d 100644 --- a/module/sheets/hand-sheet.mjs +++ b/module/sheets/hand-sheet.mjs @@ -1,96 +1,120 @@ -import doDHRoll from "../helpers/roll-macro.mjs"; +import doDHRoll from '../helpers/roll-macro.mjs' + /** * Extend the basic ActorSheet with some very simple modifications * @extends {ActorSheet} */ export class DaggerHeartHandSheet extends ActorSheet { - constructor(actor) { - super(actor); + constructor (actor) { + super(actor) } /** @override */ - static get defaultOptions() { + static get defaultOptions () { return foundry.utils.mergeObject(super.defaultOptions, { - classes: ["daggerheart", "sheet", "actor"], - width: "100%", + classes: ['daggerheart', 'sheet', 'actor'], + width: '100%', height: 175, popOut: false, resizable: true, - title: "Player Hand", + title: 'Player Hand', template: `systems/daggerheart/templates/actor/hand.hbs`, minimizable: true, top: window.innerHeight, left: 0, - }); + }) } /** @override */ - _onSubmit(e) { - super._onSubmit(e); + _onSubmit (e) { + super._onSubmit(e) } /** @override */ - prepareData() { + prepareData () { // Prepare data for the actor. Calling the super version of this executes // the following, in order: data reset (to clear active effects), // prepareBaseData(), prepareEmbeddedDocuments() (including active effects), // prepareDerivedData(). - super.prepareData(); + super.prepareData() } /** @overrider */ - _canUserView(user) { - return true; + _canUserView (user) { + return true } + /** @override */ - getData() { - const context = super.getData(); + getData () { + const context = super.getData() - const subclasses = []; + const subclasses = [] if (this.actor.system?.ancestry?.name) { - subclasses.push({...this.actor.system.ancestry, system: {cardType: "ancestry", feature: this.actor.system.ancestry.feature}}) + // subclasses.push({ + // ...this.actor.system.ancestry, + // system: { + // cardType: 'ancestry', + // feature: this.actor.system.ancestry.feature, + // }, + // }) + if (this.actor.system.ancestry.system.cardFeatures.length) { + this.actor.system.ancestry.system.cardFeatures.forEach(feature => { + subclasses.push({ + _id: feature.id, + name: feature.name, + img: this.actor.system.ancestry.img, + system: { cardType: 'ancestry', feature: feature.description }, + }) + }) + } } - if (this.actor.system?.community?.name) { - subclasses.push({...this.actor.system.community, system: {cardType: "community", feature: this.actor.system.community.feature}}) + if (this.actor.system.community.system.cardFeatures.length) { + this.actor.system.community.system.cardFeatures.forEach(feature => { + subclasses.push({ + _id: feature.id, + name: feature.name, + img: this.actor.system.community.img, + system: { cardType: 'ancestry', feature: feature.description }, + }) + }) + } } - const subclassCards = this.actor.items.filter( - (i) => i.type === "card" && i.system?.cardType === "subclass" - ); + (i) => i.type === 'card' && i.system?.cardType === 'subclass', + ) if (subclassCards.length) { - subclasses.push(...subclassCards); + subclasses.push(...subclassCards) } - context.domains = this.actor.items.filter((i) => i.type === "domain"); - context.subclasses = subclasses; + context.domains = this.actor.items.filter((i) => i.type === 'domain') + context.subclasses = subclasses - console.log(subclasses) - return context; + return context } /** @override */ - get template() { - return `systems/daggerheart/templates/actor/hand.hbs`; + get template () { + return `systems/daggerheart/templates/actor/hand.hbs` } /** @override */ - activateListeners(html) { - super.activateListeners(html); - html.on("click", ".hand-roll", () => { - return doDHRoll(this.actor, "agi", `Ability roll`); + activateListeners (html) { + super.activateListeners(html) + html.on('click', '.hand-roll', () => { + return doDHRoll(this.actor, 'agi', `Ability roll`) }) - html.on("click", ".open-actor-sheet", () => { + html.on('click', '.open-actor-sheet', () => { this.actor.sheet.render(true) }) - html.on("click", ".ui-card-tooltip", async (ev) => { + html.on('click', '.ui-card-tooltip', async (ev) => { const el = $(ev.currentTarget) const content = ` @@ -101,7 +125,7 @@ export class DaggerHeartHandSheet extends ActorSheet { return await ChatMessage.create({ content, speaker: ChatMessage.implementation.getSpeaker({ actor: this.actor }), - }); - }); + }) + }) } } diff --git a/module/sheets/item-sheet.mjs b/module/sheets/item-sheet.mjs deleted file mode 100644 index 106ff88..0000000 --- a/module/sheets/item-sheet.mjs +++ /dev/null @@ -1,237 +0,0 @@ -import { - onManageActiveEffect, - prepareActiveEffectCategories, -} from "../helpers/effects.mjs"; - -/** - * Extend the basic ItemSheet with some very simple modifications - * @extends {ItemSheet} - */ -export class DaggerHeartItemSheet extends ItemSheet { - /** @override */ - static get defaultOptions() { - return foundry.utils.mergeObject(super.defaultOptions, { - classes: ["daggerheart", "sheet", "item"], - width: 520, - height: 480, - tabs: [ - { - navSelector: ".sheet-tabs", - contentSelector: ".sheet-body", - initial: "stats", - }, - ], - }); - } - - /** @override */ - get template() { - const path = "systems/daggerheart/templates/item"; - // Return a single sheet for all item types. - // return `${path}/item-sheet.hbs`; - - // Alternatively, you could use the following return statement to do a - // unique item sheet by type, like `weapon-sheet.hbs`. - return `${path}/item-${this.item.type}-sheet.hbs`; - } - - /* -------------------------------------------- */ - - /** @override */ - getData() { - // Retrieve base data structure. - const context = super.getData(); - context.domains = []; - context.cardTypes = []; - context.traits = []; - - // Use a safe clone of the item data for further operations. - const itemData = context.data; - - // Retrieve the roll data for TinyMCE editors. - context.rollData = this.item.getRollData(); - - // Add the item's data to context.data for easier access, as well as flags. - context.system = itemData.system; - context.flags = itemData.flags; - - console.log(itemData); - - // Prepare active effects for easier access - context.effects = prepareActiveEffectCategories(this.item.effects); - - // if(itemData.type === 'class') { - // const validatedItems = itemData.system.classFeatures.map(item => { - // if(!item.id) { - // item.id = crypto.randomUUID() - // } - - // return item; - // }) - - // this.item.update({"system.classFeatures": validatedItems}) - // } - - if (["domain", "class"].includes(itemData.type)) { - context.domains = CONFIG.DAGGERHEART.domains; - } - - if (["weapon"].includes(itemData.type)) { - // for (let [k, v] of Object.entries(context.system.abilities)) { - // v.label = game.i18n.localize(CONFIG.DAGGERHEART.abilities[k]) ?? k; - // } - context.traits = Object.keys(CONFIG.DAGGERHEART.abilities).map((key) => { - const label = game.i18n.localize(CONFIG.DAGGERHEART.abilities[key]); - const value = key; - - return { label, value }; - }); - - context.burden = Object.keys(CONFIG.DAGGERHEART.burden).map((key) => { - const label = CONFIG.DAGGERHEART.burden[key]; - const value = key; - - return { label, value }; - }); - - context.attack_types = Object.keys(CONFIG.DAGGERHEART.attack_types).map( - (key) => ({ - value: key, - label: CONFIG.DAGGERHEART.attack_types[key], - }) - ); - - context.range = Object.keys(CONFIG.DAGGERHEART.range).map((key) => { - const label = CONFIG.DAGGERHEART.range[key]; - const value = key; - - return { label, value }; - }); - - console.log(context.traits); - } - - if (itemData.type === "card") { - context.cardTypes = Object.keys(CONFIG.DAGGERHEART.cardTypes).map( - (key) => { - const label = CONFIG.DAGGERHEART.cardTypes[key]; - const value = key; - - return { label, value }; - } - ); - } - - return context; - } - - /* -------------------------------------------- */ - - /** @override */ - activateListeners(html) { - super.activateListeners(html); - - // Everything below here is only needed if the sheet is editable - if (!this.isEditable) return; - - // Roll handlers, click handlers, etc. would go here. - html.on("click", ".add-domain", async (ev) => { - const allDomains = this.item.system.selectedDomains; - const newDomain = { id: await crypto.randomUUID(), name: "" }; - allDomains.push(newDomain); - await this.item.update({ "system.selectedDomains": allDomains }); - }); - - html.on("click", ".class-feature-add", async (ev) => { - const classFeatures = this.item.system.classFeatures; - const newFeature = { - id: await crypto.randomUUID(), - name: "", - description: "", - }; - classFeatures.push(newFeature); - - await this.item.update({ "system.classFeatures": classFeatures }); - }); - - html.on("click", ".delete-domain", async (ev) => { - const id = $(ev.currentTarget).data("id"); - const allDomains = this.item.system.selectedDomains.filter( - (i) => i.id !== id - ); - - await this.item.update({ "system.selectedDomains": allDomains }); - }); - - html.on("click", ".add-tier", async (ev) => { - const type = $(ev.currentTarget).data("type"); - const allItems = this.item.system[type]; - const tierOption = { - id: await crypto.randomUUID(), - option: "", - checked: false, - }; - - allItems.push(tierOption); - await this.item.update({ [`system.${type}`]: allItems }); - }); - - html.on("click", ".remove-tier, .feature-remove", async (ev) => { - const type = $(ev.currentTarget).data("type"); - const id = $(ev.currentTarget).data("id"); - - const allItems = this.item.system[type].filter((i) => i.id !== id); - console.log(allItems, id, type); - await this.item.update({ [`system.${type}`]: allItems }); - }); - - html.on("click", ".edit-mode-toggle", async (ev) => { - this.item.update({ [`system.editMode`]: !this.item.system.editMode }); - }); - - html.on("click", ".class-choice-add", async (ev) => { - const item = { - id: await crypto.randomUUID(), - choice1: " ", - choice2: " ", - }; - const allItems = this.item.system.choiceItems; - allItems.push(item); - - this.item.update({ "system.choiceItems": allItems }); - }); - - html.on("click", ".class-choice-remove", async (ev) => { - const id = $(ev.currentTarget).data("id"); - const allItems = this.item.system.choiceItems.filter((i) => i.id !== id); - this.item.update({ "system.choiceItems": allItems }); - }); - - html.on("click", ".question-add", async (ev) => { - const type = $(ev.currentTarget).data("type"); - const allQuestions = this.item.system[type]; - const question = { - id: await crypto.randomUUID(), - question: "", - answer: "", - }; - - allQuestions.push(question); - this.item.update({ [`system.${type}`]: allQuestions }); - }); - - html.on("click", ".question-remove", async (ev) => { - const type = $(ev.currentTarget).data("type"); - const id = $(ev.currentTarget).data("id"); - - const allQuestions = this.item.system[type].filter((i) => i.id !== id); - - this.item.update({ [`system.${type}`]: allQuestions }); - }); - - // Active Effect management - html.on("click", ".effect-control", (ev) => - onManageActiveEffect(ev, this.item) - ); - } -} diff --git a/module/sheets/items/class-sheet.mjs b/module/sheets/items/class-sheet.mjs new file mode 100644 index 0000000..9aba8fd --- /dev/null +++ b/module/sheets/items/class-sheet.mjs @@ -0,0 +1,161 @@ +import DaggerHeartFeature from '../../data/feature.mjs' +import { + onManageActiveEffect, prepareActiveEffectCategories, +} from '../../helpers/effects.mjs' + +/** + * Extend the basic ItemSheet with some very simple modifications + * @extends {ItemSheet} + */ +export class DaggerHeartClassSheet extends ItemSheet { + /** @override */ + static get defaultOptions () { + return foundry.utils.mergeObject(super.defaultOptions, { + classes: ['daggerheart', 'sheet', 'item'], + width: 650, + height: 480, + tabs: [ + { + navSelector: '.sheet-tabs', + contentSelector: '.sheet-body', + initial: 'stats', + }], + }) + } + + /** @override */ + get template () { + return `systems/daggerheart/templates/item/item-class-sheet.hbs` + } + + /* -------------------------------------------- */ + + /** @override */ + getData () { + // Retrieve base data structure. + const context = super.getData() + context.domains = [] + context.cardTypes = [] + context.traits = [] + + // Use a safe clone of the item data for further operations. + const itemData = context.data + + // Retrieve the roll data for TinyMCE editors. + context.rollData = this.item.getRollData() + + // Add the item's data to context.data for easier access, as well as flags. + context.system = itemData.system + context.flags = itemData.flags + + // Prepare active effects for easier access + context.effects = prepareActiveEffectCategories(this.item.effects) + + if (['class'].includes(itemData.type)) { + context.domains = CONFIG.DAGGERHEART.domains + } + + return context + } + + /* -------------------------------------------- */ + + /** @override */ + activateListeners (html) { + super.activateListeners(html) + + if (!this.isEditable) return + + html.on('click', '[data-action="class-feature-add"]', async () => { + const newFeature = { + id: await crypto.randomUUID(), name: '', description: '', + } + + this.item.update({ + 'system.classFeatures': [ + ...this.item.system.classFeatures, newFeature], + }) + }) + + html.on('click', '[data-action="class-feature-delete"]', async (ev) => { + const id = $(ev.currentTarget).data('id') + + const allItems = this.item.system.classFeatures.filter((i) => i.id !== id) + await this.item.update({ [`system.classFeatures`]: allItems }) + }) + + html.on('click', '[data-action="class-domain-add"]', async (ev) => { + const allDomains = this.item.system.selectedDomains + const newDomain = { id: await crypto.randomUUID(), name: '' } + allDomains.push(newDomain) + await this.item.update({ 'system.selectedDomains': allDomains }) + }) + + html.on('click', '[data-action="class-domain-delete"]', async (ev) => { + const id = $(ev.currentTarget).data('id') + const allDomains = this.item.system.selectedDomains.filter( + (i) => i.id !== id) + + await this.item.update({ 'system.selectedDomains': allDomains }) + }) + + html.on('click', '[data-action="add-tier"]', async (ev) => { + const type = $(ev.currentTarget).data('type') + const allItems = this.item.system[type] + const tierOption = { + id: await crypto.randomUUID(), option: '', checked: false, + } + + allItems.push(tierOption) + await this.item.update({ [`system.${type}`]: allItems }) + }) + + html.on('click', '[data-action="remove-tier"]', async (ev) => { + const type = $(ev.currentTarget).data('type') + const id = $(ev.currentTarget).data('id') + + const allItems = this.item.system[type].filter((i) => i.id !== id) + await this.item.update({ [`system.${type}`]: allItems }) + }) + + html.on('click', '[data-action="add-class-item-choice"]', async (ev) => { + const item = { + id: await crypto.randomUUID(), choice1: ' ', choice2: ' ', + } + const allItems = this.item.system.choiceItems + allItems.push(item) + + this.item.update({ 'system.choiceItems': allItems }) + }) + + html.on('click', '[data-action="remove-class-item-choice"]', async (ev) => { + const id = $(ev.currentTarget).data('id') + const allItems = this.item.system.choiceItems.filter((i) => i.id !== id) + this.item.update({ 'system.choiceItems': allItems }) + }) + + html.on('click', '[data-action="class-info-add"]', async (ev) => { + const type = $(ev.currentTarget).data('type') + const allQuestions = this.item.system[type] + const question = { + id: await crypto.randomUUID(), question: '', answer: '', + } + + allQuestions.push(question) + this.item.update({ [`system.${type}`]: allQuestions }) + }) + + html.on('click', '[data-action="class-info-delete"]', async (ev) => { + const type = $(ev.currentTarget).data('type') + const id = $(ev.currentTarget).data('id') + + const allQuestions = this.item.system[type].filter((i) => i.id !== id) + + this.item.update({ [`system.${type}`]: allQuestions }) + }) + + // Active Effect management + html.on('click', '.effect-control', + (ev) => onManageActiveEffect(ev, this.item)) + } +} diff --git a/module/sheets/items/item-sheet.mjs b/module/sheets/items/item-sheet.mjs new file mode 100644 index 0000000..4e79333 --- /dev/null +++ b/module/sheets/items/item-sheet.mjs @@ -0,0 +1,149 @@ +import { + onManageActiveEffect, + prepareActiveEffectCategories, +} from '../../helpers/effects.mjs' + +/** + * Extend the basic ItemSheet with some very simple modifications + * @extends {ItemSheet} + */ +export class DaggerHeartItemSheet extends ItemSheet { + /** @override */ + static get defaultOptions () { + return foundry.utils.mergeObject(super.defaultOptions, { + classes: ['daggerheart', 'sheet', 'item'], + width: 520, + height: 480, + }) + } + + /** @override */ + get template () { + const path = 'systems/daggerheart/templates/item' + // Return a single sheet for all item types. + // return `${path}/item-sheet.hbs`; + + // Alternatively, you could use the following return statement to do a + // unique item sheet by type, like `weapon-sheet.hbs`. + return `${path}/item-${this.item.type}-sheet.hbs` + } + + /* -------------------------------------------- */ + + /** @override */ + getData () { + // Retrieve base data structure. + const context = super.getData() + context.domains = [] + context.cardTypes = [] + context.traits = [] + + // Use a safe clone of the item data for further operations. + const itemData = context.data + + // Retrieve the roll data for TinyMCE editors. + context.rollData = this.item.getRollData() + + // Add the item's data to context.data for easier access, as well as flags. + context.system = itemData.system + context.flags = itemData.flags + + // Prepare active effects for easier access + context.effects = prepareActiveEffectCategories(this.item.effects) + + if (['domain'].includes(itemData.type)) { + this._getDomainData(context) + } + + if (['weapon'].includes(itemData.type)) { + this._getWeaponData(context) + } + + if (itemData.type === 'card') { + this._getCardData(context); + } + + return context + } + + _getDomainData(context) { + context.domains = CONFIG.DAGGERHEART.domains + } + + _getWeaponData(context) { + context.traits = Object.keys(CONFIG.DAGGERHEART.abilities).map((key) => { + const label = game.i18n.localize(CONFIG.DAGGERHEART.abilities[key]) + const value = key + + return { label, value } + }) + + context.burden = Object.keys(CONFIG.DAGGERHEART.burden).map((key) => { + const label = CONFIG.DAGGERHEART.burden[key] + const value = key + + return { label, value } + }) + + context.attack_types = Object.keys(CONFIG.DAGGERHEART.attack_types).map( + (key) => ({ + value: key, + label: CONFIG.DAGGERHEART.attack_types[key], + }), + ) + + context.range = Object.keys(CONFIG.DAGGERHEART.range).map((key) => { + const label = CONFIG.DAGGERHEART.range[key] + const value = key + + return { label, value } + }) + } + + _getCardData(context) { + context.cardTypes = Object.keys(CONFIG.DAGGERHEART.cardTypes).map( + (key) => { + const label = CONFIG.DAGGERHEART.cardTypes[key] + const value = key + + return { label, value } + }, + ) + } + + /* -------------------------------------------- */ + + /** @override */ + activateListeners (html) { + super.activateListeners(html) + + // Everything below here is only needed if the sheet is editable + if (!this.isEditable) return + + html.on('click', '[data-action=\'feature-add\']', async () => { + const newFeature = { + id: await crypto.randomUUID(), + name: '', + description: '', + } + + this.item.update({ + 'system.cardFeatures': [ + ...this.item.system.cardFeatures, + newFeature], + }) + }) + + html.on('click', '[data-action=\'feature-delete\']', async (ev) => { + const id = $(ev.currentTarget).data('id') + + const allItems = this.item.system.cardFeatures.filter((i) => i.id !== id) + await this.item.update({ [`system.cardFeatures`]: allItems }) + }) + + // Active Effect management + html.on('click', '.effect-control', (ev) => + onManageActiveEffect(ev, this.item), + ) + } +} diff --git a/src/scss/components/_buttons.scss b/src/scss/components/_buttons.scss new file mode 100644 index 0000000..adfc2dd --- /dev/null +++ b/src/scss/components/_buttons.scss @@ -0,0 +1,24 @@ +.button { + padding: 2px; + cursor: pointer; + transition: 0.2s; + border: 1px solid $dark; + color: $dark; + &:hover { + background-color: $dark; + color: $hyper-white; + } + + &.white { + border: 1px solid $hyper-white; + color: $hyper-white; + } + + &.min-width { + min-width: 40px; + } + + &.center { + text-align: center; + } +} \ No newline at end of file diff --git a/src/scss/components/_class.scss b/src/scss/components/_class.scss deleted file mode 100644 index 019b34c..0000000 --- a/src/scss/components/_class.scss +++ /dev/null @@ -1,217 +0,0 @@ -.class-sheet { - &-header { - .class-img { - height: 100px; - object-fit: contain; - object-position: 100% 0; - } - } - - .question-text, .connection-text { - margin-bottom: 0.5em; - } - - .domains-header { - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; - } - - &-input-group { - justify-items: center; - display: grid; - align-items: center; - margin-bottom: 0.5em; - } - &-domain-list { - justify-self: start; - display: flex; - gap: 1em; - &-item { - display: flex; - align-items: center; - gap: 0.25em; - } - } - .hitpoints-stats .combat-stat-item { - width: 25%; - } - select { - color: $white; - background-color: $rose; - border: none; - box-shadow: none !important; - option { - color: black; - } - } - - .delete-domain:hover { - cursor: pointer; - color: $rose; - } - - .examples { - display: grid; - .tox-toolbar__group { - button:not(button[aria-label="Save"]) { - display: none; - } - } - } -} - -.questions, -.connections { - .question, - .connection { - input { - border: none; - border-bottom: 1px solid $slate; - margin-bottom: 0.5em; - box-shadow: none; - } - label { - font-size: 12px; - font-weight: bold; - display: flex; - align-items: center; - justify-content: space-between; - } - } -} - -.question-add, -.question-remove { - padding: 0.25em; -} - -.item-display-flex { - display: flex; - justify-content: space-between; - align-items: center; - text-align: center; - h2 { - border: none; - margin: 0; - flex-grow: 1; - } -} - -.top-header { - display: flex; - gap: 1em; -} -.class-sheet-header-fields { - flex-grow:1; - input { - font-size: 2em; - height: 100%; - } -} -.edit-mode-change { - display: flex; - gap: 0.25em; - align-items: center; - font-size: 1em; - label { - font-weight: normal; - font-size: 1em; - } - input { - height: 18px; - } -} -.class-sheet-body { - .editor { - height: 150px !important; - } -} - -.leveling { - .header { - grid-column: span 3; - display: grid; - grid: 1fr / repeat(3, 1fr); - } - &-section { - margin-top: 0.3em; - } - .add-tier { - font-size: 12px; - margin: 0.4em; - padding: 0.4em; - background-color: $rose; - color: $white; - display: inline-block; - cursor: pointer; - } - .tier { - border-right: 1px solid $slate; - background-color: $white; - &-header { - text-align: center; - } - &-level { - font-size: 14px; - } - &-input { - flex-grow: 1; - } - &-option { - display: flex; - justify-content: space-between; - padding: 0.25em; - gap: 0.5em; - align-items: center; - } - &-bonus { - font-size: 12px; - flex-grow: 1; - } - } - - -} - -.item-to-get-list-item { - background-color: white; - padding: 0.5em; - margin-bottom: 0.5em; - gap: 0.5em; - input { - flex-grow: 1; - } -} - -.starting-items { - display: grid; - grid: 1fr / repeat(3, 1fr); - margin-bottom: 0.5em; - gap: 1em; - text-transform: uppercase; - div { - padding: 0.5em; - background: $dark-gradient; - color: white; - } -} - -.starting-gold-class { - background-color: #362178; - display: flex; - padding: 0.5em; - margin-bottom: 0.5em; - label { - flex-grow: 1; - font-size: 1em; - color: white; - font-weight: bold; - } - - input { - text-align: center; - width: 40px; - } -} diff --git a/src/scss/components/_dialog.scss b/src/scss/components/_dialog.scss new file mode 100644 index 0000000..f60e941 --- /dev/null +++ b/src/scss/components/_dialog.scss @@ -0,0 +1,25 @@ +.dialog-input-group { + display: flex; + flex-direction: column; + margin-bottom: 0.5em; + + .dialog-input { + display: flex; + align-items: center; + justify-content: space-between; + + .dialog-input-name { + flex-grow: 1; + font-weight: bold; + } + + .dialog-input-mod { + background: $primary !important; + padding: 0.25em; + width: 8%; + text-align: center; + color: white; + font-weight: bold; + } + } +} \ No newline at end of file diff --git a/src/scss/components/_dualitydicemsg.scss b/src/scss/components/_dice.scss similarity index 83% rename from src/scss/components/_dualitydicemsg.scss rename to src/scss/components/_dice.scss index 2d69b7c..32abf72 100644 --- a/src/scss/components/_dualitydicemsg.scss +++ b/src/scss/components/_dice.scss @@ -9,7 +9,7 @@ justify-content: center; font-weight: bolder; font-size: x-large; - text-align: top; + text-align: center; flex-grow: 1; } @@ -86,41 +86,41 @@ } .duality-dice-msg-resut-text-fear { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: yellow; text-align: center; font-weight: bolder; font-size: medium; - text-shadow: 1cm; - color:rgb(39, 39, 39); + color: rgb(255 255 255); + height: fit-content; + width: fit-content; + background: rgb(0 0 0 / 50%); + text-shadow: 1px 1px 1px #000; + margin: 0px auto; } .duality-dice-msg-resut-text-hope { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: black; text-align: center; font-weight: bolder; font-size: medium; - text-shadow: 1cm; - color: rgb(106, 106, 106); + color: black; + height: fit-content; + width: fit-content; + background: #FFF; + margin: 0px auto; + text-shadow: 1px 1px 1px #FFF; } .duality-dice-msg-resut-text-crit-success { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: black; text-align: center; font-weight: bolder; font-size: medium; - text-shadow: 1cm; - color: rgb(18, 111, 0); + text-shadow: 1px 1px 1px #fff; + color: black; } .duality-dice-msg-resut-text-crit-fail { - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: rgb(112, 0, 0); text-align: center; font-weight: bolder; font-size: medium; - text-shadow: 1cm; - color: red; + text-shadow: 1px 1px 1px #000; + color: white; } \ No newline at end of file diff --git a/src/scss/components/_effects.scss b/src/scss/components/_effects.scss deleted file mode 100644 index 4c3b2c7..0000000 --- a/src/scss/components/_effects.scss +++ /dev/null @@ -1,14 +0,0 @@ -.effects .item { - .effect-source, - .effect-duration, - .effect-controls { - text-align: center; - border-left: 1px solid #c9c7b8; - border-right: 1px solid #c9c7b8; - font-size: 12px; - } - - .effect-controls { - border: none; - } -} diff --git a/src/scss/components/_enemy.scss b/src/scss/components/_enemy.scss deleted file mode 100644 index ad52525..0000000 --- a/src/scss/components/_enemy.scss +++ /dev/null @@ -1,129 +0,0 @@ -.enemy-hp input, -.enemy-stress input, -.enemy-hitpoints input { - width: 50px; - text-align: center; -} - -.enemy-label { - width: 70px; - text-transform: uppercase; - font-size: 16px; -} - -.enemy-hp, -.enemy-stress, -.enemy-hitpoints { - display: grid; - grid: 1fr / 20% 50px 50px 50px; - gap: 0.5em; - align-items: center; -} - -.enemy-header { - display: grid; - grid: 100px 1fr /100px 1fr; - gap: 1em; -} - -.enemy-header-description { - grid-row: span 2; -} - -.enemy-type { - select { - width: 99%; - } -} - -.enemy-name { - margin-bottom: 0.5em; -} - -.enemy-name-input { - height: 100%; - font-size: 1.5em; -} - -.adversary label { - font-size: 14px; -} - -.adversary h3 { - font-size: 18px; -} - -.enemy-wrap { - display: grid; - grid: 1fr / 2fr 3fr; - gap: 0.5em; - - .enemy-left { - font-size: 16px; - text-transform: capitalize; - label { - font-size: 16px !important; - } - } - - .enemy-right {} -} - -.enemy-tactics { - margin-bottom: 0.5em; -} - -.enemy-weapon-stats { - gap: 0.25em; -} - -.feature-item { - padding: 0.25em; - margin-bottom: 0.5em; -} - -.enemy-experience { - gap: 0.25em; - margin-bottom: 0.25em; - - .enemy-experience-name { - flex-grow: 1 - } -} - -.view-mode { - display: flex; - gap: 0.5em; - align-items: center; - -} - -.enemy-header-split { - display: grid; - grid: 1fr / 3fr 1fr; -} - -.gm-rolls { - .roll-button { - border: 2px solid black; - padding: 0.5em; - display: flex; - align-items: center; - margin-bottom: 0.5em; - background: transparent; - color: black; - cursor: pointer; - text-transform: uppercase; - font-size: 14px; - - .fa-dice-d20 { - margin-top: 1px; - margin-left: 2px; - } - - &:hover { - background: $dark-gradient; - color: white; - } - } -} \ No newline at end of file diff --git a/src/scss/components/_exp.scss b/src/scss/components/_exp.scss deleted file mode 100644 index 0ce5a93..0000000 --- a/src/scss/components/_exp.scss +++ /dev/null @@ -1,12 +0,0 @@ -.exp { - display: flex; - align-items: center; - gap: 1em; - margin: 0.25em 0; - -} - -.exp-delete { - flex-basis: 5%; - text-align: center; -} \ No newline at end of file diff --git a/src/scss/components/_forms.scss b/src/scss/components/_forms.scss index 0e21369..027a80e 100644 --- a/src/scss/components/_forms.scss +++ b/src/scss/components/_forms.scss @@ -1,55 +1,121 @@ -.item-form { +select.input { + display: block; + padding: 0px; + option { + color: black; + } +} + +textarea.input { + background: none; + font-size: 13px; + line-height: 14px; font-family: $font-primary; } -.sheet-header { - flex: 0 auto; - overflow: hidden; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: flex-start; - margin-bottom: 10px; - - .profile-img { - flex: 0 0 100px; - height: 100px; - margin-right: 10px; - } - - .header-fields { - flex: 1; - } - - h1.charname { - height: 50px; - padding: 0px; - margin: 5px 0; - border-bottom: 0; - input { - width: 100%; - height: 100%; - margin: 0; - } +.input { + background: none; + font-family: "Oswald"; + gap: 10px; + line-height: 23px; + height: 23px; + padding: 5px; + border-radius: 3px; + border: solid 1px $black; + + &:focus { + box-shadow: none; + border: solid 1px $primary; } -} -.sheet-tabs { - flex: 0; -} + &::placeholder { + color: transparentize($color: $white, $amount: 0.5); + } + + &.white { + color: white; + border: solid 1px #fff; + } + + &.ability { + height: 40px; + font-size: 36px; + width: 50px; + height: 40px; + } + + &.center { + text-align: center; + } -.sheet-body, -.sheet-body .tab, -.sheet-body .tab .editor { - height: 100%; + &.huge { + height: 36px; + font-size: 24px; + display: flex; + align-items: center; + justify-content: flex-start; + } + + &.w128 { + width: 128px; + } + + &.number { + display: flex; + width: 32px; + height: 23px; + text-align: center; + flex-direction: column; + justify-content: center; + align-items: center; + } } -.tox { - .tox-editor-container { - background: $c-white; +.checkbox-container { + display: block; + position: relative; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + width: 10px; + height: 10px; + + & input { + position: absolute; + opacity: 0; + cursor: pointer; + height: 0; + width: 0; + } + + .checkmark { + position: absolute; + top: 0; + left: 0; + height: 10px; + width: 10px; + background-color: transparent; + border: 1px solid $hyper-white; + + &:after { + content: ""; + position: absolute; + display: none; + } + } + + &:hover input~.checkmark { + background-color: #ccc; + } + + & input:checked~.checkmark { + background-color: $hyper-white; } - .tox-edit-area { - padding: 0 8px; + & input:checked~.checkmark:after { + display: block; } } \ No newline at end of file diff --git a/src/scss/components/_gm.scss b/src/scss/components/_gm.scss deleted file mode 100644 index a36827d..0000000 --- a/src/scss/components/_gm.scss +++ /dev/null @@ -1,26 +0,0 @@ -.gm-sheet { - .gm-resource { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0.5em; - } - - label { - font-size: 1.5em; - } - - input { - width: 100px; - text-align: center; - height: 100%; - font-size: 1.5em; - position: relative; - } - .incremental { - display: flex; - align-items: center; - gap: 0.5em - } - -} \ No newline at end of file diff --git a/src/scss/components/_hand.scss b/src/scss/components/_hand.scss new file mode 100644 index 0000000..e2464ab --- /dev/null +++ b/src/scss/components/_hand.scss @@ -0,0 +1,142 @@ +.vtt { + flex-direction: column; +} + + +.daggerheart-ui-hand { + width: 100% !important; + margin-bottom: -5px; + z-index: 1; + display: flex; + overflow-y: hidden; + overflow-x: scroll; + background: transparentize($color: $dark, $amount: 0.5); + + .open-actor-sheet { + padding: 0.5em; + text-align: center; + cursor: pointer; + } + + .hand-roll { + display: flex; + flex-direction: column; + text-align: center; + padding: 0.5em; + color: white; + background-color: transparent; + border: 2px solid $border; + cursor: pointer; + border-radius: 0.5em; + transition: 0.2s; + + &:hover { + + background-color: $dark; + } + + .fear-die { + color: $danger; + } + + label { + text-transform: uppercase; + font-weight: bold; + font-family: "Oswald"; + cursor: pointer; + } + } + + .ui-rolls { + background: transparentize($color: $primary, $amount: 0.5); + color: white; + position: sticky; + left: 0px; + z-index: 20; + padding: 0.5em; + display: flex; + flex-direction: column; + gap: 0.5em; + } + + .ui-card:hover .ui-card-body { + transform: rotateY(180deg); + transition: transform 0.5s; + } + + .ui-cards { + width: max-content !important; + display: flex; + height: 100%; + } + + .ui-card { + position: relative; + display: flex; + flex-direction: column; + width: 150px; + + margin: 0.5em; + border-radius: 0.5em; + + &-image { + height: 50px; + flex-grow: 1; + object-fit: cover; + object-position: 25% 35%; + border-radius: 0.5em 0.5em 0 0; + } + + &-body { + position: relative; + border-radius: 0.5em 0.5em 0 0; + transition: transform 1s; + transform-style: preserve-3d; + + .card-front, + .card-back { + position: absolute; + height: 100%; + width: 100%; + border-radius: 0.5em 0.5em 0 0; + } + + .card-front { + + backface-visibility: hidden; + display: flex; + flex-direction: column; + height: 155px; + } + + .card-back { + background-color: white; + height: 155px; + backface-visibility: hidden; + transform: rotateY(180deg); + padding: 0.25em; + overflow-x: scroll; + font-size: 12px; + } + } + + + + &-name { + background-color: $primary; + color: $white; + padding: 0.25em; + text-align: center; + font-weight: bold; + text-transform: uppercase; + } + + &-domain { + background-color: $ancestry; + text-align: center; + font-weight: bold; + padding: 0.25em; + text-transform: uppercase; + } + } +} \ No newline at end of file diff --git a/src/scss/components/_items.scss b/src/scss/components/_items.scss index 7a9fe0f..26e68e2 100644 --- a/src/scss/components/_items.scss +++ b/src/scss/components/_items.scss @@ -1,167 +1,36 @@ -// Section Header -.items-header { - height: 28px; - margin: 2px 0; - padding: 0; - align-items: center; - background: rgba(0, 0, 0, 0.05); - border: $border-groove; - font-weight: bold; - - >* { - font-size: 14px; - text-align: center; - } - - .item-name { - font-weight: bold; - padding-left: 5px; - text-align: left; - display: flex; - // font-size: 16px; +.sheet { + .item-sheet { + background-color: $cardBG; } } - -// ----------------------------------------- -// Items Lists -// ----------------------------------------- - -.items-list { - list-style: none; - margin: 0; - padding: 0; - overflow-y: auto; - scrollbar-width: thin; - color: $c-tan; - - // Child lists - .item-list { - list-style: none; - margin: 0; - padding: 0; - } - - // Item Name - .item-name { - flex: 2; - margin: 0; - overflow: hidden; - font-size: 13px; - text-align: left; - align-items: center; - display: flex; - - h3, - h4 { - margin: 0; - white-space: nowrap; - overflow-x: hidden; +.item-wrap { + padding: 10px; + .item { + &-sidebar { + width: 128px; } } - - // Control Buttons - .item-controls { - display: flex; - flex: 0 0 100px; - justify-content: flex-end; - - a { +} +.class-sheet { + .editor .editor-content { + height: 150px; + overflow-y: auto; + * { + margin: 2px 0px; font-size: 12px; - text-align: center; - margin: 0 6px; + font-family: $font-secondary; } } - - // Individual Item - .item { - align-items: center; - padding: 0 2px; // to align with the header border - border-bottom: 1px solid $c-faint; - - &:last-child { - border-bottom: none; + .class { + &-wrapper { + height: 100%; + display: grid; + grid: 1fr / 200px 1fr; } - .item-name { - color: $c-dark; - - .item-image { - flex: 0 0 30px; - height: 30px; - background-size: 30px; - border: none; - margin-right: 5px; - } + &-sidebar { + background: $primary; + color: white; } } - - .item-prop { - text-align: center; - border-left: 1px solid #c9c7b8; - border-right: 1px solid #c9c7b8; - font-size: 12px; - } - - // Section Header - .items-header { - height: 28px; - margin: 2px 0; - padding: 0; - align-items: center; - background: rgba(0, 0, 0, 0.05); - border: $border-groove; - font-weight: bold; - - >* { - font-size: 12px; - text-align: center; - } - - .item-name { - padding-left: 5px; - text-align: left; - // font-size: 16px; - } - } -} - -// Example style for DaggerHeart (can be removed if not needed). -.item-formula { - - flex: 0 0 200px; - padding: 0 8px; -} - -.inventory-item { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0.5em; - background-color: white; - margin-bottom: 0.5em; -} -.inventory-item-name { - font-weight: bold; - font-size: 16px; -} -.inventory-left { - display: flex; - align-items: center; - img { - margin-right: 0.5em; - background: $dark-gradient - } -} - -.inventory-right { - display: flex; - gap: 0.5em -} - -.domain-stats { - display: grid; - grid: 1fr / 3fr 1fr 50px; - select { - width: 100%; - } } \ No newline at end of file diff --git a/src/scss/components/_layout.scss b/src/scss/components/_layout.scss new file mode 100644 index 0000000..c33d364 --- /dev/null +++ b/src/scss/components/_layout.scss @@ -0,0 +1,23 @@ +.layout { + display: grid; + height: 100%; + grid-template: + "sidebar" 170px + "sidebar" 35px + "sidebar" 1fr / 220px 1fr; + + .sidebar { + grid-area: sidebar; + background-color: $primary; + color: $hyper-white; + + align-items: center; + gap: 5px; + } + + .header { + background-color: $secondary; + color: $hyper-white; + } +} + diff --git a/src/scss/components/_leveling.scss b/src/scss/components/_leveling.scss deleted file mode 100644 index 43a6b11..0000000 --- a/src/scss/components/_leveling.scss +++ /dev/null @@ -1,24 +0,0 @@ -.leveling-option { - display: flex; - align-items: center; - font-size: 12px; - background-color: white; - padding: 0.5em; -} - -.leveling-options { - display: grid; - grid: 1fr / repeat(2, 1fr); - gap: 0.5em; -} - -.leveling-tier-description { - font-weight: bold; - font-size: 12px; - text-align: center; -} - -.leveling-bonus { - font-size: 10px; - text-transform: uppercase; -} \ No newline at end of file diff --git a/src/scss/components/_resource.scss b/src/scss/components/_resource.scss deleted file mode 100644 index 5c9b910..0000000 --- a/src/scss/components/_resource.scss +++ /dev/null @@ -1,3 +0,0 @@ -.resource-label { - font-weight: bold; -} \ No newline at end of file diff --git a/src/scss/components/_rolls.scss b/src/scss/components/_rolls.scss new file mode 100644 index 0000000..393fd48 --- /dev/null +++ b/src/scss/components/_rolls.scss @@ -0,0 +1,108 @@ +.daggerheart-dice-roll { + font-family: "Oswald", sans-serif; + display: grid; + grid: 1fr/1fr; + align-items: center; + justify-items: center; + margin: 0px auto; + text-align: center; + + .normal-dice-roll { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + } + + .hope-roll { + background-color: #e4e4e7; + color: #18181b; + } + + .fear-roll { + color: #e4e4e7; + background-color: #18181b; + } + + .hope-roll, + .fear-roll { + font-size: 2em; + font-weight: 900; + } + + .total-roll { + font-size: 3em; + font-weight: 900; + } +} + +.hope-result { + background: white !important; + color: #18181b !important; + border-radius: 100% !important; + background-image: none !important; +} + +.fear-result { + background: #18181b !important; + color: white !important; + border-radius: 100% !important; + background-image: none !important; +} + + +.winner { + font-weight: bold; + text-transform: uppercase; + font-size: 16px; + text-align: center; + background: $secondary-alt; + color: white; + padding: 0.25em; + font-family: "Oswald", sans-serif; +} + +.show-result { + text-transform: uppercase; + padding: 0.25em; + text-align: center; + font-size: 10px; + font-weight: bold; + cursor: pointer; + font-family: "Oswald", sans-serif; +} + +.action-type { + font-family: "Oswald", sans-serif; + font-weight: bold; + text-transform: uppercase; + font-size: 16px; + text-align: center; + background: white; + padding: 0.25em; +} + +.daggerheart-roll-header { + display: grid; + width: 100%; + grid: 1fr / 2fr 1fr; +} + +.item-chat-header { + font-size: 16px; + font-family: $font-primary; + background-color: $primary; + padding: 2px 5px; + color: $white; +} + +.item-chat-body { + font-size: 14px; + font-family: $font-secondary; + background-color: $cardBG; + padding: 5px 5px; + * { + margin: 0px 2px; + } +} \ No newline at end of file diff --git a/src/scss/components/_weapons.scss b/src/scss/components/_weapons.scss deleted file mode 100644 index 01f626f..0000000 --- a/src/scss/components/_weapons.scss +++ /dev/null @@ -1,175 +0,0 @@ -.weapon-form { - padding: 0.5em; -} - -.weapon-input-group { - margin-bottom: 0.5em; - - &-flex { - display: flex; - gap: 1em; - } -} - -.weapon-grid { - display: grid; - grid: 1fr / 100px 1fr; - gap: 0.5em; -} - -.weapon-header { - background-color: white; - padding: 0.5em; -} - -.equipped { - .weapon-main-ability { - text-transform: uppercase; - } -} - - -.weapon-list-inventory-item { - margin: 0.5em 0; -} - -.weapon-main { - display: flex; - gap: 0.5em; -} - -.weapon-attributes { - display: flex; - align-items: center; - margin-left: 0.5em; - -} -.equipped-wrapper { - margin-bottom: 0.5em -} - -.weapon-main-name { - font-family: "Oswald", sans-serif; - font-size: 14px; - display: flex; - align-items: center; - gap: 0.5em; - font-weight: bold; -} - -.weapon-description { - * { - padding: 0.25em; - margin: 0px; - } - - color: white; - background: $dark-gradient; -} - -.weapon-main-description { - font-size: 10px; - text-transform: uppercase; - font-family: "Oswald", sans-serif; - padding-bottom: 0.25em -} - -.weapon-main-ability, .weapon-main-damage, .equipped-hit, .equipped-damage { - font-size: 12px; - // color: white; - // background: $dark-gradient; - text-transform: capitalize; - padding: 0.5em; - font-weight: bold; - border: 1px solid black; - margin-right: 0.5em; - cursor: pointer; - transition: 0.2s; - &:hover { - background-color: black; - background: $dark-gradient; - color: white; - } -} - -.weapon-options { - display: flex; - gap: 0.25em; - align-items: center; -} - -.weapon-equip, .armor-equip { - border: 1px solid $green; - color: $green; - - &:hover { - color: white; - background-color: $green; - } -} - -.weapon-unequip, .armor-unequip { - border: 1px solid $rose; - color: $rose; - - &:hover { - color: white; - background-color: $rose; - } -} - -.equipped-main { - display: flex; - align-items: center; -} - -.equipped-img img { - height: 30px; - margin-right: 0.5em; - background: $dark-gradient -} - -.equipped-feature { - background: $tabactive; - padding: 0.25em; - padding-left: 0.5em; - font-size:12px; - font-weight: 300; - color: white; - p { - display: inline; - } -} - -.weapon-equip, -.weapon-unequip, .armor-equip, .armor-unequip { - text-transform: uppercase; - font-weight: bold; - padding: 0.25em 0.5em; - transition: background-color 0.2s; - cursor: pointer; - text-align: center; - margin: 0px 0.5em; - display: flex; - align-items: center; - justify-content: center; - margin: 0px 0.5em; - - &:hover { - text-shadow: none; - } -} - -.equipped { - &-name { - font-family: "Oswald", sans-serif; - font-weight: bold; - font-size: 18px; - } - - display: flex; - align-items: center; - justify-content: space-between; - padding: 0.5em; - background-color: white; -} diff --git a/src/scss/components/actor/_cards.scss b/src/scss/components/actor/_cards.scss new file mode 100644 index 0000000..ebe171f --- /dev/null +++ b/src/scss/components/actor/_cards.scss @@ -0,0 +1,131 @@ +.character-card { + padding: 0px 5px; + + &-header { + background-color: $cardBG; + border: 2px solid $cardBorder; + color: $white; + // padding: 5px; + font-size: 12px; + + &-name { + text-transform: uppercase; + color: black; + font-weight: bolder; + padding: 5px; + min-width: 80px; + + } + + &-type { + text-transform: uppercase; + padding: 5px; + } + } + + &-feature { + font-size: 12px; + font-family: $font-secondary; + } + + &-roll { + position: relative; + z-index: 100; + padding: 3px; + transition: 0.2s; + color: $dark; + &:hover { + color: white; + background-color: $dark; + } + + .fas.fa-comment { + margin-top: -1px; + } + } + +} + +.domain-card { + &-roll { + position: relative; + z-index: 100; + padding: 3px; + transition: 0.2s; + + &:hover { + color: white; + background-color: $dark; + } + + .fas.fa-comment { + margin-top: -1px; + } + } + + .domain-card-header-name { + font-size: 14px; + } + + &-level { + padding: 0px 5px; + } + + &-domain { + text-transform: uppercase; + padding: 0px 5px; + border-radius: 3px; + } + + &-name { + font-size: 14px; + font-weight: bold; + padding-bottom: 0px; + } + + &-type { + font-size: 11px; + text-transform: uppercase; + } + + &-recall { + background-color: $dark; + border: 1px solid $border; + color: $white; + padding: 0px 5px; + border-radius: 3px; + display: flex; + align-items: center; + + & i.fas.fa-bolt { + font-size: 10px; + margin-top: 1px; + } + } + + &-feature { + font-size: 12px; + font-family: $font-secondary; + } + + &-meta { + background-color: $cardBG; + border: 2px solid $cardBorder; + } +} + +.inventory-tab { + &.active[data-tab="vault_cards"] { + .checkmark { + background-color: $success !important; + border: 1px solid $success; + } + } + + &.active[data-tab="loadout_cards"] { + .checkmark { + background-color: $danger !important; + border: 1px solid $danger; + } + } +} \ No newline at end of file diff --git a/src/scss/components/actor/_content.scss b/src/scss/components/actor/_content.scss new file mode 100644 index 0000000..86c1025 --- /dev/null +++ b/src/scss/components/actor/_content.scss @@ -0,0 +1,27 @@ +.content { + padding: $p-5; +} + +.adversary-content { + grid-area: span 2; + padding: $p-5 +} + +.inventory-nav { + .inventory-nav-item { + width: 100px; + text-align: center; + transition: 0.2s; + font-weight: bold; + border-bottom: 1px solid transparent; + + &:hover { + color: $primary; + text-shadow: none; + } + + &.active { + border-bottom: 1px solid $primary; + } + } +} \ No newline at end of file diff --git a/src/scss/components/actor/_header.scss b/src/scss/components/actor/_header.scss new file mode 100644 index 0000000..dee2747 --- /dev/null +++ b/src/scss/components/actor/_header.scss @@ -0,0 +1,19 @@ +.header { + display: flex; + flex-direction: column; + width: 100%; + padding: $padding-default; + &-name { + padding: 2px 0px; + } + &-title { + display: flex; + gap: 5px; + span { + cursor: pointer; + } + label { + padding: 2px 4px; + } + } +} \ No newline at end of file diff --git a/src/scss/components/actor/_inventory.scss b/src/scss/components/actor/_inventory.scss new file mode 100644 index 0000000..f09ec27 --- /dev/null +++ b/src/scss/components/actor/_inventory.scss @@ -0,0 +1,86 @@ +.inventory-item { + border: 1px solid black; + margin: 5px 0px; + background-color: $cardBG; + border: 2px solid $cardBorder; + + &.weapon { + display: grid; + grid: 1fr / 40px 2fr 1fr 20px; + align-items: center; + } + + .weapon, .item { + &-name { + font-size: 16px; + } + + &-meta { + padding-left: 5px; + } + + &-description { + font-size: 12px; + } + + &-image { + position: relative; + cursor: pointer; + display: block; + &:after { + content:" "; + + } + } + + &-rollables {} + + &-ability, + &-damage { + padding: 2px; + text-transform: uppercase; + cursor: pointer; + &:hover { + background-color: $dark; + color: $white; + } + } + &-status { + .equip-icon { + border-radius: 100%; + width: 14px; + height: 14px; + display: block; + margin: 0px auto; + transition: 0.2s; + cursor: pointer; + &.equip { + background-color: transparent; + border: 1px solid $primary; + + &:hover { + background-color: $primary; + } + } + &.unequip { + background-color: $primary; + border: 1px solid $primary; + + &:hover { + border: 1px solid $primary; + background-color: transparent; + } + } + } + } + + &-options { + font-size: 12px; + font-family: $font-secondary; + grid-column: 4 span; + background-color: transparentize($secondary-alt, 0.5); + color: white; + padding: 4px; + } + } +} \ No newline at end of file diff --git a/src/scss/components/actor/_leveling.scss b/src/scss/components/actor/_leveling.scss new file mode 100644 index 0000000..a7aa752 --- /dev/null +++ b/src/scss/components/actor/_leveling.scss @@ -0,0 +1,29 @@ +.leveling-tier { + &-options { + display: grid; + grid: 1fr / 1fr 1fr; + gap: 10px; + margin-bottom: 10px; + } + + &-description { + text-align: center; + font-family: $font-secondary; + margin-bottom: 5px; + font-size: 12px; + } + + &-level-bonus { + font-size: 12px; + font-family: $font-secondary; + } + + .leveling-option { + display: flex; + gap: 5px; + font-size: 12px; + text-align: justify; + font-family: $font-secondary; + align-items: flex-start; + } +} \ No newline at end of file diff --git a/src/scss/components/actor/_navigation.scss b/src/scss/components/actor/_navigation.scss new file mode 100644 index 0000000..c9c5b14 --- /dev/null +++ b/src/scss/components/actor/_navigation.scss @@ -0,0 +1,26 @@ +.navigation { + &-tab { + padding: $p-5; + } + + .navigation-item { + width: 90px; + height: 25px; + border: 1px solid $black; + color: $black; + font-size: 14px; + text-align: center; + text-transform: uppercase; + transition: all 0.2s; + &:hover { + text-shadow: none; + background-color: $black; + color: $hyper-white + } + &.active { + background-color: $primary; + border: 1px solid $border; + color: $border; + } + } +} \ No newline at end of file diff --git a/src/scss/components/actor/_sidebar.scss b/src/scss/components/actor/_sidebar.scss new file mode 100644 index 0000000..09ef5fc --- /dev/null +++ b/src/scss/components/actor/_sidebar.scss @@ -0,0 +1,25 @@ +.sidebar { + display: flex; + flex-direction: column; + width: 100%; + padding: $padding-default; + + &-image { + text-align: center; + + &-src { + border: 1px solid $white; + } + } + + &-level { + width: 83px; + } + + &-experiences { + &-list { + max-height: 100px; + overflow: auto; + } + } +} \ No newline at end of file diff --git a/src/scss/daggerheart.scss b/src/scss/daggerheart.scss index f5e9c14..222f933 100644 --- a/src/scss/daggerheart.scss +++ b/src/scss/daggerheart.scss @@ -1,877 +1,37 @@ -// Add custom fonts by visiting and search https://fonts.google.com -@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"); @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Cabin+Condensed:wght@400;500;600;700&display=swap'); -// Import utilities. @import "utils/typography"; -@import "utils/colors"; -@import "utils/mixins"; @import "utils/variables"; +@import "utils/colors"; +@import "utils/flex"; +@import "utils/helpers"; +@import "components/items"; +@import "components/forms"; +@import "components/buttons"; +@import "components/rolls"; +@import "components/dialog"; +@import "components/dice"; +@import "components/hand"; -/* Global styles */ -@import "global/window"; -@import "global/grid"; -@import "global/flex"; - -.panel { - background: white; - - &-mb { - margin-bottom: 0.5em; - } - - box-shadow: 0px 2px 5px #00000045; - - &-header { - padding: 0.25em 0.5em; - background-color: $blue; - color: white; - margin-top: 0px !important; - } - - &-body { - padding: 0.5em; - } -} - -.flex-grow { - flex-grow: 1; - - select { - width: 100%; - } -} - -.flex-align { - display: flex; - align-items: center; - justify-content: space-between; -} - -.vtt { - flex-direction: column; -} - -.dialog { - .choice-dialog-wrap { - margin-bottom: 0.5em; - } - - .window-content { - background: none; - background-color: #d9d9d9 !important; - } - - .choice-dialog { - background: white; - } - - .choice-options { - padding: 0.25em; - } - - .choice-dialog-select-one { - font-size: 16px; - font-weight: bold; - background: black; - padding: 0.25em; - color: white; - } -} - -.daggerheart-ui-hand { - width: 100% !important; - margin-bottom: -5px; - z-index: 1; - display: flex; - overflow-y: hidden; - overflow-x: scroll; - background: transparentize($color: $dark-start, $amount: 0.5); - - .open-actor-sheet { - padding: 0.5em; - text-align: center; - cursor: pointer; - } - - .hand-roll { - display: flex; - flex-direction: column; - text-align: center; - padding: 0.5em; - color: white; - background-color: transparent; - border: 2px solid $border; - cursor: pointer; - border-radius: 0.5em; - transition: 0.2s; - - &:hover { - - background-color: $dark-start; - } - - .fear-die { - color: $rose; - } - - label { - text-transform: uppercase; - font-weight: bold; - font-family: "Oswald"; - cursor: pointer; - } - } - - .ui-rolls { - background: transparentize($color: $tabactive, $amount: 0.5); - color: white; - position: sticky; - left: 0px; - z-index: 20; - padding: 0.5em; - display: flex; - flex-direction: column; - gap: 0.5em; - } - - .ui-card:hover .ui-card-body { - transform: rotateY(180deg); - transition: transform 0.5s; - } - - .ui-cards { - width: max-content !important; - display: flex; - height: 100%; - } - - .ui-card { - position: relative; - display: flex; - flex-direction: column; - width: 150px; - - margin: 0.5em; - border-radius: 0.5em; - - &-image { - height: 50px; - flex-grow: 1; - object-fit: cover; - object-position: 25% 35%; - border-radius: 0.5em 0.5em 0 0; - } - - &-body { - position: relative; - border-radius: 0.5em 0.5em 0 0; - transition: transform 1s; - transform-style: preserve-3d; - - .card-front, - .card-back { - position: absolute; - height: 100%; - width: 100%; - border-radius: 0.5em 0.5em 0 0; - } - - .card-front { - - backface-visibility: hidden; - display: flex; - flex-direction: column; - height: 155px; - } - - .card-back { - background-color: white; - height: 155px; - backface-visibility: hidden; - transform: rotateY(180deg); - padding: 0.25em; - overflow-x: scroll; - font-size: 12px; - } - } - - - - &-name { - background-color: $slate; - color: $white; - padding: 0.25em; - text-align: center; - font-weight: bold; - text-transform: uppercase; - } - - &-domain { - background-color: $yellow; - text-align: center; - font-weight: bold; - padding: 0.25em; - text-transform: uppercase; - } - } -} - - -.domain-pill { - padding: 0.25em 0.5em; - text-transform: uppercase; - font-weight: lighter; - border-radius: 0.25em; -} - -/* Styles limited to daggerheart sheets */ .daggerheart { - @import "components/forms"; - @import "components/resource"; - @import "components/items"; - @import "components/effects"; - @import "components/class"; - @import "components/exp"; - @import "components/leveling"; - @import "components/weapons"; - @import "components/enemy"; - @import "components/gm"; - - *:not(i) { - font-family: "Oswald", sans-serif; - } - - .proficiency { - display: flex; - gap: 0.5em; - justify-content: end; - align-items: CENTER; - } - - &.actor { - nav.sheet-tabs { - position: relative; - - &:after { - border: 1px solid $border; - content: " "; - position: absolute; - width: 100%; - top: 44%; - z-index: 1; - } - - color: white; - border: none; - - .item { - position: relative; - z-index: 2; - background: $dark-gradient !important; - background-color: $dark-start; - border: 2px solid #f1c770; - - &:hover { - text-shadow: none; - background: $bg-hover; - background-color: $bg-hover; - } - } - - .item.active { - background: $tabactive !important; - box-shadow: none; - text-shadow: none; - color: $border; - } - } - } - - .accordion { - cursor: pointer; - z-index: 10; - position: relative; - - &:after { - font-family: "Font Awesome 6 Pro"; - - content: "\f0da"; - } - - &.active:after { - font-family: "Font Awesome 6 Pro"; - content: "\f0d7"; - } - } - - /* Style the accordion panel. Note: hidden by default */ - .accordion-content { - display: none; - overflow: hidden; - padding: 0em 0.25em; - } + @import "utils/reset"; + @import "utils/editor"; - .accordion-content.active { - display: block; - } + @import "components/layout"; - input, - textarea, - select { - border: 1px solid $input-border; - background-color: $input-bg; + @import "components/actor/sidebar"; + @import "components/actor/header"; + @import "components/actor/navigation"; + @import "components/actor/content"; + @import "components/actor/cards"; + @import "components/actor/leveling"; + @import "components/actor/inventory"; - &:focus { - box-shadow: 0 0 0px 1px $input-shadow !important; - } - } - .time-to-roll { + font-family: $font-primary; + + *[data-action] { cursor: pointer; - flex: 4; - height: 26px; - display: flex; - align-items: center; - padding-left: 5px; - margin-right: 5px; - background: $dark-gradient; - background-color: $dark-start; - transition: background-color 100ms linear; - color: $white; - - &:hover { - background: $bg-hover; - } - } - - .edit-mode-on { - color: $green - } - - .edit-mode-off { - color: $rose - } - - .short-input { - width: 30%; - text-align: center; - } - - .side-label { - height: 100%; - align-items: center; - font-weight: bold; - display: flex; - justify-content: center; - - &.rose { - background-color: $rose; - color: $white; - } - } - - .editor-content { - margin-right: 3em; - } - - .char-sheet-description { - .editor { - height: 230px !important; - border: none !important; - } - - .editor-content { - border: none !important; - } - } - - .img-wrap, - .profile-img { - background: $dark-gradient; - border: 2px solid $border; - width: 100px; - } - - .editor-wrap .editor-edit { - display: block !important; - } - - .editor-wrap .editor { - width: 100%; - height: 150px; - } - - .card-delete-option { - color: $rose; - font-size: 10px; - text-transform: uppercase; - font-weight: bold; - padding: 0.1em; - transition: 0.4s; - - &:hover { - background-color: $rose; - color: white; - } - } - - .item-display { - color: white; - background: #222; - display: flex; - align-self: center; - flex-grow: 1; - width: 100%; - justify-content: center; - padding: 4px 0px; - margin-bottom: 3px; - } - - .ability { - padding: 0.25rem 0px; - } - - .bio-wrap { - padding: 0px 1em 0.5em 1em; - background: $dark-gradient; - border: 2px solid $border; - color: white; - } - - .hitpoints { - display: grid; - grid: 1fr 1fr / 1fr 1fr 1fr; - gap: 0.25rem; - justify-items: center; - align-items: center; - margin-bottom: 1em; - padding: 0em 0.5em; - padding-bottom: 0.5em; - color: white; - background: $dark-gradient; - } - - .hope { - display: flex; - align-items: center; - gap: 0.25rem; - margin: 0.5rem 0px; - } - - .health-stress { - display: grid; - grid: 1fr / 1fr 1fr 1fr; - gap: 0.25em; - margin: 0.25em 0; - } - - .health-stress .take-two { - grid-column: span 2; - } - - .meta { - display: grid; - grid: 1fr / 1fr 1fr; - width: 100%; - } - - .domain { - background-color: $white; - padding: 0.25rem; - margin: 0.25rem 0; - } - - .tier-description { - text-align: center; - font-size: 12px; - font-weight: bold; - } - - .card.panel { - margin: 0.5em 0.25em; - } - - .card, - .panel { - .card-header-wrapper {} - - &-header { - display: flex; - } - - &-name { - font-size: 16px; - font-weight: bold; - padding: 0.25rem; - padding-left: 8px; - border-bottom: 1px solid black; - text-transform: capitalize; - } - - &-type { - background-color: $rose; - color: $white; - padding: 0.25rem; - text-transform: capitalize; - display: flex; - align-items: center; - } - - &-recall { - background-color: black; - color: $white; - padding: 0.25rem; - text-transform: capitalize; - display: flex; - align-items: center; - } - - &-domain { - background-color: $violet; - color: $white; - padding: 0.25rem; - text-transform: capitalize; - display: flex; - align-items: center; - } - - &-body { - font-size: 12px; - color: $zinc; - padding: 0.5em; - padding-left: 8px; - } - - &-options { - display: flex; - justify-content: space-between; - } - - &-delete { - color: $rose; - - cursor: pointer; - } - - &-activate { - cursor: pointer; - border: 1px solid $green; - color: $green; - transition: 0.2s; - padding: 0.25rem; - text-transform: uppercase; - - &:hover { - color: $white; - background-color: $green; - } - - &.danger { - &:hover { - color: $white; - background-color: $rose; - } - - border:1px solid $rose; - color: $rose; - } - } - } - - .window-content { - background: none !important; - padding: 0.25rem !important; - background-color: #d9d9d9 !important; - } - - .cards-vault h2 { - display: flex; - justify-content: space-between; - } - - .section-header { - display: flex; - align-items: center; - background: #222; - text-align: center; - color: $white; - justify-content: space-between; - padding: 0.5em 0.5em; - - h2 { - flex-grow: 1; - text-decoration: none; - border: none; - margin: 0; - } - } - - label { - font-size: 12px; - font-weight: bold; - margin: 0.25em 0em; - display: block; - } - - .combat-stat { - display: grid; - grid: 1fr / 1fr 1fr 1fr 1fr; - column-gap: 1em; - row-gap: 0.25em; - - &-item { - label { - flex-basis: 50%; - } - - display: flex; - flex-direction: column; - align-items: center; - } - } - - .generic-card { - display: grid; - grid: 1fr / 1fr 2fr; - margin: 0.5em 0; - } - - .traits-tab { - .trait { - background-color: white; - padding: 1em; - display: flex; - flex-direction: column; - margin: 0.5em; - } - - .trait-feature { - font-size: 12px; - flex-grow: 1; - height: 70px; - overflow: auto; - } - - .trait-options { - display: flex; - justify-content: end; - margin-top: 0.2em; - } - - .delete-trait { - color: $rose; - } - - .trait-name { - border-bottom: 2px solid $slate; - padding-bottom: 0.25em; - margin-bottom: 0.25em; - display: flex; - align-items: center; - justify-content: space-between; - - &-value { - font-size: 18px; - font-weight: bold; - text-transform: uppercase; - display: flex; - gap: 0.5em; - } - - &-label { - background-color: $yellow; - color: white; - padding: 0.25em; - font-size: 12px; - text-transform: uppercase; - font-weight: 100; - } - } - } - - .meta-domains-list { - display: flex; - gap: 0.25em; - margin-top: 0.7em; - - .meta-domain { - background-color: $rose; - padding: 0.4em; - text-transform: uppercase; - color: white; - } - } - - .char-sheet { - .editor-wrap { - width: 100%; - } - } - - .char-sheet.questions-connections { - display: grid; - gap: 0.5em; - } - - .char-sheet.looks-description { - display: grid; - grid: 1fr / 1fr 2fr; - gap: 0.5em; - margin: 0.5em 0; - } - - .money, - .combat-stat { - background: #362178; - display: flex; - padding: 0.5em; - margin: 0.5em 0em; - color: white; - gap: 1em; - text-align: center; - } - - .section-title { - font-weight: bold; - font-size: 14px; - margin-bottom: 0.5em; - display: flex; - justify-content: space-between; - - text-transform: uppercase; - background: $dark-gradient; - border: 2px solid $border; - color: white; - padding: 0.25em 1em; - text-align: center; - align-items: center; - } -} - -.winner { - font-weight: bold; - text-transform: uppercase; - font-size: 16px; - text-align: center; - background: $dark-gradient; - color: white; - padding: 0.25em; - font-family: "Oswald", sans-serif; -} - -.show-result { - text-transform: uppercase; - padding: 0.25em; - text-align: center; - font-size: 10px; - font-weight: bold; - cursor: pointer; - font-family: "Oswald", sans-serif; -} - -.action-type { - font-family: "Oswald", sans-serif; - font-weight: bold; - text-transform: uppercase; - font-size: 16px; - text-align: center; - background: white; - padding: 0.25em; -} - -.weapon-roll-type { - background: none; -} - -.attack-roll-traits { - text-align: center; - margin-top: -5px; - text-transform: uppercase; -} - -.daggerheart-roll-header { - display: grid; - width: 100%; - grid: 1fr / 2fr 1fr; - -} - -.daggerheart-dice-roll { - font-family: "Oswald", sans-serif; - display: grid; - grid: 1fr/1fr; - align-items: center; - justify-items: center; - margin: 0px auto; - text-align: center; - - .normal-dice-roll { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - } - - .hope-roll { - background-color: #e4e4e7; - color: #18181b; - } - - .fear-roll { - color: #e4e4e7; - background-color: #18181b; - } - - .hope-roll, - .fear-roll { - font-size: 2em; - font-weight: 900; - } - - .total-roll { - font-size: 3em; - font-weight: 900; - } -} - -.hope-result { - background: white !important; - color: #18181b !important; - border-radius: 100% !important; - background-image: none !important; -} - -.fear-result { - background: #18181b !important; - color: white !important; - border-radius: 100% !important; - background-image: none !important; -} - -.dialog-input-group { - display: flex; - flex-direction: column; - margin-bottom: 0.5em; - - .dialog-input { - display: flex; - align-items: center; - justify-content: space-between; - - .dialog-input-name { - flex-grow: 1; - font-weight: bold; - } - - .dialog-input-mod { - background: $rose !important; - padding: 0.25em; - width: 8%; - text-align: center; - color: white; - font-weight: bold; - } } } \ No newline at end of file diff --git a/src/scss/global/_flex.scss b/src/scss/global/_flex.scss deleted file mode 100644 index a5a5666..0000000 --- a/src/scss/global/_flex.scss +++ /dev/null @@ -1,46 +0,0 @@ -// Flexbox. -.flex-group-center, -.flex-group-left, -.flex-group-right { - justify-content: center; - align-items: center; - text-align: center; -} - -.flex-group-left { - justify-content: flex-start; - text-align: left; -} - -.flex-group-right { - justify-content: flex-end; - text-align: right; -} - -.flexshrink { - flex: 0; -} - -.flex-between { - justify-content: space-between; -} - -.flexlarge { - flex: 2; -} - -// Alignment styles. -.align-left { - justify-content: flex-start; - text-align: left; -} - -.align-right { - justify-content: flex-end; - text-align: right; -} - -.align-center { - justify-content: center; - text-align: center; -} \ No newline at end of file diff --git a/src/scss/global/_grid.scss b/src/scss/global/_grid.scss deleted file mode 100644 index 16839df..0000000 --- a/src/scss/global/_grid.scss +++ /dev/null @@ -1,85 +0,0 @@ -// Grid. -.grid, -.grid-2col { - display: grid; - grid-column: span 2 / span 2; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 10px; - margin: 10px 0; - padding: 0; -} - -.grid-3col { - grid-column: span 3 / span 3; - grid-template-columns: repeat(3, minmax(0, 1fr)); -} - -.grid-4col { - grid-column: span 4 / span 4; - grid-template-columns: repeat(4, minmax(0, 1fr)); -} - -.grid-5col { - grid-column: span 5 / span 5; - grid-template-columns: repeat(5, minmax(0, 1fr)); -} - -.grid-6col { - grid-column: span 6 / span 6; - grid-template-columns: repeat(6, minmax(0, 1fr)); -} - -.grid-7col { - grid-column: span 7 / span 7; - grid-template-columns: repeat(7, minmax(0, 1fr)); -} - -.grid-8col { - grid-column: span 8 / span 8; - grid-template-columns: repeat(8, minmax(0, 1fr)); -} - -.grid-9col { - grid-column: span 9 / span 9; - grid-template-columns: repeat(9, minmax(0, 1fr)); -} - -.grid-10col { - grid-column: span 10 / span 10; - grid-template-columns: repeat(10, minmax(0, 1fr)); -} - -.grid-11col { - grid-column: span 11 / span 11; - grid-template-columns: repeat(11, minmax(0, 1fr)); -} - -.grid-12col { - grid-column: span 12 / span 12; - grid-template-columns: repeat(12, minmax(0, 1fr)); -} - -// Grid offset. -.grid-start-2 { grid-column-start: 2 } -.grid-start-3 { grid-column-start: 3 } -.grid-start-4 { grid-column-start: 4 } -.grid-start-5 { grid-column-start: 5 } -.grid-start-6 { grid-column-start: 6 } -.grid-start-7 { grid-column-start: 7 } -.grid-start-8 { grid-column-start: 8 } -.grid-start-9 { grid-column-start: 9 } -.grid-start-10 { grid-column-start: 10 } -.grid-start-11 { grid-column-start: 11 } -.grid-start-12 { grid-column-start: 12 } - -.grid-span-2 { grid-column-end: span 2 } -.grid-span-3 { grid-column-end: span 3 } -.grid-span-4 { grid-column-end: span 4 } -.grid-span-5 { grid-column-end: span 5 } -.grid-span-6 { grid-column-end: span 6 } -.grid-span-7 { grid-column-end: span 7 } -.grid-span-8 { grid-column-end: span 8 } -.grid-span-9 { grid-column-end: span 9 } -.grid-span-10 { grid-column-end: span 10 } -.grid-span-11 { grid-column-end: span 11 } -.grid-span-12 { grid-column-end: span 12 } diff --git a/src/scss/global/_window.scss b/src/scss/global/_window.scss deleted file mode 100644 index 97581e5..0000000 --- a/src/scss/global/_window.scss +++ /dev/null @@ -1,12 +0,0 @@ -.window-app { - font-family: $font-primary; -} - -.rollable { - &:hover, - &:focus { - color: #000; - text-shadow: 0 0 10px red; - cursor: pointer; - } -} \ No newline at end of file diff --git a/src/scss/utils/_colors.scss b/src/scss/utils/_colors.scss index 5f31074..22d2901 100644 --- a/src/scss/utils/_colors.scss +++ b/src/scss/utils/_colors.scss @@ -1,83 +1,78 @@ -$c-white: #fff; -$c-black: #000; +$primary: #38227b; +$secondary: #2B226D; +$secondary-alt: #223E6D; +$border: #f3c267; +$hyper-white: #fff; +$white: #F3F3F3; +$black: #000; +$darkred: #7f1d1d; +$gray: #e0dede; +$danger: #92140C; +$success: #4CB944; +$dark: #1B1A1A; -$c-dark: #191813; -$c-faint: #c9c7b8; -$c-beige: #b5b3a4; -$c-tan: #444; +$classColor: #9B1D2085; +$communityColor: #49846785; +$ancestry: #ffaa3385; +$subClass: #99463685; +$cardBG: rgb(217 216 214); +$cardBorder: rgb(205 205 205); -$slate: #334155; -$rose: #f43f5e; -$violet: #8b5cf6; -$white: #fff; -$yellow: #eab308; -$blue: #1e3a8a; -$zinc: #18181b; -$green: #3f6212; -$indigo-dark: #3730a3; -$light: #f5f5f5; -$dark-start: #1B1A1A; -$dark-end: #2A2B2E; - -$dark-gradient: linear-gradient(180deg, rgba(27, 26, 26, 1) 0%, rgba(27, 26, 26, 1) 50%, rgba(42, 43, 46, 1) 100%); -$dark-gradient-alpha: linear-gradient(180deg, rgba(27, 26, 26, 0.5) 0%, rgba(27, 26, 26, 0.5) 50%, rgba(42, 43, 46, 0.5) 100%); -$border-color: #FAEC84; - -$input-bg: #f3f4f6; -$input-border: #d1d5db; -$input-shadow: #6b7280; - -$ability-bg: #404040; -$bg-hover: #383838; -$border: #F1C770; -$tabactive: #362178; +.class { + background-color: $classColor; + color: white; +} +.community { + background-color: $communityColor; + color: white; +} -@mixin gradient($color1, $color2) { - //background: linear-gradient(90deg, $color1, $color2 25%, $color2 50%, $color2 75%, $color1 100%); - background-color: $color2 !important; +.ancestry { + background-color: $ancestry; + color: white; } .arcana { - @include gradient(#392144, #4E276A); + background-color: #4E276A; color: white; } .blade { - @include gradient(#662521, #96352C); + background-color: #96352C; color: white; } .bone { - @include gradient(#4D4E50, #666769); + background-color: #666769; color: white; } .codex { - @include gradient(#19294A, #1F335F); + background-color: #1F335F; color: white; } .grace { - @include gradient(#612A4C, #7A3662); + background-color: #7A3662; color: white; } .midnight { - @include gradient(#212125, #333439); + background-color: #333439; color: white; } .sage { - @include gradient(#054121, #0C6B41); + background-color: #0C6B41; color: white; } .splendor { - @include gradient(#998042, #AF9F40); + background-color: #AF9F40; color: white; } .valor { - @include gradient(#915E24, #B97A23); + background-color: #B97A23; color: white; } \ No newline at end of file diff --git a/src/scss/utils/_editor.scss b/src/scss/utils/_editor.scss new file mode 100644 index 0000000..0cbca98 --- /dev/null +++ b/src/scss/utils/_editor.scss @@ -0,0 +1,49 @@ +.editor { + min-height: 50px; + .tox.tox-tinymce { + min-height: 200px; + background: $cardBG; + border: 2px solid $cardBorder; + } + + .tox-sidebar-wrap { + padding: 0px 5px; + } + + .white~.tox.tox-tinymce { + border: 1px solid white; + background: $white; + } + + .h150~.tox.tox-tinymce { + min-height: 150px; + } + + .h180~.tox.tox-tinymce { + min-height: 180px; + } + + .simple~.tox.tox-tinymce { + .tox-toolbar__primary { + + button[aria-label="Formats"], + button[aria-label="Numbered list"], + button[aria-label="Insert/edit image"], + button[aria-label="Table"], + button[aria-label="Horizontal line"], + button[aria-label="Insert/edit link"], + button[aria-label="Clear formatting"], + button[aria-label="Source code"], + button[aria-label="Bullet list"] { + display: none; + } + + button[aria-label="Save"] { + height: 24px; + width: 24px; + padding: 0px; + margin: 0px; + } + } + } +} \ No newline at end of file diff --git a/src/scss/utils/_flex.scss b/src/scss/utils/_flex.scss new file mode 100644 index 0000000..08a2909 --- /dev/null +++ b/src/scss/utils/_flex.scss @@ -0,0 +1,51 @@ +.flex { + display: flex; +} + +.flex-grow { + flex-grow: 1; +} + +.flex-shrink { + flex-shrink: 0; +} + +.items-center { + align-items: center; +} + +.relative { + position: relative; +} + +.justify-between { + justify-content: space-between; +} + +.justify-around { + justify-content: space-around; +} + +.justify-center { + justify-content: center; +} + +.w { + &-100 { + width: 100% + } +} + +.row { + flex-direction: row; +} + +.column { + flex-direction: column; +} + +.self-stretch { + align-self: stretch; + display: flex; + align-items: center; +} \ No newline at end of file diff --git a/src/scss/utils/_helpers.scss b/src/scss/utils/_helpers.scss new file mode 100644 index 0000000..ada2aea --- /dev/null +++ b/src/scss/utils/_helpers.scss @@ -0,0 +1,162 @@ +.text-center { + text-align: center; +} + +.gap { + &-5 { + gap: 5px; + } + + &-10 { + gap: 10px + } + + &-15 { + gap: 15px; + } +} + +.p { + &-5 { + padding: 5px; + } + + &-10 { + padding: 10px + } + + &-15 { + padding: 15px; + } +} + +.mb { + &-5 { + margin-bottom: 5px; + } + + &-10 { + margin-bottom: 10px; + } + + &-15 { + margin-bottom: 15px; + } +} + +.mt { + &-5 { + margin-top: 5px; + } + + &-10 { + margin-top: 10px; + } + + &-15 { + margin-top: 15px; + } +} + +.accordion { + cursor: pointer; + z-index: 10; + position: relative; + + &:after { + font-family: "Font Awesome 6 Pro"; + font-size: 14px; + width: 15px; + content: "\f0da"; + } + + &.active:after { + font-family: "Font Awesome 6 Pro"; + content: "\f0d7"; + } +} + +/* Style the accordion panel. Note: hidden by default */ +.accordion-content { + display: none; + overflow: hidden; + padding: 0em 0.25em; +} + +.accordion-content.active { + display: block; +} + + +.badge { + color: white; + background-color: $dark; + min-width: 80px; + text-align: center; + + &.class { + background-color: $classColor; + color: $dark; + } + + &.community { + background-color: $communityColor; + color: $dark; + } + + &.subclass { + background-color: $subClass; + color: $dark; + } + + &.ancestry { + background-color: $ancestry; + color: $dark; + } +} + +.section { + background-color: $secondary; + color: white; + padding: 5px; +} + +.uppercase { + text-transform: uppercase; +} + +.grid { + display: grid; +} + +.row-2 { + grid-template-rows: repeat(2, minmax(0, 1fr)); +} + +.col-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} + +.bg { + &-primary { + background-color: $primary; + color: white + } + &-card { + background: $cardBG; + border: 1px solid $cardBorder; + } + &-secondary { + background: $secondary; + color: white; + } + &-white { + background: white; + border: 1px solid $cardBorder; + } +} + +img.header-image { + object-fit: cover; + object-position: 0% 20%; +} \ No newline at end of file diff --git a/src/scss/utils/_mixins.scss b/src/scss/utils/_mixins.scss deleted file mode 100644 index 69dd2ad..0000000 --- a/src/scss/utils/_mixins.scss +++ /dev/null @@ -1,16 +0,0 @@ -@mixin element-invisible { - position: absolute; - - width: 1px; - height: 1px; - margin: -1px; - border: 0; - padding: 0; - - clip: rect(0 0 0 0); - overflow: hidden; -} - -@mixin hide { - display: none; -} \ No newline at end of file diff --git a/src/scss/utils/_reset.scss b/src/scss/utils/_reset.scss new file mode 100644 index 0000000..9a30a1b --- /dev/null +++ b/src/scss/utils/_reset.scss @@ -0,0 +1,14 @@ +.window-content { + padding: 0; + background: white; +} + +hr { + border: 1px solid transparentize($color: $white, $amount: 0.9) ; + width: 100%; + margin: 3px 0px; + padding: 0px; + &.black { + border-color: $black; + } +} \ No newline at end of file diff --git a/src/scss/utils/_typography.scss b/src/scss/utils/_typography.scss index 0c44234..ad9cbfb 100644 --- a/src/scss/utils/_typography.scss +++ b/src/scss/utils/_typography.scss @@ -1,2 +1,14 @@ -$font-primary: 'Roboto', sans-serif; -$font-secondary: 'Roboto', sans-serif; \ No newline at end of file +$font-primary: 'Oswald'; +$font-secondary: "Cabin Condensed", sans-serif; + +.text-bold { + font-weight: bold; +} + +.label { + font-size: 12px; + text-transform: uppercase; + &.strong { + font-weight: bold; + } +} \ No newline at end of file diff --git a/src/scss/utils/_variables.scss b/src/scss/utils/_variables.scss index 6d22f61..f3f34c1 100644 --- a/src/scss/utils/_variables.scss +++ b/src/scss/utils/_variables.scss @@ -1,5 +1,3 @@ -$padding-sm: 5px; -$padding-md: 10px; -$padding-lg: 20px; - -$border-groove: 2px groove #eeede0; \ No newline at end of file +$padding-default: 5px; +$p-5: 5px; +$p-10: 10px; \ No newline at end of file diff --git a/template.json b/template.json index fa5f147..c49989a 100644 --- a/template.json +++ b/template.json @@ -1,8 +1,8 @@ { "Actor": { - "types": ["character", "gm", "adversary"] + "types": ["character", "gm", "adversary" ] }, "Item": { - "types": ["item", "class", "domain", "card", "weapon", "armor"] + "types": ["item", "class", "domain","card", "feature", "weapon", "armor"] } } diff --git a/templates/actor/actor-adversary-sheet.hbs b/templates/actor/actor-adversary-sheet.hbs deleted file mode 100644 index dea76cc..0000000 --- a/templates/actor/actor-adversary-sheet.hbs +++ /dev/null @@ -1,193 +0,0 @@ -
    -
    - - -
    - -
    -
    -
    -
    - - -
    -
    -
    -
    - - - -
    - -
    - - - -
    - -
    - - - - -
    -
    -
    -
    Attack Roll
    -
    Damage Roll
    -
    -
    - - -
    -
    -
    -
    - - {{#if system.editMode}} - - {{else}} - {{{system.description}}} - {{/if}} - -
    -
    - - {{#if system.editMode}} - - {{else}} - {{system.tactics}} - {{/if}} -
    -
    -
    -
    -

    Stats

    -
    - - {{#if system.editMode}} - - {{else}} - {{system.tier}} - {{/if}} - -
    -
    - - {{#if system.editMode}} - - {{else}} - {{system.type}} - {{/if}} - -
    -
    -
    - - {{#if system.editMode}} - - {{else}} - {{system.difficulty}} - {{/if}} - -
    -
    - - - {{#if system.editMode}} - - {{else}} - {{system.attackMod}} - {{/if}} -
    - -
    - {{#if system.editMode}} - - -
    - - - -
    - {{else}} -
    -
    {{system.weapon.name}}
    -
    {{system.weapon.range}} - {{system.weapon.damage}} {{system.weapon.type}}
    -
    - {{/if}} - -
    -
    -
    - - - - -
    -
    - {{#each system.experiences as |experience key|}} - - -
    - {{#if ../system.editMode}} - - - - - - - {{else}} -
    {{experience.name}} +{{experience.mod}}
    - {{/if}} - -
    - {{/each}} -
    -
    -
    -
    -

    Features - - - -

    -
    - {{#each system.features as |feature key|}} -
    - {{#if ../system.editMode}} -
    -
    - - - - -
    - - - -
    -
    - - -
    - {{else}} -
    -
    {{feature.name}}
    -
    {{feature.description}}
    -
    - {{/if}} - -
    - {{/each}} -
    -
    -
    -
    \ No newline at end of file diff --git a/templates/actor/actor-character-sheet.hbs b/templates/actor/actor-character-sheet.hbs deleted file mode 100644 index f1403ce..0000000 --- a/templates/actor/actor-character-sheet.hbs +++ /dev/null @@ -1,173 +0,0 @@ -
    - - {{!-- Sheet Header --}} -
    - -
    -

    - {{!-- The grid classes are defined in scss/global/_grid.scss. To use, - use both the "grid" and "grid-Ncol" class where "N" can be any number - from 1 to 12 and will create that number of columns. --}} -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    - {{#each system.class.selectedDomains as |domain|}} -
    {{domain.name}}
    - {{/each}} -
    -
    -
    - - {{!-- Sheet Tab Navigation --}} - - - {{!-- Sheet Body --}} -
    - - {{!-- Owned Features Tab --}} -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    - - - {{!-- For the main features list, span the right two columns --}} -
    -
    Hit Points & Stress
    -
    -
    Minor
    -
    Major
    -
    Severe
    - - - -
    -
    - - - -
    - -
    - - - -
    - -
    - - -
    - - - {{!-- This is a Handlebars partial. They're stored in the `/parts` folder next to this sheet, and defined in - module/helpers/templates.mjs --}} - {{!-- {{> "systems/daggerheart/templates/actor/parts/actor-features.hbs"}} --}} -
    - -
    -
    - {{> "systems/daggerheart/templates/actor/parts/actor-exps.hbs"}} - -
    -
    - - {{!-- Biography Tab --}} -
    - {{!-- If you want TinyMCE editors to output inline rolls when rendered, you need to pass the actor's roll data to - the rollData property. --}} - - {{> "systems/daggerheart/templates/actor/parts/actor-description.hbs"}} -
    - - {{!-- Owned Items Tab --}} -
    - {{> "systems/daggerheart/templates/actor/parts/actor-loadout.hbs"}} -
    - - - {{!-- Owned Items Tab --}} -
    -
    -
    Coins
    -
    Handful
    -
    Bags
    -
    Chest
    -
    - {{> "systems/daggerheart/templates/actor/parts/actor-weapons.hbs"}} - {{> "systems/daggerheart/templates/actor/parts/actor-items.hbs"}} -
    - -
    - {{> "systems/daggerheart/templates/actor/parts/actor-leveling.hbs"}} -
    - -
    -
    - - -{{log system}} \ No newline at end of file diff --git a/templates/actor/actor-gm-sheet.hbs b/templates/actor/actor-gm-sheet.hbs deleted file mode 100644 index f0a3818..0000000 --- a/templates/actor/actor-gm-sheet.hbs +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    -
    - -
    - - - -
    -
    -
    - -
    - - - -
    -
    -
    - -
    \ No newline at end of file diff --git a/templates/actor/adversary-sheet.hbs b/templates/actor/adversary-sheet.hbs new file mode 100644 index 0000000..a8a4c15 --- /dev/null +++ b/templates/actor/adversary-sheet.hbs @@ -0,0 +1,203 @@ +
    +
    + + +
    +
    + + {{#if system.editMode}} + + {{else}} + {{{system.description}}} + {{/if}} + +
    +
    + + {{#if system.editMode}} + + {{else}} + {{system.tactics}} + {{/if}} +
    +
    + {{#if system.editMode}} + + +
    + + + +
    + {{else}} +
    +
    {{system.weapon.name}}
    +
    {{system.weapon.range}} - {{system.weapon.damage}} {{system.weapon.type}}
    +
    + {{/if}} +
    +
    + + +
    +
    + Features + + + +
    +
    + {{#each system.features as |feature key|}} +
    + {{#if ../system.editMode}} +
    +
    + + + + +
    + + + +
    +
    + + +
    + {{else}} +
    +
    + {{feature.name}} +
    + +
    +
    +
    {{feature.description}}
    +
    + {{/if}} + +
    + {{/each}} +
    +
    +
    +
    \ No newline at end of file diff --git a/templates/actor/character-sheet.hbs b/templates/actor/character-sheet.hbs new file mode 100644 index 0000000..c5a75dc --- /dev/null +++ b/templates/actor/character-sheet.hbs @@ -0,0 +1,17 @@ +
    +
    + +
    + {{> "systems/daggerheart/templates/actor/layout/header.hbs"}} +
    + +
    + {{> "systems/daggerheart/templates/actor/layout/content.hbs"}} +
    +
    + +
    \ No newline at end of file diff --git a/templates/actor/gm-sheet.hbs b/templates/actor/gm-sheet.hbs new file mode 100644 index 0000000..a191042 --- /dev/null +++ b/templates/actor/gm-sheet.hbs @@ -0,0 +1,20 @@ +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/templates/actor/layout/content.hbs b/templates/actor/layout/content.hbs new file mode 100644 index 0000000..ad7a0ba --- /dev/null +++ b/templates/actor/layout/content.hbs @@ -0,0 +1,14 @@ +
    +
    + {{> "systems/daggerheart/templates/actor/parts/character-loadout.hbs"}} +
    +
    + {{> "systems/daggerheart/templates/actor/parts/character-inventory.hbs"}} +
    +
    + {{> "systems/daggerheart/templates/actor/parts/character-leveling.hbs"}} +
    +
    + {{> "systems/daggerheart/templates/actor/parts/character-description.hbs"}} +
    +
    \ No newline at end of file diff --git a/templates/actor/layout/header.hbs b/templates/actor/layout/header.hbs new file mode 100644 index 0000000..6ea5ec7 --- /dev/null +++ b/templates/actor/layout/header.hbs @@ -0,0 +1,36 @@ +
    + +
    + +
    + {{#if actor.system.community}} + + {{/if}} + {{#if actor.system.ancestry}} + + {{/if}} + {{#if actor.system.class}} + + {{/if}} +
    + +
    + {{#each system.abilities as |ability key|}} +
    + + + {{!-- --}} + {{{checkbox (concat "system.abilities." key ".checked") ability.checked}}} +
    + {{/each}} +
    \ No newline at end of file diff --git a/templates/actor/layout/navigation.hbs b/templates/actor/layout/navigation.hbs new file mode 100644 index 0000000..e01dd76 --- /dev/null +++ b/templates/actor/layout/navigation.hbs @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/templates/actor/layout/sidebar.hbs b/templates/actor/layout/sidebar.hbs new file mode 100644 index 0000000..b1baa92 --- /dev/null +++ b/templates/actor/layout/sidebar.hbs @@ -0,0 +1,121 @@ + + + + + + + + + +
    + + + + + + + + +
    + + \ No newline at end of file diff --git a/templates/actor/parts/actor-card.hbs b/templates/actor/parts/actor-card.hbs deleted file mode 100644 index 69143d0..0000000 --- a/templates/actor/parts/actor-card.hbs +++ /dev/null @@ -1,31 +0,0 @@ -
    -
    -
    -
    {{item.name}}
    -
    {{item.system.domain}}
    -
    {{item.system.domainType}}
    -
    {{item.system.recall}}
    -
    -
    {{#if - item.system.active}} Deactivate {{else}} Activate - {{/if}}
    -
    -
    - - {{{item.system.feature}}} - -
    - -
    - - -
    - -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-description.hbs b/templates/actor/parts/actor-description.hbs deleted file mode 100644 index f9e9b7a..0000000 --- a/templates/actor/parts/actor-description.hbs +++ /dev/null @@ -1,66 +0,0 @@ -
    -
    -
    Description
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    Biography
    -
    - {{editor system.biography target="system.biography" button=true owner=owner editable=editable}} -
    - -
    -
    - - -
    -
    -
    Background Questions
    -
    - {{#each system.class.questions as |question key|}} -
    - - - - -
    - {{/each}} -
    -
    - -
    -
    Connections
    -
    - {{#each system.class.connections as |connections key|}} -
    - - - - -
    - {{/each}} -
    -
    -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-effects.hbs b/templates/actor/parts/actor-effects.hbs deleted file mode 100644 index 8dd7ad8..0000000 --- a/templates/actor/parts/actor-effects.hbs +++ /dev/null @@ -1,38 +0,0 @@ -
      - {{#each effects as |section sid|}} -
    1. -

      {{localize section.label}}

      -
      {{localize "DAGGERHEART.Effect.Source"}}
      -
      {{localize "EFFECT.TabDuration"}}
      - -
    2. - -
        - {{#each section.effects as |effect|}} -
      1. -
        - -

        {{effect.name}}

        -
        -
        {{effect.sourceName}}
        -
        {{effect.duration.label}}
        - -
      2. - {{/each}} -
      - {{/each}} -
    diff --git a/templates/actor/parts/actor-equipped.hbs b/templates/actor/parts/actor-equipped.hbs deleted file mode 100644 index f9bd4df..0000000 --- a/templates/actor/parts/actor-equipped.hbs +++ /dev/null @@ -1,58 +0,0 @@ -
    -
    -
    -
    - -
    -
    -
    -
    - {{item.name}} -
    -
    -
    - {{#if (eq item.type "weapon")}} - {{#if item.system.isSecondary}} Secondary {{else }}Primary {{/if}} - {{item.system.range}} Weapon - {{#if (eq item.system.burden "1H")}} One-Handed {{else}} Two-Handed {{/if}} - {{else}} - Armor Score - {{item.system.score}} - {{/if}} -
    -
    -
    -
    - {{#if (eq item.type "weapon")}} -
    {{item.abilityScorePrefix}}{{item.abilityScore}} - {{item.system.trait}}
    -
    {{item.system.damage}} {{item.system.type}}
    - {{/if}} -
    -
    -
    -
    - {{#if (eq item.type "weapon")}} -
    - {{ternary item.system.isEquipped "Unequip" "Equip"}} -
    - {{/if}} - {{#if (eq item.type "armor")}} -
    - {{ternary item.system.isEquipped "Unequip" "Equip"}} -
    - {{/if}} - -
    -
    - {{#if item.system.feature}} -
    - {{{item.system.feature}}} -
    - {{/if}} -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-exps.hbs b/templates/actor/parts/actor-exps.hbs deleted file mode 100644 index 2892b15..0000000 --- a/templates/actor/parts/actor-exps.hbs +++ /dev/null @@ -1,36 +0,0 @@ -
    -
    Experiences
    -
    -
    - -{{#each system.experiences as |exp key|}} -
    - - - - - - - -
    -{{/each}} \ No newline at end of file diff --git a/templates/actor/parts/actor-features.hbs b/templates/actor/parts/actor-features.hbs deleted file mode 100644 index e7c862a..0000000 --- a/templates/actor/parts/actor-features.hbs +++ /dev/null @@ -1,46 +0,0 @@ -
      -
    1. -
      {{localize 'Name'}}
      - -
    2. - {{#each features as |item id|}} -
    3. -
      -
      - - - -
      - -
      - -
    4. - {{/each}} -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-items.hbs b/templates/actor/parts/actor-items.hbs deleted file mode 100644 index 37b1376..0000000 --- a/templates/actor/parts/actor-items.hbs +++ /dev/null @@ -1,30 +0,0 @@ -
      -
    1. - {{localize 'Name'}} - -
    2. - - {{#each items as |item id|}} - {{#if (eq item.type "item")}} -
      -
      - -
      {{item.name}}
      -
      - -
      - {{/if}} - {{/each}} -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-leveling.hbs b/templates/actor/parts/actor-leveling.hbs deleted file mode 100644 index 1d3eb3e..0000000 --- a/templates/actor/parts/actor-leveling.hbs +++ /dev/null @@ -1,53 +0,0 @@ -
    -
    Level 2-4 At Level 2, take an additional - Experience.
    -
    {{{tier1.description}}}
    -
    - {{#each tier1.items as |levelOption key|}} -
    - - - - -
    {{levelOption.option}}
    - -
    - {{/each}} -
    -
    - -
    -
    Level 5-7 At Level 5, take an additional Experience - and clear all marks on Character Traits.
    -
    {{{tier2.description}}}
    -
    - {{#each tier2.items as |levelOption key|}} -
    - - - - -
    {{levelOption.option}}
    - -
    - {{/each}} -
    -
    - -
    -
    Level 8-10 At Level 8, take an additional - Experience and clear all marks on Character Traits.
    -
    {{{tier3.description}}}
    -
    - {{#each tier3.items as |levelOption key|}} -
    - - - - -
    {{levelOption.option}}
    - -
    - {{/each}} -
    -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-loadout.hbs b/templates/actor/parts/actor-loadout.hbs deleted file mode 100644 index b97f1d4..0000000 --- a/templates/actor/parts/actor-loadout.hbs +++ /dev/null @@ -1,104 +0,0 @@ -
    - {{#if hasCharacter}} - {{!-- --}} - {{/if}} -
    -
    Ancestry & Community
    -
    -
    -
    -
    -
    {{#if system.ancestry.name}} {{{system.ancestry.name}}} {{else}} Empty {{/if}} -
    -
    Ancestry
    -
    -
    -
    - {{#if system.ancestry.description}} {{{system.ancestry.description}}}

    {{/if}} - {{#if system.ancestry.name}} {{{system.ancestry.feature}}} {{else}} Select your ancestry {{/if}} - -
    - -
    -
    -
    -
    -
    -
    -
    {{#if system.community.name}} {{{system.community.name}}} {{else}} Empty {{/if}} -
    -
    Community
    -
    -
    -
    - {{#if system.community.description}} {{{system.community.description}}}

    {{/if}} - {{#if system.community.name}} {{{system.community.feature}}} {{else}} Select your community {{/if}} - -
    - -
    -
    -
    -
    -
    -
    -
    Class / Subclass Cards
    -
    - {{#each subclasses as |subclass key|}} -
    -
    -
    -
    {{subclass.name}} -
    -
    {{subclass.system.cardType}}
    -
    -
    -
    - {{{subclass.system.feature}}} -
    - -
    -
    -
    - {{/each}} -
    -
    - - -
    -
    Loadout
    -
    - {{#each active_loadout as |item id|}} - {{> "systems/daggerheart/templates/actor/parts/actor-card.hbs" item=item}} - {{/each}} -
    -
    -
    -
    -
    Vault - - - -
    -
    - {{#each vault as |item id|}} - {{> "systems/daggerheart/templates/actor/parts/actor-card.hbs" item=item}} - {{/each}} -
    -
    -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-spells.hbs b/templates/actor/parts/actor-spells.hbs deleted file mode 100644 index dfcde83..0000000 --- a/templates/actor/parts/actor-spells.hbs +++ /dev/null @@ -1,3 +0,0 @@ -
      - -
    \ No newline at end of file diff --git a/templates/actor/parts/actor-weapons.hbs b/templates/actor/parts/actor-weapons.hbs deleted file mode 100644 index 2f437f7..0000000 --- a/templates/actor/parts/actor-weapons.hbs +++ /dev/null @@ -1,35 +0,0 @@ -
    -
    - Equipped Items -
    - - -
    -
    -
    - {{#if primary}} - {{> "systems/daggerheart/templates/actor/parts/actor-equipped.hbs" item=primary}} - {{/if}} - - {{#if secondary}} - {{> "systems/daggerheart/templates/actor/parts/actor-equipped.hbs" item=secondary}} - {{/if}} - - {{#if armor}} - {{> "systems/daggerheart/templates/actor/parts/actor-equipped.hbs" item=armor}} - {{/if}} - -
    Inventory Armory
    -
    - {{#each weapons as |weapon key|}} -
    - {{> "systems/daggerheart/templates/actor/parts/actor-equipped.hbs" item=weapon}} - -
    - - {{/each}} - {{#each armors as |armor key|}} - {{> "systems/daggerheart/templates/actor/parts/actor-equipped.hbs" item=armor}} - {{/each}} -
    -
    \ No newline at end of file diff --git a/templates/actor/parts/character-card.hbs b/templates/actor/parts/character-card.hbs new file mode 100644 index 0000000..b503c87 --- /dev/null +++ b/templates/actor/parts/character-card.hbs @@ -0,0 +1,47 @@ +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + {{{card.system.feature}}} + +
    +
    +{{#each card.system.cardFeatures as |feature id|}} +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + {{{feature.description}}} + +
    +
    +{{/each}} \ No newline at end of file diff --git a/templates/actor/parts/character-description.hbs b/templates/actor/parts/character-description.hbs new file mode 100644 index 0000000..a6dab2c --- /dev/null +++ b/templates/actor/parts/character-description.hbs @@ -0,0 +1,59 @@ +
    + Looks +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + Questions +
    +
    + {{#each system.class.questions as |question key|}} +
    + + + + +
    + {{/each}} +
    +
    + Connections +
    +
    + {{#each system.class.connections as |connections key|}} +
    + + + + +
    + {{/each}} +
    +
    + Biography +
    +
    + {{editor system.biography target="system.biography" class="simple" owner=owner}} +
    \ No newline at end of file diff --git a/templates/actor/parts/character-domain-card.hbs b/templates/actor/parts/character-domain-card.hbs new file mode 100644 index 0000000..03c0af0 --- /dev/null +++ b/templates/actor/parts/character-domain-card.hbs @@ -0,0 +1,38 @@ +
    +
    +
    +
    {{card.system.level}}
    +
    +
    {{card.name}}
    +
    {{card.system.domainType}}
    +
    +
    + +
    +
    + {{card.system.domain}} +
    +
    + {{card.system.recall}} +
    +
    +
    + +
    + +
    +
    + {{{card.system.feature}}} + +
    +
    \ No newline at end of file diff --git a/templates/actor/parts/character-equipable.hbs b/templates/actor/parts/character-equipable.hbs new file mode 100644 index 0000000..2c2bc98 --- /dev/null +++ b/templates/actor/parts/character-equipable.hbs @@ -0,0 +1,46 @@ +
    + +
    +
    {{item.name}}
    +
    + {{#if (eq item.type "weapon")}} + {{#if item.system.isSecondary}} Secondary {{else }}Primary {{/if}} + {{item.system.range}} Weapon - {{#if (eq item.system.burden "1H")}} One-Handed {{else}} Two-Handed {{/if}} + {{else}} + Armor Score - {{item.system.score}} + {{/if}} +
    +
    +
    + {{#if (eq item.type "weapon")}} +
    + {{item.abilityScorePrefix}}{{item.abilityScore}} + {{item.system.trait}}
    +
    {{item.system.damage}} + {{item.system.type}}
    + {{/if}} +
    +
    + {{#if (eq item.type "weapon")}} +
    +
    + {{/if}} + {{#if (eq item.type "armor")}} +
    +
    + {{/if}} +
    +
    +
    {{{item.system.feature}}}
    + +
    +
    \ No newline at end of file diff --git a/templates/actor/parts/character-inventory.hbs b/templates/actor/parts/character-inventory.hbs new file mode 100644 index 0000000..6703d42 --- /dev/null +++ b/templates/actor/parts/character-inventory.hbs @@ -0,0 +1,36 @@ +{{#if (or equipment.primary equipment.secondary equipment.armor)}} +
    Active Items
    +{{/if}} +
    + {{log equipment}} + {{#if equipment.primary}} + {{> "systems/daggerheart/templates/actor/parts/character-equipable.hbs" item=equipment.primary}} + {{/if}} + + {{#if equipment.secondary}} + {{> "systems/daggerheart/templates/actor/parts/character-equipable.hbs" item=equipment.secondary}} + {{/if}} + + {{#if equipment.armor}} + {{> "systems/daggerheart/templates/actor/parts/character-equipable.hbs" item=equipment.armor}} + {{/if}} +
    + +
    + Items +
    {{{icon "plus"}}}
    +
    +{{#each gear as |item key|}} +{{#if (eq item.type "weapon")}} +{{> "systems/daggerheart/templates/actor/parts/character-equipable.hbs" item=item}} +{{/if}} + +{{#if (eq item.type "armor")}} +{{> "systems/daggerheart/templates/actor/parts/character-equipable.hbs" item=item}} +{{/if}} + +{{#if (eq item.type "item")}} +{{> "systems/daggerheart/templates/actor/parts/character-item.hbs" item=item}} +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/templates/actor/parts/character-item.hbs b/templates/actor/parts/character-item.hbs new file mode 100644 index 0000000..676dbba --- /dev/null +++ b/templates/actor/parts/character-item.hbs @@ -0,0 +1,18 @@ +
    +
    + +
    {{item.name}}
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/templates/actor/parts/character-leveling.hbs b/templates/actor/parts/character-leveling.hbs new file mode 100644 index 0000000..189783d --- /dev/null +++ b/templates/actor/parts/character-leveling.hbs @@ -0,0 +1,23 @@ +{{#each leveling as |tier key|}} +
    +
    + + +
    +
    + {{{tier.description}}} +
    +
    + {{#each tier.items as |levelOption key|}} +
    + + + +
    {{levelOption.option}}
    +
    + {{/each}} +
    +
    + +{{/each}} \ No newline at end of file diff --git a/templates/actor/parts/character-loadout.hbs b/templates/actor/parts/character-loadout.hbs new file mode 100644 index 0000000..b81c162 --- /dev/null +++ b/templates/actor/parts/character-loadout.hbs @@ -0,0 +1,27 @@ + + +
    +
    +
    + {{#each cards as |card key|}} + {{> "systems/daggerheart/templates/actor/parts/character-card.hbs" card=card}} + {{/each}} + +
    + +
    +
    + {{#each active_loadout as |card key|}} + {{> "systems/daggerheart/templates/actor/parts/character-domain-card.hbs" card=card}} + {{/each}} +
    +
    + {{#each vault as |card key|}} + {{> "systems/daggerheart/templates/actor/parts/character-domain-card.hbs" card=card}} + {{/each}} +
    +
    \ No newline at end of file diff --git a/templates/item/item-armor-sheet.hbs b/templates/item/item-armor-sheet.hbs index 8567766..0e64f9f 100644 --- a/templates/item/item-armor-sheet.hbs +++ b/templates/item/item-armor-sheet.hbs @@ -1,25 +1,21 @@ -
    -
    - -
    - -
    -
    - - -
    -
    - - -
    -
    -
    -
    + +
    +
    +
    - -
    - - +
    +
    + + +
    +
    + + +
    +
    + + {{editor system.feature target="system.feature" class="simple h150 white" owner=owner}} +
    \ No newline at end of file diff --git a/templates/item/item-card-sheet.hbs b/templates/item/item-card-sheet.hbs index e4230d7..80a141b 100644 --- a/templates/item/item-card-sheet.hbs +++ b/templates/item/item-card-sheet.hbs @@ -1,20 +1,41 @@ -
    - - {{!-- Sheet Body --}} -
    -
    - - + +
    + +
    + +
    -
    - - {{selectOptions cardTypes selected=system.cardType nameAttr="value" labelAttr="label"}}
    -
    - - {{{editor system.feature target="system.feature" button=true owner=owner editable=editable}}} +
    + + {{{editor system.feature target="system.feature" class="simple h150 white" button=true owner=owner + editable=editable}}}
    -
    +
    + Features +
    +
    +
    + {{log system.cardFeatures}} + {{#each system.cardFeatures as |feature key|}} +
    + + + + +
    + + + +
    +
    + + {{/each}} +
    +
    \ No newline at end of file diff --git a/templates/item/item-class-sheet.hbs b/templates/item/item-class-sheet.hbs index dd39c17..bde1d59 100644 --- a/templates/item/item-class-sheet.hbs +++ b/templates/item/item-class-sheet.hbs @@ -1,311 +1,72 @@ -
    + +
    +
    + + -
    -
    - -
    -
    - +
    +
    + + +
    +
    + +
    -
    - {{!-- --}} - - {{!-- --}} +
    + +
    -
    -
    - -
    -
    -

    Domains & Threshold

    -
    -
    - - {{#if system.editMode}} -
    - -
    - {{/if}} +
    + Add Domain +
    +
    -
    - {{log domains}} - {{log system.selectedDomains}} - {{#each system.selectedDomains as |domain key|}} -
    +
    +
    + {{#each system.selectedDomains as |domain key|}} +
    - + 112 {{selectOptions ../domains selected=domain.name}} - {{#if ../system.editMode}} -
    +
    - {{/if}} -
    - {{/each}} -
    -
    -
    -
    -
    -
    - - {{#if system.editMode}} - - {{else}} -
    {{system.defaultEvasion}}
    - {{/if}} -
    -
    - - {{#if system.editMode}} - - {{else}} -
    {{system.defaultThreshold.minor}}
    - {{/if}} -
    -
    - - {{#if system.editMode}} - - {{else}} -
    {{system.defaultThreshold.major}}
    - {{/if}} -
    -
    - - {{#if system.editMode}} - - {{else}} -
    {{system.defaultThreshold.severe}}
    - {{/if}} -
    -
    -
    -
    -

    - Class Features - {{#if system.editMode}} -
    - -
    - {{/if}} -

    -
    - {{#each system.classFeatures as |classFeature key|}} -
    - {{#if ../system.editMode}} -
    - -
    - -
    -
    - {{{editor classFeature.description target=(concat 'system.classFeatures.' key '.description')}}} - - delete - -
    - {{else}} -
    - -
    {{classFeature.name}}
    -
    {{{classFeature.description}}}
    -
    - {{/if}} -
    {{/each}}
    -
    -
    -
    -
    Background Questions
    - {{#if system.editMode}} -
    - -
    - {{/if}} -
    -
    - {{#each system.questions as |question key|}} -
    - {{#if ../system.editMode}} - - - - {{else}} -
    {{question.question}}
    - {{/if}} -
    - {{/each}} -
    -
    - -
    -
    -
    Connections
    - {{#if system.editMode}} -
    - -
    - {{/if}} +
    + +
    +
    + {{> "systems/daggerheart/templates/item/layout/class/stats.hbs"}}
    -
    - {{#each system.connections as |connection key|}} -
    - {{#if ../system.editMode}} - - - - {{else}} -
    {{connection.question}}
    - {{/if}} -
    - {{/each}} +
    + {{> "systems/daggerheart/templates/item/layout/class/leveling.hbs"}}
    -
    -
    -
    -
    -
    -
    -

    Level 2-4

    -
    At Level 2, take an additional Experience.
    - Add Item -
    -
    - {{#if system.editMode}} - - - {{editor system.tier1Description target="system.tier1Description" button=true rollData=rollData owner=owner - editable=editable}} - {{else}} -
    - {{{system.tier1Description}}} -
    - {{/if}} -
    -
    - {{> "systems/daggerheart/templates/item/parts/item-tier.hbs" tier=system.tier1 editMode=system.editMode - tierKey="tier1"}} -
    -
    - -
    -
    -

    Level 5-7

    -
    At Level 5, take an additional Experience and clear all marks on Character Traits. -
    - Add Item -
    - {{#if system.editMode}} - - - {{editor system.tier2Description target="system.tier2Description" button=true rollData=rollData owner=owner - editable=editable}} - {{else}} -
    - {{{system.tier2Description}}} -
    - {{/if}} -
    - {{> "systems/daggerheart/templates/item/parts/item-tier.hbs" tier=system.tier2 editMode=system.editMode - tierKey="tier2"}} -
    -
    -
    -
    -

    Level 8-10

    -
    At Level 8, take an additional Experience and clear all marks on Character Traits. -
    - Add Item -
    - {{#if system.editMode}} - - - {{editor system.tier3Description target="system.tier3Description" button=true rollData=rollData owner=owner - editable=editable}} - {{else}} -
    - {{{system.tier3Description}}} -
    - {{/if}} - -
    - {{> "systems/daggerheart/templates/item/parts/item-tier.hbs" tier=system.tier3 editMode=system.editMode - tierKey="tier3"}} -
    -
    -
    -
    - -
    -
    -
    Coins
    -
    Handful
    -
    Bags
    -
    Chest
    -
    -

    - Item -

    - -
    -
    A torch
    -
    50ft of rope
    -
    Basic supplies
    -
    - -

    - Item Choices -
    - +
    + {{> "systems/daggerheart/templates/item/layout/class/items.hbs"}}
    -

    - {{log system.choiceItems}} -
    - {{#each system.choiceItems as |item key|}} -
    -
    - - -
    -
    - - -
    - -
    - -
    +
    + {{> "systems/daggerheart/templates/item/layout/class/info.hbs"}}
    - {{/each}}
    + \ No newline at end of file diff --git a/templates/item/item-domain-sheet.hbs b/templates/item/item-domain-sheet.hbs index e6a9849..7c7d968 100644 --- a/templates/item/item-domain-sheet.hbs +++ b/templates/item/item-domain-sheet.hbs @@ -1,34 +1,37 @@ -
    -
    - -
    -

    + +
    + +
    + +
    -
    +
    + + +
    - {{!-- Sheet Body --}} -
    -
    -
    - - {{selectOptions domains selected=system.domain}}
    -
    - - + +
    + +
    -
    - - + +
    + +
    - -
    - - +
    + + {{editor system.feature target="system.feature" class="simple h150 white" owner=owner}}
    -
    +
    \ No newline at end of file diff --git a/templates/item/item-feature-sheet.hbs b/templates/item/item-feature-sheet.hbs index 2e10f31..aad2ebe 100644 --- a/templates/item/item-feature-sheet.hbs +++ b/templates/item/item-feature-sheet.hbs @@ -18,7 +18,7 @@ {{!-- Description Tab --}}
    - {{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}} + {{editor system.description target="system.description" owner=owner editable=editable}}
    {{!-- Attributes Tab --}} diff --git a/templates/item/item-weapon-sheet.hbs b/templates/item/item-weapon-sheet.hbs index 3874915..ac0afc2 100644 --- a/templates/item/item-weapon-sheet.hbs +++ b/templates/item/item-weapon-sheet.hbs @@ -1,65 +1,47 @@ -
    -
    - -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    + +
    +
    +
    - - -
    -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    +
    + +
    - - -
    - - +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + {{editor system.feature target="system.feature" class="simple h150 white" owner=owner}}
    \ No newline at end of file diff --git a/templates/item/layout/class/info.hbs b/templates/item/layout/class/info.hbs new file mode 100644 index 0000000..dc1df4e --- /dev/null +++ b/templates/item/layout/class/info.hbs @@ -0,0 +1,43 @@ +
    + Background Questions +
    + +
    +
    +
    + {{#each system.questions as |question key|}} +
    + + + +
    + {{/each}} +
    + +
    + Connections +
    + +
    +
    +
    + {{#each system.connections as |connection key|}} +
    + + + + +
    + {{/each}} +
    \ No newline at end of file diff --git a/templates/item/layout/class/items.hbs b/templates/item/layout/class/items.hbs new file mode 100644 index 0000000..cc40ac7 --- /dev/null +++ b/templates/item/layout/class/items.hbs @@ -0,0 +1,53 @@ +
    Starting Money
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + Item +
    + +
    +
    A torch
    +
    50ft of rope
    +
    Basic supplies
    +
    + +
    + Item Choices +
    + +
    +
    +
    + {{#each system.choiceItems as |item key|}} +
    +
    + + +
    +
    + + +
    + +
    + +
    +
    + {{/each}} +
    \ No newline at end of file diff --git a/templates/item/layout/class/leveling.hbs b/templates/item/layout/class/leveling.hbs new file mode 100644 index 0000000..21a870a --- /dev/null +++ b/templates/item/layout/class/leveling.hbs @@ -0,0 +1,64 @@ +
    +
    +
    Level 2-4
    +
    At Level 2, take an additional Experience.
    + +
    + Add Item +
    + + + {{editor system.tier1Description target="system.tier1Description" class="text-center simple" button=true + rollData=rollData + owner=owner editable=editable}} + +
    +
    + {{> "systems/daggerheart/templates/item/parts/item-tier.hbs" tier=system.tier1 editMode=system.editMode tierKey="tier1"}} +
    +
    +
    +
    +
    + Level 5-7 +
    +
    + At Level 5, take an additional Experience and clear all marks on Character Traits. +
    +
    + + Add Item + + + + {{editor system.tier2Description target="system.tier2Description" class="text-center simple" button=true + rollData=rollData + owner=owner editable=editable}} + +
    + {{> "systems/daggerheart/templates/item/parts/item-tier.hbs" tier=system.tier2 editMode=system.editMode tierKey="tier2"}} +
    +
    +
    +
    +
    + Level 8-10 +
    +
    + At Level 8, take an additional Experience and clear all marks on Character Traits. +
    + +
    + + Add Item + + + {{editor system.tier3Description target="system.tier3Description" class="text-center simple" button=true + rollData=rollData + owner=owner editable=editable}} + +
    + {{> "systems/daggerheart/templates/item/parts/item-tier.hbs" tier=system.tier3 editMode=system.editMode tierKey="tier3"}} +
    +
    \ No newline at end of file diff --git a/templates/item/layout/class/stats.hbs b/templates/item/layout/class/stats.hbs new file mode 100644 index 0000000..758e169 --- /dev/null +++ b/templates/item/layout/class/stats.hbs @@ -0,0 +1,16 @@ +
    Class Features +
    +{{#each system.classFeatures as |classFeature key|}} +
    + + +
    + {{{editor classFeature.description target=(concat 'system.classFeatures.' key '.description') button=true + class="simple h150 white"}}} +
    +
    + +
    +
    +{{/each}} \ No newline at end of file diff --git a/templates/item/parts/item-tier.hbs b/templates/item/parts/item-tier.hbs index 355a750..b393d5f 100644 --- a/templates/item/parts/item-tier.hbs +++ b/templates/item/parts/item-tier.hbs @@ -1,12 +1,8 @@ {{#each tier as |levelItem key|}} -
    - {{#if ../editMode}} - - - -
    - {{else}} -
    {{levelItem.option}}
    - {{/if}} -
    +
    + + + +
    +
    {{/each}} \ No newline at end of file