feat(遊戲化): 新增大廳、附身、時間流、後日談進度等遊戲化系統功能

新增角色大廳(lobby)邀約與通話、附身(possession)、時鐘(clock)抽象、
時間流與睡眠負債、後日談進度、行為選擇與旁觀反應等模組,並補齊對應冒煙
測試(R~V)與單元測試;同步調整 web/mobile 對應頁面與元件。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-20 09:10:26 +08:00
co-authored by Claude Sonnet 5
parent 127a59dafd
commit 1bea06e3cd
195 changed files with 17219 additions and 738 deletions
+6 -2
View File
@@ -118,7 +118,9 @@ export default async function smokeL() {
}
// L-1 雙軸模型:純聊天量只推升親密度,不推升心動值;未成年角色的戀愛軸不會被事件啟動。
await post(`/chat/${ADULT_ID}`, { userId: USER_ID, sessionId: "smoke-l-chat", text: "嗨嗨嗨,今天過得如何呀" });
// T38:1:1 聊天改走 SOLO 房。
const chatRoom = await post("/room/solo", { userId: USER_ID, characterId: ADULT_ID });
await post(`/room/${chatRoom.id}/message`, { userId: USER_ID, text: "嗨嗨嗨,今天過得如何呀" });
const stateAfterChat = await get(`/romance/${ADULT_ID}/${USER_ID}/state`);
if (stateAfterChat.romanceMeter !== 0) {
throw new Error("純聊天量不應該推升心動值");
@@ -240,7 +242,9 @@ export default async function smokeL() {
throw new Error("累積足夠的正向修復事件後,關係危機應該回到戀人階段");
}
// 清理本次測試建立的角色(cascade 會一併清掉戀愛軸紀錄、年齡證據、記憶等)與共用使用者的 opt-in 設定。
// 清理本次測試建立的角色(cascade 會一併清掉戀愛軸紀錄、年齡證據、記憶等)、本次建立的房間,
// 與共用使用者的 opt-in 設定。
await prisma.room.deleteMany({ where: { id: chatRoom.id } });
await prisma.character.deleteMany({ where: { id: { in: [...ALL_IDS, tooSoonId] } } });
await prisma.adultModeConsent.deleteMany({ where: { userId: USER_ID } });
}