diff --git a/dungeonsheets/forms/MSavage_template.tex b/dungeonsheets/forms/MSavage_template.tex index 4c378dd..f18ec3d 100644 --- a/dungeonsheets/forms/MSavage_template.tex +++ b/dungeonsheets/forms/MSavage_template.tex @@ -101,16 +101,16 @@ \Initiative{[[ char.initiative ]]} \Speed{[[ char.speed ]]} \MaxHitPoints{[[ char.hp_max ]]} -\CurrentHitPoints{[[ char.hp_current ]]} -\TemporaryHitPoints{[[ char.hp_temp ]]} +[% if char.hp_current %]\CurrentHitPoints{[[ char.hp_current ]]}[% endif %] +[% if char.hp_temp %]\TemporaryHitPoints{[[ char.hp_temp ]]}[% endif %] \MaxHitDice{[[ char.hit_dice.replace(" ","") ]]} \CurrentHitDice{[[ char.hit_dice_current.replace(" ", "") ]]} -\CP{[[ char.cp ]]} -\SP{[[ char.sp ]]} -\GP{[[ char.gp ]]} -\EP{[[ char.ep ]]} -\PP{[[ char.pp ]]} +\CP{[% if char.cp > 0 %][[ char.cp ]][% endif %]} +\SP{[% if char.sp > 0 %][[ char.sp ]][% endif %]} +\GP{[% if char.ep > 0 %][[ char.ep ]][% endif %]} +\EP{[% if char.gp > 0 %][[ char.gp ]][% endif %]} +\PP{[% if char.pp > 0 %][[ char.pp ]][% endif %]} [% for w in char.weapons %] \AddWeapon{[[ w.name ]]}{[[ "{:+d}".format(w.attack_modifier) ]]}{[[ "{}/{}".format(w.damage, w.damage_type) ]]} diff --git a/dungeonsheets/forms/companions_template.html b/dungeonsheets/forms/companions_template.html new file mode 100644 index 0000000..8a2df39 --- /dev/null +++ b/dungeonsheets/forms/companions_template.html @@ -0,0 +1,91 @@ +

Companions

+ +[% for monster in monsters|sort(attribute='name') %] +
+

[[ monster.name ]]

+ + [% if monster.description %] +

[[ monster.description ]]

+ [% endif %] + + + + + + + + + + + + + +
Armor ClassHit PointsSpeed
[[ monster.armor_class ]][[ monster.hp_max ]] ([[ monster.hit_dice ]])[[ monster.speed ]][% if monster.swim_speed %], + [[ monster.swim_speed ]] swim[% endif %][% if monster.fly_speed %], + [[ monster.fly_speed ]] fly[% endif %][% if monster.burrow_speed %], + [[ monster.burrow_speed ]] burrow[% endif %]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
STRDEXCONINTWISCHA
[[ monster.strength.value ]][[ monster.dexterity.value ]][[ monster.constitution.value ]][[ monster.intelligence.value ]][[ monster.wisdom.value ]][[ monster.charisma.value ]]
([[ monster.strength.modifier|mod_str ]])([[ monster.dexterity.modifier|mod_str ]])([[ monster.constitution.modifier|mod_str ]])([[ monster.intelligence.modifier|mod_str ]])([[ monster.wisdom.modifier|mod_str ]])([[ monster.charisma.modifier|mod_str ]])
+ +
+ [% if monster.skills != "" %]
Skills
[[ monster.skills ]]
[% endif %] +
Senses
[% if monster.senses != "" %][[ monster.senses ]][% else %]--[% endif %]
+
Languages
[% if monster.languages != "" %][[ monster.languages ]][% else %]--[% endif %]
+ [% if monster.damage_resistances != "" %]
Damage Resistances
[[ monster.damage_resistances ]]
[% endif %] + [% if monster.damage_immunities != "" %]
Damage Immunities
[[ monster.damage_immunities ]]
[% endif %] + [% if monster.damage_vulnerabilities != "" %]
Damage Vulnerabilities
[[ monster.damage_vulnerabilities ]]
[% endif %] + [% if monster.condition_immunities != "" %]
Condition Immunuties
[[ monster.condition_immunities ]]
[% endif %] + [% if monster.saving_throws != "" %]
Saving Throws
[[ monster.saving_throws ]]
[% endif %] +
Challenge
[[ monster.challenge_rating ]] ([[ monster.challenge_rating | challenge_rating_to_xp ]] XP)
+
+ + [% if monster.spells | length > 0 %] +
+ [% for level, spells in monster.spells | groupby('level') %] +
[% if level == 0 %]Cantrips[% else %]Level [[ level ]][% endif %]
+
+ [% for spell in spells %][% if not loop.first %], [% endif %] + [[ spell.name ]][% endfor %] +
+ [% endfor %] +
+ [% endif %] + + [[ monster.__doc__ | rst_to_html(top_heading_level=2) ]] + +
+[% endfor %] + +

