squad-proto/.claude/commands/room.md
z.kirill 4382af2322 Документация: границы движка, работа через модель, дизайн игры до лейтгейма
18-engine.md    границы Tile2D, проекции 2D, формат проекта, второй проект
  19-agent.md     инструменты --tool, скиллы, терминал в редакторе
  20-gdd.md       акты, петли, рост отряда, закон масштаба, бюджет 200 часов
  21-damage.md    семь стихий, статусы, десять реакций, формулы, триггеры
  22-loot.md      редкости, аффиксы, артефакты, зачарования, материалы
  23-endgame.md   Бездна, мутации, лидерборды, 262 ачивки

Плюс правки 01/02/07/15/16/17 под переехавшие пути и новые правила забега.

Дизайнерская часть держится на одном законе: угроза растёт квадратично, сила
отряда — линейно с затуханием, разрыв закрывается ЗНАНИЕМ, а не числами. Из
него выведены и экономика опыта (41 млн против 44 млн дохода), и то, почему
реакции считаются от глубины, а не от урона оружия, и почему в Бездне
множитель HP разрешён, а во всём авторском контенте запрещён.

.claude/commands: скиллы /tile2d, /room, /floor — правила этого движка,
которые нельзя вывести из кода. Главное записано первым: не отчитываться об
успехе без прохода --tool validate.

Числа в этих документах — вход для инструментов, а не украшение. Расхождение
между таблицей и выводом инструмента означает, что неправ документ.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 21:07:45 +03:00

50 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Author or repair a room
Request: `$ARGUMENTS`
A room is a text file: `projects/<project>/rooms/<name>.room`. Edit it directly — there is
no binary step. Format and reasoning: `docs/15-engine-and-editor.md`.
## Before writing
1. `tile2d_editor --tool rooms` — what the set already has, and at which depths.
2. `tile2d_editor --tool ascii <similar-room>` — read a working room of the same kind.
3. `tile2d_editor --tool catalog monster <depth>` — what may be placed at that depth, with
its cost in the danger budget.
A new room must answer "what does this one do that the others don't": a wide arena, a
corridor where the formation cannot turn, a pocket that forces the squad to split. Another
rectangle with spawn points is not a room, it is filler.
## Hard constraints
- size between 5×5 and 14×14 (`ROOM_SLOT` is 16, the room must leave rock around it);
- doors only on the border, and at least one — a room without doors is never connected;
- **every floor tile must be reachable from the doors.** A sealed inner chamber looks
perfectly normal in the grid and silently makes the floor easier: whatever spawns inside
can neither reach the squad nor be killed. This has already happened twice in this repo
(`storage`, then `maw`);
- spawn points stand on floor, never in a wall, and their table is never empty;
- ids in the table must exist in that project's catalog.
Spawn tables hold **weights and a chance**, not a creature: `spawn 6 4 0.65 rusher:3 shambler:2`
means "this point fires 65% of the time, and then it is a rusher three times out of five".
Depth decides who is allowed and what the floor can afford; the room only says where.
## Verify
```bash
tile2d_editor --tool room <name> # doors, spawn tables, problems
tile2d_editor --tool ascii <name> # the grid, with spawn points numbered
tile2d_editor --tool validate # the whole set, including depth coverage
tile2d_editor --tool map <depth> 42 # the room inside an assembled floor
```
`validate` returning 1 means the set is broken — fix it before reporting. `map` is how you
see whether the room actually connects: look for its shape and check that the corridors
reach it.
## Report
The room's name, size, what it is for, and the numbers from `validate` and one `map` run.