1.4 KiB
1.4 KiB
Legacy Engine Map
The legacy engine lives in legacy/hwe/sammo/ and follows domain-first
organization rather than endpoint-first routing.
Core Domains
Command/: turn actions (general/nation commands) and resolution rulesAPI/: engine operations for UI and automationEvent/,StaticEvent/: dynamic and scheduled event processingGeneral*,Nation*,WarUnit*,City*: entities and combat/city stateAction*,Special*: traits, personalities, special actions, scenario effectsTrigger*,*Trigger: conditional logic and state transitionsScenario/,Scenario.php: scenario loading and rulesetsDTO/,VO/,Enums/,Constraint/: shared types and validation
Endpoint Patterns
- JSON APIs:
legacy/hwe/j_*.php - Vue multi-entry pages:
legacy/hwe/v_*.php - PHP + jQuery pages:
legacy/hwe/b_*.phpand handlerslegacy/hwe/c_*.php - Modern router:
legacy/hwe/api.phpdispatches intolegacy/hwe/API/
Frontend and Assets
- Vue/TypeScript UI:
legacy/hwe/ts/ - Shared components:
legacy/hwe/ts/components/ - Styles:
legacy/css/andlegacy/hwe/scss/ - Templates:
legacy/hwe/templates/
Trigger Composition for Generals (Outline)
- Trigger evaluation order and priority rules
- "attempt" then "execute" phases
- Common trigger categories (traits, specials, scenario effects)
- How triggers combine when multiple sources apply