Core Modules (game-agnostic, reusable for WarFactory): - ResourceModule: Inventory, crafting system (465 lines) - StorageModule: Save/load with pub/sub state collection (424 lines) - CombatModule: Combat resolver, damage/armor/morale (580 lines) - EventModule: JSON event scripting with choices/outcomes (651 lines) MC-Specific Modules: - GameModule v2: State machine + event subscriptions (updated) - TrainBuilderModule: 3 wagons, 2-axis balance, performance malus (530 lines) - ExpeditionModule: A→B expeditions, team management, events integration (641 lines) Features: - All modules hot-reload compatible (state preservation) - Pure pub/sub architecture (zero direct coupling) - 7 config files (resources, storage, combat, events, train, expeditions) - 7 test suites (GameModuleTest: 12/12 PASSED) - CMakeLists.txt updated for all modules + tests Total: ~3,500 lines of production code + comprehensive tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
1.3 KiB
JSON
30 lines
1.3 KiB
JSON
{
|
|
"formulas": {
|
|
"hit_base_chance": 0.7,
|
|
"armor_damage_reduction": 0.5,
|
|
"cover_evasion_bonus": 0.3,
|
|
"morale_retreat_threshold": 0.2
|
|
},
|
|
"combatRules": {
|
|
"max_rounds": 20,
|
|
"round_duration": 1.0,
|
|
"simultaneous_attacks": true
|
|
},
|
|
"lootTables": {
|
|
"victory_loot_multiplier": 1.5,
|
|
"casualty_loot_chance": 0.3,
|
|
"retreat_loot_multiplier": 0.5
|
|
},
|
|
"notes": {
|
|
"usage_mc": "Mobile Command: expedition teams vs scavengers/bandits. Casualties are permanent for humans, repairable for drones.",
|
|
"usage_wf": "WarFactory: army units (tanks, infantry) vs enemy forces. Casualties reduce army strength, loot is salvaged equipment.",
|
|
"hit_base_chance": "Base probability of hitting a target before modifiers (0.0-1.0)",
|
|
"armor_damage_reduction": "Multiplier for armor effectiveness (0.5 = armor reduces damage by 50%)",
|
|
"cover_evasion_bonus": "Additional evasion bonus from environmental cover (0.3 = 30% harder to hit)",
|
|
"morale_retreat_threshold": "Morale level below which units may retreat (0.2 = 20% morale)",
|
|
"max_rounds": "Maximum combat rounds before resolution (prevents infinite combat)",
|
|
"round_duration": "Real-time duration of each combat round in seconds",
|
|
"simultaneous_attacks": "If true, both sides attack each round. If false, only attackers attack."
|
|
}
|
|
}
|