75 lines
2.5 KiB
HTML
75 lines
2.5 KiB
HTML
<section class="hunt-page" aria-label="Jagd">
|
|
@if (worldStore.currentLocation(); as location) {
|
|
@if (!location.huntingEnabled) {
|
|
<section class="hunt-page__unavailable">
|
|
<h2>Keine Jagd verfügbar</h2>
|
|
<p>
|
|
Am Südtor von Graufurt gibt es keine regulären Jagdgebiete. Reise in ein gefährlicheres
|
|
Gebiet, um nach Gegnern zu suchen.
|
|
</p>
|
|
<button type="button" data-hunt-to-world (click)="goToWorld()">Zur Karte</button>
|
|
</section>
|
|
} @else if (huntingStore.currentHunt(); as hunt) {
|
|
<section class="hunt-page__results" [attr.aria-label]="'Begegnungen bei ' + location.name">
|
|
<p class="hunt-page__results-heading">{{ location.name }} — Begegnungen</p>
|
|
|
|
<div class="hunt-page__encounters">
|
|
@for (encounter of huntingStore.encounters(); track encounter.id) {
|
|
<app-encounter-card [encounter]="encounter" (attack)="onAttack($event)" />
|
|
}
|
|
</div>
|
|
|
|
<div class="hunt-page__actions">
|
|
<button
|
|
type="button"
|
|
data-hunt-refresh
|
|
[disabled]="huntingStore.loading()"
|
|
(click)="refreshHunt()"
|
|
>
|
|
Neu suchen
|
|
</button>
|
|
<button type="button" data-hunt-to-world (click)="goToWorld()">Zur Karte</button>
|
|
</div>
|
|
</section>
|
|
} @else {
|
|
<section class="hunt-page__ready">
|
|
<h2>{{ location.name }}</h2>
|
|
<p>{{ location.description }}</p>
|
|
<p class="hunt-page__hint">
|
|
Durchsuche die Umgebung nach Spuren und Gegnern, bevor du dich in den Kampf wagst.
|
|
</p>
|
|
<button
|
|
type="button"
|
|
data-hunt-start
|
|
[disabled]="huntingStore.loading()"
|
|
(click)="startHunt()"
|
|
>
|
|
Jagd beginnen
|
|
</button>
|
|
</section>
|
|
}
|
|
|
|
@if (huntingStore.loading()) {
|
|
<p class="hunt-page__loading" role="status">Du suchst nach Spuren...</p>
|
|
}
|
|
} @else {
|
|
<section class="hunt-page__empty" aria-live="polite">
|
|
<p>Jagdgebiet wird vorbereitet.</p>
|
|
</section>
|
|
}
|
|
|
|
@if (huntingStore.error(); as error) {
|
|
<section class="hunt-page__error" role="alert">
|
|
<p>{{ error }}</p>
|
|
<button type="button" data-hunt-retry (click)="retry()">Erneut versuchen</button>
|
|
</section>
|
|
}
|
|
|
|
@if (combatStore.error(); as combatError) {
|
|
<section class="hunt-page__error" role="alert">
|
|
<p>{{ combatError }}</p>
|
|
<button type="button" data-hunt-combat-dismiss (click)="dismissCombatError()">Schließen</button>
|
|
</section>
|
|
}
|
|
</section>
|