Author SHA1 Message Date
github-actions[bot] 8079c868be Prepare manifest for v2.0.2.3-rc.12 2026-11-24 09:48:25 +00:00
Diuse defbd639e1 fixed # 修复卡牌图鉴的已知问题 2026-11-24 17:47:00 +08:00
Diuse d61b4b2526 fixed # 新增缩放倍率适配 2026-11-24 14:10:04 +08:00
Diuse 98116bef7b fixed # 修复部分样式BUG 2026-11-24 12:08:04 +08:00
Diuse 2d7bd0fbdc fixed # 更改更新方式 2026-11-24 10:17:49 +08:00
Diuse 884d694d22 fixed # 更新文档内容 2026-11-24 00:47:30 +08:00
Diuse 676977c12a Merge branch 'main' of https://github.com/Shu-Ying/noname-shuying 2026-11-23 23:51:51 +08:00
Diuse 0eeba640ae fixed # 新增药水机制 2026-11-23 23:45:37 +08:00
Diuse 1bf3067bdb fixed # 优化角色选择界面 2026-11-23 17:45:50 +08:00
Diuse f955716c97 fixed # 修复大量BUG 2026-11-22 17:36:42 +08:00
Diuse 9c3687fe7f fixed # 更改休息处和商店的样式 2026-11-19 18:32:47 +08:00
Diuse 8848f6524c fixed # 不想写了 2026-10-30 00:55:36 +08:00
Diuse d5715c9f5a fixed # 修复状态列表异常的bug 2026-10-29 15:21:11 +08:00
Diuse 4036041819 fixed # 更新工作流 2026-10-29 14:45:51 +08:00
Diuse b9664de9bd fixed # 修正样式BUG 2026-10-29 14:28:19 +08:00
Diuse 59e62d22c9 fixed # 偷偷更新GM菜单内容 2026-10-29 12:07:48 +08:00
Diuse 727f469e93 fixed # 更改个人HUD 2026-10-23 00:38:05 +08:00
Diuse fe3ebcc0e8 fixed # 更新逻辑系统优化 2026-10-14 18:43:12 +08:00
Diuse 2a91f43675 fixed # 新增印牌羁绊
fixed # 修复部分已知问题
2026-10-14 18:06:14 +08:00
Diuse dce49106a0 fixed # 手牌区新增遗物区 2026-10-13 18:10:42 +08:00
Diuse a8942c158e chore(native): archive mengsan-hand-relics 2026-10-13 18:08:25 +08:00
Diuse b9ebbfac7e fixed # 归档已完成的天书技能审查修复 2026-10-13 17:43:30 +08:00
203 changed files with 12414 additions and 2096 deletions
+4 -2
View File
@@ -20,7 +20,7 @@ The entire Skill invocation must remain read-only:
- Do not fix findings, advance phase, or update tasks, state, verification reports, or review records. - Do not fix findings, advance phase, or update tasks, state, verification reports, or review records.
- Do not call this review a Verify pass or treat “no findings” as proof that tests passed. - Do not call this review a Verify pass or treat “no findings” as proof that tests passed.
Only run commands needed to read files, query state, and inspect Git diffs. Checks that might execute project code, install dependencies, or produce files are outside this entry's scope. Only run commands needed to read files, query state, and inspect Git diffs, plus the focused browser check in the [battle UI review checklist](../../../docs/reviews/mengsan-battle-ui.md). Run that check without screenshot output unless a temporary directory outside the repository has been designated for review evidence. All other checks that execute project code, install dependencies, or produce files are outside this entry's scope.
## 1. Locate the project and current change ## 1. Locate the project and current change
@@ -80,6 +80,8 @@ If the available evidence still cannot establish a reliable, verifiable baseline
## 4. Perform the review ## 4. Perform the review
Apply the battle UI review checklist and record the results by scenario name in the evidence status. Reuse evidence bound to the current changes when available.
Review the requirements, tasks, and current diff, focusing only on: Review the requirements, tasks, and current diff, focusing only on:
- Implementation correctness and clear logic errors. - Implementation correctness and clear logic errors.
@@ -110,7 +112,7 @@ Evidence: The specific relationship to the diff, task, spec, or verification rec
Then include: Then include:
- `Review scope`: workflow, change, phase, baseline, included diffs, and any scope limitations. - `Review scope`: workflow, change, phase, baseline, included diffs, and any scope limitations.
- `Evidence status`: the test, build, and verification records inspected and whether they still apply to the current changes. Do not rerun tests. - `Evidence status`: report each battle UI scenario by its name in the checklist, together with the other test, build, and verification records inspected and whether they still apply to the current changes.
- `Open questions`: only questions that actually prevent a judgment. - `Open questions`: only questions that actually prevent a judgment.
- `Conclusion`: the finding count, or an explicit “No concrete findings.” - `Conclusion`: the finding count, or an explicit “No concrete findings.”
+15 -2
View File
@@ -58,7 +58,7 @@ jobs:
throw "extension.js 的版本号必须为 $version" throw "extension.js 的版本号必须为 $version"
} }
# The updater reads raw tag paths, not release attachments. # The updater reads manifests from raw tag paths.
# Never generate new manifests after the release tag already exists. # Never generate new manifests after the release tag already exists.
python (Join-Path $stage 'tools/verify_manifest.py') ` python (Join-Path $stage 'tools/verify_manifest.py') `
--root $stage ` --root $stage `
@@ -109,6 +109,11 @@ jobs:
'@ | python - $stage $package '@ | python - $stage $package
if ($LASTEXITCODE -ne 0) { throw '打包失败' } if ($LASTEXITCODE -ne 0) { throw '打包失败' }
$partsDir = Join-Path $env:RUNNER_TEMP "mengsan-parts-$tag"
python (Join-Path $stage 'tools/build_mengsan_archives.py') `
--root $stage --out-dir $partsDir --tag $tag
if ($LASTEXITCODE -ne 0) { throw '梦三分包失败' }
Write-Host "版本:$version" Write-Host "版本:$version"
Write-Host "文件数:$($manifest.file_count)" Write-Host "文件数:$($manifest.file_count)"
Write-Host "安装包:$package" Write-Host "安装包:$package"
@@ -152,10 +157,18 @@ jobs:
$releaseFiles = @($manifestPath) $releaseFiles = @($manifestPath)
$releaseFiles += $moduleManifests $releaseFiles += $moduleManifests
$releaseFiles += $package $releaseFiles += $package
$partsDir = Join-Path $env:RUNNER_TEMP "mengsan-parts-$tag"
$releaseFiles += @(Get-ChildItem -LiteralPath $partsDir `
-Filter '*.zip' -File | Sort-Object Name | ForEach-Object { $_.FullName })
foreach ($file in $releaseFiles) { foreach ($file in $releaseFiles) {
$attachment = if ($file -like '*.zip') {
"attachment=@$file;type=application/zip"
} else {
"attachment=@$file"
}
curl.exe --fail --silent --show-error ` curl.exe --fail --silent --show-error `
-H "Authorization: token $env:GITEA_TOKEN" ` -H "Authorization: token $env:GITEA_TOKEN" `
-F "attachment=@$file" ` -F $attachment `
$assetApi | Out-Null $assetApi | Out-Null
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "上传附件失败:$file" throw "上传附件失败:$file"
+28 -8
View File
@@ -1,12 +1,12 @@
name: Release extension name: Release extension
on: on:
push:
branches:
- "**"
paths:
- "extension.js"
workflow_dispatch: workflow_dispatch:
inputs:
version:
description: "版本号,例如 2.0.1.2 或 2.0.1.2-rc.1"
required: true
type: string
permissions: permissions:
contents: write contents: write
@@ -17,23 +17,33 @@ concurrency:
jobs: jobs:
release: release:
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: windows-latest runs-on: windows-latest
defaults: defaults:
run: run:
shell: pwsh shell: pwsh
env: env:
RELEASE_VERSION: ${{ inputs.version }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
BEFORE_SHA: ${{ github.event.before }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps: steps:
- name: Check out source - name: Check out source
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ github.event.repository.default_branch }} ref: ${{ github.sha }}
fetch-depth: 0 fetch-depth: 0
- name: Read current version and detect change
id: version
run: |
./tools/resolve_release_version.ps1 `
-Root $env:GITHUB_WORKSPACE `
-EventName $env:GITHUB_EVENT_NAME `
-PreviousRef $env:BEFORE_SHA
- name: Generate manifest and create tag - name: Generate manifest and create tag
if: steps.version.outputs.should_release == 'true'
run: | run: |
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
$version = $env:RELEASE_VERSION $version = $env:RELEASE_VERSION
@@ -118,6 +128,7 @@ jobs:
Write-Host "已创建包含清单的标签:$tag" Write-Host "已创建包含清单的标签:$tag"
- name: Build ZIP from tag - name: Build ZIP from tag
if: steps.version.outputs.should_release == 'true'
run: | run: |
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
$version = $env:RELEASE_VERSION $version = $env:RELEASE_VERSION
@@ -174,11 +185,17 @@ jobs:
'@ | python - $stage $package '@ | python - $stage $package
if ($LASTEXITCODE -ne 0) { throw '打包失败' } if ($LASTEXITCODE -ne 0) { throw '打包失败' }
$partsDir = Join-Path $env:RUNNER_TEMP "mengsan-parts-$tag"
python (Join-Path $stage 'tools/build_mengsan_archives.py') `
--root $stage --out-dir $partsDir --tag $tag
if ($LASTEXITCODE -ne 0) { throw '梦三分包失败' }
Write-Host "版本:$version" Write-Host "版本:$version"
Write-Host "文件数:$($manifest.file_count)" Write-Host "文件数:$($manifest.file_count)"
Write-Host "安装包:$package" Write-Host "安装包:$package"
- name: Publish GitHub Release - name: Publish GitHub Release
if: steps.version.outputs.should_release == 'true'
run: | run: |
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
if (!$env:GITHUB_TOKEN) { if (!$env:GITHUB_TOKEN) {
@@ -210,7 +227,10 @@ jobs:
-ContentType 'application/json' ` -ContentType 'application/json' `
-Body $body -Body $body
foreach ($file in @($manifestPath, $package)) { $partsDir = Join-Path $env:RUNNER_TEMP "mengsan-parts-$tag"
$partFiles = @(Get-ChildItem -LiteralPath $partsDir `
-Filter '*.zip' -File | Sort-Object Name | ForEach-Object { $_.FullName })
foreach ($file in (@($manifestPath, $package) + $partFiles)) {
$name = [uri]::EscapeDataString([IO.Path]::GetFileName($file)) $name = [uri]::EscapeDataString([IO.Path]::GetFileName($file))
$uploadUri = $release.upload_url.Split('{')[0] + "?name=$name" $uploadUri = $release.upload_url.Split('{')[0] + "?name=$name"
$contentType = if ($file -like '*.zip') { $contentType = if ($file -like '*.zip') {
+8 -4
View File
@@ -11,15 +11,17 @@ tools/*.mjs
/mengsan/.planning/ /mengsan/.planning/
/mengsan/verification /mengsan/verification
/mengsan/assets/sts2/ /mengsan/assets/sts2/
/mengsan/tools/.sts2-source
/Slay the Spire 2 /Slay the Spire 2
*.mjs *.mjs
!tools/test_skill_teardown.mjs
!tools/test_battle_lifecycle.mjs
*.cjs *.cjs
!mengsan/tools/check-sts2-relics.mjs !/tools/test_mengsan_zip_install.mjs
!mengsan/tools/write-sts2-relics-report.mjs !/mengsan/tools/test-hud-status.cjs
!/mengsan/tools/test-battle-hud.cjs
!/mengsan/tools/test-journey-ui-zoom.cjs
!/mengsan/tools/import-status-icons.cjs
/.update_tmp/ /.update_tmp/
/.planning/ /.planning/
@@ -50,3 +52,5 @@ Desktop.ini
/.comet/* /.comet/*
!/.comet/config.yaml !/.comet/config.yaml
# <<< Comet managed project state <<< # <<< Comet managed project state <<<
# Added by code-review-graph
.code-review-graph/
+50
View File
@@ -17,3 +17,53 @@ In this repository, before starting work that may need code changes or investiga
- If configuration or state is invalid and `nextCommand` is absent, stop and report the reason; do not guess another workflow. - If configuration or state is invalid and `nextCommand` is absent, stop and report the reason; do not guess another workflow.
- Never attach unrelated work merely because an active change exists. The Native entry inspects uncommitted work; the probe does not attribute it automatically. - Never attach unrelated work merely because an active change exists. The Native entry inspects uncommitted work; the probe does not attribute it automatically.
</comet-ambient-resume> </comet-ambient-resume>
<!-- code-review-graph MCP tools -->
## MCP Tools: code-review-graph
**This project has a knowledge graph. Start with the code-review-graph
MCP tools to narrow scope, then read the source.** The graph is cheaper than scanning files and
gives you structural context (callers, dependents, test coverage) that file search cannot.
### When to use graph tools FIRST
- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep
- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports
- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files
- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for
- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`
### Verify in the source
- Narrow scope with the graph, then read the source. Do not change code from graph output alone.
- For any non-trivial change, read the implementation and the relevant tests before concluding.
- Verify the exact source when touching behavior, database logic, migrations, retries, fallbacks,
recovery, or compatibility code.
- When the graph and the source disagree, the source wins. The graph may be stale or may not
model that relationship.
- An empty graph result can mean "not indexed" or "not statically visible", not "does not exist".
### Key Tools
| Tool | Use when |
| ------ | ---------- |
| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |
| `get_review_context_tool` | Need source snippets for review — token-efficient |
| `get_impact_radius_tool` | Understanding blast radius of a change |
| `get_affected_flows_tool` | Finding which execution paths are impacted |
| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |
| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |
| `get_architecture_overview_tool` | Understanding high-level codebase structure |
| `refactor_tool` | Planning renames, finding dead code |
### Workflow
1. The graph auto-updates on file changes (via hooks).
2. Use `detect_changes_tool` for code review.
3. Use `get_affected_flows_tool` to understand impact.
4. Use `query_graph_tool` pattern="tests_for" to check coverage.
<!-- /code-review-graph MCP tools -->
## 梦三战斗 UI 审查
每次 review 都按 [梦三战斗 UI 回归清单](docs/reviews/mengsan-battle-ui.md) 逐项核验,并记录结果和验证环境。涉及战斗 UI 的改动须附本轮渲染截图,并单独记录 Android 实机验证状态。
+497 -392
View File
File diff suppressed because it is too large Load Diff
+1548 -698
View File
File diff suppressed because it is too large Load Diff
+84 -1
View File
@@ -1,5 +1,5 @@
{ {
"version": "2.0.2.3-rc.3", "version": "2.0.2.3-rc.12",
"module_id": "mengsan", "module_id": "mengsan",
"snapshot": "legacy", "snapshot": "legacy",
"files": [ "files": [
@@ -249,6 +249,7 @@
"mengsan/assets/portraits/bygone-effigy-original.png", "mengsan/assets/portraits/bygone-effigy-original.png",
"mengsan/assets/portraits/byrdonis-forest-portrait.png", "mengsan/assets/portraits/byrdonis-forest-portrait.png",
"mengsan/assets/portraits/byrdonis-original.png", "mengsan/assets/portraits/byrdonis-original.png",
"mengsan/assets/portraits/caocao-portrait.jpg",
"mengsan/assets/portraits/ceremonial-beast-forest-portrait.png", "mengsan/assets/portraits/ceremonial-beast-forest-portrait.png",
"mengsan/assets/portraits/ceremonial-beast-original.png", "mengsan/assets/portraits/ceremonial-beast-original.png",
"mengsan/assets/portraits/cubex-construct-forest-portrait.png", "mengsan/assets/portraits/cubex-construct-forest-portrait.png",
@@ -290,6 +291,7 @@
"mengsan/assets/portraits/slithering-strangler-original.png", "mengsan/assets/portraits/slithering-strangler-original.png",
"mengsan/assets/portraits/snapping-jaxfruit-forest-portrait.png", "mengsan/assets/portraits/snapping-jaxfruit-forest-portrait.png",
"mengsan/assets/portraits/snapping-jaxfruit-original.png", "mengsan/assets/portraits/snapping-jaxfruit-original.png",
"mengsan/assets/portraits/sunquan-portrait.jpg",
"mengsan/assets/portraits/sushuang-zhangshiping.png", "mengsan/assets/portraits/sushuang-zhangshiping.png",
"mengsan/assets/portraits/twig-slime-m-forest-portrait.png", "mengsan/assets/portraits/twig-slime-m-forest-portrait.png",
"mengsan/assets/portraits/twig-slime-m-original.png", "mengsan/assets/portraits/twig-slime-m-original.png",
@@ -601,6 +603,68 @@
"mengsan/assets/relics/wongo_customer_appreciation_badge.png", "mengsan/assets/relics/wongo_customer_appreciation_badge.png",
"mengsan/assets/relics/wongos_mystery_ticket.png", "mengsan/assets/relics/wongos_mystery_ticket.png",
"mengsan/assets/relics/yummy_cookie.png", "mengsan/assets/relics/yummy_cookie.png",
"mengsan/assets/scenes/pinefire-camp.webp",
"mengsan/assets/status/aggression_power.png",
"mengsan/assets/status/artifact_power.png",
"mengsan/assets/status/automation_power.png",
"mengsan/assets/status/barricade_power.png",
"mengsan/assets/status/beacon_of_hope_power.png",
"mengsan/assets/status/block_next_turn_power.png",
"mengsan/assets/status/calamity_power.png",
"mengsan/assets/status/colossus_power.png",
"mengsan/assets/status/constrict_power.png",
"mengsan/assets/status/corruption_power.png",
"mengsan/assets/status/crimson_mantle_power.png",
"mengsan/assets/status/curious_power.png",
"mengsan/assets/status/dark_embrace_power.png",
"mengsan/assets/status/demesne_power.png",
"mengsan/assets/status/demon_form_power.png",
"mengsan/assets/status/dexterity_power.png",
"mengsan/assets/status/draw_cards_next_turn_power.png",
"mengsan/assets/status/energy_next_turn_power.png",
"mengsan/assets/status/entropy_power.png",
"mengsan/assets/status/fasten_power.png",
"mengsan/assets/status/feel_no_pain_power.png",
"mengsan/assets/status/flame_barrier_power.png",
"mengsan/assets/status/frail_power.png",
"mengsan/assets/status/free_attack_power.png",
"mengsan/assets/status/hellraiser_power.png",
"mengsan/assets/status/inferno_power.png",
"mengsan/assets/status/infested_power.png",
"mengsan/assets/status/intangible_power.png",
"mengsan/assets/status/juggernaut_power.png",
"mengsan/assets/status/juggling_power.png",
"mengsan/assets/status/manifest.json",
"mengsan/assets/status/mayhem_power.png",
"mengsan/assets/status/no_block_power.png",
"mengsan/assets/status/no_draw_power.png",
"mengsan/assets/status/no_energy_gain_power.png",
"mengsan/assets/status/nostalgia_power.png",
"mengsan/assets/status/one_two_punch_power.png",
"mengsan/assets/status/panache_power.png",
"mengsan/assets/status/plating_power.png",
"mengsan/assets/status/plow_power.png",
"mengsan/assets/status/prep_time_power.png",
"mengsan/assets/status/rage_power.png",
"mengsan/assets/status/retain_hand_power.png",
"mengsan/assets/status/ringing_power.png",
"mengsan/assets/status/rolling_boulder_power.png",
"mengsan/assets/status/rupture_power.png",
"mengsan/assets/status/shrink_power.png",
"mengsan/assets/status/slippery_power.png",
"mengsan/assets/status/slow_power.png",
"mengsan/assets/status/stampede_power.png",
"mengsan/assets/status/strength_power.png",
"mengsan/assets/status/tangled_power.png",
"mengsan/assets/status/tank_power.png",
"mengsan/assets/status/territorial_power.png",
"mengsan/assets/status/the_bomb_power.png",
"mengsan/assets/status/the_gambit_power.png",
"mengsan/assets/status/unmovable_power.png",
"mengsan/assets/status/vicious_power.png",
"mengsan/assets/status/vigor_power.png",
"mengsan/assets/status/vulnerable_power.png",
"mengsan/assets/status/weak_power.png",
"mengsan/assets/sushuang-zhangshiping.png", "mengsan/assets/sushuang-zhangshiping.png",
"mengsan/battle/battle-director.js", "mengsan/battle/battle-director.js",
"mengsan/battle/battle-flow.js", "mengsan/battle/battle-flow.js",
@@ -615,6 +679,7 @@
"mengsan/battle/intent-damage.js", "mengsan/battle/intent-damage.js",
"mengsan/battle/intent-effects.js", "mengsan/battle/intent-effects.js",
"mengsan/battle/skill-teardown.js", "mengsan/battle/skill-teardown.js",
"mengsan/battle/status-sources.js",
"mengsan/battle/stun-intent.js", "mengsan/battle/stun-intent.js",
"mengsan/bonds/battle.js", "mengsan/bonds/battle.js",
"mengsan/bonds/definitions.js", "mengsan/bonds/definitions.js",
@@ -742,10 +807,14 @@
"mengsan/monsters/vantom-intent.js", "mengsan/monsters/vantom-intent.js",
"mengsan/monsters/vine-intent.js", "mengsan/monsters/vine-intent.js",
"mengsan/monsters/vine-tangled.js", "mengsan/monsters/vine-tangled.js",
"mengsan/potions/battle.js",
"mengsan/potions/presentation.js",
"mengsan/potions/state.js",
"mengsan/progression/dialogue-choice.js", "mengsan/progression/dialogue-choice.js",
"mengsan/progression/encounter-progress.js", "mengsan/progression/encounter-progress.js",
"mengsan/progression/map-checkpoint.js", "mengsan/progression/map-checkpoint.js",
"mengsan/progression/mode-storage.js", "mengsan/progression/mode-storage.js",
"mengsan/progression/random-event.js",
"mengsan/progression/reward-package.js", "mengsan/progression/reward-package.js",
"mengsan/progression/reward.js", "mengsan/progression/reward.js",
"mengsan/progression/state.js", "mengsan/progression/state.js",
@@ -787,7 +856,10 @@
"mengsan/state.js", "mengsan/state.js",
"mengsan/style.css", "mengsan/style.css",
"mengsan/ui/bonds.js", "mengsan/ui/bonds.js",
"mengsan/ui/card-choice-names.js",
"mengsan/ui/card-library.js", "mengsan/ui/card-library.js",
"mengsan/ui/character-select.css",
"mengsan/ui/character-select.js",
"mengsan/ui/dialogue.js", "mengsan/ui/dialogue.js",
"mengsan/ui/energy-display.js", "mengsan/ui/energy-display.js",
"mengsan/ui/flow-ui.js", "mengsan/ui/flow-ui.js",
@@ -799,14 +871,25 @@
"mengsan/ui/hand/input.js", "mengsan/ui/hand/input.js",
"mengsan/ui/hand/overlays.js", "mengsan/ui/hand/overlays.js",
"mengsan/ui/hand/style.css", "mengsan/ui/hand/style.css",
"mengsan/ui/hud/index.js",
"mengsan/ui/hud/overlays.js",
"mengsan/ui/hud/status-model.js",
"mengsan/ui/hud/style.css",
"mengsan/ui/intent-display.js", "mengsan/ui/intent-display.js",
"mengsan/ui/map/index.js", "mengsan/ui/map/index.js",
"mengsan/ui/map/renderer.js", "mengsan/ui/map/renderer.js",
"mengsan/ui/navigation.js", "mengsan/ui/navigation.js",
"mengsan/ui/potions.css",
"mengsan/ui/potions.js",
"mengsan/ui/relic-icon.js", "mengsan/ui/relic-icon.js",
"mengsan/ui/relic-strip.js",
"mengsan/ui/relics.js", "mengsan/ui/relics.js",
"mengsan/ui/rest-ui.js",
"mengsan/ui/rest.css",
"mengsan/ui/reward-package.js", "mengsan/ui/reward-package.js",
"mengsan/ui/reward-ui.js", "mengsan/ui/reward-ui.js",
"mengsan/ui/shop-ui.js",
"mengsan/ui/shop.css",
"mengsan/ui/style.css", "mengsan/ui/style.css",
"mengsan/ui/virtual-card-grid.js" "mengsan/ui/virtual-card-grid.js"
] ]
@@ -0,0 +1,514 @@
schema: comet.native.v4
name: shuying-skill-tianshu-review
language: zh-CN
phase: archive
status: done
state_version: 28
brief: brief.md
document_constraints_version: 2
shape_confirmation_hash: 73614dd2595713e137f716f16fb11eed1c7d59096b3fd243d53ff1d97cedd7d3
spec_changes:
- capability: shuying-skill-correctness
operation: create
source: specs/shuying-skill-correctness/spec.md
workspace:
isolation: current
change_branch: main
target_branch: main
finish: null
loop:
stage: done
goal_cycle: 4
iteration: 1
attempt: 1
retry_epoch: 0
failed_iteration_count: 0
no_progress_count: 0
execution_failure_count: 0
previous_unresolved_ids: []
next_action: null
acceptance:
- id: A1
source: brief.md
text: 羁绊的 filter、mod、async content 在没有开发者全局对象时,能通过模块导入获取引擎依赖。
result: passed
reason:
text: tianshu/bondSkills.js:2显式模块导入,当前正式ESM用例验证无开发者lib/get/game全局时filter、mod和content执行。
truncated: false
- id: A2
source: brief.md
text: 江东基业二三级对应子技能通过正确 group 挂载并执行,低等级不重复叠加。
result: passed
reason:
text: bondSkills.js:114/186二三级group与subSkill对应;extension.js:946-989按来源精确换级并核对当前所有权;正式二三级分组用例通过。
truncated: false
- id: A3
source: brief.md
text: 驭布对一张多目标杀只判定一次,成功时对各存活目标只造成一次伤害。
result: passed
reason:
text: 青青子衿skill.js:qubu保留isFirstTarget,并在成功后遍历当前存活目标各一次;正式多目标用例通过。
truncated: false
- id: A4
source: brief.md
text: 驭布困难难度黑桃成功、梅花失败;阴间难度黑色成功、红色失败,动态描述与难度条件一致。
result: passed
reason:
text: qubu按nightmare黑色、其余黑桃判定;动态描述同分支;当前正式hard与nightmare花色及动态切换用例通过。
truncated: false
- id: A5
source: brief.md
text: 狼顾失败后仅限制当前回合;黑桃成功时恢复次数,即使没有可弃手牌也不会错误占用次数。
result: passed
reason:
text: langgu以global phaseAfter临时限制当前回合,成功先移除used再判断来源与合法手牌,空牌成功也恢复;正式用例通过。
truncated: false
- id: A6
source: brief.md
text: 奋威开局及中途获得时各初始化2蓄力,同次持有不因入场/开局事件重复添加,不重置共享蓄力。
result: passed
reason:
text: character/skill.js:654奋威分组init添加2蓄力而不重置共享值;当前定向通过,非目标哈希一致且复用前轮fenwei-engine-lifecycle正式PASS记录。
truncated: false
- id: A7
source: brief.md
text: 舌战与狼顾仅从允许被发动者弃置的牌中随机选择。
result: passed
reason:
text: 舌战两级与狼顾从getDiscardableCards(player,zone)抽取,并标记discarder;当前正式保护牌用例通过。
truncated: false
- id: A8
source: brief.md
text: 白仪与九天仅从允许被发动者获得的牌中随机选择。
result: passed
reason:
text: 白仪/九天从getGainableCards(player,zone)随机取牌,难度数量与后续逻辑保留;当前正式保护牌用例通过。
truncated: false
- id: A9
source: brief.md
text: 连环伤害允许再次增伤,既有牌伤增益不添加 notLink 排除。
result: passed
reason:
text: 既有五虎/天下无双/武安及戌狗增伤未增加notLink排除;当前正式五虎连环输入2增至3,确认允许再次增伤。
truncated: false
- id: A10
source: brief.md
text: 新增定向回归验证并运行相关现有天书测试,说明真实游戏/联机实测边界,保留无关改动。
result: passed
reason:
text: 复用当前候选Runtime
5文件回归101次执行全通过、0失败,含90个独立测试(回复fixture重复登记11项);正式空白检查退出0;11非目标SHA256一致。修复前40用例27失败为Builder开发期记录,未冒称Runtime红灯;未实机/联机。
truncated: false
- id: A11
source: brief.md
text: 狼顾阴间梅花成功、红色失败,普通/困难仅黑桃成功;动态描述同步。
result: passed
reason:
text: langgu普通/困难仅spade,阴间color black;成功次数与合法他弃保留,动态描述注册链完整;9花色与3描述及友方用例通过。
truncated: false
- id: A12
source: brief.md
text: 妄尊阴间累计1点伤害即反击,困难1点不反击,未受伤时弃牌数仍为困难1/阴间2。
result: passed
reason:
text: wangzun对当前回合源伤害累计,nightmare阈值>0,其余>1;0伤困难弃1/阴间弃2;正式0/1/2点分支和描述通过。
truncated: false
- id: A13
source: brief.md
text: 夺玺阴间替换摸牌后仅自己摸2,困难双方各摸1;动态描述、提示同步。
result: passed
reason:
text: duoxi替换摸牌后失去1体力,nightmare仅存活自己摸2,hard双方各1;提示、动态文本和AI采用自己摸牌分支;正式分支及离场用例通过。
truncated: false
- id: A14
source: brief.md
text: 引雷困难自己回合不触发、阴间自己回合触发;描述同步回合条件。
result: passed
reason:
text: yinlei
normal拒绝,hard本人回合拒绝、nightmare不限制回合;过滤未横置存活角色并随机横置;动态文本同步,正式4种回合分支通过。
truncated: false
- id: A15
source: brief.md
text: 张角三难度体力和上限8/16/24,起始手牌6/8/10和追加技能保留。
result: passed
reason:
text: tianshu/config.js:121张角独立加成4/12/20叠加基础4得到8/16/24,hp/maxHp一致,起手6/8/10与hard起追加引雷保留;正式三难度及曹操不变断言通过。
truncated: false
- id: A16
source: brief.md
text: 疑神随机获取各目标合法装备,正常难度分支只选一名敌人,阴间所有合格敌人各一张;禁止选择受保护装备。
result: passed
reason:
text: yishen取消回复后从每目标getGainableCards(player,e)随机取牌;非阴间随机一敌人,阴间所有合格敌人各一;未开放装备自选;正式合法/保护牌用例通过。
truncated: false
- id: A17
source: brief.md
text: 反馈受到多点伤害有逐点发动机会,可对友方来源发动,源牌耗尽后停止;自伤只获取自身装备。
result: passed
reason:
text: fankui getIndex返回damage
num,引擎gameEvent.js:498-507数字展开N项,content.js:3435每轮重筛来源存活及可得牌;来源不限阵营,自伤只e;正式多点耗尽及自伤用例通过。
truncated: false
- id: A18
source: brief.md
text: 狼顾接受其他友方来源;暴虐满血也失去1体力并允许任意角色;雷击允许其他友方,谏征允许其他角色使用的杀,不增加阵营限制。
result: passed
reason:
text: langgu其他来源不限阵营;baonue满血跳过摸牌/选人仍loseHp,受伤可选任意存活角色;leiji其他角色、zhuzheng其他杀使用者/原目标无阵营硬限制;当前正式范围用例通过。
truncated: false
- id: A19
source: brief.md
text: 远虑阴间保留unreal并明确描述;无双/神戟/战甲增强不回退,全部改动描述与提示一致。
result: passed
reason:
text: 远虑nightmare仍unreal且文本写视为伤害;无双增伤与1/2次、神戟摸2/3/4和杀1/2/2、战甲阴间摸3保留;静态基准/动态难度/相关提示一致,正式增强用例通过。
truncated: false
builder_handoff:
candidate_id: c9724c63-8c45-44ab-944c-4681834c1755
identity_provider: skill-coordinated
builder_execution_ref: skill-coordinated:builder:9b9bc03f-d1c9-4af7-93f4-3aceeb630392
iteration: 1
summary:
text: 修复用户确认的青青子衿难度/体力/范围差异,同步文本;保留远虑虚拟伤害与无双神戟战甲增强。新增41项定向验证通过,修复前40项中27项复现失败;4个生产文件语法检查通过,11个非目标文件哈希未变。原A1-A10证据继续适用。未进行真实游戏或联机验证,未提交发布。
truncated: false
addressed_acceptance_ids:
- A1
- A2
- A3
- A4
- A5
- A6
- A7
- A8
- A9
- A10
- A11
- A12
- A13
- A14
- A15
- A16
- A17
- A18
- A19
acceptance_review:
- id: A1
status: implemented-with-evidence
evidence:
- tianshu/bondSkills.js:2
- tools/test_skill_review_fixes.mjs:90
note: 显式导入引擎对象,无开发者全局对象的ESM调用filter/mod/content通过。
- id: A2
status: implemented-with-evidence
evidence:
- tianshu/bondSkills.js:114,186
- tools/test_skill_review_fixes.mjs:104
note: 修正5个group名,二/三级摸牌与他弃伤害、三级得牌反伤可通过组触发。
- id: A3
status: implemented-with-evidence
evidence:
- pve/boss/sets/qingqingzijin/skill.js:654
- tools/test_skill_review_fixes.mjs:159
note: 保留isFirstTarget,不同难度均每张两目标杀只有一次判定、各目标一次额外伤害。
- id: A4
status: implemented-with-evidence
evidence:
- pve/boss/sets/qingqingzijin/skill.js:662-672
- pve/boss/sets/qingqingzijin/dynamicTranslate.js:69-75
- tools/test_skill_review_fixes.mjs:136-195
note: hard要求spade,nightmare要求black;六组难度花色场景及动态描述随hard/nightmare切换均通过。
- id: A5
status: implemented-with-evidence
evidence:
- pve/boss/sets/qingqingzijin/skill.js:241
- tools/test_qingqingzijin_rules.mjs
- tools/test_skill_review_fixes.mjs
note: 狼顾当前回合限制、成功恢复次数和合法他弃保留,并由新难度测试覆盖。
- id: A6
status: implemented-with-evidence
evidence:
- character/skill.js:654
- tools/test_skill_review_fixes.mjs:216
- D:/Work/noname/resources/app/noname/library/element/player.js:10748
note: 使用既有init子技能的引擎init回调添加2蓄力;同次持有由initedSkills避免重复,不重置共享charge。
- id: A7
status: implemented-with-evidence
evidence:
- tianshu/bondSkills.js:339,388
- pve/boss/sets/qingqingzijin/skill.js:267
- tools/test_skill_review_fixes.mjs:211,239
note: 舌战和狼顾使用getDiscardableCards发动者上下文,保留随机操作并注明discarder。
- id: A8
status: implemented-with-evidence
evidence:
- pve/boss/sets/tianshu/skill.js:618,715
- tools/test_skill_review_fixes.mjs:251
note: 白仪和九天使用getGainableCards合法候选,保留难度取牌数与其余后续效果。
- id: A9
status: implemented-with-evidence
evidence:
- tools/test_skill_review_fixes.mjs:263
- 既有五虎/天下无双/武安/戌狗增伤源码未变
note: 用户明确允许连环再次增伤;本次未加notLink限制,专门用例输入2得到3。
- id: A10
status: implemented-with-evidence
evidence:
- 本轮定向19用例:修改前17pass2fail,修改后19pass
- 12个非目标文件与本轮快照SHA一致
- 实现与动态描述语法及git diff --check通过
note: 真实ESM测试覆盖新增难度分支和动态描述;已有其他修复保留,最终组合计划运行60执行。没有真实游戏/联机实测。
- id: A11
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 狼顾阴间判定黑色、普通困难黑桃;新增动态描述并保持成功恢复及合法他弃。
- id: A12
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 妄尊阴间正伤害即可反击,普通困难超过1点;弃牌数不变,描述同步。
- id: A13
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 夺玺阴间仅自己摸2,困难双方各1;提示及AI和离场检查同步。
- id: A14
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 引雷阴间回合内外均触发,困难仅回合外;新增动态描述。
- id: A15
status: implemented-with-evidence
evidence:
- tianshu/config.js:121
- tools/test_qingqingzijin_rules.mjs
note: 张角独立模板额外体力4/12/20,加原始4得到8/16/24,起手与技能保留。
- id: A16
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 疑神从getGainableCards合法装备随机取牌,阴间每名合格敌人各一张,取消自选。
- id: A17
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 反馈getIndex返回伤害点数,支持友方来源,逐次检查合法牌;自伤仅取装备。
- id: A18
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 取消狼顾来源、暴虐目标、雷击目标、谏征使用者及目标的额外阵营限制;暴虐满血仍失去1体力。
- id: A19
status: implemented-with-evidence
evidence:
- tools/test_qingqingzijin_rules.mjs
- pve/boss/sets/qingqingzijin/skill.js
- pve/boss/sets/qingqingzijin/dynamicTranslate.js
note: 远虑unreal保留且文本明确视为;无双神戟战甲增强与连环规则保留;文本提示同步。
checks:
- name:
text: 青青子衿定向回归
truncated: false
result: passed
note:
text: 41/41通过,修复前40用例13通过27失败。
truncated: false
- name:
text: 生产JS语法
truncated: false
result: passed
note:
text: skill/dynamicTranslate/translate/config语法通过。
truncated: false
- name:
text: 非目标文件保护
truncated: false
result: passed
note:
text: 11个基线哈希一致,其他已有改动保留。
truncated: false
checks_truncated: false
known_limits:
- text: 未进行真实游戏、浏览器或联机实测。
truncated: false
- text: 测试mjs沿用仓库现有忽略规则,当前文件保存在工作区,未暂存或提交。
truncated: false
known_limits_truncated: false
review: null
submitted_at: 2026-10-12T06:36:05.406Z
blockers: []
verification:
candidate_id: c9724c63-8c45-44ab-944c-4681834c1755
identity_provider: skill-coordinated
verifier_execution_ref: skill-coordinated:verifier:778df9a8-a7ae-4d96-ba17-7fd7da47daf7
iteration: 1
attempt: 1
assurance: skill-coordinated
verdict: pass
checks:
- id: boss-rules-regressions
name:
text: 青青子衿及全部相关天书回归
truncated: false
argv_display:
- text: --test
truncated: false
- text: tools/test_qingqingzijin_rules.mjs
truncated: false
- text: tools/test_skill_review_fixes.mjs
truncated: false
- text: tools/test_tianshu_direct_damage.mjs
truncated: false
- text: tools/test_tianshu_skill_recover.mjs
truncated: false
- text: tools/test_tianshu_stage_turn.mjs
truncated: false
argv_truncated: false
cwd_ref: .
status: passed
exit_code: 0
duration_ms: 415
- id: boss-rules-whitespace
name:
text: 工作区差异空白检查
truncated: false
argv_display:
- text: diff
truncated: false
- text: --check
truncated: false
argv_truncated: false
cwd_ref: .
status: passed
exit_code: 0
duration_ms: 120
summary:
text: 独立只读Verifier已读完brief、完整Spec及A1-A19,逐项全部通过。复用绑定当前候选c9724c63-8c45-44ab-944c-4681834c1755的正式回归101次执行全通过(90独立测试,11重复fixture)和空白检查,不重复整套。核对本轮狼顾黑色、妄尊1点、夺玺自己摸2及AI、引雷不限回合、张角8/16/24,全部范围修复及保留增强/连环规则;追踪动态描述注册与数字getIndex引擎调度。11个非目标文件SHA256与基线完全一致。未编辑源码/测试/文档/gitignore、未执行git操作、记忆更新或发布,未实机/联机。
truncated: false
risks:
- text: 未进行真实游戏、浏览器界面或联机验证;ESM桥接/局部桩及引擎源码证据不等同于实机验证。
truncated: false
- text: 测试mjs沿用既有忽略规则,文件在工作区尚未暂存或提交;未执行发布。
truncated: false
- text: 修复前失败计数为Builder开发期观察,并非本轮Runtime失败回执;当前正式结果为101次通过、90个独立测试。
truncated: false
risks_truncated: false
completed_at: 2026-10-12T06:41:40.687Z
history:
- goal_cycle: 1
iteration: 1
attempt: 1
outcome: pass
unresolved_ids: []
summary:
text: |-
只读审查验收通过(A1-A4),此结论表示审查交付满足范围,不表示待审源码全部合规。当前工作区及既有未提交修改作为审查对象,梦三模式和梦三测试均排除;本 Verifier 未修改产品源码、未修复、未提交、未发布。
已确认事实:活跃路径共有 140 个顶层技能声明(character 5、驱鬼逐邪 30、青青子衿 21、天书 Boss 21、十二生肖 12、天书 bondSkills 28、新天书 extension 规则 23),74 个 subSkill;2 个显式 sourceSkill 均为 wushuang_shuying 的子技能,另外 72 个由引擎补充。当前禁载的原神另有 6 根、8 子技能,未计入活跃统计。D:/Work/noname/resources/app/noname/game/index.js:8251-8270 的 finishSkill 先注册父名_子名并在 sourceSkill===undefined 时补父名;docs/lib-skill-format.md:258-286 同样说明自动归属。不能将省略显式 sourceSkill 本身判为违规,也不能将子技能注册等同于玩家已经拥有。
按严重程度排序的 8 项实现问题:
[P1] 天书羁绊 ESM 没有引入引擎对象。D:/Work/noname-shuying/tianshu/bondSkills.js:1-2 无 import,但 :335-342 用 lib、:559 用 get、:742 用 get、:745 用 game。获得舌战、南蛮、奇策等羁绊后,在普通非 dev 环境执行对应 filter/mod/content 会引用未定义对象。真实 ESM 直接导入后,Skill07.filter 与 Skill06.mod 独立复现 ReferenceError: get is not defined,Skill03.content 复现 lib is not defined。initTianshu 的形参不会成为另一个 ESM 模块的词法变量;引擎 init/index.js:512 只在 dev/debug 路径调用 cheat.i,library/index.js:8891-8897 的全局暴露不能当生产依赖。
[P1] 江东基业二三级 group 错名。D:/Work/noname-shuying/tianshu/bondSkills.js:112-113、:184-186 写 Count2/Count3,而父技能定义为 Skill2/Skill3。独立展开全部 117 根及其子技能后,恰有这 5 个 group 引用找不到。正确的 Skill2_draw/discard、Skill3_draw/discard/gain 已由 finishSkill 注册,但错误 group 未将它们展开挂载到持有者。tianshu/config.js:327、:333 确实授予二三级父技能,故升级后对应摸牌/弃牌伤害/获得牌伤害效果失效。
[P1] 驭布多目标重复全目标群伤。D:/Work/noname-shuying/pve/boss/sets/qingqingzijin/skill.js:643-652 监听 useCardToPlayered 未限定 isFirstTarget,:662-665 每次都遍历 trigger.targets。引擎 content.js:9258-9297 对每个目标建立该事件,:9270 仅首个设 isFirstTarget。友方一张杀指定 N 个存活目标时可判定 N 次,每次成功都对全部目标伤害;N=2 且都成功时,每人额外受到 2 次伤害。
[P2] 驭布花色与描述不一致。同文件 :657 用 get.color(card)==black,因此梅花也成功;translate.js:36 写黑桃。建议明确规则后统一条件和文本。
[P2] 狼顾按轮限制而文本按回合。同文件 :240 检查 used,:259 用 roundStart 清除;translate.js:16 写每回合限一次。某回合判定失败后,在同一轮下一角色回合仍被锁,直至下轮;成功时 :263 手动清除是另一条路径,不能弥补失败路径。
[P2] 奋威中途奖励获得不初始化 2 点蓄力。D:/Work/noname-shuying/character/skill.js:591 定义 beginMarkCount:2,:650-670 仅 enterGame/开局 phaseBefore 添加初始值,父技能没有对应获得时 init。天书 :63 通过 addAdditionalSkills 中途授予已有角色;引擎 player.js:10979-11016 为普通技能增添,不触发 enterGame。正常已在场角色在非开局获得奋威时没有初始 2 点蓄力,直到其他蓄力条件发生;翻译 character/translate.js:14 标为 2/8。
[P2] 他弃候选过滤错误,可绕过 canBeDiscarded 保护。D:/Work/noname-shuying/tianshu/bondSkills.js:335-342、:390-397 的舌战使用 cardDiscardable(持有者自己弃牌规则)筛选别人弃牌;狼顾 qingqingzijin/skill.js:262-267 先 countDiscardableCards,再从全部 h 随机选牌,同样未保护候选集合。混有可弃和禁止被他人弃置牌时可选中受保护牌,或错误排除仅禁止自弃而允许他弃的牌。引擎 library/index.js:11151 与 :11171 区分两套 mod;player.js:5273 的 getDiscardableCards(player,zone) 才提供对应他弃候选。
[P2] 白仪/九天随机获得忽略 canBeGained 候选。D:/Work/noname-shuying/pve/boss/sets/tianshu/skill.js:617-619、:711-718 只先检查 countGainableCards>0,实际从全 he/h 随机抽取。目标同时有可获得和受保护牌时可以抽中受保护牌并直接 gain。建议使用 getGainableCards(player,zone),引擎 player.js:5285-5302 按 canBeGained 过滤。
另有 1 项潜在 P2,规则意图待确认:五虎、天下无双、武安君等牌伤增益及戌狗未排除连环传播。D:/Work/noname-shuying/tianshu/bondSkills.js:419-453、:471-518、:785-842;pve/boss/sets/shiershengxiao/skill.js:484-490。引擎 library/skill.js:1962-1973 将已增伤 num 连同 card/source 再传给下一目标,这些 damageBegin1 条件仍可通过并再次加伤。已确认源码行为,但尚无法确认设计要求是否刻意允许传播再次叠加;不能未经规则确认直接把缺少 notLink 认作普遍违规。建议以同一火杀、两个连环目标实测并确认预期。
天书所有权/直伤/回复证据:extension.js:49-72 只记录奖励来源,:731-812 按当前奖励技能与译名去重,:946-1003 按独立羁绊来源同步、保留其他来源并在永久失去后重算;getDirectDamageOrigin 与 getSkillRecoverOrigin 按父事件向上追踪并用 sourceSkillFor 归属,分别拒绝用牌/响应/嵌套伤害/技能 cost 及桃园次级回复。extension.js:1419-1486 在最终伤害结算登记并按最终 num 摸牌,三级无来源仍保留原施术者记录;skillRecover.js:30-63 包装原生回复,处理满血与溢出并防止二次结算。异步执行依据本地 AsyncCompiler.js:7-10 与 ArrayCompiler.js:28,原 async 函数被调用时只传事件、触发、玩家和结果,不会给 bondSkills 注入 get/lib/game。
正式验证:Runtime 检查 tianshu-review-tests 在当前候选执行 node --test tools/test_tianshu_direct_damage.mjs tools/test_tianshu_skill_recover.mjs tools/test_tianshu_stage_turn.mjs,退出 0,41 次测试执行全部通过、0 失败。skillRecover 测试导入 directDamage fixture 同时重复登记其 11 个测试,因此是 30 个独立测试、41 次执行;不能说有 41 个独立场景。正式日志 .comet/runtime/native/changes/shuying-skill-tianshu-review/logs/checks/0efa4fae-105e-4e92-ac43-eb454f8e2798-tianshu-review-tests.log。测试覆盖父链归属、最终伤害、无来源保留、所有权剥离重算、桃园满血/溢出/次级回复与换关轮次;采用 VM/桩,给 bond 技能注入全局对象,所以无法反证真实 ESM 导入缺陷。Builder 的 10 文件语法通过仅是开发期证据,不等于游戏运行。未做真实游戏、联机、dev 关闭浏览器联调;受保护卡随机结果、复杂事件父链以及连环规则意图仍需游戏复核。
建议优先修复 3 项 P1,再处理 5 项 P2;本只读任务未实施建议。以上审查与限制均已记录,A1-A4 通过不要求本次修复源码。
truncated: false
completed_at: 2026-10-12T03:43:33.267Z
- goal_cycle: 1
iteration: 1
attempt: 1
outcome: recovery
unresolved_ids: []
summary:
text: 用户接受审查结果并明确要求修复报告中的8项已确认问题;用户确认连环传导允许再次增伤。将只读审查范围扩展为这些问题的最小修复与验证,沿用当前目录,保留既有改动。
truncated: false
completed_at: 2026-10-12T03:54:53.001Z
- goal_cycle: 2
iteration: 1
attempt: 1
outcome: pass
unresolved_ids: []
summary:
text: |-
本轮独立验收A1–A10全部通过,五轴代码复核未发现需要阻断本次修复的问题。4个技能源码文件实际24行新增、40行删除:补羁绊引擎依赖导入及江东二三级分组,修正驭布首目标判定和黑桃条件、狼顾回合次数与成功空牌恢复,接入奋威动态init,修正舌战/狼顾他弃和白仪/九天他取候选。保留连环再次增伤,未触及梦三、停用原神或用户已有天书直伤/回复实现。
正式证据复用skill-fix-regressions和skill-diff-whitespace的passed结果(14新增用例及旧天书测试合计55次执行、44个独立用例),补充fenwei-engine-lifecycle正式passed,实际提取并调用当前引擎addSkill/addSkillTrigger/removeSkillTrigger/addCharge/getMaxCharge/expandSkills,验证初始值、去重、共享蓄力、失去后再获得和封顶。8个非目标文件SHA256与修复前baseline完全一致。红绿历史为Builder会话观察,未保存为Runtime红灯回执;Verifier对照before字节确认原条件与本次修正。
正确性方面已追踪用牌首目标事件队列、临时技能过期、card mods当前事件/发动者/牌主上下文与技能获得失去;可读性及架构遵循现有最小修改与引擎规范API,未新增通用抽象;安全性未引入网络、凭据或不可信输入通路;性能以一次判定替代每目标重复判定,其余只过滤有限牌集合。
额外考察但未纳入:固定羁绊技能旧hook未立即删除,但引擎执行前核对当前所有权,因此不构成低级叠加,属于原有管理流程;初始化在新技能持有期再加2且受共享容量限制符合引擎蓄力语义;白仪后段自弃仍使用cardDiscardable符合其“其随机弃置”描述;连环再次增伤是用户明确决定,不作为缺陷;统一导入中未使用ui/ai/_status沿用模块习惯,不为风格增加无关修改。没有真实游戏、浏览器界面或联机实测,本轮引擎检查仅为隔离方法验证。
truncated: false
completed_at: 2026-10-12T04:16:35.786Z
- goal_cycle: 2
iteration: 1
attempt: 1
outcome: recovery
unresolved_ids: []
summary:
text: 用户核实驭布规则并明确要求改动:困难hard黑桃,阴间nightmare黑色;保留此前多目标一张杀只判定一次的修复,同步动态描述和难度分支回归验证。
truncated: false
completed_at: 2026-10-12T04:26:08.214Z
- goal_cycle: 3
iteration: 1
attempt: 1
outcome: pass
unresolved_ids: []
summary:
text: 独立只读验收A1-A10全部通过。本轮相对前轮仅更新2个源码文件:pve/boss/sets/qingqingzijin/skill.js的驭布难度条件与dynamicTranslate.js的驭布动态描述;另增补tools/test_skill_review_fixes.mjs难度/描述用例。hard黑桃、nightmare黑色、默认非阴间黑桃;保留isFirstTarget每张多目标杀只判一次及存活目标一次伤害,动态描述经既有注册链实时读取难度。复用当前候选正式qubu-difficulty-regressions和qubu-diff-whitespace的passed记录,不重复整套:19定向用例与旧天书测试合计60次执行、49个独立用例。修改前17pass/2fail和修改后19pass的红绿对照为Builder会话观察,非Runtime红灯记录。12非目标文件SHA256独立复核均与本轮baseline一致,包括.gitignore/update.txt及前轮其他修复文件;复用前轮匹配的源码/引擎证据核对其余验收项。未修改源码、测试、忽略规则、索引或HEAD,未提交发布;未做真实游戏、浏览器界面或联机实测,ESM与局部桩结果不等同于实机验证。
truncated: false
completed_at: 2026-10-12T04:35:16.773Z
- goal_cycle: 3
iteration: 1
attempt: 1
outcome: recovery
unresolved_ids: []
summary:
text: 用户逐项确认官网差异修复:保留远虑虚拟伤害及无双神戟战甲增强;修复狼顾妄尊夺玺引雷、张角体力和报告列出的范围差异,同步文本。
truncated: false
completed_at: 2026-10-12T06:23:10.262Z
- goal_cycle: 4
iteration: 1
attempt: 1
outcome: pass
unresolved_ids: []
summary:
text: 独立只读Verifier已读完brief、完整Spec及A1-A19,逐项全部通过。复用绑定当前候选c9724c63-8c45-44ab-944c-4681834c1755的正式回归101次执行全通过(90独立测试,11重复fixture)和空白检查,不重复整套。核对本轮狼顾黑色、妄尊1点、夺玺自己摸2及AI、引雷不限回合、张角8/16/24,全部范围修复及保留增强/连环规则;追踪动态描述注册与数字getIndex引擎调度。11个非目标文件SHA256与基线完全一致。未编辑源码/测试/文档/gitignore、未执行git操作、记忆更新或发布,未实机/联机。
truncated: false
completed_at: 2026-10-12T06:41:40.687Z
history_overflow:
dropped_entries: 0
first_dropped_at: null
last_dropped_at: null
outcome_counts:
pass: 0
fail: 0
blocked: 0
execution-error: 0
recovery: 0
verification_result: pass
verification_report: verification.md
archived: true
created_at: 2026-10-13T01:31:51.574Z
@@ -1,13 +1,13 @@
--- ---
generated_from_state_version: 24 generated_from_state_version: 28
--- ---
# 验证 # 验证
## 当前结果 ## 当前结果
- 结果: **验收通过,需要你确认** - 结果: **已归档**
- 验证情况: **已完成检查,但需要你确认验证结果** - 验证情况: **已完成检查,验证结果已确认**
- 目标周期: 4 - 目标周期: 4
- 迭代: 1 - 迭代: 1
- 验证器尝试次数: 1 - 验证器尝试次数: 1
@@ -57,7 +57,7 @@ generated_from_state_version: 24
## 阻塞项 ## 阻塞项
- **user**: The generic Skill bridge cannot prove an independent Verifier execution; user confirmation is required before Archive. — next: `await-user` _无。_
## 风险与跳过的工作 ## 风险与跳过的工作
@@ -0,0 +1,35 @@
# Outcome
在梦三战斗手牌区最左侧常驻展示持有遗物的图片列表,长按条目显示遗物描述。
# Scope
复用现有持有遗物数据和图片资源,调整战斗遗物界面及必要的手牌布局。
图片本身就是列表条目,不增加独立文字列表。图片点击区域48×48 CSS像素,
条目间距至少8px,与手牌保留至少12px间隔。遗物过多时局部滚动。
长按500ms打开名称、描述和当前状态;滑动、取消和销毁会取消待触发长按。
描述浮层支持明确关闭,限制在屏幕可见范围内;提供键盘打开与关闭方式。
无图片或加载失败的遗物显示名称替代。保留现有详情弹窗入口作为补充。
# Non-goals
不修改遗物效果、获取规则、奖励池或存档,不改动其他游戏模式。
不处理其他变更、不发布版本、不自动提交或推送。
# Acceptance examples
- 战斗开始后,手牌区最左侧展示当前持有遗物;每件遗物仅有一个图片条目,缺图显示名称。
- 点击区域48×48px,条目间距至少8px,与手牌间隔至少12px;窄屏和遗物较多时可滚动且不重叠手牌。
- 长按500ms显示对应名称、描述和当前状态;提前松开、滑动或取消不误触;键盘也可打开并关闭详情。
- 遗物界面不触发手牌选择、拖动或出牌;既有手牌交互和遗物详情入口仍可用。
- 战斗结束或会话销毁后移除列表、浮层、监听器和定时器,恢复被占用的布局空间;再次进入不重复挂载。
# Decisions
用户选择当前目录,实现遗物图片列表与长按描述,并明确要求使用UI/UX技能。
UI/UX检索支持相邻触摸目标至少8px间距和按下反馈。
# Verification expectations
执行针对长按取消、数据展示和销毁清理的定向检查及语法检查;独立验证所有验收项。
真实引擎和设备上的触摸、缩放与手牌回归未执行时明确标记边界,不宣称实机通过。
@@ -0,0 +1,275 @@
schema: comet.native.v4
name: mengsan-hand-relics
language: en
phase: archive
status: done
state_version: 8
brief: brief.md
document_constraints_version: 2
shape_confirmation_hash: 27831d4a33d10b9652c80f8548467e488fc93bea537bcd845ab109bf372ecaaa
spec_changes:
- capability: mengsan-hand-relics
operation: create
source: specs/mengsan-hand-relics/spec.md
workspace:
isolation: current
change_branch: main
target_branch: main
finish: null
loop:
stage: done
goal_cycle: 1
iteration: 1
attempt: 1
retry_epoch: 0
failed_iteration_count: 0
no_progress_count: 0
execution_failure_count: 0
previous_unresolved_ids: []
next_action: null
acceptance:
- id: A1
source: brief.md
text: 战斗开始后,手牌区最左侧展示当前持有遗物;每件遗物仅有一个图片条目,缺图显示名称。
result: passed
reason:
text: mountRelics复用heldRelics和createRelicIcon,逐件图片按钮;Runtime
hand-relic-browser确认12条、缺图/加载失败名称替代与刷新。
truncated: false
- id: A2
source: brief.md
text: 点击区域48×48px,条目间距至少8px,与手牌间隔至少12px;窄屏和遗物较多时可滚动且不重叠手牌。
result: passed
reason:
text: CSS 48x48、gap8、64px条带与88px布局预留;Runtime
hand-relic-browser在360/640/1280px确认尺寸、间距及局部滚动。
truncated: false
- id: A3
source: brief.md
text: 长按500ms显示对应名称、描述和当前状态;提前松开、滑动或取消不误触;键盘也可打开并关闭详情。
result: passed
reason:
text: 500ms定时器、提前松开/移动阈值/scroll/pointercancel/blur取消经源码和组件Runtime检查;hand-relic-dialog补充名称描述状态、屏内modal、Enter/Space打开、Escape/按钮关闭和焦点回归。
truncated: false
- id: A4
source: brief.md
text: 遗物界面不触发手牌选择、拖动或出牌;既有手牌交互和遗物详情入口仍可用。
result: passed
reason:
text: strip阻止交互冒泡,手牌入口仅接受属于手牌zone的.card;保留全量详情按钮,Runtime集成检查验证单项/全量入口及pointerdown不向手牌root冒泡。布局仅减可用宽度,未改手牌业务。
truncated: false
- id: A5
source: brief.md
text: 战斗结束或会话销毁后移除列表、浮层、监听器和定时器,恢复被占用的布局空间;再次进入不重复挂载。
result: passed
reason:
text: ownResource注册dispose,session逆序释放;strip销毁取消定时器、移除全部注册监听和DOM、恢复CSS变量。Runtime组件与集成检查验证销毁中断长按、重复dispose、modal清理及重挂载唯一条带。
truncated: false
builder_handoff:
candidate_id: 4411b609-0d11-4d73-8fa7-fa402cbb1f88
identity_provider: skill-coordinated
builder_execution_ref: skill-coordinated:builder:79d2c398-bd34-4cfa-b146-a31feb185d5c
iteration: 1
summary:
text: 手牌左侧遗物图片列表、500ms长按详情、滚动与生命周期清理已实现
truncated: false
addressed_acceptance_ids:
- A1
- A2
- A3
- A4
- A5
acceptance_review:
- id: A1
status: implemented-with-evidence
evidence:
- mengsan/ui/relic-strip.js:63-89
- mengsan/ui/relics.js:5-91
- mengsan/tools/check-hand-relics.mjs
note: 复用持有遗物和图片,缺图名称替代
- id: A2
status: implemented-with-evidence
evidence:
- mengsan/ui/style.css:1379-1434
- mengsan/ui/hand/style.css:6-19
- mengsan/tools/check-hand-relics.mjs
note: 88px预留与64px列表形成24px间距,48px触摸目标和8px行间距
- id: A3
status: implemented-with-evidence
evidence:
- mengsan/ui/relic-strip.js:13-46
- mengsan/ui/relics.js:49-87
- mengsan/tools/check-hand-relics.mjs
note: 长按打开对应详情;取消、滚动和键盘支持
- id: A4
status: implemented-with-evidence
evidence:
- mengsan/ui/relic-strip.js:48-58
- mengsan/ui/hand/style.css:6-19
- mengsan/tools/check-hand-relics.mjs
note: 事件阻止冒泡,手牌只调整容器可用宽度,保留全量详情入口
- id: A5
status: implemented-with-evidence
evidence:
- mengsan/ui/relic-strip.js:92-106
- mengsan/ui/relics.js:88-94
- mengsan/tools/check-hand-relics.mjs
note: session资源释放调用dispose,移除监听定时器并恢复变量
checks:
- name:
text: focused-browser
truncated: false
result: passed
note:
text: Edge测试360/640/1280px间距、缺图、长按及取消、键盘、刷新和清理通过
truncated: false
- name:
text: syntax
truncated: false
result: passed
note:
text: node --check relics.js/relic-strip.js通过
truncated: false
checks_truncated: false
known_limits:
- text: 未在真实无名杀游戏或物理触摸设备上验收;浏览器为隔离组件检查。
truncated: false
known_limits_truncated: false
review: null
submitted_at: 2026-10-13T09:54:07.717Z
blockers: []
verification:
candidate_id: 4411b609-0d11-4d73-8fa7-fa402cbb1f88
identity_provider: skill-coordinated
verifier_execution_ref: skill-coordinated:verifier:77a0df51-2a3e-4976-ba8a-c55403e89206
iteration: 1
attempt: 1
assurance: skill-coordinated
verdict: pass
checks:
- id: hand-relic-browser
name:
text: hand-relic-browser
truncated: false
argv_display:
- text: mengsan/tools/check-hand-relics.mjs
truncated: false
- text: C:/Users/111/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules/playwright
truncated: false
- text: C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe
truncated: false
argv_truncated: false
cwd_ref: .
status: passed
exit_code: 0
duration_ms: 3919
- id: hand-relic-dialog
name:
text: hand-relic-dialog
truncated: false
argv_display:
- text: -e
truncated: false
- text: "const fs=require('fs'); const assert=require('assert/strict'); const
{chromium}=require('C:/Users/111/.cache/codex-runtimes/codex-primar\
y-runtime/dependencies/node/node_modules/playwright');
(async()=>{const browser=await
chromium.launch({headless:true,executablePath:'C:/Program Files
(x86)/Microsoft/Edge/Application/msedge.exe'});try{const page=await
browser.newPage({viewport:{width:360,height:640}});await
page.setContent('<div id=\"root\"
style=\"position:relative;height:156px\"><div id=\"hand\"
class=\"mengsan-hand-scroll-shuying\"
style=\"position:absolute\"></div></div>');await
page.addStyleTag({content:fs.readFileSync('mengsan/ui/style.css','u\
tf8')+fs.readFileSync('mengsan/ui/hand/style.css','utf8')});const
source=fs.readFileSync('mengsan/ui/relic-strip.js','utf8')+'\\n'+fs\
.readFileSync('mengsan/ui/relics.js','utf8').replace(/^import
.*;$/gm,'');await page.evaluate(async source=>{const prelude='const
ui=window.ui; const heldRelics=run=>run.relics; const
createRelicIcon=()=>null;';window.ui={me:document.querySelector('#r\
oot'),window:document.body};window.run={relics:[{id:'a',name:'甲',de\
scription:'描述甲',pool:'常规',tier:'普通'},{id:'b',name:'乙',description:'\
描述乙',pool:'常规',tier:'普通'}]};window.session={active:true,ownResource\
:(key,dispose)=>window.cleanup=dispose};window.handEvents=0;ui.me.a\
ddEventListener('pointerdown',()=>window.handEvents++);const
module=await import(URL.createObjectURL(new
Blob([prelude+source],{type:'text/javascript'})));window.mount=modu\
le.mountRelics;window.instance=mount(session,run,{status:()=>
'状态示例'});},source);const
items=page.locator('.mengsan-hand-relics-shuying button');await
items.first().focus();await
page.keyboard.press('Enter');assert.equal(await
page.locator('dialog').count(),1);assert.equal(await
page.locator('dialog section').count(),1);assert.ok((await
page.locator('dialog').innerText()).includes('描述甲'));assert.ok((awa\
it page.locator('dialog').innerText()).includes('状态示例'));const
rect=await
page.locator('dialog').boundingBox();assert.ok(rect.x>=0&&rect.y>=0\
&&rect.x+rect.width<=360&&rect.y+rect.height<=640);await
page.keyboard.press('Escape');assert.equal(await
page.locator('dialog').count(),0);assert.equal(await
items.first().evaluate(e=>document.activeElement===e),true);await
page.locator('.mengsan-battle-relics-button-shuying').click();asser\
t.equal(await page.locator('dialog section').count(),2);await
page.getByRole('button',{name:'关闭',exact:true}).click();await
items.first().click();assert.equal(await
page.evaluate(()=>handEvents),0);await items.first().focus();await
page.keyboard.press('Space');assert.equal(await
page.locator('dialog').count(),1);await
page.evaluate(()=>cleanup());assert.equal(await
page.locator('dialog,.mengsan-hand-relics-shuying,.mengsan-battle-r\
elics-button-shuying').count(),0);await
page.evaluate(()=>{instance=mount(session,run,{status:()=>
'状态示例'});});assert.equal(await
page.locator('.mengsan-hand-relics-shuying').count(),1);await
page.evaluate(()=>cleanup());console.log('PASS: integrated relic
dialog selected/all contents, status, viewport bounds,
Enter/Space/Escape, focus return, pointer bubbling isolation,
session cleanup and remount');}finally{await
browser.close();}})().catch(e=>{console.error(e);process.exitCode=1\
});"
truncated: false
argv_truncated: false
cwd_ref: .
status: passed
exit_code: 0
duration_ms: 1298
summary:
text: 独立只读验收A1–A5通过;复用绑定当前候选hand-relic-browser并补充hand-relic-dialog成功。
truncated: false
risks:
- text: 验收采用隔离 Edge 浏览器组件及遗物详情集成、源码审查;没有运行完整无名杀引擎、物理触摸设备或真实缩放/手牌出牌回归,不代表实机验收通过。
truncated: false
- text: check-hand-relics.mjs被现有*.mjs忽略规则排除,当前Runtime使用本地文件;后续如提交或迁移必须确保检查文件随交付提供。
truncated: false
- text: 图索引所涉源码metadata_changed及CSS部分解析覆盖已直接读源码核实,结论以当前候选源码和Runtime证据为准。
truncated: false
- text: 旧全量check-sts2-relics.mjs因源图集burning_blood.png缺失ENOENT未通过,不能将该全量检查计为通过;此次UI定向Runtime检查不受影响。
truncated: false
risks_truncated: false
completed_at: 2026-10-13T09:58:45.226Z
history:
- goal_cycle: 1
iteration: 1
attempt: 1
outcome: pass
unresolved_ids: []
summary:
text: 独立只读验收A1–A5通过;复用绑定当前候选hand-relic-browser并补充hand-relic-dialog成功。
truncated: false
completed_at: 2026-10-13T09:58:45.226Z
history_overflow:
dropped_entries: 0
first_dropped_at: null
last_dropped_at: null
outcome_counts:
pass: 0
fail: 0
blocked: 0
execution-error: 0
recovery: 0
verification_result: pass
verification_report: verification.md
archived: true
created_at: 2026-10-13T09:47:29.973Z
@@ -0,0 +1,27 @@
# Battle hand relic list
梦三战斗手牌区左侧展示征程当前持有的遗物,复用既有图片、名称、描述和战斗状态。
列表条目为图片按钮;无图片或图片加载失败以名称替代,具有可访问名称。
现有遗物详情入口保留,不改变遗物业务行为。
### Scenario: 持有遗物展示
Acceptance: A1
进入战斗后左侧列表逐件展示持有遗物,图片与条目是一体,不另设文字列表。
### Scenario: 间距和溢出
Acceptance: A2
点击区域48×48px,条目间距至少8px,与手牌间隔至少12px。
窄屏和遗物较多时在列表内滚动,不覆盖手牌。
### Scenario: 长按描述
Acceptance: A3
持续按下500ms打开名称、描述和当前状态;提前松开、滚动、取消不会误打开。
浮层有关闭方式,位于可见屏幕内;键盘可打开并关闭详情。
### Scenario: 手牌兼容
Acceptance: A4
操作遗物不触发手牌选择、拖动或出牌,保留既有遗物详情入口和手牌交互。
### Scenario: 生命周期
Acceptance: A5
退出战斗或销毁会话清理列表、浮层、监听器及长按定时器,恢复布局空间;重新进入不重复挂载。
@@ -0,0 +1,63 @@
---
generated_from_state_version: 8
---
# Verification
## Current result
- Result: **Archived**
- Verification status: **Checks completed; result confirmed**
- Goal cycle: 1
- Iteration: 1
- Verifier attempt: 1
- Completed: 2026-10-13T09:58:45.226Z
- Summary: 独立只读验收A1–A5通过;复用绑定当前候选hand-relic-browser并补充hand-relic-dialog成功。
## Acceptance
| ID | Result | Source | Criterion | Reason |
| --- | --- | --- | --- | --- |
| A1 | passed | brief.md | 战斗开始后,手牌区最左侧展示当前持有遗物;每件遗物仅有一个图片条目,缺图显示名称。 | mountRelics复用heldRelics和createRelicIcon,逐件图片按钮;Runtime hand-relic-browser确认12条、缺图/加载失败名称替代与刷新。 |
| A2 | passed | brief.md | 点击区域48×48px,条目间距至少8px,与手牌间隔至少12px;窄屏和遗物较多时可滚动且不重叠手牌。 | CSS 48x48、gap8、64px条带与88px布局预留;Runtime hand-relic-browser在360/640/1280px确认尺寸、间距及局部滚动。 |
| A3 | passed | brief.md | 长按500ms显示对应名称、描述和当前状态;提前松开、滑动或取消不误触;键盘也可打开并关闭详情。 | 500ms定时器、提前松开/移动阈值/scroll/pointercancel/blur取消经源码和组件Runtime检查;hand-relic-dialog补充名称描述状态、屏内modal、Enter/Space打开、Escape/按钮关闭和焦点回归。 |
| A4 | passed | brief.md | 遗物界面不触发手牌选择、拖动或出牌;既有手牌交互和遗物详情入口仍可用。 | strip阻止交互冒泡,手牌入口仅接受属于手牌zone的.card;保留全量详情按钮,Runtime集成检查验证单项/全量入口及pointerdown不向手牌root冒泡。布局仅减可用宽度,未改手牌业务。 |
| A5 | passed | brief.md | 战斗结束或会话销毁后移除列表、浮层、监听器和定时器,恢复被占用的布局空间;再次进入不重复挂载。 | ownResource注册dispose,session逆序释放;strip销毁取消定时器、移除全部注册监听和DOM、恢复CSS变量。Runtime组件与集成检查验证销毁中断长按、重复dispose、modal清理及重挂载唯一条带。 |
## Checks
| Check | Command | Working directory | Status | Exit | Duration |
| --- | --- | --- | --- | ---: | ---: |
| hand-relic-browser | mengsan/tools/check-hand-relics.mjs C:/Users/111/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules/playwright C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe | . | passed | 0 | 3919 ms |
| hand-relic-dialog | -e const fs=require('fs'); const assert=require('assert/strict'); const {chromium}=require('C:/Users/111/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules/playwright'); (async()=>{const browser=await chromium.launch({headless:true,executablePath:'C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe'});try{const page=await browser.newPage({viewport:{width:360,height:640}});await page.setContent('<div id="root" style="position:relative;height:156px"><div id="hand" class="mengsan-hand-scroll-shuying" style="position:absolute"></div></div>');await page.addStyleTag({content:fs.readFileSync('mengsan/ui/style.css','utf8')+fs.readFileSync('mengsan/ui/hand/style.css','utf8')});const source=fs.readFileSync('mengsan/ui/relic-strip.js','utf8')+'\n'+fs.readFileSync('mengsan/ui/relics.js','utf8').replace(/^import .*;$/gm,'');await page.evaluate(async source=>{const prelude='const ui=window.ui; const heldRelics=run=>run.relics; const createRelicIcon=()=>null;';window.ui={me:document.querySelector('#root'),window:document.body};window.run={relics:[{id:'a',name:'甲',description:'描述甲',pool:'常规',tier:'普通'},{id:'b',name:'乙',description:'描述乙',pool:'常规',tier:'普通'}]};window.session={active:true,ownResource:(key,dispose)=>window.cleanup=dispose};window.handEvents=0;ui.me.addEventListener('pointerdown',()=>window.handEvents++);const module=await import(URL.createObjectURL(new Blob([prelude+source],{type:'text/javascript'})));window.mount=module.mountRelics;window.instance=mount(session,run,{status:()=> '状态示例'});},source);const items=page.locator('.mengsan-hand-relics-shuying button');await items.first().focus();await page.keyboard.press('Enter');assert.equal(await page.locator('dialog').count(),1);assert.equal(await page.locator('dialog section').count(),1);assert.ok((await page.locator('dialog').innerText()).includes('描述甲'));assert.ok((await page.locator('dialog').innerText()).includes('状态示例'));const rect=await page.locator('dialog').boundingBox();assert.ok(rect.x>=0&&rect.y>=0&&rect.x+rect.width<=360&&rect.y+rect.height<=640);await page.keyboard.press('Escape');assert.equal(await page.locator('dialog').count(),0);assert.equal(await items.first().evaluate(e=>document.activeElement===e),true);await page.locator('.mengsan-battle-relics-button-shuying').click();assert.equal(await page.locator('dialog section').count(),2);await page.getByRole('button',{name:'关闭',exact:true}).click();await items.first().click();assert.equal(await page.evaluate(()=>handEvents),0);await items.first().focus();await page.keyboard.press('Space');assert.equal(await page.locator('dialog').count(),1);await page.evaluate(()=>cleanup());assert.equal(await page.locator('dialog,.mengsan-hand-relics-shuying,.mengsan-battle-relics-button-shuying').count(),0);await page.evaluate(()=>{instance=mount(session,run,{status:()=> '状态示例'});});assert.equal(await page.locator('.mengsan-hand-relics-shuying').count(),1);await page.evaluate(()=>cleanup());console.log('PASS: integrated relic dialog selected/all contents, status, viewport bounds, Enter/Space/Escape, focus return, pointer bubbling isolation, session cleanup and remount');}finally{await browser.close();}})().catch(e=>{console.error(e);process.exitCode=1}); | . | passed | 0 | 1298 ms |
### Builder-reported evidence
These are Builder reports, not Runtime check receipts or independent verification results.
- focused-browser: passed — Edge测试360/640/1280px间距、缺图、长按及取消、键盘、刷新和清理通过
- syntax: passed — node --check relics.js/relic-strip.js通过
- Known limitation: 未在真实无名杀游戏或物理触摸设备上验收;浏览器为隔离组件检查。
## Blockers
_None._
## Risks and skipped work
- 验收采用隔离 Edge 浏览器组件及遗物详情集成、源码审查;没有运行完整无名杀引擎、物理触摸设备或真实缩放/手牌出牌回归,不代表实机验收通过。
- check-hand-relics.mjs被现有*.mjs忽略规则排除,当前Runtime使用本地文件;后续如提交或迁移必须确保检查文件随交付提供。
- 图索引所涉源码metadata_changed及CSS部分解析覆盖已直接读源码核实,结论以当前候选源码和Runtime证据为准。
- 旧全量check-sts2-relics.mjs因源图集burning_blood.png缺失ENOENT未通过,不能将该全量检查计为通过;此次UI定向Runtime检查不受影响。
## Previous iterations
| Goal cycle | Iteration | Attempt | Outcome | Unresolved | Summary | Completed |
| ---: | ---: | ---: | --- | --- | --- | --- |
| 1 | 1 | 1 | pass | — | 独立只读验收A1–A5通过;复用绑定当前候选hand-relic-browser并补充hand-relic-dialog成功。 | 2026-10-13T09:58:45.226Z |
## Conclusion
独立只读验收A1–A5通过;复用绑定当前候选hand-relic-browser并补充hand-relic-dialog成功。
@@ -1,146 +0,0 @@
# Recovery authorized by the user on 2026-10-13.
# CLI-generated Shape state; historical version 24 evidence is backed up in
# .planning/comet-state-recovery-20261013. All acceptance requires revalidation.
schema: comet.native.v4
name: shuying-skill-tianshu-review
language: zh-CN
phase: shape
status: await-user
state_version: 25
brief: brief.md
document_constraints_version: 2
shape_confirmation_hash: 73614dd2595713e137f716f16fb11eed1c7d59096b3fd243d53ff1d97cedd7d3
spec_changes:
- capability: shuying-skill-correctness
operation: create
source: specs/shuying-skill-correctness/spec.md
workspace:
isolation: current
change_branch: null
target_branch: null
finish: null
loop:
stage: await-user
goal_cycle: 1
iteration: 0
attempt: 0
retry_epoch: 0
failed_iteration_count: 0
no_progress_count: 0
execution_failure_count: 0
previous_unresolved_ids: []
next_action: confirm-shape
acceptance:
- id: A1
source: brief.md
text: 羁绊的 filter、mod、async content 在没有开发者全局对象时,能通过模块导入获取引擎依赖。
result: pending
reason: null
- id: A2
source: brief.md
text: 江东基业二三级对应子技能通过正确 group 挂载并执行,低等级不重复叠加。
result: pending
reason: null
- id: A3
source: brief.md
text: 驭布对一张多目标杀只判定一次,成功时对各存活目标只造成一次伤害。
result: pending
reason: null
- id: A4
source: brief.md
text: 驭布困难难度黑桃成功、梅花失败;阴间难度黑色成功、红色失败,动态描述与难度条件一致。
result: pending
reason: null
- id: A5
source: brief.md
text: 狼顾失败后仅限制当前回合;黑桃成功时恢复次数,即使没有可弃手牌也不会错误占用次数。
result: pending
reason: null
- id: A6
source: brief.md
text: 奋威开局及中途获得时各初始化2蓄力,同次持有不因入场/开局事件重复添加,不重置共享蓄力。
result: pending
reason: null
- id: A7
source: brief.md
text: 舌战与狼顾仅从允许被发动者弃置的牌中随机选择。
result: pending
reason: null
- id: A8
source: brief.md
text: 白仪与九天仅从允许被发动者获得的牌中随机选择。
result: pending
reason: null
- id: A9
source: brief.md
text: 连环伤害允许再次增伤,既有牌伤增益不添加 notLink 排除。
result: pending
reason: null
- id: A10
source: brief.md
text: 新增定向回归验证并运行相关现有天书测试,说明真实游戏/联机实测边界,保留无关改动。
result: pending
reason: null
- id: A11
source: brief.md
text: 狼顾阴间梅花成功、红色失败,普通/困难仅黑桃成功;动态描述同步。
result: pending
reason: null
- id: A12
source: brief.md
text: 妄尊阴间累计1点伤害即反击,困难1点不反击,未受伤时弃牌数仍为困难1/阴间2。
result: pending
reason: null
- id: A13
source: brief.md
text: 夺玺阴间替换摸牌后仅自己摸2,困难双方各摸1;动态描述、提示同步。
result: pending
reason: null
- id: A14
source: brief.md
text: 引雷困难自己回合不触发、阴间自己回合触发;描述同步回合条件。
result: pending
reason: null
- id: A15
source: brief.md
text: 张角三难度体力和上限8/16/24,起始手牌6/8/10和追加技能保留。
result: pending
reason: null
- id: A16
source: brief.md
text: 疑神随机获取各目标合法装备,正常难度分支只选一名敌人,阴间所有合格敌人各一张;禁止选择受保护装备。
result: pending
reason: null
- id: A17
source: brief.md
text: 反馈受到多点伤害有逐点发动机会,可对友方来源发动,源牌耗尽后停止;自伤只获取自身装备。
result: pending
reason: null
- id: A18
source: brief.md
text: 狼顾接受其他友方来源;暴虐满血也失去1体力并允许任意角色;雷击允许其他友方,谏征允许其他角色使用的杀,不增加阵营限制。
result: pending
reason: null
- id: A19
source: brief.md
text: 远虑阴间保留unreal并明确描述;无双/神戟/战甲增强不回退,全部改动描述与提示一致。
result: pending
reason: null
builder_handoff: null
blockers: []
verification: null
history: []
history_overflow:
dropped_entries: 0
first_dropped_at: null
last_dropped_at: null
outcome_counts:
pass: 0
fail: 0
blocked: 0
execution-error: 0
recovery: 0
verification_result: pending
verification_report: null
archived: false
created_at: 2026-10-13T01:31:51.574Z
@@ -0,0 +1,27 @@
# Battle hand relic list
梦三战斗手牌区左侧展示征程当前持有的遗物,复用既有图片、名称、描述和战斗状态。
列表条目为图片按钮;无图片或图片加载失败以名称替代,具有可访问名称。
现有遗物详情入口保留,不改变遗物业务行为。
### Scenario: 持有遗物展示
Acceptance: A1
进入战斗后左侧列表逐件展示持有遗物,图片与条目是一体,不另设文字列表。
### Scenario: 间距和溢出
Acceptance: A2
点击区域48×48px,条目间距至少8px,与手牌间隔至少12px。
窄屏和遗物较多时在列表内滚动,不覆盖手牌。
### Scenario: 长按描述
Acceptance: A3
持续按下500ms打开名称、描述和当前状态;提前松开、滚动、取消不会误打开。
浮层有关闭方式,位于可见屏幕内;键盘可打开并关闭详情。
### Scenario: 手牌兼容
Acceptance: A4
操作遗物不触发手牌选择、拖动或出牌,保留既有遗物详情入口和手牌交互。
### Scenario: 生命周期
Acceptance: A5
退出战斗或销毁会话清理列表、浮层、监听器及长按定时器,恢复布局空间;重新进入不重复挂载。
@@ -0,0 +1,103 @@
# 术樱包技能修复
## Requirement: 羁绊依赖和分组
天书羁绊模块通过显式导入绑定引擎对象;各等级只挂载自己的正确子技能。
### Scenario: 非开发者环境的羁绊执行
Acceptance: A1
无全局 lib/get/game 时,已导入的羁绊 filter、mod、async content 使用模块绑定正常执行。
### Scenario: 江东升级后的效果
Acceptance: A2
二级、三级拥有正确 draw/discard/gain 子技能;升档后不同时叠加旧等级。
## Requirement: 驭布和狼顾
驭布对每次用杀执行一次判定,困难难度要求黑桃、阴间难度要求黑色;狼顾按回合限制次数,成功时恢复次数,随机他弃遵守保护。
### Scenario: 驭布多目标
Acceptance: A3
杀指定两个目标,只在首次指定目标事件判定一次;符合当前难度的判定成功后各存活目标受到一次伤害。
### Scenario: 驭布花色
Acceptance: A4
困难 hard 时黑桃成功、梅花与红色失败;阴间 nightmare 时黑桃与梅花成功、红色失败。动态描述困难显示黑桃、阴间显示黑色,默认非阴间保持黑桃。
### Scenario: 狼顾次数
Acceptance: A5
判定失败保留使用标记到当前全局回合结束;符合当前难度的判定成功移除标记,与原持牌角色是否有可弃手牌无关。
## Requirement: 动态获得和候选牌合法性
奋威初始化兼容中途获得,禁止开局/入场重复加初始值,保留其他技能已有共享蓄力。随机牌操作使用对应他弃/他取合法候选。
### Scenario: 奋威动态获得
Acceptance: A6
开局和中途获得均初始化2蓄力;入场和开局事件不会重复添加。已有共享蓄力不被重置。
### Scenario: 随机他弃
Acceptance: A7
舌战和狼顾目标混有可弃和受保护牌时,随机结果只属于允许被发动者弃置的集合。
### Scenario: 随机获得
Acceptance: A8
白仪和九天目标混有可取得和受保护牌时,随机结果只属于允许被发动者获得的集合。
## Requirement: 保持规则与验证
用户允许连环传导再次增伤。只修改审查确认问题,不触及梦三、不重构无关功能。
### Scenario: 连环再次增伤
Acceptance: A9
五虎等既有牌伤增益仍接受连环伤害并增加伤害值。
### Scenario: 回归验证
Acceptance: A10
在修改前证明定向问题复现,修复后相关验证通过,同时现有天书直伤、回复和换关轮次测试通过;报告是否进行真实游戏或联机验证。
## Requirement: 青青子衿难度与体力
普通normal对应官网休闲,困难hard对应官网普通,阴间nightmare对应官网困难。按用户逐项决定修复规则,保留明确指定的增强版本。
### Scenario: 狼顾难度
Acceptance: A11
普通、困难仅黑桃成功;阴间黑桃和梅花成功、红色失败。动态描述反映条件;成功恢复次数及合法他弃继续成立。
### Scenario: 妄尊难度
Acceptance: A12
阴间敌人在当前回合对自己造成过正伤害即可反击1点;普通、困难仍要求累计伤害超过1点。未受伤时普通、困难弃1,阴间弃2。描述与条件一致。
### Scenario: 夺玺难度
Acceptance: A13
其他角色摸牌阶段可以失去1点体力替换摸牌;困难自己与其各摸1,阴间仅自己摸2。玩家离场不再摸牌,选择提示及动态描述同步。
### Scenario: 引雷难度
Acceptance: A14
困难仅自己回合外失牌触发,阴间自己回合内外均可。普通不获得追加技能;随机横置未横置角色。描述显示对应回合条件。
### Scenario: 张角体力
Acceptance: A15
张角普通、困难、阴间的初始体力与上限分别为8、16、24。起始手牌6/8/10、基础技能与困难起追加引雷保留;其他BOSS配置不受影响。
## Requirement: 取牌方式和角色范围
随机获得从发动者合法候选中抽取;描述未限制阵营时,不把AI偏好作为硬性目标限制。
### Scenario: 随机疑神
Acceptance: A16
疑神替换回复后,普通/困难获取一名随机合格敌人的随机合法装备,阴间获取每名合格敌人的一张随机合法装备;不提供装备自选,也不获取受保护装备。
### Scenario: 反馈逐点
Acceptance: A17
受到N点伤害后有N次独立可选反馈机会,每次获取来源一张合法牌;来源包括友方,来源离场或没有合法牌时不发动。自伤只能取自身装备,不能重复获取手牌。
### Scenario: 角色范围
Acceptance: A18
狼顾获得任何其他角色牌可触发;暴虐满血时X为0仍失去1体力,不选择伤害目标,受伤时目标可以是任意存活角色;雷击可选任意其他角色;谏征接受任何其他角色的杀,只检查非原目标、攻击范围和手牌等实际条件。AI可以偏好敌方/保护友方,但不得限制用户可选范围。
## Requirement: 保留增强并同步文本
### Scenario: 增强与文本
Acceptance: A19
远虑阴间仍调用unreal并描述为视为受到过伤害;无双未响应增伤次数、神戟普通/困难/阴间额外摸2/3/4和额外杀1/2/2、战甲阴间摸3均保留。狼顾、妄尊、夺玺、引雷及所有本轮改动的静态/动态文本和选择提示与最终规则一致。
+28
View File
@@ -0,0 +1,28 @@
# 梦三战斗 UI 回归清单
每次 review 核验下表各项。在报告中逐项写明通过、失败或未验,并记录证据对应的代码版本、皮肤、尺寸和缩放。涉及战斗 UI 的改动,附受影响场景的渲染截图。
| 场景 | 操作与通过标准 |
| --- | --- |
| 触屏拖牌与目标连线 | 从手牌拖出一张【杀】并移动到可选敌人。线起点贴在拖动牌上缘中央,终点跟随触点,两端误差各不超过 2 CSS px。取消手势后线立即消失。对合法目标松手后拖线立即消失,原生提交只触发一次。完整对局中再检查提交后的出牌特效能指向实际目标。 |
| 普通出牌布局与缩放 | 在主动出牌阶段检查手牌扇面、提示语和「确定/回合结束」按钮组。三者共用战场中线,误差不超过 2 CSS px。改变界面缩放后重新检查对齐和拖牌线两端。 |
| 出牌响应布局与按钮交互 | 敌人出【杀】,选择【闪】,观察场上出牌副本、响应文字与「确定/取消」两键的整体边界。三者从上到下共用战场中线,横向中心误差不超过 2 CSS px,牌面、提示、按钮和选中手牌之间有可见间距。确认和取消分别可点击,响应结束后场上的牌恢复原生位置。 |
| 弃牌时技能栏稳定 | 启用十周年 UI,进入需弃置两张手牌的场景并点选第一张。技能栏在重建的首帧起就不出现重复的药水按钮,普通技能仍可见,弃牌计数正常更新。 |
| 战斗药水槽与计数信息 | 持有药水进入战斗。药水槽位于左上区域,可贴近轮数、时间及牌堆数量控件,各自的可见区域互不重叠。点按药水可打开详情,并能在可用阶段正常使用。 |
## 浏览器回归
从无名游戏目录内的术樱包根目录执行。脚本使用本地引擎、十周年 UI 样式、Playwright 和 Microsoft Edge。Playwright 安装在其他目录时,可将 `CODEX_NODE_MODULES` 指向包含它的 `node_modules`。
```powershell
$env:HUD_REVIEW = '1'
node mengsan/tools/test-battle-hud.cjs
```
需要截图时,将 `HUD_ARTIFACTS` 指向已建立的临时目录。完整矩阵覆盖原生 UI、十周年 UI 的手杀、十周年和新杀风格,以及 1080×486、812×375、667×375,含非整数像素比。1080×486 使用无名杀「新版」布局,从 65% 缩放基线切换到 50%、85%、100% 和 120%,核验普通出牌位置和拖牌线。出牌后的默认及金龙连线均检查端点,完整金龙贴图需在客户端核验。
## Android 实机复核
在本轮改动对应的 Android 客户端启用十周年 UI,使用该客户端当前启用的皮肤复核各场景,并记录十周年 UI 版本和皮肤。拖牌时分别观察松手前的拖线和松手后的出牌特效。响应用两次事件分别检查确认和取消。弃牌时观察点牌瞬间,检查原生计数面板与药水槽能同时看清并各自操作。实机结果单独记录,实机不可用时写明未验。
涉及地图、剧情、奖励、牌库、遗物或其他公共弹窗时,一并使用[梦三界面缩放回归清单](mengsan-ui-zoom.md)。
+39
View File
@@ -0,0 +1,39 @@
# 梦三界面缩放回归清单
无名杀原生 UI 底层以 `transform: scale()` 缩放,十周年 UI 以 `body.zoom` 缩放。检查通用界面时覆盖两条入口,并记录界面缩放、窗口尺寸、UI 版本和实际使用的风格。
## 实施方案
- 地图用实际渲染尺寸换算鼠标位移,保证地图和指针同速移动。窄小布局允许行军菜单和顶部栏在各自区域滚动。
- 选将和事件面板的高度随剩余空间调整,内容在面板内滚动,打开和关闭时恢复焦点也保持页面位置。
- 剧情将文本和分支选项放进同一滚动容器,跳过和菜单留在顶部。较高倍率下可滚动查看并点按选项。
- 牌库、牌堆、遗物、战斗状态、菜单确认和调试管理器沿用奖励与药水的原生对话框挂载方式,以可视窗口约束弹窗尺寸。打开、选择与关闭仍通过各自原有入口执行。
- 战场右侧的牌堆和遗物入口随可用高度调整。战斗状态平时放在头像上方,上方空间不足时移到头像侧面。
## 验收项
| 范围 | 操作与通过标准 |
| --- | --- |
| 选将、事件、商店、休息处 | 能看到主操作,点按后返回正确选择或退出。 |
| 地图和行军菜单 | 相同屏幕位移下,地图拖动与鼠标位移差不超过 2 CSS px。触屏能滚动,能点开菜单、查看行囊、返回和关闭,能选中可前往节点。 |
| 剧情 | 文本和分支选项可浏览,点按分支写入正确剧情状态,跳过和继续均可用。 |
| 奖励和战后结算 | 选牌、跳过和结算选项可到达,确认后继续流程。 |
| 牌库、牌堆、遗物、药水和战斗状态 | 能通过实际入口打开,弹窗在可视区域内,详情和关闭可点按。内容较长时能滚动。 |
| 菜单确认和调试管理器 | 对话框在可视区域内,所选操作返回正确结果,关闭后回到原界面。 |
## 浏览器复核
从术樱包根目录执行。脚本使用本地无名杀、十周年 UI、Playwright 和 Microsoft Edge。需要时将 `CODEX_NODE_MODULES` 指向包含 Playwright 的 `node_modules`,将 `HUD_ARTIFACTS` 指向已建立的截图目录。
```powershell
$env:UI_ZOOM_REVIEW = '1'
node mengsan/tools/test-battle-hud.cjs
```
自动回归覆盖 16 个界面与交互。以 812×375 横屏为基线,十周年 UI 检查 50%、65%、100%、150%、200%、300%,原生 UI 检查 150% 和 300%。两条缩放入口均检查界面打开后从 65% 切到 200%。另检查 420×360 窄屏、390×720 竖屏和 1280×720 桌面。
脚本通过渲染出的按钮执行代表性操作,检查界面边界、返回值和关闭结果。鼠标地图拖动单独检查像素误差。完整战斗 HUD 和出牌响应按[战斗回归清单](mengsan-battle-ui.md)复核。
## Android 实机复核
用 Android 客户端实际启用的十周年 UI 风格,在常用倍率和一个较高倍率下复核受影响的操作。优先确认触屏地图滚动、剧情分支点按、较长内容滑动和弹窗关闭。报告逐项标注通过、失败或未验。
@@ -0,0 +1,75 @@
# 梦三模式首次安装分包 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal** 让梦三首次安装优先使用同源同版本的分包 ZIP,降低请求数并控制解包内存。
**Architecture** 两个发布工作流调用同一个 Python 打包脚本。客户端在现有暂存阶段串行处理附件,对剩余文件复用原有逐文件下载,全部暂存成功后继续执行现有安装事务。
**Tech Stack** Python 标准库 `zipfile` 和 `unittest`、PowerShell 发布工作流、宿主 JSZip 2.7、`DecompressionStream`、Electron HTTPS、Cordova `FileTransfer`、Node.js 测试运行器。
**Spec** `docs/superpowers/specs/2026-11-24-mengsan-zip-install-design.md`
## 全局约束
- GitHub 和 Gitea 发布同一标签对应的分包。客户端使用玩家已选的源和渠道。
- 单次只处理一个独立 ZIP。路径、大小和 SHA-256 以标签的模块清单为准。全部暂存后才安装。
- ZIP 不可用时从同源同标签补齐未完成文件。保留现有事务式安装、卸载与重启后重试。
- 首版只覆盖梦三首次安装。日常差量更新、查漏补缺、旧安装迁移、常规武将与天书乱斗继续使用现有下载方式。
- 实现和验证阶段通过临时测试配置打开 ZIP。两个源的实机验收通过后,再在正式配置默认启用。
## 审查重点
- GitHub 已推送标签,Release 仍在草稿或上传中。首次安装应使用同标签文件下载。
- 一包失败或重试时,其他包已通过校验的暂存文件只安装一次。
- 错误的标签、越界条目和错误字节不得导致正式目录写入未验证的文件。
- 文件系统写入失败应进入现有恢复逻辑。同源回退只处理附件下载、解包或内容校验失败。
- 重启后已知的新装可以重新使用 ZIP。旧版待修复记录和已有安装更新继续走原路径。
## 文件分工
- `tools/build_mengsan_archives.py` · 从正式梦三清单生成并验证分包。
- `.github/workflows/release.yml` 和 `.gitea/workflows/release.yml` · 在现有 ZIP 构建和草稿上传步骤加入分包。
- `update.js` · 查询附件、复用有字节上限的下载、在安装暂存阶段解包及补齐。
- `tools/test_mengsan_archives.py` 和 `tools/test_mengsan_zip_install.mjs` · 覆盖生成规则、正常安装入口及故障分支。
- `tools/UPDATE.md` · 记录附件格式和实机启用条件。
## 任务一 · 构建及核验分包
**接口** `build_archives(root: Path, output: Path, tag: str) -> list[Path]` 使用 `root/dist/modules/mengsan.json`,生成 `mengsan-<tag>-part-001.zip` 等附件。条目名为 `mengsan/…`,与模块清单路径逐字一致。
- [ ] 在 `tools/test_mengsan_archives.py` 写 `test_parts_cover_packable_files_once` 和 `test_reject_inconsistent_release`。用临时目录验证 `Counter(written_paths) == Counter(packable_paths)`、条目 SHA-256 与清单一致、超出 10 MiB 的单文件不入包。对清单版本不匹配、源文件变化和单个分包成品超过 11 MiB 分别断言生成失败。
- [ ] 运行 `python -m unittest discover -s tools -p test_mengsan_archives.py`,确认因生成器尚缺而失败。
- [ ] 实现生成器及 CLI `python tools/build_mengsan_archives.py --root <snapshot> --out-dir <output> --tag <tag>`。按清单路径排序,依次填入每包合计最多 10 MiB 的未压缩文件。使用 `ZIP_DEFLATED`、压缩级别 6。关闭 ZIP 后检查成品不超过 11 MiB,逐项校验路径、大小和 SHA-256,并检查各包合计覆盖所有可打包条目。调整上限时同步客户端和测试。
- [ ] 重跑 Python 测试并确认通过。以当前分支生成的清单和导出快照运行 CLI,检查实际分包数、最大包大小和完整覆盖。使用发布工作流同样的标签快照校验命令 `python tools/verify_manifest.py --root <snapshot> --version <version>`。
## 任务二 · 接入两个发布工作流
**接口** 复用任务一的 CLI。每个工作流向现有草稿 Release 上传生成器在单独输出目录产生的所有 `mengsan-<tag>-part-*.zip`,ZIP 附件使用 `application/zip`。
- [ ] 在两个 `release.yml` 的快照验证后调用 Python 构建,并在取消草稿前上传分包。沿用原来生成、上传完整 ZIP 和清单的步骤。CI 继续使用标签快照内的脚本与清单。
- [ ] 更新 `tools/UPDATE.md` 的发布步骤及分包命名。区分标签 raw 清单、梦三 Release 附件和完整离线包。
- [ ] 准备可发布的测试标签后,在获准的测试发布中运行两个工作流。核对同一标签均包含完整 ZIP 和相同编号的分包,完整 ZIP 的原有目录结构保持可用。发版附件下载验证归任务四。
## 任务三 · 在梦三首次安装的暂存阶段接入 ZIP
**接口** `getMengsanReleaseParts(manifest, shuYing) -> Promise<Array<{name: string, url: string, size: number}>>` 返回已选源的同标签分包。`stageMengsanArchives(shuYing, manifest, operationRoot, remaining: Set<string>, stageVerified, progress) -> Promise<void>` 串行读取这些包。`stageVerified(file: string, bytes: Uint8Array) -> Promise<void>` 在写盘前记录尝试,写盘成功后才从 `remaining` 移除文件。
- [ ] 在 `tools/test_mengsan_zip_install.mjs` 用 `node:test` 从正常菜单入口 `manageMengsanModule` 触发安装。`fresh install stages from selected release` 对两个源分别断言附件查询标签正确、成功分包文件无 raw 请求、所有文件备齐前无正式路径写入。`falls back for missing or unusable release parts` 覆盖 Release 404、草稿、标签不匹配、超限响应、损坏 ZIP、越界条目和错误 SHA-256,断言 `rawRequests` 恰好等于未成功暂存文件。`retries the failed ZIP once` 覆盖单包下载异常后成功。`staging write errors preserve recovery` 断言写入失败后无后续 raw 请求。`installed updates and legacy repairs stay on raw` 从 `checkVersion`、`repairMissingFiles` 和旧修复记录分别验证无 Release 请求。至少一个解析用例使用宿主实际捆绑的 JSZip 2.7 和脚本生成的 ZIP。
- [ ] 运行 `node --experimental-vm-modules --test tools/test_mengsan_zip_install.mjs` 并确认新增 ZIP 场景因当前只请求 raw 文件而失败。可通过 `vm.SourceTextModule` 和测试用 `SyntheticModule` 为 `../../noname.js` 注入宿主 API,无需从产品代码导出测试接口。
- [ ] 在 `update.js` 实现附件查询和下载。两源均请求所选 `<repoApi>/releases/tags/<tag>`,要求 `tag_name` 匹配且 `draft` 为 `false`。仅接收与版本文件名匹配、`size` 为正整数且不超过 11 MiB 的附件。使用该源的 HTTPS `browser_download_url`。GitHub 现有附件链接与 CDN 实测缺少浏览器跨域响应头,因此 Electron 使用支持 HTTPS 重定向的原生请求,Cordova 使用 `FileTransfer` 下载到本次操作目录,校验文件大小后读取并清理。网页 Fetch 用尽该附件的网络重试后回退同源逐文件下载。
- [ ] 使用 `get.zip` 获取 JSZip,逐包调用 `load` 读取目录和压缩字节。解包前检查文件名、清单归属、单条目声明大小和包内合计上限。用 `DecompressionStream("deflate-raw")` 解压到按清单大小分配的缓冲区并限制实际输出,随后调用 `verifyFile` 和 `stageVerified`。缺少流式解压能力的客户端直接逐文件下载。异常 ZIP 至多重新取一次再回退。校验、网络和解包错误记录包名及原因。写盘错误从暂存阶段直接抛出。
- [ ] 在 `manageMengsanModule` 判定首次安装。无既有安装,或已明确清空的卸载记录进入全新安装;旧待修复记录按原路径。操作记录只在已知首次安装进入 `installing` 时标记 `freshInstall: true`,失败后该标记用于重新发起完整下载。通过 `installMengsanFiles` 把这个选择传给 `updateAllFiles` 的暂存阶段;本次已完成的文件更新原进度和清理集合,原文件池仅处理剩余项。将 ZIP 网络进度与已验证文件字节分开,避免回退时重复计数。保留现有正式路径落盘前复核及安装记录提交逻辑。
- [ ] 运行 `node --check update.js` 和 Node 测试,确认通过。分别用清单对比正常 ZIP 和逐文件回退的最终目录及安装记录,确认每个新文件大小和 SHA-256 一致。
## 任务四 · 实机验收和默认启用
- [ ] 在同一台受支持手机上,用同一客户端版本、梦三标签、下载源和网络条件,对逐文件和分包的干净安装各测三次。每次从确认安装计时到校验完成。通过网络记录统计资源请求数,从应用及其 WebView 进程记录内存峰值,报告原始样本和中位数。先测 10 MiB 展开、11 MiB 下载上限,再按实测调整。
- [ ] 在客户端真实窗口验证 GitHub 与 Gitea Release 的匿名下载、重定向和跨域行为,并分别验证 ZIP 不可用时回退到当前源的同标签文件。测试手机端强制退出后再点击安装。通过安装记录、清单校验和重启后进入梦三确认结果。另跑桌面端首次安装及差量更新一次。
- [ ] 对照同环境逐文件基线检验收益。建议启用条件为手机端资源请求数和总耗时中位数下降,内存峰值无可重复的上升,两个源与回退均通过。记录采用的包大小、测试设备和结果,再启用默认 ZIP 路径。
## 资料
- [GitHub 按标签查询 Release](https://docs.github.com/en/rest/releases/releases#get-a-release-by-tag-name)
- [GitHub Release 附件字段](https://docs.github.com/en/rest/releases/assets#get-a-release-asset)
- [Gitea 按标签查询 Release](https://docs.gitea.com/api/1.25/operations/repo-get-release-by-tag/)
@@ -0,0 +1,19 @@
# 梦三模式首次安装分包设计
梦三模式首次安装目前会逐个下载模块清单文件。当前仓库按发布清单规则筛出的梦三模块有 846 个文件,约 143.5 MiB。分包的目标是减少首次安装的网络请求,在手机端控制单次解包的数据量,并保留逐文件校验和安装恢复能力。
## 方案选择
- 逐文件下载适合日常差量更新和少量补缺,继续沿用现有流程。
- 单个 ZIP 请求最少。现有客户端会在内存中拼接完整响应,单个 ZIP 需要持有整个模块的压缩数据。
- 首次安装使用多个有大小上限的独立 ZIP。每次只处理一包,下载失败时可以单独重试。首版覆盖梦三,常规武将和天书乱斗等实测后再决定。
## 发布与安装
GitHub 和 Gitea 的现有发布工作流使用各自同一发布标签的梦三清单生成分包,将分包与完整离线安装包一起上传为 Release 附件。客户端继续使用选定的源和渠道,先获得同一标签的模块清单,再查询该标签的 Release。首次安装每次下载和解开一包,每个文件按清单验证大小和 SHA-256 后写入现有暂存区。全部文件备齐后,现有安装流程再次验证暂存文件并负责替换、回滚和提交安装记录。
旧标签无 ZIP、附件暂不可用、解包失败或内容校验失败时,从同源同标签逐文件补齐。本次已校验并写入暂存区的文件可以继续用。暂存写入失败走现有安装失败处理。退出游戏后,安装按现有方式重新发起,部分下载进度只用于当前操作。已安装的模块更新、查漏补缺、卸载和旧安装迁移沿用现有行为。
## 启用条件
同一部手机、同一版本和同一下载源下,对比两种方式的请求数、总耗时和内存峰值。验证两个源的附件在游戏内均可下载,且 ZIP 不可用时均可从同源回退。手机实测确认有收益后再默认启用。具体分包上限由实测确定。
+1 -11
View File
@@ -6,7 +6,7 @@ import { configureDiagnostics } from "./diagnostics/index.js";
export const type = "extension"; export const type = "extension";
export let shuYing = new Object(); export let shuYing = new Object();
const shuYingLocalVersion = "2.0.2.3-rc.3"; const shuYingLocalVersion = "2.0.2.3-rc.12";
shuYing.name = "术樱包"; shuYing.name = "术樱包";
shuYing.editable = false; shuYing.editable = false;
@@ -291,16 +291,6 @@ shuYing.help = () => {
}; };
//本地资源修复
shuYing.RepairBug = () => {
updater.repairCoreFiles(shuYing);
};
//重新下载重要js文件
shuYing.RepairBugGo = () => {
updater.repairCoreFiles(shuYing);
};
shuYing.Diuse_downText = function () { shuYing.Diuse_downText = function () {
time = setTimeout(() => { time = setTimeout(() => {
}, 1000) }, 1000)
+14
View File
@@ -1,5 +1,6 @@
import { getDirectDamageSkillCount } from "./tianshu/directDamage.js"; import { getDirectDamageSkillCount } from "./tianshu/directDamage.js";
import { getSkillRecoverCount } from "./tianshu/skillRecover.js"; import { getSkillRecoverCount } from "./tianshu/skillRecover.js";
import { getSkillCardCount } from "./tianshu/skillCard.js";
export default function initFunction(lib, game, ui, get, ai, _status, shuYing = {}) { export default function initFunction(lib, game, ui, get, ai, _status, shuYing = {}) {
game.shuying_getDiscardNamesNum = function () { game.shuying_getDiscardNamesNum = function () {
@@ -397,6 +398,10 @@ export default function initFunction(lib, game, ui, get, ai, _status, shuYing =
return getSkillRecoverCount(player, currentSkills, lib) return getSkillRecoverCount(player, currentSkills, lib)
>= Math.max(1, Number(condition.count) || 1); >= Math.max(1, Number(condition.count) || 1);
} }
if (condition.type == "skillCard") {
return getSkillCardCount(player, currentSkills, lib)
>= Math.max(1, Number(condition.count) || 1);
}
if (condition.type == "skill") return currentSkills.includes(condition.skill); if (condition.type == "skill") return currentSkills.includes(condition.skill);
if (condition.type == "skillName") return currentSkills.some(skill => lib.translate[skill] == condition.name); if (condition.type == "skillName") return currentSkills.some(skill => lib.translate[skill] == condition.name);
if (condition.type == "skills") { if (condition.type == "skills") {
@@ -445,6 +450,9 @@ export default function initFunction(lib, game, ui, get, ai, _status, shuYing =
if (condition.type == "skillRecover") { if (condition.type == "skillRecover") {
return getSkillRecoverCount(player, currentSkills, lib) > 0; return getSkillRecoverCount(player, currentSkills, lib) > 0;
} }
if (condition.type == "skillCard") {
return getSkillCardCount(player, currentSkills, lib) > 0;
}
if (condition.type == "skill") return currentSkills.includes(condition.skill); if (condition.type == "skill") return currentSkills.includes(condition.skill);
if (condition.type == "skillName") return currentSkills.some(skill => lib.translate[skill] == condition.name); if (condition.type == "skillName") return currentSkills.some(skill => lib.translate[skill] == condition.name);
if (condition.type == "skills") return [...(condition.all || []), ...(condition.any || [])].some(skill => currentSkills.includes(skill)); if (condition.type == "skills") return [...(condition.all || []), ...(condition.any || [])].some(skill => currentSkills.includes(skill));
@@ -482,6 +490,12 @@ export default function initFunction(lib, game, ui, get, ai, _status, shuYing =
return `已实际回复体力的奖励技能 ${Math.min(count, need)}` return `已实际回复体力的奖励技能 ${Math.min(count, need)}`
+ `/${need};首次有效技能回复后登记`; + `/${need};首次有效技能回复后登记`;
} }
if (condition.type == "skillCard") {
const count = getSkillCardCount(player, currentSkills, lib);
const need = Math.max(1, Number(condition.count) || 1);
return `已实际视为或转化牌的奖励技能 ${Math.min(count, need)}`
+ `/${need};首次使用或打出后登记`;
}
if (condition.type == "skill") return `${currentSkills.includes(condition.skill) ? "已" : "未"}选择【${get.translation(condition.skill)}】`; if (condition.type == "skill") return `${currentSkills.includes(condition.skill) ? "已" : "未"}选择【${get.translation(condition.skill)}】`;
if (condition.type == "skillName") return `${currentSkills.some(skill => lib.translate[skill] == condition.name) ? "已" : "未"}选择任意版本的【${condition.name}】`; if (condition.type == "skillName") return `${currentSkills.some(skill => lib.translate[skill] == condition.name) ? "已" : "未"}选择任意版本的【${condition.name}】`;
if (condition.type == "skills") { if (condition.type == "skills") {
+4 -2
View File
@@ -39,6 +39,8 @@
手牌 UI 子扩展没有单独关闭开关;实现边界、日志位置和验证结果见 手牌 UI 子扩展没有单独关闭开关;实现边界、日志位置和验证结果见
[手牌 UI 子扩展说明](docs/ui-hand-subextension.md)。 [手牌 UI 子扩展说明](docs/ui-hand-subextension.md)。
本机翻译、事件插图、药水及其他图集的位置见 [STS2 素材路径对照](docs/sts2-asset-paths.md)。
战后技能清理只针对本场角色。`fixed` / `superCharlotte` 的纯元数据技能 战后技能清理只针对本场角色。`fixed` / `superCharlotte` 的纯元数据技能
保留在即将销毁的角色上,不阻断结算;含触发器、规则修正、标记清理或 保留在即将销毁的角色上,不阻断结算;含触发器、规则修正、标记清理或
释放回调的技能在整角色销毁时正常卸载,等待回调完成。公共技能定义及 释放回调的技能在整角色销毁时正常卸载,等待回调完成。公共技能定义及
@@ -62,7 +64,7 @@
PC 和安卓客户端的完整对局验证。 PC 和安卓客户端的完整对局验证。
梦三【杀】消耗 1 费用,基础伤害为 6;其他锦囊的基础伤害仍为 4。 梦三【杀】消耗 1 费用,基础伤害为 6;其他锦囊的基础伤害仍为 4。
【重杀】(`mengsan_zhongsha`)是普通战斗奖励池中的通用基本牌: 【重杀】(`mengsan_zhongsha`)是通用基本牌,只有允许通用卡的奖励才可从对应池抽到:
消耗 2 费用,对攻击范围内的一名其他角色直接造成 8 点伤害, 消耗 2 费用,对攻击范围内的一名其他角色直接造成 8 点伤害,
然后给予存活目标 2 层易伤,每回合使用次数不限。 然后给予存活目标 2 层易伤,每回合使用次数不限。
易伤沿用既有规则:受到攻击伤害增加 50%(向上取整), 易伤沿用既有规则:受到攻击伤害增加 50%(向上取整),
@@ -71,6 +73,6 @@ PC 和安卓客户端的完整对局验证。
强化规则集中在 `cards/upgrades.js`,未配置的牌不可强化。 强化规则集中在 `cards/upgrades.js`,未配置的牌不可强化。
【杀】最多强化一次,伤害由 6 变为 9;【重杀】最多强化一次, 【杀】最多强化一次,伤害由 6 变为 9;【重杀】最多强化一次,
伤害由 8 变为 10,易伤由 2 层变为 3 层,费用均不变。 伤害由 8 变为 10,易伤由 2 层变为 3 层,费用均不变。
随机强化只选尚未满级、可强化且没有“永恒”词缀的牌。 随机强化只选有强化规则且尚未满级的牌。「永恒」限制移除和变化,仍可强化。
没有候选牌时禁用休息节点的磨砺,并从随机奖励中排除强化。 没有候选牌时禁用休息节点的磨砺,并从随机奖励中排除强化。
旧存档不重写:历史超限等级按当前上限结算,未配置牌的历史等级不生效。 旧存档不重写:历史超限等级按当前上限结算,未配置牌的历史等级不生效。
+1 -1
View File
@@ -1,6 +1,6 @@
# 梦三卡牌立绘规范 # 梦三卡牌立绘规范
2026-10-03:铁甲战士94张已全部接入:新增67、沿用27、暂缓0;另有衍生巨石。68张新增完整5:7水墨立绘使用 `mengsan_ic_*.png`。刘备专属牌组与空无色牌组已分目录和牌组类,详情见 [制作清单](../../../../../sts2-card-capture-20261003/generation/铁甲战士制作清单.md)、[全部立绘预览](../../../../../sts2-card-capture-20261003/generation/铁甲战士立绘预览.md) 及 [牌组结构](../../cards/packs/README.md)。尚未进行实机验收。 2026-10-03:刘备94张已全部接入:新增67、沿用27、暂缓0;另有衍生巨石。68张新增完整5:7水墨立绘使用 `mengsan_ic_*.png`。刘备专属牌组与空无色牌组已分目录和牌组类,详情见 [制作清单](../../../../../sts2-card-capture-20261003/generation/刘备制作清单.md)、[全部立绘预览](../../../../../sts2-card-capture-20261003/generation/刘备立绘预览.md) 及 [牌组结构](../../cards/packs/README.md)。尚未进行实机验收。
用户于 2026-10-02 指定以截图 `C:\Users\Diuse\Downloads\Ai\49.png` 中“防御”为同系列基准。 用户于 2026-10-02 指定以截图 `C:\Users\Diuse\Downloads\Ai\49.png` 中“防御”为同系列基准。
Binary file not shown.

After

Width:  |  Height:  |  Size: 785 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+1 -1
View File
@@ -3284,7 +3284,7 @@
} }
], ],
"notes": [ "notes": [
"美味饼干使用铁甲战士版本;四个其他角色版本仍保留在来源图集中。", "美味饼干使用刘备版本;四个其他角色版本仍保留在来源图集中。",
"遗忘之魂映射 lost_soul.png;布质果实映射 looming_fruit_2.png。", "遗忘之魂映射 lost_soul.png;布质果实映射 looming_fruit_2.png。",
"图标是用户提供的原游戏拆包图片,逐字节复制,未重绘。" "图标是用户提供的原游戏拆包图片,逐字节复制,未重绘。"
] ]
Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

+427
View File
@@ -0,0 +1,427 @@
{
"sourceVersion": "v0.111.0",
"source": "images/atlases/power_atlas.sprites",
"entries": [
{
"name": "strength_power.png",
"bytes": 3435,
"width": 64,
"height": 64,
"sha256": "6584c67190bfd47255c0f333bfb7f2ab52720209d94ce9324a30b0a8e638d7ff"
},
{
"name": "ringing_power.png",
"bytes": 5038,
"width": 64,
"height": 64,
"sha256": "c4a3d09f976788bca91d3a5011fc0f05c3f981eaa3482a33c31a0a661705f60c"
},
{
"name": "slow_power.png",
"bytes": 5762,
"width": 64,
"height": 63,
"sha256": "b39d7af28b0fdcd773a44577a6635c8b23dc03bff6280de841dc831fe6c601b0"
},
{
"name": "the_bomb_power.png",
"bytes": 4421,
"width": 64,
"height": 64,
"sha256": "862f05ed56d4d0ebd60afd777162d23fb4744991f6cace9e43640bee29f5db58"
},
{
"name": "vigor_power.png",
"bytes": 5912,
"width": 64,
"height": 64,
"sha256": "551b7b93d139f30cf190887ea3eef197aa693a7a78e67aef48ef2b582b1532b3"
},
{
"name": "draw_cards_next_turn_power.png",
"bytes": 3178,
"width": 58,
"height": 64,
"sha256": "c0a8c2781aff2e5c6bf73a2dd2938ef820a5fde651757954f5219113cf88ea22"
},
{
"name": "energy_next_turn_power.png",
"bytes": 2896,
"width": 43,
"height": 64,
"sha256": "511314b05d5c223613b6d654816f7feb5607e7c40b0487207c5b1a75f5002f67"
},
{
"name": "block_next_turn_power.png",
"bytes": 4275,
"width": 64,
"height": 64,
"sha256": "fd5c75f11f5719f9ffb52ceda3640cbc684ec178e783a3ceb2774548df1615f8"
},
{
"name": "vulnerable_power.png",
"bytes": 3725,
"width": 64,
"height": 64,
"sha256": "1b9a9336dd7828cb1fb61b119ab765d3c713ce4e0e98bdbee7211724fe5c78b6"
},
{
"name": "weak_power.png",
"bytes": 4738,
"width": 64,
"height": 64,
"sha256": "f8f4277c9fd848600a503b8d377bf9e83b4eaa06fa27f8f82ebefcfbd9714763"
},
{
"name": "frail_power.png",
"bytes": 3945,
"width": 63,
"height": 64,
"sha256": "d772bf035190a650a9be735282c77ee9ab2276a775a9e7079710c8b09c4a4619"
},
{
"name": "artifact_power.png",
"bytes": 5717,
"width": 64,
"height": 64,
"sha256": "2346d2425fd40cc5f8532df0f97afa9bbb782fa649a09bcb014fe6932e845f90"
},
{
"name": "constrict_power.png",
"bytes": 4543,
"width": 64,
"height": 64,
"sha256": "5f29c6b3f8955e275d98f9ed47a893c1214a7bfb820ce1c696c9f16fddcbd8b4"
},
{
"name": "tangled_power.png",
"bytes": 5754,
"width": 64,
"height": 64,
"sha256": "3d4d4686876ed0265f26696ab2d0ebde8366b0537994bf223bc388a0f104ec5e"
},
{
"name": "shrink_power.png",
"bytes": 4258,
"width": 64,
"height": 64,
"sha256": "b19a0d045135bcc6cfa00f2fb11be78dba68f16ecc12f2ca8474caa9327c05dd"
},
{
"name": "plow_power.png",
"bytes": 5865,
"width": 64,
"height": 64,
"sha256": "dc300ee907b06d300bcd01f2c2784cc06c761796206a090e1a94f0cecfa95a31"
},
{
"name": "slippery_power.png",
"bytes": 4722,
"width": 64,
"height": 64,
"sha256": "06b4ac80cbf1f70c625be827047be79302f72c018cf8368bfb313a27744e568b"
},
{
"name": "territorial_power.png",
"bytes": 3829,
"width": 64,
"height": 64,
"sha256": "cf1b1d401a6fd45dbb1f3eda64049edf8cdf7e91a55f3aaf7a10f138d54699dd"
},
{
"name": "infested_power.png",
"bytes": 3554,
"width": 64,
"height": 50,
"sha256": "d6cd52278e0444a8f65fdc7d3c19b7ff9dc7067e2c1d21509f891238bae234f7"
},
{
"name": "demon_form_power.png",
"bytes": 4728,
"width": 64,
"height": 64,
"sha256": "2e183f449fc07c30356d181a1b1a5814aad2ef077598642a35899f4d8cdc3bc3"
},
{
"name": "demesne_power.png",
"bytes": 5817,
"width": 64,
"height": 63,
"sha256": "554fff2e62aaeaee7b1c9cc1c8283257139ce901a5191c39d143b757cd865e96"
},
{
"name": "crimson_mantle_power.png",
"bytes": 4706,
"width": 64,
"height": 61,
"sha256": "7fdeb8f49fb6bfb3ef5f4ff52ec8bcad18bf8fd1e0357d9378ac657124cb8e23"
},
{
"name": "inferno_power.png",
"bytes": 5996,
"width": 64,
"height": 64,
"sha256": "3775622f4ad2419ed897bb90e56d793fb383c1810bae514d3e9c17eaff53fe69"
},
{
"name": "rupture_power.png",
"bytes": 3897,
"width": 64,
"height": 64,
"sha256": "101e3b473ec6d6b565aa94ed5946840f6c013f28e62f3f0961106c2c8cd54d95"
},
{
"name": "vicious_power.png",
"bytes": 3247,
"width": 64,
"height": 62,
"sha256": "4b90144a9254bb155b1cce8180d91d919af99566b8841e2135eb86880ff0765a"
},
{
"name": "rage_power.png",
"bytes": 4937,
"width": 64,
"height": 64,
"sha256": "a53721daa6996403e61e871aca8152ae50372c3255e509f1a6d4d99bbfd01d02"
},
{
"name": "flame_barrier_power.png",
"bytes": 4786,
"width": 64,
"height": 64,
"sha256": "48a7543a8f87c8b360a3a23a67df23b51b4a54eb6f7747cc27c9f4a230610cdf"
},
{
"name": "colossus_power.png",
"bytes": 3875,
"width": 64,
"height": 64,
"sha256": "cfe2be38931e40856d5388b6e3b8c86a7ee2de6688ab69294f348d383e1dfb7d"
},
{
"name": "free_attack_power.png",
"bytes": 4223,
"width": 61,
"height": 64,
"sha256": "5bc861f0693c0b73e95be4a2faebd8d81441e1011004f7a0ff71ced6f913573b"
},
{
"name": "no_draw_power.png",
"bytes": 4335,
"width": 58,
"height": 64,
"sha256": "7f8ac6cae6cc5611d7e8217619de9cc87dcef245e19bc70107bc299da790bed0"
},
{
"name": "no_energy_gain_power.png",
"bytes": 6746,
"width": 64,
"height": 64,
"sha256": "c31490f89b758bd63564581218ede73d89438d833ece8d8da5a8f12f773a345d"
},
{
"name": "one_two_punch_power.png",
"bytes": 3986,
"width": 64,
"height": 64,
"sha256": "458f05559a4efcd79bcbe0fb7e1d9aa4ae47d3a0c533f11e1a72ed3e67aec78b"
},
{
"name": "plating_power.png",
"bytes": 5036,
"width": 64,
"height": 64,
"sha256": "10a27dd11231338120274c8b132ec82187b2cc00f81d0f7fa94e3637f4506b67"
},
{
"name": "feel_no_pain_power.png",
"bytes": 4244,
"width": 64,
"height": 64,
"sha256": "92359b3a53e10600e864a502291be3b50cf00c1792dbf5203e8eaac09fab126e"
},
{
"name": "dark_embrace_power.png",
"bytes": 5545,
"width": 64,
"height": 64,
"sha256": "f60e5524cf10b4da15f1b788a58e65e2765aa928988100d6fcb6012829520d99"
},
{
"name": "juggling_power.png",
"bytes": 4512,
"width": 64,
"height": 64,
"sha256": "583f560f68a3b9df4ef60376b919ff51d85d862076f0ce09848644f3171d51af"
},
{
"name": "stampede_power.png",
"bytes": 3357,
"width": 64,
"height": 64,
"sha256": "1aea977a121c451ef134581789f629dc61caba87b771e7bd684345baae573d03"
},
{
"name": "aggression_power.png",
"bytes": 4524,
"width": 64,
"height": 64,
"sha256": "9ec47f0a5eb259c1cc131b82e6bb9e22343df7f64c7375db7580eb326b6a97f3"
},
{
"name": "tank_power.png",
"bytes": 3191,
"width": 64,
"height": 64,
"sha256": "f8cfbc1bbf8832f4e83ffdf4172bfc37564c85d36a4a5c14d18c1ab60bd1b76e"
},
{
"name": "hellraiser_power.png",
"bytes": 4296,
"width": 64,
"height": 64,
"sha256": "38ca8fc4c727fb936d057a78bfb9461a39b0266dd794d062e9d278505821efc6"
},
{
"name": "unmovable_power.png",
"bytes": 4784,
"width": 64,
"height": 64,
"sha256": "f99e4f21fcfd6e57089d47e4bc4ed1cf1a813a759f76487c38852d66dc472a19"
},
{
"name": "juggernaut_power.png",
"bytes": 5096,
"width": 57,
"height": 64,
"sha256": "c0c9382989b31f246678d1d33ecb3f17f3b75a97aa9a752dd1f6551733d76112"
},
{
"name": "barricade_power.png",
"bytes": 2828,
"width": 64,
"height": 60,
"sha256": "1467ded14bfef8cdc15152e62a100ef7d3be85173ac5eea2f6960d4815d5c64c"
},
{
"name": "corruption_power.png",
"bytes": 4822,
"width": 64,
"height": 64,
"sha256": "8228d730978170f60d9c429136a395b3de59b5c98726912812f708ec803836eb"
},
{
"name": "dexterity_power.png",
"bytes": 3073,
"width": 63,
"height": 64,
"sha256": "6609f4d04f4613ba0001b6254a793ddd2c25a60e66a320ff31ef6724ef15f20e"
},
{
"name": "no_block_power.png",
"bytes": 4592,
"width": 63,
"height": 64,
"sha256": "469f70ce5a86ea24751ef75461d20ec127014e16495ee23a86ca0255b4246d4b"
},
{
"name": "intangible_power.png",
"bytes": 4398,
"width": 64,
"height": 64,
"sha256": "0368e806c412ca290796c58e1e1a96e6d84bd5dda67f39249433e688006eaf1f"
},
{
"name": "the_gambit_power.png",
"bytes": 3051,
"width": 49,
"height": 64,
"sha256": "204284c28d48c60a8c73f7356bb3d5aa0fc8e4b44491cb1aec19717bb4f04784"
},
{
"name": "retain_hand_power.png",
"bytes": 4225,
"width": 64,
"height": 64,
"sha256": "a8ee3da12b0774ffc9bba33d6da7695afdfc9b7904d31b3229df077489541784"
},
{
"name": "panache_power.png",
"bytes": 3489,
"width": 55,
"height": 64,
"sha256": "61dd7bda14317085c4f6cb4ccecebc759b5468c5494d16fb1a2d78c5f3fd59e0"
},
{
"name": "fasten_power.png",
"bytes": 4680,
"width": 64,
"height": 64,
"sha256": "13518361d51775876bf4cde87e88cc4a9e63a5a1d14ba49388eb12d57404bbe7"
},
{
"name": "prep_time_power.png",
"bytes": 6445,
"width": 64,
"height": 63,
"sha256": "ce1698909dcb2e91bd67714c11f7c467ae083326b7f9f239751a4c202d50bf69"
},
{
"name": "automation_power.png",
"bytes": 4452,
"width": 64,
"height": 64,
"sha256": "c7b5b35579dc1b2ff209e4be54a1982381b1096c640a3c21bb5c9e6aeb86a08f"
},
{
"name": "curious_power.png",
"bytes": 4106,
"width": 57,
"height": 64,
"sha256": "77cb0e309fc148e2b2bb723fa5a227d4dc3c2503e22421b9d0e457fb3a85c7d7"
},
{
"name": "rolling_boulder_power.png",
"bytes": 4422,
"width": 64,
"height": 64,
"sha256": "53c820c23f09cd07d2b0e3bd00493bdaef81fbd09d05bf2d15485c3c1ef7e4a0"
},
{
"name": "nostalgia_power.png",
"bytes": 3856,
"width": 64,
"height": 64,
"sha256": "836674ba8a9e8d0ea2263e90944acdf7078dc1f6c835771650bfcf84825d84a4"
},
{
"name": "entropy_power.png",
"bytes": 4849,
"width": 64,
"height": 64,
"sha256": "5042bd71bd07fd605cba2c39677dd21df704439ed5d0ad9610f1102d8ed782ad"
},
{
"name": "beacon_of_hope_power.png",
"bytes": 5248,
"width": 64,
"height": 64,
"sha256": "0d33f9098425c3d740e699926809c0c7c9121cdd05e52508284a1e34d7b7bd8d"
},
{
"name": "mayhem_power.png",
"bytes": 5287,
"width": 64,
"height": 64,
"sha256": "354b3fe4b63c064cc96302d46b27829f6d51fd37e703aec15d53ed53a14e2d51"
},
{
"name": "calamity_power.png",
"bytes": 5331,
"width": 64,
"height": 64,
"sha256": "8d510b86daa72a8066729bc5d0a3943acf5c77903be69525f325b65607c7cdd7"
}
],
"missing": []
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

+9 -3
View File
@@ -1,5 +1,6 @@
// Candidate external coordinator. Finish callbacks return a boolean, NEVER a drain promise. // Candidate external coordinator. Finish callbacks return a boolean, NEVER a drain promise.
import { getDiagnostics } from "../../diagnostics/index.js"; import { getDiagnostics } from "../../diagnostics/index.js";
import { potionSlots } from "../potions/state.js";
const copy = value => JSON.parse(JSON.stringify(value)); const copy = value => JSON.parse(JSON.stringify(value));
export function createBattleFlow({settlement, chooseReward, chooseDefeat, showMap, showEnding, quiesce, releaseSkills = async () => {}, releaseBattle = () => {}, presentVictory = async () => {}}) { export function createBattleFlow({settlement, chooseReward, chooseDefeat, showMap, showEnding, quiesce, releaseSkills = async () => {}, releaseBattle = () => {}, presentVictory = async () => {}}) {
let state = "map", active = null, work = null, job = null, error = null; let state = "map", active = null, work = null, job = null, error = null;
@@ -37,10 +38,15 @@ export function createBattleFlow({settlement, chooseReward, chooseDefeat, showMa
elite: job.pending.elite, elite: job.pending.elite,
fixedRewards: copy(job.pending.fixedRewards || []), fixedRewards: copy(job.pending.fixedRewards || []),
rewardPackage: copy(job.pending.rewardPackage || null), rewardPackage: copy(job.pending.rewardPackage || null),
potionChoices: copy(job.pending.potionChoices || []),
potionSlots: potionSlots(job.pending.base.player),
}), false); }), false);
if (job.pending.outcome !== "defeat" && !job.pending.rewardPackage && if (job.pending.outcome !== "defeat" && !job.pending.rewardPackage) {
job.choiceId !== null && const rewardId = job.pending.potionChoices?.length ? job.choiceId?.rewardId : job.choiceId;
!job.pending.choices.some(c => c.id === job.choiceId && c.kind !== "gold")) throw new Error("Invalid reward selection"); if (rewardId !== null && !job.pending.choices.some(c => c.id === rewardId && c.kind !== "gold")) {
throw new Error("Invalid reward selection");
}
}
job.hasChoice = true; job.hasChoice = true;
} }
job.pending = await step("applyChoice", () => settlement.choose(job.input.run.runId, job.pending.id, job.choiceId)); job.pending = await step("applyChoice", () => settlement.choose(job.input.run.runId, job.pending.id, job.choiceId));
+6
View File
@@ -18,6 +18,12 @@ export function createBattleResources(session, {game, ui, _status}) {
const counters = {phaseNumber:game.phaseNumber, roundNumber:game.roundNumber}; const counters = {phaseNumber:game.phaseNumber, roundNumber:game.roundNumber};
game.phaseNumber = 0; game.roundNumber = 0; game.phaseNumber = 0; game.roundNumber = 0;
session.ownResource({}, () => { session.ownResource({}, () => {
// 弃牌展示用的副本在开战后才挂到场上,实体牌回收时不会带走它们。
const arenaBefore = before.get(ui.arena);
const thrown = new Set(Array.from(ui.arena?.children || []).filter(node =>
!arenaBefore?.has(node) && node.classList.contains("card") && node.classList.contains("thrown")));
for (const node of thrown) node.remove();
if (thrown.size && Array.isArray(ui.thrown)) ui.thrown = ui.thrown.filter(node => !thrown.has(node));
for (const card of cards) card.remove(); for (const card of cards) card.remove();
for (const [node,parent] of nodes) if (node.parentNode === parent) node.remove(); for (const [node,parent] of nodes) if (node.parentNode === parent) node.remove();
for (const {object,key,value,descriptor} of fields.slice().reverse()) { for (const {object,key,value,descriptor} of fields.slice().reverse()) {
+14 -4
View File
@@ -9,6 +9,7 @@ import { heldRelics } from "../relics/definitions.js";
import { getDiagnostics } from "../../diagnostics/index.js"; import { getDiagnostics } from "../../diagnostics/index.js";
import { prepareRewardPackage, applyRewardPackage } import { prepareRewardPackage, applyRewardPackage }
from "../progression/reward-package.js"; from "../progression/reward-package.js";
import { applyPotionReward, rollPotionReward, samplePotions } from "../potions/state.js";
const copy = value => JSON.parse(JSON.stringify(value)); const copy = value => JSON.parse(JSON.stringify(value));
const idFor = (run, node) => JSON.stringify([run.runId, run.actIndex, node.id]); const idFor = (run, node) => JSON.stringify([run.runId, run.actIndex, node.id]);
@@ -89,6 +90,9 @@ export function createBattleSettlement({
getRandomRewardChoices) : null; getRandomRewardChoices) : null;
item = {id, state:"awaitingChoice", nodeId:node.id, base, choices:copy(choices), fixedRewards:copy(fixedRewards), victoryDialogue:copy(encounter.victoryDialogue || []), boss:!!encounter.boss, elite, outcome, relicRecovery, bondGrowth}; item = {id, state:"awaitingChoice", nodeId:node.id, base, choices:copy(choices), fixedRewards:copy(fixedRewards), victoryDialogue:copy(encounter.victoryDialogue || []), boss:!!encounter.boss, elite, outcome, relicRecovery, bondGrowth};
item.rewardPackage = copy(rewardPackage); item.rewardPackage = copy(rewardPackage);
item.potionChoices = outcome !== "victory" ? []
: encounter.rewardPackage ? samplePotions(base, encounter.rewardPackage.potionChoices ?? 0)
: !encounter.boss && (encounter.tier === "normal" || elite) ? rollPotionReward(base, elite) : [];
diagnostics.info("prepared", { diagnostics.info("prepared", {
outcome, choices: choices.map(choice => choice.id), fixedRewards, outcome, choices: choices.map(choice => choice.id), fixedRewards,
expectedRevision: snapshot.revision, actualRevision: run.revision, expectedRevision: snapshot.revision, actualRevision: run.revision,
@@ -132,20 +136,26 @@ export function createBattleSettlement({
const sameChoice = item.rewardPackage const sameChoice = item.rewardPackage
? item.choiceId?.cardId === choiceId?.cardId && ? item.choiceId?.cardId === choiceId?.cardId &&
item.choiceId?.relicId === choiceId?.relicId item.choiceId?.relicId === choiceId?.relicId
: item.choiceId === choiceId; : item.potionChoices.length ? item.choiceId?.rewardId === choiceId?.rewardId
if (!sameChoice) throw new Error("Choice already locked"); : item.choiceId === choiceId;
if (!sameChoice || item.choiceId?.potion?.id !== choiceId?.potion?.id ||
item.choiceId?.potion?.replaceIndex !== choiceId?.potion?.replaceIndex) {
throw new Error("Choice already locked");
}
return copy(item); return copy(item);
} }
const result = copy(item.base); const result = copy(item.base);
let route = "defeat"; let route = "defeat";
if (item.outcome === "victory") { if (item.outcome === "victory") {
applyPotionReward(result.player, item.potionChoices, choiceId?.potion);
if (item.rewardPackage) { if (item.rewardPackage) {
applyRewardPackage(result, item.rewardPackage, choiceId, applyRewardPackage(result, item.rewardPackage, choiceId,
applyReward); applyReward);
} }
if (!item.rewardPackage) { if (!item.rewardPackage) {
const reward = item.choices.find(c => c.id === choiceId && c.kind !== "gold"); const rewardId = item.potionChoices.length ? choiceId?.rewardId : choiceId;
if (choiceId !== null && !reward) { const reward = item.choices.find(c => c.id === rewardId && c.kind !== "gold");
if (rewardId !== null && !reward) {
throw new Error("Choose one pending reward or skip"); throw new Error("Choose one pending reward or skip");
} }
// 结果只计算一次;保存失败后的重试不再次发放金币。 // 结果只计算一次;保存失败后的重试不再次发放金币。
+3 -2
View File
@@ -13,18 +13,19 @@ export function hasPendingDeathBlow(source) {
return pendingDeathBlows.has(source); return pendingDeathBlows.has(source);
} }
export async function beginDeathBlow(source, target, intent) { export async function beginDeathBlow(source, target, intent, battle) {
if (!isDeathBlowIntent(intent)) { if (!isDeathBlowIntent(intent)) {
throw new TypeError("濒死一击需要 death_blow 意图类型"); throw new TypeError("濒死一击需要 death_blow 意图类型");
} }
if (attackHitCount(intent) !== 1) { if (attackHitCount(intent) !== 1) {
throw new RangeError("濒死一击只能造成一次伤害"); throw new RangeError("濒死一击只能造成一次伤害");
} }
const damage = outgoingAttackDamage(intent, source); const damage = outgoingAttackDamage(intent, source, battle);
if (!source?.isAlive() || !target?.isAlive()) return false; if (!source?.isAlive() || !target?.isAlive()) return false;
const hit = target.damage(damage, source); const hit = target.damage(damage, source);
hit.mengsanAttack_shuying = true; hit.mengsanAttack_shuying = true;
hit.mengsanScriptedSkill_shuying = true;
await hit; await hit;
if (source.isAlive()) pendingDeathBlows.add(source); if (source.isAlive()) pendingDeathBlows.add(source);
return true; return true;
+17 -10
View File
@@ -1,6 +1,8 @@
import { slowAttackDamage } from "../monsters/effigy-slow.js"; import { slowAttackDamage } from "../monsters/effigy-slow.js";
import { shrinkAttackDamage } from "../monsters/shrinker-status.js"; import { shrinkAttackDamage } from "../monsters/shrinker-status.js";
import { ironcladStrengthPenalty } from "../cards/ironclad-hooks.js"; import { applyBodyguardDamage, ironcladStrengthPenalty } from "../cards/ironclad-hooks.js";
import { applyInterceptDamage, applyIntangibleDamage } from "../cards/shared-hooks.js";
import { campEnemy } from "./camps.js";
export function attackHitCount(intent) { export function attackHitCount(intent) {
const hits = intent.hits ?? 1; const hits = intent.hits ?? 1;
@@ -10,23 +12,28 @@ export function attackHitCount(intent) {
return hits; return hits;
} }
export function outgoingAttackDamage(intent, source) { export function applyAttackWeakness(damage, source, owner, relics) {
if (!(source?.storage?.mengsanWeak_shuying > 0)) return damage;
const multiplier = campEnemy(owner, source) && relics?.has("paper_krane") ? 0.6 : 0.75;
return Math.floor(damage * multiplier);
}
export function outgoingAttackDamage(intent, source, battle) {
if (!Number.isInteger(intent.damage) || intent.damage < 0) { if (!Number.isInteger(intent.damage) || intent.damage < 0) {
throw new RangeError("预测伤害必须是非负整数"); throw new RangeError("预测伤害必须是非负整数");
} }
const storedStrength = source?.storage?.mengsanStrength_shuying; const storedStrength = source?.storage?.mengsanStrength_shuying;
const strength = Number.isInteger(storedStrength) ? storedStrength : 0; const strength = Number.isInteger(storedStrength) ? storedStrength : 0;
let damage = Math.max(0, intent.damage + strength - ironcladStrengthPenalty(source)); const damage = Math.max(0, intent.damage + strength - ironcladStrengthPenalty(source));
if (source?.storage?.mengsanWeak_shuying > 0) { return shrinkAttackDamage(applyAttackWeakness(damage, source, battle?.owner, battle?.relics), source);
damage = Math.floor(damage * 0.75);
}
return shrinkAttackDamage(damage, source);
} }
export function previewAttackDamage(intent, source, target) { export function previewAttackDamage(intent, source, target, battle) {
let damage = outgoingAttackDamage(intent, source); let damage = outgoingAttackDamage(intent, source, battle);
if (target?.storage?.mengsanVulnerable_shuying > 0) { if (target?.storage?.mengsanVulnerable_shuying > 0) {
damage = Math.ceil(damage * 1.5); damage = Math.ceil(damage * 1.5);
} }
return slowAttackDamage(damage, target); damage = applyInterceptDamage(damage, source, target, battle?.players);
damage = applyBodyguardDamage(damage, source, target, battle?.players);
return applyIntangibleDamage(slowAttackDamage(damage, target), target);
} }
+2 -2
View File
@@ -20,14 +20,14 @@ export function createIntentExecutor(game, getActiveBattle) {
if (!active(source)) break; if (!active(source)) break;
if (!target.isAlive()) continue; if (!target.isAlive()) continue;
if (isDeathBlowIntent(move)) { if (isDeathBlowIntent(move)) {
await beginDeathBlow(source, target, move); await beginDeathBlow(source, target, move, getActiveBattle());
continue; continue;
} }
if (move.damage != null) { if (move.damage != null) {
for (let hitIndex = 0; hitIndex < attackHitCount(move); hitIndex++) { for (let hitIndex = 0; hitIndex < attackHitCount(move); hitIndex++) {
if (!target.isAlive() || !active(source)) break; if (!target.isAlive() || !active(source)) break;
const hit = target.damage( const hit = target.damage(
outgoingAttackDamage(move, source), source); outgoingAttackDamage(move, source, getActiveBattle()), source);
hit.mengsanAttack_shuying = true; hit.mengsanAttack_shuying = true;
hit.mengsanScriptedSkill_shuying = true; hit.mengsanScriptedSkill_shuying = true;
await hit; await hit;
+26
View File
@@ -0,0 +1,26 @@
// Display-only readers. Entries belong to a battle session, never to the run/save.
const sources = new WeakMap();
export function bindCombatStatusSource(player, session, id, read) {
if (!player || !session?.active || typeof read !== 'function') return;
let group = sources.get(player);
if (!group) sources.set(player, group = new Map());
const entry = { session, read };
group.set(id, entry);
session.ownResource(entry, () => {
if (group.get(id) !== entry) return;
group.delete(id);
if (!group.size && sources.get(player) === group) sources.delete(player);
});
}
export function readCombatStatusSources(player, session) {
if (!session?.active) return [];
const result = [];
for (const [id, entry] of sources.get(player) || []) {
if (entry.session !== session) continue;
const state = entry.read();
if (state) result.push({ id, state });
}
return result;
}
+2 -1
View File
@@ -3,6 +3,7 @@
import { cardPackDefinitions } from "./packs/data.js"; import { cardPackDefinitions } from "./packs/data.js";
import { cardTypes, cardRarityLabels } from "./classification-types.js"; import { cardTypes, cardRarityLabels } from "./classification-types.js";
import { liubeiCardTraits } from "./packs/liubei/traits.js"; import { liubeiCardTraits } from "./packs/liubei/traits.js";
import { isRetiredDeckCard } from "./retired-cards.js";
const definitions = [ const definitions = [
...cardPackDefinitions, ...cardPackDefinitions,
{ name: "sha", category: "damage", owner: null, ...liubeiCardTraits.sha }, { name: "sha", category: "damage", owner: null, ...liubeiCardTraits.sha },
@@ -42,6 +43,6 @@ export const cardDefinitions = createCardRegistry(definitions);
export function canAcquireCard(character, name, registry = cardDefinitions) { export function canAcquireCard(character, name, registry = cardDefinitions) {
const definition = Object.hasOwn(registry, name) ? registry[name] : null; const definition = Object.hasOwn(registry, name) ? registry[name] : null;
return !!definition && !definition.generatedOnly && return !!definition && !definition.generatedOnly && !isRetiredDeckCard(character, name) &&
(definition.owner === null || definition.owner === character); (definition.owner === null || definition.owner === character);
} }

Some files were not shown because too many files have changed in this diff Show More