Mystic bolt is based off of chain lightning. I want it to work like this: if you fire the lightning at a unit and it doesn't bounce to anything, it does 5*INT of caster as additional damage to the target. To do this I check for units around the target within the AOE range of the chain lightning. I am concerned that I might be overlooking something like invulnerable dummy units or buildings near the target that prevent the bonus damage from being applied.
-
MysticBolt
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Mystic Bolt (sorceress)
-
-
Actions
-
Set TempLoc = (Position of (Target unit of ability being cast))
-
Set EnemiesNearSpell = (Units within 500.00 of TempLoc matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
-
Unit Group - Pick every unit in EnemiesNearSpell and do (Unit Group - Remove all units of (Units within 500.00 of TempLoc matching (((Matching unit) is Magic Immune) Equal to True)) from EnemiesNearSpell)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in EnemiesNearSpell) Equal to 1
-
-
Then - Actions
-
Set Sleep_Caster = (Triggering unit)
-
Set Sleep_Target = (Target unit of ability being cast)
-
Set Sleep_Attribute = (Intelligence of Sleep_Caster (Include bonuses))
-
Set Sleep_Damage = ((Real(Sleep_Attribute)) x 5.00)
-
Unit - Cause Sleep_Caster to damage Sleep_Target, dealing Sleep_Damage damage of attack type Spells and damage type Unknown
-
Special Effect - Create a special effect attached to the overhead of Sleep_Target using Objects\Spawnmodels\Demon\DemonSmallDeathExplode\DemonSmallDeathExplode.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the overhead of Sleep_Target using Units\NightElf\Wisp\WispExplode.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_TempLoc)
-
Custom script: call DestroyGroup (udg_EnemiesNearSpell)
-
-