diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-25 11:20:10 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-25 11:20:10 +0300 |
| commit | bccae28a00af19dc095910073e7e820aa81dc393 (patch) | |
| tree | 77f8f37bff10b6274a84b87fd7f3b3e329089c1b /docs/tomes | |
| parent | 05fe0d6d8c10629d0b485d1eb3c1e25279164a53 (diff) | |
| download | fparkan-bccae28a00af19dc095910073e7e820aa81dc393.tar.xz fparkan-bccae28a00af19dc095910073e7e820aa81dc393.zip | |
feat(ai): guard the least defended clan building
Execute Handler(37) from the live clan roster, rank nearby guard strength and feed the existing protection scheduler. Keep the native strict 250-unit radius, first tie and empty-roster sentinel. Count approximate selections by clan and target in simulation reports.
The GOG AI handler was called directly for weak buildings, equal strength, the radius boundary and an empty roster. Stock missions 8, 9 and 10 now assign guard patrols before reaching the next explicit script blocker. Mission 9 ran in the window with clean Vulkan validation. The existing factory protection regression and workspace checks pass.
Diffstat (limited to 'docs/tomes')
| -rw-r--r-- | docs/tomes/06-behavior.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/tomes/06-behavior.md b/docs/tomes/06-behavior.md index de346bf1..b04a996d 100644 --- a/docs/tomes/06-behavior.md +++ b/docs/tomes/06-behavior.md @@ -363,6 +363,19 @@ SHA-256 DLL `c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc`. ### Патруль у завода +`Handler(37)` расширяет выбор охраны на все свои строения с логическим ID. +Для каждого он складывает силу своих машин ближе 250 единиц по горизонтали +и выбирает строение с наименьшей суммой. На самой границе машина не входит +в охрану. При равенстве сохраняется первое строение в реестре. +Поэтому сценарий может отправить свободных варботов к удалённому зданию, +у которого пока нет прикрытия. + +Вызов GOG `ai.dll` по RVA `0xcedf` подтвердил границу, выбор меньшей силы +и порядок при равенстве. SHA-256 DLL +`c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc`. +При пустом списке возвращается ID `0xffffffff`, а выходная оценка получает +DWORD от усечения исходного значения `1e12_f32`. + `PBM_BUILDING_PROTECT_Start` сравнивает силу машин возле завода с порогом сценария. При достаточной охране заявка переходит в `ST_SOLVING` без нового приказа. В действующей заявке `PBM_BUILDING_PROTECT_Continue` |
