feat(api): add CHARACTER_TOO_WOUNDED combat error

This commit is contained in:
Bastian Wagner
2026-08-21 14:48:05 +02:00
parent 909f793eb6
commit 432483e958

View File

@@ -5,6 +5,7 @@ export type CombatErrorCode =
| 'HUNT_ENCOUNTER_ALREADY_CONSUMED'
| 'INVALID_HUNT_ENCOUNTER'
| 'CHARACTER_TRAVELLING'
| 'CHARACTER_TOO_WOUNDED'
| 'COMBAT_ALREADY_ACTIVE'
| 'COMBAT_NOT_FOUND'
| 'COMBAT_ALREADY_FINISHED'
@@ -53,6 +54,14 @@ export function characterTravelling(): CombatDomainError {
);
}
export function characterTooWounded(): CombatDomainError {
return new CombatDomainError(
'CHARACTER_TOO_WOUNDED',
HttpStatus.CONFLICT,
'The character is too wounded to fight.',
);
}
export function combatAlreadyActive(): CombatDomainError {
return new CombatDomainError(
'COMBAT_ALREADY_ACTIVE',