{%- macro box(filled) -%}{%- endmacro -%} {%- macro pips(filled, total) -%}{% for i in range(total) %}{{ box(i < filled) }}{% endfor %}{%- endmacro -%} {%- macro feature_panel(title, items) -%}
{{ title }}
{% for item in items %}
{% if item.uses %}{% endif %}
{% if item.level %}{{ item.level }}级{% endif %}{{ item.name }}{{ item.uses }}
{% for paragraph in item.paragraphs %}
{{ paragraph }}
{% endfor %}
{% endfor %}
{%- endmacro -%} {%- macro magic_panel(items) -%}
魔法物品
{% for item in items %}
{{ item.name }}{{ item.tag }}
{% for paragraph in item.paragraphs %}
{{ paragraph }}
{% endfor %}
{% endfor %}
{%- endmacro -%} {%- macro lines_panel(title, lines, cls) -%}
{{ title }}
{% for line in lines %}
{{ line }}
{% endfor %}
{%- endmacro -%} {%- macro item_panel(items) -%}
装备
{% for row in items|batch(2) %}{% for item in row %}{% endfor %}{% if row|length < 2 %}{% endif %}{% endfor %}
{{ item }}
{%- endmacro -%} {%- macro coin_panel(coins) -%}
钱币
{% for coin in coins %}{% endfor %}{% for coin in coins %}{% endfor %}
{{ coin.label }}
{{ coin.value }}
{%- endmacro -%} {%- macro background_panel(rows) -%}
背景与个性
{% for row in rows %}{% for cell in row.cells %}{% endfor %}{% if row.cells|length < 2 %}{% endif %}{% endfor %}
{{ cell[0] }}{{ cell[1] }}
{%- endmacro -%} {%- macro left_panels(v) -%}{% if v.resources %}{{ feature_panel("限定资源", v.resources) }}{% endif %}{% if v.items %}{{ item_panel(v.items) }}{% endif %}{% if v.magic_items %}{{ magic_panel(v.magic_items) }}{% endif %}{% if v.coins %}{{ coin_panel(v.coins) }}{% endif %}{% if v.background_rows %}{{ background_panel(v.background_rows) }}{% endif %}{%- endmacro -%} {%- macro right_panels(v) -%}{% if v.feats %}{{ feature_panel("专长", v.feats) }}{% endif %}{% if v.race_traits %}{{ feature_panel("种族特性", v.race_traits) }}{% endif %}{% if v.class_traits %}{{ feature_panel("职业特性", v.class_traits) }}{% endif %}{%- endmacro -%}
{% if view.has_portrait %}{% else %}
{{ view.portrait_initial }}
{% endif %}
{{ view.name }}
{{ view.subtitle }}
{% for stat in view.core_stats %}{% endfor %}
{{ stat.label }}{{ stat.value }}
{% if view.xp %}
经验值{{ view.xp }}{% if view.xp_next %}下一级 {{ view.xp_next }}{% endif %}
{% endif %}
生命值{{ view.hp }}{% if view.hp_state %}{{ view.hp_state }}{% endif %}
临时生命{{ view.temp_hp }}
生命骰{{ view.hit_dice }}
死亡豁免{% if view.death_state %}{{ view.death_state }}{% else %}
成功 {{ pips(view.death_success, 3) }}
失败 {{ pips(view.death_failure, 3) }}
{% endif %}
{{ view.inspiration_label }}{% if view.inspiration is none %}—{% else %}{{ box(view.inspiration) }}{% endif %}
{% for ab in view.abilities %}
{{ ab.name }}{{ ab.mod }}
{{ ab.score }}
调整 {{ ab.mod }}
{% if ab.save %}
{{ box(ab.save.proficient) }}豁免 {{ ab.save.value }}
{% endif %} {% for skill in ab.skills %}
{% if skill.expertise %}✦{% else %}{{ box(skill.proficient) }}{% endif %}{{ skill.name }} {{ skill.value }}{% if skill.half %}半{% endif %}
{% endfor %}
{% endfor %} {% if view.proficiencies %}{{ lines_panel("熟练与语言", view.proficiencies, "plain-line") }}{% endif %} {% if view.combat_notes %}{{ lines_panel("战斗记录", view.combat_notes, "note-line") }}{% endif %}
{% if view.weapons %}
武器与伤害
{% for w in view.weapons %}{% endfor %}
名称命中/DC伤害类型备注
{{ w.name }}{{ w.hit }}{{ w.damage }}{{ w.damage_type }}{{ w.note or "—" }}
{% endif %} {% set left_any = view.resources or view.items or view.magic_items or view.coins or view.background_rows %} {% set right_any = view.feats or view.race_traits or view.class_traits %} {% if left_any or right_any %} {% if left_any and right_any %} {% elif left_any %} {% else %} {% endif %}
{{ left_panels(view) }}{{ right_panels(view) }}{{ left_panels(view) }}{{ right_panels(view) }}
{% endif %} {% if view.story %}
背景故事
{% for line in view.story_lines %}
{{ line if line else " " }}
{% endfor %}
{% endif %}
{% if view.spell_groups or view.has_slots %}
戏法与已准备法术
施法属性
{{ view.spellcasting }}
豁免 DC
{{ view.spell_dc or "—" }}
法术攻击
{{ view.spell_attack or "—" }}
{% for row in view.slot_rows %}{% for slot in row %}{% endfor %}{% endfor %}{% if view.pact_slot %}{% endif %}
{{ slot.label }}{{ slot.value }}{% if slot.total %}{{ pips(slot.filled, slot.total) }}{% else %}—{% endif %}
{{ view.pact_slot.label }}{{ view.pact_slot.value }}{% if view.pact_slot.total %}{{ pips(view.pact_slot.filled, view.pact_slot.total) }}{% else %}—{% endif %}
{% if view.spell_groups %}{% for group in view.spell_groups %}{% for spell in group.spells %}{% endfor %}{% endfor %}
法术名准备施法时间施法距离专注C仪式R材料M备注
{{ group.label }}
{{ spell.name }}{% if spell.is_cantrip %}—{% elif spell.prepared %}●{% else %}○{% endif %}{{ spell.time or "—" }}{{ spell.range or "—" }}{{ box(spell.concentration) }}C{{ box(spell.ritual) }}R{{ box(spell.material) }}M{{ spell.note or "—" }}
{% endif %}
{% endif %}
□ 熟练 ✦ 专精 ● 已准备 ○ 未准备 — 戏法无需准备 | DNDDicer · 屠龙骰