{% extends 'base.html.twig' %} {% block title %}Tracker · dmtools{% endblock %} {% block body %}

Combat tracker {% if combatants %}· {{ combatants|length }}{% endif %}

Add from Enemies {% if combatants %}
{% endif %}
{% if not combatants %}
No combatants yet. Go to Enemies, tick the ones you want (set a count for multiples), and choose Add to tracker.
{% else %}
{% for c in combatants %} {% set pct = c.hpPercent %} {% set bar = c.isDown ? 'bg-secondary' : (pct <= 25 ? 'bg-danger' : (pct <= 50 ? 'bg-warning' : 'bg-success')) %}
{{ c.label }} {% if c.isDown %}Down{% endif %}
{% if c.enemy %} stat block {% endif %}
{{ c.currentHp }} / {{ c.maxHp }}
{% endfor %}
{% endif %} {% endblock %}