Auto-translated
Question about combat scripts. I want to create a boss battle, but not a simple one. The battle starts against a succubus and a devil. After the succubus is killed, the devil disappears and an archdemon spawns. If the devil dies first, the succubus disappears and a temptress is summoned. The question is, what commands are used to do this, and is it even possible (will the battle end after only one unit is killed, and are there any other pitfalls)?
EnableAutoFinish(nil)
function DefenderCreatureDeath(unit)
if(GetCreatureType(unit) == 21) then
removeUnit("devil's name")
SummonCreature(DEFENDER,28,10,-1,-1)
end
if(GetCreatureType(unit) == 27) then
removeUnit("succubus's name")
SummonCreature(DEFENDER,134,10,-1,-1)
end
end
I don't know how to remove units that are present at the beginning of the battle (you need their scripted name).
But for those that are summoned, the name is written at the end:
SummonCreature(DEFENDER, CREATURE_DEVIL, 1, 11, -1, 1, 'Devil')