mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-18 12:13:27 +02:00
GM notes now have a monster summary table.
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
<h1 id="gm-monsters">Monsters</h1>
|
||||
|
||||
<!-- Monster summary table -->
|
||||
<table class="monster-table">
|
||||
<tr>
|
||||
<th>Monster</th>
|
||||
<th>HP</th>
|
||||
<th>AC</th>
|
||||
<th>Init.</th>
|
||||
</tr>
|
||||
[% for monster in monsters|sort(attribute='name') %]
|
||||
<tr>
|
||||
<td>[[ monster.name ]]</td>
|
||||
<td>[[ monster.hp_max ]]</td>
|
||||
<td>[[ monster.armor_class ]]</td>
|
||||
<td>[[ monster.initiative ]]</td>
|
||||
</tr>
|
||||
[% endfor %]
|
||||
</table>
|
||||
|
||||
[% for monster in monsters|sort(attribute='name') %]
|
||||
<div class="stat-block">
|
||||
<h2 id="gm-monsters-[[ monster.name|to_heading_id ]]">[[ monster.name ]]</h2>
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
\section*{Monsters}
|
||||
|
||||
[% if use_dnd_decorations %]
|
||||
\begin{DndTable}{r c c c}
|
||||
Name & HP & AC & Init. \\
|
||||
[% for monster in monsters|sort(attribute='name') %]
|
||||
[[ monster.name ]] & [[ monster.hp_max ]] & [[ monster.armor_class ]] & [[ monster.initiative ]] \\
|
||||
[% endfor %]
|
||||
\end{DndTable}
|
||||
|
||||
[% for monster in monsters|sort(attribute='name') %]
|
||||
\pdfbookmark[1]{[[ monster.name ]]}{Monsters - [[ monster.name ]]}
|
||||
\begin{DndMonster}{[[ monster.name ]]}
|
||||
@@ -40,6 +47,14 @@
|
||||
[% endfor %]
|
||||
|
||||
[% else %]
|
||||
\begin{tabular}{r | c c c}
|
||||
Name & HP & AC & Init. \\
|
||||
\hline\hline
|
||||
[% for monster in monsters|sort(attribute='name') %]
|
||||
[[ monster.name ]] & [[ monster.hp_max ]] & [[ monster.armor_class ]] & [[ monster.initiative ]] \\
|
||||
[% endfor %]
|
||||
\end{tabular}
|
||||
|
||||
[% for monster in monsters|sort(attribute='name') %]
|
||||
{
|
||||
\pdfbookmark[1]{[[ monster.name ]]}{Monsters - [[ monster.name ]]}
|
||||
|
||||
@@ -157,9 +157,11 @@ class HtmlCreatorTestCase(unittest.TestCase):
|
||||
monsters_ = [monsters.Priest()]
|
||||
html = make_sheets.create_monsters_content(monsters=monsters_, suffix="html")
|
||||
self.assertIn(r"Priest", html)
|
||||
# Check extended properties
|
||||
monsters_ = [VashtaNerada()]
|
||||
html = make_sheets.create_monsters_content(monsters=monsters_, suffix="html")
|
||||
# Check summary table
|
||||
self.assertIn("monster-table", html)
|
||||
# Check extended properties
|
||||
self.assertIn(r"Vashta Nerada", html)
|
||||
self.assertIn(r"35", html)
|
||||
self.assertIn(r"45 fly", html)
|
||||
@@ -264,9 +266,11 @@ class TexCreatorTestCase(unittest.TestCase):
|
||||
monsters_ = [monsters.GiantEagle()]
|
||||
tex = make_sheets.create_monsters_content(monsters=monsters_, suffix="tex")
|
||||
self.assertIn(r"Giant Eagle", tex)
|
||||
# Check extended properties
|
||||
monsters_ = [VashtaNerada()]
|
||||
tex = make_sheets.create_monsters_content(monsters=monsters_, suffix="tex")
|
||||
# Check that the monster summary table exists
|
||||
self.assertIn(r"Vashta Nerada & 10 & 10 & +0", tex)
|
||||
# Check extended properties
|
||||
self.assertIn(r"Vashta Nerada", tex)
|
||||
self.assertIn(r"35", tex)
|
||||
self.assertIn(r"45 fly", tex)
|
||||
|
||||
Reference in New Issue
Block a user