- Added BattleState class to manage battle flow, including turn management and event handling. - Introduced BuffInstance class to represent buffs applied to combatants. - Created CardInstance class to handle card definitions and cost calculations. - Developed CombatantState class to manage combatant attributes and actions. - Implemented EffectRegistry to apply effects based on event specifications. - Added various handlers (BlockHandler, DamageHandler, DrawHandler, etc.) to process specific events. - Created IntentPlanner and IntentState classes to manage enemy actions and intents. - Established a queue system for handling battle events with BattleEventQueue and BattleEventTask. - Introduced triggers for applying effects based on game events (e.g., OnCardDrawnGainBlockTrigger). - Added necessary UID files for new scripts to ensure proper resource management.
1.3 KiB
1.3 KiB
Project Structure
.
├── Game
│ ├── Application # Use cases / commands
│ ├── Content # Resource definitions and static data
│ │ ├── Cards
│ │ └── Test
│ ├── Infrastructure # Event bus, registry, persistence adapters
│ ├── Presentation # Scenes, UI, view binders
│ │ └── Cards
│ ├── Runtime # Battle runtime state/models
│ └── Tests # Test harness and fixtures
├── Docs
│ └── Architecture
├── addons
├── project.godot
└── Godot Playground.csproj
Notes
Game/Contentonly stores static definitions (Resource) and test resources.Game/Presentationonly handles visuals and input/view bindings.Game/Application,Game/Runtime,Game/Infrastructureimplement battle rules with GDScript.
Refactor Focus (2026-04)
- Battle runtime is being refactored to a unified event queue model.
- Card effects and buff effects share one execution path: enqueue event task -> handler applies state -> publish result event.
BattleRuleProviderwill be the single strategy switch point for autoplay and draw policies.- Documentation-first workflow: update architecture docs before each refactor phase.