mirror of
https://github.com/Dasemu/web-imposter-game.git
synced 2026-11-26 15:26:28 +00:00
Add root CLAUDE.md, docs/ (game-rules.md, release.md), LESSONS.md and .env.example; trim README.md to a landing page linking to docs/. No linter, test runner or formatter is configured for this static HTML/CSS/JS project, so no .claude/settings.json hooks or CI workflows were added: there is nothing to run. CI (asset versioning + Android APK build/release) already exists in .gitea/workflows and .github/workflows and is documented in docs/release.md as-is, since there is no development branch to drive the standard version.yml flow. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Game rules
- Defaults: up to 10 players; impostors by player count (<=5 -> 1, 6-7 -> 2, >7 -> 3) and never more than half.
- Time defaults: 5 min with 4 or fewer players, up to 15 min with 10; deliberation = 1/3 of the match time (rounded).
- No self-voting. Max executions = number of impostors.
- Tie on execution slots: 1 extra minute of deliberation and a new vote only among tied players; if the tie persists, the impostors win.
- Starting player and direction (clockwise/counter-clockwise) are random.
- State is saved in
localStorage(impostorGameStateV2). Use "New match" to clear it.
Word pools
Each word pair consists of:
- Civilian word: what most players see.
- Impostor word: a related but different word that impostors see, to keep them guessing.
Example from www/word-pools/animales_naturaleza.txt:
Oso|Pez
Camello|Arena
Elefante|Safari
22 pools are available in www/word-pools/*.txt, listed in www/word-pools/manifest.json. Two of them (animales_naturaleza, objetos_cotidianos) are embedded in script.js (EMBEDDED_POOLS) so the game works fully offline; the rest are fetched over the network and require a connection. Players can select multiple pools at once; words are drawn randomly from the combined set.
Add a new pool
- Create a
.txtfile inwww/word-pools/with an optional header# Nameon the first line, thencivilian_word|impostor_wordpairs, one per line. - Add an entry in
www/word-pools/manifest.jsonwithid,name,emoji,count, and optionallylocal: true. - To make it work offline, also add an embedded version in
script.js'sEMBEDDED_POOLSarray.
UI notes
- Mobile optimized: no scrolling required on the setup screen, reveal via swipe or tap, compact adaptive UI.
- The pool selection grid scrolls vertically when needed to fit all 22 categories.