templates/game/operation/selectGameUnit.html.twig
{% extends 'game.html.twig' %}
{% block title %}Ultimate Warfare - Select units{% endblock title %}
{% block content %}
<a class="B" href="{{ path('Game/Operation/SelectWorldRegion', {'regionId': region.id, 'operationId': operation.id}) }}">Back to region selection</a>
<br />
<br />
<table class="table text-center">
<tr class="tabletop">
<td colspan="3"><b>Target region</b></td>
</tr>
<tr>
<td rowspan="3" width="120">
<img src="{{ asset('images/map/' ~ region.type ~ '.jpg') }}" alt="Region {{ region.id }}" width="120" height="100"><br />
</td>
<td width="300">Location:</td>
<td width="280">{{ region.x }}, {{ region.y }}</td>
</tr>
<tr>
<td width="300">Owner:</td>
{% if region.player is not null %}
<td width="280"><a class="B" href="{{ path('Game/Profile', {'playerName': region.player.name}) }}">{{ region.player.name }}</a></td>
{% else %}
<td width="280">Nobody</td>
{% endif %}
</tr>
<tr>
<td width="300">Space:</td>
<td width="280">
{{ region.space }}
</td>
</tr>
<tr>
<td class="tabletop" colspan="3"><b>Selected Operation</b></td>
</tr>
<tr>
<td rowspan="3" width="120">
<img src="{{ asset('images/operations/' ~ operation.image) }}" width="120" height="100">
</td>
<td width="300">Name:</td>
<td width="280">{{ operation.name }}</td>
</tr>
<tr>
<td width="300">Max Distance:</td>
<td width="280" align="center">{{ operation.maxDistance }}</td>
</tr>
<tr>
<td width="300" align="center">Unit required:</td>
<td width="280" align="center">{{ operation.gameUnit.name }}</td>
</tr>
<tr>
<td class="tabletop" colspan="3" align="center"><b>Launch operation from region</b></td>
</tr>
<tr>
<td rowspan="3" width="120"><img src="{{ asset('images/map/' ~ playerRegion.type ~ '.jpg') }}" width="120" height="100"></td>
<td width="300" align="center">Location:</td>
<td width="280">{{ playerRegion.x }}, {{ playerRegion.y }}</td>
</tr>
<tr>
<td width="300" align="center">Special Ops:</td>
<td width="280" align="center">--</td>
</tr>
</table>
<br />
<br />
<form action="{{ path('Game/Operation/ExecuteOperation', {'regionId': region.id, 'operationId': operation.id, 'playerRegionId': playerRegion.id}) }}" method="post">
<table class="table text">
<tr>
<td class="tabletop" colspan="4">
<b>Select units</b>
</td>
</tr>
<tr>
<td></td>
<td>Unit</td>
<td>You have</td>
<td>Amount</td>
</tr>
<tr>
<td width="150">
<img src="{{ asset('images/' ~ operation.gameUnit.gameUnitType.imageDir ~ operation.gameUnit.image) }}" alt="{{ operation.gameUnit.name }}" width="150" height="130">
</td>
<td width="150" align="center">
<b>{{ operation.gameUnit.name }}</b>
</td>
<td width="100" align="center">
{% for regionUnit in playerRegion.worldRegionUnits %}
{% if regionUnit.gameUnit.id == operation.gameUnit.id %}
{% if regionUnit.amount > 1 %}
{{ regionUnit.amount }} {{ regionUnit.gameUnit.nameMulti }}<br />
{% else %}
{{ regionUnit.amount }} {{ regionUnit.gameUnit.name }}<br />
{% endif %}
{% endif %}
{% endfor %}
</td>
<td width="200" align="center">
<input type="text" size="12" name="amount" />
</td>
</tr>
<tr>
<td>
<div class="submit"><input type="submit" value="Launch Operation!"></div>
</td>
</tr>
</table>
</form>
{% endblock %}