Blink Slash v7.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: ILH

Blink Slash[TD]v7.1
  • Index


  • Description

    Move to the targeted unit and do slash-teleport several times around the target.

    Level 1 - 10 slashes, 40 damage per slash.
    Level 2 - 12 slashes, 60 damage per slash.
    Level 3 - 14 slashes, 80 damage per slash.
    Level 4 - 16 slashes, 100 damage per slash.

    Target type: Unit (Enemy)
  • Screenshot

    Blink%20Slash2.jpg

    Blink%20Slash3.jpg

  • Code/Trigger

    • Blink Slash Setting
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- --------------------------- --------
        • -------- IMPORTANT VARIABLES --------
        • -------- --------------------------- --------
        • -------- Determines the ability --------
        • Set Bs_Ability = Blink Slash
        • -------- --------------------------- --------
        • -------- Determines the slash caster animation --------
        • Set Bs_slashAnimation = attack
        • -------- --------------------------- --------
        • -------- Determines the slash count each level --------
        • Set Bs_slashTimes[1] = 10
        • Set Bs_slashTimes[2] = 12
        • Set Bs_slashTimes[3] = 14
        • Set Bs_slashTimes[4] = 16
        • -------- --------------------------- --------
        • -------- Determines the delay between each slash each level --------
        • Set Bs_slashDelay[1] = 0.10
        • Set Bs_slashDelay[2] = 0.10
        • Set Bs_slashDelay[3] = 0.10
        • Set Bs_slashDelay[4] = 0.10
        • -------- --------------------------- --------
        • -------- Determines the caster slash offset from target position --------
        • Set Bs_slashOffset = 100.00
        • -------- --------------------------- --------
        • -------- Determines the damage each slash each level --------
        • Set Bs_slashDamage[1] = 40.00
        • Set Bs_slashDamage[2] = 60.00
        • Set Bs_slashDamage[3] = 80.00
        • Set Bs_slashDamage[4] = 100.00
        • -------- --------------------------- --------
        • -------- Determines the attack-type --------
        • Set Bs_attackType = Normal
        • -------- --------------------------- --------
        • -------- Determines the damage type --------
        • Set Bs_damageType = Normal
        • -------- --------------------------- --------
        • -------- Determines the knock initial speed each level --------
        • Set Bs_knockSpeed[1] = 30.00
        • Set Bs_knockSpeed[2] = 30.00
        • Set Bs_knockSpeed[3] = 30.00
        • Set Bs_knockSpeed[4] = 30.00
        • -------- --------------------------- --------
        • -------- Determines the knock reducing speed each level --------
        • Set Bs_knockSpeedReduce[1] = 0.80
        • Set Bs_knockSpeedReduce[2] = 0.80
        • Set Bs_knockSpeedReduce[3] = 0.80
        • Set Bs_knockSpeedReduce[4] = 0.80
        • -------- --------------------------- --------
        • -------- Determines the caster transparency during slashing units --------
        • Set Bs_transparencyPercent = 50.00
        • -------- --------------------------- --------
        • -------- Determines the move/teleport effect --------
        • Set Bs_moveEffect = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
        • Set Bs_moveEffectAttachment = origin
        • -------- --------------------------- --------
        • -------- Determines the slash effect --------
        • Set Bs_slashEffect = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
        • Set Bs_slashEffectAttachment = origin
        • -------- --------------------------- --------
        • -------- Determines the ground slide effect for knocked units --------
        • Set Bs_knockSlideEffect = Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
        • Set Bs_knockSlideEffectInterval = 0.09
        • -------- --------------------------- --------
        • -------- Determines the effect attached on caster during casting this ability --------
        • Set Bs_weaponEffect = Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
        • Set Bs_weaponEffectAttachment = weapon
        • -------- --------------------------- --------
        • -------- Destroy nearby trees? --------
        • Set Bs_destroyTrees = True
        • -------- =========================================================================== --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Bs_destroyTrees Equal to True
          • Then - Actions
            • Set Bs_tempLoc = (Center of (Playable map area))
            • Unit - Create 1 Peasant for Neutral Passive at Bs_tempLoc facing 0.00 degrees
            • Set Bs_Harvester = (Last created unit)
            • Custom script: call UnitAddAbility(udg_Bs_Harvester, 'Aloc')
            • Unit - Hide Bs_Harvester
            • Set Bs_harvestOrder = (Order(harvest))
            • Custom script: call RemoveLocation(udg_Bs_tempLoc)
          • Else - Actions
    • Blink Slash Cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Bs_Ability
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Bs_maxIndex Equal to 0
          • Then - Actions
            • Trigger - Turn on Blink Slash Loop <gen>
          • Else - Actions
        • Set Bs_maxIndex = (Bs_maxIndex + 1)
        • Set Bs_Caster[Bs_maxIndex] = (Triggering unit)
        • Set Bs_Target[Bs_maxIndex] = (Target unit of ability being cast)
        • Set Bs_Level[Bs_maxIndex] = (Level of Bs_Ability for Bs_Caster[Bs_maxIndex])
        • Set Bs_Count[Bs_maxIndex] = Bs_slashTimes[Bs_Level[Bs_maxIndex]]
        • Special Effect - Create a special effect attached to the Bs_weaponEffectAttachment of Bs_Caster[Bs_maxIndex] using Bs_weaponEffect
        • Set Bs_attachedSEffect[Bs_maxIndex] = (Last created special effect)
        • Set Bs_origFlyHeight[Bs_maxIndex] = (Current flying height of Bs_Caster[Bs_maxIndex])
        • Custom script: if (UnitAddAbility(udg_Bs_Caster[udg_Bs_maxIndex], 'Amrf') and UnitRemoveAbility(udg_Bs_Caster[udg_Bs_maxIndex], 'Amrf')) then
        • Custom script: endif
        • Animation - Change Bs_Caster[Bs_maxIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with Bs_transparencyPercent% transparency
        • Set Bs_targetIndex[Bs_maxIndex] = 0
        • Set Bs_realTimer[Bs_maxIndex] = 0.00
        • Set Bs_stageID[Bs_maxIndex] = 2
    • Blink Slash Loop
      • Events
        • Time - Every 0.03 seconds of game time
      • Conditions
      • Actions
        • For each (Integer Bs_Index) from 1 to Bs_maxIndex, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Bs_stageID[Bs_Index] Equal to 1
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Bs_Speed[Bs_Index] Greater than 0.00
                  • Then - Actions
                    • Custom script: set udg_Bs_X[1] = GetUnitX(udg_Bs_Target[udg_Bs_Index])
                    • Custom script: set udg_Bs_Y[1] = GetUnitY(udg_Bs_Target[udg_Bs_Index])
                    • Custom script: set udg_Bs_X[2] = udg_Bs_X[1] + udg_Bs_Speed[udg_Bs_Index] * Cos(udg_Bs_Angle[udg_Bs_Index])
                    • Custom script: set udg_Bs_Y[2] = udg_Bs_Y[1] + udg_Bs_Speed[udg_Bs_Index] * Sin(udg_Bs_Angle[udg_Bs_Index])
                    • Set Bs_tempLoc = (Point(Bs_X[2], Bs_Y[2]))
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Terrain pathing at Bs_tempLoc of type Bs_pathType[Bs_Index] is off) Equal to False
                      • Then - Actions
                        • Custom script: call SetUnitX(udg_Bs_Target[udg_Bs_Index], udg_Bs_X[2])
                        • Custom script: call SetUnitY(udg_Bs_Target[udg_Bs_Index], udg_Bs_Y[2])
                      • Else - Actions
                        • Set Bs_Speed[Bs_Index] = 0.00
                    • Custom script: call RemoveLocation(udg_Bs_tempLoc)
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Bs_destroyTrees Equal to True
                      • Then - Actions
                        • Set Bs_tempLoc = (Position of Bs_Target[Bs_Index])
                        • Destructible - Pick every destructible within 100.00 of Bs_tempLoc and do (Actions)
                          • Loop - Actions
                            • Set Bs_pickedDest = (Picked destructible)
                            • Custom script: if (IssueTargetOrderById(udg_Bs_Harvester, udg_Bs_harvestOrder, udg_Bs_pickedDest)) and (IssueImmediateOrderById(udg_Bs_Harvester, 851973)) then
                            • Custom script: call KillDestructable(udg_Bs_pickedDest)
                            • Custom script: endif
                        • Unit - Order Bs_Harvester to Stop
                        • Custom script: call RemoveLocation(udg_Bs_tempLoc)
                      • Else - Actions
                    • Set Bs_tempLoc = (Position of Bs_Target[Bs_Index])
                    • Set Bs_realTimer[Bs_Index] = (Bs_realTimer[Bs_Index] - 0.03)
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Bs_realTimer[Bs_Index] Less than or equal to 0.00
                      • Then - Actions
                        • Set Bs_realTimer[Bs_Index] = Bs_knockSlideEffectInterval
                        • Special Effect - Create a special effect at Bs_tempLoc using Bs_knockSlideEffect
                        • Special Effect - Destroy (Last created special effect)
                      • Else - Actions
                    • Custom script: call RemoveLocation(udg_Bs_tempLoc)
                    • Set Bs_Speed[Bs_Index] = (Bs_Speed[Bs_Index] - Bs_knockSpeedReduce[Bs_Level[Bs_Index]])
                  • Else - Actions
                    • Set Bs_stageID[Bs_Index] = 3
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Bs_stageID[Bs_Index] Equal to 2
                  • Then - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Bs_Caster[Bs_Index] is dead) Equal to False
                        • (Bs_Target[Bs_Index] is dead) Equal to False
                        • Bs_Count[Bs_Index] Greater than 0
                      • Then - Actions
                        • Set Bs_realTimer[Bs_Index] = (Bs_realTimer[Bs_Index] - 0.03)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • Bs_realTimer[Bs_Index] Less than or equal to 0.00
                          • Then - Actions
                            • Set Bs_realTimer[Bs_Index] = Bs_slashDelay[Bs_Level[Bs_Index]]
                            • Set Bs_Angle[0] = (Random angle)
                            • Custom script: set udg_Bs_radAngle = udg_Bs_Angle[0] * bj_DEGTORAD
                            • Custom script: set udg_Bs_X[1] = GetUnitX(udg_Bs_Target[udg_Bs_Index])
                            • Custom script: set udg_Bs_Y[1] = GetUnitY(udg_Bs_Target[udg_Bs_Index])
                            • Custom script: set udg_Bs_X[2] = udg_Bs_X[1] + udg_Bs_slashOffset * Cos(udg_Bs_radAngle)
                            • Custom script: set udg_Bs_Y[2] = udg_Bs_Y[1] + udg_Bs_slashOffset * Sin(udg_Bs_radAngle)
                            • Special Effect - Create a special effect attached to the Bs_moveEffectAttachment of Bs_Caster[Bs_Index] using Bs_moveEffect
                            • Special Effect - Destroy (Last created special effect)
                            • Custom script: call SetUnitX(udg_Bs_Caster[udg_Bs_Index], udg_Bs_X[2])
                            • Custom script: call SetUnitY(udg_Bs_Caster[udg_Bs_Index], udg_Bs_Y[2])
                            • Animation - Change Bs_Caster[Bs_Index] flying height to (Current flying height of Bs_Target[Bs_Index]) at 0.00
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • Bs_destroyTrees Equal to True
                              • Then - Actions
                                • Set Bs_tempLoc = (Point(Bs_X[2], Bs_Y[2]))
                                • Destructible - Pick every destructible within 100.00 of Bs_tempLoc and do (Actions)
                                  • Loop - Actions
                                    • Set Bs_pickedDest = (Picked destructible)
                                    • Custom script: if (IssueTargetOrderById(udg_Bs_Harvester, udg_Bs_harvestOrder, udg_Bs_pickedDest)) and (IssueImmediateOrderById(udg_Bs_Harvester, 851973)) then
                                    • Custom script: call KillDestructable(udg_Bs_pickedDest)
                                    • Custom script: endif
                                • Unit - Order Bs_Harvester to Stop
                                • Custom script: call RemoveLocation(udg_Bs_tempLoc)
                              • Else - Actions
                            • Set Bs_Angle[0] = (Bs_Angle[0] + 180.00)
                            • Unit - Make Bs_Caster[Bs_Index] face Bs_Angle[0] over 0.00 seconds
                            • Animation - Play Bs_Caster[Bs_Index]'s Bs_slashAnimation animation
                            • Special Effect - Create a special effect attached to the Bs_slashEffectAttachment of Bs_Target[Bs_Index] using Bs_slashEffect
                            • Special Effect - Destroy (Last created special effect)
                            • Unit - Cause Bs_Caster[Bs_Index] to damage Bs_Target[Bs_Index], dealing Bs_slashDamage[Bs_Level[Bs_Index]] damage of attack type Bs_attackType and damage type Bs_damageType
                            • Custom script: set udg_Bs_radAngle = udg_Bs_Angle[0] * bj_DEGTORAD
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • Bs_targetIndex[Bs_Index] Equal to 0
                              • Then - Actions
                                • Set Bs_maxIndex = (Bs_maxIndex + 1)
                                • Set Bs_Level[Bs_maxIndex] = Bs_Level[Bs_Index]
                                • Set Bs_Target[Bs_maxIndex] = Bs_Target[Bs_Index]
                                • Set Bs_Angle[Bs_maxIndex] = Bs_radAngle
                                • Set Bs_Speed[Bs_maxIndex] = Bs_knockSpeed[Bs_Level[Bs_Index]]
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • (Bs_Target[Bs_maxIndex] is A flying unit) Equal to True
                                  • Then - Actions
                                    • Set Bs_pathType[Bs_maxIndex] = Flyability
                                  • Else - Actions
                                    • Set Bs_pathType[Bs_maxIndex] = Walkability
                                • Set Bs_realTimer[Bs_maxIndex] = Bs_knockSlideEffectInterval
                                • Set Bs_stageID[Bs_maxIndex] = 1
                                • Set Bs_targetIndex[Bs_Index] = Bs_maxIndex
                              • Else - Actions
                                • Set Bs_Angle[Bs_targetIndex[Bs_Index]] = Bs_radAngle
                            • Set Bs_Count[Bs_Index] = (Bs_Count[Bs_Index] - 1)
                          • Else - Actions
                      • Else - Actions
                        • Animation - Change Bs_Caster[Bs_Index] flying height to Bs_origFlyHeight[Bs_Index] at 0.00
                        • Animation - Change Bs_Caster[Bs_Index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                        • Special Effect - Destroy Bs_attachedSEffect[Bs_Index]
                        • Set Bs_stageID[Bs_Index] = 3
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Bs_stageID[Bs_Index] Equal to 3
                      • Then - Actions
                        • Set Bs_Angle[Bs_Index] = Bs_Angle[Bs_maxIndex]
                        • Set Bs_Caster[Bs_Index] = Bs_Caster[Bs_maxIndex]
                        • Set Bs_Count[Bs_Index] = Bs_Count[Bs_maxIndex]
                        • Set Bs_Distance[Bs_Index] = Bs_Distance[Bs_maxIndex]
                        • Set Bs_Level[Bs_Index] = Bs_Level[Bs_maxIndex]
                        • Set Bs_Speed[Bs_Index] = Bs_Speed[Bs_maxIndex]
                        • Set Bs_Target[Bs_Index] = Bs_Target[Bs_maxIndex]
                        • Set Bs_attachedSEffect[Bs_Index] = Bs_attachedSEffect[Bs_maxIndex]
                        • Set Bs_pathType[Bs_Index] = Bs_pathType[Bs_maxIndex]
                        • Set Bs_realTimer[Bs_Index] = Bs_realTimer[Bs_maxIndex]
                        • Set Bs_stageID[Bs_Index] = Bs_stageID[Bs_maxIndex]
                        • Set Bs_targetIndex[Bs_Index] = Bs_targetIndex[Bs_maxIndex]
                        • Set Bs_maxIndex = (Bs_maxIndex - 1)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • Bs_maxIndex Equal to 0
                          • Then - Actions
                            • Trigger - Turn off (This trigger)
                          • Else - Actions
                        • Set Bs_Index = (Bs_Index - 1)
                      • Else - Actions
  • Credit

    Thanks to:
    1. Ofel for some help.
  • Last Message

    Hope you like it! And please rate.
Go to the top

Changelog


v7.0
Initial version.
v7.0
Harvester fixed.

Keywords:
Blink, Slash, Teleport, Fast, MUI, GUI.
Contents

Plunder Isle (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 12:52, 21st Feb 2014 BPower: Awaiting map file update

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

12:52, 21st Feb 2014
BPower:
Awaiting map file update
 
Level 19
Joined
Mar 18, 2012
Messages
1,717
The blademaste was always a very famous hero and many people designed "-slash" spell since.
Configuration and obects are very good, I couldn't ask for more.

Here is something you can't know, when using GUI.
IssueTargetOrderById returns a boolean, which is only true if the order is executed properly. In other words if it is not a tree the condition will be false.
Instead of:
  • Custom script: call IssueTargetOrderById(udg_Bs_Harvester,udg_Bs_HarvestOrder,udg_Bs_PickedDest)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Current order of Bs_Harvester) Equal to Bs_HarvestOrder
    • Then - Actions
      • Destructible - Kill Bs_PickedDest
    • Else - Actions
You can shorten it to:
  • Custom script: if IssueTargetOrderById(udg_Bs_Harvester,udg_Bs_HarvestOrder,udg_Bs_PickedDest) then
  • Destructible - Kill Bs_PickedDest
  • Custom script: endif
Also order "stop" for the harvester at the end of the loop.

I guess I will never get the purpose of "~reserved", any deeper thoughts behind this absurd quote?
7.0. Are there ~6 not properly working version?:grin:
 
Level 19
Joined
Mar 18, 2012
Messages
1,717
Its from DotA , 6.7x and he skipped to 7.0 its a brand new and better version of the omnislash
Hell no. ^^

I can't approve the spell aslong as the harvester isn't odered to stop after the pick destructable loop.
Currently he is happily harvesting the whole forest of the map. Just add OrderStop at the end or -->

JASS:
if (IssueTargetOrderById(udg_Harvester, udg_harvest_order, udg_picked)) and (IssueImmediateOrderById(udg_Harvester, 851973)) then
    call KillDestructable(udg_picked)
endif
set udg_picked = null

Edit: You didn't update the attached map file.
 
Last edited:
Top