• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Superheroes Spell Pack Vol.1 v0.9

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Description:
The Superheroes Spell Pack contains several superhero abilities for GUI/JASS users to use.

Volume 1 includes:
1 - Dash (The Flash) [Point Target]
2 - Exploding Arrow (Hawkeye) [Unit Target]
3 - Shapeshift (Mystique) [Unit Target]
4 - Shield Throw (Capt. America) [Point Target]
5 - Time Freeze (The Flash) [Instant]
6 - Web Pounce (Spiderman) [Unit Target]
7 - Warrior's Madness (Thor) [Passive]
8 - Godforce (Thor) [Channeling]

Codes:


  • DashCall
    • Events
    • Conditions
    • Actions
      • Set Dash_Index = (Dash_Index + 1)
      • Set Dash_Caster[Dash_Index] = ConfigDashCaster
      • Set Dash_Target[Dash_Index] = ConfigDashTarget
      • Set Dash_Damage[Dash_Index] = ConfigDashDamage
      • Set Dash_Distance[Dash_Index] = ConfigDashDistance
      • Set Dash_Counter[Dash_Index] = 0.00
      • Set Dash_Group[Dash_Index] = (Units in (Playable map area))
      • Set Dash_Angle[Dash_Index] = (Angle from (Position of Dash_Caster[Dash_Index]) to Dash_Target[Dash_Index])
      • Unit - Turn collision for Dash_Caster[Dash_Index] Off
      • Animation - Change Dash_Caster[Dash_Index]'s animation speed to 145.00% of its original speed
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dash_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Dash Loop <gen>
        • Else - Actions
  • Dash Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Dash_Loop_Integer) from 1 to Dash_Index, do (Actions)
        • Loop - Actions
          • Set Dash_Counter[Dash_Loop_Integer] = (Dash_Counter[Dash_Loop_Integer] + 75.00)
          • Set Dash_Point[Dash_Loop_Integer] = ((Position of Dash_Caster[Dash_Loop_Integer]) offset by 75.00 towards Dash_Angle[Dash_Loop_Integer] degrees)
          • Custom script: set udg_posX[udg_Dash_Loop_Integer] = GetLocationX(udg_Dash_Point[udg_Dash_Loop_Integer])
          • Custom script: set udg_posY[udg_Dash_Loop_Integer] = GetLocationY(udg_Dash_Point[udg_Dash_Loop_Integer])
          • Custom script: call SetUnitAnimationByIndex(udg_Dash_Caster[udg_Dash_Loop_Integer],8)
          • Custom script: call SetUnitX(udg_Dash_Caster[udg_Dash_Loop_Integer],udg_posX[udg_Dash_Loop_Integer])
          • Custom script: call SetUnitY(udg_Dash_Caster[udg_Dash_Loop_Integer],udg_posY[udg_Dash_Loop_Integer])
          • Custom script: call SetUnitAnimationByIndex(udg_Dash_Caster[udg_Dash_Loop_Integer],8)
          • Special Effect - Create a special effect at Dash_Point[Dash_Loop_Integer] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit Group - Pick every unit in Dash_Group[Dash_Loop_Integer] and do (Actions)
            • Loop - Actions
              • Set Dash_PickedUnit[Dash_Loop_Integer] = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Dash_PickedUnit[Dash_Loop_Integer] is in Dash_Group[Dash_Loop_Integer]) Equal to True
                  • (Dash_PickedUnit[Dash_Loop_Integer] is A structure) Equal to False
                  • (Dash_PickedUnit[Dash_Loop_Integer] is alive) Equal to True
                  • (Dash_PickedUnit[Dash_Loop_Integer] belongs to an enemy of (Owner of Dash_Caster[Dash_Loop_Integer])) Equal to True
                  • Dash_PickedUnit[Dash_Loop_Integer] Not equal to Dash_Caster[Dash_Loop_Integer]
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Dash_PickedUnit[Dash_Loop_Integer] is in (Units within 145.00 of (Position of Dash_Caster[Dash_Loop_Integer]))) Equal to True
                    • Then - Actions
                      • Unit - Cause Dash_Caster[Dash_Loop_Integer] to damage Dash_PickedUnit[Dash_Loop_Integer], dealing Dash_Damage[Dash_Loop_Integer] damage of attack type Spells and damage type Normal
                      • Unit Group - Remove Dash_PickedUnit[Dash_Loop_Integer] from Dash_Group[Dash_Loop_Integer]
                      • Set cCastingUnit = Dash_Caster[Dash_Loop_Integer]
                      • Set cKnockDestroyTrees = False
                      • Set cKnockDuration = 0.75
                      • Set cKnockSFX = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                      • Set cKnockSpeed = 1.25
                      • Set cKnockedUnit = Dash_PickedUnit[Dash_Loop_Integer]
                      • Trigger - Run KnockCall <gen> (ignoring conditions)
                    • Else - Actions
                • Else - Actions
              • Set Dash_PickedUnit[Dash_Loop_Integer] = No unit
          • Custom script: call RemoveLocation(udg_Dash_Point[udg_Dash_Loop_Integer])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Dash_Counter[Dash_Loop_Integer] Greater than or equal to Dash_Distance[Dash_Loop_Integer]
                  • ((Playable map area) contains Dash_Caster[Dash_Loop_Integer]) Equal to False
            • Then - Actions
              • Unit - Turn collision for Dash_Caster[Dash_Loop_Integer] On
              • Animation - Change Dash_Caster[Dash_Loop_Integer]'s animation speed to 100.00% of its original speed
              • Animation - Reset Dash_Caster[Dash_Loop_Integer]'s animation
              • Custom script: call DestroyGroup(udg_Dash_Group[udg_Dash_Loop_Integer])
              • Set Dash_Angle[Dash_Loop_Integer] = Dash_Angle[Dash_Index]
              • Set Dash_Caster[Dash_Loop_Integer] = Dash_Caster[Dash_Index]
              • Set Dash_Counter[Dash_Loop_Integer] = Dash_Counter[Dash_Index]
              • Set Dash_Distance[Dash_Loop_Integer] = Dash_Distance[Dash_Index]
              • Set Dash_Target[Dash_Loop_Integer] = Dash_Target[Dash_Index]
              • Set Dash_Caster[Dash_Index] = No unit
              • Set Dash_Index = (Dash_Index - 1)
              • Set Dash_Loop_Integer = (Dash_Loop_Integer - 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dash_Index Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • BoomCall
    • Events
    • Conditions
    • Actions
      • Set BoomIndex = (BoomIndex + 1)
      • Set BoomCaster[BoomIndex] = ConfigBoomCaster
      • Set BoomTarget[BoomIndex] = ConfigBoomTarget
      • Set BoomRadius[BoomIndex] = ConfigBoomRadius
      • Set BoomLevel[BoomIndex] = ConfigBoomLevel
      • Set BoomCounter[BoomIndex] = ConfigBoomDelay
      • Set TempPoint[BoomIndex] = (Position of BoomCaster[BoomIndex])
      • Unit - Create 1 Chicken for (Owner of BoomCaster[BoomIndex]) at TempPoint[BoomIndex] facing (Angle from (Position of BoomCaster[BoomIndex]) to (Position of BoomTarget[BoomIndex])) degrees
      • Set BoomProj[BoomIndex] = (Last created unit)
      • Custom script: call RemoveLocation(udg_TempPoint[udg_BoomIndex])
      • Set BoomRunning[BoomIndex] = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BoomIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on BoomLoop <gen>
        • Else - Actions
  • BoomLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer BoomLoopInteger) from 1 to BoomIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BoomRunning[BoomLoopInteger] Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • BoomCounter[BoomLoopInteger] Less than 0.01
                      • (BoomTarget[BoomLoopInteger] is dead) Equal to True
                • Then - Actions
                  • Floating Text - Destroy BoomFT[BoomLoopInteger]
                  • Unit - Deny shared vision of BoomTarget[BoomLoopInteger] to (Owner of BoomCaster[BoomLoopInteger])
                  • Set BoomGroup[BoomLoopInteger] = (Units within BoomRadius[BoomLoopInteger] of (Position of BoomTarget[BoomLoopInteger]))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (BoomTarget[BoomLoopInteger] is alive) Equal to True
                    • Then - Actions
                      • Unit Group - Pick every unit in BoomGroup[BoomLoopInteger] and do (Actions)
                        • Loop - Actions
                          • Set BoomPickedUnit[BoomLoopInteger] = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (BoomPickedUnit[BoomLoopInteger] is A structure) Equal to False
                              • (BoomPickedUnit[BoomLoopInteger] is alive) Equal to True
                              • BoomPickedUnit[BoomLoopInteger] Not equal to BoomCaster[BoomLoopInteger]
                            • Then - Actions
                              • Unit - Cause BoomCaster[BoomLoopInteger] to damage BoomPickedUnit[BoomLoopInteger], dealing 45.00 damage of attack type Spells and damage type Normal
                              • Set BoomPickedUnit[BoomLoopInteger] = No unit
                            • Else - Actions
                    • Else - Actions
                  • Custom script: call DestroyGroup(udg_BoomGroup[udg_BoomLoopInteger])
                  • Special Effect - Create a special effect attached to the origin of BoomTarget[BoomLoopInteger] using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set BoomCaster[BoomLoopInteger] = BoomCaster[BoomIndex]
                  • Set BoomCounter[BoomLoopInteger] = BoomCounter[BoomIndex]
                  • Set BoomFT[BoomLoopInteger] = BoomFT[BoomIndex]
                  • Set BoomLevel[BoomLoopInteger] = BoomLevel[BoomIndex]
                  • Set BoomProj[BoomLoopInteger] = BoomProj[BoomIndex]
                  • Set BoomTarget[BoomLoopInteger] = BoomTarget[BoomIndex]
                  • Set BoomRunning[BoomLoopInteger] = BoomRunning[BoomIndex]
                  • Set BoomRadius[BoomLoopInteger] = BoomRadius[BoomIndex]
                  • Set BoomCaster[BoomIndex] = No unit
                  • Set BoomProj[BoomIndex] = No unit
                  • Set BoomTarget[BoomIndex] = No unit
                  • Custom script: set udg_BoomFT[udg_BoomIndex] = null
                  • Set BoomIndex = (BoomIndex - 1)
                  • Set BoomLoopInteger = (BoomLoopInteger - 1)
                • Else - Actions
                  • Unit - Remove BoomProj[BoomLoopInteger] from the game
                  • Unit - Grant shared vision of BoomTarget[BoomLoopInteger] to (Owner of BoomCaster[BoomLoopInteger])
                  • Set BoomCounter[BoomLoopInteger] = (BoomCounter[BoomLoopInteger] - 0.03)
                  • Floating Text - Destroy BoomFT[BoomLoopInteger]
                  • Floating Text - Create floating text that reads (|cffff0000 + ((String(BoomCounter[BoomLoopInteger], 1, 1)) + |r)) above BoomTarget[BoomLoopInteger] with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Set BoomFT[BoomLoopInteger] = (Last created floating text)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BoomRunning[BoomLoopInteger] Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Distance between (Position of BoomProj[BoomLoopInteger]) and (Position of BoomTarget[BoomLoopInteger])) Less than or equal to 75.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (BoomTarget[BoomLoopInteger] is dead) Equal to True
                        • Then - Actions
                          • Unit - Remove BoomProj[BoomLoopInteger] from the game
                          • Set BoomCounter[BoomLoopInteger] = 0.00
                        • Else - Actions
                      • Set BoomRunning[BoomLoopInteger] = False
                    • Else - Actions
                      • Set BoomPoint[BoomLoopInteger] = ((Position of BoomProj[BoomLoopInteger]) offset by 45.00 towards (Angle from (Position of BoomProj[BoomLoopInteger]) to (Position of BoomTarget[BoomLoopInteger])) degrees)
                      • Unit - Move BoomProj[BoomLoopInteger] instantly to BoomPoint[BoomLoopInteger]
                      • Unit - Make BoomProj[BoomLoopInteger] face (Angle from (Position of BoomProj[BoomLoopInteger]) to (Position of BoomTarget[BoomLoopInteger])) over 0.00 seconds
                      • Custom script: call RemoveLocation(udg_BoomPoint[udg_BoomLoopInteger])
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BoomIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • Illusion Call
    • Events
    • Conditions
    • Actions
      • Set IlluIndex = (IlluIndex + 1)
      • Set IlluCaster[IlluIndex] = ConfigIlluCaster
      • Set IlluTarget[IlluIndex] = ConfigIlluTarget
      • Set IlluCounter[IlluIndex] = ConfigIlluDur
      • Set TempPoint[IlluIndex] = (Position of IlluCaster[IlluIndex])
      • Special Effect - Create a special effect attached to the origin of IlluTarget[IlluIndex] using Abilities\Spells\Other\Charm\CharmTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Hide IlluCaster[IlluIndex]
      • Unit - Turn collision for IlluCaster[IlluIndex] Off
      • Unit - Create 1 (Unit-type of IlluTarget[IlluIndex]) for (Triggering player) at TempPoint[IlluIndex] facing (Facing of IlluCaster[IlluIndex]) degrees
      • Set IlluCreated[IlluIndex] = (Last created unit)
      • Special Effect - Create a special effect attached to the origin of IlluCreated[IlluIndex] using Abilities\Spells\Other\Charm\CharmTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempPoint[udg_IlluIndex])
      • Selection - Select IlluCreated[IlluIndex] for (Owner of IlluCaster[IlluIndex])
      • Unit - Add Inventory (Hero) to IlluCreated[IlluIndex]
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Give (Item carried by IlluCaster[IlluIndex] in slot (Integer A)) to IlluCreated[IlluIndex]
      • Unit - Add a (IlluCounter[IlluIndex] + 0.30) second Generic expiration timer to IlluCreated[IlluIndex]
      • Custom script: call Initialize(udg_IlluCreated[udg_IlluIndex],UNIT_STATE_MAX_LIFE,GetUnitState(udg_IlluCaster[udg_IlluIndex],UNIT_STATE_MAX_LIFE))
      • Custom script: call Initialize(udg_IlluCreated[udg_IlluIndex],UNIT_STATE_MAX_MANA,GetUnitState(udg_IlluCaster[udg_IlluIndex],UNIT_STATE_MAX_MANA))
      • Unit - Set life of IlluCreated[IlluIndex] to (Life of IlluCaster[IlluIndex])
      • Unit - Set mana of IlluCreated[IlluIndex] to (Mana of IlluCaster[IlluIndex])
      • Unit - Set IlluCreated[IlluIndex] movement speed to (Current movement speed of IlluCaster[IlluIndex])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IlluIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on Illusion Loop <gen>
        • Else - Actions
  • Illusion Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer IlluLoopInteger) from 1 to IlluIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • IlluCounter[IlluLoopInteger] Less than 0.01
                  • (IlluCreated[IlluLoopInteger] is dead) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (IlluCreated[IlluLoopInteger] is alive) Equal to True
                • Then - Actions
                  • Unit - Remove IlluCreated[IlluLoopInteger] from the game
                • Else - Actions
              • Special Effect - Create a special effect attached to the origin of IlluCaster[IlluLoopInteger] using Abilities\Spells\Other\Charm\CharmTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Unhide IlluCaster[IlluLoopInteger]
              • Unit - Turn collision for IlluCaster[IlluLoopInteger] On
              • Set IlluPoint[IlluLoopInteger] = ((Position of IlluCaster[IlluLoopInteger]) offset by 175.00 towards (Facing of IlluCaster[IlluLoopInteger]) degrees)
              • Unit - Order IlluCaster[IlluLoopInteger] to Move To IlluPoint[IlluLoopInteger]
              • Custom script: call RemoveLocation(udg_IlluPoint[udg_IlluLoopInteger])
              • Selection - Select IlluCaster[IlluLoopInteger] for (Owner of IlluCaster[IlluLoopInteger])
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Hero - Give (Item carried by IlluCreated[IlluLoopInteger] in slot (Integer A)) to IlluCaster[IlluLoopInteger]
              • Set IlluCaster[IlluLoopInteger] = IlluCaster[IlluIndex]
              • Set IlluCounter[IlluLoopInteger] = IlluCounter[IlluIndex]
              • Set IlluCreated[IlluLoopInteger] = IlluCreated[IlluIndex]
              • Set IlluTarget[IlluLoopInteger] = IlluTarget[IlluIndex]
              • Set IlluCaster[IlluIndex] = No unit
              • Set IlluCreated[IlluIndex] = No unit
              • Set IlluTarget[IlluIndex] = No unit
              • Set IlluIndex = (IlluIndex - 1)
              • Set IlluLoopInteger = (IlluLoopInteger - 1)
            • Else - Actions
              • Set IlluCounter[IlluLoopInteger] = (IlluCounter[IlluLoopInteger] - 0.03)
              • Set IlluPoint[IlluLoopInteger] = (Position of IlluCreated[IlluLoopInteger])
              • Unit - Move IlluCaster[IlluLoopInteger] instantly to IlluPoint[IlluLoopInteger]
              • Unit - Set life of IlluCaster[IlluLoopInteger] to (Life of IlluCreated[IlluLoopInteger])
              • Unit - Set mana of IlluCaster[IlluLoopInteger] to (Mana of IlluCreated[IlluLoopInteger])
              • Custom script: call RemoveLocation(udg_IlluPoint[udg_IlluLoopInteger])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IlluIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • ST Call
    • Events
    • Conditions
    • Actions
      • Set STIndex = (STIndex + 1)
      • Set STCaster[STIndex] = ConfigSTCaster
      • Set STTarget[STIndex] = ConfigSTTarget
      • Set STMaxDist[STIndex] = ConfigSTMaxDist
      • Set STLevel[STIndex] = (Level of Shield Throw for STCaster[STIndex])
      • Set STDamage[STIndex] = ConfigSTDamage[STLevel[STIndex]]
      • Set STAngle[STIndex] = (Angle from (Position of STCaster[STIndex]) to STTarget[STIndex])
      • Set STStartPoint[STIndex] = (Position of STCaster[STIndex])
      • Set STThrowing[STIndex] = True
      • Set STGroup[STIndex] = (Units in (Playable map area))
      • Set TempPoint[STIndex] = (Position of STCaster[STIndex])
      • Unit - Create 1 shield for (Triggering player) at TempPoint[STIndex] facing Default building facing degrees
      • Set STProj[STIndex] = (Last created unit)
      • Custom script: call RemoveLocation(udg_TempPoint[udg_STIndex])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • STIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on ST Loop <gen>
        • Else - Actions
  • ST Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer STLoopInteger) from 1 to STIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • STThrowing[STLoopInteger] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between STStartPoint[STLoopInteger] and (Position of STProj[STLoopInteger])) Greater than or equal to STMaxDist[STLoopInteger]
                • Then - Actions
                  • Set STThrowing[STLoopInteger] = False
                  • Set STGroup[STLoopInteger] = (Units in (Playable map area))
                • Else - Actions
                  • Set STPoint[STLoopInteger] = ((Position of STProj[STLoopInteger]) offset by 65.00 towards STAngle[STLoopInteger] degrees)
                  • Unit - Move STProj[STLoopInteger] instantly to STPoint[STLoopInteger]
                  • Custom script: call RemoveLocation(udg_STPoint[udg_STLoopInteger])
                  • Unit Group - Pick every unit in STGroup[STLoopInteger] and do (Actions)
                    • Loop - Actions
                      • Set STPickedUnit[STLoopInteger] = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (STPickedUnit[STLoopInteger] is A structure) Equal to False
                          • (STPickedUnit[STLoopInteger] is in (Units within 80.00 of (Position of STProj[STLoopInteger]))) Equal to True
                          • (STPickedUnit[STLoopInteger] is alive) Equal to True
                          • STPickedUnit[STLoopInteger] Not equal to STProj[STLoopInteger]
                          • STPickedUnit[STLoopInteger] Not equal to STCaster[STLoopInteger]
                        • Then - Actions
                          • Unit Group - Remove STPickedUnit[STLoopInteger] from STGroup[STLoopInteger]
                          • Unit - Cause STCaster[STLoopInteger] to damage STPickedUnit[STLoopInteger], dealing STDamage[STLevel[STLoopInteger]] damage of attack type Spells and damage type Normal
                        • Else - Actions
                      • Set STPickedUnit[STLoopInteger] = No unit
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of STCaster[STLoopInteger]) and (Position of STProj[STLoopInteger])) Less than or equal to 75.00
                • Then - Actions
                  • Unit - Remove STProj[STLoopInteger] from the game
                  • Set STAngle[STLoopInteger] = STAngle[STIndex]
                  • Set STCaster[STLoopInteger] = STCaster[STIndex]
                  • Set STDamage[STLoopInteger] = STDamage[STIndex]
                  • Set STLevel[STLoopInteger] = STLevel[STIndex]
                  • Set STMaxDist[STLoopInteger] = STMaxDist[STIndex]
                  • Set STProj[STLoopInteger] = STProj[STIndex]
                  • Set STStartPoint[STLoopInteger] = STStartPoint[STIndex]
                  • Set STTarget[STLoopInteger] = STTarget[STIndex]
                  • Set STThrowing[STLoopInteger] = STThrowing[STIndex]
                  • Set STCaster[STIndex] = No unit
                  • Set STProj[STIndex] = No unit
                  • Custom script: call DestroyGroup(udg_STGroup[udg_STLoopInteger])
                  • Set STIndex = (STIndex - 1)
                  • Set STLoopInteger = (STLoopInteger - 1)
                • Else - Actions
                  • Set STPoint[STLoopInteger] = ((Position of STProj[STLoopInteger]) offset by 65.00 towards ((Angle from (Position of STCaster[STLoopInteger]) to (Position of STProj[STLoopInteger])) + 180.00) degrees)
                  • Unit - Move STProj[STLoopInteger] instantly to STPoint[STLoopInteger]
                  • Custom script: call RemoveLocation(udg_STPoint[udg_STLoopInteger])
                  • Unit Group - Pick every unit in STGroup[STLoopInteger] and do (Actions)
                    • Loop - Actions
                      • Set STPickedUnit[STLoopInteger] = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (STPickedUnit[STLoopInteger] is A structure) Equal to False
                          • (STPickedUnit[STLoopInteger] is in (Units within 98.00 of (Position of STProj[STLoopInteger]))) Equal to True
                          • (STPickedUnit[STLoopInteger] is alive) Equal to True
                          • STPickedUnit[STLoopInteger] Not equal to STProj[STLoopInteger]
                          • STPickedUnit[STLoopInteger] Not equal to STCaster[STLoopInteger]
                        • Then - Actions
                          • Unit Group - Remove STPickedUnit[STLoopInteger] from STGroup[STLoopInteger]
                          • Unit - Cause STCaster[STLoopInteger] to damage STPickedUnit[STLoopInteger], dealing (STDamage[STLevel[STLoopInteger]] x 0.50) damage of attack type Spells and damage type Normal
                        • Else - Actions
                      • Set STPickedUnit[STLoopInteger] = No unit
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • STIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • TimeCall
    • Events
    • Conditions
    • Actions
      • Set Time_Index = (Time_Index + 1)
      • Set Time_Caster[Time_Index] = ConfigTimeCaster
      • Set Time_Limit[Time_Index] = ConfigTimeLimit
      • Set Time_Counter[Time_Index] = 0.00
      • Animation - Change Time_Caster[Time_Index]'s animation speed to 400.00% of its original speed
      • Unit - Set the custom value of Time_Caster[Time_Index] to (Integer((Current movement speed of Time_Caster[Time_Index])))
      • Unit - Set Time_Caster[Time_Index] movement speed to 522.00
      • Game - Set time of day speed to 25.00% of the default speed
      • Player - Disable Time Freeze for (Triggering player)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Set Time_PickedUnit[Time_Index] = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Time_PickedUnit[Time_Index] Not equal to Time_Caster[Time_Index]
            • Then - Actions
              • Unit Group - Add Time_PickedUnit[Time_Index] to Time_Group[Time_Index]
              • Unit - Set the custom value of Time_PickedUnit[Time_Index] to (Integer((Current movement speed of Time_PickedUnit[Time_Index])))
            • Else - Actions
          • Set Time_PickedUnit[Time_Index] = No unit
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Time_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on TimeLoop <gen>
        • Else - Actions
  • TimeLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Time_Loop_Integer) from 1 to Time_Index, do (Actions)
        • Loop - Actions
          • Set Time_Counter[Time_Loop_Integer] = (Time_Counter[Time_Loop_Integer] + 0.03)
          • Unit Group - Pick every unit in Time_Group[Time_Loop_Integer] and do (Actions)
            • Loop - Actions
              • Unit - Set (Picked unit) movement speed to ((Real((Custom value of (Picked unit)))) x 0.25)
              • Animation - Change (Picked unit)'s animation speed to 25.00% of its original speed
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Time_Counter[Time_Loop_Integer] Greater than or equal to Time_Limit[Time_Loop_Integer]
            • Then - Actions
              • Animation - Change Time_Caster[Time_Index]'s animation speed to 100.00% of its original speed
              • Unit - Set Time_Caster[Time_Loop_Integer] movement speed to (Real((Custom value of Time_Caster[Time_Loop_Integer])))
              • Game - Set time of day speed to 100.00% of the default speed
              • Player - Enable Time Freeze for (Owner of Time_Caster[Time_Loop_Integer])
              • Unit Group - Pick every unit in Time_Group[Time_Loop_Integer] and do (Actions)
                • Loop - Actions
                  • Unit - Set (Picked unit) movement speed to (Real((Custom value of (Picked unit))))
                  • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
              • Set Time_Caster[Time_Loop_Integer] = Time_Caster[Time_Index]
              • Set Time_Limit[Time_Loop_Integer] = Time_Limit[Time_Index]
              • Set Time_Counter[Time_Loop_Integer] = Time_Counter[Time_Index]
              • Set Time_Caster[Time_Index] = No unit
              • Set Time_Index = (Time_Index - 1)
              • Set Time_Loop_Integer = (Time_Loop_Integer - 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Time_Index Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • WebCall
    • Events
    • Conditions
    • Actions
      • Set Web_Index = (Web_Index + 1)
      • Set Web_Caster[Web_Index] = ConfigWebCaster
      • Set Web_Target[Web_Index] = ConfigWebTarget
      • Set Web_Damage[Web_Index] = ConfigWebDamage
      • Set Web_Counter[Web_Index] = 0.00
      • Set Web_CurHeight[Web_Index] = 0.00
      • Set Web_MaxHeight[Web_Index] = 245.00
      • Set Web_ReachedMaxHeight[Web_Index] = False
      • Set Web_StunDur[Web_Index] = ConfigWebStunDur
      • Special Effect - Create a special effect attached to the origin of Web_Caster[Web_Index] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Pause Web_Caster[Web_Index]
      • Custom script: call SetUnitAnimationByIndex(udg_Web_Caster[udg_Web_Index],2)
      • Unit - Add Storm Crow Form to Web_Caster[Web_Index]
      • Unit - Turn collision for Web_Caster[Web_Index] Off
      • Unit - Make Web_Caster[Web_Index] Invulnerable
      • Special Effect - Create a special effect attached to the origin of Web_Caster[Web_Index] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • Set Web_SFX1[Web_Index] = (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Web_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on WebLoop <gen>
        • Else - Actions
  • WebLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Web_Loop_Integer) from 1 to Web_Index, do (Actions)
        • Loop - Actions
          • Set Web_CurDist[Web_Loop_Integer] = (Distance between (Position of Web_Caster[Web_Loop_Integer]) and (Position of Web_Target[Web_Loop_Integer]))
          • Set Web_Counter[Web_Loop_Integer] = (Web_Counter[Web_Loop_Integer] + 0.03)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Web_CurHeight[Web_Loop_Integer] Less than Web_MaxHeight[Web_Loop_Integer]
              • Web_ReachedMaxHeight[Web_Loop_Integer] Equal to False
            • Then - Actions
              • Set Web_CurHeight[Web_Loop_Integer] = (Web_CurHeight[Web_Loop_Integer] + (Web_MaxHeight[Web_Loop_Integer] / 4.80))
              • Custom script: call SetUnitAnimationByIndex(udg_Web_Caster[udg_Web_Loop_Integer],2)
              • Animation - Change Web_Caster[Web_Loop_Integer] flying height to Web_CurHeight[Web_Loop_Integer] at 100000.00
              • Custom script: call SetUnitAnimationByIndex(udg_Web_Caster[udg_Web_Loop_Integer],2)
            • Else - Actions
              • Set Web_ReachedMaxHeight[Web_Loop_Integer] = True
              • Set Web_StartPoint[Web_Loop_Integer] = (Position of Web_Caster[Web_Loop_Integer])
              • Set Web_EndPoint[Web_Loop_Integer] = (Position of Web_Target[Web_Loop_Integer])
              • Set z1[Web_Loop_Integer] = (Current flying height of Web_Caster[Web_Loop_Integer])
              • Set z2[Web_Loop_Integer] = (Current flying height of Web_Target[Web_Loop_Integer])
              • Custom script: call DestroyLightningBJ(udg_Web_LightningEffect[udg_Web_Loop_Integer])
              • Custom script: set udg_Web_LightningEffect[udg_Web_Loop_Integer] = addEffect(udg_Web_Loop_Integer,"LEAS")
              • Set Web_PouncePoint[Web_Loop_Integer] = ((Position of Web_Caster[Web_Loop_Integer]) offset by 55.00 towards (Angle from (Position of Web_Caster[Web_Loop_Integer]) to (Position of Web_Target[Web_Loop_Integer])) degrees)
              • Set Web_CurHeight[Web_Loop_Integer] = (Web_CurHeight[Web_Loop_Integer] - (Web_MaxHeight[Web_Loop_Integer] / (Web_CurDist[Web_Loop_Integer] / 55.00)))
              • Animation - Change Web_Caster[Web_Loop_Integer] flying height to Web_CurHeight[Web_Loop_Integer] at 100000.00
              • Unit - Move Web_Caster[Web_Loop_Integer] instantly to Web_PouncePoint[Web_Loop_Integer]
              • Custom script: call RemoveLocation(udg_Web_PouncePoint[udg_Web_Loop_Integer])
              • Custom script: call RemoveLocation(udg_Web_StartPoint[udg_Web_Loop_Integer])
              • Custom script: call RemoveLocation(udg_Web_EndPoint[udg_Web_Loop_Integer])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Web_CurDist[Web_Loop_Integer] Less than or equal to 85.00
                  • Web_CurHeight[Web_Loop_Integer] Less than or equal to 0.00
                • Then - Actions
                  • Set Web_DamagedGroup[Web_Loop_Integer] = (Units within 275.00 of (Position of Web_Caster[Web_Loop_Integer]))
                  • Unit Group - Pick every unit in Web_DamagedGroup[Web_Loop_Integer] and do (Actions)
                    • Loop - Actions
                      • Set Web_PickedDamagedUnit[Web_Loop_Integer] = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Web_PickedDamagedUnit[Web_Loop_Integer] is A structure) Equal to False
                          • (Web_PickedDamagedUnit[Web_Loop_Integer] is alive) Equal to True
                          • (Web_PickedDamagedUnit[Web_Loop_Integer] is Magic Immune) Equal to False
                          • Web_PickedDamagedUnit[Web_Loop_Integer] Not equal to Web_Caster[Web_Loop_Integer]
                        • Then - Actions
                          • Unit - Cause Web_Caster[Web_Loop_Integer] to damage Web_PickedDamagedUnit[Web_Loop_Integer], dealing Web_Damage[Web_Loop_Integer] damage of attack type Spells and damage type Normal
                          • Set cCastingUnit = Web_Caster[Web_Loop_Integer]
                          • Set cKnockDestroyTrees = False
                          • Set cKnockDuration = Web_StunDur[Web_Loop_Integer]
                          • Set cKnockSFX = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                          • Set cKnockSpeed = 1.25
                          • Set cKnockedUnit = Web_PickedDamagedUnit[Web_Loop_Integer]
                          • Trigger - Run KnockCall <gen> (ignoring conditions)
                        • Else - Actions
                      • Set Web_PickedDamagedUnit[Web_Loop_Integer] = No unit
                  • Custom script: call DestroyGroup(udg_Web_DamagedGroup[udg_Web_Loop_Integer])
                  • Custom script: call DestroyLightningBJ(udg_Web_LightningEffect[udg_Web_Loop_Integer])
                  • Unit - Turn collision for Web_Caster[Web_Loop_Integer] On
                  • Unit - Make Web_Caster[Web_Loop_Integer] Vulnerable
                  • Unit - Unpause Web_Caster[Web_Loop_Integer]
                  • Special Effect - Create a special effect at (Position of Web_Target[Web_Loop_Integer]) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Destroy Web_SFX1[Web_Loop_Integer]
                  • Unit - Remove Storm Crow Form from Web_Caster[Web_Loop_Integer]
                  • Set Web_Caster[Web_Loop_Integer] = Web_Caster[Web_Index]
                  • Set Web_Target[Web_Loop_Integer] = Web_Target[Web_Index]
                  • Set Web_CurDist[Web_Loop_Integer] = Web_CurDist[Web_Index]
                  • Set Web_CurHeight[Web_Loop_Integer] = Web_CurHeight[Web_Index]
                  • Set z1[Web_Loop_Integer] = z1[Web_Index]
                  • Set z2[Web_Loop_Integer] = z2[Web_Index]
                  • Set Web_DamagedGroup[Web_Loop_Integer] = Web_DamagedGroup[Web_Index]
                  • Set Web_ReachedMaxHeight[Web_Loop_Integer] = Web_ReachedMaxHeight[Web_Index]
                  • Set Web_SFX1[Web_Loop_Integer] = Web_SFX1[Web_Index]
                  • Set Web_Caster[Web_Index] = No unit
                  • Set Web_Target[Web_Index] = No unit
                  • Custom script: set udg_Web_LightningEffect[udg_Web_Index] = null
                  • Set Web_Index = (Web_Index - 1)
                  • Set Web_Loop_Integer = (Web_Loop_Integer - 1)
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Web_Index Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • WMCall
    • Events
    • Conditions
    • Actions
      • Set WMIndex = (WMIndex + 1)
      • Set WMCaster[WMIndex] = ConfigWMCaster
      • Set WMCounter[WMIndex] = ConfigWMDur
      • Set WMBonusSTR[WMIndex] = ConfigWMBonusSTR
      • Hero - Modify Strength of WMCaster[WMIndex]: Add (Integer(WMBonusSTR[WMIndex]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WMIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on WMLoop <gen>
        • Else - Actions
  • WMLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer WMLoopInteger) from 1 to WMIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WMCounter[WMLoopInteger] Less than or equal to 0.00
            • Then - Actions
              • Hero - Modify Strength of WMCaster[WMLoopInteger]: Subtract (Integer(WMBonusSTR[WMLoopInteger]))
              • Set WMCaster[WMLoopInteger] = WMCaster[WMIndex]
              • Set WMCounter[WMLoopInteger] = WMCounter[WMIndex]
              • Set WMBonusSTR[WMLoopInteger] = WMBonusSTR[WMIndex]
              • Set WMCaster[WMIndex] = No unit
              • Set WMIndex = (WMIndex - 1)
              • Set WMLoopInteger = (WMLoopInteger - 1)
            • Else - Actions
              • Set WMCounter[WMLoopInteger] = (WMCounter[WMLoopInteger] - 0.03)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WMIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • GodCall
    • Events
    • Conditions
    • Actions
      • Set GodIndex = (GodIndex + 1)
      • Set GodCaster[GodIndex] = ConfigGodCaster
      • Set GodLevel[GodIndex] = (Level of AbilId[8] for GodCaster[GodIndex])
      • Set GodHPDrain[GodIndex] = ConfigGodHPDrain[GodLevel[GodIndex]]
      • Set GodHPDamagePercent[GodIndex] = ConfigHPDamagePercent
      • Set GodRadius[GodIndex] = ConfigGodRadius
      • Set GodDur[GodIndex] = ConfigGodMaxStrikes
      • Set GodInterval[GodIndex] = ConfigGodInterval
      • Set GodDurInSec[GodIndex] = 0
      • Unit - Set the custom value of GodCaster[GodIndex] to GodIndex
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GodIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on GodLoop <gen>
        • Else - Actions
  • GodLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer GodLoopInteger) from 1 to GodIndex, do (Actions)
        • Loop - Actions
          • Unit - Set life of GodCaster[GodLoopInteger] to ((Life of GodCaster[GodLoopInteger]) - (GodHPDrain[GodLoopInteger] x 0.03))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GodCounter[GodLoopInteger] Greater than or equal to GodInterval[GodLoopInteger]
            • Then - Actions
              • Set GodCounter[GodLoopInteger] = 0.00
              • Set GodDurInSec[GodLoopInteger] = (GodDurInSec[GodLoopInteger] + 1)
              • Set GodPoint[GodLoopInteger] = ((Position of GodCaster[GodLoopInteger]) offset by (Random real number between 100.00 and (GodRadius[GodLoopInteger] x 2.00)) towards (Random angle) degrees)
              • Set GodGroup[GodLoopInteger] = (Units within GodRadius[GodLoopInteger] of GodPoint[GodLoopInteger])
              • Special Effect - Create a special effect at GodPoint[GodLoopInteger] using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at GodPoint[GodLoopInteger] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit Group - Pick every unit in GodGroup[GodLoopInteger] and do (Actions)
                • Loop - Actions
                  • Set GodPicked[GodLoopInteger] = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (GodPicked[GodLoopInteger] is A structure) Equal to False
                      • (GodPicked[GodLoopInteger] is alive) Equal to True
                      • GodPicked[GodLoopInteger] Not equal to GodCaster[GodLoopInteger]
                      • (GodPicked[GodLoopInteger] belongs to an enemy of (Owner of GodCaster[GodLoopInteger])) Equal to True
                    • Then - Actions
                      • Unit - Cause GodCaster[GodLoopInteger] to damage GodPicked[GodLoopInteger], dealing ((Life of GodCaster[GodLoopInteger]) x GodHPDamagePercent[GodLoopInteger]) damage of attack type Spells and damage type Normal
                    • Else - Actions
                  • Set GodPicked[GodLoopInteger] = No unit
              • Custom script: call RemoveLocation(udg_GodPoint[udg_GodLoopInteger])
              • Custom script: call DestroyGroup(udg_GodGroup[udg_GodLoopInteger])
            • Else - Actions
              • Set GodCounter[GodLoopInteger] = (GodCounter[GodLoopInteger] + 0.03)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GodDurInSec[GodLoopInteger] Greater than or equal to (Integer(GodDur[GodLoopInteger]))
            • Then - Actions
              • Unit - Order GodCaster[GodLoopInteger] to Stop
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GodIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
  • GodEndCall
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to AbilId[8]
    • Actions
      • Set GodCaster[(Custom value of (Triggering unit))] = GodCaster[GodIndex]
      • Set GodCaster[GodIndex] = No unit
      • Set GodIndex = (GodIndex - 1)
      • Set GodLoopInteger = (GodLoopInteger - 1)


