Greetings to all of you Spell Makers! I have a request for a spell. Here's how it goes:
Backfire - Curses a target enemy unit so that whenever it attacks it will take back a percent of the damage it dealt. Lasts 15 seconds. Level 1 - 50% of the damage backfired. Level 2 - 100% of the damage backfired. Level 3 - 150% of the damage backfired.
I'll credit anyone who makes this spell. Make it in JASS if possible, please!
I think that vampiric aura isn't the best option because will work only for melee units. Would be better if someone discover a way to do the A unit takes damage event for generic units.
hmmm i would've said vampiric potion since it's already a buff and it affects ranged also as far as i know. This way you don't have to trigger anything if this works. Otherwise you'll have to do the triggering thing.
I like the vampiric potion idea, then you could just modify it so it's an item which is used when picked up and give it to the unit Backfire is cast on
A problem could be that (other) vampiric auras/potions might override it...
Generic Damage Calculator Secondary
Events
Map initialization
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
-------- Deadly Aim --------
Trigger - Add to Deadly Aim <gen> the event (Unit - (Picked unit) Takes damage)
Generic Damage Calculator
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
-------- Deadly Aim --------
Trigger - Add to Deadly Aim <gen> the event (Unit - (Entering unit) Takes damage)
Try it out, it will result in what is basically a generic "Unit Takes Damage" Event.
Note that it will also work with any of the preplaced specific events. However it may not be that efficient, I'm not too sure but I get the feeling that constantly adding events to a trigger will cause leaks or some other lag causing reactions.