Monster Spells

+ +[% from "spellblock.html" import spellblock %] + +[% for spell in spell_list | sort(attribute="name") %] +[[ spellblock(spell, id_base="monster-spells") ]] +[% endfor %] diff --git a/dungeonsheets/forms/companions_template.tex b/dungeonsheets/forms/companions_template.tex new file mode 100644 index 0000000..2063651 --- /dev/null +++ b/dungeonsheets/forms/companions_template.tex @@ -0,0 +1,100 @@ +\pdfbookmark[0]{Companions}{Companions} +\section*{Companions} + +[% if use_dnd_decorations %] + [% for monster in monsters|sort(attribute='name') %] + \pdfbookmark[1]{[[ monster.name ]]}{Companions - [[ monster.name ]]} + \begin{DndMonster}{[[ monster.name ]]} + \DndMonsterType{[[ monster.description ]]} + + % If you want to use commas in the key values, enclose the values in braces. + \DndMonsterBasics[ + armor-class = {[[ monster.armor_class ]]}, + hit-points = {[[ monster.hp_max ]] ([[ monster.hit_dice ]])}, + speed = {[[ monster.speed ]] ft.[% if monster.swim_speed %], [[ monster.swim_speed ]] ft. swim[% endif %][% if monster.fly_speed %], [[ monster.fly_speed ]] ft. fly[% endif %][% if monster.burrow_speed %], [[ monster.burrow_speed ]] ft. burrow[% endif %]}, + ] + + \DndMonsterAbilityScores[ + str = [[ monster.strength.value ]], + dex = [[ monster.dexterity.value ]], + con = [[ monster.constitution.value ]], + int = [[ monster.intelligence.value ]], + wis = [[ monster.wisdom.value ]], + cha = [[ monster.charisma.value ]], + ] + + \DndMonsterDetails[ + saving-throws = {[[ monster.saving_throws ]]}, + skills = {[[ monster.skills ]]}, + damage-vulnerabilities = {[[ monster.damage_vulnerabilities ]]}, + damage-resistances = {[[ monster.damage_resistances ]]}, + damage-immunities = {[[ monster.damage_immunities ]]}, + condition-immunities = {[[ monster.condition_immunities ]]}, + senses = {[[ monster.senses ]]}, + languages = {[% if monster.languages %][[ monster.languages ]][% else %] --- [% endif %]}, + challenge = {[[ monster.challenge_rating ]] ([[ monster.challenge_rating | challenge_rating_to_xp ]] XP)}, + ] + %\DndMonsterSection{Actions} + [[ monster.__doc__ | rst_to_latex(top_heading_level=2) ]] + \end{DndMonster} + [% endfor %] + +[% else %] + [% for monster in monsters|sort(attribute='name') %] + { + \pdfbookmark[1]{[[ monster.name ]]}{Companions - [[ monster.name ]]} + \section*{[[ monster.name ]]} + [% if monster.description %] + \subsection*{[[ monster.description ]]} + [% endif %] + + \begin{tabular}{c c c} + Armor Class & Hit Points & Speed \\ + \hline + [[ monster.armor_class ]] & + [[ monster.hp_max ]] ([[ monster.hit_dice ]]) & + [[ monster.speed ]] \\ + [% if monster.swim_speed %] + & & [[ monster.swim_speed ]] swim \\ + [% endif %] + [% if monster.fly_speed %] + & & [[ monster.fly_speed ]] fly \\ + [% endif %] + [% if monster.burrow_speed %] + & & [[ monster.burrow_speed ]] burrow \\ + [% endif %] + \end{tabular} + + \vspace{0.2cm} + + \begin{tabular}{c c c c c c} + STR & DEX & CON & INT & WIS & CHA \\ + \hline + [[ monster.strength.value ]] & [[ monster.dexterity.value ]] & [[ monster.constitution.value ]] & + [[ monster.intelligence.value ]] & [[ monster.wisdom.value ]] & [[ monster.charisma.value ]] \\ + ([[ monster.strength.modifier|mod_str ]]) & ([[ monster.dexterity.modifier|mod_str ]]) & + ([[ monster.constitution.modifier|mod_str ]]) & ([[ monster.intelligence.modifier|mod_str ]]) & + ([[ monster.wisdom.modifier|mod_str ]]) & ([[ monster.charisma.modifier|mod_str ]]) \\ + \end{tabular} + + \vspace{0.2cm} + + \begin{description} + [% if monster.skills != "" %]\item [Skills:] [[ monster.skills ]][% endif %] + \item [Senses:] [% if monster.senses != "" %][[ monster.senses ]][% else %]--[% endif %] + \item [Languages:] [% if monster.languages != "" %][[ monster.languages ]][% else %]--[% endif %] + [% if monster.damage_resistances != "" %]\item [Damage Resistances:] [[ monster.damage_resistances ]][% endif %] + [% if monster.damage_immunities != "" %]\item [Damage Immunities:] [[ monster.damage_immunities ]][% endif %] + [% if monster.damage_vulnerabilities != "" %]\item [Damage Vulnerabilities:] [[ monster.damage_vulnerabilities ]][% endif %] + [% if monster.condition_immunities != "" %]\item [Condition Immunuties:] [[ monster.condition_immunities ]][% endif %] + [% if monster.saving_throws != "" %]\item [Saving Throws:] [[ monster.saving_throws ]][% endif %] + \item [Challenge:] [[ monster.challenge_rating ]] ([[ monster.challenge_rating | challenge_rating_to_xp ]] XP) + \end{description} + + \vspace{0.2cm} + + [[ monster.__doc__ | rst_to_latex(top_heading_level=2) ]] + + } %\color + [% endfor %] +[% endif %] diff --git a/dungeonsheets/forms/gm_spellbook_template.html b/dungeonsheets/forms/gm_spellbook_template.html new file mode 100644 index 0000000..ba7020c --- /dev/null +++ b/dungeonsheets/forms/gm_spellbook_template.html @@ -0,0 +1,9 @@ +

