feat: implémentation complète du système Célestopol 1922 pour FoundryVTT v13

- DataModels (character, npc, anomaly, aspect, attribute, equipment)
- ApplicationV2 sheets (character 5 tabs, npc 3 tabs, 4 item sheets)
- DialogV2 pour les jets de dés avec phase de lune
- Templates Handlebars complets (fiches PJ/PNJ, items, jet, chat)
- Styles LESS → CSS compilé (thème vert foncé / orange CopaseticNF)
- i18n fr.json complet (clés CELESTOPOL.*)
- Point d'entrée fvtt-celestopol.mjs avec hooks init/ready
- Assets : polices CopaseticNF, images UI, icônes items
- Mise à jour copilot-instructions.md avec l'architecture réelle

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-28 09:28:34 +01:00
parent 446f9b7500
commit 64e23271df
54 changed files with 3433 additions and 4 deletions

52
templates/anomaly.hbs Normal file
View File

@@ -0,0 +1,52 @@
<div class="item-sheet anomaly">
<header class="item-header">
<div class="item-portrait" data-action="editImage" data-edit="img">
<img src="{{item.img}}" alt="{{item.name}}">
</div>
<div class="item-header-fields">
<input type="text" name="name" value="{{item.name}}" {{#unless isEditable}}disabled{{/unless}}>
<div class="item-meta">
<select name="system.subtype" {{#unless isEditable}}disabled{{/unless}}>
{{selectOptions systemFields.subtype.choices selected=system.subtype localize=true}}
</select>
<div class="item-value-field">
<label>{{localize "CELESTOPOL.Item.value"}}</label>
<input type="number" name="system.value" value="{{system.value}}" min="0" max="8"
{{#unless isEditable}}disabled{{/unless}}>
</div>
</div>
</div>
</header>
<nav class="item-tabs sheet-tabs tabs" data-group="item-tabs">
<a class="item active" data-tab="description">{{localize "CELESTOPOL.Tab.description"}}</a>
<a class="item" data-tab="technique">{{localize "CELESTOPOL.Tab.technique"}}</a>
<a class="item" data-tab="scores">{{localize "CELESTOPOL.Item.scores"}}</a>
</nav>
<section class="tab active" data-tab="description">
<div class="form-group">
{{editor system.description target="system.description" button=true editable=isEditable}}
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.reference"}}</label>
<input type="text" name="system.reference" value="{{system.reference}}"
{{#unless isEditable}}disabled{{/unless}}>
</div>
</section>
<section class="tab" data-tab="technique">
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.technique"}}</label>
{{editor system.technique target="system.technique" button=true editable=isEditable}}
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.narratif"}}</label>
{{editor system.narratif target="system.narratif" button=true editable=isEditable}}
</div>
</section>
<section class="tab" data-tab="scores">
{{> "systems/fvtt-celestopol/templates/partials/item-scores.hbs" skills=skills stats=stats}}
</section>
</div>

32
templates/aspect.hbs Normal file
View File

@@ -0,0 +1,32 @@
<div class="item-sheet aspect">
<header class="item-header">
<div class="item-portrait" data-action="editImage" data-edit="img">
<img src="{{item.img}}" alt="{{item.name}}">
</div>
<div class="item-header-fields">
<input type="text" name="name" value="{{item.name}}" {{#unless isEditable}}disabled{{/unless}}>
<div class="item-value-field">
<label>{{localize "CELESTOPOL.Item.value"}}</label>
<input type="number" name="system.value" value="{{system.value}}" min="0" max="8"
{{#unless isEditable}}disabled{{/unless}}>
</div>
</div>
</header>
<nav class="item-tabs sheet-tabs tabs" data-group="item-tabs">
<a class="item active" data-tab="description">{{localize "CELESTOPOL.Tab.description"}}</a>
<a class="item" data-tab="technique">{{localize "CELESTOPOL.Tab.technique"}}</a>
<a class="item" data-tab="scores">{{localize "CELESTOPOL.Item.scores"}}</a>
</nav>
<section class="tab active" data-tab="description">
{{editor system.description target="system.description" button=true editable=isEditable}}
<label>{{localize "CELESTOPOL.Item.reference"}}</label>
<input type="text" name="system.reference" value="{{system.reference}}" {{#unless isEditable}}disabled{{/unless}}>
</section>
<section class="tab" data-tab="technique">
{{editor system.technique target="system.technique" button=true editable=isEditable}}
{{editor system.narratif target="system.narratif" button=true editable=isEditable}}
</section>
<section class="tab" data-tab="scores">
{{> "systems/fvtt-celestopol/templates/partials/item-scores.hbs" skills=skills}}
</section>
</div>

32
templates/attribute.hbs Normal file
View File

@@ -0,0 +1,32 @@
<div class="item-sheet attribute">
<header class="item-header">
<div class="item-portrait" data-action="editImage" data-edit="img">
<img src="{{item.img}}" alt="{{item.name}}">
</div>
<div class="item-header-fields">
<input type="text" name="name" value="{{item.name}}" {{#unless isEditable}}disabled{{/unless}}>
<div class="item-value-field">
<label>{{localize "CELESTOPOL.Item.value"}}</label>
<input type="number" name="system.value" value="{{system.value}}" min="0" max="8"
{{#unless isEditable}}disabled{{/unless}}>
</div>
</div>
</header>
<nav class="item-tabs sheet-tabs tabs" data-group="item-tabs">
<a class="item active" data-tab="description">{{localize "CELESTOPOL.Tab.description"}}</a>
<a class="item" data-tab="technique">{{localize "CELESTOPOL.Tab.technique"}}</a>
<a class="item" data-tab="scores">{{localize "CELESTOPOL.Item.scores"}}</a>
</nav>
<section class="tab active" data-tab="description">
{{editor system.description target="system.description" button=true editable=isEditable}}
<label>{{localize "CELESTOPOL.Item.reference"}}</label>
<input type="text" name="system.reference" value="{{system.reference}}" {{#unless isEditable}}disabled{{/unless}}>
</section>
<section class="tab" data-tab="technique">
{{editor system.technique target="system.technique" button=true editable=isEditable}}
{{editor system.narratif target="system.narratif" button=true editable=isEditable}}
</section>
<section class="tab" data-tab="scores">
{{> "systems/fvtt-celestopol/templates/partials/item-scores.hbs" skills=skills}}
</section>
</div>

View File

@@ -0,0 +1,42 @@
<div class="tab biography" data-group="sheet" data-tab="biography">
{{!-- Équipements --}}
<div class="equipments-section">
<div class="section-header">
<span>{{localize "CELESTOPOL.Item.equipments"}}</span>
{{#if isEditMode}}
<a data-action="createEquipment" title="{{localize 'CELESTOPOL.Item.newEquipment'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</div>
{{#each equipments as |item|}}
<div class="item-row equipment" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img src="{{item.img}}" class="item-icon">
<span class="item-name">{{item.name}}</span>
<span class="item-qty">×{{item.system.quantity}}</span>
<div class="item-controls">
<a data-action="edit" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
{{#if ../isEditMode}}<a data-action="delete" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>{{/if}}
</div>
</div>
{{/each}}
</div>
{{!-- Description / Biographie --}}
<div class="biography-section">
<div class="section-header">{{localize "CELESTOPOL.Actor.description"}}</div>
{{#if isEditMode}}
{{editor system.description target="system.description" button=true editable=isEditable}}
{{else}}
<div class="enriched-html">{{{enrichedDescription}}}</div>
{{/if}}
</div>
{{!-- Notes --}}
<div class="notes-section">
<div class="section-header">{{localize "CELESTOPOL.Actor.notes"}}</div>
{{#if isEditMode}}
{{editor system.notes target="system.notes" button=true editable=isEditable}}
{{else}}
<div class="enriched-html">{{{enrichedNotes}}}</div>
{{/if}}
</div>
</div>

View File

@@ -0,0 +1,77 @@
<div class="tab blessures" data-group="sheet" data-tab="blessures">
{{!-- Blessures --}}
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.blessures"}}</span>
<span class="wound-malus">{{localize "CELESTOPOL.Track.currentMalus"}} :
<strong>{{system.blessures.lvl}}</strong>
</span>
</div>
<div class="track-boxes">
{{#each (array "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8") as |key idx|}}
<div class="track-box {{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.blessures.{{key}}.checked"
{{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}>
<label class="box-label">{{lookup ../system.blessures key 'malus'}}</label>
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.blessures.lvl" value="{{system.blessures.lvl}}" min="0" max="8">
{{else}}
<span>{{system.blessures.lvl}}</span>
{{/if}}
</div>
</section>
{{!-- Destin --}}
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.destin"}}</span>
</div>
<div class="track-boxes destin-boxes">
{{#each (array "d1" "d2" "d3" "d4" "d5" "d6" "d7" "d8") as |key|}}
<div class="track-box destiny {{#if (lookup ../system.destin key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.destin.{{key}}.checked"
{{#if (lookup ../system.destin key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}>
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.destin.lvl" value="{{system.destin.lvl}}" min="0" max="8">
{{else}}
<span>{{system.destin.lvl}}</span>
{{/if}}
</div>
</section>
{{!-- Spleen --}}
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.spleen"}}</span>
</div>
<div class="track-boxes spleen-boxes">
{{#each (array "s1" "s2" "s3" "s4" "s5" "s6" "s7" "s8") as |key|}}
<div class="track-box spleen {{#if (lookup ../system.spleen key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.spleen.{{key}}.checked"
{{#if (lookup ../system.spleen key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}>
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.spleen.lvl" value="{{system.spleen.lvl}}" min="0" max="8">
{{else}}
<span>{{system.spleen.lvl}}</span>
{{/if}}
</div>
</section>
</div>

View File

@@ -0,0 +1,102 @@
<div class="tab competences" data-group="sheet" data-tab="competences">
{{!-- Grille des 4 stats × 4 compétences --}}
<div class="stats-grid">
{{#each stats as |stat statId|}}
<div class="stat-block">
<div class="stat-header">
<span class="stat-name">{{localize stat.label}}</span>
<div class="stat-res">
<label>{{localize "CELESTOPOL.Stat.res"}}</label>
{{#if ../isEditMode}}
<input type="number" name="system.stats.{{statId}}.res" value="{{lookup ../system.stats statId 'res'}}" min="0" max="8" class="stat-res-input">
{{else}}
<span class="stat-res-value">{{lookup ../system.stats statId 'res'}}</span>
{{/if}}
</div>
</div>
<div class="skills-list">
{{#each (lookup ../skills statId) as |skill skillId|}}
<div class="skill-row {{#unless ../isEditMode}}rollable{{/unless}}"
data-stat-id="{{statId}}" data-skill-id="{{skillId}}"
title="{{#unless ../isEditMode}}{{localize 'CELESTOPOL.Roll.clickToRoll'}}{{/unless}}">
<span class="skill-name">{{localize skill.label}}</span>
{{#if ../isEditMode}}
<input type="number" name="system.stats.{{statId}}.{{skillId}}.value"
value="{{lookup (lookup ../system.stats statId) skillId 'value'}}"
min="0" max="8" class="skill-value-input">
{{else}}
<span class="skill-value">{{lookup (lookup ../system.stats statId) skillId 'value'}}</span>
{{/if}}
</div>
{{/each}}
</div>
</div>
{{/each}}
</div>
{{!-- Items : Anomalies, Aspects, Attributs --}}
<div class="items-section">
{{!-- Anomalies --}}
<div class="items-group">
<div class="items-header">
<span>{{localize "CELESTOPOL.Item.anomalies"}}</span>
{{#if isEditMode}}
<a data-action="createAnomaly" title="{{localize 'CELESTOPOL.Item.newAnomaly'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</div>
{{#each anomalies as |item|}}
<div class="item-row" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img src="{{item.img}}" class="item-icon" alt="{{item.name}}">
<span class="item-name">{{item.name}}</span>
<span class="item-value">{{item.system.value}}</span>
<div class="item-controls">
<a data-action="edit" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
{{#if ../isEditMode}}<a data-action="delete" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>{{/if}}
</div>
</div>
{{/each}}
</div>
{{!-- Aspects --}}
<div class="items-group">
<div class="items-header">
<span>{{localize "CELESTOPOL.Item.aspects"}}</span>
{{#if isEditMode}}
<a data-action="createAspect" title="{{localize 'CELESTOPOL.Item.newAspect'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</div>
{{#each aspects as |item|}}
<div class="item-row" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img src="{{item.img}}" class="item-icon" alt="{{item.name}}">
<span class="item-name">{{item.name}}</span>
<span class="item-value">{{item.system.value}}</span>
<div class="item-controls">
<a data-action="edit" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
{{#if ../isEditMode}}<a data-action="delete" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>{{/if}}
</div>
</div>
{{/each}}
</div>
{{!-- Attributs --}}
<div class="items-group">
<div class="items-header">
<span>{{localize "CELESTOPOL.Item.attributes"}}</span>
{{#if isEditMode}}
<a data-action="createAttribute" title="{{localize 'CELESTOPOL.Item.newAttribute'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</div>
{{#each attributes as |item|}}
<div class="item-row" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img src="{{item.img}}" class="item-icon" alt="{{item.name}}">
<span class="item-name">{{item.name}}</span>
<span class="item-value">{{item.system.value}}</span>
<div class="item-controls">
<a data-action="edit" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
{{#if ../isEditMode}}<a data-action="delete" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>{{/if}}
</div>
</div>
{{/each}}
</div>
</div>
</div>

View File

@@ -0,0 +1,63 @@
<div class="tab factions" data-group="sheet" data-tab="factions">
<table class="factions-table">
<thead>
<tr>
<th>{{localize "CELESTOPOL.Faction.label"}}</th>
<th>{{localize "CELESTOPOL.Faction.score"}}</th>
</tr>
</thead>
<tbody>
{{#each factions as |faction factionId|}}
<tr class="faction-row">
<td class="faction-name">{{localize faction.label}}</td>
<td class="faction-value">
{{#if ../isEditMode}}
<input type="number" name="system.factions.{{factionId}}.value"
value="{{lookup ../system.factions factionId 'value'}}" min="0">
{{else}}
<span>{{lookup ../system.factions factionId 'value'}}</span>
{{/if}}
</td>
</tr>
{{/each}}
{{!-- Factions personnalisées --}}
<tr class="faction-row custom">
<td>
{{#if isEditMode}}
<input type="text" name="system.factions.perso1.label"
value="{{system.factions.perso1.label}}"
placeholder="{{localize 'CELESTOPOL.Faction.custom'}}">
{{else}}
<span>{{#if system.factions.perso1.label}}{{system.factions.perso1.label}}{{else}}{{/if}}</span>
{{/if}}
</td>
<td>
{{#if isEditMode}}
<input type="number" name="system.factions.perso1.value" value="{{system.factions.perso1.value}}" min="0">
{{else}}
<span>{{system.factions.perso1.value}}</span>
{{/if}}
</td>
</tr>
<tr class="faction-row custom">
<td>
{{#if isEditMode}}
<input type="text" name="system.factions.perso2.label"
value="{{system.factions.perso2.label}}"
placeholder="{{localize 'CELESTOPOL.Faction.custom'}}">
{{else}}
<span>{{#if system.factions.perso2.label}}{{system.factions.perso2.label}}{{else}}{{/if}}</span>
{{/if}}
</td>
<td>
{{#if isEditMode}}
<input type="number" name="system.factions.perso2.value" value="{{system.factions.perso2.value}}" min="0">
{{else}}
<span>{{system.factions.perso2.value}}</span>
{{/if}}
</td>
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,62 @@
<div class="character-main sheet-part">
<header class="sheet-header">
<div class="portrait" data-action="editImage" data-edit="img">
<img src="{{actor.img}}" alt="{{actor.name}}" class="actor-portrait {{#unless isEditMode}}click-to-edit{{/unless}}">
</div>
<div class="header-fields">
<div class="charname">
{{#if isEditMode}}
<input type="text" name="name" value="{{actor.name}}" placeholder="{{localize 'CELESTOPOL.Actor.name'}}">
{{else}}
<h1 class="actor-name">{{actor.name}}</h1>
{{/if}}
</div>
<div class="concept-row">
{{#if isEditMode}}
<input type="text" name="system.concept" value="{{system.concept}}" placeholder="{{localize 'CELESTOPOL.Actor.concept'}}">
{{else}}
<span class="concept-display">{{system.concept}}</span>
{{/if}}
</div>
<div class="header-stats-row">
<div class="header-stat initiative">
<label>{{localize "CELESTOPOL.Actor.initiative"}}</label>
<span class="stat-value">{{system.initiative}}</span>
</div>
<div class="header-stat anomaly">
<label>{{localize "CELESTOPOL.Actor.anomaly"}}</label>
{{#if isEditMode}}
<select name="system.anomaly.type">
{{selectOptions systemFields.anomaly.fields.type.choices selected=system.anomaly.type localize=true}}
</select>
<input type="number" name="system.anomaly.value" value="{{system.anomaly.value}}" min="0" max="8" class="anomaly-value">
{{else}}
<span>{{localize system.anomaly.type}} {{#if system.anomaly.value}}({{system.anomaly.value}}){{/if}}</span>
{{/if}}
</div>
</div>
{{!-- Attributs personnage (Entregent, Fortune, Rêve, Vision) --}}
<div class="perso-attributs">
{{#each system.attributs as |attr key|}}
<div class="perso-attr">
<label>{{localize (concat "CELESTOPOL.Attribut." key)}}</label>
{{#if ../isEditMode}}
<input type="number" name="system.attributs.{{key}}.value" value="{{attr.value}}" min="0" class="attr-val">
<span>/</span>
<input type="number" name="system.attributs.{{key}}.max" value="{{attr.max}}" min="0" class="attr-max">
{{else}}
<span class="attr-display">{{attr.value}} / {{attr.max}}</span>
{{/if}}
</div>
{{/each}}
</div>
</div>
<div class="header-buttons">
<a class="toggle-sheet" data-action="toggleSheet" title="{{#if isEditMode}}{{localize 'CELESTOPOL.Sheet.playMode'}}{{else}}{{localize 'CELESTOPOL.Sheet.editMode'}}{{/if}}">
<i class="fas {{#if isEditMode}}fa-eye{{else}}fa-edit{{/if}}"></i>
</a>
</div>
</header>
</div>

View File

@@ -0,0 +1,49 @@
<div class="celestopol chat-roll {{resultClass}}">
<div class="roll-header">
{{#if actorImg}}
<img src="{{actorImg}}" class="actor-img" alt="{{actorName}}">
{{/if}}
<div class="roll-info">
<span class="actor-name">{{actorName}}</span>
<span class="skill-info">{{statLabel}} {{skillLabel}}</span>
</div>
</div>
<div class="roll-details">
<div class="dice-results">
{{#each diceResults as |die|}}
<span class="die d6">{{die}}</span>
{{/each}}
</div>
{{#if moonBonus}}
<div class="bonus-line">
<span class="bonus-label">{{localize "CELESTOPOL.Roll.moonBonus"}} ({{moonPhaseLabel}}) :</span>
<span class="bonus-value">+{{moonBonus}}</span>
</div>
{{/if}}
{{#if modifier}}
<div class="bonus-line">
<span class="bonus-label">{{localize "CELESTOPOL.Roll.modifier"}} :</span>
<span class="bonus-value">{{#if (gt modifier 0)}}+{{/if}}{{modifier}}</span>
</div>
{{/if}}
<div class="roll-total-line">
<span class="total-label">{{localize "CELESTOPOL.Roll.total"}}</span>
<span class="total-value">{{total}}</span>
<span class="vs-difficulty">vs {{difficulty}}</span>
</div>
</div>
<div class="roll-result-banner {{resultClass}}">
{{#if success}}
<span class="result-label success">{{localize "CELESTOPOL.Roll.success"}}</span>
{{#if criticalSuccess}}<span class="critical">{{localize "CELESTOPOL.Roll.criticalSuccess"}}</span>{{/if}}
{{else}}
<span class="result-label failure">{{localize "CELESTOPOL.Roll.failure"}}</span>
{{#if criticalFailure}}<span class="critical">{{localize "CELESTOPOL.Roll.criticalFailure"}}</span>{{/if}}
{{/if}}
</div>
</div>

56
templates/equipment.hbs Normal file
View File

@@ -0,0 +1,56 @@
<div class="item-sheet equipment">
<header class="item-header">
<div class="item-portrait" data-action="editImage" data-edit="img">
<img src="{{item.img}}" alt="{{item.name}}">
</div>
<div class="item-header-fields">
<input type="text" name="name" value="{{item.name}}" {{#unless isEditable}}disabled{{/unless}}>
<div class="item-meta">
<select name="system.subtype" {{#unless isEditable}}disabled{{/unless}}>
{{selectOptions systemFields.subtype.choices selected=system.subtype localize=true}}
</select>
<div class="item-qty">
<label>{{localize "CELESTOPOL.Item.quantity"}}</label>
<input type="number" name="system.quantity" value="{{system.quantity}}" min="0"
{{#unless isEditable}}disabled{{/unless}}>
</div>
</div>
</div>
</header>
<div class="form-grid equipment-stats">
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.damage"}}</label>
<input type="text" name="system.damage" value="{{system.damage}}" {{#unless isEditable}}disabled{{/unless}}>
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.range"}}</label>
<input type="text" name="system.range" value="{{system.range}}" {{#unless isEditable}}disabled{{/unless}}>
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.protection"}}</label>
<input type="text" name="system.protection" value="{{system.protection}}" {{#unless isEditable}}disabled{{/unless}}>
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.speed"}}</label>
<input type="text" name="system.speed" value="{{system.speed}}" {{#unless isEditable}}disabled{{/unless}}>
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.crew"}}</label>
<input type="text" name="system.crew" value="{{system.crew}}" {{#unless isEditable}}disabled{{/unless}}>
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.weight"}}</label>
<input type="number" name="system.weight" value="{{system.weight}}" min="0"
{{#unless isEditable}}disabled{{/unless}}>
</div>
</div>
<div class="form-group description-group">
{{editor system.description target="system.description" button=true editable=isEditable}}
</div>
<div class="form-group">
<label>{{localize "CELESTOPOL.Item.reference"}}</label>
<input type="text" name="system.reference" value="{{system.reference}}" {{#unless isEditable}}disabled{{/unless}}>
</div>
</div>

View File

@@ -0,0 +1,34 @@
<div class="tab blessures" data-group="sheet" data-tab="blessures">
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.blessures"}}</span>
</div>
<div class="track-boxes">
{{#each (array "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8") as |key|}}
<div class="track-box {{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.blessures.{{key}}.checked"
{{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}>
<label class="box-label">{{lookup ../system.blessures key 'malus'}}</label>
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.blessures.lvl" value="{{system.blessures.lvl}}" min="0" max="8">
{{else}}
<span>{{system.blessures.lvl}}</span>
{{/if}}
</div>
</section>
{{!-- Description --}}
<div class="description-section">
{{#if isEditMode}}
{{editor system.description target="system.description" button=true editable=isEditable}}
{{else}}
<div class="enriched-html">{{{enrichedDescription}}}</div>
{{/if}}
</div>
</div>

View File

@@ -0,0 +1,36 @@
<div class="tab competences" data-group="sheet" data-tab="competences">
<div class="stats-grid">
{{#each stats as |stat statId|}}
<div class="stat-block">
<div class="stat-header">
<span class="stat-name">{{localize stat.label}}</span>
<div class="stat-res">
<label>{{localize "CELESTOPOL.Stat.res"}}</label>
{{#if ../isEditMode}}
<input type="number" name="system.stats.{{statId}}.res"
value="{{lookup ../system.stats statId 'res'}}" min="0" max="8">
{{else}}
<span class="stat-res-value">{{lookup ../system.stats statId 'res'}}</span>
<span class="stat-actuel">({{lookup ../system.stats statId 'actuel'}})</span>
{{/if}}
</div>
</div>
<div class="skills-list">
{{#each (lookup ../skills statId) as |skill skillId|}}
<div class="skill-row {{#unless ../isEditMode}}rollable{{/unless}}"
data-stat-id="{{statId}}" data-skill-id="{{skillId}}">
<span class="skill-name">{{localize skill.label}}</span>
{{#if ../isEditMode}}
<input type="number" name="system.stats.{{statId}}.{{skillId}}.value"
value="{{lookup (lookup ../system.stats statId) skillId 'value'}}"
min="0" max="8" class="skill-value-input">
{{else}}
<span class="skill-value">{{lookup (lookup ../system.stats statId) skillId 'value'}}</span>
{{/if}}
</div>
{{/each}}
</div>
</div>
{{/each}}
</div>
</div>

46
templates/npc-main.hbs Normal file
View File

@@ -0,0 +1,46 @@
<div class="npc-main sheet-part">
<header class="sheet-header">
<div class="portrait" data-action="editImage" data-edit="img">
<img src="{{actor.img}}" alt="{{actor.name}}" class="actor-portrait">
</div>
<div class="header-fields">
<div class="charname">
{{#if isEditMode}}
<input type="text" name="name" value="{{actor.name}}">
{{else}}
<h1 class="actor-name">{{actor.name}}</h1>
{{/if}}
</div>
<div class="concept-row">
{{#if isEditMode}}
<input type="text" name="system.concept" value="{{system.concept}}"
placeholder="{{localize 'CELESTOPOL.Actor.concept'}}">
{{else}}
<span class="concept-display">{{system.concept}}</span>
{{/if}}
</div>
<div class="header-stats-row">
<div class="header-stat">
<label>{{localize "CELESTOPOL.Actor.initiative"}}</label>
<span>{{system.initiative}}</span>
</div>
<div class="header-stat">
<label>{{localize "CELESTOPOL.Actor.anomaly"}}</label>
{{#if isEditMode}}
<select name="system.anomaly.type">
{{selectOptions systemFields.anomaly.fields.type.choices selected=system.anomaly.type localize=true}}
</select>
<input type="number" name="system.anomaly.value" value="{{system.anomaly.value}}" min="0" max="8" class="small-input">
{{else}}
<span>{{localize system.anomaly.type}} {{#if system.anomaly.value}}({{system.anomaly.value}}){{/if}}</span>
{{/if}}
</div>
</div>
</div>
<div class="header-buttons">
<a data-action="toggleSheet">
<i class="fas {{#if isEditMode}}fa-eye{{else}}fa-edit{{/if}}"></i>
</a>
</div>
</header>
</div>

View File

@@ -0,0 +1,26 @@
{{!-- Template partagé pour les scores bonus/malus d'un item par compétence --}}
<div class="scores-section">
<div class="scores-header">
<span>{{localize "CELESTOPOL.Item.scores"}}</span>
</div>
<div class="scores-grid">
{{#each skills as |statSkills statId|}}
<div class="scores-stat-col">
<div class="scores-stat-name">{{localize (concat "CELESTOPOL.Stat." statId)}}</div>
{{#each statSkills as |skill skillId|}}
<div class="score-row">
<span class="score-skill-name">{{localize skill.label}}</span>
{{#if ../isEditable}}
<input type="number" name="system.scores.{{statId}}.{{skillId}}.bonus"
value="{{lookup (lookup (lookup ../system.scores statId) skillId) 'bonus'}}"
min="0" class="score-bonus" title="+bonus">
<input type="number" name="system.scores.{{statId}}.{{skillId}}.malus"
value="{{lookup (lookup (lookup ../system.scores statId) skillId) 'malus'}}"
min="0" class="score-malus" title="-malus">
{{/if}}
</div>
{{/each}}
</div>
{{/each}}
</div>
</div>

40
templates/roll-dialog.hbs Normal file
View File

@@ -0,0 +1,40 @@
<form class="roll-dialog celestopol">
<div class="roll-title">
<span class="stat-label">{{statLabel}}</span>
<span class="separator"></span>
<span class="skill-label">{{skillLabel}}</span>
</div>
<div class="form-group">
<label for="moonPhase">{{localize "CELESTOPOL.Roll.moonPhase"}}</label>
<select id="moonPhase" name="moonPhase">
{{#each moonPhases as |phase key|}}
<option value="{{key}}" {{#if (eq key ../currentMoonPhase)}}selected{{/if}}>
{{localize phase.label}} {{#if phase.bonus}}(+{{phase.bonus}}){{else}}(+0){{/if}}
</option>
{{/each}}
</select>
</div>
<div class="form-group">
<label for="difficulty">{{localize "CELESTOPOL.Roll.difficulty"}}</label>
<select id="difficulty" name="difficulty">
{{#each difficulties as |diff key|}}
<option value="{{diff.threshold}}" {{#if (eq diff.threshold ../currentDifficulty)}}selected{{/if}}>
{{localize diff.label}} ({{diff.threshold}})
</option>
{{/each}}
</select>
</div>
<div class="form-group">
<label for="modifier">{{localize "CELESTOPOL.Roll.modifier"}}</label>
<input type="number" id="modifier" name="modifier" value="0">
</div>
<div class="dice-preview">
<span>{{localize "CELESTOPOL.Roll.nbDice"}}</span>
<span class="nb-dice">{{nbDice}}</span>
<span>d6</span>
</div>
</form>