Trigger:Leap
Accessed 565 times
|
Last modified 05:46, 24 September 2008 by Wyvernoid.
From DotA Allstars Wiki
| Trigger: Leap
|
| Implementation
| Priestess of the Moon's Leap
|
| Main Ability
| A0LN
| Derived From
| AOwk
|
| Abilities Used
| A0LO
|
| Dummy Units Created
| e01R
|
| Events Registered
|
- Any unit's spell comes into effect: Initial
|
|
Initial
- Check if the spell cast is Leap. If so, continue the execution; if not, quit the execution.
- Set OriginalDistance to
350 + 50 * (Level of Leap).
- Set LandingLocation, the final landing location of Leap, to the polar projection of Mirana's current location, by the angle of Mirana's current facing, and the length of OriginalDistance.
- Cap LandingLocation at the playable map border if it is beyond the border.
- Set OriginalDistance to the distance between Mirana's current location and LandingLocation.
- Check if OriginalDistance is greater than 100. If so, continue to the next step; if not, quit the execution of the trigger.
- Add the ability Amrf to Mirana and immediately remove it.
- Remove the pathing of Mirana, set her animation to 6 (walking), and issue to her the order "stop".
- Cache the following variables: OriginalDistance, DistanceRemaining (with the value of OriginalDistance), Angle (with the value of Mirana's current facing), Hero (with the value of Mirana herself).
- Create a timer that runs the procedure While in Air every 0.025 seconds.
While in Air
- Recover from cache the following variables: OriginalDistance, DistanceRemaining, Angle, Hero.
- Set FlyHeight to
(1 - DistanceRemaining / OriginalDistance) * 400.
- Check if FlyHeight is greater than 200. If so, set FlyHeight to
400 - FlyHeight; if not, continue to the next step.
- The above two steps makes it so that the leaping trail of Mirana is a triangle, with its top 200 units high.
- Set Mirana's flying height to FlyHeight or 0, whichever is greater.
- This ensures that Mirana doesn't go underground at potentially the last tick.
- Move Mirana 30 units forth in the direction of Angle.
- Set Mirana's facing to Angle.
- Set DistanceRemaining to
DistanceRemaining - 20.
- This is probably an inconsistency within the code: for each 30 units Mirana is moved forth, DistanceRemaining is subtracted by 20. This means that the trigger runs 21/23/26/28 times, bringing Mirana 630/690/780/840 units away.
- Check if FlyHeight is less than 1 and DistanceRemaining is not equal to OriginalDistance.
- If so:
- Set Mirana's facing to Angle.
- Set Mirana's animation to
Stand.
- Restore Mirana's pathing.
- Run the procedure Redo Orders.
- Run the procedure Speed Boost.
- Destroy this trigger.
- If not, do nothing.
Redo Orders
- During the time that Mirana was in air, every order issued to her is stored, along with the target unit or location, if present. This procedure re-issues all the stored orders.
Speed Boost
- For each allied hero within 800 range of Mirana's landing spot:
- Create a dummy unit e01R at the center of the map for the owner of the enumerated hero.
- Add the ability A0LO to the dummy unit just created.
- Set the level of A0LO for the unit to the level of Leap for Mirana.
- Apply a 10-second timed life to the dummy unit just created.

Copyright © 2008 DotA Allstars Wiki

Development and programming by
Trystero and Wyvernoid
Design by AntonW