From aff5998a451ec007d15197d198941269314893e5 Mon Sep 17 00:00:00 2001 From: Dapoolp Date: Sat, 2 Aug 2025 03:16:59 +0200 Subject: [PATCH] Deleting old templates --- daggerheart.mjs | 2 + lang/en.json | 3 + module/applications/ui/chatLog.mjs | 31 +- module/data/action/damageAction.mjs | 1 - module/dice/damageRoll.mjs | 16 +- module/dice/dhRoll.mjs | 18 +- module/documents/actor.mjs | 4 +- module/enrichers/DualityRollEnricher.mjs | 5 +- styles/less/ui/chat/chat-temp.less | 341 ---------------------- styles/less/ui/chat/chat.less | 355 ++++++++++++++++++++++- styles/less/ui/chat/theme-colorful.less | 195 ------------- styles/less/ui/index.less | 5 +- templates/ui/chat/damage-roll.hbs | 11 - templates/ui/chat/duality-roll-temp.hbs | 176 ----------- templates/ui/chat/duality-roll.hbs | 223 -------------- templates/ui/chat/foundryRoll.hbs | 14 + templates/ui/chat/foundryRollTooltip.hbs | 19 ++ templates/ui/chat/healing-roll.hbs | 33 --- templates/ui/chat/parts/button-part.hbs | 2 +- templates/ui/chat/parts/damage-part.hbs | 2 +- templates/ui/chat/parts/target-part.hbs | 6 +- 21 files changed, 447 insertions(+), 1015 deletions(-) delete mode 100644 styles/less/ui/chat/chat-temp.less delete mode 100644 styles/less/ui/chat/theme-colorful.less delete mode 100644 templates/ui/chat/damage-roll.hbs delete mode 100644 templates/ui/chat/duality-roll-temp.hbs delete mode 100644 templates/ui/chat/duality-roll.hbs create mode 100644 templates/ui/chat/foundryRoll.hbs create mode 100644 templates/ui/chat/foundryRollTooltip.hbs delete mode 100644 templates/ui/chat/healing-roll.hbs diff --git a/daggerheart.mjs b/daggerheart.mjs index a41fadcd..025dde3a 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -56,6 +56,8 @@ Hooks.once('init', () => { }; CONFIG.Dice.rolls = [...CONFIG.Dice.rolls, DHRoll, DualityRoll, D20Roll, DamageRoll]; + Roll.CHAT_TEMPLATE = "systems/daggerheart/templates/ui/chat/foundryRoll.hbs"; + Roll.TOOLTIP_TEMPLATE = "systems/daggerheart/templates/ui/chat/foundryRollTooltip.hbs"; CONFIG.MeasuredTemplate.objectClass = placeables.DhMeasuredTemplate; const { DocumentSheetConfig } = foundry.applications.apps; diff --git a/lang/en.json b/lang/en.json index 57d0fafc..e15c9af5 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2197,6 +2197,9 @@ "deathMove": { "title": "Death Move" }, + "dicePool": { + "title": "Dice Pool" + }, "domainCard": { "title": "Domain Card" }, diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index 30a83f77..9e07c050 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -33,6 +33,9 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo html.querySelectorAll('.duality-action-effect').forEach(element => element.addEventListener('click', event => this.onApplyEffect(event, data.message)) ); + html.querySelectorAll('.simple-roll-button').forEach(element => + element.addEventListener('click', event => this.onRollSimple(event, data.message)) + ); html.querySelectorAll('.target-container').forEach(element => { element.addEventListener('mouseenter', this.hoverTarget); element.addEventListener('mouseleave', this.unhoverTarget); @@ -211,7 +214,6 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo async onDamage(event, message) { event.stopPropagation(); const { isHit, targets } = this.getTargetList(event, message); - console.log(message, isHit, targets) if (message.system.onSave && isHit) { const pendingingSaves = message.system.targets.filter( @@ -251,6 +253,33 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo } } + async onRollSimple(event, message) { + const buttonType = event.target.dataset.type ?? 'damage', + total = message.rolls.reduce((a,c) => a + Roll.fromJSON(c).total, 0), + damages = { + 'hitPoints': { + parts: [ + { + applyTo: 'hitPoints', + damageTypes: [], + total + } + ] + } + }, + targets = Array.from(game.user.targets); + + if (targets.length === 0) + return ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected')); + + targets.forEach(target => { + if(buttonType === 'healing') + target.actor.takeHealing(damages); + else + target.actor.takeDamage(damages); + }) + } + /** * Toggle visibility of target containers. * @param {MouseEvent} event diff --git a/module/data/action/damageAction.mjs b/module/data/action/damageAction.mjs index ba0a6c7a..ee47df00 100644 --- a/module/data/action/damageAction.mjs +++ b/module/data/action/damageAction.mjs @@ -32,7 +32,6 @@ export default class DHDamageAction extends DHBaseAction { } async rollDamage(event, data) { - // console.log(data) const systemData = data.system ?? data; let formulas = this.damage.parts.map(p => ({ diff --git a/module/dice/damageRoll.mjs b/module/dice/damageRoll.mjs index 01266984..d6321105 100644 --- a/module/dice/damageRoll.mjs +++ b/module/dice/damageRoll.mjs @@ -11,7 +11,6 @@ export default class DamageRoll extends DHRoll { static DefaultDialog = DamageDialog; static async buildEvaluate(roll, config = {}, message = {}) { - console.log(roll,config) if (config.evaluate !== false) for (const roll of config.roll) await roll.roll.evaluate(); @@ -33,6 +32,21 @@ export default class DamageRoll extends DHRoll { }; } + static async buildPost(roll, config, message) { + if (game.modules.get('dice-so-nice')?.active) { + const pool = foundry.dice.terms.PoolTerm.fromRolls( + Object.values(config.damage).flatMap(r => r.parts.map(p => p.roll)) + ), + diceRoll = Roll.fromTerms([pool]); + await game.dice3d.showForRoll(diceRoll, game.user, true); + } + await super.buildPost(roll, config, message); + if (config.source?.message) { + const chatMessage = ui.chat.collection.get(config.source.message); + chatMessage.update({ 'system.damage': config.damage }); + } + } + static unifyDamageRoll(rolls) { const unified = {}; rolls.forEach(r => { diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index e3c42b30..6fd69c1d 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -64,24 +64,8 @@ export default class DHRoll extends Roll { } // Create Chat Message - // if (roll instanceof CONFIG.Dice.daggerheart.DamageRoll && Object.values(config.roll)?.length) { - // const pool = foundry.dice.terms.PoolTerm.fromRolls( - // Object.values(config.roll).flatMap(r => r.parts.map(p => p.roll)) - // ); - // roll = Roll.fromTerms([pool]); - // } - if (config.source?.message) { - if (game.modules.get('dice-so-nice')?.active) await game.dice3d.showForRoll(roll, game.user, true); - const chatMessage = ui.chat.collection.get(config.source.message); - chatMessage.update({ 'system.damage': config.damage }); - } else { - console.log(roll, config) + if (!config.source?.message) config.message = await this.toMessage(roll, config); - // if(roll._evaluated) { - // const cls = getDocumentClass('ChatMessage'); - // await cls.create(config.message, { rollMode: config.selectedRollMode }); - // } - } } static postEvaluate(roll, config = {}) { diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index dad36ec7..ef968b47 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -541,12 +541,12 @@ export default class DhpActor extends Actor { } canResist(type, resistance) { - if (!type) return 0; + if (!type?.length) return false; return type.every(t => this.system.resistance[t]?.[resistance] === true); } getDamageTypeReduction(type) { - if (!type) return 0; + if (!type?.length) return 0; const reduction = Object.entries(this.system.resistance).reduce( (a, [index, value]) => (type.includes(index) ? Math.min(value.reduction, a) : a), Infinity diff --git a/module/enrichers/DualityRollEnricher.mjs b/module/enrichers/DualityRollEnricher.mjs index 4a6fac23..360b08ae 100644 --- a/module/enrichers/DualityRollEnricher.mjs +++ b/module/enrichers/DualityRollEnricher.mjs @@ -93,9 +93,8 @@ export const enrichedDualityRoll = async ( advantage, type: reaction ? 'reaction' : null }, - chatMessage: { - template: 'systems/daggerheart/templates/ui/chat/duality-roll.hbs' - } + type: 'trait', + hasRoll: true }; if (target) { diff --git a/styles/less/ui/chat/chat-temp.less b/styles/less/ui/chat/chat-temp.less deleted file mode 100644 index 676780ed..00000000 --- a/styles/less/ui/chat/chat-temp.less +++ /dev/null @@ -1,341 +0,0 @@ -@import '../../utils/colors.less'; - -.chat-message { - --text-color: light-dark(@dark-blue, @golden); - --bg-color: light-dark(@dark-blue-40, @golden-40); - - &.duality { - &.hope { - --text-color: @golden; - --bg-color: @golden-40; - .message-header, .message-content { - background-color: @golden-bg; - } - } - - &.fear { - --text-color: @chat-blue; - --bg-color: @chat-blue-40; - .message-header, .message-content { - background-color: @chat-blue-bg; - } - } - - &.critical { - --text-color: @chat-purple; - --bg-color: @chat-purple-40; - .message-header, .message-content { - background-color: @chat-purple-bg; - } - } - } - - .chat-roll { - font-size: var(--font-size-12); - padding: 0 20px; - - > .roll-part-header { - font-size: var(--font-size-14); - } - - .roll-part-header { - display: grid; - grid-template-columns: 1fr auto 1fr; - align-items: center; - color: light-dark(@dark, @beige); - margin: 5px 0; - - span { - display: flex; - align-items: center; - gap: 5px; - text-transform: capitalize; - padding: 0 10px; - } - - &:before, &:after { - content: ' '; - height: 1px; - } - - &:before { - background: linear-gradient(90deg,rgba(0, 0, 0, 0) 0%, var(--text-color) 100%); - } - - &:after { - background: linear-gradient(90deg,var(--text-color) 0%, rgba(0, 0, 0, 0) 100%); - } - } - - .roll-part-extra { - display: flex; - justify-content: center; - align-items: center; - gap: 10px; - margin-top: 8px; - } - - .roll-part-content { - display: flex; - flex-direction: column; - align-items: center; - gap: 5px; - padding: 5px 0; - - .dice-tooltip { - width: 100%; - - .wrapper { - display: flex; - flex-direction: column; - gap: 10px; - - > :first-child:not(.target-selector) { - margin-top: 5px; - } - - > :last-child { - margin-bottom: 5px; - } - } - } - - .roll-result-container { - display: flex; - justify-content: center; - gap: 10px; - color: var(--text-color); - font-weight: 700; - font-family: 'Cinzel', sans-serif; - - .roll-result-value { - font-size: var(--font-size-24); - } - - .roll-result-desc { - font-size: var(--font-size-16); - margin-top: 2px; - } - } - - .roll-difficulty { - margin-top: -5px; - } - - .roll-dice { - display: flex; - align-items: center; - justify-content: center; - gap: 5px; - font-weight: 700; - font-family: 'Cinzel', sans-serif; - flex-wrap: wrap; - - .roll-die { - display: flex; - flex-direction: column; - gap: 3px; - - label { - text-align: center; - height: var(--font-size-12); - } - - > div { - display: flex; - align-items: center; - justify-content: center; - gap: 5px; - // font-size: var(--font-size-20); - } - } - } - - fieldset { - display: flex; - flex-direction: column; - gap: 10px; - border-color: var(--text-color); - border-radius: 5px; - - legend { - display: flex; - align-items: center; - gap: 10px; - padding: 0 5px; - color: var(--text-color); - } - } - - .target-selector { - + .roll-part-extra { - margin: 0; - } - - .target-choice { - display: flex; - font-size: var(--font-size-14); - color: var(--text-color); - padding: 5px 0; - - .button-target-selection { - flex: 1; - text-align: center; - } - - .button-target-selection:hover, .target-selected { - font-weight: bold; - text-shadow: 0px 0px 8px var(--text-color); - } - } - } - - i { - text-align: center; - } - - .roll-target { - display: flex; - width: 100%; - gap: 10px; - align-items: center; - - .target-img { - border-radius: 50%; - width: 40px; - height: 40px; - object-fit: cover; - } - - .target-data { - flex: 1; - } - - .target-save { - display: flex; - align-items: center; - justify-content: center; - width: 22px; - height: 22px; - &:hover > i { - scale: 1.2; - } - - i { - &.fa-check { - color: @green; - } - &.fa-xmark { - color: @medium-red; - } - } - } - } - } - - .roll-formula { - background-color: var(--bg-color); - color: var(--text-color); - border-radius: 4px; - padding: 3px 5px; - width: fit-content; - margin: auto; - } - - .roll-difficulty, .target-hit-status { - color: @green; - background-color: @green-10; - border: 1px solid currentColor; - border-radius: 4px; - padding: 3px 5px; - text-transform: uppercase; - font-weight: 600; - - &.is-miss { - color: @medium-red; - background-color: @medium-red-10; - } - } - - .target-hit-status { - width: fit-content; - margin-top: 2px; - } - - div[data-action="expandRoll"] { - .roll-part-header > div > span { - &:before, &:after { - content: '\f078'; - font-family: var(--font-awesome); - color: var(--text-color); - transition: all 0.3s ease; - } - } - - .on-reduced { - display: grid; - overflow: hidden; - grid-template-rows: 1fr; - transition: grid-template-rows 250ms ease; - - .wrapper { - display: flex; - gap: 10px; - overflow: hidden; - } - } - - &.expanded { - .roll-part-header > div > span { - &:before, &:after { - transform: rotate(180deg); - } - } - - .on-reduced { - grid-template-rows: 0fr; - } - } - } - - .roll-part + .roll-part { - margin-top: 0; - } - } - - .target-section { - .roll-part-content { - gap: 10px; - } - - .roll-part-extra { - position: relative; - - .target-pending-saves { - display: flex; - align-items: center; - justify-content: center; - height: 25px; - width: 25px; - &.is-absolute { - position: absolute; - bottom: 0; - right: 0; - } - } - } - } - - .roll-buttons { - display: flex; - gap: 5px; - margin-top: 8px; - button { - flex: 1; - } - } - - .font-20 { - font-size: var(--font-size-20); - } -} \ No newline at end of file diff --git a/styles/less/ui/chat/chat.less b/styles/less/ui/chat/chat.less index 5c448a8f..874f0b25 100644 --- a/styles/less/ui/chat/chat.less +++ b/styles/less/ui/chat/chat.less @@ -11,7 +11,7 @@ } } - &.roll { + /* &.roll { .dice-flavor { text-align: center; font-weight: bold; @@ -336,7 +336,7 @@ &:not(.expanded) .dice-tooltip { grid-template-rows: 0fr; } - } + } */ button { &.inner-button { @@ -363,3 +363,354 @@ } } } + +.daggerheart { + .chat-message { + --text-color: light-dark(@dark-blue, @golden); + --bg-color: light-dark(@dark-blue-40, @golden-40); + + &.duality { + &.hope { + --text-color: @golden; + --bg-color: @golden-40; + .message-header, .message-content { + background-color: @golden-bg; + } + } + + &.fear { + --text-color: @chat-blue; + --bg-color: @chat-blue-40; + .message-header, .message-content { + background-color: @chat-blue-bg; + } + } + + &.critical { + --text-color: @chat-purple; + --bg-color: @chat-purple-40; + .message-header, .message-content { + background-color: @chat-purple-bg; + } + } + } + + .chat-roll { + font-size: var(--font-size-12); + padding: 0 20px; + + > .roll-part-header { + font-size: var(--font-size-14); + } + + .roll-part-header { + display: grid; + grid-template-columns: 1fr auto 1fr; + align-items: center; + color: light-dark(@dark, @beige); + margin: 5px 0; + + span { + display: flex; + align-items: center; + gap: 5px; + text-transform: capitalize; + padding: 0 10px; + } + + &:before, &:after { + content: ' '; + height: 1px; + } + + &:before { + background: linear-gradient(90deg,rgba(0, 0, 0, 0) 0%, var(--text-color) 100%); + } + + &:after { + background: linear-gradient(90deg,var(--text-color) 0%, rgba(0, 0, 0, 0) 100%); + } + } + + .roll-part-extra { + display: flex; + justify-content: center; + align-items: center; + gap: 10px; + margin-top: 8px; + } + + .roll-part-content { + display: flex; + flex-direction: column; + align-items: center; + gap: 5px; + padding: 5px 0; + + .dice-tooltip { + width: 100%; + + .wrapper { + display: flex; + flex-direction: column; + gap: 10px; + + > :first-child:not(.target-selector) { + margin-top: 5px; + } + + > :last-child { + margin-bottom: 5px; + } + } + } + + .roll-result-container { + display: flex; + justify-content: center; + gap: 10px; + color: var(--text-color); + font-weight: 700; + font-family: 'Cinzel', sans-serif; + + .roll-result-value { + font-size: var(--font-size-24); + } + + .roll-result-desc { + font-size: var(--font-size-16); + margin-top: 2px; + } + } + + .roll-difficulty { + margin-top: -5px; + } + } + } + + .roll-dice { + display: flex; + align-items: center; + justify-content: center; + gap: 5px; + font-weight: 700; + font-family: 'Cinzel', sans-serif; + flex-wrap: wrap; + + .roll-die { + display: flex; + flex-direction: column; + gap: 3px; + + label { + text-align: center; + height: var(--font-size-12); + } + + > div { + display: flex; + align-items: center; + justify-content: center; + gap: 5px; + // font-size: var(--font-size-20); + } + } + } + + fieldset { + display: flex; + flex-direction: column; + // gap: 10px; + border-color: var(--text-color); + border-radius: 5px; + + legend { + display: flex; + align-items: center; + gap: 10px; + padding: 0 5px; + color: var(--text-color); + } + } + + .target-selector { + + .roll-part-extra { + margin: 0; + } + + .target-choice { + display: flex; + font-size: var(--font-size-14); + color: var(--text-color); + padding: 5px 0; + + .button-target-selection { + flex: 1; + text-align: center; + } + + .button-target-selection:hover, .target-selected { + font-weight: bold; + text-shadow: 0px 0px 8px var(--text-color); + } + } + } + + i { + text-align: center; + } + + .roll-target { + display: flex; + width: 100%; + gap: 10px; + align-items: center; + + .target-img { + border-radius: 50%; + width: 40px; + height: 40px; + object-fit: cover; + } + + .target-data { + flex: 1; + } + + .target-save { + display: flex; + align-items: center; + justify-content: center; + width: 22px; + height: 22px; + &:hover > i { + scale: 1.2; + } + + i { + &.fa-check { + color: @green; + } + &.fa-xmark { + color: @medium-red; + } + } + } + } + // } + + .roll-formula { + background-color: var(--bg-color); + color: var(--text-color); + border-radius: 4px; + padding: 3px 5px; + width: fit-content; + margin: auto; + } + + .roll-difficulty, .target-hit-status { + color: @green; + background-color: @green-10; + border: 1px solid currentColor; + border-radius: 4px; + padding: 3px 5px; + text-transform: uppercase; + font-weight: 600; + + &.is-miss { + color: @medium-red; + background-color: @medium-red-10; + } + } + + .target-hit-status { + width: fit-content; + margin-top: 2px; + } + + div[data-action="expandRoll"] { + .roll-part-header > div > span { + &:before, &:after { + content: '\f078'; + font-family: var(--font-awesome); + color: var(--text-color); + transition: all 0.3s ease; + } + } + + .on-reduced { + display: grid; + overflow: hidden; + grid-template-rows: 1fr; + transition: grid-template-rows 250ms ease; + + .wrapper { + display: flex; + gap: 10px; + overflow: hidden; + } + } + + &.expanded { + .roll-part-header > div > span { + &:before, &:after { + transform: rotate(180deg); + } + } + + .on-reduced { + grid-template-rows: 0fr; + } + } + } + + .roll-part + .roll-part { + margin-top: 0; + } + // } + + .target-section { + .roll-part-content { + gap: 10px; + } + + .roll-part-extra { + position: relative; + + .target-pending-saves { + display: flex; + align-items: center; + justify-content: center; + height: 25px; + width: 25px; + &.is-absolute { + position: absolute; + bottom: 0; + right: 0; + } + } + } + } + + .roll-buttons { + display: flex; + gap: 5px; + margin-top: 8px; + button { + flex: 1; + } + } + + .font-20 { + font-size: var(--font-size-20); + } + + .dice-roll .dice-tooltip fieldset { + margin-bottom: 5px; + .roll-dice { + gap: 10px; + } + } + } +} diff --git a/styles/less/ui/chat/theme-colorful.less b/styles/less/ui/chat/theme-colorful.less deleted file mode 100644 index 1dfbd0d1..00000000 --- a/styles/less/ui/chat/theme-colorful.less +++ /dev/null @@ -1,195 +0,0 @@ -@import '../../utils/colors.less'; -@import '../../utils/spacing.less'; - -// .theme-colorful { -// .chat-message.duality { -// border-color: black; -// padding: 8px 0 0 0; -// fieldset.daggerheart.chat { -// border-top-width: 0; -// display: contents; -// legend { -// &:before, -// &:after { -// display: none; -// } -// } -// } -// .message-header { -// color: var(--color-light-3); -// padding: 0 8px; -// } -// &.hope { -// background: linear-gradient(0, rgba(165, 42, 42, 0.6) 40px, rgba(0, 0, 0, 0.6)); -// } -// &.fear { -// background: linear-gradient(0, @fearBackgroundEnd, @fearBackgroundStart); -// } -// &.critical { -// background: linear-gradient(0, @criticalBackgroundEnd, @criticalBackgroundStart); -// } -// .chat-message header { -// color: var(--color-light-3); -// } -// > * { -// padding: 0 8px; -// } -// .message-content { -// .duality-modifiers, -// .duality-result, -// .dice-title { -// display: flex; -// } -// .duality-modifiers { -// display: flex; -// gap: 2px; -// margin-bottom: 4px; -// flex-wrap: wrap; -// .duality-modifier { -// padding: 2px; -// border-radius: 6px; -// border: 1px solid; -// background: var(--color-dark-6); -// font-size: 12px; -// white-space: nowrap; -// } -// } -// .dice-flavor { -// color: var(--color-light-1); -// text-shadow: 0 0 1px black; -// border-bottom: 1px solid; -// display: flex; -// align-items: end; -// justify-content: space-between; -// padding: 0 8px; -// margin: 0 -8px 2px; -// font-weight: unset; -// } -// .dice-result { -// .duality-modifiers { -// display: flex; // Default => display: none; -// gap: 2px; -// margin-bottom: 4px; -// .duality-modifier { -// padding: 2px; -// border-radius: 6px; -// border: 1px solid; -// background: var(--color-dark-6); -// font-size: 12px; -// } -// } -// .dice-formula, -// > .dice-total, -// .part-header { -// display: none; -// } -// .dice-tooltip { -// grid-template-rows: 1fr; -// .wrapper { -// .tooltip-part { -// display: flex; -// align-items: end; -// gap: 0.25rem; -// .dice { -// .dice-rolls { -// margin-bottom: 0; -// &.duality { -// li { -// display: flex; -// align-items: center; -// justify-content: center; -// position: relative; -// background: unset; -// line-height: unset; -// font-weight: unset; -// } -// } -// } -// } -// .duality-modifier { -// display: flex; -// margin-bottom: 6px; -// color: var(--color-light-1); -// text-shadow: 0 0 1px black; -// font-size: var(--font-size-16); -// } -// } -// } -// } -// .target-selection { -// label { -// color: var(--color-light-1); -// } -// } -// .target-section { -// margin: 4px 0; -// border: 2px solid; -// margin-top: 5px; -// .dice-total { -// box-shadow: unset; -// border: unset; -// border-radius: unset; -// font-size: var(--font-size-18); -// } -// } -// .dice-actions { -// justify-content: space-between; -// &.duality-alone { -// justify-content: end; -// margin-top: -20px; -// } -// > * { -// display: flex; -// color: var(--color-light-1); -// text-shadow: 0 0 1px black; -// font-weight: bold; -// background: var(--color-dark-1); -// padding: 4px; -// border-color: black; -// min-height: unset; -// height: 26px; -// flex: unset; -// margin: 0; -// } -// .duality-action { -// border-radius: 0 6px 0 0; -// margin-left: -8px; -// &.duality-action-effect { -// border-top-left-radius: 6px; -// margin-left: initial; -// } -// } -// .duality-result { -// border-radius: 6px 0 0 0; -// margin-right: -8px; -// } -// } -// .duality-result { -// display: flex; -// color: var(--color-light-1); -// text-shadow: 0 0 1px black; -// font-weight: bold; -// background: var(--color-dark-1); -// padding: 4px; -// border-color: black; -// min-height: unset; -// height: 26px; -// flex: unset; -// margin: 0; -// margin-left: auto; -// align-self: center; -// border-radius: 6px; -// } -// } -// } -// button { -// &.inner-button { -// color: var(--color-light-1); -// text-shadow: 0 0 1px black; -// font-weight: bold; -// background: var(--color-dark-1); -// border-color: black; -// } -// } -// } -// } diff --git a/styles/less/ui/index.less b/styles/less/ui/index.less index dabfbaa9..c2ad2b3b 100644 --- a/styles/less/ui/index.less +++ b/styles/less/ui/index.less @@ -3,7 +3,6 @@ @import './chat/chat.less'; @import './chat/downtime.less'; @import './chat/sheet.less'; -@import './chat/theme-colorful.less'; @import './combat-sidebar/combat-sidebar.less'; @import './combat-sidebar/combatant-controls.less'; @@ -18,6 +17,4 @@ @import './resources/resources.less'; -@import './settings/settings.less'; - -@import './chat/chat-temp.less'; \ No newline at end of file +@import './settings/settings.less'; \ No newline at end of file diff --git a/templates/ui/chat/damage-roll.hbs b/templates/ui/chat/damage-roll.hbs deleted file mode 100644 index 29380670..00000000 --- a/templates/ui/chat/damage-roll.hbs +++ /dev/null @@ -1,11 +0,0 @@ -{{!-- TO DO DELETE ? --}} -{{> 'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs' damage=this}} -{{> 'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs'}} -
-
-
- - -
-
-
\ No newline at end of file diff --git a/templates/ui/chat/duality-roll-temp.hbs b/templates/ui/chat/duality-roll-temp.hbs deleted file mode 100644 index 93635f12..00000000 --- a/templates/ui/chat/duality-roll-temp.hbs +++ /dev/null @@ -1,176 +0,0 @@ -
- {{!-- Roll Start --}} -
-
Finesse Check
-
-
- 18 - with hope -
- difficulty 15 -
-
-
Formula
-
-
-
-
-
- -
12
-
-
- -
+
-
-
- -
6
-
-
-
-
- 1d12 + 1d12 + 0 -
-
-
-
-
- {{!-- Roll End --}} - {{!-- Damage Start --}} -
-
Damage
-
-
-
Hit Points: 10
-
Stress: 10
-
-
-
-
-
-
- - Hit Points
Total: 10
-
- -
-
-
4
-
-
-
+
-
-
-
6
-
-
- -
-
-
4
-
-
-
+
-
-
-
6
-
-
- -
-
-
4
-
-
-
+
-
-
-
6
-
-
-
-
- - Stress
Total: 10
-
-
-
-
4
-
-
-
+
-
-
-
6
-
-
-
-
-
-
-
- {{!-- Damage End --}} - {{!-- Target Start --}} -
-
Target
-
-
-
2 Hits
-
2 Miss
-
-
-
-
-
-
-
-
Hit
Current
-
-
-
Reaction Roll All Targets
-
- -
-
Archer Squadron
-
Hit
-
- -
-
- -
-
Conscript
-
Miss
-
- -
-
- -
-
Elite Soldier
-
Hit
-
- -
-
- -
-
Knight of the Realm
-
Miss
-
- -
-
-
-
-
- {{!-- Target End --}} -
-
-{{!-- Button Start --}} -
- - -
-{{!-- Button End --}} \ No newline at end of file diff --git a/templates/ui/chat/duality-roll.hbs b/templates/ui/chat/duality-roll.hbs deleted file mode 100644 index 0b541fce..00000000 --- a/templates/ui/chat/duality-roll.hbs +++ /dev/null @@ -1,223 +0,0 @@ -
-
{{title}}
-
- {{#each roll.modifiers}} -
- {{localize label}} {{#if (gte value 0)}}+{{/if}}{{value}} -
- {{/each}} - {{#if (eq roll.advantage.type 1)}} -
- {{localize "DAGGERHEART.GENERAL.Advantage.full"}} -
- {{/if}} - {{#if (eq roll.advantage.type -1)}} -
- {{localize "DAGGERHEART.GENERAL.Disadvantage.full"}} -
- {{/if}} - {{#if roll.rally.dice}} -
- {{localize "DAGGERHEART.CLASS.Feature.rallyDice"}} {{roll.rally.dice}} -
- {{/if}} -
-
-
{{roll.formula}}
-
-
-
-
-
- - 1{{roll.hope.dice}} - | - 1{{roll.fear.dice}} - - {{roll.result.total}} -
-
-
    -
  1. -
    -
    {{localize "DAGGERHEART.GENERAL.hope"}}
    - {{#if roll.hope.rerolled.any}}{{/if}} -
    - -
    -
    -
  2. -
  3. -
    -
    {{localize "DAGGERHEART.GENERAL.fear"}}
    - {{#if roll.fear.rerolled.any}}{{/if}} -
    - -
    -
    -
  4. -
-
-
- {{#if roll.advantage.type}} -
-
- - 1{{roll.advantage.dice}} - - {{roll.advantage.value}} -
-
-
    -
  1. -
    -
    -
    - -
    -
    {{roll.advantage.value}}
    -
    -
    -
  2. -
-
-
- {{/if}} - {{#if roll.rally.dice}} -
-
- - 1{{roll.rally.dice}} - - {{roll.rally.value}} -
-
-
    -
  1. -
    -
    -
    - -
    -
    {{roll.rally.value}}
    -
    -
    -
  2. -
-
-
- {{/if}} - {{#each roll.extra as | extra | }} -
-
- - 1{{extra.dice}} - - {{extra.value}} -
-
-
    -
  1. -
    -
    -
    - -
    -
    {{extra.value}}
    -
    -
    -
  2. -
-
-
- {{/each}} - {{#if roll.modifierTotal}}
{{#if (gt roll.modifierTotal 0)}}+{{/if}}{{roll.modifierTotal}}
{{/if}} -
-
-
-
-
- {{#unless (eq _source.roll.success undefined)}} - {{#if _source.roll.success}} - {{localize "DAGGERHEART.GENERAL.success"}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}} - {{else}} - {{localize "DAGGERHEART.GENERAL.failure"}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}} - {{/if}} - {{else}} - {{roll.result.label}} - {{/unless}} -
-
- {{roll.total}} -
-
-
-
-
- - {{#if hasHealing}} - {{localize "DAGGERHEART.GENERAL.healing"}} - {{else}} - {{localize "DAGGERHEART.GENERAL.damage"}} - {{/if}} - -
-
-
- {{> 'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs' damage=damage noTitle=true}} -
-
-
-
-{{> 'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs'}} -
-
-
- {{#if (or hasDamage hasHealing)}} - {{#if damage.roll}} - - {{else}} - - {{/if}} - {{/if}} - {{#if hasEffect}} - - {{/if}} -
-
{{roll.total}} - {{#if (eq roll.result.duality 1)}} - {{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}} - {{else}} - {{#if (eq roll.result.duality -1)}} - {{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}} - {{else}} - {{localize "DAGGERHEART.GENERAL.criticalSuccess"}} - {{/if}} - {{/if}} -
-
-
-
-
\ No newline at end of file diff --git a/templates/ui/chat/foundryRoll.hbs b/templates/ui/chat/foundryRoll.hbs new file mode 100644 index 00000000..478cc691 --- /dev/null +++ b/templates/ui/chat/foundryRoll.hbs @@ -0,0 +1,14 @@ +
+ {{#if flavor}} +
{{flavor}}
+ {{/if}} +
+
{{formula}}
+ {{{tooltip}}} +

{{total}}

+
+
+
+ + +
\ No newline at end of file diff --git a/templates/ui/chat/foundryRollTooltip.hbs b/templates/ui/chat/foundryRollTooltip.hbs new file mode 100644 index 00000000..8802c90b --- /dev/null +++ b/templates/ui/chat/foundryRollTooltip.hbs @@ -0,0 +1,19 @@ +{{#if parts.length}} +
+
+
+ + {{localize "DAGGERHEART.UI.Chat.dicePool.title"}} + +
+ {{#each parts}} + {{#each rolls}} +
+
{{result}}
+
+ {{/each}} + {{/each}} +
+
+
+{{/if}} \ No newline at end of file diff --git a/templates/ui/chat/healing-roll.hbs b/templates/ui/chat/healing-roll.hbs deleted file mode 100644 index ca407406..00000000 --- a/templates/ui/chat/healing-roll.hbs +++ /dev/null @@ -1,33 +0,0 @@ -
-
{{title}}
-
- {{#each roll as | resource index | }} -
{{resource.formula}}
-
-
- {{#each resource.parts}} -
-
-
- {{formula}} - {{total}} -
-
    - {{#each dice}} - {{#each results}} -
  1. {{result}}
  2. - {{/each}} - {{/each}} -
-
-
- {{/each}} -
-
-
{{resource.total}}
- {{/each}} -
- -
-
-
\ No newline at end of file diff --git a/templates/ui/chat/parts/button-part.hbs b/templates/ui/chat/parts/button-part.hbs index 71c5cc19..f28f1a7b 100644 --- a/templates/ui/chat/parts/button-part.hbs +++ b/templates/ui/chat/parts/button-part.hbs @@ -13,5 +13,5 @@ {{/unless}} {{/if}} - {{#if hasEffect}}{{/if}} + {{#if hasEffect}}{{/if}} \ No newline at end of file diff --git a/templates/ui/chat/parts/damage-part.hbs b/templates/ui/chat/parts/damage-part.hbs index a8fd8b04..c719c38c 100644 --- a/templates/ui/chat/parts/damage-part.hbs +++ b/templates/ui/chat/parts/damage-part.hbs @@ -1,4 +1,4 @@ -
{{log this}} +
Damage
diff --git a/templates/ui/chat/parts/target-part.hbs b/templates/ui/chat/parts/target-part.hbs index 774ee3d0..2bad8f64 100644 --- a/templates/ui/chat/parts/target-part.hbs +++ b/templates/ui/chat/parts/target-part.hbs @@ -1,9 +1,9 @@
Target
- {{#if (and targets.length (or hasRoll (and hasSave pendingSaves)))}}{{log this}} + {{#if (and targets.length (or (or (gt targetShort.hit 0) (gt targetShort.miss 0)) (and hasSave pendingSaves)))}}
- {{#if hasRoll}} + {{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}
{{targetShort.hit}} {{#if (gt targetShort.hit 1)}}{{localize "DAGGERHEART.GENERAL.hit.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.hit.plural"}}{{/if}}
{{targetShort.miss}} {{#if (gt targetShort.miss 1)}}{{localize "DAGGERHEART.GENERAL.miss.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.miss.plural"}}{{/if}}
{{/if}} @@ -29,7 +29,7 @@
-
{{name}}
+
{{name}}
{{#if (and ../targetSelection ../hasRoll)}}
{{#if hit}}