function Attacker(Defender)CreatureDeath(unitName)
each time an attacking (or defending) stack of creatures is destroyed, this function is called; the `unitName` parameter is the destroyed stack.
function Attacker(Defender)CreatureMove(unitName) - is called when the turn is passed to the attacking (or defending) stack of creatures; `unitName` is this stack.
I don't know which function to use to cast at the beginning of the battle.
`Prepare()` is called when preparing for battle; `Start()` - I don't know, either after `Prepare()` or before it.
approximately like this:
function Start()
hero = GetAttacker(Defender)Hero
UnitCastAreaSpell(hero, spellID, X, Y)
end