Well it's not purge that will deal damage but the unit that has purge.
To autocast a spell that doesn't automatically autocast, as
@Clanzion said, you need 2 triggers.
The first trigger is used to save the autocast state (ON or OFF).
I use this in my map. I use the unit custom value (Unit User Data in Jass) to avoid having to use a unit indexer.
So when the unit enters the game, if I want the spell to be autocast from the start, I set the casting unit custom value to a number, if not I set it to 0.
When a player changes the autocast state (in other words issues an order to the unit with the order sting : for example slowon or slowoff), then I change the custom value to O for OFF or a number for ON.
Now let's explain the number in question.
I use a string array containing the spell order strings (not the spell id, but the order string to cast the ability).
So when an enemy is attacked or damaged, and the attacker is my casting unit, I read the custom value. If it is 0 then nothing happens (no autocast), if the custom value is not 0, I order my attacking unit with the order string from my array.
You can chose any value if you want depending on how many autocast spells your map will need, all that matters is that when the caster enters the map or when the players changes the autocast state, just make sure that you give your unit a custom value that will correspond to the index of your array where the order for your spell is stored.
I could show you my triggers, but they're 100% in Jass and got more complicated over the months as I added other things like incapacitated state check and other things.
I hope you understand the idea.