Also used SetUnitMaxState Jass code by EarthFury

JASS:
function SetUnitMaxState takes unit u, unitstate state, real newValue returns nothing
    local integer stateAbility
    local integer newVal = R2I(newValue)
    local integer i = udg_MAX
    local integer offset

    if state == UNIT_STATE_MAX_LIFE then
        set stateAbility = 'A00D'
    elseif state == UNIT_STATE_MAX_MANA then
        set stateAbility = 'A006'
    else
        debug call BJDebugMsg("SetUnitMaxState Error: Invalid unitstate")
        return
    endif
    
    set newVal = newVal - R2I(GetUnitState(u, state))
    
    if newVal > 0 then
        set offset = udg_MAX + 3
    elseif newVal < 0 then
        set offset = 2
        set newVal = -newVal
    else
        return
    endif
    
    loop
        exitwhen newVal == 0 or i < 0
        if newVal >= udg_PowersOf2[i] then
            call UnitAddAbility(u, stateAbility)
            call SetUnitAbilityLevel(u, stateAbility, offset + i)
            call UnitRemoveAbility(u, stateAbility)
            set newVal = newVal - udg_PowersOf2[i]
        else
            set i = i - 1
        endif
    endloop
endfunction


Custom Script

JASS:
function addEffect takes integer i, string s returns lightning
return AddLightningEx(s,true,GetLocationX(udg_Web_StartPoint[i]),GetLocationY(udg_Web_StartPoint[i]),udg_z1[i],GetLocationX(udg_Web_EndPoint[i]),GetLocationY(udg_Web_EndPoint[i]),udg_z2[i])
endfunction
JASS:
function AddUnitMaxState takes unit u, unitstate state, real addedVal returns nothing
    local integer i = 1 
    set udg_PowersOf2[0] = 1
    loop
        set udg_PowersOf2[i] = udg_PowersOf2[i - 1] * 2
        set i = i + 1
        exitwhen i == udg_MAX + 3
    endloop
    call SetUnitMaxState(u,state,GetUnitState(u,state) + addedVal)
