Fix bug where slower enemies (ie rat) would never get scheduled a turn

This commit is contained in:
Peter Stockings
2026-01-06 10:34:23 +11:00
parent a2a1d0cc58
commit 0263495d0b
7 changed files with 282 additions and 67 deletions

View File

@@ -46,7 +46,8 @@ export function generateWorld(floor: number, runState: RunState): { world: World
pos: { x: playerX, y: playerY },
speed: GAME_CONFIG.player.speed,
stats: { ...runState.stats },
inventory: { gold: runState.inventory.gold, items: [...runState.inventory.items] }
inventory: { gold: runState.inventory.gold, items: [...runState.inventory.items] },
energy: 0
});
// Place exit in last room
@@ -391,7 +392,8 @@ function placeEnemies(floor: number, rooms: Room[], actors: Map<EntityId, Actor>
blockChance: 0,
luck: 0,
passiveNodes: []
}
},
energy: 0
});
occupiedPositions.add(k);