Spells

+ + +[% from "spellblock.html" import spellblock %] +[% for spl in spells %] + +[[ spellblock(spl, id_base="spells") ]] + +[% endfor %] diff --git a/dungeonsheets/forms/gm_spellbook_template.tex b/dungeonsheets/forms/gm_spellbook_template.tex new file mode 100644 index 0000000..e0cf40c --- /dev/null +++ b/dungeonsheets/forms/gm_spellbook_template.tex @@ -0,0 +1,41 @@ +\pdfbookmark[0]{Spells}{Spells} +\section*{Spells} + +[% for spl in spells %] + \pdfbookmark[1]{[[ spl.name ]]}{Spells - [[ spl.name ]]} + [% if use_dnd_decorations %] + \DndSpellHeader + {[[ spl.name ]]} + {[% if spl.level > 0 %][[ ordinals[spl.level] ]]-level [[ spl.magic_school ]][% else %][[ spl.magic_school ]] Cantrip[% endif %] [% if spl.ritual %](\textit{ritual})[% endif %]} + {[[ spl.casting_time ]]} + {[[ spl.casting_range ]]} + {[[ spl.component_string ]]} + {[[ spl.duration ]]} + [% else %] + \section*{[[ spl.name ]]} + [% if spl.level > 0 %] % + \textit{[[ spl.magic_school ]] Level [[ spl.level ]]} % + [% else %] % + \textit{[[ spl.magic_school ]] Cantrip} % + [% endif %] % + [% if spl.ritual and spl.concentration %]% + (\textit{ritual}, \textit{concentration})% + [% elif spl.ritual %]% + (\textit{ritual})% + [% elif spl.concentration %]% + (\textit{concentration})% + [% endif %]% + %% \noindent + \begin{description} + \setlength{\itemsep}{\zerosep}% + \setlength{\parskip}{0pt}% + \item [Casting Time:] [[ spl.casting_time ]] \\ + \item [Duration:] [[ spl.duration ]] \\ + \item [Range:] [[ spl.casting_range ]] \\ + \item [Components:] [[ spl.component_string ]] + \end{description} + % \vspace{\zerosep} + [% endif %] + [[ spl.__doc__ | rst_to_latex(top_heading_level=1) ]] + +[% endfor %]