Add levelling up mechanics through experience gained via killing enemies

This commit is contained in:
Peter Stockings
2026-01-04 18:36:31 +11:00
parent 42cd77998d
commit 29e46093f5
11 changed files with 373 additions and 84 deletions

View File

@@ -19,11 +19,12 @@ export function isBlocked(w: World, x: number, y: number): boolean {
if (isWall(w, x, y)) return true;
for (const a of w.actors.values()) {
if (a.pos.x === x && a.pos.y === y) return true;
if (a.pos.x === x && a.pos.y === y && a.type !== "exp_orb") return true;
}
return false;
}
export function isPlayerOnExit(w: World, playerId: EntityId): boolean {
const p = w.actors.get(playerId);
if (!p) return false;