@ai-rpg-engine/starter-template 3.10.0 → 3.11.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-rpg-engine/starter-template",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "description": "Starter template for ai-rpg-engine — scaffold a standalone game project from it",
5
5
  "type": "module",
6
6
  "engines": {
package/src/content.json CHANGED
@@ -67,6 +67,14 @@
67
67
  "controllingFaction": "my-game"
68
68
  }
69
69
  ],
70
+ "factions": {
71
+ "my-game": {
72
+ "id": "my-game",
73
+ "name": "My Game",
74
+ "reputation": 0,
75
+ "disposition": "neutral"
76
+ }
77
+ },
70
78
  "buildCatalog": {
71
79
  "packId": "my-game",
72
80
  "statBudget": 3,
package/src/content.ts CHANGED
@@ -190,6 +190,9 @@ export const pack: ContentPack = {
190
190
  zones,
191
191
  placements,
192
192
  districts,
193
+ factions: {
194
+ 'my-game': { id: 'my-game', name: 'My Game', reputation: 0, disposition: 'neutral' },
195
+ },
193
196
  buildCatalog: buildCatalog as ContentPack['buildCatalog'],
194
197
  progressionTrees: [progressionTree],
195
198
  statuses: statusDefinitions,
package/src/setup.ts CHANGED
@@ -128,6 +128,14 @@ export function createGame(seed?: number): Engine {
128
128
  // ...
129
129
  // const worldStack = buildWorldStack({
130
130
  // playerId: 'player',
131
+ // factions: [{
132
+ // factionId: 'my-game',
133
+ // entityIds: ['grunt'],
134
+ // cohesion: 0.8,
135
+ // name: 'My Game',
136
+ // reputation: 0,
137
+ // disposition: 'neutral',
138
+ // }],
131
139
  // tradeGenre: myRuleset.id, // or a literal genre string
132
140
  // craftingGenre: myRuleset.id,
133
141
  // economyGenre: myRuleset.id,
@@ -41,6 +41,16 @@ describe('starter template', () => {
41
41
  expect(engine).toBeDefined();
42
42
  });
43
43
 
44
+ it('F-749aba8e: pack.factions seeds WorldState.factions for controllingFaction my-game', () => {
45
+ const engine = createGame(1);
46
+ expect(engine.store.state.factions['my-game']).toEqual({
47
+ id: 'my-game',
48
+ name: 'My Game',
49
+ reputation: 0,
50
+ disposition: 'neutral',
51
+ });
52
+ });
53
+
44
54
  it('tension rises when combat damage lands (tension-pressure fires)', () => {
45
55
  const engine = createGame(1);
46
56
  expect(engine.world.entities['player']?.resources.tension).toBe(0);