From 2f74f43f11a51ed73f4079a8a2d0c83899aadd60 Mon Sep 17 00:00:00 2001 From: Azmoria <65363489+Azmoria@users.noreply.github.com> Date: Thu, 27 Jul 2023 06:33:32 -0400 Subject: [PATCH] Feat - Custom Monster stat blocks using journals --- CombatTracker.js | 13 +- Journal.js | 4 +- Main.js | 8 +- MonsterStatBlock.js | 14 +- TokenMenu.js | 27 ++- TokensPanel.js | 47 ++++ abovevtt.css | 562 +++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 661 insertions(+), 14 deletions(-) diff --git a/CombatTracker.js b/CombatTracker.js index 61809d772..e3ca37e85 100644 --- a/CombatTracker.js +++ b/CombatTracker.js @@ -253,8 +253,8 @@ function init_combat_tracker(){ next=$("#combat_area tr").first() } next.attr('data-current','1'); - if($("#resizeDragMon:not(.hideMon)").length>0) { - $("[data-current][data-monster] button.openSheetCombatButton").click(); + if($("#resizeDragMon:not(.hideMon)").length>0 && $("[data-current] button.openSheetCombatButton").css('visibility') == 'visible') { + $("[data-current] button.openSheetCombatButton").click(); } let newTarget=$("#combat_area tr[data-current=1]").attr('data-target'); if(window.TOKEN_OBJECTS[currentTarget] != undefined){ @@ -651,12 +651,17 @@ function ct_add_token(token,persist=true,disablerolling=false){ if(!token.isPlayer()){ stat=$(''); - stat.click(function(){ + stat.click(function(){ + if(token.options.statBlock){ + let customStatBlock = window.JOURNAL.notes[token.options.statBlock].text; + load_monster_stat(undefined, undefined, customStatBlock); + return; + } load_monster_stat(token.options.monster, token.options.id); }); if(window.DM){ buttons.append(stat); - if(!token.isMonster()){ + if(!token.isMonster() && !token.options.statBlock){ stat.css("visibility", "hidden"); } diff --git a/Journal.js b/Journal.js index e47b96a35..d377f8b69 100644 --- a/Journal.js +++ b/Journal.js @@ -657,7 +657,7 @@ class JournalManager{ // matches "1d10", " 1d10 ", "1d10+1", " 1d10+1 ", "1d10 + 1" " 1d10 + 1 " const damageRollRegex = /(([0-9]+d[0-9]+)\s?([+-]\s?[0-9]+)?)/g // matches " +1 " or " + 1 " - const hitRollRegex = /\s([+-]\s?[0-9]+)\s|\(([+-]\s?[0-9]+)\)/g + const hitRollRegex = /(\s)([+-]\s?[0-9]+)(\s)|\(([+-]\s?[0-9]+)\)|(\;)([+-]\s?[0-9]+)(\&)/g const htmlNoSpaceHitRollRegex = />([+-]\s?[0-9]+)(\s?d[0-9]+\s?) $1 `) - .replaceAll(hitRollRegex, ` `) + .replaceAll(hitRollRegex, `$5$1$3$7`) .replaceAll(htmlNoSpaceHitRollRegex, `><`) .replaceAll(dRollRegex, ` `) .replaceAll(tableNoSpaceRollRegex, `><`) diff --git a/Main.js b/Main.js index 907068d4c..729bfcbe3 100644 --- a/Main.js +++ b/Main.js @@ -672,7 +672,13 @@ function should_use_iframes_for_monsters() { * @param {Number} monsterId given monster ID * @param {UUID} tokenId selected token ID */ -function load_monster_stat(monsterId, tokenId) { +function load_monster_stat(monsterId, tokenId, customStatBlock=undefined) { + if(customStatBlock){ + let container = build_draggable_monster_window(); + display_stat_block_in_container(customStatBlock, container, tokenId, customStatBlock); + $(".sidebar-panel-loading-indicator").hide(); + return; + } if(window.TOKEN_OBJECTS[tokenId].options.monster == 'open5e'){ let container = build_draggable_monster_window(); build_and_display_stat_block_with_id(window.TOKEN_OBJECTS[tokenId].options.stat, container, tokenId, function () { diff --git a/MonsterStatBlock.js b/MonsterStatBlock.js index 2efb8e385..72dd5d696 100644 --- a/MonsterStatBlock.js +++ b/MonsterStatBlock.js @@ -45,11 +45,15 @@ function build_and_display_stat_block_with_data(monsterData, container, tokenId, } } -function display_stat_block_in_container(statBlock, container, tokenId) { - const html = build_monster_stat_block(statBlock); +function display_stat_block_in_container(statBlock, container, tokenId, customStatBlock = undefined) { + const html = (customStatBlock) ? $(` +
${customStatBlock}
`) : build_monster_stat_block(statBlock); container.find("#noAccessToContent").remove(); // in case we're re-rendering with better data container.find(".avtt-stat-block-container").remove(); // in case we're re-rendering with better data container.append(html); + if(customStatBlock){ + window.JOURNAL.add_journal_roll_buttons(html); + } container.find("#monster-image-to-gamelog-link").on("click", function (e) { e.stopPropagation(); e.preventDefault(); @@ -58,9 +62,11 @@ function display_stat_block_in_container(statBlock, container, tokenId) { imgContainer.find("img").addClass("magnify"); send_html_to_gamelog(imgContainer[0].outerHTML); }); - container.find("div.image").append(statBlock.imageHtml()); + if(!customStatBlock) + container.find("div.image").append(statBlock.imageHtml()); container.find("a").attr("target", "_blank"); // make sure we only open links in new tabs - scan_monster(container, statBlock, tokenId); + if(!customStatBlock) + scan_monster(container, statBlock, tokenId); // scan_creature_pane(container, statBlock.name, statBlock.image); add_stat_block_hover(container); $("span.hideme").parent().parent().hide(); diff --git a/TokenMenu.js b/TokenMenu.js index c0a266cf5..4f7b49645 100644 --- a/TokenMenu.js +++ b/TokenMenu.js @@ -135,7 +135,20 @@ function token_context_menu_expanded(tokenIds, e) { close_token_context_menu(); }); body.append(button); - } else if (token.isMonster()) { + } + else if(token.options.statBlock){ + let button =$(''); + + button.click(function(){ + let customStatBlock = window.JOURNAL.notes[token.options.statBlock].text; + load_monster_stat(undefined, undefined, customStatBlock) + close_token_context_menu(); + }); + if(token.options.player_owned || window.DM){ + body.append(button); + } + } + else if (token.isMonster()) { let button = $(``); button.on("click", function() { load_monster_stat(token.options.monster, token.options.id); @@ -2319,7 +2332,17 @@ function add_to_quick_roll_menu(token){ ); qrm_entry_buttons.append(remove_from_list); - if(token.isMonster() == true){ + if(token.options.statBlock){ + stat_block=$(''); + + stat_block.click(function(){ + window.JOURNAL.display_note(token.options.statBlock); + }); + if(!token.isMonster()){ + stat_block.css("visibility", "hidden"); + } + } + else if(token.isMonster() == true){ stat_block=$(''); stat_block.click(function(){ diff --git a/TokensPanel.js b/TokensPanel.js index e8e96f509..dde331607 100644 --- a/TokensPanel.js +++ b/TokensPanel.js @@ -1634,6 +1634,50 @@ function display_token_configuration_modal(listItem, placedToken = undefined) { let imageUrlInput = sidebarPanel.build_image_url_input(determineLabelText(), addImageUrl); inputWrapper.append(imageUrlInput); + let has_note = customization.tokenOptions.statBlock; + let editNoteButton = $(``) + if(has_note){ + let viewNoteButton = $(``) + let deleteNoteButton = $(``) + editNoteButton = $(``) + inputWrapper.append(viewNoteButton); + inputWrapper.append(editNoteButton); + inputWrapper.append(deleteNoteButton); + viewNoteButton.off().on("click", function(){ + window.JOURNAL.display_note(customization.id); + }); + deleteNoteButton.off().on("click", function(){ + if(customization.id in window.JOURNAL.notes){ + delete window.JOURNAL.notes[customization.id]; + window.JOURNAL.persist(); + } + delete customization.tokenOptions.statBlock; + persist_token_customization(customization); + display_token_configuration_modal(listItem, placedToken) + }); + } + else { + inputWrapper.append(editNoteButton); + } + + editNoteButton.off().on("click", function(){ + if (!(customization.id in window.JOURNAL.notes)) { + window.JOURNAL.notes[customization.id] = { + title: customization.tokenOptions.name, + text: '', + plain: '', + player: true + } + customization.tokenOptions.statBlock = customization.id; + persist_token_customization(customization); + display_token_configuration_modal(listItem, placedToken); + } + window.JOURNAL.edit_note(customization.id); + }); if (listItem.isTypeMyToken()) { // MyToken name @@ -1681,6 +1725,7 @@ function display_token_configuration_modal(listItem, placedToken = undefined) { }); inputWrapper.append(imageScaleWrapper); + // border color if(listItem.isTypePC()){ customization.tokenOptions.color = color_from_pc_object(find_pc_by_player_id(listItem.id)); @@ -1704,6 +1749,8 @@ function display_token_configuration_modal(listItem, placedToken = undefined) { }; + + const specificBorderColorValue = (typeof customization.tokenOptions.color === "string" && customization.tokenOptions.color.length > 0); const borderColorToggle = build_toggle_input(specificBorderColorSetting, specificBorderColorValue, function (useSpecificColorKey, useSpecificColorValue) { diff --git a/abovevtt.css b/abovevtt.css index ae9d9a9b5..9395b5bb8 100644 --- a/abovevtt.css +++ b/abovevtt.css @@ -4232,7 +4232,76 @@ div#selectedTokensBorderRotationGrabberConnector, height: 100%; } +.sidebar-panel-footer button.custom-stat-buttons{ + appearance: none; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 1px; + background: #1b9af0; + border: none; + color: #fff; + align-self: stretch; + margin: 4px 0px 4px 0px; + padding: 10px; + width: 100%; + flex-grow: 0; + font-size: 16px; + color: #fff; +} + +.ability-block { + font-size: 14px; + display: flex; + flex-wrap: wrap; + margin: 10px 0; + color: #4f1300; +} +.ability-block__stat { + width: 30%; + padding: 5px 0; + text-align: center; +} + +.ability-block__heading { + font-weight: bold; +} + +.ability-block__data { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} + +.ability-block__modifier { + margin-left: 2px; +} +.mon-stat-block__meta { + font-style: italic; + margin-bottom: 15px; +} +.mon-stat-block__name { + color: #822000; + font-family: MrsEavesSmallCaps,Roboto,Open Sans,Helvetica,sans-serif; + font-size: 34px; + font-weight: 700; +} +.mon-stat-block__attribute, .mon-stat-block__feature { + color: #822000; + line-height: 1.2; + margin: 5px 0; +} +.mon-stat-block__name .mon-stat-block__name-link, +.mon-stat-block__name .mon-stat-block__name-link:active, +.mon-stat-block__name .mon-stat-block__name-link:hover, +.mon-stat-block__name .mon-stat-block__name-link:visited { + color: #822000; +} +.mon-stat-block__attribute-label, +.mon-stat-block__feature-label{ + font-weight: 700; +} #VTT{ z-index:2; } @@ -6617,7 +6686,7 @@ button.journal-view-button.journal-button { /** END TEMP new .text--quote-box type **/ -.note-text h6 { +.note-text h6, { font-size: 14px !important; font-weight: bold !important; } @@ -6739,6 +6808,492 @@ button.journal-view-button.journal-button { position: relative; border-image-source: var(--theme-read-aloud-border,url(https://media.dndbeyond.com/ddb-compendium-client/146117d0758df55ed5ff299b916e9bd1.png)) } +:root .custom-stat-block{ + --theme-page-fg-color: #242527; +} +/* END - Default text color */ +* .custom-stat-block{ + font-family: Roboto, Helvetica, sans-serif; +} + +.custom-stat-block .Basic-Text-Frame { + clear: both; + border: 1px solid #d4d0ce; + background: white; + padding: 15px +} + +@media(min-width: 768px) { + .custom-stat-block .Basic-Text-Frame { + -webkit-column-count:2; + column-count: 2 + } +} + +.custom-stat-block .Basic-Text-Frame-2 { + border: 1px solid #d4d0ce; + background: white; + padding: 15px +} + +@media(min-width: 768px) { + .custom-stat-block .Basic-Text-Frame-2 { + float:right; + margin: 30px 0 15px 20px; + width: 410px + } +} + +.custom-stat-block .Basic-Text-Frame-2 .compendium-image-center { + margin-bottom: 20px; + display: block +} + +.custom-stat-block .Basic-Text-Frame-3 { + border: 1px solid #d4d0ce; + background: white; + padding: 15px +} + +@media(min-width: 768px) { + .custom-stat-block .Basic-Text-Frame-3 { + float:left; + margin: 30px 20px 15px 0; + width: 410px + } +} + +.custom-stat-block .Basic-Text-Frame-3 .compendium-image-center { + margin-bottom: 20px; + display: block +} + +.custom-stat-block .Basic-Text-Frame, +.custom-stat-block .Basic-Text-Frame-2, +.custom-stat-block .Basic-Text-Frame-3 { + position: relative; + box-shadow: 0 0 5px #979AA4 +} + +.custom-stat-block .Basic-Text-Frame::before, +.custom-stat-block .Basic-Text-Frame::after, +.custom-stat-block .Basic-Text-Frame-2::before, +.custom-stat-block .Basic-Text-Frame-2::after, +.custom-stat-block .Basic-Text-Frame-3::before, +.custom-stat-block .Basic-Text-Frame-3::after { + content: ''; + background-image: url("../images/MMStatBar_lrg.jpg"); + background-size: 100% 100%; + background-position: center; + height: 4px; + display: inline-block; + position: absolute +} + +.custom-stat-block .Basic-Text-Frame::before, +.custom-stat-block .Basic-Text-Frame-2::before, +.custom-stat-block .Basic-Text-Frame-3::before { + left: -3px; + top: -3px; + right: -3px +} + +.custom-stat-block .Basic-Text-Frame::after, +.custom-stat-block .Basic-Text-Frame-2::after, +.custom-stat-block .Basic-Text-Frame-3::after { + left: -3px; + bottom: -3px; + right: -3px +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Title { + font-size: 18px!important; + font-family: "Roboto Condensed",Roboto,Helvetica,sans-serif; + text-transform: uppercase; + font-weight: bold; + line-height: 1.4!important; + margin-bottom: 0!important; + display: inline; + margin-right: 8px +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Metadata { + font-style: italic; + font-size: 14px!important; + line-height: 1.4!important; + margin-bottom: 8px!important +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Metadata::after { + content: ""; + display: block; + border-bottom: 2px solid #bc0f0f; + padding-top: 5px +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Bar-Object-Space, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Bar-Object-Space-Last { + display: none +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Data, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Data-Last, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Body, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Hanging, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Hanging-Last, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Body-Last--apply-before-heading- { + font-size: 14px!important; + line-height: 1.4!important; + margin-bottom: 10px!important +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Heading, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Heading--after-last-bar- { + font-size: 16px!important; + font-weight: bold; + font-family: "Roboto Condensed",Roboto,Helvetica,sans-serif +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Heading::after, +.custom-stat-block .Stat-Block-Styles_Stat-Block-Heading--after-last-bar-::after { + content: ""; + display: block; + border-bottom: 1px solid #bc0f0f; + padding-top: 2px +} + +.custom-stat-block .Stat-Block-Styles_Stat-Block-Data-Last { + border-bottom: 2px solid #bc0f0f; + padding-bottom: 10px +} + +.custom-stat-block .stat-block-ability-scores { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + border-top: 2px solid #bc0f0f; + border-bottom: 2px solid #bc0f0f; + margin: 10px 0 +} + +.custom-stat-block .stat-block-ability-scores-stat { + width: 33.33333%; + padding: 10px 5px; + text-align: center +} +/* START - New quote box implementation */ +[class*='MessageContainer'] .tooltip-body{ + padding: 0px; + width: 265px; + overflow-wrap: anywhere; +} + + +.custom-stat-block .text--quote-box { + display: block !important; + background-color: var(--compendium-quote-box-color, #FAF8EC) !important; /*Fallback: if the variable isn't declared, it'll default to pale yellow*/ + padding: 20px 25px 15px 25px !important; + position: relative !important; + width: auto !important; + display: flex !important; + flex-direction: column !important; + overflow: visible !important; + border-radius: 0 !important; + border-left: 1px solid !important; + border-right: 1px solid !important; + border-color: var(--compendium-quote-box-border, #620000) !important; /*Fallback: if the variable isn't declared, it'll default to dark red*/ + border-top: 0; + border-bottom: 0; + color: var(--theme-page-fg-color, #242527) !important; + margin: 40px 20px !important; + line-height: 1.6 !important; + font-size: 14px !important; +} +.custom-stat-block .text--quote-box::before { + top: -4px !important; +} +.custom-stat-block .text--quote-box::before, +.custom-stat-block .text--quote-box::after { + content: ''; + border-radius: 50%; + background-position: left !important; + background-size: contain !important; + background-repeat: no-repeat !important; + height: 8px !important; + width: 8px !important; + left: -4px !important; + position: absolute !important; + background-color: var(--compendium-quote-box-corner, #620000); +} + .custom-stat-block .text--quote-box::after { + bottom: -4px !important; +} + .custom-stat-block .text--quote-box p:first-of-type::before { + top: -4px !important; +} + .custom-stat-block .text--quote-box p:first-of-type::before, + .custom-stat-block .text--quote-box p:last-of-type::after { + content: ''; + border-radius: 50%; + background-position: right !important; + background-size: contain !important; + background-repeat: no-repeat !important; + height: 8px !important; + width: 8px !important; + right: -4px !important; + position: absolute !important; + background-color: var(--compendium-quote-box-corner, #620000); +} + .custom-stat-block .text--quote-box p:last-of-type::after { + bottom: -4px !important; +} + .custom-stat-block .text--quote-box p:last-of-type { + margin-bottom: 5px !important; +} +/* END - New quote box implementation */ + +/* START - New rules sidebar implementation */ +.custom-stat-block .text--rules-sidebar { + display: block !important; + background-color: var(--compendium-rules-sidebar-color, #DAE4C1) !important; /*Fallback: if the variable isn't declared, it'll default to pale-green*/ + position: relative !important; + width: auto !important; + display: flex !important; + flex-direction: column !important; + overflow: visible !important; + margin: 30px 5px !important; + line-height: 1.6 !important; + font-size: 14px !important; + padding: 25px 28px 15px 30px !important; + border-radius: 0 !important; + border-top: 3px solid #231f20 !important; + border-bottom: 3px solid #231f20 !important; + border-left: 1.5px solid #b3b3b3 !important; + border-right: 1.5px solid #b3b3b3 !important; + color: var(--theme-page-fg-color, #242527) !important; + filter: drop-shadow(0px 5px 8px #ccc); +} + +.custom-stat-block .text--rules-sidebar p:first-of-type { + text-transform: uppercase; + font-weight: bold; + font-size: 16px; +} + +.custom-stat-block .text--rules-sidebar .action-tooltip, +.custom-stat-block .text--rules-sidebar .condition-tooltip, +.custom-stat-block .text--rules-sidebar .item-tooltip, +.custom-stat-block .text--rules-sidebar .rule-tooltip, +.custom-stat-block .text--rules-sidebar .sense-tooltip, +.custom-stat-block .text--rules-sidebar .skill-tooltip, +.custom-stat-block .text--rules-sidebar .weapon-properties-tooltip, +.custom-stat-block .text--rules-sidebar .action-tooltip { + color: #129b54 !important; +} + +.custom-stat-block .text--rules-sidebar::before { + top: -13px !important; + right: 0.1px !important; + left: 0.1px !important; +} + +.custom-stat-block .text--rules-sidebar::before { + content: ''; + background-image: url("https://media.dndbeyond.com/compendium-images/components/--right-rules.svg"),url("https://media.dndbeyond.com/compendium-images/components/--left-rules.svg") !important; + background-position: left, right !important; + background-size: contain !important; + background-repeat: no-repeat !important; + height: 11px !important; + position: absolute !important; + z-index: -1; +} + +.custom-stat-block .text--rules-sidebar::after { + bottom: -13px !important; + right: -0.1px !important; + left: 0.1px !important; +} +.custom-stat-block .text--rules-sidebar::after { + content: ''; + background-image: url("https://media.dndbeyond.com/compendium-images/components/--right-rules.svg"),url("https://media.dndbeyond.com/compendium-images/components/--left-rules.svg") !important; + background-position: left, right !important; + background-size: contain !important; + background-repeat: no-repeat !important; + height: 11px !important; + position: absolute !important; + z-index: -1; + transform: scaleY(-1); +} +/* END - New rules sidebar implementation */ + +/* START - CSS header variables */ +.custom-stat-block h1::after { + background-color: var(--h1-underline, var(--header-underline, #47D18C)); +} +.custom-stat-block h2::after { + background-color: var(--h2-underline, var(--header-underline, #47D18C)); +} +.custom-stat-block h3::after { + background-color: var(--h3-underline, var(--header-underline, #47D18C)); +} +/* END - CSS header variables */ + +/* START - Underlines compendium links */ +.custom-stat-block a:not(.ddb-lightbox-outer, h3 > a):hover, +.custom-stat-block a:not(.ddb-lightbox-outer, h3 > a):focus { + text-decoration: underline; +} +/* END - Underlines Compendium links */ + + +/** TEMP new .text--quote-box type for compendium content - needs to be added to compiled **/ + +.custom-stat-block .text--quote-box.compendium-indented-callout-.text--quote-box { + background: transparent !important; + font-size: 16px !important; + border-left: 4px solid #e0dcdc !important; + border-right: none !important; + padding: 10px 20px !important; + margin: 30px 0 !important; +} + +.custom-stat-block .text--quote-box.compendium-indented-callout-.text--quote-box::before { + content: none !important; +} + +.custom-stat-block .text--quote-box.compendium-indented-callout-.text--quote-box::after { + content: none !important; +} + +/** END TEMP new .text--quote-box type **/ + + +.custom-stat-block h6, { + font-size: 14px !important; + font-weight: bold !important; +} + + +.custom-stat-block h1 { + font-size: 32px!important; + font-weight: 400!important +} + +.custom-stat-block h2 { + font-size: 26px!important; + font-weight: 400!important; + clear: both +} + +.custom-stat-block h3 { + font-size: 22px!important; + font-weight: 400!important; + clear: both +} + +.custom-stat-block h4 { + font-size: 18px!important; + font-weight: 700!important +} + +.custom-stat-block h5 { + font-size: 16px!important; + font-weight: 700!important +} + + +.custom-stat-block .rules-text a { + color: #129b54!important; + transition: .3s +} + +.custom-stat-block .rules-text p:first-child { + font-size: 16px +} + + +.custom-stat-block .stat-block-background { + background-repeat: no-repeat; + -webkit-box-shadow: 0 5px 8px 0 #aaa; + -moz-box-shadow: 0 5px 8px 0 #aaa; + box-shadow: 0 5px 8px 0 #aaa; + background-position: top!important; + background-image: url(https://media-stg.dndbeyond.com/compendium-images/tcoe/0gqawlEa2tjXGxpc/mm_statbg_sm.jpg)!important +} + +.custom-stat-block .stat-block-background:after, +.custom-stat-block .stat-block-background:before { + background-image: url(https://media-stg.dndbeyond.com/compendium-images/cm/c43LH2y2Gcaxb3V2/MMStatBar_lrg.png)!important +} + + +.custom-stat-block .block-torn-paper, +.custom-stat-block .epigraph, +.custom-stat-block .epigraph--with-author { + overflow: auto; + background: var(--theme-quote-bg-color,#fff); + color: var(--theme-quote-fg-color,#242527); + margin: 40px 0; + line-height: 1.6; + font-size: 14px; + border: solid transparent; + border-width: 20px 10px; + border-image-source: var(--theme-quote-border,url(https://media.dndbeyond.com/ddb-compendium-client/5f1f1d66d16be68cf09d6ca172f8df92.png)); + border-image-repeat: repeat; + border-image-slice: 20 10 20 10 fill; + padding: 10px; + position: relative +} + +.custom-stat-block .epigraph--with-author p:last-child { + font-style: italic; + text-align: right +} + +.custom-stat-block .rules-text { + overflow: auto; + display: block; + margin: 30px 0; + line-height: 1.6; + font-size: 14px; + color: var(--theme-rules-text-fg-color,#242527); + border-color: transparent; + border-style: solid; + border-width: 15px 20px; + border-image-repeat: repeat; + border-image-slice: 21 30 21 30 fill; + background-color: transparent; + padding: 20px 10px 10px; + position: relative; + border-image-source: var(--theme-rules-text-border,url(https://media.dndbeyond.com/ddb-compendium-client/463d4668370589a1a73886611645df7e.png)); + -webkit-filter: drop-shadow(0 5px 8px #ccc); + filter: drop-shadow(0 5px 8px #ccc) +} + +.custom-stat-block .rules-text p:first-child { + text-transform: uppercase; + font-weight: 700 +} + +.custom-stat-block .read-aloud-text { + overflow: auto; + display: block; + margin: 30px 0; + line-height: 1.6; + font-size: 14px; + color: var(--theme-read-aloud-fg-color,#242527); + border: 8px solid transparent; + border-image-repeat: repeat; + border-image-slice: 8 8 8 8 fill; + background-color: transparent; + padding: 20px 20px 10px!important; + position: relative; + border-image-source: var(--theme-read-aloud-border,url(https://media.dndbeyond.com/ddb-compendium-client/146117d0758df55ed5ff299b916e9bd1.png)) +} +/* end Note ddb styling*/ /* end Note ddb styling*/ @@ -6801,6 +7356,11 @@ button.journal-view-button.journal-button { box-shadow: 1px 1px 1px 0px #00000047; text-transform: uppercase; } +.custom-stat-block{ + width: 100%; + height: calc(100% - 25px); + background: #fff; +} .general_input{ border-width: 2px; border-radius: 2px;