{% macro itemRow(name, heads, secs) -%} {{name}} {% for (key, value) in heads %} {% endfor %}
{{key}}{{value}}
{% for (name, body) in secs.items() %} {% if name %}

{{ name }}

{% endif %} {{ body }} {% endfor %} {%- endmacro %} {% macro itemTable(rows) -%} {% for (name, heads, secs) in rows %} {{ itemRow(name, heads, secs) }} {% endfor %}
{%- endmacro %} {% macro monsterAction(ma) -%}
{{ ma.name }}. {% if ma.has_normal_attack_parts() %} {% if ma.kind %}{{ ma.kind }} Attack.{% endif %} {{ ma.atk_line() }}. {% if ma.damage %}Hit: {{ ma.guess_expected_damage() }}.{% endif %} {% endif %} {% if ma.special %}{{ ma.special }}{% endif %}
{%- endmacro %} {% macro campaign(ca, rules) -%}

{{ca.name}}

{% for kind in rules.get_kinds() %}

{{kind}}

{% for rule in ca.rules %} {% if rule.invalid or rule.kind == kind %}
{{rule.name}}
{{rule.content}}
{% endif %} {% endfor %}
{% endfor %}
{{ca.content}}
{%- endmacro %} {% macro rule(ru) -%}

{{ru.name}}

{{ru.content}}
{%- endmacro %}