I think this should work.
[Warning]: this spell is not MUI !
If you want it MUI edit for your own proposes
Now before you read the trigger itself, a bit of explaining:
This trigger finds any unit with a buff that will be the cause of a shuriken hitting him.
The bonus of this, is, that the ability of the shuriken could be ANY ability.
I think the best ability though would be the Cluster Rockets since thats exacly what you need with a bit of edits.
You should make the ability your own buff and make it be for exacly 0.20 seconds (or whatever you want, just change it accordently [thats how you type that?] to the "Shuriken" event.
After finding a unit with the certain buff it picks a random unit within whatever range you want from him (I did 400 as you can see) and then sets him to be the next target, and then creates a dummy which will cast the ability again.
The good points of this are:
• You don't need to use waits which can cause a little "lags" beetwin the jumps.
• As I said before, you can use any ability you want.
• Making a damage system for this (if you don't use the normal ability damage) would be very easy since you can check if the unit has the certain buff.
The bad points of this are:
• Making this GUI would be a HECK of a job (maybe not hard... but long... very long)
• Without making it perfectly GUI you won't be able to check who owns the caster
And now the trigger itself:
-
Shuriken
-
Events
-
Time - Every 0.20 seconds of game time
-
Conditions
-
Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Acid Bomb) Equal to True
-
Then - Actions
-
Set Point[1] = (Position of (Picked unit))
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Random 1 units from (Units within 400.00 of Point[1])) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is alive) Equal to True
-
Then - Actions
-
Unit - Create 1 Dummy Unit for (Here you will need to implant your own system that will check who is the caster's owner, if you need help with it ill be glad to help but not now and it will probably be a very long trigger ^^) at Point[1] facing Default building facing degrees
-
Custom script: call RemoveLocation(udg_Point[1])
-
Set Point[1] = (Position of (Picked unit))
-
Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets Point[1]
-
Custom script: call RemoveLocation(udg_Point[1])
-
Else - Actions
-
Else - Actions
-
Shuriken Activation
-
Events
-
Unit - A unit Starts the effect of an ability
-
Conditions
-
(Ability being cast) Equal to Ability
-
Actions
-
Trigger - Turn on Shuriken <gen>
-
Wait 5.00 seconds
-
Trigger - Turn off Shuriken <gen>
Disclaimer: Im tired >.< , if there is any ciritcal mistake thats probably the cause.
[Edit] just as a after thought, this would also target allies, so if you don't want it to, just add a condition so it would pick only enemys of ---, this would require your own player-checker system as is written at the start of this comment.
(lol this was like the longest comment I ever made... I really wish it was worth it and it would work ^^)
I really wish it works.
Would of tested myself but im going to sleep... nighty for all the hive