Skip to content

Unity of the Elements

User Avatar
#104
Auto-translated
Heroist
I'm not sure if I can do it properly.

Added 36 seconds ago
I initially created this function for testing.
function CombatResults()
local c = GetLastSavedCombatIndex()
local side = (GetSavedCombatArmyHero(c, 1) == "Alaric" and 1) or (GetSavedCombatArmyHero(c, 0) == "Alaric" and 0)
if side then
for i=0,GetSavedCombatArmyCreaturesCount(c, side) - 1 do
local id, num, dead = GetSavedCombatArmyCreatureInfo(c, side, i)
if id == CREATURE_TITAN and dead == num then
AddHeroCreatures("Alaric", CREATURE_TITAN, 1)
end
end
end
end

Trigger(COMBAT_RESULTS_TRIGGER, "CombatResults")
If all of the hero's Titans die in battle, one is restored to him.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4