mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-11-24 22:16:30 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f2d9857de |
@@ -20,7 +20,6 @@ tools/*.mjs
|
||||
!/tools/test_mengsan_zip_install.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/
|
||||
|
||||
Vendored
+6
-6
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"version": "2.0.2.3-rc.11",
|
||||
"generated_at": "2026-11-24T06:10:42.618424+00:00",
|
||||
"version": "2.0.2.3-rc.10",
|
||||
"generated_at": "2026-11-24T04:08:42.242236+00:00",
|
||||
"algorithm": "sha256",
|
||||
"update_channels": true,
|
||||
"file_count": 288,
|
||||
"size_bytes": 48059903,
|
||||
"folder_sha256": "d9c01ad655f662ee47b2c946e5d5d03e2531059eac1e5d69bace975366ab9a8d",
|
||||
"folder_sha256": "db468919dfb9a06552c4b6122a05f2af4967be3604d3b5c6613ffcf24f28e335",
|
||||
"core": [
|
||||
"extension.js",
|
||||
"menu.js",
|
||||
@@ -439,7 +439,7 @@
|
||||
},
|
||||
"extension.js": {
|
||||
"size": 15732,
|
||||
"sha256": "01bedc58c3acb22f3628ce8cad93795dd6e51488f5bbe93121934f48e4a9a384"
|
||||
"sha256": "4378ce1123d26ce777e01c0a159f8b0895529a1d2f6941567388a3f447e150bc"
|
||||
},
|
||||
"function.js": {
|
||||
"size": 38588,
|
||||
@@ -1696,7 +1696,7 @@
|
||||
"extension.js": {
|
||||
"type": "file",
|
||||
"size": 15732,
|
||||
"sha256": "01bedc58c3acb22f3628ce8cad93795dd6e51488f5bbe93121934f48e4a9a384"
|
||||
"sha256": "4378ce1123d26ce777e01c0a159f8b0895529a1d2f6941567388a3f447e150bc"
|
||||
},
|
||||
"function.js": {
|
||||
"type": "file",
|
||||
@@ -3116,7 +3116,7 @@
|
||||
"entry": "mengsan/register.js",
|
||||
"manifest": "dist/modules/mengsan.json",
|
||||
"file_count": 846,
|
||||
"size_bytes": 150439572,
|
||||
"size_bytes": 150436158,
|
||||
"legacy_manifest": "dist/modules/mengsan.legacy.json"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+52
-52
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"version": "2.0.2.3-rc.11",
|
||||
"generated_at": "2026-11-24T06:10:42.620435+00:00",
|
||||
"version": "2.0.2.3-rc.10",
|
||||
"generated_at": "2026-11-24T04:08:42.243037+00:00",
|
||||
"algorithm": "sha256",
|
||||
"update_channels": true,
|
||||
"file_count": 846,
|
||||
"size_bytes": 150439572,
|
||||
"folder_sha256": "cc14fd5cb299151caf8e9f2527e49a11a5e49690ba17207d23127d84d0ab3627",
|
||||
"size_bytes": 150436158,
|
||||
"folder_sha256": "9babf97d7834d9abb150995481290e0508fb3fe8b4ea4ea5ffff5cb0d5225525",
|
||||
"core": [
|
||||
"mengsan/register.js"
|
||||
],
|
||||
@@ -4104,8 +4104,8 @@
|
||||
"sha256": "784641ea207432c3fe9e55b83d95a7976490521bbfb736d01973f7adaee749d1"
|
||||
},
|
||||
"mengsan/ui/card-library.js": {
|
||||
"size": 22146,
|
||||
"sha256": "029789405e732ff01d537fd7826980c9a9f2c07c95bde087c0e49478de0bd7b9"
|
||||
"size": 22135,
|
||||
"sha256": "0756e87b0af8e71c177a7be9ff175d645ecbf2dfaad36b5852cad82a4b60bba3"
|
||||
},
|
||||
"mengsan/ui/character-select.css": {
|
||||
"size": 6060,
|
||||
@@ -4116,20 +4116,20 @@
|
||||
"sha256": "81073b10ae63ac921c1eed851127c64fbe6ca4407d4b9b41c3a24b6373cb1e87"
|
||||
},
|
||||
"mengsan/ui/dialogue.js": {
|
||||
"size": 7790,
|
||||
"sha256": "c138f465d52b04e27402b7b440f57631b36199d690d044fc48dd0640da689d51"
|
||||
"size": 7649,
|
||||
"sha256": "a405f315270c24cdb2c53ba4e211a3fd5bf9bb582335d5dbf910adb5622deac6"
|
||||
},
|
||||
"mengsan/ui/energy-display.js": {
|
||||
"size": 498,
|
||||
"sha256": "b12157ac3008c0e63fb384fe5fefe54964b86436652c73670f6a4c4faa4ad1da"
|
||||
},
|
||||
"mengsan/ui/flow-ui.js": {
|
||||
"size": 3440,
|
||||
"sha256": "5e889fdf671ff031fc661e148a13812cebb0fbcacaa81064589a8caf17e06efe"
|
||||
"size": 3394,
|
||||
"sha256": "9070b108e2342a89b545c6d7c19af140431c343fc4e28e344e72f3fdc524f3b4"
|
||||
},
|
||||
"mengsan/ui/gm-manager.js": {
|
||||
"size": 9924,
|
||||
"sha256": "eefbcaa7fb4ddc68991b9d77bb1be253c4278a9008d171e85aac84b414b04455"
|
||||
"size": 9913,
|
||||
"sha256": "bdefd7704e499a25e7a02de26c6487dff55c15f2723089c8fd8d85155d9e2afc"
|
||||
},
|
||||
"mengsan/ui/hand/adapter.js": {
|
||||
"size": 935,
|
||||
@@ -4148,8 +4148,8 @@
|
||||
"sha256": "4b804c1d42c6c1171d42a37136fcb903bfb3128beae6a357b52ef9cede54908f"
|
||||
},
|
||||
"mengsan/ui/hand/input.js": {
|
||||
"size": 13480,
|
||||
"sha256": "ca1eb00598b1135cdc1b937642eaffdf5858b5e8e4678dd12bf4e384556a5372"
|
||||
"size": 13600,
|
||||
"sha256": "2a2f78bfa84639c0cf78c4b8e124d79c1405de8b82f99fd5fdd240a760fe347b"
|
||||
},
|
||||
"mengsan/ui/hand/overlays.js": {
|
||||
"size": 3970,
|
||||
@@ -4160,20 +4160,20 @@
|
||||
"sha256": "b958c78088e903c5ec09537f2d3b2241fe51a9067604e360b560c02fdac30904"
|
||||
},
|
||||
"mengsan/ui/hud/index.js": {
|
||||
"size": 28411,
|
||||
"sha256": "fc9ea1815d75a6ad950a6f87a5af38cccebe05b032f3dde69dde0f7f13a9d8a6"
|
||||
"size": 27135,
|
||||
"sha256": "c91b29c61227e21f3303e0a9368645c7215e6794dce5f62651db0433b773a3d0"
|
||||
},
|
||||
"mengsan/ui/hud/overlays.js": {
|
||||
"size": 11817,
|
||||
"sha256": "1ed2cc37a4afddfcfff41bc7e1a94422855ead2f5f1b38a5d008eaa474d370b0"
|
||||
"size": 11789,
|
||||
"sha256": "c98e2956fbb2a32d4bb2c79350f8c530c4760719650d1f095e5a177c7825b6c1"
|
||||
},
|
||||
"mengsan/ui/hud/status-model.js": {
|
||||
"size": 11300,
|
||||
"sha256": "b18ae987f451453f77a397093cd57d8a8bd1fc03dbe845e3fc5a943da0a8ff04"
|
||||
},
|
||||
"mengsan/ui/hud/style.css": {
|
||||
"size": 19961,
|
||||
"sha256": "3313acbd5e99d3346cfb1ce95bad5274752da35a4e7fb6b4ff0fa92e2ad00907"
|
||||
"size": 20395,
|
||||
"sha256": "05e40d81cf81731cc2c0dc89ec876229d5a1f93100b69af38fee001927433626"
|
||||
},
|
||||
"mengsan/ui/intent-display.js": {
|
||||
"size": 13341,
|
||||
@@ -4184,12 +4184,12 @@
|
||||
"sha256": "6fc56c6c084508a39d801521a103f8c39eea90eb895f47a78924997241d9f932"
|
||||
},
|
||||
"mengsan/ui/map/renderer.js": {
|
||||
"size": 27005,
|
||||
"sha256": "9ec156a410df674c80b987b243fce399415d8acc02db43d0018b56882d335609"
|
||||
"size": 26905,
|
||||
"sha256": "12c0755f38c0213093c8fd5b29f79fbfc721fed9a9d756bf12ee497363c05b26"
|
||||
},
|
||||
"mengsan/ui/navigation.js": {
|
||||
"size": 11328,
|
||||
"sha256": "6494765969d7e9f27bd03af778d4713fe4c361643d547fc0ce44975074ca67e7"
|
||||
"size": 11317,
|
||||
"sha256": "62dc4cd8093b931c91b42070f36f6a7f54493cf13e55c682b8ef5c2bb8495be7"
|
||||
},
|
||||
"mengsan/ui/potions.css": {
|
||||
"size": 2886,
|
||||
@@ -4208,8 +4208,8 @@
|
||||
"sha256": "c2b500560d9cbb506e1f976f1449d2dd1f01021487606cd13efd64d6ff46604b"
|
||||
},
|
||||
"mengsan/ui/relics.js": {
|
||||
"size": 4574,
|
||||
"sha256": "cecca4fb42dcaf596ba2645986a2244f51da56215d1e9583251f43691c0bb6c8"
|
||||
"size": 4563,
|
||||
"sha256": "2673556941004981a443cb7dc4d93dad23ae64ac1bb4ff471b95950429625608"
|
||||
},
|
||||
"mengsan/ui/rest-ui.js": {
|
||||
"size": 3997,
|
||||
@@ -4236,8 +4236,8 @@
|
||||
"sha256": "e9cd1c36d28faf8790d67e33bb3487c76eb508103277899fc5201b49d2155abf"
|
||||
},
|
||||
"mengsan/ui/style.css": {
|
||||
"size": 84814,
|
||||
"sha256": "82a31f514ee896cb1c94fd4a2998a2c9e53b49d13a7155028dc72deded7c6c26"
|
||||
"size": 82481,
|
||||
"sha256": "a382ac4a62389b0e2b5d8454ca0bb278f8c0019f8f3af6dcf18b8113e7af4fd2"
|
||||
},
|
||||
"mengsan/ui/virtual-card-grid.js": {
|
||||
"size": 4820,
|
||||
@@ -8456,8 +8456,8 @@
|
||||
},
|
||||
"card-library.js": {
|
||||
"type": "file",
|
||||
"size": 22146,
|
||||
"sha256": "029789405e732ff01d537fd7826980c9a9f2c07c95bde087c0e49478de0bd7b9"
|
||||
"size": 22135,
|
||||
"sha256": "0756e87b0af8e71c177a7be9ff175d645ecbf2dfaad36b5852cad82a4b60bba3"
|
||||
},
|
||||
"character-select.css": {
|
||||
"type": "file",
|
||||
@@ -8471,8 +8471,8 @@
|
||||
},
|
||||
"dialogue.js": {
|
||||
"type": "file",
|
||||
"size": 7790,
|
||||
"sha256": "c138f465d52b04e27402b7b440f57631b36199d690d044fc48dd0640da689d51"
|
||||
"size": 7649,
|
||||
"sha256": "a405f315270c24cdb2c53ba4e211a3fd5bf9bb582335d5dbf910adb5622deac6"
|
||||
},
|
||||
"energy-display.js": {
|
||||
"type": "file",
|
||||
@@ -8481,13 +8481,13 @@
|
||||
},
|
||||
"flow-ui.js": {
|
||||
"type": "file",
|
||||
"size": 3440,
|
||||
"sha256": "5e889fdf671ff031fc661e148a13812cebb0fbcacaa81064589a8caf17e06efe"
|
||||
"size": 3394,
|
||||
"sha256": "9070b108e2342a89b545c6d7c19af140431c343fc4e28e344e72f3fdc524f3b4"
|
||||
},
|
||||
"gm-manager.js": {
|
||||
"type": "file",
|
||||
"size": 9924,
|
||||
"sha256": "eefbcaa7fb4ddc68991b9d77bb1be253c4278a9008d171e85aac84b414b04455"
|
||||
"size": 9913,
|
||||
"sha256": "bdefd7704e499a25e7a02de26c6487dff55c15f2723089c8fd8d85155d9e2afc"
|
||||
},
|
||||
"hand": {
|
||||
"type": "directory",
|
||||
@@ -8514,8 +8514,8 @@
|
||||
},
|
||||
"input.js": {
|
||||
"type": "file",
|
||||
"size": 13480,
|
||||
"sha256": "ca1eb00598b1135cdc1b937642eaffdf5858b5e8e4678dd12bf4e384556a5372"
|
||||
"size": 13600,
|
||||
"sha256": "2a2f78bfa84639c0cf78c4b8e124d79c1405de8b82f99fd5fdd240a760fe347b"
|
||||
},
|
||||
"overlays.js": {
|
||||
"type": "file",
|
||||
@@ -8534,13 +8534,13 @@
|
||||
"children": {
|
||||
"index.js": {
|
||||
"type": "file",
|
||||
"size": 28411,
|
||||
"sha256": "fc9ea1815d75a6ad950a6f87a5af38cccebe05b032f3dde69dde0f7f13a9d8a6"
|
||||
"size": 27135,
|
||||
"sha256": "c91b29c61227e21f3303e0a9368645c7215e6794dce5f62651db0433b773a3d0"
|
||||
},
|
||||
"overlays.js": {
|
||||
"type": "file",
|
||||
"size": 11817,
|
||||
"sha256": "1ed2cc37a4afddfcfff41bc7e1a94422855ead2f5f1b38a5d008eaa474d370b0"
|
||||
"size": 11789,
|
||||
"sha256": "c98e2956fbb2a32d4bb2c79350f8c530c4760719650d1f095e5a177c7825b6c1"
|
||||
},
|
||||
"status-model.js": {
|
||||
"type": "file",
|
||||
@@ -8549,8 +8549,8 @@
|
||||
},
|
||||
"style.css": {
|
||||
"type": "file",
|
||||
"size": 19961,
|
||||
"sha256": "3313acbd5e99d3346cfb1ce95bad5274752da35a4e7fb6b4ff0fa92e2ad00907"
|
||||
"size": 20395,
|
||||
"sha256": "05e40d81cf81731cc2c0dc89ec876229d5a1f93100b69af38fee001927433626"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -8569,15 +8569,15 @@
|
||||
},
|
||||
"renderer.js": {
|
||||
"type": "file",
|
||||
"size": 27005,
|
||||
"sha256": "9ec156a410df674c80b987b243fce399415d8acc02db43d0018b56882d335609"
|
||||
"size": 26905,
|
||||
"sha256": "12c0755f38c0213093c8fd5b29f79fbfc721fed9a9d756bf12ee497363c05b26"
|
||||
}
|
||||
}
|
||||
},
|
||||
"navigation.js": {
|
||||
"type": "file",
|
||||
"size": 11328,
|
||||
"sha256": "6494765969d7e9f27bd03af778d4713fe4c361643d547fc0ce44975074ca67e7"
|
||||
"size": 11317,
|
||||
"sha256": "62dc4cd8093b931c91b42070f36f6a7f54493cf13e55c682b8ef5c2bb8495be7"
|
||||
},
|
||||
"potions.css": {
|
||||
"type": "file",
|
||||
@@ -8601,8 +8601,8 @@
|
||||
},
|
||||
"relics.js": {
|
||||
"type": "file",
|
||||
"size": 4574,
|
||||
"sha256": "cecca4fb42dcaf596ba2645986a2244f51da56215d1e9583251f43691c0bb6c8"
|
||||
"size": 4563,
|
||||
"sha256": "2673556941004981a443cb7dc4d93dad23ae64ac1bb4ff471b95950429625608"
|
||||
},
|
||||
"rest-ui.js": {
|
||||
"type": "file",
|
||||
@@ -8636,8 +8636,8 @@
|
||||
},
|
||||
"style.css": {
|
||||
"type": "file",
|
||||
"size": 84814,
|
||||
"sha256": "82a31f514ee896cb1c94fd4a2998a2c9e53b49d13a7155028dc72deded7c6c26"
|
||||
"size": 82481,
|
||||
"sha256": "a382ac4a62389b0e2b5d8454ca0bb278f8c0019f8f3af6dcf18b8113e7af4fd2"
|
||||
},
|
||||
"virtual-card-grid.js": {
|
||||
"type": "file",
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "2.0.2.3-rc.11",
|
||||
"version": "2.0.2.3-rc.10",
|
||||
"module_id": "mengsan",
|
||||
"snapshot": "legacy",
|
||||
"files": [
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
| 场景 | 操作与通过标准 |
|
||||
| --- | --- |
|
||||
| 触屏拖牌与目标连线 | 从手牌拖出一张【杀】并移动到可选敌人。线起点贴在拖动牌上缘中央,终点跟随触点,两端误差各不超过 2 CSS px。取消手势后线立即消失。对合法目标松手后拖线立即消失,原生提交只触发一次。完整对局中再检查提交后的出牌特效能指向实际目标。 |
|
||||
| 普通出牌布局与缩放 | 在主动出牌阶段检查手牌扇面、提示语和「确定/回合结束」按钮组。三者共用战场中线,误差不超过 2 CSS px。改变界面缩放后重新检查对齐和拖牌线两端。 |
|
||||
| 出牌响应布局与按钮交互 | 敌人出【杀】,选择【闪】,观察场上出牌副本、响应文字与「确定/取消」两键的整体边界。三者从上到下共用战场中线,横向中心误差不超过 2 CSS px,牌面、提示、按钮和选中手牌之间有可见间距。确认和取消分别可点击,响应结束后场上的牌恢复原生位置。 |
|
||||
| 弃牌时技能栏稳定 | 启用十周年 UI,进入需弃置两张手牌的场景并点选第一张。技能栏在重建的首帧起就不出现重复的药水按钮,普通技能仍可见,弃牌计数正常更新。 |
|
||||
| 战斗药水槽与计数信息 | 持有药水进入战斗。药水槽位于左上区域,可贴近轮数、时间及牌堆数量控件,各自的可见区域互不重叠。点按药水可打开详情,并能在可用阶段正常使用。 |
|
||||
@@ -19,10 +18,8 @@ $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%,核验普通出牌位置和拖牌线。出牌后的默认及金龙连线均检查端点,完整金龙贴图需在客户端核验。
|
||||
需要截图时,将 `HUD_ARTIFACTS` 指向已建立的临时目录。完整矩阵覆盖原生 UI、十周年 UI 的手杀、十周年和新杀风格,以及 1080×486、812×375、667×375,含 0.64 页面缩放和非整数像素比。各场景检查拖牌、出牌连线、响应和药水槽位置,启用十周年 UI 的场景另测弃牌时的技能栏重建。
|
||||
|
||||
## Android 实机复核
|
||||
|
||||
在本轮改动对应的 Android 客户端启用十周年 UI,使用该客户端当前启用的皮肤复核各场景,并记录十周年 UI 版本和皮肤。拖牌时分别观察松手前的拖线和松手后的出牌特效。响应用两次事件分别检查确认和取消。弃牌时观察点牌瞬间,检查原生计数面板与药水槽能同时看清并各自操作。实机结果单独记录,实机不可用时写明未验。
|
||||
|
||||
涉及地图、剧情、奖励、牌库、遗物或其他公共弹窗时,一并使用[梦三界面缩放回归清单](mengsan-ui-zoom.md)。
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# 梦三界面缩放回归清单
|
||||
|
||||
无名杀原生 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 风格,在常用倍率和一个较高倍率下复核受影响的操作。优先确认触屏地图滚动、剧情分支点按、较长内容滑动和弹窗关闭。报告逐项标注通过、失败或未验。
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { configureDiagnostics } from "./diagnostics/index.js";
|
||||
|
||||
export const type = "extension";
|
||||
export let shuYing = new Object();
|
||||
const shuYingLocalVersion = "2.0.2.3-rc.11";
|
||||
const shuYingLocalVersion = "2.0.2.3-rc.10";
|
||||
|
||||
shuYing.name = "术樱包";
|
||||
shuYing.editable = false;
|
||||
|
||||
@@ -9,7 +9,6 @@ const { chromium } = require(packages ? path.join(packages, 'playwright') : 'pla
|
||||
const prefix = '/extension/' + encodeURIComponent('术樱包') + '/mengsan';
|
||||
const decadePrefix = '/extension/' + encodeURIComponent('十周年UI');
|
||||
const reviewOnly = process.env.HUD_REVIEW === '1';
|
||||
const journeyReview = process.env.UI_ZOOM_REVIEW === '1';
|
||||
const holdStatus = async (page, locator, pointerType = 'mouse') => {
|
||||
const box = await locator.boundingBox();
|
||||
const point = {x:box.x + box.width / 2,y:box.y + box.height / 2};
|
||||
@@ -47,18 +46,6 @@ async function checkMobileTargetLine(page, artifact) {
|
||||
await touch.send('Input.dispatchTouchEvent', {type:'touchMove',touchPoints:[end]});
|
||||
await aim.waitFor({state:'visible',timeout:2500});
|
||||
}
|
||||
// Exercise a WebView-style mismatch between the SVG matrix and its painted bounds.
|
||||
await page.evaluate(() => {
|
||||
const create = document.createElementNS.bind(document);
|
||||
document.createElementNS = (namespace,tag) => {
|
||||
const node = create(namespace,tag);
|
||||
if (tag === 'svg') {
|
||||
const screenMatrix = node.getScreenCTM.bind(node);
|
||||
node.getScreenCTM = () => screenMatrix()?.translate(-120,45);
|
||||
}
|
||||
return node;
|
||||
};
|
||||
});
|
||||
await drag();
|
||||
const geometry = await aim.evaluate((overlay, pointer) => {
|
||||
const card = window.card.getBoundingClientRect();
|
||||
@@ -74,7 +61,6 @@ async function checkMobileTargetLine(page, artifact) {
|
||||
return {origin,pointer,from:{x:left?bounds.left:bounds.right,y:up?bounds.top:bounds.bottom},
|
||||
to:{x:left?bounds.right:bounds.left,y:up?bounds.bottom:bounds.top}};
|
||||
},end);
|
||||
await page.evaluate(() => { delete document.createElementNS; });
|
||||
if (artifact) await page.screenshot({path:artifact});
|
||||
await touch.send('Input.dispatchTouchEvent', {type:'touchCancel',touchPoints:[]});
|
||||
assert.equal(await aim.count(),0,'the target line disappears on touch cancellation');
|
||||
@@ -92,46 +78,6 @@ async function checkMobileTargetLine(page, artifact) {
|
||||
assert.equal(await page.evaluate(()=>game.isSubmitted()),before+1,'touch release still submits the valid target once');
|
||||
}
|
||||
|
||||
async function checkOrdinaryPlayCenter(page, skin, artifact) {
|
||||
const geometry = await page.evaluate(async skin => {
|
||||
const {arena,control,me} = ui;
|
||||
const prompt = document.createElement('div');
|
||||
prompt.className = skin === 'native' ? 'dialog' : 'hand-tip';
|
||||
prompt.textContent = '请选择要使用的牌';
|
||||
arena.append(prompt);
|
||||
ui.dialog = prompt;
|
||||
hudEventState.event.dialog = prompt;
|
||||
hud.refresh();
|
||||
await new Promise(resolve=>requestAnimationFrame(()=>requestAnimationFrame(resolve)));
|
||||
const bounds = node => node.getBoundingClientRect().toJSON();
|
||||
const result = {arena:bounds(arena),hand:bounds(me),card:bounds(card),prompt:bounds(prompt),
|
||||
buttons:[...control.firstElementChild.children].map(bounds)};
|
||||
if (!window.card.isConnected) throw new Error('The original hand card must remain connected');
|
||||
return result;
|
||||
},skin);
|
||||
if (artifact) await page.screenshot({path:artifact});
|
||||
await page.evaluate(()=>{ui.dialog.remove();delete ui.dialog;delete hudEventState.event.dialog;hud.refresh();});
|
||||
const {arena,hand,card,prompt,buttons} = geometry;
|
||||
const center = box => (box.left+box.right)/2;
|
||||
const actions = {left:Math.min(...buttons.map(box=>box.left)),right:Math.max(...buttons.map(box=>box.right))};
|
||||
assert.ok([hand,card,prompt,actions].every(box=>Math.abs(center(box)-center(arena))<=2),
|
||||
'ordinary play fan, prompt and action buttons share the arena center: '+JSON.stringify(geometry));
|
||||
}
|
||||
|
||||
async function setBattleZoom(page, zoom) {
|
||||
await page.evaluate(zoom => {
|
||||
const {style} = document.body;
|
||||
style.zoom = zoom;
|
||||
style.width = style.height = '100%';
|
||||
},zoom);
|
||||
// Let the native hand transform and the resize observers settle after a zoom change.
|
||||
await page.waitForFunction(() => {
|
||||
const arena = ui.arena.getBoundingClientRect(), hand = card.getBoundingClientRect();
|
||||
return Math.abs(arena.width-innerWidth)<=2 &&
|
||||
Math.abs((arena.left+arena.right-hand.left-hand.right)/2)<=2;
|
||||
},null,{timeout:2500});
|
||||
}
|
||||
|
||||
async function checkCommittedLine(page, skin) {
|
||||
const geometry = await page.evaluate(async ({skin,decadePrefix}) => {
|
||||
const engine = await import('/noname.js');
|
||||
@@ -140,12 +86,11 @@ async function checkCommittedLine(page, skin) {
|
||||
const [actor,target] = window.game.players;
|
||||
// Use the shipped line producers and renderer, with only the game lifecycle isolated.
|
||||
engine.lib.config ??= {};
|
||||
engine.setUI({arena,create:{div:selector => {
|
||||
engine.setUI({arena,create:{div:() => {
|
||||
const node = document.createElement('div');
|
||||
if (selector) node.className = 'linexy hidden';
|
||||
node.className = 'linexy hidden';
|
||||
node.show = () => node.classList.remove('hidden');
|
||||
node.listenTransition = () => {};
|
||||
node.setBackgroundImage = path => {node.style.backgroundImage = `url(${path})`;};
|
||||
return node;
|
||||
}},refresh:node=>node.getBoundingClientRect()});
|
||||
const get = engine.get;
|
||||
@@ -157,7 +102,7 @@ async function checkCommittedLine(page, skin) {
|
||||
if (skin !== 'native') {
|
||||
const {playerLine} = await import(decadePrefix+'/src/overrides/player/animations.js');
|
||||
const {BoundsCache} = await import(decadePrefix+'/src/utils/bounds.js');
|
||||
window.decadeUI ??= {boundsCaches:{hand:new BoundsCache(hand)}};
|
||||
window.decadeUI = {boundsCaches:{hand:new BoundsCache(hand)}};
|
||||
actor.checkBoundsCache = target.checkBoundsCache = function() {
|
||||
this.cacheLeft = this.offsetLeft;
|
||||
this.cacheTop = this.offsetTop;
|
||||
@@ -179,30 +124,11 @@ async function checkCommittedLine(page, skin) {
|
||||
const result = {x1,y1,x2:x1+matrix.c*length,y2:y1+matrix.d*length,expectedStart,
|
||||
expectedEnd:{x:target.offsetLeft+target.offsetWidth/2,y:target.offsetTop+target.offsetHeight/2}};
|
||||
effect.remove();
|
||||
// Run the configured renderer as well as the default one. Its art may be provided by the Android package.
|
||||
Object.assign(engine.game,{
|
||||
linexy:engine.Game.prototype.zsJinlongLineXy,
|
||||
zsPlayLineAnimationByName:engine.Game.prototype.zsPlayLineAnimationByName,
|
||||
zsPlayLineAnimation:engine.Game.prototype.zsPlayLineAnimation,
|
||||
jianqiLineAnim:new engine.Game().jianqiLineAnim,
|
||||
});
|
||||
line.call(actor,target,{duration:120});
|
||||
const dragon = arena.lastElementChild;
|
||||
const {left,top,width,transform,backgroundImage} = dragon.style;
|
||||
const degrees = Number(transform.match(/rotate\(([-.\d]+)deg\)/)?.[1]);
|
||||
const radians = degrees*Math.PI/180;
|
||||
const distance = parseFloat(width)-2;
|
||||
const start = {x:parseFloat(left),y:parseFloat(top)+10};
|
||||
result.dragon = {start,end:{x:start.x+distance*Math.cos(radians),y:start.y+distance*Math.sin(radians)},backgroundImage};
|
||||
return result;
|
||||
},{skin,decadePrefix});
|
||||
assert.ok(geometry && Math.hypot(geometry.x1-geometry.expectedStart.x,geometry.y1-geometry.expectedStart.y)<=2 &&
|
||||
Math.hypot(geometry.x2-geometry.expectedEnd.x,geometry.y2-geometry.expectedEnd.y)<=2,
|
||||
'A012 the committed card effect retains its native origin and reaches the target: '+JSON.stringify(geometry));
|
||||
assert.ok(geometry.dragon.backgroundImage.includes('jinlonglinexy') &&
|
||||
Math.hypot(geometry.dragon.start.x-geometry.expectedStart.x,geometry.dragon.start.y-geometry.expectedStart.y)<=2 &&
|
||||
Math.hypot(geometry.dragon.end.x-geometry.expectedEnd.x,geometry.dragon.end.y-geometry.expectedEnd.y)<=2,
|
||||
'the configured Jinlong effect retains its origin and reaches the target: '+JSON.stringify(geometry));
|
||||
}
|
||||
|
||||
async function checkBattlePotionSlots(page, skin, artifact) {
|
||||
@@ -407,16 +333,15 @@ async function checkMobileResponseLayout(page, skin, artifact) {
|
||||
const restored = await page.evaluate(() => {
|
||||
delete hudEventState.event.respondTo;
|
||||
hud.refresh();
|
||||
const verticalShift = Number.parseFloat(ui.control.style.translate.split(/\s+/)[1]) || 0;
|
||||
return verticalShift === 0 && reviewResponse.card.style.translate === '';
|
||||
return ui.control.style.translate === '' && reviewResponse.card.style.translate === '';
|
||||
});
|
||||
assert.ok(restored,'response spacing is released when the original event ends');
|
||||
}
|
||||
const fixture = `<!doctype html><meta charset="utf-8"><link rel="stylesheet" href="/layout/default/layout.css"><div id="window"><div id="arena"><div id="mebg"></div><div id="me" class="mengsan-hand-root-shuying"><div id="handcards1" class="mengsan-hand-scroll-shuying"><div class="handcards mengsan-hand-zone-shuying mengsan-hand-layout-shuying"></div></div><div id="handcards2"><div class="handcards"></div></div></div><div id="control"><div class="control"><div>测试技能</div><div>结束出牌</div></div></div></div></div><style>html,body,#window{margin:0;width:100%;height:100%;position:absolute}#arena{inset:0;width:100%;height:100%;position:absolute}#arena>.player{position:absolute;width:100px;height:130px;background:#345;color:#fff}#arena>.player .avatar{height:100%;width:100%;background:linear-gradient(#334f4b,#172d29)}#arena>.player .name{position:absolute;top:4px;left:4px}#me{position:absolute;bottom:0;width:100%;height:160px}#handcards1,#handcards2{position:absolute;width:100%;height:100%}.handcards{height:100%}.card{background:#e8d7b2;color:#263b35;position:absolute}.mengsan-intent-shuying{position:absolute}</style>`;
|
||||
const importMap = reviewOnly || journeyReview ? fs.readFileSync(path.join(app,'index.html'),'utf8').match(/<script type="importmap">.*?<\/script>/s)[0] : '';
|
||||
const importMap = reviewOnly ? fs.readFileSync(path.join(app,'index.html'),'utf8').match(/<script type="importmap">.*?<\/script>/s)[0] : '';
|
||||
const server = http.createServer((req, res) => {
|
||||
if (req.url === '/fixture') { res.setHeader('Content-Type','text/html;charset=utf-8');res.end(fixture.replace('<meta charset="utf-8">','<meta charset="utf-8">'+importMap));return; }
|
||||
if(!reviewOnly && !journeyReview && req.url==='/noname.js'){res.setHeader('Content-Type','text/javascript');res.end('export const _status={};');return;}
|
||||
if(!reviewOnly && req.url==='/noname.js'){res.setHeader('Content-Type','text/javascript');res.end('export const _status={};');return;}
|
||||
if(decodeURIComponent(new URL(req.url,'http://localhost').pathname)==='/extension/术樱包/diagnostics/index.js') {
|
||||
res.setHeader('Content-Type','text/javascript');res.end('export const getDiagnostics=()=>({status:()=>({enabled:false}),scope:()=>({info(){},error(){}})});');return;
|
||||
}
|
||||
@@ -434,17 +359,12 @@ const server = http.createServer((req, res) => {
|
||||
const viewports = reviewOnly ? [{width:1080,height:486},{width:812,height:375},{width:667,height:375}]
|
||||
: [{width:1280,height:720},{width:1234,height:920},{width:812,height:600},{width:812,height:375},{width:667,height:375},{width:375,height:500},{width:540,height:900}];
|
||||
try {
|
||||
if (journeyReview) {
|
||||
await require('./test-journey-ui-zoom.cjs').testJourneyZoom(browser,origin,prefix);
|
||||
return;
|
||||
}
|
||||
for (const skin of process.env.HUD_TEST_SKIN?[process.env.HUD_TEST_SKIN]:['native','shousha','shizhounian','xinsha']) {
|
||||
for (const viewport of viewports) {
|
||||
const page = await browser.newPage({viewport,hasTouch:true,deviceScaleFactor:reviewOnly?2.625:1});
|
||||
await page.goto(origin+'/fixture');
|
||||
if (reviewOnly && viewport.width===1080) {
|
||||
await page.addStyleTag({url:origin+'/layout/nova/layout.css'});
|
||||
await page.addStyleTag({content:'body{zoom:.65;width:100%;height:100%}'});
|
||||
await page.addStyleTag({content:'body{zoom:.64;width:156.25%;height:156.25%}'});
|
||||
}
|
||||
await page.addStyleTag({content:'body{background:#161e29 url("/image/background/lanting_bg.jpg") center/cover no-repeat}'});
|
||||
await page.addStyleTag({url:origin+prefix+'/ui/style.css'});
|
||||
@@ -557,22 +477,8 @@ const server = http.createServer((req, res) => {
|
||||
if (reviewOnly) {
|
||||
const scenario = `${skin}-${viewport.width}x${viewport.height}`;
|
||||
const artifact = name => process.env.HUD_ARTIFACTS && path.join(process.env.HUD_ARTIFACTS,`${name}-${scenario}.png`);
|
||||
try { await checkMobileTargetLine(page,artifact('A012')); await checkCommittedLine(page,skin); checks+=8; }
|
||||
try { await checkMobileTargetLine(page,artifact('A012')); await checkCommittedLine(page,skin); checks+=7; }
|
||||
catch (error) { reviewFailures.push(`${scenario} ${error.message}`); }
|
||||
try { await checkOrdinaryPlayCenter(page,skin,artifact('ordinary-play-center')); checks++; }
|
||||
catch (error) { reviewFailures.push(`${scenario} ${error.message}`); }
|
||||
if (viewport.width===1080) {
|
||||
for (const zoom of [.5,.85,1,1.2]) {
|
||||
try {
|
||||
await setBattleZoom(page,zoom);
|
||||
await checkOrdinaryPlayCenter(page,skin);
|
||||
await checkMobileTargetLine(page);
|
||||
await checkCommittedLine(page,skin);
|
||||
checks+=9;
|
||||
} catch (error) { reviewFailures.push(`${scenario} zoom ${zoom} ${error.message}`); }
|
||||
}
|
||||
await setBattleZoom(page,.65);
|
||||
}
|
||||
try { await checkBattlePotionSlots(page,skin,artifact('battle-potion-slots')); checks+=4; }
|
||||
catch (error) { reviewFailures.push(`${scenario} ${error.message}`); }
|
||||
try { await checkMobileResponseLayout(page,skin,artifact('A013')); checks+=4; }
|
||||
@@ -580,15 +486,6 @@ const server = http.createServer((req, res) => {
|
||||
if (skin!=='native') {
|
||||
try { await checkPotionSkillsDuringDiscard(page,skin,artifact('discard-skill-controls')); checks+=5; }
|
||||
catch (error) { reviewFailures.push(`${scenario} ${error.message}`); }
|
||||
try {
|
||||
assert.equal(await page.evaluate(()=>{
|
||||
const bounds = window.decadeUI.boundsCaches.hand;
|
||||
bounds.check();
|
||||
hud.dispose();
|
||||
return bounds.updated;
|
||||
}),false,'the skin will read restored hand geometry after the HUD exits');
|
||||
checks++;
|
||||
} catch (error) { reviewFailures.push(`${scenario} ${error.message}`); }
|
||||
}
|
||||
if (!reviewFailures.some(failure => failure.startsWith(`${scenario} `))) console.log(`${scenario} battle UI review passed`);
|
||||
await page.close();
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
const assert = require('node:assert/strict');
|
||||
const path = require('node:path');
|
||||
|
||||
const surfaces = [
|
||||
['选将', '.mengsan-character-overlay-shuying', '确认出征', 'mengsan_liubei_shuying'],
|
||||
['地图', '.mengsan-map-overlay-shuying', /可前往$/, 'route'],
|
||||
['事件选项', '.mengsan-flow-overlay-shuying', '继续', 'go'],
|
||||
['商店', '.mengsan-shop-overlay-shuying', '离开商店', 'leave'],
|
||||
['休息处', '.mengsan-rest-overlay-shuying', '离开休息处', 'done'],
|
||||
['剧情', '.mengsan-dialogue-overlay-shuying', /跳过对话/, null],
|
||||
['剧情分支', '.mengsan-dialogue-overlay-shuying', /剧情文本/, 'pledge'],
|
||||
['奖励选牌', '.mengsan-card-choice-dialog-shuying', '跳过', null],
|
||||
['战后选择', '.mengsan-victory-dialog-shuying', /领取战利品/, 'claim'],
|
||||
['牌库', '.mengsan-deck-dialog-shuying', '关闭', null],
|
||||
['牌堆', '.mengsan-deck-dialog-shuying', '关闭', null],
|
||||
['遗物', '.mengsan-relic-dialog-shuying', '关闭', null],
|
||||
['药水详情', '.mengsan-potion-dialog', '关闭', null],
|
||||
['菜单确认', '.mengsan-menu-dialog-shuying', '保留', 'keep'],
|
||||
['调试管理器', '.mengsan-gm-dialog-shuying', '关闭', null],
|
||||
['战斗状态', '.mengsan-hud-dialog-shuying', '关闭', null],
|
||||
];
|
||||
|
||||
async function mountSurface(page, origin, prefix, settings, surface) {
|
||||
await page.goto(origin+'/fixture');
|
||||
await page.addStyleTag({content:'#window,#arena{transition:none}'});
|
||||
for (const file of ['style','shop','rest','potions','character-select']) {
|
||||
await page.addStyleTag({url:origin+prefix+`/ui/${file}.css`});
|
||||
}
|
||||
await page.evaluate(async ({prefix,settings,surface}) => {
|
||||
const engine = await import('/noname.js');
|
||||
const imported = await import(prefix+'/progression/state.js');
|
||||
const updateZoom = settings.transform ? engine.UI.prototype.updatez.bind(engine.ui) :
|
||||
(await import('/extension/'+encodeURIComponent('十周年UI')+'/src/overrides/ui/update.js')).uiUpdatez;
|
||||
window.zoomReviewSetScale = zoom => {
|
||||
engine.game.documentZoom = zoom;
|
||||
updateZoom();
|
||||
};
|
||||
window.zoomReviewSetScale(settings.zoom);
|
||||
const ui = {window:document.getElementById('window'),arena:document.getElementById('arena'),create:{}};
|
||||
ui.create.div = (selector,...args) => {
|
||||
const element = document.createElement('div');
|
||||
element.className = selector.split('.').filter(Boolean).join(' ');
|
||||
element.setBackground = (name,type) => {element.style.backgroundImage=`url(/image/${type}/${name}.jpg)`;};
|
||||
for (const arg of args) {
|
||||
if (arg instanceof Node) arg.append(element);
|
||||
else if (typeof arg === 'string') element.textContent = arg;
|
||||
}
|
||||
return element;
|
||||
};
|
||||
engine.lib.config ??= {};
|
||||
engine.lib.assetURL = '/';
|
||||
engine.lib.card.sha ??= {type:'basic'};
|
||||
engine.lib.translate.sha = '杀';
|
||||
engine.lib.translate.sha_info = '对一名其他角色造成伤害。';
|
||||
engine.lib.translate.mengsan_liubei_shuying = '刘备';
|
||||
engine.setUI(ui);
|
||||
const run = imported.createRun('mengsan_liubei_shuying');
|
||||
Object.assign(run.player,{gold:99,hp:25,maxHp:50,potions:['ENERGY_POTION']});
|
||||
window.zoomReviewResult = null;
|
||||
function settled(value) {window.zoomReviewResult = value;}
|
||||
const modules = name => import(prefix+`/ui/${name}.js`);
|
||||
const choices = [{id:'go',name:'继续'},{id:'leave',name:'离开'}];
|
||||
if (surface==='选将') {
|
||||
const {chooseCharacterCards} = await modules('character-select');
|
||||
chooseCharacterCards([{id:run.player.character,name:'刘备',description:'出征武将'}],prefix,'返回').then(settled);
|
||||
} else if (surface==='地图') {
|
||||
const {showMap} = await modules('map/renderer');
|
||||
showMap(run).then(()=>settled('route'));
|
||||
} else if (surface==='事件选项') {
|
||||
const {chooseButtons} = await modules('flow-ui');
|
||||
chooseButtons('地图事件',choices,'选择一项继续前进').then(settled);
|
||||
} else if (surface==='商店') {
|
||||
const {chooseShop} = await modules('shop-ui');
|
||||
chooseShop(run.player,[{id:'supply:heal',name:'补给',description:'获得补给',price:30}]).then(settled);
|
||||
} else if (surface==='休息处') {
|
||||
const {chooseRest} = await modules('rest-ui');
|
||||
chooseRest([{id:'heal',name:'休息',description:'恢复生命'}],{tent:true}).then(settled);
|
||||
} else if (surface==='剧情' || surface==='剧情分支') {
|
||||
const {playDialogue} = await modules('dialogue');
|
||||
const branch = surface==='剧情分支';
|
||||
const lines = branch ? [{type:'choice',text:'如何回答?',speed:0,flag:'story.zoom',
|
||||
choices:[{id:'pledge',text:'结伴前行'},{id:'leave',text:'独自出发'}]}] :
|
||||
[{type:'narrator',text:'整备完毕,今日继续向前。',speed:0}];
|
||||
playDialogue(lines,{run}).then(()=>settled(branch ? run.storyFlags['story.zoom'] : null));
|
||||
} else if (surface==='奖励选牌') {
|
||||
const {chooseCardDialog} = await modules('reward-ui');
|
||||
chooseCardDialog([{id:'sha',card:{name:'sha'}}]).then(settled);
|
||||
} else if (surface==='战后选择') {
|
||||
const {chooseVictoryOptions} = await modules('reward-ui');
|
||||
chooseVictoryOptions([{id:'claim',label:'领取战利品'}]).then(settled);
|
||||
} else if (surface==='牌库') {
|
||||
const {openCardLibrary} = await modules('card-library');
|
||||
run.player.deck = Array.from({length:48},()=>({name:'sha',suit:'heart',number:5}));
|
||||
openCardLibrary(run);
|
||||
} else if (surface==='牌堆') {
|
||||
const {mountBattlePiles} = await modules('card-library');
|
||||
mountBattlePiles({active:true,ownResource(){}},{drawPile:run.player.deck,discardPile:[],exhaustPile:[]});
|
||||
} else if (surface==='遗物') {
|
||||
const {mountRelics} = await modules('relics');
|
||||
mountRelics({active:true,ownResource(){}},run,{status(){},counter:()=>({value:null,label:null})},{stripRoot:ui.arena});
|
||||
} else if (surface==='药水详情') {
|
||||
const {mountPotionSlots} = await modules('potions');
|
||||
const slots = mountPotionSlots(ui.arena,run.player,{use(){},canUse:()=>true});
|
||||
slots.layoutBattleSlots(ui);
|
||||
} else if (surface==='菜单确认') {
|
||||
const {askMenu} = await modules('navigation');
|
||||
askMenu('结束征程?','保留进度后可以继续。',[{id:'keep',name:'保留'}]).then(settled);
|
||||
} else if (surface==='调试管理器') {
|
||||
const {mountGMManager} = await modules('gm-manager');
|
||||
const game = {};
|
||||
mountGMManager({active:true,ownResource(){}},{getCards:()=>[]},{},{},
|
||||
{field:(target,key,value)=>{target[key]=value;}},game);
|
||||
game.mengsanGM_shuying();
|
||||
} else if (surface==='战斗状态') {
|
||||
const {mountBattleHUD} = await modules('hud/index');
|
||||
ui.me = document.getElementById('me');
|
||||
ui.control = document.getElementById('control');
|
||||
const player = ui.create.div('.player',ui.arena);
|
||||
Object.assign(player,{name:run.player.character,hp:25,maxHp:50,storage:{mengsanStrength_shuying:2},node:{}});
|
||||
mountBattleHUD(player,{session:{active:true,ownResource(){}}},{ui,get:engine.get,_status:engine._status,document,window,assetBase:prefix});
|
||||
}
|
||||
},{prefix,settings,surface});
|
||||
}
|
||||
|
||||
async function checkMapDrag(page) {
|
||||
const viewport = page.locator('.mengsan-map-viewport-shuying');
|
||||
const scroll = await viewport.evaluate(element => {
|
||||
element.scrollTop = (element.scrollHeight-element.clientHeight)/2;
|
||||
const box = element.getBoundingClientRect();
|
||||
const y = Math.min(box.bottom-4,innerHeight-4);
|
||||
return {top:element.scrollTop,scale:box.height/element.offsetHeight,x:box.left+box.width/2,y,
|
||||
distance:Math.min(32,Math.floor((y-Math.max(0,box.top))/2))};
|
||||
});
|
||||
assert.ok(scroll.distance>=8,`the map still provides a draggable viewport: ${JSON.stringify(scroll)}`);
|
||||
await page.mouse.move(scroll.x,scroll.y);
|
||||
await page.mouse.down();
|
||||
await page.mouse.move(scroll.x,scroll.y-scroll.distance,{steps:4});
|
||||
await page.mouse.up();
|
||||
const moved = await viewport.evaluate(element=>element.scrollTop)-scroll.top;
|
||||
assert.ok(Math.abs(moved*scroll.scale-scroll.distance)<=2,`map drag follows the pointer: ${JSON.stringify({...scroll,moved})}`);
|
||||
}
|
||||
|
||||
async function checkSurface(page, surface, settings, origin, prefix) {
|
||||
const [name,selector,buttonName,result] = surface;
|
||||
await mountSurface(page,origin,prefix,settings,name);
|
||||
const launcher = {'牌堆':'.mengsan-battle-piles-button-shuying','遗物':'.mengsan-battle-relics-button-shuying',
|
||||
'药水详情':'button.mengsan-potion-slot','战斗状态':'.mengsan-hud-status-shuying'}[name];
|
||||
if (launcher) await page.locator(launcher).first().tap({timeout:1800});
|
||||
const root = page.locator(selector);
|
||||
await root.waitFor({state:'visible',timeout:1800});
|
||||
if (settings.switchTo) {
|
||||
await page.evaluate(zoom => window.zoomReviewSetScale(zoom), settings.switchTo);
|
||||
}
|
||||
const box = await root.boundingBox();
|
||||
const viewport = page.viewportSize();
|
||||
assert.ok(box.x>=-2 && box.y>=-2 && box.x+box.width<=viewport.width+2 && box.y+box.height<=viewport.height+2,
|
||||
`surface within viewport: ${JSON.stringify({box,viewport})}`);
|
||||
if (name==='地图') {
|
||||
await checkMapDrag(page);
|
||||
await root.getByRole('button',{name:'菜单',exact:true}).tap({timeout:1800});
|
||||
const drawer = root.locator('.mengsan-map-menu-sheet-shuying');
|
||||
await drawer.getByRole('button',{name:/行囊/}).tap({timeout:1800});
|
||||
await drawer.getByRole('button',{name:'返回菜单',exact:true}).tap({timeout:1800});
|
||||
await drawer.getByRole('button',{name:'关闭菜单',exact:true}).tap({timeout:1800});
|
||||
}
|
||||
if (process.env.HUD_ARTIFACTS && settings.zoom===1.5 && !settings.transform && !settings.viewport) {
|
||||
await page.screenshot({path:path.join(process.env.HUD_ARTIFACTS,`zoom-${name}.png`)});
|
||||
}
|
||||
if (name==='剧情分支') await root.getByRole('button',{name:'结伴前行',exact:true}).tap({timeout:1800});
|
||||
const action = root.getByRole('button',{name:buttonName}).first();
|
||||
if(name==='牌库') {
|
||||
const card = root.locator('.ms-deck-card').first();
|
||||
await card.tap({timeout:1800});
|
||||
assert.ok(await root.locator('.ms-deck-detail').isVisible(),'a card opens its details');
|
||||
}
|
||||
await action.tap({timeout:1800});
|
||||
assert.equal(await root.count(),0,'the original action closes the surface');
|
||||
if (result!==null) assert.equal(await page.evaluate(()=>zoomReviewResult),result,'the original action returns the choice');
|
||||
}
|
||||
|
||||
exports.testJourneyZoom = async function testJourneyZoom(browser,origin,prefix) {
|
||||
const failures = [];
|
||||
let checks = 0;
|
||||
const scenarios = [{zoom:.5},{zoom:.65},{zoom:1},{zoom:1.5},{zoom:2},{zoom:3},{zoom:1.5,transform:true},
|
||||
{zoom:1.5,viewport:{width:420,height:360}}, {zoom:.65,transform:true,viewport:{width:390,height:720}},
|
||||
{zoom:1,transform:true,viewport:{width:1280,height:720}}, {zoom:3,transform:true},
|
||||
{zoom:.65,switchTo:2}, {zoom:.65,switchTo:2,transform:true}];
|
||||
for (const settings of scenarios) {
|
||||
const page = await browser.newPage({viewport:settings.viewport??{width:812,height:375},hasTouch:true});
|
||||
for (const surface of surfaces) {
|
||||
try { await checkSurface(page,surface,settings,origin,prefix); checks++; }
|
||||
catch (error) { failures.push(`${surface[0]} ${JSON.stringify(settings)} ${error.message}`); }
|
||||
}
|
||||
await page.close();
|
||||
}
|
||||
if (failures.length) throw new Error(`${checks} passed\n${failures.join('\n')}`);
|
||||
console.log(`Journey UI zoom: ${checks} passed`);
|
||||
};
|
||||
@@ -328,7 +328,7 @@ export function openCardLibrary(run, options = {}) {
|
||||
// Prevent the map's Escape/Tab handler from acting behind this modal.
|
||||
dialog.addEventListener("keydown", event => event.stopPropagation());
|
||||
render();
|
||||
document.documentElement.appendChild(dialog);
|
||||
document.body.appendChild(dialog);
|
||||
try { dialog.showModal(); } catch (error) { close(); throw error; }
|
||||
fitCards();
|
||||
if (typeof ResizeObserver !== "undefined") {
|
||||
|
||||
@@ -29,22 +29,21 @@ export const playDialogue = (lines, options = {}) => new Promise(resolve => {
|
||||
|
||||
const overlay = ui.create.div(".mengsan-dialogue-overlay-shuying", ui.window);
|
||||
const stage = ui.create.div(".mengsan-dialogue-stage-shuying", overlay);
|
||||
ui.create.div(".mengsan-dialogue-chapter-shuying", options.title || "剧情", overlay);
|
||||
const content = ui.create.div(".mengsan-dialogue-content-shuying", stage);
|
||||
const choices = ui.create.div(".mengsan-dialogue-choices-shuying", content);
|
||||
const textBox = ui.create.div(".mengsan-dialogue-box-shuying", content);
|
||||
ui.create.div(".mengsan-dialogue-chapter-shuying", options.title || "剧情", stage);
|
||||
const textBox = ui.create.div(".mengsan-dialogue-box-shuying", stage);
|
||||
const portraitFrame = ui.create.div(
|
||||
".mengsan-dialogue-portrait-frame-shuying", textBox);
|
||||
const speaker = ui.create.div(".mengsan-dialogue-speaker-shuying", textBox);
|
||||
const text = ui.create.div(".mengsan-dialogue-text-shuying", textBox);
|
||||
const progress = ui.create.div(".mengsan-dialogue-progress-shuying", textBox);
|
||||
const indicator = ui.create.div(".mengsan-dialogue-indicator-shuying", "◆", textBox);
|
||||
const choices = ui.create.div(".mengsan-dialogue-choices-shuying", stage);
|
||||
const skipButton = document.createElement("button");
|
||||
skipButton.type = "button";
|
||||
skipButton.className = "mengsan-dialogue-skip-shuying";
|
||||
skipButton.textContent = "跳过对话";
|
||||
skipButton.setAttribute("aria-label", "跳过对话,未选择的发言使用默认选项");
|
||||
overlay.appendChild(skipButton);
|
||||
stage.appendChild(skipButton);
|
||||
|
||||
let lineIndex = -1;
|
||||
let timer = null;
|
||||
@@ -190,5 +189,5 @@ export const playDialogue = (lines, options = {}) => new Promise(resolve => {
|
||||
const help = ui.create.div(".mengsan-dialogue-help-shuying", stage);
|
||||
help.textContent = "点击补全文字 · 再次点击继续 · Enter / 空格";
|
||||
showNextLine();
|
||||
if (!awaitingChoice || typing) textBox.focus({ preventScroll: true });
|
||||
textBox.focus();
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ export const chooseFlow = (title, render, { back } = {}) => new Promise(resolve
|
||||
if (overlay.dataset.resolved) return;
|
||||
overlay.dataset.resolved = "true";
|
||||
overlay.remove();
|
||||
if (previousFocus?.isConnected) previousFocus.focus({ preventScroll: true });
|
||||
if (previousFocus?.isConnected) previousFocus.focus();
|
||||
resolve(id);
|
||||
};
|
||||
const initialFocus = render(overlay, finish);
|
||||
@@ -26,7 +26,7 @@ export const chooseFlow = (title, render, { back } = {}) => new Promise(resolve
|
||||
if (event.shiftKey && document.activeElement === first) { event.preventDefault(); last.focus(); }
|
||||
else if (!event.shiftKey && document.activeElement === last) { event.preventDefault(); first.focus(); }
|
||||
});
|
||||
initialFocus?.focus({ preventScroll: true });
|
||||
initialFocus?.focus();
|
||||
});
|
||||
|
||||
export const chooseButtons = (title, choices, description = "", options = {}) => chooseFlow(title, (overlay, finish) => {
|
||||
|
||||
@@ -181,7 +181,7 @@ export function mountGMManager(session, owner, piles, battle, resources, game) {
|
||||
const created = dialog;
|
||||
dialog.addEventListener("close", () => { if (dialog === created) close(); });
|
||||
dialog.addEventListener("keydown", event => event.stopPropagation());
|
||||
document.documentElement.appendChild(dialog);
|
||||
document.body.appendChild(dialog);
|
||||
try { dialog.showModal(); } catch (error) { close(); throw error; }
|
||||
render();
|
||||
dialog.querySelector(".ms-deck-header button").focus();
|
||||
|
||||
+14
-10
@@ -89,20 +89,24 @@ export function createHandInput(player, session, adapter, fan, env, refresh, log
|
||||
aim = document.createElementNS(svg, "svg");
|
||||
aim.classList.add("mengsan-hand-aim-shuying");
|
||||
aim.setAttribute("aria-hidden", "true");
|
||||
aim.setAttribute("preserveAspectRatio", "none");
|
||||
aim.appendChild(document.createElementNS(svg, "line"));
|
||||
document.documentElement.appendChild(aim);
|
||||
}
|
||||
// Use the painted overlay bounds so card, touch and line share viewport CSS pixels.
|
||||
const overlay = aim.getBoundingClientRect();
|
||||
if (!(overlay.width > 0 && overlay.height > 0)) { removeAim(); return; }
|
||||
const viewBox = `0 0 ${overlay.width} ${overlay.height}`;
|
||||
if (aim.getAttribute("viewBox") !== viewBox) aim.setAttribute("viewBox", viewBox);
|
||||
// 牌面和触点在同一个视口坐标系,统一换算到绘制层的局部坐标。
|
||||
const matrix = aim.getScreenCTM();
|
||||
const determinant = matrix && matrix.a * matrix.d - matrix.b * matrix.c;
|
||||
if (!determinant || !Number.isFinite(determinant)) { removeAim(); return; }
|
||||
const inverse = matrix.inverse();
|
||||
const viewportPoint = aim.createSVGPoint();
|
||||
viewportPoint.x = x; viewportPoint.y = y;
|
||||
const from = viewportPoint.matrixTransform(inverse);
|
||||
viewportPoint.x = point.x; viewportPoint.y = point.y;
|
||||
const to = viewportPoint.matrixTransform(inverse);
|
||||
const line = aim.firstElementChild;
|
||||
line.setAttribute("x1", x - overlay.left);
|
||||
line.setAttribute("y1", y - overlay.top);
|
||||
line.setAttribute("x2", point.x - overlay.left);
|
||||
line.setAttribute("y2", point.y - overlay.top);
|
||||
line.setAttribute("x1", from.x);
|
||||
line.setAttribute("y1", from.y);
|
||||
line.setAttribute("x2", to.x);
|
||||
line.setAttribute("y2", to.y);
|
||||
}
|
||||
function clearSelection(state) {
|
||||
if (!live(state) || !state.selected) return;
|
||||
|
||||
+10
-37
@@ -108,7 +108,7 @@ export function mountBattleHUD(player, battle, env) {
|
||||
const openDetails = (target, id = null) => {
|
||||
if (disposed || frozen || !battle.session.active) return;
|
||||
closeDialog(); previousFocus = document.activeElement;
|
||||
dialog = create('dialog', 'mengsan-hud-dialog-shuying mengsan-deck-dialog-shuying mengsan-relic-dialog-shuying', document.documentElement);
|
||||
dialog = create('dialog', 'mengsan-hud-dialog-shuying mengsan-deck-dialog-shuying mengsan-relic-dialog-shuying', document.body);
|
||||
const current = dialog;
|
||||
const header = create('header', 'ms-deck-header', dialog);
|
||||
create('h2', '', header, `${nameOf(target)} · 当前状态`);
|
||||
@@ -247,13 +247,8 @@ export function mountBattleHUD(player, battle, env) {
|
||||
for (const mark of hiddenMarks) if (!wanted.has(mark)) { mark.classList.remove('mengsan-hud-represented-mark-shuying'); hiddenMarks.delete(mark); }
|
||||
for (const mark of wanted) if (!mark.classList.contains('mengsan-hud-represented-mark-shuying')) { mark.classList.add('mengsan-hud-represented-mark-shuying'); hiddenMarks.add(mark); }
|
||||
}
|
||||
let layout = null, handGeometry;
|
||||
let layout = null;
|
||||
const hudHeightFor = () => layout === 'short' ? 188 : layout === 'narrow' ? 288 : 274;
|
||||
function invalidateHandBounds() {
|
||||
// Decade uses this cache to place the origin of committed card effects.
|
||||
const bounds = window.decadeUI?.boundsCaches?.hand;
|
||||
if (bounds) bounds.updated = false;
|
||||
}
|
||||
const oldLayout = arena.getAttribute('data-mengsan-hud-layout');
|
||||
restores.push(() => {
|
||||
if (arena.getAttribute('data-mengsan-hud-layout') !== layout) return;
|
||||
@@ -277,41 +272,20 @@ export function mountBattleHUD(player, battle, env) {
|
||||
const hudHeight = hudHeightFor();
|
||||
style(arena, '--mengsan-hud-height', `${hudHeight}px`);
|
||||
const large = width >= 1000;
|
||||
const left = short ? 216 : narrow ? 116 : large ? 352 : 292;
|
||||
const right = short ? 132 : narrow ? 116 : 184;
|
||||
style(arena, '--mengsan-hud-left', `${left}px`);
|
||||
style(arena, '--mengsan-hud-right', `${right}px`);
|
||||
// Nova sets important geometry on #me and #handcards1. The HUD owns these positions for this battle.
|
||||
const handInset = Math.min(Math.max(left,right),Math.max(0,(width-114)/2));
|
||||
for (const [key,value] of Object.entries({left:`${handInset}px`,right:`${handInset}px`,
|
||||
width:'auto',bottom:short?'64px':'68px'})) style(handRoot,key,value);
|
||||
const firstHand = ui.handcards1Container;
|
||||
if (firstHand && handRoot.contains(firstHand)) {
|
||||
style(firstHand,'left','0px');
|
||||
style(firstHand,'width','100%');
|
||||
}
|
||||
const geometry = [handRoot.offsetLeft, handRoot.offsetTop, handRoot.offsetWidth, handRoot.offsetHeight].join(',');
|
||||
if (geometry !== handGeometry) {
|
||||
handGeometry = geometry;
|
||||
invalidateHandBounds();
|
||||
}
|
||||
style(arena, '--mengsan-hud-left', short ? '216px' : narrow ? '116px' : large ? '352px' : '292px');
|
||||
style(arena, '--mengsan-hud-right', short ? '132px' : narrow ? '116px' : '184px');
|
||||
style(arena, '--mengsan-profile-info-left', short ? '108px' : narrow ? '22px' : large ? '200px' : '160px');
|
||||
style(arena, '--mengsan-profile-width', short ? '172px' : narrow ? '76px' : large ? '200px' : '130px');
|
||||
skinActor(player);
|
||||
// Inline important dimensions also beat skins with #arena > .player !important rules.
|
||||
const selfLeft = short ? 24 : narrow ? 22 : 40;
|
||||
const selfWidth = short || narrow ? 76 : large ? 144 : 104;
|
||||
const selfBottom = narrow ? 180 : 24;
|
||||
const selfHeight = short || narrow ? 104 : large ? 196 : 148;
|
||||
const infoTop = narrow ? hudHeight - selfBottom + 16 : hudHeight - selfBottom - selfHeight + (short ? 0 : 20);
|
||||
style(arena, '--mengsan-profile-info-top', `${infoTop}px`);
|
||||
for (const [key, value] of Object.entries({left:`${selfLeft}px`, right:'auto', top:'auto',
|
||||
bottom:`${selfBottom}px`, width:`${selfWidth}px`,
|
||||
for (const [key, value] of Object.entries({left: short ? '24px' : narrow ? '22px' : '40px', right:'auto', top:'auto',
|
||||
bottom:`${selfBottom}px`, width:short ? '76px' : narrow ? '76px' : large ? '144px' : '104px',
|
||||
height:`${selfHeight}px`, transform:'none'})) style(player, key, value);
|
||||
const statusBottom = selfBottom + selfHeight + 12;
|
||||
const statusBesidePortrait = height - statusBottom < 36;
|
||||
style(arena, '--mengsan-status-left', `${statusBesidePortrait ? selfLeft + selfWidth + 8 : selfLeft}px`);
|
||||
style(arena, '--mengsan-side-dock-bottom', `${statusBesidePortrait ? 8 : statusBottom}px`);
|
||||
style(arena, '--mengsan-side-dock-bottom', `${selfBottom + selfHeight + 12}px`);
|
||||
style(arena, '--mengsan-relic-dock-bottom', `${selfBottom + selfHeight + (narrow ? -4 : 12)}px`);
|
||||
style(arena, '--mengsan-skill-ceiling', `${Math.min(hudHeight - 36, selfBottom + selfHeight)}px`);
|
||||
style(arena, '--mengsan-status-height', short ? '52px' : narrow ? '84px' : '160px');
|
||||
@@ -365,8 +339,8 @@ export function mountBattleHUD(player, battle, env) {
|
||||
const hudHeight = hudHeightFor();
|
||||
const rail = layout === 'wide' ? 142 : layout === 'short' ? 112 : 96;
|
||||
const actionBottom = layout === 'narrow' ? hudHeight - 48 : hudHeight + 8;
|
||||
const actionInset = response || arena.clientWidth < 1000 ? '16px' : 'max(var(--mengsan-hud-left),var(--mengsan-hud-right))';
|
||||
for (const [key,value] of Object.entries({position:'absolute',left:actionInset,right:actionInset,top:'auto',bottom:`${actionBottom}px`,width:'auto','max-height':'none',transform:'none'})) style(ui.control,key,value);
|
||||
const compactActions = response || arena.clientWidth < 1000;
|
||||
for (const [key,value] of Object.entries({position:'absolute',left:compactActions?'16px':'var(--mengsan-hud-left)',right:compactActions?'16px':'var(--mengsan-hud-right)',top:'auto',bottom:`${actionBottom}px`,width:'auto','max-height':'none',transform:'none'})) style(ui.control,key,value);
|
||||
for (const group of ui.control.children) if (group.classList.contains('control')) {
|
||||
if (external.includes(group)) {
|
||||
ownClass(group,'mengsan-hud-native-skills-shuying');
|
||||
@@ -388,7 +362,7 @@ export function mountBattleHUD(player, battle, env) {
|
||||
const host=node.offsetParent||arena,a=arena.getBoundingClientRect(),h=host.getBoundingClientRect();
|
||||
const scale=h.width/host.offsetWidth||1,zoom=a.width/arena.clientWidth||1;
|
||||
const responseConfirm = response && node === ui.confirm;
|
||||
const center=arena.clientWidth/2;
|
||||
const center=responseConfirm ? arena.clientWidth/2 : (parseFloat(arena.style.getPropertyValue('--mengsan-hud-left'))+arena.clientWidth-parseFloat(arena.style.getPropertyValue('--mengsan-hud-right')))/2;
|
||||
const side=responseConfirm ? 0 : node===ui.confirm?-1:1;
|
||||
for(const [key,value] of Object.entries({position:'absolute',left:`${(a.left+center*zoom-h.left)/scale+side*80}px`,right:'auto',top:'auto',bottom:`${(h.bottom-a.bottom+actionBottom*zoom)/scale}px`,width:`${Math.min(rail,140)}px`,transform:'translateX(-50%)'}))style(node,key,value);
|
||||
}
|
||||
@@ -446,7 +420,6 @@ export function mountBattleHUD(player, battle, env) {
|
||||
for (const mark of hiddenMarks) mark.classList.remove('mengsan-hud-represented-mark-shuying'); hiddenMarks.clear();
|
||||
for (const restore of restores.reverse()) restore();
|
||||
releaseNodes();
|
||||
invalidateHandBounds();
|
||||
root.remove(); link.remove();
|
||||
}
|
||||
ownClass(document.body, 'mengsan-hud-active-shuying'); ownClass(arena, 'mengsan-hud-arena-shuying');
|
||||
|
||||
@@ -82,9 +82,9 @@ export function createOverlayLayout(arena, hand, ui, player) {
|
||||
.filter(button => !button.closest('.mengsan-hud-external-control-shuying,.removing,.closing'))
|
||||
.map(button => button.getBoundingClientRect()).filter(box => box.height && box.width);
|
||||
}
|
||||
function alignActions(handTop, center, gap, used, response) {
|
||||
function positionResponseActions(handTop, center, gap, used) {
|
||||
const controls = [ui.control];
|
||||
if (response && ui.confirm?.isConnected && !ui.control.contains(ui.confirm)) controls.push(ui.confirm);
|
||||
if (ui.confirm?.isConnected && !ui.control.contains(ui.confirm)) controls.push(ui.confirm);
|
||||
let top = Infinity;
|
||||
for (const node of controls) {
|
||||
const isRoot = node === ui.control;
|
||||
@@ -102,7 +102,7 @@ export function createOverlayLayout(arena, hand, ui, player) {
|
||||
const right = Math.max(...centered.map(box => box.right));
|
||||
const scale = hostScale(node), previous = currentShift(node,scale);
|
||||
const bottom = Math.max(...buttons.map(box => box.bottom)) - previous.y;
|
||||
const offset = response ? handTop - gap - bottom : 0;
|
||||
const offset = handTop - gap - bottom;
|
||||
shift(node,center - (left + right)/2 + previous.x,offset,scale,used);
|
||||
top = Math.min(top, ...buttons.map(box => box.top - previous.y + offset));
|
||||
}
|
||||
@@ -140,16 +140,16 @@ export function createOverlayLayout(arena, hand, ui, player) {
|
||||
const handCards=[...hand.querySelectorAll('.handcards>.card')].map(node=>node.getBoundingClientRect()).filter(box=>box.height&&box.width);
|
||||
const handTop=Math.min(handBox.top,...handCards.map(box=>box.top));
|
||||
const gap=Math.max(4,(arena.clientHeight<=500?6:8)*zoom);
|
||||
const actionTop=alignActions(handCards.length ? Math.min(...handCards.map(box=>box.top)) : handTop,(a.left+a.right)/2,gap,used,response);
|
||||
const responseTop=response ? positionResponseActions(handCards.length ? Math.min(...handCards.map(box=>box.top)) : handTop,(a.left+a.right)/2,gap,used) : Infinity;
|
||||
const controlTop=ui.control.getBoundingClientRect().top;
|
||||
let promptBottom=Math.min(controlTop-10*zoom,a.bottom-(footerHeight+54)*zoom);
|
||||
if(response && Number.isFinite(actionTop))promptBottom=actionTop-gap;
|
||||
if(Number.isFinite(responseTop))promptBottom=responseTop-gap;
|
||||
let promptTop=Infinity;
|
||||
for(const node of prompts) {
|
||||
if(node.hidden || !node.getClientRects().length)continue;
|
||||
mark(node,'mengsan-hud-prompt-shuying');used.add(node);
|
||||
const promptX=response?a.left+16*zoom:x;
|
||||
const promptWidth=response?arena.clientWidth-32:width;
|
||||
const promptX=a.left+(arena.clientWidth-promptWidth)*zoom/2;
|
||||
position(node,promptX,0,promptWidth,arena.clientHeight<=500?34:64);
|
||||
const height=node.getBoundingClientRect().height;
|
||||
position(node,promptX,Math.max(a.top+(response?8:50)*zoom,promptBottom-height),promptWidth,arena.clientHeight<=500?34:64);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
.mengsan-hud-health-track-shuying { width:100%;height:4px;margin:0 0 2px;background:#ffffff1a;border-radius:4px;overflow:hidden; }
|
||||
.mengsan-hud-health-track-shuying>span { height:100%;background:#9bb78d; }
|
||||
.mengsan-hud-energy-shuying { color:#eacb87;font-size:16px;font-variant-numeric:tabular-nums;white-space:nowrap; }
|
||||
.mengsan-hud-center-shuying { left:var(--mengsan-status-left);right:auto;top:auto;bottom:var(--mengsan-side-dock-bottom);width:var(--mengsan-profile-width);height:var(--mengsan-status-height); }
|
||||
.mengsan-hud-center-shuying { left:40px;right:auto;top:auto;bottom:var(--mengsan-side-dock-bottom);width:var(--mengsan-profile-width);height:var(--mengsan-status-height); }
|
||||
.mengsan-hud-shuying .mengsan-hud-statuses-shuying { display:grid;grid-template-columns:repeat(auto-fill,32px);grid-auto-rows:32px;align-content:end;gap:6px;overflow:hidden;white-space:nowrap;height:100%; }
|
||||
.mengsan-hud-shuying .mengsan-hud-status-shuying { display:flex;align-items:center;justify-content:center;width:32px;height:32px;min-width:0;min-height:32px;padding:2px;background:transparent;border-radius:6px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-y; }
|
||||
.mengsan-hud-status-shuying img { width:26px;height:26px;object-fit:contain;pointer-events:none; }
|
||||
@@ -29,7 +29,7 @@
|
||||
Keep them above the portrait (25) and below action controls (30).
|
||||
Inline elevations used by awakening animations still take precedence. */
|
||||
body.mengsan-hud-active-shuying>#decadeUI-canvas { z-index:28; }
|
||||
.mengsan-hud-hand-shuying { position:absolute!important;top:auto!important;height:calc(var(--mengsan-hud-height,274px) - 126px)!important;z-index:24!important;background:none!important;border:0!important;transform:none!important;pointer-events:none; }
|
||||
.mengsan-hud-hand-shuying { position:absolute!important;left:var(--mengsan-hud-left)!important;right:var(--mengsan-hud-right)!important;bottom:68px!important;top:auto!important;width:calc(100% - var(--mengsan-hud-left) - var(--mengsan-hud-right))!important;height:calc(var(--mengsan-hud-height,274px) - 126px)!important;z-index:24!important;background:none!important;border:0!important;transform:none!important;pointer-events:none; }
|
||||
.mengsan-hud-hand-shuying .handcards>.card { pointer-events:auto; }
|
||||
.mengsan-hud-mebg-shuying,.mengsan-hud-hand-shuying>.fakeme.avatar { display:none!important; }
|
||||
/* These explicit references cover Decade's nested camp-wrap and hp-wrap as well. */
|
||||
@@ -75,10 +75,12 @@ body.mengsan-hud-active-shuying .mengsan-hud-potion-action-shuying { display:non
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-hp-shuying,[data-mengsan-hud-layout="short"] .mengsan-hud-block-shuying { font-size:11px; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-name-shuying { font-size:15px; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-energy-shuying { font-size:14px; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-hand-shuying { height:calc(var(--mengsan-hud-height) - 122px)!important; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-hand-shuying { bottom:64px!important;height:calc(var(--mengsan-hud-height) - 122px)!important; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-center-shuying { top:auto;left:24px; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-shuying .mengsan-hud-status-shuying { min-height:26px;padding:2px 4px; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-status-shuying img { width:18px;height:18px; }
|
||||
[data-mengsan-hud-layout="narrow"] .mengsan-hud-shuying .mengsan-hud-info-shuying { left:22px;width:76px;font-size:12px;gap:5px; }
|
||||
[data-mengsan-hud-layout="narrow"] .mengsan-hud-hand-shuying { bottom:68px!important; }
|
||||
[data-mengsan-hud-layout="narrow"] .mengsan-hud-name-shuying { font-size:16px; }
|
||||
[data-mengsan-hud-layout="narrow"] .mengsan-hud-status-shuying span { display:none; }
|
||||
#arena.mengsan-hud-arena-shuying>.mengsan-hud-notification-shuying { width:148px!important;max-width:148px!important;min-height:30px;height:30px!important;transition:none!important;font:600 16px/30px "Microsoft YaHei",sans-serif!important;white-space:nowrap; }
|
||||
@@ -117,6 +119,7 @@ body.mengsan-hud-active-shuying #arena .mengsan-hud-equips-shuying::-webkit-scro
|
||||
[data-mengsan-hud-layout="narrow"] .mengsan-hand-relics-shuying { right:16px!important;width:96px!important;max-width:96px!important;max-height:36px;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;touch-action:pan-x; }
|
||||
body.mengsan-hud-active-shuying #arena>.mengsan-hud-controls-shuying>.mengsan-hud-native-skills-shuying { flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;max-width:none!important;overflow:auto!important; }
|
||||
body.mengsan-hud-active-shuying #arena .mengsan-hud-native-skills-shuying>div { width:100%!important;min-width:0!important;box-sizing:border-box!important;padding:8px 10px!important;min-height:40px!important;font:14px/20px "Microsoft YaHei",sans-serif!important;white-space:normal!important; }
|
||||
[data-mengsan-hud-layout="narrow"] .mengsan-hud-center-shuying { left:22px; }
|
||||
[data-mengsan-hud-layout="short"] .mengsan-hud-shuying .mengsan-hud-statuses-shuying { height:100%; }
|
||||
.mengsan-hud-prompt-shuying { box-sizing:border-box!important;height:auto!important;min-height:0!important;overflow:auto!important;padding:2px 6px!important;background:none!important;border:0!important;box-shadow:none!important;text-align:center!important;z-index:32!important;color:#f6edcb!important;text-shadow:0 1px 3px #000,0 0 6px #000!important; }
|
||||
body.mengsan-hud-active-shuying .mengsan-hud-card-intro-shuying { box-sizing:border-box!important;z-index:90!important;height:auto!important;min-height:0!important;overflow:auto!important;border-radius:14px!important;background:#202020f5!important;box-shadow:0 8px 24px #0007!important;color:#f4f4f4!important;transition:none!important; }
|
||||
|
||||
@@ -415,8 +415,7 @@ export const showMap = (run, { saveRun } = {}) => new Promise(resolve => {
|
||||
suppressClick = true;
|
||||
if (!viewport.hasPointerCapture(event.pointerId)) viewport.setPointerCapture(event.pointerId);
|
||||
viewport.classList.add("dragging");
|
||||
const scale = viewport.getBoundingClientRect().height / viewport.offsetHeight || 1;
|
||||
viewport.scrollTop = drag.top - distance / scale;
|
||||
viewport.scrollTop = drag.top - distance;
|
||||
event.preventDefault();
|
||||
});
|
||||
const endDrag = event => {
|
||||
|
||||
@@ -145,7 +145,7 @@ export const askMenu = (title, description, choices) => new Promise(resolve => {
|
||||
dialog.appendChild(button);
|
||||
}
|
||||
dialog.addEventListener("cancel", event => { event.preventDefault(); finish(null); });
|
||||
document.documentElement.appendChild(dialog);
|
||||
document.body.appendChild(dialog);
|
||||
dialog.showModal();
|
||||
dialog.querySelector("button")?.focus();
|
||||
});
|
||||
|
||||
@@ -83,7 +83,7 @@ export function mountRelics(session, run, battleRelics, { stripRoot = ui.me } =
|
||||
});
|
||||
dialog.addEventListener("keydown", event => event.stopPropagation());
|
||||
refresh();
|
||||
document.documentElement.appendChild(dialog);
|
||||
document.body.appendChild(dialog);
|
||||
try { dialog.showModal(); dismiss.focus(); }
|
||||
catch (error) { close(); throw error; }
|
||||
};
|
||||
|
||||
+25
-75
@@ -303,26 +303,9 @@
|
||||
|
||||
.mengsan-dialogue-stage-shuying {
|
||||
position: absolute !important;
|
||||
inset: 68px 0 max(8px, env(safe-area-inset-bottom)) !important;
|
||||
inset: 0 !important;
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 16px 0 6px;
|
||||
overflow: auto;
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
.mengsan-dialogue-content-shuying {
|
||||
position: relative !important;
|
||||
display: flex;
|
||||
flex: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 28px;
|
||||
margin-top: auto;
|
||||
width: min(1120px, 92%);
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.mengsan-dialogue-chapter-shuying {
|
||||
@@ -405,9 +388,13 @@
|
||||
}
|
||||
|
||||
.mengsan-dialogue-box-shuying {
|
||||
position: relative !important;
|
||||
inset: auto !important;
|
||||
width: 100% !important;
|
||||
position: absolute !important;
|
||||
left: 50% !important;
|
||||
right: auto !important;
|
||||
bottom: clamp(18px, 4vh, 42px) !important;
|
||||
top: auto !important;
|
||||
transform: translateX(-50%) !important;
|
||||
width: min(1120px, 92vw) !important;
|
||||
height: auto !important;
|
||||
min-height: clamp(120px, 20vh, 180px);
|
||||
padding: clamp(32px, 5vh, 46px) clamp(24px, 4vw, 52px) 28px;
|
||||
@@ -509,8 +496,9 @@
|
||||
height: 146px !important;
|
||||
padding: 4px;
|
||||
}
|
||||
.mengsan-dialogue-content-shuying { width: 96%; }
|
||||
.mengsan-dialogue-box-shuying {
|
||||
bottom: 8px !important;
|
||||
width: 96vw !important;
|
||||
min-height: 126px;
|
||||
padding: 30px 18px 24px;
|
||||
}
|
||||
@@ -560,7 +548,6 @@
|
||||
|
||||
.mengsan-map-panel-shuying {
|
||||
padding: 0 !important;
|
||||
container-type: size;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
|
||||
linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px);
|
||||
@@ -796,7 +783,7 @@
|
||||
position: relative !important;
|
||||
z-index: 1;
|
||||
display: block !important;
|
||||
width: min(420px, calc(100% - 32px));
|
||||
width: min(420px, calc(100vw - 32px));
|
||||
height: 100% !important;
|
||||
padding: 0 !important;
|
||||
border: 0;
|
||||
@@ -933,7 +920,7 @@
|
||||
.mengsan-ink-legend-shuying { display: none; }
|
||||
.mengsan-map-shuying .mengsan-node-shuying { width: 52px; height: 52px; padding: 9px; }
|
||||
.mengsan-map-menu-layer-shuying { align-items: flex-end; }
|
||||
.mengsan-map-menu-sheet-shuying { width: 100%; height: min(82%, 680px) !important; border-right: 0; border-top: 1px solid rgba(210,175,101,.34); border-radius: 16px 16px 0 0; animation-name: mengsan-menu-enter-mobile-shuying; }
|
||||
.mengsan-map-menu-sheet-shuying { width: 100%; height: min(82dvh, 680px) !important; border-right: 0; border-top: 1px solid rgba(210,175,101,.34); border-radius: 16px 16px 0 0; animation-name: mengsan-menu-enter-mobile-shuying; }
|
||||
@keyframes mengsan-menu-enter-mobile-shuying { from { opacity: 0; transform: translateY(24px); } }
|
||||
.mengsan-map-menu-title-shuying { font-size: 24px; }
|
||||
.mengsan-map-menu-header-shuying { inset: 14px 14px auto 14px !important; }
|
||||
@@ -942,35 +929,6 @@
|
||||
.mengsan-map-menu-action-shuying { min-height: 64px; }
|
||||
}
|
||||
|
||||
@container (max-height: 325px) {
|
||||
.mengsan-map-menu-sheet-shuying { overflow-y: auto; overscroll-behavior-y: contain; }
|
||||
.mengsan-map-menu-header-shuying,
|
||||
.mengsan-map-menu-content-shuying,
|
||||
.mengsan-map-menu-footer-shuying {
|
||||
position: relative !important;
|
||||
inset: auto !important;
|
||||
width: auto !important;
|
||||
margin: 0 14px;
|
||||
}
|
||||
.mengsan-map-menu-header-shuying { height: auto !important; min-height: 54px; padding: 4px; }
|
||||
.mengsan-map-menu-content-shuying { overflow: visible; padding-top: 8px; }
|
||||
.mengsan-map-menu-footer-shuying { height: auto !important; padding: 8px 4px; }
|
||||
}
|
||||
@container (max-height: 190px) {
|
||||
.mengsan-map-header-shuying { grid-template-columns: auto minmax(0, 1fr); min-height: 0; gap: 4px 8px; padding: 4px 8px; }
|
||||
.mengsan-map-menu-trigger-shuying { width: 34px; min-width: 34px; min-height: 34px; }
|
||||
.mengsan-map-title-group-shuying > .mengsan-title-shuying { font-size: 16px; }
|
||||
.mengsan-map-header-shuying > .mengsan-map-status-shuying {
|
||||
grid-column: 1 / -1; justify-self: stretch; justify-content: flex-start;
|
||||
min-width: 0; flex-wrap: nowrap; gap: 4px; overflow-x: auto;
|
||||
}
|
||||
.mengsan-map-stat-shuying { flex: 0 0 auto; min-width: 38px; min-height: 24px; padding: 1px 4px; }
|
||||
.mengsan-map-status-shuying .mengsan-potion-slots { flex: none; flex-wrap: nowrap; }
|
||||
.mengsan-map-status-shuying .mengsan-potion-slot { width: 26px; height: 26px; }
|
||||
.mengsan-map-status-shuying .mengsan-potion-import { flex: none; white-space: nowrap; }
|
||||
.mengsan-map-viewport-shuying { padding-block: 0; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.mengsan-map-menu-sheet-shuying { animation: none !important; }
|
||||
.mengsan-map-menu-trigger-shuying,
|
||||
@@ -996,11 +954,6 @@
|
||||
.mengsan-flow-overlay-shuying {
|
||||
background: radial-gradient(ellipse at 18% 20%, #53635766, transparent 55%), linear-gradient(120deg, #172724f5, #101b1df5);
|
||||
padding: 80px 24px 28px;
|
||||
overflow: clip;
|
||||
}
|
||||
.mengsan-flow-overlay-shuying > .mengsan-panel-shuying {
|
||||
min-height: 0;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
.mengsan-flow-panel-shuying {
|
||||
width: min(680px, 100%) !important;
|
||||
@@ -1203,35 +1156,30 @@ button.mengsan-card-choice-skip-shuying:hover { color: #fff1d5; border-color: #d
|
||||
.mengsan-menu-dialog-shuying p { margin: 0 0 24px; color: var(--flow-muted); }
|
||||
.mengsan-menu-dialog-shuying button { display: block; width: 100%; min-height: 48px; margin-top: 12px; border: 1px solid #c4a56888; border-radius: 3px; padding: 10px; font: inherit; color: var(--flow-paper); background: #ffffff08; cursor: pointer; }
|
||||
.mengsan-menu-dialog-shuying button.danger { background: var(--flow-danger); border-color: #d89586; }
|
||||
.mengsan-dialogue-overlay-shuying { container-type: size; background: radial-gradient(ellipse at 35% 25%, #62736544, transparent 60%), linear-gradient(120deg, #172724ee, #101b1dee); }
|
||||
.mengsan-dialogue-chapter-shuying { top: 26px !important; left: 50% !important; right: auto !important; transform: translateX(-50%); max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--flow-muted); }
|
||||
.mengsan-dialogue-overlay-shuying { background: radial-gradient(ellipse at 35% 25%, #62736544, transparent 60%), linear-gradient(120deg, #172724ee, #101b1dee); }
|
||||
.mengsan-dialogue-chapter-shuying { top: 26px !important; left: 24px !important; max-width: calc(100% - 160px); color: var(--flow-muted); }
|
||||
.mengsan-dialogue-box-shuying { border-radius: 4px; border-color: var(--flow-gold); background: #172724f5; padding-bottom: 34px; }
|
||||
.mengsan-dialogue-speaker-shuying { border-radius: 2px; color: #172724; background: #efe5cf; font-family: "KaiTi", "SimSun", serif; }
|
||||
.mengsan-dialogue-text-shuying { color: var(--flow-paper); font-size: clamp(17px, 2vw, 22px); line-height: 1.85; max-height: 30vh; overflow: auto; }
|
||||
.mengsan-dialogue-help-shuying { position: relative !important; flex: none; margin: 8px 16px 0; text-align: center; font-size: 12px; color: var(--flow-muted); pointer-events: none; }
|
||||
.mengsan-dialogue-choices-shuying { position: relative !important; width: min(580px, 100%); display: grid; gap: 10px; z-index: 5; }
|
||||
.mengsan-dialogue-choices-shuying:empty { display: none; }
|
||||
.mengsan-dialogue-help-shuying { position: absolute !important; bottom: 8px; left: 16px; right: 16px; text-align: center; font-size: 12px; color: var(--flow-muted); pointer-events: none; }
|
||||
.mengsan-dialogue-choices-shuying { position: absolute !important; left: 50%; bottom: clamp(210px, 32vh, 290px); transform: translateX(-50%); width: min(580px, 88vw); display: grid; gap: 10px; z-index: 5; }
|
||||
.mengsan-dialogue-skip-shuying { position: absolute !important; top: max(18px, env(safe-area-inset-top)); left: max(18px, env(safe-area-inset-left)); z-index: 6; padding: 8px 14px; border: 1px solid var(--flow-gold); border-radius: 4px; color: var(--flow-paper); background: #172724e8; font: inherit; cursor: pointer; }
|
||||
.mengsan-dialogue-skip-shuying:hover, .mengsan-dialogue-skip-shuying:focus-visible { background: #304540; outline: 2px solid var(--flow-gold); outline-offset: 2px; }
|
||||
.mengsan-dialogue-choice-shuying { padding: 12px 18px; border: 1px solid var(--flow-gold); border-radius: 4px; color: var(--flow-paper); background: #172724f5; text-align: left; font: inherit; cursor: pointer; }
|
||||
.mengsan-dialogue-choice-shuying:hover, .mengsan-dialogue-choice-shuying:focus-visible { background: #304540; outline: 2px solid var(--flow-gold); outline-offset: 2px; }
|
||||
@container (max-height: 280px) {
|
||||
.mengsan-dialogue-stage-shuying { padding-top: 4px; }
|
||||
.mengsan-dialogue-choices-shuying { gap: 6px; }
|
||||
.mengsan-dialogue-choice-shuying { min-height: 36px; padding: 6px 14px; }
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.mengsan-dialogue-chapter-shuying { display: block !important; font-size: 14px; }
|
||||
.mengsan-flow-overlay-shuying { padding: 78px 12px 16px; }
|
||||
.mengsan-flow-panel-shuying { padding: 24px 18px; }
|
||||
.mengsan-flow-panel-shuying > .mengsan-title-shuying { font-size: 30px; }
|
||||
.mengsan-flow-panel-shuying .mengsan-choice-shuying { padding: 14px; }
|
||||
.mengsan-dialogue-box-shuying { bottom: 36px !important; }
|
||||
}
|
||||
@media (max-height: 500px) {
|
||||
.mengsan-flow-overlay-shuying { padding-top: 70px; padding-bottom: 12px; }
|
||||
.mengsan-flow-panel-shuying { padding: 18px 24px; }
|
||||
.mengsan-flow-panel-shuying > .mengsan-description-shuying { margin-bottom: 16px; }
|
||||
.mengsan-dialogue-box-shuying { min-height: 100px; padding: 24px 20px 20px; }
|
||||
.mengsan-dialogue-box-shuying { bottom: 28px !important; min-height: 100px; max-height: 50vh; padding: 24px 20px 20px; }
|
||||
.mengsan-dialogue-text-shuying { max-height: 24vh; }
|
||||
.mengsan-dialogue-portrait-frame-shuying {
|
||||
height: 110px !important;
|
||||
@@ -1319,8 +1267,7 @@ dialog.mengsan-deck-dialog-shuying::backdrop { background: #080706b8; }
|
||||
|
||||
/* Battle-only control; removed with its owning session. */
|
||||
.mengsan-battle-piles-button-shuying {
|
||||
--mengsan-battle-side-top: clamp(4px, calc(100% - 100px), 110px);
|
||||
position: fixed !important; right: max(14px, env(safe-area-inset-right)); top: var(--mengsan-battle-side-top);
|
||||
position: fixed !important; right: max(14px, env(safe-area-inset-right)); top: 110px;
|
||||
z-index: 35; min-width: 64px; min-height: 44px; padding: 8px 14px;
|
||||
border: 1px solid #dcb578; border-radius: 8px; background: #30251eee;
|
||||
color: #f4e7cc; font: 16px/1.4 "Microsoft YaHei", sans-serif;
|
||||
@@ -1335,7 +1282,7 @@ dialog.mengsan-deck-dialog-shuying::backdrop { background: #080706b8; }
|
||||
.mengsan-gm-dialog-shuying .ms-gm-editor { overflow: auto; flex: 1; min-height: 0; border-top: 1px solid #96754e; padding: 12px 4px; }
|
||||
.mengsan-gm-dialog-shuying .ms-gm-affixes { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; margin-top: 12px; }
|
||||
.mengsan-gm-dialog-shuying .ms-gm-affixes button:disabled { opacity: .55; cursor: not-allowed; }
|
||||
@media (max-height: 500px) { .mengsan-battle-piles-button-shuying { --mengsan-battle-side-top: clamp(4px, calc(100% - 100px), 70px); right: max(8px, env(safe-area-inset-right)); } }
|
||||
@media (max-height: 500px) { .mengsan-battle-piles-button-shuying { top: 70px; right: max(8px, env(safe-area-inset-right)); } }
|
||||
|
||||
/* Only session-created Mengsan players; retain internal identity and seat order. */
|
||||
.player.mengsan-hide-identity-shuying > .identity {
|
||||
@@ -1461,7 +1408,7 @@ body.mengsan-battle-ui-shuying #arena[data-number="3"] > .player:is([data-positi
|
||||
height: 22px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.mengsan-battle-relics-button-shuying { top: calc(var(--mengsan-battle-side-top) + 52px); }
|
||||
.mengsan-battle-relics-button-shuying { top: 162px; }
|
||||
.mengsan-hand-relics-shuying {
|
||||
position: absolute !important;
|
||||
left: 0;
|
||||
@@ -1556,6 +1503,9 @@ body.mengsan-battle-ui-shuying #arena[data-number="3"] > .player:is([data-positi
|
||||
.mengsan-map-inventory-row-shuying > .mengsan-relic-icon-shuying { width: 40px; height: 40px; }
|
||||
.mengsan-relic-choice-tile-shuying .mengsan-card-choice-art-shuying img { padding: 14px; box-sizing: border-box; background: transparent; }
|
||||
.mengsan-relic-choice-tile-shuying .mengsan-card-choice-art-shuying:has(img) .mengsan-card-choice-glyph-shuying { display: none; }
|
||||
@media (max-height: 500px) {
|
||||
.mengsan-battle-relics-button-shuying { top: 122px; }
|
||||
}
|
||||
.mengsan-bonds-shuying {
|
||||
position: relative !important;
|
||||
flex-shrink: 0;
|
||||
|
||||
Reference in New Issue
Block a user