-
Grand Illusion
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Grand Illusion (text not done)
-
-
Actions
-
-------- setting up --------
-
Set VariableSet GrandIllusion_Caster = (Triggering unit)
-
Set VariableSet GrandIllusion_Damage = ((Real((Level of Grand Illusion (text not done) for GrandIllusion_Caster))) x (125.00 + ((Real((Intelligence of GrandIllusion_Caster (Include bonuses)))) x 0.50)))
-
Game - Display to (All players) the text: (String(GrandIllusion_Damage))
-
-------- --------
-
Unit Group - Add GrandIllusion_Caster to GrandIllusion_CasterGroup
-
Unit Group - Pick every unit in GrandIllusion_CasterGroup and do (Actions)
-
Loop - Actions
-
Hashtable - Save 6.00 as 0 of (Key (Picked unit).) in GrandIllusion_Hash.
-
Hashtable - Save GrandIllusion_Damage as 2 of (Key (Picked unit).) in GrandIllusion_Hash.
-
-
-
Hashtable - Save Handle OfGrandIllusion_Caster as 1 of (Key (Triggering unit).) in GrandIllusion_Hash.
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Grand Illusion Loop <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Grand Illusion Loop <gen>
-
-
Else - Actions
-
-
-
-
Grand Illusion Loop
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in GrandIllusion_CasterGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet GrandIllusion_Time = (Load 0 of (Key (Picked unit).) from GrandIllusion_Hash.)
-
Set VariableSet GrandIllusion_Caster = (Load 1 of (Key (Picked unit).) in GrandIllusion_Hash.)
-
Set VariableSet GrandIllusion_Damage = (Load 2 of (Key (Picked unit).) from GrandIllusion_Hash.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GrandIllusion_Time Greater than 0.00
-
(GrandIllusion_Caster is alive) Equal to True
-
-
Then - Actions
-
Set VariableSet GrandIllusion_Loc = (Position of GrandIllusion_Caster)
-
Set VariableSet GrandIllusion_DamageGroup = (Units within 600.00 of GrandIllusion_Loc.)
-
Hashtable - Save (GrandIllusion_Time - 0.50) as 0 of (Key (Picked unit).) in GrandIllusion_Hash.
-
-------- setting up unit group 1 --------
-
Unit Group - Pick every unit in GrandIllusion_DamageGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) belongs to an enemy of (Owner of GrandIllusion_Caster).) Equal to True
-
((Picked unit) is alive) Equal to True
-
((Picked unit) is A structure) Equal to False
-
((Picked unit) is Mechanical) Equal to False
-
((Picked unit) is Magic Immune) Equal to False
-
-
Then - Actions
-
Else - Actions
-
Unit Group - Remove (Picked unit) from GrandIllusion_DamageGroup.
-
-
-
-
-
-------- location clean up --------
-
Custom script: call RemoveLocation (udg_GrandIllusion_Loc)
-
-------- Picking random unit from group to create dummy --------
-
Unit Group - Pick every unit in (Random 1 units from GrandIllusion_DamageGroup) and do (Actions)
-
Loop - Actions
-
-------- setting target --------
-
Set VariableSet GrandIllusion_Target = (Picked unit)
-
-------- setting loc --------
-
Set VariableSet GrandIllusion_Loc2 = (Position of GrandIllusion_Target)
-
-------- dummy --------
-
Unit - Create 1 Grand Illusion for (Owner of GrandIllusion_Caster) at GrandIllusion_Loc2 facing Default building facing degrees
-
Set VariableSet GrandIllusion_Unit = (Last created unit)
-
-------- --------
-
-------- location clean up --------
-
Custom script: call RemoveLocation (udg_GrandIllusion_Loc2)
-
Unit - Order GrandIllusion_Unit to Night Elf Mountain Giant - Taunt.
-
Unit - Add a 0.50 second Generic expiration timer to GrandIllusion_Unit
-
Unit - Turn collision for GrandIllusion_Unit Off.
-
Animation - Change GrandIllusion_Unit's vertex coloring to (0.00%, 75.00%, 100.00%) with 40.00% transparency
-
-------- setting damage location --------
-
Set VariableSet GrandIllusion_Loc3 = (Position of GrandIllusion_Unit)
-
-------- setting damage group --------
-
Set VariableSet GrandIllusion_DamageGroup2 = (Units within 300.00 of GrandIllusion_Loc3.)
-
Unit Group - Pick every unit in GrandIllusion_DamageGroup2 and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) belongs to an enemy of (Owner of GrandIllusion_Caster).) Equal to True
-
((Picked unit) is alive) Equal to True
-
((Picked unit) is A structure) Equal to False
-
((Picked unit) is Mechanical) Equal to False
-
((Picked unit) is Magic Immune) Equal to False
-
-
Then - Actions
-
-------- damage --------
-
-------- this sometimes deals around 900 damage --------
-
-------- even that I checked that the damage is loaded correctly --------
-
Game - Display to (All players) the text: (String(GrandIllusion_Damage))
-
Unit - Cause GrandIllusion_Caster to damage GrandIllusion_Target, dealing GrandIllusion_Damage damage of attack type Spells and damage type Magic
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from GrandIllusion_DamageGroup2.
-
-
-
-
-
-
-
-------- location clean up --------
-
Custom script: call DestroyGroup (udg_GrandIllusion_DamageGroup)
-
Custom script: call DestroyGroup (udg_GrandIllusion_DamageGroup2)
-
Custom script: call RemoveLocation (udg_GrandIllusion_Loc3)
-
-
Else - Actions
-
-------- clean up --------
-
Unit Group - Remove GrandIllusion_Caster from GrandIllusion_CasterGroup.
-
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in GrandIllusion_Hash.
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in GrandIllusion_CasterGroup) Less than or equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Unit Group - Remove all units of GrandIllusion_CasterGroup from GrandIllusion_CasterGroup.
-
-
Else - Actions
-
-
-
-
-
Hello again hivers. The more you try, the more issues.
So what I wanted this ability to do is:
Pick units within 600 AoE of the Caster
Creates an image to random unit - image casts skill that then deals damage to units within 300 AoE
The taunt is only for eye candy, since the effect is pretty cool in reforged
Issues:
The units in DamageGroup2 don't take the damage, only one unit takes the damage.
Dead units are not filtered out of DamageGroup2
Sometimes one unit takes multiple times the damage it is supposed to take. Around 900 or even more sometimes.
Sorry for the long triggers, I tried to add some comments this time to make it easier to read.
Cheers!