Everybody's on the street.
+No bail or hospital bills outstanding.
++ Anyone down more than {RECOVERY_CONFIG.ABANDON_GRACE_TICKS} ticks costs the crew{' '} + {RECOVERY_CONFIG.ABANDON_MORALE_PENALTY_PCT}% morale every check. +
+ +Nobody was working this block.
+The sweep came up empty.
+ +Tap your people to pull them out. Takes 1.5s each.
+ )} + ++ Bail your people out from the CREW app before they cost you morale. +
+ )} + + +Jailed members can be bailed out from the Contacts app.
diff --git a/frontend/src/utils/__tests__/bailHospitalSystem.test.ts b/frontend/src/utils/__tests__/bailHospitalSystem.test.ts new file mode 100644 index 0000000..b3e7873 --- /dev/null +++ b/frontend/src/utils/__tests__/bailHospitalSystem.test.ts @@ -0,0 +1,384 @@ +/** + * bailHospitalSystem — tests (Sprint 14-B) + * + * Covers the new severity/repeat-offense cost scaling and wait-time + * system, plus the existing abandonment penalty and detention tracking. + */ +import { describe, it, expect } from 'vitest'; +import { + RECOVERY_CONFIG, + isJailed, + isInjured, + needsRecovery, + recoveryKindFor, + recoveryCost, + severityTier, + scaledBailCost, + scaledHospitalCost, + waitTicks, + isLifer, + quoteRecovery, + overdueMembers, + applyAbandonmentPenalty, + updateHeldSince, + type RecoveryKind, +} from '../bailHospitalSystem'; +import type { GangMember } from '../../types/game.types'; + +// ─── Fixtures ──────────────────────────────────────────────── + +function member( + id: string, + status: GangMember['status'], + arrests = 0, + priorInjuries = 0, +): Pick