Fix formule de dés : 2d8 de base (règles Célestopol)

Correction majeure de la mécanique de jet selon les règles :

- Formule : 2d8 + Spécialisation + modificateurs (blessures/aspect/manual)
  (vs. ancienne formule erronée : Nd6 pool variable)
- Dé de la Lune : 1d8 narratif optionnel (résultat 1-8 → Triomphe /
  Brio / Contrecoup / Catastrophe) — pas un bonus numérique
- Destin : disponible uniquement jauge pleine (lvl=8), donne 3d8,
  vide la jauge entière après usage
- system.mjs : MOON_DIE_FACES (tableau 1-8) + MOON_RESULT_TYPES
- roll.mjs : logique complète réécrite (2d8, lune séparée, destin reset)
- character/npc.mjs : prefs.rollMoonDie + destGaugeFull
- roll-dialog.hbs : sans grille lune, checkbox dé lune, destin conditionnel
- chat-message.hbs : résultat dé lune narratif (phase + type + desc),
  dés .d8, suppression moonSymbol/moonBonus header
- roll.less : .form-moon-row, .moon-die-result avec couleurs Triomphe/
  Brio/Contrecoup/Catastrophe
- lang/fr.json : Moon.triomphe/brio/contrecoup/catastrophe + Full descs,
  Roll.rollMoonDie/destGaugeFull/destGaugeEmpty/baseDice

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-29 16:19:04 +02:00
parent ad85ecf4bf
commit 54eacf6afc
8 changed files with 308 additions and 258 deletions

View File

@@ -82,52 +82,53 @@
}
}
// ── Phases de lune : grille 3 colonnes ──
.moon-section {
display: flex;
flex-direction: column;
gap: 5px;
margin-bottom: 12px;
// ── Ligne Dé de la Lune ──
.form-moon-row {
border: 1px solid rgba(122,92,32,0.35);
border-radius: 4px;
background: rgba(255,255,255,0.3);
padding: 7px 10px;
.moon-section-label {
font-size: 0.72em;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--cel-orange, #e07b00);
border-bottom: 1px solid rgba(122,92,32,0.3);
padding-bottom: 3px;
}
.moon-toggle {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
.moon-phases {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 4px;
.moon-option {
display: flex;
flex-direction: column;
align-items: center;
input[type="checkbox"] {
width: 16px;
height: 16px;
flex-shrink: 0;
appearance: none;
-webkit-appearance: none;
border: 2px solid var(--cel-border, #7a5c20);
border-radius: 2px;
background: white;
cursor: pointer;
padding: 5px 4px;
border-radius: 4px;
border: 1px solid rgba(122,92,32,0.25);
transition: all 0.15s;
background: rgba(255,255,255,0.4);
position: relative;
&:hover {
background: rgba(196,154,26,0.12);
border-color: var(--cel-border, #7a5c20);
&:checked {
background: var(--cel-orange, #e07b00);
border-color: var(--cel-orange, #e07b00);
&::after {
content: "✦";
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.65em;
color: white;
}
}
}
&.active {
background: linear-gradient(160deg, #f5ecd4, #e8d8a0);
border: 2px solid var(--cel-orange, #e07b00);
box-shadow: inset 0 0 6px rgba(196,154,26,0.3);
}
.moon-icon { font-size: 1.2em; flex-shrink: 0; }
.moon-symbol { font-size: 1.5em; line-height: 1; }
.moon-name { font-size: 0.58em; text-align: center; margin-top: 2px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.moon-bonus { font-size: 0.68em; color: var(--cel-orange, #e07b00); font-weight: bold; margin-top: 1px; }
.moon-text {
font-family: var(--cel-font-title, "CopaseticNF", serif);
font-size: 0.88em;
color: var(--cel-green, #0c4c0c);
}
}
}
@@ -361,14 +362,7 @@
.wound-info { font-size: 0.7em; color: #f0a0a0; }
}
.moon-badge {
display: flex;
flex-direction: column;
align-items: center;
gap: 1px;
.moon-sym { font-size: 1.35em; line-height: 1; }
.moon-bon { font-size: 0.72em; color: var(--cel-orange-light, #ddb84a); font-weight: bold; }
}
.moon-badge { display: none; }
}
// ── Zone dés ──
@@ -432,7 +426,6 @@
font-weight: bold;
line-height: 1;
}
.fl-moon { color: #666; }
.fl-mod { color: #444; font-weight: bold; }
.fl-asp { color: var(--cel-orange, #e07b00); font-weight: bold; }
.fl-sep { font-weight: bold; color: var(--cel-border, #7a5c20); margin: 0 2px; }
@@ -492,6 +485,69 @@
.used-destin { font-weight: bold; }
}
// ── Résultat dé de lune ──
.moon-die-result {
display: flex;
align-items: center;
gap: 10px;
padding: 6px 12px;
border-top: 1px solid rgba(122,92,32,0.2);
font-family: var(--cel-font-body, serif);
.moon-die-face {
font-size: 1.8em;
line-height: 1;
flex-shrink: 0;
}
.moon-die-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 1px;
}
.moon-die-phase {
font-size: 0.72em;
opacity: 0.75;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.moon-die-type {
font-family: var(--cel-font-title, "CopaseticNF", serif);
font-size: 1em;
font-weight: bold;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.moon-die-desc {
font-size: 0.72em;
font-style: italic;
opacity: 0.85;
line-height: 1.3;
}
// Couleurs par type de résultat
&.moon-triomphe {
background: linear-gradient(90deg, rgba(12,76,12,0.12), rgba(12,76,12,0.05));
.moon-die-type { color: var(--cel-green, #0c4c0c); }
}
&.moon-brio {
background: linear-gradient(90deg, rgba(196,154,26,0.12), rgba(196,154,26,0.04));
.moon-die-type { color: var(--cel-border, #7a5c20); }
}
&.moon-contrecoup {
background: linear-gradient(90deg, rgba(120,80,0,0.1), rgba(120,80,0,0.03));
.moon-die-type { color: #7a4a00; }
}
&.moon-catastrophe {
background: linear-gradient(90deg, rgba(107,30,40,0.15), rgba(107,30,40,0.05));
.moon-die-type { color: #6b1e28; }
}
}
// ── Bandeau résultat ──
.roll-result-banner {
display: flex;