I have a spell based off of doom called "draining flames". It lights the target on fire, dealing 20 damage a second for 8 seconds to a non-hero target, then detonates dealing AOE damage (damage increases with level). If the target unit dies before the 8 seconds is up, the flames fizzle and no detonation occurs. This represents the fact that the flames were unable to draw enough energy to create the explosion.
I've tested the above and it works fine. Now that I'm this far, I would like to give the flames a 15% chance to jump to another unit upon detonation. Then if the newly spawned flame lasts 8 seconds, it too will detonate and have a 15% chance of jumping again.
My idea is to create a dummy unit with the same ability. Then add an action in the trigger to order the dummy unit to cast draining flames on a random nearby unit if (<a random integer between 1 and 100> is less than or equal to 15.)
First, would my above idea work?
Second, if the above idea is sound, how do I define what area the trigger chooses the random unit from? Let's say I want it to be able to jump up to a distance of 200 from the position of the detonation.
Third, will the random unit selection include units in range who are not valid targets for the spell (ie allied units or heroes)? If so, how do I make the random unit selection only choose from enemy units in range?
Also, while we're at it, what do you think of the spell's concept? Does it seem interesting and/or original? I hope so.
I've tested the above and it works fine. Now that I'm this far, I would like to give the flames a 15% chance to jump to another unit upon detonation. Then if the newly spawned flame lasts 8 seconds, it too will detonate and have a 15% chance of jumping again.
My idea is to create a dummy unit with the same ability. Then add an action in the trigger to order the dummy unit to cast draining flames on a random nearby unit if (<a random integer between 1 and 100> is less than or equal to 15.)
First, would my above idea work?
Second, if the above idea is sound, how do I define what area the trigger chooses the random unit from? Let's say I want it to be able to jump up to a distance of 200 from the position of the detonation.
Third, will the random unit selection include units in range who are not valid targets for the spell (ie allied units or heroes)? If so, how do I make the random unit selection only choose from enemy units in range?
Also, while we're at it, what do you think of the spell's concept? Does it seem interesting and/or original? I hope so.