Browser co-op kitchen game: FastAPI + native WebSockets, server-authoritative 20 Hz simulation, in-memory anonymous lobbies, data-driven YAML levels, Canvas 2D vanilla ES-module client with locally authored SVG art and no external CDNs. .agents/PLAN.md records the LOCKED decisions; .agents/user_stories/ holds the 12 flow contracts; .agents/phases/todo/ breaks them into 14 sequential, test-gated phases (71 task files), each leaving the app launchable and the suite green. LLM-Generated: true
1.7 KiB
1.7 KiB
US-08 — Handle hazards and pressure without losing control
As a player in a late level, I want to deal with fires, spills, moving obstacles, and order surges, so that the escalation is a fair test of teamwork rather than random unfairness.
Acceptance criteria
- Fire starts on a station per level probability, spreads to an adjacent station after its burn timer unless dealt with, blocks its tile, and ruins items on it; it is extinguished by a sink-filled douse (carry water) with visible steam.
- Spill makes its tile slippery (accel/brake reduced, cook slides ~0.5 tile) and is cleaned by a wipe action; a cook leaving the kitchen with a spill under a station does not propagate it.
- Moving obstacles (cart, boat mast) follow their authored path and stun on contact for 0.6 s with a visible telegraph 0.5 s before entering a tile.
- Rush waves spawn a burst of orders with a HUD "RUSH" banner and a wave counter.
- Every hazard is data-driven (level YAML): type, location/station reference, rate, and mitigation — no hard-coded hazard placement in Python.
- Hazard effects are deterministic under a fixed seed (replay test covers all four).
- Client FX exist for each hazard and respect
prefers-reduced-motion(reduced: static markers instead of flicker/shake). - Hazard penalties never soft-lock a round: the round always ends by timer or target.
E2E suite
tests/e2e/test_us08_hazards.py — level fixture with fire + spill: extinguish, clean,
avoid a mover; asserts hazard states in the snapshot and reduced-motion rendering.
Phases
10_hazards_and_escalation_mechanics, 11_campaign_levels_and_progression