Possibilité d'importer un template de monstre depuis le systeme qu'on utilise sur Foundry pour forcer le template. Lors de l'export, le monstre est automatiquement adapté comme ça.
à l'import des monstres depuis foundry : on garde la structure originelle utilisée sur foundry également
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
@if (g.folder) {
|
||||
<h2 class="sbl-folder">
|
||||
<lucide-icon [img]="Folder" [size]="14"></lucide-icon>
|
||||
{{ g.folder }}
|
||||
{{ g.folder.split('/').join(' / ') }}
|
||||
<span class="sbl-folder-count">{{ g.enemies.length }}</span>
|
||||
</h2>
|
||||
} @else if (groups.length > 1) {
|
||||
|
||||
@@ -12,4 +12,21 @@
|
||||
</div>
|
||||
|
||||
<app-persona-view [persona]="enemy" [templateFields]="templateFields" [subtitle]="subtitle"></app-persona-view>
|
||||
|
||||
@if (hasFoundryStats) {
|
||||
<section class="foundry-stats">
|
||||
<h2>{{ 'enemyView.foundryStatsTitle' | translate }}</h2>
|
||||
<p class="foundry-stats-hint">{{ 'enemyView.foundryStatsHint' | translate }}</p>
|
||||
<table class="foundry-stats-table">
|
||||
<tbody>
|
||||
@for (s of foundryStatsEntries; track s.key) {
|
||||
<tr>
|
||||
<th>{{ s.key }}</th>
|
||||
<td>{{ s.value }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -50,6 +50,49 @@
|
||||
color: #d8b4fe;
|
||||
}
|
||||
|
||||
// Snapshot des stats importées de Foundry (lecture seule, figé).
|
||||
.foundry-stats {
|
||||
max-width: 1100px;
|
||||
margin: 28px auto 0;
|
||||
padding: 0 32px;
|
||||
|
||||
h2 {
|
||||
font-size: 1rem;
|
||||
color: #d1a878;
|
||||
margin: 0 0 0.25rem;
|
||||
}
|
||||
|
||||
.foundry-stats-hint {
|
||||
margin: 0 0 0.75rem;
|
||||
color: #9aa0aa;
|
||||
font-size: 0.8rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.foundry-stats-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.82rem;
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 0.3rem 0.6rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
width: 45%;
|
||||
color: #9aa0aa;
|
||||
font-weight: 500;
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
td { color: #e0e0e0; }
|
||||
}
|
||||
}
|
||||
|
||||
// Pages de Lore liées au PNJ — chips cliquables sous la fiche.
|
||||
.nv-lore-links {
|
||||
max-width: 1100px;
|
||||
|
||||
@@ -77,6 +77,16 @@ export class EnemyViewComponent implements OnInit, OnDestroy {
|
||||
this.paramsSub?.unsubscribe();
|
||||
}
|
||||
|
||||
/** Stats importées de Foundry (snapshot figé), triées pour affichage. */
|
||||
get foundryStatsEntries(): { key: string; value: string }[] {
|
||||
const s = this.enemy?.foundryStats ?? {};
|
||||
return Object.keys(s).sort().map(key => ({ key, value: s[key] }));
|
||||
}
|
||||
|
||||
get hasFoundryStats(): boolean {
|
||||
return this.foundryStatsEntries.length > 0;
|
||||
}
|
||||
|
||||
/** Sous-titre de la fiche : niveau + dossier (« Niveau 8 · Démons »). */
|
||||
get subtitle(): string {
|
||||
const parts: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user