2 Commits

Author SHA1 Message Date
6883cc1020 Ajout entrainements
Some checks failed
Release Creation / build (release) Failing after 51s
2026-04-19 19:06:47 +02:00
1d6e6dd44e Corrections sur les clés de label manquantes
Some checks failed
Release Creation / build (release) Failing after 54s
2026-04-16 21:53:26 +02:00
51 changed files with 553 additions and 354 deletions

View File

@@ -9,6 +9,7 @@
"TYPES.Item.armure": "Armure",
"TYPES.Item.equipement": "Equipement",
"TYPES.Item.consommable": "Consommable",
"TYPES.Item.entrainement": "Entrainement",
"DNC.Roll.Characteristic": "Jet de caracteristique",
"DNC.Roll.Attack": "Jet d'attaque",
"DNC.Roll.Damage": "Jet de degats",
@@ -23,6 +24,84 @@
"DNC.Chat.SelectTarget": "Choisissez une cible presente sur la scene.",
"DNC.Chat.TargetUnavailable": "La cible selectionnee n'est plus disponible.",
"DNC.Chat.InvalidDamageTarget": "Impossible d'appliquer les degats a cette cible.",
"DNC.Chat.Kicker.Resolution": "Resolution",
"DNC.Chat.Kicker.Magic": "Magie",
"DNC.Chat.Kicker.Wear": "Usure",
"DNC.Chat.Kicker.Network": "Reseau",
"DNC.Chat.Kicker.Initiative": "Ordre de marche",
"DNC.Chat.Success": "Reussite",
"DNC.Chat.Failure": "Echec",
"DNC.Chat.Favor": "Faveur",
"DNC.Chat.Target": "Cible",
"DNC.Chat.Kept": "Garde",
"DNC.Chat.Rolls": "Lancers",
"DNC.Chat.RollDamage": "Lancer les degats",
"DNC.Chat.RollValue": "Jet",
"DNC.Chat.AutoDisadvantage": "Desavantage automatique",
"DNC.Chat.RiskChaos": "Risquer le Chaos",
"DNC.Chat.Result": "Resultat",
"DNC.Chat.Before": "Avant",
"DNC.Chat.After": "Apres",
"DNC.Chat.Total": "Total",
"DNC.Chat.Bonus": "Bonus",
"DNC.Chat.CombatSynced": "Combat synchronise",
"DNC.Chat.TargetValue": "Valeur cible",
"DNC.Chat.FavorDie": "De de faveur",
"DNC.Chat.CharacteristicValue": "Valeur de la caracteristique",
"DNC.Chat.HpCost": "Cout en PV",
"DNC.Chat.FocusSpent": "Focus depense",
"DNC.Chat.FocusRemaining": "Focus restant",
"DNC.Chat.HpSpent": "PV depenses",
"DNC.Chat.HpRemaining": "PV restants",
"DNC.Chat.CasterRank": "Rang du lanceur",
"DNC.Chat.Difficulty": "Difficulte",
"DNC.Chat.Effect": "Effet",
"DNC.Chat.StoredProtection": "Protection stockee pour ce combat",
"DNC.Chat.ResourceWearsDown": "La ressource s'amenuise.",
"DNC.Chat.ResourceStable": "La ressource tient bon.",
"DNC.Chat.ResourceExhausted": "La ressource est epuisee.",
"DNC.Chat.AutoDisadvantageCanceled": "le cout du sort depasse le rang du lanceur, mais une faveur l'a annule.",
"DNC.Chat.AutoDisadvantageApplies": "le cout du sort depasse le rang du lanceur.",
"DNC.Chat.FocusFrom": "depuis",
"DNC.Chat.FocusUsed": "utilise",
"DNC.Chat.FocusLeft": "restant",
"DNC.Chat.FocusDropsTo": "le focus descend a",
"DNC.Chat.FirstSpellScene": "premier sort de la scene",
"DNC.Chat.FocusNoBenefit": "aucun apport pour cette scene.",
"DNC.Chat.ChaosSubtitle": "La magie opere malgre l'echec ; le MJ determine les consequences.",
"DNC.Chat.SpellMaintained": "Sort maintenu",
"DNC.Chat.ChaosDieDrops": "Le de du Chaos descend d'un cran.",
"DNC.Chat.ChaosDieExhausted": "Le de du Chaos est trop faible pour etre reutilise dans le Donjon.",
"DNC.UI.Mode": "Mode",
"DNC.UI.ModeNormal": "Normal",
"DNC.UI.ModeAdvantage": "Avantage",
"DNC.UI.ModeDisadvantage": "Desavantage",
"DNC.UI.FavorBoost": "Coup de pouce",
"DNC.UI.NoFavor": "Aucune faveur",
"DNC.UI.RollAction": "Lancer",
"DNC.UI.AttackAction": "Attaquer",
"DNC.UI.UseAction": "Utiliser",
"DNC.UI.Characteristic": "Caracteristique",
"DNC.UI.Cost": "Cout",
"DNC.UI.CurrentHp": "PV actuels",
"DNC.UI.Rank": "Rang",
"DNC.UI.Focus": "Focus",
"DNC.UI.Chaos": "Chaos",
"DNC.UI.Weapon": "Arme",
"DNC.UI.Damage": "Degats",
"DNC.UI.Range": "Portee",
"DNC.UI.Spell": "Sortilege",
"DNC.Dialog.InitiativeIntro": "<strong>{actorName}</strong> lance l'initiative.",
"DNC.Dialog.InitiativeCurrent": "DEX actuelle : <strong>{dex}</strong>, bonus de fiche : <strong>{initiativeBonus}</strong>",
"DNC.Dialog.CharacteristicUsed": "Caracteristique utilisee",
"DNC.Dialog.ActorDamageBonus": "Bonus de degats de l'acteur",
"DNC.Dialog.SpellAutoDisadvantage": "Le cout depasse le rang du lanceur : le jet se fera automatiquement avec desavantage.",
"DNC.Dialog.UseUsageDie": "Utiliser <strong>{itemName}</strong> et lancer son de d'usage actuel.",
"DNC.Dialog.CurrentValue": "Valeur actuelle",
"DNC.Warn.NoFavorAvailable": "Aucune faveur disponible pour {label}.",
"DNC.Warn.SpellInsufficientResources": "Le lanceur ne dispose pas d'assez de PV et de focus pour payer ce sort.",
"DNC.Warn.ChaosUnavailable": "Le Chaos n'est pas disponible pour ce sort.",
"DNC.Warn.TrainingExhausted": "Cet entrainement est epuise pour aujourd'hui. Reinitialisez son delta quotidien pour le lendemain.",
"DNC.Sheet.Create": "Creer",
"DNC.Sheet.Delete": "Supprimer",
"DNC.Sheet.Edit": "Editer",

View File

