Right now I have a dummy spell based on Carrion Swarm, and what I want to do is that units hit by this spell will take damage equal to x*(caster's missing mana percentage). I know how to calculate the damage and how to damage the units with it, but I'm stuck on how to detect whether a unit has been hit by the Carrion Swarm.
This is my trigger right now:
And the ability Mana Wave is just Carrion Swarm which does not deal any damage.
This is my trigger right now:
Trigger:
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Mana Wave
- Actions
- Set ManaWaveDMG = ((Level of Mana Wave for (Casting unit)) x (Integer(((((Max mana of (Casting unit)) - (Mana of (Casting unit))) / (Max mana of (Casting unit))) x 100.00))))
- Set Temp_Group = Here's where I'm stuck
- Unit Group - Pick every unit in Temp_Group and do (Actions)
- Loop - Actions
- Unit - Cause (Casting Unit) to damage (Picked Unit), dealing ManaWaveDMG damage of attack type Spells and damage type Normal
- Loop - Actions
- Custom script: call DestroyGroup(udg_Temp_Group)
- Set ManaWaveDMG = 0
And the ability Mana Wave is just Carrion Swarm which does not deal any damage.