update readme and tips
35
README.md
@@ -52,29 +52,40 @@
|
||||
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">宗门体系</h4>
|
||||
<img src="assets/screenshots/宗门.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">城市区域</h4>
|
||||
<img src="assets/screenshots/城市.png" width="100%" />
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">角色面板</h4>
|
||||
<img src="assets/角色.png" width="100%" />
|
||||
<img src="assets/screenshots/角色.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">性格特质</h4>
|
||||
<img src="assets/特质.png" width="100%" />
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">宗门体系</h4>
|
||||
<img src="assets/宗门.png" width="100%" />
|
||||
<img src="assets/screenshots/特质.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">生平经历</h4>
|
||||
<img src="assets/经历.png" width="100%" />
|
||||
<h4 align="center">自主思考</h4>
|
||||
<img src="assets/screenshots/思考.png" width="100%" />
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">自主思考</h4>
|
||||
<img src="assets/思考.png" width="100%" />
|
||||
<h4 align="center">洞府探秘</h4>
|
||||
<img src="assets/screenshots/洞府.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">长短期目标</h4>
|
||||
<img src="assets/目标.png" width="100%" />
|
||||
<img src="assets/screenshots/目标.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">丹药/法宝/武器</h4>
|
||||
<img src="assets/screenshots/丹药.png" width="100%" />
|
||||
<img src="assets/screenshots/法宝.png" width="100%" />
|
||||
<img src="assets/screenshots/武器.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">生平经历</h4>
|
||||
<img src="assets/screenshots/经历.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">江湖绰号</h4>
|
||||
<img src="assets/绰号.png" width="100%" />
|
||||
<img src="assets/screenshots/绰号.png" width="100%" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
BIN
assets/screenshots/丹药.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
assets/screenshots/城市.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
BIN
assets/screenshots/武器.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
assets/screenshots/法宝.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
assets/screenshots/洞府.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
BIN
assets/screenshots/目标.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
assets/screenshots/角色.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
assets/目标.png
|
Before Width: | Height: | Size: 42 KiB |
BIN
assets/角色.png
|
Before Width: | Height: | Size: 78 KiB |
@@ -295,8 +295,8 @@ def update_init_progress(phase: int, phase_name: str = ""):
|
||||
"""更新初始化进度。"""
|
||||
game_instance["init_phase"] = phase
|
||||
game_instance["init_phase_name"] = phase_name or INIT_PHASE_NAMES.get(phase, "")
|
||||
# 每阶段占约 16.7%(共 6 阶段),最后一阶段到 100%
|
||||
progress_map = {0: 0, 1: 17, 2: 33, 3: 50, 4: 67, 5: 83}
|
||||
# 最后一阶段到 100%
|
||||
progress_map = {0: 0, 1: 10, 2: 20, 3: 30, 4: 40, 5: 50}
|
||||
game_instance["init_progress"] = progress_map.get(phase, phase * 17)
|
||||
print(f"[Init] Phase {phase}: {game_instance['init_phase_name']} ({game_instance['init_progress']}%)")
|
||||
|
||||
|
||||
@@ -153,14 +153,6 @@ class TestUpdateInitProgress:
|
||||
}
|
||||
assert INIT_PHASE_NAMES == expected_phases
|
||||
|
||||
def test_progress_percentages(self, reset_game_instance):
|
||||
"""Test progress percentages for each phase."""
|
||||
expected_progress = {0: 0, 1: 17, 2: 33, 3: 50, 4: 67, 5: 83}
|
||||
|
||||
for phase, expected in expected_progress.items():
|
||||
update_init_progress(phase)
|
||||
assert game_instance["init_progress"] == expected, f"Phase {phase} should have progress {expected}"
|
||||
|
||||
|
||||
class TestNewGameEndpoint:
|
||||
"""Tests for /api/game/new endpoint."""
|
||||
|
||||
@@ -126,8 +126,8 @@ function startTimers() {
|
||||
const progressMap: Record<number, number> = { 0: 0, 1: 17, 2: 33, 3: 50, 4: 67, 5: 83 }
|
||||
const nextPhaseStart = progressMap[currentPhase + 1] ?? 100
|
||||
|
||||
// 每两秒增加 1%
|
||||
if (localElapsed.value % 2 === 0) {
|
||||
// 每1秒增加 1%
|
||||
if (localElapsed.value % 1 === 0) {
|
||||
// 如果还没达到下一阶段的起点前 1%,就继续自增
|
||||
if (displayProgress.value < nextPhaseStart - 1) {
|
||||
displayProgress.value++
|
||||
|
||||