import type { CurrentLocationResponse, LocationPointOfInterest, LocationPrimaryAction, } from '../../core/api/game-api.models'; /** * Test fixtures for `GET /api/world/current-location`. * * Shared rather than re-declared per spec: the payload backs the map, the * hunt screen and the local location view, so a field added to the contract * needs to be answered in exactly one place. */ export const BURNED_ROAD_POIS: LocationPointOfInterest[] = [ { key: 'hunt-area', title: 'Jagdgebiet', actionLabel: 'Jagd beginnen', type: 'HUNT', iconKey: 'hunt', xPercent: 52, yPercent: 44, enabled: true, }, { key: 'inspect-tracks', title: 'Verdächtige Spuren', actionLabel: 'Untersuchen', type: 'INVESTIGATE', iconKey: 'investigate', xPercent: 32, yPercent: 78, enabled: true, }, { key: 'search-abandoned-wagon', title: 'Verlassener Wagen', actionLabel: 'Durchsuchen', type: 'SEARCH', iconKey: 'search', xPercent: 80, yPercent: 68, enabled: true, }, { key: 'wounded-scout', title: 'Verwundeter Kundschafter', actionLabel: 'Sprechen', type: 'NPC', iconKey: 'speak', xPercent: 20, yPercent: 60, enabled: true, }, ]; export const BURNED_ROAD_ACTIONS: LocationPrimaryAction[] = [ { key: 'start-hunt', label: 'Jagd beginnen', description: 'Im Gebiet jagen', type: 'HUNT', iconKey: 'hunt', enabled: true, }, { key: 'investigate-tracks', label: 'Spuren untersuchen', description: 'Hinweise finden', type: 'INVESTIGATE', iconKey: 'investigate', enabled: true, poiKey: 'inspect-tracks', }, { key: 'search-surroundings', label: 'Umgebung durchsuchen', description: 'Beute finden', type: 'SEARCH', iconKey: 'search', enabled: true, poiKey: 'search-abandoned-wagon', }, { key: 'open-map', label: 'Zur Karte', description: 'Gebiet wechseln', type: 'MAP', iconKey: 'map', enabled: true, }, ]; export function southGateFixture( overrides: Partial = {}, ): CurrentLocationResponse { return { id: 'south-gate-id', key: 'south-gate', name: 'Südtor von Graufurt', description: 'Der letzte sichere Schritt vor den Aschenfeldern.', regionKey: 'ashen-fields', minRecommendedLevel: 1, maxRecommendedLevel: 1, dangerLevel: 0, isSafe: true, huntingEnabled: false, artworkPath: '/images/backgrounds/Suedtor.png', regionName: 'Aschenfelder', regionTierLabel: 'Gebiet 1', locationType: 'TRANSITION', localDescription: 'Hinter den Wachtfeuern beginnen die Aschenfelder.', localArtworkPath: '/images/backgrounds/Suedtor.png', dangerRating: null, recommendationLabel: '1', pointsOfInterest: [], primaryActions: [], encounterPreview: [], rewardPreview: [], connections: [ { targetLocation: { id: 'burned-road-id', key: 'burned-road', name: 'Verbrannte Straße', }, travelDurationSeconds: 10, danger: 'LOW', }, ], possibleMonsters: [], ...overrides, }; } export function burnedRoadFixture( overrides: Partial = {}, ): CurrentLocationResponse { return southGateFixture({ id: 'burned-road-id', key: 'burned-road', name: 'Verbrannte Straße', description: 'Die erste Jagdzone zwischen Asche und zerbrochenen Wagen.', maxRecommendedLevel: 2, dangerLevel: 1, isSafe: false, huntingEnabled: true, artworkPath: '/images/backgrounds/Aschestrasse.png', locationType: 'HUNTING_GROUND', localDescription: 'Ein alter Handelsweg, der durch Feuer und Krieg in Asche gelegt wurde.', localArtworkPath: '/images/backgrounds/Aschestrasse.png', dangerRating: 'MATCH', recommendationLabel: '1–2', pointsOfInterest: BURNED_ROAD_POIS, primaryActions: BURNED_ROAD_ACTIONS, encounterPreview: [ { key: 'ash-rat', name: 'Aschenratte', level: 1, iconPath: '/images/combat/icons/ash-rat-128.png', }, { key: 'road-bandit', name: 'Straßenräuber', level: 2, iconPath: '/images/combat/icons/road-bandit-128.png', }, ], rewardPreview: [ { key: 'silver', label: 'Silber', iconKey: 'silver' }, { key: 'equipment', label: 'Ausrüstung', iconKey: 'equipment' }, { key: 'material', label: 'Material', iconKey: 'material' }, ], connections: [ { targetLocation: { id: 'south-gate-id', key: 'south-gate', name: 'Südtor von Graufurt', }, travelDurationSeconds: 10, danger: 'LOW', }, ], possibleMonsters: ['Aschenratte', 'Straßenräuber'], ...overrides, }); }