(Body Snatcher) Prepare for Pass 3
This commit is contained in:
7 files changed
+75
-2004
No files matched your search
+47
-11
@@ -59,6 +59,18 @@ You are a ghost. 1 HP. No attack. You explore a procedurally generated dungeon.
|
||||
- SPACE = host's attack
|
||||
- Movement = host's movement pattern (some enemies move differently)
|
||||
- When host HP hits 0 → ejected as ghost, timer starts
|
||||
- **Abandon host (X):** press X to voluntarily leave your current host and return to ghost form. The host SURVIVES at its current HP — it is left behind, stunned/pacified for 2 turns, and cannot be re-possessed for 2 turns (lockout) so you cannot i-frame spam one enemy. The ghost timer resumes from where it paused (it is NOT reset to 15 — only a host death resets the timer). This lets you swap to a better body or escape a doomed one without dying.
|
||||
|
||||
## Pacing & Combat Rules (calm by default)
|
||||
|
||||
The default feel must be EXPLORATORY, not a swarm. Honor ALL of these — they are completion criteria:
|
||||
|
||||
- **No friendly fire between enemies.** Enemy melee, AoE explosions, charges, and projectiles ONLY ever damage the PLAYER (the ghost or your current host). Enemies never reduce each other's HP. (Your possessed host's attacks and your host's AoE still damage enemies normally, and you still get essence for those kills.) This is the single most important rule — without it, Bombers/Chargers/Turrets wipe the floor in seconds and there is no game.
|
||||
- **Aggro radius, not global hate.** Every enemy starts DOCILE: it idles, wanders slowly, or holds position. It only begins to chase/attack when the player enters its aggro radius (about 6 tiles, gated by line of sight). Leave the aggro radius and it returns to idle after a short grace. The whole floor must NOT beeline at you on spawn.
|
||||
- **Slow baseline.** Most melee chasers move every 2 turns (some every 3). Fast swarms and rapid fire are the exception, tuned per enemy below. The player should usually get to choose engagements.
|
||||
- **Ranged enemies overheat.** Sentinel and Turret fire in short bursts, then OVERHEAT into a forced downtime during which they cannot shoot (and Turret is fully vulnerable). This guarantees a window to close the distance and reach them — no infinite-fire enemies you can never approach.
|
||||
- **Forgiving sightlines.** Enemies do not aggro through walls; aggro requires a clear path or line of sight.
|
||||
- **Spawn safety.** Keep the area around the player's spawn clear of enemies (at least 5 tiles) so a fresh floor or respawn is never an instant death.
|
||||
|
||||
## Enemy Roster
|
||||
|
||||
@@ -70,13 +82,13 @@ Each enemy is a **dual system**: it behaves one way as an opponent and different
|
||||
- **Color:** Red. **Shape:** Large square (28px).
|
||||
|
||||
### 2. Skitterer
|
||||
- **Enemy AI:** Fast (moves every turn). Swarm behavior — attracted to other Skitterers. Flanks player. Weak melee (1 damage).
|
||||
- **Enemy AI:** Moves every 2 turns. Loose swarm — drifts toward other Skitterers and flanks the player once aggroed. Weak melee (1 damage).
|
||||
- **Player kit:** Low HP (2), fast movement, rapid weak hits (1 damage per turn).
|
||||
- **Color:** Orange. **Shape:** Small triangle (16px).
|
||||
|
||||
### 3. Sentinel
|
||||
- **Enemy AI:** Keeps distance (maintains 4-tile range). Shoots projectiles toward player. Moves away if player gets close.
|
||||
- **Player kit:** Medium HP (4). Shoot projectiles in facing direction. Cannot melee.
|
||||
- **Enemy AI:** Keeps distance (maintains 4-tile range). Fires a BURST of 3 shots (1 per turn) toward the player, then OVERHEATS for 3 turns — it cannot fire while overheated and only repositions slowly, giving the player a clear window to close or possess. Moves away if the player gets close. Projectiles hit the player only, never other enemies.
|
||||
- **Player kit:** Medium HP (4). Shoot projectiles in facing direction. Cannot melee. Same burst/overheat rhythm as the enemy (3 shots, then a short cooldown) so it cannot infinitely stunlock.
|
||||
- **Color:** Purple. **Shape:** Hexagon.
|
||||
|
||||
### 4. Shielder
|
||||
@@ -85,7 +97,7 @@ Each enemy is a **dual system**: it behaves one way as an opponent and different
|
||||
- **Color:** Blue. **Shape:** Square with front line indicator.
|
||||
|
||||
### 5. Bomber
|
||||
- **Enemy AI:** Chase player. On death or when adjacent, explodes (3x3 AoE, 3 damage).
|
||||
- **Enemy AI:** Chase player when aggroed. On death or when adjacent, explodes (3x3 AoE, 3 damage **to the player only — never other enemies**).
|
||||
- **Player kit:** Low HP (3). Press SPACE to detonate (suicide, 3x3 AoE, 4 damage). Ejects you as ghost.
|
||||
- **Color:** Dark red. **Shape:** Circle with fuse indicator.
|
||||
|
||||
@@ -100,12 +112,12 @@ Each enemy is a **dual system**: it behaves one way as an opponent and different
|
||||
- **Color:** Cyan. **Shape:** Diamond.
|
||||
|
||||
### 8. Turret
|
||||
- **Enemy AI:** Stationary. 360° rapid fire (1 shot per turn). Tracks player.
|
||||
- **Player kit:** Medium HP (4). Rooted — cannot move. Press SPACE to fire in facing direction (Q/E to rotate). High DPS.
|
||||
- **Enemy AI:** Stationary. 360° fire at an aggroed player in a BURST (3 shots, 1 every 2 turns), then OVERHEATS for 3 turns — fully silenced and vulnerable during overheat, the window to rush it. Projectiles hit the player only, never other enemies.
|
||||
- **Player kit:** Medium HP (4). Rooted — cannot move. Press SPACE to fire in facing direction (Q/E to rotate). High DPS in bursts, with the same overheat cooldown so it cannot fire forever.
|
||||
- **Color:** Gray. **Shape:** Octagon.
|
||||
|
||||
### 9. Charger
|
||||
- **Enemy AI:** Telegraphs (flashes for 1 turn), then charges in a straight line toward player's position at telegraph time. Collision = 3 damage. Hits walls = stunned 2 turns.
|
||||
- **Enemy AI:** When aggroed, telegraphs (flashes for 1 turn), then charges in a straight line toward the player's position at telegraph time. Collision with the player = 3 damage. Hits walls = stunned 2 turns. The charge does NOT damage other enemies.
|
||||
- **Player kit:** Medium HP (5). Press SPACE to dash-charge 4 tiles in facing direction. Damages enemies in path (2 per enemy hit).
|
||||
- **Color:** Yellow. **Shape:** Arrow.
|
||||
|
||||
@@ -124,6 +136,15 @@ Each enemy is a **dual system**: it behaves one way as an opponent and different
|
||||
- **Player kit:** Medium HP (4). Every hit deals 1 damage and heals you +1. Sustain machine.
|
||||
- **Color:** Dark purple. **Shape:** Teardrop.
|
||||
|
||||
## Enemy Legend (in-game bestiary)
|
||||
|
||||
The game MUST include a readable in-game legend that explains every enemy — both how it behaves as an opponent AND what you get when you possess it. Requirements:
|
||||
|
||||
- Reachable from the TITLE SCREEN before play starts (e.g. a "Legend" / "Bestiary" panel or a key such as L), and openable again during play (e.g. from the pause menu).
|
||||
- One concise entry per enemy: name, color + shape, its enemy behavior, and its possessed player kit (HP / damage / special).
|
||||
- Plain text is fine (canvas-drawn or a DOM overlay). Keep it scannable — a short table or list, not a wall of prose.
|
||||
- This is in addition to the controls panel; do not omit it.
|
||||
|
||||
## Essence + Economy
|
||||
|
||||
- Enemies drop essence on death (value by type: Brute=3, Skitterer=1, Sentinel=3, Shielder=4, Bomber=2, Healer=5, Phaser=4, Turret=5, Charger=4, Siren=3, Mimic=4, Leech=4)
|
||||
@@ -198,6 +219,7 @@ These controls must be explained on the title screen before the run starts, not
|
||||
- **WASD / Arrow Keys:** Move one tile per turn.
|
||||
- **SPACE while ghost:** Possess an enemy within range. Explain that the ghost cannot attack.
|
||||
- **SPACE while possessed:** Use the current host's attack or special ability. Show the current action in the HUD.
|
||||
- **X while possessed:** Abandon your current host — eject as a ghost (the host survives, briefly pacified; see Possessed State). Show this in the contextual HUD hint while possessed.
|
||||
- **Q / E:** Rotate facing for directional bodies such as Shielder and Turret; activate relevant ghost upgrades when incorporeal.
|
||||
- **ENTER:** Start the game and confirm a highlighted shop/menu choice.
|
||||
- **ESC:** Pause or resume. The pause menu includes Save + Quit.
|
||||
@@ -229,13 +251,27 @@ The game MUST meet ALL of these. Do not consider yourself done until every one p
|
||||
19. At least 3 achievements track and unlock
|
||||
20. Title screen explains all controls, and gameplay/shop/pause screens show relevant contextual controls
|
||||
21. Base ghost timer is 15 seconds; Ghost T1 increases it to 20 seconds
|
||||
22. Enemies do not damage each other (no friendly fire): enemy melee, AoE, charges, and projectiles only ever hit the player
|
||||
23. Enemies idle until the player enters their aggro radius (≈6 tiles, line of sight); the whole floor does not swarm the player on spawn
|
||||
24. An in-game enemy legend (bestiary) is reachable before play and explains each enemy's behavior + possessed kit
|
||||
25. The ghost can voluntarily abandon a host (press X while possessed): returns to ghost form with the timer resumed (>0), the former host survives in the enemy list, and that host cannot be immediately re-possessed (short lockout)
|
||||
|
||||
## Testability (REQUIRED)
|
||||
|
||||
The game MUST expose its state for automated testing:
|
||||
- `window.GAME` object with at minimum: `{ state, player, enemies, grid, floor, essence, upgrades, log }`
|
||||
- `window.GAME.input(key)` — simulate a keypress programmatically (for headless testing)
|
||||
- `window.GAME.tick(n)` — advance the game loop n times (for headless testing)
|
||||
The game MUST expose its state for automated testing. Expose ALL of this on `window.GAME`:
|
||||
|
||||
- Properties: `state, player, enemies, grid, floor, essence, upgrades, achievements, projectiles, log`
|
||||
- `state` is one of: `title, playing, possessed, shop, paused, won, lost`
|
||||
- `start()` — initialize to the TITLE screen (do NOT auto-start play)
|
||||
- `input(key)` — handle one key token; accept `ArrowUp/Down/Left/Right`, `w a s d`, ` ` and `Space`, `q e`, `x` (abandon host), `Enter`, `Escape` (and a legend key such as `l` if used)
|
||||
- `tick(n)` — advance the loop n times. It MUST be DETERMINISTIC: it advances enemy AI AND decrements the ghost timer by n steps. Do NOT tie core game state to wall-clock time (visuals/audio may use real time).
|
||||
- `spawn(type, tx, ty)` — create an enemy of `type` at tile coords; returns it
|
||||
- `setFloor(n)` — debug jump: generate floor n, place the player (ghost) at spawn, state `playing`
|
||||
- `newRun()` — start a fresh floor-1 run with a NEW random layout
|
||||
- `save()` / `load()` — localStorage persistence (key `bodysnatcher_save`)
|
||||
- `openShop()` — debug: enter shop state with 3 choices; `buy(index)` — purchase choice at index
|
||||
- `player = {x, y, ghost, timer, host, facing}`; `enemy = {type, hp, maxHp, damage, speed, x, y, ...}`
|
||||
- `grid[y][x]` tile = number (0 floor, 1 wall, 2 door, 3 exit, 4 shop, 5 chest) OR object `{type, solid}`
|
||||
- The game MUST NOT crash if Canvas `getContext('2d')` returns a mock object with no-op methods
|
||||
- The game MUST NOT crash if `AudioContext` is a mock constructor
|
||||
- The game MUST NOT auto-start on load — wait for a keypress or explicit `start()` call, so headless tests can set up before starting
|
||||
|
||||
Reference in new issue
Block a user