1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  3. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Phantom Hook

Submitted by Demongrip
This bundle is marked as approved. It works and satisfies the submission rules.
While we are still in line phantom spells,I decided to make a spell that can be somehow original.And here it is.
Phantom Hook:
The Warden shoots out a hook.Unlike the other hooks this hook follows the facing of the caster and can be controlled.The hook travels some range and if it hits a target,it deals damage and creates a copy of the warden that has 125 hitpoints and 25 damage,and lasts 3 seconds.Meanwhile the Warden hide herself,dissapearing from sight.The invisibility lasts 7 seconds.
Level 1-Hook has 500 range and deals 75 damage.
Level 2-Hook has 800 range and deals 150 damage.
Level 3-Hook has 1100 range and deals 225 damage.
Code
  • PH cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Phantom Hook
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PH_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on PH Loop <gen>
        • Else - Actions
      • -------- The actions index 1 sets the instances on which the spell is running,whily index 2 is used to store the data. --------
      • Set PH_Index[1] = (PH_Index[1] + 1)
      • Set PH_Index[2] = (PH_Index[2] + 1)
      • Set PH_Caster[PH_Index[2]] = (Triggering unit)
      • Set PH_Point1[PH_Index[2]] = (Position of PH_Caster[PH_Index[2]])
      • Set PH_Point2[PH_Index[2]] = (Target point of ability being cast)
      • Unit - Create 1 Hook for (Owner of PH_Caster[PH_Index[2]]) at PH_Point1[PH_Index[2]] facing (Facing of PH_Caster[PH_Index[2]]) degrees
      • Set PH_Hook[PH_Index[2]] = (Last created unit)
      • Set PH_Point4[PH_Index[2]] = (Position of PH_Hook[PH_Index[2]])
      • Unit - Order PH_Hook[PH_Index[2]] to Move To PH_Point2[PH_Index[2]]
      • -------- The next 3 actions create the lighting effect.The change color action changes the color of the effect. --------
      • Lightning - Create a Finger of Death lightning effect from source PH_Point1[PH_Index[2]] to target PH_Point4[PH_Index[2]]
      • Set PH_lighting[PH_Index[2]] = (Last created lightning effect)
      • Lightning - Change color of PH_lighting[PH_Index[2]] to (0.75 0.00 1.00) with 1.00 alpha
      • Custom script: call RemoveLocation(udg_PH_Point1[udg_PH_Index[2]])
      • Custom script: call RemoveLocation(udg_PH_Point2[udg_PH_Index[2]])
      • Custom script: call RemoveLocation(udg_PH_Point4[udg_PH_Index[2]])

  • PH Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer PH_Index[3]) from 1 to PH_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PH_Hook[PH_Index[3]] is alive) Equal to True
            • Then - Actions
              • Set PH_Point1[PH_Index[3]] = (Position of PH_Caster[PH_Index[3]])
              • Set PH_Point4[PH_Index[3]] = (Position of PH_Hook[PH_Index[3]])
              • -------- The next action sets the distance on which the hook will travel-The facing of the caster means the distance is depend on where the caster looks --------
              • Set PH_Point3[PH_Index[3]] = (PH_Point1[PH_Index[3]] offset by (((Real((Level of Phantom Hook for PH_Caster[PH_Index[3]]))) x 300.00) + 200.00) towards (Facing of PH_Caster[PH_Index[3]]) degrees)
              • -------- This action checks if the hook reached it`s final destination --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between PH_Point4[PH_Index[3]] and PH_Point3[PH_Index[3]]) Greater than or equal to 50.00
                • Then - Actions
                  • Set PH_Point6[PH_Index[3]] = (PH_Point4[PH_Index[3]] offset by 25.00 towards (Angle from PH_Point4[PH_Index[3]] to PH_Point3[PH_Index[3]]) degrees)
                  • Unit - Move PH_Hook[PH_Index[3]] instantly to PH_Point6[PH_Index[3]]
                  • Unit - Make PH_Hook[PH_Index[3]] face (Facing of PH_Caster[PH_Index[3]]) over 0.00 seconds
                  • Lightning - Move PH_lighting[PH_Index[3]] to source PH_Point1[PH_Index[3]] and target PH_Point4[PH_Index[3]]
                  • Set PH_Group[PH_Index[3]] = (Units within 60.00 of PH_Point4[PH_Index[3]] matching ((((Matching unit) is dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of PH_Hook[PH_Index[3]])) Equal to True)))
                  • Unit Group - Pick every unit in PH_Group[PH_Index[3]] and do (Actions)
                    • Loop - Actions
                      • Set PH_Point5[PH_Index[3]] = (Position of (Picked unit))
                      • -------- The next trigger damages the target. --------
                      • Unit - Cause PH_Hook[PH_Index[3]] to damage (Picked unit), dealing ((Real((Level of Phantom Hook for PH_Caster[PH_Index[3]]))) x 75.00) damage of attack type Spells and damage type Normal
                      • Unit - Add a 0.01 second Generic expiration timer to PH_Hook[PH_Index[3]]
                      • Unit - Create 1 Dummy(invisibility) for (Owner of PH_Hook[PH_Index[3]]) at PH_Point1[PH_Index[3]] facing Default building facing degrees
                      • Unit - Add Invisibility to (Last created unit)
                      • Unit - Order (Last created unit) to Human Sorceress - Invisibility PH_Caster[PH_Index[3]]
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Lightning - Destroy PH_lighting[PH_Index[3]]
                      • Unit - Create 1 Phantom Illusion for (Owner of PH_Hook[PH_Index[3]]) at PH_Point5[PH_Index[3]] facing Default building facing degrees
                      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                      • Unit - Make (Last created unit) Explode on death
                      • -------- The next trigger set the instance of the spell by -1 --------
                      • Set PH_Index[1] = (PH_Index[1] - 1)
                      • -------- The next action checks if there are no running instances of the spell.If it is 0 then the trigger will turn off. --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • PH_Index[1] Equal to 0
                        • Then - Actions
                          • Set PH_Index[2] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_PH_Point5[udg_PH_Index[3]])
                  • Custom script: call RemoveLocation(udg_PH_Point6[udg_PH_Index[3]])
                  • Custom script: call DestroyGroup(udg_PH_Group[udg_PH_Index[3]])
                • Else - Actions
                  • Unit - Add a 0.01 second Generic expiration timer to PH_Hook[PH_Index[3]]
                  • Lightning - Destroy PH_lighting[PH_Index[3]]
                  • -------- The next trigger set the instance of the spell by -1 --------
                  • Set PH_Index[1] = (PH_Index[1] - 1)
                  • -------- The next action checks if there are no running instances of the spell.If it is 0 then the trigger will turn off. --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PH_Index[1] Equal to 0
                    • Then - Actions
                      • Set PH_Index[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_PH_Point1[udg_PH_Index[3]])
              • Custom script: call RemoveLocation(udg_PH_Point4[udg_PH_Index[3]])
              • Custom script: call RemoveLocation(udg_PH_Point3[udg_PH_Index[3]])
            • Else - Actions




Main credits go to StaberFire and his phantom bolt for the inspiration and the hook visual effect:http://www.hiveworkshop.com/forums/spells-569/phantom-bolt-v1-1-a-143471/

Updates:
v1.0 Initial release.
v1.1 Fixed the only known bug to me.
v1.11 Removed 2 forgotten leak locations.
v1.2 Some cosmetix changes.
v1.3 Added documentation how to implement and for the actions that can be changed.Changed the Illusion name to Phantom Illusion

Keywords:
Phantom,Hook
Contents

Phantom Hook (Map)

Reviews
Moderator
21:05, 6th Feb 2010 The_Reborn_Devil: The triggering looks good, and there are no leaks. Status: Approved Rating: Useful
  1. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    The facing of the hook makes most of the originality:)
     
  2. Mainywc3sear

    Mainywc3sear

    Joined:
    Feb 9, 2009
    Messages:
    195
    Resources:
    0
    Resources:
    0
    same hook, another eyecandy =/