You are creating the dummy at C_DamagePoints. Re-setting a variable to track the dummy's location is unnecessary. You already know it, by C_DamagePoints variable, because this is where you create it in the first place. So, use
C_DamageUnits = (Units within 100.00 of C_DamagePoints instead.
-
Set C_RealDamage = (C_Damage + (Real((Level of Spirit Shards for C_Caster[C_Integer]))))
This will cause the spell to damage the enemies for the static damage a user can set in the map initialization + the level of the ability (which should be multiplied, actually, this is how most formulas work).
I'll give you an example:
A user wants to deal 20, 60, 100, 140 damage to a unit per level.
If the user configures C_Damage to 20, then the formula would result
(40 * (Level of (Ability being cast) for (Triggering unit)) - C_Damage).
When you are going to damage the units in your loop trigger (a.k.a. Sp Duration), you force the spell to deal C_Damage + (Level of ability) = 20 + 1 = 21 damage; for level 2 = 20 + 2 = 22 damage. See that?
What you should do is not leave the variable configurable in the Map Initialization, but in the trigger that detects the casting of the spell (a.k.a. Sp Cast). This would end up being
Set C_Damage[C_IndexSize] = (40 * (Level of (Ability being cast) for (Triggering unit)) - 20).
Now, in the Sp Duration, you will load it back to damage the units:
-
Unit Group - Pick every unit in C_DamageUnits and do (Actions)
-
Loop - Actions
-
Unit - Cause C_Caster[C_Integer] to damage (Picked unit), dealing C_RealDamage[C_Integer] damage of attack type Spells and damage type Normal
-
If ((C_Dummy[C_Integer] is dead) Equal to True) then do (Skip remaining actions) else do (Do nothing)
Yes, delete this.