From b6cb3526c377a78581310dc2782500f86a988232 Mon Sep 17 00:00:00 2001 From: Dapoolp Date: Thu, 31 Jul 2025 11:53:14 +0200 Subject: [PATCH] j --- module/data/chat-message/adversaryRoll.mjs | 1 + module/data/chat-message/dualityRoll.mjs | 2 +- module/systemRegistration/handlebars.mjs | 8 ++- styles/less/ui/chat/chat-temp.less | 12 ++-- styles/less/ui/index.less | 4 +- styles/less/utils/colors.less | 22 +++---- templates/ui/chat/chat-message.hbs | 2 +- templates/ui/chat/parts/button-part.hbs | 4 ++ templates/ui/chat/parts/damage-part.hbs | 72 ++++++++++++++++++++++ templates/ui/chat/parts/roll-part.hbs | 36 +++++++++++ templates/ui/chat/parts/target-part.hbs | 53 ++++++++++++++++ templates/ui/chat/roll.hbs | 7 +++ 12 files changed, 200 insertions(+), 23 deletions(-) create mode 100644 templates/ui/chat/parts/button-part.hbs create mode 100644 templates/ui/chat/parts/damage-part.hbs create mode 100644 templates/ui/chat/parts/roll-part.hbs create mode 100644 templates/ui/chat/parts/target-part.hbs create mode 100644 templates/ui/chat/roll.hbs diff --git a/module/data/chat-message/adversaryRoll.mjs b/module/data/chat-message/adversaryRoll.mjs index 45f6fe39..e34a632c 100644 --- a/module/data/chat-message/adversaryRoll.mjs +++ b/module/data/chat-message/adversaryRoll.mjs @@ -21,6 +21,7 @@ export default class DHAdversaryRoll extends foundry.abstract.TypeDataModel { }) ), targetSelection: new fields.BooleanField({ initial: true }), + hasRoll: new fields.BooleanField({ initial: false }), hasDamage: new fields.BooleanField({ initial: false }), hasHealing: new fields.BooleanField({ initial: false }), hasEffect: new fields.BooleanField({ initial: false }), diff --git a/module/data/chat-message/dualityRoll.mjs b/module/data/chat-message/dualityRoll.mjs index d5f6efc0..d1bc7866 100644 --- a/module/data/chat-message/dualityRoll.mjs +++ b/module/data/chat-message/dualityRoll.mjs @@ -2,6 +2,6 @@ import DHAdversaryRoll from './adversaryRoll.mjs'; export default class DHDualityRoll extends DHAdversaryRoll { get messageTemplate() { - return 'systems/daggerheart/templates/ui/chat/duality-roll-temp.hbs'; + return 'systems/daggerheart/templates/ui/chat/roll.hbs'; } } diff --git a/module/systemRegistration/handlebars.mjs b/module/systemRegistration/handlebars.mjs index fc6decd3..1afbf7bd 100644 --- a/module/systemRegistration/handlebars.mjs +++ b/module/systemRegistration/handlebars.mjs @@ -31,6 +31,12 @@ export const preloadHandlebarsTemplates = async function () { 'systems/daggerheart/templates/ui/tooltip/parts/tooltipChips.hbs', 'systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs', 'systems/daggerheart/templates/dialogs/downtime/activities.hbs', - 'systems/daggerheart/templates/dialogs/dice-roll/costSelection.hbs' + 'systems/daggerheart/templates/dialogs/dice-roll/costSelection.hbs', + + + 'systems/daggerheart/templates/ui/chat/parts/roll-part.hbs', + 'systems/daggerheart/templates/ui/chat/parts/damage-part.hbs', + 'systems/daggerheart/templates/ui/chat/parts/target-part.hbs', + 'systems/daggerheart/templates/ui/chat/parts/button-part.hbs', ]); }; diff --git a/styles/less/ui/chat/chat-temp.less b/styles/less/ui/chat/chat-temp.less index 9cb903c1..85b4b2b4 100644 --- a/styles/less/ui/chat/chat-temp.less +++ b/styles/less/ui/chat/chat-temp.less @@ -14,18 +14,18 @@ } &.fear { - --text-color: @fear; - --bg-color: @fear-40; + --text-color: @chat-blue; + --bg-color: @chat-blue-40; .message-header, .message-content { - background-color: @fear-bg; + background-color: @chat-blue-bg; } } &.critical { - --text-color: @critical; - --bg-color: @critical-40; + --text-color: @chat-purple; + --bg-color: @chat-purple-40; .message-header, .message-content { - background-color: @critical-bg; + background-color: @chat-purple-bg; } } } diff --git a/styles/less/ui/index.less b/styles/less/ui/index.less index a55273da..dabfbaa9 100644 --- a/styles/less/ui/index.less +++ b/styles/less/ui/index.less @@ -20,6 +20,4 @@ @import './settings/settings.less'; - - -@import './chat/chat-temp.less'; +@import './chat/chat-temp.less'; \ No newline at end of file diff --git a/styles/less/utils/colors.less b/styles/less/utils/colors.less index 9fc1a6a2..b17ea42f 100755 --- a/styles/less/utils/colors.less +++ b/styles/less/utils/colors.less @@ -6,15 +6,15 @@ @golden-40: #f3c26740; @golden-bg: #f3c2671a; -@fear: #8f87ee; -@fear-10: #8f87ee10; -@fear-40: #8f87ee40; -@fear-bg: #14142599; +@chat-blue: #8f87ee; +@chat-blue-10: #8f87ee10; +@chat-blue-40: #8f87ee40; +@chat-blue-bg: #14142599; -@critical: #f3c267; -@critical-10: #f3c26710; -@critical-40: #f3c26740; -@critical-bg: #2a152e99; +@chat-purple: #f3c267; +@chat-purple-10: #f3c26710; +@chat-purple-40: #f3c26740; +@chat-purple-bg: #2a152e99; @red: #a778b1; @red-10: #a778b110; @@ -71,11 +71,11 @@ @positive: #699969; @secondaryShadow: gold; @primaryAccent: #778899; -// @hope: #ffe760; -// @fear: #0032b1; +@hope: #ffe760; +@fear: #0032b1; @fearBackgroundStart: rgba(15, 15, 97, 0.6); @fearBackgroundEnd: rgba(0, 0, 255, 0.6); -// @critical: #430070; +@critical: #430070; @criticalBackgroundStart: rgba(37, 8, 37, 0.6); @criticalBackgroundEnd: rgba(128, 0, 128, 0.6); @primary-color-fear: rgba(9, 71, 179, 0.75); diff --git a/templates/ui/chat/chat-message.hbs b/templates/ui/chat/chat-message.hbs index c418229d..4132e495 100644 --- a/templates/ui/chat/chat-message.hbs +++ b/templates/ui/chat/chat-message.hbs @@ -1,5 +1,5 @@
  • {{log @root}} + {{#if borderColor}}style="border-color:{{borderColor}}"{{/if}}>
    diff --git a/templates/ui/chat/parts/button-part.hbs b/templates/ui/chat/parts/button-part.hbs new file mode 100644 index 00000000..e6d3f139 --- /dev/null +++ b/templates/ui/chat/parts/button-part.hbs @@ -0,0 +1,4 @@ +
    + + +
    \ No newline at end of file diff --git a/templates/ui/chat/parts/damage-part.hbs b/templates/ui/chat/parts/damage-part.hbs new file mode 100644 index 00000000..fbaebbfc --- /dev/null +++ b/templates/ui/chat/parts/damage-part.hbs @@ -0,0 +1,72 @@ +
    +
    Damage
    +
    +
    +
    Hit Points: 10
    +
    Stress: 10
    +
    +
    +
    +
    +
    +
    + + Hit Points
    Total: 10
    +
    + +
    +
    +
    4
    +
    +
    +
    +
    +
    +
    +
    6
    +
    +
    + +
    +
    +
    4
    +
    +
    +
    +
    +
    +
    +
    6
    +
    +
    + +
    +
    +
    4
    +
    +
    +
    +
    +
    +
    +
    6
    +
    +
    +
    +
    + + Stress
    Total: 10
    +
    +
    +
    +
    4
    +
    +
    +
    +
    +
    +
    +
    6
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/templates/ui/chat/parts/roll-part.hbs b/templates/ui/chat/parts/roll-part.hbs new file mode 100644 index 00000000..6a3bfabc --- /dev/null +++ b/templates/ui/chat/parts/roll-part.hbs @@ -0,0 +1,36 @@ +
    +
    Finesse Check
    +
    +
    + 18 + with hope +
    + difficulty 15 +
    +
    +
    Formula
    +
    +
    +
    +
    +
    + +
    12
    +
    +
    + +
    +
    +
    +
    + +
    6
    +
    +
    +
    +
    + 1d12 + 1d12 + 0 +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/templates/ui/chat/parts/target-part.hbs b/templates/ui/chat/parts/target-part.hbs new file mode 100644 index 00000000..cd870fd2 --- /dev/null +++ b/templates/ui/chat/parts/target-part.hbs @@ -0,0 +1,53 @@ +
    +
    Target
    +
    +
    +
    2 Hits
    +
    2 Miss
    +
    +
    +
    +
    +
    +
    +
    +
    Hit
    Current
    +
    +
    +
    Reaction Roll All Targets
    +
    + +
    +
    Archer Squadron
    +
    Hit
    +
    + +
    +
    + +
    +
    Conscript
    +
    Miss
    +
    + +
    +
    + +
    +
    Elite Soldier
    +
    Hit
    +
    + +
    +
    + +
    +
    Knight of the Realm
    +
    Miss
    +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/templates/ui/chat/roll.hbs b/templates/ui/chat/roll.hbs new file mode 100644 index 00000000..93928713 --- /dev/null +++ b/templates/ui/chat/roll.hbs @@ -0,0 +1,7 @@ +
    {{log this}} + {{> 'systems/daggerheart/templates/ui/chat/parts/roll-part.hbs'}} + {{> 'systems/daggerheart/templates/ui/chat/parts/damage-part.hbs'}} + {{> 'systems/daggerheart/templates/ui/chat/parts/target-part.hbs'}} +
    +
    +{{> 'systems/daggerheart/templates/ui/chat/parts/button-part.hbs'}} \ No newline at end of file