3 Commits

Author SHA1 Message Date
uberwald 06b0ff7f78 Fiche PNJ : Autorise multi-attaques
Release Creation / build (release) Successful in 57s
2026-04-26 15:59:01 +02:00
uberwald c6ddc96148 Fiche PNJ : Autorise multi-attaques
Release Creation / build (release) Failing after 49s
2026-04-26 15:45:53 +02:00
uberwald 6883cc1020 Ajout entrainements
Release Creation / build (release) Failing after 51s
2026-04-19 19:06:47 +02:00
41 changed files with 501 additions and 256 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ jobs:
env: env:
version: ${{ steps.get_version.outputs.version-without-v }} version: ${{ steps.get_version.outputs.version-without-v }}
url: https://www.uberwald.me/gitea/${{ gitea.repository }} url: https://www.uberwald.me/gitea/${{ gitea.repository }}
manifest: https://www.uberwald.me/gitea/public/fvtt-donjon-et-cie/releases/download/latest/system.json manifest: https://www.uberwald.me/gitea/uberwald/fvtt-donjon-et-cie/releases/download/latest/system.json
download: https://www.uberwald.me/gitea/${{ gitea.repository }}/releases/download/${{ github.event.release.tag_name }}/fvtt-donjon-et-cie.zip download: https://www.uberwald.me/gitea/${{ gitea.repository }}/releases/download/${{ github.event.release.tag_name }}/fvtt-donjon-et-cie.zip
- run: | - run: |
@@ -53,7 +53,7 @@ jobs:
token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }} token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
id: "fvtt-donjon-et-cie" id: "fvtt-donjon-et-cie"
version: ${{ github.event.release.tag_name }} version: ${{ github.event.release.tag_name }}
manifest: "https://www.uberwald.me/gitea/public/fvtt-donjon-et-cie/releases/download/latest/system.json" manifest: "https://www.uberwald.me/gitea/uberwald/fvtt-donjon-et-cie/releases/download/latest/system.json"
notes: "https://www.uberwald.me/gitea/${{ gitea.repository }}/releases/download/${{ github.event.release.tag_name }}/fvtt-donjon-et-cie.zip" notes: "https://www.uberwald.me/gitea/${{ gitea.repository }}/releases/download/${{ github.event.release.tag_name }}/fvtt-donjon-et-cie.zip"
compatibility-minimum: "13" compatibility-minimum: "13"
compatibility-verified: "14" compatibility-verified: "14"
+2
View File
@@ -9,6 +9,7 @@
"TYPES.Item.armure": "Armure", "TYPES.Item.armure": "Armure",
"TYPES.Item.equipement": "Equipement", "TYPES.Item.equipement": "Equipement",
"TYPES.Item.consommable": "Consommable", "TYPES.Item.consommable": "Consommable",
"TYPES.Item.entrainement": "Entrainement",
"DNC.Roll.Characteristic": "Jet de caracteristique", "DNC.Roll.Characteristic": "Jet de caracteristique",
"DNC.Roll.Attack": "Jet d'attaque", "DNC.Roll.Attack": "Jet d'attaque",
"DNC.Roll.Damage": "Jet de degats", "DNC.Roll.Damage": "Jet de degats",
@@ -100,6 +101,7 @@
"DNC.Warn.NoFavorAvailable": "Aucune faveur disponible pour {label}.", "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.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.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.Create": "Creer",
"DNC.Sheet.Delete": "Supprimer", "DNC.Sheet.Delete": "Supprimer",
"DNC.Sheet.Edit": "Editer", "DNC.Sheet.Edit": "Editer",
+77 -43
View File
@@ -1,44 +1,44 @@
.characteristic-list { .dnc-actor-sheet .characteristic-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: @spacing-sm; gap: @spacing-sm;
} }
.characteristic-row { .dnc-actor-sheet .characteristic-row {
display: grid; display: grid;
grid-template-columns: 2rem 1fr 4rem; grid-template-columns: 2rem 1fr 4rem;
gap: @spacing-sm; gap: @spacing-sm;
align-items: center; align-items: center;
} }
.characteristic-label { .dnc-actor-sheet .characteristic-label {
font-weight: 700; font-weight: 700;
} }
.profile-counters { .dnc-actor-sheet .profile-counters {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
gap: @spacing-md; gap: @spacing-md;
} }
.profile-card-wide { .dnc-actor-sheet .profile-card-wide {
width: 100%; width: 100%;
} }
.profile-layout { .dnc-actor-sheet .profile-layout {
display: grid; display: grid;
grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
gap: @spacing-lg; gap: @spacing-lg;
align-items: start; align-items: start;
} }
.profile-column { .dnc-actor-sheet .profile-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: @spacing-md; gap: @spacing-md;
} }
.favor-card { .dnc-actor-sheet .favor-card {
margin: @spacing-md 0; margin: @spacing-md 0;
padding: @spacing-md; padding: @spacing-md;
border: 1px dashed fade(@color-border, 55%); border: 1px dashed fade(@color-border, 55%);
@@ -46,29 +46,29 @@
background: fade(@color-panel-strong, 35%); background: fade(@color-panel-strong, 35%);
} }
.favor-header h2 { .dnc-actor-sheet .favor-header h2 {
margin-bottom: @spacing-sm; margin-bottom: @spacing-sm;
} }
.favor-help { .dnc-actor-sheet .favor-help {
margin: 0 0 @spacing-md; margin: 0 0 @spacing-md;
color: @color-muted; color: @color-muted;
font-size: 0.82rem; font-size: 0.82rem;
} }
.favor-list { .dnc-actor-sheet .favor-list {
display: grid; display: grid;
gap: @spacing-sm; gap: @spacing-sm;
} }
.favor-row { .dnc-actor-sheet .favor-row {
display: grid; display: grid;
grid-template-columns: minmax(0, 1fr) 4.5rem auto; grid-template-columns: minmax(0, 1fr) 4.5rem auto;
gap: @spacing-sm; gap: @spacing-sm;
align-items: end; align-items: end;
} }
.favor-meta { .dnc-actor-sheet .favor-meta {
min-height: 2.3rem; min-height: 2.3rem;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -79,59 +79,59 @@
font-weight: 700; font-weight: 700;
} }
.magic-layout { .dnc-actor-sheet .magic-layout {
align-items: start; align-items: start;
margin-bottom: @spacing-md; margin-bottom: @spacing-md;
} }
.magic-layout .sheet-column { .dnc-actor-sheet .magic-layout .sheet-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: @spacing-md; gap: @spacing-md;
} }
.magic-resource-grid { .dnc-actor-sheet .magic-resource-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
gap: @spacing-md; gap: @spacing-md;
align-items: end; align-items: end;
} }
.chaos-table-wrapper { .dnc-actor-sheet .chaos-table-wrapper {
margin-top: @spacing-md; margin-top: @spacing-md;
} }
.chaos-table-wrapper h3 { .dnc-actor-sheet .chaos-table-wrapper h3 {
margin: 0 0 @spacing-sm; margin: 0 0 @spacing-sm;
font-size: 0.95rem; font-size: 0.95rem;
} }
.chaos-table-caption { .dnc-actor-sheet .chaos-table-caption {
margin: 0 0 @spacing-sm; margin: 0 0 @spacing-sm;
color: @color-muted; color: @color-muted;
font-size: 0.78rem; font-size: 0.78rem;
font-style: italic; font-style: italic;
} }
.chaos-table { .dnc-actor-sheet .chaos-table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
font-size: 0.8rem; font-size: 0.8rem;
} }
.chaos-table th, .dnc-actor-sheet .chaos-table th,
.chaos-table td { .dnc-actor-sheet .chaos-table td {
padding: 0.4rem 0.45rem; padding: 0.4rem 0.45rem;
border: 1px solid fade(@color-border, 35%); border: 1px solid fade(@color-border, 35%);
vertical-align: top; vertical-align: top;
} }
.chaos-table th { .dnc-actor-sheet .chaos-table th {
text-align: left; text-align: left;
background: fade(@color-panel-strong, 55%); background: fade(@color-panel-strong, 55%);
} }
.sheet-tabs { .dnc-actor-sheet .sheet-tabs {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: @spacing-sm; gap: @spacing-sm;
@@ -139,7 +139,7 @@
justify-content: center; justify-content: center;
} }
.sheet-tab { .dnc-actor-sheet .sheet-tab {
border: 1px solid fade(@color-border, 80%); border: 1px solid fade(@color-border, 80%);
border-radius: @radius-md; border-radius: @radius-md;
background: fade(@color-panel-strong, 55%); background: fade(@color-panel-strong, 55%);
@@ -148,32 +148,32 @@
padding: @spacing-sm @spacing-md; padding: @spacing-sm @spacing-md;
} }
.sheet-tab.active { .dnc-actor-sheet .sheet-tab.active {
background: @color-accent; background: @color-accent;
border-color: darken(@color-accent, 12%); border-color: darken(@color-accent, 12%);
color: #fff; color: #fff;
} }
.sheet-tab-panel { .dnc-actor-sheet .sheet-tab-panel {
display: none; display: none;
} }
.sheet-tab-panel.active { .dnc-actor-sheet .sheet-tab-panel.active {
display: block; display: block;
} }
.item-list { .dnc-actor-sheet .item-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: @spacing-md; gap: @spacing-md;
} }
.item-section.is-dragover { .dnc-actor-sheet .item-section.is-dragover {
border-color: @color-accent; border-color: @color-accent;
box-shadow: 0 0 0 2px fade(@color-accent, 20%); 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: 1px dashed fade(@color-border, 75%);
border-radius: @radius-md; border-radius: @radius-md;
padding: @spacing-md; padding: @spacing-md;
@@ -188,18 +188,18 @@
font-weight: 600; font-weight: 600;
} }
.item-dropzone.has-items { .dnc-actor-sheet .item-dropzone.has-items {
padding: @spacing-sm @spacing-md; padding: @spacing-sm @spacing-md;
font-size: 0.8rem; font-size: 0.8rem;
} }
.item-section.is-dragover .item-dropzone { .dnc-actor-sheet .item-section.is-dragover .item-dropzone {
border-color: @color-accent; border-color: @color-accent;
background: fade(@color-accent, 12%); background: fade(@color-accent, 12%);
color: @color-ink; color: @color-ink;
} }
.item { .dnc-actor-sheet .item {
display: grid; display: grid;
grid-template-columns: 48px 1fr auto; grid-template-columns: 48px 1fr auto;
gap: @spacing-md; gap: @spacing-md;
@@ -208,12 +208,12 @@
padding-top: @spacing-md; padding-top: @spacing-md;
} }
.item:first-child { .dnc-actor-sheet .item:first-child {
border-top: 0; border-top: 0;
padding-top: 0; padding-top: 0;
} }
.item img { .dnc-actor-sheet .item img {
width: 48px; width: 48px;
height: 48px; height: 48px;
object-fit: cover; object-fit: cover;
@@ -222,19 +222,19 @@
background: #fff; background: #fff;
} }
.item-main p { .dnc-actor-sheet .item-main p {
margin: @spacing-sm 0 0; margin: @spacing-sm 0 0;
color: @color-muted; color: @color-muted;
} }
.item-title-row { .dnc-actor-sheet .item-title-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: @spacing-sm; gap: @spacing-sm;
align-items: center; align-items: center;
} }
.item-meta { .dnc-actor-sheet .item-meta {
border-radius: 999px; border-radius: 999px;
background: @color-panel-strong; background: @color-panel-strong;
color: @color-ink; color: @color-ink;
@@ -242,26 +242,60 @@
padding: 0.1rem 0.5rem; padding: 0.1rem 0.5rem;
} }
.item-actions { .dnc-actor-sheet .item-actions {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: @spacing-sm; gap: @spacing-sm;
justify-content: flex-end; justify-content: flex-end;
} }
.pnj-layout .sheet-column { .dnc-pnj-sheet .pnj-layout .sheet-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: @spacing-md; gap: @spacing-md;
} }
.pnj-combat-grid { .dnc-pnj-sheet .pnj-combat-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: @spacing-md; gap: @spacing-md;
align-items: end; align-items: end;
} }
.pnj-combat-grid .span-two { .dnc-pnj-sheet .pnj-combat-grid .span-two {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
.dnc-pnj-sheet .pnj-attack-list {
display: flex;
flex-direction: column;
gap: @spacing-md;
}
.dnc-pnj-sheet .pnj-attack-list .section-header {
margin-bottom: 0;
}
.dnc-pnj-sheet .pnj-attack-list h3 {
margin: 0;
font-size: 0.95rem;
color: @color-ink;
}
.dnc-pnj-sheet .pnj-attack-rows {
display: flex;
flex-direction: column;
gap: @spacing-md;
}
.dnc-pnj-sheet .pnj-attack-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 4.5rem max-content;
gap: @spacing-md;
align-items: end;
}
.dnc-pnj-sheet .pnj-attack-row .item-actions {
align-self: end;
gap: @spacing-sm;
}
+15 -15
View File
@@ -60,7 +60,7 @@
padding: @spacing-lg; padding: @spacing-lg;
} }
.sheet-card { .dnc-sheet .sheet-card {
border: 2px solid @color-border; border: 2px solid @color-border;
border-radius: @radius-md; border-radius: @radius-md;
background: rgba(255, 248, 236, 0.92); background: rgba(255, 248, 236, 0.92);
@@ -78,23 +78,23 @@
letter-spacing: 0.04em; letter-spacing: 0.04em;
} }
.sheet-header { .dnc-sheet .sheet-header {
display: grid; display: grid;
grid-template-columns: 140px 1fr; grid-template-columns: 140px 1fr;
gap: @spacing-lg; gap: @spacing-lg;
align-items: start; align-items: start;
} }
.sheet-header.compact { .dnc-sheet .sheet-header.compact {
grid-template-columns: 110px 1fr; grid-template-columns: 110px 1fr;
gap: @spacing-md; gap: @spacing-md;
} }
.portrait { .dnc-sheet .portrait {
position: relative; position: relative;
} }
.portrait img { .dnc-sheet .portrait img {
width: 100%; width: 100%;
aspect-ratio: 1; aspect-ratio: 1;
object-fit: cover; object-fit: cover;
@@ -103,7 +103,7 @@
background: #fff; background: #fff;
} }
.icon-button { .dnc-sheet .icon-button {
position: absolute; position: absolute;
right: @spacing-sm; right: @spacing-sm;
bottom: @spacing-sm; bottom: @spacing-sm;
@@ -115,14 +115,14 @@
height: 2rem; height: 2rem;
} }
.identity-grid, .dnc-sheet .identity-grid,
.identity-grid.two-columns { .dnc-sheet .identity-grid.two-columns {
display: grid; display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: repeat(4, minmax(0, 1fr));
gap: @spacing-md; gap: @spacing-md;
} }
.identity-grid.two-columns { .dnc-sheet .identity-grid.two-columns {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
@@ -175,20 +175,20 @@
color: @color-muted; color: @color-muted;
} }
.readonly-field { .dnc-sheet .readonly-field {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: @spacing-sm; gap: @spacing-sm;
} }
.readonly-field > span { .dnc-sheet .readonly-field > span {
font-size: 0.8rem; font-size: 0.8rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.04em; letter-spacing: 0.04em;
color: @color-muted; color: @color-muted;
} }
.readonly-field p { .dnc-sheet .readonly-field p {
margin: 0; margin: 0;
border: 1px solid rgba(91, 70, 52, 0.55); border: 1px solid rgba(91, 70, 52, 0.55);
border-radius: 6px; border-radius: 6px;
@@ -215,18 +215,18 @@
min-height: 4.5rem; min-height: 4.5rem;
} }
.sheet-columns { .dnc-sheet .sheet-columns {
display: grid; display: grid;
grid-template-columns: minmax(250px, 320px) 1fr; grid-template-columns: minmax(250px, 320px) 1fr;
gap: @spacing-lg; gap: @spacing-lg;
} }
.sheet-sections { .dnc-sheet .sheet-sections {
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: @spacing-lg; gap: @spacing-lg;
} }
.compact-sections { .dnc-sheet .compact-sections {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
+12 -12
View File
@@ -1,14 +1,14 @@
.counter-field { .dnc-sheet .counter-field {
display: flex; display: flex;
align-items: center; align-items: center;
gap: @spacing-sm; gap: @spacing-sm;
} }
.counter-field button, .dnc-sheet .counter-field button,
.item-actions button, .dnc-sheet .item-actions button,
.sheet-footer button, .dnc-sheet .sheet-footer button,
.text-button, .dnc-sheet .text-button,
.roll-button { .dnc-sheet .roll-button {
border: 1px solid @color-border; border: 1px solid @color-border;
border-radius: @radius-sm; border-radius: @radius-sm;
background: linear-gradient(180deg, #fdf9f2 0%, #e8d5ba 100%); background: linear-gradient(180deg, #fdf9f2 0%, #e8d5ba 100%);
@@ -17,20 +17,20 @@
padding: 0.35rem 0.65rem; padding: 0.35rem 0.65rem;
} }
.text-button { .dnc-sheet .text-button {
white-space: nowrap; white-space: nowrap;
} }
.roll-button { .dnc-sheet .roll-button {
width: 2rem; width: 2rem;
padding: 0; padding: 0;
} }
.with-controls { .dnc-sheet .with-controls {
gap: @spacing-sm; gap: @spacing-sm;
} }
.section-header { .dnc-sheet .section-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -38,12 +38,12 @@
margin-bottom: @spacing-md; margin-bottom: @spacing-md;
} }
.empty-state { .dnc-sheet .empty-state {
margin: 0; margin: 0;
color: @color-muted; color: @color-muted;
font-style: italic; font-style: italic;
} }
.span-two { .dnc-sheet .span-two {
grid-column: span 2; grid-column: span 2;
} }
+1 -1
View File
@@ -26,7 +26,7 @@
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.sheet-footer { .dnc-item-sheet .sheet-footer {
display: flex; display: flex;
gap: @spacing-md; gap: @spacing-md;
justify-content: flex-end; justify-content: flex-end;
@@ -37,6 +37,7 @@ export default class DonjonEtCieActorSheet extends HandlebarsApplicationMixin(fo
rollDamage: DonjonEtCieActorSheet.#onRollDamage, rollDamage: DonjonEtCieActorSheet.#onRollDamage,
rollSpell: DonjonEtCieActorSheet.#onRollSpell, rollSpell: DonjonEtCieActorSheet.#onRollSpell,
rollUsage: DonjonEtCieActorSheet.#onRollUsage, rollUsage: DonjonEtCieActorSheet.#onRollUsage,
resetUsage: DonjonEtCieActorSheet.#onResetUsage,
useFavorService: DonjonEtCieActorSheet.#onUseFavorService, useFavorService: DonjonEtCieActorSheet.#onUseFavorService,
postItem: DonjonEtCieActorSheet.#onPostItem, postItem: DonjonEtCieActorSheet.#onPostItem,
adjustCounter: DonjonEtCieActorSheet.#onAdjustCounter 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); 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) { static async #onUseFavorService(event, target) {
event.preventDefault(); event.preventDefault();
return this.document.useFavorService(target.dataset.department); return this.document.useFavorService(target.dataset.department);
@@ -29,7 +29,8 @@ export default class DonjonEtCieItemSheet extends HandlebarsApplicationMixin(fou
editImage: DonjonEtCieItemSheet.#onEditImage, editImage: DonjonEtCieItemSheet.#onEditImage,
postItem: DonjonEtCieItemSheet.#onPostItem, postItem: DonjonEtCieItemSheet.#onPostItem,
rollItem: DonjonEtCieItemSheet.#onRollItem, 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", isWeapon: item.type === "arme",
isArmor: item.type === "armure", isArmor: item.type === "armure",
isConsumable: item.type === "consommable", isConsumable: item.type === "consommable",
isTraining: item.type === "entrainement",
isSpell: item.type === "sortilege", isSpell: item.type === "sortilege",
canRollDamage: Boolean(item.system.degats), canRollDamage: Boolean(item.system.degats),
isEquipment: item.type === "equipement", isEquipment: item.type === "equipement",
isCapacity: item.type === "capacite", isCapacity: item.type === "capacite",
isLanguage: item.type === "langue", isLanguage: item.type === "langue",
isTrait: item.type === "trait", 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 : "—", armorProtectionDisplay: Number(item.system.resultatProtection ?? 0) > 0 ? item.system.resultatProtection : "—",
weaponCharacteristicLabel: item.type === "arme" ? DonjonEtCieUtility.getWeaponCharacteristicLabel(item.system.categorie) : null, weaponCharacteristicLabel: item.type === "arme" ? DonjonEtCieUtility.getWeaponCharacteristicLabel(item.system.categorie) : null,
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(item.system.description ?? "", { async: true }), 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(); event.preventDefault();
return this.document.rollDamage(); return this.document.rollDamage();
} }
static async #onResetUsageItem(event) {
event.preventDefault();
return this.document.resetUsageDie();
}
} }
@@ -43,7 +43,7 @@ export default class DonjonEtCieEmployeSheet extends DonjonEtCieActorSheet {
combatSections: ["armes", "armures", "consommables", "equipements"].map(getSection), combatSections: ["armes", "armures", "consommables", "equipements"].map(getSection),
spellSection: getSection("sortileges"), spellSection: getSection("sortileges"),
capacitySection: getSection("capacites"), capacitySection: getSection("capacites"),
profileSections: ["langues"].map(getSection) profileSections: ["langues", "entrainements"].map(getSection)
}; };
} }
} }
@@ -22,7 +22,9 @@ export default class DonjonEtCiePNJSheet extends DonjonEtCieActorSheet {
...super.DEFAULT_OPTIONS.actions, ...super.DEFAULT_OPTIONS.actions,
rollPnjArmor: DonjonEtCiePNJSheet.#onRollPnjArmor, rollPnjArmor: DonjonEtCiePNJSheet.#onRollPnjArmor,
rollPnjCourage: DonjonEtCiePNJSheet.#onRollPnjCourage, rollPnjCourage: DonjonEtCiePNJSheet.#onRollPnjCourage,
rollPnjAttackDamage: DonjonEtCiePNJSheet.#onRollPnjAttackDamage rollPnjAttackDamage: DonjonEtCiePNJSheet.#onRollPnjAttackDamage,
createPnjAttack: DonjonEtCiePNJSheet.#onCreatePnjAttack,
deletePnjAttack: DonjonEtCiePNJSheet.#onDeletePnjAttack
} }
}; };
@@ -48,7 +50,7 @@ export default class DonjonEtCiePNJSheet extends DonjonEtCieActorSheet {
armorDisplay: Number(system.defense?.armure?.delta ?? 0) ? `Δ${system.defense.armure.delta}` : "—", armorDisplay: Number(system.defense?.armure?.delta ?? 0) ? `Δ${system.defense.armure.delta}` : "—",
storedArmor: Number(system.defense?.armure?.resultatProtection ?? 0) > 0 ? system.defense.armure.resultatProtection : "—", storedArmor: Number(system.defense?.armure?.resultatProtection ?? 0) > 0 ? system.defense.armure.resultatProtection : "—",
courageDisplay: Number(system.defense?.courage?.delta ?? 0) ? `Δ${system.defense.courage.delta}` : "—", courageDisplay: Number(system.defense?.courage?.delta ?? 0) ? `Δ${system.defense.courage.delta}` : "—",
hasAttackDamage: Boolean(system.attaque?.degats) pnjAttacks: this.document.getPnjAttacks()
}; };
} }
@@ -64,6 +66,16 @@ export default class DonjonEtCiePNJSheet extends DonjonEtCieActorSheet {
static async #onRollPnjAttackDamage(event) { static async #onRollPnjAttackDamage(event) {
event.preventDefault(); event.preventDefault();
return this.document.rollPnjAttackDamage(); return this.document.rollPnjAttackDamage(event.target.closest("[data-attack-index]")?.dataset.attackIndex ?? 0);
}
static async #onCreatePnjAttack(event) {
event.preventDefault();
return this.document.createPnjAttack();
}
static async #onDeletePnjAttack(event) {
event.preventDefault();
return this.document.deletePnjAttack(event.target.closest("[data-attack-index]")?.dataset.attackIndex ?? 0);
} }
} }
+55 -4
View File
@@ -14,6 +14,12 @@ import { DonjonEtCieUtility } from "./donjon-et-cie-utility.mjs";
import { DonjonEtCieRollDialog } from "./applications/donjon-et-cie-roll-dialog.mjs"; import { DonjonEtCieRollDialog } from "./applications/donjon-et-cie-roll-dialog.mjs";
export class DonjonEtCieActor extends Actor { export class DonjonEtCieActor extends Actor {
static defaultPnjAttack = {
nom: "Attaque",
degats: "1d6",
notes: ""
};
prepareDerivedData() { prepareDerivedData() {
super.prepareDerivedData(); super.prepareDerivedData();
@@ -158,6 +164,50 @@ export class DonjonEtCieActor extends Actor {
if (item) return DonjonEtCieRollDialog.createUsage(item); if (item) return DonjonEtCieRollDialog.createUsage(item);
} }
async resetUsage(itemId) {
const item = this.items.get(itemId);
if (item?.type === "entrainement") return item.resetUsageDie();
}
getPnjAttacks() {
if (this.type !== "pnj") return [];
const attacks = Array.isArray(this.system.attaques) ? this.system.attaques : [];
if (attacks.length) return attacks.map((attack, index) => ({
index,
nom: attack.nom || `Attaque ${index + 1}`,
degats: attack.degats || "",
notes: attack.notes || ""
}));
const legacy = this.system.attaque;
if (legacy) {
return [{
index: 0,
nom: legacy.nom || "Attaque",
degats: legacy.degats || "",
notes: legacy.notes || ""
}];
}
return [{ index: 0, ...foundry.utils.deepClone(this.constructor.defaultPnjAttack) }];
}
async createPnjAttack() {
if (this.type !== "pnj") return null;
const attaques = this.getPnjAttacks().map(({ nom, degats, notes }) => ({ nom, degats, notes }));
attaques.push(foundry.utils.deepClone(this.constructor.defaultPnjAttack));
return this.update({ "system.attaques": attaques });
}
async deletePnjAttack(index) {
if (this.type !== "pnj") return null;
const attaques = this.getPnjAttacks().map(({ nom, degats, notes }) => ({ nom, degats, notes }));
attaques.splice(Number(index), 1);
if (!attaques.length) attaques.push(foundry.utils.deepClone(this.constructor.defaultPnjAttack));
return this.update({ "system.attaques": attaques });
}
#createPnjResourceProxy({ label, deltaPath, protectionPath = null }) { #createPnjResourceProxy({ label, deltaPath, protectionPath = null }) {
const delta = Number(foundry.utils.getProperty(this, deltaPath) ?? 0); const delta = Number(foundry.utils.getProperty(this, deltaPath) ?? 0);
const protection = protectionPath ? Number(foundry.utils.getProperty(this, protectionPath) ?? 0) : 0; const protection = protectionPath ? Number(foundry.utils.getProperty(this, protectionPath) ?? 0) : 0;
@@ -198,9 +248,10 @@ export class DonjonEtCieActor extends Actor {
})); }));
} }
async rollPnjAttackDamage() { async rollPnjAttackDamage(index = 0) {
const attackName = this.system.attaque?.nom || "Attaque"; const attack = this.getPnjAttacks()[Number(index)] ?? null;
const attackDamage = this.system.attaque?.degats || ""; const attackName = attack?.nom || "Attaque";
const attackDamage = attack?.degats || "";
if (!attackDamage) return null; if (!attackDamage) return null;
return DonjonEtCieRollDialog.createDamage(this, { return DonjonEtCieRollDialog.createDamage(this, {
@@ -208,7 +259,7 @@ export class DonjonEtCieActor extends Actor {
type: "attaque", type: "attaque",
system: { system: {
degats: attackDamage, degats: attackDamage,
portee: this.system.attaque?.notes || "" portee: attack?.notes || ""
} }
}); });
} }
+4 -2
View File
@@ -114,7 +114,8 @@ export const DONJON_ET_CIE = {
armes: { label: "Armes", createType: "arme" }, armes: { label: "Armes", createType: "arme" },
armures: { label: "Armures", createType: "armure" }, armures: { label: "Armures", createType: "armure" },
equipements: { label: "Equipements", createType: "equipement" }, equipements: { label: "Equipements", createType: "equipement" },
consommables: { label: "Consommables", createType: "consommable" } consommables: { label: "Consommables", createType: "consommable" },
entrainements: { label: "Entrainements", createType: "entrainement" }
}, },
sectionTypes: { sectionTypes: {
traits: ["trait"], traits: ["trait"],
@@ -124,6 +125,7 @@ export const DONJON_ET_CIE = {
armes: ["arme"], armes: ["arme"],
armures: ["armure"], armures: ["armure"],
equipements: ["equipement"], equipements: ["equipement"],
consommables: ["consommable"] consommables: ["consommable"],
entrainements: ["entrainement"]
} }
}; };
+15
View File
@@ -27,10 +27,18 @@ export class DonjonEtCieItem extends Item {
return Number(this.system.delta ?? 0); return Number(this.system.delta ?? 0);
} }
get usageDieMax() {
return Number(this.system.deltaMax ?? this.system.delta ?? 0);
}
async roll() { async roll() {
if (this.type === "arme") return DonjonEtCieRollDialog.createWeapon(this.actor, this); if (this.type === "arme") return DonjonEtCieRollDialog.createWeapon(this.actor, this);
if (this.type === "sortilege") return DonjonEtCieRollDialog.createSpell(this.actor, this); if (this.type === "sortilege") return DonjonEtCieRollDialog.createSpell(this.actor, this);
if (this.usageDie) return DonjonEtCieRollDialog.createUsage(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(); return this.postToChat();
} }
@@ -54,4 +62,11 @@ export class DonjonEtCieItem extends Item {
content content
}); });
} }
async resetUsageDie() {
if (this.type !== "entrainement") return this;
const deltaMax = this.usageDieMax;
if (!deltaMax) return this;
return this.update({ "system.delta": deltaMax });
}
} }
+3 -2
View File
@@ -97,7 +97,8 @@ Hooks.once("init", async () => {
arme: models.ArmeDataModel, arme: models.ArmeDataModel,
armure: models.ArmureDataModel, armure: models.ArmureDataModel,
equipement: models.EquipementDataModel, equipement: models.EquipementDataModel,
consommable: models.ConsommableDataModel consommable: models.ConsommableDataModel,
entrainement: models.EntrainementDataModel
}; };
game.system.donjonEtCie = { 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.Actors.registerSheet("fvtt-donjon-et-cie", sheets.DonjonEtCiePNJSheet, { types: ["pnj"], makeDefault: true });
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet); 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 }); foundry.documents.collections.Items.registerSheet("fvtt-donjon-et-cie", sheets.DonjonEtCieItemSheet, { types: [type], makeDefault: true });
} }
}); });
+11 -2
View File
@@ -19,6 +19,7 @@ export class DonjonEtCieUtility {
trait: "systems/fvtt-donjon-et-cie/assets/icons/system/items/trait.svg", trait: "systems/fvtt-donjon-et-cie/assets/icons/system/items/trait.svg",
sortilege: "systems/fvtt-donjon-et-cie/assets/icons/system/items/sortilege.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", 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" other: "systems/fvtt-donjon-et-cie/assets/icons/system/items/autre.svg"
}; };
@@ -167,6 +168,13 @@ export class DonjonEtCieUtility {
static enrichItemForSheet(item) { static enrichItemForSheet(item) {
const system = item.system; const system = item.system;
const delta = Number(system.delta ?? 0); 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 { return {
id: item.id, id: item.id,
name: item.name, name: item.name,
@@ -174,7 +182,7 @@ export class DonjonEtCieUtility {
img: item.img, img: item.img,
system, system,
uuid: item.uuid, uuid: item.uuid,
usageLabel: delta > 0 ? this.formatUsageDie(delta) : null, usageLabel,
protectionLabel: item.type === "armure" && Number(system.resultatProtection ?? 0) > 0 ? `Protection ${system.resultatProtection}` : null, protectionLabel: item.type === "armure" && Number(system.resultatProtection ?? 0) > 0 ? `Protection ${system.resultatProtection}` : null,
weaponCharacteristicLabel: item.type === "arme" ? this.getWeaponCharacteristicLabel(system.categorie) : null, weaponCharacteristicLabel: item.type === "arme" ? this.getWeaponCharacteristicLabel(system.categorie) : null,
canRoll: ["arme", "sortilege"].includes(item.type), canRoll: ["arme", "sortilege"].includes(item.type),
@@ -182,7 +190,8 @@ export class DonjonEtCieUtility {
canRollDamage: Boolean(system.degats), canRollDamage: Boolean(system.degats),
rollAction: item.type === "sortilege" ? "rollSpell" : "rollWeapon", rollAction: item.type === "sortilege" ? "rollSpell" : "rollWeapon",
damageAction: "rollDamage", damageAction: "rollDamage",
isEquipped: Boolean(system.equipee) isEquipped: Boolean(system.equipee),
canReset: item.type === "entrainement" && deltaMax > 0 && delta !== deltaMax
}; };
} }
+25
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: "" })
};
}
}
+1
View File
@@ -19,5 +19,6 @@ export { default as ArmeDataModel } from "./arme.mjs";
export { default as ArmureDataModel } from "./armure.mjs"; export { default as ArmureDataModel } from "./armure.mjs";
export { default as EquipementDataModel } from "./equipement.mjs"; export { default as EquipementDataModel } from "./equipement.mjs";
export { default as ConsommableDataModel } from "./consommable.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 EmployeDataModel } from "./employe.mjs";
export { default as PnjDataModel } from "./pnj.mjs"; export { default as PnjDataModel } from "./pnj.mjs";
+8 -4
View File
@@ -13,6 +13,11 @@
export default class PnjDataModel extends foundry.abstract.TypeDataModel { export default class PnjDataModel extends foundry.abstract.TypeDataModel {
static defineSchema() { static defineSchema() {
const fields = foundry.data.fields; const fields = foundry.data.fields;
const makeAttack = () => new fields.SchemaField({
nom: new fields.StringField({ initial: "Attaque" }),
degats: new fields.StringField({ initial: "1d6" }),
notes: new fields.StringField({ initial: "" })
});
return { return {
espece: new fields.StringField({ initial: "" }), espece: new fields.StringField({ initial: "" }),
@@ -35,10 +40,9 @@ export default class PnjDataModel extends foundry.abstract.TypeDataModel {
delta: new fields.NumberField({ initial: 0, integer: true }) delta: new fields.NumberField({ initial: 0, integer: true })
}) })
}), }),
attaque: new fields.SchemaField({ attaque: makeAttack(),
nom: new fields.StringField({ initial: "Attaque" }), attaques: new fields.ArrayField(makeAttack(), {
degats: new fields.StringField({ initial: "1d6" }), initial: [{ nom: "Attaque", degats: "1d6", notes: "" }]
notes: new fields.StringField({ initial: "" })
}), }),
pouvoirsSpeciaux: new fields.HTMLField({ initial: "" }), pouvoirsSpeciaux: new fields.HTMLField({ initial: "" }),
description: new fields.HTMLField({ initial: "" }), description: new fields.HTMLField({ initial: "" }),
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000027 MANIFEST-000040
+7 -8
View File
@@ -1,8 +1,7 @@
2026/04/16-21:42:54.235115 7f268abff6c0 Recovering log #25 2026/04/26-15:24:50.959107 7f57a5fef6c0 Recovering log #37
2026/04/16-21:42:54.246984 7f268abff6c0 Delete type=3 #23 2026/04/26-15:24:50.969309 7f57a5fef6c0 Delete type=3 #35
2026/04/16-21:42:54.247108 7f268abff6c0 Delete type=0 #25 2026/04/26-15:24:50.969397 7f57a5fef6c0 Delete type=0 #37
2026/04/16-21:52:13.467303 7f2688bfb6c0 Level-0 table #30: started 2026/04/26-15:45:09.958844 7f57977fe6c0 Level-0 table #43: started
2026/04/16-21:52:13.467365 7f2688bfb6c0 Level-0 table #30: 0 bytes OK 2026/04/26-15:45:09.959077 7f57977fe6c0 Level-0 table #43: 0 bytes OK
2026/04/16-21:52:13.473605 7f2688bfb6c0 Delete type=0 #28 2026/04/26-15:45:09.966304 7f57977fe6c0 Delete type=0 #41
2026/04/16-21:52:13.492993 7f2688bfb6c0 Manual compaction at level-0 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end) 2026/04/26-15:45:09.985022 7f57977fe6c0 Manual compaction at level-0 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end)
2026/04/16-21:52:13.493035 7f2688bfb6c0 Manual compaction at level-1 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end)
+11 -8
View File
@@ -1,8 +1,11 @@
2026/04/16-21:36:49.799525 7f268a3fe6c0 Recovering log #21 2026/04/19-18:55:51.456726 7ff1abfff6c0 Delete type=3 #1
2026/04/16-21:36:49.811240 7f268a3fe6c0 Delete type=3 #19 2026/04/19-19:06:36.056435 7ff1a9ffb6c0 Level-0 table #38: started
2026/04/16-21:36:49.811393 7f268a3fe6c0 Delete type=0 #21 2026/04/19-19:06:36.056473 7ff1a9ffb6c0 Level-0 table #38: 0 bytes OK
2026/04/16-21:42:33.287551 7f2688bfb6c0 Level-0 table #26: started 2026/04/19-19:06:36.063121 7ff1a9ffb6c0 Delete type=0 #36
2026/04/16-21:42:33.287592 7f2688bfb6c0 Level-0 table #26: 0 bytes OK 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/16-21:42:33.293864 7f2688bfb6c0 Delete type=0 #24 2026/04/19-19:06:36.069420 7ff1a9ffb6c0 Compacting 1@0 + 0@1 files
2026/04/16-21:42:33.294114 7f2688bfb6c0 Manual compaction at level-0 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end) 2026/04/19-19:06:36.073487 7ff1a9ffb6c0 Generated table #39@0: 189 keys, 41244 bytes
2026/04/16-21:42:33.305404 7f2688bfb6c0 Manual compaction at level-1 from '!folders!K9aiFu0dE6UYiXBd' @ 72057594037927935 : 1 .. '!items!zyqLzmpbHxK3jt5q' @ 0 : 0; will stop at (end) 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)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000014 MANIFEST-000027
+7 -8
View File
@@ -1,8 +1,7 @@
2026/04/16-21:42:54.253629 7f26893fc6c0 Recovering log #12 2026/04/26-15:24:50.974308 7f57a57ee6c0 Recovering log #24
2026/04/16-21:42:54.264466 7f26893fc6c0 Delete type=3 #10 2026/04/26-15:24:50.984638 7f57a57ee6c0 Delete type=3 #22
2026/04/16-21:42:54.264594 7f26893fc6c0 Delete type=0 #12 2026/04/26-15:24:50.984738 7f57a57ee6c0 Delete type=0 #24
2026/04/16-21:52:13.479973 7f2688bfb6c0 Level-0 table #17: started 2026/04/26-15:45:09.972734 7f57977fe6c0 Level-0 table #30: started
2026/04/16-21:52:13.480006 7f2688bfb6c0 Level-0 table #17: 0 bytes OK 2026/04/26-15:45:09.972793 7f57977fe6c0 Level-0 table #30: 0 bytes OK
2026/04/16-21:52:13.486314 7f2688bfb6c0 Delete type=0 #15 2026/04/26-15:45:09.978845 7f57977fe6c0 Delete type=0 #28
2026/04/16-21:52:13.493013 7f2688bfb6c0 Manual compaction at level-0 from '!tables!PPsxQgHwLCQ2gjSW' @ 72057594037927935 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at (end) 2026/04/26-15:45:09.985047 7f57977fe6c0 Manual compaction at level-0 from '!tables!PPsxQgHwLCQ2gjSW' @ 72057594037927935 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at (end)
2026/04/16-21:52:13.493041 7f2688bfb6c0 Manual compaction at level-1 from '!tables!PPsxQgHwLCQ2gjSW' @ 72057594037927935 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at (end)
+11 -8
View File
@@ -1,8 +1,11 @@
2026/04/16-21:36:49.818474 7f2689bfd6c0 Recovering log #8 2026/04/19-18:55:51.477710 7ff1abfff6c0 Delete type=3 #1
2026/04/16-21:36:49.829906 7f2689bfd6c0 Delete type=3 #6 2026/04/19-19:06:36.063191 7ff1a9ffb6c0 Level-0 table #25: started
2026/04/16-21:36:49.830072 7f2689bfd6c0 Delete type=0 #8 2026/04/19-19:06:36.063213 7ff1a9ffb6c0 Level-0 table #25: 0 bytes OK
2026/04/16-21:42:33.280445 7f2688bfb6c0 Level-0 table #13: started 2026/04/19-19:06:36.069246 7ff1a9ffb6c0 Delete type=0 #23
2026/04/16-21:42:33.280504 7f2688bfb6c0 Level-0 table #13: 0 bytes OK 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/16-21:42:33.287252 7f2688bfb6c0 Delete type=0 #11 2026/04/19-19:06:36.079754 7ff1a9ffb6c0 Compacting 1@0 + 0@1 files
2026/04/16-21:42:33.294093 7f2688bfb6c0 Manual compaction at level-0 from '!tables!PPsxQgHwLCQ2gjSW' @ 72057594037927935 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at (end) 2026/04/19-19:06:36.084239 7ff1a9ffb6c0 Generated table #26@0: 120 keys, 28120 bytes
2026/04/16-21:42:33.305387 7f2688bfb6c0 Manual compaction at level-1 from '!tables!PPsxQgHwLCQ2gjSW' @ 72057594037927935 : 1 .. '!tables.results!wJZXUo4q5b5vE3Dy.zFTPLMc9zOl5hISV' @ 0 : 0; will stop at (end) 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)
Binary file not shown.
Binary file not shown.
View File
+99 -71
View File
@@ -57,7 +57,7 @@
gap: 1rem; gap: 1rem;
padding: 1rem; padding: 1rem;
} }
.sheet-card { .dnc-sheet .sheet-card {
border: 2px solid #5b4634; border: 2px solid #5b4634;
border-radius: 10px; border-radius: 10px;
background: rgba(255, 248, 236, 0.92); background: rgba(255, 248, 236, 0.92);
@@ -73,20 +73,20 @@
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.04em; letter-spacing: 0.04em;
} }
.sheet-header { .dnc-sheet .sheet-header {
display: grid; display: grid;
grid-template-columns: 140px 1fr; grid-template-columns: 140px 1fr;
gap: 1rem; gap: 1rem;
align-items: start; align-items: start;
} }
.sheet-header.compact { .dnc-sheet .sheet-header.compact {
grid-template-columns: 110px 1fr; grid-template-columns: 110px 1fr;
gap: 0.75rem; gap: 0.75rem;
} }
.portrait { .dnc-sheet .portrait {
position: relative; position: relative;
} }
.portrait img { .dnc-sheet .portrait img {
width: 100%; width: 100%;
aspect-ratio: 1; aspect-ratio: 1;
object-fit: cover; object-fit: cover;
@@ -94,7 +94,7 @@
border: 3px solid #5b4634; border: 3px solid #5b4634;
background: #fff; background: #fff;
} }
.icon-button { .dnc-sheet .icon-button {
position: absolute; position: absolute;
right: 0.4rem; right: 0.4rem;
bottom: 0.4rem; bottom: 0.4rem;
@@ -105,13 +105,13 @@
width: 2rem; width: 2rem;
height: 2rem; height: 2rem;
} }
.identity-grid, .dnc-sheet .identity-grid,
.identity-grid.two-columns { .dnc-sheet .identity-grid.two-columns {
display: grid; display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 0.75rem; gap: 0.75rem;
} }
.identity-grid.two-columns { .dnc-sheet .identity-grid.two-columns {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.dnc-employe-sheet .sheet-header.compact .identity-grid { .dnc-employe-sheet .sheet-header.compact .identity-grid {
@@ -153,18 +153,18 @@
letter-spacing: 0.04em; letter-spacing: 0.04em;
color: #6d5a4f; color: #6d5a4f;
} }
.readonly-field { .dnc-sheet .readonly-field {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.4rem; gap: 0.4rem;
} }
.readonly-field > span { .dnc-sheet .readonly-field > span {
font-size: 0.8rem; font-size: 0.8rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.04em; letter-spacing: 0.04em;
color: #6d5a4f; color: #6d5a4f;
} }
.readonly-field p { .dnc-sheet .readonly-field p {
margin: 0; margin: 0;
border: 1px solid rgba(91, 70, 52, 0.55); border: 1px solid rgba(91, 70, 52, 0.55);
border-radius: 6px; border-radius: 6px;
@@ -188,29 +188,29 @@
resize: vertical; resize: vertical;
min-height: 4.5rem; min-height: 4.5rem;
} }
.sheet-columns { .dnc-sheet .sheet-columns {
display: grid; display: grid;
grid-template-columns: minmax(250px, 320px) 1fr; grid-template-columns: minmax(250px, 320px) 1fr;
gap: 1rem; gap: 1rem;
} }
.sheet-sections { .dnc-sheet .sheet-sections {
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem; gap: 1rem;
} }
.compact-sections { .dnc-sheet .compact-sections {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
.counter-field { .dnc-sheet .counter-field {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.4rem; gap: 0.4rem;
} }
.counter-field button, .dnc-sheet .counter-field button,
.item-actions button, .dnc-sheet .item-actions button,
.sheet-footer button, .dnc-sheet .sheet-footer button,
.text-button, .dnc-sheet .text-button,
.roll-button { .dnc-sheet .roll-button {
border: 1px solid #5b4634; border: 1px solid #5b4634;
border-radius: 6px; border-radius: 6px;
background: linear-gradient(180deg, #fdf9f2 0%, #e8d5ba 100%); background: linear-gradient(180deg, #fdf9f2 0%, #e8d5ba 100%);
@@ -218,90 +218,90 @@
min-height: 2rem; min-height: 2rem;
padding: 0.35rem 0.65rem; padding: 0.35rem 0.65rem;
} }
.text-button { .dnc-sheet .text-button {
white-space: nowrap; white-space: nowrap;
} }
.roll-button { .dnc-sheet .roll-button {
width: 2rem; width: 2rem;
padding: 0; padding: 0;
} }
.with-controls { .dnc-sheet .with-controls {
gap: 0.4rem; gap: 0.4rem;
} }
.section-header { .dnc-sheet .section-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
gap: 0.75rem; gap: 0.75rem;
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
.empty-state { .dnc-sheet .empty-state {
margin: 0; margin: 0;
color: #6d5a4f; color: #6d5a4f;
font-style: italic; font-style: italic;
} }
.span-two { .dnc-sheet .span-two {
grid-column: span 2; grid-column: span 2;
} }
.characteristic-list { .dnc-actor-sheet .characteristic-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.4rem; gap: 0.4rem;
} }
.characteristic-row { .dnc-actor-sheet .characteristic-row {
display: grid; display: grid;
grid-template-columns: 2rem 1fr 4rem; grid-template-columns: 2rem 1fr 4rem;
gap: 0.4rem; gap: 0.4rem;
align-items: center; align-items: center;
} }
.characteristic-label { .dnc-actor-sheet .characteristic-label {
font-weight: 700; font-weight: 700;
} }
.profile-counters { .dnc-actor-sheet .profile-counters {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
gap: 0.75rem; gap: 0.75rem;
} }
.profile-card-wide { .dnc-actor-sheet .profile-card-wide {
width: 100%; width: 100%;
} }
.profile-layout { .dnc-actor-sheet .profile-layout {
display: grid; display: grid;
grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
gap: 1rem; gap: 1rem;
align-items: start; align-items: start;
} }
.profile-column { .dnc-actor-sheet .profile-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.75rem; gap: 0.75rem;
} }
.favor-card { .dnc-actor-sheet .favor-card {
margin: 0.75rem 0; margin: 0.75rem 0;
padding: 0.75rem; padding: 0.75rem;
border: 1px dashed rgba(91, 70, 52, 0.55); border: 1px dashed rgba(91, 70, 52, 0.55);
border-radius: 10px; border-radius: 10px;
background: rgba(226, 208, 177, 0.35); background: rgba(226, 208, 177, 0.35);
} }
.favor-header h2 { .dnc-actor-sheet .favor-header h2 {
margin-bottom: 0.4rem; margin-bottom: 0.4rem;
} }
.favor-help { .dnc-actor-sheet .favor-help {
margin: 0 0 0.75rem; margin: 0 0 0.75rem;
color: #6d5a4f; color: #6d5a4f;
font-size: 0.82rem; font-size: 0.82rem;
} }
.favor-list { .dnc-actor-sheet .favor-list {
display: grid; display: grid;
gap: 0.4rem; gap: 0.4rem;
} }
.favor-row { .dnc-actor-sheet .favor-row {
display: grid; display: grid;
grid-template-columns: minmax(0, 1fr) 4.5rem auto; grid-template-columns: minmax(0, 1fr) 4.5rem auto;
gap: 0.4rem; gap: 0.4rem;
align-items: end; align-items: end;
} }
.favor-meta { .dnc-actor-sheet .favor-meta {
min-height: 2.3rem; min-height: 2.3rem;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -311,57 +311,57 @@
border: 1px solid rgba(91, 70, 52, 0.35); border: 1px solid rgba(91, 70, 52, 0.35);
font-weight: 700; font-weight: 700;
} }
.magic-layout { .dnc-actor-sheet .magic-layout {
align-items: start; align-items: start;
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
.magic-layout .sheet-column { .dnc-actor-sheet .magic-layout .sheet-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.75rem; gap: 0.75rem;
} }
.magic-resource-grid { .dnc-actor-sheet .magic-resource-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
gap: 0.75rem; gap: 0.75rem;
align-items: end; align-items: end;
} }
.chaos-table-wrapper { .dnc-actor-sheet .chaos-table-wrapper {
margin-top: 0.75rem; margin-top: 0.75rem;
} }
.chaos-table-wrapper h3 { .dnc-actor-sheet .chaos-table-wrapper h3 {
margin: 0 0 0.4rem; margin: 0 0 0.4rem;
font-size: 0.95rem; font-size: 0.95rem;
} }
.chaos-table-caption { .dnc-actor-sheet .chaos-table-caption {
margin: 0 0 0.4rem; margin: 0 0 0.4rem;
color: #6d5a4f; color: #6d5a4f;
font-size: 0.78rem; font-size: 0.78rem;
font-style: italic; font-style: italic;
} }
.chaos-table { .dnc-actor-sheet .chaos-table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
font-size: 0.8rem; font-size: 0.8rem;
} }
.chaos-table th, .dnc-actor-sheet .chaos-table th,
.chaos-table td { .dnc-actor-sheet .chaos-table td {
padding: 0.4rem 0.45rem; padding: 0.4rem 0.45rem;
border: 1px solid rgba(91, 70, 52, 0.35); border: 1px solid rgba(91, 70, 52, 0.35);
vertical-align: top; vertical-align: top;
} }
.chaos-table th { .dnc-actor-sheet .chaos-table th {
text-align: left; text-align: left;
background: rgba(226, 208, 177, 0.55); background: rgba(226, 208, 177, 0.55);
} }
.sheet-tabs { .dnc-actor-sheet .sheet-tabs {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.4rem; gap: 0.4rem;
margin: 1rem 0 0.75rem; margin: 1rem 0 0.75rem;
justify-content: center; justify-content: center;
} }
.sheet-tab { .dnc-actor-sheet .sheet-tab {
border: 1px solid rgba(91, 70, 52, 0.8); border: 1px solid rgba(91, 70, 52, 0.8);
border-radius: 10px; border-radius: 10px;
background: rgba(226, 208, 177, 0.55); background: rgba(226, 208, 177, 0.55);
@@ -369,27 +369,27 @@
font-weight: 700; font-weight: 700;
padding: 0.4rem 0.75rem; padding: 0.4rem 0.75rem;
} }
.sheet-tab.active { .dnc-actor-sheet .sheet-tab.active {
background: #8b2e17; background: #8b2e17;
border-color: #561d0e; border-color: #561d0e;
color: #fff; color: #fff;
} }
.sheet-tab-panel { .dnc-actor-sheet .sheet-tab-panel {
display: none; display: none;
} }
.sheet-tab-panel.active { .dnc-actor-sheet .sheet-tab-panel.active {
display: block; display: block;
} }
.item-list { .dnc-actor-sheet .item-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.75rem; gap: 0.75rem;
} }
.item-section.is-dragover { .dnc-actor-sheet .item-section.is-dragover {
border-color: #8b2e17; border-color: #8b2e17;
box-shadow: 0 0 0 2px rgba(139, 46, 23, 0.2); 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: 1px dashed rgba(91, 70, 52, 0.75);
border-radius: 10px; border-radius: 10px;
padding: 0.75rem; padding: 0.75rem;
@@ -403,16 +403,16 @@
font-size: 0.9rem; font-size: 0.9rem;
font-weight: 600; font-weight: 600;
} }
.item-dropzone.has-items { .dnc-actor-sheet .item-dropzone.has-items {
padding: 0.4rem 0.75rem; padding: 0.4rem 0.75rem;
font-size: 0.8rem; font-size: 0.8rem;
} }
.item-section.is-dragover .item-dropzone { .dnc-actor-sheet .item-section.is-dragover .item-dropzone {
border-color: #8b2e17; border-color: #8b2e17;
background: rgba(139, 46, 23, 0.12); background: rgba(139, 46, 23, 0.12);
color: #221b18; color: #221b18;
} }
.item { .dnc-actor-sheet .item {
display: grid; display: grid;
grid-template-columns: 48px 1fr auto; grid-template-columns: 48px 1fr auto;
gap: 0.75rem; gap: 0.75rem;
@@ -420,11 +420,11 @@
border-top: 1px dashed rgba(91, 70, 52, 0.45); border-top: 1px dashed rgba(91, 70, 52, 0.45);
padding-top: 0.75rem; padding-top: 0.75rem;
} }
.item:first-child { .dnc-actor-sheet .item:first-child {
border-top: 0; border-top: 0;
padding-top: 0; padding-top: 0;
} }
.item img { .dnc-actor-sheet .item img {
width: 48px; width: 48px;
height: 48px; height: 48px;
object-fit: cover; object-fit: cover;
@@ -432,43 +432,71 @@
border: 1px solid #5b4634; border: 1px solid #5b4634;
background: #fff; background: #fff;
} }
.item-main p { .dnc-actor-sheet .item-main p {
margin: 0.4rem 0 0; margin: 0.4rem 0 0;
color: #6d5a4f; color: #6d5a4f;
} }
.item-title-row { .dnc-actor-sheet .item-title-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.4rem; gap: 0.4rem;
align-items: center; align-items: center;
} }
.item-meta { .dnc-actor-sheet .item-meta {
border-radius: 999px; border-radius: 999px;
background: #e2d0b1; background: #e2d0b1;
color: #221b18; color: #221b18;
font-size: 0.75rem; font-size: 0.75rem;
padding: 0.1rem 0.5rem; padding: 0.1rem 0.5rem;
} }
.item-actions { .dnc-actor-sheet .item-actions {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.4rem; gap: 0.4rem;
justify-content: flex-end; justify-content: flex-end;
} }
.pnj-layout .sheet-column { .dnc-pnj-sheet .pnj-layout .sheet-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.75rem; gap: 0.75rem;
} }
.pnj-combat-grid { .dnc-pnj-sheet .pnj-combat-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem; gap: 0.75rem;
align-items: end; align-items: end;
} }
.pnj-combat-grid .span-two { .dnc-pnj-sheet .pnj-combat-grid .span-two {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
.dnc-pnj-sheet .pnj-attack-list {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.dnc-pnj-sheet .pnj-attack-list .section-header {
margin-bottom: 0;
}
.dnc-pnj-sheet .pnj-attack-list h3 {
margin: 0;
font-size: 0.95rem;
color: #221b18;
}
.dnc-pnj-sheet .pnj-attack-rows {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.dnc-pnj-sheet .pnj-attack-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 4.5rem max-content;
gap: 0.75rem;
align-items: end;
}
.dnc-pnj-sheet .pnj-attack-row .item-actions {
align-self: end;
gap: 0.4rem;
}
.application.fvtt-donjon-et-cie.item { .application.fvtt-donjon-et-cie.item {
display: flex !important; display: flex !important;
flex-direction: column; flex-direction: column;
@@ -492,7 +520,7 @@
.dnc-item-sheet .identity-grid { .dnc-item-sheet .identity-grid {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.sheet-footer { .dnc-item-sheet .sheet-footer {
display: flex; display: flex;
gap: 0.75rem; gap: 0.75rem;
justify-content: flex-end; justify-content: flex-end;
File diff suppressed because one or more lines are too long
+6
View File
@@ -118,6 +118,12 @@
"description", "description",
"notes" "notes"
] ]
},
"entrainement": {
"htmlFields": [
"description",
"notes"
]
} }
} }
}, },
+53 -41
View File
@@ -150,6 +150,9 @@
{{#if this.canUse}} {{#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> <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}}
{{#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="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="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> <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> </table>
</div> </div>
</section> </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>
<section class="sheet-column"> <section class="sheet-column">
<section class="sheet-card item-section"> <section class="sheet-card item-section">
@@ -284,6 +246,9 @@
{{#if this.canUse}} {{#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> <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}}
{{#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="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="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> <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>
</div> </div>
</section> </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> </section>
</section> </section>
@@ -398,6 +407,9 @@
{{#if this.canUse}} {{#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> <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}}
{{#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="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="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> <button type="button" data-action="deleteItem" aria-label="Supprimer {{this.name}}" title="Supprimer"><i class="fa-solid fa-trash"></i></button>
+19 -12
View File
@@ -72,23 +72,30 @@
<span>Valeurs</span> <span>Valeurs</span>
<p>ARM {{armorDisplay}} · COU {{courageDisplay}}</p> <p>ARM {{armorDisplay}} · COU {{courageDisplay}}</p>
</div> </div>
<section class="pnj-attack-list span-two">
<header class="section-header">
<h3>Attaques</h3>
<button type="button" class="text-button" data-action="createPnjAttack">+ Ajouter</button>
</header>
<div class="pnj-attack-rows">
{{#each pnjAttacks}}
<article class="pnj-attack-row" data-attack-index="{{this.index}}">
<label> <label>
<span>ATT</span> <input type="text" name="system.attaques.{{this.index}}.nom" value="{{this.nom}}" aria-label="Nom de l'attaque" title="Nom de l'attaque">
<input type="text" name="system.attaque.nom" value="{{system.attaque.nom}}">
</label> </label>
<label> <label>
<span>Degats</span> <input type="text" name="system.attaques.{{this.index}}.degats" value="{{this.degats}}" aria-label="Dégâts" title="Dégâts">
<div class="counter-field"> </label>
<input type="text" name="system.attaque.degats" value="{{system.attaque.degats}}"> <div class="item-actions">
{{#if hasAttackDamage}} {{#if this.degats}}
<button type="button" data-action="rollPnjAttackDamage" aria-label="Lancer les degats de l'attaque" title="Lancer les degats"><i class="fa-solid fa-burst"></i></button> <button type="button" data-action="rollPnjAttackDamage" aria-label="Lancer les degats de {{this.nom}}" title="Lancer les degats"><i class="fa-solid fa-burst"></i></button>
{{/if}} {{/if}}
<button type="button" data-action="deletePnjAttack" aria-label="Supprimer {{this.nom}}" title="Supprimer"><i class="fa-solid fa-trash"></i></button>
</div> </div>
</label> </article>
<label class="span-two"> {{/each}}
<span>Notes d'attaque</span> </div>
<input type="text" name="system.attaque.notes" value="{{system.attaque.notes}}"> </section>
</label>
</div> </div>
</section> </section>
+19 -1
View File
@@ -53,7 +53,7 @@
<input type="number" name="system.quantite" value="{{system.quantite}}"> <input type="number" name="system.quantite" value="{{system.quantite}}">
</label> </label>
<label> <label>
<span>Delta</span> <span>De d'usure</span>
<select name="system.delta">{{selectOptions config.usageDieOptions selected=system.delta localize=false}}</select> <select name="system.delta">{{selectOptions config.usageDieOptions selected=system.delta localize=false}}</select>
</label> </label>
<label class="span-two"> <label class="span-two">
@@ -73,6 +73,21 @@
</label> </label>
{{/if}} {{/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}} {{#if isSpell}}
<label> <label>
<span>Caracteristique</span> <span>Caracteristique</span>
@@ -144,6 +159,9 @@
<footer class="sheet-footer"> <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="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> <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}} {{#if canRollDamage}}
<button type="button" data-action="rollDamageItem" aria-label="Lancer les degats"><i class="fa-solid fa-burst"></i> Lancer les degats</button> <button type="button" data-action="rollDamageItem" aria-label="Lancer les degats"><i class="fa-solid fa-burst"></i> Lancer les degats</button>
{{/if}} {{/if}}