diff --git a/app/components/icon/Building.vue b/app/components/icon/Building.vue index 98fe1f2..9e35a3a 100644 --- a/app/components/icon/Building.vue +++ b/app/components/icon/Building.vue @@ -76,6 +76,12 @@ defineProps<{ type: BuildingType }>() + + + + + + diff --git a/app/components/report/Battle.vue b/app/components/report/Battle.vue index 9ccf0cf..5304c77 100644 --- a/app/components/report/Battle.vue +++ b/app/components/report/Battle.vue @@ -1,5 +1,5 @@ @@ -107,6 +108,14 @@ const luckAt = computed(() => Math.max(0, Math.min(100, ((props.report.luck + 25 {{ $t('reports.battle.haul_of', { loot: looted, capacity: report.capacity }) }} +
+ {{ $t('reports.battle.wounded') }} + + {{ count }} + + {{ $t('reports.battle.wounded_back', { when: woundedBack }) }} +
+
{{ $t('reports.battle.bounty') }} diff --git a/app/components/village/HospitalPanel.vue b/app/components/village/HospitalPanel.vue new file mode 100644 index 0000000..1fa9c7d --- /dev/null +++ b/app/components/village/HospitalPanel.vue @@ -0,0 +1,44 @@ + + + + diff --git a/app/components/village/OverviewSidebar.vue b/app/components/village/OverviewSidebar.vue index 6bd079a..723b90d 100644 --- a/app/components/village/OverviewSidebar.vue +++ b/app/components/village/OverviewSidebar.vue @@ -12,6 +12,12 @@ const { t } = useI18n() const production = computed(() => (['wood', 'clay', 'iron', 'food'] as const).map((r) => ({ r, rate: props.village.rates[r] }))) const troops = computed(() => (Object.entries(props.village.troops) as [UnitType, number][]).filter(([, n]) => n > 0)) +/** The wounded in the hospital and when the first of them stand again. */ +const wounded = computed(() => { + const list = props.village.hospital.wounded + if (!list.length) return null + return { count: props.village.hospital.occupied, next: list[0]!.heals_at } +}) const idle = computed(() => props.village.population.villagers - props.village.population.workers - props.village.levy.militia) const spaceShare = computed(() => props.village.space.used / props.village.space.max) const incoming = computed(() => props.village.movements.filter((m) => m.direction === 'in' && m.type === 'attack')) @@ -113,6 +119,7 @@ function order(o: BuildOrder) {

{{ $t('village.troops.none') }}

{{ $t('village.troops.training', { count: village.population.training }) }}

+

{{ $t('village.troops.wounded_back', { count: wounded.count, time: formatDuration(secondsUntil(wounded.next)) }) }}

{{ $t('village.side.commands') }}: {{ commands }}

{{ $t('village.side.recruit') }} diff --git a/app/components/village/TroopsPanel.vue b/app/components/village/TroopsPanel.vue index bc6fe6f..eaba44c 100644 --- a/app/components/village/TroopsPanel.vue +++ b/app/components/village/TroopsPanel.vue @@ -1,10 +1,11 @@