Ajout de la possibilité de faire des stats blocs pour tout ce qui est ennemis / créatures adverses.
Build & Push Images / build (brain) (push) Successful in 1m32s
Build & Push Images / build (core) (push) Successful in 1m52s
Build & Push Images / build-switcher (push) Successful in 20s
Build & Push Images / build (web) (push) Successful in 1m48s

Dorénavant, l'IA est capable de prendre en compte le format des quêtes, chapitres, Arc.... pour proposer des blocs plus complets.
Les ennemis sont également référençables directement dans la campagne.
Les références vers les ennemis dans la partie "donjon" est en cours d'ajout
This commit is contained in:
2026-06-12 23:38:43 +02:00
parent 809e00ce49
commit 6035df262d
105 changed files with 2652 additions and 99 deletions
@@ -103,10 +103,19 @@ export class NotebookActionCardComponent implements OnInit {
}
private createNpc(): void {
// Valeurs de fiche proposées par l'IA (clés = champs du template PNJ) ;
// la description sert de repli si le modèle n'a pas détaillé par champ.
const values: Record<string, string> = {};
for (const [key, val] of Object.entries(this.action.values ?? {})) {
if (typeof val === 'string' && val.trim()) values[key] = val;
}
if (Object.keys(values).length === 0 && this.action.description) {
values['Description'] = this.action.description;
}
this.npcService.create({
name: this.action.name,
campaignId: this.campaignId,
values: this.action.description ? { Description: this.action.description } : {}
values
}).subscribe({
next: (n) => this.done(['/campaigns', this.campaignId, 'npcs', n.id!]),
error: (e) => this.fail(e)
@@ -119,7 +128,12 @@ export class NotebookActionCardComponent implements OnInit {
description: this.action.description,
campaignId: this.campaignId,
order: this.arcs.length,
type: this.action.arcType === 'HUB' ? 'HUB' : 'LINEAR'
type: this.action.arcType === 'HUB' ? 'HUB' : 'LINEAR',
themes: this.action.themes,
stakes: this.action.stakes,
rewards: this.action.rewards,
resolution: this.action.resolution,
gmNotes: this.action.gmNotes
}).subscribe({
next: (a) => this.done(['/campaigns', this.campaignId, 'arcs', a.id!]),
error: (e) => this.fail(e)
@@ -132,7 +146,10 @@ export class NotebookActionCardComponent implements OnInit {
name: this.action.name,
description: this.action.description,
arcId: this.selectedArcId,
order
order,
playerObjectives: this.action.playerObjectives,
narrativeStakes: this.action.narrativeStakes,
gmNotes: this.action.gmNotes
}).subscribe({
next: (c) => this.done(['/campaigns', this.campaignId, 'arcs', this.selectedArcId, 'chapters', c.id!]),
error: (e) => this.fail(e)
@@ -143,9 +160,17 @@ export class NotebookActionCardComponent implements OnInit {
this.campaignService.createScene({
name: this.action.name,
description: this.action.description,
playerNarration: this.action.content,
// `content` = ancien protocole (messages archivés d'avant l'enrichissement).
playerNarration: this.action.playerNarration ?? this.action.content,
chapterId: this.selectedChapterId,
order: 0
order: 0,
location: this.action.location,
timing: this.action.timing,
atmosphere: this.action.atmosphere,
gmSecretNotes: this.action.gmSecretNotes,
choicesConsequences: this.action.choicesConsequences,
combatDifficulty: this.action.combatDifficulty,
enemies: this.action.enemies
}).subscribe({
next: (s) => this.done(
['/campaigns', this.campaignId, 'arcs', this.selectedArcId, 'chapters', this.selectedChapterId, 'scenes', s.id!]),
@@ -8,6 +8,7 @@ import { CampaignSidebarService } from '../../../services/campaign-sidebar.servi
import { CampaignService } from '../../../services/campaign.service';
import { CharacterService } from '../../../services/character.service';
import { NpcService } from '../../../services/npc.service';
import { EnemyService } from '../../../services/enemy.service';
import { NotebookArchive, NotebookDetail, NotebookSource, NotebookMessage } from '../../../services/notebook.model';
import { parseNotebookActions, NotebookAction } from '../../../services/notebook-action.model';
import { Arc, Chapter } from '../../../services/campaign.model';
@@ -66,6 +67,7 @@ export class NotebookDetailComponent implements OnInit {
private campaignService: CampaignService,
private characterService: CharacterService,
private npcService: NpcService,
private enemyService: EnemyService,
private confirmDialog: ConfirmDialogService
) {}
@@ -80,7 +82,7 @@ export class NotebookDetailComponent implements OnInit {
}
private loadTree(): void {
loadCampaignTreeData(this.campaignService, this.campaignId, this.characterService, this.npcService)
loadCampaignTreeData(this.campaignService, this.campaignId, this.characterService, this.npcService, undefined, this.enemyService)
.subscribe({
next: (data) => { this.arcs = data.arcs; this.chaptersByArc = data.chaptersByArc; },
error: () => { /* cibles indisponibles : les cartes le signaleront */ }