Perhaps we could add the possible armies to a table and run battles with the selected ones.
Added 1 minute ago
In principle, it's possible to process the map so that triggers can be applied not to the mob near the portal, but to the portal itself.
This way, you can create one-way protection.
We process the map using a program, find groups. We collect the names of the monsters near the portal. We replace them with identical armies on all sides. When one army is destroyed, it is removed from the other side. There may be difficulties if there are more than 3 portals in a group, but they can be solved. And if the army is initially one-sided, it is necessary to create an army on the other side, which is also not easy.
Regarding treasure vaults, that's what I wanted. But it will be necessary to lower the priority to "do not touch" (there was such a standard function in the scripts) for such objects for the AI.
Added 1 hour 35 minutes ago
RedHeavenHero, can you create an array of portals (divided into groups), just like the garrisons and Dwarf Preserves, in a separate file?
NHF 0.90 : NHF - группа в VK
Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...