print("sovereign vs zehir - no shield")
d = GetGameVar("C6M5_diff") + 0;
death = 0

--monsters: alot of cerberi, pit fiends and frightful nightmares

function Prepare()
	EnableCinematicCamera(nil);
	sleep(10);
	AddCreature(DEFENDER, 18, 50 + d * 15, 4, 3);
	sleep(10);
	AddCreature(DEFENDER, 20, 60 + d * 10, 4, 5);
	sleep(10);
	AddCreature(DEFENDER, 18, 50 + d * 15, 4, 7);
	sleep(10);
end

function Start()
	EnableAutoFinish(nil);
	sleep(10);
	SummonCreature(DEFENDER, 24, 35 + d * 5, 10, 8);
	sleep(1);
	AddCreature(DEFENDER, 85, 45 + d * 5, 10, 5);
	sleep(10);
	SummonCreature(DEFENDER, 24, 35 + d * 5, 10, 2);
	sleep(10);
	EnableCinematicCamera(not nil);
end

function DefenderCreatureDeath()
	death = death + 1
	if death == 1 then
		sleep(10);
		SummonCreature(DEFENDER, 42, 15 + d * 5, 8, 6);
	end
	if death == 2 then
		sleep(10);
		SummonCreature(DEFENDER, 22, 40 + d * 10, 10, 5);
	end
	local defenders = GetDefenderCreatures();
	if (length(defenders) == 0) then Finish(ATTACKER) end;
end

function AttackerCreatureDeath()
	local attackers = GetAttackerCreatures();
	if (length(attackers) == 0) then Finish(DEFENDER) end;
end

function DefenderHeroMove(heroName)
	UnitCastGlobalSpell(GetDefenderHero(), 239);
	return not nil
end
