Add Enemies section: D&D stat-block table + detail/edit pages

- Enemy entity: full 5e stat block (size/type/subtype/alignment, AC, HP,
  speed, six ability scores, CR/XP/prof, saves/skills/senses/languages,
  damage & condition modifiers, traits/actions/bonus/reactions/legendary,
  description, source) plus a DM game-notes field and updated_at.
- CreatureSize / CreatureType enums.
- /enemies: server-side DataTable (name, size, type, CR, AC, HP, notes),
  "Add enemy" button.
- /enemies/{id}: stat block rendered read-only + editable game notes.
- /enemies/new and /enemies/{id}/edit: the full stat-block form (no notes).
- "Enemies" nav item between NPC's and Storyline.
- Table left empty on purpose.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-06 16:36:17 +02:00
co-authored by Claude Sonnet 5
parent 574d903715
commit 7870be9dfb
12 changed files with 1234 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
{% extends 'base.html.twig' %}
{% block title %}Enemies · dmtools{% endblock %}
{% block body %}
<div class="d-flex justify-content-between align-items-center mb-3">
<h1 class="h3 mb-0">Enemies</h1>
<a href="{{ path('app_enemies_new') }}" class="btn btn-primary btn-sm">Add enemy</a>
</div>
<div class="card shadow-sm">
<div class="card-body">
<table class="table table-striped table-hover align-middle datatable w-100"
data-datatable-src="{{ path('app_enemies_data') }}"
data-row-url="{{ path('app_enemies') }}/__ID__"
data-datatable-options='{"order": [[0, "asc"]]}'>
<thead>
<tr>
<th data-data="name" data-format="link">Name</th>
<th data-data="size">Size</th>
<th data-data="type">Type</th>
<th data-data="challengeRating">CR</th>
<th data-data="armorClass">AC</th>
<th data-data="hitPoints">HP</th>
<th data-data="gameNotes" data-format="truncate" data-orderable="false">Game notes</th>
<th data-data="updatedAt">Updated</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
{% endblock %}