aether-shards/.cursor/rules/logic/RULE.md
Matthew Mone a9d4064dd8 Implement Marketplace system and enhance game state management
- Introduce the Marketplace system, managed by MarketManager, to facilitate buying and selling items, enhancing player engagement and resource management.
- Update GameStateManager to integrate the new MarketManager, ensuring seamless data handling and persistence for market transactions.
- Add specifications for the Marketplace UI, detailing layout, functionality, and conditions of acceptance to ensure a robust user experience.
- Refactor existing components to support the new marketplace features, including dynamic inventory updates and currency management.
- Enhance testing coverage for the MarketManager and MarketplaceScreen to validate functionality and integration within the game architecture.
2025-12-31 13:52:59 -08:00

24 lines
947 B
Markdown

---
description: Standards for gameplay logic, AI, and Effect processing.
globs: src/systems/*.js, src/managers/*.js**
alwaysApply: false
---
# **Logic Systems Standards**
## **Effect Processor**
- **The Rulebook:** All game state mutations (Damage, Move, Spawn) **MUST** go through EffectProcessor.process().
- **Statelessness:** The processor should not hold state. It acts on the Unit and Grid passed to it.
- **Schema:** Effects must adhere to the EffectDefinition interface (Type \+ Params).
## **AI Controller**
- **Pattern:** Utility-Based Decision Making.
- **Execution:** AI does not cheat. It must use the same Pathfinding and SkillManager checks as the player.
- **Archetypes:** Logic must be driven by AIBehaviorProfile (e.g., Bruiser vs Kiter).
## **Unit Manager**
- **Role:** Single Source of Truth for "Who is alive?".
- **Queries:** Use getUnitsInRange() for spatial lookups. Do not iterate the Grid manually to find units.