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

Contents

Initial

  1. Check if the spell cast is Leap. If so, continue the execution; if not, quit the execution.
  2. Set OriginalDistance to 350 + 50 * (Level of Leap).
  3. 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.
  4. Cap LandingLocation at the playable map border if it is beyond the border.
  5. Set OriginalDistance to the distance between Mirana's current location and LandingLocation.
  6. Check if OriginalDistance is greater than 100. If so, continue to the next step; if not, quit the execution of the trigger.
  7. Add the ability Amrf to Mirana and immediately remove it.
  8. Remove the pathing of Mirana, set her animation to 6 (walking), and issue to her the order "stop".
  9. 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).
  10. Create a timer that runs the procedure While in Air every 0.025 seconds.

While in Air

  1. Recover from cache the following variables: OriginalDistance, DistanceRemaining, Angle, Hero.
  2. Set FlyHeight to (1 - DistanceRemaining / OriginalDistance) * 400.
  3. 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.
  4. 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.
  5. Move Mirana 30 units forth in the direction of Angle.
  6. Set Mirana's facing to Angle.
  7. 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.
  8. Check if FlyHeight is less than 1 and DistanceRemaining is not equal to OriginalDistance.
    1. If so:
      1. Set Mirana's facing to Angle.
      2. Set Mirana's animation to Stand.
      3. Restore Mirana's pathing.
      4. Run the procedure Redo Orders.
      5. Run the procedure Speed Boost.
      6. Destroy this trigger.
    2. If not, do nothing.

Redo Orders

  1. 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

  1. For each allied hero within 800 range of Mirana's landing spot:
    1. Create a dummy unit e01R at the center of the map for the owner of the enumerated hero.
    2. Add the ability A0LO to the dummy unit just created.
    3. Set the level of A0LO for the unit to the level of Leap for Mirana.
    4. 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