aether-shards/.cursor/rules/logic/RULE.md
Matthew Mone 5c335b4b3c Add HubScreen and MissionBoard components for campaign management
Introduce the HubScreen as the main interface for managing resources, units, and mission selection, integrating with the GameStateManager for dynamic data binding. Implement the MissionBoard component to display and select available missions, enhancing user interaction with mission details and selection logic. Update the GameStateManager to handle transitions between game states, ensuring a seamless experience for players. Add tests for HubScreen and MissionBoard to validate functionality and integration with the overall game architecture.
2025-12-31 10:49:26 -08:00

928 B

description globs
Standards for gameplay logic, AI, and Effect processing. src/systems/*.js, src/managers/*.js**

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.