Add Feature
Process
- •Read existing code in target area
- •Identify integration points
- •Implement minimal code
- •Emit events via EventBus if needed
Key Directories
| Area | Location |
|---|---|
| Systems | src/systems/ |
| Scenes | src/scenes/ |
| UI | src/ui/ |
| Data | src/data/ |
Conventions
- •One system per file
- •Use EventBus for cross-module communication
- •Follow existing patterns in codebase
- •Keep functions small and focused
EventBus Integration
typescript
import { EventBus, BATTLE_EVENTS } from '../events';
EventBus.emitBattle(BATTLE_EVENTS.EVENT_NAME, payload);
Example
Input: "Ajoute un système de fuite en combat"
Output: Add flee logic in BattleSystem.ts with event emission