Files
Code_of_Conquest/public_web/templates/game/partials/combat_log.html

26 lines
977 B
HTML

{# Combat Log Partial - Displays combat action history #}
{# This partial is swapped via HTMX when combat actions occur #}
{% if combat_log %}
{% for entry in combat_log %}
<div class="combat-log__entry combat-log__entry--{{ entry.type|default('system') }}{% if entry.is_crit %} combat-log__entry--crit{% endif %}">
{% if entry.actor %}
<span class="log-actor">{{ entry.actor }}</span>
{% endif %}
<span class="log-message">{{ entry.message }}</span>
{% if entry.damage %}
<span class="log-damage{% if entry.is_crit %} log-damage--crit{% endif %}">
{% if entry.is_crit %}CRITICAL! {% endif %}{{ entry.damage }} damage
</span>
{% endif %}
{% if entry.heal %}
<span class="log-heal">+{{ entry.heal }} HP</span>
{% endif %}
</div>
{% endfor %}
{% else %}
<div class="combat-log__empty">
Combat begins! Choose your action below.
</div>
{% endif %}