Use rot-js to create dungeon layout
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user