
Originally Posted by
Tales
Borrowed Time (A0NS)
Based on Windwalk, with a 0.01 seconds duration (enough to stop channeling spell or for missiles in mid flight to miss him).
Whenever a unit learns Borrowed Time for the first time, create a new trigger which is called whenever the unit is damaged or when the unit's skill goes into effect.
Now, if this trigger is called because the unit has been damaged and stateBorrowedTimeActive is 1 (which means true for booleans), then do the advanced triggered healing trigger, if it was called because Borrowed Time came into effect, or because the unit is damaged and BorrowedTimeCD is not active and the unit's life is lower than 400 then remove the unit's Negative Buff, the if it was called because the unit has been damaged, then disable this same trigger, order Abaddon to use WindWalk (note that this order basically says: "Stop whatever the hell you're doing and use windwalk", so if for example you're chasing someone and BorrowedTime activates then you'll have to reapply the attack order as Abaddon will lose all commanded orders when this autoactivates) and reenable this trigger. Then set "BorrowedTimeActive" as active for 2+BorrowedTimelvl and "BorrowedTimeCD" as active for 45 seconds, then put the FX on top of Abaddon.
Advanced Triggered Healing: First 1*Check that the unit is alive, then see 2*if the incoming damage is bigger than MaxLife-CurrentLife then 3*if the incoming damage is bigger than Current Life set the unit's life to MaxLife and create the delayed damage healing to be: EventDamage-(MaxLife-CurrentLife). If 3* is false, call the delayed damage with EventDamage. If 2* is false, then simply set the unit's life to CurrentLife+EventDamage. Of course if 1* is false do nothing.
Share This Thread