From b255a628fe2b06146202545e522c4ffe6cef606b Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Fri, 3 Apr 2026 09:35:12 +0200 Subject: [PATCH] Fix creature sheet: complete TECHNIQUE tab + copper theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix tabGroups 'stats'→'principal' (tab content was invisible) - Add 'creature' CSS class to distinguish from personnage sheet - New header layout: stat cards (Ressources, Vigueur, Combat) - Rewrite creature template with full TECHNIQUE tab content: * Attributes with icons and level dropdowns (0-35) * Vitesse input * Santé section (Vigueur seuil) * Actions de combat (Initiative, Monté/Déf. totale, Assommer, Coup bas, Immobiliser, Repousser, Désengager) * Adversités section (reuses personnage CSS classes) - Copper/orange CSS theme for .creature class overrides - Add .stat-derived-value CSS for non-editable derived stats Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- less/actor-styles.less | 69 ++-- .../sheets/mournblade-cyd2-creature-sheet.mjs | 5 +- styles/mournblade-cyd2.css | 58 +-- templates/creature-sheet.hbs | 358 +++++++++--------- 4 files changed, 254 insertions(+), 236 deletions(-) diff --git a/less/actor-styles.less b/less/actor-styles.less index c3af0b3..26aa2ca 100644 --- a/less/actor-styles.less +++ b/less/actor-styles.less @@ -298,6 +298,22 @@ border-top: 1px solid rgba(255,255,255,0.06); margin-top: 1px; } + + // Valeur dérivée affichée comme texte (non-éditable) + .stat-derived-value { + flex: 1; + min-width: 0; + height: 20px; + line-height: 20px; + font-size: 0.82rem; + font-weight: 700; + font-family: "Signika", "Arial Narrow", sans-serif; + font-variant-numeric: lining-nums tabular-nums; + color: #f0dfc0; + text-align: center; + text-shadow: 1px 1px 2px rgba(0,0,0,0.8); + display: block; + } } } } @@ -1334,16 +1350,8 @@ } -// PNJ Sheet - Orange/Copper theme for visual distinction -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet { - - // Variant background pour PNJs - teinte orange/cuivre - .background-sheet-header-creature { - background: linear-gradient(135deg, rgba(80, 40, 0, 0.15) 0%, rgba(100, 50, 0, 0.1) 100%); - border: 2px solid rgba(205, 127, 50, 0.5); - border-radius: 4px; - padding: 0; - } +// Creature Sheet - Orange/Copper theme for visual distinction +.fvtt-mournblade-cyd-2-0.actor.creature { // Légère teinte orange/cuivre pour les sections .sheet-box { @@ -1352,40 +1360,49 @@ } } - // Header simplifié pour PNJs - .sheet-header { - flex: 0 0 auto !important; - padding: 0; - } + // Header stat cards - copper accent + .stat-card { + border-color: rgba(180, 100, 20, 0.5); + border-top-color: rgba(205, 127, 50, 0.8); - .profile-img { - width: 80px; - height: 80px; - border-radius: 8px; - border: 2px solid rgba(205, 127, 50, 0.6); - object-fit: cover; - cursor: pointer; - flex-shrink: 0; + .stat-card-title { + color: #cd7f32; + border-bottom-color: rgba(180, 100, 20, 0.3); + } } // Tabs avec teinte orange/cuivre - nav.tabs { - .item.active { + nav.tabs .item { + &.active { border-bottom-color: rgba(205, 127, 50, 0.8); color: #cd7f32; } + &:hover:not(.active) { + color: #d4a060; + } } // Section titles avec teinte orange/cuivre .section-title { color: #b8734d; - border-bottom-color: rgba(205, 127, 50, 0.3); + border-left-color: rgba(205, 127, 50, 0.8); } // Items headers .items-title-bg { background: linear-gradient(135deg, rgba(80, 40, 0, 0.15) 0%, rgba(100, 50, 0, 0.1) 100%); border-bottom: 1px solid rgba(205, 127, 50, 0.3); + + .items-title-text { + color: #cd7f32; + } + } + + // Adversité — copper accent overrides + .adversite-section { + .adversite-section-title { + color: #cd7f32; + } } } diff --git a/modules/applications/sheets/mournblade-cyd2-creature-sheet.mjs b/modules/applications/sheets/mournblade-cyd2-creature-sheet.mjs index dd86406..b8c4eaa 100644 --- a/modules/applications/sheets/mournblade-cyd2-creature-sheet.mjs +++ b/modules/applications/sheets/mournblade-cyd2-creature-sheet.mjs @@ -6,7 +6,7 @@ export default class MournbladeCYD2CreatureSheet extends MournbladeCYD2ActorShee /** @override */ static DEFAULT_OPTIONS = { ...super.DEFAULT_OPTIONS, - classes: [...super.DEFAULT_OPTIONS.classes], + classes: [...super.DEFAULT_OPTIONS.classes, "creature"], window: { ...super.DEFAULT_OPTIONS.window, title: "SHEETS.Actor.creature", @@ -21,7 +21,7 @@ export default class MournbladeCYD2CreatureSheet extends MournbladeCYD2ActorShee }; /** @override */ - tabGroups = { primary: "stats" }; + tabGroups = { primary: "principal" }; /** @override */ async _prepareContext() { @@ -39,6 +39,7 @@ export default class MournbladeCYD2CreatureSheet extends MournbladeCYD2ActorShee context.talents = foundry.utils.duplicate(actor.getTalents?.() ?? []); context.protectionTotal = actor.getProtectionTotal?.() ?? 0; context.adversiteTotal = (actor.system.adversite?.bleue || 0) + (actor.system.adversite?.rouge || 0) + (actor.system.adversite?.noire || 0); + context.initiative = context.combat?.initTotal ?? 0; return context; } } diff --git a/styles/mournblade-cyd2.css b/styles/mournblade-cyd2.css index 1f6f6e2..84d72cf 100644 --- a/styles/mournblade-cyd2.css +++ b/styles/mournblade-cyd2.css @@ -2669,6 +2669,20 @@ li { border-top: 1px solid rgba(255, 255, 255, 0.06); margin-top: 1px; } +.fvtt-mournblade-cyd-2-0.actor .sheet-header .header-stat-cards .stat-card .stat-derived-value { + flex: 1; + min-width: 0; + height: 20px; + line-height: 20px; + font-size: 0.82rem; + font-weight: 700; + font-family: "Signika", "Arial Narrow", sans-serif; + font-variant-numeric: lining-nums tabular-nums; + color: #f0dfc0; + text-align: center; + text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); + display: block; +} .fvtt-mournblade-cyd-2-0.actor .sheet-tabs { margin: 0; padding: 0 0.5rem; @@ -3548,40 +3562,38 @@ li { background: linear-gradient(135deg, rgba(0, 60, 0, 0.15) 0%, rgba(20, 80, 20, 0.1) 100%); border-bottom: 1px solid rgba(34, 139, 34, 0.3); } -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet .background-sheet-header-creature { - background: linear-gradient(135deg, rgba(80, 40, 0, 0.15) 0%, rgba(100, 50, 0, 0.1) 100%); - border: 2px solid rgba(205, 127, 50, 0.5); - border-radius: 4px; - padding: 0; -} -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet .sheet-box.color-bg-archetype { +.fvtt-mournblade-cyd-2-0.actor.creature .sheet-box.color-bg-archetype { background: linear-gradient(135deg, rgba(60, 30, 0, 0.08) 0%, rgba(80, 40, 0, 0.05) 100%); } -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet .sheet-header { - flex: 0 0 auto !important; - padding: 0; +.fvtt-mournblade-cyd-2-0.actor.creature .stat-card { + border-color: rgba(180, 100, 20, 0.5); + border-top-color: rgba(205, 127, 50, 0.8); } -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet .profile-img { - width: 80px; - height: 80px; - border-radius: 8px; - border: 2px solid rgba(205, 127, 50, 0.6); - object-fit: cover; - cursor: pointer; - flex-shrink: 0; +.fvtt-mournblade-cyd-2-0.actor.creature .stat-card .stat-card-title { + color: #cd7f32; + border-bottom-color: rgba(180, 100, 20, 0.3); } -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet nav.tabs .item.active { +.fvtt-mournblade-cyd-2-0.actor.creature nav.tabs .item.active { border-bottom-color: rgba(205, 127, 50, 0.8); color: #cd7f32; } -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet .section-title { - color: #b8734d; - border-bottom-color: rgba(205, 127, 50, 0.3); +.fvtt-mournblade-cyd-2-0.actor.creature nav.tabs .item:hover:not(.active) { + color: #d4a060; } -.fvtt-mournblade-cyd-2-0.actor.pnj-sheet .items-title-bg { +.fvtt-mournblade-cyd-2-0.actor.creature .section-title { + color: #b8734d; + border-left-color: rgba(205, 127, 50, 0.8); +} +.fvtt-mournblade-cyd-2-0.actor.creature .items-title-bg { background: linear-gradient(135deg, rgba(80, 40, 0, 0.15) 0%, rgba(100, 50, 0, 0.1) 100%); border-bottom: 1px solid rgba(205, 127, 50, 0.3); } +.fvtt-mournblade-cyd-2-0.actor.creature .items-title-bg .items-title-text { + color: #cd7f32; +} +.fvtt-mournblade-cyd-2-0.actor.creature .adversite-section .adversite-section-title { + color: #cd7f32; +} .gm-tools-section .grid .item-list .flexrow.item .label-name { flex: 1; min-width: 12rem; diff --git a/templates/creature-sheet.hbs b/templates/creature-sheet.hbs index 5d1ec52..3fc9b84 100644 --- a/templates/creature-sheet.hbs +++ b/templates/creature-sheet.hbs @@ -2,27 +2,65 @@ {{!-- Sheet Header --}}
-
-
- -
-

