combat testing and polishing in the dev console, many bug fixes
This commit is contained in:
25
public_web/templates/game/partials/combat_log.html
Normal file
25
public_web/templates/game/partials/combat_log.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{# 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 %}
|
||||
Reference in New Issue
Block a user