Add levelling up mechanics through experience gained via killing enemies
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user