-
-
    +
    + +

    +
    -
  • -

    Ressources

    - -
  • -
+
+ + {{!-- RESSOURCES --}} +
+
★ Ressources
+
+
+ +
+ + {{!-- VIGUEUR --}} +
+
♥ Vigueur ({{system.sante.vigueur}})
+
+
+ + +
+
+ + +
+
+
+ + {{!-- COMBAT --}} +
+
⚡ Combat
+
+
+ + {{initiative}} +
+
+ + {{combat.defenseTotal}} +
+
+ + {{protectionTotal}} +
+
+
+ +
+
- {{!-- Sheet Tab Navigation --}}

- {{!-- Sheet Body --}}
- {{!-- Main Tab --}} + {{!-- Technique Tab --}}
-
+ {{!-- Colonne gauche : Attributs + Santé + Actions --}}
+ +
Attributs
    {{#each system.attributs as |attr key|}} -
  • +
  • - {{attr.label}} - {{selectOptions @root.config.listeNiveauCreature selected=attr.value}}
  • @@ -61,194 +101,157 @@ value="{{system.vitesse.value}}" data-dtype="Number" />
-

Santé

+ +
Santé
  • - +
  • -
  • - - -
  • -
-

Combat

+
Actions de combat
  • - + +
  • +
  • + + + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +
-
-

Adversité

-
    + {{!-- Colonne droite : Adversité --}} +
    + +

    Adversités

    +
    {{#each system.adversite as |adv key|}} -
  • - - -
    - -
    {{adv}}
    +
    +
    {{upperFirst key}}
    + +
    {{adv}}
    +
    + + +
    - + -
     
    -
     
    -
     
    -
  • +
    {{/each}} -
-
    -
  • - - -
  • -
-
    - -
  • - - - - - -
  • -
  • - - - -
  • -
  • - - -
  • -
- +
+
+ Malus jets + −{{adversiteTotal}} +
- - {{!-- Competence Tab --}} + {{!-- Compétences Tab --}}
-
-
    -
  • +
  • - - - +
     
  • {{#each skills as |skill key|}} -
  • +
  • -
    - - {{skill.name}} - - - {{#each skill.system.predilections as |pred key|}} - {{#if (and pred.acquise (not pred.used))}} - {{pred.name}}, - {{/if}} - {{/each}} - + + {{skill.name}} + + + {{#each skill.system.predilections as |pred key|}} + {{#if (and pred.acquise (not pred.used))}}{{pred.name}}, {{/if}} + {{/each}} +
    - - {{selectOptions @root.config.listeNiveauCreature selected=skill.system.niveau}} - {{#if (ne skill.system.attribut1 "none")}} - + {{/if}} {{#if (ne skill.system.attribut2 "none")}} - + {{/if}} {{#if (ne skill.system.attribut3 "none")}} - + {{/if}} -
     
    - - + +
  • {{/each}}
-
-
{{!-- Talents Tab --}}
-
-
    -
  • +
  • - - - +
     
    - + + +
  • {{#each talents as |talent key|}} -
  • +
  • {{talent.name}} {{talent.system.resumebonus}} -
     
    - - + +
  • {{/each}}
- -
-
- {{!-- Equipement Tab --}} + {{!-- Armes Tab --}}
-
@@ -257,56 +260,46 @@

- - - - - - - - - + + +
 
- + + +
{{#each armes as |arme key|}} -
  • +
  • {{arme.name}} - {{#if arme.system.equipped}} - + {{else}} - + {{/if}} - {{#if arme.system.isdefense}} - + {{else}} - + {{/if}} - {{#if arme.system.equipped}} - + {{else}} - + {{/if}} -
     
  • {{/each}} @@ -319,28 +312,28 @@

    - - - +
     
    - + + +
    {{#each protections as |protection key|}} -
  • +
  • {{protection.name}} - + +
     
  • {{/each}} @@ -348,28 +341,23 @@
    -
    - - {{!-- Biography Tab --}} + {{!-- Bio&Notes Tab --}}
    - - -

    Description

    -
    -
    - {{editor description target="system.biodata.description" button=true owner=owner editable=editable}} +
    +
    Description
    +
    + {{editor description target="system.biodata.description" button=true owner=owner editable=editable}} +
    - - -

    Habitat

    -
    -
    - {{editor habitat target="system.biodata.habitat" button=true owner=owner editable=editable}} +
    +
    Habitat
    +
    + {{editor habitat target="system.biodata.habitat" button=true owner=owner editable=editable}} +
    -
    - \ No newline at end of file +