# 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.