Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
e0f1d34
add backend code
timelic Jul 23, 2026
0d8a865
chore: establish Vue 3 migration baseline
timelic Jul 23, 2026
06ccacd
feat: migrate lobby and modal state to Pinia
timelic Jul 23, 2026
c3a074b
refactor: isolate websocket service lifecycle
timelic Jul 23, 2026
5f7f5b2
feat: harden legacy storage restoration
timelic Jul 23, 2026
ea1dea1
chore: migrate custom wraith icon to TypeScript
timelic Jul 23, 2026
9415026
refactor: type players Vuex module
timelic Jul 23, 2026
2dd69a9
refactor: type session Vuex module
timelic Jul 23, 2026
1770acb
refactor: type root Vuex store
timelic Jul 23, 2026
10dc028
refactor: type persistence compatibility plugin
timelic Jul 23, 2026
77e3731
refactor: share websocket envelope decoder
timelic Jul 23, 2026
e6b0f34
refactor: isolate lobby websocket transport
timelic Jul 23, 2026
76943f7
feat: migrate input modal state to Pinia
timelic Jul 23, 2026
909c8bd
feat: migrate interaction state to Pinia
timelic Jul 23, 2026
c52adba
feat: migrate session connection metrics to Pinia
timelic Jul 23, 2026
91e5eac
refactor: isolate session authorization transport state
timelic Jul 23, 2026
42f75da
refactor: extract session websocket dispatcher
timelic Jul 23, 2026
1f9d2b2
refactor: extract session mutation dispatcher
timelic Jul 23, 2026
e222e9d
feat: migrate audio detection state to Pinia
timelic Jul 23, 2026
acb5bda
feat: migrate role drawing state to Pinia
timelic Jul 23, 2026
2c70410
feat: migrate chat unread state to Pinia
timelic Jul 23, 2026
00a62c1
feat: migrate local speech state to Pinia
timelic Jul 23, 2026
59b17eb
feat: migrate session timer state to Pinia
timelic Jul 23, 2026
b6bb662
feat: migrate distribution state to Pinia
timelic Jul 23, 2026
a1d0ef7
feat: migrate review mode to Pinia
timelic Jul 23, 2026
f99e95a
feat: migrate legacy options to Pinia
timelic Jul 23, 2026
20dfa3f
feat: migrate voting state to Pinia
timelic Jul 23, 2026
c5659a4
feat: migrate session settings to Pinia
timelic Jul 23, 2026
fbea9b0
feat: migrate role activity to Pinia
timelic Jul 23, 2026
33cd7d9
feat: migrate player profile to Pinia
timelic Jul 23, 2026
01f8fbe
feat: migrate message outbox to Pinia
timelic Jul 23, 2026
3dca8cf
feat: migrate chat history to Pinia
timelic Jul 23, 2026
8bd62b6
feat: migrate group chats to Pinia
timelic Jul 23, 2026
0dbeabc
feat: migrate session identity to Pinia
timelic Jul 23, 2026
37e7854
feat: migrate grimoire state to Pinia
timelic Jul 23, 2026
dc5003c
feat: migrate app metadata to Pinia
timelic Jul 23, 2026
d4ce4d5
feat: migrate scenario state to Pinia
timelic Jul 23, 2026
041a2e4
feat: migrate players state to Pinia
timelic Jul 23, 2026
aab93e5
refactor: migrate intro and token to composition API
timelic Jul 23, 2026
5a43556
refactor: migrate town info and version modal
timelic Jul 23, 2026
424678f
refactor: move fabled selection to Pinia
timelic Jul 23, 2026
d0ab133
fix: preserve fabled mutation side effects
timelic Jul 23, 2026
660114e
refactor: migrate draw modal to composition API
timelic Jul 23, 2026
394493e
refactor: migrate group chat modal to composition API
timelic Jul 23, 2026
6930091
refactor: migrate vote history modal to composition API
timelic Jul 23, 2026
0872faf
refactor: migrate input modal to composition API
timelic Jul 23, 2026
d86cfd6
refactor: migrate game state modal to composition API
timelic Jul 23, 2026
788e0f8
refactor: migrate reference modal to composition API
timelic Jul 23, 2026
cd0ddcc
refactor: migrate role modal to composition API
timelic Jul 23, 2026
9caedc7
refactor: migrate roles modal to composition API
timelic Jul 23, 2026
82027c9
refactor: migrate reminder modal to composition API
timelic Jul 23, 2026
161b9ba
refactor: migrate night order modal to composition API
timelic Jul 23, 2026
cb28847
refactor: migrate edition modal to composition API
timelic Jul 23, 2026
4e73f08
refactor: migrate image cropper to composition API
timelic Jul 23, 2026
83c195d
docs: record composition API migration progress
timelic Jul 23, 2026
2eea71b
refactor: migrate vote controls to composition API
timelic Jul 23, 2026
cbde52f
refactor: migrate player token to composition API
timelic Jul 23, 2026
c111251
refactor: migrate town square to composition API
timelic Jul 23, 2026
6dbc3c1
refactor: migrate menu to composition API
timelic Jul 23, 2026
3771280
refactor: migrate app shell to composition API
timelic Jul 23, 2026
4f0800c
refactor: migrate session socket to TypeScript
timelic Jul 23, 2026
5d6cc07
chore: enforce TypeScript web sources
timelic Jul 23, 2026
9665742
refactor: extract legacy store selectors
timelic Jul 23, 2026
e654a41
refactor: decouple effects from Vuex subscriptions
timelic Jul 23, 2026
812a28b
refactor: extract night order domain rule
timelic Jul 23, 2026
79609b9
refactor: move app shell to Pinia effects
timelic Jul 23, 2026
fb7c651
refactor: move voting controls to Pinia effects
timelic Jul 23, 2026
24d5af5
refactor: move modal actions to Pinia effects
timelic Jul 23, 2026
4a639bf
refactor: remove Vuex compatibility getters
timelic Jul 23, 2026
efff958
refactor: move avatar persistence to Pinia
timelic Jul 23, 2026
8937fb8
refactor: move player modal updates to Pinia
timelic Jul 23, 2026
74b252c
refactor: move player token actions to Pinia
timelic Jul 23, 2026
59eece6
refactor: move scenario mutations to Pinia
timelic Jul 23, 2026
15da81e
refactor: move edition modal to Pinia
timelic Jul 23, 2026
0361960
refactor: remove duplicated Vuex scenario logic
timelic Jul 23, 2026
9e48260
refactor: move group chat modal to Pinia
timelic Jul 23, 2026
9e7cc32
refactor: move game state modal to Pinia
timelic Jul 23, 2026
2251dc9
refactor: route legacy component commands through Pinia
timelic Jul 23, 2026
2399aa3
refactor: start runtime effects from Pinia
timelic Jul 23, 2026
cfe515e
refactor: remove Vuex compatibility facade
timelic Jul 23, 2026
2405f66
fix: tolerate malformed persisted collections
timelic Jul 23, 2026
066f206
feat: validate custom scripts at scenario boundary
timelic Jul 23, 2026
9feabf8
fix: safely restore custom roles from storage
timelic Jul 23, 2026
88380bd
docs: record Pinia migration completion
timelic Jul 23, 2026
b5af131
refactor: remove Vuex-style commands from town square
timelic Jul 23, 2026
0455970
refactor: remove Vuex-style commands from menu
timelic Jul 23, 2026
047f686
refactor: migrate styles to Sass modules
timelic Jul 23, 2026
e8c3165
ci: guard TypeScript runtime sources
timelic Jul 23, 2026
8b1125f
fix: reject malformed session socket messages
timelic Jul 23, 2026
82f0567
feat: validate imported game state
timelic Jul 23, 2026
8078a1a
docs: align migration status with current architecture
timelic Jul 23, 2026
ae5f44e
refactor: expose Pinia game command bridge
timelic Jul 23, 2026
4cbd960
docs: add modern development guide
timelic Jul 23, 2026
4fd8e0b
refactor: extract viewport handling from town square
timelic Jul 23, 2026
dcc09ec
feat: validate dynamic initialization response
timelic Jul 23, 2026
463dbcf
refactor: extract town square computed state
timelic Jul 23, 2026
83626ad
refactor: extract menu computed state
timelic Jul 23, 2026
e40fb51
refactor: use direct component watchers
timelic Jul 23, 2026
d51741a
fix: scope cleared browser storage to app keys
timelic Jul 23, 2026
5030e53
refactor: extract menu display commands
timelic Jul 23, 2026
295d6f2
refactor: extract town square display commands
timelic Jul 23, 2026
7d3cf2e
refactor: type app component commands
timelic Jul 23, 2026
da2ecff
fix: release session socket timers on disconnect
timelic Jul 23, 2026
6f1f271
feat: reject unknown websocket commands
timelic Jul 23, 2026
bcf19de
feat: validate session websocket commands
timelic Jul 23, 2026
7e4167c
docs: record websocket boundary progress
timelic Jul 23, 2026
4b55662
feat: validate websocket talking payload
timelic Jul 23, 2026
64b2275
feat: validate nested websocket payloads
timelic Jul 23, 2026
d4875d3
refactor: extract menu audio controls
timelic Jul 23, 2026
dd9c8fc
refactor: type player component events
timelic Jul 23, 2026
f911a5a
refactor: extract town square player selection
timelic Jul 23, 2026
4106136
refactor: extract town square player actions
timelic Jul 23, 2026
4489639
refactor: extract town square chat controls
timelic Jul 23, 2026
75fc598
refactor: complete town square composition migration
timelic Jul 23, 2026
fedc3c8
refactor: extract menu player controls
timelic Jul 23, 2026
fed0289
refactor: extract menu edition controls
timelic Jul 23, 2026
6643f75
refactor: extract menu legacy option controls
timelic Jul 23, 2026
d3ac206
refactor: extract menu profile controls
timelic Jul 23, 2026
c85bba8
refactor: extract menu timer controls
timelic Jul 23, 2026
cc46238
refactor: extract menu distribution controls
timelic Jul 23, 2026
370b813
refactor: extract menu review controls
timelic Jul 23, 2026
a48e7bf
refactor: complete menu composition migration
timelic Jul 23, 2026
5a08681
refactor: type menu composition controls
timelic Jul 23, 2026
9ba8cf3
feat: validate scalar websocket payloads
timelic Jul 23, 2026
63c92dc
refactor: extract session socket protocol
timelic Jul 23, 2026
4b1e106
refactor: extract session outbox dispatcher
timelic Jul 23, 2026
9218602
feat: validate voting websocket payloads
timelic Jul 23, 2026
703c93c
feat: validate session movement payloads
timelic Jul 23, 2026
8bccd53
feat: validate legacy option payloads
timelic Jul 23, 2026
b06d6e8
refactor: move night order into domain workspace
timelic Jul 26, 2026
4c18024
feat: validate complex websocket payloads
timelic Jul 26, 2026
65d983d
ci: enforce runtime source checks
timelic Jul 26, 2026
f946808
feat: validate browser websocket payloads
timelic Jul 26, 2026
9293983
fix: project scenario state into session runtime
timelic Jul 26, 2026
6aaddd3
build: enforce entry bundle budgets
timelic Jul 26, 2026
2af85ff
style: establish shared color tokens
timelic Jul 26, 2026
a4f961c
fix: resolve dynamic assets with vite
timelic Jul 26, 2026
c247f0e
fix: handle denied clipboard permissions
timelic Jul 26, 2026
4998f2d
ci: publish unit coverage reports
timelic Jul 26, 2026
7f5b4bb
test: enforce domain coverage threshold
timelic Jul 26, 2026
c759a6c
test: enforce contracts coverage threshold
timelic Jul 26, 2026
ca453fe
test: cover storyteller day and night visuals
timelic Jul 26, 2026
69e8a35
test: enable component mounting coverage
timelic Jul 26, 2026
e26a2e5
test: cover viewport lifecycle
timelic Jul 26, 2026
22440cb
test: cover host token reconnection
timelic Jul 26, 2026
b25990d
test: cover duplicate player reconnection
timelic Jul 26, 2026
53c68fe
ci: track transport type suppression
timelic Jul 26, 2026
512a955
refactor: declare live session transport fields
timelic Jul 26, 2026
2d2663e
refactor: type session outbox transport
timelic Jul 26, 2026
c892fed
refactor: type session connection lifecycle
timelic Jul 26, 2026
1092cdd
refactor: type stable session handlers
timelic Jul 26, 2026
cb91ab0
refactor: guard session timer payloads
timelic Jul 26, 2026
0a2c188
refactor: type session chat handlers
timelic Jul 26, 2026
0efaecd
refactor: type session role activity
timelic Jul 26, 2026
acc4317
refactor: guard session queue acknowledgements
timelic Jul 26, 2026
a36234a
refactor: type session seat payloads
timelic Jul 26, 2026
164e08f
refactor: type session player projection
timelic Jul 26, 2026
0f811ed
refactor: type session gamestate payloads
timelic Jul 26, 2026
7fa42e7
refactor: type session grimoire payloads
timelic Jul 26, 2026
e472a12
refactor: type session distribution targets
timelic Jul 26, 2026
3619da7
fix: preserve numeric gamestate player ids
timelic Jul 26, 2026
86510df
docs: refresh migration verification baseline
timelic Jul 26, 2026
21ae489
refactor: route session leave through command boundary
timelic Jul 26, 2026
d05a9cf
refactor: type lobby transport boundary
timelic Jul 26, 2026
f97ab2a
refactor: narrow persisted session records
timelic Jul 26, 2026
d284479
refactor: type draw role pool
timelic Jul 26, 2026
0b46185
refactor: guard persisted group chats
timelic Jul 26, 2026
5b5bf7f
refactor: validate persisted role state
timelic Jul 26, 2026
994139b
refactor: type custom role selector
timelic Jul 26, 2026
1ffb4a9
refactor: narrow session dispatcher store
timelic Jul 26, 2026
363cad2
docs: record current quality baseline
timelic Jul 26, 2026
61dda6b
refactor: type session transport lifecycle
timelic Jul 26, 2026
6b91f3e
refactor: type session gamestate projection
timelic Jul 26, 2026
05f8e47
refactor: type session scenario payloads
timelic Jul 26, 2026
104c27f
refactor: type session player handlers
timelic Jul 26, 2026
d933789
refactor: guard session distribution targets
timelic Jul 26, 2026
115e758
docs: refresh strict transport baseline
timelic Jul 26, 2026
5e07b6e
refactor: type session grimoire payloads
timelic Jul 26, 2026
8a74fa7
docs: record grimoire typing progress
timelic Jul 26, 2026
4ec8ede
refactor: type session voting scalars
timelic Jul 26, 2026
5e52c62
refactor: type session vote handler
timelic Jul 26, 2026
81bde9a
refactor: guard session vote lock
timelic Jul 26, 2026
1936378
refactor: type session group chat commands
timelic Jul 26, 2026
6948dc1
refactor: type session seat commands
timelic Jul 26, 2026
5933931
refactor: narrow session chat sender
timelic Jul 26, 2026
90fd427
refactor: guard session wraith state
timelic Jul 26, 2026
b59dadc
refactor: guard session vote rotation
timelic Jul 26, 2026
fa594cd
refactor: narrow session grimoire and nomination
timelic Jul 26, 2026
72c4008
refactor: remove session transport type suppression
timelic Jul 26, 2026
fa95969
ci: include visual regression in quality gate
timelic Jul 26, 2026
d8bc45d
test: stabilize visual regression baseline
timelic Jul 26, 2026
d1ff4de
style: extract global base layer
timelic Jul 26, 2026
a8c87fe
feat: version legacy browser storage migration
timelic Jul 26, 2026
7d962f7
docs: align deployment instructions with vite
timelic Jul 26, 2026
922ede6
feat: add shared game data contracts
timelic Jul 26, 2026
a1767f6
test: add historical game state fixture
timelic Jul 26, 2026
95d1046
refactor: extract session transport guards
timelic Jul 26, 2026
0f449ff
build: add asset reference report
timelic Jul 26, 2026
f416789
style: extract application shell layer
timelic Jul 26, 2026
8680eac
refactor: move edition catalog logic into domain
timelic Jul 26, 2026
c1dea93
refactor: extract custom role catalog domain
timelic Jul 26, 2026
ab76450
refactor: normalize custom scripts in domain
timelic Jul 26, 2026
29b176b
refactor: type scenario catalog boundaries
timelic Jul 26, 2026
771f35c
style: extract intro layer
timelic Jul 26, 2026
3a27464
test: cover modal interaction behavior
timelic Jul 26, 2026
a66018b
fix: remove readonly template ref warning
timelic Jul 26, 2026
9973224
style: extract modal chrome layer
timelic Jul 26, 2026
e183899
refactor: type game state modal import boundary
timelic Jul 26, 2026
d8a59dc
style: format migration artifacts
timelic Jul 26, 2026
d3ad697
test: cover player state transitions
timelic Jul 26, 2026
3d8b1d2
refactor: extract server application factory
timelic Jul 26, 2026
e6dab7b
feat: validate every legacy client payload
timelic Jul 26, 2026
d47e672
refactor: type fabled modal catalog
timelic Jul 26, 2026
d9357b5
fix: skip traveler seats during role draw
timelic Jul 26, 2026
bd3b0aa
refactor: type role modal catalogs
timelic Jul 26, 2026
68994b4
refactor: type role distribution modal
timelic Jul 26, 2026
89cb772
refactor: normalize scenario night orders
timelic Jul 26, 2026
c3becb6
refactor: type night order modal
timelic Jul 26, 2026
cd4aadf
refactor: type chat group members
timelic Jul 26, 2026
7742c30
refactor: type token role input
timelic Jul 26, 2026
8658c3b
test: cover token fallback rendering
timelic Jul 26, 2026
09a1866
refactor: narrow player action inputs
timelic Jul 26, 2026
d41cb1d
refactor: type role state collections
timelic Jul 26, 2026
5280684
refactor: guard persisted role projections
timelic Jul 26, 2026
0216c2b
refactor: type custom script import
timelic Jul 26, 2026
c293086
ci: add stylelint warning baseline
timelic Jul 26, 2026
dfcc58a
refactor: type reminder sources
timelic Jul 26, 2026
e118a44
refactor: type reference display data
timelic Jul 26, 2026
5e86627
refactor: type player component inputs
timelic Jul 26, 2026
e9e38e7
review current codes
timelic Jul 26, 2026
aa4e732
refactor: split session transport lifecycle
timelic Jul 26, 2026
dc2167e
refactor: split session outbox and inbound routing
timelic Jul 26, 2026
7373fc9
refactor: split persistence compatibility layers
timelic Jul 26, 2026
caeca5d
refactor: replace legacy mutation effects
timelic Jul 26, 2026
ed58084
refactor: move menu to direct game actions
timelic Jul 26, 2026
cc22946
refactor: extract town square seat actions
timelic Jul 26, 2026
40e0ef1
refactor: extract player state actions
timelic Jul 26, 2026
2ba9f95
refactor: extract vote controller
timelic Jul 26, 2026
a980ce4
refactor: extract menu audio detection
timelic Jul 26, 2026
50d1fe0
refactor: detach persistence from runtime bridge
timelic Jul 26, 2026
ea7ecd3
refactor: split session socket domains
timelic Jul 26, 2026
cf8fc4c
test: cover multi-client session core flows
timelic Jul 27, 2026
9309bc3
test: cover voting and group chat flows
timelic Jul 27, 2026
d6319c4
style: extract town square layout layers
timelic Jul 27, 2026
b521ef1
style: extract player seat layers
timelic Jul 27, 2026
f4bc379
style: scope responsive and overlay ownership
timelic Jul 27, 2026
7d28dad
style: add shared visual tokens
timelic Jul 27, 2026
0075530
style: clear stylelint baseline
timelic Jul 27, 2026
8de34b9
remove doc
timelic Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Migration Baseline

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
baseline:
name: Legacy behavior baseline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run format:check
- run: npm run lint:baseline
- run: npm run lint:styles
- run: npm run check:runtime-sources
- run: npm run check:type-suppressions
- run: npm run typecheck
- run: npm run test:unit:coverage
- run: npm run check:coverage:domain
- run: npm run check:coverage:contracts
- run: npm run test:server
- run: npm run build
- name: Upload unit coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-coverage
path: coverage
if-no-files-found: ignore

