Разведка М3 (ядро): тайные операции -- группа до 10 пехоты/лучников, до 2 операций, проверки обнаружения, прерывание и возврат

- Разведка: CheckCovertGroup, StartCovert, CheckCovertUntil (15/25/35%, при входе и каждые 5 реальных минут, максимум при пересечении, 5-75%, детерминированно по одной сетке), EndCovert; сохранение covert=
- Армия: AvailableUnits, TakeUnitsForMarch -- поход точного состава
- Мир: AbortMission -- домой от места обнаружения, без отчёта; охраняемые области и позиция армии через IWorldMap
- Карта: «Тайно» в окне атаки и окне чужой армии, окно «РАЗВЕДЧИКОВ ЗАМЕТИЛИ»
- «Шпион» -- переключатель IntelligenceConfig (ТЕСТ); 5 тестов

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alexander
2026-11-06 17:15:22 +01:00
co-authored by Claude Opus 5.5
parent 56a5a82a8c
commit 2835c514d8
18 changed files with 622 additions and 14 deletions
+14 -2
View File
@@ -53,6 +53,9 @@ public static class ReconReportText
// пойдёт рядом время наблюдения и вернётся с отчётом. Воинов -- до ArmyReconSoldiers из свободных
public const int ArmyReconSoldiers = 10;
// Тайный режим разведки (Разведка М3): общий для окна атаки и окна чужой армии
public static bool CovertMode;
public static void OpenArmyWindow(KnownContact army, System.Action<string> hint)
{
var card = UIKit.Modal("ЧУЖАЯ АРМИЯ", out GameObject root);
@@ -64,6 +67,14 @@ public static class ReconReportText
int free = GameServices.TryGet(out IArmy myArmy) ? myArmy.AvailableForMarch : 0;
int soldiers = Mathf.Min(ArmyReconSoldiers, free);
bool spy = GameServices.TryGet(out IIntelligence spyIntel) && spyIntel.CovertEnabled;
if (spy)
UIKit.Button(card, CovertMode ? "Тайно: ВКЛ (до 10 пехоты и лучников)" : "Тайно: выкл", CovertMode ? UIKit.Theme.Green : UIKit.Theme.Gray, () =>
{
CovertMode = !CovertMode;
Object.Destroy(root);
OpenArmyWindow(army, hint);
}, -1, 70, 24);
UIKit.Text(card, soldiers > 0 ? $"Отправить {soldiers} воинов: догонят армию, пойдут рядом и вернутся с отчётом. Без боя."
: "Нет свободных воинов для разведки", 22, UIKit.Theme.TextDim, TextAlignmentOptions.Center);
for (int level = 2; level <= 3; level++)
@@ -75,8 +86,9 @@ public static class ReconReportText
UIKit.Text(card, $"Разведка {name}: {plan}", 22, ok ? UIKit.Theme.Text : UIKit.Theme.Gold, TextAlignmentOptions.Center);
var b = UIKit.Button(card, $"Разведка {name}", ok && soldiers > 0 ? UIKit.Theme.Blue : UIKit.Theme.Gray, () =>
{
bool started = MarchManager.Instance.TryStartArmyRecon(army.ArmyId, soldiers, lv, out string err);
hint?.Invoke(started ? $"Разведка {name}: {soldiers} воинов идут догонять армию" : "Разведка не начата: " + err);
bool covert = spy && CovertMode;
bool started = MarchManager.Instance.TryStartArmyRecon(army.ArmyId, soldiers, lv, covert, out string err);
hint?.Invoke(started ? $"Разведка {name}{(covert ? " (тайно)" : "")}: воины идут догонять армию" : "Разведка не начата: " + err);
Object.Destroy(root);
}, -1, 80, 26);
b.interactable = ok && soldiers > 0;