@its-not-rocket-science/ananke 0.1.43 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +5 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,30 @@ Versioning follows [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ---
8
8
 
9
+ ## [0.1.44] — 2026-03-27
10
+
11
+ ### Added
12
+
13
+ - **Phase 99 · Mercenaries & Hired Forces** (`src/mercenaries.ts`)
14
+ - `MercenaryBand { bandId, name, size, quality_Q, dailyWagePerSoldier_cu }` — immutable descriptor.
15
+ - `MercenaryContract { contractId, polityId, bandId, daysActive, loyalty_Q, arrears_cu }` — mutable live state stored externally.
16
+ - `MercenaryStepResult { wagePaid_cu, arrearsAdded_cu, loyaltyDelta, deserted }` — step outcome.
17
+ - `DESERT_LOYALTY_THRESHOLD_Q = q(0.25)` — below this, desertion roll fires.
18
+ - `LOYALTY_DECAY_PER_DAY_UNPAID = 80` — loyalty drops 0.8%/day when wages owed.
19
+ - `LOYALTY_GROWTH_PER_DAY_PAID = 20` — loyalty grows 0.2%/day when fully paid.
20
+ - `MAX_MERC_STRENGTH_BONUS_Q = q(0.30)` — caps advisory strength contribution.
21
+ - `computeMercenaryWage(band, elapsedDays)` — `size × dailyWage × days`.
22
+ - `computeMercenaryStrengthContribution(band, contract)` → Q — `size × quality × loyalty / SCALE.Q²`; capped at q(0.30); add to Phase-93 battle strength.
23
+ - `stepMercenaryContract(contract, band, polity, elapsedDays, worldSeed, tick)` — pays wages from treasury, accrues arrears, grows/decays loyalty, rolls desertion via `eventSeed` (deterministic).
24
+ - `applyVictoryLoyaltyBonus(contract)` — q(0.10) boost after campaign victory.
25
+ - `hireMercenaries(contractId, polityId, band, initialLoyalty_Q?)` — factory; default loyalty q(0.70).
26
+ - `isMercenaryReliable(contract)` / `hasMercenaryArrears(contract)` — predicates.
27
+ - Three sample bands: `BAND_LIGHT_CAVALRY` (400 soldiers, q(0.65), 3 cu/day), `BAND_HEAVY_INFANTRY` (600, q(0.85), 5 cu/day), `BAND_SIEGE_ENGINEERS` (200, q(0.75), 8 cu/day).
28
+ - Added `./mercenaries` subpath export to `package.json`.
29
+ - 44 new tests; 5,173 total. Coverage: 100% statements/branches/functions/lines on `mercenaries.ts`.
30
+
31
+ ---
32
+
9
33
  ## [0.1.43] — 2026-03-26
10
34
 
11
35
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@its-not-rocket-science/ananke",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "type": "module",
5
5
  "description": "Deterministic lockstep-friendly SI-units RPG/physics core (fixed-point TS)",
6
6
  "license": "MIT",
@@ -158,6 +158,10 @@
158
158
  "./containment": {
159
159
  "import": "./dist/src/containment.js",
160
160
  "types": "./dist/src/containment.d.ts"
161
+ },
162
+ "./mercenaries": {
163
+ "import": "./dist/src/mercenaries.js",
164
+ "types": "./dist/src/mercenaries.d.ts"
161
165
  }
162
166
  },
163
167
  "files": [