feat: rally point, troop movements, support, reports, scouts, battle simulator and village rename
Send attacks and support from the rally point with a live travel-time preview, see own
commands and spotted incoming attacks with countdowns and call-back, send support home
or withdraw it, read battle and support reports with an unread badge, run the battle
simulator, rename villages, and send troops straight from the map. The watchtower gets
a diorama model; the mock server answers every new intent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:16:06 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import type { UnitType } from '~/types/game'
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
units: Partial<Record<string, number>>
|
|
|
|
|
/** null hides the losses row. */
|
|
|
|
|
lost: Record<string, number> | null
|
2026-10-31 09:57:07 +00:00
|
|
|
/** Of the losses, those shot by archers and catapults before the melee; a row only when any were. */
|
|
|
|
|
shot?: Record<string, number> | null
|
feat: rally point, troop movements, support, reports, scouts, battle simulator and village rename
Send attacks and support from the rally point with a live travel-time preview, see own
commands and spotted incoming attacks with countdowns and call-back, send support home
or withdraw it, read battle and support reports with an unread badge, run the battle
simulator, rename villages, and send troops straight from the map. The watchtower gets
a diorama model; the mock server answers every new intent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:16:06 +00:00
|
|
|
}>()
|
|
|
|
|
const columns = computed(() => unitRows(props.units).map(([u]) => u))
|
2026-10-31 09:57:07 +00:00
|
|
|
const anyShot = computed(() => Object.values(props.shot ?? {}).some((n) => n > 0))
|
feat: rally point, troop movements, support, reports, scouts, battle simulator and village rename
Send attacks and support from the rally point with a live travel-time preview, see own
commands and spotted incoming attacks with countdowns and call-back, send support home
or withdraw it, read battle and support reports with an unread badge, run the battle
simulator, rename villages, and send troops straight from the map. The watchtower gets
a diorama model; the mock server answers every new intent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:16:06 +00:00
|
|
|
</script>
|
|
|
|
|
|
2026-10-31 09:57:07 +00:00
|
|
|
<!-- A Die Stämme report table: one column per unit, quantity and losses below, and of those the ones shot before the melee. -->
|
feat: rally point, troop movements, support, reports, scouts, battle simulator and village rename
Send attacks and support from the rally point with a live travel-time preview, see own
commands and spotted incoming attacks with countdowns and call-back, send support home
or withdraw it, read battle and support reports with an unread badge, run the battle
simulator, rename villages, and send troops straight from the map. The watchtower gets
a diorama model; the mock server answers every new intent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:16:06 +00:00
|
|
|
<template>
|
|
|
|
|
<div class="overflow-x-auto">
|
|
|
|
|
<table class="text-sm tabular-nums">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="pr-3" />
|
|
|
|
|
<th v-for="unit in columns" :key="unit" class="min-w-12 px-1.5 py-1 text-center" :title="$t(`units.${unit}`)">
|
|
|
|
|
<IconUnit :unit="unit as UnitType" class="mx-auto size-5 text-wood-800" />
|
|
|
|
|
<span class="sr-only">{{ $t(`units.${unit}`) }}</span>
|
|
|
|
|
</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr class="border-t border-parchment-300">
|
|
|
|
|
<th class="pr-3 py-1 text-left text-xs font-semibold text-ink-500">{{ $t('reports.battle.units') }}</th>
|
|
|
|
|
<td v-for="unit in columns" :key="unit" class="px-1.5 py-1 text-center">{{ units[unit] }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr v-if="lost" class="border-t border-parchment-300">
|
|
|
|
|
<th class="pr-3 py-1 text-left text-xs font-semibold text-ink-500">{{ $t('reports.battle.losses') }}</th>
|
|
|
|
|
<td v-for="unit in columns" :key="unit" class="px-1.5 py-1 text-center" :class="lost[unit] ? 'text-blood-700' : 'text-ink-400'">
|
|
|
|
|
{{ lost[unit] ?? 0 }}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2026-10-31 09:57:07 +00:00
|
|
|
<tr v-if="shot && anyShot" class="border-t border-parchment-300">
|
|
|
|
|
<th class="pr-3 py-1 text-left text-xs font-semibold whitespace-nowrap text-ink-500">{{ $t('reports.battle.volley') }}</th>
|
|
|
|
|
<td v-for="unit in columns" :key="unit" class="px-1.5 py-1 text-center" :class="shot[unit] ? 'text-blood-700' : 'text-ink-400'">
|
|
|
|
|
{{ shot[unit] ?? 0 }}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
feat: rally point, troop movements, support, reports, scouts, battle simulator and village rename
Send attacks and support from the rally point with a live travel-time preview, see own
commands and spotted incoming attacks with countdowns and call-back, send support home
or withdraw it, read battle and support reports with an unread badge, run the battle
simulator, rename villages, and send troops straight from the map. The watchtower gets
a diorama model; the mock server answers every new intent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:16:06 +00:00
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|