Commit Graph

22 Commits

Author SHA1 Message Date
18865e17ca 实现游戏化金币发放服务 2026-05-13 13:01:00 +08:00
1ad26d0fe8 补齐 XP 与连续学习测试覆盖 2026-05-13 10:55:17 +08:00
c08d3f75b9 实现每日首次进入红心补给 2026-05-13 10:53:27 +08:00
d71c45b2f1 实现连续学习里程碑奖励 2026-05-13 10:51:01 +08:00
447cef3dea 按挑战组完成更新连续学习 2026-05-13 10:47:46 +08:00
b5b3aaf3a7 实现游戏化 XP 来源与连对奖励 2026-05-13 10:26:21 +08:00
b590e60bce feat: implement non-linear 50-level XP curve (G2-1)
Replace flat 400 XP/level formula with the segmented curve from
LEVEL_RULES: Lv.1-5 steep ramp, Lv.6-10 moderate, Lv.11-20 linear +80,
Lv.21-35 +120, Lv.36-50 +180. Level 50 is hard-capped with xpToNextLevel=0.

Uses binary search over pre-computed cumulative thresholds for O(log n)
level lookup.
2026-05-12 11:04:23 +08:00
665efa4370 test: add comprehensive challenge group tests (G1-7)
Add 11 new test cases covering challenge session creation, correct/wrong
answers, idempotent duplicate submission, completion settlement, resource
exhaustion, Plus user bypass, and invalid input validation.

Refactor test helpers to use queue-based mockImplementation pattern for
more reliable db.select mocking across complex async flows.
2026-05-12 10:38:17 +08:00
8801ca1db2 docs: mark G1-6 challenge API DTO update as completed 2026-05-12 00:12:50 +08:00
e2fdce2268 docs: mark G1-5 daily high-reward session limits as completed 2026-05-12 00:01:57 +08:00
708165e121 docs: mark G1-4 heart deduction boundaries as completed 2026-05-11 23:45:07 +08:00
9e0f97d162 Settle completed challenge sessions 2026-05-11 21:40:41 +08:00
5bb6ba29a2 Record idempotent challenge answers 2026-05-11 21:34:27 +08:00
1d84de8d15 Create challenge sessions with five questions 2026-05-11 18:32:40 +08:00
fd4c2b6361 Generate game economy migrations 2026-05-11 18:23:29 +08:00
6a655d0ce2 Add weekly XP schema 2026-05-11 18:18:33 +08:00
7a617ce1f9 Add daily progress schema 2026-05-11 18:06:19 +08:00
51395bf5ec Add reward ledger schema 2026-05-11 17:59:03 +08:00
a23f1abc12 Add wallet and inventory schema 2026-05-11 17:41:26 +08:00
5570973f74 Add challenge session schema 2026-05-11 17:39:06 +08:00
8382183ee5 Add gamification rule constants 2026-05-11 17:33:53 +08:00
0dd6633fd4 Add gamification design and server plan 2026-05-11 17:06:42 +08:00