Files
maplecontest/docs/superpowers/specs/2026-06-09-floors-design.md
2026-06-09 04:13:56 +09:00

65 lines
2.6 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.
# 다음 층 / 멀티 act (TODO E6a) — 설계
> 작성: 2026-06-09 / 상태: 승인됨 / 근거: TODO E 분해(E6a) + 기존 맵/전투 구조.
> 선행: E1~E5 완료. 제외: E6b 저장/불러오기(사용자가 안 함으로 결정 — MSW 저장 API 필요).
## 문제
현재 보스 클리어 = 즉시 런 종료. 로그라이크의 "여러 층(act)을 점점 깊이 진행" 느낌이 없다.
보스 클리어 후 다음 막으로 이어지고, 최종 막 보스에서 진짜 런 클리어가 필요하다.
## 설계
### 파라미터 (생성기 상수)
- `ACT_COUNT = 3` (막 수).
- 적 스케일: `mult = 1 + (Act-1)*0.6` → 1막 ×1, 2막 ×1.6, 3막 ×2.2.
### 상태 재정의
- 기존 `Floor`**현재 막 카운터**(1..ACT_COUNT)로 사용. `RunLength = ACT_COUNT`.
- 맵 내 행 진행은 맵 UI가 표현 → 별도 숫자 표시 없음.
### 메서드 변경
- `StartRun`: `Floor = 1`, `RunLength = ${ACT_COUNT}`. (맵 1회 빌드는 그대로.)
- `StartCombat`: `self.Floor = node.row`**제거**. 적 로드 시 막 스케일 적용:
```lua
local mult = 1 + (self.Floor - 1) * 0.6
self.EnemyMaxHp = math.floor(enemy.maxHp * mult)
self.EnemyHp = self.EnemyMaxHp
self.EnemyIntents = {}
for i = 1, #enemy.intents do
self.EnemyIntents[i] = { kind = enemy.intents[i].kind, value = math.floor(enemy.intents[i].value * mult) }
end
```
(공유 enemy.intents 변형 금지 — 새 테이블 생성.)
- `CheckCombatEnd` 보스 승리 분기:
```lua
if node ~= nil and node.type == "boss" then
if self.Floor < self.RunLength then
self.Floor = self.Floor + 1
self.CurrentNodeId = ""
self.CurrentEnemyId = ""
self:RenderRun()
self:ShowMap()
else
self:ShowResult("런 클리어!")
self.RunActive = false
end
else
self:OfferReward()
end
```
(다음 막은 같은 맵 구조 재사용 — CurrentNodeId 리셋만. 적은 막 스케일로 강해짐.)
- HP·골드·덱·유물은 막 간 유지(기존 영속). combatStart 유물은 전투마다 재적용.
### UI
- `RenderRun`: 층 텍스트를 `"막 " .. Floor .. "/" .. RunLength`로 (라벨 "층"→"막"). 골드 표시 유지.
## 검증 (메이커 Play)
- 1막 보스(슬라임 킹 120) 처치 → 2막 맵·Floor 2 → 적 HP 스케일(슬라임 45→72, 보스 120→192).
- 3막 보스 처치 → "런 클리어!". HP/골드/덱/유물 막 간 유지.
- 패배 시 종료. 생성기 결정적·JSON 유효.
- (버튼 런타임 — MCP는 PickNode/PlayCard/CheckCombatEnd 직접 호출 + 상태 로그.)
## 범위 밖 (금지)
- 저장/불러오기(E6b). 막별 다른 맵 디자인·신규 적/배경·막별 보상 차등.