이클립스 흐름 — 배너 진입 · 이벤트 버튼 · 오버레이 · 방어 진행 표시 · 흔들기 감지 통일

This commit is contained in:
Sn-Kinos
2026-10-05 19:05:21 +09:00
parent be623d2e46
commit 576dcfbdfd
27 changed files with 1369 additions and 369 deletions
+6 -1
View File
@@ -131,7 +131,12 @@ export const fnQuestVerifyMusicShake = onCall(async (req) => {
}
const policy = await loadPolicy();
const amount = Math.round(policy.stepsPop * GRADE_MULTIPLIER[grade]);
// 원장 B-24 「보상액은 운영값」 — 퀘스트 문서(Admin 「설정 보상 POP」)가 정하고, 없으면
// 옛 공통값으로 물러난다. 앱 화면도 같은 순서로 읽는다(`QuestType.rewardFrom`).
const base = quest.get('rewardPop');
const amount = Math.round(
(typeof base === 'number' && base >= 0 ? base : policy.stepsPop) * GRADE_MULTIPLIER[grade],
);
const result = await grantPop({
uid,
popType: 'activity',
@@ -507,6 +507,18 @@ describe('검증 활동 집계 규칙 — Quest 완료 1건 · 하루 1회 (Camp
expect(await count()).toBe(2);
});
it('Music Shake 보상은 퀘스트의 rewardPop × 등급 배수다', async () => {
await db().doc('quests/music-reward').set({
type: 'musicShake', trackId: 't1', totalSegments: 10, dailyLimit: 1, rewardPop: 30,
});
const reply = await call(fnQuestVerifyMusicShake, {
questId: 'music-reward', trackId: 't1', totalSegments: 10,
judgement: { perfect: 10, good: 0, miss: 0, maxCombo: 10 },
});
expect(reply.grade).toBe('S');
expect(reply.rewarded).toBe(60);
});
it('Music Shake 는 완주마다 1회 · 방문은 1회', async () => {
await db().doc('quests/music-count').set({ type: 'musicShake', trackId: 't1', totalSegments: 10, dailyLimit: 2 });
const shake = () => call(fnQuestVerifyMusicShake, {