Use rot-js to create dungeon layout

This commit is contained in:
Peter Stockings
2026-01-05 14:58:07 +11:00
parent 45a1ed2253
commit 50a922ca85
2 changed files with 41 additions and 69 deletions

View File

@@ -85,7 +85,16 @@ describe('Combat Simulation', () => {
it("should attack if player is adjacent", () => {
const actors = new Map<EntityId, Actor>();
const player = { id: 1, category: "combatant", isPlayer: true, pos: { x: 4, y: 3 }, stats: createTestStats() } as any;
const enemy = { id: 2, category: "combatant", isPlayer: false, pos: { x: 3, y: 3 }, stats: createTestStats() } as any;
const enemy = {
id: 2,
category: "combatant",
isPlayer: false,
pos: { x: 3, y: 3 },
stats: createTestStats(),
// Set AI state to pursuing so the enemy will attack when adjacent
aiState: "pursuing",
lastKnownPlayerPos: { x: 4, y: 3 }
} as any;
actors.set(1, player);
actors.set(2, enemy);