feat(api): add CHARACTER_TOO_WOUNDED combat error
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user