Files
maplecontest/docs/slaymaple_basic_framework.md
gahusb 0b576aa3b5 Initial commit: SlayMaple 로컬 워크스페이스 + Gitea 연동
- MSW 로컬 워크스페이스 데이터(Global/RootDesk/map/ui) 형상관리 시작
- Slay the Spire 풍 덱빌더 전투 프레임워크 초안 포함
- README.md: 협업(로컬 워크스페이스+git) 방식·구조·프레임워크 현황 문서화
- .gitignore: Authorization 토큰 포함된 .mcp.json/.codex 제외

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

43 lines
2.0 KiB
Markdown

# SlayMaple Basic Framework
This project now has a small deckbuilder roguelike foundation inspired by turn-based card combat games.
## Components
- `SlayCardCatalog`: Defines card data, starter deck composition, reward pool, and card cloning.
- `SlayRunState`: Owns persistent run data such as HP, gold, floor, deck, relics, and card rewards.
- `SlayCombatManager`: Runs combat turns, draw/discard/exhaust piles, energy, enemy intents, block, damage, victory, and defeat.
All three components are attached to the `/common` entity in `Global/common.gamelogic`.
If the Maker session was already open before these files were added, reopen or reload the local workspace so the new codeblock files are imported into the editor state.
## Prototype Flow
1. `SlayRunState` starts a new run with 80 HP and a 10-card starter deck.
2. `SlayCombatManager` starts a demo combat automatically.
3. Each player turn refreshes energy to 3, clears block, rolls enemy intent, and draws 5 cards.
4. Playing a card spends energy, applies damage/block/draw/energy/status effects, then sends the card to discard or exhaust.
5. Ending the turn discards the hand, resolves enemy intent, ticks statuses, and starts the next turn.
6. Winning combat stores the remaining HP back into the run, grants 15 gold, and generates 3 card reward options.
## Useful Script Calls
From a script attached to the same `/common` entity:
```lua
self.Entity.SlayCombatManager:PlayCard(1, 1)
self.Entity.SlayCombatManager:EndPlayerTurn()
self.Entity.SlayCombatManager:DebugPlayFirstPlayable()
self.Entity.SlayRunState:PickReward(1)
self.Entity.SlayCombatManager:StartCombat("elite")
```
## Next Implementation Steps
- Add a combat UI that renders HP, block, energy, enemy intent, and 5 hand-card buttons.
- Add a map node UI with combat, elite, shop, rest, event, and boss node types.
- Add relic definitions and hooks such as `OnCombatStart`, `OnCardPlayed`, `OnTurnStart`, and `OnCombatReward`.
- Add enemy move sets as data instead of the current simple intent pattern.
- Add save/load once the run loop is playable end to end.