@@ -1,44 +1,44 @@
.characteristic-list {
.dnc-actor-sheet .characteristic-list {
display: flex;
flex-direction: column;
gap: @spacing-sm;
}
.characteristic-row {
.dnc-actor-sheet .characteristic-row {
display: grid;
grid-template-columns: 2rem 1fr 4rem;
gap: @spacing-sm;
align-items: center;
}
.characteristic-label {
.dnc-actor-sheet .characteristic-label {
font-weight: 700;
}
.profile-counters {
.dnc-actor-sheet .profile-counters {
display: grid;
grid-template-columns: 1fr;
gap: @spacing-md;
}
.profile-card-wide {
.dnc-actor-sheet .profile-card-wide {
width: 100%;
}
.profile-layout {
.dnc-actor-sheet .profile-layout {
display: grid;
grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
gap: @spacing-lg;
align-items: start;
}
.profile-column {
.dnc-actor-sheet .profile-column {
display: flex;
flex-direction: column;
gap: @spacing-md;
}
.favor-card {
.dnc-actor-sheet .favor-card {
margin: @spacing-md 0;
padding: @spacing-md;
border: 1px dashed fade(@color-border, 55%);
@@ -46,29 +46,29 @@
background: fade(@color-panel-strong, 35%);
}
.favor-header h2 {
.dnc-actor-sheet .favor-header h2 {
margin-bottom: @spacing-sm;
}
.favor-help {
.dnc-actor-sheet .favor-help {
margin: 0 0 @spacing-md;
color: @color-muted;
font-size: 0.82rem;
}
.favor-list {
.dnc-actor-sheet .favor-list {
display: grid;
gap: @spacing-sm;
}
.favor-row {
.dnc-actor-sheet .favor-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 4.5rem auto;
gap: @spacing-sm;
align-items: end;
}
.favor-meta {
.dnc-actor-sheet .favor-meta {
min-height: 2.3rem;
display: flex;
align-items: center;
@@ -79,59 +79,59 @@
font-weight: 700;
}
.magic-layout {
.dnc-actor-sheet .magic-layout {
align-items: start;
margin-bottom: @spacing-md;
}
.magic-layout .sheet-column {
.dnc-actor-sheet .magic-layout .sheet-column {
display: flex;
flex-direction: column;
gap: @spacing-md;
}
.magic-resource-grid {
.dnc-actor-sheet .magic-resource-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
gap: @spacing-md;
align-items: end;
}
.chaos-table-wrapper {
.dnc-actor-sheet .chaos-table-wrapper {
margin-top: @spacing-md;
}
.chaos-table-wrapper h3 {
.dnc-actor-sheet .chaos-table-wrapper h3 {
margin: 0 0 @spacing-sm;
font-size: 0.95rem;
}
.chaos-table-caption {
.dnc-actor-sheet .chaos-table-caption {
margin: 0 0 @spacing-sm;
color: @color-muted;
font-size: 0.78rem;
font-style: italic;
}
.chaos-table {
.dnc-actor-sheet .chaos-table {
width: 100%;
border-collapse: collapse;
font-size: 0.8rem;
}
.chaos-table th,
.chaos-table td {
.dnc-actor-sheet .chaos-table th,
.dnc-actor-sheet .chaos-table td {
padding: 0.4rem 0.45rem;
border: 1px solid fade(@color-border, 35%);
vertical-align: top;
}
.chaos-table th {
.dnc-actor-sheet .chaos-table th {
text-align: left;
background: fade(@color-panel-strong, 55%);
}
.sheet-tabs {
.dnc-actor-sheet .sheet-tabs {
display: flex;
flex-wrap: wrap;
gap: @spacing-sm;
@@ -139,7 +139,7 @@
justify-content: center;
}
.sheet-tab {
.dnc-actor-sheet .sheet-tab {
border: 1px solid fade(@color-border, 80%);
border-radius: @radius-md;
background: fade(@color-panel-strong, 55%);
@@ -148,32 +148,32 @@
padding: @spacing-sm @spacing-md;
}
.sheet-tab.active {
.dnc-actor-sheet .sheet-tab.active {
background: @color-accent;
border-color: darken(@color-accent, 12%);
color: #fff;
}
.sheet-tab-panel {
.dnc-actor-sheet .sheet-tab-panel {
display: none;
}
.sheet-tab-panel.active {
.dnc-actor-sheet .sheet-tab-panel.active {
display: block;
}
.item-list {
.dnc-actor-sheet .item-list {
display: flex;
flex-direction: column;
gap: @spacing-md;
}
.item-section.is-dragover {
.dnc-actor-sheet .item-section.is-dragover {
border-color: @color-accent;
box-shadow: 0 0 0 2px fade(@color-accent, 20%);
}
.item-dropzone {
.dnc-actor-sheet .item-dropzone {
border: 1px dashed fade(@color-border, 75%);
border-radius: @radius-md;
padding: @spacing-md;
@@ -188,18 +188,18 @@
font-weight: 600;
}
.item-dropzone.has-items {
.dnc-actor-sheet .item-dropzone.has-items {
padding: @spacing-sm @spacing-md;
font-size: 0.8rem;
}
.item-section.is-dragover .item-dropzone {
.dnc-actor-sheet .item-section.is-dragover .item-dropzone {
border-color: @color-accent;
background: fade(@color-accent, 12%);
color: @color-ink;
}
.item {
.dnc-actor-sheet .item {
display: grid;
grid-template-columns: 48px 1fr auto;
gap: @spacing-md;
@@ -208,12 +208,12 @@
padding-top: @spacing-md;
}
.item:first-child {
.dnc-actor-sheet .item:first-child {
border-top: 0;
padding-top: 0;
}
.item img {
.dnc-actor-sheet .item img {
width: 48px;
height: 48px;
object-fit: cover;
@@ -222,19 +222,19 @@
background: #fff;
}
.item-main p {
.dnc-actor-sheet .item-main p {
margin: @spacing-sm 0 0;
color: @color-muted;
}
.item-title-row {
.dnc-actor-sheet .item-title-row {
display: flex;
flex-wrap: wrap;
gap: @spacing-sm;
align-items: center;
}
.item-meta {
.dnc-actor-sheet .item-meta {
border-radius: 999px;
background: @color-panel-strong;
color: @color-ink;
@@ -242,26 +242,26 @@
padding: 0.1rem 0.5rem;
}
.item-actions {
.dnc-actor-sheet .item-actions {
display: flex;
flex-wrap: wrap;
gap: @spacing-sm;
justify-content: flex-end;
}
.pnj-layout .sheet-column {
.dnc-pnj-sheet .pnj-layout .sheet-column {
display: flex;
flex-direction: column;
gap: @spacing-md;
}
.pnj-combat-grid {
.dnc-pnj-sheet .pnj-combat-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: @spacing-md;
align-items: end;
}
.pnj-combat-grid .span-two {
.dnc-pnj-sheet .pnj-combat-grid .span-two {
grid-column: 1 / -1;
}

View File

@@ -60,7 +60,7 @@
padding: @spacing-lg;
}
.sheet-card {
.dnc-sheet .sheet-card {
border: 2px solid @color-border;
border-radius: @radius-md;
background: rgba(255, 248, 236, 0.92);
@@ -78,23 +78,23 @@
letter-spacing: 0.04em;
}
.sheet-header {
.dnc-sheet .sheet-header {
display: grid;
grid-template-columns: 140px 1fr;
gap: @spacing-lg;
align-items: start;
}
.sheet-header.compact {
.dnc-sheet .sheet-header.compact {
grid-template-columns: 110px 1fr;
gap: @spacing-md;
}
.portrait {
.dnc-sheet .portrait {
position: relative;
}
.portrait img {
.dnc-sheet .portrait img {
width: 100%;
aspect-ratio: 1;
object-fit: cover;
@@ -103,7 +103,7 @@
background: #fff;
}
.icon-button {
.dnc-sheet .icon-button {
position: absolute;
right: @spacing-sm;
bottom: @spacing-sm;
@@ -115,14 +115,14 @@
height: 2rem;
}
.identity-grid,
.identity-grid.two-columns {
.dnc-sheet .identity-grid,
.dnc-sheet .identity-grid.two-columns {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: @spacing-md;
}
.identity-grid.two-columns {
.dnc-sheet .identity-grid.two-columns {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@@ -175,20 +175,20 @@
color: @color-muted;
}
.readonly-field {
.dnc-sheet .readonly-field {
display: flex;
flex-direction: column;
gap: @spacing-sm;
}
.readonly-field > span {
.dnc-sheet .readonly-field > span {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.04em;
color: @color-muted;
}
.readonly-field p {
.dnc-sheet .readonly-field p {
margin: 0;
border: 1px solid rgba(91, 70, 52, 0.55);
border-radius: 6px;
@@ -215,18 +215,18 @@
min-height: 4.5rem;
}
.sheet-columns {
.dnc-sheet .sheet-columns {
display: grid;
grid-template-columns: minmax(250px, 320px) 1fr;
gap: @spacing-lg;
}
.sheet-sections {
.dnc-sheet .sheet-sections {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: @spacing-lg;
}
.compact-sections {
.dnc-sheet .compact-sections {
grid-template-columns: 1fr;
}

View File

@@ -1,14 +1,14 @@
.counter-field {
.dnc-sheet .counter-field {
display: flex;
align-items: center;
gap: @spacing-sm;
}
.counter-field button,
.item-actions button,
.sheet-footer button,
.text-button,
.roll-button {
.dnc-sheet .counter-field button,
.dnc-sheet .item-actions button,
.dnc-sheet .sheet-footer button,
.dnc-sheet .text-button,
.dnc-sheet .roll-button {
border: 1px solid @color-border;
border-radius: @radius-sm;
background: linear-gradient(180deg, #fdf9f2 0%, #e8d5ba 100%);
@@ -17,20 +17,20 @@
padding: 0.35rem 0.65rem;
}
.text-button {
.dnc-sheet .text-button {
white-space: nowrap;
}
.roll-button {
.dnc-sheet .roll-button {
width: 2rem;
padding: 0;
}
.with-controls {
.dnc-sheet .with-controls {
gap: @spacing-sm;
}
.section-header {
.dnc-sheet .section-header {
display: flex;
justify-content: space-between;
align-items: center;
@@ -38,12 +38,12 @@
margin-bottom: @spacing-md;
}
.empty-state {
.dnc-sheet .empty-state {
margin: 0;
color: @color-muted;
font-style: italic;
}
.span-two {
.dnc-sheet .span-two {
grid-column: span 2;
}

View File

@@ -26,7 +26,7 @@
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sheet-footer {
.dnc-item-sheet .sheet-footer {
display: flex;
gap: @spacing-md;
justify-content: flex-end;

View File

@@ -32,7 +32,7 @@ export class DonjonEtCieRollDialog {
buttons: [
{
action: "roll",
label: "Lancer",
label: game.i18n.localize("DNC.UI.RollAction"),
icon: "fa-solid fa-bolt",
default: true,
callback: async (event, button) => {
@@ -70,7 +70,7 @@ export class DonjonEtCieRollDialog {
buttons: [
{
action: "roll",
label: "Lancer",
label: game.i18n.localize("DNC.UI.RollAction"),
icon: "fa-solid fa-dice-d20",
default: true,
callback: async (event, button) => {
@@ -107,7 +107,7 @@ export class DonjonEtCieRollDialog {
buttons: [
{
action: "roll",
label: "Attaquer",
label: game.i18n.localize("DNC.UI.AttackAction"),
icon: "fa-solid fa-sword",
default: true,
callback: async (event, button) => {
@@ -153,7 +153,7 @@ export class DonjonEtCieRollDialog {
buttons: [
{
action: "roll",
label: "Lancer",
label: game.i18n.localize("DNC.UI.RollAction"),
icon: "fa-solid fa-wand-magic-sparkles",
default: true,
callback: async (event, button) => {
@@ -185,7 +185,7 @@ export class DonjonEtCieRollDialog {
buttons: [
{
action: "roll",
label: "Utiliser",
label: game.i18n.localize("DNC.UI.UseAction"),
icon: "fa-solid fa-hourglass-half",
default: true,
callback: async (event, button) => {
@@ -218,7 +218,7 @@ export class DonjonEtCieRollDialog {
buttons: [
{
action: "roll",
label: "Lancer",
label: game.i18n.localize("DNC.UI.RollAction"),
icon: "fa-solid fa-burst",
default: true,
callback: async (event, button) => {

View File

@@ -37,6 +37,7 @@ export default class DonjonEtCieActorSheet extends HandlebarsApplicationMixin(fo
rollDamage: DonjonEtCieActorSheet.#onRollDamage,
rollSpell: DonjonEtCieActorSheet.#onRollSpell,
rollUsage: DonjonEtCieActorSheet.#onRollUsage,
resetUsage: DonjonEtCieActorSheet.#onResetUsage,
useFavorService: DonjonEtCieActorSheet.#onUseFavorService,
postItem: DonjonEtCieActorSheet.#onPostItem,
adjustCounter: DonjonEtCieActorSheet.#onAdjustCounter
@@ -216,6 +217,11 @@ export default class DonjonEtCieActorSheet extends HandlebarsApplicationMixin(fo
return this.document.rollUsage(target.closest("[data-item-id]")?.dataset.itemId);
}
static async #onResetUsage(event, target) {
event.preventDefault();
return this.document.resetUsage(target.closest("[data-item-id]")?.dataset.itemId);
}
static async #onUseFavorService(event, target) {
event.preventDefault();
return this.document.useFavorService(target.dataset.department);

View File

@@ -29,7 +29,8 @@ export default class DonjonEtCieItemSheet extends HandlebarsApplicationMixin(fou
editImage: DonjonEtCieItemSheet.#onEditImage,
postItem: DonjonEtCieItemSheet.#onPostItem,
rollItem: DonjonEtCieItemSheet.#onRollItem,
rollDamageItem: DonjonEtCieItemSheet.#onRollDamageItem
rollDamageItem: DonjonEtCieItemSheet.#onRollDamageItem,
resetUsageItem: DonjonEtCieItemSheet.#onResetUsageItem
}
};
@@ -49,12 +50,14 @@ export default class DonjonEtCieItemSheet extends HandlebarsApplicationMixin(fou
isWeapon: item.type === "arme",
isArmor: item.type === "armure",
isConsumable: item.type === "consommable",
isTraining: item.type === "entrainement",
isSpell: item.type === "sortilege",
canRollDamage: Boolean(item.system.degats),
isEquipment: item.type === "equipement",
isCapacity: item.type === "capacite",
isLanguage: item.type === "langue",
isTrait: item.type === "trait",
canResetUsage: item.type === "entrainement" && Number(item.system.deltaMax ?? 0) > 0 && Number(item.system.delta ?? 0) !== Number(item.system.deltaMax ?? 0),
armorProtectionDisplay: Number(item.system.resultatProtection ?? 0) > 0 ? item.system.resultatProtection : "—",
weaponCharacteristicLabel: item.type === "arme" ? DonjonEtCieUtility.getWeaponCharacteristicLabel(item.system.categorie) : null,
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(item.system.description ?? "", { async: true }),
@@ -119,4 +122,9 @@ export default class DonjonEtCieItemSheet extends HandlebarsApplicationMixin(fou
event.preventDefault();
return this.document.rollDamage();
}
static async #onResetUsageItem(event) {
event.preventDefault();
return this.document.resetUsageDie();
}
}

View File

@@ -43,7 +43,7 @@ export default class DonjonEtCieEmployeSheet extends DonjonEtCieActorSheet {
combatSections: ["armes", "armures", "consommables", "equipements"].map(getSection),
spellSection: getSection("sortileges"),
capacitySection: getSection("capacites"),
profileSections: ["langues"].map(getSection)
profileSections: ["langues", "entrainements"].map(getSection)
};
}
}

View File

@@ -158,6 +158,11 @@ export class DonjonEtCieActor extends Actor {
if (item) return DonjonEtCieRollDialog.createUsage(item);
}
async resetUsage(itemId) {
const item = this.items.get(itemId);
if (item?.type === "entrainement") return item.resetUsageDie();
}
#createPnjResourceProxy({ label, deltaPath, protectionPath = null }) {
const delta = Number(foundry.utils.getProperty(this, deltaPath) ?? 0);
const protection = protectionPath ? Number(foundry.utils.getProperty(this, protectionPath) ?? 0) : 0;

View File

@@ -114,7 +114,8 @@ export const DONJON_ET_CIE = {
armes: { label: "Armes", createType: "arme" },
armures: { label: "Armures", createType: "armure" },
equipements: { label: "Equipements", createType: "equipement" },
consommables: { label: "Consommables", createType: "consommable" }
consommables: { label: "Consommables", createType: "consommable" },
entrainements: { label: "Entrainements", createType: "entrainement" }
},
sectionTypes: {
traits: ["trait"],
@@ -124,6 +125,7 @@ export const DONJON_ET_CIE = {
armes: ["arme"],
armures: ["armure"],
equipements: ["equipement"],
consommables: ["consommable"]
consommables: ["consommable"],
entrainements: ["entrainement"]
}
};

View File

@@ -27,10 +27,18 @@ export class DonjonEtCieItem extends Item {
return Number(this.system.delta ?? 0);
}
get usageDieMax() {
return Number(this.system.deltaMax ?? this.system.delta ?? 0);
}
async roll() {
if (this.type === "arme") return DonjonEtCieRollDialog.createWeapon(this.actor, this);
if (this.type === "sortilege") return DonjonEtCieRollDialog.createSpell(this.actor, this);
if (this.usageDie) return DonjonEtCieRollDialog.createUsage(this);
if (this.type === "entrainement" && this.usageDieMax > 0) {
ui.notifications.warn(game.i18n.localize("DNC.Warn.TrainingExhausted"));
return null;
}
return this.postToChat();
}
@@ -54,4 +62,11 @@ export class DonjonEtCieItem extends Item {
content
});
}
async resetUsageDie() {
if (this.type !== "entrainement") return this;
const deltaMax = this.usageDieMax;
if (!deltaMax) return this;
return this.update({ "system.delta": deltaMax });
}
}

View File

@@ -97,7 +97,8 @@ Hooks.once("init", async () => {
arme: models.ArmeDataModel,
armure: models.ArmureDataModel,
equipement: models.EquipementDataModel,
consommable: models.ConsommableDataModel
consommable: models.ConsommableDataModel,
entrainement: models.EntrainementDataModel
};
game.system.donjonEtCie = {
@@ -114,7 +115,7 @@ Hooks.once("init", async () => {
foundry.documents.collections.Actors.registerSheet("fvtt-donjon-et-cie", sheets.DonjonEtCiePNJSheet, { types: ["pnj"], makeDefault: true });
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
for (const type of ["trait", "langue", "capacite", "sortilege", "arme", "armure", "equipement", "consommable"]) {
for (const type of ["trait", "langue", "capacite", "sortilege", "arme", "armure", "equipement", "consommable", "entrainement"]) {
foundry.documents.collections.Items.registerSheet("fvtt-donjon-et-cie", sheets.DonjonEtCieItemSheet, { types: [type], makeDefault: true });
}
});

View File

@@ -35,8 +35,9 @@ export class DonjonEtCieRolls {
}
static #getModeLabel(mode) {
if (mode === "avantage") return "Avantage";
if (mode === "desavantage") return "Desavantage";
if (mode === "avantage") return game.i18n.localize("DNC.UI.ModeAdvantage");
if (mode === "desavantage") return game.i18n.localize("DNC.UI.ModeDisadvantage");
if (mode === "normal") return game.i18n.localize("DNC.UI.ModeNormal");
return null;
}
@@ -77,7 +78,7 @@ export class DonjonEtCieRolls {
const path = `system.faveurs.${favorKey}.delta`;
const before = Number(foundry.utils.getProperty(actor, path) ?? 0);
if (!before) {
ui.notifications.warn(`Aucune faveur disponible pour ${label}.`);
ui.notifications.warn(game.i18n.format("DNC.Warn.NoFavorAvailable", { label }));
return null;
}
@@ -113,7 +114,7 @@ export class DonjonEtCieRolls {
const path = `system.faveurs.${favorKey}.delta`;
const before = Number(foundry.utils.getProperty(actor, path) ?? 0);
if (!before) {
ui.notifications.warn(`Aucune faveur disponible pour ${label}.`);
ui.notifications.warn(game.i18n.format("DNC.Warn.NoFavorAvailable", { label }));
return null;
}
@@ -182,29 +183,29 @@ export class DonjonEtCieRolls {
if (!result) return null;
await this.#createChatCard(actor, "systems/fvtt-donjon-et-cie/templates/chat/roll-card.hbs", {
title: label ?? "Jet de caracteristique",
title: label ?? game.i18n.localize("DNC.Roll.Characteristic"),
subtitle: result.characteristic.label,
formula: result.values.length > 1 ? "2d20" : "1d20",
mode: effectiveMode,
modeLabel: this.#getModeLabel(effectiveMode),
target: result.target,
targetPillLabel: "Cible",
targetPillLabel: game.i18n.localize("DNC.Chat.Target"),
targetPillValue: result.target,
values: result.values,
kept: result.kept,
keptPillLabel: "Garde",
keptPillLabel: game.i18n.localize("DNC.Chat.Kept"),
keptPillValue: result.kept,
success: result.success,
favorLabel: favor?.label ?? null,
favorNote: favor?.note ?? null,
details: [
{ label: "Caracteristique", value: result.characteristic.label },
{ label: "Valeur cible", value: result.target },
{ label: game.i18n.localize("DNC.UI.Characteristic"), value: result.characteristic.label },
{ label: game.i18n.localize("DNC.Chat.TargetValue"), value: result.target },
...(favor ? [
{ label: "Faveur", value: favor.label },
{ label: "Dé de faveur", value: favor.result },
{ label: "Avant", value: DonjonEtCieUtility.formatUsageDie(favor.before) },
{ label: "Apres", value: DonjonEtCieUtility.formatUsageDie(favor.after) }
{ label: game.i18n.localize("DNC.Chat.Favor"), value: favor.label },
{ label: game.i18n.localize("DNC.Chat.FavorDie"), value: favor.result },
{ label: game.i18n.localize("DNC.Chat.Before"), value: DonjonEtCieUtility.formatUsageDie(favor.before) },
{ label: game.i18n.localize("DNC.Chat.After"), value: DonjonEtCieUtility.formatUsageDie(favor.after) }
] : [])
]
});
@@ -297,7 +298,7 @@ export class DonjonEtCieRolls {
targetPillValue: result.target,
values: result.values,
kept: result.kept,
keptPillLabel: "Jet",
keptPillLabel: game.i18n.localize("DNC.Chat.RollValue"),
keptPillValue: result.kept,
success: result.success,
favorLabel: favor?.label ?? null,
@@ -305,16 +306,16 @@ export class DonjonEtCieRolls {
showDamageButton: result.success && Boolean(item.system.degats),
itemUuid: item.uuid,
details: [
{ label: "Arme", value: item.name },
{ label: "Caracteristique", value: characteristicLabel },
{ label: game.i18n.localize("DNC.UI.Weapon"), value: item.name },
{ label: game.i18n.localize("DNC.UI.Characteristic"), value: characteristicLabel },
{ label: `Valeur de ${characteristicLabel}`, value: result.target },
{ label: "Degats", value: item.system.degats || "—" },
{ label: "Portee", value: item.system.portee || "—" },
{ label: game.i18n.localize("DNC.UI.Damage"), value: item.system.degats || "—" },
{ label: game.i18n.localize("DNC.UI.Range"), value: item.system.portee || "—" },
...(favor ? [
{ label: "Faveur", value: favor.label },
{ label: "Dé de faveur", value: favor.result },
{ label: "Avant", value: DonjonEtCieUtility.formatUsageDie(favor.before) },
{ label: "Apres", value: DonjonEtCieUtility.formatUsageDie(favor.after) }
{ label: game.i18n.localize("DNC.Chat.Favor"), value: favor.label },
{ label: game.i18n.localize("DNC.Chat.FavorDie"), value: favor.result },
{ label: game.i18n.localize("DNC.Chat.Before"), value: DonjonEtCieUtility.formatUsageDie(favor.before) },
{ label: game.i18n.localize("DNC.Chat.After"), value: DonjonEtCieUtility.formatUsageDie(favor.after) }
] : [])
]
});
@@ -402,7 +403,7 @@ export class DonjonEtCieRolls {
const availableMagicHp = currentPv + focus.activeValue;
if (cost > availableMagicHp) {
ui.notifications.warn("Le lanceur ne dispose pas d'assez de PV et de focus pour payer ce sort.");
ui.notifications.warn(game.i18n.localize("DNC.Warn.SpellInsufficientResources"));
return null;
}
@@ -445,7 +446,7 @@ export class DonjonEtCieRolls {
targetPillValue: result.target,
values: result.values,
kept: result.kept,
keptPillLabel: "Jet",
keptPillLabel: game.i18n.localize("DNC.Chat.RollValue"),
keptPillValue: result.kept,
success,
specialNote,
@@ -454,23 +455,23 @@ export class DonjonEtCieRolls {
itemUuid: item.uuid,
actorUuid: actor.uuid,
details: [
{ label: "Sortilege", value: item.name },
{ label: "Caracteristique", value: result.characteristic.label },
{ label: "Valeur de la caracteristique", value: result.target },
{ label: "Cout en PV", value: cost },
{ label: "Focus", value: focus.activeValue > 0 ? `${focus.activeValue} (${DonjonEtCieUtility.formatUsageDie(focus.before)})` : "—" },
{ label: "Focus depense", value: focusSpent },
{ label: "Focus restant", value: focusRemaining },
{ label: "PV depenses", value: spentPv },
{ label: "PV restants", value: remainingPv },
{ label: "Rang du lanceur", value: rank },
{ label: "Difficulte", value: item.system.difficulte ?? 0 },
{ label: "Effet", value: item.system.effet || "—" },
{ label: game.i18n.localize("DNC.UI.Spell"), value: item.name },
{ label: game.i18n.localize("DNC.UI.Characteristic"), value: result.characteristic.label },
{ label: game.i18n.localize("DNC.Chat.CharacteristicValue"), value: result.target },
{ label: game.i18n.localize("DNC.Chat.HpCost"), value: cost },
{ label: game.i18n.localize("DNC.UI.Focus"), value: focus.activeValue > 0 ? `${focus.activeValue} (${DonjonEtCieUtility.formatUsageDie(focus.before)})` : "—" },
{ label: game.i18n.localize("DNC.Chat.FocusSpent"), value: focusSpent },
{ label: game.i18n.localize("DNC.Chat.FocusRemaining"), value: focusRemaining },
{ label: game.i18n.localize("DNC.Chat.HpSpent"), value: spentPv },
{ label: game.i18n.localize("DNC.Chat.HpRemaining"), value: remainingPv },
{ label: game.i18n.localize("DNC.Chat.CasterRank"), value: rank },
{ label: game.i18n.localize("DNC.Chat.Difficulty"), value: item.system.difficulte ?? 0 },
{ label: game.i18n.localize("DNC.Chat.Effect"), value: item.system.effet || "—" },
...(favor ? [
{ label: "Faveur", value: favor.label },
{ label: "Dé de faveur", value: favor.result },
{ label: "Avant", value: DonjonEtCieUtility.formatUsageDie(favor.before) },
{ label: "Apres", value: DonjonEtCieUtility.formatUsageDie(favor.after) }
{ label: game.i18n.localize("DNC.Chat.Favor"), value: favor.label },
{ label: game.i18n.localize("DNC.Chat.FavorDie"), value: favor.result },
{ label: game.i18n.localize("DNC.Chat.Before"), value: DonjonEtCieUtility.formatUsageDie(favor.before) },
{ label: game.i18n.localize("DNC.Chat.After"), value: DonjonEtCieUtility.formatUsageDie(favor.after) }
] : [])
],
focusRolled: focus.rolled,
@@ -490,7 +491,7 @@ export class DonjonEtCieRolls {
static async rollSpellChaos(actor, item) {
const before = Number(actor?.system?.magie?.chaos?.delta ?? 12);
if (!before || before < 4) {
ui.notifications.warn("Le Chaos n'est pas disponible pour ce sort.");
ui.notifications.warn(game.i18n.localize("DNC.Warn.ChaosUnavailable"));
return null;
}

View File

@@ -19,6 +19,7 @@ export class DonjonEtCieUtility {
trait: "systems/fvtt-donjon-et-cie/assets/icons/system/items/trait.svg",
sortilege: "systems/fvtt-donjon-et-cie/assets/icons/system/items/sortilege.svg",
equipement: "systems/fvtt-donjon-et-cie/assets/icons/system/items/equipement.svg",
entrainement: "systems/fvtt-donjon-et-cie/assets/icons/system/items/capacite.svg",
other: "systems/fvtt-donjon-et-cie/assets/icons/system/items/autre.svg"
};
@@ -167,6 +168,13 @@ export class DonjonEtCieUtility {
static enrichItemForSheet(item) {
const system = item.system;
const delta = Number(system.delta ?? 0);
const deltaMax = Number(system.deltaMax ?? delta ?? 0);
const usageLabel = item.type === "entrainement" && deltaMax > 0
? `${this.formatUsageDie(delta)} / ${this.formatUsageDie(deltaMax)}`
: delta > 0
? this.formatUsageDie(delta)
: null;
return {
id: item.id,
name: item.name,
@@ -174,7 +182,7 @@ export class DonjonEtCieUtility {
img: item.img,
system,
uuid: item.uuid,
usageLabel: delta > 0 ? this.formatUsageDie(delta) : null,
usageLabel,
protectionLabel: item.type === "armure" && Number(system.resultatProtection ?? 0) > 0 ? `Protection ${system.resultatProtection}` : null,
weaponCharacteristicLabel: item.type === "arme" ? this.getWeaponCharacteristicLabel(system.categorie) : null,
canRoll: ["arme", "sortilege"].includes(item.type),
@@ -182,7 +190,8 @@ export class DonjonEtCieUtility {
canRollDamage: Boolean(system.degats),
rollAction: item.type === "sortilege" ? "rollSpell" : "rollWeapon",
damageAction: "rollDamage",
isEquipped: Boolean(system.equipee)
isEquipped: Boolean(system.equipee),
canReset: item.type === "entrainement" && deltaMax > 0 && delta !== deltaMax
};
}

View File

@@ -0,0 +1,25 @@
/**
* Donjon & Cie - Systeme FoundryVTT
*
* Donjon & Cie est un jeu de role edite par John Doe.
* Ce systeme FoundryVTT est une implementation independante et n'est pas
* affilie a John Doe.
*
* @author LeRatierBretonnien
* @copyright 20252026 LeRatierBretonnien
* @license CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/
*/
import BaseItemDataModel from "./base-item.mjs";
export default class EntrainementDataModel extends BaseItemDataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
...super.defineSchema(),
delta: new fields.NumberField({ initial: 4, integer: true }),
deltaMax: new fields.NumberField({ initial: 4, integer: true }),
effet: new fields.StringField({ initial: "" })
};
}
}

View File

@@ -19,5 +19,6 @@ export { default as ArmeDataModel } from "./arme.mjs";
export { default as ArmureDataModel } from "./armure.mjs";
export { default as EquipementDataModel } from "./equipement.mjs";
export { default as ConsommableDataModel } from "./consommable.mjs";
export { default as EntrainementDataModel } from "./entrainement.mjs";
export { default as EmployeDataModel } from "./employe.mjs";
export { default as PnjDataModel } from "./pnj.mjs";

View File

@@ -1 +1 @@
MANIFEST-000019
MANIFEST-000035

View File

@@ -1,3 +1,11 @@
2026/04/13-20:45:52.211396 7f68497ed6c0 Recovering log #17
2026/04/13-20:45:52.220887 7f68497ed6c0 Delete type=3 #15
2026/04/13-20:45:52.220974 7f68497ed6c0 Delete type=0 #17
2026/04/19-18:55:51.456726 7ff1abfff6c0 Delete type=3 #1
2026/04/19-19:06:36.056435 7ff1a9ffb6c0 Level-0 table #38: started
2026/04/19-19:06:36.056473 7ff1a9ffb6c0 Level-0 table #38: 0 bytes OK
2026/04/19-19:06:36.063121 7ff1a9ffb6c0 Delete type=0 #36
2026/04/19-19:06:36.069412 7ff1a9ffb6c0 Manual compaction at level-0 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at '!items!zyqLzmpbHxK3jt5q' @ 188 : 1
2026/04/19-19:06:36.069420 7ff1a9ffb6c0 Compacting 1@0 + 0@1 files
2026/04/19-19:06:36.073487 7ff1a9ffb6c0 Generated table #39@0: 189 keys, 41244 bytes
2026/04/19-19:06:36.073509 7ff1a9ffb6c0 Compacted 1@0 + 0@1 files => 41244 bytes
2026/04/19-19:06:36.079534 7ff1a9ffb6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
2026/04/19-19:06:36.079617 7ff1a9ffb6c0 Delete type=2 #14
2026/04/19-19:06:36.106853 7ff1a9ffb6c0 Manual compaction at level-0 from '!items!zyqLzmpbHxK3jt5q' @ 188 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,4 @@
2026/04/13-15:38:21.573543 7f2a6bfff6c0 Recovering log #12
2026/04/13-15:38:21.584944 7f2a6bfff6c0 Delete type=3 #10
2026/04/13-15:38:21.585068 7f2a6bfff6c0 Delete type=0 #12
2026/04/13-15:53:03.495112 7f2a69ffb6c0 Level-0 table #18: started
2026/04/13-15:53:03.495152 7f2a69ffb6c0 Level-0 table #18: 0 bytes OK
2026/04/13-15:53:03.502660 7f2a69ffb6c0 Delete type=0 #16
2026/04/13-15:53:03.512745 7f2a69ffb6c0 Manual compaction at level-0 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end)
2026/04/13-15:53:03.512766 7f2a69ffb6c0 Manual compaction at level-1 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end)
2026/04/19-18:55:51.316755 7ff1abfff6c0 Log #33: 0 ops saved to Table #34 OK
2026/04/19-18:55:51.316821 7ff1abfff6c0 Archiving /home/morr/foundry/foundrydata-dev/Data/systems/fvtt-donjon-et-cie/packs/equipment/000033.log: OK
2026/04/19-18:55:51.316935 7ff1abfff6c0 Table #14: 189 entries OK
2026/04/19-18:55:51.320226 7ff1abfff6c0 **** Repaired leveldb /home/morr/foundry/foundrydata-dev/Data/systems/fvtt-donjon-et-cie/packs/equipment; recovered 1 files; 41244 bytes. Some data may have been lost. ****

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000006
MANIFEST-000022

View File

@@ -1,3 +1,11 @@
2026/04/13-20:45:52.223768 7f6849fee6c0 Recovering log #4
2026/04/13-20:45:52.234123 7f6849fee6c0 Delete type=3 #2
2026/04/13-20:45:52.234212 7f6849fee6c0 Delete type=0 #4
2026/04/19-18:55:51.477710 7ff1abfff6c0 Delete type=3 #1
2026/04/19-19:06:36.063191 7ff1a9ffb6c0 Level-0 table #25: started
2026/04/19-19:06:36.063213 7ff1a9ffb6c0 Level-0 table #25: 0 bytes OK
2026/04/19-19:06:36.069246 7ff1a9ffb6c0 Delete type=0 #23
2026/04/19-19:06:36.079744 7ff1a9ffb6c0 Manual compaction at level-0 from '!tables!PPsxQgHwLCQ2gjSW' @ 72057594037927935 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 208 : 1
2026/04/19-19:06:36.079754 7ff1a9ffb6c0 Compacting 1@0 + 0@1 files
2026/04/19-19:06:36.084239 7ff1a9ffb6c0 Generated table #26@0: 120 keys, 28120 bytes
2026/04/19-19:06:36.084267 7ff1a9ffb6c0 Compacted 1@0 + 0@1 files => 28120 bytes
2026/04/19-19:06:36.090555 7ff1a9ffb6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
2026/04/19-19:06:36.090673 7ff1a9ffb6c0 Delete type=2 #5
2026/04/19-19:06:36.106868 7ff1a9ffb6c0 Manual compaction at level-0 from '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 208 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at (end)

View File

@@ -1,5 +1,4 @@
2026/04/13-15:38:21.601302 7f2a6a7fc6c0 Delete type=3 #1
2026/04/13-15:53:03.477052 7f2a69ffb6c0 Level-0 table #5: started
2026/04/13-15:53:03.481742 7f2a69ffb6c0 Level-0 table #5: 39147 bytes OK
2026/04/13-15:53:03.488722 7f2a69ffb6c0 Delete type=0 #3
2026/04/13-15:53:03.512725 7f2a69ffb6c0 Manual compaction at level-0 from '!tables!PPsxQgHwLCQ2gjSW' @ 72057594037927935 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at (end)
2026/04/19-18:55:51.460010 7ff1abfff6c0 Log #20: 0 ops saved to Table #21 OK
2026/04/19-18:55:51.460123 7ff1abfff6c0 Archiving /home/morr/foundry/foundrydata-dev/Data/systems/fvtt-donjon-et-cie/packs/random-tables/000020.log: OK
2026/04/19-18:55:51.460233 7ff1abfff6c0 Table #5: 210 entries OK
2026/04/19-18:55:51.463454 7ff1abfff6c0 **** Repaired leveldb /home/morr/foundry/foundrydata-dev/Data/systems/fvtt-donjon-et-cie/packs/random-tables; recovered 1 files; 39147 bytes. Some data may have been lost. ****

Binary file not shown.

Binary file not shown.

View File

View File

@@ -57,7 +57,7 @@
gap: 1rem;
padding: 1rem;
}
.sheet-card {
.dnc-sheet .sheet-card {
border: 2px solid #5b4634;
border-radius: 10px;
background: rgba(255, 248, 236, 0.92);
@@ -73,20 +73,20 @@
text-transform: uppercase;
letter-spacing: 0.04em;
}
.sheet-header {
.dnc-sheet .sheet-header {
display: grid;
grid-template-columns: 140px 1fr;
gap: 1rem;
align-items: start;
}
.sheet-header.compact {
.dnc-sheet .sheet-header.compact {
grid-template-columns: 110px 1fr;
gap: 0.75rem;
}
.portrait {
.dnc-sheet .portrait {
position: relative;
}
.portrait img {
.dnc-sheet .portrait img {
width: 100%;
aspect-ratio: 1;
object-fit: cover;
@@ -94,7 +94,7 @@
border: 3px solid #5b4634;
background: #fff;
}
.icon-button {
.dnc-sheet .icon-button {
position: absolute;
right: 0.4rem;
bottom: 0.4rem;
@@ -105,13 +105,13 @@
width: 2rem;
height: 2rem;
}
.identity-grid,
.identity-grid.two-columns {
.dnc-sheet .identity-grid,
.dnc-sheet .identity-grid.two-columns {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 0.75rem;
}
.identity-grid.two-columns {
.dnc-sheet .identity-grid.two-columns {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dnc-employe-sheet .sheet-header.compact .identity-grid {
@@ -153,18 +153,18 @@
letter-spacing: 0.04em;
color: #6d5a4f;
}
.readonly-field {
.dnc-sheet .readonly-field {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.readonly-field > span {
.dnc-sheet .readonly-field > span {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #6d5a4f;
}
.readonly-field p {
.dnc-sheet .readonly-field p {
margin: 0;
border: 1px solid rgba(91, 70, 52, 0.55);
border-radius: 6px;
@@ -188,29 +188,29 @@
resize: vertical;
min-height: 4.5rem;
}
.sheet-columns {
.dnc-sheet .sheet-columns {
display: grid;
grid-template-columns: minmax(250px, 320px) 1fr;
gap: 1rem;
}
.sheet-sections {
.dnc-sheet .sheet-sections {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
.compact-sections {
.dnc-sheet .compact-sections {
grid-template-columns: 1fr;
}
.counter-field {
.dnc-sheet .counter-field {
display: flex;
align-items: center;
gap: 0.4rem;
}
.counter-field button,
.item-actions button,
.sheet-footer button,
.text-button,
.roll-button {
.dnc-sheet .counter-field button,
.dnc-sheet .item-actions button,
.dnc-sheet .sheet-footer button,
.dnc-sheet .text-button,
.dnc-sheet .roll-button {
border: 1px solid #5b4634;
border-radius: 6px;
background: linear-gradient(180deg, #fdf9f2 0%, #e8d5ba 100%);
@@ -218,90 +218,90 @@
min-height: 2rem;
padding: 0.35rem 0.65rem;
}
.text-button {
.dnc-sheet .text-button {
white-space: nowrap;
}
.roll-button {
.dnc-sheet .roll-button {
width: 2rem;
padding: 0;
}
.with-controls {
.dnc-sheet .with-controls {
gap: 0.4rem;
}
.section-header {
.dnc-sheet .section-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.75rem;
}
.empty-state {
.dnc-sheet .empty-state {
margin: 0;
color: #6d5a4f;
font-style: italic;
}
.span-two {
.dnc-sheet .span-two {
grid-column: span 2;
}
.characteristic-list {
.dnc-actor-sheet .characteristic-list {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.characteristic-row {
.dnc-actor-sheet .characteristic-row {
display: grid;
grid-template-columns: 2rem 1fr 4rem;
gap: 0.4rem;
align-items: center;
}
.characteristic-label {
.dnc-actor-sheet .characteristic-label {
font-weight: 700;
}
.profile-counters {
.dnc-actor-sheet .profile-counters {
display: grid;
grid-template-columns: 1fr;
gap: 0.75rem;
}
.profile-card-wide {
.dnc-actor-sheet .profile-card-wide {
width: 100%;
}
.profile-layout {
.dnc-actor-sheet .profile-layout {
display: grid;
grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
gap: 1rem;
align-items: start;
}
.profile-column {
.dnc-actor-sheet .profile-column {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.favor-card {
.dnc-actor-sheet .favor-card {
margin: 0.75rem 0;
padding: 0.75rem;
border: 1px dashed rgba(91, 70, 52, 0.55);
border-radius: 10px;
background: rgba(226, 208, 177, 0.35);
}
.favor-header h2 {
.dnc-actor-sheet .favor-header h2 {
margin-bottom: 0.4rem;
}
.favor-help {
.dnc-actor-sheet .favor-help {
margin: 0 0 0.75rem;
color: #6d5a4f;
font-size: 0.82rem;
}
.favor-list {
.dnc-actor-sheet .favor-list {
display: grid;
gap: 0.4rem;
}
.favor-row {
.dnc-actor-sheet .favor-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 4.5rem auto;
gap: 0.4rem;
align-items: end;
}
.favor-meta {
.dnc-actor-sheet .favor-meta {
min-height: 2.3rem;
display: flex;
align-items: center;
@@ -311,57 +311,57 @@
border: 1px solid rgba(91, 70, 52, 0.35);
font-weight: 700;
}
.magic-layout {
.dnc-actor-sheet .magic-layout {
align-items: start;
margin-bottom: 0.75rem;
}
.magic-layout .sheet-column {
.dnc-actor-sheet .magic-layout .sheet-column {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.magic-resource-grid {
.dnc-actor-sheet .magic-resource-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
gap: 0.75rem;
align-items: end;
}
.chaos-table-wrapper {
.dnc-actor-sheet .chaos-table-wrapper {
margin-top: 0.75rem;
}
.chaos-table-wrapper h3 {
.dnc-actor-sheet .chaos-table-wrapper h3 {
margin: 0 0 0.4rem;
font-size: 0.95rem;
}
.chaos-table-caption {
.dnc-actor-sheet .chaos-table-caption {
margin: 0 0 0.4rem;
color: #6d5a4f;
font-size: 0.78rem;
font-style: italic;
}
.chaos-table {
.dnc-actor-sheet .chaos-table {
width: 100%;
border-collapse: collapse;
font-size: 0.8rem;
}
.chaos-table th,
.chaos-table td {
.dnc-actor-sheet .chaos-table th,
.dnc-actor-sheet .chaos-table td {
padding: 0.4rem 0.45rem;
border: 1px solid rgba(91, 70, 52, 0.35);
vertical-align: top;
}
.chaos-table th {
.dnc-actor-sheet .chaos-table th {
text-align: left;
background: rgba(226, 208, 177, 0.55);
}
.sheet-tabs {
.dnc-actor-sheet .sheet-tabs {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin: 1rem 0 0.75rem;
justify-content: center;
}
.sheet-tab {
.dnc-actor-sheet .sheet-tab {
border: 1px solid rgba(91, 70, 52, 0.8);
border-radius: 10px;
background: rgba(226, 208, 177, 0.55);
@@ -369,27 +369,27 @@
font-weight: 700;
padding: 0.4rem 0.75rem;
}
.sheet-tab.active {
.dnc-actor-sheet .sheet-tab.active {
background: #8b2e17;
border-color: #561d0e;
color: #fff;
}
.sheet-tab-panel {
.dnc-actor-sheet .sheet-tab-panel {
display: none;
}
.sheet-tab-panel.active {
.dnc-actor-sheet .sheet-tab-panel.active {
display: block;
}
.item-list {
.dnc-actor-sheet .item-list {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.item-section.is-dragover {
.dnc-actor-sheet .item-section.is-dragover {
border-color: #8b2e17;
box-shadow: 0 0 0 2px rgba(139, 46, 23, 0.2);
}
.item-dropzone {
.dnc-actor-sheet .item-dropzone {
border: 1px dashed rgba(91, 70, 52, 0.75);
border-radius: 10px;
padding: 0.75rem;
@@ -403,16 +403,16 @@
font-size: 0.9rem;
font-weight: 600;
}
.item-dropzone.has-items {
.dnc-actor-sheet .item-dropzone.has-items {
padding: 0.4rem 0.75rem;
font-size: 0.8rem;
}
.item-section.is-dragover .item-dropzone {
.dnc-actor-sheet .item-section.is-dragover .item-dropzone {
border-color: #8b2e17;
background: rgba(139, 46, 23, 0.12);
color: #221b18;
}
.item {
.dnc-actor-sheet .item {
display: grid;
grid-template-columns: 48px 1fr auto;
gap: 0.75rem;
@@ -420,11 +420,11 @@
border-top: 1px dashed rgba(91, 70, 52, 0.45);
padding-top: 0.75rem;
}
.item:first-child {
.dnc-actor-sheet .item:first-child {
border-top: 0;
padding-top: 0;
}
.item img {
.dnc-actor-sheet .item img {
width: 48px;
height: 48px;
object-fit: cover;
@@ -432,41 +432,41 @@
border: 1px solid #5b4634;
background: #fff;
}
.item-main p {
.dnc-actor-sheet .item-main p {
margin: 0.4rem 0 0;
color: #6d5a4f;
}
.item-title-row {
.dnc-actor-sheet .item-title-row {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
align-items: center;
}
.item-meta {
.dnc-actor-sheet .item-meta {
border-radius: 999px;
background: #e2d0b1;
color: #221b18;
font-size: 0.75rem;
padding: 0.1rem 0.5rem;
}
.item-actions {
.dnc-actor-sheet .item-actions {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
justify-content: flex-end;
}
.pnj-layout .sheet-column {
.dnc-pnj-sheet .pnj-layout .sheet-column {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.pnj-combat-grid {
.dnc-pnj-sheet .pnj-combat-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem;
align-items: end;
}
.pnj-combat-grid .span-two {
.dnc-pnj-sheet .pnj-combat-grid .span-two {
grid-column: 1 / -1;
}
.application.fvtt-donjon-et-cie.item {
@@ -492,7 +492,7 @@
.dnc-item-sheet .identity-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sheet-footer {
.dnc-item-sheet .sheet-footer {
display: flex;
gap: 0.75rem;
justify-content: flex-end;

File diff suppressed because one or more lines are too long

View File

@@ -118,6 +118,12 @@
"description",
"notes"
]
},
"entrainement": {
"htmlFields": [
"description",
"notes"
]
}
}
},

View File

@@ -150,6 +150,9 @@
{{#if this.canUse}}
<button type="button" data-action="rollUsage" aria-label="Utiliser {{this.name}}" title="Utiliser {{this.name}}"><i class="fa-solid fa-hourglass-half"></i></button>
{{/if}}
{{#if this.canReset}}
<button type="button" data-action="resetUsage" aria-label="Reinitialiser {{this.name}}" title="Reinitialiser"><i class="fa-solid fa-arrow-rotate-left"></i></button>
{{/if}}
<button type="button" data-action="postItem" aria-label="Poster {{this.name}} dans le chat" title="Poster dans le chat"><i class="fa-solid fa-message"></i></button>
<button type="button" data-action="editItem" aria-label="Editer {{this.name}}" title="Editer"><i class="fa-solid fa-pen"></i></button>
<button type="button" data-action="deleteItem" aria-label="Supprimer {{this.name}}" title="Supprimer"><i class="fa-solid fa-trash"></i></button>
@@ -212,47 +215,6 @@
</table>
</div>
</section>
<section class="sheet-card item-section">
<header class="section-header">
<h2>{{capacitySection.label}}</h2>
<button type="button" class="text-button" data-action="createItem" data-type="{{capacitySection.createType}}">+ Ajouter</button>
</header>
<div class="item-list">
{{#if capacitySection.items.length}}
{{#each capacitySection.items}}
<article class="item" data-item-id="{{this.id}}">
<img src="{{this.img}}" alt="{{this.name}}">
<div class="item-main">
<div class="item-title-row">
<strong>{{this.name}}</strong>
{{#if this.usageLabel}}<span class="item-meta">{{this.usageLabel}}</span>{{/if}}
{{#if this.protectionLabel}}<span class="item-meta">{{this.protectionLabel}}</span>{{/if}}
</div>
{{#if this.system.effet}}<p>{{this.system.effet}}</p>{{/if}}
{{#if this.system.degats}}<p>Degats : {{this.system.degats}}</p>{{/if}}
</div>
<div class="item-actions">
{{#if this.canRoll}}
<button type="button" data-action="{{this.rollAction}}" aria-label="Lancer {{this.name}}" title="Lancer {{this.name}}"><i class="fa-solid fa-dice-d20"></i></button>
{{/if}}
{{#if this.canRollDamage}}
<button type="button" data-action="rollDamage" aria-label="Lancer les degats de {{this.name}}" title="Lancer les degats"><i class="fa-solid fa-burst"></i></button>
{{/if}}
{{#if this.canUse}}
<button type="button" data-action="rollUsage" aria-label="Utiliser {{this.name}}" title="Utiliser {{this.name}}"><i class="fa-solid fa-hourglass-half"></i></button>
{{/if}}
<button type="button" data-action="postItem" aria-label="Poster {{this.name}} dans le chat" title="Poster dans le chat"><i class="fa-solid fa-message"></i></button>
<button type="button" data-action="editItem" aria-label="Editer {{this.name}}" title="Editer"><i class="fa-solid fa-pen"></i></button>
<button type="button" data-action="deleteItem" aria-label="Supprimer {{this.name}}" title="Supprimer"><i class="fa-solid fa-trash"></i></button>
</div>
</article>
{{/each}}
{{/if}}
<div class="item-dropzone {{#if capacitySection.items.length}}has-items{{/if}}" data-item-type="{{capacitySection.createType}}">
Glissez-deposez ici les {{capacitySection.label}}.
</div>
</div>
</section>
</section>
<section class="sheet-column">
<section class="sheet-card item-section">
@@ -284,6 +246,9 @@
{{#if this.canUse}}
<button type="button" data-action="rollUsage" aria-label="Utiliser {{this.name}}" title="Utiliser {{this.name}}"><i class="fa-solid fa-hourglass-half"></i></button>
{{/if}}
{{#if this.canReset}}
<button type="button" data-action="resetUsage" aria-label="Reinitialiser {{this.name}}" title="Reinitialiser"><i class="fa-solid fa-arrow-rotate-left"></i></button>
{{/if}}
<button type="button" data-action="postItem" aria-label="Poster {{this.name}} dans le chat" title="Poster dans le chat"><i class="fa-solid fa-message"></i></button>
<button type="button" data-action="editItem" aria-label="Editer {{this.name}}" title="Editer"><i class="fa-solid fa-pen"></i></button>
<button type="button" data-action="deleteItem" aria-label="Supprimer {{this.name}}" title="Supprimer"><i class="fa-solid fa-trash"></i></button>
@@ -296,6 +261,50 @@
</div>
</div>
</section>
<section class="sheet-card item-section">
<header class="section-header">
<h2>{{capacitySection.label}}</h2>
<button type="button" class="text-button" data-action="createItem" data-type="{{capacitySection.createType}}">+ Ajouter</button>
</header>
<div class="item-list">
{{#if capacitySection.items.length}}
{{#each capacitySection.items}}
<article class="item" data-item-id="{{this.id}}">
<img src="{{this.img}}" alt="{{this.name}}">
<div class="item-main">
<div class="item-title-row">
<strong>{{this.name}}</strong>
{{#if this.usageLabel}}<span class="item-meta">{{this.usageLabel}}</span>{{/if}}
{{#if this.protectionLabel}}<span class="item-meta">{{this.protectionLabel}}</span>{{/if}}
</div>
{{#if this.system.effet}}<p>{{this.system.effet}}</p>{{/if}}
{{#if this.system.degats}}<p>Degats : {{this.system.degats}}</p>{{/if}}
</div>
<div class="item-actions">
{{#if this.canRoll}}
<button type="button" data-action="{{this.rollAction}}" aria-label="Lancer {{this.name}}" title="Lancer {{this.name}}"><i class="fa-solid fa-dice-d20"></i></button>
{{/if}}
{{#if this.canRollDamage}}
<button type="button" data-action="rollDamage" aria-label="Lancer les degats de {{this.name}}" title="Lancer les degats"><i class="fa-solid fa-burst"></i></button>
{{/if}}
{{#if this.canUse}}
<button type="button" data-action="rollUsage" aria-label="Utiliser {{this.name}}" title="Utiliser {{this.name}}"><i class="fa-solid fa-hourglass-half"></i></button>
{{/if}}
{{#if this.canReset}}
<button type="button" data-action="resetUsage" aria-label="Reinitialiser {{this.name}}" title="Reinitialiser"><i class="fa-solid fa-arrow-rotate-left"></i></button>
{{/if}}
<button type="button" data-action="postItem" aria-label="Poster {{this.name}} dans le chat" title="Poster dans le chat"><i class="fa-solid fa-message"></i></button>
<button type="button" data-action="editItem" aria-label="Editer {{this.name}}" title="Editer"><i class="fa-solid fa-pen"></i></button>
<button type="button" data-action="deleteItem" aria-label="Supprimer {{this.name}}" title="Supprimer"><i class="fa-solid fa-trash"></i></button>
</div>
</article>
{{/each}}
{{/if}}
<div class="item-dropzone {{#if capacitySection.items.length}}has-items{{/if}}" data-item-type="{{capacitySection.createType}}">
Glissez-deposez ici les {{capacitySection.label}}.
</div>
</div>
</section>
</section>
</section>
</section>
@@ -398,6 +407,9 @@
{{#if this.canUse}}
<button type="button" data-action="rollUsage" aria-label="Utiliser {{this.name}}" title="Utiliser {{this.name}}"><i class="fa-solid fa-hourglass-half"></i></button>
{{/if}}
{{#if this.canReset}}
<button type="button" data-action="resetUsage" aria-label="Reinitialiser {{this.name}}" title="Reinitialiser"><i class="fa-solid fa-arrow-rotate-left"></i></button>
{{/if}}
<button type="button" data-action="postItem" aria-label="Poster {{this.name}} dans le chat" title="Poster dans le chat"><i class="fa-solid fa-message"></i></button>
<button type="button" data-action="editItem" aria-label="Editer {{this.name}}" title="Editer"><i class="fa-solid fa-pen"></i></button>
<button type="button" data-action="deleteItem" aria-label="Supprimer {{this.name}}" title="Supprimer"><i class="fa-solid fa-trash"></i></button>

View File

@@ -1,19 +1,19 @@
<section class="dnc-chat-card dnc-chat-card-chaos">
<header class="chat-card-header">
<div class="chat-card-heading">
<p class="chat-card-kicker">Chaos</p>
<p class="chat-card-kicker">{{localize "DNC.UI.Chaos"}}</p>
<h2>{{title}}</h2>
<p class="chat-card-subtitle">La magie opere malgre l'echec ; le MJ determine les consequences.</p>
<p class="chat-card-subtitle">{{localize "DNC.Chat.ChaosSubtitle"}}</p>
</div>
<div class="chat-card-total">
<span>Jet</span>
<span>{{localize "DNC.Chat.RollValue"}}</span>
<strong>{{value}}</strong>
</div>
</header>
<div class="chat-pill-row">
<span class="chat-pill success">Sort maintenu</span>
<span class="chat-pill">Avant {{before}}</span>
<span class="chat-pill">Apres {{after}}</span>
<span class="chat-pill success">{{localize "DNC.Chat.SpellMaintained"}}</span>
<span class="chat-pill">{{localize "DNC.Chat.Before"}} {{before}}</span>
<span class="chat-pill">{{localize "DNC.Chat.After"}} {{after}}</span>
</div>
{{#if chaosEntry}}
<div class="chat-chaos-result">
@@ -22,9 +22,9 @@
</div>
{{/if}}
{{#if degraded}}
<p class="chat-note warning">Le de du Chaos descend d'un cran.</p>
<p class="chat-note warning">{{localize "DNC.Chat.ChaosDieDrops"}}</p>
{{/if}}
{{#if exhausted}}
<p class="chat-note warning">Le de du Chaos est trop faible pour etre reutilise dans le Donjon.</p>
<p class="chat-note warning">{{localize "DNC.Chat.ChaosDieExhausted"}}</p>
{{/if}}
</section>

View File

@@ -1,7 +1,7 @@
<section class="dnc-chat-card dnc-chat-card-favor">
<header class="chat-card-header">
<div class="chat-card-heading">
<p class="chat-card-kicker">Reseau</p>
<p class="chat-card-kicker">{{localize "DNC.Chat.Kicker.Network"}}</p>
<h2>{{title}}</h2>
{{#if subtitle}}<p class="chat-card-subtitle">{{subtitle}}</p>{{/if}}
</div>
@@ -10,8 +10,8 @@
</div>
</header>
<div class="chat-pill-row">
<span class="chat-pill">Avant {{before}}</span>
<span class="chat-pill">Apres {{after}}</span>
<span class="chat-pill">{{localize "DNC.Chat.Before"}} {{before}}</span>
<span class="chat-pill">{{localize "DNC.Chat.After"}} {{after}}</span>
</div>
<p class="chat-note">{{note}}</p>
</section>

View File

@@ -1,13 +1,13 @@
<section class="dnc-chat-card dnc-chat-card-initiative">
<header class="initiative-header">
<div class="chat-card-heading">
<p class="chat-card-kicker">Ordre de marche</p>
<p class="chat-card-kicker">{{localize "DNC.Chat.Kicker.Initiative"}}</p>
<h2>{{title}}</h2>
<p class="chat-card-subtitle">{{actorName}}</p>
{{#if modeLabel}}<p class="chat-card-subtitle">{{modeLabel}}</p>{{/if}}
</div>
<div class="initiative-total">
<span class="initiative-total-label">Total</span>
<span class="initiative-total-label">{{localize "DNC.Chat.Total"}}</span>
<strong>{{total}}</strong>
</div>
</header>
@@ -24,19 +24,19 @@
</div>
<div class="initiative-operator">+</div>
<div class="initiative-part">
<span class="initiative-part-label">Bonus</span>
<span class="initiative-part-label">{{localize "DNC.Chat.Bonus"}}</span>
<strong>{{bonus}}</strong>
</div>
</div>
<p class="initiative-formula">{{formula}}</p>
{{#if dieValues.[1]}}
<p class="roll-values">Lancers : {{#each dieValues}}<span>{{this}}</span>{{/each}}</p>
<p class="roll-values">{{localize "DNC.Chat.Rolls"}} : {{#each dieValues}}<span>{{this}}</span>{{/each}}</p>
{{/if}}
{{#if syncedCombat}}
<div class="initiative-sync">
<span class="chat-pill success">Combat synchronise</span>
<span class="chat-pill success">{{localize "DNC.Chat.CombatSynced"}}</span>
<p>{{syncedCombat.name}} · rang {{syncedCombat.rank}} / {{syncedCombat.total}}</p>
</div>
{{/if}}

View File

@@ -1,7 +1,7 @@
<section class="dnc-chat-card dnc-chat-card-roll">
<header class="chat-card-header">
<div class="chat-card-heading">
<p class="chat-card-kicker">Resolution</p>
<p class="chat-card-kicker">{{localize "DNC.Chat.Kicker.Resolution"}}</p>
<h2>{{title}}</h2>
{{#if subtitle}}<p class="chat-card-subtitle">{{subtitle}}</p>{{/if}}
</div>
@@ -10,23 +10,23 @@
</div>
</header>
<div class="chat-pill-row">
<span class="chat-pill {{#if success}}success{{else}}failure{{/if}}">{{#if success}}Reussite{{else}}Echec{{/if}}</span>
<span class="chat-pill {{#if success}}success{{else}}failure{{/if}}">{{#if success}}{{localize "DNC.Chat.Success"}}{{else}}{{localize "DNC.Chat.Failure"}}{{/if}}</span>
{{#if modeLabel}}<span class="chat-pill">{{modeLabel}}</span>{{/if}}
{{#if favorLabel}}<span class="chat-pill">Faveur {{favorLabel}}</span>{{/if}}
{{#if targetPillLabel}}<span class="chat-pill">{{targetPillLabel}} {{targetPillValue}}</span>{{else}}<span class="chat-pill">Cible {{target}}</span>{{/if}}
{{#if keptPillLabel}}<span class="chat-pill">{{keptPillLabel}} {{keptPillValue}}</span>{{else}}<span class="chat-pill">Garde {{kept}}</span>{{/if}}
{{#if favorLabel}}<span class="chat-pill">{{localize "DNC.Chat.Favor"}} {{favorLabel}}</span>{{/if}}
{{#if targetPillLabel}}<span class="chat-pill">{{targetPillLabel}} {{targetPillValue}}</span>{{else}}<span class="chat-pill">{{localize "DNC.Chat.Target"}} {{target}}</span>{{/if}}
{{#if keptPillLabel}}<span class="chat-pill">{{keptPillLabel}} {{keptPillValue}}</span>{{else}}<span class="chat-pill">{{localize "DNC.Chat.Kept"}} {{kept}}</span>{{/if}}
</div>
<div class="chat-keyline">
<span class="chat-keyline-label">Lancers</span>
<span class="chat-keyline-label">{{localize "DNC.Chat.Rolls"}}</span>
<p class="roll-values">{{#each values}}<span>{{this}}</span>{{/each}}</p>
</div>
{{#if favorNote}}
<p class="chat-note"><strong>Faveur</strong> : {{favorNote}}</p>
<p class="chat-note"><strong>{{localize "DNC.Chat.Favor"}}</strong> : {{favorNote}}</p>
{{/if}}
{{#if showDamageButton}}
<div class="chat-actions">
<button type="button" class="chat-action-button" data-action="rollChatDamage" data-item-uuid="{{itemUuid}}">
<i class="fa-solid fa-burst"></i> Lancer les degats
<i class="fa-solid fa-burst"></i> {{localize "DNC.Chat.RollDamage"}}
</button>
</div>
{{/if}}

View File

@@ -1,7 +1,7 @@
<section class="dnc-chat-card dnc-chat-card-spell">
<header class="chat-card-header">
<div class="chat-card-heading">
<p class="chat-card-kicker">Magie</p>
<p class="chat-card-kicker">{{localize "DNC.Chat.Kicker.Magic"}}</p>
<h2>{{title}}</h2>
{{#if subtitle}}<p class="chat-card-subtitle">{{subtitle}}</p>{{/if}}
</div>
@@ -10,57 +10,57 @@
</div>
</header>
<div class="chat-pill-row">
<span class="chat-pill {{#if success}}success{{else}}failure{{/if}}">{{#if success}}Reussite{{else}}Echec{{/if}}</span>
<span class="chat-pill {{#if success}}success{{else}}failure{{/if}}">{{#if success}}{{localize "DNC.Chat.Success"}}{{else}}{{localize "DNC.Chat.Failure"}}{{/if}}</span>
{{#if modeLabel}}<span class="chat-pill">{{modeLabel}}</span>{{/if}}
{{#if favorLabel}}<span class="chat-pill">Faveur {{favorLabel}}</span>{{/if}}
{{#if favorLabel}}<span class="chat-pill">{{localize "DNC.Chat.Favor"}} {{favorLabel}}</span>{{/if}}
<span class="chat-pill">{{targetPillLabel}} {{targetPillValue}}</span>
<span class="chat-pill">Jet {{keptPillValue}}</span>
<span class="chat-pill">{{localize "DNC.Chat.RollValue"}} {{keptPillValue}}</span>
</div>
<div class="chat-keyline">
<span class="chat-keyline-label">Lancers</span>
<span class="chat-keyline-label">{{localize "DNC.Chat.Rolls"}}</span>
<p class="roll-values">{{#each values}}<span>{{this}}</span>{{/each}}</p>
</div>
{{#if autoDisadvantage}}
<p class="chat-note">
<strong>Desavantage automatique</strong> :
<strong>{{localize "DNC.Chat.AutoDisadvantage"}}</strong> :
{{#if autoDisadvantageCanceled}}
le cout du sort depasse le rang du lanceur, mais une faveur l'a annule.
{{localize "DNC.Chat.AutoDisadvantageCanceled"}}
{{else}}
le cout du sort depasse le rang du lanceur.
{{localize "DNC.Chat.AutoDisadvantageApplies"}}
{{/if}}
</p>
{{/if}}
{{#if favorNote}}
<p class="chat-note"><strong>Faveur</strong> : {{favorNote}}</p>
<p class="chat-note"><strong>{{localize "DNC.Chat.Favor"}}</strong> : {{favorNote}}</p>
{{/if}}
{{#if focusValue}}
<p class="chat-note">
<strong>Focus</strong> : {{focusValue}} depuis {{focusBeforeLabel}}
{{#if focusSpent}} · {{focusSpent}} utilise{{/if}}
· {{focusRemaining}} restant
{{#if focusDegraded}} · le focus descend a {{focusAfterLabel}}{{/if}}
{{#if focusRolled}} · premier sort de la scene{{/if}}
<strong>{{localize "DNC.UI.Focus"}}</strong> : {{focusValue}} {{localize "DNC.Chat.FocusFrom"}} {{focusBeforeLabel}}
{{#if focusSpent}} · {{focusSpent}} {{localize "DNC.Chat.FocusUsed"}}{{/if}}
· {{focusRemaining}} {{localize "DNC.Chat.FocusLeft"}}
{{#if focusDegraded}} · {{localize "DNC.Chat.FocusDropsTo"}} {{focusAfterLabel}}{{/if}}
{{#if focusRolled}} · {{localize "DNC.Chat.FirstSpellScene"}}{{/if}}
</p>
{{else}}
{{#if focusRolled}}
<p class="chat-note"><strong>Focus</strong> : aucun apport pour cette scene.</p>
<p class="chat-note"><strong>{{localize "DNC.UI.Focus"}}</strong> : {{localize "DNC.Chat.FocusNoBenefit"}}</p>
{{/if}}
{{/if}}
<p class="chat-note"><strong>PV depenses</strong> : {{spentPv}} · <strong>PV restants</strong> : {{remainingPv}}</p>
<p class="chat-note"><strong>{{localize "DNC.Chat.HpSpent"}}</strong> : {{spentPv}} · <strong>{{localize "DNC.Chat.HpRemaining"}}</strong> : {{remainingPv}}</p>
{{#if specialNote}}
<p class="chat-note warning">{{specialNote}}</p>
{{/if}}
{{#if showDamageButton}}
<div class="chat-actions">
<button type="button" class="chat-action-button" data-action="rollChatDamage" data-item-uuid="{{itemUuid}}">
<i class="fa-solid fa-burst"></i> Lancer les degats
<i class="fa-solid fa-burst"></i> {{localize "DNC.Chat.RollDamage"}}
</button>
</div>
{{/if}}
{{#if showChaosButton}}
<div class="chat-actions">
<button type="button" class="chat-action-button" data-action="rollSpellChaos" data-actor-uuid="{{actorUuid}}" data-item-uuid="{{itemUuid}}">
<i class="fa-solid fa-dice-d20"></i> Risquer le Chaos
<i class="fa-solid fa-dice-d20"></i> {{localize "DNC.Chat.RiskChaos"}}
</button>
</div>
{{/if}}

View File

@@ -1,7 +1,7 @@
<section class="dnc-chat-card dnc-chat-card-usage">
<header class="chat-card-header">
<div class="chat-card-heading">
<p class="chat-card-kicker">Usure</p>
<p class="chat-card-kicker">{{localize "DNC.Chat.Kicker.Wear"}}</p>
<h2>{{title}}</h2>
</div>
<div class="chat-card-seal {{#if degraded}}failure{{else}}success{{/if}}">
@@ -10,17 +10,17 @@
</header>
<div class="chat-pill-row">
{{#if modeLabel}}<span class="chat-pill">{{modeLabel}}</span>{{/if}}
<span class="chat-pill">Resultat {{value}}</span>
<span class="chat-pill">Avant {{before}}</span>
<span class="chat-pill">Apres {{after}}</span>
<span class="chat-pill">{{localize "DNC.Chat.Result"}} {{value}}</span>
<span class="chat-pill">{{localize "DNC.Chat.Before"}} {{before}}</span>
<span class="chat-pill">{{localize "DNC.Chat.After"}} {{after}}</span>
</div>
{{#if values.[1]}}
<div class="chat-keyline">
<span class="chat-keyline-label">Lancers</span>
<span class="chat-keyline-label">{{localize "DNC.Chat.Rolls"}}</span>
<p class="roll-values">{{#each values}}<span>{{this}}</span>{{/each}}</p>
</div>
{{/if}}
{{#if protectionStored}}<p class="chat-note">Protection stockee pour ce combat : <strong>{{protectionStored}}</strong>.</p>{{/if}}
{{#if degraded}}<p class="chat-note">La ressource s'amenuise.</p>{{else}}<p class="chat-note">La ressource tient bon.</p>{{/if}}
{{#if exhausted}}<p class="warning">La ressource est epuisee.</p>{{/if}}
{{#if protectionStored}}<p class="chat-note">{{localize "DNC.Chat.StoredProtection"}} : <strong>{{protectionStored}}</strong>.</p>{{/if}}
{{#if degraded}}<p class="chat-note">{{localize "DNC.Chat.ResourceWearsDown"}}</p>{{else}}<p class="chat-note">{{localize "DNC.Chat.ResourceStable"}}</p>{{/if}}
{{#if exhausted}}<p class="warning">{{localize "DNC.Chat.ResourceExhausted"}}</p>{{/if}}
</section>

View File

@@ -1,18 +1,18 @@
<div class="dnc-dialog-form">
<p><strong>{{actorName}}</strong> effectue un jet de <strong>{{characteristic.label}}</strong>.</p>
<label>
<span>Mode</span>
<span>{{localize "DNC.UI.Mode"}}</span>
<select name="mode">
<option value="normal">Normal</option>
<option value="avantage">Avantage</option>
<option value="desavantage">Desavantage</option>
<option value="normal">{{localize "DNC.UI.ModeNormal"}}</option>
<option value="avantage">{{localize "DNC.UI.ModeAdvantage"}}</option>
<option value="desavantage">{{localize "DNC.UI.ModeDisadvantage"}}</option>
</select>
</label>
{{#if hasFavorOptions}}
<label>
<span>Coup de pouce</span>
<span>{{localize "DNC.UI.FavorBoost"}}</span>
<select name="favorDepartment">
<option value="">Aucune faveur</option>
<option value="">{{localize "DNC.UI.NoFavor"}}</option>
{{selectOptions favorOptions selected="" labelAttr="label" valueAttr="value" localize=false}}
</select>
</label>

View File

@@ -1,12 +1,12 @@
<div class="dnc-dialog-form">
<p><strong>{{item.name}}</strong> inflige <strong>{{item.system.degats}}</strong>.</p>
<p>Bonus de degats de l'acteur : <strong>{{actorBonus}}</strong></p>
<p>{{localize "DNC.Dialog.ActorDamageBonus"}} : <strong>{{actorBonus}}</strong></p>
<label>
<span>Mode</span>
<span>{{localize "DNC.UI.Mode"}}</span>
<select name="mode">
<option value="normal">Normal</option>
<option value="avantage">Avantage</option>
<option value="desavantage">Desavantage</option>
<option value="normal">{{localize "DNC.UI.ModeNormal"}}</option>
<option value="avantage">{{localize "DNC.UI.ModeAdvantage"}}</option>
<option value="desavantage">{{localize "DNC.UI.ModeDisadvantage"}}</option>
</select>
</label>
</div>

View File

@@ -1,12 +1,12 @@
<div class="dnc-dialog-form">
<p><strong>{{actorName}}</strong> lance l'initiative.</p>
<p>DEX actuelle : <strong>{{dex}}</strong>, bonus de fiche : <strong>{{initiativeBonus}}</strong></p>
<p>{{localize "DNC.Dialog.InitiativeIntro" actorName=actorName}}</p>
<p>{{localize "DNC.Dialog.InitiativeCurrent" dex=dex initiativeBonus=initiativeBonus}}</p>
<label>
<span>Mode</span>
<span>{{localize "DNC.UI.Mode"}}</span>
<select name="mode">
<option value="normal">Normal</option>
<option value="avantage">Avantage</option>
<option value="desavantage">Desavantage</option>
<option value="normal">{{localize "DNC.UI.ModeNormal"}}</option>
<option value="avantage">{{localize "DNC.UI.ModeAdvantage"}}</option>
<option value="desavantage">{{localize "DNC.UI.ModeDisadvantage"}}</option>
</select>
</label>
</div>

View File

@@ -1,47 +1,47 @@
<div class="dnc-dialog-form">
<p><strong>{{actorName}}</strong> lance <strong>{{item.name}}</strong>.</p>
<label>
<span>Caracteristique</span>
<span>{{localize "DNC.UI.Characteristic"}}</span>
<input type="text" value="{{characteristic.label}} ({{characteristic.value}})" readonly>
</label>
<label>
<span>Cout</span>
<span>{{localize "DNC.UI.Cost"}}</span>
<input type="text" value="{{item.system.coutPv}} PV" readonly>
</label>
<label>
<span>PV actuels</span>
<span>{{localize "DNC.UI.CurrentHp"}}</span>
<input type="text" value="{{currentPv}}" readonly>
</label>
<label>
<span>Rang</span>
<span>{{localize "DNC.UI.Rank"}}</span>
<input type="text" value="{{rank}}" readonly>
</label>
<label>
<span>Focus</span>
<span>{{localize "DNC.UI.Focus"}}</span>
<input type="text" value="{{#if focusIsActive}}{{focusDisplay}}{{else}}{{focusLabel}}{{/if}}" readonly>
</label>
<label>
<span>Chaos</span>
<span>{{localize "DNC.UI.Chaos"}}</span>
<input type="text" value="{{chaosLabel}}" readonly>
</label>
<label>
<span>Mode</span>
<span>{{localize "DNC.UI.Mode"}}</span>
<select name="mode">
<option value="normal">Normal</option>
<option value="avantage">Avantage</option>
<option value="desavantage">Desavantage</option>
<option value="normal">{{localize "DNC.UI.ModeNormal"}}</option>
<option value="avantage">{{localize "DNC.UI.ModeAdvantage"}}</option>
<option value="desavantage">{{localize "DNC.UI.ModeDisadvantage"}}</option>
</select>
</label>
{{#if hasFavorOptions}}
<label>
<span>Coup de pouce</span>
<span>{{localize "DNC.UI.FavorBoost"}}</span>
<select name="favorDepartment">
<option value="">Aucune faveur</option>
<option value="">{{localize "DNC.UI.NoFavor"}}</option>
{{selectOptions favorOptions selected="" labelAttr="label" valueAttr="value" localize=false}}
</select>
</label>
{{/if}}
{{#if autoDisadvantage}}
<p class="dialog-help warning">Le cout depasse le rang du lanceur : le jet se fera automatiquement avec desavantage.</p>
<p class="dialog-help warning">{{localize "DNC.Dialog.SpellAutoDisadvantage"}}</p>
{{/if}}
</div>

View File

@@ -1,12 +1,12 @@
<div class="dnc-dialog-form">
<p>Utiliser <strong>{{item.name}}</strong> et lancer son de d'usage actuel.</p>
<p>Valeur actuelle : <strong>Δ{{item.system.delta}}</strong></p>
<p>{{localize "DNC.Dialog.UseUsageDie" itemName=item.name}}</p>
<p>{{localize "DNC.Dialog.CurrentValue"}} : <strong>Δ{{item.system.delta}}</strong></p>
<label>
<span>Mode</span>
<span>{{localize "DNC.UI.Mode"}}</span>
<select name="mode">
<option value="normal">Normal</option>
<option value="avantage">Avantage</option>
<option value="desavantage">Desavantage</option>
<option value="normal">{{localize "DNC.UI.ModeNormal"}}</option>
<option value="avantage">{{localize "DNC.UI.ModeAdvantage"}}</option>
<option value="desavantage">{{localize "DNC.UI.ModeDisadvantage"}}</option>
</select>
</label>
</div>

View File

@@ -1,19 +1,19 @@
<div class="dnc-dialog-form">
<p><strong>{{actorName}}</strong> attaque avec <strong>{{item.name}}</strong>.</p>
<p>Caracteristique utilisee : <strong>{{characteristicLabel}}</strong> (<strong>{{characteristicValue}}</strong>).</p>
<p>{{localize "DNC.Dialog.CharacteristicUsed"}} : <strong>{{characteristicLabel}}</strong> (<strong>{{characteristicValue}}</strong>).</p>
<label>
<span>Mode</span>
<span>{{localize "DNC.UI.Mode"}}</span>
<select name="mode">
<option value="normal">Normal</option>
<option value="avantage">Avantage</option>
<option value="desavantage">Desavantage</option>
<option value="normal">{{localize "DNC.UI.ModeNormal"}}</option>
<option value="avantage">{{localize "DNC.UI.ModeAdvantage"}}</option>
<option value="desavantage">{{localize "DNC.UI.ModeDisadvantage"}}</option>
</select>
</label>
{{#if hasFavorOptions}}
<label>
<span>Coup de pouce</span>
<span>{{localize "DNC.UI.FavorBoost"}}</span>
<select name="favorDepartment">
<option value="">Aucune faveur</option>
<option value="">{{localize "DNC.UI.NoFavor"}}</option>
{{selectOptions favorOptions selected="" labelAttr="label" valueAttr="value" localize=false}}
</select>
</label>

View File

@@ -53,7 +53,7 @@
<input type="number" name="system.quantite" value="{{system.quantite}}">
</label>
<label>
<span>Delta</span>
<span>De d'usure</span>
<select name="system.delta">{{selectOptions config.usageDieOptions selected=system.delta localize=false}}</select>
</label>
<label class="span-two">
@@ -73,6 +73,21 @@
</label>
{{/if}}
{{#if isTraining}}
<label>
<span>De d'usure courant</span>
<select name="system.delta">{{selectOptions config.usageDieOptions selected=system.delta localize=false blank="Epuise"}}</select>
</label>
<label>
<span>De d'usure max</span>
<select name="system.deltaMax">{{selectOptions config.usageDieOptions selected=system.deltaMax localize=false}}</select>
</label>
<label class="span-two">
<span>Effet</span>
<input type="text" name="system.effet" value="{{system.effet}}">
</label>
{{/if}}
{{#if isSpell}}
<label>
<span>Caracteristique</span>
@@ -144,6 +159,9 @@
<footer class="sheet-footer">
<button type="button" data-action="postItem" aria-label="Poster dans le chat"><i class="fa-solid fa-message"></i> Poster dans le chat</button>
<button type="button" data-action="rollItem" aria-label="Utiliser ou lancer l'objet"><i class="fa-solid fa-dice-d20"></i> Utiliser / lancer</button>
{{#if canResetUsage}}
<button type="button" data-action="resetUsageItem" aria-label="Reinitialiser l'usage"><i class="fa-solid fa-arrow-rotate-left"></i> Reinitialiser</button>
{{/if}}
{{#if canRollDamage}}
<button type="button" data-action="rollDamageItem" aria-label="Lancer les degats"><i class="fa-solid fa-burst"></i> Lancer les degats</button>
{{/if}}