@ai-rpg-engine/starter-zombie 2.0.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/README.md +69 -0
- package/dist/content.d.ts +19 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +292 -0
- package/dist/content.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/ruleset.d.ts +3 -0
- package/dist/ruleset.d.ts.map +1 -0
- package/dist/ruleset.js +56 -0
- package/dist/ruleset.js.map +1 -0
- package/dist/ruleset.test.d.ts +2 -0
- package/dist/ruleset.test.d.ts.map +1 -0
- package/dist/ruleset.test.js +43 -0
- package/dist/ruleset.test.js.map +1 -0
- package/dist/setup.d.ts +3 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +129 -0
- package/dist/setup.js.map +1 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/mcp-tool-shop-org/brand/main/logos/ai-rpg-engine/readme.png" width="400" alt="AI RPG Engine">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/mcp-tool-shop-org/ai-rpg-engine/actions/workflows/ci.yml"><img src="https://github.com/mcp-tool-shop-org/ai-rpg-engine/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
|
+
<a href="https://github.com/mcp-tool-shop-org/ai-rpg-engine/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
8
|
+
<a href="https://mcp-tool-shop-org.github.io/ai-rpg-engine/"><img src="https://img.shields.io/badge/Landing_Page-live-blue" alt="Landing Page"></a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
# @ai-rpg-engine/starter-zombie
|
|
12
|
+
|
|
13
|
+
**Ashfall Dead** — a zombie survival starter world for AI RPG Engine.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @ai-rpg-engine/starter-zombie
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## What You'll Learn
|
|
22
|
+
|
|
23
|
+
This starter demonstrates the full engine stack through a survival scenario:
|
|
24
|
+
|
|
25
|
+
| Feature | What the Zombie shows |
|
|
26
|
+
|---|---|
|
|
27
|
+
| **Rulesets** | `zombieMinimalRuleset` — stats (fitness/wits/nerve), resources (hp/stamina/infection), verbs, formulas |
|
|
28
|
+
| **Zones & traversal** | 5 zones across 3 rooms with adjacency, light levels, interactables, hazards |
|
|
29
|
+
| **Districts** | The Safehouse (survivors faction) vs Dead Zone (hostile, undead) |
|
|
30
|
+
| **Dialogue** | Branching medic conversation with hospital supply-run quest hook |
|
|
31
|
+
| **Combat** | Shambler (slow, tough) and Runner (fast, fragile) with aggressive AI |
|
|
32
|
+
| **Cognition & perception** | Memory decay, perception filter, zombie hunger presentation rule |
|
|
33
|
+
| **Progression** | 3-node Survival tree with XP rewards on entity defeat |
|
|
34
|
+
| **Environment** | Roaming dead draining stamina, infection-risk zones raising infection |
|
|
35
|
+
| **Factions** | Survivors faction with medic, scavenger, and military leader |
|
|
36
|
+
| **Belief provenance** | Rumor propagation with delay, belief tracking |
|
|
37
|
+
| **Inventory** | Antibiotics with scripted item-use effect reducing infection |
|
|
38
|
+
| **Simulation inspector** | Full inspection wired for replay analysis |
|
|
39
|
+
|
|
40
|
+
## What's Inside
|
|
41
|
+
|
|
42
|
+
- **5 zones** — Safehouse Lobby, Abandoned Gas Station, Overrun Street, Hospital East Wing, Hospital Rooftop
|
|
43
|
+
- **3 NPCs** — Dr. Chen (medic), Rook (scavenger), Sergeant Marsh (military leader)
|
|
44
|
+
- **2 enemies** — Shambler (slow, tough undead), Runner (fast, fragile undead)
|
|
45
|
+
- **1 item** — Antibiotics (reduces infection by 25)
|
|
46
|
+
- **1 progression tree** — Survival (Scrapper → Cool-Headed → Last One Standing)
|
|
47
|
+
- **1 presentation rule** — zombies perceive all living as prey
|
|
48
|
+
- **15 modules wired** — traversal, status, combat, inventory, dialogue, cognition, perception, progression, environment, factions, rumors, districts, belief, observer presentation, inspector
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
import { createGame } from '@ai-rpg-engine/starter-zombie';
|
|
54
|
+
|
|
55
|
+
// One line — all 15 modules, content, and ruleset pre-wired
|
|
56
|
+
const engine = createGame(42);
|
|
57
|
+
|
|
58
|
+
// Or import pieces individually:
|
|
59
|
+
import { manifest, zombieMinimalRuleset, survivalTree } from '@ai-rpg-engine/starter-zombie';
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
- [Handbook](https://mcp-tool-shop-org.github.io/ai-rpg-engine/handbook/)
|
|
65
|
+
- [GitHub](https://github.com/mcp-tool-shop-org/ai-rpg-engine)
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
Built by <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EntityState, ZoneState, GameManifest, ActionIntent, WorldState, ResolvedEvent } from '@ai-rpg-engine/core';
|
|
2
|
+
import type { DialogueDefinition, ProgressionTreeDefinition } from '@ai-rpg-engine/content-schema';
|
|
3
|
+
import type { DistrictDefinition } from '@ai-rpg-engine/modules';
|
|
4
|
+
export declare const manifest: GameManifest;
|
|
5
|
+
export declare const player: EntityState;
|
|
6
|
+
export declare const medic: EntityState;
|
|
7
|
+
export declare const scavenger: EntityState;
|
|
8
|
+
export declare const leader: EntityState;
|
|
9
|
+
export declare const shambler: EntityState;
|
|
10
|
+
export declare const runner: EntityState;
|
|
11
|
+
export declare const zones: ZoneState[];
|
|
12
|
+
export declare const medicDialogue: DialogueDefinition;
|
|
13
|
+
export declare const districts: DistrictDefinition[];
|
|
14
|
+
export declare const survivalTree: ProgressionTreeDefinition;
|
|
15
|
+
export declare const antibioticsEffect: {
|
|
16
|
+
itemId: string;
|
|
17
|
+
use: (action: ActionIntent, world: WorldState) => ResolvedEvent[];
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzH,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAIjE,eAAO,MAAM,QAAQ,EAAE,YActB,CAAC;AAIF,eAAO,MAAM,MAAM,EAAE,WAWpB,CAAC;AAIF,eAAO,MAAM,KAAK,EAAE,WAUnB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAUvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,WAUpB,CAAC;AAIF,eAAO,MAAM,QAAQ,EAAE,WAiBtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,WAiBpB,CAAC;AAIF,eAAO,MAAM,KAAK,EAAE,SAAS,EAmD5B,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,kBA0D3B,CAAC;AAIF,eAAO,MAAM,SAAS,EAAE,kBAAkB,EAczC,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,yBAkC1B,CAAC;AAIF,eAAO,MAAM,iBAAiB;;kBAEd,YAAY,SAAS,UAAU,KAAG,aAAa,EAAE;CAqBhE,CAAC"}
|
package/dist/content.js
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
// Ashfall Dead — content definitions
|
|
2
|
+
import { nextId } from '@ai-rpg-engine/core';
|
|
3
|
+
// --- Manifest ---
|
|
4
|
+
export const manifest = {
|
|
5
|
+
id: 'ashfall-dead',
|
|
6
|
+
title: 'Ashfall Dead',
|
|
7
|
+
version: '0.1.0',
|
|
8
|
+
engineVersion: '0.1.0',
|
|
9
|
+
ruleset: 'zombie-minimal',
|
|
10
|
+
modules: [
|
|
11
|
+
'traversal-core',
|
|
12
|
+
'status-core',
|
|
13
|
+
'combat-core',
|
|
14
|
+
'inventory-core',
|
|
15
|
+
'dialogue-core',
|
|
16
|
+
],
|
|
17
|
+
contentPacks: ['ashfall-dead'],
|
|
18
|
+
};
|
|
19
|
+
// --- Player ---
|
|
20
|
+
export const player = {
|
|
21
|
+
id: 'survivor',
|
|
22
|
+
blueprintId: 'survivor',
|
|
23
|
+
type: 'player',
|
|
24
|
+
name: 'Survivor',
|
|
25
|
+
tags: ['player', 'human', 'survivor'],
|
|
26
|
+
stats: { fitness: 5, wits: 6, nerve: 5 },
|
|
27
|
+
resources: { hp: 18, stamina: 12, infection: 0 },
|
|
28
|
+
statuses: [],
|
|
29
|
+
inventory: [],
|
|
30
|
+
zoneId: 'safehouse-lobby',
|
|
31
|
+
};
|
|
32
|
+
// --- NPCs ---
|
|
33
|
+
export const medic = {
|
|
34
|
+
id: 'medic_chen',
|
|
35
|
+
blueprintId: 'medic',
|
|
36
|
+
type: 'npc',
|
|
37
|
+
name: 'Dr. Chen',
|
|
38
|
+
tags: ['npc', 'survivor', 'medic', 'female'],
|
|
39
|
+
stats: { fitness: 3, wits: 7, nerve: 4 },
|
|
40
|
+
resources: { hp: 12, stamina: 10, infection: 0 },
|
|
41
|
+
statuses: [],
|
|
42
|
+
zoneId: 'safehouse-lobby',
|
|
43
|
+
};
|
|
44
|
+
export const scavenger = {
|
|
45
|
+
id: 'scavenger_rook',
|
|
46
|
+
blueprintId: 'scavenger',
|
|
47
|
+
type: 'npc',
|
|
48
|
+
name: 'Rook',
|
|
49
|
+
tags: ['npc', 'survivor', 'scavenger', 'male'],
|
|
50
|
+
stats: { fitness: 6, wits: 5, nerve: 3 },
|
|
51
|
+
resources: { hp: 16, stamina: 14, infection: 0 },
|
|
52
|
+
statuses: [],
|
|
53
|
+
zoneId: 'gas-station',
|
|
54
|
+
};
|
|
55
|
+
export const leader = {
|
|
56
|
+
id: 'leader_marsh',
|
|
57
|
+
blueprintId: 'leader',
|
|
58
|
+
type: 'npc',
|
|
59
|
+
name: 'Sergeant Marsh',
|
|
60
|
+
tags: ['npc', 'survivor', 'military', 'male'],
|
|
61
|
+
stats: { fitness: 6, wits: 4, nerve: 6 },
|
|
62
|
+
resources: { hp: 20, stamina: 14, infection: 0 },
|
|
63
|
+
statuses: [],
|
|
64
|
+
zoneId: 'safehouse-lobby',
|
|
65
|
+
};
|
|
66
|
+
// --- Enemies ---
|
|
67
|
+
export const shambler = {
|
|
68
|
+
id: 'shambler_1',
|
|
69
|
+
blueprintId: 'shambler',
|
|
70
|
+
type: 'enemy',
|
|
71
|
+
name: 'Shambler',
|
|
72
|
+
tags: ['enemy', 'zombie', 'undead', 'slow'],
|
|
73
|
+
stats: { fitness: 3, wits: 1, nerve: 10 },
|
|
74
|
+
resources: { hp: 12, stamina: 20, infection: 0 },
|
|
75
|
+
statuses: [],
|
|
76
|
+
zoneId: 'overrun-street',
|
|
77
|
+
ai: {
|
|
78
|
+
profileId: 'aggressive',
|
|
79
|
+
goals: ['consume-living'],
|
|
80
|
+
fears: [],
|
|
81
|
+
alertLevel: 0,
|
|
82
|
+
knowledge: {},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
export const runner = {
|
|
86
|
+
id: 'runner_1',
|
|
87
|
+
blueprintId: 'runner',
|
|
88
|
+
type: 'enemy',
|
|
89
|
+
name: 'Runner',
|
|
90
|
+
tags: ['enemy', 'zombie', 'undead', 'fast'],
|
|
91
|
+
stats: { fitness: 7, wits: 1, nerve: 10 },
|
|
92
|
+
resources: { hp: 8, stamina: 25, infection: 0 },
|
|
93
|
+
statuses: [],
|
|
94
|
+
zoneId: 'hospital-wing',
|
|
95
|
+
ai: {
|
|
96
|
+
profileId: 'aggressive',
|
|
97
|
+
goals: ['consume-living', 'chase-noise'],
|
|
98
|
+
fears: [],
|
|
99
|
+
alertLevel: 0,
|
|
100
|
+
knowledge: {},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
// --- Zones ---
|
|
104
|
+
export const zones = [
|
|
105
|
+
{
|
|
106
|
+
id: 'safehouse-lobby',
|
|
107
|
+
roomId: 'safehouse',
|
|
108
|
+
name: 'Safehouse Lobby',
|
|
109
|
+
tags: ['indoor', 'safe', 'home-base'],
|
|
110
|
+
neighbors: ['gas-station', 'overrun-street'],
|
|
111
|
+
light: 2,
|
|
112
|
+
stability: 6,
|
|
113
|
+
interactables: ['barricade-door', 'supply-shelf', 'radio'],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 'gas-station',
|
|
117
|
+
roomId: 'outskirts',
|
|
118
|
+
name: 'Abandoned Gas Station',
|
|
119
|
+
tags: ['indoor', 'loot', 'neutral'],
|
|
120
|
+
neighbors: ['safehouse-lobby', 'overrun-street'],
|
|
121
|
+
light: 3,
|
|
122
|
+
interactables: ['fuel-pump', 'counter', 'storage-room'],
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'overrun-street',
|
|
126
|
+
roomId: 'outskirts',
|
|
127
|
+
name: 'Overrun Street',
|
|
128
|
+
tags: ['outdoor', 'hostile', 'urban'],
|
|
129
|
+
neighbors: ['safehouse-lobby', 'gas-station', 'hospital-wing'],
|
|
130
|
+
light: 4,
|
|
131
|
+
noise: 7,
|
|
132
|
+
hazards: ['roaming-dead', 'broken-glass'],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'hospital-wing',
|
|
136
|
+
roomId: 'hospital',
|
|
137
|
+
name: 'Hospital East Wing',
|
|
138
|
+
tags: ['indoor', 'hostile', 'medical'],
|
|
139
|
+
neighbors: ['overrun-street', 'rooftop'],
|
|
140
|
+
light: 1,
|
|
141
|
+
noise: 3,
|
|
142
|
+
hazards: ['infection-risk', 'collapsed-ceiling'],
|
|
143
|
+
interactables: ['medicine-cabinet', 'gurney', 'emergency-exit'],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'rooftop',
|
|
147
|
+
roomId: 'hospital',
|
|
148
|
+
name: 'Hospital Rooftop',
|
|
149
|
+
tags: ['outdoor', 'high-ground', 'lookout'],
|
|
150
|
+
neighbors: ['hospital-wing'],
|
|
151
|
+
light: 6,
|
|
152
|
+
stability: 4,
|
|
153
|
+
interactables: ['signal-fire', 'binoculars', 'helicopter-pad'],
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
// --- Dialogue ---
|
|
157
|
+
export const medicDialogue = {
|
|
158
|
+
id: 'medic-triage',
|
|
159
|
+
speakers: ['Dr. Chen'],
|
|
160
|
+
entryNodeId: 'greeting',
|
|
161
|
+
nodes: {
|
|
162
|
+
greeting: {
|
|
163
|
+
id: 'greeting',
|
|
164
|
+
speaker: 'Dr. Chen',
|
|
165
|
+
text: "You're still breathing — that's better than most who come through that door. I've got antibiotics, but not enough. We need to hit the hospital before they're gone for good.",
|
|
166
|
+
choices: [
|
|
167
|
+
{
|
|
168
|
+
id: 'ask-hospital',
|
|
169
|
+
text: "What's the situation at the hospital?",
|
|
170
|
+
nextNodeId: 'hospital-intel',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: 'ask-infection',
|
|
174
|
+
text: 'What happens if someone gets bitten?',
|
|
175
|
+
nextNodeId: 'infection-info',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
'hospital-intel': {
|
|
180
|
+
id: 'hospital-intel',
|
|
181
|
+
speaker: 'Dr. Chen',
|
|
182
|
+
text: "East wing had the pharmacy. Runners have been spotted inside — fast ones. But the medicine cabinet should still be intact if nobody's been stupid enough to go in.",
|
|
183
|
+
choices: [
|
|
184
|
+
{
|
|
185
|
+
id: 'volunteer',
|
|
186
|
+
text: "I'll go. What do you need?",
|
|
187
|
+
nextNodeId: 'mission-accept',
|
|
188
|
+
},
|
|
189
|
+
{ id: 'refuse', text: "That's a death sentence.", nextNodeId: 'end' },
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
'infection-info': {
|
|
193
|
+
id: 'infection-info',
|
|
194
|
+
speaker: 'Dr. Chen',
|
|
195
|
+
text: "The infection spreads through bites — slowly at first, then it accelerates. Antibiotics can slow it down. A full dose might stop it entirely if caught early. But once it takes hold... there's nothing I can do.",
|
|
196
|
+
choices: [
|
|
197
|
+
{ id: 'to-hospital', text: 'Then we need that medicine.', nextNodeId: 'hospital-intel' },
|
|
198
|
+
{ id: 'leave', text: "I'll keep that in mind.", nextNodeId: 'end' },
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
'mission-accept': {
|
|
202
|
+
id: 'mission-accept',
|
|
203
|
+
speaker: 'Dr. Chen',
|
|
204
|
+
text: "Anything in the medicine cabinet — antibiotics, painkillers, surgical supplies. Bring it all back. And be quiet — those runners hunt by sound.",
|
|
205
|
+
effects: [
|
|
206
|
+
{ type: 'set-global', target: 'actor', params: { key: 'hospital-mission', value: true } },
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
end: {
|
|
210
|
+
id: 'end',
|
|
211
|
+
speaker: 'Dr. Chen',
|
|
212
|
+
text: "Stay safe out there. And if you start feeling feverish... come see me before it's too late.",
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
// --- Districts ---
|
|
217
|
+
export const districts = [
|
|
218
|
+
{
|
|
219
|
+
id: 'safehouse',
|
|
220
|
+
name: 'The Safehouse',
|
|
221
|
+
zoneIds: ['safehouse-lobby'],
|
|
222
|
+
tags: ['safe', 'survivors'],
|
|
223
|
+
controllingFaction: 'survivors',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: 'dead-zone',
|
|
227
|
+
name: 'Dead Zone',
|
|
228
|
+
zoneIds: ['overrun-street', 'gas-station', 'hospital-wing', 'rooftop'],
|
|
229
|
+
tags: ['hostile', 'undead', 'scavenging'],
|
|
230
|
+
},
|
|
231
|
+
];
|
|
232
|
+
// --- Progression ---
|
|
233
|
+
export const survivalTree = {
|
|
234
|
+
id: 'survival',
|
|
235
|
+
name: 'Survival',
|
|
236
|
+
currency: 'xp',
|
|
237
|
+
nodes: [
|
|
238
|
+
{
|
|
239
|
+
id: 'scrapper',
|
|
240
|
+
name: 'Scrapper',
|
|
241
|
+
cost: 10,
|
|
242
|
+
effects: [
|
|
243
|
+
{ type: 'stat-boost', params: { stat: 'fitness', amount: 1 } },
|
|
244
|
+
{ type: 'resource-boost', params: { resource: 'stamina', amount: 3 } },
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
id: 'cool-headed',
|
|
249
|
+
name: 'Cool-Headed',
|
|
250
|
+
cost: 12,
|
|
251
|
+
effects: [
|
|
252
|
+
{ type: 'stat-boost', params: { stat: 'nerve', amount: 1 } },
|
|
253
|
+
{ type: 'grant-tag', params: { tag: 'steady' } },
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: 'last-one-standing',
|
|
258
|
+
name: 'Last One Standing',
|
|
259
|
+
cost: 25,
|
|
260
|
+
requires: ['scrapper', 'cool-headed'],
|
|
261
|
+
effects: [
|
|
262
|
+
{ type: 'resource-boost', params: { resource: 'hp', amount: 8 } },
|
|
263
|
+
{ type: 'stat-boost', params: { stat: 'wits', amount: 2 } },
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
};
|
|
268
|
+
// --- Item Effect ---
|
|
269
|
+
export const antibioticsEffect = {
|
|
270
|
+
itemId: 'antibiotics',
|
|
271
|
+
use: (action, world) => {
|
|
272
|
+
const actor = world.entities[action.actorId];
|
|
273
|
+
if (!actor)
|
|
274
|
+
return [];
|
|
275
|
+
const previous = actor.resources.infection ?? 0;
|
|
276
|
+
actor.resources.infection = Math.max(0, previous - 25);
|
|
277
|
+
return [{
|
|
278
|
+
id: nextId('evt'),
|
|
279
|
+
tick: action.issuedAtTick,
|
|
280
|
+
type: 'resource.changed',
|
|
281
|
+
actorId: action.actorId,
|
|
282
|
+
payload: {
|
|
283
|
+
entityId: actor.id,
|
|
284
|
+
resource: 'infection',
|
|
285
|
+
previous,
|
|
286
|
+
current: actor.resources.infection,
|
|
287
|
+
delta: actor.resources.infection - previous,
|
|
288
|
+
},
|
|
289
|
+
}];
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
//# sourceMappingURL=content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAGrC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,mBAAmB;AAEnB,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE,OAAO;IACtB,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE;QACP,gBAAgB;QAChB,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,eAAe;KAChB;IACD,YAAY,EAAE,CAAC,cAAc,CAAC;CAC/B,CAAC;AAEF,iBAAiB;AAEjB,MAAM,CAAC,MAAM,MAAM,GAAgB;IACjC,EAAE,EAAE,UAAU;IACd,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC;IACrC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;IACxC,SAAS,EAAE,EAAE,EAAE,EAAE,E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|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleset.d.ts","sourceRoot":"","sources":["../src/ruleset.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,oBAAoB,EAAE,iBA4DlC,CAAC"}
|
package/dist/ruleset.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Ashfall Dead — ruleset definition
|
|
2
|
+
export const zombieMinimalRuleset = {
|
|
3
|
+
id: 'zombie-minimal',
|
|
4
|
+
name: 'Zombie Survival Minimal',
|
|
5
|
+
version: '0.1.0',
|
|
6
|
+
stats: [
|
|
7
|
+
{ id: 'fitness', name: 'Fitness', min: 1, max: 20, default: 5 },
|
|
8
|
+
{ id: 'wits', name: 'Wits', min: 1, max: 20, default: 5 },
|
|
9
|
+
{ id: 'nerve', name: 'Nerve', min: 1, max: 20, default: 4 },
|
|
10
|
+
],
|
|
11
|
+
resources: [
|
|
12
|
+
{ id: 'hp', name: 'HP', min: 0, max: 30, default: 18 },
|
|
13
|
+
{ id: 'stamina', name: 'Stamina', min: 0, max: 20, default: 12, regenRate: 1 },
|
|
14
|
+
{ id: 'infection', name: 'Infection', min: 0, max: 100, default: 0 },
|
|
15
|
+
],
|
|
16
|
+
verbs: [
|
|
17
|
+
{ id: 'move', name: 'Move', description: 'Move to an adjacent area' },
|
|
18
|
+
{ id: 'inspect', name: 'Search', description: 'Search an area for supplies or threats' },
|
|
19
|
+
{ id: 'attack', name: 'Fight', tags: ['combat'], description: 'Melee or improvised weapon combat' },
|
|
20
|
+
{ id: 'use', name: 'Use', description: 'Use an item from inventory' },
|
|
21
|
+
{ id: 'speak', name: 'Speak', tags: ['dialogue'], description: 'Talk to other survivors' },
|
|
22
|
+
{ id: 'choose', name: 'Choose', tags: ['dialogue'], description: 'Select a dialogue option' },
|
|
23
|
+
{ id: 'barricade', name: 'Barricade', tags: ['defense'], description: 'Fortify a location against the dead' },
|
|
24
|
+
{ id: 'scavenge', name: 'Scavenge', tags: ['loot', 'survival'], description: 'Forage for food, water, or materials' },
|
|
25
|
+
],
|
|
26
|
+
formulas: [
|
|
27
|
+
{
|
|
28
|
+
id: 'hit-chance',
|
|
29
|
+
name: 'Hit Chance',
|
|
30
|
+
description: 'Attacker fitness vs target fitness',
|
|
31
|
+
inputs: ['attacker.fitness', 'target.fitness'],
|
|
32
|
+
output: 'number (0-100)',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'damage',
|
|
36
|
+
name: 'Damage',
|
|
37
|
+
description: 'Base: attacker fitness, minimum 1',
|
|
38
|
+
inputs: ['attacker.fitness'],
|
|
39
|
+
output: 'number',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
defaultModules: [
|
|
43
|
+
'traversal-core',
|
|
44
|
+
'status-core',
|
|
45
|
+
'combat-core',
|
|
46
|
+
'inventory-core',
|
|
47
|
+
'dialogue-core',
|
|
48
|
+
],
|
|
49
|
+
progressionModels: [],
|
|
50
|
+
contentConventions: {
|
|
51
|
+
entityTypes: ['player', 'npc', 'survivor', 'enemy', 'zombie'],
|
|
52
|
+
statusTags: ['buff', 'debuff', 'infection', 'hunger', 'fear'],
|
|
53
|
+
combatTags: ['melee', 'improvised', 'ranged'],
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=ruleset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleset.js","sourceRoot":"","sources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,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC;QAC7D,UAAU,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;QAC7D,UAAU,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC;KAC9C;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleset.test.d.ts","sourceRoot":"","sources":["../src/ruleset.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { validateRulesetDefinition } from '@ai-rpg-engine/content-schema';
|
|
3
|
+
import { zombieMinimalRuleset } from './ruleset.js';
|
|
4
|
+
describe('zombieMinimalRuleset', () => {
|
|
5
|
+
it('validates against RulesetDefinition schema', () => {
|
|
6
|
+
const r = validateRulesetDefinition(zombieMinimalRuleset);
|
|
7
|
+
expect(r.ok).toBe(true);
|
|
8
|
+
expect(r.errors).toHaveLength(0);
|
|
9
|
+
});
|
|
10
|
+
it('declares expected stats', () => {
|
|
11
|
+
const statIds = zombieMinimalRuleset.stats.map((s) => s.id);
|
|
12
|
+
expect(statIds).toContain('fitness');
|
|
13
|
+
expect(statIds).toContain('wits');
|
|
14
|
+
expect(statIds).toContain('nerve');
|
|
15
|
+
});
|
|
16
|
+
it('declares expected resources', () => {
|
|
17
|
+
const resIds = zombieMinimalRuleset.resources.map((r) => r.id);
|
|
18
|
+
expect(resIds).toContain('hp');
|
|
19
|
+
expect(resIds).toContain('stamina');
|
|
20
|
+
expect(resIds).toContain('infection');
|
|
21
|
+
});
|
|
22
|
+
it('declares all verbs used by starter modules', () => {
|
|
23
|
+
const verbIds = zombieMinimalRuleset.verbs.map((v) => v.id);
|
|
24
|
+
expect(verbIds).toContain('move');
|
|
25
|
+
expect(verbIds).toContain('attack');
|
|
26
|
+
expect(verbIds).toContain('inspect');
|
|
27
|
+
expect(verbIds).toContain('speak');
|
|
28
|
+
expect(verbIds).toContain('choose');
|
|
29
|
+
expect(verbIds).toContain('use');
|
|
30
|
+
expect(verbIds).toContain('barricade');
|
|
31
|
+
expect(verbIds).toContain('scavenge');
|
|
32
|
+
});
|
|
33
|
+
it('lists all default modules', () => {
|
|
34
|
+
expect(zombieMinimalRuleset.defaultModules).toContain('traversal-core');
|
|
35
|
+
expect(zombieMinimalRuleset.defaultModules).toContain('combat-core');
|
|
36
|
+
});
|
|
37
|
+
it('declares combat formulas', () => {
|
|
38
|
+
const formulaIds = zombieMinimalRuleset.formulas.map((f) => f.id);
|
|
39
|
+
expect(formulaIds).toContain('hit-chance');
|
|
40
|
+
expect(formulaIds).toContain('damage');
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=ruleset.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleset.test.js","sourceRoot":"","sources":["../src/ruleset.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;QAC1D,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,MAAM,OAAO,GAAG,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC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,CAAC,CAAC;QACjC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACnC,MAAM,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACxE,MAAM,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,UAAU,GAAG,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAClE,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC3C,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAqD7C,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAiHhD"}
|
package/dist/setup.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// Game setup — wire content into engine
|
|
2
|
+
import { Engine } from '@ai-rpg-engine/core';
|
|
3
|
+
import { traversalCore, statusCore, combatCore, createInventoryCore, createDialogueCore, createCognitionCore, createPerceptionFilter, createProgressionCore, createEnvironmentCore, createFactionCognition, createRumorPropagation, createSimulationInspector, createDistrictCore, createBeliefProvenance, createObserverPresentation, giveItem, } from '@ai-rpg-engine/modules';
|
|
4
|
+
import { manifest, player, medic, scavenger, leader, shambler, runner, zones, districts, medicDialogue, antibioticsEffect, survivalTree, } from './content.js';
|
|
5
|
+
import { zombieMinimalRuleset } from './ruleset.js';
|
|
6
|
+
// Zombie-specific: undead hunt by noise — perceive all living as prey
|
|
7
|
+
const undeadHunger = {
|
|
8
|
+
id: 'undead-hunger',
|
|
9
|
+
eventPatterns: ['world.zone.entered'],
|
|
10
|
+
priority: 5,
|
|
11
|
+
condition: (_event, ctx) => ctx.observer.tags.includes('zombie'),
|
|
12
|
+
transform: (event, _ctx) => ({
|
|
13
|
+
...event,
|
|
14
|
+
payload: {
|
|
15
|
+
...event.payload,
|
|
16
|
+
_subjectiveDescription: 'warm meat stumbles into the feeding ground',
|
|
17
|
+
_actorDescription: 'fresh prey',
|
|
18
|
+
_zombiePerception: true,
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
export function createGame(seed) {
|
|
23
|
+
const engine = new Engine({
|
|
24
|
+
manifest,
|
|
25
|
+
seed: seed ?? 42,
|
|
26
|
+
ruleset: zombieMinimalRuleset,
|
|
27
|
+
modules: [
|
|
28
|
+
traversalCore,
|
|
29
|
+
statusCore,
|
|
30
|
+
combatCore,
|
|
31
|
+
createInventoryCore([antibioticsEffect]),
|
|
32
|
+
createDialogueCore([medicDialogue]),
|
|
33
|
+
createCognitionCore({ decay: { baseRate: 0.02, pruneThreshold: 0.05, instabilityFactor: 0.5 } }),
|
|
34
|
+
createPerceptionFilter(),
|
|
35
|
+
createProgressionCore({
|
|
36
|
+
trees: [survivalTree],
|
|
37
|
+
rewards: [{
|
|
38
|
+
eventPattern: 'combat.entity.defeated',
|
|
39
|
+
currencyId: 'xp',
|
|
40
|
+
amount: 8,
|
|
41
|
+
recipient: 'actor',
|
|
42
|
+
}],
|
|
43
|
+
}),
|
|
44
|
+
createEnvironmentCore({
|
|
45
|
+
hazards: [{
|
|
46
|
+
id: 'roaming-dead',
|
|
47
|
+
triggerOn: 'world.zone.entered',
|
|
48
|
+
condition: (zone) => zone.hazards?.includes('roaming-dead') ?? false,
|
|
49
|
+
effect: (zone, entity, _world, tick) => {
|
|
50
|
+
entity.resources.stamina = Math.max(0, (entity.resources.stamina ?? 0) - 2);
|
|
51
|
+
return [];
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'infection-risk',
|
|
56
|
+
triggerOn: 'world.zone.entered',
|
|
57
|
+
condition: (zone) => zone.hazards?.includes('infection-risk') ?? false,
|
|
58
|
+
effect: (zone, entity, _world, tick) => {
|
|
59
|
+
if (entity.tags.includes('human')) {
|
|
60
|
+
entity.resources.infection = Math.min(100, (entity.resources.infection ?? 0) + 5);
|
|
61
|
+
}
|
|
62
|
+
return [];
|
|
63
|
+
},
|
|
64
|
+
}],
|
|
65
|
+
}),
|
|
66
|
+
createFactionCognition({
|
|
67
|
+
factions: [{
|
|
68
|
+
factionId: 'survivors',
|
|
69
|
+
entityIds: ['medic_chen', 'scavenger_rook', 'leader_marsh'],
|
|
70
|
+
cohesion: 0.6,
|
|
71
|
+
}],
|
|
72
|
+
}),
|
|
73
|
+
createRumorPropagation({ propagationDelay: 2 }),
|
|
74
|
+
createDistrictCore({ districts }),
|
|
75
|
+
createBeliefProvenance(),
|
|
76
|
+
createObserverPresentation({
|
|
77
|
+
rules: [undeadHunger],
|
|
78
|
+
}),
|
|
79
|
+
createSimulationInspector(),
|
|
80
|
+
],
|
|
81
|
+
});
|
|
82
|
+
// Add zones
|
|
83
|
+
for (const zone of zones) {
|
|
84
|
+
engine.store.addZone(zone);
|
|
85
|
+
}
|
|
86
|
+
// Add entities
|
|
87
|
+
engine.store.addEntity({ ...player });
|
|
88
|
+
engine.store.addEntity({ ...medic });
|
|
89
|
+
engine.store.addEntity({ ...scavenger });
|
|
90
|
+
engine.store.addEntity({ ...leader });
|
|
91
|
+
engine.store.addEntity({ ...shambler });
|
|
92
|
+
engine.store.addEntity({ ...runner });
|
|
93
|
+
// Set player
|
|
94
|
+
engine.store.state.playerId = 'survivor';
|
|
95
|
+
engine.store.state.locationId = 'safehouse-lobby';
|
|
96
|
+
// Give antibiotics after accepting hospital mission
|
|
97
|
+
engine.store.events.on('dialogue.ended', (event) => {
|
|
98
|
+
if (event.payload.dialogueId === 'medic-triage') {
|
|
99
|
+
const world = engine.store.state;
|
|
100
|
+
if (world.globals['hospital-mission']) {
|
|
101
|
+
const playerEntity = world.entities['survivor'];
|
|
102
|
+
if (playerEntity && !(playerEntity.inventory ?? []).includes('antibiotics')) {
|
|
103
|
+
const giveEvent = giveItem(playerEntity, 'antibiotics', engine.tick);
|
|
104
|
+
engine.store.recordEvent(giveEvent);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
// Audio cue on entering hospital
|
|
110
|
+
engine.store.events.on('world.zone.entered', (event) => {
|
|
111
|
+
if (event.payload.zoneId === 'hospital-wing') {
|
|
112
|
+
engine.store.emitEvent('audio.cue.requested', {
|
|
113
|
+
cueId: 'scene.hospital-reveal',
|
|
114
|
+
channel: 'stinger',
|
|
115
|
+
priority: 'high',
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
// Audio cue on combat defeat
|
|
120
|
+
engine.store.events.on('combat.entity.defeated', () => {
|
|
121
|
+
engine.store.emitEvent('audio.cue.requested', {
|
|
122
|
+
cueId: 'combat.victory',
|
|
123
|
+
channel: 'stinger',
|
|
124
|
+
priority: 'high',
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
return engine;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,wCAAwC;AAExC,OAAO,EAAE,MAAM,EAAE,MAA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AC,CAAC;IAEH,6BAA6B;IAC7B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,qBAAqB,EAAE;YAC5C,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ai-rpg-engine/starter-zombie",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "AI RPG Engine zombie survival starter: Ashfall Dead",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": ["dist"],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"test": "vitest run"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@ai-rpg-engine/core": "*",
|
|
21
|
+
"@ai-rpg-engine/content-schema": "*",
|
|
22
|
+
"@ai-rpg-engine/modules": "*"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "mcp-tool-shop",
|
|
26
|
+
"homepage": "https://mcp-tool-shop-org.github.io/ai-rpg-engine/",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/mcp-tool-shop-org/ai-rpg-engine.git",
|
|
30
|
+
"directory": "packages/starter-zombie"
|
|
31
|
+
},
|
|
32
|
+
"keywords": ["rpg", "zombie", "survival", "horror", "game-engine", "starter", "worldbuilding", "content-pack"],
|
|
33
|
+
"engines": { "node": ">=20" }
|
|
34
|
+
}
|