Blade Mail - Damage return (A15W)
Based on Fan of Knives (dummy).
When Blade Mail is activated, then create a new trigger to be called when the unit that activated Blade Mail is dealt damage, or 4 seconds later. Then show the special effect (SpikeBarrier) on the caster's chest.
When the trigger is called and it wasn't because the unit was dealt damage (aka it was because the 4 sec. timer), then destroy the special effect and destroy this trigger.
If it was called because the unit was damaged, then if the damage is between 2 and 3000, the damage source is non-allied and non-structure, then if the source is a hero or a non-dummy unit, then do (1), else do (2).
(1) Make the Blade Mail wielder damage the attacker for the EventDamage with Attack Type Spells, Damage Type Fire.
(2) Make the Blade Mail wielder damage the hero of the dummy unit's owner for the EventDamage with Attack Type Spells, Damage Type Fire.
Notes: The trigger works with the recieved damage, hence damage after all reductions of the Blade Mail Wielder is returned. The returned damage is further reduced by the attacker's spell reduction, so it is actually reduced twice (if the original damage is pure, then only one reduction is applied). In case of a triggered heal, the ammount of damage returned is the original damage, because in fact you recieve the damage and then it is healed immediately. So if Void Backtracks an attack, the damage is normally returned.
Function (2) is used for dummy unit damage sources, such as Zeus' Lightning Bolt or his ultimate (the damage will be returned to Zeus in this case).
Share This Thread