browser:
name: Browser interaction baseline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run test:e2e
- run: npm run test:visual
- name: Upload browser test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-results
path: |
playwright-report
test-results
if-no-files-found: ignore
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version-file: '.nvmrc'
cache: npm

- name: Install and Build 🔧
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install
- run: npm run lint-ci

node-version-file: '.nvmrc'
cache: npm
- run: npm ci
- run: npm run lint:baseline
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@ node_modules
dist
*.pem
/server/certs
/server/dynamic
/server/dynamic
.DS_Store
/server/data
blob-report
playwright-report
test-results
coverage
packages/*/dist
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
25.3.0
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
70 changes: 59 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,70 @@
- 夜间行动顺序和提醒可以帮助说书人和玩家。
- 支持所有自定义原创角色和剧本。

## 开发与验证

当前前端使用 Vue 3、Vite 和 Pinia;服务端使用 TypeScript、Express 5 与 `ws`。推荐使用仓库固定的 Node `25.3.0`:

```bash
nvm use
npm ci
```

启动前端开发服务器:

```bash
npm run serve
```

另开终端启动本地服务端(默认端口 `8081`):

```bash
npm run server
```

前端默认连接正式 API;本地联调可设置 `VITE_API_BASE` 和 `VITE_WS_BASE`。服务端的 `PORT`、`HOST`、`DATA_DIR` 和跨域设置见 [server/README.md](server/README.md)。

生产发布与回滚须知也在 [server/README.md](server/README.md) 中:服务端房间和待发直连消息保存在内存中,重启会中断当前房间;请在维护窗口发布,并保留上一版构建与头像数据备份。

提交前执行完整质量门禁:

```bash
npm run check
npm run test:visual
```

`npm run check` 会运行格式与 lint 基线、运行时 TypeScript 源码检查、类型检查、单元/服务端集成/E2E 测试以及生产构建;视觉截图只比较基线,更新基线请显式使用 `npm run test:visual:update`。

资源治理可运行 `npm run report:assets`;它会输出由静态引用或 Vite glob 覆盖的资源目录,以及待人工确认的未引用资源,不会删除文件。

### 自定义剧本支持

任何从[英文剧本工具](https://bloodontheclocktower.com/script)或[中文剧本工具](https://clocktower.gstonegames.com/script_tool/)生成的JSON剧本文件都被支持,可以上传完整JSON文件或从剪切板粘贴。如果你想继续自定义剧本,可以加入以下`"_meta"`对象对剧本整体做出调整。


```json
[
{
"id": "_meta",
"name": "无上愉悦",
"author": "作者",
"logo": "https://url.to/your/logo.png",
"firstNight": ["dusk","minioninfo","demoninfo","marionette","poisoner","amnesiac","dawn"],
"otherNight": ["dusk","dawn"],
"firstNight": [
"dusk",
"minioninfo",
"demoninfo",
"marionette",
"poisoner",
"amnesiac",
"dawn"
],
"otherNight": ["dusk", "dawn"],
"bootlegger": ["私货商人1", "私货商人2"]
}
]
```

这些设置可以让剧本的主题更加明确,使用更方便。

- `"firstNight"`、`"otherNight`和`"bootlegger"`是[英文剧本工具](https://bloodontheclocktower.com/script)支持的关键词,可以直接从中导出无需修改。
- 包含`"firstNight"`会改写魔典内置角色的首夜行动顺序。
- 包含`"otherNight`会改写魔典内置角色的除首夜外其他夜的行动顺序。
Expand All @@ -60,11 +104,11 @@
"firstNight": 72,
"otherNight": 111
},
{
"id": "investigator"
{
"id": "investigator"
},
{
"id": "imp"
{
"id": "imp"
}
]
```
Expand All @@ -90,17 +134,21 @@
_注意_:如果你创建了一个自定义的“传奇角色”(Fabled)或“奇遇角色”(Loric),它将在加载自定义剧本时自动添加到游戏中。
- **ability**: 该角色的显示能力文本。
- **jinxes**: 自定义角色与其他角色的相克,会在角色技能表中出现,每个id代表跟一个角色的相克。具体如下:

```json
"jinxes":[{"id":"example1_id","reason":"相克1。", "id":"example2_id", "reason":"相克2。"}]
```

## 法律声明与下游告示要求

本项目采用带有 GPLv3 第 7 条附加条款的开源协议。如果您分发或分叉(Fork)本项目:
* 您**必须**完整保留终端启动时的版权横幅(Banner)。
* 您**必须**保留用于打印许可证详细信息的交互式命令或参数(如 --version)。
* 您**不得**移除用户界面(UI)中的任何作者署名信息。

- 您**必须**完整保留终端启动时的版权横幅(Banner)。
- 您**必须**保留用于打印许可证详细信息的交互式命令或参数(如 --version)。
- 您**不得**移除用户界面(UI)中的任何作者署名信息。

## 全局版权声明

除非另有明确说明,本仓库内的所有源代码文件、配置文件、组件文件(.vue)、脚本文件(.js)以及数据集定义文件(.json)均包含由 [@limpy01](https://github.com/limpy01)(2026年)独立创作的重大修改与原创功能增强。上述所有内容均受到版权法保护,并严格受本仓库附带的 GPLv3 第 7 条附加条款之约束。任何未经授权移除署名或违反本协议的分发行为,均将导致许可授权的即时终止。

本项目及其网站免费提供,不以任何方式隶属于 The Pandemonium Institute。
本项目及其网站免费提供,不以任何方式隶属于 The Pandemonium Institute。
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added e2e/__screenshots__/home.spec.js/home-empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading