{% let name = get("name") .content %} {% let description = get("description").content %} {% let image = get("image") .content %} {% let procs = get("procs") .content %} {% let cp = get("cp") .content %} {% let range = get("range") .content %} {% let aoe = get("aoe") .content %} {% let duration = get("duration") .content %} {% let power = get("power") .content %} {% let playcost = get("playcost") .content %} {% proc mk_cost_bar(): string = %}
{% for parts in playcost.split(",").map (x) => x.strip().split(" ") %} {% if parts[0].is_numeric() %}
{{ parts[0] }}
{{ parts[1..^1].join(" ") }}
{% elif parts.len() == 1 %}
{{ 1 }}
{{ playcost }}
{% endif %} {% endfor %}
{% endmacro %} {% proc mk_effect_bar(): string = %}
{{ power }}
power
{## } {% if duration != "" %}
{{ duration }}
Duration
{% endif %} {##}
{% endmacro %} {% proc mk_figure(): string = %}
{% endmacro %} {% proc mk_desc(): string = %}
{# start top-justified #}
{{ description }}
{# column one #} {% for proc_line in procs.splitlines() %} {% let p = proc_line.split() %} {# number of dies #} {% endfor %}
{{ p[0] }} {# procs #}{{ p[1] }} {# arrow #}{{ p[2] }} {# effect #}{{ p[3..^1].join("\n") }}
{# column two #}
{# end top-justified #}
{# start bottom-justified #}
❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏
{# end bottom-justified #}
{% endmacro %} {% proc mk_sidebar(): string = %}
{% for _ in 0..<2 %}
{% for x in 1..7 %}{% for y in 1..7 %}
{% endfor %}{% endfor %}
AoE
{% for x in 1..7 %}{% for y in 1..7 %} {% if (x-4)^2 + (y-4)^2 <= 3^2 %}
{% endif %} {% endfor %}{% endfor %} {% for (x, y) in [ (3, 3), (3, 4), (3, 5), ] %}
{% endfor %} {#
#}
{% endfor %}
{% endproc %}
symbol {{ name }}
{{ mk_cost_bar() }}
{{ mk_figure() }}
{{ mk_sidebar() }}
{{ mk_effect_bar() }} {{ mk_desc() }}
{##} {% if duration != "" %}
Duration: {{ duration }}
{% endif %} {##} {## }
❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏
{##}
{{ cp }} CP
range {{ range }}
aoe {{ aoe }}
duration{{ duration }}
power {{ power }}
playcost{{ playcost }}
{## } {##} {## } {##}