I'm back to TheHelper after like, uh, 4 months? Well, anyway my PC was broken for a very long time, so I was unable to log here. I'm sorry to people who posted in my threads of spell ideas. I will reward you all with +rep for your effort.
Anyway, back to topic, I have this trigger:
What I want to know is: Is there a way to make this trigger even more simple, without losing its effect?
Anyway, back to topic, I have this trigger:
Code:
Thunder Rage
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Thunder Rage
Actions
Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Heavy)
Set TR_Weather = (Last created weather effect)
Environment - Turn TR_Weather On
Set TR_CasterLoc = (Position of (Triggering unit))
Set TR_Level = (Level of Thunder Rage for (Triggering unit))
Set TR_Angle = (Facing of (Triggering unit))
Set TR_Region = (Region centered at TR_CasterLoc with size (50.00, 50.00))
For each (Integer A) from 1 to (3 x TR_Level), do (Actions)
Loop - Actions
Set TR_Angle = (TR_Angle + (120.00 / (Real(TR_Level))))
Set TR_OffsetLoc[(Integer A)] = (TR_CasterLoc offset by 550.00 towards TR_Angle degrees)
Special Effect - Create a special effect at TR_OffsetLoc[(Integer A)] using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Create 1 Thunder Rage (Lightning Spheres) for (Owner of (Triggering unit)) at TR_OffsetLoc[(Integer A)] facing Default building facing degrees
Set TR_Dummy[(Integer A)] = (Last created unit)
Custom script: call RemoveLocation (udg_TR_OffsetLoc [bj_forLoopAIndex])
Unit - Order TR_Dummy[(Integer A)] to Move To TR_CasterLoc
Unit - Add a 4.00 second Generic expiration timer to TR_Dummy[(Integer A)]
For each (Integer A) from 1 to (3 x TR_Level), do (Actions)
Loop - Actions
Wait until ((TR_Region contains TR_Dummy[(Integer A)]) Equal to True), checking every 0.10 seconds
Custom script: call RemoveRect (udg_TR_Region)
Animation - Play (Triggering unit)'s throw animation
Wait 0.50 seconds
Special Effect - Create a special effect at TR_CasterLoc using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Destructible - Pick every destructible within 350.00 of TR_CasterLoc and do (Actions)
Loop - Actions
Destructible - Kill (Picked destructible)
Set TR_Angle = (Facing of (Triggering unit))
For each (Integer A) from 1 to (3 x TR_Level), do (Actions)
Loop - Actions
Set TR_Angle = (TR_Angle + (120.00 / (Real(TR_Level))))
Set TR_OffsetLoc2 = (TR_CasterLoc offset by 500.00 towards TR_Angle degrees)
Special Effect - Create a special effect at TR_OffsetLoc2 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Destructible - Pick every destructible within 350.00 of TR_OffsetLoc2 and do (Actions)
Loop - Actions
Destructible - Kill (Picked destructible)
Set TR_Group = (Units within 350.00 of TR_OffsetLoc2 matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is Mechanical) Equal to False)))
Unit Group - Pick every unit in TR_Group and do (Actions)
Loop - Actions
Unit - Cause (Triggering unit) to damage (Picked unit), dealing (100.00 + (40.00 x (Real(TR_Level)))) damage of attack type Spells and damage type Magic
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TR_OffsetLoc2 facing Default building facing degrees
Unit - Add Thunder Rage (Purge) to (Last created unit)
Unit - Order (Last created unit) to Orc Shaman - Purge (Picked unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call DestroyGroup (udg_TR_Group)
Custom script: call RemoveLocation (udg_TR_OffsetLoc2)
Custom script: call RemoveLocation (udg_TR_CasterLoc)
Wait 0.50 seconds
Environment - Remove TR_Weather
What I want to know is: Is there a way to make this trigger even more simple, without losing its effect?