Rework fiches, jets de dés et CSS

This commit is contained in:
2026-04-03 16:22:51 +02:00
parent e001ec0dc9
commit 1fb80f6abe
21 changed files with 3091 additions and 1316 deletions

View File

@@ -0,0 +1,789 @@
<section>
{{!-- Sheet Header --}}
<header class="sheet-header">
{{!-- Bannière : image + nom + bouton --}}
<div class="header-banner">
<img class="profile-img" src="{{actor.img}}" data-action="editImage" title="{{actor.name}}" />
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Nom du personnage" /></h1>
<button type="button" class="sheet-mode-toggle" data-action="toggleSheet"
data-tooltip="{{#if isEditMode}}Mode Visualisation{{else}}Mode Édition{{/if}}">
<i class="{{#if isEditMode}}fas fa-eye{{else}}fas fa-edit{{/if}}"></i>
</button>
</div>
{{!-- Cartes de statistiques --}}
<div class="header-stat-cards">
{{!-- LOI --}}
<div class="stat-card card-loi{{#if (gt system.balance.loi system.balance.chaos)}} dominant{{/if}}">
<div class="stat-card-title">⚖ Loi</div>
<div class="stat-card-content">
<div class="stat-field">
<label>Niv.</label>
<input type="text" name="system.balance.loi" value="{{system.balance.loi}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Pts</label>
<select name="system.balance.pointsloi">
{{selectOptions config.listeNiveauSkill selected=system.balance.pointsloi}}
</select>
</div>
<div class="stat-derived">Aspect : {{system.balance.aspect}}</div>
</div>
</div>
{{!-- CHAOS --}}
<div class="stat-card card-chaos{{#if (gt system.balance.chaos system.balance.loi)}} dominant{{/if}}">
<div class="stat-card-title">☯ Chaos</div>
<div class="stat-card-content">
<div class="stat-field">
<label>Niv.</label>
<input type="text" name="system.balance.chaos" value="{{system.balance.chaos}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Pts</label>
<select name="system.balance.pointschaos">
{{selectOptions config.listeNiveauSkill selected=system.balance.pointschaos}}
</select>
</div>
<div class="stat-derived">Marge : {{system.balance.marge}}</div>
</div>
</div>
{{!-- BONNE AVENTURE --}}
<div class="stat-card card-ba">
<div class="stat-card-title">★ Bonne Aventure</div>
<div class="stat-card-content">
<div class="stat-field">
<label>Base</label>
<input type="text" name="system.bonneaventure.base" value="{{system.bonneaventure.base}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Act.</label>
<input type="text" name="system.bonneaventure.actuelle" value="{{system.bonneaventure.actuelle}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Éclat</label>
<input type="text" name="system.eclat.value" value="{{system.eclat.value}}" data-dtype="Number" />
</div>
</div>
</div>
{{!-- VIGUEUR --}}
<div class="stat-card card-vigueur">
<div class="stat-card-title">♥ Vigueur <span class="stat-sub">({{system.sante.vigueur}})</span></div>
<div class="stat-card-content">
<div class="stat-field">
<label>État</label>
<select name="system.sante.etat">
{{selectOptions combativiteList selected=system.sante.etat valueAttr="value" nameAttr="value" labelAttr="label"}}
</select>
</div>
</div>
</div>
{{!-- ÂME --}}
<div class="stat-card card-ame">
<div class="stat-card-title">✦ Âme <span class="stat-sub">(Seuil {{system.ame.seuilpouvoir}})</span></div>
<div class="stat-card-content">
<div class="stat-field">
<label>État</label>
<select name="system.ame.etat">
{{selectOptions ameList selected=system.ame.etat valueAttr="value" nameAttr="value" labelAttr="label"}}
</select>
</div>
<div class="stat-field">
<label>Max</label>
<select name="system.ame.max">
{{selectOptions ameMaxList selected=system.ame.max valueAttr="value" nameAttr="value" labelAttr="label"}}
</select>
</div>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<hr>
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="principal">Attributs</a>
<a class="item" data-tab="competences">Compétences</a>
<a class="item" data-tab="dons">Dons & Pactes</a>
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="equipement">Equipement</a>
<a class="item" data-tab="biodata">Bio&Notes</a>
</nav>
<hr>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Main Tab --}}
<div class="tab principal" data-group="primary" data-tab="principal">
<div class="flexcol">
<div class="grid grid-2col">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
{{#each system.attributs as |attr key|}}
<li class="item flexrow " data-attr-key="{{key}}">
<img class="item-name-img" src="systems/fvtt-mournblade-cyd-2-0/assets/icons/{{attr.labelnorm}}.webp">
<span data-tooltip="Cliquez pour faire un jet" class="item-name-label competence-name item-field-label-medium"><a
data-action="rollAttribut" data-attr-key="{{key}}">{{attr.label}}</a></span>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number">
{{selectOptions @root.config.listeNiveauSkill selected=attr.value}}
</select>
</li>
{{/each}}
<li class="item flexrow">
<img class="item-name-img" src="systems/fvtt-mournblade-cyd-2-0/assets/icons/vitesse.webp">
<span class="item-name-label competence-name item-field-label-medium">Vitesse</span>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.vitesse.value"
value="{{system.vitesse.value}}" data-dtype="Number" />
</li>
</ul>
</div>
<div class="sheet-box color-bg-archetype adversite-section">
<h4 class="adversite-section-title">Adversités</h4>
<div class="adversite-cards">
{{#each system.adversite as |adv key|}}
<div class="adversite-card adversite-{{key}}" data-adversite="{{key}}">
<div class="adversite-card-title">{{upperFirst key}}</div>
<img class="adversite-gem" src="systems/fvtt-mournblade-cyd-2-0/assets/icons/gemme_{{key}}.webp">
<div class="adversite-value">{{adv}}</div>
<div class="adversite-controls">
<a data-action="modifyAdversite" class="adv-btn adv-minus" data-adversite-value="-1"></a>
<a data-action="modifyAdversite" class="adv-btn adv-plus" data-adversite-value="1">+</a>
</div>
</div>
{{/each}}
</div>
<div class="adversite-total {{#if adversiteTotal}}adversite-total-nonzero{{/if}}"
data-tooltip="Malus soustrait à tous les jets de dés">
<span class="adversite-total-label">Malus jets</span>
<span class="adversite-total-value">{{adversiteTotal}}</span>
</div>
{{#if isGM}}
<div class="adversite-modifiers">
<div class="adversite-modifier-row">
<label data-tooltip="Modificateur de Vigueur">Mod. Vigueur</label>
<input type="text" name="system.sante.vigueurmodifier"
value="{{system.sante.vigueurmodifier}}" data-dtype="Number" />
</div>
<div class="adversite-modifier-row">
<label data-tooltip="Modificateur de Seuil de Pouvoir">Mod. Seuil Pouvoir</label>
<input type="text" name="system.ame.seuilpouvoirmodifier"
value="{{system.ame.seuilpouvoirmodifier}}" data-dtype="Number" />
</div>
</div>
{{/if}}
</div>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Talents</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="talent" title="Ajouter un Talent"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each talents as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="talent">
<img class="item-name-img" src="{{talent.img}}" />
<span class="item-name-label competence-name">{{talent.name}}</span>
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Competences Tab --}}
<div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexrow">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Compétences</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Niveau</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each skills as |skill key|}}
<li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
<img class="item-name-img" src="{{skill.img}}" />
<div class="flexcol item-name-label">
<span class="item-name-label competence-name"><a data-action="rollCompetence" class="item-field-label-short"
data-attr-key="tochoose">{{skill.name}}</a></span>
<span class="predilection-text">
{{#each skill.system.predilections as |pred key|}}
{{#if (and pred.acquise (not pred.used))}}
{{pred.name}},
{{/if}}
{{/each}}
</span>
</div>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
{{selectOptions @root.config.listeNiveauSkill selected=skill.system.niveau}}
</select>
{{#if (ne skill.system.attribut1 "none")}}
<button data-action="rollCompetence" class="button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
{{/if}}
{{#if (ne skill.system.attribut2 "none")}}
<button data-action="rollCompetence" class="button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
{{/if}}
{{#if (ne skill.system.attribut3 "none")}}
<button data-action="rollCompetence" class="button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Dons/Pactes Tab --}}
<div class="tab dons" data-group="primary" data-tab="dons">
<div class="flexcol">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Dons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Allégeance</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="don"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each dons as |don key|}}
<li class="item flexrow " data-item-id="{{don._id}}" data-item-type="don">
<img class="item-name-img" src="{{don.img}}" />
<span class="item-name-label competence-name">{{don.name}}</span>
<span class="item-field-label-short">{{don.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Pactes</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Allégeance</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="pacte"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each pactes as |pacte key|}}
<li class="item flexrow " data-item-id="{{pacte._id}}" data-item-type="pacte">
<img class="item-name-img" src="{{pacte.img}}" />
<span class="item-name-label competence-name">{{pacte.name}}</span>
<span class="item-field-label-short">{{pacte.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Runes</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Haute Langue</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Difficulté</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="rune"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each runes as |rune key|}}
<li class="item flexrow " data-item-id="{{rune._id}}" data-item-type="rune">
<img class="item-name-img" src="{{rune.img}}" />
<span class="item-name-label competence-name">{{rune.name}}</span>
<span class="item-field-label-long">{{rune.system.formule}}</span>
<span class="item-field-label-short">{{rune.system.seuil}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Tendances</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Allégeance</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="tendance"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each tendances as |tendance key|}}
<li class="item flexrow " data-item-id="{{tendance._id}}" data-item-type="tendance">
<img class="item-name-img" src="{{tendance.img}}" />
<span class="item-name-label competence-name">{{tendance.name}}</span>
<span class="item-field-label-short">{{tendance.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Traits Chaotiques</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="traitchaotique"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each traitsChaotiques as |trait key|}}
<li class="item flexrow " data-item-id="{{trait._id}}" data-item-type="traitchaotique">
<img class="item-name-img" src="{{trait.img}}" />
<span class="item-name-label competence-name">{{trait.name}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Traits d'Espèce</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="traitespece"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each traitsEspeces as |trait key|}}
<li class="item flexrow " data-item-id="{{trait._id}}" data-item-type="traitespece">
<img class="item-name-img" src="{{trait.img}}" />
<span class="item-name-label competence-name">{{trait.name}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Equipement Tab --}}
<div class="tab combat" data-group="primary" data-tab="combat">
<ul class="item-list alternate-list">
<li class="item flexrow">
<button class="chat-card-button" data-action="rollInitiative">Initiative (actuelle : {{initiative}} )</button>
<label class="item-field-label-short">&nbsp</label>
<label class="item-field-label-short">Monté?</label>
<input type="checkbox" name="system.combat.monte" {{checked system.combat.monte}} />
<label class="item-field-label-short">&nbsp</label>
<label class="item-field-label-medium">Défense totale?</label>
<input type="checkbox" name="system.combat.defensetotale" {{checked system.combat.defensetotale}} />
</li>
<li class="item flexrow">
<button class="chat-card-button" data-action="rollAssommer">Assommer</button>
<button class="chat-card-button" data-action="rollCoupBas">Coup bas</button>
<button class="chat-card-button" data-action="rollImmobiliser">Immobiliser</button>
<button class="chat-card-button" data-action="rollRepousser">Repousser</button>
<button class="chat-card-button" data-action="rollDesengager">Se désengager</button>
</li>
</ul>
<div class="flexcol">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Armes</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Attaque</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Défense</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Dégats</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="arme" title="Ajouter une arme"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each armes as |arme key|}}
<li class="item flexrow " data-item-id="{{arme._id}}" data-item-type="arme">
<img class="item-name-img" src="{{arme.img}}" />
<span class="item-name-label competence-name">{{arme.name}}</span>
<span class="item-field-label-short">
{{#if arme.system.equipped}}
<button data-action="rollArmeOffensif" class="button-sheet-roll">{{arme.system.totalOffensif}}</button>
{{else}}
<button disabled data-action="rollArmeOffensif" class="button-sheet-roll">{{arme.system.totalOffensif}}</button>
{{/if}}
</span>
{{#if arme.system.isdefense}}
<span class="item-field-label-short arme-defensif item-field-label-short"><label
class="arme-defensif item-field-label-short defense-sheet">{{arme.system.totalDefensif}}</label></span>
{{else}}
<span class="item-field-label-short arme-defensif item-field-label-short"><label
class="arme-defensif item-field-label-short defense-sheet">N/A</label></span>
{{/if}}
<span class="item-field-label-short">
{{#if arme.system.equipped}}
<button data-action="rollArmeDegats" class="button-sheet-roll">{{arme.system.totalDegats}}</button>
{{else}}
<button disabled data-action="rollArmeDegats" class="button-sheet-roll">{{arme.system.totalDegats}}</button>
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="equipItem" title="Equipé">{{#if arme.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control" data-action="editItem" title="Editer l' Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Supprimer l'Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Protections</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Protection</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="protection" title="Ajouter une arme"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each protections as |protection key|}}
<li class="item flexrow " data-item-id="{{protection._id}}" data-item-type="protection">
<img class="item-name-img" src="{{protection.img}}" />
<span class="item-name-label competence-name">{{protection.name}}</span>
<span class="item-field-label-short arme-defensif"><label
class="arme-defensif">{{protection.system.protection}}</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="equipItem" title="Equipé">{{#if protection.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control" data-action="editItem" title="Editer l'Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Supprimer l'Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Equipement Tab --}}
<div class="tab equipement" data-group="primary" data-tab="equipement">
<div class="flexcol">
<hr>
<div class="sheet-box color-bg-archetype">
<h4>
<label class="argent-total-text">
Argent Total : {{richesse.po}} PO - {{richesse.pa}} PA - {{richesse.sc}} SC (total {{richesse.valueSC}} SC)
</label>
</h4>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Richesses et Argent</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Quantité</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="monnaie" title="Ajouter une monnaie"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each monnaies as |monnaie key|}}
<li class="item flexrow " data-item-id="{{monnaie._id}}" data-item-type="monnaie">
<img class="item-name-img" src="{{monnaie.img}}" />
<span class="item-name-label competence-name">{{monnaie.name}}</span>
<span class="item-name-label competence-name item-field-label-medium">{{monnaie.system.quantite}}
<a class="quantity-modify plus-minus-button" data-quantite-value="-1">-</a>
<a class="quantity-modify plus-minus-button" data-quantite-value="+1">+</a>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<hr>
<div class="sheet-box color-bg-archetype">
<h4>
<label class="argent-total-text">
Valeur Total Equipement : {{valeurEquipement.po}} PO - {{valeurEquipement.pa}} PA - {{valeurEquipement.sc}} SC (total {{valeurEquipement.valueSC}} SC)
</label>
</h4>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipements</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Quantité</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="equipement" title="Ajouter un équipement"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each equipements as |equipement key|}}
<li class="item flexrow " data-item-id="{{equipement._id}}" data-item-type="equipement">
<img class="item-name-img" src="{{equipement.img}}" />
<span class="item-name-label competence-name">{{equipement.name}}</span>
<span class="item-name-label competence-name item-field-label-medium">{{equipement.system.quantite}}
<a class="quantity-modify plus-minus-button" data-quantite-value="-1">-</a>
<a class="quantity-modify plus-minus-button" data-quantite-value="+1">+</a>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Biography Tab --}}
<div class="tab biodata" data-group="primary" data-tab="biodata">
<div>
<ul class="item-list alternate-list">
{{#each historiques as |historique key|}}
<li class="item flexrow" data-item-id="{{historique._id}}">
<label class="generic-label">Historique : </label>
<label class="generic-label">{{historique.name}}</label>
<label></label>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
{{#each profils as |profil key|}}
<li class="item flexrow" data-item-id="{{profil._id}}">
<label class="generic-label">Profil : </label>
<label class="generic-label">{{profil.name}}</label>
<label></label>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="grid grid-3col">
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Sexe</label>
<input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Age</label>
<input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Expérience</label>
<input type="text" class="" name="system.biodata.experience" value="{{system.biodata.experience}}"
data-dtype="String" />
</li>
</ul>
</div>
<div>
<ul>
<li class="item flexrow">
<label class="generic-label">Taille</label>
<input type="text" class="" name="system.biodata.size" value="{{system.biodata.size}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Cheveux</label>
<input type="text" class="" name="system.biodata.hair" value="{{system.biodata.hair}}"
data-dtype="String" />
</li>
</ul>
</div>
<div>
<li class="item flexrow">
<label class="generic-label">Yeux</label>
<input type="text" class="" name="system.biodata.eyes" value="{{system.biodata.eyes}}"
data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Main préférée</label>
<input type="text" class="" name="system.biodata.preferredhand" value="{{system.biodata.preferredhand}}"
data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Poids</label>
<input type="text" class="" name="system.biodata.weight" value="{{system.biodata.weight}}"
data-dtype="String" />
</li>
</div>
</div>
<span>
<h3>Description</h3>
</span>
<div class="medium-editor item-text-long-line">
{{editor description target="system.biodata.description" button=true owner=owner editable=editable}}
</div>
</div>
</section>
</section>

View File

@@ -0,0 +1,789 @@
<section>
{{!-- Sheet Header --}}
<header class="sheet-header">
{{!-- Bannière : image + nom + bouton --}}
<div class="header-banner">
<img class="profile-img" src="{{actor.img}}" data-action="editImage" title="{{actor.name}}" />
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Nom du personnage" /></h1>
<button type="button" class="sheet-mode-toggle" data-action="toggleSheet"
data-tooltip="{{#if isEditMode}}Mode Visualisation{{else}}Mode Édition{{/if}}">
<i class="{{#if isEditMode}}fas fa-eye{{else}}fas fa-edit{{/if}}"></i>
</button>
</div>
{{!-- Cartes de statistiques --}}
<div class="header-stat-cards">
{{!-- LOI --}}
<div class="stat-card card-loi{{#if (gt system.balance.loi system.balance.chaos)}} dominant{{/if}}">
<div class="stat-card-title">⚖ Loi</div>
<div class="stat-card-content">
<div class="stat-field">
<label>Niv.</label>
<input type="text" name="system.balance.loi" value="{{system.balance.loi}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Pts</label>
<select name="system.balance.pointsloi">
{{selectOptions config.listeNiveauSkill selected=system.balance.pointsloi}}
</select>
</div>
<div class="stat-derived">Aspect : {{system.balance.aspect}}</div>
</div>
</div>
{{!-- CHAOS --}}
<div class="stat-card card-chaos{{#if (gt system.balance.chaos system.balance.loi)}} dominant{{/if}}">
<div class="stat-card-title">☯ Chaos</div>
<div class="stat-card-content">
<div class="stat-field">
<label>Niv.</label>
<input type="text" name="system.balance.chaos" value="{{system.balance.chaos}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Pts</label>
<select name="system.balance.pointschaos">
{{selectOptions config.listeNiveauSkill selected=system.balance.pointschaos}}
</select>
</div>
<div class="stat-derived">Marge : {{system.balance.marge}}</div>
</div>
</div>
{{!-- BONNE AVENTURE --}}
<div class="stat-card card-ba">
<div class="stat-card-title">★ Bonne Aventure</div>
<div class="stat-card-content">
<div class="stat-field">
<label>Base</label>
<input type="text" name="system.bonneaventure.base" value="{{system.bonneaventure.base}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Act.</label>
<input type="text" name="system.bonneaventure.actuelle" value="{{system.bonneaventure.actuelle}}" data-dtype="Number" />
</div>
<div class="stat-field">
<label>Éclat</label>
<input type="text" name="system.eclat.value" value="{{system.eclat.value}}" data-dtype="Number" />
</div>
</div>
</div>
{{!-- VIGUEUR --}}
<div class="stat-card card-vigueur">
<div class="stat-card-title">♥ Vigueur <span class="stat-sub">({{system.sante.vigueur}})</span></div>
<div class="stat-card-content">
<div class="stat-field">
<label>État</label>
<select name="system.sante.etat">
{{selectOptions combativiteList selected=system.sante.etat valueAttr="value" nameAttr="value" labelAttr="label"}}
</select>
</div>
</div>
</div>
{{!-- ÂME --}}
<div class="stat-card card-ame">
<div class="stat-card-title">✦ Âme <span class="stat-sub">(Seuil {{system.ame.seuilpouvoir}})</span></div>
<div class="stat-card-content">
<div class="stat-field">
<label>État</label>
<select name="system.ame.etat">
{{selectOptions ameList selected=system.ame.etat valueAttr="value" nameAttr="value" labelAttr="label"}}
</select>
</div>
<div class="stat-field">
<label>Max</label>
<select name="system.ame.max">
{{selectOptions ameMaxList selected=system.ame.max valueAttr="value" nameAttr="value" labelAttr="label"}}
</select>
</div>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<hr>
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="principal">Attributs</a>
<a class="item" data-tab="competences">Compétences</a>
<a class="item" data-tab="dons">Dons & Pactes</a>
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="equipement">Equipement</a>
<a class="item" data-tab="biodata">Bio&Notes</a>
</nav>
<hr>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Main Tab --}}
<div class="tab principal" data-group="primary" data-tab="principal">
<div class="flexcol">
<div class="grid grid-2col">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
{{#each system.attributs as |attr key|}}
<li class="item flexrow " data-attr-key="{{key}}">
<img class="item-name-img" src="systems/fvtt-mournblade-cyd-2-0/assets/icons/{{attr.labelnorm}}.webp">
<span data-tooltip="Cliquez pour faire un jet" class="item-name-label competence-name item-field-label-medium"><a
data-action="rollAttribut" data-attr-key="{{key}}">{{attr.label}}</a></span>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number">
{{selectOptions @root.config.listeNiveauSkill selected=attr.value}}
</select>
</li>
{{/each}}
<li class="item flexrow">
<img class="item-name-img" src="systems/fvtt-mournblade-cyd-2-0/assets/icons/vitesse.webp">
<span class="item-name-label competence-name item-field-label-medium">Vitesse</span>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.vitesse.value"
value="{{system.vitesse.value}}" data-dtype="Number" />
</li>
</ul>
</div>
<div class="sheet-box color-bg-archetype adversite-section">
<h4 class="adversite-section-title">Adversités</h4>
<div class="adversite-cards">
{{#each system.adversite as |adv key|}}
<div class="adversite-card adversite-{{key}}" data-adversite="{{key}}">
<div class="adversite-card-title">{{upperFirst key}}</div>
<img class="adversite-gem" src="systems/fvtt-mournblade-cyd-2-0/assets/icons/gemme_{{key}}.webp">
<div class="adversite-value">{{adv}}</div>
<div class="adversite-controls">
<a data-action="modifyAdversite" class="adv-btn adv-minus" data-adversite-value="-1"></a>
<a data-action="modifyAdversite" class="adv-btn adv-plus" data-adversite-value="1">+</a>
</div>
</div>
{{/each}}
</div>
<div class="adversite-total {{#if adversiteTotal}}adversite-total-nonzero{{/if}}"
data-tooltip="Malus soustrait à tous les jets de dés">
<span class="adversite-total-label">Malus jets</span>
<span class="adversite-total-value">{{adversiteTotal}}</span>
</div>
{{#if isGM}}
<div class="adversite-modifiers">
<div class="adversite-modifier-row">
<label data-tooltip="Modificateur de Vigueur">Mod. Vigueur</label>
<input type="text" name="system.sante.vigueurmodifier"
value="{{system.sante.vigueurmodifier}}" data-dtype="Number" />
</div>
<div class="adversite-modifier-row">
<label data-tooltip="Modificateur de Seuil de Pouvoir">Mod. Seuil Pouvoir</label>
<input type="text" name="system.ame.seuilpouvoirmodifier"
value="{{system.ame.seuilpouvoirmodifier}}" data-dtype="Number" />
</div>
</div>
{{/if}}
</div>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Talents</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="talent" title="Ajouter un Talent"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each talents as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="talent">
<img class="item-name-img" src="{{talent.img}}" />
<span class="item-name-label competence-name">{{talent.name}}</span>
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Competences Tab --}}
<div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexrow">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Compétences</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Niveau</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each skills as |skill key|}}
<li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
<img class="item-name-img" src="{{skill.img}}" />
<div class="flexcol item-name-label">
<span class="item-name-label competence-name"><a data-action="rollCompetence" class="item-field-label-short"
data-attr-key="tochoose">{{skill.name}}</a></span>
<span class="predilection-text">
{{#each skill.system.predilections as |pred key|}}
{{#if (and pred.acquise (not pred.used))}}
{{pred.name}},
{{/if}}
{{/each}}
</span>
</div>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
{{selectOptions @root.config.listeNiveauSkill selected=skill.system.niveau}}
</select>
{{#if (ne skill.system.attribut1 "none")}}
<button data-action="rollCompetence" class="button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
{{/if}}
{{#if (ne skill.system.attribut2 "none")}}
<button data-action="rollCompetence" class="button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
{{/if}}
{{#if (ne skill.system.attribut3 "none")}}
<button data-action="rollCompetence" class="button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Dons/Pactes Tab --}}
<div class="tab dons" data-group="primary" data-tab="dons">
<div class="flexcol">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Dons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Allégeance</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="don"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each dons as |don key|}}
<li class="item flexrow " data-item-id="{{don._id}}" data-item-type="don">
<img class="item-name-img" src="{{don.img}}" />
<span class="item-name-label competence-name">{{don.name}}</span>
<span class="item-field-label-short">{{don.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Pactes</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Allégeance</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="pacte"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each pactes as |pacte key|}}
<li class="item flexrow " data-item-id="{{pacte._id}}" data-item-type="pacte">
<img class="item-name-img" src="{{pacte.img}}" />
<span class="item-name-label competence-name">{{pacte.name}}</span>
<span class="item-field-label-short">{{pacte.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Runes</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Haut Parler</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Difficulté</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="rune"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each runes as |rune key|}}
<li class="item flexrow " data-item-id="{{rune._id}}" data-item-type="rune">
<img class="item-name-img" src="{{rune.img}}" />
<span class="item-name-label competence-name">{{rune.name}}</span>
<span class="item-field-label-long">{{rune.system.formule}}</span>
<span class="item-field-label-short">{{rune.system.seuil}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Tendances</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Allégeance</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="tendance"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each tendances as |tendance key|}}
<li class="item flexrow " data-item-id="{{tendance._id}}" data-item-type="tendance">
<img class="item-name-img" src="{{tendance.img}}" />
<span class="item-name-label competence-name">{{tendance.name}}</span>
<span class="item-field-label-short">{{tendance.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Traits Chaotiques</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="traitchaotique"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each traitsChaotiques as |trait key|}}
<li class="item flexrow " data-item-id="{{trait._id}}" data-item-type="traitchaotique">
<img class="item-name-img" src="{{trait.img}}" />
<span class="item-name-label competence-name">{{trait.name}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Traits d'Espèce</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="traitespece"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each traitsEspeces as |trait key|}}
<li class="item flexrow " data-item-id="{{trait._id}}" data-item-type="traitespece">
<img class="item-name-img" src="{{trait.img}}" />
<span class="item-name-label competence-name">{{trait.name}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Equipement Tab --}}
<div class="tab combat" data-group="primary" data-tab="combat">
<ul class="item-list alternate-list">
<li class="item flexrow">
<button class="chat-card-button" data-action="rollInitiative">Initiative (actuelle : {{initiative}} )</button>
<label class="item-field-label-short">&nbsp</label>
<label class="item-field-label-short">Monté?</label>
<input type="checkbox" name="system.combat.monte" {{checked system.combat.monte}} />
<label class="item-field-label-short">&nbsp</label>
<label class="item-field-label-medium">Défense totale?</label>
<input type="checkbox" name="system.combat.defensetotale" {{checked system.combat.defensetotale}} />
</li>
<li class="item flexrow">
<button class="chat-card-button" data-action="rollAssommer">Assommer</button>
<button class="chat-card-button" data-action="rollCoupBas">Coup bas</button>
<button class="chat-card-button" data-action="rollImmobiliser">Immobiliser</button>
<button class="chat-card-button" data-action="rollRepousser">Repousser</button>
<button class="chat-card-button" data-action="rollDesengager">Se désengager</button>
</li>
</ul>
<div class="flexcol">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Armes</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Attaque</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Défense</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Dégats</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="arme" title="Ajouter une arme"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each armes as |arme key|}}
<li class="item flexrow " data-item-id="{{arme._id}}" data-item-type="arme">
<img class="item-name-img" src="{{arme.img}}" />
<span class="item-name-label competence-name">{{arme.name}}</span>
<span class="item-field-label-short">
{{#if arme.system.equipped}}
<button data-action="rollArmeOffensif" class="button-sheet-roll">{{arme.system.totalOffensif}}</button>
{{else}}
<button disabled data-action="rollArmeOffensif" class="button-sheet-roll">{{arme.system.totalOffensif}}</button>
{{/if}}
</span>
{{#if arme.system.isdefense}}
<span class="item-field-label-short arme-defensif item-field-label-short"><label
class="arme-defensif item-field-label-short defense-sheet">{{arme.system.totalDefensif}}</label></span>
{{else}}
<span class="item-field-label-short arme-defensif item-field-label-short"><label
class="arme-defensif item-field-label-short defense-sheet">N/A</label></span>
{{/if}}
<span class="item-field-label-short">
{{#if arme.system.equipped}}
<button data-action="rollArmeDegats" class="button-sheet-roll">{{arme.system.totalDegats}}</button>
{{else}}
<button disabled data-action="rollArmeDegats" class="button-sheet-roll">{{arme.system.totalDegats}}</button>
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="equipItem" title="Equipé">{{#if arme.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control" data-action="editItem" title="Editer l' Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Supprimer l'Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Protections</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Protection</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="protection" title="Ajouter une arme"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each protections as |protection key|}}
<li class="item flexrow " data-item-id="{{protection._id}}" data-item-type="protection">
<img class="item-name-img" src="{{protection.img}}" />
<span class="item-name-label competence-name">{{protection.name}}</span>
<span class="item-field-label-short arme-defensif"><label
class="arme-defensif">{{protection.system.protection}}</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="equipItem" title="Equipé">{{#if protection.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control" data-action="editItem" title="Editer l'Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Supprimer l'Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Equipement Tab --}}
<div class="tab equipement" data-group="primary" data-tab="equipement">
<div class="flexcol">
<hr>
<div class="sheet-box color-bg-archetype">
<h4>
<label class="argent-total-text">
Argent Total : {{richesse.po}} PO - {{richesse.pa}} PA - {{richesse.sc}} SC (total {{richesse.valueSC}} SC)
</label>
</h4>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Richesses et Argent</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Quantité</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="monnaie" title="Ajouter une monnaie"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each monnaies as |monnaie key|}}
<li class="item flexrow " data-item-id="{{monnaie._id}}" data-item-type="monnaie">
<img class="item-name-img" src="{{monnaie.img}}" />
<span class="item-name-label competence-name">{{monnaie.name}}</span>
<span class="item-name-label competence-name item-field-label-medium">{{monnaie.system.quantite}}
<a class="quantity-modify plus-minus-button" data-quantite-value="-1">-</a>
<a class="quantity-modify plus-minus-button" data-quantite-value="+1">+</a>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<hr>
<div class="sheet-box color-bg-archetype">
<h4>
<label class="argent-total-text">
Valeur Total Equipement : {{valeurEquipement.po}} PO - {{valeurEquipement.pa}} PA - {{valeurEquipement.sc}} SC (total {{valeurEquipement.valueSC}} SC)
</label>
</h4>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipements</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Quantité</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="createItem" data-type="equipement" title="Ajouter un équipement"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each equipements as |equipement key|}}
<li class="item flexrow " data-item-id="{{equipement._id}}" data-item-type="equipement">
<img class="item-name-img" src="{{equipement.img}}" />
<span class="item-name-label competence-name">{{equipement.name}}</span>
<span class="item-name-label competence-name item-field-label-medium">{{equipement.system.quantite}}
<a class="quantity-modify plus-minus-button" data-quantite-value="-1">-</a>
<a class="quantity-modify plus-minus-button" data-quantite-value="+1">+</a>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Biography Tab --}}
<div class="tab biodata" data-group="primary" data-tab="biodata">
<div>
<ul class="item-list alternate-list">
{{#each historiques as |historique key|}}
<li class="item flexrow" data-item-id="{{historique._id}}">
<label class="generic-label">Historique : </label>
<label class="generic-label">{{historique.name}}</label>
<label></label>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
{{#each profils as |profil key|}}
<li class="item flexrow" data-item-id="{{profil._id}}">
<label class="generic-label">Profil : </label>
<label class="generic-label">{{profil.name}}</label>
<label></label>
<div class="item-controls item-controls-fixed">
<a class="item-control" data-action="editItem" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control" data-action="deleteItem" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="grid grid-3col">
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Sexe</label>
<input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Age</label>
<input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Expérience</label>
<input type="text" class="" name="system.biodata.experience" value="{{system.biodata.experience}}"
data-dtype="String" />
</li>
</ul>
</div>
<div>
<ul>
<li class="item flexrow">
<label class="generic-label">Taille</label>
<input type="text" class="" name="system.biodata.size" value="{{system.biodata.size}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Cheveux</label>
<input type="text" class="" name="system.biodata.hair" value="{{system.biodata.hair}}"
data-dtype="String" />
</li>
</ul>
</div>
<div>
<li class="item flexrow">
<label class="generic-label">Yeux</label>
<input type="text" class="" name="system.biodata.eyes" value="{{system.biodata.eyes}}"
data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Main préférée</label>
<input type="text" class="" name="system.biodata.preferredhand" value="{{system.biodata.preferredhand}}"
data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Poids</label>
<input type="text" class="" name="system.biodata.weight" value="{{system.biodata.weight}}"
data-dtype="String" />
</li>
</div>
</div>
<span>
<h3>Description</h3>
</span>
<div class="medium-editor item-text-long-line">
{{editor description target="system.biodata.description" button=true owner=owner editable=editable}}
</div>
</div>
</section>
</section>

View File

@@ -356,6 +356,30 @@
} }
} }
// ── Éditeurs ProseMirror dans les onglets ──────────────────────────
// Le texte global du sheet-body hérite d'une couleur claire (#efe6d8)
// mais le fond de l'éditeur est blanc/beige clair → illisible.
// On force couleur sombre + fond clair sur le contenu éditable.
.tab prose-mirror,
.tab .editor prose-mirror {
.editor-content {
color: #2a1a0a !important;
background: rgba(255, 250, 240, 0.92);
border-radius: 3px;
padding: 0.4rem 0.5rem;
min-height: 6rem;
p, ul, ol, li, h1, h2, h3, h4 {
color: #2a1a0a !important;
}
}
// Fond et couleur quand actif (mode édition)
&:not(.inactive) .editor-content {
background: rgba(255, 252, 245, 0.98);
}
}
// Listes compactes dans les sections // Listes compactes dans les sections
.compact-list { .compact-list {
list-style: none; list-style: none;

View File

@@ -25,7 +25,7 @@
--tab-header-font-size: 1.0rem; --tab-header-font-size: 1.0rem;
--tab-header-font-weight: 700; --tab-header-font-weight: 700;
--tab-header-color: #403f3e; --tab-header-color: #403f3e;
--tab-header-color-active: #4a0404; --tab-header-color-active: #2a1400;
--font-primary: CentaurMT; --font-primary: CentaurMT;
--font-secondary: CentaurMT; --font-secondary: CentaurMT;
@@ -1313,7 +1313,8 @@
text-shadow: 0px 1px 0px #4d3534; text-shadow: 0px 1px 0px #4d3534;
position: relative; position: relative;
max-height: 1.8rem; max-height: 1.8rem;
width: 3.5rem; width: 5rem;
white-space: nowrap;
margin-left: 4px; margin-left: 4px;
} }
@@ -1332,7 +1333,8 @@
text-shadow: 0px 1px 0px #4d3534; text-shadow: 0px 1px 0px #4d3534;
position: relative; position: relative;
max-height: 1.8rem; max-height: 1.8rem;
width: 3.5rem; width: 5rem;
white-space: nowrap;
margin-left: 4px; margin-left: 4px;
} }
@@ -1629,50 +1631,50 @@
margin-right: 6px; margin-right: 6px;
} }
/* ==================== Roll Dialog V2 Styles ==================== */ /* ==================== Roll Dialog V2 Styles ==================== */
.application.mournblade-roll-dialog .window-content { .application.mournblade-cyd2-roll-dialog .window-content {
padding: 0; padding: 0;
} }
.window-app.mournblade-roll-dialog .window-content { .window-app.mournblade-cyd2-roll-dialog .window-content {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.mournblade-roll-dialog { .mournblade-cyd2-roll-dialog {
background: url("../assets/ui/pc_sheet_bg.webp"); background: url("../assets/ui/pc_sheet_bg.webp");
background-repeat: repeat; background-repeat: repeat;
font-family: CentaurMT; font-family: CentaurMT;
} }
.mournblade-roll-dialog * { .mournblade-cyd2-roll-dialog * {
color: #2a2a2a; color: #2a2a2a;
} }
/* Header */ /* Header */
.mournblade-roll-dialog .dialog-header { .mournblade-cyd2-roll-dialog .dialog-header {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
padding: 8px; padding: 8px;
background: linear-gradient(135deg, #4a0404 0%, #6d0808 100%); background: linear-gradient(135deg, #2a1400 0%, #4a2200 100%);
border-bottom: 3px solid #8b0000; border-bottom: 3px solid #8b4513;
margin-bottom: 0; margin-bottom: 0;
} }
.mournblade-roll-dialog .dialog-header .actor-icon { .mournblade-cyd2-roll-dialog .dialog-header .actor-icon {
width: 48px; width: 48px;
height: 48px; height: 48px;
border-radius: 4px; border-radius: 4px;
border: 2px solid #8b0000; border: 2px solid #8b4513;
object-fit: cover; object-fit: cover;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
} }
.mournblade-roll-dialog .dialog-header .dialog-title { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title {
flex: 1; flex: 1;
} }
.mournblade-roll-dialog .dialog-header .dialog-title h3 { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title h3 {
margin: 0; margin: 0;
font-size: 1.1rem; font-size: 1.1rem;
color: #f5f5f5; color: #f5f5f5;
@@ -1681,82 +1683,84 @@
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .dialog-header .dialog-title .competence-name { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title .competence-name {
font-size: 0.85rem; font-size: 0.85rem;
color: #ffcccb; color: #f0d0a0;
margin-top: 2px; margin-top: 2px;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
} }
.mournblade-roll-dialog .dialog-header .dialog-title .competence-name .attribut-info { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title .competence-name .attribut-info {
color: #ffd700; color: #ffd700;
font-weight: bold; font-weight: bold;
font-size: 0.9em; font-size: 0.9em;
} }
/* Content */ /* Content */
.mournblade-roll-dialog .dialog-content { .mournblade-cyd2-roll-dialog .dialog-content {
padding: 8px; padding: 6px 8px;
max-height: 650px; max-height: 600px;
overflow-y: auto; overflow-y: auto;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar {
width: 8px; width: 8px;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar-track { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
border-radius: 4px; border-radius: 4px;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar-thumb { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar-thumb {
background: rgba(139, 0, 0, 0.6); background: rgba(139, 69, 19, 0.6);
border-radius: 4px; border-radius: 4px;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar-thumb:hover { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar-thumb:hover {
background: rgba(139, 0, 0, 0.8); background: rgba(139, 69, 19, 0.8);
} }
/* Form Groups */ /* Form Groups */
.mournblade-roll-dialog .form-group { .mournblade-cyd2-roll-dialog .form-group {
margin-bottom: 8px; margin-bottom: 6px;
} }
.mournblade-roll-dialog .form-group label { .mournblade-cyd2-roll-dialog .form-group label {
display: block; flex-shrink: 0;
white-space: nowrap;
font-weight: bold; font-weight: bold;
color: #1a1a1a; color: #1a1a1a;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5); text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
margin-bottom: 3px;
font-size: 0.9rem; font-size: 0.9rem;
margin-bottom: 0;
} }
.mournblade-roll-dialog .form-group input, .mournblade-cyd2-roll-dialog .form-group input,
.mournblade-roll-dialog .form-group select { .mournblade-cyd2-roll-dialog .form-group select {
width: 100%; flex: 1;
padding: 5px 8px; min-width: 60px;
padding: 4px 6px;
background: rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.95);
border: 1px solid rgba(100, 100, 100, 0.5); border: 1px solid rgba(100, 100, 100, 0.5);
border-radius: 3px; border-radius: 3px;
color: #1a1a1a; color: #1a1a1a;
font-size: 0.95rem; font-size: 0.9rem;
font-weight: 500; font-weight: 500;
font-family: CentaurMT; font-family: CentaurMT;
} }
.mournblade-roll-dialog .form-group input:focus, .mournblade-cyd2-roll-dialog .form-group input:focus,
.mournblade-roll-dialog .form-group select:focus { .mournblade-cyd2-roll-dialog .form-group select:focus {
outline: none; outline: none;
border-color: #8b0000; border-color: #8b4513;
box-shadow: 0 0 5px rgba(139, 0, 0, 0.6); box-shadow: 0 0 5px rgba(139, 69, 19, 0.6);
background: #ffffff; background: #ffffff;
} }
.mournblade-roll-dialog .form-group input:disabled, .mournblade-cyd2-roll-dialog .form-group input:disabled,
.mournblade-roll-dialog .form-group select:disabled { .mournblade-cyd2-roll-dialog .form-group select:disabled {
opacity: 0.7; opacity: 0.7;
cursor: not-allowed; cursor: not-allowed;
background: rgba(200, 200, 200, 0.9); background: rgba(200, 200, 200, 0.9);
@@ -1764,23 +1768,23 @@
} }
/* Grids */ /* Grids */
.mournblade-roll-dialog .modifiers-grid { .mournblade-cyd2-roll-dialog .modifiers-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 8px; gap: 6px;
margin-bottom: 10px; margin-bottom: 8px;
} }
/* Sections spéciales */ /* Sections spéciales */
.mournblade-roll-dialog .attributes-section { .mournblade-cyd2-roll-dialog .attributes-section {
background: rgba(139, 0, 0, 0.1); background: rgba(139, 69, 19, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(139, 0, 0, 0.3); border: 1px solid rgba(139, 69, 19, 0.3);
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .rune-section { .mournblade-cyd2-roll-dialog .rune-section {
background: rgba(75, 0, 130, 0.1); background: rgba(75, 0, 130, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
@@ -1788,37 +1792,37 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .weapon-section { .mournblade-cyd2-roll-dialog .weapon-section {
background: rgba(184, 134, 11, 0.1); background: rgba(184, 134, 11, 0.1);
padding: 8px; padding: 6px 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(184, 134, 11, 0.3); border: 1px solid rgba(184, 134, 11, 0.3);
margin-bottom: 10px;
}
.mournblade-roll-dialog .weapon-info {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 8px;
background: rgba(184, 134, 11, 0.15);
border-radius: 3px;
margin-bottom: 8px; margin-bottom: 8px;
} }
.mournblade-roll-dialog .weapon-info .weapon-label { .mournblade-cyd2-roll-dialog .weapon-info {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 6px;
background: rgba(184, 134, 11, 0.15);
border-radius: 3px;
margin-bottom: 6px;
}
.mournblade-cyd2-roll-dialog .weapon-info .weapon-label {
font-weight: bold; font-weight: bold;
font-size: 0.9rem; font-size: 0.9rem;
color: #1a1a1a; color: #1a1a1a;
} }
.mournblade-roll-dialog .weapon-info .weapon-bonus { .mournblade-cyd2-roll-dialog .weapon-info .weapon-bonus {
font-size: 0.85rem; font-size: 0.85rem;
color: #8b0000; color: #8b4513;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .defense-info { .mournblade-cyd2-roll-dialog .defense-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -1828,79 +1832,88 @@
margin-bottom: 8px; margin-bottom: 8px;
} }
.mournblade-roll-dialog .defense-info .defense-label { .mournblade-cyd2-roll-dialog .defense-info .defense-label {
font-size: 0.85rem; font-size: 0.85rem;
color: #1a1a1a; color: #1a1a1a;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .defense-info .defense-value { .mournblade-cyd2-roll-dialog .defense-info .defense-value {
font-size: 1rem; font-size: 1rem;
color: #006400; color: #006400;
font-weight: bold; font-weight: bold;
} }
/* Combat modifiers */ /* Combat modifiers */
.mournblade-roll-dialog .combat-modifiers, .mournblade-cyd2-roll-dialog .combat-modifiers,
.mournblade-roll-dialog .ranged-combat-section { .mournblade-cyd2-roll-dialog .ranged-combat-section {
background: rgba(139, 0, 0, 0.1); background: rgba(139, 69, 19, 0.1);
padding: 8px; padding: 6px 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(139, 0, 0, 0.3); border: 1px solid rgba(139, 69, 19, 0.3);
margin-bottom: 10px; margin-bottom: 8px;
} }
.mournblade-roll-dialog .combat-modifiers h4, .mournblade-cyd2-roll-dialog .combat-modifiers h4,
.mournblade-roll-dialog .ranged-combat-section h4 { .mournblade-cyd2-roll-dialog .ranged-combat-section h4 {
margin: 0 0 8px 0; margin: 0 0 6px 0;
color: #2a2a2a; color: #2a2a2a;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
font-size: 0.95rem; font-size: 0.9rem;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .modifiers-columns { .mournblade-cyd2-roll-dialog .modifiers-columns {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 5px 10px; gap: 3px 8px;
margin-bottom: 6px;
} }
.mournblade-roll-dialog .checkbox-label { .mournblade-cyd2-roll-dialog .checkbox-label {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 6px; gap: 5px;
padding: 4px 6px; padding: 3px 4px;
cursor: pointer; cursor: pointer;
border-radius: 3px; border-radius: 3px;
transition: background 0.2s ease; transition: background 0.2s ease;
} }
.mournblade-roll-dialog .checkbox-label:hover { .mournblade-cyd2-roll-dialog .checkbox-label:hover {
background: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.15);
} }
.mournblade-roll-dialog .checkbox-label input[type="checkbox"] { .mournblade-cyd2-roll-dialog .checkbox-label input[type="checkbox"] {
width: auto; width: auto;
margin: 0; margin: 0;
flex-shrink: 0;
cursor: pointer; cursor: pointer;
accent-color: #8b0000; accent-color: #8b4513;
} }
.mournblade-roll-dialog .checkbox-label span { .mournblade-cyd2-roll-dialog .checkbox-label span {
color: #1a1a1a; color: #1a1a1a;
font-size: 0.85rem; font-size: 0.82rem;
user-select: none; user-select: none;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5); text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
line-height: 1.2;
} }
.mournblade-roll-dialog .checkbox-label.highlight { .mournblade-cyd2-roll-dialog .checkbox-label.highlight {
background: rgba(255, 215, 0, 0.15); background: rgba(255, 215, 0, 0.15);
border: 1px solid rgba(255, 215, 0, 0.4); border: 1px solid rgba(255, 215, 0, 0.4);
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .info-message { /* Ranged combat: 1-column grid for selects (long labels) */
.mournblade-cyd2-roll-dialog .ranged-combat-section .modifiers-grid {
grid-template-columns: 1fr;
gap: 4px;
}
.mournblade-cyd2-roll-dialog .info-message {
padding: 6px 10px; padding: 6px 10px;
background: rgba(33, 150, 243, 0.1); background: rgba(33, 150, 243, 0.1);
border-left: 3px solid rgba(33, 150, 243, 0.6); border-left: 3px solid rgba(33, 150, 243, 0.6);
@@ -1912,7 +1925,7 @@
/* Malus section */ /* Malus section */
.mournblade-roll-dialog .malus-section { .mournblade-cyd2-roll-dialog .malus-section {
background: rgba(100, 100, 100, 0.1); background: rgba(100, 100, 100, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
@@ -1920,13 +1933,13 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .malus-grid { .mournblade-cyd2-roll-dialog .malus-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 8px; gap: 8px;
} }
.mournblade-roll-dialog .malus-item { .mournblade-cyd2-roll-dialog .malus-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -1935,20 +1948,20 @@
border-radius: 3px; border-radius: 3px;
} }
.mournblade-roll-dialog .malus-item .malus-label { .mournblade-cyd2-roll-dialog .malus-item .malus-label {
font-size: 0.85rem; font-size: 0.85rem;
color: #2a2a2a; color: #2a2a2a;
font-weight: 500; font-weight: 500;
} }
.mournblade-roll-dialog .malus-item .malus-value { .mournblade-cyd2-roll-dialog .malus-item .malus-value {
font-size: 0.95rem; font-size: 0.95rem;
color: #8b0000; color: #8b4513;
font-weight: bold; font-weight: bold;
} }
/* Registered modifiers */ /* Registered modifiers */
.mournblade-roll-dialog .registered-modifiers { .mournblade-cyd2-roll-dialog .registered-modifiers {
background: rgba(75, 0, 130, 0.1); background: rgba(75, 0, 130, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
@@ -1956,7 +1969,7 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .registered-modifiers h4 { .mournblade-cyd2-roll-dialog .registered-modifiers h4 {
margin: 0 0 6px 0; margin: 0 0 6px 0;
color: #2a2a2a; color: #2a2a2a;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
@@ -1964,30 +1977,32 @@
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .registered-modifiers h4 i { .mournblade-cyd2-roll-dialog .registered-modifiers h4 i {
margin-right: 6px; margin-right: 6px;
color: #4b0082; color: #4b0082;
} }
.mournblade-roll-dialog .modifier-item { .mournblade-cyd2-roll-dialog .modifier-item {
margin-bottom: 4px; margin-bottom: 4px;
} }
/* Special option */ /* Special option */
.mournblade-roll-dialog .special-option { .mournblade-cyd2-roll-dialog .special-option {
margin-top: 10px; margin-top: 10px;
} }
/* Dialog buttons */ /* Dialog buttons */
.mournblade-roll-dialog .dialog-buttons { .mournblade-cyd2-roll-dialog .dialog-buttons,
.mournblade-cyd2-roll-dialog .form-footer {
display: flex; display: flex;
gap: 10px; gap: 10px;
padding: 10px; padding: 10px 12px 14px !important;
border-top: 2px solid rgba(139, 0, 0, 0.3); border-top: 2px solid rgba(139, 69, 19, 0.3);
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
} }
.mournblade-roll-dialog .dialog-buttons button { .mournblade-cyd2-roll-dialog .dialog-buttons button,
.mournblade-cyd2-roll-dialog .form-footer button {
flex: 1; flex: 1;
padding: 8px 14px; padding: 8px 14px;
border: none; border: none;
@@ -2000,33 +2015,46 @@
text-transform: uppercase; text-transform: uppercase;
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld10"], .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld10"],
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld20"] { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld20"],
background: linear-gradient(135deg, #8b0000 0%, #6d0808 100%); .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld10"],
color: #f5f5f5; .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld20"] {
background: rgba(100, 100, 100, 0.3) !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld10"]:hover, .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld10"]:hover,
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld20"]:hover { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld20"]:hover,
background: linear-gradient(135deg, #a00000 0%, #8b0000 100%); .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld10"]:hover,
transform: translateY(-2px); .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld20"]:hover {
box-shadow: 0 4px 8px rgba(139, 0, 0, 0.5); background: rgba(100, 100, 100, 0.5) !important;
transform: translateY(-1px);
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="cancel"] { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="cancel"],
.mournblade-cyd2-roll-dialog .form-footer button[data-action="cancel"] {
background: rgba(100, 100, 100, 0.3); background: rgba(100, 100, 100, 0.3);
color: #2a2a2a; color: #2a2a2a;
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="cancel"]:hover { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="cancel"]:hover,
.mournblade-cyd2-roll-dialog .form-footer button[data-action="cancel"]:hover {
background: rgba(100, 100, 100, 0.5); background: rgba(100, 100, 100, 0.5);
} }
/* Affichage d'une valeur non-éditable dans le dialog */
.mournblade-cyd2-roll-dialog .field-value {
display: inline-block;
font-weight: bold;
color: #8b4513;
font-size: 0.95rem;
padding: 0 4px;
}
/* ==================== Sheet Mode Toggle Button ==================== */ /* ==================== Sheet Mode Toggle Button ==================== */
.sheet-mode-toggle { .sheet-mode-toggle {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
border: 1px solid #8b0000; border: 1px solid #8b4513;
border-radius: 3px; border-radius: 3px;
color: #f5f5f5; color: #f5f5f5;
padding: 2px 4px; padding: 2px 4px;
@@ -2041,7 +2069,7 @@
flex-shrink: 0; flex-shrink: 0;
&:hover { &:hover {
background: linear-gradient(135deg, #a00000 0%, #5a0505 100%); background: linear-gradient(135deg, #a06010 0%, #4a2200 100%);
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} }
@@ -2054,15 +2082,15 @@
/* ==================== Chat Message Styles ==================== */ /* ==================== Chat Message Styles ==================== */
.mournblade-chat-result { .mournblade-chat-result {
background: linear-gradient(135deg, rgba(74, 4, 4, 0.2) 0%, rgba(139, 0, 0, 0.15) 100%); background: linear-gradient(135deg, rgba(42, 20, 0, 0.2) 0%, rgba(139, 69, 19, 0.15) 100%);
border: 2px solid #8b0000; border: 2px solid #8b4513;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
font-family: CentaurMT, serif; font-family: CentaurMT, serif;
.chat-result-header { .chat-result-header {
background: linear-gradient(135deg, #4a0404 0%, #2a0202 100%); background: linear-gradient(135deg, #2a1400 0%, #2a0202 100%);
border-bottom: 2px solid #8b0000; border-bottom: 2px solid #8b4513;
padding: 8px; padding: 8px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -2072,7 +2100,7 @@
width: 48px; width: 48px;
height: 48px; height: 48px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #8b0000; border: 1px solid #8b4513;
object-fit: cover; object-fit: cover;
flex-shrink: 0; flex-shrink: 0;
} }
@@ -2103,7 +2131,7 @@
.result-main { .result-main {
background: rgba(255, 250, 240, 0.9); background: rgba(255, 250, 240, 0.9);
padding: 4px 8px; padding: 4px 8px;
border-bottom: 1px solid rgba(139, 0, 0, 0.3); border-bottom: 1px solid rgba(139, 69, 19, 0.3);
.result-display { .result-display {
display: flex; display: flex;
@@ -2120,10 +2148,10 @@
background: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.7);
padding: 4px 6px; padding: 4px 6px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(139, 0, 0, 0.2); border: 1px solid rgba(139, 69, 19, 0.2);
i { i {
color: #8b0000; color: #8b4513;
font-size: 1rem; font-size: 1rem;
display: block; display: block;
margin-bottom: 2px; margin-bottom: 2px;
@@ -2138,7 +2166,7 @@
.total-value, .total-value,
.difficulty-value { .difficulty-value {
font-size: 1.5rem; font-size: 1.5rem;
color: #8b0000; color: #8b4513;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
font-weight: bold; font-weight: bold;
line-height: 1.2; line-height: 1.2;
@@ -2147,12 +2175,31 @@
.total-label, .total-label,
.difficulty-label { .difficulty-label {
font-size: 0.75rem; font-size: 0.75rem;
color: #4a0404; color: #2a1400;
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: bold;
line-height: 1.1; line-height: 1.1;
} }
} }
.d20-impair {
flex: 2;
background: rgba(180, 60, 0, 0.12);
border-color: rgba(180, 60, 0, 0.4);
i {
color: #b03000;
display: inline;
margin-right: 4px;
}
.dice-value {
display: inline;
font-size: 0.85rem;
color: #b03000;
font-weight: bold;
}
}
} }
.result-badge-container { .result-badge-container {
@@ -2186,7 +2233,7 @@
} }
&.failure { &.failure {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
color: white; color: white;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
} }
@@ -2219,7 +2266,7 @@
&.bonus { &.bonus {
background: rgba(255, 200, 200, 0.6); background: rgba(255, 200, 200, 0.6);
border: 1px solid rgba(139, 0, 0, 0.5); border: 1px solid rgba(139, 69, 19, 0.5);
} }
&.malus { &.malus {
@@ -2248,13 +2295,13 @@
.result-effects { .result-effects {
padding: 8px; padding: 8px;
background: rgba(255, 230, 230, 0.4); background: rgba(255, 230, 230, 0.4);
border-top: 1px solid rgba(139, 0, 0, 0.3); border-top: 1px solid rgba(139, 69, 19, 0.3);
.effect-item { .effect-item {
padding: 5px 8px; padding: 5px 8px;
margin-bottom: 5px; margin-bottom: 5px;
background: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.7);
border-left: 3px solid #8b0000; border-left: 3px solid #8b4513;
border-radius: 3px; border-radius: 3px;
color: #000000; color: #000000;
font-size: 0.85rem; font-size: 0.85rem;
@@ -2266,7 +2313,7 @@
i { i {
margin-right: 6px; margin-right: 6px;
color: #8b0000; color: #8b4513;
} }
&:last-child { &:last-child {
@@ -2311,8 +2358,8 @@
} }
.chat-card-button { .chat-card-button {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
border: 1px solid #8b0000; border: 1px solid #8b4513;
border-radius: 3px; border-radius: 3px;
color: #f5f5f5; color: #f5f5f5;
padding: 6px 12px; padding: 6px 12px;
@@ -2327,7 +2374,7 @@
} }
&:hover { &:hover {
background: linear-gradient(135deg, #a00000 0%, #5a0505 100%); background: linear-gradient(135deg, #a06010 0%, #4a2200 100%);
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} }
@@ -2343,12 +2390,119 @@
} }
} }
/* Tag non-létaux dans les messages de dégâts */
.mournblade-chat-result .non-lethal-tag {
font-size: 0.8rem;
color: #888;
font-style: italic;
margin-left: 4px;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Welcome Message Styling */ .mournblade-post-item {
background: linear-gradient(135deg, rgba(42, 20, 0, 0.15) 0%, rgba(139, 69, 19, 0.1) 100%);
border: 2px solid #8b4513;
border-radius: 6px;
overflow: hidden;
font-family: CentaurMT, serif;
margin: 4px 0;
.post-item-header {
background: linear-gradient(135deg, #2a1400 0%, #3a1800 100%);
border-bottom: 2px solid #8b4513;
padding: 8px 10px;
display: flex;
align-items: center;
gap: 10px;
.post-item-img {
width: 44px;
height: 44px;
border-radius: 4px;
border: 1px solid #8b4513;
object-fit: cover;
flex-shrink: 0;
}
.post-item-title {
flex: 1;
.post-item-name {
margin: 0 0 2px 0;
color: #ffd700;
font-size: 1.1rem;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
line-height: 1.2;
}
.post-item-type {
font-size: 0.75rem;
color: #f5e6d3;
font-style: italic;
opacity: 0.8;
text-transform: capitalize;
}
}
}
.post-item-stats {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding: 6px 8px;
background: rgba(139, 69, 19, 0.08);
border-bottom: 1px solid rgba(139, 69, 19, 0.3);
.post-stat {
display: flex;
align-items: center;
gap: 4px;
background: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(139, 69, 19, 0.4);
border-radius: 3px;
padding: 2px 6px;
font-size: 0.8rem;
&.post-stat-full {
flex: 1 1 100%;
}
.stat-label {
color: #8b4513;
font-weight: bold;
font-size: 0.75rem;
}
.stat-value {
color: #2a1400;
font-size: 0.8rem;
}
}
}
.post-item-description {
padding: 8px 10px;
color: #2a1400;
font-size: 0.9rem;
line-height: 1.4;
background: rgba(245, 230, 211, 0.85);
p {
margin: 4px 0;
}
em, i {
color: #5a2d00;
}
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
.mournblade-welcome-message { .mournblade-welcome-message {
background: linear-gradient(135deg, rgba(139, 0, 0, 0.15) 0%, rgba(74, 4, 4, 0.2) 100%); background: linear-gradient(135deg, rgba(139, 69, 19, 0.15) 0%, rgba(42, 20, 0, 0.2) 100%);
border: 2px solid #8b0000; border: 2px solid #8b4513;
border-radius: 8px; border-radius: 8px;
padding: 0; padding: 0;
margin: 8px 0; margin: 8px 0;
@@ -2357,7 +2511,7 @@
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
.welcome-header { .welcome-header {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
padding: 10px; padding: 10px;
text-align: center; text-align: center;
border-bottom: 2px solid #ffd700; border-bottom: 2px solid #ffd700;
@@ -2400,7 +2554,7 @@
margin-bottom: 10px; margin-bottom: 10px;
padding: 8px; padding: 8px;
background: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.6);
border-left: 4px solid #8b0000; border-left: 4px solid #8b4513;
border-radius: 4px; border-radius: 4px;
&:last-child { &:last-child {
@@ -2410,7 +2564,7 @@
.section-icon { .section-icon {
flex-shrink: 0; flex-shrink: 0;
font-size: 1.3rem; font-size: 1.3rem;
color: #8b0000; color: #8b4513;
width: 28px; width: 28px;
text-align: center; text-align: center;
} }
@@ -2421,7 +2575,7 @@
strong { strong {
display: block; display: block;
color: #8b0000; color: #8b4513;
font-size: 1rem; font-size: 1rem;
margin-bottom: 2px; margin-bottom: 2px;
line-height: 1.2; line-height: 1.2;
@@ -2436,7 +2590,7 @@
.welcome-link { .welcome-link {
display: inline-block; display: inline-block;
margin-top: 4px; margin-top: 4px;
color: #8b0000; color: #8b4513;
font-weight: 600; font-weight: 600;
text-decoration: none; text-decoration: none;
transition: all 0.2s; transition: all 0.2s;
@@ -2447,8 +2601,8 @@
} }
&:hover { &:hover {
color: #a00000; color: #a06010;
text-shadow: 0 0 4px rgba(139, 0, 0, 0.3); text-shadow: 0 0 4px rgba(139, 69, 19, 0.3);
transform: translateX(2px); transform: translateX(2px);
} }
} }
@@ -2457,7 +2611,7 @@
} }
.welcome-footer { .welcome-footer {
background: linear-gradient(135deg, #4a0404 0%, #8b0000 100%); background: linear-gradient(135deg, #2a1400 0%, #8b4513 100%);
padding: 8px; padding: 8px;
text-align: center; text-align: center;
color: #ffd700; color: #ffd700;

View File

@@ -28,7 +28,7 @@ export class MournbladeCYD2RollDialog {
return foundry.applications.api.DialogV2.wait({ return foundry.applications.api.DialogV2.wait({
window: { title: "Test de Capacité", icon: "fa-solid fa-dice-d20" }, window: { title: "Test de Capacité", icon: "fa-solid fa-dice-d20" },
classes: ["mournblade-cyd2-roll-dialog"], classes: ["mournblade-cyd2-roll-dialog"],
position: { width: 360 }, position: { width: 470 },
modal: false, modal: false,
content, content,
buttons: [ buttons: [
@@ -38,8 +38,8 @@ export class MournbladeCYD2RollDialog {
icon: "fa-solid fa-dice-d10", icon: "fa-solid fa-dice-d10",
default: true, default: true,
callback: (event, button, dialog) => { callback: (event, button, dialog) => {
MournbladeCYD2RollDialog._updateRollDataFromForm(rollData, button.form.elements, actor); MournbladeCYD2RollDialog._updateRollDataFromForm(rollData, button.form, actor);
rollData.mainDice = "1d10"; rollData.mainDice = "d10";
MournbladeCYD2Utility.rollMournbladeCYD2(rollData); MournbladeCYD2Utility.rollMournbladeCYD2(rollData);
} }
}, },
@@ -48,8 +48,8 @@ export class MournbladeCYD2RollDialog {
label: "Lancer 1d20", label: "Lancer 1d20",
icon: "fa-solid fa-dice-d20", icon: "fa-solid fa-dice-d20",
callback: (event, button, dialog) => { callback: (event, button, dialog) => {
MournbladeCYD2RollDialog._updateRollDataFromForm(rollData, button.form.elements, actor); MournbladeCYD2RollDialog._updateRollDataFromForm(rollData, button.form, actor);
rollData.mainDice = "1d20"; rollData.mainDice = "d20";
MournbladeCYD2Utility.rollMournbladeCYD2(rollData); MournbladeCYD2Utility.rollMournbladeCYD2(rollData);
} }
}, },
@@ -63,19 +63,47 @@ export class MournbladeCYD2RollDialog {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static _updateRollDataFromForm(rollData, elements, actor) { static _updateRollDataFromForm(rollData, form, actor) {
if (elements.modificateur) rollData.modificateur = Number(elements.modificateur.value); const el = form.elements;
if (elements.difficulte) rollData.difficulte = Number(elements.difficulte.value); const getVal = (name) => el[name]?.value;
if (elements.attrKey) rollData.attrKey = String(elements.attrKey.value); const getChecked = (name) => {
if (elements.attrKey2) rollData.attrKey2 = String(elements.attrKey2.value); const e = form.querySelector(`#${name}`);
if (elements["select-maitrise"]) rollData.maitriseId = String(elements["select-maitrise"].value); return e ? e.checked : false;
if (elements["competence-talents"]) { };
const sel = elements["competence-talents"];
if (el.modificateur) rollData.modificateur = Number(getVal("modificateur"));
if (el["bonus-malus-context"]) rollData.bonusMalusContext = Number(getVal("bonus-malus-context"));
if (el.difficulte) rollData.difficulte = Number(getVal("difficulte"));
if (el.attrKey) rollData.attrKey = String(getVal("attrKey"));
if (el.attrKey2) rollData.attrKey2 = String(getVal("attrKey2"));
if (el["select-maitrise"]) rollData.maitriseId = String(getVal("select-maitrise"));
if (el["competence-talents"]) {
const sel = el["competence-talents"];
rollData.selectedTalents = Array.from(sel.selectedOptions).map(o => o.value); rollData.selectedTalents = Array.from(sel.selectedOptions).map(o => o.value);
} }
if (elements["taille-cible"]) rollData.tailleCible = String(elements["taille-cible"].value); if (el["taille-cible"]) rollData.tailleCible = String(getVal("taille-cible"));
if (elements["tireur-deplacement"]) rollData.tireurDeplacement = String(elements["tireur-deplacement"].value); if (el["tireur-deplacement"]) rollData.tireurDeplacement = String(getVal("tireur-deplacement"));
if (elements["cible-couvert"]) rollData.cibleCouvert = String(elements["cible-couvert"].value); if (el["cible-couvert"]) rollData.cibleCouvert = String(getVal("cible-couvert"));
if (elements["distance-tir"]) rollData.distanceTir = String(elements["distance-tir"].value); if (el["distance-tir"]) rollData.distanceTir = String(getVal("distance-tir"));
if (el["soutiens"]) rollData.soutiens = Number(getVal("soutiens"));
if (el["runemode"]) rollData.runemode = String(getVal("runemode"));
if (el["runeame"]) rollData.runeame = Number(getVal("runeame"));
rollData.defenseurAuSol = getChecked("defenseur-au-sol");
rollData.defenseurAveugle = getChecked("defenseur-aveugle");
rollData.defenseurDeDos = getChecked("defenseur-de-dos");
rollData.defenseurRestreint = getChecked("defenseur-restreint");
rollData.defenseurImmobilise = getChecked("defenseur-immobilise");
rollData.attaquantsMultiples = getChecked("attaquants-multiple");
rollData.ambidextre1 = getChecked("ambidextre-1");
rollData.ambidextre2 = getChecked("ambidextre-2");
rollData.feinte = getChecked("feinte");
rollData.attaqueCharge = getChecked("attaque-charge");
rollData.chargeCavalerie = getChecked("charge-cavalerie");
rollData.contenir = getChecked("contenir");
rollData.attaqueDesarme = getChecked("attaque-desarme");
rollData.cibleDeplace = getChecked("tireur-cible-deplace");
rollData.cibleCaC = getChecked("cible-cac");
rollData.cibleconsciente = getChecked("cibleconsciente");
} }
} }

View File

@@ -113,7 +113,7 @@ export default class MournbladeCYD2ActorSheetV2 extends HandlebarsApplicationMix
const dataType = target.dataset.dtype; const dataType = target.dataset.dtype;
const value = dataType === "Number" ? Number(target.value) : target.value; const value = dataType === "Number" ? Number(target.value) : target.value;
const item = this.document.items.get(itemId); const item = this.document.items.get(itemId);
if (item) await item.update({ [itemField]: value }); if (item) await item.update({ [`system.${itemField}`]: value });
}); });
}); });

View File

@@ -1,211 +0,0 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { MournbladeCYD2Utility } from "./mournblade-cyd2-utility.js";
import { MournbladeCYD2Automation } from "./mournblade-cyd2-automation.js";
/* -------------------------------------------- */
export class MournbladeCYD2ActorSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-mournblade-cyd-2-0", "sheet", "actor"],
template: "systems/fvtt-mournblade-cyd-2-0/templates/actor-sheet.hbs",
width: 640,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: false
})
}
/* -------------------------------------------- */
async getData() {
const objectData = foundry.utils.duplicate(this.object)
let formData = {
title: this.title,
id: objectData.id,
type: objectData.type,
img: objectData.img,
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
system: objectData.system,
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited,
skills: this.actor.getSkills(),
armes: foundry.utils.duplicate(this.actor.getWeapons()),
monnaies: foundry.utils.duplicate(this.actor.getMonnaies()),
protections: foundry.utils.duplicate(this.actor.getArmors()),
historiques: foundry.utils.duplicate(this.actor.getHistoriques() || []),
talents: foundry.utils.duplicate(this.actor.getTalents() || []),
dons: foundry.utils.duplicate(this.actor.getDons() || []),
pactes: foundry.utils.duplicate(this.actor.getPactes() || []),
tendances: foundry.utils.duplicate(this.actor.getTendances() || []),
runes: foundry.utils.duplicate(this.actor.getRunes() || []),
traitsChaotiques: foundry.utils.duplicate(this.actor.getTraitsChaotiques() || []),
traitsEspeces: foundry.utils.duplicate(this.actor.getTraitsEspeces() || []),
aspect: this.actor.getAspect(),
marge: this.actor.getMarge(),
profils: foundry.utils.duplicate(this.actor.getProfils() || []),
combat: this.actor.getCombatValues(),
equipements: foundry.utils.duplicate(this.actor.getEquipments()),
richesse: this.actor.computeRichesse(),
coupDevastateur: this.actor.items.find(it => it.type == "talent" && it.name.toLowerCase() == "coup devastateur" && !it.system.used),
valeurEquipement: this.actor.computeValeurEquipement(),
nbCombativite: this.actor.system.sante.nbcombativite,
combativiteList: MournbladeCYD2Utility.getCombativiteList(this.actor.system.sante.nbcombativite),
nbAme: this.actor.system.ame.nbame,
ameMax: this.actor.getAmeMax(),
ameList: MournbladeCYD2Utility.getAmeList(this.actor.system.ame.nbame, this.actor.getAmeMax()),
ameMaxList: MournbladeCYD2Utility.getAmeMaxList(this.actor.system.ame.nbame),
initiative: this.actor.getFlag("world", "last-initiative") || -1,
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.description, { async: true }),
habitat: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.habitat, { async: true }),
options: this.options,
owner: this.document.isOwner,
editScore: this.options.editScore,
isGM: game.user.isGM,
config: game.system.mournbladecyd2.config
}
this.formData = formData;
console.log("PC : ", formData, this.object);
return formData;
}
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
const item = this.actor.items.get(itemId)
item.sheet.render(true)
})
// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
MournbladeCYD2Utility.confirmDelete(this, li);
})
html.find('.edit-item-data').change(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
let itemType = li.data("item-type")
let itemField = $(ev.currentTarget).data("item-field")
let dataType = $(ev.currentTarget).data("dtype")
let value = ev.currentTarget.value
this.actor.editItemField(itemId, itemType, itemField, dataType, value)
})
html.find('.adversite-modify').click(event => {
const li = $(event.currentTarget).parents(".item")
let adv = li.data("adversite")
let value = Number($(event.currentTarget).data("adversite-value"))
this.actor.incDecAdversite(adv, value)
})
html.find('.quantity-modify').click(event => {
const li = $(event.currentTarget).parents(".item")
const value = Number($(event.currentTarget).data("quantite-value"))
this.actor.incDecQuantity(li.data("item-id"), value);
})
html.find('.roll-initiative').click((event) => {
this.actor.rollAttribut("adr", true)
})
html.find('.roll-attribut').click((event) => {
const li = $(event.currentTarget).parents(".item")
let attrKey = li.data("attr-key")
this.actor.rollAttribut(attrKey, false)
})
html.find('.roll-competence').click((event) => {
const li = $(event.currentTarget).parents(".item")
let attrKey = $(event.currentTarget).data("attr-key")
let compId = li.data("item-id")
this.actor.rollCompetence(attrKey, compId)
})
html.find('.roll-arme-offensif').click((event) => {
const li = $(event.currentTarget).parents(".item")
let armeId = li.data("item-id")
this.actor.rollArmeOffensif(armeId)
})
html.find('.roll-assommer').click((event) => {
this.actor.rollAssommer()
})
html.find('.roll-coup-bas').click((event) => {
this.actor.rollCoupBas()
})
html.find('.roll-immobiliser').click((event) => {
this.actor.rollImmobiliser()
})
html.find('.roll-repousser').click((event) => {
this.actor.rollRepousser()
})
html.find('.roll-desengager').click((event) => {
this.actor.rollDesengager()
})
html.find('.roll-arme-degats').click((event) => {
const li = $(event.currentTarget).parents(".item")
let armeId = li.data("item-id")
this.actor.rollArmeDegats(armeId)
})
html.find('.item-add').click((event) => {
const itemType = $(event.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: `Nouveau ${itemType}`, type: itemType }], { renderSheet: true })
})
html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore;
this.render(true);
});
html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.equipItem(li.data("item-id"));
this.render(true);
});
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {
const position = super.setPosition(options);
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
return position;
}
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
let data = event.dataTransfer.getData('text/plain')
let dataItem = JSON.parse(data)
let item = fromUuidSync(dataItem.uuid)
if (item.pack) {
item = await MournbladeCYD2Utility.searchItem(item)
}
let autoresult = MournbladeCYD2Automation.processAutomations("on-drop", item, this.actor)
if (autoresult.isValid) {
super._onDropItem(event, dragData)
} else {
ui.notifications.warn(autoresult.warningMessage)
}
}
}

View File

@@ -774,7 +774,7 @@ export class MournbladeCYD2Actor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollAttribut(attrKey, isInit = false) { async rollAttribut(attrKey, isInit = false) {
let rollData = this.getCommonRollData(attrKey) let rollData = this.getCommonRollData(attrKey)
rollData.multiplier = (isInit) ? 1 : 2 rollData.multiplier = 1 // 1d10 + attr (optionally + attr2 if chosen in dialog)
rollData.isInit = isInit rollData.isInit = isInit
await MournbladeCYD2RollDialog.create(this, rollData) await MournbladeCYD2RollDialog.create(this, rollData)
} }
@@ -842,6 +842,33 @@ export class MournbladeCYD2Actor extends Actor {
await MournbladeCYD2RollDialog.create(this, rollData) await MournbladeCYD2RollDialog.create(this, rollData)
} }
/* -------------------------------------------- */
subPointsAme(runeMode, value) {
let ame = foundry.utils.duplicate(this.system.ame)
if (runeMode == "prononcer") {
ame.etat += value
ame.etat = Math.min(ame.etat, ame.nbame)
} else {
ame.max = (ame.max || 0) + value
}
this.update({ 'system.ame': ame })
}
/* -------------------------------------------- */
async rollRune(runeId) {
let comp = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "savoir : runes")
if (!comp) {
ui.notifications.warn("La compétence « Savoir : Runes » n'a pas été trouvée sur ce personnage.")
return
}
let rollData = this.getCommonRollData("cla", comp.id)
rollData.rune = foundry.utils.duplicate(this.items.get(runeId) || {})
rollData.difficulte = rollData.rune?.system?.seuil || 0
rollData.runemode = "prononcer"
rollData.runeame = 1
await MournbladeCYD2RollDialog.create(this, rollData)
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollArmeDegats(armeId, targetVigueur = undefined, rollDataInput = undefined) { async rollArmeDegats(armeId, targetVigueur = undefined, rollDataInput = undefined) {
let arme = this.items.get(armeId) let arme = this.items.get(armeId)
@@ -886,6 +913,7 @@ export class MournbladeCYD2Actor extends Actor {
//console.log(roll) //console.log(roll)
let rollData = { let rollData = {
arme: arme, arme: arme,
diceResult: roll.dice[0]?.total ?? roll.total,
finalResult: roll.total, finalResult: roll.total,
formula: roll.formula, formula: roll.formula,
alias: this.name, alias: this.name,

View File

@@ -52,9 +52,9 @@ export const MOURNBLADECYD2_CONFIG = {
{ key: "30", label: "Pure Folie (30)" } { key: "30", label: "Pure Folie (30)" }
], ],
optionsDistanceTir: [ optionsDistanceTir: [
{ key: "porteecourte", label: "Courte ({protectionDefenseur}+5)" }, { key: "porteecourte", label: "Courte (base +5)" },
{ key: "porteemoyenne", label: "Moyenne ({protectionDefenseur}+9)" }, { key: "porteemoyenne", label: "Moyenne (base +9)" },
{ key: "porteelongue", label: "Longue ({protectionDefenseur}+14)" } { key: "porteelongue", label: "Longue (base +14)" }
], ],
optionsBonusMalus: [ optionsBonusMalus: [
{ key: "-10", label: "-10" }, { key: "-10", label: "-10" },

View File

@@ -1,26 +0,0 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { MournbladeCYD2ActorSheet } from "./mournblade-cyd2-actor-sheet.js";
import { MournbladeCYD2Utility } from "./mournblade-cyd2-utility.js";
import { MournbladeCYD2Automation } from "./mournblade-cyd2-automation.js";
/* -------------------------------------------- */
export class MournbladeCYD2CreatureSheet extends MournbladeCYD2ActorSheet {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-mournblade-cyd-2-0", "sheet", "actor"],
template: "systems/fvtt-mournblade-cyd-2-0/templates/creature-sheet.hbs",
width: 640,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: false
})
}
}

View File

@@ -1,228 +0,0 @@
import { MournbladeCYD2Utility } from "./mournblade-cyd2-utility.js";
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class MournbladeCYD2ItemSheet extends foundry.appv1.sheets.ItemSheet {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-mournblade-cyd-2-0", "sheet", "item"],
template: "systems/fvtt-mournblade-cyd-2-0/templates/item-sheet.hbs",
dragDrop: [{ dragSelector: null, dropSelector: null }],
width: 620,
height: 550,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
});
}
/* -------------------------------------------- */
_getHeaderButtons() {
let buttons = super._getHeaderButtons();
// Add "Post to chat" button
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
buttons.unshift(
{
class: "post",
icon: "fas fa-comment",
onclick: ev => { }
})
return buttons
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {
const position = super.setPosition(options);
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
if (this.item.type.includes('weapon')) {
position.width = 640;
}
return position;
}
/* -------------------------------------------- */
async getData() {
const objectData = foundry.utils.duplicate(this.object)
let formData = {
title: this.title,
id: this.id,
type: objectData.type,
img: objectData.img,
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
attributs: MournbladeCYD2Utility.getAttributs(),
system: objectData.system,
limited: this.object.limited,
options: this.options,
owner: this.document.isOwner,
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.description, {async: true}),
mr: (this.object.type == 'specialisation'),
isGM: game.user.isGM,
config: game.system.mournbladecyd2.config
}
if ( objectData.type == "don") {
formData.sacrifice = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.sacrifice, {async: true})
}
//this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);
return formData;
}
/* -------------------------------------------- */
_getHeaderButtons() {
let buttons = super._getHeaderButtons();
buttons.unshift({
class: "post",
icon: "fas fa-comment",
onclick: ev => this.postItem()
});
return buttons
}
/* -------------------------------------------- */
postItem() {
let chatData = foundry.utils.duplicate(MournbladeCYD2Utility.data(this.item));
if (this.actor) {
chatData.actor = { id: this.actor.id };
}
// Don't post any image for the item (which would leave a large gap) if the default image is used
if (chatData.img.includes("/blank.png")) {
chatData.img = null;
}
// JSON object for easy creation
chatData.jsondata = JSON.stringify(
{
compendium: "postedItem",
payload: chatData,
});
renderTemplate('systems/fvtt-mournblade-cyd-2-0/templates/post-item.hbs', chatData).then(html => {
let chatOptions = MournbladeCYD2Utility.chatDataSetup(html);
ChatMessage.create(chatOptions)
});
}
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item")
const item = this.object.options.actor.getOwnedItem(li.data("item-id"))
item.sheet.render(true);
});
html.find('.delete-subitem').click(ev => {
this.deleteSubitem(ev);
})
html.find('.edit-predilection').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred[index].name = ev.currentTarget.value
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.edit-predilection-description').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred[index].description = ev.currentTarget.value
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.predilection-acquise').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred[index].acquise = ev.currentTarget.checked
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.predilection-maitrise').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred[index].maitrise = ev.currentTarget.checked
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.predilection-used').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred[index].used = ev.currentTarget.checked
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('#add-predilection').click(ev => {
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred.push( { name: "Nouvelle prédilection", id: randomID(16), used: false })
this.object.update( { 'system.predilections': pred })
})
html.find('.delete-prediction').click(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred.splice(index,1)
this.object.update( { 'system.predilections': pred })
})
html.find('#add-automation').click(ev => {
let autom = foundry.utils.duplicate(this.object.system.automations)
autom.push( { eventtype: "on-drop", name: "Automatisation 1", bonusname: "vigueur", bonus: 0, competence: "", minLevel: 0, baCost: 0, id: randomID(16) })
this.object.update( { 'system.automations': autom })
})
html.find('.delete-automation').click(ev => {
const li = $(ev.currentTarget).parents(".automation-item")
let index = li.data("automation-index")
let autom = foundry.utils.duplicate(this.object.system.automations)
autom.splice(index,1)
this.object.update( { 'system.automations': autom })
})
html.find('.automation-edit-field').change(ev => {
let index = $(ev.currentTarget).data("automation-index")
let field = $(ev.currentTarget).data("automation-field")
let auto = foundry.utils.duplicate(this.object.system.automations)
auto[index][field] = ev.currentTarget.value
auto[index].id = auto[index].id || randomID(16)
this.object.update( { 'system.automations': auto })
})
// Update Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
let itemType = li.data("item-type");
});
}
/* -------------------------------------------- */
get template() {
let type = this.item.type;
return `systems/fvtt-mournblade-cyd-2-0/templates/item-${type}-sheet.hbs`;
}
/* -------------------------------------------- */
/** @override */
_updateObject(event, formData) {
return this.object.update(formData);
}
}

View File

@@ -111,12 +111,43 @@ function welcomeMessage() {
ChatMessage.create({ ChatMessage.create({
user: game.user.id, user: game.user.id,
whisper: [game.user.id], whisper: [game.user.id],
content: `<div id="welcome-message-MournbladeCYD2"><span class="rdd-roll-part"> content: `<div class="mournblade-welcome-message">
<strong>Bienvenue dans Mournblade CYD 2.0 !</strong> <div class="welcome-header">
<p>Les livres de Mournblade sont nécessaires pour jouer : https://www.titam-france.fr ainsi que le supplément de conversion de règle pour le CYD 2.0</p> <div class="welcome-icon"><i class="fas fa-sword"></i></div>
<p>Mournblade est un jeu de rôle publié par Titam France/Sombres projets, tous les droits leur appartiennent.</p> <h2 class="welcome-title">Mournblade CYD 2.0</h2>
<p>Système développé par LeRatierBretonnien, support sur le <a href="https://discord.gg/pPSDNJk">Discord FR de Foundry</a>.</p> <div class="welcome-subtitle">Système FoundryVTT — Bienvenue !</div>
` }); </div>
<div class="welcome-content">
<div class="welcome-section">
<div class="section-icon"><i class="fas fa-book-open"></i></div>
<div class="section-text">
<strong>Livres nécessaires</strong>
<p>Les livres de Mournblade sont nécessaires pour jouer. Supplément de conversion CYD 2.0 requis.</p>
<a class="welcome-link" href="https://www.titam-france.fr" target="_blank"><i class="fas fa-external-link-alt"></i>titam-france.fr</a>
</div>
</div>
<div class="welcome-section">
<div class="section-icon"><i class="fas fa-copyright"></i></div>
<div class="section-text">
<strong>Droits</strong>
<p>Mournblade est un jeu publié par Titam France / Sombres Projets, tous les droits leur appartiennent.</p>
</div>
</div>
<div class="welcome-section">
<div class="section-icon"><i class="fab fa-discord"></i></div>
<div class="section-text">
<strong>Support</strong>
<p>Système développé par LeRatierBretonnien.</p>
<a class="welcome-link" href="https://discord.gg/pPSDNJk" target="_blank"><i class="fab fa-discord"></i>Discord FR Foundry</a>
</div>
</div>
</div>
<div class="welcome-footer">
<i class="fas fa-dice-d20"></i>
<span>Bonne partie !</span>
</div>
</div>`
});
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@@ -1,142 +0,0 @@
import { MournbladeCYD2Utility } from "./mournblade-cyd2-utility.js";
export class MournbladeCYD2RollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData ) {
let options = { classes: ["MournbladeCYD2Dialog"], width: 320, height: 'fit-content', 'z-index': 99999 };
let html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-mournblade-cyd-2-0/templates/roll-dialog-generic.hbs', rollData);
return new MournbladeCYD2RollDialog(actor, rollData, html, options );
}
/* -------------------------------------------- */
constructor(actor, rollData, html, options, close = undefined) {
let conf = {
title: "Test de Capacité",
content: html,
buttons: {
rolld10: {
icon: '<i class="fas fa-check"></i>',
label: "Lancer 1d10",
callback: () => { this.roll("d10") }
},
rolld20: {
icon: '<i class="fas fa-check"></i>',
label: "Lancer 1d20",
callback: () => { this.roll("d20") }
},
cancel: {
icon: '<i class="fas fa-times"></i>',
label: "Annuler",
callback: () => { this.close() }
} },
close: close
}
super(conf, options);
this.actor = actor
this.rollData = rollData
}
/* -------------------------------------------- */
roll ( dice) {
this.rollData.mainDice = dice
MournbladeCYD2Utility.rollMournbladeCYD2( this.rollData )
}
/* -------------------------------------------- */
activateListeners(html) {
super.activateListeners(html);
var dialog = this;
function onLoad() {
}
$(function () { onLoad(); });
html.find('#modificateur').change(async (event) => {
this.rollData.modificateur = Number(event.currentTarget.value)
})
html.find('#difficulte').change( (event) => {
console.log("Difficulte: " + event.currentTarget.value)
this.rollData.difficulte = Number(event.currentTarget.value)
})
html.find('#attrKey').change(async (event) => {
this.rollData.attrKey = String(event.currentTarget.value)
})
html.find('#attrKey2').change(async (event) => {
this.rollData.attrKey2 = String(event.currentTarget.value)
})
html.find('#select-maitrise').change(async (event) => {
this.rollData.maitriseId = String(event.currentTarget.value)
})
html.find('#competence-talents').change((event) => {
this.rollData.selectedTalents = $('#competence-talents').val()
})
html.find('#taille-cible').change((event) => {
this.rollData.tailleCible = String(event.currentTarget.value)
})
html.find('#tireur-deplacement').change((event) => {
this.rollData.tireurDeplacement = String(event.currentTarget.value)
})
html.find('#cible-couvert').change((event) => {
this.rollData.cibleCouvert = String(event.currentTarget.value)
})
html.find('#distance-tir').change((event) => {
this.rollData.distanceTir = String(event.currentTarget.value)
})
html.find('#bonus-malus-context').change((event) => {
this.rollData.bonusMalusContext = Number(event.currentTarget.value)
})
html.find('#defenseur-au-sol').change((event) => {
this.rollData.defenseurAuSol = event.currentTarget.checked
})
html.find('#ambidextre-1').change((event) => {
this.rollData.ambidextre1 = event.currentTarget.checked
})
html.find('#ambidextre-2').change((event) => {
this.rollData.ambidextre2 = event.currentTarget.checked
})
html.find('#attaque-monte').change((event) => {
this.rollData.attqueMonte = event.currentTarget.checked
})
html.find('#defenseur-aveugle').change((event) => {
this.rollData.defenseurAveugle = event.currentTarget.checked
})
html.find('#defenseur-de-dos').change((event) => {
this.rollData.defenseurDeDos = event.currentTarget.checked
})
html.find('#defenseur-restreint').change((event) => {
this.rollData.defenseurRestreint = event.currentTarget.checked
})
html.find('#defenseur-immobilise').change((event) => {
this.rollData.defenseurImmobilise = event.currentTarget.checked
})
html.find('#attaque-charge').change((event) => {
this.rollData.attaqueCharge = event.currentTarget.checked
})
html.find('#charge-cavalerie').change((event) => {
this.rollData.chargeCavalerie = event.currentTarget.checked
})
html.find('#attaquants-multiple').change((event) => {
this.rollData.attaquantsMultiples = event.currentTarget.checked
})
html.find('#soutiens').change((event) => {
this.rollData.soutiens = Number(event.currentTarget.value)
})
html.find('#feinte').change((event) => {
this.rollData.feinte = event.currentTarget.checked
})
html.find('#contenir').change((event) => {
this.rollData.contenir = event.currentTarget.checked
})
html.find('#attaque-desarme').change((event) => {
this.rollData.attaqueDesarme = event.currentTarget.checked
})
}
}

View File

@@ -46,6 +46,11 @@ export class MournbladeCYD2Utility {
Handlebars.registerHelper('mul', function (a, b) { Handlebars.registerHelper('mul', function (a, b) {
return parseInt(a) * parseInt(b); return parseInt(a) * parseInt(b);
}) })
Handlebars.registerHelper('select', function(value, options) {
const html = options.fn(this);
const escaped = String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
return html.replace(new RegExp(`value="${escaped}"`, 'g'), `value="${value}" selected="selected"`);
})
game.settings.register("fvtt-mournblade-cyd-2-0", "mournblade-cyd2-pause-logo", { game.settings.register("fvtt-mournblade-cyd-2-0", "mournblade-cyd2-pause-logo", {
name: "Logo de pause", name: "Logo de pause",
@@ -63,6 +68,7 @@ export class MournbladeCYD2Utility {
// Initialise les listes de sélection dès le hook init (avant le rendu des fiches) // Initialise les listes de sélection dès le hook init (avant le rendu des fiches)
game.system.mournbladecyd2.config.listeNiveauSkill = this.createDirectOptionList(0, 10) game.system.mournbladecyd2.config.listeNiveauSkill = this.createDirectOptionList(0, 10)
game.system.mournbladecyd2.config.listeNiveauCreature = this.createDirectOptionList(0, 35) game.system.mournbladecyd2.config.listeNiveauCreature = this.createDirectOptionList(0, 35)
game.system.mournbladecyd2.config.pointsAmeOptions = this.createDirectOptionList(1, 20)
} }
@@ -151,7 +157,7 @@ export class MournbladeCYD2Utility {
static async chatListeners(html) { static async chatListeners(html) {
$(html).on("click", '.predilection-reroll', async event => { $(html).on("click", '.predilection-reroll', async event => {
let predIdx = $(event.currentTarget).data("predilection-index") let predIdx = event.currentTarget.dataset.predilectionIndex
let messageId = MournbladeCYD2Utility.findChatMessageId(event.currentTarget) let messageId = MournbladeCYD2Utility.findChatMessageId(event.currentTarget)
let message = game.messages.get(messageId) let message = game.messages.get(messageId)
let rollData = message.getFlag("world", "mournblade-cyd2-roll") let rollData = message.getFlag("world", "mournblade-cyd2-roll")
@@ -345,7 +351,7 @@ export class MournbladeCYD2Utility {
if (rollData.mainDice.includes("d20")) { if (rollData.mainDice.includes("d20")) {
let diceValue = rollData.roll.terms[0].results[0].result let diceValue = rollData.roll.terms[0].results[0].result
if (diceValue % 2 == 1) { if (diceValue % 2 == 1) {
//console.log("PAIR/IMP2", diceValue) rollData.isD20Impair = true
rollData.finalResult -= rollData.roll.terms[0].results[0].result // Substract value rollData.finalResult -= rollData.roll.terms[0].results[0].result // Substract value
if (diceValue == 1 || diceValue == 11) { if (diceValue == 1 || diceValue == 11) {
rollData.isDramatique = true rollData.isDramatique = true
@@ -425,7 +431,8 @@ export class MournbladeCYD2Utility {
} else if (rollData.attr2) { } else if (rollData.attr2) {
rollData.diceFormula += `+${rollData.attr.value}+${rollData.attr2.value}+${rollData.modificateur}+${rollData.bonusMalusContext}` rollData.diceFormula += `+${rollData.attr.value}+${rollData.attr2.value}+${rollData.modificateur}+${rollData.bonusMalusContext}`
} else { } else {
rollData.diceFormula += `+${rollData.attr.value}*${rollData.multiplier}+${rollData.modificateur}+${rollData.bonusMalusContext}` const attrPart = rollData.multiplier > 1 ? `${rollData.attr.value}*${rollData.multiplier}` : `${rollData.attr.value}`
rollData.diceFormula += `+${attrPart}+${rollData.modificateur}+${rollData.bonusMalusContext}`
} }
// Bonus arme naturelle en défense // Bonus arme naturelle en défense
@@ -491,6 +498,21 @@ export class MournbladeCYD2Utility {
rollData.finalResult = myRoll.total rollData.finalResult = myRoll.total
this.computeResult(rollData) this.computeResult(rollData)
// Rune post-roll: calculate duration and apply soul cost
if (rollData.rune) {
rollData.runeduree = Math.ceil(rollData.runeame / 3)
if (rollData.runemode == "inscrire") {
rollData.runeduree *= 2
}
let subAme = rollData.runeame
if (!rollData.isSuccess && !rollData.isDramatique) {
subAme = Math.ceil(rollData.runeame / 2)
}
rollData.runeAmeCout = subAme
actor.subPointsAme(rollData.runemode, subAme)
}
if (rollData.isInit) { if (rollData.isInit) {
actor.setFlag("world", "last-initiative", rollData.finalResult) actor.setFlag("world", "last-initiative", rollData.finalResult)
} }
@@ -779,7 +801,8 @@ export class MournbladeCYD2Utility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static applyBonneAventureRoll(li, changed, addedBonus) { static applyBonneAventureRoll(li, changed, addedBonus) {
let msgId = $(li).data("message-id") const el = li instanceof HTMLElement ? li : li[0];
let msgId = el.dataset.messageId ?? el.closest("[data-message-id]")?.dataset.messageId
let msg = game.messages.get(msgId) let msg = game.messages.get(msgId)
if (msg) { if (msg) {
let rollData = msg.getFlag("world", "mournblade-cyd2-roll") let rollData = msg.getFlag("world", "mournblade-cyd2-roll")
@@ -798,7 +821,8 @@ export class MournbladeCYD2Utility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static applyEclatRoll(li, changed, addedBonus) { static applyEclatRoll(li, changed, addedBonus) {
let msgId = $(li).data("message-id") const el = li instanceof HTMLElement ? li : li[0];
let msgId = el.dataset.messageId ?? el.closest("[data-message-id]")?.dataset.messageId
let msg = game.messages.get(msgId) let msg = game.messages.get(msgId)
if (msg) { if (msg) {
let rollData = msg.getFlag("world", "mournblade-cyd2-roll") let rollData = msg.getFlag("world", "mournblade-cyd2-roll")
@@ -817,14 +841,19 @@ export class MournbladeCYD2Utility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static chatRollMenu(html, options) { static chatRollMenu(html, options) {
let canApply = li => canvas.tokens.controlled.length && li.find(".mournblade-cyd2-roll").length let canApply = li => {
const el = li instanceof HTMLElement ? li : li[0];
return canvas.tokens.controlled.length && el.querySelector(".mournblade-cyd2-roll");
}
let getActor = function (li) { let getActor = function (li) {
let message = game.messages.get($(li).attr("data-message-id")) const el = li instanceof HTMLElement ? li : li[0];
let message = game.messages.get(el.dataset.messageId)
let rollData = message.getFlag("world", "mournblade-cyd2-roll") let rollData = message.getFlag("world", "mournblade-cyd2-roll")
return MournbladeCYD2Utility.getActorFromRollData(rollData) return MournbladeCYD2Utility.getActorFromRollData(rollData)
} }
let getRollData = function (li) { let getRollData = function (li) {
let message = game.messages.get($(li).attr("data-message-id")) const el = li instanceof HTMLElement ? li : li[0];
let message = game.messages.get(el.dataset.messageId)
return message.getFlag("world", "mournblade-cyd2-roll") return message.getFlag("world", "mournblade-cyd2-roll")
} }
let canApplyBA = function (li) { let canApplyBA = function (li) {
@@ -884,7 +913,7 @@ export class MournbladeCYD2Utility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async confirmDelete(actorSheet, li) { static async confirmDelete(actorSheet, li) {
let itemId = li.data("item-id"); let itemId = li.dataset?.itemId ?? li.dataset?.["item-id"];
let msgTxt = "<p>Etes vous certain de vouloir supprimer cet item ?"; let msgTxt = "<p>Etes vous certain de vouloir supprimer cet item ?";
let buttons = { let buttons = {
delete: { delete: {
@@ -892,7 +921,7 @@ export class MournbladeCYD2Utility {
label: "Oui !", label: "Oui !",
callback: () => { callback: () => {
actorSheet.actor.deleteEmbeddedDocuments("Item", [itemId]); actorSheet.actor.deleteEmbeddedDocuments("Item", [itemId]);
li.slideUp(200, () => actorSheet.render(false)); actorSheet.render(false);
} }
}, },
cancel: { cancel: {

View File

@@ -21,7 +21,7 @@
--tab-header-font-size: 1rem; --tab-header-font-size: 1rem;
--tab-header-font-weight: 700; --tab-header-font-weight: 700;
--tab-header-color: #403f3e; --tab-header-color: #403f3e;
--tab-header-color-active: #4a0404; --tab-header-color-active: #2a1400;
--font-primary: CentaurMT; --font-primary: CentaurMT;
--font-secondary: CentaurMT; --font-secondary: CentaurMT;
--actor-input-font-size: 0.9rem; --actor-input-font-size: 0.9rem;
@@ -1105,7 +1105,8 @@ li {
text-shadow: 0px 1px 0px #4d3534; text-shadow: 0px 1px 0px #4d3534;
position: relative; position: relative;
max-height: 1.8rem; max-height: 1.8rem;
width: 3.5rem; width: 5rem;
white-space: nowrap;
margin-left: 4px; margin-left: 4px;
} }
.button-sheet-roll-offline { .button-sheet-roll-offline {
@@ -1123,7 +1124,8 @@ li {
text-shadow: 0px 1px 0px #4d3534; text-shadow: 0px 1px 0px #4d3534;
position: relative; position: relative;
max-height: 1.8rem; max-height: 1.8rem;
width: 3.5rem; width: 5rem;
white-space: nowrap;
margin-left: 4px; margin-left: 4px;
} }
.button-sheet-roll-large { .button-sheet-roll-large {
@@ -1379,43 +1381,43 @@ li {
margin-right: 6px; margin-right: 6px;
} }
/* ==================== Roll Dialog V2 Styles ==================== */ /* ==================== Roll Dialog V2 Styles ==================== */
.application.mournblade-roll-dialog .window-content { .application.mournblade-cyd2-roll-dialog .window-content {
padding: 0; padding: 0;
} }
.window-app.mournblade-roll-dialog .window-content { .window-app.mournblade-cyd2-roll-dialog .window-content {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.mournblade-roll-dialog { .mournblade-cyd2-roll-dialog {
background: url("../assets/ui/pc_sheet_bg.webp"); background: url("../assets/ui/pc_sheet_bg.webp");
background-repeat: repeat; background-repeat: repeat;
font-family: CentaurMT; font-family: CentaurMT;
} }
.mournblade-roll-dialog * { .mournblade-cyd2-roll-dialog * {
color: #2a2a2a; color: #2a2a2a;
} }
/* Header */ /* Header */
.mournblade-roll-dialog .dialog-header { .mournblade-cyd2-roll-dialog .dialog-header {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
padding: 8px; padding: 8px;
background: linear-gradient(135deg, #4a0404 0%, #6d0808 100%); background: linear-gradient(135deg, #2a1400 0%, #4a2200 100%);
border-bottom: 3px solid #8b0000; border-bottom: 3px solid #8b4513;
margin-bottom: 0; margin-bottom: 0;
} }
.mournblade-roll-dialog .dialog-header .actor-icon { .mournblade-cyd2-roll-dialog .dialog-header .actor-icon {
width: 48px; width: 48px;
height: 48px; height: 48px;
border-radius: 4px; border-radius: 4px;
border: 2px solid #8b0000; border: 2px solid #8b4513;
object-fit: cover; object-fit: cover;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
} }
.mournblade-roll-dialog .dialog-header .dialog-title { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title {
flex: 1; flex: 1;
} }
.mournblade-roll-dialog .dialog-header .dialog-title h3 { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title h3 {
margin: 0; margin: 0;
font-size: 1.1rem; font-size: 1.1rem;
color: #f5f5f5; color: #f5f5f5;
@@ -1423,124 +1425,126 @@ li {
font-family: Charlemagne; font-family: Charlemagne;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .dialog-header .dialog-title .competence-name { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title .competence-name {
font-size: 0.85rem; font-size: 0.85rem;
color: #ffcccb; color: #f0d0a0;
margin-top: 2px; margin-top: 2px;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
} }
.mournblade-roll-dialog .dialog-header .dialog-title .competence-name .attribut-info { .mournblade-cyd2-roll-dialog .dialog-header .dialog-title .competence-name .attribut-info {
color: #ffd700; color: #ffd700;
font-weight: bold; font-weight: bold;
font-size: 0.9em; font-size: 0.9em;
} }
/* Content */ /* Content */
.mournblade-roll-dialog .dialog-content { .mournblade-cyd2-roll-dialog .dialog-content {
padding: 8px; padding: 6px 8px;
max-height: 650px; max-height: 600px;
overflow-y: auto; overflow-y: auto;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar {
width: 8px; width: 8px;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar-track { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
border-radius: 4px; border-radius: 4px;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar-thumb { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar-thumb {
background: rgba(139, 0, 0, 0.6); background: rgba(139, 69, 19, 0.6);
border-radius: 4px; border-radius: 4px;
} }
.mournblade-roll-dialog .dialog-content::-webkit-scrollbar-thumb:hover { .mournblade-cyd2-roll-dialog .dialog-content::-webkit-scrollbar-thumb:hover {
background: rgba(139, 0, 0, 0.8); background: rgba(139, 69, 19, 0.8);
} }
/* Form Groups */ /* Form Groups */
.mournblade-roll-dialog .form-group { .mournblade-cyd2-roll-dialog .form-group {
margin-bottom: 8px; margin-bottom: 6px;
} }
.mournblade-roll-dialog .form-group label { .mournblade-cyd2-roll-dialog .form-group label {
display: block; flex-shrink: 0;
white-space: nowrap;
font-weight: bold; font-weight: bold;
color: #1a1a1a; color: #1a1a1a;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5); text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
margin-bottom: 3px;
font-size: 0.9rem; font-size: 0.9rem;
margin-bottom: 0;
} }
.mournblade-roll-dialog .form-group input, .mournblade-cyd2-roll-dialog .form-group input,
.mournblade-roll-dialog .form-group select { .mournblade-cyd2-roll-dialog .form-group select {
width: 100%; flex: 1;
padding: 5px 8px; min-width: 60px;
padding: 4px 6px;
background: rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.95);
border: 1px solid rgba(100, 100, 100, 0.5); border: 1px solid rgba(100, 100, 100, 0.5);
border-radius: 3px; border-radius: 3px;
color: #1a1a1a; color: #1a1a1a;
font-size: 0.95rem; font-size: 0.9rem;
font-weight: 500; font-weight: 500;
font-family: CentaurMT; font-family: CentaurMT;
} }
.mournblade-roll-dialog .form-group input:focus, .mournblade-cyd2-roll-dialog .form-group input:focus,
.mournblade-roll-dialog .form-group select:focus { .mournblade-cyd2-roll-dialog .form-group select:focus {
outline: none; outline: none;
border-color: #8b0000; border-color: #8b4513;
box-shadow: 0 0 5px rgba(139, 0, 0, 0.6); box-shadow: 0 0 5px rgba(139, 69, 19, 0.6);
background: #ffffff; background: #ffffff;
} }
.mournblade-roll-dialog .form-group input:disabled, .mournblade-cyd2-roll-dialog .form-group input:disabled,
.mournblade-roll-dialog .form-group select:disabled { .mournblade-cyd2-roll-dialog .form-group select:disabled {
opacity: 0.7; opacity: 0.7;
cursor: not-allowed; cursor: not-allowed;
background: rgba(200, 200, 200, 0.9); background: rgba(200, 200, 200, 0.9);
color: #555; color: #555;
} }
/* Grids */ /* Grids */
.mournblade-roll-dialog .modifiers-grid { .mournblade-cyd2-roll-dialog .modifiers-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 8px; gap: 6px;
margin-bottom: 10px; margin-bottom: 8px;
} }
/* Sections spéciales */ /* Sections spéciales */
.mournblade-roll-dialog .attributes-section { .mournblade-cyd2-roll-dialog .attributes-section {
background: rgba(139, 0, 0, 0.1); background: rgba(139, 69, 19, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(139, 0, 0, 0.3); border: 1px solid rgba(139, 69, 19, 0.3);
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .rune-section { .mournblade-cyd2-roll-dialog .rune-section {
background: rgba(75, 0, 130, 0.1); background: rgba(75, 0, 130, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(75, 0, 130, 0.3); border: 1px solid rgba(75, 0, 130, 0.3);
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .weapon-section { .mournblade-cyd2-roll-dialog .weapon-section {
background: rgba(184, 134, 11, 0.1); background: rgba(184, 134, 11, 0.1);
padding: 8px; padding: 6px 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(184, 134, 11, 0.3); border: 1px solid rgba(184, 134, 11, 0.3);
margin-bottom: 10px; margin-bottom: 8px;
} }
.mournblade-roll-dialog .weapon-info { .mournblade-cyd2-roll-dialog .weapon-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 5px 8px; padding: 4px 6px;
background: rgba(184, 134, 11, 0.15); background: rgba(184, 134, 11, 0.15);
border-radius: 3px; border-radius: 3px;
margin-bottom: 8px; margin-bottom: 6px;
} }
.mournblade-roll-dialog .weapon-info .weapon-label { .mournblade-cyd2-roll-dialog .weapon-info .weapon-label {
font-weight: bold; font-weight: bold;
font-size: 0.9rem; font-size: 0.9rem;
color: #1a1a1a; color: #1a1a1a;
} }
.mournblade-roll-dialog .weapon-info .weapon-bonus { .mournblade-cyd2-roll-dialog .weapon-info .weapon-bonus {
font-size: 0.85rem; font-size: 0.85rem;
color: #8b0000; color: #8b4513;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .defense-info { .mournblade-cyd2-roll-dialog .defense-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -1549,68 +1553,76 @@ li {
border-radius: 3px; border-radius: 3px;
margin-bottom: 8px; margin-bottom: 8px;
} }
.mournblade-roll-dialog .defense-info .defense-label { .mournblade-cyd2-roll-dialog .defense-info .defense-label {
font-size: 0.85rem; font-size: 0.85rem;
color: #1a1a1a; color: #1a1a1a;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .defense-info .defense-value { .mournblade-cyd2-roll-dialog .defense-info .defense-value {
font-size: 1rem; font-size: 1rem;
color: #006400; color: #006400;
font-weight: bold; font-weight: bold;
} }
/* Combat modifiers */ /* Combat modifiers */
.mournblade-roll-dialog .combat-modifiers, .mournblade-cyd2-roll-dialog .combat-modifiers,
.mournblade-roll-dialog .ranged-combat-section { .mournblade-cyd2-roll-dialog .ranged-combat-section {
background: rgba(139, 0, 0, 0.1); background: rgba(139, 69, 19, 0.1);
padding: 8px; padding: 6px 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(139, 0, 0, 0.3); border: 1px solid rgba(139, 69, 19, 0.3);
margin-bottom: 10px; margin-bottom: 8px;
} }
.mournblade-roll-dialog .combat-modifiers h4, .mournblade-cyd2-roll-dialog .combat-modifiers h4,
.mournblade-roll-dialog .ranged-combat-section h4 { .mournblade-cyd2-roll-dialog .ranged-combat-section h4 {
margin: 0 0 8px 0; margin: 0 0 6px 0;
color: #2a2a2a; color: #2a2a2a;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
font-size: 0.95rem; font-size: 0.9rem;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .modifiers-columns { .mournblade-cyd2-roll-dialog .modifiers-columns {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 5px 10px; gap: 3px 8px;
margin-bottom: 6px;
} }
.mournblade-roll-dialog .checkbox-label { .mournblade-cyd2-roll-dialog .checkbox-label {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 6px; gap: 5px;
padding: 4px 6px; padding: 3px 4px;
cursor: pointer; cursor: pointer;
border-radius: 3px; border-radius: 3px;
transition: background 0.2s ease; transition: background 0.2s ease;
} }
.mournblade-roll-dialog .checkbox-label:hover { .mournblade-cyd2-roll-dialog .checkbox-label:hover {
background: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.15);
} }
.mournblade-roll-dialog .checkbox-label input[type="checkbox"] { .mournblade-cyd2-roll-dialog .checkbox-label input[type="checkbox"] {
width: auto; width: auto;
margin: 0; margin: 0;
flex-shrink: 0;
cursor: pointer; cursor: pointer;
accent-color: #8b0000; accent-color: #8b4513;
} }
.mournblade-roll-dialog .checkbox-label span { .mournblade-cyd2-roll-dialog .checkbox-label span {
color: #1a1a1a; color: #1a1a1a;
font-size: 0.85rem; font-size: 0.82rem;
user-select: none; user-select: none;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5); text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
line-height: 1.2;
} }
.mournblade-roll-dialog .checkbox-label.highlight { .mournblade-cyd2-roll-dialog .checkbox-label.highlight {
background: rgba(255, 215, 0, 0.15); background: rgba(255, 215, 0, 0.15);
border: 1px solid rgba(255, 215, 0, 0.4); border: 1px solid rgba(255, 215, 0, 0.4);
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .info-message { /* Ranged combat: 1-column grid for selects (long labels) */
.mournblade-cyd2-roll-dialog .ranged-combat-section .modifiers-grid {
grid-template-columns: 1fr;
gap: 4px;
}
.mournblade-cyd2-roll-dialog .info-message {
padding: 6px 10px; padding: 6px 10px;
background: rgba(33, 150, 243, 0.1); background: rgba(33, 150, 243, 0.1);
border-left: 3px solid rgba(33, 150, 243, 0.6); border-left: 3px solid rgba(33, 150, 243, 0.6);
@@ -1620,19 +1632,19 @@ li {
margin-bottom: 8px; margin-bottom: 8px;
} }
/* Malus section */ /* Malus section */
.mournblade-roll-dialog .malus-section { .mournblade-cyd2-roll-dialog .malus-section {
background: rgba(100, 100, 100, 0.1); background: rgba(100, 100, 100, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(100, 100, 100, 0.3); border: 1px solid rgba(100, 100, 100, 0.3);
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .malus-grid { .mournblade-cyd2-roll-dialog .malus-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 8px; gap: 8px;
} }
.mournblade-roll-dialog .malus-item { .mournblade-cyd2-roll-dialog .malus-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -1640,51 +1652,53 @@ li {
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
border-radius: 3px; border-radius: 3px;
} }
.mournblade-roll-dialog .malus-item .malus-label { .mournblade-cyd2-roll-dialog .malus-item .malus-label {
font-size: 0.85rem; font-size: 0.85rem;
color: #2a2a2a; color: #2a2a2a;
font-weight: 500; font-weight: 500;
} }
.mournblade-roll-dialog .malus-item .malus-value { .mournblade-cyd2-roll-dialog .malus-item .malus-value {
font-size: 0.95rem; font-size: 0.95rem;
color: #8b0000; color: #8b4513;
font-weight: bold; font-weight: bold;
} }
/* Registered modifiers */ /* Registered modifiers */
.mournblade-roll-dialog .registered-modifiers { .mournblade-cyd2-roll-dialog .registered-modifiers {
background: rgba(75, 0, 130, 0.1); background: rgba(75, 0, 130, 0.1);
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(75, 0, 130, 0.3); border: 1px solid rgba(75, 0, 130, 0.3);
margin-bottom: 10px; margin-bottom: 10px;
} }
.mournblade-roll-dialog .registered-modifiers h4 { .mournblade-cyd2-roll-dialog .registered-modifiers h4 {
margin: 0 0 6px 0; margin: 0 0 6px 0;
color: #2a2a2a; color: #2a2a2a;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
font-size: 0.9rem; font-size: 0.9rem;
font-weight: bold; font-weight: bold;
} }
.mournblade-roll-dialog .registered-modifiers h4 i { .mournblade-cyd2-roll-dialog .registered-modifiers h4 i {
margin-right: 6px; margin-right: 6px;
color: #4b0082; color: #4b0082;
} }
.mournblade-roll-dialog .modifier-item { .mournblade-cyd2-roll-dialog .modifier-item {
margin-bottom: 4px; margin-bottom: 4px;
} }
/* Special option */ /* Special option */
.mournblade-roll-dialog .special-option { .mournblade-cyd2-roll-dialog .special-option {
margin-top: 10px; margin-top: 10px;
} }
/* Dialog buttons */ /* Dialog buttons */
.mournblade-roll-dialog .dialog-buttons { .mournblade-cyd2-roll-dialog .dialog-buttons,
.mournblade-cyd2-roll-dialog .form-footer {
display: flex; display: flex;
gap: 10px; gap: 10px;
padding: 10px; padding: 10px 12px 14px !important;
border-top: 2px solid rgba(139, 0, 0, 0.3); border-top: 2px solid rgba(139, 69, 19, 0.3);
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
} }
.mournblade-roll-dialog .dialog-buttons button { .mournblade-cyd2-roll-dialog .dialog-buttons button,
.mournblade-cyd2-roll-dialog .form-footer button {
flex: 1; flex: 1;
padding: 8px 14px; padding: 8px 14px;
border: none; border: none;
@@ -1696,29 +1710,41 @@ li {
font-family: Charlemagne; font-family: Charlemagne;
text-transform: uppercase; text-transform: uppercase;
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld10"], .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld10"],
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld20"] { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld20"],
background: linear-gradient(135deg, #8b0000 0%, #6d0808 100%); .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld10"],
color: #f5f5f5; .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld20"] {
background: rgba(100, 100, 100, 0.3) !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld10"]:hover, .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld10"]:hover,
.mournblade-roll-dialog .dialog-buttons button[data-action="rolld20"]:hover { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="rolld20"]:hover,
background: linear-gradient(135deg, #a00000 0%, #8b0000 100%); .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld10"]:hover,
transform: translateY(-2px); .mournblade-cyd2-roll-dialog .form-footer button[data-action="rolld20"]:hover {
box-shadow: 0 4px 8px rgba(139, 0, 0, 0.5); background: rgba(100, 100, 100, 0.5) !important;
transform: translateY(-1px);
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="cancel"] { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="cancel"],
.mournblade-cyd2-roll-dialog .form-footer button[data-action="cancel"] {
background: rgba(100, 100, 100, 0.3); background: rgba(100, 100, 100, 0.3);
color: #2a2a2a; color: #2a2a2a;
} }
.mournblade-roll-dialog .dialog-buttons button[data-action="cancel"]:hover { .mournblade-cyd2-roll-dialog .dialog-buttons button[data-action="cancel"]:hover,
.mournblade-cyd2-roll-dialog .form-footer button[data-action="cancel"]:hover {
background: rgba(100, 100, 100, 0.5); background: rgba(100, 100, 100, 0.5);
} }
/* Affichage d'une valeur non-éditable dans le dialog */
.mournblade-cyd2-roll-dialog .field-value {
display: inline-block;
font-weight: bold;
color: #8b4513;
font-size: 0.95rem;
padding: 0 4px;
}
/* ==================== Sheet Mode Toggle Button ==================== */ /* ==================== Sheet Mode Toggle Button ==================== */
.sheet-mode-toggle { .sheet-mode-toggle {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
border: 1px solid #8b0000; border: 1px solid #8b4513;
border-radius: 3px; border-radius: 3px;
color: #f5f5f5; color: #f5f5f5;
padding: 2px 4px; padding: 2px 4px;
@@ -1733,7 +1759,7 @@ li {
flex-shrink: 0; flex-shrink: 0;
} }
.sheet-mode-toggle:hover { .sheet-mode-toggle:hover {
background: linear-gradient(135deg, #a00000 0%, #5a0505 100%); background: linear-gradient(135deg, #a06010 0%, #4a2200 100%);
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} }
@@ -1743,15 +1769,15 @@ li {
} }
/* ==================== Chat Message Styles ==================== */ /* ==================== Chat Message Styles ==================== */
.mournblade-chat-result { .mournblade-chat-result {
background: linear-gradient(135deg, rgba(74, 4, 4, 0.2) 0%, rgba(139, 0, 0, 0.15) 100%); background: linear-gradient(135deg, rgba(42, 20, 0, 0.2) 0%, rgba(139, 69, 19, 0.15) 100%);
border: 2px solid #8b0000; border: 2px solid #8b4513;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
font-family: CentaurMT, serif; font-family: CentaurMT, serif;
} }
.mournblade-chat-result .chat-result-header { .mournblade-chat-result .chat-result-header {
background: linear-gradient(135deg, #4a0404 0%, #2a0202 100%); background: linear-gradient(135deg, #2a1400 0%, #2a0202 100%);
border-bottom: 2px solid #8b0000; border-bottom: 2px solid #8b4513;
padding: 8px; padding: 8px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -1761,7 +1787,7 @@ li {
width: 48px; width: 48px;
height: 48px; height: 48px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #8b0000; border: 1px solid #8b4513;
object-fit: cover; object-fit: cover;
flex-shrink: 0; flex-shrink: 0;
} }
@@ -1786,7 +1812,7 @@ li {
.mournblade-chat-result .result-main { .mournblade-chat-result .result-main {
background: rgba(255, 250, 240, 0.9); background: rgba(255, 250, 240, 0.9);
padding: 4px 8px; padding: 4px 8px;
border-bottom: 1px solid rgba(139, 0, 0, 0.3); border-bottom: 1px solid rgba(139, 69, 19, 0.3);
} }
.mournblade-chat-result .result-main .result-display { .mournblade-chat-result .result-main .result-display {
display: flex; display: flex;
@@ -1803,12 +1829,12 @@ li {
background: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.7);
padding: 4px 6px; padding: 4px 6px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(139, 0, 0, 0.2); border: 1px solid rgba(139, 69, 19, 0.2);
} }
.mournblade-chat-result .result-main .result-display .dice-result i, .mournblade-chat-result .result-main .result-display .dice-result i,
.mournblade-chat-result .result-main .result-display .total-result i, .mournblade-chat-result .result-main .result-display .total-result i,
.mournblade-chat-result .result-main .result-display .difficulty i { .mournblade-chat-result .result-main .result-display .difficulty i {
color: #8b0000; color: #8b4513;
font-size: 1rem; font-size: 1rem;
display: block; display: block;
margin-bottom: 2px; margin-bottom: 2px;
@@ -1829,7 +1855,7 @@ li {
.mournblade-chat-result .result-main .result-display .total-result .difficulty-value, .mournblade-chat-result .result-main .result-display .total-result .difficulty-value,
.mournblade-chat-result .result-main .result-display .difficulty .difficulty-value { .mournblade-chat-result .result-main .result-display .difficulty .difficulty-value {
font-size: 1.5rem; font-size: 1.5rem;
color: #8b0000; color: #8b4513;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
font-weight: bold; font-weight: bold;
line-height: 1.2; line-height: 1.2;
@@ -1841,11 +1867,27 @@ li {
.mournblade-chat-result .result-main .result-display .total-result .difficulty-label, .mournblade-chat-result .result-main .result-display .total-result .difficulty-label,
.mournblade-chat-result .result-main .result-display .difficulty .difficulty-label { .mournblade-chat-result .result-main .result-display .difficulty .difficulty-label {
font-size: 0.75rem; font-size: 0.75rem;
color: #4a0404; color: #2a1400;
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: bold;
line-height: 1.1; line-height: 1.1;
} }
.mournblade-chat-result .result-main .result-display .d20-impair {
flex: 2;
background: rgba(180, 60, 0, 0.12);
border-color: rgba(180, 60, 0, 0.4);
}
.mournblade-chat-result .result-main .result-display .d20-impair i {
color: #b03000;
display: inline;
margin-right: 4px;
}
.mournblade-chat-result .result-main .result-display .d20-impair .dice-value {
display: inline;
font-size: 0.85rem;
color: #b03000;
font-weight: bold;
}
.mournblade-chat-result .result-main .result-badge-container { .mournblade-chat-result .result-main .result-badge-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -1874,7 +1916,7 @@ li {
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
} }
.mournblade-chat-result .result-main .result-badge-container .result-badge.failure { .mournblade-chat-result .result-main .result-badge-container .result-badge.failure {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
color: white; color: white;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
} }
@@ -1902,7 +1944,7 @@ li {
} }
.mournblade-chat-result .result-details .details-section .detail-row.bonus { .mournblade-chat-result .result-details .details-section .detail-row.bonus {
background: rgba(255, 200, 200, 0.6); background: rgba(255, 200, 200, 0.6);
border: 1px solid rgba(139, 0, 0, 0.5); border: 1px solid rgba(139, 69, 19, 0.5);
} }
.mournblade-chat-result .result-details .details-section .detail-row.malus { .mournblade-chat-result .result-details .details-section .detail-row.malus {
background: rgba(255, 180, 180, 0.6); background: rgba(255, 180, 180, 0.6);
@@ -1923,13 +1965,13 @@ li {
.mournblade-chat-result .result-effects { .mournblade-chat-result .result-effects {
padding: 8px; padding: 8px;
background: rgba(255, 230, 230, 0.4); background: rgba(255, 230, 230, 0.4);
border-top: 1px solid rgba(139, 0, 0, 0.3); border-top: 1px solid rgba(139, 69, 19, 0.3);
} }
.mournblade-chat-result .result-effects .effect-item { .mournblade-chat-result .result-effects .effect-item {
padding: 5px 8px; padding: 5px 8px;
margin-bottom: 5px; margin-bottom: 5px;
background: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.7);
border-left: 3px solid #8b0000; border-left: 3px solid #8b4513;
border-radius: 3px; border-radius: 3px;
color: #000000; color: #000000;
font-size: 0.85rem; font-size: 0.85rem;
@@ -1940,7 +1982,7 @@ li {
} }
.mournblade-chat-result .result-effects .effect-item i { .mournblade-chat-result .result-effects .effect-item i {
margin-right: 6px; margin-right: 6px;
color: #8b0000; color: #8b4513;
} }
.mournblade-chat-result .result-effects .effect-item:last-child { .mournblade-chat-result .result-effects .effect-item:last-child {
margin-bottom: 0; margin-bottom: 0;
@@ -1975,8 +2017,8 @@ li {
width: 100%; width: 100%;
} }
.mournblade-chat-result .chat-card-button { .mournblade-chat-result .chat-card-button {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
border: 1px solid #8b0000; border: 1px solid #8b4513;
border-radius: 3px; border-radius: 3px;
color: #f5f5f5; color: #f5f5f5;
padding: 6px 12px; padding: 6px 12px;
@@ -1990,7 +2032,7 @@ li {
margin-right: 4px; margin-right: 4px;
} }
.mournblade-chat-result .chat-card-button:hover { .mournblade-chat-result .chat-card-button:hover {
background: linear-gradient(135deg, #a00000 0%, #5a0505 100%); background: linear-gradient(135deg, #a06010 0%, #4a2200 100%);
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} }
@@ -2001,12 +2043,103 @@ li {
.mournblade-chat-result .chat-card-button.predilection-reroll:hover { .mournblade-chat-result .chat-card-button.predilection-reroll:hover {
background: linear-gradient(135deg, #5b1092 0%, #3d005d 100%); background: linear-gradient(135deg, #5b1092 0%, #3d005d 100%);
} }
/* Tag non-létaux dans les messages de dégâts */
.mournblade-chat-result .non-lethal-tag {
font-size: 0.8rem;
color: #888;
font-style: italic;
margin-left: 4px;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Welcome Message Styling */ .mournblade-post-item {
background: linear-gradient(135deg, rgba(42, 20, 0, 0.15) 0%, rgba(139, 69, 19, 0.1) 100%);
border: 2px solid #8b4513;
border-radius: 6px;
overflow: hidden;
font-family: CentaurMT, serif;
margin: 4px 0;
}
.mournblade-post-item .post-item-header {
background: linear-gradient(135deg, #2a1400 0%, #3a1800 100%);
border-bottom: 2px solid #8b4513;
padding: 8px 10px;
display: flex;
align-items: center;
gap: 10px;
}
.mournblade-post-item .post-item-header .post-item-img {
width: 44px;
height: 44px;
border-radius: 4px;
border: 1px solid #8b4513;
object-fit: cover;
flex-shrink: 0;
}
.mournblade-post-item .post-item-header .post-item-title {
flex: 1;
}
.mournblade-post-item .post-item-header .post-item-title .post-item-name {
margin: 0 0 2px 0;
color: #ffd700;
font-size: 1.1rem;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
line-height: 1.2;
}
.mournblade-post-item .post-item-header .post-item-title .post-item-type {
font-size: 0.75rem;
color: #f5e6d3;
font-style: italic;
opacity: 0.8;
text-transform: capitalize;
}
.mournblade-post-item .post-item-stats {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding: 6px 8px;
background: rgba(139, 69, 19, 0.08);
border-bottom: 1px solid rgba(139, 69, 19, 0.3);
}
.mournblade-post-item .post-item-stats .post-stat {
display: flex;
align-items: center;
gap: 4px;
background: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(139, 69, 19, 0.4);
border-radius: 3px;
padding: 2px 6px;
font-size: 0.8rem;
}
.mournblade-post-item .post-item-stats .post-stat.post-stat-full {
flex: 1 1 100%;
}
.mournblade-post-item .post-item-stats .post-stat .stat-label {
color: #8b4513;
font-weight: bold;
font-size: 0.75rem;
}
.mournblade-post-item .post-item-stats .post-stat .stat-value {
color: #2a1400;
font-size: 0.8rem;
}
.mournblade-post-item .post-item-description {
padding: 8px 10px;
color: #2a1400;
font-size: 0.9rem;
line-height: 1.4;
background: rgba(245, 230, 211, 0.85);
}
.mournblade-post-item .post-item-description p {
margin: 4px 0;
}
.mournblade-post-item .post-item-description em,
.mournblade-post-item .post-item-description i {
color: #5a2d00;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
.mournblade-welcome-message { .mournblade-welcome-message {
background: linear-gradient(135deg, rgba(139, 0, 0, 0.15) 0%, rgba(74, 4, 4, 0.2) 100%); background: linear-gradient(135deg, rgba(139, 69, 19, 0.15) 0%, rgba(42, 20, 0, 0.2) 100%);
border: 2px solid #8b0000; border: 2px solid #8b4513;
border-radius: 8px; border-radius: 8px;
padding: 0; padding: 0;
margin: 8px 0; margin: 8px 0;
@@ -2015,7 +2148,7 @@ li {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
} }
.mournblade-welcome-message .welcome-header { .mournblade-welcome-message .welcome-header {
background: linear-gradient(135deg, #8b0000 0%, #4a0404 100%); background: linear-gradient(135deg, #8b4513 0%, #2a1400 100%);
padding: 10px; padding: 10px;
text-align: center; text-align: center;
border-bottom: 2px solid #ffd700; border-bottom: 2px solid #ffd700;
@@ -2054,7 +2187,7 @@ li {
margin-bottom: 10px; margin-bottom: 10px;
padding: 8px; padding: 8px;
background: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.6);
border-left: 4px solid #8b0000; border-left: 4px solid #8b4513;
border-radius: 4px; border-radius: 4px;
} }
.mournblade-welcome-message .welcome-content .welcome-section:last-child { .mournblade-welcome-message .welcome-content .welcome-section:last-child {
@@ -2063,7 +2196,7 @@ li {
.mournblade-welcome-message .welcome-content .welcome-section .section-icon { .mournblade-welcome-message .welcome-content .welcome-section .section-icon {
flex-shrink: 0; flex-shrink: 0;
font-size: 1.3rem; font-size: 1.3rem;
color: #8b0000; color: #8b4513;
width: 28px; width: 28px;
text-align: center; text-align: center;
} }
@@ -2073,7 +2206,7 @@ li {
} }
.mournblade-welcome-message .welcome-content .welcome-section .section-text strong { .mournblade-welcome-message .welcome-content .welcome-section .section-text strong {
display: block; display: block;
color: #8b0000; color: #8b4513;
font-size: 1rem; font-size: 1rem;
margin-bottom: 2px; margin-bottom: 2px;
line-height: 1.2; line-height: 1.2;
@@ -2086,7 +2219,7 @@ li {
.mournblade-welcome-message .welcome-content .welcome-section .section-text .welcome-link { .mournblade-welcome-message .welcome-content .welcome-section .section-text .welcome-link {
display: inline-block; display: inline-block;
margin-top: 4px; margin-top: 4px;
color: #8b0000; color: #8b4513;
font-weight: 600; font-weight: 600;
text-decoration: none; text-decoration: none;
transition: all 0.2s; transition: all 0.2s;
@@ -2096,12 +2229,12 @@ li {
margin-right: 4px; margin-right: 4px;
} }
.mournblade-welcome-message .welcome-content .welcome-section .section-text .welcome-link:hover { .mournblade-welcome-message .welcome-content .welcome-section .section-text .welcome-link:hover {
color: #a00000; color: #a06010;
text-shadow: 0 0 4px rgba(139, 0, 0, 0.3); text-shadow: 0 0 4px rgba(139, 69, 19, 0.3);
transform: translateX(2px); transform: translateX(2px);
} }
.mournblade-welcome-message .welcome-footer { .mournblade-welcome-message .welcome-footer {
background: linear-gradient(135deg, #4a0404 0%, #8b0000 100%); background: linear-gradient(135deg, #2a1400 0%, #8b4513 100%);
padding: 8px; padding: 8px;
text-align: center; text-align: center;
color: #ffd700; color: #ffd700;
@@ -2710,6 +2843,36 @@ li {
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .sheet-box { .fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .sheet-box {
height: auto; height: auto;
} }
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content {
color: #2a1a0a !important;
background: rgba(255, 250, 240, 0.92);
border-radius: 3px;
padding: 0.4rem 0.5rem;
min-height: 6rem;
}
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content p,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content p,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content ul,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content ul,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content ol,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content ol,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content li,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content li,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content h1,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content h1,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content h2,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content h2,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content h3,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content h3,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror .editor-content h4,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror .editor-content h4 {
color: #2a1a0a !important;
}
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab prose-mirror:not(.inactive) .editor-content,
.fvtt-mournblade-cyd-2-0.actor .sheet-body .tab .editor prose-mirror:not(.inactive) .editor-content {
background: rgba(255, 252, 245, 0.98);
}
.fvtt-mournblade-cyd-2-0.actor .sheet-body .compact-list { .fvtt-mournblade-cyd-2-0.actor .sheet-body .compact-list {
list-style: none; list-style: none;
margin: 0; margin: 0;

View File

@@ -362,7 +362,7 @@
<h3><label class="items-title-text">Runes</label></h3> <h3><label class="items-title-text">Runes</label></h3>
</span> </span>
<span class="item-field-label-long"> <span class="item-field-label-long">
<label class="short-label">Haute Langue</label> <label class="short-label">Haut Parler</label>
</span> </span>
<span class="item-field-label-short"> <span class="item-field-label-short">
<label class="short-label">Difficulté</label> <label class="short-label">Difficulté</label>
@@ -375,7 +375,7 @@
{{#each runes as |rune key|}} {{#each runes as |rune key|}}
<li class="item flexrow " data-item-id="{{rune._id}}" data-item-type="rune"> <li class="item flexrow " data-item-id="{{rune._id}}" data-item-type="rune">
<img class="item-name-img" src="{{rune.img}}" /> <img class="item-name-img" src="{{rune.img}}" />
<span class="item-name-label competence-name">{{rune.name}}</span> <span class="item-name-label competence-name"><a data-action="rollRune">{{rune.name}}</a></span>
<span class="item-field-label-long">{{rune.system.formule}}</span> <span class="item-field-label-long">{{rune.system.formule}}</span>
<span class="item-field-label-short">{{rune.system.seuil}}</span> <span class="item-field-label-short">{{rune.system.seuil}}</span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
@@ -779,8 +779,8 @@
<span> <span>
<h3>Description</h3> <h3>Description</h3>
</span> </span>
<div class="medium-editor item-text-long-line"> <div class="editor">
{{editor description target="system.biodata.description" button=true owner=owner editable=editable}} {{formInput systemFields.biodata.fields.description enriched=enrichedDescription value=system.biodata.description name="system.biodata.description" toggled=true}}
</div> </div>
</div> </div>

View File

@@ -1,33 +1,96 @@
<div class="chat-message-header"> <div class="mournblade-chat-result">
{{!-- Header avec acteur --}}
<div class="chat-result-header">
{{#if actorImg}} {{#if actorImg}}
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" /> <img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
{{/if}} {{/if}}
<h4 class="chat-actor-name">{{alias}}</h4> <div class="header-info">
</div> <h4 class="actor-name">{{alias}}</h4>
{{#if arme}}
<hr /> <div class="action-title">
<i class="fas fa-swords"></i>
{{#if actionImg}} Dégâts — {{arme.name}}
<div> {{#if arme.system.nonletaux}}<span class="non-lethal-tag">(Non létaux)</span>{{/if}}
<img class="chat-icon" src="{{actionImg}}" alt="{{name}}" />
</div> </div>
{{/if}} {{/if}}
</div>
</div>
<div class="flexcol"></div> {{!-- Résultat des dégâts --}}
<div class="result-main">
<div> <div class="result-display">
<ul> <div class="dice-result">
<li> <i class="fas fa-dice"></i>
<strong>Arme</strong> : {{arme.name}} (+{{arme.system.totalDegats}}) <span class="dice-value">{{diceResult}}</span>
</li> </div>
<li><strong>Formule</strong> : {{formula}}</li> <div class="total-result">
<li><strong>Dégats</strong> : {{finalResult}}</li> <span class="total-label">Dégâts</span>
<span class="total-value">{{finalResult}}</span>
</div>
{{#if targetVigueur}} {{#if targetVigueur}}
<li><strong>Vigueur de la cible</strong> : {{targetVigueur}}</li> <div class="difficulty">
<li> <span class="difficulty-label">SV</span>
<strong>Etats de Combativité supplémentaires perdus (auto)</strong> : <span class="difficulty-value">{{targetVigueur}}</span>
{{nbEtatPerdus}} </div>
</li> {{/if}}
{{/if}} </div>
</ul>
{{!-- Badge résultat dégâts --}}
{{#if targetVigueur}}
<div class="result-badge-container">
{{#if (eq nbEtatPerdus 0)}}
<div class="result-badge failure">
<i class="fas fa-shield"></i> Armure tient
</div>
{{else if (eq nbEtatPerdus 1)}}
<div class="result-badge success">
<i class="fas fa-bolt"></i> +1 état supplémentaire
</div>
{{else}}
<div class="result-badge heroique">
<i class="fas fa-fire"></i> +{{nbEtatPerdus}} états supplémentaires
</div>
{{/if}}
</div>
{{/if}}
</div>
{{!-- Détails des dégâts --}}
<div class="result-details">
<div class="detail-row">
<span class="detail-label">Arme :</span>
<span class="detail-value">{{arme.name}} (+{{arme.system.totalDegats}})</span>
</div>
<div class="detail-row">
<span class="detail-label">Formule :</span>
<span class="detail-value">{{formula}}</span>
</div>
{{#if targetVigueur}}
<div class="detail-row">
<span class="detail-label">SV cible :</span>
<span class="detail-value">{{targetVigueur}}</span>
</div>
<div class="detail-row">
<span class="detail-label">États supplémentaires perdus :</span>
<span class="detail-value">{{nbEtatPerdus}}</span>
</div>
{{/if}}
</div>
{{!-- Info : dégâts auto-appliqués si cible sélectionnée --}}
<div class="result-effects">
{{#if defenderTokenId}}
<div class="effect-item">
<i class="fas fa-check-circle"></i>
Combativité appliquée automatiquement à la cible.
</div>
{{else}}
<div class="effect-item">
<i class="fas fa-info-circle"></i>
Aucune cible sélectionnée — appliquez les dégâts manuellement.
</div>
{{/if}}
</div>
</div> </div>

View File

@@ -1,138 +1,304 @@
<div class="chat-message-header"> <div class="mournblade-chat-result">
{{!-- Header avec acteur --}}
<div class="chat-result-header">
{{#if actorImg}} {{#if actorImg}}
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" /> <img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
{{/if}} {{/if}}
<h4 class="chat-actor-name">{{alias}}</h4> <div class="header-info">
<h4 class="actor-name">{{alias}}</h4>
{{#if competence}}
<div class="action-title">
<i class="fas fa-dice-d10"></i>
{{competence.name}}
{{#if rune}}{{rune.name}}{{else if arme}}{{arme.name}}{{/if}}
</div> </div>
{{else if attr}}
<hr /> <div class="action-title">
<i class="fas fa-dice-d10"></i>
{{#if actionImg}} {{attr.label}}{{#if attr2}} / {{attr2.label}}{{/if}}
<div>
<img class="chat-icon" src="{{actionImg}}" alt="{{name}}" />
</div> </div>
{{/if}} {{/if}}
</div>
</div>
<div class="flexcol"></div> {{!-- Résultat principal --}}
<div class="result-main">
<div> <div class="result-display">
<ul> <div class="dice-result">
<li class="mournblade-cyd2-roll"> <i class="fas fa-dice"></i>
<strong>Attribut</strong> : {{attr.label}} ({{attr.value}}) <span class="dice-value">{{diceResult}}</span>
</li> </div>
{{#if attr2}} {{#if isD20Impair}}
<li><strong>Attribut</strong> : {{attr2.label}} ({{attr2.value}})</li> <div class="dice-result d20-impair">
{{/if}} {{#if competence}} <i class="fas fa-exclamation-circle"></i>
<li> <span class="dice-value">D20 impair → valeur dé : 0</span>
<strong>Compétence</strong> : {{competence.name}} </div>
({{competence.system.niveau}})
</li>
{{/if}} {{#if selectedMaitrise}}
<li><strong>Maitrise</strong> : {{selectedMaitrise.name}}</li>
{{/if}} {{#if arme}}
<li>
<strong>Arme</strong> : {{arme.name}} (+{{arme.system.bonusmaniementoff}})
</li>
{{/if}} {{/if}}
<div class="total-result">
<li><strong>Formule</strong> : {{diceFormula}}</li> <span class="total-label">Total</span>
<li><strong>Résultat du dé</strong> : {{diceResult}}</li> <span class="total-value">{{finalResult}}</span>
</div>
{{#if bonusRoll}} {{#if difficulte}}
<li><strong>{{textBonus}}</strong> : +{{bonusRoll.total}}</li> <div class="difficulty">
<span class="difficulty-label">SD</span>
<span class="difficulty-value">{{difficulte}}</span>
</div>
{{/if}} {{/if}}
</div>
<li><strong>Total</strong> : {{finalResult}}</li> {{!-- Badge de résultat --}}
{{#if difficulte}}
{{#if attaqueCharge}} <div class="result-badge-container">
<li>
Vous avez chargé : vos adversaires bénéficient de +3 pour vous attaquer
</li>
{{/if}} {{#if difficulte}}
<li><strong>SD</strong> : {{difficulte}}</li>
{{#if isSuccess}}
<li class="chat-success">Succés...</li>
{{#if attaqueDesarme}}
<li>Vous désarmez votre adversaire ! Son arme tombe hors de sa portée.</li>
{{/if}} {{else}}
<li class="chat-failure">Echec...</li>
{{/if}} {{/if}} {{#if isHeroique}}
<li class="chat-success">Héroïque !!!</li>
{{#if attaqueDesarme}}
<li>
... Et en plus vous récupérez l'arme de votre adversaire dans votre main
(si vous le souhaitez) !.
</li>
{{/if}} {{/if}} {{#if isDramatique}}
<li class="chat-failure">Dramatique !!!</li>
{{/if}} {{#if isInit}}
<li>Initiative stockée !</li>
{{/if}} {{#if isSuccess}} {{#if immobiliser}} {{#if isHeroique}}
<li>
Votre cible est immobilisée, et vous pouvez faire une action complexe.
</li>
{{else}}
<li>Votre cible est immobilisée.</li>
{{/if}} {{/if}} {{#if desengager}} {{#if isSuccess}}
<li>Vous vous désengagez de votre adversaire.</li>
{{else}}
<li>
Vous ne parvenez pas à vous désengager de votre adversaire, il a un bonus
de +3 pour vous attaquer
</li>
{{/if}} {{/if}} {{#if repousser}} {{#if isHeroique}}
<li>Votre cible est repoussée de 3 mètres et tombe au sol.</li>
{{else}}
<li>Votre cible tombe au sol.</li>
{{/if}} {{/if}} {{#if assomer}} {{#if isHeroique}}
<li>Votre cible est assomée pour [[/r 1d10+10]] minutes.</li>
{{else}}
<li>Votre cible est assomée pour [[/r 1d10]] minutes.</li>
{{/if}} {{/if}} {{#if coupBas}}
<li>
La cible a reçu 2 adversités bleues et a perdu 1 niveau de combativité
(auto).
</li>
{{#if isHeroique}} {{#if isHeroique}}
<li>Et votre cible perd sa prochaine action complexe.</li> <div class="result-badge heroique">
{{/if}} {{/if}} {{#if arme}} {{#if contenir}} {{#if isHeroique}} <i class="fas fa-star"></i> HÉROÏQUE !
<li> </div>
Aucun dégât, mais tous les adversaires dont le Seuil de Défense + 10 est {{else if isDramatique}}
atteint ou dépassé par le résultat de la manœuvre ne peuvent déclarer <div class="result-badge dramatique">
dattaque contre le personnage lors de leur prochaine action complexe (à <i class="fas fa-skull"></i> DRAMATIQUE !
ce tour de jeu ou au suivant). </div>
</li> {{else if isSuccess}}
<div class="result-badge success">
<i class="fas fa-check"></i> Succès
</div>
{{else}} {{else}}
<li> <div class="result-badge failure">
Aucun dégât, mais la cible de cette manœuvre ne peut pas déclarer <i class="fas fa-times"></i> Échec
dattaque contre vous lors de sa prochaine action complexe (à ce tour de </div>
jeu ou au suivant). {{/if}}
</li> </div>
{{/if}} {{else}} {{#if (eq nbCombativitePerdu "vaincu")}} {{/if}}
<li>Votre adversaire est vaincu !</li> </div>
{{!-- Détails du jet --}}
<div class="result-details">
<div class="detail-row">
<span class="detail-label">Formule :</span>
<span class="detail-value">{{diceFormula}}</span>
</div>
{{#if attr}}
<div class="detail-row">
<span class="detail-label">{{attr.label}} :</span>
<span class="detail-value">{{attr.value}}</span>
</div>
{{/if}}
{{#if attr2}}
<div class="detail-row">
<span class="detail-label">{{attr2.label}} :</span>
<span class="detail-value">{{attr2.value}}</span>
</div>
{{/if}}
{{#if competence}}
<div class="detail-row">
<span class="detail-label">{{competence.name}} :</span>
<span class="detail-value">{{competence.system.niveau}}</span>
</div>
{{/if}}
{{#if selectedMaitrise}}
<div class="detail-row">
<span class="detail-label">Maîtrise :</span>
<span class="detail-value">{{selectedMaitrise.name}}</span>
</div>
{{/if}}
{{#if arme}}
<div class="detail-row">
<span class="detail-label">Arme :</span>
<span class="detail-value">{{arme.name}} (+{{arme.system.bonusmaniementoff}})</span>
</div>
{{/if}}
{{#if rune}}
<div class="detail-row">
<span class="detail-label">Rune :</span>
<span class="detail-value">{{rune.name}}{{#if rune.system.formule}}{{rune.system.formule}}{{/if}}</span>
</div>
<div class="detail-row">
<span class="detail-label">Mode :</span>
<span class="detail-value">{{runemode}}</span>
</div>
<div class="detail-row">
<span class="detail-label">Pouvoir / Durée :</span>
<span class="detail-value">{{runeame}} pts → {{runeduree}} action(s) complexe(s)</span>
</div>
<div class="detail-row">
<span class="detail-label">Coût en Âme :</span>
<span class="detail-value">{{runeAmeCout}} pts</span>
</div>
{{/if}}
{{#if bonusRoll}}
<div class="detail-row bonus">
<span class="detail-label">{{textBonus}} :</span>
<span class="detail-value">+{{bonusRoll.total}}</span>
</div>
{{/if}}
</div>
{{!-- Effets et conséquences --}}
{{#if rune}}
<div class="result-effects">
{{#if isSuccess}}
{{#if isHeroique}}
<div class="effect-item">
<i class="fas fa-star"></i>
La rune {{rune.name}} est activée avec une puissance héroïque — la résistance est impossible !
</div>
{{else}} {{else}}
<li> <div class="effect-item">
Votre adversaire a perdu {{nbCombativitePerdu}} Etat de Combativité (auto) <i class="fas fa-magic"></i>
</li> La rune {{rune.name}} est activée avec succès.
</div>
{{/if}}
{{else}}
{{#if isDramatique}}
<div class="effect-item">
<i class="fas fa-skull"></i>
Échec dramatique : la rune échoue — les forces du chaos se déchaînent !
</div>
{{else}}
<div class="effect-item">
<i class="fas fa-times-circle"></i>
Échec simple : la rune n'a aucun effet.
</div>
{{/if}}
{{/if}}
</div>
{{else}}
{{!-- Effets et conséquences --}}
{{#if isSuccess}}
<div class="result-effects">
{{#if attaqueCharge}}
<div class="effect-item">
<i class="fas fa-horse"></i>
Vous avez chargé : vos adversaires bénéficient de +3 pour vous attaquer.
</div>
{{/if}}
{{#if attaqueDesarme}}
<div class="effect-item">
{{#if isHeroique}}
<i class="fas fa-hand-rock"></i>
Vous désarmez votre adversaire <em>et</em> récupérez son arme (si vous le souhaitez) !
{{else}}
<i class="fas fa-hand-rock"></i>
Vous désarmez votre adversaire ! Son arme tombe hors de sa portée.
{{/if}}
</div>
{{/if}}
{{#if immobiliser}}
<div class="effect-item">
{{#if isHeroique}}
<i class="fas fa-lock"></i>
Votre cible est immobilisée — vous pouvez faire une action complexe.
{{else}}
<i class="fas fa-lock"></i>
Votre cible est immobilisée.
{{/if}}
</div>
{{/if}}
{{#if repousser}}
<div class="effect-item">
{{#if isHeroique}}
<i class="fas fa-arrow-right"></i>
Votre cible est repoussée de 3 mètres et tombe au sol.
{{else}}
<i class="fas fa-arrow-right"></i>
Votre cible tombe au sol.
{{/if}}
</div>
{{/if}}
{{#if assomer}}
<div class="effect-item">
{{#if isHeroique}}
<i class="fas fa-dizzy"></i>
Votre cible est assommée pour [[/r 1d10+10]] minutes.
{{else}}
<i class="fas fa-dizzy"></i>
Votre cible est assommée pour [[/r 1d10]] minutes.
{{/if}}
</div>
{{/if}}
{{#if coupBas}}
<div class="effect-item">
<i class="fas fa-exclamation-circle"></i>
La cible reçoit 2 adversités bleues et perd 1 niveau de combativité (auto).
{{#if isHeroique}}
<br/><i class="fas fa-plus"></i> Votre cible perd aussi sa prochaine action complexe.
{{/if}}
</div>
{{/if}}
{{#if arme}}
{{#if contenir}}
<div class="effect-item">
{{#if isHeroique}}
<i class="fas fa-shield"></i>
Tous les adversaires dont le SD+10 est atteint ne peuvent pas déclarer d'attaque lors de leur prochaine action complexe.
{{else}}
<i class="fas fa-shield"></i>
La cible ne peut pas vous attaquer lors de sa prochaine action complexe.
{{/if}}
</div>
{{else}}
{{#if (eq nbCombativitePerdu "vaincu")}}
<div class="effect-item">
<i class="fas fa-skull-crossbones"></i>
Votre adversaire est <strong>vaincu</strong> !
</div>
{{else}}
<div class="effect-item">
<i class="fas fa-bolt"></i>
Votre adversaire a perdu <strong>{{nbCombativitePerdu}}</strong> état(s) de combativité (auto).
</div>
{{#if (not arme.system.onlevelonly)}} {{#if (not arme.system.onlevelonly)}}
<button class="chat-card-button roll-chat-degat">Dégats de l'arme</button> <div class="damage-buttons">
<button class="chat-card-button roll-chat-degat">
<i class="fas fa-burst"></i> Dégâts de l'arme
</button>
{{#if coupDevastateur}} {{#if coupDevastateur}}
<button class="chat-card-button roll-chat-degat-devastateur"> <button class="chat-card-button roll-chat-degat-devastateur">
Dégats de l'arme avec Coup Dévastateur <i class="fas fa-fire"></i> Dégâts avec Coup Dévastateur
</button>
{{/if}} {{/if}} {{/if}} {{/if}} {{/if}} {{/if}} {{#each predilections as
|pred key|}}
<li>
{{#if (and (and pred.acquise (not pred.maitrise)) (not pred.used))}}
<button
class="chat-card-button predilection-reroll"
data-predilection-index="{{key}}"
>
Predilection : {{pred.name}}
</button> </button>
{{/if}} {{/if}}
</li> </div>
{{/each}} {{/if}}
</ul> {{/if}}
{{/if}}
{{/if}}
</div>
{{else}}
{{!-- Conséquences d'un échec --}}
{{#if desengager}}
<div class="result-effects">
<div class="effect-item">
<i class="fas fa-exclamation-triangle"></i>
Vous ne parvenez pas à vous désengager — malus de -5 à votre défense ce tour et le suivant.
</div>
</div>
{{/if}}
{{#if isInit}}
<div class="result-effects">
<div class="effect-item">
<i class="fas fa-clock"></i>
Initiative stockée !
</div>
</div>
{{/if}}
{{/if}}
{{/if}}
{{!-- Prédilections (boutons de relance) --}}
{{#each predilections as |pred key|}}
{{#if (and (and pred.acquise (not pred.maitrise)) (not pred.used))}}
<div class="predilection-section">
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">
<i class="fas fa-redo"></i> Prédilection : {{pred.name}}
</button>
</div>
{{/if}}
{{/each}}
</div> </div>

View File

@@ -347,14 +347,14 @@
<div class="tab biodata" data-group="primary" data-tab="biodata"> <div class="tab biodata" data-group="primary" data-tab="biodata">
<div class="sheet-box color-bg-archetype"> <div class="sheet-box color-bg-archetype">
<div class="section-title">Description</div> <div class="section-title">Description</div>
<div class="medium-editor item-text-long-line"> <div class="editor">
{{editor description target="system.biodata.description" button=true owner=owner editable=editable}} {{formInput systemFields.biodata.fields.description enriched=enrichedDescription value=system.biodata.description name="system.biodata.description" toggled=true}}
</div> </div>
</div> </div>
<div class="sheet-box color-bg-archetype"> <div class="sheet-box color-bg-archetype">
<div class="section-title">Habitat</div> <div class="section-title">Habitat</div>
<div class="medium-editor item-text-long-line"> <div class="editor">
{{editor habitat target="system.biodata.habitat" button=true owner=owner editable=editable}} {{formInput systemFields.biodata.fields.habitat enriched=enrichedHabitat value=system.biodata.habitat name="system.biodata.habitat" toggled=true}}
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,8 +1,55 @@
<div class="post-item" data-transfer="{{transfer}}"> <div class="mournblade-post-item" data-jsondata="{{jsondata}}">
<h3><b>{{name}}</b></h3>
{{!-- Header --}}
<div class="post-item-header">
{{#if img}} {{#if img}}
<img class="chat-img" src="{{img}}" title="{{name}}" /> <img class="post-item-img" src="{{img}}" title="{{name}}" />
{{/if}} {{/if}}
<h4><b>Description : </b></h4> <div class="post-item-title">
<p class="card-content">{{{system.description}}}</p> <h3 class="post-item-name">{{name}}</h3>
<span class="post-item-type">{{type}}</span>
</div>
</div>
{{!-- Statistiques selon le type --}}
{{#if (eq type "arme")}}
<div class="post-item-stats">
{{#if system.typearme}}<div class="post-stat"><span class="stat-label">Type</span><span class="stat-value">{{system.typearme}}</span></div>{{/if}}
{{#if system.degats}}<div class="post-stat"><span class="stat-label">Dégâts</span><span class="stat-value">{{system.degats}}</span></div>{{/if}}
{{#if system.bonusmaniementoff}}<div class="post-stat"><span class="stat-label">Bonus off.</span><span class="stat-value">+{{system.bonusmaniementoff}}</span></div>{{/if}}
{{#if system.seuildefense}}<div class="post-stat"><span class="stat-label">Seuil def.</span><span class="stat-value">{{system.seuildefense}}</span></div>{{/if}}
</div>
{{/if}}
{{#if (eq type "protection")}}
<div class="post-item-stats">
{{#if system.protection}}<div class="post-stat"><span class="stat-label">Protection</span><span class="stat-value">{{system.protection}}</span></div>{{/if}}
{{#if system.adversitepoids}}<div class="post-stat"><span class="stat-label">Adv. poids</span><span class="stat-value">{{system.adversitepoids}}</span></div>{{/if}}
</div>
{{/if}}
{{#if (eq type "competence")}}
<div class="post-item-stats">
{{#if system.niveau}}<div class="post-stat"><span class="stat-label">Niveau</span><span class="stat-value">{{system.niveau}}</span></div>{{/if}}
{{#if (ne system.attribut1 "none")}}<div class="post-stat"><span class="stat-label">Attribut 1</span><span class="stat-value">{{upper system.attribut1}}</span></div>{{/if}}
{{#if (ne system.attribut2 "none")}}<div class="post-stat"><span class="stat-label">Attribut 2</span><span class="stat-value">{{upper system.attribut2}}</span></div>{{/if}}
</div>
{{/if}}
{{#if (eq type "rune")}}
<div class="post-item-stats">
{{#if system.formule}}<div class="post-stat"><span class="stat-label">Formule</span><span class="stat-value">{{system.formule}}</span></div>{{/if}}
{{#if system.seuil}}<div class="post-stat"><span class="stat-label">Seuil</span><span class="stat-value">{{system.seuil}}</span></div>{{/if}}
{{#if system.prononcee}}<div class="post-stat post-stat-full"><span class="stat-label">Prononcée</span><span class="stat-value">{{system.prononcee}}</span></div>{{/if}}
{{#if system.tracee}}<div class="post-stat post-stat-full"><span class="stat-label">Tracée</span><span class="stat-value">{{system.tracee}}</span></div>{{/if}}
</div>
{{/if}}
{{!-- Description --}}
{{#if system.description}}
<div class="post-item-description">
{{{system.description}}}
</div>
{{/if}}
</div> </div>

View File

@@ -1,49 +1,44 @@
<form class="skill-roll-dialog"> {{!-- Header --}}
<header class="roll-dialog-header"> <div class="dialog-header">
{{#if img}} <img class="actor-icon" src="{{img}}" alt="{{name}}" />
<img class="actor-icon" src="{{img}}" data-edit="img" title="{{name}}" /> <div class="dialog-title">
<h3>{{name}}</h3>
{{#if competence}}
<div class="competence-name">
{{competence.name}}
{{#if arme}}{{arme.name}}{{/if}}
{{#if (and attr (ne attrKey "tochoose"))}}
<span class="attribut-info"> ({{attr.label}} : {{attr.value}})</span>
{{/if}} {{/if}}
<h1 class="dialog-roll-title roll-dialog-header">{{title}}</h1> </div>
</header> {{else}}
{{#if (and attr (ne attrKey "tochoose"))}}
<div class="competence-name">
<span class="attribut-info">{{attr.label}} : {{attr.value}}</span>
</div>
{{/if}}
{{/if}}
</div>
</div>
<div class="flexcol"> {{!-- Main Content --}}
<div class="dialog-content">
<div class="flexrow"> {{!-- Attribut à choisir --}}
{{#if (eq attrKey "tochoose")}} {{#if (eq attrKey "tochoose")}}
<span class="roll-dialog-label">Attribut</span> <div class="form-group attributes-section">
<select class="status-small-label color-class-common" id ="attrKey" type="text" name="attrKey" value="attrKey" data-dtype="string" > <label>Attribut</label>
<select id="attrKey" name="attrKey">
{{selectOptions attributs selected=attrKey}} {{selectOptions attributs selected=attrKey}}
</select> </select>
{{else}}
<span class="roll-dialog-label">{{attr.label}}</span>
<span class="small-label roll-dialog-label">{{attr.value}}</span>
{{/if}}
</div>
{{#if nbAdversites}}
<div class="flexrow">
<span class="roll-dialog-label">Malus d'adversités </span>
<span class="small-label roll-dialog-label">- {{nbAdversites}}</span>
</div> </div>
{{/if}} {{/if}}
{{#if competence}} {{!-- Second attribut (hors compétence) --}}
<div class="flexrow"> {{#if (not competence)}}
<span class="roll-dialog-label">{{competence.name}}</span> <div class="form-group">
<span class="small-label roll-dialog-label">{{competence.system.niveau}}</span> <label>Second attribut</label>
</div> <select id="attrKey2" name="attrKey2">
{{#if maitrises}}
<div class="flexrow">
<span class="roll-dialog-label">Utiliser une maîtrise</span>
<select class="status-small-label color-class-common" id ="select-maitrise" type="text" name="select-maitrise" value="maitriseId" data-dtype="string" >
{{selectOptions maitrises selected=maitriseId valueAttr="key" nameAttr="key" labelAttr="label"}}
</select>
</div>
{{/if}}
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Second Attribut</span>
<select class="status-small-label color-class-common" id ="attrKey2" type="text" name="attrKey2" value="attrKey2" data-dtype="string" >
{{#select attrKey2}} {{#select attrKey2}}
<option value="none">Aucun</option> <option value="none">Aucun</option>
{{#each attributs as |attrLabel attrKey|}} {{#each attributs as |attrLabel attrKey|}}
@@ -54,10 +49,39 @@
</div> </div>
{{/if}} {{/if}}
{{!-- Malus d'adversités (CYD 2.0) --}}
{{#if nbAdversites}}
<div class="malus-section">
<div class="malus-grid">
<div class="malus-item">
<span class="malus-label">Malus d'adversités</span>
<span class="malus-value">- {{nbAdversites}}</span>
</div>
</div>
</div>
{{/if}}
{{!-- Compétence + Maîtrises --}}
{{#if competence}}
<div class="form-group">
<label>{{competence.name}}</label>
<span class="field-value">{{competence.system.niveau}}</span>
</div>
{{#if maitrises}}
<div class="form-group">
<label>Utiliser une maîtrise</label>
<select id="select-maitrise" name="select-maitrise">
{{selectOptions maitrises selected=maitriseId valueAttr="key" nameAttr="key" labelAttr="label"}}
</select>
</div>
{{/if}}
{{/if}}
{{!-- Talents --}}
{{#if (count talents)}} {{#if (count talents)}}
<div class="flexrow"> <div class="form-group">
<span class="roll-dialog-label">Talents </span> <label>Talents</label>
<select class="flex1" name="competence-talents" id="competence-talents" data-type="String" multiple> <select class="flex1" name="competence-talents" id="competence-talents" multiple>
{{#each talents as |talent key|}} {{#each talents as |talent key|}}
<option value="{{talent._id}}">{{talent.name}}</option> <option value="{{talent._id}}">{{talent.name}}</option>
{{/each}} {{/each}}
@@ -65,176 +89,223 @@
</div> </div>
{{/if}} {{/if}}
{{!-- Conditions communes (hors arme) --}}
{{#if conditionsCommunes}} {{#if conditionsCommunes}}
<div class="flexrow"> <div class="combat-modifiers">
<span class="roll-dialog-label">En surplomb, défenseur au sol (+3)?</span> <h4>Avantages Tactiques</h4>
<div class="modifiers-columns">
<label class="checkbox-label">
<input type="checkbox" id="defenseur-au-sol" {{checked defenseurAuSol}} /> <input type="checkbox" id="defenseur-au-sol" {{checked defenseurAuSol}} />
</div> <span>En surplomb / défenseur au sol (+3)</span>
<div class="flexrow"> </label>
<span class="roll-dialog-label">Défenseur aveuglé (+10)?</span> <label class="checkbox-label">
<input type="checkbox" id="defenseur-aveugle" {{checked defenseurAveugle}} /> <input type="checkbox" id="defenseur-aveugle" {{checked defenseurAveugle}} />
</div> <span>Défenseur aveuglé (+10)</span>
<div class="flexrow"> </label>
<span class="roll-dialog-label">Défenseur de dos (+5)?</span> <label class="checkbox-label">
<input type="checkbox" id="defenseur-de-dos" {{checked defenseurDeDos}} /> <input type="checkbox" id="defenseur-de-dos" {{checked defenseurDeDos}} />
</div> <span>Défenseur de dos (+5)</span>
<div class="flexrow"> </label>
<span class="roll-dialog-label">Défenseur immobilisé (+5)?</span> <label class="checkbox-label">
<input type="checkbox" id="defenseur-immobilise" {{checked defenseurImmobilise}} /> <input type="checkbox" id="defenseur-immobilise" {{checked defenseurImmobilise}} />
<span>Défenseur immobilisé (+5)</span>
</label>
</div>
</div> </div>
{{/if}} {{/if}}
{{!-- Manœuvres spéciales (immobiliser / repousser) --}}
{{#if (or immobiliser repousser)}} {{#if (or immobiliser repousser)}}
<div class="flexrow"> <div class="form-group">
<span class="roll-dialog-label">Cible consciente?</span> <label class="checkbox-label">
<input type="checkbox" id="cibleconsciente" {{checked cibleconsciente}} /> <input type="checkbox" id="cibleconsciente" {{checked cibleconsciente}} />
<span>Cible consciente</span>
</label>
</div> </div>
{{/if}} {{/if}}
{{!-- Rune --}}
{{#if rune}}
<div class="rune-section">
<div class="form-group">
<label>Rune</label>
<span class="field-value">{{rune.name}}{{#if rune.system.formule}}{{rune.system.formule}}{{/if}}</span>
</div>
<div class="form-group">
<label>Mode de lancement</label>
<select id="runemode" name="runemode">
{{selectOptions config.lancementRuneOptions selected=runemode}}
</select>
</div>
<div class="form-group">
<label>Points d'Âme (Pouvoir)</label>
<select id="runeame" name="runeame">
{{selectOptions config.pointsAmeOptions selected=runeame}}
</select>
</div>
</div>
{{/if}}
{{!-- Section arme --}}
{{#if arme}} {{#if arme}}
<div class="weapon-section">
<div class="weapon-info">
<span class="weapon-label">{{arme.name}}</span>
<span class="weapon-bonus">+{{arme.system.bonusmaniementoff}}</span>
</div>
{{!-- Arme de mêlée --}}
{{#if arme.system.isMelee}} {{#if arme.system.isMelee}}
{{#if bonusArmeNaturelle}} {{#if bonusArmeNaturelle}}
<div class="flexrow"> <div class="form-group">
<span class="roll-dialog-label">Arme naturelle/fortune en défense</span> <label>Arme naturelle/fortune</label>
<span class="small-label roll-dialog-label">{{bonusArmeNaturelle}}</span> <span class="field-value">{{bonusArmeNaturelle}}</span>
</div> </div>
{{/if}} {{/if}}
<div class="flexrow">
<span class="roll-dialog-label">En surplomb, défenseur au sol (+3)?</span> <h4>Modificateurs de Combat</h4>
<div class="modifiers-columns">
<label class="checkbox-label">
<input type="checkbox" id="defenseur-au-sol" {{checked defenseurAuSol}} /> <input type="checkbox" id="defenseur-au-sol" {{checked defenseurAuSol}} />
</div> <span>En surplomb / défenseur au sol (+3)</span>
<div class="flexrow"> </label>
<span class="roll-dialog-label">Attaquants multiples (après le premier) (+3)?</span> <label class="checkbox-label">
<input type="checkbox" id="attaquants-multiple" {{checked attaquantsMultiples}} /> <input type="checkbox" id="attaquants-multiple" {{checked attaquantsMultiples}} />
</div> <span>Attaquants multiples (+3)</span>
</label>
{{#if hasAmbidextre}} {{#if hasAmbidextre}}
<div class="flexrow"> <label class="checkbox-label">
<span class="roll-dialog-label">Première attaque avec deux armes (-3)?</span>
<input type="checkbox" id="ambidextre-1" {{checked attaqueAmbidextre1}} /> <input type="checkbox" id="ambidextre-1" {{checked attaqueAmbidextre1}} />
</div> <span>1ère attaque avec deux armes (-3)</span>
<div class="flexrow"> </label>
<span class="roll-dialog-label">Seconde attaque avec deux armes (-6)?</span> <label class="checkbox-label">
<input type="checkbox" id="ambidextre-2" {{checked attaqueAmbidextre2}} /> <input type="checkbox" id="ambidextre-2" {{checked attaqueAmbidextre2}} />
</div> <span>2ème attaque avec deux armes (-6)</span>
</label>
{{/if}} {{/if}}
{{#if hasFeinte}} {{#if hasFeinte}}
<div class="flexrow"> <label class="checkbox-label">
<span class="roll-dialog-label">Feinte (<strong>cout : 1 BA</strong>) ?</span>
<input type="checkbox" id="feinte" {{checked feinte}} /> <input type="checkbox" id="feinte" {{checked feinte}} />
</div> <span>Feinte <strong>(coût : 1 BA)</strong></span>
</label>
{{/if}} {{/if}}
<div class="flexrow"> <label class="checkbox-label">
<span class="roll-dialog-label">Soutiens </span> <input type="checkbox" id="defenseur-aveugle" {{checked defenseurAveugle}} />
<select class="status-small-label color-class-common" name="soutiens" id="soutiens" data-type="Number"> <span>Défenseur aveuglé (+10)</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="defenseur-de-dos" {{checked defenseurDeDos}} />
<span>Défenseur de dos (+5)</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="defenseur-restreint" {{checked defenseurRestreint}} />
<span>Espace restreint (+3)</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="defenseur-immobilise" {{checked defenseurImmobilise}} />
<span>Défenseur immobilisé (+5)</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="attaque-charge" {{checked attaqueCharge}} />
<span>Charge</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="contenir" {{checked contenir}} />
<span>Contenir</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="attaque-desarme" {{checked attaqueDesarme}} />
<span>Désarmer (SD+10)</span>
</label>
{{#if isMonte}}
<label class="checkbox-label">
<input type="checkbox" id="charge-cavalerie" {{checked chargeCavalerie}} />
<span>Charge de cavalerie</span>
</label>
{{/if}}
</div>
<div class="form-group">
<label>Soutiens</label>
<select id="soutiens" name="soutiens">
{{selectOptions config.optionsSoutiens selected=soutiens valueAttr="key" nameAttr="key" labelAttr="label"}} {{selectOptions config.optionsSoutiens selected=soutiens valueAttr="key" nameAttr="key" labelAttr="label"}}
</select> </select>
</div> </div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur aveuglé (+10)?</span>
<input type="checkbox" id="defenseur-aveugle" {{checked defenseurAveugle}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur de dos (+5)?</span>
<input type="checkbox" id="defenseur-de-dos" {{checked defenseurDeDos}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur dans espace restreint (+3)?</span>
<input type="checkbox" id="defenseur-restreint" {{checked defenseurRestreint}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur immobilisé (+5)?</span>
<input type="checkbox" id="defenseur-immobilise" {{checked defenseurImmobilise}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Charge ?</span>
<input type="checkbox" id="attaque-charge" {{checked attaqueCharge}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Contenir?</span>
<input type="checkbox" id="contenir" {{checked contenir}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Désarmer (SD+10)?</span>
<input type="checkbox" id="attaque-desarme" {{checked attaqueDesarme}} />
</div>
{{#if isMonte}}
<div class="flexrow">
<span class="roll-dialog-label">Charge de cavalerie?</span>
<input type="checkbox" id="charge-cavalerie" {{checked chargeCavalerie}} />
</div>
{{/if}} {{/if}}
{{else}}
<div class="flexrow"> {{!-- Arme à distance --}}
<span class="roll-dialog-label">Tireur en déplacement ?</span> {{#if arme.system.isDistance}}
<select class="item-field-label-long" type="text" id="tireur-deplacement" data-dtype="string"> <div class="ranged-combat-section">
<h4>Modificateurs de Tir</h4>
<div class="modifiers-columns">
<label class="checkbox-label">
<input type="checkbox" id="tireur-cible-deplace" {{checked cibleDeplace}} />
<span>Cible se déplace vite (SD+3)</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="tireur-cible-cac" {{checked cibleCaC}} />
<span>Cible en corps-à-corps (SD+3)</span>
</label>
</div>
<div class="modifiers-grid">
<div class="form-group">
<label>Tireur en déplacement</label>
<select id="tireur-deplacement" name="tireur-deplacement">
{{selectOptions config.optionsTireurDeplacement selected=tireurDeplacement valueAttr="key" nameAttr="key" labelAttr="label"}} {{selectOptions config.optionsTireurDeplacement selected=tireurDeplacement valueAttr="key" nameAttr="key" labelAttr="label"}}
</select> </select>
</div> </div>
<div class="flexrow"> <div class="form-group">
<span class="roll-dialog-label">Couvert de la cible ?</span> <label>Couvert de la cible</label>
<select class="item-field-label-long" type="text" id="cible-couvert" data-dtype="string"> <select id="cible-couvert" name="cible-couvert">
{{selectOptions config.optionsCouvert selected=cibleCouvert valueAttr="key" nameAttr="key" labelAttr="label"}} {{selectOptions config.optionsCouvert selected=cibleCouvert valueAttr="key" nameAttr="key" labelAttr="label"}}
</select> </select>
</div> </div>
<div class="flexrow"> <div class="form-group">
<span class="roll-dialog-label">Cible se déplace vite (SD+3)?</span> <label>Taille de la cible</label>
<input type="checkbox" id="tireur-cible-deplace" {{checked cibleDeplace}} /> <select id="taille-cible" name="taille-cible">
</div>
<div class="flexrow">
<span class="roll-dialog-label">Cible corps à corps (SD+3)?</span>
<input type="checkbox" id="tireur-cible-cac" {{checked cibleCaC}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Taille de la cible ?</span>
<select class="item-field-label-long" type="text" id="taille-cible" data-dtype="string">
{{selectOptions config.optionsTailleCible selected=tailleCible valueAttr="key" nameAttr="key" labelAttr="label"}} {{selectOptions config.optionsTailleCible selected=tailleCible valueAttr="key" nameAttr="key" labelAttr="label"}}
</select> </select>
</div> </div>
{{/if}} <div class="form-group">
<label>SD distance</label>
<select id="distance-tir" name="distance-tir">
{{selectOptions config.optionsDistanceTir selected=distanceTir valueAttr="key" nameAttr="key" labelAttr="label"}}
</select>
</div>
</div>
</div>
{{/if}} {{/if}}
<div class="flexrow"> {{!-- SD de l'adversaire (mêlée) --}}
<span class="roll-dialog-label">Bonus/Malus </span> {{#if (and armeDefense (not arme.system.isDistance))}}
<select class="roll-dialog-label" id="bonus-malus-context" type="text" value="{{bonusMalusContext}}" <div class="defense-info">
data-dtype="Number"> <span class="defense-label">{{#if desengager}}C. Offensive adversaire{{else}}C. Défensive adversaire{{/if}}</span>
<span class="defense-value">{{difficulte}}</span>
</div>
{{/if}}
</div>
{{/if}}
{{!-- Bonus / Malus contextuel et Difficulté --}}
<div class="modifiers-grid">
<div class="form-group">
<label>Bonus / Malus</label>
<select id="bonus-malus-context" name="bonus-malus-context">
{{selectOptions config.optionsBonusMalus selected=bonusMalusContext valueAttr="key" nameAttr="key" labelAttr="label"}} {{selectOptions config.optionsBonusMalus selected=bonusMalusContext valueAttr="key" nameAttr="key" labelAttr="label"}}
</select> </select>
</div> </div>
{{#if (or armeDefense arme.system.isDistance)}} {{#if (not isInit)}}
{{#unless (or armeDefense arme.system.isDistance)}}
{{#if arme.system.isDistance}} <div class="form-group">
<div class="flexrow"> <label>Difficulté</label>
<span class="roll-dialog-label">SD de distance</span> <select id="difficulte" name="difficulte">
<select class="item-field-label-long" type="text" id="distance-tir" data-dtype="string">
{{selectOptions config.optionsDistanceTir selected=distanceTir valueAttr="key" nameAttr="key" labelAttr="label"}}
</select>
</div>
{{else}}
<div class="flexrow">
{{#if desengager}}
<span class="roll-dialog-label">C. Offensive adversaire </span>
{{else}}
<span class="roll-dialog-label">C. Défensive adversaire</span>
{{/if}}
<span class="roll-dialog-label"><strong>{{difficulte}}</strong> </span>
</div>
{{/if}}
{{else}}
{{#if isInit}}
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Difficulté : </span>
<select class="roll-dialog-label" id="difficulte" type="text" name="difficulte" data-dtype="String">
{{selectOptions config.optionsDifficulte selected=difficulte valueAttr="key" nameAttr="key" labelAttr="label"}} {{selectOptions config.optionsDifficulte selected=difficulte valueAttr="key" nameAttr="key" labelAttr="label"}}
</select> </select>
</div> </div>
{{/unless}}
{{/if}} {{/if}}
{{/if}} </div>
</div> </div>
</form>