maduck/GoWDiscordTeamBot

View on GitHub
templates/team_lengthened.jinja

Summary

Maintainability
Test Coverage
<T>inline**{{ team.troops_title }}**</T>
{%- for troop in team.troops %}
{{ troop.raw_rarity|emoji }} **{{ troop.name }}**{% if 'affixes' in troop %} {{ 'weapon'|emoji }}{% endif %} {{ troop.kingdom }}
{{ troop.spell.cost }} {{ troop.color_code|emoji }} {{ troop.spell.description[:180] }}{% if troop.spell.description|length > 180 %}...{% endif %}
{%- endfor -%}

{%- if team.banner %}
<T>inline**{{ team.banner.name }}**</T>
{{ team.banner.kingdom }}{% if not team.banner|banner_colors %}{{ team.banner.available }}{% endif %}{%- for color in team.banner|banner_colors %}
{{ color }}
{%- endfor -%}
{% endif %}
{%- if team.class %}
<T>{{ team.class_title }}: {{ team.class }}</T>
{% set talents = team.talents|join('-') %}
{% if talents|replace('-', '') == '' %}
-
{% else %}
{%- for talent in team.talents %}
{{ talent }}
{%- endfor -%}
{% endif %}

{% endif %}