There a 2 things with triggers:
1- Leaks
When you use (Position of (Triggering Unit)) te game Creates a Location: After you use it, it remains there in the data: After a while, you'll find you have hundreds and dousands of locations you're not using, and you can't use, since they're only created for one purpuse like this one: creating a unit.
For that, you declare a position in a variable, just as you did, then you use it in the unit creation, then you use a custom script to remove/clear/clean that variable.
-
Set Electric_Stun_Target = (Target unit of ability being cast)
-
Unit - Create unit at Electric_Sun_Target
-
Custom script: call RemoveLocation(udg_Electric_Sun_Target)
That happens for ANY case. Else, you will experience some lag after several leaks stack up, making your map unplayable.
2- Optimization
Have you seen the parentheses in your actions? Each pair of parentheses is an argument Wc3 uses to run the functions. If you use (Owner of (Triggering Unit)) you have 2 Pair of parentheses. (Owner of...) and (Triggering Unit). In any "Unit - Generic event" you can replace that with (Triggering Player) and voilá, a pair of parentheses is gone. It means Wc3 has less work to do, so it will run faster and smoother.
Now, you're using (Last Created Unit) 3 times, that's like telling Wc3 to search for the same thing three times. That's a time and resource waste. You can create the unit, and declare the Last Created Unit into a variable (lest call it TempUnit) . Then, you use that variable to store the last created unit (Set TempUnit = (last created Unit)). After that, in the remaining actions, you use TempUnit instead of (last created unit) and you'll notice the parentheses dissapear. Again, less work, faster work, smoother result. That MUST be done every time you use anything more than twice in a trigger.
In GUI, most of these functions have BJ's, which are functions that calls other functions. It's like asking your mom to tell your dad to call your brother to give you the ketchup when you're all in the same table; you can do it directly, but the GUI functions doesn't allow it.
The only way to access them is with JASS scripts (GUI turned to JASS and optimized to remove BJ's and replacing globals with locals)