{% extends 'base.twig' %} {% block main %}
{{ village.x }} x {{ village.y }} — {{ village.name }}
{{ village.wood }} / {{ village.getStorage(village.id).getResourceCapacity('wood') }} {{ village.getBuilding(village.id, 'WoodCutter').getResourceIncrementor() }}
{{ village.clay }} / {{ village.getStorage(village.id).getResourceCapacity('clay') }} {{ village.getBuilding(village.id, 'ClayPit').getResourceIncrementor() }}
{{ village.iron }} / {{ village.getStorage(village.id).getResourceCapacity('iron') }} {{ village.getBuilding(village.id, 'IronMine').getResourceIncrementor() }}
{{ village.food }} / {{ village.getStorage(village.id).getResourceCapacity('food') }} {{ village.getBuilding(village.id, 'Farm').getResourceIncrementor() }}
{{ village.getStorage(village.id).getCapacity() }}

Storage Config

Events

{% if events['UpgradeBuilding'] %}

Upgrade Buildings

{% for event in events['UpgradeBuilding'] %} {% endfor %}
Building Time
{{ event.data.building }} {% include 'components/timer.twig' with { 'time': event.event.time|date('c') } %} Cancel
{% endif %} {% if events['TrainUnits'] %}

Train Units

{% for event in events['TrainUnits'] %} {% endfor %}
Unit Time
{{ event.data.type }} {% include 'components/timer.twig' with { 'time': event.event.time|date('c') } %} Cancel
{% endif %} {% if events['SendUnits'] %}

Send Resources / Units

{% for event in events['SendUnits'] %} {% endfor %}
Type Unit Amount Origin Destination Time
{{ event.data.type }} {{ event.data.unit }} {{ event.data.amount }} {{ village.get(event.data.source).name }} {{ village.get(event.data.destination).name }} {% include 'components/timer.twig' with { 'time': event.event.time|date('c') } %} Cancel
{% endif %}

Buildings

{% for building in village.getBuildings(village.id) %} {% endfor %}
Type Level Build Time Resources
{{ building.type }} {{ building.level }} {{ building.getBuildTime() | buildTime }} {{ building.getResourceRequirements()['wood'] }}   {{ building.getResourceRequirements()['clay'] }}   {{ building.getResourceRequirements()['iron'] }}

Units

{% for unit in village.getUnits(village.id, 1) %} {% endfor %}
Type Amount Build Time Resources
{{ unit.type }} {{ unit.amount }} {{ unit.getBuildTime(1) | buildTime }} {{ unit.getResourceRequirements(unit, 1)['wood'] }}   {{ unit.getResourceRequirements(unit, 1)['clay'] }}   {{ unit.getResourceRequirements(unit, 1)['iron'] }}   {{ unit.getResourceRequirements(unit, 1)['food'] ?? 0 }}

Supporting Units

{% for unit in village.getUnits(village.id, 2) | merge(village.getUnits(village.id, 3)) %} {% endfor %}
Type Amount Origin Location Travel Time
{{ unit.type }} {{ unit.amount }} {{ village.get(unit.homeVillageId).name }} {{ not unit.isTraveling ? village.get(unit.residenceVillageId).name : '~traveling~' }} {{ unit.getTravelTime(unit, village.getDistance(unit.getHomeVillage().x, unit.getHomeVillage().x, unit.getResidenceVillage().x, unit.getResidenceVillage().y)) | buildTime }} {% if not unit.isTraveling %} {% if unit.homeVillageId == village.id %}
{% else %}
{% endif %} {% endif %}

Send Units

{% endblock %}