BlueHeavenHeroВсем привет. Недавно узнал, что возможно с помощью скриптов контролировать армию врага в зависимости от уровня сложности. Как именно это можно сделать?
Ну, например так:
function HeroesBuff()
local heroes = {"Duncan", "Biara"};
local diff = GetDifficulty();
for h,hero in heroes do
for creatureID = 1, CREATURES_COUNT - 1 do
if GetObjectCreatures( hero, creatureID) >= 1 then
HeroSetUp = GetObjectCreatures( hero, creatureID );
RemoveObjectCreatures( hero, creatureID, HeroSetUp );
AddObjectCreatures( hero, creatureID, HeroSetUp + ( HeroSetUp / 100 * 10) * diff );
end;
end;
end;
end;