Files
maplecontest/docs/superpowers/specs/2026-06-12-ascension-design.md
gahusb 9989a61675 fix(ascension): RPC ExecSpace 실측 보정 — Server=5·Client=6 (프로브 검증)
- 1은 ServerOnly(클라 호출 무시)라 저장/로드 RPC 미동작 → 5로 수정
- RecvAscension 6(Client): 서버→특정 클라 userId 라우팅 실측 확인
- 설계 문서 ExecSpace 표 갱신, 프로브 메서드 제거

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 14:20:05 +09:00

48 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# P11 — 승천 시스템 + UserDataStorage 설계
날짜: 2026-06-12 (사용자 승인 — P9/P10/P11 중 3단계)
브랜치: `feature/p11-ascension`
## 범위
1. **개인별 승천 저장**`_DataStorageService:GetUserDataStorage(userId)` (유저별 영구, 메이커↔배포 분리). 이 프로젝트 첫 서버-클라 RPC.
2. **승천 선택 UI** — 메인 메뉴에서 0~해금치 선택([-]/[+]), 런 클리어 시 해금 +1 (최대 10), 클리어 문구 "승천 N 해금!"
3. **승천 모디파이어 A1~A10** (누적):
| 단계 | 효과 | 단계 | 효과 |
|---|---|---|---|
| A1 | 적 HP +10% | A6 | 적 HP 추가 +10% |
| A2 | 적 피해 +10% | A7 | 적 피해 추가 +10% |
| A3 | 시작 HP -10 | A8 | 시작 HP 추가 -10 |
| A4 | 정예·보스 배율 +0.2 | A9 | 정예·보스 배율 추가 +0.2 |
| A5 | 승리 메소 -25% | A10 | 승리 메소 추가 -25% |
4. TopBar에 `· 승천N` 표시 (0이면 생략)
## 서버-클라 구조 (ExecSpace)
codeblock JSON ExecSpace 실측(프로브): **Server=5**(클라→서버), **Client=6**(서버→클라·마지막 인자 userId로 특정 유저 라우팅), 1=ServerOnly(클라 호출 무시), 2=ClientOnly(서버 호출 무시). 기존 메서드의 6은 Client라 클라 호출 시 제자리 실행으로 동작 동일:
- `ReqLoadAscension(userId)` **[Server=5]** — 클라 OnBeginPlay에서 호출 → 서버에서 `GetAndWait("ascensionUnlocked")``RecvAscension(n, userId)` 호출
- `RecvAscension(n, userId)` **[Client=6]** — 마지막 파라미터 userId로 **요청한 클라이언트에만** 응답 (MSW 공식 패턴) → `AscensionUnlocked` 갱신·메뉴 렌더
- `SaveAscension(n, userId)` **[Server=5]** — `SetAndWait`
- 생성기의 `m.ExecSpace = 6` 일괄 적용을 "명시값(≠0)은 보존"으로 수정
## 적용 지점
- `StartRun`: 시작 HP에서 A3/A8 차감, `AscensionLevel`은 메뉴 선택값 유지
- `BuildMonsters`: maxHp ×(1+A1/A6), Attack 인텐트 ×(1+A2/A7), elite/boss 그룹이면 막 배율 +A4/A9
- `CheckCombatEnd`: 승리 메소 ×(1-A5/A10) floor
- `EndRun("런 클리어!")`: `AscensionLevel >= AscensionUnlocked and Unlocked < 10`이면 해금+1·저장·결과 문구 교체
- 헬퍼: `AscHpMult`/`AscAtkMult`/`AscEliteBonus`/`AscGoldMult`/`AscStartHpPenalty`
## UI (MainMenu)
- `AscRow`: `AscMinus`[-] · `AscLabel`("승천 L / 해금 U") · `AscPlus`[+] — 새 게임 버튼 아래
- `AdjustAscension(delta)` clamp 0..Unlocked, `RenderAscension`
## 검증
1. 시뮬: 모디파이어는 Lua 전용(런 메타) — 시뮬 비대상 명시. 기존 44건 유지
2. 메이커: 로드(첫 0)→승천 2 선택→적 HP/피해 배율·시작 HP 확인→클리어→해금+1·저장→재시작 후 로드 확인(메이커 스토리지), 빌드·런타임 0에러