@its-not-rocket-science/ananke 0.1.29 → 0.1.30
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.
- package/CHANGELOG.md +22 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,28 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [0.1.30] — 2026-03-26
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Phase 85 · Religion & Faith Systems** (`src/faith.ts`)
|
|
14
|
+
- `Faith { faithId, name, fervor_Q, tolerance_Q, exclusive }` — faith definition; exclusive faiths (monotheistic) compete; syncretic faiths stack additively.
|
|
15
|
+
- `PolityFaith { polityId, faithId, adherents_Q }` — fraction of polity population following a faith [0, SCALE.Q].
|
|
16
|
+
- `FaithRegistry { faiths: Map<FaithId, Faith>, polityFaiths: Map<string, PolityFaith[]> }` — central registry; pure data layer with no Entity fields or kernel changes.
|
|
17
|
+
- Built-in sample faiths: `SOLAR_CHURCH` (exclusive, fervor q(0.80), tolerance q(0.20)), `EARTH_SPIRITS` (syncretic, tolerance q(0.90)), `MERCHANT_CULT` (syncretic, moderate).
|
|
18
|
+
- `registerFaith` / `getFaith` — faith definition management.
|
|
19
|
+
- `setPolityFaith` / `getPolityFaiths` — per-polity adherent records; creates or updates records; clamps to [0, SCALE.Q].
|
|
20
|
+
- `getDominantFaith(registry, polityId)` → highest-adherent `PolityFaith | undefined`.
|
|
21
|
+
- `sharesDominantFaith(registry, polityAId, polityBId)` → boolean.
|
|
22
|
+
- `computeConversionPressure(faith, missionaryPresence_Q)` → Q: `fervor_Q × missionaryPresence_Q × CONVERSION_BASE_RATE_Q / SCALE.Q²`; `CONVERSION_BASE_RATE_Q = q(0.002)`.
|
|
23
|
+
- `stepFaithConversion(registry, polityId, faithId, delta_Q)` — exclusive faith gains displace other exclusive faiths proportionally; syncretic faiths unaffected.
|
|
24
|
+
- `computeHeresyRisk(registry, polityId)` → Q: fires when dominant exclusive faith has low tolerance and a minority exclusive faith exceeds `HERESY_THRESHOLD_Q = q(0.15)`; integrates with Phase-82 espionage religious unrest.
|
|
25
|
+
- `computeFaithDiplomaticModifier(registry, polityAId, polityBId)` → signed number: `+FAITH_DIPLOMATIC_BONUS_Q = q(0.10)` for shared dominant faith; `−FAITH_DIPLOMATIC_PENALTY_Q = q(0.10)` for exclusive vs exclusive conflict; 0 for syncretic or no dominant faith. Integrates with Phase-80 treaty strength.
|
|
26
|
+
- Added `./faith` subpath export to `package.json`.
|
|
27
|
+
- 45 new tests; 4,510 total. Coverage: statements 96.96%, branches 87.53%, functions 95.2%, lines 96.96% — all thresholds maintained.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
9
31
|
## [0.1.29] — 2026-03-26
|
|
10
32
|
|
|
11
33
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@its-not-rocket-science/ananke",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deterministic lockstep-friendly SI-units RPG/physics core (fixed-point TS)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -102,6 +102,10 @@
|
|
|
102
102
|
"./siege": {
|
|
103
103
|
"import": "./dist/src/siege.js",
|
|
104
104
|
"types": "./dist/src/siege.d.ts"
|
|
105
|
+
},
|
|
106
|
+
"./faith": {
|
|
107
|
+
"import": "./dist/src/faith.js",
|
|
108
|
+
"types": "./dist/src/faith.d.ts"
|
|
105
109
|
}
|
|
106
110
|
},
|
|
107
111
|
"files": [
|