From e67ecd9238433704b04c3b3fb1ad34d29dc4c0ef Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Fri, 3 Apr 2026 08:15:30 +0200 Subject: [PATCH] =?UTF-8?q?Add=20adversit=C3=A9=20total=20malus=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show 'MALUS JETS -X' below adversité cards. Highlights in red when non-zero. Value = bleue + rouge + noire (same as nbAdversites used in roll formula). Tooltip explains it's subtracted from all rolls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- less/actor-styles.less | 44 ++++++++++++++++++++++++++++++++++++++ styles/mournblade-cyd2.css | 39 +++++++++++++++++++++++++++++++++ templates/actor-sheet.hbs | 6 ++++++ 3 files changed, 89 insertions(+) diff --git a/less/actor-styles.less b/less/actor-styles.less index 92ca2cb..26eb35d 100644 --- a/less/actor-styles.less +++ b/less/actor-styles.less @@ -923,6 +923,50 @@ } } + .adversite-total { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 6px; + margin-top: 6px; + padding: 4px 8px; + border-radius: 3px; + border: 1px solid rgba(100,70,20,0.35); + background: rgba(15,8,0,0.5); + cursor: default; + transition: all 0.2s; + + &.adversite-total-nonzero { + border-color: rgba(200,60,30,0.6); + background: rgba(40,8,4,0.7); + box-shadow: 0 0 8px rgba(200,50,20,0.2); + + .adversite-total-value { + color: #ff7755; + text-shadow: 0 0 8px rgba(255,80,40,0.5); + } + } + + .adversite-total-label { + font-size: 0.6rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.8px; + color: #9a7a50; + } + + .adversite-total-value { + font-family: "Signika", "Arial Narrow", sans-serif; + font-variant-numeric: lining-nums tabular-nums; + font-size: 1.1rem; + font-weight: 900; + color: #c0a070; + line-height: 1; + transition: color 0.2s; + } + } + .adversite-modifiers { display: flex; flex-direction: row; diff --git a/styles/mournblade-cyd2.css b/styles/mournblade-cyd2.css index e7c9203..e3f5e37 100644 --- a/styles/mournblade-cyd2.css +++ b/styles/mournblade-cyd2.css @@ -3210,6 +3210,45 @@ li { color: #99ffaa; border-color: rgba(40, 160, 60, 0.5); } +.fvtt-mournblade-cyd-2-0.actor .adversite-section .adversite-total { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 6px; + margin-top: 6px; + padding: 4px 8px; + border-radius: 3px; + border: 1px solid rgba(100, 70, 20, 0.35); + background: rgba(15, 8, 0, 0.5); + cursor: default; + transition: all 0.2s; +} +.fvtt-mournblade-cyd-2-0.actor .adversite-section .adversite-total.adversite-total-nonzero { + border-color: rgba(200, 60, 30, 0.6); + background: rgba(40, 8, 4, 0.7); + box-shadow: 0 0 8px rgba(200, 50, 20, 0.2); +} +.fvtt-mournblade-cyd-2-0.actor .adversite-section .adversite-total.adversite-total-nonzero .adversite-total-value { + color: #ff7755; + text-shadow: 0 0 8px rgba(255, 80, 40, 0.5); +} +.fvtt-mournblade-cyd-2-0.actor .adversite-section .adversite-total .adversite-total-label { + font-size: 0.6rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.8px; + color: #9a7a50; +} +.fvtt-mournblade-cyd-2-0.actor .adversite-section .adversite-total .adversite-total-value { + font-family: "Signika", "Arial Narrow", sans-serif; + font-variant-numeric: lining-nums tabular-nums; + font-size: 1.1rem; + font-weight: 900; + color: #c0a070; + line-height: 1; + transition: color 0.2s; +} .fvtt-mournblade-cyd-2-0.actor .adversite-section .adversite-modifiers { display: flex; flex-direction: row; diff --git a/templates/actor-sheet.hbs b/templates/actor-sheet.hbs index 63f617d..6cf6e18 100644 --- a/templates/actor-sheet.hbs +++ b/templates/actor-sheet.hbs @@ -170,6 +170,12 @@ {{/each}} +
+ Malus jets + −{{adversiteTotal}} +
+ {{#if isGM}}