endfunction
JASS:
function Initialize takes unit u, unitstate us, real addedVal returns nothing
    local integer i = 1
    set udg_PowersOf2[0] = 1
    loop
        set udg_PowersOf2[i] = udg_PowersOf2[i - 1] * 2
        set i = i + 1
        exitwhen i == udg_MAX + 3
    endloop
    call SetUnitMaxState(u, us, addedVal)
endfunction


Usage:
* Copy selected ability folder to your code.
* Check variable configurations.

Changelogs:
- v0.9 - BETA release

"Don't Forget! Credits for Use."

Keywords:
super,hero,pack,avenger,DC,etc
Contents

Superheroes Spellpack (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 16:59, 7th Jan 2015 IcemanBo: http://www.hiveworkshop.com/forums/spells-569/superheroes-spell-pack-vol-1-v0-9-a-259341/#post2637122
You have a lot of location and group leaks that need to be taken care of. Look at the tutorial Things that leak on the triggers and scripts forum page.

Your checking for maxIndex = 0 should be in the de-index portion of your code.

This should be changed to a simple tempUnit variable. You do not need an arrayed variable or a new integer. Dash_PickedUnit[Dash_Loop_Integer]

You should show your config trigger in the above also.

You should not submit anything that you do not believe is done.
No versions submitted should be under v1.0
 
  • You need ingame screenshots and a spell description.
  • Post the configuration trigger(s).
  • You have memory leaks.
  • No need to pick all units in map, and then filter for distance.
  • Use your own integers over IntegerA/B.
  • Effects/attack types, attachment points and all these stuff should be configurable.
  • The check to turn off loops should only be onDeindex.
  • I instantly can see that TimeFreeze is not MUI.
  • Responses that are used multiple times should be stored in a temp variable.
  • Do not touch the custom value of units. It's reserved for UnitIndexer systems.
  • Do not use pause/unpause caster. Find a workaround.
  • Just adding and substracting stength is by far not enough for a spell to be approved. (Warrior's Madness)

There are many critical points. At the moment it's unacceptable. I would suggest you to focus on the best of these ideas and work on them.
Once they get approved you still could upload a Spellpack 2 with other spells. Having that many spells in one pack is hard for you to update, but also hard for us to review all changes.

Needs Fix
 
Top