diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-25 11:30:01 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-25 11:30:01 +0300 |
| commit | b553096eb9a4d9ccaa46ec2616c5c392e8a39325 (patch) | |
| tree | 9f0ac5f80a13cd765307e67c47ed570b314c38cf /crates/fparkan-runtime/src/lib.rs | |
| parent | bccae28a00af19dc095910073e7e820aa81dc393 (diff) | |
| download | fparkan-b553096eb9a4d9ccaa46ec2616c5c392e8a39325.tar.xz fparkan-b553096eb9a4d9ccaa46ec2616c5c392e8a39325.zip | |
feat(ai): evaluate scripted area defence strength
Execute Handler(44) for XY and logical-object targets, an explicit clan or hostile clans. Reuse the strict horizontal radius calculation and report approximate query counts by clan, event and instruction.
Direct GOG AI DLL calls cover target forms, DWORD coordinates, clan filtering, missing targets and the radius boundary. A stock mission regression runs the query through the script dispatcher. Five affected missions complete 900 simulated seconds, with the remaining point-group selection failures exposed explicitly. Mission 10 ran in the window with clean Vulkan validation. Workspace formatting, checking and tests pass.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 722c7750..78144fa3 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -45,6 +45,7 @@ mod autodemo; mod boarding; mod building_door; mod clan_ai_events; +mod clan_area_strength; mod clan_combat_groups; mod clan_combat_strength; mod clan_problem_conditions; @@ -2966,6 +2967,7 @@ pub struct SimulationReport { pub script_attack_queries: Vec<(usize, u64)>, pub script_factory_defence_queries: Vec<(usize, u32, u64)>, pub script_building_defence_queries: Vec<(usize, u32, u64)>, + pub script_area_strength_queries: Vec<(usize, usize, usize, u64)>, pub script_base_threat_queries: Vec<(usize, u32, u64)>, pub script_group_orders: Vec<(usize, u32, u64)>, pub script_problem_waits: Vec<(usize, u32, u64)>, @@ -3021,6 +3023,7 @@ pub fn simulate_mission_report( script_attack_queries: Vec::new(), script_factory_defence_queries: Vec::new(), script_building_defence_queries: Vec::new(), + script_area_strength_queries: Vec::new(), script_base_threat_queries: Vec::new(), script_group_orders: Vec::new(), script_problem_waits: Vec::new(), @@ -3122,6 +3125,9 @@ pub fn simulate_mission_report( .script_building_defence_queries .extend(loaded.clan_ai_events.building_defence_queries()); report + .script_area_strength_queries + .extend(loaded.clan_ai_events.area_strength_queries()); + report .script_base_threat_queries .extend(loaded.clan_ai_events.base_threat_queries()); report |
