There are only 4 players that need to use this spell in there tower (Red, Blue, Teal, and Purple) I also attached this in a map below.
Spoiler:
First Trigger
Main Trigger
Code: Select all
CLspelltrig1
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to Last Defence!
Actions
-------- Set up the variables --------
Set CL_castpt = (Position of (Attacking unit))
Set CL_tmppt = (Position of (Attacked unit))
Set CL_real = (Angle from CL_castpt to CL_tmppt)
Set CL_tarpt = (CL_castpt offset by 100.00 towards CL_real degrees)
-------- Create the dummy --------
Unit - Create 1 Dummy for (Owner of (Attacking unit)) at CL_tarpt facing CL_tmppt
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Attacked unit)
Unit - Make (Last created unit) face CL_tmppt over 0.00 seconds
Unit - Set level of Carrier for (Last created unit) to 1
-------- Creating a special effect --------
Special Effect - Create a special effect at CL_castpt using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
Set CL_tempeff = (Last created special effect)
Custom script: call DestroyEffect(udg_CL_tempeff)
Custom script: call RemoveLocation(udg_CL_castpt)
Custom script: call RemoveLocation(udg_CL_tarpt)
-------- Now I turn on the main trigger --------
Trigger - Turn on CLspelltrig2 <gen>
Code: Select all
CLspelltrig2
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
-------- Here I pick all units of the type 'dummy' --------
Unit Group - Pick every unit in (Units of type Dummy) and do (Actions)
Loop - Actions
-------- I check which condition is met. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Set CL_tmppt = (Position of (Picked unit))
-------- Here, I go for six dummies serving as the 'beam' --------
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set CL_tmppt2 = (CL_tmppt offset by (CL_real + 100.00) towards (Facing of (Picked unit)) degrees)
Unit - Create 1 Dummy2 for (Owner of (Picked unit)) at CL_tmppt2 facing (Facing of (Picked unit)) degrees
Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
Unit - Set level of dmg for (Last created unit) to (Level of Carrier for (Picked unit))
Custom script: call RemoveLocation(udg_CL_tmppt2)
Set CL_real = (CL_real + 100.00)
Custom script: call RemoveLocation(udg_CL_tmppt)
Set CL_real = 0.00
Set CL_tmppt3 = (Position of (Last created unit))
-------- Now it's time to bring in the 'raise dead-dummy' --------
Unit - Create 1 Dummy3 for (Owner of (Picked unit)) at CL_tmppt3 facing (Facing of (Picked unit)) degrees
-------- This makes the units in the targeted area take damage equal to the level of the spell * 3 --------
Unit - Set level of Carrier for (Last created unit) to (Level of Carrier for (Picked unit))
Set CL_temprect = (Region centered at CL_tmppt3 with size (600.00, 600.00))
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in CL_temprect matching (((Matching unit) belongs to an enemy of (Owner of (Last created unit))) Equal to True)) and do (Unit - Cause (Last created unit) to damage (Picked unit), dealing 4000.00 damage of attack type Spells and damage type Normal)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-------- Almost done, I do another bunch of dummies making them move outwards (explained above) --------
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set CL_tmppt2 = (CL_tmppt3 offset by 2000.00 towards (CL_real + 36.00) degrees)
Unit - Create 1 Dummy2 for (Owner of (Picked unit)) at CL_tmppt3 facing CL_tmppt2
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Move To CL_tmppt2
Unit - Set level of dmg for (Last created unit) to (Level of Carrier for (Picked unit))
Animation - Change (Last created unit)'s size to (25.00%, 25.00%, 25.00%) of its original size
Custom script: call RemoveLocation(udg_CL_tmppt2)
Set CL_real = (CL_real + 36.00)
Set CL_real = 0.00
Unit - Remove (Picked unit) from the game
-------- And last, I create some nice blight combined with a temporary deformation to show the power of the spell --------
Environment - Create a 2.00 second Depression ripple deformation at CL_tmppt3 with starting radius 0.00, ending radius 1024.00, and depth 64.00, using 2.00 second ripples spaced 512.00 apart
Set CL_tempeff = (Last created special effect)
Custom script: call DestroyEffect(udg_CL_tempeff)
Custom script: call RemoveLocation(udg_CL_tmppt3)
Else - Actions